From 496b27c9565e314a05bfe141b96463b9f2185483 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Mon, 23 Jun 2025 20:00:38 +0800 Subject: [PATCH 01/39] feat(java): add project --- .../plugin/generator/JavaSdkGenerator.java | 476 ++++++++++++++++++ .../org.openapitools.codegen.CodegenConfig | 1 + .../src/main/resources/java-sdk/api.mustache | 20 + .../resources/java-sdk/api_entry.mustache | 20 + .../java-sdk/api_entry_impl.mustache | 35 ++ .../main/resources/java-sdk/api_impl.mustache | 21 + .../main/resources/java-sdk/api_test.mustache | 86 ++++ .../java-sdk/api_test_template.mustache | 39 ++ .../main/resources/java-sdk/api_ws.mustache | 41 ++ .../resources/java-sdk/api_ws_impl.mustache | 60 +++ .../resources/java-sdk/api_ws_test.mustache | 65 +++ .../main/resources/java-sdk/model.mustache | 109 ++++ .../main/resources/java-sdk/model_ws.mustache | 129 +++++ .../java-sdk/partial_header.mustache | 1 + .../main/resources/java-sdk/version.mustache | 8 + .../java-sdk/ws_test_template.mustache | 31 ++ .../sdk/plugin/SdkGeneratorTest.java | 56 +-- sdk/java/.gitignore | 38 ++ sdk/java/LICENSE | 21 + sdk/java/pom.xml | 49 ++ .../sdk/internal/interfaces/PathVar.java | 16 + .../sdk/internal/interfaces/Request.java | 4 + .../sdk/internal/interfaces/Response.java | 8 + .../sdk/internal/interfaces/Transport.java | 33 ++ .../kucoin/universal/sdk/model/Constants.java | 36 ++ .../kucoin/universal/sdk/model/RestError.java | 32 ++ .../universal/sdk/model/RestRateLimit.java | 29 ++ .../universal/sdk/model/RestResponse.java | 24 + 28 files changed, 1460 insertions(+), 28 deletions(-) create mode 100644 generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java create mode 100644 generator/plugin/src/main/resources/java-sdk/api.mustache create mode 100644 generator/plugin/src/main/resources/java-sdk/api_entry.mustache create mode 100644 generator/plugin/src/main/resources/java-sdk/api_entry_impl.mustache create mode 100644 generator/plugin/src/main/resources/java-sdk/api_impl.mustache create mode 100644 generator/plugin/src/main/resources/java-sdk/api_test.mustache create mode 100644 generator/plugin/src/main/resources/java-sdk/api_test_template.mustache create mode 100644 generator/plugin/src/main/resources/java-sdk/api_ws.mustache create mode 100644 generator/plugin/src/main/resources/java-sdk/api_ws_impl.mustache create mode 100644 generator/plugin/src/main/resources/java-sdk/api_ws_test.mustache create mode 100644 generator/plugin/src/main/resources/java-sdk/model.mustache create mode 100644 generator/plugin/src/main/resources/java-sdk/model_ws.mustache create mode 100644 generator/plugin/src/main/resources/java-sdk/partial_header.mustache create mode 100644 generator/plugin/src/main/resources/java-sdk/version.mustache create mode 100644 generator/plugin/src/main/resources/java-sdk/ws_test_template.mustache create mode 100644 sdk/java/.gitignore create mode 100644 sdk/java/LICENSE create mode 100644 sdk/java/pom.xml create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/PathVar.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Request.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Response.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Transport.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/model/Constants.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestError.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestRateLimit.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java diff --git a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java new file mode 100644 index 00000000..a2177051 --- /dev/null +++ b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java @@ -0,0 +1,476 @@ +package com.kucoin.universal.sdk.plugin.generator; + +import com.kucoin.universal.sdk.plugin.model.EnumEntry; +import com.kucoin.universal.sdk.plugin.model.ModeSwitch; +import com.kucoin.universal.sdk.plugin.service.NameService; +import com.kucoin.universal.sdk.plugin.service.OperationService; +import com.kucoin.universal.sdk.plugin.service.SchemaService; +import com.kucoin.universal.sdk.plugin.service.impl.OperationServiceImpl; +import com.kucoin.universal.sdk.plugin.service.impl.SchemaServiceImpl; +import com.kucoin.universal.sdk.plugin.util.KeywordsUtil; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.Operation; +import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.servers.Server; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.CodegenProperty; +import org.openapitools.codegen.CodegenType; +import org.openapitools.codegen.languages.AbstractJavaCodegen; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationsMap; +import org.openapitools.codegen.utils.CamelizeOption; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.util.*; + +import static org.openapitools.codegen.utils.StringUtils.camelize; + +/** + * @author isaac.tang + */ +@Slf4j +public class JavaSdkGenerator extends AbstractJavaCodegen implements NameService { + private final Logger LOGGER = LoggerFactory.getLogger(JavaSdkGenerator.class); + + private SchemaService schemaService; + private OperationService operationService; + private ModeSwitch modeSwitch; + + private String service; + private String subService; + + public CodegenType getTag() { + return CodegenType.OTHER; + } + + public String getName() { + return "java-sdk"; + } + + public String getHelp() { + return "Generates a java-sdk library."; + } + + public JavaSdkGenerator() { + super(); + cliOptions.add(ModeSwitch.option); + this.modelTemplateFiles.clear(); + this.apiTemplateFiles.clear(); + this.apiTestTemplateFiles.clear(); + this.modelDocTemplateFiles.clear(); + this.apiDocTemplateFiles.clear(); + typeMapping.put("number", "Double"); + } + + @Override + public void processOpts() { + super.processOpts(); + this.supportingFiles.clear(); + modeSwitch = new ModeSwitch(additionalProperties); + service = KeywordsUtil.getKeyword(camelize(openAPI.getInfo().getTitle(), CamelizeOption.LOWERCASE_FIRST_LETTER)); + subService = camelize(openAPI.getInfo().getDescription(), CamelizeOption.LOWERCASE_FIRST_LETTER); + apiPackage = String.format("com.kucoin.universal.sdk.generate.%s.%s", service, subService); + modelPackage = String.format("com.kucoin.universal.sdk.generate.%s.%s", service, subService); + + switch (modeSwitch.getMode()) { + case API: { + modelTemplateFiles.put("model.mustache", ".java"); + apiTemplateFiles.put("api.mustache", ".java"); + apiTemplateFiles.put("api_impl.mustache", "Impl.java"); + break; + } + case TEST: { + apiTemplateFiles.put("api_test.mustache", "Test.php"); + break; + } + case TEST_TEMPLATE: { + apiTemplateFiles.put("api_test_template.mustache", ".template"); + break; + } + case ENTRY: { + apiTemplateFiles.put("api_entry.mustache", ".php"); + apiTemplateFiles.put("api_entry_impl.mustache", "Impl.php"); + break; + } + case WS: { + modelTemplateFiles.put("model_ws.mustache", ".php"); + apiTemplateFiles.put("api_ws.mustache", ".php"); + apiTemplateFiles.put("api_ws_impl.mustache", "Impl.php"); + additionalProperties.put("WS_MODE", "true"); + break; + } + case WS_TEST: { + additionalProperties.put("WS_MODE", "true"); + apiTemplateFiles.put("api_ws_test.mustache", "Test.php"); + break; + } + case WS_TEST_TEMPLATE: { + additionalProperties.put("WS_MODE", "true"); + apiTemplateFiles.put("ws_test_template.mustache", ".template"); + break; + } + default: + throw new RuntimeException("unsupported mode"); + } +// +// supportingFiles.add(new SupportingFile("version.mustache", "Version.php")); + + templateDir = "java-sdk"; + + // override parent properties + enablePostProcessFile = true; + useBeanValidation = false; + + inlineSchemaOption.put("SKIP_SCHEMA_REUSE", "true"); + } + + @Override + public void preprocessOpenAPI(OpenAPI openAPI) { + super.preprocessOpenAPI(openAPI); + + // parse and update operations and models + schemaService = new SchemaServiceImpl(openAPI); + operationService = new OperationServiceImpl(openAPI, this); + + operationService.parseOperation(); + schemaService.parseSchema(); + } + + @Override + public String formatParamName(String name) { + return toParamName(name); + } + + @Override + public String formatMethodName(String name) { + return camelize(sanitizeName(name), CamelizeOption.LOWERCASE_FIRST_CHAR); + } + + @Override + public String formatService(String name) { + return camelize(name); + } + + @Override + public String formatPackage(String name) { + return formatService(name).toLowerCase(); + } + + @Override + public CodegenProperty fromProperty(String name, Schema p, boolean required) { + CodegenProperty prop = super.fromProperty(name, p, required); + if (prop.defaultValue != null && prop.defaultValue.equalsIgnoreCase("undefined")) { + prop.defaultValue = null; + } + + if (prop.isEnum) { + List enums = new ArrayList<>(); + + List> enumList; + if (prop.openApiType.equalsIgnoreCase("array")) { + enumList = (List>) prop.mostInnerItems.vendorExtensions.get("x-api-enum"); + } else { + enumList = (List>) prop.vendorExtensions.get("x-api-enum"); + } + + + List names = new ArrayList<>(); + List values = new ArrayList<>(); + List description = new ArrayList<>(); + + enumList.forEach(e -> { + Object enumValueOriginal = e.get("value"); + + String enumValueNameGauss; + if (enumValueOriginal instanceof Integer) { + enumValueNameGauss = "_" + e.get("value"); + } else if (enumValueOriginal instanceof String) { + enumValueNameGauss = enumValueOriginal.toString(); + } else { + throw new IllegalArgumentException("unknown enum value type..." + e.get("value")); + } + + String enumName = (String) e.get("name"); + if (StringUtils.isEmpty(enumName)) { + enumName = enumValueNameGauss; + } + + enumName = toVarName(enumName).toUpperCase(); + String enumValue = toEnumValue(enumValueOriginal.toString().trim(), typeMapping.get(p.getType())); + + names.add(enumName); + values.add(enumValueOriginal.toString().trim()); + description.add(e.get("description").toString()); + + enums.add(new EnumEntry(enumName, enumValue, enumValueOriginal, (String) e.get("description"), enumValueOriginal instanceof String)); + }); + + // update internal enum support + prop._enum = values; + prop.allowableValues.put("values", values); + prop.vendorExtensions.put("x-enum-varnames", names); + prop.vendorExtensions.put("x-enum-descriptions", description); + prop.vendorExtensions.put("x-enums", enums); + } + + + return prop; + } + + @Override + public String toModelName(String name) { + return formatService(schemaService.getGeneratedModelName(name)); + } + + @Override + public String toApiName(String name) { + return camelize(name + "_" + (modeSwitch.isWs() || modeSwitch.isWsTest() ? "Ws" : "Api")); + } + + @Override + public String toModelFilename(String name) { + name = schemaService.getGeneratedModelName(name); + name = formatService(name); + return name; + } + + @Override + public String modelFileFolder() { + switch (modeSwitch.getMode()) { + case ENTRY: + return outputFolder + File.separator + "Service"; + default: + return outputFolder + File.separator + service + File.separator + subService; + } + } + + @Override + public String toApiFilename(String name) { + String apiName = name.replaceAll("-", "_"); + switch (modeSwitch.getMode()) { + case API: + case ENTRY: + case TEST_TEMPLATE: + case TEST: { + apiName = apiName + "Api"; + break; + } + case WS: + case WS_TEST: + case WS_TEST_TEMPLATE: { + apiName = apiName + "Ws"; + break; + } + } + + return apiName; + } + + @Override + public String modelFilename(String templateName, String name) { + String suffix = modelTemplateFiles().get(templateName); + return modelFileFolder() + File.separator + toModelFilename(name) + suffix; + } + + @Override + public String apiFilename(String templateName, String tag) { + String suffix = apiTemplateFiles().get(templateName); + if (modeSwitch.isEntry()) { + String entryType = service + "Service"; + return modelFileFolder() + File.separator + entryType + suffix; + } + return modelFileFolder() + File.separator + toApiFilename(tag) + suffix; + } + + @Override + public CodegenOperation fromOperation(String path, String httpMethod, Operation operation, List servers) { + CodegenOperation result = super.fromOperation(path, httpMethod, operation, servers); + if (httpMethod.equalsIgnoreCase("patch")) { + result.httpMethod = (String) operation.getExtensions().get("x-original-method"); + } + return result; + } + + + @Override + public ModelsMap postProcessModels(ModelsMap objs) { + objs = super.postProcessModels(objs); + + + List models = objs.getModels(); + + if (models != null) { + for (ModelMap model : models) { + CodegenModel codegenModel = model.getModel(); + + Set imports = new TreeSet<>(); + Set annotation = new TreeSet<>(); + + imports.add("import lombok.Data;"); + imports.add("import com.fasterxml.jackson.annotation.JsonProperty;"); + annotation.add("@Data"); + + Map vendorExtension = codegenModel.getVendorExtensions(); + + if (vendorExtension.containsKey("x-request-model")) { + annotation.add("@Builder"); + imports.add("import lombok.Builder;"); + imports.add("import com.kucoin.universal.sdk.internal.interfaces.Request;"); + } + + + + if (vendorExtension.containsKey("x-response-model")) { + imports.add("import com.fasterxml.jackson.annotation.JsonIgnore;"); + imports.add("import com.kucoin.universal.sdk.internal.interfaces.Response;"); + imports.add("import com.kucoin.universal.sdk.model.RestResponse;"); + } + + if (vendorExtension.containsKey("x-original-response") ||vendorExtension.containsKey("x-request-raw-array") ) { + imports.add("import com.fasterxml.jackson.annotation.JsonCreator;"); + } + + codegenModel.getVars().forEach(var-> { + + if (var.getVendorExtensions().containsKey("x-tag-path")) { + imports.add("import com.fasterxml.jackson.annotation.JsonIgnore;"); + imports.add("import com.kucoin.universal.sdk.internal.interfaces.PathVar;"); + } + + if (var.getIsArray()) { + imports.add(String.format("import %s;", importMapping.get("List"))); + imports.add(String.format("import %s;", importMapping.get("ArrayList"))); + } else if (var.getIsMap()) { + imports.add(String.format("import %s;", importMapping.get("Map"))); + imports.add(String.format("import %s;", importMapping.get("HashMap"))); + } else if (var.isEnum){ + imports.add("import com.fasterxml.jackson.annotation.JsonValue;"); + imports.add("import com.fasterxml.jackson.annotation.JsonCreator;"); + } else { + ; + } + + }); + + + vendorExtension.put("x-imports", imports); + vendorExtension.put("x-annotation", annotation); + } + } + return objs; + } + + @Override + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + objs = super.postProcessOperationsWithModels(objs, allModels); + +// OperationMap operationMap = objs.getOperations(); +// +// +// Set imports = new TreeSet<>(); +// Set implImports = new TreeSet<>(); +// +// for (CodegenOperation op : operationMap.getOperation()) { +// Meta meta = SpecificationUtil.getMeta(op.vendorExtensions); +// if (meta != null) { +// switch (modeSwitch.getMode()) { +// case ENTRY: { +// // api entry +// List> entryValue = new ArrayList<>(); +// operationService.getServiceMeta().forEach((k, v) -> { +// if (v.getService().equalsIgnoreCase(meta.getService())) { +// Map kv = new HashMap<>(); +// kv.put("method", formatMethodName(k)); +// kv.put("methodUppercase", camelize(formatMethodName(k))); +// kv.put("target_service", formatService(k + "Api")); +// entryValue.add(kv); +// String servicePath = camelize(v.getSubService().toLowerCase(), CamelizeOption.UPPERCASE_FIRST_CHAR); +// imports.add(String.format("use KuCoin\\UniversalSDK\\Generate\\%s\\%s\\%s;", v.getService(), servicePath, formatService(k + "Api"))); +// implImports.add(String.format("use KuCoin\\UniversalSDK\\Generate\\%s\\%s\\%sImpl;", v.getService(), servicePath, formatService(k + "Api"))); +// } +// }); +// Map apiEntryInfo = new HashMap<>(); +// apiEntryInfo.put("api_entry_name", formatService(meta.getService() + "Service")); +// apiEntryInfo.put("api_entry_value", entryValue); +// objs.put("api_entry", apiEntryInfo); +// break; +// } +// +// case API: +// case TEST: { +// break; +// } +// case WS: +// case WS_TEST: { +// +// break; +// } +// case TEST_TEMPLATE: { +// String reqName = String.format("%s.%s", modelPackage, meta.getMethodServiceFmt() + "Req"); +// String responseName = String.format("%s.%s", modelPackage, meta.getMethodServiceFmt() + "Resp"); +// allModels.stream().filter(m -> reqName.equalsIgnoreCase((String) m.get("importPath"))). +// forEach(m -> op.vendorExtensions.put("x-request-model", m.getModel())); +// allModels.stream().filter(m -> responseName.equalsIgnoreCase((String) m.get("importPath"))). +// forEach(m -> { +// +// CodegenModel model = m.getModel(); +// for (CodegenProperty var : model.vars) { +// if (var.isArray) { +// String innerDataName = String.format("%s.%s", modelPackage, var.getComplexType()); +// CodegenModel innerClass = null; +// for (ModelMap map : allModels) { +// if (innerDataName.equalsIgnoreCase((String) map.get("importPath"))) { +// innerClass = map.getModel(); +// break; +// } +// } +// +// if (innerClass != null) { +// var.vendorExtensions.put("x-response-inner-model", innerClass); +// } +// } +// } +// +// op.vendorExtensions.put("x-response-model", m.getModel()); +// }); +// break; +// } +// case WS_TEST_TEMPLATE: { +// String eventName = String.format("%s.%s", modelPackage, meta.getMethodServiceFmt() + "Event"); +// allModels.stream().filter(m -> eventName.equalsIgnoreCase((String) m.get("importPath"))). +// forEach(m -> { +// CodegenModel model = m.getModel(); +// for (CodegenProperty var : model.vars) { +// if (var.isArray) { +// String innerDataName = String.format("%s.%s", modelPackage, var.getComplexType()); +// CodegenModel innerClass = null; +// for (ModelMap map : allModels) { +// if (innerDataName.equalsIgnoreCase((String) map.get("importPath"))) { +// innerClass = map.getModel(); +// break; +// } +// } +// +// if (innerClass != null) { +// var.vendorExtensions.put("x-response-inner-model", innerClass); +// } +// } +// } +// op.vendorExtensions.put("x-response-model", m.getModel()); +// }); +// break; +// } +// } +// } +// } +// objs.put("imports", imports); +// objs.put("implImports", implImports); + return objs; + } +} diff --git a/generator/plugin/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/generator/plugin/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 2ef2bc1b..58c1fbf2 100644 --- a/generator/plugin/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/generator/plugin/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -2,3 +2,4 @@ com.kucoin.universal.sdk.plugin.generator.GolangSdkGenerator com.kucoin.universal.sdk.plugin.generator.PythonSdkGenerator com.kucoin.universal.sdk.plugin.generator.NodeSdkGenerator com.kucoin.universal.sdk.plugin.generator.PhpSdkGenerator +com.kucoin.universal.sdk.plugin.generator.JavaSdkGenerator diff --git a/generator/plugin/src/main/resources/java-sdk/api.mustache b/generator/plugin/src/main/resources/java-sdk/api.mustache new file mode 100644 index 00000000..9345d7a0 --- /dev/null +++ b/generator/plugin/src/main/resources/java-sdk/api.mustache @@ -0,0 +1,20 @@ +{{>partial_header}} +package {{package}}; + +interface {{classname}} { +{{#operations}} + {{#operation}} + /** + * {{summary}} + * {{notes}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + * docs + {{#vendorExtensions.x-extra-comment}} + * {{.}} + {{/vendorExtensions.x-extra-comment}} + */ + {{vendorExtensions.x-meta.methodServiceFmt}}Resp {{vendorExtensions.x-meta.method}}({{#hasParams}}{{vendorExtensions.x-meta.methodServiceFmt}}Req req{{/hasParams}}); + + {{/operation}} +{{/operations}} +} \ No newline at end of file diff --git a/generator/plugin/src/main/resources/java-sdk/api_entry.mustache b/generator/plugin/src/main/resources/java-sdk/api_entry.mustache new file mode 100644 index 00000000..872c67d9 --- /dev/null +++ b/generator/plugin/src/main/resources/java-sdk/api_entry.mustache @@ -0,0 +1,20 @@ +partial_header}} + +namespace KuCoin\UniversalSDK\Generate\Service; + +{{#imports}} +{{{.}}} +{{/imports}} + +{{#api_entry}} + + +interface {{api_entry_name}} { +{{#api_entry_value}} + + public function get{{methodUppercase}}Api(): {{target_service}}; +{{/api_entry_value}} +} + +{{/api_entry}} \ No newline at end of file diff --git a/generator/plugin/src/main/resources/java-sdk/api_entry_impl.mustache b/generator/plugin/src/main/resources/java-sdk/api_entry_impl.mustache new file mode 100644 index 00000000..1e1ffa03 --- /dev/null +++ b/generator/plugin/src/main/resources/java-sdk/api_entry_impl.mustache @@ -0,0 +1,35 @@ +partial_header}} + +namespace KuCoin\UniversalSDK\Generate\Service; + +{{#imports}} +{{{.}}} +{{/imports}} +{{#implImports}} +{{{.}}} +{{/implImports}} + +{{#api_entry}} + +class {{api_entry_name}}Impl implements {{api_entry_name}}{ + private $transport; +{{#api_entry_value}} + private ${{method}}; +{{/api_entry_value}} + + public function __construct($transport) { + $this->transport = $transport; + {{#api_entry_value}} + $this->{{method}} = new {{target_service}}Impl($transport); + {{/api_entry_value}} + } + +{{#api_entry_value}} + + public function get{{methodUppercase}}Api() :{{target_service}} { + return $this->{{method}}; + } +{{/api_entry_value}} +{{/api_entry}} +} \ No newline at end of file diff --git a/generator/plugin/src/main/resources/java-sdk/api_impl.mustache b/generator/plugin/src/main/resources/java-sdk/api_impl.mustache new file mode 100644 index 00000000..a4e8ae34 --- /dev/null +++ b/generator/plugin/src/main/resources/java-sdk/api_impl.mustache @@ -0,0 +1,21 @@ +{{>partial_header}} +package {{package}}; +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +class {{classname}}Impl implements {{classname}} { + private Transport transport; + + public {{classname}}Impl(Transport transport) + { + this.transport = transport; + } + +{{#operations}} + {{#operation}} + public {{vendorExtensions.x-meta.methodServiceFmt}}Resp {{vendorExtensions.x-meta.method}}({{#hasParams}}{{vendorExtensions.x-meta.methodServiceFmt}}Req req{{/hasParams}}){ + return this.transport.call("{{vendorExtensions.x-meta.domain}}", {{vendorExtensions.x-meta.broker}}, "{{httpMethod}}", "{{path}}", {{#hasParams}}req{{/hasParams}}{{^hasParams}}null{{/hasParams}}, {{vendorExtensions.x-meta.methodServiceFmt}}Resp.class, {{#vendorExtensions.x-request-force-json}}true{{/vendorExtensions.x-request-force-json}}{{^vendorExtensions.x-request-force-json}}false{{/vendorExtensions.x-request-force-json}}); + } + + {{/operation}} +{{/operations}} +} \ No newline at end of file diff --git a/generator/plugin/src/main/resources/java-sdk/api_test.mustache b/generator/plugin/src/main/resources/java-sdk/api_test.mustache new file mode 100644 index 00000000..6ef11c2c --- /dev/null +++ b/generator/plugin/src/main/resources/java-sdk/api_test.mustache @@ -0,0 +1,86 @@ +serializer = SerializerBuilder::create()->addDefaultHandlers() + ->configureHandlers(function ($handlerRegistry) { + $handlerRegistry->registerSubscribingHandler(new JsonSerializedHandler()); + })->build(); + } + + function hasAnyNoneNull($object) :bool { + $refClass = new ReflectionClass($object); + $props = $refClass->getProperties(); + + $excludeSize = 0; + $totalSize = sizeof($props); + foreach ($props as $prop) { + $doc = $prop->getDocComment(); + + if ($doc !== false && strpos($doc, '@Exclude') !== false) { + $excludeSize++; + continue; + } + + $prop->setAccessible(true); + + $value = $prop->getValue($object); + if ($value !== null) { + return true; + } + } + return $excludeSize === $totalSize; + } + +{{#operations}} + {{#operation}} + /** + * {{vendorExtensions.x-meta.method}} Request + * {{summary}} + * {{path}} + */ + public function test{{vendorExtensions.x-meta.methodServiceFmt}}Request() + { + {{#hasParams}} + $data = "{{{vendorExtensions.x-request-example}}}"; + $req = {{vendorExtensions.x-meta.methodServiceFmt}}Req::jsonDeserialize($data, $this->serializer); + $this->assertTrue($this->hasAnyNoneNull($req)); + echo $req->jsonSerialize($this->serializer); + {{/hasParams}} + {{^hasParams}} + $this->assertTrue(true); + {{/hasParams}} + } + + /** + * {{vendorExtensions.x-meta.method}} Response + * {{summary}} + * {{path}} + */ + public function test{{vendorExtensions.x-meta.methodServiceFmt}}Response() + { + $data = "{{{vendorExtensions.x-response-example}}}"; + $commonResp = RestResponse::jsonDeserialize($data, $this->serializer); + $respData = $commonResp->data ? $this->serializer->serialize($commonResp->data, 'json') : null; + $resp = {{vendorExtensions.x-meta.methodServiceFmt}}Resp::jsonDeserialize($respData, $this->serializer); + $commonResp->data ? $this->assertTrue($this->hasAnyNoneNull($resp)) : $this->assertTrue(true); + echo $resp->jsonSerialize($this->serializer); + } + {{/operation}} +{{/operations}} + +} \ No newline at end of file diff --git a/generator/plugin/src/main/resources/java-sdk/api_test_template.mustache b/generator/plugin/src/main/resources/java-sdk/api_test_template.mustache new file mode 100644 index 00000000..a4d2ae32 --- /dev/null +++ b/generator/plugin/src/main/resources/java-sdk/api_test_template.mustache @@ -0,0 +1,39 @@ + +{{#operations}} + {{#operation}} + /** + * {{vendorExtensions.x-meta.method}} + * {{summary}} + * {{path}} + */ + public function test{{vendorExtensions.x-meta.methodServiceFmt}}() { + {{#hasParams}} + $builder = {{vendorExtensions.x-meta.methodServiceFmt}}Req::builder(); + {{#vendorExtensions.x-request-model}} + $builder{{#vars}}->set{{nameInPascalCase}}(?){{/vars}}; + {{/vendorExtensions.x-request-model}} + $req = $builder->build(); + {{/hasParams}} + $resp = $this->api->{{vendorExtensions.x-meta.method}}({{#hasParams}}$req{{/hasParams}}); + {{#vendorExtensions.x-response-model}} + {{#vars}} + {{#isArray}} + foreach($resp->{{name}} as $item) { + {{#vendorExtensions.x-response-inner-model}} + {{#vars}} + self::assertNotNull($item->{{name}}); + {{/vars}} + {{/vendorExtensions.x-response-inner-model}} + } + + {{/isArray}} + {{^isArray}} + self::assertNotNull($resp->{{name}}); + {{/isArray}} + {{/vars}} + Logger::info($resp->jsonSerialize($this->serializer)); + {{/vendorExtensions.x-response-model}} + } + + {{/operation}} +{{/operations}} \ No newline at end of file diff --git a/generator/plugin/src/main/resources/java-sdk/api_ws.mustache b/generator/plugin/src/main/resources/java-sdk/api_ws.mustache new file mode 100644 index 00000000..e7a24d2c --- /dev/null +++ b/generator/plugin/src/main/resources/java-sdk/api_ws.mustache @@ -0,0 +1,41 @@ +partial_header}} +{{#imports}} +{{{.}}} +{{/imports}} +namespace {{package}}; +use React\Promise\PromiseInterface; + +interface {{classname}} { + +{{#operations}} + {{#operation}} + + /** + * {{summary}} + * {{notes}} + * push frequency: {{vendorExtensions.x-push_frequency}} + * @param callable $onData function(string $topic, string $subject, {{vendorExtensions.x-meta.methodServiceFmt}}Event $data): void + * @param ?callable $onSuccess function(string $id): void + * @param ?callable $onError function(Exception $e): void + * @return PromiseInterface A promise that resolves to the subscription ID or rejects with an error. + */ + public function {{vendorExtensions.x-meta.method}}{{operationName}}({{#vendorExtensions.x-meta.otherProperties}}{{#parameters}}{{#type}}{{#type.simple}}string ${{paras}},{{/type.simple}}{{#type.array}}array ${{paras}},{{/type.array}}{{#type.object}}{{#paras}}string ${{.}},{{/paras}}{{/type.object}}{{/type}}{{/parameters}}{{/vendorExtensions.x-meta.otherProperties}}callable $onData, ?callable $onSuccess = null, ?callable $onError = null) : PromiseInterface; + {{/operation}} + + /** + * Unsubscribe from topics + */ + public function unSubscribe(string $id) : PromiseInterface; + + /** + * Start websocket + */ + public function start(): PromiseInterface; + + /** + * Stop websocket + */ + public function stop(): PromiseInterface; +{{/operations}} +} \ No newline at end of file diff --git a/generator/plugin/src/main/resources/java-sdk/api_ws_impl.mustache b/generator/plugin/src/main/resources/java-sdk/api_ws_impl.mustache new file mode 100644 index 00000000..66064af4 --- /dev/null +++ b/generator/plugin/src/main/resources/java-sdk/api_ws_impl.mustache @@ -0,0 +1,60 @@ +partial_header}} +{{#imports}} +{{{.}}} +{{/imports}} +namespace {{package}}; +use KuCoin\UniversalSDK\Internal\Interfaces\WebSocketService; +use React\Promise\PromiseInterface; + +class {{classname}}Impl implements {{classname}} { + /**@var WebSocketService $wsService*/ + private $wsService; + + public function __construct(WebSocketService $wsService) { + $this->wsService = $wsService; + } + +{{#operations}} + {{#operation}} + + public function {{vendorExtensions.x-meta.method}}{{operationName}}({{#vendorExtensions.x-meta.otherProperties}}{{#parameters}}{{#type}}{{#type.simple}}string ${{paras}},{{/type.simple}}{{#type.array}}array ${{paras}},{{/type.array}}{{#type.object}}{{#paras}}string ${{.}},{{/paras}}{{/type.object}}{{/type}}{{/parameters}}{{/vendorExtensions.x-meta.otherProperties}}callable $onData, ?callable $onSuccess = null, ?callable $onError = null) : PromiseInterface{ + $topicPrefix = "{{vendorExtensions.x-meta.otherProperties.topic}}"; + {{#vendorExtensions.x-meta.otherProperties}}{{#parameters}}{{#type}} + {{#type.none}}$args = [];{{/type.none}} + {{#type.simple}}$args = [ {{#paras}}${{.}}{{/paras}}];{{/type.simple}} + {{#type.array}}$args = ${{paras}};{{/type.array}} + {{#type.object}}$args = [implode('_', [{{#paras}}${{.}},{{/paras}}])];{{/type.object}} + {{/type}}{{/parameters}}{{/vendorExtensions.x-meta.otherProperties}} + return $this->wsService->subscribe( + $topicPrefix, + $args, + {{vendorExtensions.x-meta.methodServiceFmt}}Event::createCallback($onData) + )->then(function ($id) use ($onSuccess) { + if ($onSuccess) { + $onSuccess($id); + } + return $id; + }, function ($e) use ($onError) { + if ($onError) { + $onError($e); + } + throw $e; + }); + } + {{/operation}} +{{/operations}} + + public function unSubscribe(string $id): PromiseInterface { + return $this->wsService->unsubscribe($id); + } + + public function start(): PromiseInterface { + return $this->wsService->start(); + } + + public function stop(): PromiseInterface { + return $this->wsService->stop(); + } + +} \ No newline at end of file diff --git a/generator/plugin/src/main/resources/java-sdk/api_ws_test.mustache b/generator/plugin/src/main/resources/java-sdk/api_ws_test.mustache new file mode 100644 index 00000000..aefb33c2 --- /dev/null +++ b/generator/plugin/src/main/resources/java-sdk/api_ws_test.mustache @@ -0,0 +1,65 @@ +serializer = SerializerBuilder::create()->addDefaultHandlers() + ->configureHandlers(function ($handlerRegistry) { + $handlerRegistry->registerSubscribingHandler(new JsonSerializedHandler()); + })->build(); + } + + function hasAnyNoneNull($object) :bool { + $refClass = new ReflectionClass($object); + $props = $refClass->getProperties(); + + $excludeSize = 0; + $totalSize = sizeof($props); + foreach ($props as $prop) { + $doc = $prop->getDocComment(); + + if ($doc !== false && strpos($doc, '@Exclude') !== false) { + $excludeSize++; + continue; + } + + $prop->setAccessible(true); + + $value = $prop->getValue($object); + if ($value !== null) { + return true; + } + } + return $excludeSize === $totalSize; + } + +{{#operations}} + {{#operation}} + /** + * {{vendorExtensions.x-meta.method}} + * {{summary}} + * {{path}} + */ + public function test{{vendorExtensions.x-meta.methodServiceFmt}}Response() { + $data = "{{{vendorExtensions.x-response-example}}}"; + $commonResp = WsMessage::jsonDeserialize($data, $this->serializer); + $resp = {{vendorExtensions.x-meta.methodServiceFmt}}Event::jsonDeserialize($this->serializer->serialize($commonResp->rawData, 'json'), $this->serializer); + $result = $this->hasAnyNoneNull($resp); + self::assertTrue($result); + } + {{/operation}} +{{/operations}} +} \ No newline at end of file diff --git a/generator/plugin/src/main/resources/java-sdk/model.mustache b/generator/plugin/src/main/resources/java-sdk/model.mustache new file mode 100644 index 00000000..f3150e56 --- /dev/null +++ b/generator/plugin/src/main/resources/java-sdk/model.mustache @@ -0,0 +1,109 @@ +{{#models}} +{{#model}} +{{>partial_header}} +package {{package}}; + +{{#vendorExtensions.x-imports}} +{{{.}}} +{{/vendorExtensions.x-imports}} + +{{#vendorExtensions.x-annotation}} +{{{.}}} +{{/vendorExtensions.x-annotation}} +{{#vendorExtensions.x-response-model}} +class {{classname}} implements Response<{{classname}}> { +{{/vendorExtensions.x-response-model}} +{{^vendorExtensions.x-response-model}} +{{#vendorExtensions.x-request-model}} +class {{classname}} implements Request { +{{/vendorExtensions.x-request-model}} +{{^vendorExtensions.x-request-model}} +class {{classname}} { +{{/vendorExtensions.x-request-model}} +{{/vendorExtensions.x-response-model}} +{{#vars}} + /** + * {{#description}}{{{.}}}{{/description}} + {{#isEnum}} + {{#vendorExtensions.x-enums}} + * - {{{value}}} : {{description}} + {{/vendorExtensions.x-enums}} + {{/isEnum}} + */ + {{#vendorExtensions.x-tag-path}} + @JsonIgnore + @PathVar("{{name}}") + {{/vendorExtensions.x-tag-path}} + @JsonProperty("{{baseName}}") + private {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + +{{/vars}} +{{#vendorExtensions.x-response-model}} + /** + * common response + */ + @JsonIgnore + private RestResponse<{{classname}}> commonResponse; +{{/vendorExtensions.x-response-model}} +{{#vendorExtensions.x-original-response}} + {{#vars}} + @JsonCreator + public {{classname}}({{{dataType}}} data) { + // original response + this.data = data; + } + {{/vars}} +{{/vendorExtensions.x-original-response}} +{{#vendorExtensions.x-request-raw-array}} + {{#vars}} + @JsonCreator + public {{classname}}({{{dataType}}} data) { + // raw array + this.items = data; + } + {{/vars}} +{{/vendorExtensions.x-request-raw-array}} + + +{{#hasEnums}} + {{#vars}} + {{#isEnum}} + public enum {{enumName}} { + {{#vendorExtensions.x-enums}} + /** + * {{description}} + */ + {{name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} + {{/vendorExtensions.x-enums}} + + private final {{{dataType}}} value; + + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + this.value = value; + } + + @JsonValue + public {{{dataType}}} getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + if (b.value.{{^isString}}equals{{/isString}}{{#isString}}{{#useEnumCaseInsensitive}}equalsIgnoreCase{{/useEnumCaseInsensitive}}{{^useEnumCaseInsensitive}}equals{{/useEnumCaseInsensitive}}{{/isString}}(value)) { + return b; + } + } + {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/enumUnknownDefaultCase}}{{/isNullable}} + } + } + {{/isEnum}} + {{/vars}} +{{/hasEnums}} +} +{{/model}}{{/models}} \ No newline at end of file diff --git a/generator/plugin/src/main/resources/java-sdk/model_ws.mustache b/generator/plugin/src/main/resources/java-sdk/model_ws.mustache new file mode 100644 index 00000000..5541dcae --- /dev/null +++ b/generator/plugin/src/main/resources/java-sdk/model_ws.mustache @@ -0,0 +1,129 @@ +partial_header}} +{{#models}} +{{#model}} +namespace {{modelPackage}}; +use JMS\Serializer\Serializer; +use JMS\Serializer\Annotation\Exclude; +use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; +{{#vendorExtensions.x-response-model}} +use KuCoin\UniversalSDK\Internal\Interfaces\Response; +use KuCoin\UniversalSDK\Internal\Interfaces\WebSocketMessageCallback; +use KuCoin\UniversalSDK\Model\WsMessage; + +class {{classname}} implements Response { +{{/vendorExtensions.x-response-model}} +{{^vendorExtensions.x-response-model}} +use KuCoin\UniversalSDK\Internal\Interfaces\Serializable; + + +class {{classname}} implements Serializable{ +{{/vendorExtensions.x-response-model}} + +{{#vars}} + /** + * {{#description}}{{{.}}}{{/description}} + * @var {{{dataType}}}{{^required}}|null{{/required}} ${{name}} + * @Type("{{{vendorExtensions.annotationType}}}") + * @SerializedName("{{baseName}}") + */ + public ${{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; +{{/vars}} + + private function __construct() { + } + +{{#vendorExtensions.x-response-model}} + /** + * common response + * @Exclude() + * @var WsMessage $commonResponse + */ + public $commonResponse; + + public function setCommonResponse($response): void { + $this->commonResponse = $response; + } +{{/vendorExtensions.x-response-model}} +{{#vendorExtensions.x-original-response}} + /** + * @param Serializer $serializer + * @return string + */ + public function jsonSerialize($serializer) { + return $serializer->serialize($this, 'json'); + } + + /** + * @param string $json + * @param Serializer $serializer + * @return self + */ + public static function jsonDeserialize($json , $serializer) { + if ($json === null) { + return new self(); + } + {{#vars}} + $data = $serializer->deserialize($json, '{{{vendorExtensions.annotationType}}}', 'json'); + $obj = new self(); + $obj->data = $data; + return $obj; + {{/vars}} + } + +{{/vendorExtensions.x-original-response}} +{{^vendorExtensions.x-original-response}} + /** + * @param Serializer $serializer + * @return string + */ + public function jsonSerialize($serializer) { + return $serializer->serialize($this, 'json'); + } + + /** + * @param string $json + * @param Serializer $serializer + * @return self + */ + public static function jsonDeserialize($json , $serializer) { + return $serializer->deserialize($json, {{classname}}::class, 'json'); + } + +{{/vendorExtensions.x-original-response}} + +{{#vendorExtensions.x-response-model}} + /** + * @param callable $callback function(string $topic, string $subject, {{classname}} $data): void + */ + public static function createCallback(callable $callback) : {{classname}}CallbackWrapper{ + return new {{classname}}CallbackWrapper($callback); + } +{{/vendorExtensions.x-response-model}} +} + +{{#vendorExtensions.x-response-model}} +class {{classname}}CallbackWrapper implements WebSocketMessageCallback { + /** + * @var callable + */ + private $callback; + + /** + * @param callable $callback function(string $topic, string $subject, {{classname}} $data): void + */ + public function __construct(callable $callback) + { + $this->callback = $callback; + } + + public function onMessage(WsMessage $msg, Serializer $serializer) { + $event = {{classname}}::jsonDeserialize($serializer->serialize($msg->rawData, 'json'), $serializer); + $event->setCommonResponse($msg); + call_user_func($this->callback, $msg->topic, $msg->subject, $event); + } +} +{{/vendorExtensions.x-response-model}} +{{/model}} +{{/models}} \ No newline at end of file diff --git a/generator/plugin/src/main/resources/java-sdk/partial_header.mustache b/generator/plugin/src/main/resources/java-sdk/partial_header.mustache new file mode 100644 index 00000000..6cfefa21 --- /dev/null +++ b/generator/plugin/src/main/resources/java-sdk/partial_header.mustache @@ -0,0 +1 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. diff --git a/generator/plugin/src/main/resources/java-sdk/version.mustache b/generator/plugin/src/main/resources/java-sdk/version.mustache new file mode 100644 index 00000000..80f45000 --- /dev/null +++ b/generator/plugin/src/main/resources/java-sdk/version.mustache @@ -0,0 +1,8 @@ +{{name}} as $item) { + {{#vendorExtensions.x-response-inner-model}} + {{#vars}} + self::assertNotNull($item->{{name}}); + {{/vars}} + {{/vendorExtensions.x-response-inner-model}} + } + + {{/isArray}} + {{^isArray}} + self::assertNotNull($data->{{name}}); + {{/isArray}} + {{/vars}} + Logger::info($data->jsonSerialize(self::$serializer)); + {{/vendorExtensions.x-response-model}} + } + + {{/operation}} +{{/operations}} \ No newline at end of file diff --git a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java index 1a654d96..8682e692 100644 --- a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java +++ b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java @@ -7,11 +7,11 @@ public class SdkGeneratorTest { - private static final String SDK_NAME = "php-sdk"; + private static final String SDK_NAME = "java-sdk"; private static final String SPEC_NAME = "../../spec/rest/api/openapi-account-subaccount.json"; private static final String SPEC_ENTRY_NAME = "../../spec/rest/entry/openapi-account.json"; private static final String WS_SPEC_NAME = "../../spec/ws/openapi-futures-private.json"; - private static final String OUTPUT_DIR = "./out"; + private static final String OUTPUT_DIR = "../../sdk/java/src/main/java/com/kucoin/universal/sdk/generate"; private static final String CSV_PATH = "../../spec"; @Test @@ -28,32 +28,32 @@ public void launchCodeGenerator() { DefaultGenerator generator = new DefaultGenerator(); generator.opts(clientOptInput).generate(); } - { - final CodegenConfigurator configurator = new CodegenConfigurator() - .setGeneratorName(SDK_NAME) - .setInputSpec(SPEC_ENTRY_NAME) - .setValidateSpec(false) - .addAdditionalProperty("GEN_MODE", "ENTRY") - .addAdditionalProperty("CSV_PATH", CSV_PATH) - .setOutputDir(OUTPUT_DIR); - - final ClientOptInput clientOptInput = configurator.toClientOptInput(); - DefaultGenerator generator = new DefaultGenerator(); - generator.opts(clientOptInput).generate(); - } - - { - final CodegenConfigurator configurator = new CodegenConfigurator() - .setGeneratorName(SDK_NAME) - .setInputSpec(SPEC_NAME) - .setValidateSpec(false) - .addAdditionalProperty("GEN_MODE", "TEST") - .setOutputDir(OUTPUT_DIR); - - final ClientOptInput clientOptInput = configurator.toClientOptInput(); - DefaultGenerator generator = new DefaultGenerator(); - generator.opts(clientOptInput).generate(); - } +// { +// final CodegenConfigurator configurator = new CodegenConfigurator() +// .setGeneratorName(SDK_NAME) +// .setInputSpec(SPEC_ENTRY_NAME) +// .setValidateSpec(false) +// .addAdditionalProperty("GEN_MODE", "ENTRY") +// .addAdditionalProperty("CSV_PATH", CSV_PATH) +// .setOutputDir(OUTPUT_DIR); +// +// final ClientOptInput clientOptInput = configurator.toClientOptInput(); +// DefaultGenerator generator = new DefaultGenerator(); +// generator.opts(clientOptInput).generate(); +// } +// +// { +// final CodegenConfigurator configurator = new CodegenConfigurator() +// .setGeneratorName(SDK_NAME) +// .setInputSpec(SPEC_NAME) +// .setValidateSpec(false) +// .addAdditionalProperty("GEN_MODE", "TEST") +// .setOutputDir(OUTPUT_DIR); +// +// final ClientOptInput clientOptInput = configurator.toClientOptInput(); +// DefaultGenerator generator = new DefaultGenerator(); +// generator.opts(clientOptInput).generate(); +// } } @Test diff --git a/sdk/java/.gitignore b/sdk/java/.gitignore new file mode 100644 index 00000000..5ff6309b --- /dev/null +++ b/sdk/java/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/sdk/java/LICENSE b/sdk/java/LICENSE new file mode 100644 index 00000000..2e995d25 --- /dev/null +++ b/sdk/java/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 KuCoin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/java/pom.xml b/sdk/java/pom.xml new file mode 100644 index 00000000..5b484ff0 --- /dev/null +++ b/sdk/java/pom.xml @@ -0,0 +1,49 @@ + + + 4.0.0 + + com.kucoin + kucoin-universal-sdk + 0.1.0-SNAPSHOT + + kucoin-universal-sdk + https://www.kucoin.com + Official KuCoin Universal SDK for Java + + + + KuCoin API + api@kucoin.com + KuCoin + https://www.kucoin.com + + + + + https://github.com/kucoin/kucoin-universal-sdk + scm:git:git://github.com/kucoin/kucoin-universal-sdk.git + scm:git:ssh://git@github.com/kucoin/kucoin-universal-sdk.git + + + + 8 + 8 + UTF-8 + + + + + org.projectlombok + lombok + 1.18.34 + + + com.fasterxml.jackson.core + jackson-databind + 2.17.1 + + + + \ No newline at end of file diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/PathVar.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/PathVar.java new file mode 100644 index 00000000..33b24c1e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/PathVar.java @@ -0,0 +1,16 @@ +package com.kucoin.universal.sdk.internal.interfaces; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * Marks a field as a path variable for URL templating. + */ +@Retention(RUNTIME) +@Target(FIELD) +public @interface PathVar { + String value(); +} \ No newline at end of file diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Request.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Request.java new file mode 100644 index 00000000..39eea92c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Request.java @@ -0,0 +1,4 @@ +package com.kucoin.universal.sdk.internal.interfaces; + +public interface Request { +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Response.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Response.java new file mode 100644 index 00000000..750ac46b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Response.java @@ -0,0 +1,8 @@ +package com.kucoin.universal.sdk.internal.interfaces; + +import com.kucoin.universal.sdk.model.RestResponse; + +public interface Response { + + void setCommonResponse(RestResponse response); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Transport.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Transport.java new file mode 100644 index 00000000..616a4fcb --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Transport.java @@ -0,0 +1,33 @@ +package com.kucoin.universal.sdk.internal.interfaces; + +public interface Transport { + + /** + * Executes a remote call using the specified method, path, and request data, + * and returns the deserialized response object. + * + * @param domain Which endpoint to use (e.g., spot, futures, broker) + * @param broker Whether this is a broker service request + * @param method HTTP method such as GET, POST, etc. + * @param path Path or endpoint of the request + * @param requestObj The request payload (can be null) + * @param responseClass The class of the expected response object + * @param requestAsJson Whether to serialize the request as JSON + * @param Type of response expected + * @return Parsed response object of type T + */ + > T call( + String domain, + boolean broker, + String method, + String path, + Request requestObj, + Class responseClass, + boolean requestAsJson + ); + + /** + * Clean up resources or close the connection, if necessary. + */ + void close(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/Constants.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/Constants.java new file mode 100644 index 00000000..4ee8adf9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/Constants.java @@ -0,0 +1,36 @@ +package com.kucoin.universal.sdk.model; + +/** + * Contains API endpoints and enum-like constants for domain types, result codes, and WS message types. + */ +public final class Constants { + + private Constants() { + // Prevent instantiation + } + + // ==== Global API Endpoints ==== + public static final String GLOBAL_API_ENDPOINT = "https://api.kucoin.com"; + public static final String GLOBAL_FUTURES_API_ENDPOINT = "https://api-futures.kucoin.com"; + public static final String GLOBAL_BROKER_API_ENDPOINT = "https://api-broker.kucoin.com"; + + // ==== Domain Types ==== + public static final String DOMAIN_TYPE_SPOT = "spot"; + public static final String DOMAIN_TYPE_FUTURES = "futures"; + public static final String DOMAIN_TYPE_BROKER = "broker"; + + // ==== REST Result Codes ==== + public static final String RESULT_CODE_SUCCESS = "200000"; + + // ==== WebSocket Message Types ==== + public static final String WS_MESSAGE_TYPE_WELCOME = "welcome"; + public static final String WS_MESSAGE_TYPE_PING = "ping"; + public static final String WS_MESSAGE_TYPE_PONG = "pong"; + public static final String WS_MESSAGE_TYPE_SUBSCRIBE = "subscribe"; + public static final String WS_MESSAGE_TYPE_ACK = "ack"; + public static final String WS_MESSAGE_TYPE_UNSUBSCRIBE = "unsubscribe"; + public static final String WS_MESSAGE_TYPE_ERROR = "error"; + public static final String WS_MESSAGE_TYPE_MESSAGE = "message"; + public static final String WS_MESSAGE_TYPE_NOTICE = "notice"; + public static final String WS_MESSAGE_TYPE_COMMAND = "command"; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestError.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestError.java new file mode 100644 index 00000000..d45fb108 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestError.java @@ -0,0 +1,32 @@ +package com.kucoin.universal.sdk.model; + +import lombok.Getter; + +/** + * Exception representing a REST API error. + */ +@Getter +public class RestError extends Exception { + + private final RestResponse response; + private final Throwable cause; + + public RestError(RestResponse response, Throwable cause) { + super(cause != null ? cause.getMessage() : "unknown", cause); + this.response = response; + this.cause = cause; + } + + @Override + public String toString() { + if (response != null) { + return String.format( + "request error, server code: %s, server msg: %s, context msg: %s", + response.getCode(), + response.getMessage(), + cause != null ? cause.getMessage() : "unknown" + ); + } + return "request error, " + (cause != null ? cause.toString() : "unknown"); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestRateLimit.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestRateLimit.java new file mode 100644 index 00000000..81d2b614 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestRateLimit.java @@ -0,0 +1,29 @@ +package com.kucoin.universal.sdk.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Getter; + +@Getter +public class RestRateLimit { + + @JsonProperty("limit") + private final int limit; + + @JsonProperty("remaining") + private final int remaining; + + @JsonProperty("reset") + private final int reset; + + @JsonCreator + public RestRateLimit( + @JsonProperty("limit") int limit, + @JsonProperty("remaining") int remaining, + @JsonProperty("reset") int reset + ) { + this.limit = limit; + this.remaining = remaining; + this.reset = reset; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java new file mode 100644 index 00000000..c9bb6414 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java @@ -0,0 +1,24 @@ +package com.kucoin.universal.sdk.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Getter; + +@Getter +public class RestResponse { + + @JsonProperty("code") + private String code; + + @JsonProperty("data") + private T data; + + @JsonProperty("msg") + private String message; + + @JsonProperty("rateLimit") + private RestRateLimit rateLimit; + + public void checkError() throws RestError { + //TODO + } +} From e57bf115f41bd3c372651dad1c148f4cc2768f1a Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Wed, 25 Jun 2025 16:03:58 +0800 Subject: [PATCH 02/39] feat(java): add model generator --- .../plugin/generator/JavaSdkGenerator.java | 109 +++++++++-------- .../src/main/resources/java-sdk/api.mustache | 2 +- .../resources/java-sdk/api_entry.mustache | 8 +- .../java-sdk/api_entry_impl.mustache | 20 ++- .../main/resources/java-sdk/api_impl.mustache | 4 +- .../main/resources/java-sdk/api_test.mustache | 115 +++++++++--------- .../main/resources/java-sdk/model.mustache | 23 ++-- .../main/resources/java-sdk/version.mustache | 10 +- .../sdk/plugin/SdkGeneratorTest.java | 30 ++--- sdk/java/pom.xml | 28 ++++- 10 files changed, 186 insertions(+), 163 deletions(-) diff --git a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java index a2177051..e04ad1c3 100644 --- a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java +++ b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java @@ -1,6 +1,7 @@ package com.kucoin.universal.sdk.plugin.generator; import com.kucoin.universal.sdk.plugin.model.EnumEntry; +import com.kucoin.universal.sdk.plugin.model.Meta; import com.kucoin.universal.sdk.plugin.model.ModeSwitch; import com.kucoin.universal.sdk.plugin.service.NameService; import com.kucoin.universal.sdk.plugin.service.OperationService; @@ -8,19 +9,18 @@ import com.kucoin.universal.sdk.plugin.service.impl.OperationServiceImpl; import com.kucoin.universal.sdk.plugin.service.impl.SchemaServiceImpl; import com.kucoin.universal.sdk.plugin.util.KeywordsUtil; +import com.kucoin.universal.sdk.plugin.util.SpecificationUtil; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.servers.Server; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; -import org.openapitools.codegen.CodegenModel; -import org.openapitools.codegen.CodegenOperation; -import org.openapitools.codegen.CodegenProperty; -import org.openapitools.codegen.CodegenType; +import org.openapitools.codegen.*; import org.openapitools.codegen.languages.AbstractJavaCodegen; import org.openapitools.codegen.model.ModelMap; import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationMap; import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.CamelizeOption; import org.slf4j.Logger; @@ -73,10 +73,10 @@ public void processOpts() { super.processOpts(); this.supportingFiles.clear(); modeSwitch = new ModeSwitch(additionalProperties); - service = KeywordsUtil.getKeyword(camelize(openAPI.getInfo().getTitle(), CamelizeOption.LOWERCASE_FIRST_LETTER)); - subService = camelize(openAPI.getInfo().getDescription(), CamelizeOption.LOWERCASE_FIRST_LETTER); - apiPackage = String.format("com.kucoin.universal.sdk.generate.%s.%s", service, subService); - modelPackage = String.format("com.kucoin.universal.sdk.generate.%s.%s", service, subService); + service = KeywordsUtil.getKeyword(camelize(openAPI.getInfo().getTitle())); + subService = camelize(openAPI.getInfo().getDescription()); + apiPackage = String.format("com.kucoin.universal.sdk.generate.%s.%s", service.toLowerCase(), subService.toLowerCase()); + modelPackage = String.format("com.kucoin.universal.sdk.generate.%s.%s", service.toLowerCase(), subService.toLowerCase()); switch (modeSwitch.getMode()) { case API: { @@ -86,7 +86,7 @@ public void processOpts() { break; } case TEST: { - apiTemplateFiles.put("api_test.mustache", "Test.php"); + apiTemplateFiles.put("api_test.mustache", "AutoGeneratedTest.java"); break; } case TEST_TEMPLATE: { @@ -94,8 +94,9 @@ public void processOpts() { break; } case ENTRY: { - apiTemplateFiles.put("api_entry.mustache", ".php"); - apiTemplateFiles.put("api_entry_impl.mustache", "Impl.php"); + apiPackage = "com.kucoin.universal.sdk.generate.service"; + apiTemplateFiles.put("api_entry.mustache", ".java"); + apiTemplateFiles.put("api_entry_impl.mustache", "Impl.java"); break; } case WS: { @@ -118,8 +119,8 @@ public void processOpts() { default: throw new RuntimeException("unsupported mode"); } -// -// supportingFiles.add(new SupportingFile("version.mustache", "Version.php")); + + supportingFiles.add(new SupportingFile("version.mustache", "Version.java")); templateDir = "java-sdk"; @@ -244,9 +245,9 @@ public String toModelFilename(String name) { public String modelFileFolder() { switch (modeSwitch.getMode()) { case ENTRY: - return outputFolder + File.separator + "Service"; + return outputFolder + File.separator + "service"; default: - return outputFolder + File.separator + service + File.separator + subService; + return outputFolder + File.separator + service.toLowerCase() + File.separator + subService.toLowerCase(); } } @@ -313,8 +314,12 @@ public ModelsMap postProcessModels(ModelsMap objs) { Set annotation = new TreeSet<>(); imports.add("import lombok.Data;"); + imports.add("import lombok.NoArgsConstructor;"); + imports.add("import lombok.AllArgsConstructor;"); imports.add("import com.fasterxml.jackson.annotation.JsonProperty;"); annotation.add("@Data"); + annotation.add("@NoArgsConstructor"); + annotation.add("@AllArgsConstructor"); Map vendorExtension = codegenModel.getVendorExtensions(); @@ -370,38 +375,38 @@ public ModelsMap postProcessModels(ModelsMap objs) { public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); -// OperationMap operationMap = objs.getOperations(); -// -// -// Set imports = new TreeSet<>(); -// Set implImports = new TreeSet<>(); -// -// for (CodegenOperation op : operationMap.getOperation()) { -// Meta meta = SpecificationUtil.getMeta(op.vendorExtensions); -// if (meta != null) { -// switch (modeSwitch.getMode()) { -// case ENTRY: { -// // api entry -// List> entryValue = new ArrayList<>(); -// operationService.getServiceMeta().forEach((k, v) -> { -// if (v.getService().equalsIgnoreCase(meta.getService())) { -// Map kv = new HashMap<>(); -// kv.put("method", formatMethodName(k)); -// kv.put("methodUppercase", camelize(formatMethodName(k))); -// kv.put("target_service", formatService(k + "Api")); -// entryValue.add(kv); -// String servicePath = camelize(v.getSubService().toLowerCase(), CamelizeOption.UPPERCASE_FIRST_CHAR); -// imports.add(String.format("use KuCoin\\UniversalSDK\\Generate\\%s\\%s\\%s;", v.getService(), servicePath, formatService(k + "Api"))); -// implImports.add(String.format("use KuCoin\\UniversalSDK\\Generate\\%s\\%s\\%sImpl;", v.getService(), servicePath, formatService(k + "Api"))); -// } -// }); -// Map apiEntryInfo = new HashMap<>(); -// apiEntryInfo.put("api_entry_name", formatService(meta.getService() + "Service")); -// apiEntryInfo.put("api_entry_value", entryValue); -// objs.put("api_entry", apiEntryInfo); -// break; -// } -// + OperationMap operationMap = objs.getOperations(); + + + Set imports = new TreeSet<>(); + Set implImports = new TreeSet<>(); + + for (CodegenOperation op : operationMap.getOperation()) { + Meta meta = SpecificationUtil.getMeta(op.vendorExtensions); + if (meta != null) { + switch (modeSwitch.getMode()) { + case ENTRY: { + // api entry + List> entryValue = new ArrayList<>(); + operationService.getServiceMeta().forEach((k, v) -> { + if (v.getService().equalsIgnoreCase(meta.getService())) { + Map kv = new HashMap<>(); + kv.put("method", formatMethodName(k)); + kv.put("methodUppercase", camelize(formatMethodName(k))); + kv.put("target_service", formatService(k + "Api")); + entryValue.add(kv); + imports.add(String.format("import com.kucoin.universal.sdk.generate.%s.%s.%s;", v.getService().toLowerCase(), v.getSubService().toLowerCase(), formatService(k + "Api"))); + imports.add("import com.kucoin.universal.sdk.internal.interfaces.Transport;"); + implImports.add(String.format("import com.kucoin.universal.sdk.generate.%s.%s.%s;", v.getService().toLowerCase(), v.getSubService().toLowerCase(), formatService(k + "ApiImpl"))); + } + }); + Map apiEntryInfo = new HashMap<>(); + apiEntryInfo.put("api_entry_name", formatService(meta.getService() + "Service")); + apiEntryInfo.put("api_entry_value", entryValue); + objs.put("api_entry", apiEntryInfo); + break; + } + // case API: // case TEST: { // break; @@ -466,11 +471,11 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, Listpartial_header}} package {{package}}; -interface {{classname}} { +public interface {{classname}} { {{#operations}} {{#operation}} /** diff --git a/generator/plugin/src/main/resources/java-sdk/api_entry.mustache b/generator/plugin/src/main/resources/java-sdk/api_entry.mustache index 872c67d9..65e1dc7e 100644 --- a/generator/plugin/src/main/resources/java-sdk/api_entry.mustache +++ b/generator/plugin/src/main/resources/java-sdk/api_entry.mustache @@ -1,7 +1,5 @@ -partial_header}} - -namespace KuCoin\UniversalSDK\Generate\Service; +package {{package}}; {{#imports}} {{{.}}} @@ -10,10 +8,10 @@ namespace KuCoin\UniversalSDK\Generate\Service; {{#api_entry}} -interface {{api_entry_name}} { +public interface {{api_entry_name}} { {{#api_entry_value}} - public function get{{methodUppercase}}Api(): {{target_service}}; + public {{target_service}} get{{methodUppercase}}Api(); {{/api_entry_value}} } diff --git a/generator/plugin/src/main/resources/java-sdk/api_entry_impl.mustache b/generator/plugin/src/main/resources/java-sdk/api_entry_impl.mustache index 1e1ffa03..be5ee362 100644 --- a/generator/plugin/src/main/resources/java-sdk/api_entry_impl.mustache +++ b/generator/plugin/src/main/resources/java-sdk/api_entry_impl.mustache @@ -1,7 +1,5 @@ -partial_header}} - -namespace KuCoin\UniversalSDK\Generate\Service; +package {{package}}; {{#imports}} {{{.}}} @@ -12,23 +10,23 @@ namespace KuCoin\UniversalSDK\Generate\Service; {{#api_entry}} -class {{api_entry_name}}Impl implements {{api_entry_name}}{ - private $transport; +public class {{api_entry_name}}Impl implements {{api_entry_name}}{ + private Transport transport; {{#api_entry_value}} - private ${{method}}; + private {{target_service}} {{method}}; {{/api_entry_value}} - public function __construct($transport) { - $this->transport = $transport; + public {{api_entry_name}}Impl(Transport transport) { + this.transport = transport; {{#api_entry_value}} - $this->{{method}} = new {{target_service}}Impl($transport); + this.{{method}} = new {{target_service}}Impl(transport); {{/api_entry_value}} } {{#api_entry_value}} - public function get{{methodUppercase}}Api() :{{target_service}} { - return $this->{{method}}; + public {{target_service}} get{{methodUppercase}}Api() { + return this.{{method}}; } {{/api_entry_value}} {{/api_entry}} diff --git a/generator/plugin/src/main/resources/java-sdk/api_impl.mustache b/generator/plugin/src/main/resources/java-sdk/api_impl.mustache index a4e8ae34..dccca19b 100644 --- a/generator/plugin/src/main/resources/java-sdk/api_impl.mustache +++ b/generator/plugin/src/main/resources/java-sdk/api_impl.mustache @@ -2,8 +2,8 @@ package {{package}}; import com.kucoin.universal.sdk.internal.interfaces.Transport; -class {{classname}}Impl implements {{classname}} { - private Transport transport; +public class {{classname}}Impl implements {{classname}} { + private final Transport transport; public {{classname}}Impl(Transport transport) { diff --git a/generator/plugin/src/main/resources/java-sdk/api_test.mustache b/generator/plugin/src/main/resources/java-sdk/api_test.mustache index 6ef11c2c..5bf71547 100644 --- a/generator/plugin/src/main/resources/java-sdk/api_test.mustache +++ b/generator/plugin/src/main/resources/java-sdk/api_test.mustache @@ -1,50 +1,14 @@ -serializer = SerializerBuilder::create()->addDefaultHandlers() - ->configureHandlers(function ($handlerRegistry) { - $handlerRegistry->registerSubscribingHandler(new JsonSerializedHandler()); - })->build(); - } - - function hasAnyNoneNull($object) :bool { - $refClass = new ReflectionClass($object); - $props = $refClass->getProperties(); - - $excludeSize = 0; - $totalSize = sizeof($props); - foreach ($props as $prop) { - $doc = $prop->getDocComment(); - - if ($doc !== false && strpos($doc, '@Exclude') !== false) { - $excludeSize++; - continue; - } - - $prop->setAccessible(true); - - $value = $prop->getValue($object); - if ($value !== null) { - return true; - } - } - return $excludeSize === $totalSize; - } + private static final List failedTests = new ArrayList<>(); {{#operations}} {{#operation}} @@ -53,13 +17,11 @@ class {{classname}}Test extends TestCase { * {{summary}} * {{path}} */ - public function test{{vendorExtensions.x-meta.methodServiceFmt}}Request() + public static void test{{vendorExtensions.x-meta.methodServiceFmt}}Request() throws Exception { {{#hasParams}} - $data = "{{{vendorExtensions.x-request-example}}}"; - $req = {{vendorExtensions.x-meta.methodServiceFmt}}Req::jsonDeserialize($data, $this->serializer); - $this->assertTrue($this->hasAnyNoneNull($req)); - echo $req->jsonSerialize($this->serializer); + String data = "{{{vendorExtensions.x-request-example}}}"; + {{vendorExtensions.x-meta.methodServiceFmt}}Req obj = mapper.readValue(data, {{vendorExtensions.x-meta.methodServiceFmt}}Req.class); {{/hasParams}} {{^hasParams}} $this->assertTrue(true); @@ -71,16 +33,55 @@ class {{classname}}Test extends TestCase { * {{summary}} * {{path}} */ - public function test{{vendorExtensions.x-meta.methodServiceFmt}}Response() + public static void test{{vendorExtensions.x-meta.methodServiceFmt}}Response() throws Exception { - $data = "{{{vendorExtensions.x-response-example}}}"; - $commonResp = RestResponse::jsonDeserialize($data, $this->serializer); - $respData = $commonResp->data ? $this->serializer->serialize($commonResp->data, 'json') : null; - $resp = {{vendorExtensions.x-meta.methodServiceFmt}}Resp::jsonDeserialize($respData, $this->serializer); - $commonResp->data ? $this->assertTrue($this->hasAnyNoneNull($resp)) : $this->assertTrue(true); - echo $resp->jsonSerialize($this->serializer); + String data = "{{{vendorExtensions.x-response-example}}}"; + RestResponse<{{vendorExtensions.x-meta.methodServiceFmt}}Resp> resp = mapper.readValue(data, new TypeReference>(){}); } {{/operation}} {{/operations}} + public static void runAllTests() { +{{#operations}} + {{#operation}} + run({{classname}}AutoGeneratedTest::test{{vendorExtensions.x-meta.methodServiceFmt}}Request, "test{{vendorExtensions.x-meta.methodServiceFmt}}Request"); + run({{classname}}AutoGeneratedTest::test{{vendorExtensions.x-meta.methodServiceFmt}}Response, "test{{vendorExtensions.x-meta.methodServiceFmt}}Response"); + {{/operation}} +{{/operations}} + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } } \ No newline at end of file diff --git a/generator/plugin/src/main/resources/java-sdk/model.mustache b/generator/plugin/src/main/resources/java-sdk/model.mustache index f3150e56..398ac63a 100644 --- a/generator/plugin/src/main/resources/java-sdk/model.mustache +++ b/generator/plugin/src/main/resources/java-sdk/model.mustache @@ -11,24 +11,19 @@ package {{package}}; {{{.}}} {{/vendorExtensions.x-annotation}} {{#vendorExtensions.x-response-model}} -class {{classname}} implements Response<{{classname}}> { +public class {{classname}} implements Response<{{classname}}> { {{/vendorExtensions.x-response-model}} {{^vendorExtensions.x-response-model}} {{#vendorExtensions.x-request-model}} -class {{classname}} implements Request { +public class {{classname}} implements Request { {{/vendorExtensions.x-request-model}} {{^vendorExtensions.x-request-model}} -class {{classname}} { +public class {{classname}} { {{/vendorExtensions.x-request-model}} {{/vendorExtensions.x-response-model}} {{#vars}} /** * {{#description}}{{{.}}}{{/description}} - {{#isEnum}} - {{#vendorExtensions.x-enums}} - * - {{{value}}} : {{description}} - {{/vendorExtensions.x-enums}} - {{/isEnum}} */ {{#vendorExtensions.x-tag-path}} @JsonIgnore @@ -48,18 +43,22 @@ class {{classname}} { {{#vendorExtensions.x-original-response}} {{#vars}} @JsonCreator - public {{classname}}({{{dataType}}} data) { + public static {{classname}} fromJson({{{dataType}}} data) { // original response - this.data = data; + {{classname}} obj = new {{classname}}(); + obj.data = data; + return obj; } {{/vars}} {{/vendorExtensions.x-original-response}} {{#vendorExtensions.x-request-raw-array}} {{#vars}} @JsonCreator - public {{classname}}({{{dataType}}} data) { + public static {{classname}} fromJson({{{dataType}}} data) { // raw array - this.items = data; + {{classname}} obj = new {{classname}}(); + obj.items = data; + return obj; } {{/vars}} {{/vendorExtensions.x-request-raw-array}} diff --git a/generator/plugin/src/main/resources/java-sdk/version.mustache b/generator/plugin/src/main/resources/java-sdk/version.mustache index 80f45000..b3961383 100644 --- a/generator/plugin/src/main/resources/java-sdk/version.mustache +++ b/generator/plugin/src/main/resources/java-sdk/version.mustache @@ -1,8 +1,6 @@ -8 8 UTF-8 + 1.18.34 + 2.17.1 + 5.13.2 org.projectlombok lombok - 1.18.34 + ${lombok.version} com.fasterxml.jackson.core jackson-databind - 2.17.1 + ${jackson.version} + + + org.junit.jupiter + junit-jupiter + ${jupiter.version} + test + + + + + maven-jar-plugin + 3.2.2 + + + **/*AutoGeneratedTest.class + + + + + + \ No newline at end of file From 90a680cb1bc92149e3cc1839e0a7328190f9028a Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Tue, 1 Jul 2025 11:32:03 +0800 Subject: [PATCH 03/39] feat(java): add exlude to java model --- .../universal/sdk/plugin/generator/JavaSdkGenerator.java | 1 + .../plugin/src/main/resources/java-sdk/model.mustache | 9 +++++++++ .../com/kucoin/universal/sdk/model/RestRateLimit.java | 3 ++- .../com/kucoin/universal/sdk/model/RestResponse.java | 6 ++++-- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java index e04ad1c3..96c28aa2 100644 --- a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java +++ b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java @@ -317,6 +317,7 @@ public ModelsMap postProcessModels(ModelsMap objs) { imports.add("import lombok.NoArgsConstructor;"); imports.add("import lombok.AllArgsConstructor;"); imports.add("import com.fasterxml.jackson.annotation.JsonProperty;"); + imports.add("import com.fasterxml.jackson.annotation.JsonIgnoreProperties;"); annotation.add("@Data"); annotation.add("@NoArgsConstructor"); annotation.add("@AllArgsConstructor"); diff --git a/generator/plugin/src/main/resources/java-sdk/model.mustache b/generator/plugin/src/main/resources/java-sdk/model.mustache index 398ac63a..1f905072 100644 --- a/generator/plugin/src/main/resources/java-sdk/model.mustache +++ b/generator/plugin/src/main/resources/java-sdk/model.mustache @@ -11,13 +11,16 @@ package {{package}}; {{{.}}} {{/vendorExtensions.x-annotation}} {{#vendorExtensions.x-response-model}} +@JsonIgnoreProperties(ignoreUnknown = true) public class {{classname}} implements Response<{{classname}}> { {{/vendorExtensions.x-response-model}} {{^vendorExtensions.x-response-model}} {{#vendorExtensions.x-request-model}} +@JsonIgnoreProperties(ignoreUnknown = true) public class {{classname}} implements Request { {{/vendorExtensions.x-request-model}} {{^vendorExtensions.x-request-model}} +@JsonIgnoreProperties(ignoreUnknown = true) public class {{classname}} { {{/vendorExtensions.x-request-model}} {{/vendorExtensions.x-response-model}} @@ -39,6 +42,12 @@ public class {{classname}} { */ @JsonIgnore private RestResponse<{{classname}}> commonResponse; + + @Override + public void setCommonResponse(RestResponse<{{classname}}> response) { + this.commonResponse = response; + } + {{/vendorExtensions.x-response-model}} {{#vendorExtensions.x-original-response}} {{#vars}} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestRateLimit.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestRateLimit.java index 81d2b614..8174fa6e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestRateLimit.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestRateLimit.java @@ -2,9 +2,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; import lombok.Getter; -@Getter +@Data public class RestRateLimit { @JsonProperty("limit") diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java index c9bb6414..ed78eb12 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java @@ -1,9 +1,11 @@ package com.kucoin.universal.sdk.model; import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Getter; +import lombok.Data; +import lombok.ToString; -@Getter +@Data +@ToString(exclude = "data") public class RestResponse { @JsonProperty("code") From 986867db1a4b4373c71d8e281940e0c1820b7cb4 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Tue, 1 Jul 2025 17:51:59 +0800 Subject: [PATCH 04/39] feat(api): add support for java --- .../plugin/generator/JavaSdkGenerator.java | 47 +++-- .../main/resources/java-sdk/api_ws.mustache | 22 +-- .../resources/java-sdk/api_ws_impl.mustache | 67 +++---- .../main/resources/java-sdk/model.mustache | 5 +- .../main/resources/java-sdk/model_ws.mustache | 173 ++++++++---------- .../sdk/plugin/SdkGeneratorTest.java | 2 +- .../sdk/internal/interfaces/Response.java | 6 +- .../sdk/internal/interfaces/Transport.java | 4 +- .../interfaces/WebSocketMessageCallback.java | 11 ++ .../internal/interfaces/WebSocketService.java | 28 +++ .../kucoin/universal/sdk/model/WsMessage.java | 59 ++++++ 11 files changed, 248 insertions(+), 176 deletions(-) create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketMessageCallback.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketService.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/model/WsMessage.java diff --git a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java index 96c28aa2..e38e7885 100644 --- a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java +++ b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java @@ -100,9 +100,9 @@ public void processOpts() { break; } case WS: { - modelTemplateFiles.put("model_ws.mustache", ".php"); - apiTemplateFiles.put("api_ws.mustache", ".php"); - apiTemplateFiles.put("api_ws_impl.mustache", "Impl.php"); + modelTemplateFiles.put("model_ws.mustache", ".java"); + apiTemplateFiles.put("api_ws.mustache", ".java"); + apiTemplateFiles.put("api_ws_impl.mustache", "Impl.java"); additionalProperties.put("WS_MODE", "true"); break; } @@ -331,31 +331,44 @@ public ModelsMap postProcessModels(ModelsMap objs) { } - if (vendorExtension.containsKey("x-response-model")) { imports.add("import com.fasterxml.jackson.annotation.JsonIgnore;"); imports.add("import com.kucoin.universal.sdk.internal.interfaces.Response;"); - imports.add("import com.kucoin.universal.sdk.model.RestResponse;"); + + if (modeSwitch.isWs()) { + imports.add("import com.kucoin.universal.sdk.model.WsMessage;"); + imports.add("import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback;"); + } else { + imports.add("import com.kucoin.universal.sdk.model.RestResponse;"); + } + } - if (vendorExtension.containsKey("x-original-response") ||vendorExtension.containsKey("x-request-raw-array") ) { + if (vendorExtension.containsKey("x-original-response") || vendorExtension.containsKey("x-request-raw-array")) { imports.add("import com.fasterxml.jackson.annotation.JsonCreator;"); } - codegenModel.getVars().forEach(var-> { + codegenModel.getVars().forEach(var -> { if (var.getVendorExtensions().containsKey("x-tag-path")) { imports.add("import com.fasterxml.jackson.annotation.JsonIgnore;"); imports.add("import com.kucoin.universal.sdk.internal.interfaces.PathVar;"); } + if (vendorExtension.containsKey("x-request-model")) { + if (var.getDefaultValue() != null) { + List varAnnotation = (List) var.getVendorExtensions().computeIfAbsent("x-annotation", key -> new ArrayList()); + varAnnotation.add("@Builder.Default"); + } + } + if (var.getIsArray()) { imports.add(String.format("import %s;", importMapping.get("List"))); imports.add(String.format("import %s;", importMapping.get("ArrayList"))); } else if (var.getIsMap()) { imports.add(String.format("import %s;", importMapping.get("Map"))); imports.add(String.format("import %s;", importMapping.get("HashMap"))); - } else if (var.isEnum){ + } else if (var.isEnum) { imports.add("import com.fasterxml.jackson.annotation.JsonValue;"); imports.add("import com.fasterxml.jackson.annotation.JsonCreator;"); } else { @@ -408,15 +421,15 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, Listpartial_header}} -{{#imports}} -{{{.}}} -{{/imports}} -namespace {{package}}; -use React\Promise\PromiseInterface; - -interface {{classname}} { +package {{package}}; +public interface {{classname}} { {{#operations}} {{#operation}} @@ -15,27 +9,23 @@ interface {{classname}} { * {{summary}} * {{notes}} * push frequency: {{vendorExtensions.x-push_frequency}} - * @param callable $onData function(string $topic, string $subject, {{vendorExtensions.x-meta.methodServiceFmt}}Event $data): void - * @param ?callable $onSuccess function(string $id): void - * @param ?callable $onError function(Exception $e): void - * @return PromiseInterface A promise that resolves to the subscription ID or rejects with an error. */ - public function {{vendorExtensions.x-meta.method}}{{operationName}}({{#vendorExtensions.x-meta.otherProperties}}{{#parameters}}{{#type}}{{#type.simple}}string ${{paras}},{{/type.simple}}{{#type.array}}array ${{paras}},{{/type.array}}{{#type.object}}{{#paras}}string ${{.}},{{/paras}}{{/type.object}}{{/type}}{{/parameters}}{{/vendorExtensions.x-meta.otherProperties}}callable $onData, ?callable $onSuccess = null, ?callable $onError = null) : PromiseInterface; + public String {{vendorExtensions.x-meta.method}}{{operationName}}({{#vendorExtensions.x-meta.otherProperties}}{{#parameters}}{{#type}}{{#type.simple}}String {{paras}},{{/type.simple}}{{#type.array}}String[] {{paras}},{{/type.array}}{{#type.object}}{{#paras}}String {{.}},{{/paras}}{{/type.object}}{{/type}}{{/parameters}}{{/vendorExtensions.x-meta.otherProperties}}{{vendorExtensions.x-meta.methodServiceFmt}}Event.Callback callback); {{/operation}} /** * Unsubscribe from topics */ - public function unSubscribe(string $id) : PromiseInterface; + public void unSubscribe(String id); /** * Start websocket */ - public function start(): PromiseInterface; + public void start(); /** * Stop websocket */ - public function stop(): PromiseInterface; + public void stop(); {{/operations}} } \ No newline at end of file diff --git a/generator/plugin/src/main/resources/java-sdk/api_ws_impl.mustache b/generator/plugin/src/main/resources/java-sdk/api_ws_impl.mustache index 66064af4..4547bd51 100644 --- a/generator/plugin/src/main/resources/java-sdk/api_ws_impl.mustache +++ b/generator/plugin/src/main/resources/java-sdk/api_ws_impl.mustache @@ -1,60 +1,45 @@ -partial_header}} -{{#imports}} -{{{.}}} -{{/imports}} -namespace {{package}}; -use KuCoin\UniversalSDK\Internal\Interfaces\WebSocketService; -use React\Promise\PromiseInterface; - -class {{classname}}Impl implements {{classname}} { - /**@var WebSocketService $wsService*/ - private $wsService; - - public function __construct(WebSocketService $wsService) { - $this->wsService = $wsService; +package {{package}}; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketService; + +public class {{classname}}Impl implements {{classname}} { + + private final WebSocketService wsService; + + public {{classname}}Impl(WebSocketService wsService) { + this.wsService = wsService; } {{#operations}} {{#operation}} - public function {{vendorExtensions.x-meta.method}}{{operationName}}({{#vendorExtensions.x-meta.otherProperties}}{{#parameters}}{{#type}}{{#type.simple}}string ${{paras}},{{/type.simple}}{{#type.array}}array ${{paras}},{{/type.array}}{{#type.object}}{{#paras}}string ${{.}},{{/paras}}{{/type.object}}{{/type}}{{/parameters}}{{/vendorExtensions.x-meta.otherProperties}}callable $onData, ?callable $onSuccess = null, ?callable $onError = null) : PromiseInterface{ - $topicPrefix = "{{vendorExtensions.x-meta.otherProperties.topic}}"; + public String {{vendorExtensions.x-meta.method}}{{operationName}}({{#vendorExtensions.x-meta.otherProperties}}{{#parameters}}{{#type}}{{#type.simple}}String {{paras}},{{/type.simple}}{{#type.array}}String[] {{paras}},{{/type.array}}{{#type.object}}{{#paras}}String {{.}},{{/paras}}{{/type.object}}{{/type}}{{/parameters}}{{/vendorExtensions.x-meta.otherProperties}}{{vendorExtensions.x-meta.methodServiceFmt}}Event.Callback callback) { + String topicPrefix = "{{vendorExtensions.x-meta.otherProperties.topic}}"; {{#vendorExtensions.x-meta.otherProperties}}{{#parameters}}{{#type}} - {{#type.none}}$args = [];{{/type.none}} - {{#type.simple}}$args = [ {{#paras}}${{.}}{{/paras}}];{{/type.simple}} - {{#type.array}}$args = ${{paras}};{{/type.array}} - {{#type.object}}$args = [implode('_', [{{#paras}}${{.}},{{/paras}}])];{{/type.object}} + {{#type.none}}String []args = {};{{/type.none}} + {{#type.simple}}String []args = { {{#paras}}{{.}}{{/paras}} };{{/type.simple}} + {{#type.array}}String []args = {{paras}};{{/type.array}} + {{#type.object}}String []args = { String.join("_",{{#paras}}{{.}}{{^-last}},{{/-last}}{{/paras}}) };{{/type.object}} {{/type}}{{/parameters}}{{/vendorExtensions.x-meta.otherProperties}} - return $this->wsService->subscribe( - $topicPrefix, - $args, - {{vendorExtensions.x-meta.methodServiceFmt}}Event::createCallback($onData) - )->then(function ($id) use ($onSuccess) { - if ($onSuccess) { - $onSuccess($id); - } - return $id; - }, function ($e) use ($onError) { - if ($onError) { - $onError($e); - } - throw $e; - }); + return this.wsService.subscribe( + topicPrefix, + args, + {{vendorExtensions.x-meta.methodServiceFmt}}Event.CallbackAdapters.of(callback) + ); } {{/operation}} {{/operations}} - public function unSubscribe(string $id): PromiseInterface { - return $this->wsService->unsubscribe($id); + public void unSubscribe(String id){ + this.wsService.unsubscribe(id); } - public function start(): PromiseInterface { - return $this->wsService->start(); + public void start(){ + this.wsService.start(); } - public function stop(): PromiseInterface { - return $this->wsService->stop(); + public void stop(){ + this.wsService.stop(); } } \ No newline at end of file diff --git a/generator/plugin/src/main/resources/java-sdk/model.mustache b/generator/plugin/src/main/resources/java-sdk/model.mustache index 1f905072..9bf33803 100644 --- a/generator/plugin/src/main/resources/java-sdk/model.mustache +++ b/generator/plugin/src/main/resources/java-sdk/model.mustache @@ -12,7 +12,7 @@ package {{package}}; {{/vendorExtensions.x-annotation}} {{#vendorExtensions.x-response-model}} @JsonIgnoreProperties(ignoreUnknown = true) -public class {{classname}} implements Response<{{classname}}> { +public class {{classname}} implements Response<{{classname}}, RestResponse<{{classname}}>> { {{/vendorExtensions.x-response-model}} {{^vendorExtensions.x-response-model}} {{#vendorExtensions.x-request-model}} @@ -33,6 +33,9 @@ public class {{classname}} { @PathVar("{{name}}") {{/vendorExtensions.x-tag-path}} @JsonProperty("{{baseName}}") + {{#vendorExtensions.x-annotation}} + {{{.}}} + {{/vendorExtensions.x-annotation}} private {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/vars}} diff --git a/generator/plugin/src/main/resources/java-sdk/model_ws.mustache b/generator/plugin/src/main/resources/java-sdk/model_ws.mustache index 5541dcae..1c901289 100644 --- a/generator/plugin/src/main/resources/java-sdk/model_ws.mustache +++ b/generator/plugin/src/main/resources/java-sdk/model_ws.mustache @@ -1,129 +1,112 @@ -partial_header}} {{#models}} {{#model}} -namespace {{modelPackage}}; -use JMS\Serializer\Serializer; -use JMS\Serializer\Annotation\Exclude; -use JMS\Serializer\Annotation\SerializedName; -use JMS\Serializer\Annotation\Type; -{{#vendorExtensions.x-response-model}} -use KuCoin\UniversalSDK\Internal\Interfaces\Response; -use KuCoin\UniversalSDK\Internal\Interfaces\WebSocketMessageCallback; -use KuCoin\UniversalSDK\Model\WsMessage; +{{>partial_header}} +package {{package}}; -class {{classname}} implements Response { +{{#vendorExtensions.x-imports}} +{{{.}}} +{{/vendorExtensions.x-imports}} + +{{#vendorExtensions.x-annotation}} +{{{.}}} +{{/vendorExtensions.x-annotation}} +@JsonIgnoreProperties(ignoreUnknown = true) +{{#vendorExtensions.x-response-model}} +public class {{classname}} implements Response<{{classname}}, WsMessage<{{classname}}>> { {{/vendorExtensions.x-response-model}} {{^vendorExtensions.x-response-model}} -use KuCoin\UniversalSDK\Internal\Interfaces\Serializable; - - -class {{classname}} implements Serializable{ +class {{classname}} { {{/vendorExtensions.x-response-model}} - {{#vars}} /** * {{#description}}{{{.}}}{{/description}} - * @var {{{dataType}}}{{^required}}|null{{/required}} ${{name}} - * @Type("{{{vendorExtensions.annotationType}}}") - * @SerializedName("{{baseName}}") */ - public ${{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{#vendorExtensions.x-tag-path}} + @JsonIgnore + @PathVar("{{name}}") + {{/vendorExtensions.x-tag-path}} + @JsonProperty("{{baseName}}") + {{#vendorExtensions.x-annotation}} + {{{.}}} + {{/vendorExtensions.x-annotation}} + private {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/vars}} - - private function __construct() { - } - {{#vendorExtensions.x-response-model}} /** * common response - * @Exclude() - * @var WsMessage $commonResponse */ - public $commonResponse; + @JsonIgnore + private WsMessage<{{classname}}> commonResponse; - public function setCommonResponse($response): void { - $this->commonResponse = $response; + @Override + public void setCommonResponse(WsMessage<{{classname}}> response) { + this.commonResponse = response; } + {{/vendorExtensions.x-response-model}} {{#vendorExtensions.x-original-response}} - /** - * @param Serializer $serializer - * @return string - */ - public function jsonSerialize($serializer) { - return $serializer->serialize($this, 'json'); - } - - /** - * @param string $json - * @param Serializer $serializer - * @return self - */ - public static function jsonDeserialize($json , $serializer) { - if ($json === null) { - return new self(); - } {{#vars}} - $data = $serializer->deserialize($json, '{{{vendorExtensions.annotationType}}}', 'json'); - $obj = new self(); - $obj->data = $data; - return $obj; - {{/vars}} + @JsonCreator + public static {{classname}} fromJson({{{dataType}}} data) { + // original response + {{classname}} obj = new {{classname}}(); + obj.data = data; + return obj; } - + {{/vars}} {{/vendorExtensions.x-original-response}} -{{^vendorExtensions.x-original-response}} - /** - * @param Serializer $serializer - * @return string - */ - public function jsonSerialize($serializer) { - return $serializer->serialize($this, 'json'); +{{#vendorExtensions.x-response-model}} + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, {{classname}} data); } - /** - * @param string $json - * @param Serializer $serializer - * @return self - */ - public static function jsonDeserialize($json , $serializer) { - return $serializer->deserialize($json, {{classname}}::class, 'json'); + public static class CallbackAdapters { + public static WebSocketMessageCallback<{{classname}}> of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } } +{{/vendorExtensions.x-response-model}} +{{#hasEnums}} + {{#vars}} + {{#isEnum}} + public enum {{enumName}} { + {{#vendorExtensions.x-enums}} + /** + * {{description}} + */ + {{name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} + {{/vendorExtensions.x-enums}} -{{/vendorExtensions.x-original-response}} + private final {{{dataType}}} value; -{{#vendorExtensions.x-response-model}} - /** - * @param callable $callback function(string $topic, string $subject, {{classname}} $data): void - */ - public static function createCallback(callable $callback) : {{classname}}CallbackWrapper{ - return new {{classname}}CallbackWrapper($callback); - } -{{/vendorExtensions.x-response-model}} -} + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + this.value = value; + } -{{#vendorExtensions.x-response-model}} -class {{classname}}CallbackWrapper implements WebSocketMessageCallback { - /** - * @var callable - */ - private $callback; + @JsonValue + public {{{dataType}}} getValue() { + return value; + } - /** - * @param callable $callback function(string $topic, string $subject, {{classname}} $data): void - */ - public function __construct(callable $callback) - { - $this->callback = $callback; - } + @Override + public String toString() { + return String.valueOf(value); + } - public function onMessage(WsMessage $msg, Serializer $serializer) { - $event = {{classname}}::jsonDeserialize($serializer->serialize($msg->rawData, 'json'), $serializer); - $event->setCommonResponse($msg); - call_user_func($this->callback, $msg->topic, $msg->subject, $event); + @JsonCreator + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + if (b.value.{{^isString}}equals{{/isString}}{{#isString}}{{#useEnumCaseInsensitive}}equalsIgnoreCase{{/useEnumCaseInsensitive}}{{^useEnumCaseInsensitive}}equals{{/useEnumCaseInsensitive}}{{/isString}}(value)) { + return b; + } + } + {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/enumUnknownDefaultCase}}{{/isNullable}} + } } + {{/isEnum}} + {{/vars}} +{{/hasEnums}} } -{{/vendorExtensions.x-response-model}} {{/model}} {{/models}} \ No newline at end of file diff --git a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java index ecfb68b2..3bf9f79e 100644 --- a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java +++ b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java @@ -10,7 +10,7 @@ public class SdkGeneratorTest { private static final String SDK_NAME = "java-sdk"; private static final String SPEC_NAME = "../../spec/rest/api/openapi-futures-order.json"; private static final String SPEC_ENTRY_NAME = "../../spec/rest/entry/openapi-futures.json"; - private static final String WS_SPEC_NAME = "../../spec/ws/openapi-futures-private.json"; + private static final String WS_SPEC_NAME = "../../spec/ws/openapi-spot-public.json"; private static final String OUTPUT_DIR = "../../sdk/java/src/main/java/com/kucoin/universal/sdk/generate"; private static final String CSV_PATH = "../../spec"; diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Response.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Response.java index 750ac46b..bc0f9bad 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Response.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Response.java @@ -1,8 +1,6 @@ package com.kucoin.universal.sdk.internal.interfaces; -import com.kucoin.universal.sdk.model.RestResponse; +public interface Response { -public interface Response { - - void setCommonResponse(RestResponse response); + void setCommonResponse(R response); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Transport.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Transport.java index 616a4fcb..9dee030e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Transport.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Transport.java @@ -1,5 +1,7 @@ package com.kucoin.universal.sdk.internal.interfaces; +import com.kucoin.universal.sdk.model.RestResponse; + public interface Transport { /** @@ -16,7 +18,7 @@ public interface Transport { * @param Type of response expected * @return Parsed response object of type T */ - > T call( + >> T call( String domain, boolean broker, String method, diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketMessageCallback.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketMessageCallback.java new file mode 100644 index 00000000..1758fc14 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketMessageCallback.java @@ -0,0 +1,11 @@ +package com.kucoin.universal.sdk.internal.interfaces; + +import com.kucoin.universal.sdk.model.WsMessage; + +public interface WebSocketMessageCallback { + + /** + * Handles incoming WebSocket messages. + */ + void onMessage(WsMessage message); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketService.java new file mode 100644 index 00000000..6b27ec19 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketService.java @@ -0,0 +1,28 @@ +package com.kucoin.universal.sdk.internal.interfaces; + +public interface WebSocketService { + + /** + * Starts the WebSocket service and handles incoming messages. + */ + void start(); + + /** + * Stops the WebSocket service. + */ + void stop(); + + /** + * Subscribes to a topic with a callback handler. + * @param prefix The topic prefix + * @param args The arguments to be included in the topic + * @param callback Callback to handle incoming messages + * @return CompletableFuture resolving to the subscription ID (string) + */ + String subscribe(String prefix, String[] args, WebSocketMessageCallback callback); + + /** + * Unsubscribes from a topic. + */ + void unsubscribe(String id); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WsMessage.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WsMessage.java new file mode 100644 index 00000000..e0cc26ca --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WsMessage.java @@ -0,0 +1,59 @@ +package com.kucoin.universal.sdk.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.ToString; + +@Data +@ToString(exclude = "data") +public class WsMessage { + + /** + * Unique message ID + */ + @JsonProperty("id") + private String id; + + /** + * Message type (e.g., "ping", "subscribe", etc.) + */ + @JsonProperty("type") + private String type; + + /** + * Sequence number + */ + @JsonProperty("sn") + private Integer sn; + + /** + * The topic of the message + */ + @JsonProperty("topic") + private String topic; + + /** + * Subject of the message + */ + @JsonProperty("subject") + private String subject; + + /** + * Indicates if it is a private channel + */ + @JsonProperty("privateChannel") + private Boolean privateChannel; + + /** + * Indicates if the message is a response + */ + @JsonProperty("response") + private Boolean response; + + /** + * Raw message data + */ + @JsonProperty("data") + private T data; + +} From c27eee8fba23a367742df8b7bde2a31f83fa2fed Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Tue, 1 Jul 2025 20:14:36 +0800 Subject: [PATCH 05/39] feat(api): add models for java --- .../plugin/generator/JavaSdkGenerator.java | 112 +++++++++--------- .../java-sdk/api_test_template.mustache | 10 +- .../resources/java-sdk/api_ws_test.mustache | 106 +++++++++-------- sdk/java/pom.xml | 14 ++- 4 files changed, 128 insertions(+), 114 deletions(-) diff --git a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java index e38e7885..7b0048fc 100644 --- a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java +++ b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java @@ -108,7 +108,7 @@ public void processOpts() { } case WS_TEST: { additionalProperties.put("WS_MODE", "true"); - apiTemplateFiles.put("api_ws_test.mustache", "Test.php"); + apiTemplateFiles.put("api_ws_test.mustache", "AutoGeneratedTest.java"); break; } case WS_TEST_TEMPLATE: { @@ -430,61 +430,61 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List reqName.equalsIgnoreCase((String) m.get("importPath"))). -// forEach(m -> op.vendorExtensions.put("x-request-model", m.getModel())); -// allModels.stream().filter(m -> responseName.equalsIgnoreCase((String) m.get("importPath"))). -// forEach(m -> { -// -// CodegenModel model = m.getModel(); -// for (CodegenProperty var : model.vars) { -// if (var.isArray) { -// String innerDataName = String.format("%s.%s", modelPackage, var.getComplexType()); -// CodegenModel innerClass = null; -// for (ModelMap map : allModels) { -// if (innerDataName.equalsIgnoreCase((String) map.get("importPath"))) { -// innerClass = map.getModel(); -// break; -// } -// } -// -// if (innerClass != null) { -// var.vendorExtensions.put("x-response-inner-model", innerClass); -// } -// } -// } -// -// op.vendorExtensions.put("x-response-model", m.getModel()); -// }); -// break; -// } -// case WS_TEST_TEMPLATE: { -// String eventName = String.format("%s.%s", modelPackage, meta.getMethodServiceFmt() + "Event"); -// allModels.stream().filter(m -> eventName.equalsIgnoreCase((String) m.get("importPath"))). -// forEach(m -> { -// CodegenModel model = m.getModel(); -// for (CodegenProperty var : model.vars) { -// if (var.isArray) { -// String innerDataName = String.format("%s.%s", modelPackage, var.getComplexType()); -// CodegenModel innerClass = null; -// for (ModelMap map : allModels) { -// if (innerDataName.equalsIgnoreCase((String) map.get("importPath"))) { -// innerClass = map.getModel(); -// break; -// } -// } -// -// if (innerClass != null) { -// var.vendorExtensions.put("x-response-inner-model", innerClass); -// } -// } -// } -// op.vendorExtensions.put("x-response-model", m.getModel()); -// }); -// break; -// } + case TEST_TEMPLATE: { + String reqName = String.format("%s.%s", modelPackage, meta.getMethodServiceFmt() + "Req"); + String responseName = String.format("%s.%s", modelPackage, meta.getMethodServiceFmt() + "Resp"); + allModels.stream().filter(m -> reqName.equalsIgnoreCase((String) m.get("importPath"))). + forEach(m -> op.vendorExtensions.put("x-request-model", m.getModel())); + allModels.stream().filter(m -> responseName.equalsIgnoreCase((String) m.get("importPath"))). + forEach(m -> { + + CodegenModel model = m.getModel(); + for (CodegenProperty var : model.vars) { + if (var.isArray) { + String innerDataName = String.format("%s.%s", modelPackage, var.getComplexType()); + CodegenModel innerClass = null; + for (ModelMap map : allModels) { + if (innerDataName.equalsIgnoreCase((String) map.get("importPath"))) { + innerClass = map.getModel(); + break; + } + } + + if (innerClass != null) { + var.vendorExtensions.put("x-response-inner-model", innerClass); + } + } + } + + op.vendorExtensions.put("x-response-model", m.getModel()); + }); + break; + } + case WS_TEST_TEMPLATE: { + String eventName = String.format("%s.%s", modelPackage, meta.getMethodServiceFmt() + "Event"); + allModels.stream().filter(m -> eventName.equalsIgnoreCase((String) m.get("importPath"))). + forEach(m -> { + CodegenModel model = m.getModel(); + for (CodegenProperty var : model.vars) { + if (var.isArray) { + String innerDataName = String.format("%s.%s", modelPackage, var.getComplexType()); + CodegenModel innerClass = null; + for (ModelMap map : allModels) { + if (innerDataName.equalsIgnoreCase((String) map.get("importPath"))) { + innerClass = map.getModel(); + break; + } + } + + if (innerClass != null) { + var.vendorExtensions.put("x-response-inner-model", innerClass); + } + } + } + op.vendorExtensions.put("x-response-model", m.getModel()); + }); + break; + } } } } diff --git a/generator/plugin/src/main/resources/java-sdk/api_test_template.mustache b/generator/plugin/src/main/resources/java-sdk/api_test_template.mustache index a4d2ae32..a172b98b 100644 --- a/generator/plugin/src/main/resources/java-sdk/api_test_template.mustache +++ b/generator/plugin/src/main/resources/java-sdk/api_test_template.mustache @@ -6,15 +6,15 @@ * {{summary}} * {{path}} */ - public function test{{vendorExtensions.x-meta.methodServiceFmt}}() { + public void test{{vendorExtensions.x-meta.methodServiceFmt}}() { {{#hasParams}} - $builder = {{vendorExtensions.x-meta.methodServiceFmt}}Req::builder(); + {{vendorExtensions.x-meta.methodServiceFmt}}Req.{{vendorExtensions.x-meta.methodServiceFmt}}ReqBuilder builder = {{vendorExtensions.x-meta.methodServiceFmt}}Req.builder(); {{#vendorExtensions.x-request-model}} - $builder{{#vars}}->set{{nameInPascalCase}}(?){{/vars}}; + builder{{#vars}}.{{name}}(?){{/vars}}; {{/vendorExtensions.x-request-model}} - $req = $builder->build(); + {{vendorExtensions.x-meta.methodServiceFmt}}Req req = builder.build(); {{/hasParams}} - $resp = $this->api->{{vendorExtensions.x-meta.method}}({{#hasParams}}$req{{/hasParams}}); + {{vendorExtensions.x-meta.methodServiceFmt}}Resp resp = this.api.{{vendorExtensions.x-meta.method}}({{#hasParams}}req{{/hasParams}}); {{#vendorExtensions.x-response-model}} {{#vars}} {{#isArray}} diff --git a/generator/plugin/src/main/resources/java-sdk/api_ws_test.mustache b/generator/plugin/src/main/resources/java-sdk/api_ws_test.mustache index aefb33c2..f0102883 100644 --- a/generator/plugin/src/main/resources/java-sdk/api_ws_test.mustache +++ b/generator/plugin/src/main/resources/java-sdk/api_ws_test.mustache @@ -1,50 +1,14 @@ -serializer = SerializerBuilder::create()->addDefaultHandlers() - ->configureHandlers(function ($handlerRegistry) { - $handlerRegistry->registerSubscribingHandler(new JsonSerializedHandler()); - })->build(); - } - - function hasAnyNoneNull($object) :bool { - $refClass = new ReflectionClass($object); - $props = $refClass->getProperties(); - - $excludeSize = 0; - $totalSize = sizeof($props); - foreach ($props as $prop) { - $doc = $prop->getDocComment(); - - if ($doc !== false && strpos($doc, '@Exclude') !== false) { - $excludeSize++; - continue; - } - - $prop->setAccessible(true); - - $value = $prop->getValue($object); - if ($value !== null) { - return true; - } - } - return $excludeSize === $totalSize; - } + private static final List failedTests = new ArrayList<>(); {{#operations}} {{#operation}} @@ -53,13 +17,53 @@ class {{classname}}Test extends TestCase { * {{summary}} * {{path}} */ - public function test{{vendorExtensions.x-meta.methodServiceFmt}}Response() { - $data = "{{{vendorExtensions.x-response-example}}}"; - $commonResp = WsMessage::jsonDeserialize($data, $this->serializer); - $resp = {{vendorExtensions.x-meta.methodServiceFmt}}Event::jsonDeserialize($this->serializer->serialize($commonResp->rawData, 'json'), $this->serializer); - $result = $this->hasAnyNoneNull($resp); - self::assertTrue($result); + public static void test{{vendorExtensions.x-meta.methodServiceFmt}}Response() throws Exception { + String data = "{{{vendorExtensions.x-response-example}}}"; + WsMessage<{{vendorExtensions.x-meta.methodServiceFmt}}Event> resp = mapper.readValue(data, new TypeReference>(){}); } {{/operation}} {{/operations}} + + public static void runAllTests() { +{{#operations}} + {{#operation}} + run({{classname}}AutoGeneratedTest::test{{vendorExtensions.x-meta.methodServiceFmt}}Response, "test{{vendorExtensions.x-meta.methodServiceFmt}}Response"); + {{/operation}} +{{/operations}} + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } } \ No newline at end of file diff --git a/sdk/java/pom.xml b/sdk/java/pom.xml index 68f9b327..3d76a200 100644 --- a/sdk/java/pom.xml +++ b/sdk/java/pom.xml @@ -41,11 +41,13 @@ org.projectlombok lombok ${lombok.version} + provided com.fasterxml.jackson.core jackson-databind ${jackson.version} + compile org.junit.jupiter @@ -57,16 +59,24 @@ - maven-jar-plugin 3.2.2 - **/*AutoGeneratedTest.class + **/*AutoGeneratedTest*.class + + org.apache.maven.plugins + maven-compiler-plugin + 3.13.0 + + ${maven.compiler.source} + ${maven.compiler.target} + + From a97f5e1ee9704779a5b94beb2eafdd9848ca8f70 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Tue, 1 Jul 2025 21:12:25 +0800 Subject: [PATCH 06/39] feat(api): add format for java --- Dockerfile | 3 +- .../main/resources/java-sdk/api_test.mustache | 2 +- sdk/java/CHANGELOG.md | 54 +++++++++++++ sdk/java/pom.xml | 34 ++++++++ .../sdk/internal/interfaces/PathVar.java | 14 ++-- .../sdk/internal/interfaces/Request.java | 3 +- .../sdk/internal/interfaces/Response.java | 2 +- .../sdk/internal/interfaces/Transport.java | 51 ++++++------ .../interfaces/WebSocketMessageCallback.java | 6 +- .../internal/interfaces/WebSocketService.java | 35 ++++----- .../kucoin/universal/sdk/model/Constants.java | 51 ++++++------ .../kucoin/universal/sdk/model/RestError.java | 39 +++++----- .../universal/sdk/model/RestRateLimit.java | 32 ++++---- .../universal/sdk/model/RestResponse.java | 22 +++--- .../kucoin/universal/sdk/model/WsMessage.java | 77 ++++++++----------- 15 files changed, 240 insertions(+), 185 deletions(-) create mode 100644 sdk/java/CHANGELOG.md diff --git a/Dockerfile b/Dockerfile index 36b4fca7..46ec631b 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 jq npm -y +RUN apt-get update && apt-get install python3 python3-pip python3.8-venv nodejs jq npm clang-format -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 && \ @@ -49,6 +49,7 @@ ENV GO_POST_PROCESS_FILE="/usr/local/go/bin/gofmt -w" ENV PYTHON_POST_PROCESS_FILE="/usr/local/bin/yapf -i" ENV TS_POST_PROCESS_FILE="/usr/bin/prettier --write --semi --single-quote --tab-width 4 --trailing-comma all --bracket-spacing --arrow-parens always --end-of-line lf --print-width 100" ENV PHP_POST_PROCESS_FILE="php-prettier --write" +ENV JAVA_POST_PROCESS_FILE="/usr/bin/clang-format -i" ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] diff --git a/generator/plugin/src/main/resources/java-sdk/api_test.mustache b/generator/plugin/src/main/resources/java-sdk/api_test.mustache index 5bf71547..2df9bcc1 100644 --- a/generator/plugin/src/main/resources/java-sdk/api_test.mustache +++ b/generator/plugin/src/main/resources/java-sdk/api_test.mustache @@ -24,7 +24,7 @@ class {{classname}}AutoGeneratedTest{ {{vendorExtensions.x-meta.methodServiceFmt}}Req obj = mapper.readValue(data, {{vendorExtensions.x-meta.methodServiceFmt}}Req.class); {{/hasParams}} {{^hasParams}} - $this->assertTrue(true); + // $this->assertTrue(true); {{/hasParams}} } diff --git a/sdk/java/CHANGELOG.md b/sdk/java/CHANGELOG.md new file mode 100644 index 00000000..f5596a2a --- /dev/null +++ b/sdk/java/CHANGELOG.md @@ -0,0 +1,54 @@ +# Changelog + +API documentation [Changelog](https://www.kucoin.com/docs-new/change-log) + +Current synchronized API documentation version [20250529](https://www.kucoin.com/docs-new/change-log#20250529) + +## 2025-06-11(1.3.0) +- Update the latest APIs, documentation, etc +- Introduced a new testing framework for all SDKs +- Expanded regression-test coverage for Python components +- Updated Node.js dependencies to address security vulnerabilities + +## 2025-06-11(PHP 0.1.2-alpha) +- Update the latest APIs, documentation, etc + +## 2025-05-29(PHP 0.1.1-alpha) +- Fix compatibility issues on non-macOS systems by enforcing case-sensitive PSR-4 autoloading. + +## 2025-05-27(GO 1.2.1) +- Fix the Golang type mapping: map OpenAPI number type to float64 to prevent overflow + +## 2025-05-26(PHP 0.1.0-alpha) +- Release PHP implementation + +## 2025-04-04(Python 1.2.1.post1) +- Bug Fixes + +## 2025-03-31(Python 1.2.1) +- Optimize WebSocket reconnection logic + +## 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. +- Added Copy Trading API. + +## 2024-12-31(1.0.0) + +- Released the official version 1.0.0. \ No newline at end of file diff --git a/sdk/java/pom.xml b/sdk/java/pom.xml index 3d76a200..52c549b9 100644 --- a/sdk/java/pom.xml +++ b/sdk/java/pom.xml @@ -77,6 +77,40 @@ ${maven.compiler.target} + + com.diffplug.spotless + spotless-maven-plugin + 2.44.5 + + + format + verify + + apply + + + + + + + src/main/java/**/*.java + src/test/java/**/*.java + + + + 1.27.0 + + true + true + com.google.googlejavaformat:google-java-format + + + + + + + + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/PathVar.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/PathVar.java index 33b24c1e..0376baaa 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/PathVar.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/PathVar.java @@ -1,16 +1,14 @@ package com.kucoin.universal.sdk.internal.interfaces; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.RetentionPolicy.RUNTIME; -/** - * Marks a field as a path variable for URL templating. - */ +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +/** Marks a field as a path variable for URL templating. */ @Retention(RUNTIME) @Target(FIELD) public @interface PathVar { - String value(); -} \ No newline at end of file + String value(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Request.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Request.java index 39eea92c..f8330b9f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Request.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Request.java @@ -1,4 +1,3 @@ package com.kucoin.universal.sdk.internal.interfaces; -public interface Request { -} +public interface Request {} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Response.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Response.java index bc0f9bad..7df0d8af 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Response.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Response.java @@ -2,5 +2,5 @@ public interface Response { - void setCommonResponse(R response); + void setCommonResponse(R response); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Transport.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Transport.java index 9dee030e..a6ceec65 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Transport.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/Transport.java @@ -4,32 +4,29 @@ public interface Transport { - /** - * Executes a remote call using the specified method, path, and request data, - * and returns the deserialized response object. - * - * @param domain Which endpoint to use (e.g., spot, futures, broker) - * @param broker Whether this is a broker service request - * @param method HTTP method such as GET, POST, etc. - * @param path Path or endpoint of the request - * @param requestObj The request payload (can be null) - * @param responseClass The class of the expected response object - * @param requestAsJson Whether to serialize the request as JSON - * @param Type of response expected - * @return Parsed response object of type T - */ - >> T call( - String domain, - boolean broker, - String method, - String path, - Request requestObj, - Class responseClass, - boolean requestAsJson - ); + /** + * Executes a remote call using the specified method, path, and request data, and returns the + * deserialized response object. + * + * @param domain Which endpoint to use (e.g., spot, futures, broker) + * @param broker Whether this is a broker service request + * @param method HTTP method such as GET, POST, etc. + * @param path Path or endpoint of the request + * @param requestObj The request payload (can be null) + * @param responseClass The class of the expected response object + * @param requestAsJson Whether to serialize the request as JSON + * @param Type of response expected + * @return Parsed response object of type T + */ + >> T call( + String domain, + boolean broker, + String method, + String path, + Request requestObj, + Class responseClass, + boolean requestAsJson); - /** - * Clean up resources or close the connection, if necessary. - */ - void close(); + /** Clean up resources or close the connection, if necessary. */ + void close(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketMessageCallback.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketMessageCallback.java index 1758fc14..c988987e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketMessageCallback.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketMessageCallback.java @@ -4,8 +4,6 @@ public interface WebSocketMessageCallback { - /** - * Handles incoming WebSocket messages. - */ - void onMessage(WsMessage message); + /** Handles incoming WebSocket messages. */ + void onMessage(WsMessage message); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketService.java index 6b27ec19..e4b169c7 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketService.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketService.java @@ -2,27 +2,22 @@ public interface WebSocketService { - /** - * Starts the WebSocket service and handles incoming messages. - */ - void start(); + /** Starts the WebSocket service and handles incoming messages. */ + void start(); - /** - * Stops the WebSocket service. - */ - void stop(); + /** Stops the WebSocket service. */ + void stop(); - /** - * Subscribes to a topic with a callback handler. - * @param prefix The topic prefix - * @param args The arguments to be included in the topic - * @param callback Callback to handle incoming messages - * @return CompletableFuture resolving to the subscription ID (string) - */ - String subscribe(String prefix, String[] args, WebSocketMessageCallback callback); + /** + * Subscribes to a topic with a callback handler. + * + * @param prefix The topic prefix + * @param args The arguments to be included in the topic + * @param callback Callback to handle incoming messages + * @return CompletableFuture resolving to the subscription ID (string) + */ + String subscribe(String prefix, String[] args, WebSocketMessageCallback callback); - /** - * Unsubscribes from a topic. - */ - void unsubscribe(String id); + /** Unsubscribes from a topic. */ + void unsubscribe(String id); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/Constants.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/Constants.java index 4ee8adf9..4b35d336 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/Constants.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/Constants.java @@ -1,36 +1,37 @@ package com.kucoin.universal.sdk.model; /** - * Contains API endpoints and enum-like constants for domain types, result codes, and WS message types. + * Contains API endpoints and enum-like constants for domain types, result codes, and WS message + * types. */ public final class Constants { - private Constants() { - // Prevent instantiation - } + private Constants() { + // Prevent instantiation + } - // ==== Global API Endpoints ==== - public static final String GLOBAL_API_ENDPOINT = "https://api.kucoin.com"; - public static final String GLOBAL_FUTURES_API_ENDPOINT = "https://api-futures.kucoin.com"; - public static final String GLOBAL_BROKER_API_ENDPOINT = "https://api-broker.kucoin.com"; + // ==== Global API Endpoints ==== + public static final String GLOBAL_API_ENDPOINT = "https://api.kucoin.com"; + public static final String GLOBAL_FUTURES_API_ENDPOINT = "https://api-futures.kucoin.com"; + public static final String GLOBAL_BROKER_API_ENDPOINT = "https://api-broker.kucoin.com"; - // ==== Domain Types ==== - public static final String DOMAIN_TYPE_SPOT = "spot"; - public static final String DOMAIN_TYPE_FUTURES = "futures"; - public static final String DOMAIN_TYPE_BROKER = "broker"; + // ==== Domain Types ==== + public static final String DOMAIN_TYPE_SPOT = "spot"; + public static final String DOMAIN_TYPE_FUTURES = "futures"; + public static final String DOMAIN_TYPE_BROKER = "broker"; - // ==== REST Result Codes ==== - public static final String RESULT_CODE_SUCCESS = "200000"; + // ==== REST Result Codes ==== + public static final String RESULT_CODE_SUCCESS = "200000"; - // ==== WebSocket Message Types ==== - public static final String WS_MESSAGE_TYPE_WELCOME = "welcome"; - public static final String WS_MESSAGE_TYPE_PING = "ping"; - public static final String WS_MESSAGE_TYPE_PONG = "pong"; - public static final String WS_MESSAGE_TYPE_SUBSCRIBE = "subscribe"; - public static final String WS_MESSAGE_TYPE_ACK = "ack"; - public static final String WS_MESSAGE_TYPE_UNSUBSCRIBE = "unsubscribe"; - public static final String WS_MESSAGE_TYPE_ERROR = "error"; - public static final String WS_MESSAGE_TYPE_MESSAGE = "message"; - public static final String WS_MESSAGE_TYPE_NOTICE = "notice"; - public static final String WS_MESSAGE_TYPE_COMMAND = "command"; + // ==== WebSocket Message Types ==== + public static final String WS_MESSAGE_TYPE_WELCOME = "welcome"; + public static final String WS_MESSAGE_TYPE_PING = "ping"; + public static final String WS_MESSAGE_TYPE_PONG = "pong"; + public static final String WS_MESSAGE_TYPE_SUBSCRIBE = "subscribe"; + public static final String WS_MESSAGE_TYPE_ACK = "ack"; + public static final String WS_MESSAGE_TYPE_UNSUBSCRIBE = "unsubscribe"; + public static final String WS_MESSAGE_TYPE_ERROR = "error"; + public static final String WS_MESSAGE_TYPE_MESSAGE = "message"; + public static final String WS_MESSAGE_TYPE_NOTICE = "notice"; + public static final String WS_MESSAGE_TYPE_COMMAND = "command"; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestError.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestError.java index d45fb108..c9a9af0d 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestError.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestError.java @@ -2,31 +2,28 @@ import lombok.Getter; -/** - * Exception representing a REST API error. - */ +/** Exception representing a REST API error. */ @Getter public class RestError extends Exception { - private final RestResponse response; - private final Throwable cause; + private final RestResponse response; + private final Throwable cause; - public RestError(RestResponse response, Throwable cause) { - super(cause != null ? cause.getMessage() : "unknown", cause); - this.response = response; - this.cause = cause; - } + public RestError(RestResponse response, Throwable cause) { + super(cause != null ? cause.getMessage() : "unknown", cause); + this.response = response; + this.cause = cause; + } - @Override - public String toString() { - if (response != null) { - return String.format( - "request error, server code: %s, server msg: %s, context msg: %s", - response.getCode(), - response.getMessage(), - cause != null ? cause.getMessage() : "unknown" - ); - } - return "request error, " + (cause != null ? cause.toString() : "unknown"); + @Override + public String toString() { + if (response != null) { + return String.format( + "request error, server code: %s, server msg: %s, context msg: %s", + response.getCode(), + response.getMessage(), + cause != null ? cause.getMessage() : "unknown"); } + return "request error, " + (cause != null ? cause.toString() : "unknown"); + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestRateLimit.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestRateLimit.java index 8174fa6e..805e78cf 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestRateLimit.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestRateLimit.java @@ -3,28 +3,26 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; -import lombok.Getter; @Data public class RestRateLimit { - @JsonProperty("limit") - private final int limit; + @JsonProperty("limit") + private final int limit; - @JsonProperty("remaining") - private final int remaining; + @JsonProperty("remaining") + private final int remaining; - @JsonProperty("reset") - private final int reset; + @JsonProperty("reset") + private final int reset; - @JsonCreator - public RestRateLimit( - @JsonProperty("limit") int limit, - @JsonProperty("remaining") int remaining, - @JsonProperty("reset") int reset - ) { - this.limit = limit; - this.remaining = remaining; - this.reset = reset; - } + @JsonCreator + public RestRateLimit( + @JsonProperty("limit") int limit, + @JsonProperty("remaining") int remaining, + @JsonProperty("reset") int reset) { + this.limit = limit; + this.remaining = remaining; + this.reset = reset; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java index ed78eb12..112ddf00 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java @@ -8,19 +8,19 @@ @ToString(exclude = "data") public class RestResponse { - @JsonProperty("code") - private String code; + @JsonProperty("code") + private String code; - @JsonProperty("data") - private T data; + @JsonProperty("data") + private T data; - @JsonProperty("msg") - private String message; + @JsonProperty("msg") + private String message; - @JsonProperty("rateLimit") - private RestRateLimit rateLimit; + @JsonProperty("rateLimit") + private RestRateLimit rateLimit; - public void checkError() throws RestError { - //TODO - } + public void checkError() throws RestError { + // TODO + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WsMessage.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WsMessage.java index e0cc26ca..13c65693 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WsMessage.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WsMessage.java @@ -8,52 +8,35 @@ @ToString(exclude = "data") public class WsMessage { - /** - * Unique message ID - */ - @JsonProperty("id") - private String id; - - /** - * Message type (e.g., "ping", "subscribe", etc.) - */ - @JsonProperty("type") - private String type; - - /** - * Sequence number - */ - @JsonProperty("sn") - private Integer sn; - - /** - * The topic of the message - */ - @JsonProperty("topic") - private String topic; - - /** - * Subject of the message - */ - @JsonProperty("subject") - private String subject; - - /** - * Indicates if it is a private channel - */ - @JsonProperty("privateChannel") - private Boolean privateChannel; - - /** - * Indicates if the message is a response - */ - @JsonProperty("response") - private Boolean response; - - /** - * Raw message data - */ - @JsonProperty("data") - private T data; + /** Unique message ID */ + @JsonProperty("id") + private String id; + /** Message type (e.g., "ping", "subscribe", etc.) */ + @JsonProperty("type") + private String type; + + /** Sequence number */ + @JsonProperty("sn") + private Integer sn; + + /** The topic of the message */ + @JsonProperty("topic") + private String topic; + + /** Subject of the message */ + @JsonProperty("subject") + private String subject; + + /** Indicates if it is a private channel */ + @JsonProperty("privateChannel") + private Boolean privateChannel; + + /** Indicates if the message is a response */ + @JsonProperty("response") + private Boolean response; + + /** Raw message data */ + @JsonProperty("data") + private T data; } From c948b5740409aa1f54917110a002662a3ea957c4 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Wed, 2 Jul 2025 14:37:30 +0800 Subject: [PATCH 07/39] feat(java): add models --- Dockerfile | 10 +- Makefile | 4 + .../plugin/generator/JavaSdkGenerator.java | 14 +- .../main/resources/java-sdk/model.mustache | 10 +- .../main/resources/java-sdk/model_ws.mustache | 10 +- .../sdk/plugin/SdkGeneratorTest.java | 28 +- sdk/java/Makefile | 69 + .../universal/sdk/generate/Version.java | 6 + .../generate/account/account/AccountApi.java | 165 + .../account/account/AccountApi.template | 340 ++ .../account/AccountApiAutoGeneratedTest.java | 615 +++ .../account/account/AccountApiImpl.java | 150 + .../account/account/GetAccountInfoResp.java | 75 + .../account/account/GetApikeyInfoResp.java | 66 + .../GetCrossMarginAccountAccounts.java | 55 + .../account/GetCrossMarginAccountReq.java | 104 + .../account/GetCrossMarginAccountResp.java | 52 + .../account/account/GetFuturesAccountReq.java | 23 + .../account/GetFuturesAccountResp.java | 69 + .../account/GetFuturesLedgerDataList.java | 51 + .../account/account/GetFuturesLedgerReq.java | 57 + .../account/account/GetFuturesLedgerResp.java | 40 + .../GetIsolatedMarginAccountAssets.java | 38 + ...tIsolatedMarginAccountAssetsBaseAsset.java | 55 + ...IsolatedMarginAccountAssetsQuoteAsset.java | 55 + ...solatedMarginAccountDetailV1BaseAsset.java | 43 + ...olatedMarginAccountDetailV1QuoteAsset.java | 43 + .../GetIsolatedMarginAccountDetailV1Req.java | 26 + .../GetIsolatedMarginAccountDetailV1Resp.java | 98 + .../GetIsolatedMarginAccountListV1Assets.java | 85 + ...tedMarginAccountListV1AssetsBaseAsset.java | 43 + ...edMarginAccountListV1AssetsQuoteAsset.java | 43 + .../GetIsolatedMarginAccountListV1Req.java | 60 + .../GetIsolatedMarginAccountListV1Resp.java | 42 + .../account/GetIsolatedMarginAccountReq.java | 108 + .../account/GetIsolatedMarginAccountResp.java | 45 + .../GetMarginAccountDetailAccounts.java | 39 + .../account/GetMarginAccountDetailResp.java | 37 + .../account/GetMarginHFLedgerData.java | 59 + .../account/account/GetMarginHFLedgerReq.java | 92 + .../account/GetMarginHFLedgerResp.java | 42 + .../account/GetSpotAccountDetailReq.java | 26 + .../account/GetSpotAccountDetailResp.java | 43 + .../account/GetSpotAccountListData.java | 74 + .../account/GetSpotAccountListReq.java | 63 + .../account/GetSpotAccountListResp.java | 42 + .../account/GetSpotAccountTypeResp.java | 43 + .../account/account/GetSpotHFLedgerData.java | 94 + .../account/account/GetSpotHFLedgerReq.java | 129 + .../account/account/GetSpotHFLedgerResp.java | 42 + .../account/account/GetSpotLedgerItems.java | 61 + .../account/account/GetSpotLedgerReq.java | 90 + .../account/account/GetSpotLedgerResp.java | 49 + .../deposit/AddDepositAddressV1Req.java | 74 + .../deposit/AddDepositAddressV1Resp.java | 90 + .../deposit/AddDepositAddressV3Req.java | 80 + .../deposit/AddDepositAddressV3Resp.java | 62 + .../generate/account/deposit/DepositApi.java | 85 + .../account/deposit/DepositApi.template | 166 + .../deposit/DepositApiAutoGeneratedTest.java | 276 + .../account/deposit/DepositApiImpl.java | 78 + .../deposit/GetDepositAddressV1Req.java | 32 + .../deposit/GetDepositAddressV1Resp.java | 94 + .../deposit/GetDepositAddressV2Data.java | 82 + .../deposit/GetDepositAddressV2Req.java | 26 + .../deposit/GetDepositAddressV2Resp.java | 42 + .../deposit/GetDepositAddressV3Data.java | 89 + .../deposit/GetDepositAddressV3Req.java | 33 + .../deposit/GetDepositAddressV3Resp.java | 42 + .../deposit/GetDepositHistoryItems.java | 107 + .../deposit/GetDepositHistoryOldItems.java | 76 + .../deposit/GetDepositHistoryOldReq.java | 71 + .../deposit/GetDepositHistoryOldResp.java | 49 + .../account/deposit/GetDepositHistoryReq.java | 80 + .../deposit/GetDepositHistoryResp.java | 49 + .../sdk/generate/account/fee/FeeApi.java | 35 + .../sdk/generate/account/fee/FeeApi.template | 53 + .../account/fee/FeeApiAutoGeneratedTest.java | 107 + .../sdk/generate/account/fee/FeeApiImpl.java | 28 + .../generate/account/fee/GetBasicFeeReq.java | 58 + .../generate/account/fee/GetBasicFeeResp.java | 34 + .../account/fee/GetFuturesActualFeeReq.java | 24 + .../account/fee/GetFuturesActualFeeResp.java | 41 + .../account/fee/GetSpotActualFeeData.java | 37 + .../account/fee/GetSpotActualFeeReq.java | 22 + .../account/fee/GetSpotActualFeeResp.java | 42 + .../subaccount/AddSubAccountApiReq.java | 89 + .../subaccount/AddSubAccountApiResp.java | 63 + .../AddSubAccountFuturesPermissionReq.java | 22 + .../AddSubAccountFuturesPermissionResp.java | 41 + .../AddSubAccountMarginPermissionReq.java | 22 + .../AddSubAccountMarginPermissionResp.java | 41 + .../account/subaccount/AddSubAccountReq.java | 80 + .../account/subaccount/AddSubAccountResp.java | 43 + .../subaccount/DeleteSubAccountApiReq.java | 30 + .../subaccount/DeleteSubAccountApiResp.java | 35 + .../GetFuturesSubAccountListV2Accounts.java | 51 + .../GetFuturesSubAccountListV2Req.java | 23 + .../GetFuturesSubAccountListV2Resp.java | 38 + .../GetFuturesSubAccountListV2Summary.java | 47 + .../GetSpotSubAccountDetailMainAccounts.java | 47 + ...GetSpotSubAccountDetailMarginAccounts.java | 47 + .../GetSpotSubAccountDetailReq.java | 39 + .../GetSpotSubAccountDetailResp.java | 53 + .../GetSpotSubAccountDetailTradeAccounts.java | 47 + .../GetSpotSubAccountListV1Data.java | 41 + ...tSpotSubAccountListV1DataMainAccounts.java | 47 + ...potSubAccountListV1DataMarginAccounts.java | 47 + ...SpotSubAccountListV1DataTradeAccounts.java | 47 + .../GetSpotSubAccountListV1Resp.java | 42 + .../GetSpotSubAccountListV2Items.java | 41 + ...SpotSubAccountListV2ItemsMainAccounts.java | 47 + ...otSubAccountListV2ItemsMarginAccounts.java | 47 + ...potSubAccountListV2ItemsTradeAccounts.java | 47 + .../GetSpotSubAccountListV2Req.java | 28 + .../GetSpotSubAccountListV2Resp.java | 49 + .../GetSpotSubAccountsSummaryV1Data.java | 39 + .../GetSpotSubAccountsSummaryV1Resp.java | 44 + .../GetSpotSubAccountsSummaryV2Items.java | 136 + .../GetSpotSubAccountsSummaryV2Req.java | 27 + .../GetSpotSubAccountsSummaryV2Resp.java | 50 + .../subaccount/GetSubAccountApiListData.java | 51 + .../subaccount/GetSubAccountApiListReq.java | 26 + .../subaccount/GetSubAccountApiListResp.java | 42 + .../subaccount/ModifySubAccountApiReq.java | 89 + .../subaccount/ModifySubAccountApiResp.java | 43 + .../account/subaccount/SubAccountApi.java | 148 + .../account/subaccount/SubAccountApi.template | 297 ++ .../SubAccountApiAutoGeneratedTest.java | 689 +++ .../account/subaccount/SubAccountApiImpl.java | 136 + .../account/transfer/FlexTransferReq.java | 197 + .../account/transfer/FlexTransferResp.java | 31 + .../transfer/FuturesAccountTransferInReq.java | 65 + .../FuturesAccountTransferInResp.java | 40 + .../FuturesAccountTransferOutReq.java | 65 + .../FuturesAccountTransferOutResp.java | 98 + ...tFuturesAccountTransferOutLedgerItems.java | 92 + ...GetFuturesAccountTransferOutLedgerReq.java | 90 + ...etFuturesAccountTransferOutLedgerResp.java | 51 + .../transfer/GetTransferQuotasReq.java | 79 + .../transfer/GetTransferQuotasResp.java | 47 + .../account/transfer/InnerTransferReq.java | 137 + .../account/transfer/InnerTransferResp.java | 31 + .../transfer/SubAccountTransferReq.java | 170 + .../transfer/SubAccountTransferResp.java | 31 + .../account/transfer/TransferApi.java | 91 + .../account/transfer/TransferApi.template | 135 + .../TransferApiAutoGeneratedTest.java | 223 + .../account/transfer/TransferApiImpl.java | 91 + .../withdrawal/CancelWithdrawalReq.java | 26 + .../withdrawal/CancelWithdrawalResp.java | 40 + .../GetWithdrawalHistoryByIdReq.java | 26 + .../GetWithdrawalHistoryByIdResp.java | 197 + .../withdrawal/GetWithdrawalHistoryItems.java | 108 + .../GetWithdrawalHistoryOldItems.java | 80 + .../GetWithdrawalHistoryOldReq.java | 81 + .../GetWithdrawalHistoryOldResp.java | 49 + .../withdrawal/GetWithdrawalHistoryReq.java | 85 + .../withdrawal/GetWithdrawalHistoryResp.java | 49 + .../withdrawal/GetWithdrawalQuotasReq.java | 32 + .../withdrawal/GetWithdrawalQuotasResp.java | 91 + .../account/withdrawal/WithdrawalApi.java | 81 + .../account/withdrawal/WithdrawalApi.template | 171 + .../WithdrawalApiAutoGeneratedTest.java | 281 + .../account/withdrawal/WithdrawalApiImpl.java | 72 + .../account/withdrawal/WithdrawalV1Req.java | 71 + .../account/withdrawal/WithdrawalV1Resp.java | 31 + .../account/withdrawal/WithdrawalV3Req.java | 118 + .../account/withdrawal/WithdrawalV3Resp.java | 31 + .../affiliate/affiliate/AffiliateApi.java | 15 + .../affiliate/affiliate/AffiliateApi.template | 28 + .../AffiliateApiAutoGeneratedTest.java | 95 + .../affiliate/affiliate/AffiliateApiImpl.java | 24 + .../affiliate/affiliate/GetAccountLtv.java | 35 + .../affiliate/GetAccountMargins.java | 27 + .../affiliate/affiliate/GetAccountOrders.java | 31 + .../affiliate/affiliate/GetAccountResp.java | 52 + .../broker/apibroker/ApiBrokerApi.java | 15 + .../broker/apibroker/ApiBrokerApi.template | 15 + .../ApiBrokerApiAutoGeneratedTest.java | 73 + .../broker/apibroker/ApiBrokerApiImpl.java | 18 + .../broker/apibroker/GetRebaseReq.java | 65 + .../broker/apibroker/GetRebaseResp.java | 30 + .../broker/ndbroker/AddSubAccountApiReq.java | 82 + .../broker/ndbroker/AddSubAccountApiResp.java | 61 + .../broker/ndbroker/AddSubAccountReq.java | 25 + .../broker/ndbroker/AddSubAccountResp.java | 43 + .../ndbroker/DeleteSubAccountAPIReq.java | 26 + .../ndbroker/DeleteSubAccountAPIResp.java | 40 + .../broker/ndbroker/GetBrokerInfoReq.java | 65 + .../broker/ndbroker/GetBrokerInfoResp.java | 39 + .../broker/ndbroker/GetDepositDetailReq.java | 26 + .../broker/ndbroker/GetDepositDetailResp.java | 120 + .../broker/ndbroker/GetDepositListData.java | 112 + .../broker/ndbroker/GetDepositListReq.java | 43 + .../broker/ndbroker/GetDepositListResp.java | 42 + .../broker/ndbroker/GetKYCStatusData.java | 66 + .../ndbroker/GetKYCStatusListItems.java | 66 + .../broker/ndbroker/GetKYCStatusListReq.java | 28 + .../broker/ndbroker/GetKYCStatusListResp.java | 49 + .../broker/ndbroker/GetKYCStatusReq.java | 22 + .../broker/ndbroker/GetKYCStatusResp.java | 42 + .../broker/ndbroker/GetRebaseReq.java | 65 + .../broker/ndbroker/GetRebaseResp.java | 30 + .../broker/ndbroker/GetSubAccountAPIData.java | 82 + .../broker/ndbroker/GetSubAccountAPIReq.java | 26 + .../broker/ndbroker/GetSubAccountAPIResp.java | 42 + .../broker/ndbroker/GetSubAccountItems.java | 31 + .../broker/ndbroker/GetSubAccountReq.java | 32 + .../broker/ndbroker/GetSubAccountResp.java | 49 + .../ndbroker/GetTransferHistoryReq.java | 22 + .../ndbroker/GetTransferHistoryResp.java | 190 + .../broker/ndbroker/GetWithdrawDetailReq.java | 22 + .../ndbroker/GetWithdrawDetailResp.java | 124 + .../ndbroker/ModifySubAccountApiReq.java | 82 + .../ndbroker/ModifySubAccountApiResp.java | 57 + .../generate/broker/ndbroker/NdBrokerApi.java | 155 + .../broker/ndbroker/NdBrokerApi.template | 337 ++ .../NdBrokerApiAutoGeneratedTest.java | 538 ++ .../broker/ndbroker/NdBrokerApiImpl.java | 165 + .../broker/ndbroker/SubmitKYCReq.java | 108 + .../broker/ndbroker/SubmitKYCResp.java | 39 + .../generate/broker/ndbroker/TransferReq.java | 153 + .../broker/ndbroker/TransferResp.java | 30 + .../futures/AddIsolatedMarginReq.java | 36 + .../futures/AddIsolatedMarginResp.java | 174 + .../copytrading/futures/AddOrderReq.java | 350 ++ .../copytrading/futures/AddOrderResp.java | 37 + .../copytrading/futures/AddOrderTestReq.java | 350 ++ .../copytrading/futures/AddOrderTestResp.java | 38 + .../copytrading/futures/AddTPSLOrderReq.java | 314 ++ .../copytrading/futures/AddTPSLOrderResp.java | 38 + .../futures/CancelOrderByClientOidReq.java | 29 + .../futures/CancelOrderByClientOidResp.java | 31 + .../futures/CancelOrderByIdReq.java | 22 + .../futures/CancelOrderByIdResp.java | 33 + .../copytrading/futures/FuturesApi.java | 122 + .../copytrading/futures/FuturesApi.template | 197 + .../futures/FuturesApiAutoGeneratedTest.java | 380 ++ .../copytrading/futures/FuturesApiImpl.java | 135 + .../futures/GetMaxOpenSizeReq.java | 33 + .../futures/GetMaxOpenSizeResp.java | 42 + .../futures/GetMaxWithdrawMarginReq.java | 25 + .../futures/GetMaxWithdrawMarginResp.java | 43 + .../futures/ModifyAutoDepositStatusReq.java | 26 + .../futures/ModifyAutoDepositStatusResp.java | 40 + .../ModifyIsolatedMarginRiskLimtReq.java | 29 + .../ModifyIsolatedMarginRiskLimtResp.java | 44 + .../futures/RemoveIsolatedMarginReq.java | 32 + .../futures/RemoveIsolatedMarginResp.java | 43 + .../sdk/generate/earn/earn/EarnApi.java | 94 + .../sdk/generate/earn/earn/EarnApi.template | 284 ++ .../earn/earn/EarnApiAutoGeneratedTest.java | 409 ++ .../sdk/generate/earn/earn/EarnApiImpl.java | 94 + .../earn/earn/GetAccountHoldingItems.java | 147 + .../earn/earn/GetAccountHoldingReq.java | 81 + .../earn/earn/GetAccountHoldingResp.java | 49 + .../earn/earn/GetETHStakingProductsData.java | 348 ++ .../earn/earn/GetETHStakingProductsReq.java | 22 + .../earn/earn/GetETHStakingProductsResp.java | 42 + .../earn/earn/GetKcsStakingProductsData.java | 350 ++ .../earn/earn/GetKcsStakingProductsReq.java | 22 + .../earn/earn/GetKcsStakingProductsResp.java | 42 + .../earn/earn/GetPromotionProductsData.java | 350 ++ .../earn/earn/GetPromotionProductsReq.java | 22 + .../earn/earn/GetPromotionProductsResp.java | 42 + .../earn/earn/GetRedeemPreviewReq.java | 64 + .../earn/earn/GetRedeemPreviewResp.java | 58 + .../earn/earn/GetSavingsProductsData.java | 350 ++ .../earn/earn/GetSavingsProductsReq.java | 22 + .../earn/earn/GetSavingsProductsResp.java | 42 + .../earn/earn/GetStakingProductsData.java | 350 ++ .../earn/earn/GetStakingProductsReq.java | 22 + .../earn/earn/GetStakingProductsResp.java | 42 + .../sdk/generate/earn/earn/PurchaseReq.java | 65 + .../sdk/generate/earn/earn/PurchaseResp.java | 34 + .../sdk/generate/earn/earn/RedeemReq.java | 75 + .../sdk/generate/earn/earn/RedeemResp.java | 77 + .../futures/fundingfees/FundingFeesApi.java | 33 + .../fundingfees/FundingFeesApi.template | 70 + .../FundingFeesApiAutoGeneratedTest.java | 500 ++ .../fundingfees/FundingFeesApiImpl.java | 46 + .../fundingfees/GetCurrentFundingRateReq.java | 29 + .../GetCurrentFundingRateResp.java | 108 + .../GetPrivateFundingHistoryDataList.java | 100 + .../GetPrivateFundingHistoryReq.java | 58 + .../GetPrivateFundingHistoryResp.java | 37 + .../GetPublicFundingHistoryData.java | 30 + .../GetPublicFundingHistoryReq.java | 33 + .../GetPublicFundingHistoryResp.java | 42 + .../futures/futuresprivate/AllOrderEvent.java | 419 ++ .../futuresprivate/AllPositionEvent.java | 306 ++ .../futures/futuresprivate/BalanceEvent.java | 102 + .../CrossLeverageDataValue.java | 19 + .../futuresprivate/CrossLeverageEvent.java | 54 + .../futuresprivate/FuturesPrivateWs.java | 57 + .../FuturesPrivateWsAutoGeneratedTest.java | 123 + .../futuresprivate/FuturesPrivateWsImpl.java | 94 + .../futuresprivate/MarginModeEvent.java | 53 + .../futures/futuresprivate/OrderEvent.java | 419 ++ .../futures/futuresprivate/PositionEvent.java | 306 ++ .../futuresprivate/StopOrdersEvent.java | 260 + .../futurespublic/AnnouncementEvent.java | 55 + .../futures/futurespublic/ExecutionEvent.java | 74 + .../futurespublic/FuturesPublicWs.java | 68 + .../FuturesPublicWsAutoGeneratedTest.java | 149 + .../futurespublic/FuturesPublicWsImpl.java | 113 + .../futurespublic/InstrumentEvent.java | 61 + .../futures/futurespublic/KlinesEvent.java | 58 + .../OrderbookIncrementEvent.java | 51 + .../futurespublic/OrderbookLevel50Event.java | 61 + .../futurespublic/OrderbookLevel5Event.java | 61 + .../futurespublic/SymbolSnapshotEvent.java | 79 + .../futures/futurespublic/TickerV1Event.java | 82 + .../futures/futurespublic/TickerV2Event.java | 66 + .../futures/market/Get24hrStatsResp.java | 31 + .../futures/market/GetAllSymbolsData.java | 421 ++ .../futures/market/GetAllSymbolsResp.java | 42 + .../futures/market/GetAllTickersData.java | 97 + .../futures/market/GetAllTickersResp.java | 42 + .../futures/market/GetFullOrderBookReq.java | 25 + .../futures/market/GetFullOrderBookResp.java | 52 + .../market/GetInterestRateIndexDataList.java | 35 + .../market/GetInterestRateIndexReq.java | 62 + .../market/GetInterestRateIndexResp.java | 37 + .../generate/futures/market/GetKlinesReq.java | 90 + .../futures/market/GetKlinesResp.java | 41 + .../futures/market/GetMarkPriceReq.java | 29 + .../futures/market/GetMarkPriceResp.java | 50 + .../futures/market/GetPartOrderBookReq.java | 33 + .../futures/market/GetPartOrderBookResp.java | 52 + .../market/GetPremiumIndexDataList.java | 34 + .../futures/market/GetPremiumIndexReq.java | 61 + .../futures/market/GetPremiumIndexResp.java | 37 + .../GetPrivateTokenInstanceServers.java | 68 + .../futures/market/GetPrivateTokenResp.java | 37 + .../market/GetPublicTokenInstanceServers.java | 68 + .../futures/market/GetPublicTokenResp.java | 37 + .../futures/market/GetServerTimeResp.java | 40 + .../futures/market/GetServiceStatusResp.java | 75 + .../market/GetSpotIndexPriceDataList.java | 40 + ...SpotIndexPriceDataListDecomposionList.java | 27 + .../futures/market/GetSpotIndexPriceReq.java | 61 + .../futures/market/GetSpotIndexPriceResp.java | 37 + .../generate/futures/market/GetSymbolReq.java | 26 + .../futures/market/GetSymbolResp.java | 432 ++ .../generate/futures/market/GetTickerReq.java | 25 + .../futures/market/GetTickerResp.java | 111 + .../futures/market/GetTradeHistoryData.java | 89 + .../futures/market/GetTradeHistoryReq.java | 25 + .../futures/market/GetTradeHistoryResp.java | 42 + .../generate/futures/market/MarketApi.java | 182 + .../futures/market/MarketApi.template | 444 ++ .../market/MarketApiAutoGeneratedTest.java | 764 +++ .../futures/market/MarketApiImpl.java | 116 + .../generate/futures/order/AddOrderReq.java | 429 ++ .../generate/futures/order/AddOrderResp.java | 37 + .../futures/order/AddOrderTestReq.java | 429 ++ .../futures/order/AddOrderTestResp.java | 38 + .../futures/order/AddTPSLOrderReq.java | 393 ++ .../futures/order/AddTPSLOrderResp.java | 38 + .../futures/order/BatchAddOrdersData.java | 44 + .../futures/order/BatchAddOrdersItem.java | 428 ++ .../futures/order/BatchAddOrdersReq.java | 34 + .../futures/order/BatchAddOrdersResp.java | 42 + .../BatchCancelOrdersClientOidsList.java | 29 + .../futures/order/BatchCancelOrdersData.java | 31 + .../futures/order/BatchCancelOrdersReq.java | 30 + .../futures/order/BatchCancelOrdersResp.java | 42 + .../futures/order/CancelAllOrdersV1Req.java | 26 + .../futures/order/CancelAllOrdersV1Resp.java | 33 + .../futures/order/CancelAllOrdersV3Req.java | 25 + .../futures/order/CancelAllOrdersV3Resp.java | 33 + .../futures/order/CancelAllStopOrdersReq.java | 26 + .../order/CancelAllStopOrdersResp.java | 33 + .../order/CancelOrderByClientOidReq.java | 33 + .../order/CancelOrderByClientOidResp.java | 31 + .../futures/order/CancelOrderByIdReq.java | 26 + .../futures/order/CancelOrderByIdResp.java | 33 + .../futures/order/GetOpenOrderValueReq.java | 25 + .../futures/order/GetOpenOrderValueResp.java | 47 + .../futures/order/GetOrderByClientOidReq.java | 22 + .../order/GetOrderByClientOidResp.java | 441 ++ .../futures/order/GetOrderByOrderIdReq.java | 26 + .../futures/order/GetOrderByOrderIdResp.java | 441 ++ .../futures/order/GetOrderListItems.java | 257 + .../futures/order/GetOrderListReq.java | 164 + .../futures/order/GetOrderListResp.java | 49 + .../order/GetRecentClosedOrdersData.java | 257 + .../order/GetRecentClosedOrdersReq.java | 25 + .../order/GetRecentClosedOrdersResp.java | 42 + .../order/GetRecentTradeHistoryData.java | 359 ++ .../order/GetRecentTradeHistoryReq.java | 25 + .../order/GetRecentTradeHistoryResp.java | 42 + .../futures/order/GetStopOrderListItems.java | 257 + .../futures/order/GetStopOrderListReq.java | 118 + .../futures/order/GetStopOrderListResp.java | 49 + .../futures/order/GetTradeHistoryItems.java | 365 ++ .../futures/order/GetTradeHistoryReq.java | 136 + .../futures/order/GetTradeHistoryResp.java | 49 + .../sdk/generate/futures/order/OrderApi.java | 190 + .../generate/futures/order/OrderApi.template | 541 ++ .../order/OrderApiAutoGeneratedTest.java | 892 ++++ .../generate/futures/order/OrderApiImpl.java | 157 + .../positions/AddIsolatedMarginReq.java | 36 + .../positions/AddIsolatedMarginResp.java | 178 + .../BatchSwitchMarginModeErrors.java | 27 + .../positions/BatchSwitchMarginModeReq.java | 67 + .../positions/BatchSwitchMarginModeResp.java | 39 + .../positions/GetCrossMarginLeverageReq.java | 25 + .../positions/GetCrossMarginLeverageResp.java | 38 + .../GetCrossMarginRiskLimitData.java | 54 + .../positions/GetCrossMarginRiskLimitReq.java | 41 + .../GetCrossMarginRiskLimitResp.java | 42 + .../GetIsolatedMarginRiskLimitData.java | 46 + .../GetIsolatedMarginRiskLimitReq.java | 29 + .../GetIsolatedMarginRiskLimitResp.java | 43 + .../futures/positions/GetMarginModeReq.java | 25 + .../futures/positions/GetMarginModeResp.java | 73 + .../futures/positions/GetMaxOpenSizeReq.java | 33 + .../futures/positions/GetMaxOpenSizeResp.java | 42 + .../positions/GetMaxWithdrawMarginReq.java | 25 + .../positions/GetMaxWithdrawMarginResp.java | 43 + .../positions/GetPositionDetailsReq.java | 25 + .../positions/GetPositionDetailsResp.java | 290 ++ .../positions/GetPositionListData.java | 278 + .../futures/positions/GetPositionListReq.java | 26 + .../positions/GetPositionListResp.java | 42 + .../positions/GetPositionsHistoryItems.java | 141 + .../positions/GetPositionsHistoryReq.java | 43 + .../positions/GetPositionsHistoryResp.java | 49 + .../positions/ModifyAutoDepositStatusReq.java | 26 + .../ModifyAutoDepositStatusResp.java | 40 + .../ModifyIsolatedMarginRiskLimtReq.java | 29 + .../ModifyIsolatedMarginRiskLimtResp.java | 44 + .../positions/ModifyMarginLeverageReq.java | 29 + .../positions/ModifyMarginLeverageResp.java | 40 + .../futures/positions/PositionsApi.java | 158 + .../futures/positions/PositionsApi.template | 409 ++ .../PositionsApiAutoGeneratedTest.java | 769 +++ .../futures/positions/PositionsApiImpl.java | 173 + .../positions/RemoveIsolatedMarginReq.java | 32 + .../positions/RemoveIsolatedMarginResp.java | 43 + .../positions/SwitchMarginModeReq.java | 64 + .../positions/SwitchMarginModeResp.java | 73 + .../sdk/generate/margin/credit/CreditApi.java | 72 + .../generate/margin/credit/CreditApi.template | 143 + .../credit/CreditApiAutoGeneratedTest.java | 258 + .../generate/margin/credit/CreditApiImpl.java | 60 + .../margin/credit/GetLoanMarketData.java | 59 + .../credit/GetLoanMarketInterestRateData.java | 23 + .../credit/GetLoanMarketInterestRateReq.java | 22 + .../credit/GetLoanMarketInterestRateResp.java | 43 + .../margin/credit/GetLoanMarketReq.java | 22 + .../margin/credit/GetLoanMarketResp.java | 42 + .../margin/credit/GetPurchaseOrdersItems.java | 82 + .../margin/credit/GetPurchaseOrdersReq.java | 75 + .../margin/credit/GetPurchaseOrdersResp.java | 49 + .../margin/credit/GetRedeemOrdersItems.java | 43 + .../margin/credit/GetRedeemOrdersReq.java | 75 + .../margin/credit/GetRedeemOrdersResp.java | 49 + .../margin/credit/ModifyPurchaseReq.java | 30 + .../margin/credit/ModifyPurchaseResp.java | 40 + .../generate/margin/credit/PurchaseReq.java | 30 + .../generate/margin/credit/PurchaseResp.java | 30 + .../sdk/generate/margin/credit/RedeemReq.java | 30 + .../generate/margin/credit/RedeemResp.java | 30 + .../sdk/generate/margin/debit/BorrowReq.java | 79 + .../sdk/generate/margin/debit/BorrowResp.java | 34 + .../sdk/generate/margin/debit/DebitApi.java | 65 + .../generate/margin/debit/DebitApi.template | 128 + .../debit/DebitApiAutoGeneratedTest.java | 187 + .../generate/margin/debit/DebitApiImpl.java | 49 + .../margin/debit/GetBorrowHistoryItems.java | 80 + .../margin/debit/GetBorrowHistoryReq.java | 56 + .../margin/debit/GetBorrowHistoryResp.java | 53 + .../margin/debit/GetInterestHistoryItems.java | 31 + .../margin/debit/GetInterestHistoryReq.java | 52 + .../margin/debit/GetInterestHistoryResp.java | 53 + .../margin/debit/GetRepayHistoryItems.java | 84 + .../margin/debit/GetRepayHistoryReq.java | 56 + .../margin/debit/GetRepayHistoryResp.java | 53 + .../margin/debit/ModifyLeverageReq.java | 34 + .../margin/debit/ModifyLeverageResp.java | 40 + .../sdk/generate/margin/debit/RepayReq.java | 40 + .../sdk/generate/margin/debit/RepayResp.java | 38 + .../CrossMarginPositionAssetListValue.java | 27 + .../CrossMarginPositionEvent.java | 128 + ...olatedMarginPositionChangeAssetsValue.java | 31 + .../IsolatedMarginPositionEvent.java | 157 + .../margin/marginprivate/MarginPrivateWs.java | 30 + .../MarginPrivateWsAutoGeneratedTest.java | 76 + .../marginprivate/MarginPrivateWsImpl.java | 45 + .../margin/marginpublic/IndexPriceEvent.java | 54 + .../margin/marginpublic/MarginPublicWs.java | 28 + .../MarginPublicWsAutoGeneratedTest.java | 69 + .../marginpublic/MarginPublicWsImpl.java | 44 + .../margin/marginpublic/MarkPriceEvent.java | 54 + .../market/GetCrossMarginSymbolsItems.java | 94 + .../market/GetCrossMarginSymbolsReq.java | 25 + .../market/GetCrossMarginSymbolsResp.java | 37 + .../margin/market/GetETFInfoData.java | 39 + .../generate/margin/market/GetETFInfoReq.java | 22 + .../margin/market/GetETFInfoResp.java | 41 + .../market/GetIsolatedMarginSymbolsData.java | 71 + .../market/GetIsolatedMarginSymbolsResp.java | 42 + .../margin/market/GetMarginConfigResp.java | 45 + .../margin/market/GetMarkPriceDetailReq.java | 26 + .../margin/market/GetMarkPriceDetailResp.java | 39 + .../margin/market/GetMarkPriceListData.java | 27 + .../margin/market/GetMarkPriceListResp.java | 42 + .../sdk/generate/margin/market/MarketApi.java | 63 + .../generate/margin/market/MarketApi.template | 131 + .../market/MarketApiAutoGeneratedTest.java | 417 ++ .../generate/margin/market/MarketApiImpl.java | 67 + .../generate/margin/order/AddOrderReq.java | 283 ++ .../generate/margin/order/AddOrderResp.java | 51 + .../margin/order/AddOrderTestReq.java | 283 ++ .../margin/order/AddOrderTestResp.java | 52 + .../margin/order/AddOrderTestV1Req.java | 316 ++ .../margin/order/AddOrderTestV1Resp.java | 52 + .../generate/margin/order/AddOrderV1Req.java | 316 ++ .../generate/margin/order/AddOrderV1Resp.java | 51 + .../order/CancelAllOrdersBySymbolReq.java | 64 + .../order/CancelAllOrdersBySymbolResp.java | 40 + .../order/CancelOrderByClientOidReq.java | 30 + .../order/CancelOrderByClientOidResp.java | 31 + .../margin/order/CancelOrderByOrderIdReq.java | 30 + .../order/CancelOrderByOrderIdResp.java | 31 + .../margin/order/GetClosedOrdersItems.java | 277 + .../margin/order/GetClosedOrdersReq.java | 160 + .../margin/order/GetClosedOrdersResp.java | 42 + .../margin/order/GetOpenOrdersData.java | 310 ++ .../margin/order/GetOpenOrdersReq.java | 64 + .../margin/order/GetOpenOrdersResp.java | 42 + .../margin/order/GetOrderByClientOidReq.java | 30 + .../margin/order/GetOrderByClientOidResp.java | 322 ++ .../margin/order/GetOrderByOrderIdReq.java | 30 + .../margin/order/GetOrderByOrderIdResp.java | 322 ++ .../order/GetSymbolsWithOpenOrderReq.java | 57 + .../order/GetSymbolsWithOpenOrderResp.java | 37 + .../margin/order/GetTradeHistoryItems.java | 199 + .../margin/order/GetTradeHistoryReq.java | 166 + .../margin/order/GetTradeHistoryResp.java | 42 + .../sdk/generate/margin/order/OrderApi.java | 163 + .../generate/margin/order/OrderApi.template | 372 ++ .../order/OrderApiAutoGeneratedTest.java | 555 ++ .../generate/margin/order/OrderApiImpl.java | 126 + .../risklimit/GetMarginRiskLimitData.java | 175 + .../risklimit/GetMarginRiskLimitReq.java | 30 + .../risklimit/GetMarginRiskLimitResp.java | 42 + .../margin/risklimit/RiskLimitApi.java | 14 + .../margin/risklimit/RiskLimitApi.template | 47 + .../RiskLimitApiAutoGeneratedTest.java | 88 + .../margin/risklimit/RiskLimitApiImpl.java | 24 + .../sdk/generate/service/AccountService.java | 25 + .../generate/service/AccountServiceImpl.java | 61 + .../generate/service/AffiliateService.java | 9 + .../service/AffiliateServiceImpl.java | 21 + .../sdk/generate/service/BrokerService.java | 13 + .../generate/service/BrokerServiceImpl.java | 29 + .../generate/service/CopyTradingService.java | 9 + .../service/CopyTradingServiceImpl.java | 21 + .../sdk/generate/service/EarnService.java | 9 + .../sdk/generate/service/EarnServiceImpl.java | 21 + .../sdk/generate/service/FuturesService.java | 19 + .../generate/service/FuturesServiceImpl.java | 45 + .../sdk/generate/service/MarginService.java | 22 + .../generate/service/MarginServiceImpl.java | 53 + .../sdk/generate/service/SpotService.java | 13 + .../sdk/generate/service/SpotServiceImpl.java | 29 + .../generate/service/VIPLendingService.java | 9 + .../service/VIPLendingServiceImpl.java | 21 + .../generate/spot/market/Get24hrStatsReq.java | 23 + .../spot/market/Get24hrStatsResp.java | 97 + .../spot/market/GetAllCurrenciesData.java | 63 + .../market/GetAllCurrenciesDataChains.java | 90 + .../spot/market/GetAllCurrenciesResp.java | 42 + .../spot/market/GetAllSymbolsData.java | 221 + .../spot/market/GetAllSymbolsReq.java | 22 + .../spot/market/GetAllSymbolsResp.java | 46 + .../spot/market/GetAllTickersResp.java | 42 + .../spot/market/GetAllTickersTicker.java | 182 + .../spot/market/GetAnnouncementsItems.java | 52 + .../spot/market/GetAnnouncementsReq.java | 234 + .../spot/market/GetAnnouncementsResp.java | 58 + .../spot/market/GetCallAuctionInfoReq.java | 23 + .../spot/market/GetCallAuctionInfoResp.java | 71 + .../GetCallAuctionPartOrderBookReq.java | 30 + .../GetCallAuctionPartOrderBookResp.java | 46 + .../spot/market/GetClientIPAddressResp.java | 44 + .../spot/market/GetCurrencyChains.java | 91 + .../generate/spot/market/GetCurrencyReq.java | 33 + .../generate/spot/market/GetCurrencyResp.java | 77 + .../generate/spot/market/GetFiatPriceReq.java | 29 + .../spot/market/GetFiatPriceResp.java | 4509 +++++++++++++++++ .../spot/market/GetFullOrderBookReq.java | 23 + .../spot/market/GetFullOrderBookResp.java | 45 + .../generate/spot/market/GetKlinesReq.java | 124 + .../generate/spot/market/GetKlinesResp.java | 45 + .../spot/market/GetMarketListResp.java | 45 + .../spot/market/GetPartOrderBookReq.java | 30 + .../spot/market/GetPartOrderBookResp.java | 52 + .../GetPrivateTokenInstanceServers.java | 74 + .../spot/market/GetPrivateTokenResp.java | 44 + .../market/GetPublicTokenInstanceServers.java | 74 + .../spot/market/GetPublicTokenResp.java | 43 + .../spot/market/GetServerTimeResp.java | 43 + .../spot/market/GetServiceStatusResp.java | 83 + .../generate/spot/market/GetSymbolReq.java | 25 + .../generate/spot/market/GetSymbolResp.java | 200 + .../generate/spot/market/GetTickerReq.java | 22 + .../generate/spot/market/GetTickerResp.java | 69 + .../spot/market/GetTradeHistoryData.java | 73 + .../spot/market/GetTradeHistoryReq.java | 23 + .../spot/market/GetTradeHistoryResp.java | 47 + .../sdk/generate/spot/market/MarketApi.java | 373 ++ .../generate/spot/market/MarketApi.template | 1371 +++++ .../market/MarketApiAutoGeneratedTest.java | 573 +++ .../generate/spot/market/MarketApiImpl.java | 124 + .../generate/spot/order/AddOcoOrderReq.java | 128 + .../generate/spot/order/AddOcoOrderResp.java | 33 + .../generate/spot/order/AddOrderOldReq.java | 307 ++ .../generate/spot/order/AddOrderOldResp.java | 33 + .../sdk/generate/spot/order/AddOrderReq.java | 289 ++ .../sdk/generate/spot/order/AddOrderResp.java | 37 + .../generate/spot/order/AddOrderSyncReq.java | 283 ++ .../generate/spot/order/AddOrderSyncResp.java | 101 + .../spot/order/AddOrderTestOldReq.java | 307 ++ .../spot/order/AddOrderTestOldResp.java | 34 + .../generate/spot/order/AddOrderTestReq.java | 283 ++ .../generate/spot/order/AddOrderTestResp.java | 38 + .../generate/spot/order/AddStopOrderReq.java | 283 ++ .../generate/spot/order/AddStopOrderResp.java | 34 + .../spot/order/BatchAddOrdersData.java | 34 + .../spot/order/BatchAddOrdersOldData.java | 99 + .../order/BatchAddOrdersOldOrderList.java | 323 ++ .../spot/order/BatchAddOrdersOldReq.java | 29 + .../spot/order/BatchAddOrdersOldResp.java | 33 + .../spot/order/BatchAddOrdersOrderList.java | 264 + .../spot/order/BatchAddOrdersReq.java | 25 + .../spot/order/BatchAddOrdersResp.java | 42 + .../spot/order/BatchAddOrdersSyncData.java | 97 + .../order/BatchAddOrdersSyncOrderList.java | 264 + .../spot/order/BatchAddOrdersSyncReq.java | 25 + .../spot/order/BatchAddOrdersSyncResp.java | 42 + .../spot/order/BatchCancelOcoOrdersReq.java | 29 + .../spot/order/BatchCancelOcoOrdersResp.java | 33 + .../spot/order/BatchCancelOrderOldReq.java | 68 + .../spot/order/BatchCancelOrderOldResp.java | 33 + .../spot/order/BatchCancelStopOrderReq.java | 33 + .../spot/order/BatchCancelStopOrderResp.java | 33 + .../order/CancelAllOrdersBySymbolReq.java | 22 + .../order/CancelAllOrdersBySymbolResp.java | 40 + .../order/CancelAllOrdersFailedSymbols.java | 23 + .../spot/order/CancelAllOrdersResp.java | 37 + .../order/CancelOcoOrderByClientOidReq.java | 26 + .../order/CancelOcoOrderByClientOidResp.java | 34 + .../order/CancelOcoOrderByOrderIdReq.java | 26 + .../order/CancelOcoOrderByOrderIdResp.java | 33 + .../order/CancelOrderByClientOidOldReq.java | 26 + .../order/CancelOrderByClientOidOldResp.java | 42 + .../spot/order/CancelOrderByClientOidReq.java | 30 + .../order/CancelOrderByClientOidResp.java | 31 + .../order/CancelOrderByClientOidSyncReq.java | 30 + .../order/CancelOrderByClientOidSyncResp.java | 87 + .../order/CancelOrderByOrderIdOldReq.java | 26 + .../order/CancelOrderByOrderIdOldResp.java | 33 + .../spot/order/CancelOrderByOrderIdReq.java | 30 + .../spot/order/CancelOrderByOrderIdResp.java | 31 + .../order/CancelOrderByOrderIdSyncReq.java | 30 + .../order/CancelOrderByOrderIdSyncResp.java | 86 + .../spot/order/CancelPartialOrderReq.java | 34 + .../spot/order/CancelPartialOrderResp.java | 35 + .../order/CancelStopOrderByClientOidReq.java | 26 + .../order/CancelStopOrderByClientOidResp.java | 36 + .../order/CancelStopOrderByOrderIdReq.java | 26 + .../order/CancelStopOrderByOrderIdResp.java | 33 + .../spot/order/GetClosedOrdersItems.java | 293 ++ .../spot/order/GetClosedOrdersReq.java | 120 + .../spot/order/GetClosedOrdersResp.java | 42 + .../sdk/generate/spot/order/GetDCPResp.java | 45 + .../spot/order/GetOcoOrderByClientOidReq.java | 26 + .../order/GetOcoOrderByClientOidResp.java | 50 + .../spot/order/GetOcoOrderByOrderIdReq.java | 26 + .../spot/order/GetOcoOrderByOrderIdResp.java | 89 + .../GetOcoOrderDetailByOrderIdOrders.java | 43 + .../order/GetOcoOrderDetailByOrderIdReq.java | 26 + .../order/GetOcoOrderDetailByOrderIdResp.java | 57 + .../spot/order/GetOcoOrderListItems.java | 77 + .../spot/order/GetOcoOrderListReq.java | 44 + .../spot/order/GetOcoOrderListResp.java | 49 + .../spot/order/GetOpenOrdersByPageItems.java | 293 ++ .../spot/order/GetOpenOrdersByPageReq.java | 32 + .../spot/order/GetOpenOrdersByPageResp.java | 49 + .../spot/order/GetOpenOrdersData.java | 293 ++ .../generate/spot/order/GetOpenOrdersReq.java | 22 + .../spot/order/GetOpenOrdersResp.java | 42 + .../spot/order/GetOrderByClientOidOldReq.java | 26 + .../order/GetOrderByClientOidOldResp.java | 159 + .../spot/order/GetOrderByClientOidReq.java | 30 + .../spot/order/GetOrderByClientOidResp.java | 305 ++ .../spot/order/GetOrderByOrderIdOldReq.java | 26 + .../spot/order/GetOrderByOrderIdOldResp.java | 159 + .../spot/order/GetOrderByOrderIdReq.java | 30 + .../spot/order/GetOrderByOrderIdResp.java | 305 ++ .../spot/order/GetOrdersListOldItems.java | 147 + .../spot/order/GetOrdersListOldReq.java | 205 + .../spot/order/GetOrdersListOldResp.java | 49 + .../order/GetRecentOrdersListOldData.java | 147 + .../order/GetRecentOrdersListOldResp.java | 42 + .../order/GetRecentTradeHistoryOldData.java | 95 + .../order/GetRecentTradeHistoryOldResp.java | 42 + .../order/GetStopOrderByClientOidData.java | 177 + .../order/GetStopOrderByClientOidReq.java | 26 + .../order/GetStopOrderByClientOidResp.java | 42 + .../spot/order/GetStopOrderByOrderIdReq.java | 26 + .../spot/order/GetStopOrderByOrderIdResp.java | 189 + .../spot/order/GetStopOrdersListItems.java | 193 + .../spot/order/GetStopOrdersListReq.java | 98 + .../spot/order/GetStopOrdersListResp.java | 49 + .../order/GetSymbolsWithOpenOrderResp.java | 33 + .../spot/order/GetTradeHistoryItems.java | 199 + .../spot/order/GetTradeHistoryOldItems.java | 86 + .../spot/order/GetTradeHistoryOldReq.java | 169 + .../spot/order/GetTradeHistoryOldResp.java | 49 + .../spot/order/GetTradeHistoryReq.java | 127 + .../spot/order/GetTradeHistoryResp.java | 42 + .../generate/spot/order/ModifyOrderReq.java | 38 + .../generate/spot/order/ModifyOrderResp.java | 34 + .../sdk/generate/spot/order/OrderApi.java | 582 +++ .../sdk/generate/spot/order/OrderApi.template | 1290 +++++ .../spot/order/OrderApiAutoGeneratedTest.java | 1893 +++++++ .../sdk/generate/spot/order/OrderApiImpl.java | 435 ++ .../sdk/generate/spot/order/SetDCPReq.java | 35 + .../sdk/generate/spot/order/SetDCPResp.java | 34 + .../spot/spotprivate/AccountEvent.java | 82 + .../spotprivate/AccountRelationContext.java | 23 + .../spot/spotprivate/OrderV1Event.java | 352 ++ .../spot/spotprivate/OrderV2Event.java | 359 ++ .../spot/spotprivate/SpotPrivateWs.java | 39 + .../SpotPrivateWsAutoGeneratedTest.java | 87 + .../spot/spotprivate/SpotPrivateWsImpl.java | 59 + .../spot/spotprivate/StopOrderEvent.java | 289 ++ .../spot/spotpublic/AllTickersEvent.java | 75 + .../spot/spotpublic/CallAuctionInfoEvent.java | 76 + .../CallAuctionOrderbookLevel50Event.java | 61 + .../generate/spot/spotpublic/KlinesEvent.java | 57 + .../spot/spotpublic/MarketSnapshotData.java | 232 + .../MarketSnapshotDataMarketChange1h.java | 44 + .../MarketSnapshotDataMarketChange24h.java | 44 + .../MarketSnapshotDataMarketChange4h.java | 44 + .../spot/spotpublic/MarketSnapshotEvent.java | 51 + .../spotpublic/OrderbookIncrementChanges.java | 26 + .../spotpublic/OrderbookIncrementEvent.java | 64 + .../spot/spotpublic/OrderbookLevel1Event.java | 57 + .../spotpublic/OrderbookLevel50Event.java | 58 + .../spot/spotpublic/OrderbookLevel5Event.java | 57 + .../spot/spotpublic/SpotPublicWs.java | 119 + .../SpotPublicWsAutoGeneratedTest.java | 208 + .../spot/spotpublic/SpotPublicWsImpl.java | 138 + .../spot/spotpublic/SymbolSnapshotData.java | 232 + .../SymbolSnapshotDataMarketChange1h.java | 44 + .../SymbolSnapshotDataMarketChange24h.java | 44 + .../SymbolSnapshotDataMarketChange4h.java | 44 + .../spot/spotpublic/SymbolSnapshotEvent.java | 51 + .../generate/spot/spotpublic/TickerEvent.java | 74 + .../generate/spot/spotpublic/TradeEvent.java | 81 + .../viplending/GetAccountsData.java | 39 + .../viplending/GetAccountsResp.java | 41 + .../GetDiscountRateConfigsData.java | 25 + .../GetDiscountRateConfigsDataUsdtLevels.java | 27 + .../GetDiscountRateConfigsResp.java | 42 + .../viplending/viplending/GetLoanInfoLtv.java | 35 + .../viplending/GetLoanInfoMargins.java | 27 + .../viplending/GetLoanInfoOrders.java | 31 + .../viplending/GetLoanInfoResp.java | 52 + .../viplending/viplending/VIPLendingApi.java | 36 + .../viplending/VIPLendingApi.template | 62 + .../VIPLendingApiAutoGeneratedTest.java | 175 + .../viplending/VIPLendingApiImpl.java | 34 + 781 files changed, 80046 insertions(+), 36 deletions(-) create mode 100644 sdk/java/Makefile create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetAccountInfoResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetApikeyInfoResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetCrossMarginAccountAccounts.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetCrossMarginAccountReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetCrossMarginAccountResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesAccountReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesAccountResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesLedgerDataList.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesLedgerReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesLedgerResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountAssets.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountAssetsBaseAsset.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountAssetsQuoteAsset.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountDetailV1BaseAsset.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountDetailV1QuoteAsset.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountDetailV1Req.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountDetailV1Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1Assets.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1AssetsBaseAsset.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1AssetsQuoteAsset.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1Req.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginAccountDetailAccounts.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginAccountDetailResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginHFLedgerData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginHFLedgerReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginHFLedgerResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountDetailReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountDetailResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountListData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountListReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountListResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountTypeResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotHFLedgerData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotHFLedgerReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotHFLedgerResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotLedgerItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotLedgerReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotLedgerResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/AddDepositAddressV1Req.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/AddDepositAddressV1Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/AddDepositAddressV3Req.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/AddDepositAddressV3Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV1Req.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV1Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV2Data.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV2Req.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV2Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV3Data.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV3Req.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV3Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryOldItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryOldReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryOldResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetBasicFeeReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetBasicFeeResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetFuturesActualFeeReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetFuturesActualFeeResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetSpotActualFeeData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetSpotActualFeeReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetSpotActualFeeResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountApiReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountApiResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountFuturesPermissionReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountFuturesPermissionResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountMarginPermissionReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountMarginPermissionResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/DeleteSubAccountApiReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/DeleteSubAccountApiResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetFuturesSubAccountListV2Accounts.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetFuturesSubAccountListV2Req.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetFuturesSubAccountListV2Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetFuturesSubAccountListV2Summary.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailMainAccounts.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailMarginAccounts.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailTradeAccounts.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1Data.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1DataMainAccounts.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1DataMarginAccounts.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1DataTradeAccounts.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2Items.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2ItemsMainAccounts.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2ItemsMarginAccounts.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2ItemsTradeAccounts.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2Req.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV1Data.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV1Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV2Items.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV2Req.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV2Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSubAccountApiListData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSubAccountApiListReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSubAccountApiListResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/ModifySubAccountApiReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/ModifySubAccountApiResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FlexTransferReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FlexTransferResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferInReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferInResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferOutReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferOutResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetFuturesAccountTransferOutLedgerItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetFuturesAccountTransferOutLedgerReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetFuturesAccountTransferOutLedgerResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetTransferQuotasReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetTransferQuotasResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/InnerTransferReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/InnerTransferResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/SubAccountTransferReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/SubAccountTransferResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/CancelWithdrawalReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/CancelWithdrawalResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryByIdReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryByIdResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryOldItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryOldReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryOldResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalQuotasReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalQuotasResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalV1Req.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalV1Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalV3Req.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalV3Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/GetAccountLtv.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/GetAccountMargins.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/GetAccountOrders.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/GetAccountResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/GetRebaseReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/GetRebaseResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/AddSubAccountApiReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/AddSubAccountApiResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/AddSubAccountReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/AddSubAccountResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/DeleteSubAccountAPIReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/DeleteSubAccountAPIResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetBrokerInfoReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetBrokerInfoResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositDetailReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositDetailResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositListData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositListReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositListResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusListItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusListReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusListResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetRebaseReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetRebaseResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountAPIData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountAPIReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountAPIResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetTransferHistoryReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetTransferHistoryResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetWithdrawDetailReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetWithdrawDetailResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/ModifySubAccountApiReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/ModifySubAccountApiResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/SubmitKYCReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/SubmitKYCResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/TransferReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/TransferResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddIsolatedMarginReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddIsolatedMarginResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddOrderReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddOrderResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddOrderTestReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddOrderTestResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddTPSLOrderReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddTPSLOrderResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/CancelOrderByClientOidReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/CancelOrderByClientOidResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/CancelOrderByIdReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/CancelOrderByIdResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxOpenSizeReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxOpenSizeResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxWithdrawMarginReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxWithdrawMarginResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyAutoDepositStatusReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyAutoDepositStatusResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyIsolatedMarginRiskLimtReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyIsolatedMarginRiskLimtResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/RemoveIsolatedMarginReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/RemoveIsolatedMarginResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetAccountHoldingItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetAccountHoldingReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetAccountHoldingResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetETHStakingProductsData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetETHStakingProductsReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetETHStakingProductsResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetKcsStakingProductsData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetKcsStakingProductsReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetKcsStakingProductsResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetPromotionProductsData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetPromotionProductsReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetPromotionProductsResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetRedeemPreviewReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetRedeemPreviewResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetSavingsProductsData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetSavingsProductsReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetSavingsProductsResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetStakingProductsData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetStakingProductsReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetStakingProductsResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/PurchaseReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/PurchaseResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/RedeemReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/RedeemResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetCurrentFundingRateReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetCurrentFundingRateResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPrivateFundingHistoryDataList.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPrivateFundingHistoryReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPrivateFundingHistoryResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPublicFundingHistoryData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPublicFundingHistoryReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPublicFundingHistoryResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllOrderEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllPositionEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/BalanceEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageDataValue.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWs.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/MarginModeEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/OrderEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/PositionEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/StopOrdersEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/AnnouncementEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/ExecutionEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWs.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/InstrumentEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/KlinesEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookIncrementEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel50Event.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel5Event.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/SymbolSnapshotEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV1Event.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV2Event.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/Get24hrStatsResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllSymbolsData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllSymbolsResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllTickersData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllTickersResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetFullOrderBookReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetFullOrderBookResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetInterestRateIndexDataList.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetInterestRateIndexReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetInterestRateIndexResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetKlinesReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetKlinesResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetMarkPriceReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetMarkPriceResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPartOrderBookReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPartOrderBookResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPremiumIndexDataList.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPremiumIndexReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPremiumIndexResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPrivateTokenInstanceServers.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPrivateTokenResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPublicTokenInstanceServers.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPublicTokenResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetServerTimeResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetServiceStatusResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSpotIndexPriceDataList.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSpotIndexPriceDataListDecomposionList.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSpotIndexPriceReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSpotIndexPriceResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSymbolReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSymbolResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTickerReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTickerResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTradeHistoryData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTradeHistoryReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTradeHistoryResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddOrderReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddOrderResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddOrderTestReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddOrderTestResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddTPSLOrderReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddTPSLOrderResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersItem.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersClientOidsList.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllOrdersV1Req.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllOrdersV1Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllOrdersV3Req.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllOrdersV3Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllStopOrdersReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllStopOrdersResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelOrderByClientOidReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelOrderByClientOidResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelOrderByIdReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelOrderByIdResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOpenOrderValueReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOpenOrderValueResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByClientOidReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByClientOidResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByOrderIdReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByOrderIdResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderListItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderListReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderListResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentClosedOrdersData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentClosedOrdersReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentClosedOrdersResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentTradeHistoryData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentTradeHistoryReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentTradeHistoryResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetStopOrderListItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetStopOrderListReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetStopOrderListResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetTradeHistoryItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetTradeHistoryReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetTradeHistoryResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/AddIsolatedMarginReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/AddIsolatedMarginResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/BatchSwitchMarginModeErrors.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/BatchSwitchMarginModeReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/BatchSwitchMarginModeResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginLeverageReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginLeverageResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginRiskLimitData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginRiskLimitReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginRiskLimitResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetIsolatedMarginRiskLimitData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetIsolatedMarginRiskLimitReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetIsolatedMarginRiskLimitResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMarginModeReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMarginModeResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMaxOpenSizeReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMaxOpenSizeResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMaxWithdrawMarginReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMaxWithdrawMarginResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionDetailsReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionDetailsResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionListData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionListReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionListResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionsHistoryItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionsHistoryReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionsHistoryResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyAutoDepositStatusReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyAutoDepositStatusResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyIsolatedMarginRiskLimtReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyIsolatedMarginRiskLimtResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyMarginLeverageReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyMarginLeverageResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/RemoveIsolatedMarginReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/RemoveIsolatedMarginResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/SwitchMarginModeReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/SwitchMarginModeResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketInterestRateData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketInterestRateReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketInterestRateResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetPurchaseOrdersItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetPurchaseOrdersReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetPurchaseOrdersResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetRedeemOrdersItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetRedeemOrdersReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetRedeemOrdersResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/ModifyPurchaseReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/ModifyPurchaseResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/PurchaseReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/PurchaseResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/RedeemReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/RedeemResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/BorrowReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/BorrowResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetBorrowHistoryItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetBorrowHistoryReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetBorrowHistoryResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetInterestHistoryItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetInterestHistoryReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetInterestHistoryResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetRepayHistoryItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetRepayHistoryReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetRepayHistoryResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/ModifyLeverageReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/ModifyLeverageResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/RepayReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/RepayResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionAssetListValue.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionChangeAssetsValue.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWs.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/IndexPriceEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWs.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarkPriceEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetCrossMarginSymbolsItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetCrossMarginSymbolsReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetCrossMarginSymbolsResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetETFInfoData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetETFInfoReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetETFInfoResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetIsolatedMarginSymbolsData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetIsolatedMarginSymbolsResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarginConfigResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarkPriceDetailReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarkPriceDetailResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarkPriceListData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarkPriceListResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderTestReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderTestResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderTestV1Req.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderTestV1Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderV1Req.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderV1Resp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelAllOrdersBySymbolReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelAllOrdersBySymbolResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelOrderByClientOidReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelOrderByClientOidResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelOrderByOrderIdReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelOrderByOrderIdResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetClosedOrdersItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetClosedOrdersReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetClosedOrdersResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOpenOrdersData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOpenOrdersReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOpenOrdersResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOrderByClientOidReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOrderByClientOidResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOrderByOrderIdReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOrderByOrderIdResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetSymbolsWithOpenOrderReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetSymbolsWithOpenOrderResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetTradeHistoryItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetTradeHistoryReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetTradeHistoryResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/GetMarginRiskLimitData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/GetMarginRiskLimitReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/GetMarginRiskLimitResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AccountService.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AccountServiceImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AffiliateService.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AffiliateServiceImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/BrokerService.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/BrokerServiceImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/CopyTradingService.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/CopyTradingServiceImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/EarnService.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/EarnServiceImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/FuturesService.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/FuturesServiceImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/MarginService.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/MarginServiceImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/SpotService.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/SpotServiceImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/VIPLendingService.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/VIPLendingServiceImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/Get24hrStatsReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/Get24hrStatsResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesDataChains.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllTickersResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllTickersTicker.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionInfoReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionInfoResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionPartOrderBookReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionPartOrderBookResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetClientIPAddressResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyChains.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFullOrderBookReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFullOrderBookResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetMarketListResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPartOrderBookReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPartOrderBookResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPrivateTokenInstanceServers.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPrivateTokenResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPublicTokenInstanceServers.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPublicTokenResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServerTimeResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServiceStatusResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetSymbolReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetSymbolResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTickerReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTickerResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOcoOrderReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOcoOrderResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderOldReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderOldResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderSyncReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderSyncResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderTestOldReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderTestOldResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderTestReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderTestResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddStopOrderReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddStopOrderResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOldData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOldOrderList.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOldReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOldResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOrderList.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncOrderList.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelOcoOrdersReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelOcoOrdersResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelOrderOldReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelOrderOldResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelStopOrderReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelStopOrderResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersBySymbolReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersBySymbolResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersFailedSymbols.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOcoOrderByClientOidReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOcoOrderByClientOidResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOcoOrderByOrderIdReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOcoOrderByOrderIdResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidOldReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidOldResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidSyncReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidSyncResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdOldReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdOldResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdSyncReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdSyncResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelPartialOrderReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelPartialOrderResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelStopOrderByClientOidReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelStopOrderByClientOidResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelStopOrderByOrderIdReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelStopOrderByOrderIdResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetClosedOrdersItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetClosedOrdersReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetClosedOrdersResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetDCPResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderByClientOidReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderByClientOidResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderByOrderIdReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderByOrderIdResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderDetailByOrderIdOrders.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderDetailByOrderIdReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderDetailByOrderIdResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderListItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderListReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderListResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersByPageItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersByPageReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersByPageResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByClientOidOldReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByClientOidOldResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByClientOidReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByClientOidResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByOrderIdOldReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByOrderIdOldResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByOrderIdReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByOrderIdResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrdersListOldItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrdersListOldReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrdersListOldResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentOrdersListOldData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentOrdersListOldResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentTradeHistoryOldData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentTradeHistoryOldResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByClientOidData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByClientOidReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByClientOidResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByOrderIdReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByOrderIdResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrdersListItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrdersListReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrdersListResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetSymbolsWithOpenOrderResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryOldItems.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryOldReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryOldResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/ModifyOrderReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/ModifyOrderResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/SetDCPReq.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/SetDCPResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountRelationContext.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV1Event.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV2Event.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWs.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/StopOrderEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange1h.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange24h.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange4h.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementChanges.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWs.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange1h.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange24h.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange4h.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetAccountsData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetAccountsResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetDiscountRateConfigsData.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetDiscountRateConfigsDataUsdtLevels.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetDiscountRateConfigsResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetLoanInfoLtv.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetLoanInfoMargins.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetLoanInfoOrders.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetLoanInfoResp.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.template create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiAutoGeneratedTest.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiImpl.java diff --git a/Dockerfile b/Dockerfile index 46ec631b..9fe32f00 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,10 @@ # build plugin -FROM amazoncorretto:11-alpine AS generator-builder +FROM maven:3.9.10-amazoncorretto-17-debian-bookworm AS generator-builder ENV MAVEN_VERSION=3.8.8 ENV MAVEN_HOME=/usr/share/maven ENV PATH=${MAVEN_HOME}/bin:${PATH} -RUN apk add --no-cache curl tar bash \ - && echo ${MAVEN_HOME} \ - && curl -fsSL https://downloads.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz | tar -xzC /usr/share \ - && mv /usr/share/apache-maven-${MAVEN_VERSION} ${MAVEN_HOME} \ - && ln -s ${MAVEN_HOME}/bin/mvn /usr/bin/mvn \ - && apk del curl tar - - WORKDIR /build COPY ./generator/plugin /build diff --git a/Makefile b/Makefile index 34ca9272..60a6572d 100644 --- a/Makefile +++ b/Makefile @@ -74,6 +74,9 @@ define generate-code docker run --rm -v "${PWD}:/local" $(IMAGE_NAME):$(IMAGE_TAG) rm -rf $(outdir)/.openapi-generator docker run --rm -v "${PWD}:/local" $(IMAGE_NAME):$(IMAGE_TAG) rm -rf $(outdir)/.openapi-generator-ignore + @echo "$(GREEN)lang: $(lang), format project...$(NC)" + sh -c "cd sdk/$(lang) && make format" + @echo "$(GREEN)lang: $(lang), done!$(NC)" endef @@ -89,6 +92,7 @@ generate: setup-logs $(call generate-code,python,/kucoin_universal_sdk/generate) $(call generate-code,node,/src/generate) $(call generate-code,php,/src/Generate,0.1.2-alpha) + $(call generate-code,java,/src/main/java/com/kucoin/universal/sdk/generate,0.1.0-alpha) .PHONY: gen-postman gen-postman: preprocessor diff --git a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java index 7b0048fc..6616e150 100644 --- a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java +++ b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java @@ -174,10 +174,15 @@ public CodegenProperty fromProperty(String name, Schema p, boolean required) { List enums = new ArrayList<>(); List> enumList; + String enumDataType = "String"; if (prop.openApiType.equalsIgnoreCase("array")) { enumList = (List>) prop.mostInnerItems.vendorExtensions.get("x-api-enum"); + if (prop.mostInnerItems.isNumber) { + enumDataType = "Integer"; + } } else { enumList = (List>) prop.vendorExtensions.get("x-api-enum"); + enumDataType = prop.dataType; } @@ -218,6 +223,8 @@ public CodegenProperty fromProperty(String name, Schema p, boolean required) { prop.vendorExtensions.put("x-enum-varnames", names); prop.vendorExtensions.put("x-enum-descriptions", description); prop.vendorExtensions.put("x-enums", enums); + prop.vendorExtensions.put("x-enums-datatype", enumDataType); + prop.vendorExtensions.put("x-enums-isString", enumDataType.equalsIgnoreCase("string")); } @@ -254,6 +261,7 @@ public String modelFileFolder() { @Override public String toApiFilename(String name) { String apiName = name.replaceAll("-", "_"); + apiName = KeywordsUtil.getKeyword(apiName); switch (modeSwitch.getMode()) { case API: case ENTRY: @@ -368,11 +376,11 @@ public ModelsMap postProcessModels(ModelsMap objs) { } else if (var.getIsMap()) { imports.add(String.format("import %s;", importMapping.get("Map"))); imports.add(String.format("import %s;", importMapping.get("HashMap"))); - } else if (var.isEnum) { + } + + if (var.getIsEnum() || var.mostInnerItems != null && var.mostInnerItems.isEnum) { imports.add("import com.fasterxml.jackson.annotation.JsonValue;"); imports.add("import com.fasterxml.jackson.annotation.JsonCreator;"); - } else { - ; } }); diff --git a/generator/plugin/src/main/resources/java-sdk/model.mustache b/generator/plugin/src/main/resources/java-sdk/model.mustache index 9bf33803..03447d88 100644 --- a/generator/plugin/src/main/resources/java-sdk/model.mustache +++ b/generator/plugin/src/main/resources/java-sdk/model.mustache @@ -87,14 +87,14 @@ public class {{classname}} { {{name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} {{/vendorExtensions.x-enums}} - private final {{{dataType}}} value; + private final {{vendorExtensions.x-enums-datatype}} value; - {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{enumName}}({{vendorExtensions.x-enums-datatype}} value) { this.value = value; } @JsonValue - public {{{dataType}}} getValue() { + public {{vendorExtensions.x-enums-datatype}} getValue() { return value; } @@ -104,8 +104,8 @@ public class {{classname}} { } @JsonCreator - public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{enumName}} fromValue({{vendorExtensions.x-enums-datatype}} value) { + for ({{enumName}} b : {{enumName}}.values()) { if (b.value.{{^isString}}equals{{/isString}}{{#isString}}{{#useEnumCaseInsensitive}}equalsIgnoreCase{{/useEnumCaseInsensitive}}{{^useEnumCaseInsensitive}}equals{{/useEnumCaseInsensitive}}{{/isString}}(value)) { return b; } diff --git a/generator/plugin/src/main/resources/java-sdk/model_ws.mustache b/generator/plugin/src/main/resources/java-sdk/model_ws.mustache index 1c901289..cbf34825 100644 --- a/generator/plugin/src/main/resources/java-sdk/model_ws.mustache +++ b/generator/plugin/src/main/resources/java-sdk/model_ws.mustache @@ -78,14 +78,14 @@ class {{classname}} { {{name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} {{/vendorExtensions.x-enums}} - private final {{{dataType}}} value; + private final {{vendorExtensions.x-enums-datatype}} value; - {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{enumName}}({{vendorExtensions.x-enums-datatype}} value) { this.value = value; } @JsonValue - public {{{dataType}}} getValue() { + public {{vendorExtensions.x-enums-datatype}} getValue() { return value; } @@ -95,8 +95,8 @@ class {{classname}} { } @JsonCreator - public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{enumName}} fromValue({{vendorExtensions.x-enums-datatype}} value) { + for ({{enumName}} b : {{enumName}}.values()) { if (b.value.{{^isString}}equals{{/isString}}{{#isString}}{{#useEnumCaseInsensitive}}equalsIgnoreCase{{/useEnumCaseInsensitive}}{{^useEnumCaseInsensitive}}equals{{/useEnumCaseInsensitive}}{{/isString}}(value)) { return b; } diff --git a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java index 3bf9f79e..2fd0984b 100644 --- a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java +++ b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java @@ -8,7 +8,7 @@ public class SdkGeneratorTest { private static final String SDK_NAME = "java-sdk"; - private static final String SPEC_NAME = "../../spec/rest/api/openapi-futures-order.json"; + private static final String SPEC_NAME = "../../spec/rest/api/openapi-viplending-viplending.json"; private static final String SPEC_ENTRY_NAME = "../../spec/rest/entry/openapi-futures.json"; private static final String WS_SPEC_NAME = "../../spec/ws/openapi-spot-public.json"; private static final String OUTPUT_DIR = "../../sdk/java/src/main/java/com/kucoin/universal/sdk/generate"; @@ -28,19 +28,19 @@ public void launchCodeGenerator() { DefaultGenerator generator = new DefaultGenerator(); generator.opts(clientOptInput).generate(); } -// { -// final CodegenConfigurator configurator = new CodegenConfigurator() -// .setGeneratorName(SDK_NAME) -// .setInputSpec(SPEC_ENTRY_NAME) -// .setValidateSpec(false) -// .addAdditionalProperty("GEN_MODE", "ENTRY") -// .addAdditionalProperty("CSV_PATH", CSV_PATH) -// .setOutputDir(OUTPUT_DIR); -// -// final ClientOptInput clientOptInput = configurator.toClientOptInput(); -// DefaultGenerator generator = new DefaultGenerator(); -// generator.opts(clientOptInput).generate(); -// } + { + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName(SDK_NAME) + .setInputSpec(SPEC_ENTRY_NAME) + .setValidateSpec(false) + .addAdditionalProperty("GEN_MODE", "ENTRY") + .addAdditionalProperty("CSV_PATH", CSV_PATH) + .setOutputDir(OUTPUT_DIR); + + final ClientOptInput clientOptInput = configurator.toClientOptInput(); + DefaultGenerator generator = new DefaultGenerator(); + generator.opts(clientOptInput).generate(); + } { final CodegenConfigurator configurator = new CodegenConfigurator() diff --git a/sdk/java/Makefile b/sdk/java/Makefile new file mode 100644 index 00000000..4848be77 --- /dev/null +++ b/sdk/java/Makefile @@ -0,0 +1,69 @@ + +.PHONY: build +build: + docker build -t java-sdk-image:latest . + + +.PHONY: format +format: + docker run --rm -v "${PWD}:/local" -v m2-cache:/root/.m2 maven:3.9.10-amazoncorretto-17-debian-bookworm sh -c "cd /local && mvn spotless:apply" + +.PHONY: auto-test +auto-test: build + docker run --rm java-sdk-image:latest bash /app/auto_test.sh + +.PHONY: before-release-test +before-release-test: build + docker run --rm \ + -e API_KEY="$$API_KEY" \ + -e API_SECRET="$$API_SECRET" \ + -e API_PASSPHRASE="$$API_PASSPHRASE" \ + -e USE_LOCAL="true" \ + java-sdk-image:latest \ + bash /app/release_test.sh + +.PHONY: after-release-test +after-release-test: build + docker run --rm \ + -e API_KEY="$$API_KEY" \ + -e API_SECRET="$$API_SECRET" \ + -e API_PASSPHRASE="$$API_PASSPHRASE" \ + java-sdk-image:latest \ + bash /app/release_test.sh + +.PHONY: run-forever-test +run-forever-test: build + docker rm -f java-run-forever-test + docker run -idt \ + -e API_KEY="$$API_KEY" \ + -e API_SECRET="$$API_SECRET" \ + -e API_PASSPHRASE="$$API_PASSPHRASE" \ + --name java-run-forever-test \ + java-sdk-image:latest \ + bash /app/run_forever_test.sh + +.PHONY: reconnect-test +reconnect-test: build + docker rm -f java-reconnect-test + docker run -idt \ + -e API_KEY="$$API_KEY" \ + -e API_SECRET="$$API_SECRET" \ + -e API_PASSPHRASE="$$API_PASSPHRASE" \ + --name java-reconnect-test --network isolated_net \ + java-sdk-image:latest \ + bash /app/ws_reconnect_test.sh + + +VERSIONS = 7.4 8.0 8.1 8.2 +.PHONY: java-version-test +java-version-test: + @for v in $(VERSIONS); do \ + echo "---- java $$v ----"; \ + docker build --build-arg java_RUNTIME=$$v -t java-sdk-image:$$v . ; \ + docker run --rm \ + -e API_KEY="$$API_KEY" \ + -e API_SECRET="$$API_SECRET" \ + -e API_PASSPHRASE="$$API_PASSPHRASE" \ + -e USE_LOCAL="true" \ + java-sdk-image:$$v bash /app/release_test.sh || exit $$? ; \ + done \ No newline at end of file diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java new file mode 100644 index 00000000..da9f9efa --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java @@ -0,0 +1,6 @@ +package com.kucoin.universal.sdk.generate; + +public class Version { + public final String SDK_VERSION = "0.1.0-alpha"; + public final String SDK_GENERATE_DATE = "2025-07-02"; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.java new file mode 100644 index 00000000..848dd974 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.java @@ -0,0 +1,165 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +public interface AccountApi { + /** + * Get Account Summary Info This endpoint can be used to obtain account summary information. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ + */ + GetAccountInfoResp getAccountInfo(); + + /** + * Get Apikey Info 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. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ + */ + GetApikeyInfoResp getApikeyInfo(); + + /** + * Get Account Type - Spot This interface determines whether the current user is a spot + * high-frequency user or a spot low-frequency user. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 30 | +-----------------------+---------+ + */ + GetSpotAccountTypeResp getSpotAccountType(); + + /** + * Get Account List - Spot 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. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+------------+ + */ + GetSpotAccountListResp getSpotAccountList(GetSpotAccountListReq req); + + /** + * Get Account Detail - Spot Get information for a single spot account. Use this endpoint when you + * know the accountId. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+------------+ + */ + GetSpotAccountDetailResp getSpotAccountDetail(GetSpotAccountDetailReq req); + + /** + * Get Account - Cross Margin Request cross margin account info via this endpoint. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 15 | +-----------------------+---------+ + */ + GetCrossMarginAccountResp getCrossMarginAccount(GetCrossMarginAccountReq req); + + /** + * Get Account - Isolated Margin Request isolated margin account info via this endpoint. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 15 | +-----------------------+---------+ + */ + GetIsolatedMarginAccountResp getIsolatedMarginAccount(GetIsolatedMarginAccountReq req); + + /** + * Get Account - Futures Request futures account info via this endpoint. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + GetFuturesAccountResp getFuturesAccount(GetFuturesAccountReq req); + + /** + * Get Account Ledgers - Spot/Margin 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. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+------------+ + */ + GetSpotLedgerResp getSpotLedger(GetSpotLedgerReq req); + + /** + * Get Account Ledgers - Trade_hf 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetSpotHFLedgerResp getSpotHFLedger(GetSpotHFLedgerReq req); + + /** + * Get Account Ledgers - Margin_hf 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetMarginHFLedgerResp getMarginHFLedger(GetMarginHFLedgerReq req); + + /** + * Get Account Ledgers - Futures This interface can query the ledger records of the futures + * business line. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + GetFuturesLedgerResp getFuturesLedger(GetFuturesLedgerReq req); + + /** + * Get Account Detail - Margin Request margin account info via this endpoint. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 40 | + * +-----------------------+---------+ + */ + GetMarginAccountDetailResp getMarginAccountDetail(); + + /** + * Get Account List - Isolated Margin - V1 Request the isolated margin account info list via this + * endpoint. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 50 | + * +-----------------------+---------+ + */ + GetIsolatedMarginAccountListV1Resp getIsolatedMarginAccountListV1( + GetIsolatedMarginAccountListV1Req req); + + /** + * Get Account Detail - Isolated Margin - V1 Request isolated margin account info via this + * endpoint. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 50 | + * +-----------------------+---------+ + */ + GetIsolatedMarginAccountDetailV1Resp getIsolatedMarginAccountDetailV1( + GetIsolatedMarginAccountDetailV1Req req); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.template new file mode 100644 index 00000000..1352f9d2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.template @@ -0,0 +1,340 @@ + + /** + * getAccountInfo + * Get Account Summary Info + * /api/v2/user-info + */ + public void testGetAccountInfo() { + GetAccountInfoResp resp = this.api.getAccountInfo(); + self::assertNotNull($resp->level); + self::assertNotNull($resp->subQuantity); + self::assertNotNull($resp->spotSubQuantity); + self::assertNotNull($resp->marginSubQuantity); + self::assertNotNull($resp->futuresSubQuantity); + self::assertNotNull($resp->optionSubQuantity); + self::assertNotNull($resp->maxSubQuantity); + self::assertNotNull($resp->maxDefaultSubQuantity); + self::assertNotNull($resp->maxSpotSubQuantity); + self::assertNotNull($resp->maxMarginSubQuantity); + self::assertNotNull($resp->maxFuturesSubQuantity); + self::assertNotNull($resp->maxOptionSubQuantity); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getApikeyInfo + * Get Apikey Info + * /api/v1/user/api-key + */ + public void testGetApikeyInfo() { + GetApikeyInfoResp resp = this.api.getApikeyInfo(); + self::assertNotNull($resp->remark); + self::assertNotNull($resp->apiKey); + self::assertNotNull($resp->apiVersion); + self::assertNotNull($resp->permission); + self::assertNotNull($resp->ipWhitelist); + self::assertNotNull($resp->createdAt); + self::assertNotNull($resp->uid); + self::assertNotNull($resp->isMaster); + self::assertNotNull($resp->subName); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSpotAccountType + * Get Account Type - Spot + * /api/v1/hf/accounts/opened + */ + public void testGetSpotAccountType() { + GetSpotAccountTypeResp resp = this.api.getSpotAccountType(); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSpotAccountList + * Get Account List - Spot + * /api/v1/accounts + */ + public void testGetSpotAccountList() { + GetSpotAccountListReq.GetSpotAccountListReqBuilder builder = GetSpotAccountListReq.builder(); + builder.currency(?).type(?); + GetSpotAccountListReq req = builder.build(); + GetSpotAccountListResp resp = this.api.getSpotAccountList(req); + foreach($resp->data as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->currency); + self::assertNotNull($item->type); + self::assertNotNull($item->balance); + self::assertNotNull($item->available); + self::assertNotNull($item->holds); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSpotAccountDetail + * Get Account Detail - Spot + * /api/v1/accounts/{accountId} + */ + public void testGetSpotAccountDetail() { + GetSpotAccountDetailReq.GetSpotAccountDetailReqBuilder builder = GetSpotAccountDetailReq.builder(); + builder.accountId(?); + GetSpotAccountDetailReq req = builder.build(); + GetSpotAccountDetailResp resp = this.api.getSpotAccountDetail(req); + self::assertNotNull($resp->currency); + self::assertNotNull($resp->balance); + self::assertNotNull($resp->available); + self::assertNotNull($resp->holds); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getCrossMarginAccount + * Get Account - Cross Margin + * /api/v3/margin/accounts + */ + public void testGetCrossMarginAccount() { + GetCrossMarginAccountReq.GetCrossMarginAccountReqBuilder builder = GetCrossMarginAccountReq.builder(); + builder.quoteCurrency(?).queryType(?); + GetCrossMarginAccountReq req = builder.build(); + GetCrossMarginAccountResp resp = this.api.getCrossMarginAccount(req); + self::assertNotNull($resp->totalAssetOfQuoteCurrency); + self::assertNotNull($resp->totalLiabilityOfQuoteCurrency); + self::assertNotNull($resp->debtRatio); + self::assertNotNull($resp->status); + foreach($resp->accounts as $item) { + self::assertNotNull($item->currency); + self::assertNotNull($item->total); + self::assertNotNull($item->available); + self::assertNotNull($item->hold); + self::assertNotNull($item->liability); + self::assertNotNull($item->maxBorrowSize); + self::assertNotNull($item->borrowEnabled); + self::assertNotNull($item->transferInEnabled); + self::assertNotNull($item->liabilityPrincipal); + self::assertNotNull($item->liabilityInterest); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getIsolatedMarginAccount + * Get Account - Isolated Margin + * /api/v3/isolated/accounts + */ + public void testGetIsolatedMarginAccount() { + GetIsolatedMarginAccountReq.GetIsolatedMarginAccountReqBuilder builder = GetIsolatedMarginAccountReq.builder(); + builder.symbol(?).quoteCurrency(?).queryType(?); + GetIsolatedMarginAccountReq req = builder.build(); + GetIsolatedMarginAccountResp resp = this.api.getIsolatedMarginAccount(req); + self::assertNotNull($resp->totalAssetOfQuoteCurrency); + self::assertNotNull($resp->totalLiabilityOfQuoteCurrency); + self::assertNotNull($resp->timestamp); + foreach($resp->assets as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->status); + self::assertNotNull($item->debtRatio); + self::assertNotNull($item->baseAsset); + self::assertNotNull($item->quoteAsset); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getFuturesAccount + * Get Account - Futures + * /api/v1/account-overview + */ + public void testGetFuturesAccount() { + GetFuturesAccountReq.GetFuturesAccountReqBuilder builder = GetFuturesAccountReq.builder(); + builder.currency(?); + GetFuturesAccountReq req = builder.build(); + GetFuturesAccountResp resp = this.api.getFuturesAccount(req); + self::assertNotNull($resp->accountEquity); + self::assertNotNull($resp->unrealisedPNL); + self::assertNotNull($resp->marginBalance); + self::assertNotNull($resp->positionMargin); + self::assertNotNull($resp->orderMargin); + self::assertNotNull($resp->frozenFunds); + self::assertNotNull($resp->availableBalance); + self::assertNotNull($resp->currency); + self::assertNotNull($resp->riskRatio); + self::assertNotNull($resp->maxWithdrawAmount); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSpotLedger + * Get Account Ledgers - Spot/Margin + * /api/v1/accounts/ledgers + */ + public void testGetSpotLedger() { + GetSpotLedgerReq.GetSpotLedgerReqBuilder builder = GetSpotLedgerReq.builder(); + builder.currency(?).direction(?).bizType(?).startAt(?).endAt(?).currentPage(?).pageSize(?); + GetSpotLedgerReq req = builder.build(); + GetSpotLedgerResp resp = this.api.getSpotLedger(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->currency); + self::assertNotNull($item->amount); + self::assertNotNull($item->fee); + self::assertNotNull($item->balance); + self::assertNotNull($item->accountType); + self::assertNotNull($item->bizType); + self::assertNotNull($item->direction); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->context); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSpotHFLedger + * Get Account Ledgers - Trade_hf + * /api/v1/hf/accounts/ledgers + */ + public void testGetSpotHFLedger() { + GetSpotHFLedgerReq.GetSpotHFLedgerReqBuilder builder = GetSpotHFLedgerReq.builder(); + builder.currency(?).direction(?).bizType(?).lastId(?).limit(?).startAt(?).endAt(?); + GetSpotHFLedgerReq req = builder.build(); + GetSpotHFLedgerResp resp = this.api.getSpotHFLedger(req); + foreach($resp->data as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->currency); + self::assertNotNull($item->amount); + self::assertNotNull($item->fee); + self::assertNotNull($item->tax); + self::assertNotNull($item->balance); + self::assertNotNull($item->accountType); + self::assertNotNull($item->bizType); + self::assertNotNull($item->direction); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->context); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getMarginHFLedger + * Get Account Ledgers - Margin_hf + * /api/v3/hf/margin/account/ledgers + */ + public void testGetMarginHFLedger() { + GetMarginHFLedgerReq.GetMarginHFLedgerReqBuilder builder = GetMarginHFLedgerReq.builder(); + builder.currency(?).direction(?).bizType(?).lastId(?).limit(?).startAt(?).endAt(?); + GetMarginHFLedgerReq req = builder.build(); + GetMarginHFLedgerResp resp = this.api.getMarginHFLedger(req); + foreach($resp->data as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->currency); + self::assertNotNull($item->amount); + self::assertNotNull($item->fee); + self::assertNotNull($item->balance); + self::assertNotNull($item->accountType); + self::assertNotNull($item->bizType); + self::assertNotNull($item->direction); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->context); + self::assertNotNull($item->tax); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getFuturesLedger + * Get Account Ledgers - Futures + * /api/v1/transaction-history + */ + public void testGetFuturesLedger() { + GetFuturesLedgerReq.GetFuturesLedgerReqBuilder builder = GetFuturesLedgerReq.builder(); + builder.currency(?).type(?).offset(?).forward(?).maxCount(?).startAt(?).endAt(?); + GetFuturesLedgerReq req = builder.build(); + GetFuturesLedgerResp resp = this.api.getFuturesLedger(req); + foreach($resp->dataList as $item) { + self::assertNotNull($item->time); + self::assertNotNull($item->type); + self::assertNotNull($item->amount); + self::assertNotNull($item->fee); + self::assertNotNull($item->accountEquity); + self::assertNotNull($item->status); + self::assertNotNull($item->remark); + self::assertNotNull($item->offset); + self::assertNotNull($item->currency); + } + + self::assertNotNull($resp->hasMore); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getMarginAccountDetail + * Get Account Detail - Margin + * /api/v1/margin/account + */ + public void testGetMarginAccountDetail() { + GetMarginAccountDetailResp resp = this.api.getMarginAccountDetail(); + self::assertNotNull($resp->debtRatio); + foreach($resp->accounts as $item) { + self::assertNotNull($item->currency); + self::assertNotNull($item->totalBalance); + self::assertNotNull($item->availableBalance); + self::assertNotNull($item->holdBalance); + self::assertNotNull($item->liability); + self::assertNotNull($item->maxBorrowSize); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getIsolatedMarginAccountListV1 + * Get Account List - Isolated Margin - V1 + * /api/v1/isolated/accounts + */ + public void testGetIsolatedMarginAccountListV1() { + GetIsolatedMarginAccountListV1Req.GetIsolatedMarginAccountListV1ReqBuilder builder = GetIsolatedMarginAccountListV1Req.builder(); + builder.balanceCurrency(?); + GetIsolatedMarginAccountListV1Req req = builder.build(); + GetIsolatedMarginAccountListV1Resp resp = this.api.getIsolatedMarginAccountListV1(req); + self::assertNotNull($resp->totalConversionBalance); + self::assertNotNull($resp->liabilityConversionBalance); + foreach($resp->assets as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->status); + self::assertNotNull($item->debtRatio); + self::assertNotNull($item->baseAsset); + self::assertNotNull($item->quoteAsset); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getIsolatedMarginAccountDetailV1 + * Get Account Detail - Isolated Margin - V1 + * /api/v1/isolated/account/{symbol} + */ + public void testGetIsolatedMarginAccountDetailV1() { + GetIsolatedMarginAccountDetailV1Req.GetIsolatedMarginAccountDetailV1ReqBuilder builder = GetIsolatedMarginAccountDetailV1Req.builder(); + builder.symbol(?); + GetIsolatedMarginAccountDetailV1Req req = builder.build(); + GetIsolatedMarginAccountDetailV1Resp resp = this.api.getIsolatedMarginAccountDetailV1(req); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->status); + self::assertNotNull($resp->debtRatio); + self::assertNotNull($resp->baseAsset); + self::assertNotNull($resp->quoteAsset); + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiAutoGeneratedTest.java new file mode 100644 index 00000000..36e5cf54 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiAutoGeneratedTest.java @@ -0,0 +1,615 @@ +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class AccountApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** getAccountInfo Request Get Account Summary Info /api/v2/user-info */ + public static void testGetAccountInfoRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getAccountInfo Response Get Account Summary Info /api/v2/user-info */ + public static void testGetAccountInfoResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"level\": 0,\n" + + " \"subQuantity\": 3,\n" + + " \"spotSubQuantity\": 3,\n" + + " \"marginSubQuantity\": 2,\n" + + " \"futuresSubQuantity\": 2,\n" + + " \"optionSubQuantity\": 0,\n" + + " \"maxSubQuantity\": 5,\n" + + " \"maxDefaultSubQuantity\": 5,\n" + + " \"maxSpotSubQuantity\": 0,\n" + + " \"maxMarginSubQuantity\": 0,\n" + + " \"maxFuturesSubQuantity\": 0,\n" + + " \"maxOptionSubQuantity\": 0\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getApikeyInfo Request Get Apikey Info /api/v1/user/api-key */ + public static void testGetApikeyInfoRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getApikeyInfo Response Get Apikey Info /api/v1/user/api-key */ + public static void testGetApikeyInfoResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"remark\": \"account1\",\n" + + " \"apiKey\": \"6705f5c311545b000157d3eb\",\n" + + " \"apiVersion\": 3,\n" + + " \"permission\":" + + " \"General,Futures,Spot,Earn,InnerTransfer,Transfer,Margin\",\n" + + " \"ipWhitelist\": \"203.**.154,103.**.34\",\n" + + " \"createdAt\": 1728443843000,\n" + + " \"uid\": 165111215,\n" + + " \"isMaster\": true\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getSpotAccountType Request Get Account Type - Spot /api/v1/hf/accounts/opened */ + public static void testGetSpotAccountTypeRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getSpotAccountType Response Get Account Type - Spot /api/v1/hf/accounts/opened */ + public static void testGetSpotAccountTypeResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":false}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getSpotAccountList Request Get Account List - Spot /api/v1/accounts */ + public static void testGetSpotAccountListRequest() throws Exception { + String data = "{\"currency\": \"USDT\", \"type\": \"main\"}"; + GetSpotAccountListReq obj = mapper.readValue(data, GetSpotAccountListReq.class); + } + + /** getSpotAccountList Response Get Account List - Spot /api/v1/accounts */ + public static void testGetSpotAccountListResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"548674591753\",\n" + + " \"currency\": \"USDT\",\n" + + " \"type\": \"trade\",\n" + + " \"balance\": \"26.66759503\",\n" + + " \"available\": \"26.66759503\",\n" + + " \"holds\": \"0\"\n" + + " },\n" + + " {\n" + + " \"id\": \"63355cd156298d0001b66e61\",\n" + + " \"currency\": \"USDT\",\n" + + " \"type\": \"main\",\n" + + " \"balance\": \"0.01\",\n" + + " \"available\": \"0.01\",\n" + + " \"holds\": \"0\"\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getSpotAccountDetail Request Get Account Detail - Spot /api/v1/accounts/{accountId} */ + public static void testGetSpotAccountDetailRequest() throws Exception { + String data = "{\"accountId\": \"548674591753\"}"; + GetSpotAccountDetailReq obj = mapper.readValue(data, GetSpotAccountDetailReq.class); + } + + /** getSpotAccountDetail Response Get Account Detail - Spot /api/v1/accounts/{accountId} */ + public static void testGetSpotAccountDetailResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"currency\":\"USDT\",\"balance\":\"26.66759503\",\"available\":\"26.66759503\",\"holds\":\"0\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getCrossMarginAccount Request Get Account - Cross Margin /api/v3/margin/accounts */ + public static void testGetCrossMarginAccountRequest() throws Exception { + String data = "{\"quoteCurrency\": \"USDT\", \"queryType\": \"MARGIN\"}"; + GetCrossMarginAccountReq obj = mapper.readValue(data, GetCrossMarginAccountReq.class); + } + + /** getCrossMarginAccount Response Get Account - Cross Margin /api/v3/margin/accounts */ + public static void testGetCrossMarginAccountResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"totalAssetOfQuoteCurrency\": \"40.8648372\",\n" + + " \"totalLiabilityOfQuoteCurrency\": \"0\",\n" + + " \"debtRatio\": \"0\",\n" + + " \"status\": \"EFFECTIVE\",\n" + + " \"accounts\": [\n" + + " {\n" + + " \"currency\": \"USDT\",\n" + + " \"total\": \"38.68855864\",\n" + + " \"available\": \"20.01916691\",\n" + + " \"hold\": \"18.66939173\",\n" + + " \"liability\": \"0\",\n" + + " \"liabilityPrincipal\": \"0\",\n" + + " \"liabilityInterest\": \"0\",\n" + + " \"maxBorrowSize\": \"163\",\n" + + " \"borrowEnabled\": true,\n" + + " \"transferInEnabled\": true\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getIsolatedMarginAccount Request Get Account - Isolated Margin /api/v3/isolated/accounts */ + public static void testGetIsolatedMarginAccountRequest() throws Exception { + String data = + "{\"symbol\": \"BTC-USDT\", \"quoteCurrency\": \"USDT\", \"queryType\": \"ISOLATED\"}"; + GetIsolatedMarginAccountReq obj = mapper.readValue(data, GetIsolatedMarginAccountReq.class); + } + + /** getIsolatedMarginAccount Response Get Account - Isolated Margin /api/v3/isolated/accounts */ + public static void testGetIsolatedMarginAccountResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"totalAssetOfQuoteCurrency\": \"4.97047372\",\n" + + " \"totalLiabilityOfQuoteCurrency\": \"0.00038891\",\n" + + " \"timestamp\": 1747303659773,\n" + + " \"assets\": [\n" + + " {\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"status\": \"EFFECTIVE\",\n" + + " \"debtRatio\": \"0\",\n" + + " \"baseAsset\": {\n" + + " \"currency\": \"BTC\",\n" + + " \"borrowEnabled\": true,\n" + + " \"transferInEnabled\": true,\n" + + " \"liability\": \"0\",\n" + + " \"liabilityPrincipal\": \"0\",\n" + + " \"liabilityInterest\": \"0\",\n" + + " \"total\": \"0\",\n" + + " \"available\": \"0\",\n" + + " \"hold\": \"0\",\n" + + " \"maxBorrowSize\": \"0\"\n" + + " },\n" + + " \"quoteAsset\": {\n" + + " \"currency\": \"USDT\",\n" + + " \"borrowEnabled\": true,\n" + + " \"transferInEnabled\": true,\n" + + " \"liability\": \"0.00038891\",\n" + + " \"liabilityPrincipal\": \"0.00038888\",\n" + + " \"liabilityInterest\": \"0.00000003\",\n" + + " \"total\": \"4.97047372\",\n" + + " \"available\": \"4.97047372\",\n" + + " \"hold\": \"0\",\n" + + " \"maxBorrowSize\": \"44\"\n" + + " }\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getFuturesAccount Request Get Account - Futures /api/v1/account-overview */ + public static void testGetFuturesAccountRequest() throws Exception { + String data = "{\"currency\": \"USDT\"}"; + GetFuturesAccountReq obj = mapper.readValue(data, GetFuturesAccountReq.class); + } + + /** getFuturesAccount Response Get Account - Futures /api/v1/account-overview */ + public static void testGetFuturesAccountResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getSpotLedger Request Get Account Ledgers - Spot/Margin /api/v1/accounts/ledgers */ + public static void testGetSpotLedgerRequest() throws Exception { + String data = + "{\"currency\": \"BTC\", \"direction\": \"in\", \"bizType\": \"TRANSFER\", \"startAt\":" + + " 1728663338000, \"endAt\": 1728692138000, \"currentPage\": 1, \"pageSize\": 50}"; + GetSpotLedgerReq obj = mapper.readValue(data, GetSpotLedgerReq.class); + } + + /** getSpotLedger Response Get Account Ledgers - Spot/Margin /api/v1/accounts/ledgers */ + public static void testGetSpotLedgerResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 1,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"id\": \"265329987780896\",\n" + + " \"currency\": \"USDT\",\n" + + " \"amount\": \"0.01\",\n" + + " \"fee\": \"0\",\n" + + " \"balance\": \"0\",\n" + + " \"accountType\": \"TRADE\",\n" + + " \"bizType\": \"SUB_TRANSFER\",\n" + + " \"direction\": \"out\",\n" + + " \"createdAt\": 1728658481484,\n" + + " \"context\": \"\"\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getSpotHFLedger Request Get Account Ledgers - Trade_hf /api/v1/hf/accounts/ledgers */ + public static void testGetSpotHFLedgerRequest() throws Exception { + String data = + "{\"currency\": \"BTC\", \"direction\": \"in\", \"bizType\": \"TRANSFER\", \"lastId\":" + + " 254062248624417, \"limit\": 100, \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000}"; + GetSpotHFLedgerReq obj = mapper.readValue(data, GetSpotHFLedgerReq.class); + } + + /** getSpotHFLedger Response Get Account Ledgers - Trade_hf /api/v1/hf/accounts/ledgers */ + public static void testGetSpotHFLedgerResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"254062248624417\",\n" + + " \"currency\": \"USDT\",\n" + + " \"amount\": \"1.59760080\",\n" + + " \"fee\": \"0.00159920\",\n" + + " \"tax\": \"0\",\n" + + " \"balance\": \"26.73759503\",\n" + + " \"accountType\": \"TRADE_HF\",\n" + + " \"bizType\": \"TRADE_EXCHANGE\",\n" + + " \"direction\": \"in\",\n" + + " \"createdAt\": \"1728443957539\",\n" + + " \"context\":" + + " \"{\\\"symbol\\\":\\\"KCS-USDT\\\",\\\"orderId\\\":\\\"6705f6350dc7210007d6a36d\\\",\\\"tradeId\\\":\\\"10046097631627265\\\"}\"\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getMarginHFLedger Request Get Account Ledgers - Margin_hf /api/v3/hf/margin/account/ledgers */ + public static void testGetMarginHFLedgerRequest() throws Exception { + String data = + "{\"currency\": \"BTC\", \"direction\": \"in\", \"bizType\": \"TRANSFER\", \"lastId\":" + + " 254062248624417, \"limit\": 100, \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000}"; + GetMarginHFLedgerReq obj = mapper.readValue(data, GetMarginHFLedgerReq.class); + } + + /** + * getMarginHFLedger Response Get Account Ledgers - Margin_hf /api/v3/hf/margin/account/ledgers + */ + public static void testGetMarginHFLedgerResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":[{\"id\":1949641706720,\"currency\":\"USDT\",\"amount\":\"0.01000000\",\"fee\":\"0.00000000\",\"balance\":\"0.01000000\",\"accountType\":\"MARGIN_V2\",\"bizType\":\"TRANSFER\",\"direction\":\"in\",\"createdAt\":1728664091208,\"context\":\"{}\",\"tax\":\"0.00000000\"}]}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getFuturesLedger Request Get Account Ledgers - Futures /api/v1/transaction-history */ + public static void testGetFuturesLedgerRequest() throws Exception { + String data = + "{\"currency\": \"XBT\", \"type\": \"Transferin\", \"offset\": 254062248624417," + + " \"forward\": true, \"maxCount\": 50, \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000}"; + GetFuturesLedgerReq obj = mapper.readValue(data, GetFuturesLedgerReq.class); + } + + /** getFuturesLedger Response Get Account Ledgers - Futures /api/v1/transaction-history */ + public static void testGetFuturesLedgerResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"dataList\": [\n" + + " {\n" + + " \"time\": 1728665747000,\n" + + " \"type\": \"TransferIn\",\n" + + " \"amount\": 0.01,\n" + + " \"fee\": 0.0,\n" + + " \"accountEquity\": 14.02924938,\n" + + " \"status\": \"Completed\",\n" + + " \"remark\": \"Transferred from High-Frequency Trading Account\",\n" + + " \"offset\": 51360793,\n" + + " \"currency\": \"USDT\"\n" + + " },\n" + + " {\n" + + " \"time\": 1728648000000,\n" + + " \"type\": \"RealisedPNL\",\n" + + " \"amount\": 0.00630042,\n" + + " \"fee\": 0.0,\n" + + " \"accountEquity\": 20.0,\n" + + " \"status\": \"Completed\",\n" + + " \"remark\": \"XBTUSDTM\",\n" + + " \"offset\": 51352430,\n" + + " \"currency\": \"USDT\"\n" + + " }\n" + + " ],\n" + + " \"hasMore\": false\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getMarginAccountDetail Request Get Account Detail - Margin /api/v1/margin/account */ + public static void testGetMarginAccountDetailRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getMarginAccountDetail Response Get Account Detail - Margin /api/v1/margin/account */ + public static void testGetMarginAccountDetailResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"debtRatio\": \"0\",\n" + + " \"accounts\": [\n" + + " {\n" + + " \"currency\": \"USDT\",\n" + + " \"totalBalance\": \"0.03\",\n" + + " \"availableBalance\": \"0.02\",\n" + + " \"holdBalance\": \"0.01\",\n" + + " \"liability\": \"0\",\n" + + " \"maxBorrowSize\": \"0\"\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * getIsolatedMarginAccountListV1 Request Get Account List - Isolated Margin - V1 + * /api/v1/isolated/accounts + */ + public static void testGetIsolatedMarginAccountListV1Request() throws Exception { + String data = "{\"balanceCurrency\": \"USDT\"}"; + GetIsolatedMarginAccountListV1Req obj = + mapper.readValue(data, GetIsolatedMarginAccountListV1Req.class); + } + + /** + * getIsolatedMarginAccountListV1 Response Get Account List - Isolated Margin - V1 + * /api/v1/isolated/accounts + */ + public static void testGetIsolatedMarginAccountListV1Response() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"totalConversionBalance\": \"0.01\",\n" + + " \"liabilityConversionBalance\": \"0\",\n" + + " \"assets\": [\n" + + " {\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"status\": \"CLEAR\",\n" + + " \"debtRatio\": \"0\",\n" + + " \"baseAsset\": {\n" + + " \"currency\": \"BTC\",\n" + + " \"totalBalance\": \"0\",\n" + + " \"holdBalance\": \"0\",\n" + + " \"availableBalance\": \"0\",\n" + + " \"liability\": \"0\",\n" + + " \"interest\": \"0\",\n" + + " \"borrowableAmount\": \"0\"\n" + + " },\n" + + " \"quoteAsset\": {\n" + + " \"currency\": \"USDT\",\n" + + " \"totalBalance\": \"0.01\",\n" + + " \"holdBalance\": \"0\",\n" + + " \"availableBalance\": \"0.01\",\n" + + " \"liability\": \"0\",\n" + + " \"interest\": \"0\",\n" + + " \"borrowableAmount\": \"0\"\n" + + " }\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue( + data, new TypeReference>() {}); + } + + /** + * getIsolatedMarginAccountDetailV1 Request Get Account Detail - Isolated Margin - V1 + * /api/v1/isolated/account/{symbol} + */ + public static void testGetIsolatedMarginAccountDetailV1Request() throws Exception { + String data = "{\"symbol\": \"example_string_default_value\"}"; + GetIsolatedMarginAccountDetailV1Req obj = + mapper.readValue(data, GetIsolatedMarginAccountDetailV1Req.class); + } + + /** + * getIsolatedMarginAccountDetailV1 Response Get Account Detail - Isolated Margin - V1 + * /api/v1/isolated/account/{symbol} + */ + public static void testGetIsolatedMarginAccountDetailV1Response() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"status\": \"CLEAR\",\n" + + " \"debtRatio\": \"0\",\n" + + " \"baseAsset\": {\n" + + " \"currency\": \"BTC\",\n" + + " \"totalBalance\": \"0\",\n" + + " \"holdBalance\": \"0\",\n" + + " \"availableBalance\": \"0\",\n" + + " \"liability\": \"0\",\n" + + " \"interest\": \"0\",\n" + + " \"borrowableAmount\": \"0\"\n" + + " },\n" + + " \"quoteAsset\": {\n" + + " \"currency\": \"USDT\",\n" + + " \"totalBalance\": \"0.01\",\n" + + " \"holdBalance\": \"0\",\n" + + " \"availableBalance\": \"0.01\",\n" + + " \"liability\": \"0\",\n" + + " \"interest\": \"0\",\n" + + " \"borrowableAmount\": \"0\"\n" + + " }\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue( + data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(AccountApiAutoGeneratedTest::testGetAccountInfoRequest, "testGetAccountInfoRequest"); + run(AccountApiAutoGeneratedTest::testGetAccountInfoResponse, "testGetAccountInfoResponse"); + run(AccountApiAutoGeneratedTest::testGetApikeyInfoRequest, "testGetApikeyInfoRequest"); + run(AccountApiAutoGeneratedTest::testGetApikeyInfoResponse, "testGetApikeyInfoResponse"); + run( + AccountApiAutoGeneratedTest::testGetSpotAccountTypeRequest, + "testGetSpotAccountTypeRequest"); + run( + AccountApiAutoGeneratedTest::testGetSpotAccountTypeResponse, + "testGetSpotAccountTypeResponse"); + run( + AccountApiAutoGeneratedTest::testGetSpotAccountListRequest, + "testGetSpotAccountListRequest"); + run( + AccountApiAutoGeneratedTest::testGetSpotAccountListResponse, + "testGetSpotAccountListResponse"); + run( + AccountApiAutoGeneratedTest::testGetSpotAccountDetailRequest, + "testGetSpotAccountDetailRequest"); + run( + AccountApiAutoGeneratedTest::testGetSpotAccountDetailResponse, + "testGetSpotAccountDetailResponse"); + run( + AccountApiAutoGeneratedTest::testGetCrossMarginAccountRequest, + "testGetCrossMarginAccountRequest"); + run( + AccountApiAutoGeneratedTest::testGetCrossMarginAccountResponse, + "testGetCrossMarginAccountResponse"); + run( + AccountApiAutoGeneratedTest::testGetIsolatedMarginAccountRequest, + "testGetIsolatedMarginAccountRequest"); + run( + AccountApiAutoGeneratedTest::testGetIsolatedMarginAccountResponse, + "testGetIsolatedMarginAccountResponse"); + run(AccountApiAutoGeneratedTest::testGetFuturesAccountRequest, "testGetFuturesAccountRequest"); + run( + AccountApiAutoGeneratedTest::testGetFuturesAccountResponse, + "testGetFuturesAccountResponse"); + run(AccountApiAutoGeneratedTest::testGetSpotLedgerRequest, "testGetSpotLedgerRequest"); + run(AccountApiAutoGeneratedTest::testGetSpotLedgerResponse, "testGetSpotLedgerResponse"); + run(AccountApiAutoGeneratedTest::testGetSpotHFLedgerRequest, "testGetSpotHFLedgerRequest"); + run(AccountApiAutoGeneratedTest::testGetSpotHFLedgerResponse, "testGetSpotHFLedgerResponse"); + run(AccountApiAutoGeneratedTest::testGetMarginHFLedgerRequest, "testGetMarginHFLedgerRequest"); + run( + AccountApiAutoGeneratedTest::testGetMarginHFLedgerResponse, + "testGetMarginHFLedgerResponse"); + run(AccountApiAutoGeneratedTest::testGetFuturesLedgerRequest, "testGetFuturesLedgerRequest"); + run(AccountApiAutoGeneratedTest::testGetFuturesLedgerResponse, "testGetFuturesLedgerResponse"); + run( + AccountApiAutoGeneratedTest::testGetMarginAccountDetailRequest, + "testGetMarginAccountDetailRequest"); + run( + AccountApiAutoGeneratedTest::testGetMarginAccountDetailResponse, + "testGetMarginAccountDetailResponse"); + run( + AccountApiAutoGeneratedTest::testGetIsolatedMarginAccountListV1Request, + "testGetIsolatedMarginAccountListV1Request"); + run( + AccountApiAutoGeneratedTest::testGetIsolatedMarginAccountListV1Response, + "testGetIsolatedMarginAccountListV1Response"); + run( + AccountApiAutoGeneratedTest::testGetIsolatedMarginAccountDetailV1Request, + "testGetIsolatedMarginAccountDetailV1Request"); + run( + AccountApiAutoGeneratedTest::testGetIsolatedMarginAccountDetailV1Response, + "testGetIsolatedMarginAccountDetailV1Response"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiImpl.java new file mode 100644 index 00000000..b48705b7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiImpl.java @@ -0,0 +1,150 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class AccountApiImpl implements AccountApi { + private final Transport transport; + + public AccountApiImpl(Transport transport) { + this.transport = transport; + } + + public GetAccountInfoResp getAccountInfo() { + return this.transport.call( + "spot", false, "GET", "/api/v2/user-info", null, GetAccountInfoResp.class, false); + } + + public GetApikeyInfoResp getApikeyInfo() { + return this.transport.call( + "spot", false, "GET", "/api/v1/user/api-key", null, GetApikeyInfoResp.class, false); + } + + public GetSpotAccountTypeResp getSpotAccountType() { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/hf/accounts/opened", + null, + GetSpotAccountTypeResp.class, + false); + } + + public GetSpotAccountListResp getSpotAccountList(GetSpotAccountListReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v1/accounts", req, GetSpotAccountListResp.class, false); + } + + public GetSpotAccountDetailResp getSpotAccountDetail(GetSpotAccountDetailReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/accounts/{accountId}", + req, + GetSpotAccountDetailResp.class, + false); + } + + public GetCrossMarginAccountResp getCrossMarginAccount(GetCrossMarginAccountReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v3/margin/accounts", + req, + GetCrossMarginAccountResp.class, + false); + } + + public GetIsolatedMarginAccountResp getIsolatedMarginAccount(GetIsolatedMarginAccountReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v3/isolated/accounts", + req, + GetIsolatedMarginAccountResp.class, + false); + } + + public GetFuturesAccountResp getFuturesAccount(GetFuturesAccountReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/account-overview", + req, + GetFuturesAccountResp.class, + false); + } + + public GetSpotLedgerResp getSpotLedger(GetSpotLedgerReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v1/accounts/ledgers", req, GetSpotLedgerResp.class, false); + } + + public GetSpotHFLedgerResp getSpotHFLedger(GetSpotHFLedgerReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v1/hf/accounts/ledgers", req, GetSpotHFLedgerResp.class, false); + } + + public GetMarginHFLedgerResp getMarginHFLedger(GetMarginHFLedgerReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v3/hf/margin/account/ledgers", + req, + GetMarginHFLedgerResp.class, + false); + } + + public GetFuturesLedgerResp getFuturesLedger(GetFuturesLedgerReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/transaction-history", + req, + GetFuturesLedgerResp.class, + false); + } + + public GetMarginAccountDetailResp getMarginAccountDetail() { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/margin/account", + null, + GetMarginAccountDetailResp.class, + false); + } + + public GetIsolatedMarginAccountListV1Resp getIsolatedMarginAccountListV1( + GetIsolatedMarginAccountListV1Req req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/isolated/accounts", + req, + GetIsolatedMarginAccountListV1Resp.class, + false); + } + + public GetIsolatedMarginAccountDetailV1Resp getIsolatedMarginAccountDetailV1( + GetIsolatedMarginAccountDetailV1Req req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/isolated/account/{symbol}", + req, + GetIsolatedMarginAccountDetailV1Resp.class, + false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetAccountInfoResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetAccountInfoResp.java new file mode 100644 index 00000000..1413d151 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetAccountInfoResp.java @@ -0,0 +1,75 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAccountInfoResp + implements Response> { + /** User VIP level */ + @JsonProperty("level") + private Integer level; + + /** Number of sub-accounts */ + @JsonProperty("subQuantity") + private Integer subQuantity; + + /** Number of sub-accounts with spot trading permissions enabled */ + @JsonProperty("spotSubQuantity") + private Integer spotSubQuantity; + + /** Number of sub-accounts with margin trading permissions enabled */ + @JsonProperty("marginSubQuantity") + private Integer marginSubQuantity; + + /** Number of sub-accounts with futures trading permissions enabled */ + @JsonProperty("futuresSubQuantity") + private Integer futuresSubQuantity; + + /** Number of sub-accounts with option trading permissions enabled */ + @JsonProperty("optionSubQuantity") + private Integer optionSubQuantity; + + /** Max. number of sub-accounts = maxDefaultSubQuantity + maxSpotSubQuantity */ + @JsonProperty("maxSubQuantity") + private Integer maxSubQuantity; + + /** Max. number of default open sub-accounts (according to VIP level) */ + @JsonProperty("maxDefaultSubQuantity") + private Integer maxDefaultSubQuantity; + + /** Max. number of sub-accounts with additional spot trading permissions */ + @JsonProperty("maxSpotSubQuantity") + private Integer maxSpotSubQuantity; + + /** Max. number of sub-accounts with additional margin trading permissions */ + @JsonProperty("maxMarginSubQuantity") + private Integer maxMarginSubQuantity; + + /** Max. number of sub-accounts with additional futures trading permissions */ + @JsonProperty("maxFuturesSubQuantity") + private Integer maxFuturesSubQuantity; + + /** Max. number of sub-accounts with additional option trading permissions */ + @JsonProperty("maxOptionSubQuantity") + private Integer maxOptionSubQuantity; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetApikeyInfoResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetApikeyInfoResp.java new file mode 100644 index 00000000..8157d40d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetApikeyInfoResp.java @@ -0,0 +1,66 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetApikeyInfoResp + implements Response> { + /** Remarks */ + @JsonProperty("remark") + private String remark; + + /** Apikey */ + @JsonProperty("apiKey") + private String apiKey; + + /** API Version */ + @JsonProperty("apiVersion") + private Integer apiVersion; + + /** + * [Permissions](https://www.kucoin.com/docs-new/doc-338144), possible values: General, Spot, + * Margin, Futures, InnerTransfer, Transfer, Earn + */ + @JsonProperty("permission") + private String permission; + + /** IP whitelist */ + @JsonProperty("ipWhitelist") + private String ipWhitelist; + + /** Apikey create time */ + @JsonProperty("createdAt") + private Long createdAt; + + /** Account UID */ + @JsonProperty("uid") + private Integer uid; + + /** Whether it is the master account. */ + @JsonProperty("isMaster") + private Boolean isMaster; + + /** Sub Name, There is no such param for the master account */ + @JsonProperty("subName") + private String subName; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetCrossMarginAccountAccounts.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetCrossMarginAccountAccounts.java new file mode 100644 index 00000000..7fc834bb --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetCrossMarginAccountAccounts.java @@ -0,0 +1,55 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCrossMarginAccountAccounts { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Total Assets */ + @JsonProperty("total") + private String total; + + /** Account available assets (total assets - frozen) */ + @JsonProperty("available") + private String available; + + /** Account frozen assets */ + @JsonProperty("hold") + private String hold; + + /** Liabilities */ + @JsonProperty("liability") + private String liability; + + /** The user's remaining maximum loan amount */ + @JsonProperty("maxBorrowSize") + private String maxBorrowSize; + + /** Support borrow or not */ + @JsonProperty("borrowEnabled") + private Boolean borrowEnabled; + + /** Support transfer or not */ + @JsonProperty("transferInEnabled") + private Boolean transferInEnabled; + + /** Outstanding principal – the unpaid loan amount */ + @JsonProperty("liabilityPrincipal") + private String liabilityPrincipal; + + /** Accrued interest – the unpaid interest amount */ + @JsonProperty("liabilityInterest") + private String liabilityInterest; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetCrossMarginAccountReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetCrossMarginAccountReq.java new file mode 100644 index 00000000..ed7c0f7e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetCrossMarginAccountReq.java @@ -0,0 +1,104 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCrossMarginAccountReq implements Request { + /** quote currency, currently only supports USDT, KCS, BTC, USDT as default */ + @JsonProperty("quoteCurrency") + @Builder.Default + private QuoteCurrencyEnum quoteCurrency = QuoteCurrencyEnum.USDT; + + /** + * Query account type (default MARGIN), MARGIN - only query low frequency cross margin account, + * MARGIN_V2-only query high frequency cross margin account, ALL - consistent aggregate query with + * the web side + */ + @JsonProperty("queryType") + @Builder.Default + private QueryTypeEnum queryType = QueryTypeEnum.MARGIN; + + public enum QuoteCurrencyEnum { + /** */ + USDT("USDT"), + /** */ + KCS("KCS"), + /** */ + BTC("BTC"); + + private final String value; + + QuoteCurrencyEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static QuoteCurrencyEnum fromValue(String value) { + for (QuoteCurrencyEnum b : QuoteCurrencyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum QueryTypeEnum { + /** */ + MARGIN("MARGIN"), + /** */ + MARGIN_V2("MARGIN_V2"), + /** */ + ALL("ALL"); + + private final String value; + + QueryTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static QueryTypeEnum fromValue(String value) { + for (QueryTypeEnum b : QueryTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetCrossMarginAccountResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetCrossMarginAccountResp.java new file mode 100644 index 00000000..f2c29f1c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetCrossMarginAccountResp.java @@ -0,0 +1,52 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCrossMarginAccountResp + implements Response> { + /** Total Assets in Quote Currency */ + @JsonProperty("totalAssetOfQuoteCurrency") + private String totalAssetOfQuoteCurrency; + + /** Total Liability in Quote Currency */ + @JsonProperty("totalLiabilityOfQuoteCurrency") + private String totalLiabilityOfQuoteCurrency; + + /** debt ratio */ + @JsonProperty("debtRatio") + private String debtRatio; + + /** + * Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, + * REPAY-repayment, BORROW-borrowing + */ + @JsonProperty("status") + private String status; + + /** Margin account list */ + @JsonProperty("accounts") + private List accounts = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesAccountReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesAccountReq.java new file mode 100644 index 00000000..4433edd3 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesAccountReq.java @@ -0,0 +1,23 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFuturesAccountReq implements Request { + /** Currency, Default XBT */ + @JsonProperty("currency") + @Builder.Default + private String currency = "XBT"; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesAccountResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesAccountResp.java new file mode 100644 index 00000000..0cd81723 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesAccountResp.java @@ -0,0 +1,69 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFuturesAccountResp + implements Response> { + /** Account equity = marginBalance + unrealizedPNL */ + @JsonProperty("accountEquity") + private Double accountEquity; + + /** Unrealized profit and loss */ + @JsonProperty("unrealisedPNL") + private Double unrealisedPNL; + + /** + * Margin balance = positionMargin + orderMargin + frozenFunds + availableBalance - unrealizedPNL + */ + @JsonProperty("marginBalance") + private Double marginBalance; + + /** Position margin */ + @JsonProperty("positionMargin") + private Double positionMargin; + + /** Order margin */ + @JsonProperty("orderMargin") + private Double orderMargin; + + /** Frozen funds for out-transfer */ + @JsonProperty("frozenFunds") + private Double frozenFunds; + + /** Available balance */ + @JsonProperty("availableBalance") + private Double availableBalance; + + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Cross margin risk rate */ + @JsonProperty("riskRatio") + private Double riskRatio; + + /** Maximum amount that can be withdrawn/transferred. */ + @JsonProperty("maxWithdrawAmount") + private Double maxWithdrawAmount; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesLedgerDataList.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesLedgerDataList.java new file mode 100644 index 00000000..d6038160 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesLedgerDataList.java @@ -0,0 +1,51 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFuturesLedgerDataList { + /** Ledger time */ + @JsonProperty("time") + private Long time; + + /** Type: RealisedPNL, Deposit, Withdrawal, TransferIn, TransferOut */ + @JsonProperty("type") + private String type; + + /** Transaction amount */ + @JsonProperty("amount") + private Double amount; + + /** Fee */ + @JsonProperty("fee") + private Double fee; + + /** Account equity */ + @JsonProperty("accountEquity") + private Double accountEquity; + + /** Status: Completed, Pending */ + @JsonProperty("status") + private String status; + + /** Ticker symbol of the contract */ + @JsonProperty("remark") + private String remark; + + /** Offset */ + @JsonProperty("offset") + private Integer offset; + + /** Currency */ + @JsonProperty("currency") + private String currency; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesLedgerReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesLedgerReq.java new file mode 100644 index 00000000..e0004cd8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesLedgerReq.java @@ -0,0 +1,57 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFuturesLedgerReq implements Request { + /** Currency of transaction history, XBT or USDT */ + @JsonProperty("currency") + private String currency; + + /** + * Type RealizedPNL-Realized profit and loss, Deposit-Deposit, Withdrawal-withdraw, + * Transferin-Transfer in, TransferOut-Transfer out + */ + @JsonProperty("type") + private String type; + + /** + * 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 + */ + @JsonProperty("offset") + private Long offset; + + /** + * 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. + */ + @JsonProperty("forward") + @Builder.Default + private Boolean forward = true; + + /** Displayed size per page. The default size is 50 */ + @JsonProperty("maxCount") + @Builder.Default + private Long maxCount = 50l; + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesLedgerResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesLedgerResp.java new file mode 100644 index 00000000..c6790d9f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetFuturesLedgerResp.java @@ -0,0 +1,40 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFuturesLedgerResp + implements Response> { + /** */ + @JsonProperty("dataList") + private List dataList = new ArrayList<>(); + + /** + * 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. + */ + @JsonProperty("hasMore") + private Boolean hasMore; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountAssets.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountAssets.java new file mode 100644 index 00000000..71c0dcab --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountAssets.java @@ -0,0 +1,38 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginAccountAssets { + /** Symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, + * REPAY-repayment, BORROW-borrowing + */ + @JsonProperty("status") + private String status; + + /** debt ratio */ + @JsonProperty("debtRatio") + private String debtRatio; + + /** */ + @JsonProperty("baseAsset") + private GetIsolatedMarginAccountAssetsBaseAsset baseAsset; + + /** */ + @JsonProperty("quoteAsset") + private GetIsolatedMarginAccountAssetsQuoteAsset quoteAsset; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountAssetsBaseAsset.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountAssetsBaseAsset.java new file mode 100644 index 00000000..a854dc1e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountAssetsBaseAsset.java @@ -0,0 +1,55 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginAccountAssetsBaseAsset { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Support borrow or not */ + @JsonProperty("borrowEnabled") + private Boolean borrowEnabled; + + /** Support transfer or not */ + @JsonProperty("transferInEnabled") + private Boolean transferInEnabled; + + /** Liabilities */ + @JsonProperty("liability") + private String liability; + + /** Total Assets */ + @JsonProperty("total") + private String total; + + /** Account available assets (total assets - frozen) */ + @JsonProperty("available") + private String available; + + /** Account frozen assets */ + @JsonProperty("hold") + private String hold; + + /** The user's remaining maximum loan amount */ + @JsonProperty("maxBorrowSize") + private String maxBorrowSize; + + /** Outstanding principal */ + @JsonProperty("liabilityPrincipal") + private String liabilityPrincipal; + + /** Outstanding interest */ + @JsonProperty("liabilityInterest") + private String liabilityInterest; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountAssetsQuoteAsset.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountAssetsQuoteAsset.java new file mode 100644 index 00000000..d22aedbf --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountAssetsQuoteAsset.java @@ -0,0 +1,55 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginAccountAssetsQuoteAsset { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Support borrow or not */ + @JsonProperty("borrowEnabled") + private Boolean borrowEnabled; + + /** Support transfer or not */ + @JsonProperty("transferInEnabled") + private Boolean transferInEnabled; + + /** Liabilities */ + @JsonProperty("liability") + private String liability; + + /** Total Assets */ + @JsonProperty("total") + private String total; + + /** Account available assets (total assets - frozen) */ + @JsonProperty("available") + private String available; + + /** Account frozen assets */ + @JsonProperty("hold") + private String hold; + + /** The user's remaining maximum loan amount */ + @JsonProperty("maxBorrowSize") + private String maxBorrowSize; + + /** */ + @JsonProperty("liabilityPrincipal") + private String liabilityPrincipal; + + /** */ + @JsonProperty("liabilityInterest") + private String liabilityInterest; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountDetailV1BaseAsset.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountDetailV1BaseAsset.java new file mode 100644 index 00000000..d41f8556 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountDetailV1BaseAsset.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginAccountDetailV1BaseAsset { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Current currency total asset amount */ + @JsonProperty("totalBalance") + private String totalBalance; + + /** Current currency holding asset amount */ + @JsonProperty("holdBalance") + private String holdBalance; + + /** Current available asset amount */ + @JsonProperty("availableBalance") + private String availableBalance; + + /** Liabilities */ + @JsonProperty("liability") + private String liability; + + /** */ + @JsonProperty("interest") + private String interest; + + /** */ + @JsonProperty("borrowableAmount") + private String borrowableAmount; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountDetailV1QuoteAsset.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountDetailV1QuoteAsset.java new file mode 100644 index 00000000..7268cf08 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountDetailV1QuoteAsset.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginAccountDetailV1QuoteAsset { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Current currency total asset amount */ + @JsonProperty("totalBalance") + private String totalBalance; + + /** Current currency holding asset amount */ + @JsonProperty("holdBalance") + private String holdBalance; + + /** Current available asset amount */ + @JsonProperty("availableBalance") + private String availableBalance; + + /** Liabilities */ + @JsonProperty("liability") + private String liability; + + /** */ + @JsonProperty("interest") + private String interest; + + /** */ + @JsonProperty("borrowableAmount") + private String borrowableAmount; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountDetailV1Req.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountDetailV1Req.java new file mode 100644 index 00000000..b34ff463 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountDetailV1Req.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginAccountDetailV1Req implements Request { + /** */ + @JsonIgnore + @PathVar("symbol") + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountDetailV1Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountDetailV1Resp.java new file mode 100644 index 00000000..3d4c726b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountDetailV1Resp.java @@ -0,0 +1,98 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginAccountDetailV1Resp + implements Response< + GetIsolatedMarginAccountDetailV1Resp, RestResponse> { + /** Symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * 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 + * . + */ + @JsonProperty("status") + private StatusEnum status; + + /** debt ratio */ + @JsonProperty("debtRatio") + private String debtRatio; + + /** */ + @JsonProperty("baseAsset") + private GetIsolatedMarginAccountDetailV1BaseAsset baseAsset; + + /** */ + @JsonProperty("quoteAsset") + private GetIsolatedMarginAccountDetailV1QuoteAsset quoteAsset; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum StatusEnum { + /** */ + DEBT("DEBT"), + /** */ + CLEAR("CLEAR"), + /** */ + BANKRUPTCY("BANKRUPTCY"), + /** */ + IN_BORROW("IN_BORROW"), + /** */ + IN_REPAY("IN_REPAY"), + /** */ + IN_LIQUIDATION("IN_LIQUIDATION"), + /** */ + IN_AUTO_RENEW("IN_AUTO_RENEW"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1Assets.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1Assets.java new file mode 100644 index 00000000..932c8cd4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1Assets.java @@ -0,0 +1,85 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginAccountListV1Assets { + /** Symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * 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 + * . + */ + @JsonProperty("status") + private StatusEnum status; + + /** debt ratio */ + @JsonProperty("debtRatio") + private String debtRatio; + + /** */ + @JsonProperty("baseAsset") + private GetIsolatedMarginAccountListV1AssetsBaseAsset baseAsset; + + /** */ + @JsonProperty("quoteAsset") + private GetIsolatedMarginAccountListV1AssetsQuoteAsset quoteAsset; + + public enum StatusEnum { + /** */ + DEBT("DEBT"), + /** */ + CLEAR("CLEAR"), + /** */ + BANKRUPTCY("BANKRUPTCY"), + /** */ + IN_BORROW("IN_BORROW"), + /** */ + IN_REPAY("IN_REPAY"), + /** */ + IN_LIQUIDATION("IN_LIQUIDATION"), + /** */ + IN_AUTO_RENEW("IN_AUTO_RENEW"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1AssetsBaseAsset.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1AssetsBaseAsset.java new file mode 100644 index 00000000..aa8f5f44 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1AssetsBaseAsset.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginAccountListV1AssetsBaseAsset { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Current currency total asset amount */ + @JsonProperty("totalBalance") + private String totalBalance; + + /** Current currency holding asset amount */ + @JsonProperty("holdBalance") + private String holdBalance; + + /** Current available asset amount */ + @JsonProperty("availableBalance") + private String availableBalance; + + /** Liabilities */ + @JsonProperty("liability") + private String liability; + + /** */ + @JsonProperty("interest") + private String interest; + + /** */ + @JsonProperty("borrowableAmount") + private String borrowableAmount; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1AssetsQuoteAsset.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1AssetsQuoteAsset.java new file mode 100644 index 00000000..70bef2a0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1AssetsQuoteAsset.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginAccountListV1AssetsQuoteAsset { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Current currency total asset amount */ + @JsonProperty("totalBalance") + private String totalBalance; + + /** Current currency holding asset amount */ + @JsonProperty("holdBalance") + private String holdBalance; + + /** Current available asset amount */ + @JsonProperty("availableBalance") + private String availableBalance; + + /** Liabilities */ + @JsonProperty("liability") + private String liability; + + /** */ + @JsonProperty("interest") + private String interest; + + /** */ + @JsonProperty("borrowableAmount") + private String borrowableAmount; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1Req.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1Req.java new file mode 100644 index 00000000..a44ecfd1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1Req.java @@ -0,0 +1,60 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginAccountListV1Req implements Request { + /** quote currency, currently only supports USDT, KCS, BTC, USDT as default */ + @JsonProperty("balanceCurrency") + @Builder.Default + private BalanceCurrencyEnum balanceCurrency = BalanceCurrencyEnum.BTC; + + public enum BalanceCurrencyEnum { + /** */ + USDT("USDT"), + /** */ + KCS("KCS"), + /** */ + BTC("BTC"); + + private final String value; + + BalanceCurrencyEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BalanceCurrencyEnum fromValue(String value) { + for (BalanceCurrencyEnum b : BalanceCurrencyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1Resp.java new file mode 100644 index 00000000..3833a3c6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountListV1Resp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginAccountListV1Resp + implements Response< + GetIsolatedMarginAccountListV1Resp, RestResponse> { + /** The total balance of the isolated margin account (in the request coin) */ + @JsonProperty("totalConversionBalance") + private String totalConversionBalance; + + /** Total liabilities of the isolated margin account (in the request coin) */ + @JsonProperty("liabilityConversionBalance") + private String liabilityConversionBalance; + + /** Account list */ + @JsonProperty("assets") + private List assets = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountReq.java new file mode 100644 index 00000000..c0a8f9ed --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountReq.java @@ -0,0 +1,108 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginAccountReq implements Request { + /** For isolated trading pairs, query all without passing */ + @JsonProperty("symbol") + private String symbol; + + /** quote currency, currently only supports USDT, KCS, BTC, USDT as default */ + @JsonProperty("quoteCurrency") + @Builder.Default + private QuoteCurrencyEnum quoteCurrency = QuoteCurrencyEnum.USDT; + + /** + * Query account type (default ISOLATED), ISOLATED- - only query low frequency isolated margin + * account, ISOLATED_V2-only query high frequency isolated margin account, ALL - consistent + * aggregate query with the web side + */ + @JsonProperty("queryType") + @Builder.Default + private QueryTypeEnum queryType = QueryTypeEnum.ISOLATED; + + public enum QuoteCurrencyEnum { + /** */ + USDT("USDT"), + /** */ + KCS("KCS"), + /** */ + BTC("BTC"); + + private final String value; + + QuoteCurrencyEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static QuoteCurrencyEnum fromValue(String value) { + for (QuoteCurrencyEnum b : QuoteCurrencyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum QueryTypeEnum { + /** */ + ISOLATED("ISOLATED"), + /** */ + ISOLATED_V2("ISOLATED_V2"), + /** */ + ALL("ALL"); + + private final String value; + + QueryTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static QueryTypeEnum fromValue(String value) { + for (QueryTypeEnum b : QueryTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountResp.java new file mode 100644 index 00000000..3d1b3a49 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetIsolatedMarginAccountResp.java @@ -0,0 +1,45 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginAccountResp + implements Response> { + /** Total Assets in Quote Currency */ + @JsonProperty("totalAssetOfQuoteCurrency") + private String totalAssetOfQuoteCurrency; + + /** Total Liability in Quote Currency */ + @JsonProperty("totalLiabilityOfQuoteCurrency") + private String totalLiabilityOfQuoteCurrency; + + /** timestamp */ + @JsonProperty("timestamp") + private Long timestamp; + + /** */ + @JsonProperty("assets") + private List assets = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginAccountDetailAccounts.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginAccountDetailAccounts.java new file mode 100644 index 00000000..2ccff32e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginAccountDetailAccounts.java @@ -0,0 +1,39 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarginAccountDetailAccounts { + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Total funds in the account */ + @JsonProperty("totalBalance") + private String totalBalance; + + /** Available funds in the account */ + @JsonProperty("availableBalance") + private String availableBalance; + + /** Funds on hold in the account */ + @JsonProperty("holdBalance") + private String holdBalance; + + /** Total liabilities */ + @JsonProperty("liability") + private String liability; + + /** Available size to borrow */ + @JsonProperty("maxBorrowSize") + private String maxBorrowSize; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginAccountDetailResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginAccountDetailResp.java new file mode 100644 index 00000000..bd70cbf0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginAccountDetailResp.java @@ -0,0 +1,37 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarginAccountDetailResp + implements Response> { + /** Debt ratio */ + @JsonProperty("debtRatio") + private String debtRatio; + + /** Margin account list */ + @JsonProperty("accounts") + private List accounts = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginHFLedgerData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginHFLedgerData.java new file mode 100644 index 00000000..4f0cd83c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginHFLedgerData.java @@ -0,0 +1,59 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarginHFLedgerData { + /** */ + @JsonProperty("id") + private Long id; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Change in funds balance */ + @JsonProperty("amount") + private String amount; + + /** Transaction, Deposit or withdrawal fee */ + @JsonProperty("fee") + private String fee; + + /** Total balance of funds after change */ + @JsonProperty("balance") + private String balance; + + /** Master account type TRADE_HF */ + @JsonProperty("accountType") + private String accountType; + + /** Trnasaction type, such as TRANSFER, TRADE_EXCHANGE, etc. */ + @JsonProperty("bizType") + private String bizType; + + /** Direction of transfer (out or in) */ + @JsonProperty("direction") + private String direction; + + /** Ledger creation time */ + @JsonProperty("createdAt") + private Long createdAt; + + /** Core transaction parameter */ + @JsonProperty("context") + private String context; + + /** */ + @JsonProperty("tax") + private String tax; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginHFLedgerReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginHFLedgerReq.java new file mode 100644 index 00000000..e741de24 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginHFLedgerReq.java @@ -0,0 +1,92 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarginHFLedgerReq implements Request { + /** + * 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 + */ + @JsonProperty("currency") + private String currency; + + /** direction: in, out */ + @JsonProperty("direction") + private DirectionEnum direction; + + /** + * Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE-cross margin trade, + * ISOLATED_EXCHANGE-isolated margin trade, LIQUIDATION-liquidation, ASSERT_RETURN-forced + * liquidation asset return + */ + @JsonProperty("bizType") + private String bizType; + + /** + * The ID of the last set of data from the previous data batch. By default, the latest information + * is given. + */ + @JsonProperty("lastId") + private Long lastId; + + /** Default100, Max200 */ + @JsonProperty("limit") + @Builder.Default + private Integer limit = 100; + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + public enum DirectionEnum { + /** */ + IN("in"), + /** */ + OUT("out"); + + private final String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginHFLedgerResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginHFLedgerResp.java new file mode 100644 index 00000000..79ac8ed1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginHFLedgerResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarginHFLedgerResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetMarginHFLedgerResp fromJson(List data) { + // original response + GetMarginHFLedgerResp obj = new GetMarginHFLedgerResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountDetailReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountDetailReq.java new file mode 100644 index 00000000..51e31be1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountDetailReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotAccountDetailReq implements Request { + /** Path parameter. Account ID */ + @JsonIgnore + @PathVar("accountId") + @JsonProperty("accountId") + private String accountId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountDetailResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountDetailResp.java new file mode 100644 index 00000000..74ad5337 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountDetailResp.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotAccountDetailResp + implements Response> { + /** The currency of the account */ + @JsonProperty("currency") + private String currency; + + /** Total funds in the account */ + @JsonProperty("balance") + private String balance; + + /** Funds available to withdraw or trade */ + @JsonProperty("available") + private String available; + + /** Funds on hold (not available for use) */ + @JsonProperty("holds") + private String holds; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountListData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountListData.java new file mode 100644 index 00000000..08a65824 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountListData.java @@ -0,0 +1,74 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotAccountListData { + /** Account ID */ + @JsonProperty("id") + private String id; + + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Account type: main, trade, isolated (abandon), margin (abandon) */ + @JsonProperty("type") + private TypeEnum type; + + /** Total funds in the account */ + @JsonProperty("balance") + private String balance; + + /** Funds available to withdraw or trade */ + @JsonProperty("available") + private String available; + + /** Funds on hold (not available for use) */ + @JsonProperty("holds") + private String holds; + + public enum TypeEnum { + /** Funding account */ + MAIN("main"), + /** Spot account */ + TRADE("trade"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountListReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountListReq.java new file mode 100644 index 00000000..7d1523f5 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountListReq.java @@ -0,0 +1,63 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotAccountListReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Account type */ + @JsonProperty("type") + private TypeEnum type; + + public enum TypeEnum { + /** Funding account */ + MAIN("main"), + /** Spot account */ + TRADE("trade"), + /** Option account */ + OPTION("option"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountListResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountListResp.java new file mode 100644 index 00000000..11be728a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountListResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotAccountListResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetSpotAccountListResp fromJson(List data) { + // original response + GetSpotAccountListResp obj = new GetSpotAccountListResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountTypeResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountTypeResp.java new file mode 100644 index 00000000..e739f004 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountTypeResp.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotAccountTypeResp + implements Response> { + /** + * 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 + */ + @JsonProperty("data") + private Boolean data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetSpotAccountTypeResp fromJson(Boolean data) { + // original response + GetSpotAccountTypeResp obj = new GetSpotAccountTypeResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotHFLedgerData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotHFLedgerData.java new file mode 100644 index 00000000..f6c17604 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotHFLedgerData.java @@ -0,0 +1,94 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotHFLedgerData { + /** Unique ID */ + @JsonProperty("id") + private String id; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Change in funds balance */ + @JsonProperty("amount") + private String amount; + + /** Transaction, Deposit or withdrawal fee */ + @JsonProperty("fee") + private String fee; + + /** */ + @JsonProperty("tax") + private String tax; + + /** Total balance of funds after change */ + @JsonProperty("balance") + private String balance; + + /** Master account type TRADE_HF */ + @JsonProperty("accountType") + private String accountType; + + /** Trnasaction type, such as TRANSFER, TRADE_EXCHANGE, etc. */ + @JsonProperty("bizType") + private String bizType; + + /** Direction of transfer (out or in) */ + @JsonProperty("direction") + private DirectionEnum direction; + + /** Created time */ + @JsonProperty("createdAt") + private String createdAt; + + /** Core transaction parameter */ + @JsonProperty("context") + private String context; + + public enum DirectionEnum { + /** */ + IN("in"), + /** */ + OUT("out"); + + private final String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotHFLedgerReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotHFLedgerReq.java new file mode 100644 index 00000000..669242b2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotHFLedgerReq.java @@ -0,0 +1,129 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotHFLedgerReq implements Request { + /** + * 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. + */ + @JsonProperty("currency") + private String currency; + + /** direction: in, out */ + @JsonProperty("direction") + private DirectionEnum direction; + + /** Transaction type */ + @JsonProperty("bizType") + private BizTypeEnum bizType; + + /** + * The ID of the last set of data from the previous data batch. By default, the latest information + * is given. + */ + @JsonProperty("lastId") + private Long lastId; + + /** Default100, Max200 */ + @JsonProperty("limit") + @Builder.Default + private Integer limit = 100; + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + public enum DirectionEnum { + /** */ + IN("in"), + /** */ + OUT("out"); + + private final String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum BizTypeEnum { + /** Trade exchange */ + TRADE_EXCHANGE("TRADE_EXCHANGE"), + /** Transfer */ + TRANSFER("TRANSFER"), + /** Sub transfer */ + SUB_TRANSFER("SUB_TRANSFER"), + /** Returned fees */ + RETURNED_FEES("RETURNED_FEES"), + /** Deduction fees */ + DEDUCTION_FEES("DEDUCTION_FEES"), + /** Other */ + OTHER("OTHER"); + + private final String value; + + BizTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BizTypeEnum fromValue(String value) { + for (BizTypeEnum b : BizTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotHFLedgerResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotHFLedgerResp.java new file mode 100644 index 00000000..d5b1308d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotHFLedgerResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotHFLedgerResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetSpotHFLedgerResp fromJson(List data) { + // original response + GetSpotHFLedgerResp obj = new GetSpotHFLedgerResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotLedgerItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotLedgerItems.java new file mode 100644 index 00000000..88e83681 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotLedgerItems.java @@ -0,0 +1,61 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotLedgerItems { + /** unique id */ + @JsonProperty("id") + private String id; + + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** + * The total amount of assets (fees included) involved in assets changes such as transactions, + * withdrawals and bonus distributions. + */ + @JsonProperty("amount") + private String amount; + + /** Fees generated in transaction, withdrawal, etc. */ + @JsonProperty("fee") + private String fee; + + /** Remaining funds after the transaction. (Deprecated field, no actual use of the value field) */ + @JsonProperty("balance") + private String balance; + + /** Master user account types: MAIN, TRADE, MARGIN or CONTRACT. */ + @JsonProperty("accountType") + private String accountType; + + /** + * Business type leading to changes in funds, such as exchange, withdrawal, deposit, KUCOIN_BONUS, + * REFERRAL_BONUS, Lendings, etc. + */ + @JsonProperty("bizType") + private String bizType; + + /** Side, out or in */ + @JsonProperty("direction") + private String direction; + + /** Time of event */ + @JsonProperty("createdAt") + private Long createdAt; + + /** Business related information such as order ID, serial no., etc. */ + @JsonProperty("context") + private String context; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotLedgerReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotLedgerReq.java new file mode 100644 index 00000000..8f4b8e62 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotLedgerReq.java @@ -0,0 +1,90 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotLedgerReq implements Request { + /** + * 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. + */ + @JsonProperty("currency") + private String currency; + + /** direction: in, out */ + @JsonProperty("direction") + private DirectionEnum direction; + + /** + * 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 + */ + @JsonProperty("bizType") + private String bizType; + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + /** Current request page. */ + @JsonProperty("currentPage") + @Builder.Default + private Integer currentPage = 1; + + /** Number of results per request. Minimum is 10, maximum is 500. */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 50; + + public enum DirectionEnum { + /** Funds in */ + IN("in"), + /** Funds out */ + OUT("out"); + + private final String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotLedgerResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotLedgerResp.java new file mode 100644 index 00000000..69cf343a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotLedgerResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.account; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotLedgerResp + implements Response> { + /** current page */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** page size */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** total number */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** total pages */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/AddDepositAddressV1Req.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/AddDepositAddressV1Req.java new file mode 100644 index 00000000..f019590c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/AddDepositAddressV1Req.java @@ -0,0 +1,74 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddDepositAddressV1Req implements Request { + /** currency */ + @JsonProperty("currency") + private String 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. + */ + @JsonProperty("chain") + @Builder.Default + private String chain = "eth"; + + /** + * Deposit account type: main (funding account), trade (spot trading account); the default is main + */ + @JsonProperty("to") + @Builder.Default + private ToEnum to = ToEnum.MAIN; + + public enum ToEnum { + /** Funding account */ + MAIN("MAIN"), + /** Spot account */ + TRADE("TRADE"); + + private final String value; + + ToEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ToEnum fromValue(String value) { + for (ToEnum b : ToEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/AddDepositAddressV1Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/AddDepositAddressV1Resp.java new file mode 100644 index 00000000..b3cd7548 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/AddDepositAddressV1Resp.java @@ -0,0 +1,90 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddDepositAddressV1Resp + implements Response> { + /** Deposit address */ + @JsonProperty("address") + private String address; + + /** + * 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. + */ + @JsonProperty("memo") + private String memo; + + /** The chainName of currency */ + @JsonProperty("chain") + private String chain; + + /** The chainId of currency */ + @JsonProperty("chainId") + private String chainId; + + /** Deposit account type: main (funding account), trade (spot trading account) */ + @JsonProperty("to") + private ToEnum to; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum ToEnum { + /** */ + MAIN("MAIN"), + /** */ + TRADE("TRADE"); + + private final String value; + + ToEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ToEnum fromValue(String value) { + for (ToEnum b : ToEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/AddDepositAddressV3Req.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/AddDepositAddressV3Req.java new file mode 100644 index 00000000..abc138c2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/AddDepositAddressV3Req.java @@ -0,0 +1,80 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddDepositAddressV3Req implements Request { + /** currency */ + @JsonProperty("currency") + private String 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. + */ + @JsonProperty("chain") + @Builder.Default + private String chain = "eth"; + + /** + * Deposit account type: MAIN (funding account), TRADE (spot trading account); the default is MAIN + */ + @JsonProperty("to") + @Builder.Default + private ToEnum to = ToEnum.MAIN; + + /** + * 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. + */ + @JsonProperty("amount") + private String amount; + + public enum ToEnum { + /** Funding account */ + MAIN("main"), + /** Spot account */ + TRADE("trade"); + + private final String value; + + ToEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ToEnum fromValue(String value) { + for (ToEnum b : ToEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/AddDepositAddressV3Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/AddDepositAddressV3Resp.java new file mode 100644 index 00000000..2d54b85b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/AddDepositAddressV3Resp.java @@ -0,0 +1,62 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddDepositAddressV3Resp + implements Response> { + /** Deposit address */ + @JsonProperty("address") + private String address; + + /** + * 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. + */ + @JsonProperty("memo") + private String memo; + + /** The chainId of currency */ + @JsonProperty("chainId") + private String chainId; + + /** Deposit account type: MAIN (funding account), TRADE (spot trading account) */ + @JsonProperty("to") + private String to; + + /** + * Expiration time; Lightning network expiration time; this field is not applicable to + * non-Lightning networks + */ + @JsonProperty("expirationDate") + private Integer expirationDate; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** The chainName of currency */ + @JsonProperty("chainName") + private String chainName; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.java new file mode 100644 index 00000000..e6f0869b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.java @@ -0,0 +1,85 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +public interface DepositApi { + /** + * Add Deposit Address (V3) Request via this endpoint the creation of a deposit address for a + * currency you intend to deposit. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ + */ + AddDepositAddressV3Resp addDepositAddressV3(AddDepositAddressV3Req req); + + /** + * Get Deposit Address (V3) 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. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+------------+ + */ + GetDepositAddressV3Resp getDepositAddressV3(GetDepositAddressV3Req req); + + /** + * Get Deposit History 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. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+------------+ + */ + GetDepositHistoryResp getDepositHistory(GetDepositHistoryReq req); + + /** + * Get Deposit Addresses (V2) 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. + * + * @deprecated docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 + * | +-----------------------+------------+ + */ + GetDepositAddressV2Resp getDepositAddressV2(GetDepositAddressV2Req req); + + /** + * Get Deposit Addresses - V1 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. + * + * @deprecated docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 + * | +-----------------------+------------+ + */ + GetDepositAddressV1Resp getDepositAddressV1(GetDepositAddressV1Req req); + + /** + * Get Deposit History - Old 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. + * + * @deprecated docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 + * | +-----------------------+------------+ + */ + GetDepositHistoryOldResp getDepositHistoryOld(GetDepositHistoryOldReq req); + + /** + * Add Deposit Address - V1 Request via this endpoint the creation of a deposit address for a + * currency you intend to deposit. + * + * @deprecated docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | + * 20 | +-----------------------+------------+ + */ + AddDepositAddressV1Resp addDepositAddressV1(AddDepositAddressV1Req req); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.template new file mode 100644 index 00000000..937e5fea --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.template @@ -0,0 +1,166 @@ + + /** + * addDepositAddressV3 + * Add Deposit Address (V3) + * /api/v3/deposit-address/create + */ + public void testAddDepositAddressV3() { + AddDepositAddressV3Req.AddDepositAddressV3ReqBuilder builder = AddDepositAddressV3Req.builder(); + builder.currency(?).chain(?).to(?).amount(?); + AddDepositAddressV3Req req = builder.build(); + AddDepositAddressV3Resp resp = this.api.addDepositAddressV3(req); + self::assertNotNull($resp->address); + self::assertNotNull($resp->memo); + self::assertNotNull($resp->chainId); + self::assertNotNull($resp->to); + self::assertNotNull($resp->expirationDate); + self::assertNotNull($resp->currency); + self::assertNotNull($resp->chainName); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getDepositAddressV3 + * Get Deposit Address (V3) + * /api/v3/deposit-addresses + */ + public void testGetDepositAddressV3() { + GetDepositAddressV3Req.GetDepositAddressV3ReqBuilder builder = GetDepositAddressV3Req.builder(); + builder.currency(?).amount(?).chain(?); + GetDepositAddressV3Req req = builder.build(); + GetDepositAddressV3Resp resp = this.api.getDepositAddressV3(req); + foreach($resp->data as $item) { + self::assertNotNull($item->address); + self::assertNotNull($item->memo); + self::assertNotNull($item->chainId); + self::assertNotNull($item->to); + self::assertNotNull($item->expirationDate); + self::assertNotNull($item->currency); + self::assertNotNull($item->contractAddress); + self::assertNotNull($item->chainName); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getDepositHistory + * Get Deposit History + * /api/v1/deposits + */ + public void testGetDepositHistory() { + GetDepositHistoryReq.GetDepositHistoryReqBuilder builder = GetDepositHistoryReq.builder(); + builder.currency(?).status(?).startAt(?).endAt(?).currentPage(?).pageSize(?); + GetDepositHistoryReq req = builder.build(); + GetDepositHistoryResp resp = this.api.getDepositHistory(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->currency); + self::assertNotNull($item->chain); + self::assertNotNull($item->status); + self::assertNotNull($item->address); + self::assertNotNull($item->memo); + self::assertNotNull($item->isInner); + self::assertNotNull($item->amount); + self::assertNotNull($item->fee); + self::assertNotNull($item->walletTxId); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->updatedAt); + self::assertNotNull($item->remark); + self::assertNotNull($item->arrears); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getDepositAddressV2 + * Get Deposit Addresses (V2) + * /api/v2/deposit-addresses + */ + public void testGetDepositAddressV2() { + GetDepositAddressV2Req.GetDepositAddressV2ReqBuilder builder = GetDepositAddressV2Req.builder(); + builder.currency(?).chain(?); + GetDepositAddressV2Req req = builder.build(); + GetDepositAddressV2Resp resp = this.api.getDepositAddressV2(req); + foreach($resp->data as $item) { + self::assertNotNull($item->address); + self::assertNotNull($item->memo); + self::assertNotNull($item->chain); + self::assertNotNull($item->chainId); + self::assertNotNull($item->to); + self::assertNotNull($item->currency); + self::assertNotNull($item->contractAddress); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getDepositAddressV1 + * Get Deposit Addresses - V1 + * /api/v1/deposit-addresses + */ + public void testGetDepositAddressV1() { + GetDepositAddressV1Req.GetDepositAddressV1ReqBuilder builder = GetDepositAddressV1Req.builder(); + builder.currency(?).chain(?); + GetDepositAddressV1Req req = builder.build(); + GetDepositAddressV1Resp resp = this.api.getDepositAddressV1(req); + self::assertNotNull($resp->address); + self::assertNotNull($resp->memo); + self::assertNotNull($resp->chain); + self::assertNotNull($resp->chainId); + self::assertNotNull($resp->to); + self::assertNotNull($resp->currency); + self::assertNotNull($resp->contractAddress); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getDepositHistoryOld + * Get Deposit History - Old + * /api/v1/hist-deposits + */ + public void testGetDepositHistoryOld() { + GetDepositHistoryOldReq.GetDepositHistoryOldReqBuilder builder = GetDepositHistoryOldReq.builder(); + builder.currency(?).status(?).startAt(?).endAt(?); + GetDepositHistoryOldReq req = builder.build(); + GetDepositHistoryOldResp resp = this.api.getDepositHistoryOld(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->currency); + self::assertNotNull($item->createAt); + self::assertNotNull($item->amount); + self::assertNotNull($item->walletTxId); + self::assertNotNull($item->isInner); + self::assertNotNull($item->status); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addDepositAddressV1 + * Add Deposit Address - V1 + * /api/v1/deposit-addresses + */ + public void testAddDepositAddressV1() { + AddDepositAddressV1Req.AddDepositAddressV1ReqBuilder builder = AddDepositAddressV1Req.builder(); + builder.currency(?).chain(?).to(?); + AddDepositAddressV1Req req = builder.build(); + AddDepositAddressV1Resp resp = this.api.addDepositAddressV1(req); + self::assertNotNull($resp->address); + self::assertNotNull($resp->memo); + self::assertNotNull($resp->chain); + self::assertNotNull($resp->chainId); + self::assertNotNull($resp->to); + self::assertNotNull($resp->currency); + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApiAutoGeneratedTest.java new file mode 100644 index 00000000..46dd794d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApiAutoGeneratedTest.java @@ -0,0 +1,276 @@ +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class DepositApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** addDepositAddressV3 Request Add Deposit Address (V3) /api/v3/deposit-address/create */ + public static void testAddDepositAddressV3Request() throws Exception { + String data = "{\"currency\": \"TON\", \"chain\": \"ton\", \"to\": \"trade\"}"; + AddDepositAddressV3Req obj = mapper.readValue(data, AddDepositAddressV3Req.class); + } + + /** addDepositAddressV3 Response Add Deposit Address (V3) /api/v3/deposit-address/create */ + public static void testAddDepositAddressV3Response() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"address\":\"EQCA1BI4QRZ8qYmskSRDzJmkucGodYRTZCf_b9hckjla6dZl\",\"memo\":\"2090821203\",\"chainId\":\"ton\",\"to\":\"TRADE\",\"expirationDate\":0,\"currency\":\"TON\",\"chainName\":\"TON\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getDepositAddressV3 Request Get Deposit Address (V3) /api/v3/deposit-addresses */ + public static void testGetDepositAddressV3Request() throws Exception { + String data = + "{\"currency\": \"BTC\", \"amount\": \"example_string_default_value\", \"chain\": \"eth\"}"; + GetDepositAddressV3Req obj = mapper.readValue(data, GetDepositAddressV3Req.class); + } + + /** getDepositAddressV3 Response Get Deposit Address (V3) /api/v3/deposit-addresses */ + public static void testGetDepositAddressV3Response() throws Exception { + String 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\"}]}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getDepositHistory Request Get Deposit History /api/v1/deposits */ + public static void testGetDepositHistoryRequest() throws Exception { + String data = + "{\"currency\": \"BTC\", \"status\": \"SUCCESS\", \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000, \"currentPage\": 1, \"pageSize\": 50}"; + GetDepositHistoryReq obj = mapper.readValue(data, GetDepositHistoryReq.class); + } + + /** getDepositHistory Response Get Deposit History /api/v1/deposits */ + public static void testGetDepositHistoryResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 5,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"currency\": \"USDT\",\n" + + " \"chain\": \"\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"address\": \"a435*****@gmail.com\",\n" + + " \"memo\": \"\",\n" + + " \"isInner\": true,\n" + + " \"amount\": \"1.00000000\",\n" + + " \"fee\": \"0.00000000\",\n" + + " \"walletTxId\": null,\n" + + " \"createdAt\": 1728555875000,\n" + + " \"updatedAt\": 1728555875000,\n" + + " \"remark\": \"\",\n" + + " \"arrears\": false\n" + + " },\n" + + " {\n" + + " \"currency\": \"USDT\",\n" + + " \"chain\": \"trx\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"address\": \"TSv3L1fS7******X4nLP6rqNxYz\",\n" + + " \"memo\": \"\",\n" + + " \"isInner\": true,\n" + + " \"amount\": \"6.00000000\",\n" + + " \"fee\": \"0.00000000\",\n" + + " \"walletTxId\": null,\n" + + " \"createdAt\": 1721730920000,\n" + + " \"updatedAt\": 1721730920000,\n" + + " \"remark\": \"\",\n" + + " \"arrears\": false\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getDepositAddressV2 Request Get Deposit Addresses (V2) /api/v2/deposit-addresses */ + public static void testGetDepositAddressV2Request() throws Exception { + String data = "{\"currency\": \"BTC\", \"chain\": \"eth\"}"; + GetDepositAddressV2Req obj = mapper.readValue(data, GetDepositAddressV2Req.class); + } + + /** getDepositAddressV2 Response Get Deposit Addresses (V2) /api/v2/deposit-addresses */ + public static void testGetDepositAddressV2Response() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getDepositAddressV1 Request Get Deposit Addresses - V1 /api/v1/deposit-addresses */ + public static void testGetDepositAddressV1Request() throws Exception { + String data = "{\"currency\": \"BTC\", \"chain\": \"eth\"}"; + GetDepositAddressV1Req obj = mapper.readValue(data, GetDepositAddressV1Req.class); + } + + /** getDepositAddressV1 Response Get Deposit Addresses - V1 /api/v1/deposit-addresses */ + public static void testGetDepositAddressV1Response() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"address\": \"0xea220bf61c3c2b0adc2cfa29fec3d2677745a379\",\n" + + " \"memo\": \"\",\n" + + " \"chain\": \"ERC20\",\n" + + " \"chainId\": \"eth\",\n" + + " \"to\": \"MAIN\",\n" + + " \"currency\": \"USDT\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getDepositHistoryOld Request Get Deposit History - Old /api/v1/hist-deposits */ + public static void testGetDepositHistoryOldRequest() throws Exception { + String data = + "{\"currency\": \"BTC\", \"status\": \"SUCCESS\", \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000}"; + GetDepositHistoryOldReq obj = mapper.readValue(data, GetDepositHistoryOldReq.class); + } + + /** getDepositHistoryOld Response Get Deposit History - Old /api/v1/hist-deposits */ + public static void testGetDepositHistoryOldResponse() throws Exception { + String data = + "{\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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addDepositAddressV1 Request Add Deposit Address - V1 /api/v1/deposit-addresses */ + public static void testAddDepositAddressV1Request() throws Exception { + String data = "{\"currency\": \"ETH\", \"chain\": \"eth\", \"to\": \"MAIN\"}"; + AddDepositAddressV1Req obj = mapper.readValue(data, AddDepositAddressV1Req.class); + } + + /** addDepositAddressV1 Response Add Deposit Address - V1 /api/v1/deposit-addresses */ + public static void testAddDepositAddressV1Response() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"address\":\"0x02028456f38e78609904e8a002c787ede7a73d7c\",\"memo\":null,\"chain\":\"ERC20\",\"chainId\":\"eth\",\"to\":\"MAIN\",\"currency\":\"ETH\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run( + DepositApiAutoGeneratedTest::testAddDepositAddressV3Request, + "testAddDepositAddressV3Request"); + run( + DepositApiAutoGeneratedTest::testAddDepositAddressV3Response, + "testAddDepositAddressV3Response"); + run( + DepositApiAutoGeneratedTest::testGetDepositAddressV3Request, + "testGetDepositAddressV3Request"); + run( + DepositApiAutoGeneratedTest::testGetDepositAddressV3Response, + "testGetDepositAddressV3Response"); + run(DepositApiAutoGeneratedTest::testGetDepositHistoryRequest, "testGetDepositHistoryRequest"); + run( + DepositApiAutoGeneratedTest::testGetDepositHistoryResponse, + "testGetDepositHistoryResponse"); + run( + DepositApiAutoGeneratedTest::testGetDepositAddressV2Request, + "testGetDepositAddressV2Request"); + run( + DepositApiAutoGeneratedTest::testGetDepositAddressV2Response, + "testGetDepositAddressV2Response"); + run( + DepositApiAutoGeneratedTest::testGetDepositAddressV1Request, + "testGetDepositAddressV1Request"); + run( + DepositApiAutoGeneratedTest::testGetDepositAddressV1Response, + "testGetDepositAddressV1Response"); + run( + DepositApiAutoGeneratedTest::testGetDepositHistoryOldRequest, + "testGetDepositHistoryOldRequest"); + run( + DepositApiAutoGeneratedTest::testGetDepositHistoryOldResponse, + "testGetDepositHistoryOldResponse"); + run( + DepositApiAutoGeneratedTest::testAddDepositAddressV1Request, + "testAddDepositAddressV1Request"); + run( + DepositApiAutoGeneratedTest::testAddDepositAddressV1Response, + "testAddDepositAddressV1Response"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApiImpl.java new file mode 100644 index 00000000..c0b899f6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApiImpl.java @@ -0,0 +1,78 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class DepositApiImpl implements DepositApi { + private final Transport transport; + + public DepositApiImpl(Transport transport) { + this.transport = transport; + } + + public AddDepositAddressV3Resp addDepositAddressV3(AddDepositAddressV3Req req) { + return this.transport.call( + "spot", + false, + "POST", + "/api/v3/deposit-address/create", + req, + AddDepositAddressV3Resp.class, + false); + } + + public GetDepositAddressV3Resp getDepositAddressV3(GetDepositAddressV3Req req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v3/deposit-addresses", + req, + GetDepositAddressV3Resp.class, + false); + } + + public GetDepositHistoryResp getDepositHistory(GetDepositHistoryReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v1/deposits", req, GetDepositHistoryResp.class, false); + } + + public GetDepositAddressV2Resp getDepositAddressV2(GetDepositAddressV2Req req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v2/deposit-addresses", + req, + GetDepositAddressV2Resp.class, + false); + } + + public GetDepositAddressV1Resp getDepositAddressV1(GetDepositAddressV1Req req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/deposit-addresses", + req, + GetDepositAddressV1Resp.class, + false); + } + + public GetDepositHistoryOldResp getDepositHistoryOld(GetDepositHistoryOldReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v1/hist-deposits", req, GetDepositHistoryOldResp.class, false); + } + + public AddDepositAddressV1Resp addDepositAddressV1(AddDepositAddressV1Req req) { + return this.transport.call( + "spot", + false, + "POST", + "/api/v1/deposit-addresses", + req, + AddDepositAddressV1Resp.class, + false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV1Req.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV1Req.java new file mode 100644 index 00000000..0234f57d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV1Req.java @@ -0,0 +1,32 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositAddressV1Req implements Request { + /** currency */ + @JsonProperty("currency") + private String 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. + */ + @JsonProperty("chain") + @Builder.Default + private String chain = "eth"; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV1Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV1Resp.java new file mode 100644 index 00000000..3e81cf48 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV1Resp.java @@ -0,0 +1,94 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositAddressV1Resp + implements Response> { + /** Deposit address */ + @JsonProperty("address") + private String address; + + /** + * 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. + */ + @JsonProperty("memo") + private String memo; + + /** The chainName of currency */ + @JsonProperty("chain") + private String chain; + + /** The chainId of currency */ + @JsonProperty("chainId") + private String chainId; + + /** Deposit account type: main (funding account), trade (spot trading account) */ + @JsonProperty("to") + private ToEnum to; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** The token contract address. */ + @JsonProperty("contractAddress") + private String contractAddress; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum ToEnum { + /** */ + MAIN("MAIN"), + /** */ + TRADE("TRADE"); + + private final String value; + + ToEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ToEnum fromValue(String value) { + for (ToEnum b : ToEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV2Data.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV2Data.java new file mode 100644 index 00000000..978f75d2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV2Data.java @@ -0,0 +1,82 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositAddressV2Data { + /** Deposit address */ + @JsonProperty("address") + private String address; + + /** + * 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. + */ + @JsonProperty("memo") + private String memo; + + /** The chainName of currency */ + @JsonProperty("chain") + private String chain; + + /** The chainId of currency */ + @JsonProperty("chainId") + private String chainId; + + /** Deposit account type: main (funding account), trade (spot trading account) */ + @JsonProperty("to") + private ToEnum to; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** The token contract address. */ + @JsonProperty("contractAddress") + private String contractAddress; + + public enum ToEnum { + /** */ + MAIN("MAIN"), + /** */ + TRADE("TRADE"); + + private final String value; + + ToEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ToEnum fromValue(String value) { + for (ToEnum b : ToEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV2Req.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV2Req.java new file mode 100644 index 00000000..dc7441b2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV2Req.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositAddressV2Req implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Chain ID of currency */ + @JsonProperty("chain") + private String chain; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV2Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV2Resp.java new file mode 100644 index 00000000..2b653094 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV2Resp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositAddressV2Resp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetDepositAddressV2Resp fromJson(List data) { + // original response + GetDepositAddressV2Resp obj = new GetDepositAddressV2Resp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV3Data.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV3Data.java new file mode 100644 index 00000000..bb0bd36f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV3Data.java @@ -0,0 +1,89 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositAddressV3Data { + /** Deposit address */ + @JsonProperty("address") + private String address; + + /** + * 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. + */ + @JsonProperty("memo") + private String memo; + + /** The chainId of currency */ + @JsonProperty("chainId") + private String chainId; + + /** Deposit account type: MAIN (funding account), TRADE (spot trading account) */ + @JsonProperty("to") + private ToEnum to; + + /** + * Expiration time; Lightning network expiration time; this field is not applicable to + * non-Lightning networks + */ + @JsonProperty("expirationDate") + private Integer expirationDate; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** The token contract address. */ + @JsonProperty("contractAddress") + private String contractAddress; + + /** The chainName of currency */ + @JsonProperty("chainName") + private String chainName; + + public enum ToEnum { + /** Funding account */ + MAIN("MAIN"), + /** Spot account */ + TRADE("TRADE"); + + private final String value; + + ToEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ToEnum fromValue(String value) { + for (ToEnum b : ToEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV3Req.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV3Req.java new file mode 100644 index 00000000..3718f554 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV3Req.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositAddressV3Req implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** + * 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. + */ + @JsonProperty("amount") + private String amount; + + /** The chain Id of currency. */ + @JsonProperty("chain") + private String chain; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV3Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV3Resp.java new file mode 100644 index 00000000..5f2df223 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV3Resp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositAddressV3Resp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetDepositAddressV3Resp fromJson(List data) { + // original response + GetDepositAddressV3Resp obj = new GetDepositAddressV3Resp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryItems.java new file mode 100644 index 00000000..ecd98c19 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryItems.java @@ -0,0 +1,107 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositHistoryItems { + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** The chainName of currency */ + @JsonProperty("chain") + private String chain; + + /** Status */ + @JsonProperty("status") + private StatusEnum status; + + /** Deposit address */ + @JsonProperty("address") + private String address; + + /** Address remark. If there’s no remark, it is empty. */ + @JsonProperty("memo") + private String memo; + + /** Internal deposit or not */ + @JsonProperty("isInner") + private Boolean isInner; + + /** Deposit amount */ + @JsonProperty("amount") + private String amount; + + /** Fees charged for deposit */ + @JsonProperty("fee") + private String fee; + + /** Wallet Txid */ + @JsonProperty("walletTxId") + private String walletTxId; + + /** Database record creation time */ + @JsonProperty("createdAt") + private Long createdAt; + + /** Update time of the database record */ + @JsonProperty("updatedAt") + private Long updatedAt; + + /** remark */ + @JsonProperty("remark") + private String remark; + + /** + * 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. + */ + @JsonProperty("arrears") + private Boolean arrears; + + public enum StatusEnum { + /** */ + PROCESSING("PROCESSING"), + /** */ + SUCCESS("SUCCESS"), + /** */ + FAILURE("FAILURE"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryOldItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryOldItems.java new file mode 100644 index 00000000..65cea6d6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryOldItems.java @@ -0,0 +1,76 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositHistoryOldItems { + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Database record creation time */ + @JsonProperty("createAt") + private Integer createAt; + + /** Deposit amount */ + @JsonProperty("amount") + private String amount; + + /** Wallet Txid */ + @JsonProperty("walletTxId") + private String walletTxId; + + /** Internal deposit or not */ + @JsonProperty("isInner") + private Boolean isInner; + + /** */ + @JsonProperty("status") + private StatusEnum status; + + public enum StatusEnum { + /** */ + PROCESSING("PROCESSING"), + /** */ + SUCCESS("SUCCESS"), + /** */ + FAILURE("FAILURE"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryOldReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryOldReq.java new file mode 100644 index 00000000..4a460b2c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryOldReq.java @@ -0,0 +1,71 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositHistoryOldReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Status. Available value: PROCESSING, SUCCESS, and FAILURE */ + @JsonProperty("status") + private StatusEnum status; + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + public enum StatusEnum { + /** */ + PROCESSING("PROCESSING"), + /** */ + SUCCESS("SUCCESS"), + /** */ + FAILURE("FAILURE"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryOldResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryOldResp.java new file mode 100644 index 00000000..b581fc43 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryOldResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositHistoryOldResp + implements Response> { + /** current page */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** page size */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** total number */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** total pages */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryReq.java new file mode 100644 index 00000000..876b8a83 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryReq.java @@ -0,0 +1,80 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositHistoryReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Status. Available value: PROCESSING, SUCCESS, and FAILURE */ + @JsonProperty("status") + private StatusEnum status; + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + /** Current request page. */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** Number of results per request. Minimum is 10, maximum is 500. */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 50; + + public enum StatusEnum { + /** Deposit processing */ + PROCESSING("PROCESSING"), + /** Deposit success */ + SUCCESS("SUCCESS"), + /** Deposit fail */ + FAILURE("FAILURE"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryResp.java new file mode 100644 index 00000000..edd63aec --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositHistoryResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.deposit; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositHistoryResp + implements Response> { + /** current page */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** page size */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** total number */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** total pages */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApi.java new file mode 100644 index 00000000..6a1d2095 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApi.java @@ -0,0 +1,35 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.fee; + +public interface FeeApi { + /** + * Get Basic Fee - Spot/Margin This interface is for the user’s spot/margin basic fee rate. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + */ + GetBasicFeeResp getBasicFee(GetBasicFeeReq req); + + /** + * Get Actual Fee - Spot/Margin 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + */ + GetSpotActualFeeResp getSpotActualFee(GetSpotActualFeeReq req); + + /** + * Get Actual Fee - Futures 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + */ + GetFuturesActualFeeResp getFuturesActualFee(GetFuturesActualFeeReq req); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApi.template new file mode 100644 index 00000000..7da22d02 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApi.template @@ -0,0 +1,53 @@ + + /** + * getBasicFee + * Get Basic Fee - Spot/Margin + * /api/v1/base-fee + */ + public void testGetBasicFee() { + GetBasicFeeReq.GetBasicFeeReqBuilder builder = GetBasicFeeReq.builder(); + builder.currencyType(?); + GetBasicFeeReq req = builder.build(); + GetBasicFeeResp resp = this.api.getBasicFee(req); + self::assertNotNull($resp->takerFeeRate); + self::assertNotNull($resp->makerFeeRate); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSpotActualFee + * Get Actual Fee - Spot/Margin + * /api/v1/trade-fees + */ + public void testGetSpotActualFee() { + GetSpotActualFeeReq.GetSpotActualFeeReqBuilder builder = GetSpotActualFeeReq.builder(); + builder.symbols(?); + GetSpotActualFeeReq req = builder.build(); + GetSpotActualFeeResp resp = this.api.getSpotActualFee(req); + foreach($resp->data as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->takerFeeRate); + self::assertNotNull($item->makerFeeRate); + self::assertNotNull($item->sellTaxRate); + self::assertNotNull($item->buyTaxRate); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getFuturesActualFee + * Get Actual Fee - Futures + * /api/v1/trade-fees + */ + public void testGetFuturesActualFee() { + GetFuturesActualFeeReq.GetFuturesActualFeeReqBuilder builder = GetFuturesActualFeeReq.builder(); + builder.symbol(?); + GetFuturesActualFeeReq req = builder.build(); + GetFuturesActualFeeResp resp = this.api.getFuturesActualFee(req); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->takerFeeRate); + self::assertNotNull($resp->makerFeeRate); + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApiAutoGeneratedTest.java new file mode 100644 index 00000000..48c70cf4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApiAutoGeneratedTest.java @@ -0,0 +1,107 @@ +package com.kucoin.universal.sdk.generate.account.fee; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class FeeApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** getBasicFee Request Get Basic Fee - Spot/Margin /api/v1/base-fee */ + public static void testGetBasicFeeRequest() throws Exception { + String data = "{\"currencyType\": 1}"; + GetBasicFeeReq obj = mapper.readValue(data, GetBasicFeeReq.class); + } + + /** getBasicFee Response Get Basic Fee - Spot/Margin /api/v1/base-fee */ + public static void testGetBasicFeeResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"takerFeeRate\": \"0.001\",\n" + + " \"makerFeeRate\": \"0.001\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getSpotActualFee Request Get Actual Fee - Spot/Margin /api/v1/trade-fees */ + public static void testGetSpotActualFeeRequest() throws Exception { + String data = "{\"symbols\": \"BTC-USDT,ETH-USDT\"}"; + GetSpotActualFeeReq obj = mapper.readValue(data, GetSpotActualFeeReq.class); + } + + /** getSpotActualFee Response Get Actual Fee - Spot/Margin /api/v1/trade-fees */ + public static void testGetSpotActualFeeResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":[{\"symbol\":\"BTC-USDT\",\"takerFeeRate\":\"0.001\",\"makerFeeRate\":\"0.001\"},{\"symbol\":\"ETH-USDT\",\"takerFeeRate\":\"0.001\",\"makerFeeRate\":\"0.001\"}]}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getFuturesActualFee Request Get Actual Fee - Futures /api/v1/trade-fees */ + public static void testGetFuturesActualFeeRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\"}"; + GetFuturesActualFeeReq obj = mapper.readValue(data, GetFuturesActualFeeReq.class); + } + + /** getFuturesActualFee Response Get Actual Fee - Futures /api/v1/trade-fees */ + public static void testGetFuturesActualFeeResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"symbol\":\"XBTUSDTM\",\"takerFeeRate\":\"0.0006\",\"makerFeeRate\":\"0.0002\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(FeeApiAutoGeneratedTest::testGetBasicFeeRequest, "testGetBasicFeeRequest"); + run(FeeApiAutoGeneratedTest::testGetBasicFeeResponse, "testGetBasicFeeResponse"); + run(FeeApiAutoGeneratedTest::testGetSpotActualFeeRequest, "testGetSpotActualFeeRequest"); + run(FeeApiAutoGeneratedTest::testGetSpotActualFeeResponse, "testGetSpotActualFeeResponse"); + run(FeeApiAutoGeneratedTest::testGetFuturesActualFeeRequest, "testGetFuturesActualFeeRequest"); + run( + FeeApiAutoGeneratedTest::testGetFuturesActualFeeResponse, + "testGetFuturesActualFeeResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApiImpl.java new file mode 100644 index 00000000..a239fdc6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApiImpl.java @@ -0,0 +1,28 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.fee; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class FeeApiImpl implements FeeApi { + private final Transport transport; + + public FeeApiImpl(Transport transport) { + this.transport = transport; + } + + public GetBasicFeeResp getBasicFee(GetBasicFeeReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v1/base-fee", req, GetBasicFeeResp.class, false); + } + + public GetSpotActualFeeResp getSpotActualFee(GetSpotActualFeeReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v1/trade-fees", req, GetSpotActualFeeResp.class, false); + } + + public GetFuturesActualFeeResp getFuturesActualFee(GetFuturesActualFeeReq req) { + return this.transport.call( + "futures", false, "get", "/api/v1/trade-fees", req, GetFuturesActualFeeResp.class, false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetBasicFeeReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetBasicFeeReq.java new file mode 100644 index 00000000..65f933b2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetBasicFeeReq.java @@ -0,0 +1,58 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.fee; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetBasicFeeReq implements Request { + /** Currency type: 0-crypto currency, 1-fiat currency. Default is 0-crypto currency */ + @JsonProperty("currencyType") + @Builder.Default + private CurrencyTypeEnum currencyType = CurrencyTypeEnum._0; + + public enum CurrencyTypeEnum { + /** cryptocurrency */ + _0(0), + /** fiat currency */ + _1(1); + + private final Integer value; + + CurrencyTypeEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CurrencyTypeEnum fromValue(Integer value) { + for (CurrencyTypeEnum b : CurrencyTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetBasicFeeResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetBasicFeeResp.java new file mode 100644 index 00000000..61c394bb --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetBasicFeeResp.java @@ -0,0 +1,34 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.fee; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetBasicFeeResp implements Response> { + /** Base taker fee rate */ + @JsonProperty("takerFeeRate") + private String takerFeeRate; + + /** Base maker fee rate */ + @JsonProperty("makerFeeRate") + private String makerFeeRate; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetFuturesActualFeeReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetFuturesActualFeeReq.java new file mode 100644 index 00000000..03b3ea48 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetFuturesActualFeeReq.java @@ -0,0 +1,24 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.fee; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFuturesActualFeeReq implements Request { + /** + * The unique identity of the trading pair; will not change even if the trading pair is renamed + */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetFuturesActualFeeResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetFuturesActualFeeResp.java new file mode 100644 index 00000000..003b5a07 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetFuturesActualFeeResp.java @@ -0,0 +1,41 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.fee; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFuturesActualFeeResp + implements Response> { + /** + * The unique identity of the trading pair; will not change even if the trading pair is renamed + */ + @JsonProperty("symbol") + private String symbol; + + /** Actual taker fee rate of the trading pair */ + @JsonProperty("takerFeeRate") + private String takerFeeRate; + + /** Actual maker fee rate of the trading pair */ + @JsonProperty("makerFeeRate") + private String makerFeeRate; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetSpotActualFeeData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetSpotActualFeeData.java new file mode 100644 index 00000000..4f6c4bf0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetSpotActualFeeData.java @@ -0,0 +1,37 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.fee; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotActualFeeData { + /** + * The unique identity of the trading pair; will not change even if the trading pair is renamed + */ + @JsonProperty("symbol") + private String symbol; + + /** Actual taker fee rate of the symbol */ + @JsonProperty("takerFeeRate") + private String takerFeeRate; + + /** Actual maker fee rate of the symbol */ + @JsonProperty("makerFeeRate") + private String makerFeeRate; + + /** Buy tax rate; this field is visible to users in certain countries */ + @JsonProperty("sellTaxRate") + private String sellTaxRate; + + /** Sell tax rate; this field is visible to users in certain countries */ + @JsonProperty("buyTaxRate") + private String buyTaxRate; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetSpotActualFeeReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetSpotActualFeeReq.java new file mode 100644 index 00000000..5ee20964 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetSpotActualFeeReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.fee; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotActualFeeReq implements Request { + /** Trading pair (optional; you can inquire fee rates of 10 trading pairs each time at most) */ + @JsonProperty("symbols") + private String symbols; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetSpotActualFeeResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetSpotActualFeeResp.java new file mode 100644 index 00000000..bc1718e9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetSpotActualFeeResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.fee; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotActualFeeResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetSpotActualFeeResp fromJson(List data) { + // original response + GetSpotActualFeeResp obj = new GetSpotActualFeeResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountApiReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountApiReq.java new file mode 100644 index 00000000..d2814ae1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountApiReq.java @@ -0,0 +1,89 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddSubAccountApiReq implements Request { + /** Password (Must contain 7–32 characters. Cannot contain any spaces.) */ + @JsonProperty("passphrase") + private String passphrase; + + /** Remarks (1–24 characters) */ + @JsonProperty("remark") + private String remark; + + /** + * [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\") + */ + @JsonProperty("permission") + @Builder.Default + private String permission = "General"; + + /** IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) */ + @JsonProperty("ipWhitelist") + private String ipWhitelist; + + /** API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 */ + @JsonProperty("expire") + @Builder.Default + private ExpireEnum expire = ExpireEnum._1; + + /** Sub-account name, create sub account name of API Key. */ + @JsonProperty("subName") + private String subName; + + public enum ExpireEnum { + /** */ + _1("-1"), + /** */ + _30("30"), + /** */ + _90("90"), + /** */ + _180("180"), + /** */ + _360("360"); + + private final String value; + + ExpireEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ExpireEnum fromValue(String value) { + for (ExpireEnum b : ExpireEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountApiResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountApiResp.java new file mode 100644 index 00000000..307c2d06 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountApiResp.java @@ -0,0 +1,63 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddSubAccountApiResp + implements Response> { + /** Sub-account name */ + @JsonProperty("subName") + private String subName; + + /** Remarks */ + @JsonProperty("remark") + private String remark; + + /** API Key */ + @JsonProperty("apiKey") + private String apiKey; + + /** API Secret Key */ + @JsonProperty("apiSecret") + private String apiSecret; + + /** API Version */ + @JsonProperty("apiVersion") + private Integer apiVersion; + + /** Password */ + @JsonProperty("passphrase") + private String passphrase; + + /** [Permissions](https://www.kucoin.com/docs-new/doc-338144) */ + @JsonProperty("permission") + private String permission; + + /** IP whitelist */ + @JsonProperty("ipWhitelist") + private String ipWhitelist; + + /** Time of event */ + @JsonProperty("createdAt") + private Long createdAt; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountFuturesPermissionReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountFuturesPermissionReq.java new file mode 100644 index 00000000..41f6c41b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountFuturesPermissionReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddSubAccountFuturesPermissionReq implements Request { + /** Sub account UID */ + @JsonProperty("uid") + private String uid; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountFuturesPermissionResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountFuturesPermissionResp.java new file mode 100644 index 00000000..0036984e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountFuturesPermissionResp.java @@ -0,0 +1,41 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddSubAccountFuturesPermissionResp + implements Response< + AddSubAccountFuturesPermissionResp, RestResponse> { + /** */ + @JsonProperty("data") + private Boolean data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static AddSubAccountFuturesPermissionResp fromJson(Boolean data) { + // original response + AddSubAccountFuturesPermissionResp obj = new AddSubAccountFuturesPermissionResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountMarginPermissionReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountMarginPermissionReq.java new file mode 100644 index 00000000..2918ce77 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountMarginPermissionReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddSubAccountMarginPermissionReq implements Request { + /** Sub account UID */ + @JsonProperty("uid") + private String uid; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountMarginPermissionResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountMarginPermissionResp.java new file mode 100644 index 00000000..136908af --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountMarginPermissionResp.java @@ -0,0 +1,41 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddSubAccountMarginPermissionResp + implements Response< + AddSubAccountMarginPermissionResp, RestResponse> { + /** */ + @JsonProperty("data") + private String data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static AddSubAccountMarginPermissionResp fromJson(String data) { + // original response + AddSubAccountMarginPermissionResp obj = new AddSubAccountMarginPermissionResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountReq.java new file mode 100644 index 00000000..d2168d95 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountReq.java @@ -0,0 +1,80 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddSubAccountReq implements Request { + /** + * Password (7–24 characters, must contain letters and numbers, cannot only contain numbers or + * include special characters) + */ + @JsonProperty("password") + private String password; + + /** Remarks (1–24 characters) */ + @JsonProperty("remarks") + private String remarks; + + /** + * Sub-account name (must contain 7–32 characters, at least one number and one letter. Cannot + * contain any spaces.) + */ + @JsonProperty("subName") + private String subName; + + /** + * Permission (types include Spot, Futures, Margin permissions, which can be used alone or in + * combination). + */ + @JsonProperty("access") + private AccessEnum access; + + public enum AccessEnum { + /** Spot Account */ + SPOT("Spot"), + /** Futures Account */ + FUTURES("Futures"), + /** Margin Account */ + MARGIN("Margin"); + + private final String value; + + AccessEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AccessEnum fromValue(String value) { + for (AccessEnum b : AccessEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountResp.java new file mode 100644 index 00000000..a4c7a684 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountResp.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddSubAccountResp + implements Response> { + /** Sub account user id */ + @JsonProperty("uid") + private Integer uid; + + /** Sub account name */ + @JsonProperty("subName") + private String subName; + + /** Sub account name */ + @JsonProperty("remarks") + private String remarks; + + /** permission */ + @JsonProperty("access") + private String access; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/DeleteSubAccountApiReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/DeleteSubAccountApiReq.java new file mode 100644 index 00000000..e40417dd --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/DeleteSubAccountApiReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class DeleteSubAccountApiReq implements Request { + /** API-Key */ + @JsonProperty("apiKey") + private String apiKey; + + /** Sub-account name. */ + @JsonProperty("subName") + private String subName; + + /** Password (password of the API key) */ + @JsonProperty("passphrase") + private String passphrase; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/DeleteSubAccountApiResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/DeleteSubAccountApiResp.java new file mode 100644 index 00000000..1f337073 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/DeleteSubAccountApiResp.java @@ -0,0 +1,35 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class DeleteSubAccountApiResp + implements Response> { + /** The username of a sub-user. */ + @JsonProperty("subName") + private String subName; + + /** The APIKEY of a sub-user. */ + @JsonProperty("apiKey") + private String apiKey; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetFuturesSubAccountListV2Accounts.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetFuturesSubAccountListV2Accounts.java new file mode 100644 index 00000000..edcf8987 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetFuturesSubAccountListV2Accounts.java @@ -0,0 +1,51 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFuturesSubAccountListV2Accounts { + /** Account name, main account is main */ + @JsonProperty("accountName") + private String accountName; + + /** */ + @JsonProperty("accountEquity") + private Double accountEquity; + + /** */ + @JsonProperty("unrealisedPNL") + private Double unrealisedPNL; + + /** */ + @JsonProperty("marginBalance") + private Double marginBalance; + + /** */ + @JsonProperty("positionMargin") + private Double positionMargin; + + /** */ + @JsonProperty("orderMargin") + private Double orderMargin; + + /** */ + @JsonProperty("frozenFunds") + private Double frozenFunds; + + /** */ + @JsonProperty("availableBalance") + private Double availableBalance; + + /** currency */ + @JsonProperty("currency") + private String currency; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetFuturesSubAccountListV2Req.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetFuturesSubAccountListV2Req.java new file mode 100644 index 00000000..524f471b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetFuturesSubAccountListV2Req.java @@ -0,0 +1,23 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFuturesSubAccountListV2Req implements Request { + /** Currency, Default XBT */ + @JsonProperty("currency") + @Builder.Default + private String currency = "XBT"; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetFuturesSubAccountListV2Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetFuturesSubAccountListV2Resp.java new file mode 100644 index 00000000..c4dcdd31 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetFuturesSubAccountListV2Resp.java @@ -0,0 +1,38 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFuturesSubAccountListV2Resp + implements Response< + GetFuturesSubAccountListV2Resp, RestResponse> { + /** */ + @JsonProperty("summary") + private GetFuturesSubAccountListV2Summary summary; + + /** Account List */ + @JsonProperty("accounts") + private List accounts = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetFuturesSubAccountListV2Summary.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetFuturesSubAccountListV2Summary.java new file mode 100644 index 00000000..8a3a6dbd --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetFuturesSubAccountListV2Summary.java @@ -0,0 +1,47 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFuturesSubAccountListV2Summary { + /** Total Account Equity */ + @JsonProperty("accountEquityTotal") + private Double accountEquityTotal; + + /** Total unrealizedPNL */ + @JsonProperty("unrealisedPNLTotal") + private Double unrealisedPNLTotal; + + /** Total Margin Balance */ + @JsonProperty("marginBalanceTotal") + private Double marginBalanceTotal; + + /** Total Position margin */ + @JsonProperty("positionMarginTotal") + private Double positionMarginTotal; + + /** */ + @JsonProperty("orderMarginTotal") + private Double orderMarginTotal; + + /** Total frozen funds for withdrawal and out-transfer */ + @JsonProperty("frozenFundsTotal") + private Double frozenFundsTotal; + + /** Total available balance */ + @JsonProperty("availableBalanceTotal") + private Double availableBalanceTotal; + + /** */ + @JsonProperty("currency") + private String currency; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailMainAccounts.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailMainAccounts.java new file mode 100644 index 00000000..489e2e3a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailMainAccounts.java @@ -0,0 +1,47 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountDetailMainAccounts { + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Total funds in an account. */ + @JsonProperty("balance") + private String balance; + + /** Funds available to withdraw or trade. */ + @JsonProperty("available") + private String available; + + /** Funds on hold (not available for use). */ + @JsonProperty("holds") + private String holds; + + /** Calculated on this currency. */ + @JsonProperty("baseCurrency") + private String baseCurrency; + + /** The base currency price. */ + @JsonProperty("baseCurrencyPrice") + private String baseCurrencyPrice; + + /** The base currency amount. */ + @JsonProperty("baseAmount") + private String baseAmount; + + /** */ + @JsonProperty("tag") + private String tag; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailMarginAccounts.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailMarginAccounts.java new file mode 100644 index 00000000..b45a214e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailMarginAccounts.java @@ -0,0 +1,47 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountDetailMarginAccounts { + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Total funds in an account. */ + @JsonProperty("balance") + private String balance; + + /** Funds available to withdraw or trade. */ + @JsonProperty("available") + private String available; + + /** Funds on hold (not available for use). */ + @JsonProperty("holds") + private String holds; + + /** Calculated on this currency. */ + @JsonProperty("baseCurrency") + private String baseCurrency; + + /** The base currency price. */ + @JsonProperty("baseCurrencyPrice") + private String baseCurrencyPrice; + + /** The base currency amount. */ + @JsonProperty("baseAmount") + private String baseAmount; + + /** */ + @JsonProperty("tag") + private String tag; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailReq.java new file mode 100644 index 00000000..632896e6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailReq.java @@ -0,0 +1,39 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountDetailReq implements Request { + /** the userID of a sub-account. */ + @JsonIgnore + @PathVar("subUserId") + @JsonProperty("subUserId") + private String subUserId; + + /** False: Do not display currencies with 0 assets; True: display all currencies */ + @JsonProperty("includeBaseAmount") + @Builder.Default + private Boolean includeBaseAmount = false; + + /** Specify the currency used to convert assets */ + @JsonProperty("baseCurrency") + private String baseCurrency; + + /** The currency balance specified must be greater than or equal to the amount */ + @JsonProperty("baseAmount") + private String baseAmount; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailResp.java new file mode 100644 index 00000000..d91a8cd2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailResp.java @@ -0,0 +1,53 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountDetailResp + implements Response> { + /** The user ID of a sub-user. */ + @JsonProperty("subUserId") + private String subUserId; + + /** The username of a sub-user. */ + @JsonProperty("subName") + private String subName; + + /** Funding Account */ + @JsonProperty("mainAccounts") + private List mainAccounts = new ArrayList<>(); + + /** Spot Account */ + @JsonProperty("tradeAccounts") + private List tradeAccounts = new ArrayList<>(); + + /** Margin Account */ + @JsonProperty("marginAccounts") + private List marginAccounts = new ArrayList<>(); + + /** This param is deprecated and only valid for some old users */ + @JsonProperty("tradeHFAccounts") + private List tradeHFAccounts = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailTradeAccounts.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailTradeAccounts.java new file mode 100644 index 00000000..cf28dea2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountDetailTradeAccounts.java @@ -0,0 +1,47 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountDetailTradeAccounts { + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Total funds in an account. */ + @JsonProperty("balance") + private String balance; + + /** Funds available to withdraw or trade. */ + @JsonProperty("available") + private String available; + + /** Funds on hold (not available for use). */ + @JsonProperty("holds") + private String holds; + + /** Calculated on this currency. */ + @JsonProperty("baseCurrency") + private String baseCurrency; + + /** The base currency price. */ + @JsonProperty("baseCurrencyPrice") + private String baseCurrencyPrice; + + /** The base currency amount. */ + @JsonProperty("baseAmount") + private String baseAmount; + + /** */ + @JsonProperty("tag") + private String tag; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1Data.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1Data.java new file mode 100644 index 00000000..4d94e203 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1Data.java @@ -0,0 +1,41 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountListV1Data { + /** The user ID of the sub-user. */ + @JsonProperty("subUserId") + private String subUserId; + + /** The username of the sub-user. */ + @JsonProperty("subName") + private String subName; + + /** Funding Account */ + @JsonProperty("mainAccounts") + private List mainAccounts = new ArrayList<>(); + + /** Spot Account */ + @JsonProperty("tradeAccounts") + private List tradeAccounts = new ArrayList<>(); + + /** Margin Account */ + @JsonProperty("marginAccounts") + private List marginAccounts = new ArrayList<>(); + + /** This param is deprecated and only valid for some old users */ + @JsonProperty("tradeHFAccounts") + private List tradeHFAccounts = new ArrayList<>(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1DataMainAccounts.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1DataMainAccounts.java new file mode 100644 index 00000000..fe852d23 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1DataMainAccounts.java @@ -0,0 +1,47 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountListV1DataMainAccounts { + /** The currency of the account. */ + @JsonProperty("currency") + private String currency; + + /** Total funds in the account. */ + @JsonProperty("balance") + private String balance; + + /** Funds available to withdraw or trade. */ + @JsonProperty("available") + private String available; + + /** Funds on hold (not available for use). */ + @JsonProperty("holds") + private String holds; + + /** Calculated on this currency. */ + @JsonProperty("baseCurrency") + private String baseCurrency; + + /** The base currency price. */ + @JsonProperty("baseCurrencyPrice") + private String baseCurrencyPrice; + + /** The base currency amount. */ + @JsonProperty("baseAmount") + private String baseAmount; + + /** */ + @JsonProperty("tag") + private String tag; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1DataMarginAccounts.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1DataMarginAccounts.java new file mode 100644 index 00000000..5549bd3b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1DataMarginAccounts.java @@ -0,0 +1,47 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountListV1DataMarginAccounts { + /** The currency of the account. */ + @JsonProperty("currency") + private String currency; + + /** Total funds in the account. */ + @JsonProperty("balance") + private String balance; + + /** Funds available to withdraw or trade. */ + @JsonProperty("available") + private String available; + + /** Funds on hold (not available for use). */ + @JsonProperty("holds") + private String holds; + + /** Calculated on this currency. */ + @JsonProperty("baseCurrency") + private String baseCurrency; + + /** The base currency price. */ + @JsonProperty("baseCurrencyPrice") + private String baseCurrencyPrice; + + /** The base currency amount. */ + @JsonProperty("baseAmount") + private String baseAmount; + + /** */ + @JsonProperty("tag") + private String tag; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1DataTradeAccounts.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1DataTradeAccounts.java new file mode 100644 index 00000000..bf2457e4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1DataTradeAccounts.java @@ -0,0 +1,47 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountListV1DataTradeAccounts { + /** The currency of the account. */ + @JsonProperty("currency") + private String currency; + + /** Total funds in the account. */ + @JsonProperty("balance") + private String balance; + + /** Funds available to withdraw or trade. */ + @JsonProperty("available") + private String available; + + /** Funds on hold (not available for use). */ + @JsonProperty("holds") + private String holds; + + /** Calculated on this currency. */ + @JsonProperty("baseCurrency") + private String baseCurrency; + + /** The base currency price. */ + @JsonProperty("baseCurrencyPrice") + private String baseCurrencyPrice; + + /** The base currency amount. */ + @JsonProperty("baseAmount") + private String baseAmount; + + /** */ + @JsonProperty("tag") + private String tag; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1Resp.java new file mode 100644 index 00000000..1aac8be6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1Resp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountListV1Resp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetSpotSubAccountListV1Resp fromJson(List data) { + // original response + GetSpotSubAccountListV1Resp obj = new GetSpotSubAccountListV1Resp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2Items.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2Items.java new file mode 100644 index 00000000..ee50beb0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2Items.java @@ -0,0 +1,41 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountListV2Items { + /** The user ID of the sub-user. */ + @JsonProperty("subUserId") + private String subUserId; + + /** The username of the sub-user. */ + @JsonProperty("subName") + private String subName; + + /** Funding Account */ + @JsonProperty("mainAccounts") + private List mainAccounts = new ArrayList<>(); + + /** Spot Account */ + @JsonProperty("tradeAccounts") + private List tradeAccounts = new ArrayList<>(); + + /** Margin Account */ + @JsonProperty("marginAccounts") + private List marginAccounts = new ArrayList<>(); + + /** This param is deprecated and only valid for some old users */ + @JsonProperty("tradeHFAccounts") + private List tradeHFAccounts = new ArrayList<>(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2ItemsMainAccounts.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2ItemsMainAccounts.java new file mode 100644 index 00000000..78e0b304 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2ItemsMainAccounts.java @@ -0,0 +1,47 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountListV2ItemsMainAccounts { + /** The currency of the account. */ + @JsonProperty("currency") + private String currency; + + /** Total funds in the account. */ + @JsonProperty("balance") + private String balance; + + /** Funds available to withdraw or trade. */ + @JsonProperty("available") + private String available; + + /** Funds on hold (not available for use). */ + @JsonProperty("holds") + private String holds; + + /** Calculated on this currency. */ + @JsonProperty("baseCurrency") + private String baseCurrency; + + /** The base currency price. */ + @JsonProperty("baseCurrencyPrice") + private String baseCurrencyPrice; + + /** The base currency amount. */ + @JsonProperty("baseAmount") + private String baseAmount; + + /** */ + @JsonProperty("tag") + private String tag; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2ItemsMarginAccounts.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2ItemsMarginAccounts.java new file mode 100644 index 00000000..74449cc4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2ItemsMarginAccounts.java @@ -0,0 +1,47 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountListV2ItemsMarginAccounts { + /** The currency of the account. */ + @JsonProperty("currency") + private String currency; + + /** Total funds in the account. */ + @JsonProperty("balance") + private String balance; + + /** Funds available to withdraw or trade. */ + @JsonProperty("available") + private String available; + + /** Funds on hold (not available for use). */ + @JsonProperty("holds") + private String holds; + + /** Calculated on this currency. */ + @JsonProperty("baseCurrency") + private String baseCurrency; + + /** The base currency price. */ + @JsonProperty("baseCurrencyPrice") + private String baseCurrencyPrice; + + /** The base currency amount. */ + @JsonProperty("baseAmount") + private String baseAmount; + + /** */ + @JsonProperty("tag") + private String tag; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2ItemsTradeAccounts.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2ItemsTradeAccounts.java new file mode 100644 index 00000000..886646b4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2ItemsTradeAccounts.java @@ -0,0 +1,47 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountListV2ItemsTradeAccounts { + /** The currency of the account. */ + @JsonProperty("currency") + private String currency; + + /** Total funds in the account. */ + @JsonProperty("balance") + private String balance; + + /** Funds available to withdraw or trade. */ + @JsonProperty("available") + private String available; + + /** Funds on hold (not available for use). */ + @JsonProperty("holds") + private String holds; + + /** Calculated on this currency. */ + @JsonProperty("baseCurrency") + private String baseCurrency; + + /** The base currency price. */ + @JsonProperty("baseCurrencyPrice") + private String baseCurrencyPrice; + + /** The base currency amount. */ + @JsonProperty("baseAmount") + private String baseAmount; + + /** */ + @JsonProperty("tag") + private String tag; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2Req.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2Req.java new file mode 100644 index 00000000..c2a4d8c5 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2Req.java @@ -0,0 +1,28 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountListV2Req implements Request { + /** Current request page. Default is 1 */ + @JsonProperty("currentPage") + @Builder.Default + private Integer currentPage = 1; + + /** Number of results per request. Minimum is 10, maximum is 100, default is 10. */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 10; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2Resp.java new file mode 100644 index 00000000..48b3c137 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV2Resp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountListV2Resp + implements Response> { + /** */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV1Data.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV1Data.java new file mode 100644 index 00000000..c48b8f7f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV1Data.java @@ -0,0 +1,39 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountsSummaryV1Data { + /** */ + @JsonProperty("userId") + private String userId; + + /** */ + @JsonProperty("uid") + private Integer uid; + + /** */ + @JsonProperty("subName") + private String subName; + + /** */ + @JsonProperty("type") + private Integer type; + + /** */ + @JsonProperty("remarks") + private String remarks; + + /** Sub-account Permission */ + @JsonProperty("access") + private String access; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV1Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV1Resp.java new file mode 100644 index 00000000..6b4beae8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV1Resp.java @@ -0,0 +1,44 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountsSummaryV1Resp + implements Response< + GetSpotSubAccountsSummaryV1Resp, RestResponse> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetSpotSubAccountsSummaryV1Resp fromJson( + List data) { + // original response + GetSpotSubAccountsSummaryV1Resp obj = new GetSpotSubAccountsSummaryV1Resp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV2Items.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV2Items.java new file mode 100644 index 00000000..994c553c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV2Items.java @@ -0,0 +1,136 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountsSummaryV2Items { + /** Sub-account User ID */ + @JsonProperty("userId") + private String userId; + + /** Sub-account UID */ + @JsonProperty("uid") + private Integer uid; + + /** Sub-account name */ + @JsonProperty("subName") + private String subName; + + /** Sub-account; 2:Enable, 3:Frozen */ + @JsonProperty("status") + private StatusEnum status; + + /** Sub-account type */ + @JsonProperty("type") + private TypeEnum type; + + /** Sub-account Permission */ + @JsonProperty("access") + private String access; + + /** Time of event */ + @JsonProperty("createdAt") + private Long createdAt; + + /** Remarks */ + @JsonProperty("remarks") + private String remarks; + + /** Sub-account Permissions */ + @JsonProperty("tradeTypes") + private List tradeTypes = new ArrayList<>(); + + /** + * 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. + */ + @JsonProperty("openedTradeTypes") + private List openedTradeTypes = new ArrayList<>(); + + /** */ + @JsonProperty("hostedStatus") + private String hostedStatus; + + public enum StatusEnum { + /** Enable */ + _2(2), + /** Frozen */ + _3(3); + + private final Integer value; + + StatusEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(Integer value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** Normal sub-account */ + NORMAL(0), + /** Robot sub-account */ + ROBOT(1), + /** New financial sub-account */ + NOVICE(2), + /** Asset management sub-account */ + HOSTED(5); + + private final Integer value; + + TypeEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(Integer value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV2Req.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV2Req.java new file mode 100644 index 00000000..c82fd116 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV2Req.java @@ -0,0 +1,27 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountsSummaryV2Req implements Request { + /** Current request page. Default is 1 */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** Number of results per request. Minimum is 1, maximum is 100, default is 10. */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 10; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV2Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV2Resp.java new file mode 100644 index 00000000..894cdc1b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountsSummaryV2Resp.java @@ -0,0 +1,50 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotSubAccountsSummaryV2Resp + implements Response< + GetSpotSubAccountsSummaryV2Resp, RestResponse> { + /** Current request page */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** Number of results per request. Minimum is 1, maximum is 100 */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** Total number of messages */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** Total number of pages */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSubAccountApiListData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSubAccountApiListData.java new file mode 100644 index 00000000..a462cc6a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSubAccountApiListData.java @@ -0,0 +1,51 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSubAccountApiListData { + /** Sub Name */ + @JsonProperty("subName") + private String subName; + + /** Remarks */ + @JsonProperty("remark") + private String remark; + + /** API Key */ + @JsonProperty("apiKey") + private String apiKey; + + /** API Version */ + @JsonProperty("apiVersion") + private Integer apiVersion; + + /** [Permissions](https://www.kucoin.com/docs-new/doc-338144) */ + @JsonProperty("permission") + private String permission; + + /** IP whitelist */ + @JsonProperty("ipWhitelist") + private String ipWhitelist; + + /** Apikey create time */ + @JsonProperty("createdAt") + private Long createdAt; + + /** Sub-account UID */ + @JsonProperty("uid") + private Integer uid; + + /** Whether it is the master account. */ + @JsonProperty("isMaster") + private Boolean isMaster; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSubAccountApiListReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSubAccountApiListReq.java new file mode 100644 index 00000000..f79505ae --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSubAccountApiListReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSubAccountApiListReq implements Request { + /** API-Key */ + @JsonProperty("apiKey") + private String apiKey; + + /** Sub-account name. */ + @JsonProperty("subName") + private String subName; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSubAccountApiListResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSubAccountApiListResp.java new file mode 100644 index 00000000..d35e802f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSubAccountApiListResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSubAccountApiListResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetSubAccountApiListResp fromJson(List data) { + // original response + GetSubAccountApiListResp obj = new GetSubAccountApiListResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/ModifySubAccountApiReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/ModifySubAccountApiReq.java new file mode 100644 index 00000000..b0b001d3 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/ModifySubAccountApiReq.java @@ -0,0 +1,89 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifySubAccountApiReq implements Request { + /** Password (Must contain 7–32 characters. Cannot contain any spaces.) */ + @JsonProperty("passphrase") + private String passphrase; + + /** + * [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\") + */ + @JsonProperty("permission") + @Builder.Default + private String permission = "General"; + + /** IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) */ + @JsonProperty("ipWhitelist") + private String ipWhitelist; + + /** API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 */ + @JsonProperty("expire") + @Builder.Default + private ExpireEnum expire = ExpireEnum._1; + + /** Sub-account name, create sub account name of API Key. */ + @JsonProperty("subName") + private String subName; + + /** API-Key (Sub-account APIKey) */ + @JsonProperty("apiKey") + private String apiKey; + + public enum ExpireEnum { + /** */ + _1("-1"), + /** */ + _30("30"), + /** */ + _90("90"), + /** */ + _180("180"), + /** */ + _360("360"); + + private final String value; + + ExpireEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ExpireEnum fromValue(String value) { + for (ExpireEnum b : ExpireEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/ModifySubAccountApiResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/ModifySubAccountApiResp.java new file mode 100644 index 00000000..6b422186 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/ModifySubAccountApiResp.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifySubAccountApiResp + implements Response> { + /** Sub-account name */ + @JsonProperty("subName") + private String subName; + + /** API Key */ + @JsonProperty("apiKey") + private String apiKey; + + /** [Permissions](https://www.kucoin.com/docs-new/doc-338144) */ + @JsonProperty("permission") + private String permission; + + /** IP whitelist */ + @JsonProperty("ipWhitelist") + private String ipWhitelist; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.java new file mode 100644 index 00000000..e6bc6ef6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.java @@ -0,0 +1,148 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +public interface SubAccountApi { + /** + * Add sub-account This endpoint can be used to create sub-accounts. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+------------+ + */ + AddSubAccountResp addSubAccount(AddSubAccountReq req); + + /** + * Add sub-account Margin Permission 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. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+------------+ + */ + AddSubAccountMarginPermissionResp addSubAccountMarginPermission( + AddSubAccountMarginPermissionReq req); + + /** + * Add sub-account Futures Permission 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. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+------------+ + */ + AddSubAccountFuturesPermissionResp addSubAccountFuturesPermission( + AddSubAccountFuturesPermissionReq req); + + /** + * Get sub-account List - Summary Info This endpoint can be used to get a paginated list of + * sub-accounts. Pagination is required. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ + */ + GetSpotSubAccountsSummaryV2Resp getSpotSubAccountsSummaryV2(GetSpotSubAccountsSummaryV2Req req); + + /** + * Get sub-account Detail - Balance This endpoint returns the account info of a sub-user specified + * by the subUserId. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+------------+ + */ + GetSpotSubAccountDetailResp getSpotSubAccountDetail(GetSpotSubAccountDetailReq req); + + /** + * Get sub-account List - Spot Balance (V2) This endpoint can be used to get paginated Spot + * sub-account information. Pagination is required. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ + */ + GetSpotSubAccountListV2Resp getSpotSubAccountListV2(GetSpotSubAccountListV2Req req); + + /** + * Get sub-account List - Futures Balance (V2) This endpoint can be used to get Futures + * sub-account information. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 6 | + * +-----------------------+---------+ + */ + GetFuturesSubAccountListV2Resp getFuturesSubAccountListV2(GetFuturesSubAccountListV2Req req); + + /** + * Add sub-account API This endpoint can be used to create APIs for sub-accounts. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ + */ + AddSubAccountApiResp addSubAccountApi(AddSubAccountApiReq req); + + /** + * Modify sub-account API This endpoint can be used to modify sub-account APIs. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 30 | + * +-----------------------+------------+ + */ + ModifySubAccountApiResp modifySubAccountApi(ModifySubAccountApiReq req); + + /** + * Get sub-account API List This endpoint can be used to obtain a list of APIs pertaining to a + * sub-account (not including ND broker sub-accounts). docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ + */ + GetSubAccountApiListResp getSubAccountApiList(GetSubAccountApiListReq req); + + /** + * Delete sub-account API This endpoint can be used to delete sub-account APIs. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 30 | + * +-----------------------+------------+ + */ + DeleteSubAccountApiResp deleteSubAccountApi(DeleteSubAccountApiReq req); + + /** + * Get sub-account List - Summary Info (V1) 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 + * + * @deprecated docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | + * 20 | +-----------------------+------------+ + */ + GetSpotSubAccountsSummaryV1Resp getSpotSubAccountsSummaryV1(); + + /** + * Get sub-account List - Spot Balance (V1) This endpoint returns the account info of all + * sub-users. + * + * @deprecated docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | + * 20 | +-----------------------+------------+ + */ + GetSpotSubAccountListV1Resp getSpotSubAccountListV1(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.template new file mode 100644 index 00000000..1a19f14d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.template @@ -0,0 +1,297 @@ + + /** + * addSubAccount + * Add sub-account + * /api/v2/sub/user/created + */ + public void testAddSubAccount() { + AddSubAccountReq.AddSubAccountReqBuilder builder = AddSubAccountReq.builder(); + builder.password(?).remarks(?).subName(?).access(?); + AddSubAccountReq req = builder.build(); + AddSubAccountResp resp = this.api.addSubAccount(req); + self::assertNotNull($resp->uid); + self::assertNotNull($resp->subName); + self::assertNotNull($resp->remarks); + self::assertNotNull($resp->access); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addSubAccountMarginPermission + * Add sub-account Margin Permission + * /api/v3/sub/user/margin/enable + */ + public void testAddSubAccountMarginPermission() { + AddSubAccountMarginPermissionReq.AddSubAccountMarginPermissionReqBuilder builder = AddSubAccountMarginPermissionReq.builder(); + builder.uid(?); + AddSubAccountMarginPermissionReq req = builder.build(); + AddSubAccountMarginPermissionResp resp = this.api.addSubAccountMarginPermission(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addSubAccountFuturesPermission + * Add sub-account Futures Permission + * /api/v3/sub/user/futures/enable + */ + public void testAddSubAccountFuturesPermission() { + AddSubAccountFuturesPermissionReq.AddSubAccountFuturesPermissionReqBuilder builder = AddSubAccountFuturesPermissionReq.builder(); + builder.uid(?); + AddSubAccountFuturesPermissionReq req = builder.build(); + AddSubAccountFuturesPermissionResp resp = this.api.addSubAccountFuturesPermission(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSpotSubAccountsSummaryV2 + * Get sub-account List - Summary Info + * /api/v2/sub/user + */ + public void testGetSpotSubAccountsSummaryV2() { + GetSpotSubAccountsSummaryV2Req.GetSpotSubAccountsSummaryV2ReqBuilder builder = GetSpotSubAccountsSummaryV2Req.builder(); + builder.currentPage(?).pageSize(?); + GetSpotSubAccountsSummaryV2Req req = builder.build(); + GetSpotSubAccountsSummaryV2Resp resp = this.api.getSpotSubAccountsSummaryV2(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->userId); + self::assertNotNull($item->uid); + self::assertNotNull($item->subName); + self::assertNotNull($item->status); + self::assertNotNull($item->type); + self::assertNotNull($item->access); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->remarks); + self::assertNotNull($item->tradeTypes); + self::assertNotNull($item->openedTradeTypes); + self::assertNotNull($item->hostedStatus); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSpotSubAccountDetail + * Get sub-account Detail - Balance + * /api/v1/sub-accounts/{subUserId} + */ + public void testGetSpotSubAccountDetail() { + GetSpotSubAccountDetailReq.GetSpotSubAccountDetailReqBuilder builder = GetSpotSubAccountDetailReq.builder(); + builder.subUserId(?).includeBaseAmount(?).baseCurrency(?).baseAmount(?); + GetSpotSubAccountDetailReq req = builder.build(); + GetSpotSubAccountDetailResp resp = this.api.getSpotSubAccountDetail(req); + self::assertNotNull($resp->subUserId); + self::assertNotNull($resp->subName); + foreach($resp->mainAccounts as $item) { + self::assertNotNull($item->currency); + self::assertNotNull($item->balance); + self::assertNotNull($item->available); + self::assertNotNull($item->holds); + self::assertNotNull($item->baseCurrency); + self::assertNotNull($item->baseCurrencyPrice); + self::assertNotNull($item->baseAmount); + self::assertNotNull($item->tag); + } + + foreach($resp->tradeAccounts as $item) { + self::assertNotNull($item->currency); + self::assertNotNull($item->balance); + self::assertNotNull($item->available); + self::assertNotNull($item->holds); + self::assertNotNull($item->baseCurrency); + self::assertNotNull($item->baseCurrencyPrice); + self::assertNotNull($item->baseAmount); + self::assertNotNull($item->tag); + } + + foreach($resp->marginAccounts as $item) { + self::assertNotNull($item->currency); + self::assertNotNull($item->balance); + self::assertNotNull($item->available); + self::assertNotNull($item->holds); + self::assertNotNull($item->baseCurrency); + self::assertNotNull($item->baseCurrencyPrice); + self::assertNotNull($item->baseAmount); + self::assertNotNull($item->tag); + } + + foreach($resp->tradeHFAccounts as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSpotSubAccountListV2 + * Get sub-account List - Spot Balance (V2) + * /api/v2/sub-accounts + */ + public void testGetSpotSubAccountListV2() { + GetSpotSubAccountListV2Req.GetSpotSubAccountListV2ReqBuilder builder = GetSpotSubAccountListV2Req.builder(); + builder.currentPage(?).pageSize(?); + GetSpotSubAccountListV2Req req = builder.build(); + GetSpotSubAccountListV2Resp resp = this.api.getSpotSubAccountListV2(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->subUserId); + self::assertNotNull($item->subName); + self::assertNotNull($item->mainAccounts); + self::assertNotNull($item->tradeAccounts); + self::assertNotNull($item->marginAccounts); + self::assertNotNull($item->tradeHFAccounts); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getFuturesSubAccountListV2 + * Get sub-account List - Futures Balance (V2) + * /api/v1/account-overview-all + */ + public void testGetFuturesSubAccountListV2() { + GetFuturesSubAccountListV2Req.GetFuturesSubAccountListV2ReqBuilder builder = GetFuturesSubAccountListV2Req.builder(); + builder.currency(?); + GetFuturesSubAccountListV2Req req = builder.build(); + GetFuturesSubAccountListV2Resp resp = this.api.getFuturesSubAccountListV2(req); + self::assertNotNull($resp->summary); + foreach($resp->accounts as $item) { + self::assertNotNull($item->accountName); + self::assertNotNull($item->accountEquity); + self::assertNotNull($item->unrealisedPNL); + self::assertNotNull($item->marginBalance); + self::assertNotNull($item->positionMargin); + self::assertNotNull($item->orderMargin); + self::assertNotNull($item->frozenFunds); + self::assertNotNull($item->availableBalance); + self::assertNotNull($item->currency); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addSubAccountApi + * Add sub-account API + * /api/v1/sub/api-key + */ + public void testAddSubAccountApi() { + AddSubAccountApiReq.AddSubAccountApiReqBuilder builder = AddSubAccountApiReq.builder(); + builder.passphrase(?).remark(?).permission(?).ipWhitelist(?).expire(?).subName(?); + AddSubAccountApiReq req = builder.build(); + AddSubAccountApiResp resp = this.api.addSubAccountApi(req); + self::assertNotNull($resp->subName); + self::assertNotNull($resp->remark); + self::assertNotNull($resp->apiKey); + self::assertNotNull($resp->apiSecret); + self::assertNotNull($resp->apiVersion); + self::assertNotNull($resp->passphrase); + self::assertNotNull($resp->permission); + self::assertNotNull($resp->ipWhitelist); + self::assertNotNull($resp->createdAt); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * modifySubAccountApi + * Modify sub-account API + * /api/v1/sub/api-key/update + */ + public void testModifySubAccountApi() { + ModifySubAccountApiReq.ModifySubAccountApiReqBuilder builder = ModifySubAccountApiReq.builder(); + builder.passphrase(?).permission(?).ipWhitelist(?).expire(?).subName(?).apiKey(?); + ModifySubAccountApiReq req = builder.build(); + ModifySubAccountApiResp resp = this.api.modifySubAccountApi(req); + self::assertNotNull($resp->subName); + self::assertNotNull($resp->apiKey); + self::assertNotNull($resp->permission); + self::assertNotNull($resp->ipWhitelist); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSubAccountApiList + * Get sub-account API List + * /api/v1/sub/api-key + */ + public void testGetSubAccountApiList() { + GetSubAccountApiListReq.GetSubAccountApiListReqBuilder builder = GetSubAccountApiListReq.builder(); + builder.apiKey(?).subName(?); + GetSubAccountApiListReq req = builder.build(); + GetSubAccountApiListResp resp = this.api.getSubAccountApiList(req); + foreach($resp->data as $item) { + self::assertNotNull($item->subName); + self::assertNotNull($item->remark); + self::assertNotNull($item->apiKey); + self::assertNotNull($item->apiVersion); + self::assertNotNull($item->permission); + self::assertNotNull($item->ipWhitelist); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->uid); + self::assertNotNull($item->isMaster); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * deleteSubAccountApi + * Delete sub-account API + * /api/v1/sub/api-key + */ + public void testDeleteSubAccountApi() { + DeleteSubAccountApiReq.DeleteSubAccountApiReqBuilder builder = DeleteSubAccountApiReq.builder(); + builder.apiKey(?).subName(?).passphrase(?); + DeleteSubAccountApiReq req = builder.build(); + DeleteSubAccountApiResp resp = this.api.deleteSubAccountApi(req); + self::assertNotNull($resp->subName); + self::assertNotNull($resp->apiKey); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSpotSubAccountsSummaryV1 + * Get sub-account List - Summary Info (V1) + * /api/v1/sub/user + */ + public void testGetSpotSubAccountsSummaryV1() { + GetSpotSubAccountsSummaryV1Resp resp = this.api.getSpotSubAccountsSummaryV1(); + foreach($resp->data as $item) { + self::assertNotNull($item->userId); + self::assertNotNull($item->uid); + self::assertNotNull($item->subName); + self::assertNotNull($item->type); + self::assertNotNull($item->remarks); + self::assertNotNull($item->access); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSpotSubAccountListV1 + * Get sub-account List - Spot Balance (V1) + * /api/v1/sub-accounts + */ + public void testGetSpotSubAccountListV1() { + GetSpotSubAccountListV1Resp resp = this.api.getSpotSubAccountListV1(); + foreach($resp->data as $item) { + self::assertNotNull($item->subUserId); + self::assertNotNull($item->subName); + self::assertNotNull($item->mainAccounts); + self::assertNotNull($item->tradeAccounts); + self::assertNotNull($item->marginAccounts); + self::assertNotNull($item->tradeHFAccounts); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiAutoGeneratedTest.java new file mode 100644 index 00000000..c9e38655 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiAutoGeneratedTest.java @@ -0,0 +1,689 @@ +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class SubAccountApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** addSubAccount Request Add sub-account /api/v2/sub/user/created */ + public static void testAddSubAccountRequest() throws Exception { + String data = + "{\"password\": \"q1234567\", \"access\": \"Spot\", \"subName\": \"subNameTest1\"," + + " \"remarks\": \"TheRemark\"}"; + AddSubAccountReq obj = mapper.readValue(data, AddSubAccountReq.class); + } + + /** addSubAccount Response Add sub-account /api/v2/sub/user/created */ + public static void testAddSubAccountResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"uid\": 245730746,\n" + + " \"subName\": \"subNameTest1\",\n" + + " \"remarks\": \"TheRemark\",\n" + + " \"access\": \"Spot\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * addSubAccountMarginPermission Request Add sub-account Margin Permission + * /api/v3/sub/user/margin/enable + */ + public static void testAddSubAccountMarginPermissionRequest() throws Exception { + String data = "{\"uid\": \"169579801\"}"; + AddSubAccountMarginPermissionReq obj = + mapper.readValue(data, AddSubAccountMarginPermissionReq.class); + } + + /** + * addSubAccountMarginPermission Response Add sub-account Margin Permission + * /api/v3/sub/user/margin/enable + */ + public static void testAddSubAccountMarginPermissionResponse() throws Exception { + String data = "{\n \"code\": \"200000\",\n \"data\": null\n}"; + RestResponse resp = + mapper.readValue( + data, new TypeReference>() {}); + } + + /** + * addSubAccountFuturesPermission Request Add sub-account Futures Permission + * /api/v3/sub/user/futures/enable + */ + public static void testAddSubAccountFuturesPermissionRequest() throws Exception { + String data = "{\"uid\": \"169579801\"}"; + AddSubAccountFuturesPermissionReq obj = + mapper.readValue(data, AddSubAccountFuturesPermissionReq.class); + } + + /** + * addSubAccountFuturesPermission Response Add sub-account Futures Permission + * /api/v3/sub/user/futures/enable + */ + public static void testAddSubAccountFuturesPermissionResponse() throws Exception { + String data = "{\n \"code\": \"200000\",\n \"data\": null\n}"; + RestResponse resp = + mapper.readValue( + data, new TypeReference>() {}); + } + + /** getSpotSubAccountsSummaryV2 Request Get sub-account List - Summary Info /api/v2/sub/user */ + public static void testGetSpotSubAccountsSummaryV2Request() throws Exception { + String data = "{\"currentPage\": 1, \"pageSize\": 10}"; + GetSpotSubAccountsSummaryV2Req obj = + mapper.readValue(data, GetSpotSubAccountsSummaryV2Req.class); + } + + /** getSpotSubAccountsSummaryV2 Response Get sub-account List - Summary Info /api/v2/sub/user */ + public static void testGetSpotSubAccountsSummaryV2Response() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue( + data, new TypeReference>() {}); + } + + /** + * getSpotSubAccountDetail Request Get sub-account Detail - Balance + * /api/v1/sub-accounts/{subUserId} + */ + public static void testGetSpotSubAccountDetailRequest() throws Exception { + String data = + "{\"subUserId\": \"63743f07e0c5230001761d08\", \"includeBaseAmount\": true," + + " \"baseCurrency\": \"example_string_default_value\", \"baseAmount\":" + + " \"example_string_default_value\"}"; + GetSpotSubAccountDetailReq obj = mapper.readValue(data, GetSpotSubAccountDetailReq.class); + } + + /** + * getSpotSubAccountDetail Response Get sub-account Detail - Balance + * /api/v1/sub-accounts/{subUserId} + */ + public static void testGetSpotSubAccountDetailResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * getSpotSubAccountListV2 Request Get sub-account List - Spot Balance (V2) /api/v2/sub-accounts + */ + public static void testGetSpotSubAccountListV2Request() throws Exception { + String data = "{\"currentPage\": 1, \"pageSize\": 10}"; + GetSpotSubAccountListV2Req obj = mapper.readValue(data, GetSpotSubAccountListV2Req.class); + } + + /** + * getSpotSubAccountListV2 Response Get sub-account List - Spot Balance (V2) /api/v2/sub-accounts + */ + public static void testGetSpotSubAccountListV2Response() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * getFuturesSubAccountListV2 Request Get sub-account List - Futures Balance (V2) + * /api/v1/account-overview-all + */ + public static void testGetFuturesSubAccountListV2Request() throws Exception { + String data = "{\"currency\": \"USDT\"}"; + GetFuturesSubAccountListV2Req obj = mapper.readValue(data, GetFuturesSubAccountListV2Req.class); + } + + /** + * getFuturesSubAccountListV2 Response Get sub-account List - Futures Balance (V2) + * /api/v1/account-overview-all + */ + public static void testGetFuturesSubAccountListV2Response() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue( + data, new TypeReference>() {}); + } + + /** addSubAccountApi Request Add sub-account API /api/v1/sub/api-key */ + public static void testAddSubAccountApiRequest() throws Exception { + String data = + "{\"subName\": \"testapi6\", \"passphrase\": \"11223344\", \"remark\": \"TheRemark\"," + + " \"permission\": \"General,Spot,Futures\"}"; + AddSubAccountApiReq obj = mapper.readValue(data, AddSubAccountApiReq.class); + } + + /** addSubAccountApi Response Add sub-account API /api/v1/sub/api-key */ + public static void testAddSubAccountApiResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** modifySubAccountApi Request Modify sub-account API /api/v1/sub/api-key/update */ + public static void testModifySubAccountApiRequest() throws Exception { + String data = + "{\"subName\": \"testapi6\", \"apiKey\": \"670621e3a25958000159c82f\", \"passphrase\":" + + " \"11223344\", \"permission\": \"General,Spot,Futures\"}"; + ModifySubAccountApiReq obj = mapper.readValue(data, ModifySubAccountApiReq.class); + } + + /** modifySubAccountApi Response Modify sub-account API /api/v1/sub/api-key/update */ + public static void testModifySubAccountApiResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"subName\": \"testapi6\",\n" + + " \"apiKey\": \"670621e3a25958000159c82f\",\n" + + " \"permission\": \"General,Futures,Spot\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getSubAccountApiList Request Get sub-account API List /api/v1/sub/api-key */ + public static void testGetSubAccountApiListRequest() throws Exception { + String data = "{\"apiKey\": \"example_string_default_value\", \"subName\": \"testapi6\"}"; + GetSubAccountApiListReq obj = mapper.readValue(data, GetSubAccountApiListReq.class); + } + + /** getSubAccountApiList Response Get sub-account API List /api/v1/sub/api-key */ + public static void testGetSubAccountApiListResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** deleteSubAccountApi Request Delete sub-account API /api/v1/sub/api-key */ + public static void testDeleteSubAccountApiRequest() throws Exception { + String data = + "{\"apiKey\": \"670621e3a25958000159c82f\", \"subName\": \"testapi6\", \"passphrase\":" + + " \"11223344\"}"; + DeleteSubAccountApiReq obj = mapper.readValue(data, DeleteSubAccountApiReq.class); + } + + /** deleteSubAccountApi Response Delete sub-account API /api/v1/sub/api-key */ + public static void testDeleteSubAccountApiResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"subName\":\"testapi6\",\"apiKey\":\"670621e3a25958000159c82f\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * getSpotSubAccountsSummaryV1 Request Get sub-account List - Summary Info (V1) /api/v1/sub/user + */ + public static void testGetSpotSubAccountsSummaryV1Request() throws Exception { + // $this->assertTrue(true); + } + + /** + * getSpotSubAccountsSummaryV1 Response Get sub-account List - Summary Info (V1) /api/v1/sub/user + */ + public static void testGetSpotSubAccountsSummaryV1Response() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue( + data, new TypeReference>() {}); + } + + /** + * getSpotSubAccountListV1 Request Get sub-account List - Spot Balance (V1) /api/v1/sub-accounts + */ + public static void testGetSpotSubAccountListV1Request() throws Exception { + // $this->assertTrue(true); + } + + /** + * getSpotSubAccountListV1 Response Get sub-account List - Spot Balance (V1) /api/v1/sub-accounts + */ + public static void testGetSpotSubAccountListV1Response() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(SubAccountApiAutoGeneratedTest::testAddSubAccountRequest, "testAddSubAccountRequest"); + run(SubAccountApiAutoGeneratedTest::testAddSubAccountResponse, "testAddSubAccountResponse"); + run( + SubAccountApiAutoGeneratedTest::testAddSubAccountMarginPermissionRequest, + "testAddSubAccountMarginPermissionRequest"); + run( + SubAccountApiAutoGeneratedTest::testAddSubAccountMarginPermissionResponse, + "testAddSubAccountMarginPermissionResponse"); + run( + SubAccountApiAutoGeneratedTest::testAddSubAccountFuturesPermissionRequest, + "testAddSubAccountFuturesPermissionRequest"); + run( + SubAccountApiAutoGeneratedTest::testAddSubAccountFuturesPermissionResponse, + "testAddSubAccountFuturesPermissionResponse"); + run( + SubAccountApiAutoGeneratedTest::testGetSpotSubAccountsSummaryV2Request, + "testGetSpotSubAccountsSummaryV2Request"); + run( + SubAccountApiAutoGeneratedTest::testGetSpotSubAccountsSummaryV2Response, + "testGetSpotSubAccountsSummaryV2Response"); + run( + SubAccountApiAutoGeneratedTest::testGetSpotSubAccountDetailRequest, + "testGetSpotSubAccountDetailRequest"); + run( + SubAccountApiAutoGeneratedTest::testGetSpotSubAccountDetailResponse, + "testGetSpotSubAccountDetailResponse"); + run( + SubAccountApiAutoGeneratedTest::testGetSpotSubAccountListV2Request, + "testGetSpotSubAccountListV2Request"); + run( + SubAccountApiAutoGeneratedTest::testGetSpotSubAccountListV2Response, + "testGetSpotSubAccountListV2Response"); + run( + SubAccountApiAutoGeneratedTest::testGetFuturesSubAccountListV2Request, + "testGetFuturesSubAccountListV2Request"); + run( + SubAccountApiAutoGeneratedTest::testGetFuturesSubAccountListV2Response, + "testGetFuturesSubAccountListV2Response"); + run(SubAccountApiAutoGeneratedTest::testAddSubAccountApiRequest, "testAddSubAccountApiRequest"); + run( + SubAccountApiAutoGeneratedTest::testAddSubAccountApiResponse, + "testAddSubAccountApiResponse"); + run( + SubAccountApiAutoGeneratedTest::testModifySubAccountApiRequest, + "testModifySubAccountApiRequest"); + run( + SubAccountApiAutoGeneratedTest::testModifySubAccountApiResponse, + "testModifySubAccountApiResponse"); + run( + SubAccountApiAutoGeneratedTest::testGetSubAccountApiListRequest, + "testGetSubAccountApiListRequest"); + run( + SubAccountApiAutoGeneratedTest::testGetSubAccountApiListResponse, + "testGetSubAccountApiListResponse"); + run( + SubAccountApiAutoGeneratedTest::testDeleteSubAccountApiRequest, + "testDeleteSubAccountApiRequest"); + run( + SubAccountApiAutoGeneratedTest::testDeleteSubAccountApiResponse, + "testDeleteSubAccountApiResponse"); + run( + SubAccountApiAutoGeneratedTest::testGetSpotSubAccountsSummaryV1Request, + "testGetSpotSubAccountsSummaryV1Request"); + run( + SubAccountApiAutoGeneratedTest::testGetSpotSubAccountsSummaryV1Response, + "testGetSpotSubAccountsSummaryV1Response"); + run( + SubAccountApiAutoGeneratedTest::testGetSpotSubAccountListV1Request, + "testGetSpotSubAccountListV1Request"); + run( + SubAccountApiAutoGeneratedTest::testGetSpotSubAccountListV1Response, + "testGetSpotSubAccountListV1Response"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiImpl.java new file mode 100644 index 00000000..afe1b142 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiImpl.java @@ -0,0 +1,136 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.subaccount; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class SubAccountApiImpl implements SubAccountApi { + private final Transport transport; + + public SubAccountApiImpl(Transport transport) { + this.transport = transport; + } + + public AddSubAccountResp addSubAccount(AddSubAccountReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v2/sub/user/created", req, AddSubAccountResp.class, false); + } + + public AddSubAccountMarginPermissionResp addSubAccountMarginPermission( + AddSubAccountMarginPermissionReq req) { + return this.transport.call( + "spot", + false, + "POST", + "/api/v3/sub/user/margin/enable", + req, + AddSubAccountMarginPermissionResp.class, + false); + } + + public AddSubAccountFuturesPermissionResp addSubAccountFuturesPermission( + AddSubAccountFuturesPermissionReq req) { + return this.transport.call( + "spot", + false, + "POST", + "/api/v3/sub/user/futures/enable", + req, + AddSubAccountFuturesPermissionResp.class, + false); + } + + public GetSpotSubAccountsSummaryV2Resp getSpotSubAccountsSummaryV2( + GetSpotSubAccountsSummaryV2Req req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v2/sub/user", + req, + GetSpotSubAccountsSummaryV2Resp.class, + false); + } + + public GetSpotSubAccountDetailResp getSpotSubAccountDetail(GetSpotSubAccountDetailReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/sub-accounts/{subUserId}", + req, + GetSpotSubAccountDetailResp.class, + false); + } + + public GetSpotSubAccountListV2Resp getSpotSubAccountListV2(GetSpotSubAccountListV2Req req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v2/sub-accounts", + req, + GetSpotSubAccountListV2Resp.class, + false); + } + + public GetFuturesSubAccountListV2Resp getFuturesSubAccountListV2( + GetFuturesSubAccountListV2Req req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/account-overview-all", + req, + GetFuturesSubAccountListV2Resp.class, + false); + } + + public AddSubAccountApiResp addSubAccountApi(AddSubAccountApiReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v1/sub/api-key", req, AddSubAccountApiResp.class, false); + } + + public ModifySubAccountApiResp modifySubAccountApi(ModifySubAccountApiReq req) { + return this.transport.call( + "spot", + false, + "POST", + "/api/v1/sub/api-key/update", + req, + ModifySubAccountApiResp.class, + false); + } + + public GetSubAccountApiListResp getSubAccountApiList(GetSubAccountApiListReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v1/sub/api-key", req, GetSubAccountApiListResp.class, false); + } + + public DeleteSubAccountApiResp deleteSubAccountApi(DeleteSubAccountApiReq req) { + return this.transport.call( + "spot", false, "DELETE", "/api/v1/sub/api-key", req, DeleteSubAccountApiResp.class, false); + } + + public GetSpotSubAccountsSummaryV1Resp getSpotSubAccountsSummaryV1() { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/sub/user", + null, + GetSpotSubAccountsSummaryV1Resp.class, + false); + } + + public GetSpotSubAccountListV1Resp getSpotSubAccountListV1() { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/sub-accounts", + null, + GetSpotSubAccountListV1Resp.class, + false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FlexTransferReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FlexTransferReq.java new file mode 100644 index 00000000..9492f75a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FlexTransferReq.java @@ -0,0 +1,197 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.transfer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class FlexTransferReq implements Request { + /** + * Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of + * 128 bits + */ + @JsonProperty("clientOid") + private String clientOid; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Transfer amount: The amount is a positive integer multiple of the currency precision. */ + @JsonProperty("amount") + private String amount; + + /** + * Transfer out UserId: This is required when transferring from sub-account to master-account. It + * is optional for internal transfers. + */ + @JsonProperty("fromUserId") + private String fromUserId; + + /** Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 */ + @JsonProperty("fromAccountType") + private FromAccountTypeEnum fromAccountType; + + /** Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT */ + @JsonProperty("fromAccountTag") + private String fromAccountTag; + + /** + * 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) + */ + @JsonProperty("type") + private TypeEnum type; + + /** + * Transfer in UserId: This is required when transferring master-account to sub-account. It is + * optional for internal transfers. + */ + @JsonProperty("toUserId") + private String toUserId; + + /** Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 */ + @JsonProperty("toAccountType") + private ToAccountTypeEnum toAccountType; + + /** Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT */ + @JsonProperty("toAccountTag") + private String toAccountTag; + + public enum FromAccountTypeEnum { + /** Funding account */ + MAIN("MAIN"), + /** Spot account */ + TRADE("TRADE"), + /** Futures account */ + CONTRACT("CONTRACT"), + /** Cross margin account */ + MARGIN("MARGIN"), + /** Isolated margin account */ + ISOLATED("ISOLATED"), + /** Cross margin account */ + MARGIN_V2("MARGIN_V2"), + /** Isolated margin account */ + ISOLATED_V2("ISOLATED_V2"), + /** Option account */ + OPTION("OPTION"); + + private final String value; + + FromAccountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FromAccountTypeEnum fromValue(String value) { + for (FromAccountTypeEnum b : FromAccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + INTERNAL("INTERNAL"), + /** */ + PARENT_TO_SUB("PARENT_TO_SUB"), + /** */ + SUB_TO_PARENT("SUB_TO_PARENT"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum ToAccountTypeEnum { + /** Funding account */ + MAIN("MAIN"), + /** Spot account */ + TRADE("TRADE"), + /** Futures account */ + CONTRACT("CONTRACT"), + /** Cross margin account */ + MARGIN("MARGIN"), + /** Isolated margin account */ + ISOLATED("ISOLATED"), + /** Cross margin account */ + MARGIN_V2("MARGIN_V2"), + /** Isolated margin account */ + ISOLATED_V2("ISOLATED_V2"), + /** Option account */ + OPTION("OPTION"); + + private final String value; + + ToAccountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ToAccountTypeEnum fromValue(String value) { + for (ToAccountTypeEnum b : ToAccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FlexTransferResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FlexTransferResp.java new file mode 100644 index 00000000..a85b226a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FlexTransferResp.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.transfer; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class FlexTransferResp + implements Response> { + /** Transfer order ID */ + @JsonProperty("orderId") + private String orderId; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferInReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferInReq.java new file mode 100644 index 00000000..7c1e5c68 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferInReq.java @@ -0,0 +1,65 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.transfer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class FuturesAccountTransferInReq implements Request { + /** Currency, including XBT, USDT... */ + @JsonProperty("currency") + private String currency; + + /** Amount to be transferred in */ + @JsonProperty("amount") + private Double amount; + + /** Payment account type, including MAIN, TRADE */ + @JsonProperty("payAccountType") + private PayAccountTypeEnum payAccountType; + + public enum PayAccountTypeEnum { + /** */ + MAIN("MAIN"), + /** */ + TRADE("TRADE"); + + private final String value; + + PayAccountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PayAccountTypeEnum fromValue(String value) { + for (PayAccountTypeEnum b : PayAccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferInResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferInResp.java new file mode 100644 index 00000000..671c5a62 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferInResp.java @@ -0,0 +1,40 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.transfer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class FuturesAccountTransferInResp + implements Response> { + /** */ + @JsonProperty("data") + private String data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static FuturesAccountTransferInResp fromJson(String data) { + // original response + FuturesAccountTransferInResp obj = new FuturesAccountTransferInResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferOutReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferOutReq.java new file mode 100644 index 00000000..45015db6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferOutReq.java @@ -0,0 +1,65 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.transfer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class FuturesAccountTransferOutReq implements Request { + /** Currency, including XBT, USDT... */ + @JsonProperty("currency") + private String currency; + + /** Amount to be transferred out; cannot exceed 1000000000 */ + @JsonProperty("amount") + private Double amount; + + /** Receive account type, including MAIN, TRADE */ + @JsonProperty("recAccountType") + private RecAccountTypeEnum recAccountType; + + public enum RecAccountTypeEnum { + /** */ + MAIN("MAIN"), + /** */ + TRADE("TRADE"); + + private final String value; + + RecAccountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RecAccountTypeEnum fromValue(String value) { + for (RecAccountTypeEnum b : RecAccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferOutResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferOutResp.java new file mode 100644 index 00000000..08323747 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferOutResp.java @@ -0,0 +1,98 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.transfer; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class FuturesAccountTransferOutResp + implements Response< + FuturesAccountTransferOutResp, RestResponse> { + /** Transfer order ID */ + @JsonProperty("applyId") + private String applyId; + + /** Business number */ + @JsonProperty("bizNo") + private String bizNo; + + /** Pay account type */ + @JsonProperty("payAccountType") + private String payAccountType; + + /** Pay account sub type */ + @JsonProperty("payTag") + private String payTag; + + /** User remark */ + @JsonProperty("remark") + private String remark; + + /** Receive account type */ + @JsonProperty("recAccountType") + private String recAccountType; + + /** Receive account sub type */ + @JsonProperty("recTag") + private String recTag; + + /** Receive account tx remark */ + @JsonProperty("recRemark") + private String recRemark; + + /** Receive system */ + @JsonProperty("recSystem") + private String recSystem; + + /** + * Status:APPLY, PROCESSING, PENDING_APPROVAL, APPROVED, REJECTED, PENDING_CANCEL, CANCEL, SUCCESS + */ + @JsonProperty("status") + private String status; + + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Transfer amount */ + @JsonProperty("amount") + private String amount; + + /** Transfer fee */ + @JsonProperty("fee") + private String fee; + + /** Serial number */ + @JsonProperty("sn") + private Long sn; + + /** Fail Reason */ + @JsonProperty("reason") + private String reason; + + /** Create time */ + @JsonProperty("createdAt") + private Long createdAt; + + /** Update time */ + @JsonProperty("updatedAt") + private Long updatedAt; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetFuturesAccountTransferOutLedgerItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetFuturesAccountTransferOutLedgerItems.java new file mode 100644 index 00000000..8f74fd56 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetFuturesAccountTransferOutLedgerItems.java @@ -0,0 +1,92 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.transfer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFuturesAccountTransferOutLedgerItems { + /** Transfer order ID */ + @JsonProperty("applyId") + private String applyId; + + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Receive account tx remark */ + @JsonProperty("recRemark") + private String recRemark; + + /** Receive system */ + @JsonProperty("recSystem") + private String recSystem; + + /** Status PROCESSING, SUCCESS, FAILURE */ + @JsonProperty("status") + private StatusEnum status; + + /** Transaction amount */ + @JsonProperty("amount") + private String amount; + + /** Reason for the failure */ + @JsonProperty("reason") + private String reason; + + /** Offset */ + @JsonProperty("offset") + private Long offset; + + /** Request application time */ + @JsonProperty("createdAt") + private Long createdAt; + + /** User remark */ + @JsonProperty("remark") + private String remark; + + public enum StatusEnum { + /** */ + PROCESSING("PROCESSING"), + /** */ + SUCCESS("SUCCESS"), + /** */ + FAILURE("FAILURE"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetFuturesAccountTransferOutLedgerReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetFuturesAccountTransferOutLedgerReq.java new file mode 100644 index 00000000..43763df5 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetFuturesAccountTransferOutLedgerReq.java @@ -0,0 +1,90 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.transfer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFuturesAccountTransferOutLedgerReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Status PROCESSING, SUCCESS, FAILURE */ + @JsonProperty("type") + private TypeEnum type; + + /** Status List PROCESSING, SUCCESS, FAILURE */ + @JsonProperty("tag") + @Builder.Default + private List tag = new ArrayList<>(); + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + /** Current request page. The default currentPage is 1 */ + @JsonProperty("currentPage") + @Builder.Default + private Long currentPage = 1l; + + /** pageSize; the default pageSize is 50 */ + @JsonProperty("pageSize") + @Builder.Default + private Long pageSize = 50l; + + public enum TypeEnum { + /** */ + MAIN("MAIN"), + /** */ + TRADE("TRADE"), + /** */ + MARGIN("MARGIN"), + /** */ + ISOLATED("ISOLATED"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetFuturesAccountTransferOutLedgerResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetFuturesAccountTransferOutLedgerResp.java new file mode 100644 index 00000000..2e9ec856 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetFuturesAccountTransferOutLedgerResp.java @@ -0,0 +1,51 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.transfer; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFuturesAccountTransferOutLedgerResp + implements Response< + GetFuturesAccountTransferOutLedgerResp, + RestResponse> { + /** current page */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** page size */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** total number */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** total pages */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetTransferQuotasReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetTransferQuotasReq.java new file mode 100644 index 00000000..c536b6cb --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetTransferQuotasReq.java @@ -0,0 +1,79 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.transfer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTransferQuotasReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** The account type:MAIN, TRADE, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 */ + @JsonProperty("type") + private TypeEnum type; + + /** + * Trading pair required when the account type is ISOLATED; other types do not pass, e.g.: + * BTC-USDT + */ + @JsonProperty("tag") + @Builder.Default + private String tag = "BTC-USDT"; + + public enum TypeEnum { + /** Funding account */ + MAIN("MAIN"), + /** Spot account */ + TRADE("TRADE"), + /** Spot cross margin account */ + MARGIN("MARGIN"), + /** 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"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetTransferQuotasResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetTransferQuotasResp.java new file mode 100644 index 00000000..18ff437e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/GetTransferQuotasResp.java @@ -0,0 +1,47 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.transfer; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTransferQuotasResp + implements Response> { + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Total funds in an account. */ + @JsonProperty("balance") + private String balance; + + /** Funds available to withdraw or trade. */ + @JsonProperty("available") + private String available; + + /** Funds on hold (not available for use). */ + @JsonProperty("holds") + private String holds; + + /** Funds available to transfer. */ + @JsonProperty("transferable") + private String transferable; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/InnerTransferReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/InnerTransferReq.java new file mode 100644 index 00000000..94c4d5a9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/InnerTransferReq.java @@ -0,0 +1,137 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.transfer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class InnerTransferReq implements Request { + /** + * Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of + * 128 bits + */ + @JsonProperty("clientOid") + private String clientOid; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Transfer amount: The amount is a positive integer multiple of the currency precision. */ + @JsonProperty("amount") + private String amount; + + /** Receiving Account Type: main, trade, margin, isolated, margin_v2, isolated_v2, contract */ + @JsonProperty("to") + private ToEnum to; + + /** Trading pair, required when the payment account type is isolated, e.g.: BTC-USDT */ + @JsonProperty("fromTag") + private String fromTag; + + /** Trading pair, required when the payment account type is isolated, e.g.: BTC-USDT */ + @JsonProperty("toTag") + private String toTag; + + /** Payment Account Type: main, trade, margin, isolated, margin_v2, isolated_v2 */ + @JsonProperty("from") + private FromEnum from; + + public enum ToEnum { + /** Funding account */ + MAIN("main"), + /** Spot account */ + TRADE("trade"), + /** Cross margin account */ + MARGIN("margin"), + /** Isolated margin account */ + ISOLATED("isolated"), + /** Cross margin account */ + MARGINV2("margin_v2"), + /** Isolated margin account */ + ISOLATEDV2("isolated_v2"), + /** Option account */ + OPTION("option"); + + private final String value; + + ToEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ToEnum fromValue(String value) { + for (ToEnum b : ToEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum FromEnum { + /** Funding account */ + MAIN("main"), + /** Spot account */ + TRADE("trade"), + /** Cross margin account */ + MARGIN("margin"), + /** Isolated margin account */ + ISOLATED("isolated"), + /** Cross margin account */ + MARGINV2("margin_v2"), + /** Isolated margin account */ + ISOLATEDV2("isolated_v2"), + /** Option account */ + OPTION("option"); + + private final String value; + + FromEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FromEnum fromValue(String value) { + for (FromEnum b : FromEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/InnerTransferResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/InnerTransferResp.java new file mode 100644 index 00000000..909a084c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/InnerTransferResp.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.transfer; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class InnerTransferResp + implements Response> { + /** Transfer order ID */ + @JsonProperty("orderId") + private String orderId; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/SubAccountTransferReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/SubAccountTransferReq.java new file mode 100644 index 00000000..c6263893 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/SubAccountTransferReq.java @@ -0,0 +1,170 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.transfer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class SubAccountTransferReq implements Request { + /** + * Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of + * 128 bits + */ + @JsonProperty("clientOid") + private String clientOid; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Transfer amount: The amount is a positive integer multiple of the currency precision. */ + @JsonProperty("amount") + private String amount; + + /** OUT — the master user to sub user IN — the sub user to the master user */ + @JsonProperty("direction") + private DirectionEnum direction; + + /** Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED */ + @JsonProperty("accountType") + @Builder.Default + private AccountTypeEnum accountType = AccountTypeEnum.MAIN; + + /** Sub-account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED */ + @JsonProperty("subAccountType") + @Builder.Default + private SubAccountTypeEnum subAccountType = SubAccountTypeEnum.MAIN; + + /** the user ID of a sub-account. */ + @JsonProperty("subUserId") + private String subUserId; + + /** Need to be defined if accountType=ISOLATED. */ + @JsonProperty("tag") + private String tag; + + /** Need to be defined if subAccountType=ISOLATED. */ + @JsonProperty("subTag") + private String subTag; + + public enum DirectionEnum { + /** */ + IN("IN"), + /** */ + OUT("OUT"); + + private final String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum AccountTypeEnum { + /** Funding account */ + MAIN("MAIN"), + /** Spot account */ + TRADE("TRADE"), + /** Margin account */ + MARGIN("MARGIN"), + /** Futures account */ + CONTRACT("CONTRACT"), + /** Option account */ + OPTION("OPTION"); + + private final String value; + + AccountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AccountTypeEnum fromValue(String value) { + for (AccountTypeEnum b : AccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SubAccountTypeEnum { + /** */ + MAIN("MAIN"), + /** */ + TRADE("TRADE"), + /** */ + MARGIN("MARGIN"), + /** */ + CONTRACT("CONTRACT"); + + private final String value; + + SubAccountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SubAccountTypeEnum fromValue(String value) { + for (SubAccountTypeEnum b : SubAccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/SubAccountTransferResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/SubAccountTransferResp.java new file mode 100644 index 00000000..44b69b8b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/SubAccountTransferResp.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.transfer; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class SubAccountTransferResp + implements Response> { + /** Transfer order ID */ + @JsonProperty("orderId") + private String orderId; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.java new file mode 100644 index 00000000..e7ef2d49 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.java @@ -0,0 +1,91 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.transfer; + +public interface TransferApi { + /** + * Get Transfer Quotas This endpoint returns the transferable balance of a specified account. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ + */ + GetTransferQuotasResp getTransferQuotas(GetTransferQuotasReq req); + + /** + * Flex Transfer This interface can be used for transfers between master- and sub-accounts and + * transfers docs + * +-----------------------+---------------+ | Extra API Info | Value | + * +-----------------------+---------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | FLEXTRANSFERS | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | + * 4 | +-----------------------+---------------+ + */ + FlexTransferResp flexTransfer(FlexTransferReq req); + + /** + * Sub-account Transfer 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. + * + * @deprecated docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 30 | + * +-----------------------+------------+ + */ + SubAccountTransferResp subAccountTransfer(SubAccountTransferReq req); + + /** + * Internal Transfer This API endpoint can be used to transfer funds between accounts internally. + * Users can transfer funds between their accounts free of charge. + * + * @deprecated docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+------------+ + */ + InnerTransferResp innerTransfer(InnerTransferReq req); + + /** + * Get Futures Account Transfer Out Ledger Futures account transfer out ledgers can be obtained at + * this endpoint. + * + * @deprecated docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | + * 20 | +-----------------------+------------+ + */ + GetFuturesAccountTransferOutLedgerResp getFuturesAccountTransferOutLedger( + GetFuturesAccountTransferOutLedgerReq req); + + /** + * Futures Account Transfer Out 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. + * + * @deprecated docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | + * 20 | +-----------------------+------------+ + */ + FuturesAccountTransferOutResp futuresAccountTransferOut(FuturesAccountTransferOutReq req); + + /** + * Futures Account Transfer In 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. + * + * @deprecated docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | + * 20 | +-----------------------+------------+ + */ + FuturesAccountTransferInResp futuresAccountTransferIn(FuturesAccountTransferInReq req); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.template new file mode 100644 index 00000000..70825b81 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.template @@ -0,0 +1,135 @@ + + /** + * getTransferQuotas + * Get Transfer Quotas + * /api/v1/accounts/transferable + */ + public void testGetTransferQuotas() { + GetTransferQuotasReq.GetTransferQuotasReqBuilder builder = GetTransferQuotasReq.builder(); + builder.currency(?).type(?).tag(?); + GetTransferQuotasReq req = builder.build(); + GetTransferQuotasResp resp = this.api.getTransferQuotas(req); + self::assertNotNull($resp->currency); + self::assertNotNull($resp->balance); + self::assertNotNull($resp->available); + self::assertNotNull($resp->holds); + self::assertNotNull($resp->transferable); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * flexTransfer + * Flex Transfer + * /api/v3/accounts/universal-transfer + */ + public void testFlexTransfer() { + FlexTransferReq.FlexTransferReqBuilder builder = FlexTransferReq.builder(); + builder.clientOid(?).currency(?).amount(?).fromUserId(?).fromAccountType(?).fromAccountTag(?).type(?).toUserId(?).toAccountType(?).toAccountTag(?); + FlexTransferReq req = builder.build(); + FlexTransferResp resp = this.api.flexTransfer(req); + self::assertNotNull($resp->orderId); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * subAccountTransfer + * Sub-account Transfer + * /api/v2/accounts/sub-transfer + */ + public void testSubAccountTransfer() { + SubAccountTransferReq.SubAccountTransferReqBuilder builder = SubAccountTransferReq.builder(); + builder.clientOid(?).currency(?).amount(?).direction(?).accountType(?).subAccountType(?).subUserId(?).tag(?).subTag(?); + SubAccountTransferReq req = builder.build(); + SubAccountTransferResp resp = this.api.subAccountTransfer(req); + self::assertNotNull($resp->orderId); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * innerTransfer + * Internal Transfer + * /api/v2/accounts/inner-transfer + */ + public void testInnerTransfer() { + InnerTransferReq.InnerTransferReqBuilder builder = InnerTransferReq.builder(); + builder.clientOid(?).currency(?).amount(?).to(?).fromTag(?).toTag(?).from(?); + InnerTransferReq req = builder.build(); + InnerTransferResp resp = this.api.innerTransfer(req); + self::assertNotNull($resp->orderId); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getFuturesAccountTransferOutLedger + * Get Futures Account Transfer Out Ledger + * /api/v1/transfer-list + */ + public void testGetFuturesAccountTransferOutLedger() { + GetFuturesAccountTransferOutLedgerReq.GetFuturesAccountTransferOutLedgerReqBuilder builder = GetFuturesAccountTransferOutLedgerReq.builder(); + builder.currency(?).type(?).tag(?).startAt(?).endAt(?).currentPage(?).pageSize(?); + GetFuturesAccountTransferOutLedgerReq req = builder.build(); + GetFuturesAccountTransferOutLedgerResp resp = this.api.getFuturesAccountTransferOutLedger(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->applyId); + self::assertNotNull($item->currency); + self::assertNotNull($item->recRemark); + self::assertNotNull($item->recSystem); + self::assertNotNull($item->status); + self::assertNotNull($item->amount); + self::assertNotNull($item->reason); + self::assertNotNull($item->offset); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->remark); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * futuresAccountTransferOut + * Futures Account Transfer Out + * /api/v3/transfer-out + */ + public void testFuturesAccountTransferOut() { + FuturesAccountTransferOutReq.FuturesAccountTransferOutReqBuilder builder = FuturesAccountTransferOutReq.builder(); + builder.currency(?).amount(?).recAccountType(?); + FuturesAccountTransferOutReq req = builder.build(); + FuturesAccountTransferOutResp resp = this.api.futuresAccountTransferOut(req); + self::assertNotNull($resp->applyId); + self::assertNotNull($resp->bizNo); + self::assertNotNull($resp->payAccountType); + self::assertNotNull($resp->payTag); + self::assertNotNull($resp->remark); + self::assertNotNull($resp->recAccountType); + self::assertNotNull($resp->recTag); + self::assertNotNull($resp->recRemark); + self::assertNotNull($resp->recSystem); + self::assertNotNull($resp->status); + self::assertNotNull($resp->currency); + self::assertNotNull($resp->amount); + self::assertNotNull($resp->fee); + self::assertNotNull($resp->sn); + self::assertNotNull($resp->reason); + self::assertNotNull($resp->createdAt); + self::assertNotNull($resp->updatedAt); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * futuresAccountTransferIn + * Futures Account Transfer In + * /api/v1/transfer-in + */ + public void testFuturesAccountTransferIn() { + FuturesAccountTransferInReq.FuturesAccountTransferInReqBuilder builder = FuturesAccountTransferInReq.builder(); + builder.currency(?).amount(?).payAccountType(?); + FuturesAccountTransferInReq req = builder.build(); + FuturesAccountTransferInResp resp = this.api.futuresAccountTransferIn(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApiAutoGeneratedTest.java new file mode 100644 index 00000000..2f77e4e8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApiAutoGeneratedTest.java @@ -0,0 +1,223 @@ +package com.kucoin.universal.sdk.generate.account.transfer; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class TransferApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** getTransferQuotas Request Get Transfer Quotas /api/v1/accounts/transferable */ + public static void testGetTransferQuotasRequest() throws Exception { + String data = "{\"currency\": \"BTC\", \"type\": \"MAIN\", \"tag\": \"ETH-USDT\"}"; + GetTransferQuotasReq obj = mapper.readValue(data, GetTransferQuotasReq.class); + } + + /** getTransferQuotas Response Get Transfer Quotas /api/v1/accounts/transferable */ + public static void testGetTransferQuotasResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"currency\":\"USDT\",\"balance\":\"10.5\",\"available\":\"10.5\",\"holds\":\"0\",\"transferable\":\"10.5\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** flexTransfer Request Flex Transfer /api/v3/accounts/universal-transfer */ + public static void testFlexTransferRequest() throws Exception { + String data = + "{\"clientOid\": \"64ccc0f164781800010d8c09\", \"type\": \"PARENT_TO_SUB\", \"currency\":" + + " \"USDT\", \"amount\": \"0.01\", \"fromAccountType\": \"TRADE\", \"toUserId\":" + + " \"63743f07e0c5230001761d08\", \"toAccountType\": \"TRADE\"}"; + FlexTransferReq obj = mapper.readValue(data, FlexTransferReq.class); + } + + /** flexTransfer Response Flex Transfer /api/v3/accounts/universal-transfer */ + public static void testFlexTransferResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"6705f7248c6954000733ecac\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** subAccountTransfer Request Sub-account Transfer /api/v2/accounts/sub-transfer */ + public static void testSubAccountTransferRequest() throws Exception { + String data = + "{\"clientOid\": \"64ccc0f164781800010d8c09\", \"currency\": \"USDT\", \"amount\":" + + " \"0.01\", \"direction\": \"OUT\", \"accountType\": \"MAIN\", \"subAccountType\":" + + " \"MAIN\", \"subUserId\": \"63743f07e0c5230001761d08\"}"; + SubAccountTransferReq obj = mapper.readValue(data, SubAccountTransferReq.class); + } + + /** subAccountTransfer Response Sub-account Transfer /api/v2/accounts/sub-transfer */ + public static void testSubAccountTransferResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":{\"orderId\":\"670be6b0b1b9080007040a9b\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** innerTransfer Request Internal Transfer /api/v2/accounts/inner-transfer */ + public static void testInnerTransferRequest() throws Exception { + String data = + "{\"clientOid\": \"64ccc0f164781800010d8c09\", \"currency\": \"USDT\", \"amount\":" + + " \"0.01\", \"from\": \"main\", \"to\": \"trade\"}"; + InnerTransferReq obj = mapper.readValue(data, InnerTransferReq.class); + } + + /** innerTransfer Response Internal Transfer /api/v2/accounts/inner-transfer */ + public static void testInnerTransferResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":{\"orderId\":\"670beb3482a1bb0007dec644\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * getFuturesAccountTransferOutLedger Request Get Futures Account Transfer Out Ledger + * /api/v1/transfer-list + */ + public static void testGetFuturesAccountTransferOutLedgerRequest() throws Exception { + String data = + "{\"currency\": \"XBT\", \"type\": \"MAIN\", \"tag\": [\"mock_a\", \"mock_b\"]," + + " \"startAt\": 1728663338000, \"endAt\": 1728692138000, \"currentPage\": 1," + + " \"pageSize\": 50}"; + GetFuturesAccountTransferOutLedgerReq obj = + mapper.readValue(data, GetFuturesAccountTransferOutLedgerReq.class); + } + + /** + * getFuturesAccountTransferOutLedger Response Get Futures Account Transfer Out Ledger + * /api/v1/transfer-list + */ + public static void testGetFuturesAccountTransferOutLedgerResponse() throws Exception { + String 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\":\"\"}]}}"; + RestResponse resp = + mapper.readValue( + data, new TypeReference>() {}); + } + + /** futuresAccountTransferOut Request Futures Account Transfer Out /api/v3/transfer-out */ + public static void testFuturesAccountTransferOutRequest() throws Exception { + String data = "{\"currency\": \"USDT\", \"amount\": 0.01, \"recAccountType\": \"MAIN\"}"; + FuturesAccountTransferOutReq obj = mapper.readValue(data, FuturesAccountTransferOutReq.class); + } + + /** futuresAccountTransferOut Response Futures Account Transfer Out /api/v3/transfer-out */ + public static void testFuturesAccountTransferOutResponse() throws Exception { + String data = + "{\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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** futuresAccountTransferIn Request Futures Account Transfer In /api/v1/transfer-in */ + public static void testFuturesAccountTransferInRequest() throws Exception { + String data = "{\"currency\": \"USDT\", \"amount\": 0.01, \"payAccountType\": \"MAIN\"}"; + FuturesAccountTransferInReq obj = mapper.readValue(data, FuturesAccountTransferInReq.class); + } + + /** futuresAccountTransferIn Response Futures Account Transfer In /api/v1/transfer-in */ + public static void testFuturesAccountTransferInResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":null}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(TransferApiAutoGeneratedTest::testGetTransferQuotasRequest, "testGetTransferQuotasRequest"); + run( + TransferApiAutoGeneratedTest::testGetTransferQuotasResponse, + "testGetTransferQuotasResponse"); + run(TransferApiAutoGeneratedTest::testFlexTransferRequest, "testFlexTransferRequest"); + run(TransferApiAutoGeneratedTest::testFlexTransferResponse, "testFlexTransferResponse"); + run( + TransferApiAutoGeneratedTest::testSubAccountTransferRequest, + "testSubAccountTransferRequest"); + run( + TransferApiAutoGeneratedTest::testSubAccountTransferResponse, + "testSubAccountTransferResponse"); + run(TransferApiAutoGeneratedTest::testInnerTransferRequest, "testInnerTransferRequest"); + run(TransferApiAutoGeneratedTest::testInnerTransferResponse, "testInnerTransferResponse"); + run( + TransferApiAutoGeneratedTest::testGetFuturesAccountTransferOutLedgerRequest, + "testGetFuturesAccountTransferOutLedgerRequest"); + run( + TransferApiAutoGeneratedTest::testGetFuturesAccountTransferOutLedgerResponse, + "testGetFuturesAccountTransferOutLedgerResponse"); + run( + TransferApiAutoGeneratedTest::testFuturesAccountTransferOutRequest, + "testFuturesAccountTransferOutRequest"); + run( + TransferApiAutoGeneratedTest::testFuturesAccountTransferOutResponse, + "testFuturesAccountTransferOutResponse"); + run( + TransferApiAutoGeneratedTest::testFuturesAccountTransferInRequest, + "testFuturesAccountTransferInRequest"); + run( + TransferApiAutoGeneratedTest::testFuturesAccountTransferInResponse, + "testFuturesAccountTransferInResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApiImpl.java new file mode 100644 index 00000000..04046a59 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApiImpl.java @@ -0,0 +1,91 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.transfer; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class TransferApiImpl implements TransferApi { + private final Transport transport; + + public TransferApiImpl(Transport transport) { + this.transport = transport; + } + + public GetTransferQuotasResp getTransferQuotas(GetTransferQuotasReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/accounts/transferable", + req, + GetTransferQuotasResp.class, + false); + } + + public FlexTransferResp flexTransfer(FlexTransferReq req) { + return this.transport.call( + "spot", + false, + "POST", + "/api/v3/accounts/universal-transfer", + req, + FlexTransferResp.class, + false); + } + + public SubAccountTransferResp subAccountTransfer(SubAccountTransferReq req) { + return this.transport.call( + "spot", + false, + "POST", + "/api/v2/accounts/sub-transfer", + req, + SubAccountTransferResp.class, + false); + } + + public InnerTransferResp innerTransfer(InnerTransferReq req) { + return this.transport.call( + "spot", + false, + "POST", + "/api/v2/accounts/inner-transfer", + req, + InnerTransferResp.class, + false); + } + + public GetFuturesAccountTransferOutLedgerResp getFuturesAccountTransferOutLedger( + GetFuturesAccountTransferOutLedgerReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/transfer-list", + req, + GetFuturesAccountTransferOutLedgerResp.class, + false); + } + + public FuturesAccountTransferOutResp futuresAccountTransferOut(FuturesAccountTransferOutReq req) { + return this.transport.call( + "futures", + false, + "POST", + "/api/v3/transfer-out", + req, + FuturesAccountTransferOutResp.class, + false); + } + + public FuturesAccountTransferInResp futuresAccountTransferIn(FuturesAccountTransferInReq req) { + return this.transport.call( + "futures", + false, + "POST", + "/api/v1/transfer-in", + req, + FuturesAccountTransferInResp.class, + false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/CancelWithdrawalReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/CancelWithdrawalReq.java new file mode 100644 index 00000000..fdaa49c7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/CancelWithdrawalReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelWithdrawalReq implements Request { + /** Path parameter, a unique ID for a withdrawalId */ + @JsonIgnore + @PathVar("withdrawalId") + @JsonProperty("withdrawalId") + private String withdrawalId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/CancelWithdrawalResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/CancelWithdrawalResp.java new file mode 100644 index 00000000..1a76e262 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/CancelWithdrawalResp.java @@ -0,0 +1,40 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelWithdrawalResp + implements Response> { + /** */ + @JsonProperty("data") + private String data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static CancelWithdrawalResp fromJson(String data) { + // original response + CancelWithdrawalResp obj = new CancelWithdrawalResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryByIdReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryByIdReq.java new file mode 100644 index 00000000..9b7b4ec6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryByIdReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetWithdrawalHistoryByIdReq implements Request { + /** withdrawal ID */ + @JsonIgnore + @PathVar("withdrawalId") + @JsonProperty("withdrawalId") + private String withdrawalId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryByIdResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryByIdResp.java new file mode 100644 index 00000000..89655ca2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryByIdResp.java @@ -0,0 +1,197 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetWithdrawalHistoryByIdResp + implements Response> { + /** Unique ID */ + @JsonProperty("id") + private String id; + + /** User ID */ + @JsonProperty("uid") + private Integer uid; + + /** A unique currency code that will never change */ + @JsonProperty("currency") + private String currency; + + /** The chain id of currency */ + @JsonProperty("chainId") + private String chainId; + + /** Chain name of currency */ + @JsonProperty("chainName") + private String chainName; + + /** Currency name; will change after renaming */ + @JsonProperty("currencyName") + private String currencyName; + + /** Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE */ + @JsonProperty("status") + private String status; + + /** Failure reason code */ + @JsonProperty("failureReason") + private String failureReason; + + /** Failure reason message */ + @JsonProperty("failureReasonMsg") + private String failureReasonMsg; + + /** Withwrawal address */ + @JsonProperty("address") + private String address; + + /** Address remark. If there’s no remark, it is empty. */ + @JsonProperty("memo") + private String memo; + + /** Internal withdrawal or not. */ + @JsonProperty("isInner") + private Boolean isInner; + + /** Withwrawal amount */ + @JsonProperty("amount") + private String amount; + + /** Fees charged for withwrawal */ + @JsonProperty("fee") + private String fee; + + /** Wallet Transaction ID */ + @JsonProperty("walletTxId") + private String walletTxId; + + /** Address remark */ + @JsonProperty("addressRemark") + private String addressRemark; + + /** Remark */ + @JsonProperty("remark") + private String remark; + + /** Creation Time (milliseconds) */ + @JsonProperty("createdAt") + private Long createdAt; + + /** */ + @JsonProperty("cancelType") + private CancelTypeEnum cancelType; + + /** Users in some regions need query this field */ + @JsonProperty("taxes") + private List taxes = new ArrayList<>(); + + /** Tax description */ + @JsonProperty("taxDescription") + private String taxDescription; + + /** Return status */ + @JsonProperty("returnStatus") + private ReturnStatusEnum returnStatus; + + /** Return amount */ + @JsonProperty("returnAmount") + private String returnAmount; + + /** Return currency */ + @JsonProperty("returnCurrency") + private String returnCurrency; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum CancelTypeEnum { + /** Cancellable */ + CANCELABLE("CANCELABLE"), + /** Cancelling */ + CANCELING("CANCELING"), + /** Non-Cancellable */ + NON_CANCELABLE("NON_CANCELABLE"); + + private final String value; + + CancelTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CancelTypeEnum fromValue(String value) { + for (CancelTypeEnum b : CancelTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum ReturnStatusEnum { + /** No returned */ + NOT_RETURN("NOT_RETURN"), + /** To be returned */ + PROCESSING("PROCESSING"), + /** Returned */ + SUCCESS("SUCCESS"); + + private final String value; + + ReturnStatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ReturnStatusEnum fromValue(String value) { + for (ReturnStatusEnum b : ReturnStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryItems.java new file mode 100644 index 00000000..8a81e408 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryItems.java @@ -0,0 +1,108 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetWithdrawalHistoryItems { + /** Unique ID */ + @JsonProperty("id") + private String id; + + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** The chain id of currency */ + @JsonProperty("chain") + private String chain; + + /** Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE */ + @JsonProperty("status") + private StatusEnum status; + + /** Withwrawal address */ + @JsonProperty("address") + private String address; + + /** Address remark. If there’s no remark, it is empty. */ + @JsonProperty("memo") + private String memo; + + /** Internal deposit or not */ + @JsonProperty("isInner") + private Boolean isInner; + + /** Withwrawal amount */ + @JsonProperty("amount") + private String amount; + + /** Fees charged for withwrawal */ + @JsonProperty("fee") + private String fee; + + /** Wallet Txid, If this is an internal withdrawal, it is empty. */ + @JsonProperty("walletTxId") + private String walletTxId; + + /** Database record creation time */ + @JsonProperty("createdAt") + private Long createdAt; + + /** Update time of the database record */ + @JsonProperty("updatedAt") + private Long updatedAt; + + /** Remark */ + @JsonProperty("remark") + private String remark; + + public enum StatusEnum { + /** REVIEW */ + REVIEW("REVIEW"), + /** PROCESSING */ + PROCESSING("PROCESSING"), + /** WALLET_PROCESSING */ + WALLET_PROCESSING("WALLET_PROCESSING"), + /** FAILURE */ + FAILURE("FAILURE"), + /** SUCCESS */ + SUCCESS("SUCCESS"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryOldItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryOldItems.java new file mode 100644 index 00000000..5e02a956 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryOldItems.java @@ -0,0 +1,80 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetWithdrawalHistoryOldItems { + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Database record creation time */ + @JsonProperty("createAt") + private Integer createAt; + + /** Withdrawal amount */ + @JsonProperty("amount") + private String amount; + + /** Withdrawal address */ + @JsonProperty("address") + private String address; + + /** Wallet Txid */ + @JsonProperty("walletTxId") + private String walletTxId; + + /** Internal deposit or not */ + @JsonProperty("isInner") + private Boolean isInner; + + /** Status */ + @JsonProperty("status") + private StatusEnum status; + + public enum StatusEnum { + /** */ + PROCESSING("PROCESSING"), + /** */ + SUCCESS("SUCCESS"), + /** */ + FAILURE("FAILURE"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryOldReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryOldReq.java new file mode 100644 index 00000000..5a87d578 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryOldReq.java @@ -0,0 +1,81 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetWithdrawalHistoryOldReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Status. Available value: PROCESSING, SUCCESS, and FAILURE */ + @JsonProperty("status") + private StatusEnum status; + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + /** Current request page. */ + @JsonProperty("currentPage") + @Builder.Default + private Integer currentPage = 1; + + /** Number of results per request. Minimum is 10, maximum is 500. */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 50; + + public enum StatusEnum { + /** */ + PROCESSING("PROCESSING"), + /** */ + SUCCESS("SUCCESS"), + /** */ + FAILURE("FAILURE"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryOldResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryOldResp.java new file mode 100644 index 00000000..f3a3022b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryOldResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetWithdrawalHistoryOldResp + implements Response> { + /** current page */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** page size */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** total number */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** total pages */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryReq.java new file mode 100644 index 00000000..4e1810bd --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryReq.java @@ -0,0 +1,85 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetWithdrawalHistoryReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE */ + @JsonProperty("status") + private StatusEnum status; + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + /** Current request page. */ + @JsonProperty("currentPage") + @Builder.Default + private Integer currentPage = 1; + + /** Number of results per request. Minimum is 10, maximum is 500. */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 50; + + public enum StatusEnum { + /** */ + PROCESSING("PROCESSING"), + /** */ + REVIEW("REVIEW"), + /** */ + WALLET_PROCESSING("WALLET_PROCESSING"), + /** */ + SUCCESS("SUCCESS"), + /** */ + FAILURE("FAILURE"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryResp.java new file mode 100644 index 00000000..c456217d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalHistoryResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetWithdrawalHistoryResp + implements Response> { + /** current page */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** page size */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** total number */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** total pages */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalQuotasReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalQuotasReq.java new file mode 100644 index 00000000..a3cb7a38 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalQuotasReq.java @@ -0,0 +1,32 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetWithdrawalQuotasReq implements Request { + /** currency */ + @JsonProperty("currency") + private String 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. + */ + @JsonProperty("chain") + @Builder.Default + private String chain = "eth"; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalQuotasResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalQuotasResp.java new file mode 100644 index 00000000..03f2797f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/GetWithdrawalQuotasResp.java @@ -0,0 +1,91 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetWithdrawalQuotasResp + implements Response> { + /** */ + @JsonProperty("currency") + private String currency; + + /** */ + @JsonProperty("limitBTCAmount") + private String limitBTCAmount; + + /** */ + @JsonProperty("usedBTCAmount") + private String usedBTCAmount; + + /** Withdrawal limit currency */ + @JsonProperty("quotaCurrency") + private String quotaCurrency; + + /** The intraday available withdrawal amount (withdrawal limit currency) */ + @JsonProperty("limitQuotaCurrencyAmount") + private String limitQuotaCurrencyAmount; + + /** The intraday cumulative withdrawal amount (withdrawal limit currency) */ + @JsonProperty("usedQuotaCurrencyAmount") + private String usedQuotaCurrencyAmount; + + /** Remaining amount available to withdraw the current day */ + @JsonProperty("remainAmount") + private String remainAmount; + + /** Current available withdrawal amount */ + @JsonProperty("availableAmount") + private String availableAmount; + + /** Minimum withdrawal fee */ + @JsonProperty("withdrawMinFee") + private String withdrawMinFee; + + /** Fees for internal withdrawal */ + @JsonProperty("innerWithdrawMinFee") + private String innerWithdrawMinFee; + + /** Minimum withdrawal amount */ + @JsonProperty("withdrawMinSize") + private String withdrawMinSize; + + /** Is the withdraw function enabled? */ + @JsonProperty("isWithdrawEnabled") + private Boolean isWithdrawEnabled; + + /** Floating point precision. */ + @JsonProperty("precision") + private Integer precision; + + /** The chainName of currency */ + @JsonProperty("chain") + private String chain; + + /** Reasons for restriction. Usually empty. */ + @JsonProperty("reason") + private String reason; + + /** Total locked amount (including the amount locked into USDT for each currency) */ + @JsonProperty("lockedAmount") + private String lockedAmount; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.java new file mode 100644 index 00000000..be9f7af8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.java @@ -0,0 +1,81 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +public interface WithdrawalApi { + /** + * Get Withdrawal Quotas This interface can obtain the withdrawal quota information of this + * currency. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ + */ + GetWithdrawalQuotasResp getWithdrawalQuotas(GetWithdrawalQuotasReq req); + + /** + * Withdraw (V3) Use this interface to withdraw the specified currency. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | WITHDRAWAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 + * | +-----------------------+------------+ + */ + WithdrawalV3Resp withdrawalV3(WithdrawalV3Req req); + + /** + * Cancel Withdrawal This interface can cancel the withdrawal. Only withdrawal requests with + * PROCESSING status can be canceled. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | WITHDRAWAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 + * | +-----------------------+------------+ + */ + CancelWithdrawalResp cancelWithdrawal(CancelWithdrawalReq req); + + /** + * Get Withdrawal History 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. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ + */ + GetWithdrawalHistoryResp getWithdrawalHistory(GetWithdrawalHistoryReq req); + + /** + * Get Withdrawal History By ID Request a withdrawal history by id via this endpoint. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ + */ + GetWithdrawalHistoryByIdResp getWithdrawalHistoryById(GetWithdrawalHistoryByIdReq req); + + /** + * Get Withdrawal History - Old 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. + * + * @deprecated docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | + * 20 | +-----------------------+------------+ + */ + GetWithdrawalHistoryOldResp getWithdrawalHistoryOld(GetWithdrawalHistoryOldReq req); + + /** + * Withdraw - V1 Use this interface to withdraw the specified currency. + * + * @deprecated docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | WITHDRAWAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT + * | 5 | +-----------------------+------------+ + */ + WithdrawalV1Resp withdrawalV1(WithdrawalV1Req req); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.template new file mode 100644 index 00000000..ceb421b6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.template @@ -0,0 +1,171 @@ + + /** + * getWithdrawalQuotas + * Get Withdrawal Quotas + * /api/v1/withdrawals/quotas + */ + public void testGetWithdrawalQuotas() { + GetWithdrawalQuotasReq.GetWithdrawalQuotasReqBuilder builder = GetWithdrawalQuotasReq.builder(); + builder.currency(?).chain(?); + GetWithdrawalQuotasReq req = builder.build(); + GetWithdrawalQuotasResp resp = this.api.getWithdrawalQuotas(req); + self::assertNotNull($resp->currency); + self::assertNotNull($resp->limitBTCAmount); + self::assertNotNull($resp->usedBTCAmount); + self::assertNotNull($resp->quotaCurrency); + self::assertNotNull($resp->limitQuotaCurrencyAmount); + self::assertNotNull($resp->usedQuotaCurrencyAmount); + self::assertNotNull($resp->remainAmount); + self::assertNotNull($resp->availableAmount); + self::assertNotNull($resp->withdrawMinFee); + self::assertNotNull($resp->innerWithdrawMinFee); + self::assertNotNull($resp->withdrawMinSize); + self::assertNotNull($resp->isWithdrawEnabled); + self::assertNotNull($resp->precision); + self::assertNotNull($resp->chain); + self::assertNotNull($resp->reason); + self::assertNotNull($resp->lockedAmount); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * withdrawalV3 + * Withdraw (V3) + * /api/v3/withdrawals + */ + public void testWithdrawalV3() { + WithdrawalV3Req.WithdrawalV3ReqBuilder builder = WithdrawalV3Req.builder(); + builder.currency(?).chain(?).amount(?).memo(?).isInner(?).remark(?).feeDeductType(?).toAddress(?).withdrawType(?); + WithdrawalV3Req req = builder.build(); + WithdrawalV3Resp resp = this.api.withdrawalV3(req); + self::assertNotNull($resp->withdrawalId); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelWithdrawal + * Cancel Withdrawal + * /api/v1/withdrawals/{withdrawalId} + */ + public void testCancelWithdrawal() { + CancelWithdrawalReq.CancelWithdrawalReqBuilder builder = CancelWithdrawalReq.builder(); + builder.withdrawalId(?); + CancelWithdrawalReq req = builder.build(); + CancelWithdrawalResp resp = this.api.cancelWithdrawal(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getWithdrawalHistory + * Get Withdrawal History + * /api/v1/withdrawals + */ + public void testGetWithdrawalHistory() { + GetWithdrawalHistoryReq.GetWithdrawalHistoryReqBuilder builder = GetWithdrawalHistoryReq.builder(); + builder.currency(?).status(?).startAt(?).endAt(?).currentPage(?).pageSize(?); + GetWithdrawalHistoryReq req = builder.build(); + GetWithdrawalHistoryResp resp = this.api.getWithdrawalHistory(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->currency); + self::assertNotNull($item->chain); + self::assertNotNull($item->status); + self::assertNotNull($item->address); + self::assertNotNull($item->memo); + self::assertNotNull($item->isInner); + self::assertNotNull($item->amount); + self::assertNotNull($item->fee); + self::assertNotNull($item->walletTxId); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->updatedAt); + self::assertNotNull($item->remark); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getWithdrawalHistoryById + * Get Withdrawal History By ID + * /api/v1/withdrawals/{withdrawalId} + */ + public void testGetWithdrawalHistoryById() { + GetWithdrawalHistoryByIdReq.GetWithdrawalHistoryByIdReqBuilder builder = GetWithdrawalHistoryByIdReq.builder(); + builder.withdrawalId(?); + GetWithdrawalHistoryByIdReq req = builder.build(); + GetWithdrawalHistoryByIdResp resp = this.api.getWithdrawalHistoryById(req); + self::assertNotNull($resp->id); + self::assertNotNull($resp->uid); + self::assertNotNull($resp->currency); + self::assertNotNull($resp->chainId); + self::assertNotNull($resp->chainName); + self::assertNotNull($resp->currencyName); + self::assertNotNull($resp->status); + self::assertNotNull($resp->failureReason); + self::assertNotNull($resp->failureReasonMsg); + self::assertNotNull($resp->address); + self::assertNotNull($resp->memo); + self::assertNotNull($resp->isInner); + self::assertNotNull($resp->amount); + self::assertNotNull($resp->fee); + self::assertNotNull($resp->walletTxId); + self::assertNotNull($resp->addressRemark); + self::assertNotNull($resp->remark); + self::assertNotNull($resp->createdAt); + self::assertNotNull($resp->cancelType); + foreach($resp->taxes as $item) { + } + + self::assertNotNull($resp->taxDescription); + self::assertNotNull($resp->returnStatus); + self::assertNotNull($resp->returnAmount); + self::assertNotNull($resp->returnCurrency); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getWithdrawalHistoryOld + * Get Withdrawal History - Old + * /api/v1/hist-withdrawals + */ + public void testGetWithdrawalHistoryOld() { + GetWithdrawalHistoryOldReq.GetWithdrawalHistoryOldReqBuilder builder = GetWithdrawalHistoryOldReq.builder(); + builder.currency(?).status(?).startAt(?).endAt(?).currentPage(?).pageSize(?); + GetWithdrawalHistoryOldReq req = builder.build(); + GetWithdrawalHistoryOldResp resp = this.api.getWithdrawalHistoryOld(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->currency); + self::assertNotNull($item->createAt); + self::assertNotNull($item->amount); + self::assertNotNull($item->address); + self::assertNotNull($item->walletTxId); + self::assertNotNull($item->isInner); + self::assertNotNull($item->status); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * withdrawalV1 + * Withdraw - V1 + * /api/v1/withdrawals + */ + public void testWithdrawalV1() { + WithdrawalV1Req.WithdrawalV1ReqBuilder builder = WithdrawalV1Req.builder(); + builder.currency(?).chain(?).address(?).amount(?).memo(?).isInner(?).remark(?).feeDeductType(?); + WithdrawalV1Req req = builder.build(); + WithdrawalV1Resp resp = this.api.withdrawalV1(req); + self::assertNotNull($resp->withdrawalId); + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApiAutoGeneratedTest.java new file mode 100644 index 00000000..462c0597 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApiAutoGeneratedTest.java @@ -0,0 +1,281 @@ +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class WithdrawalApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** getWithdrawalQuotas Request Get Withdrawal Quotas /api/v1/withdrawals/quotas */ + public static void testGetWithdrawalQuotasRequest() throws Exception { + String data = "{\"currency\": \"BTC\", \"chain\": \"eth\"}"; + GetWithdrawalQuotasReq obj = mapper.readValue(data, GetWithdrawalQuotasReq.class); + } + + /** getWithdrawalQuotas Response Get Withdrawal Quotas /api/v1/withdrawals/quotas */ + public static void testGetWithdrawalQuotasResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"currency\":\"BTC\",\"limitBTCAmount\":\"15.79590095\",\"usedBTCAmount\":\"0.00000000\",\"quotaCurrency\":\"USDT\",\"limitQuotaCurrencyAmount\":\"999999.00000000\",\"usedQuotaCurrencyAmount\":\"0\",\"remainAmount\":\"15.79590095\",\"availableAmount\":\"0\",\"withdrawMinFee\":\"0.0005\",\"innerWithdrawMinFee\":\"0\",\"withdrawMinSize\":\"0.001\",\"isWithdrawEnabled\":true,\"precision\":8,\"chain\":\"BTC\",\"reason\":null,\"lockedAmount\":\"0\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** withdrawalV3 Request Withdraw (V3) /api/v3/withdrawals */ + public static void testWithdrawalV3Request() throws Exception { + String data = + "{\"currency\": \"USDT\", \"toAddress\": \"TKFRQXSDcY****GmLrjJggwX8\", \"amount\": \"3\"," + + " \"withdrawType\": \"ADDRESS\", \"chain\": \"trx\", \"isInner\": true, \"remark\":" + + " \"this is Remark\"}"; + WithdrawalV3Req obj = mapper.readValue(data, WithdrawalV3Req.class); + } + + /** withdrawalV3 Response Withdraw (V3) /api/v3/withdrawals */ + public static void testWithdrawalV3Response() throws Exception { + String data = "{\"code\":\"200000\",\"data\":{\"withdrawalId\":\"670deec84d64da0007d7c946\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** cancelWithdrawal Request Cancel Withdrawal /api/v1/withdrawals/{withdrawalId} */ + public static void testCancelWithdrawalRequest() throws Exception { + String data = "{\"withdrawalId\": \"670b891f7e0f440007730692\"}"; + CancelWithdrawalReq obj = mapper.readValue(data, CancelWithdrawalReq.class); + } + + /** cancelWithdrawal Response Cancel Withdrawal /api/v1/withdrawals/{withdrawalId} */ + public static void testCancelWithdrawalResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":null}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getWithdrawalHistory Request Get Withdrawal History /api/v1/withdrawals */ + public static void testGetWithdrawalHistoryRequest() throws Exception { + String data = + "{\"currency\": \"BTC\", \"status\": \"SUCCESS\", \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000, \"currentPage\": 1, \"pageSize\": 50}"; + GetWithdrawalHistoryReq obj = mapper.readValue(data, GetWithdrawalHistoryReq.class); + } + + /** getWithdrawalHistory Response Get Withdrawal History /api/v1/withdrawals */ + public static void testGetWithdrawalHistoryResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 5,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"currency\": \"USDT\",\n" + + " \"chain\": \"\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"address\": \"a435*****@gmail.com\",\n" + + " \"memo\": \"\",\n" + + " \"isInner\": true,\n" + + " \"amount\": \"1.00000000\",\n" + + " \"fee\": \"0.00000000\",\n" + + " \"walletTxId\": null,\n" + + " \"createdAt\": 1728555875000,\n" + + " \"updatedAt\": 1728555875000,\n" + + " \"remark\": \"\",\n" + + " \"arrears\": false\n" + + " },\n" + + " {\n" + + " \"currency\": \"USDT\",\n" + + " \"chain\": \"trx\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"address\": \"TSv3L1fS7******X4nLP6rqNxYz\",\n" + + " \"memo\": \"\",\n" + + " \"isInner\": true,\n" + + " \"amount\": \"6.00000000\",\n" + + " \"fee\": \"0.00000000\",\n" + + " \"walletTxId\": null,\n" + + " \"createdAt\": 1721730920000,\n" + + " \"updatedAt\": 1721730920000,\n" + + " \"remark\": \"\",\n" + + " \"arrears\": false\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * getWithdrawalHistoryById Request Get Withdrawal History By ID + * /api/v1/withdrawals/{withdrawalId} + */ + public static void testGetWithdrawalHistoryByIdRequest() throws Exception { + String data = "{\"withdrawalId\": \"67e6515f7960ba0007b42025\"}"; + GetWithdrawalHistoryByIdReq obj = mapper.readValue(data, GetWithdrawalHistoryByIdReq.class); + } + + /** + * getWithdrawalHistoryById Response Get Withdrawal History By ID + * /api/v1/withdrawals/{withdrawalId} + */ + public static void testGetWithdrawalHistoryByIdResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"67e6515f7960ba0007b42025\",\n" + + " \"uid\": 165111215,\n" + + " \"currency\": \"USDT\",\n" + + " \"chainId\": \"trx\",\n" + + " \"chainName\": \"TRC20\",\n" + + " \"currencyName\": \"USDT\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"failureReason\": \"\",\n" + + " \"failureReasonMsg\": null,\n" + + " \"address\": \"TKFRQXSDcY4kd3QLzw7uK16GmLrjJggwX8\",\n" + + " \"memo\": \"\",\n" + + " \"isInner\": true,\n" + + " \"amount\": \"3.00000000\",\n" + + " \"fee\": \"0.00000000\",\n" + + " \"walletTxId\": null,\n" + + " \"addressRemark\": null,\n" + + " \"remark\": \"this is Remark\",\n" + + " \"createdAt\": 1743147359000,\n" + + " \"cancelType\": \"NON_CANCELABLE\",\n" + + " \"taxes\": null,\n" + + " \"taxDescription\": null,\n" + + " \"returnStatus\": \"NOT_RETURN\",\n" + + " \"returnAmount\": null,\n" + + " \"returnCurrency\": \"KCS\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getWithdrawalHistoryOld Request Get Withdrawal History - Old /api/v1/hist-withdrawals */ + public static void testGetWithdrawalHistoryOldRequest() throws Exception { + String data = + "{\"currency\": \"BTC\", \"status\": \"SUCCESS\", \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000, \"currentPage\": 1, \"pageSize\": 50}"; + GetWithdrawalHistoryOldReq obj = mapper.readValue(data, GetWithdrawalHistoryOldReq.class); + } + + /** getWithdrawalHistoryOld Response Get Withdrawal History - Old /api/v1/hist-withdrawals */ + public static void testGetWithdrawalHistoryOldResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 1,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"currency\": \"BTC\",\n" + + " \"createAt\": 1526723468,\n" + + " \"amount\": \"0.534\",\n" + + " \"address\": \"33xW37ZSW4tQvg443Pc7NLCAs167Yc2XUV\",\n" + + " \"walletTxId\":" + + " \"aeacea864c020acf58e51606169240e96774838dcd4f7ce48acf38e3651323f4\",\n" + + " \"isInner\": false,\n" + + " \"status\": \"SUCCESS\"\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** withdrawalV1 Request Withdraw - V1 /api/v1/withdrawals */ + public static void testWithdrawalV1Request() throws Exception { + String data = + "{\"currency\": \"USDT\", \"address\": \"TKFRQXSDc****16GmLrjJggwX8\", \"amount\": 3," + + " \"chain\": \"trx\", \"isInner\": true}"; + WithdrawalV1Req obj = mapper.readValue(data, WithdrawalV1Req.class); + } + + /** withdrawalV1 Response Withdraw - V1 /api/v1/withdrawals */ + public static void testWithdrawalV1Response() throws Exception { + String data = "{\"code\":\"200000\",\"data\":{\"withdrawalId\":\"670a973cf07b3800070e216c\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run( + WithdrawalApiAutoGeneratedTest::testGetWithdrawalQuotasRequest, + "testGetWithdrawalQuotasRequest"); + run( + WithdrawalApiAutoGeneratedTest::testGetWithdrawalQuotasResponse, + "testGetWithdrawalQuotasResponse"); + run(WithdrawalApiAutoGeneratedTest::testWithdrawalV3Request, "testWithdrawalV3Request"); + run(WithdrawalApiAutoGeneratedTest::testWithdrawalV3Response, "testWithdrawalV3Response"); + run(WithdrawalApiAutoGeneratedTest::testCancelWithdrawalRequest, "testCancelWithdrawalRequest"); + run( + WithdrawalApiAutoGeneratedTest::testCancelWithdrawalResponse, + "testCancelWithdrawalResponse"); + run( + WithdrawalApiAutoGeneratedTest::testGetWithdrawalHistoryRequest, + "testGetWithdrawalHistoryRequest"); + run( + WithdrawalApiAutoGeneratedTest::testGetWithdrawalHistoryResponse, + "testGetWithdrawalHistoryResponse"); + run( + WithdrawalApiAutoGeneratedTest::testGetWithdrawalHistoryByIdRequest, + "testGetWithdrawalHistoryByIdRequest"); + run( + WithdrawalApiAutoGeneratedTest::testGetWithdrawalHistoryByIdResponse, + "testGetWithdrawalHistoryByIdResponse"); + run( + WithdrawalApiAutoGeneratedTest::testGetWithdrawalHistoryOldRequest, + "testGetWithdrawalHistoryOldRequest"); + run( + WithdrawalApiAutoGeneratedTest::testGetWithdrawalHistoryOldResponse, + "testGetWithdrawalHistoryOldResponse"); + run(WithdrawalApiAutoGeneratedTest::testWithdrawalV1Request, "testWithdrawalV1Request"); + run(WithdrawalApiAutoGeneratedTest::testWithdrawalV1Response, "testWithdrawalV1Response"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApiImpl.java new file mode 100644 index 00000000..b28f4659 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApiImpl.java @@ -0,0 +1,72 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class WithdrawalApiImpl implements WithdrawalApi { + private final Transport transport; + + public WithdrawalApiImpl(Transport transport) { + this.transport = transport; + } + + public GetWithdrawalQuotasResp getWithdrawalQuotas(GetWithdrawalQuotasReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/withdrawals/quotas", + req, + GetWithdrawalQuotasResp.class, + false); + } + + public WithdrawalV3Resp withdrawalV3(WithdrawalV3Req req) { + return this.transport.call( + "spot", false, "POST", "/api/v3/withdrawals", req, WithdrawalV3Resp.class, false); + } + + public CancelWithdrawalResp cancelWithdrawal(CancelWithdrawalReq req) { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v1/withdrawals/{withdrawalId}", + req, + CancelWithdrawalResp.class, + false); + } + + public GetWithdrawalHistoryResp getWithdrawalHistory(GetWithdrawalHistoryReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v1/withdrawals", req, GetWithdrawalHistoryResp.class, false); + } + + public GetWithdrawalHistoryByIdResp getWithdrawalHistoryById(GetWithdrawalHistoryByIdReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/withdrawals/{withdrawalId}", + req, + GetWithdrawalHistoryByIdResp.class, + false); + } + + public GetWithdrawalHistoryOldResp getWithdrawalHistoryOld(GetWithdrawalHistoryOldReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/hist-withdrawals", + req, + GetWithdrawalHistoryOldResp.class, + false); + } + + public WithdrawalV1Resp withdrawalV1(WithdrawalV1Req req) { + return this.transport.call( + "spot", false, "POST", "/api/v1/withdrawals", req, WithdrawalV1Resp.class, false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalV1Req.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalV1Req.java new file mode 100644 index 00000000..6dfd8960 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalV1Req.java @@ -0,0 +1,71 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class WithdrawalV1Req implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** + * 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. + */ + @JsonProperty("chain") + @Builder.Default + private String chain = "eth"; + + /** Withdrawal address */ + @JsonProperty("address") + private String address; + + /** Withdrawal amount, a positive number which is a multiple of the amount precision */ + @JsonProperty("amount") + private Long amount; + + /** + * 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. + */ + @JsonProperty("memo") + private String memo; + + /** Internal withdrawal or not. Default: False */ + @JsonProperty("isInner") + @Builder.Default + private Boolean isInner = false; + + /** Remark */ + @JsonProperty("remark") + private String remark; + + /** + * 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. + */ + @JsonProperty("feeDeductType") + private String feeDeductType; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalV1Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalV1Resp.java new file mode 100644 index 00000000..64b42840 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalV1Resp.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class WithdrawalV1Resp + implements Response> { + /** Withdrawal id, a unique ID for a withdrawal */ + @JsonProperty("withdrawalId") + private String withdrawalId; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalV3Req.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalV3Req.java new file mode 100644 index 00000000..0afd9486 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalV3Req.java @@ -0,0 +1,118 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class WithdrawalV3Req implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** + * 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. + */ + @JsonProperty("chain") + @Builder.Default + private String chain = "eth"; + + /** Withdrawal amount, a positive number which is a multiple of the amount precision */ + @JsonProperty("amount") + private String amount; + + /** + * 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. + */ + @JsonProperty("memo") + private String memo; + + /** Internal withdrawal or not. Default: False */ + @JsonProperty("isInner") + @Builder.Default + private Boolean isInner = false; + + /** Remark */ + @JsonProperty("remark") + private String remark; + + /** + * 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. + */ + @JsonProperty("feeDeductType") + private String feeDeductType; + + /** Withdrawal address */ + @JsonProperty("toAddress") + private String toAddress; + + /** + * 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) + */ + @JsonProperty("withdrawType") + private WithdrawTypeEnum withdrawType; + + public enum WithdrawTypeEnum { + /** */ + ADDRESS("ADDRESS"), + /** */ + UID("UID"), + /** */ + MAIL("MAIL"), + /** */ + PHONE("PHONE"); + + private final String value; + + WithdrawTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WithdrawTypeEnum fromValue(String value) { + for (WithdrawTypeEnum b : WithdrawTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalV3Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalV3Resp.java new file mode 100644 index 00000000..a5db38ba --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalV3Resp.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.account.withdrawal; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class WithdrawalV3Resp + implements Response> { + /** Withdrawal id, a unique ID for a withdrawal */ + @JsonProperty("withdrawalId") + private String withdrawalId; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApi.java new file mode 100644 index 00000000..fdf6d92f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApi.java @@ -0,0 +1,15 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.affiliate.affiliate; + +public interface AffiliateApi { + /** + * Get Account Affiliate user rebate information can be obtained at this endpoint. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 30 | + * +-----------------------+------------+ + */ + GetAccountResp getAccount(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApi.template new file mode 100644 index 00000000..a704149b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApi.template @@ -0,0 +1,28 @@ + + /** + * getAccount + * Get Account + * /api/v2/affiliate/inviter/statistics + */ + public void testGetAccount() { + GetAccountResp resp = this.api.getAccount(); + self::assertNotNull($resp->parentUid); + foreach($resp->orders as $item) { + self::assertNotNull($item->orderId); + self::assertNotNull($item->currency); + self::assertNotNull($item->principal); + self::assertNotNull($item->interest); + } + + self::assertNotNull($resp->ltv); + self::assertNotNull($resp->totalMarginAmount); + self::assertNotNull($resp->transferMarginAmount); + foreach($resp->margins as $item) { + self::assertNotNull($item->marginCcy); + self::assertNotNull($item->marginQty); + self::assertNotNull($item->marginFactor); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiAutoGeneratedTest.java new file mode 100644 index 00000000..f4f6c01a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiAutoGeneratedTest.java @@ -0,0 +1,95 @@ +package com.kucoin.universal.sdk.generate.affiliate.affiliate; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class AffiliateApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** getAccount Request Get Account /api/v2/affiliate/inviter/statistics */ + public static void testGetAccountRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getAccount Response Get Account /api/v2/affiliate/inviter/statistics */ + public static void testGetAccountResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"parentUid\": \"1000000\",\n" + + " \"orders\": [\n" + + " {\n" + + " \"orderId\": \"1668458892612980737\",\n" + + " \"currency\": \"USDT\",\n" + + " \"principal\": \"100\",\n" + + " \"interest\": \"0\"\n" + + " }\n" + + " ],\n" + + " \"ltv\": {\n" + + " \"transferLtv\": \"0.6000\",\n" + + " \"onlyClosePosLtv\": \"0.7500\",\n" + + " \"delayedLiquidationLtv\": \"0.9000\",\n" + + " \"instantLiquidationLtv\": \"0.9500\",\n" + + " \"currentLtv\": \"0.0854\"\n" + + " },\n" + + " \"totalMarginAmount\": \"1170.36181573\",\n" + + " \"transferMarginAmount\": \"166.66666666\",\n" + + " \"margins\": [\n" + + " {\n" + + " \"marginCcy\": \"USDT\",\n" + + " \"marginQty\": \"1170.36181573\",\n" + + " \"marginFactor\": \"1.000000000000000000\"\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(AffiliateApiAutoGeneratedTest::testGetAccountRequest, "testGetAccountRequest"); + run(AffiliateApiAutoGeneratedTest::testGetAccountResponse, "testGetAccountResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiImpl.java new file mode 100644 index 00000000..acb9729b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiImpl.java @@ -0,0 +1,24 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.affiliate.affiliate; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class AffiliateApiImpl implements AffiliateApi { + private final Transport transport; + + public AffiliateApiImpl(Transport transport) { + this.transport = transport; + } + + public GetAccountResp getAccount() { + return this.transport.call( + "spot", + false, + "GET", + "/api/v2/affiliate/inviter/statistics", + null, + GetAccountResp.class, + false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/GetAccountLtv.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/GetAccountLtv.java new file mode 100644 index 00000000..b57e95da --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/GetAccountLtv.java @@ -0,0 +1,35 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.affiliate.affiliate; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAccountLtv { + /** LTV of Restricted Transfers to Funding Account */ + @JsonProperty("transferLtv") + private String transferLtv; + + /** LTV of Reduce Only (Restricted Open Positions) */ + @JsonProperty("onlyClosePosLtv") + private String onlyClosePosLtv; + + /** LTV of Delayed Liquidation */ + @JsonProperty("delayedLiquidationLtv") + private String delayedLiquidationLtv; + + /** LTV of Instant Liquidation */ + @JsonProperty("instantLiquidationLtv") + private String instantLiquidationLtv; + + /** Current LTV */ + @JsonProperty("currentLtv") + private String currentLtv; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/GetAccountMargins.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/GetAccountMargins.java new file mode 100644 index 00000000..a49b05a5 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/GetAccountMargins.java @@ -0,0 +1,27 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.affiliate.affiliate; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAccountMargins { + /** Margin Currency */ + @JsonProperty("marginCcy") + private String marginCcy; + + /** Maintenance Quantity (Calculated with Margin Coefficient) */ + @JsonProperty("marginQty") + private String marginQty; + + /** Margin Coefficient return real-time margin discount rate to USDT */ + @JsonProperty("marginFactor") + private String marginFactor; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/GetAccountOrders.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/GetAccountOrders.java new file mode 100644 index 00000000..8ab8bbce --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/GetAccountOrders.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.affiliate.affiliate; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAccountOrders { + /** Loan Orders ID */ + @JsonProperty("orderId") + private String orderId; + + /** Loan Currency */ + @JsonProperty("currency") + private String currency; + + /** Principal to Be Repaid */ + @JsonProperty("principal") + private String principal; + + /** Interest to Be Repaid */ + @JsonProperty("interest") + private String interest; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/GetAccountResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/GetAccountResp.java new file mode 100644 index 00000000..ad7bdb99 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/GetAccountResp.java @@ -0,0 +1,52 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.affiliate.affiliate; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAccountResp implements Response> { + /** Master account UID */ + @JsonProperty("parentUid") + private String parentUid; + + /** Loan Orders */ + @JsonProperty("orders") + private List orders = new ArrayList<>(); + + /** */ + @JsonProperty("ltv") + private GetAccountLtv ltv; + + /** Total Margin Amount (USDT) */ + @JsonProperty("totalMarginAmount") + private String totalMarginAmount; + + /** Total Maintenance Margin for Restricted Transfers (USDT) */ + @JsonProperty("transferMarginAmount") + private String transferMarginAmount; + + /** Margins */ + @JsonProperty("margins") + private List margins = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApi.java new file mode 100644 index 00000000..f075e079 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApi.java @@ -0,0 +1,15 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.apibroker; + +public interface ApiBrokerApi { + /** + * Get Broker Rebate This interface supports the downloading of Broker rebate orders. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+------------+ + */ + GetRebaseResp getRebase(GetRebaseReq req); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApi.template new file mode 100644 index 00000000..29e674e2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApi.template @@ -0,0 +1,15 @@ + + /** + * getRebase + * Get Broker Rebate + * /api/v1/broker/api/rebase/download + */ + public void testGetRebase() { + GetRebaseReq.GetRebaseReqBuilder builder = GetRebaseReq.builder(); + builder.begin(?).end(?).tradeType(?); + GetRebaseReq req = builder.build(); + GetRebaseResp resp = this.api.getRebase(req); + self::assertNotNull($resp->url); + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApiAutoGeneratedTest.java new file mode 100644 index 00000000..7c0961a1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApiAutoGeneratedTest.java @@ -0,0 +1,73 @@ +package com.kucoin.universal.sdk.generate.broker.apibroker; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class ApiBrokerApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** getRebase Request Get Broker Rebate /api/v1/broker/api/rebase/download */ + public static void testGetRebaseRequest() throws Exception { + String data = "{\"begin\": \"20240610\", \"end\": \"20241010\", \"tradeType\": \"1\"}"; + GetRebaseReq obj = mapper.readValue(data, GetRebaseReq.class); + } + + /** getRebase Response Get Broker Rebate /api/v1/broker/api/rebase/download */ + public static void testGetRebaseResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"url\":" + + " \"https://kc-v2-promotion.s3.ap-northeast-1.amazonaws.com/broker/671aec522593f600019766d0_file.csv?X-Amz-Security-Token=IQo*********2cd90f14efb\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(ApiBrokerApiAutoGeneratedTest::testGetRebaseRequest, "testGetRebaseRequest"); + run(ApiBrokerApiAutoGeneratedTest::testGetRebaseResponse, "testGetRebaseResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApiImpl.java new file mode 100644 index 00000000..00e79bee --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApiImpl.java @@ -0,0 +1,18 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.apibroker; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class ApiBrokerApiImpl implements ApiBrokerApi { + private final Transport transport; + + public ApiBrokerApiImpl(Transport transport) { + this.transport = transport; + } + + public GetRebaseResp getRebase(GetRebaseReq req) { + return this.transport.call( + "spot", true, "GET", "/api/v1/broker/api/rebase/download", req, GetRebaseResp.class, false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/GetRebaseReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/GetRebaseReq.java new file mode 100644 index 00000000..415dc51b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/GetRebaseReq.java @@ -0,0 +1,65 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.apibroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRebaseReq implements Request { + /** Start time, for example: 20240610 */ + @JsonProperty("begin") + private String begin; + + /** End time, for example: 20241010 (query data with a maximum interval of 6 months) */ + @JsonProperty("end") + private String end; + + /** Transaction type: 1, spot; 2, futures */ + @JsonProperty("tradeType") + private TradeTypeEnum tradeType; + + public enum TradeTypeEnum { + /** spot */ + _1("1"), + /** futures */ + _2("2"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/GetRebaseResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/GetRebaseResp.java new file mode 100644 index 00000000..8dd1f723 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/GetRebaseResp.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.apibroker; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRebaseResp implements Response> { + /** Rebate order file (link is valid for 1 day) */ + @JsonProperty("url") + private String url; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/AddSubAccountApiReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/AddSubAccountApiReq.java new file mode 100644 index 00000000..2481a7cc --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/AddSubAccountApiReq.java @@ -0,0 +1,82 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddSubAccountApiReq implements Request { + /** Sub-account UID */ + @JsonProperty("uid") + private String uid; + + /** API passphrase */ + @JsonProperty("passphrase") + private String passphrase; + + /** IP whitelist list, supports up to 20 IPs */ + @JsonProperty("ipWhitelist") + @Builder.Default + private List ipWhitelist = new ArrayList<>(); + + /** + * Permission group list (only General, Spot and Futures permissions can be set, such as + * \"General, Trade\"). + */ + @JsonProperty("permissions") + @Builder.Default + private List permissions = new ArrayList<>(); + + /** apikey remarks (length 4~32) */ + @JsonProperty("label") + private String label; + + public enum PermissionsEnum { + /** */ + GENERAL("general"), + /** */ + SPOT("spot"), + /** */ + FUTURES("futures"); + + private final String value; + + PermissionsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PermissionsEnum fromValue(String value) { + for (PermissionsEnum b : PermissionsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/AddSubAccountApiResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/AddSubAccountApiResp.java new file mode 100644 index 00000000..cf6c17a4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/AddSubAccountApiResp.java @@ -0,0 +1,61 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddSubAccountApiResp + implements Response> { + /** Sub-account UID */ + @JsonProperty("uid") + private String uid; + + /** apikey remarks */ + @JsonProperty("label") + private String label; + + /** apiKey */ + @JsonProperty("apiKey") + private String apiKey; + + /** secretKey */ + @JsonProperty("secretKey") + private String secretKey; + + /** apiVersion */ + @JsonProperty("apiVersion") + private Integer apiVersion; + + /** [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list */ + @JsonProperty("permissions") + private List permissions = new ArrayList<>(); + + /** IP whitelist list */ + @JsonProperty("ipWhitelist") + private List ipWhitelist = new ArrayList<>(); + + /** Creation time, Unix timestamp (milliseconds) */ + @JsonProperty("createdAt") + private Long createdAt; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/AddSubAccountReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/AddSubAccountReq.java new file mode 100644 index 00000000..5f99aa86 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/AddSubAccountReq.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddSubAccountReq implements Request { + /** + * Sub-account Name. Note that this name is unique across the exchange. It is recommended to add a + * special identifier to prevent name duplication. + */ + @JsonProperty("accountName") + private String accountName; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/AddSubAccountResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/AddSubAccountResp.java new file mode 100644 index 00000000..53d85c49 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/AddSubAccountResp.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddSubAccountResp + implements Response> { + /** Sub-account name */ + @JsonProperty("accountName") + private String accountName; + + /** Sub-account UID */ + @JsonProperty("uid") + private String uid; + + /** Creation time, Unix timestamp (milliseconds) */ + @JsonProperty("createdAt") + private Long createdAt; + + /** Sub-account VIP level */ + @JsonProperty("level") + private Integer level; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/DeleteSubAccountAPIReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/DeleteSubAccountAPIReq.java new file mode 100644 index 00000000..7adecee5 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/DeleteSubAccountAPIReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class DeleteSubAccountAPIReq implements Request { + /** Sub-account UID */ + @JsonProperty("uid") + private String uid; + + /** Sub-account apiKey */ + @JsonProperty("apiKey") + private String apiKey; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/DeleteSubAccountAPIResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/DeleteSubAccountAPIResp.java new file mode 100644 index 00000000..04f8678a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/DeleteSubAccountAPIResp.java @@ -0,0 +1,40 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class DeleteSubAccountAPIResp + implements Response> { + /** */ + @JsonProperty("data") + private Boolean data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static DeleteSubAccountAPIResp fromJson(Boolean data) { + // original response + DeleteSubAccountAPIResp obj = new DeleteSubAccountAPIResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetBrokerInfoReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetBrokerInfoReq.java new file mode 100644 index 00000000..24c470e9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetBrokerInfoReq.java @@ -0,0 +1,65 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetBrokerInfoReq implements Request { + /** Start time, for example: 20230110 */ + @JsonProperty("begin") + private String begin; + + /** End time, for example: 20230210 (query data with a maximum interval of 6 months) */ + @JsonProperty("end") + private String end; + + /** Transaction type: 1, spot; 2: futures */ + @JsonProperty("tradeType") + private TradeTypeEnum tradeType; + + public enum TradeTypeEnum { + /** spot */ + _1("1"), + /** futures */ + _2("2"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetBrokerInfoResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetBrokerInfoResp.java new file mode 100644 index 00000000..3fc4f498 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetBrokerInfoResp.java @@ -0,0 +1,39 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetBrokerInfoResp + implements Response> { + /** Number of sub-accounts created */ + @JsonProperty("accountSize") + private Integer accountSize; + + /** The maximum number of sub-accounts allowed to be created; null means no limit */ + @JsonProperty("maxAccountSize") + private Integer maxAccountSize; + + /** Broker level */ + @JsonProperty("level") + private Integer level; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositDetailReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositDetailReq.java new file mode 100644 index 00000000..03e72be1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositDetailReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositDetailReq implements Request { + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Hash Value */ + @JsonProperty("hash") + private String hash; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositDetailResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositDetailResp.java new file mode 100644 index 00000000..99f20433 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositDetailResp.java @@ -0,0 +1,120 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositDetailResp + implements Response> { + /** Chain ID of currency */ + @JsonProperty("chain") + private String chain; + + /** Hash */ + @JsonProperty("hash") + private String hash; + + /** Wallet Transaction ID */ + @JsonProperty("walletTxId") + private String walletTxId; + + /** UID */ + @JsonProperty("uid") + private Integer uid; + + /** Update Time (milliseconds) */ + @JsonProperty("updatedAt") + private Long updatedAt; + + /** Amount */ + @JsonProperty("amount") + private String amount; + + /** Memo */ + @JsonProperty("memo") + private String memo; + + /** Fee */ + @JsonProperty("fee") + private String fee; + + /** Address */ + @JsonProperty("address") + private String address; + + /** Remark */ + @JsonProperty("remark") + private String remark; + + /** Is Internal (true or false) */ + @JsonProperty("isInner") + private Boolean isInner; + + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Status (PROCESSING, SUCCESS, FAILURE) */ + @JsonProperty("status") + private StatusEnum status; + + /** Creation Time (milliseconds) */ + @JsonProperty("createdAt") + private Long createdAt; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum StatusEnum { + /** */ + SUCCESS("SUCCESS"), + /** */ + FAILURE("FAILURE"), + /** */ + PROCESSING("PROCESSING"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositListData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositListData.java new file mode 100644 index 00000000..11f5d6b1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositListData.java @@ -0,0 +1,112 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositListData { + /** deposit uid */ + @JsonProperty("uid") + private Double uid; + + /** hash */ + @JsonProperty("hash") + private String hash; + + /** Deposit address */ + @JsonProperty("address") + private String address; + + /** + * 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. + */ + @JsonProperty("memo") + private String memo; + + /** Deposit amount */ + @JsonProperty("amount") + private String amount; + + /** Fees charged for deposit */ + @JsonProperty("fee") + private String fee; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Internal deposit or not */ + @JsonProperty("isInner") + private Boolean isInner; + + /** Wallet Txid */ + @JsonProperty("walletTxId") + private String walletTxId; + + /** Status. Available value: PROCESSING, SUCCESS, FAILURE */ + @JsonProperty("status") + private StatusEnum status; + + /** Remark */ + @JsonProperty("remark") + private String remark; + + /** Chain name of currency */ + @JsonProperty("chain") + private String chain; + + /** Database record creation time */ + @JsonProperty("createdAt") + private Long createdAt; + + /** Update time of the database record */ + @JsonProperty("updatedAt") + private Long updatedAt; + + public enum StatusEnum { + /** */ + PROCESSING("PROCESSING"), + /** */ + SUCCESS("SUCCESS"), + /** */ + FAILURE("FAILURE"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositListReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositListReq.java new file mode 100644 index 00000000..357dc8cb --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositListReq.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositListReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Status. Available value: PROCESSING, SUCCESS, FAILURE */ + @JsonProperty("status") + private String status; + + /** hash */ + @JsonProperty("hash") + private String hash; + + /** Start time (milliseconds) */ + @JsonProperty("startTimestamp") + private Long startTimestamp; + + /** End time (milliseconds); default sorting in descending order */ + @JsonProperty("endTimestamp") + private Long endTimestamp; + + /** Maximum number of returned items, maximum 1000, default 1000 */ + @JsonProperty("limit") + @Builder.Default + private Integer limit = 1000; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositListResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositListResp.java new file mode 100644 index 00000000..54ee3f68 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositListResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDepositListResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetDepositListResp fromJson(List data) { + // original response + GetDepositListResp obj = new GetDepositListResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusData.java new file mode 100644 index 00000000..0293bb81 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusData.java @@ -0,0 +1,66 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetKYCStatusData { + /** client uid */ + @JsonProperty("clientUid") + private Integer clientUid; + + /** KYC status */ + @JsonProperty("status") + private StatusEnum status; + + /** Reject Reason */ + @JsonProperty("rejectReason") + private String rejectReason; + + public enum StatusEnum { + /** KYC information not submitted */ + NONE("NONE"), + /** In progress */ + PROCESS("PROCESS"), + /** Passed */ + PASS("PASS"), + /** Rejected */ + REJECT("REJECT"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusListItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusListItems.java new file mode 100644 index 00000000..08ab54d4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusListItems.java @@ -0,0 +1,66 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetKYCStatusListItems { + /** client uid */ + @JsonProperty("clientUid") + private Integer clientUid; + + /** KYC status */ + @JsonProperty("status") + private StatusEnum status; + + /** Reject Reason */ + @JsonProperty("rejectReason") + private String rejectReason; + + public enum StatusEnum { + /** KYC information not submitted */ + NONE("NONE"), + /** In progress */ + PROCESS("PROCESS"), + /** Passed */ + PASS("PASS"), + /** Rejected */ + REJECT("REJECT"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusListReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusListReq.java new file mode 100644 index 00000000..b00aee27 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusListReq.java @@ -0,0 +1,28 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetKYCStatusListReq implements Request { + /** Page Number */ + @JsonProperty("pageNumber") + @Builder.Default + private Integer pageNumber = 1; + + /** Page Size */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 100; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusListResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusListResp.java new file mode 100644 index 00000000..fcc6f9b0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusListResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetKYCStatusListResp + implements Response> { + /** */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusReq.java new file mode 100644 index 00000000..4f9d2fd2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetKYCStatusReq implements Request { + /** Client uid, Use commas to separate multiple UIDs */ + @JsonProperty("clientUids") + private String clientUids; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusResp.java new file mode 100644 index 00000000..71ddc489 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetKYCStatusResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetKYCStatusResp fromJson(List data) { + // original response + GetKYCStatusResp obj = new GetKYCStatusResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetRebaseReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetRebaseReq.java new file mode 100644 index 00000000..2e207946 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetRebaseReq.java @@ -0,0 +1,65 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRebaseReq implements Request { + /** Start time, for example: 20240610 */ + @JsonProperty("begin") + private String begin; + + /** End time, for example: 20241010 (query data with a maximum interval of 6 months) */ + @JsonProperty("end") + private String end; + + /** Transaction type: 1, spot; 2, futures */ + @JsonProperty("tradeType") + private TradeTypeEnum tradeType; + + public enum TradeTypeEnum { + /** spot */ + _1("1"), + /** futures */ + _2("2"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetRebaseResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetRebaseResp.java new file mode 100644 index 00000000..2b17b613 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetRebaseResp.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRebaseResp implements Response> { + /** Rebate order file (link is valid for 1 day) */ + @JsonProperty("url") + private String url; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountAPIData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountAPIData.java new file mode 100644 index 00000000..97d2378a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountAPIData.java @@ -0,0 +1,82 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSubAccountAPIData { + /** Sub-account UID */ + @JsonProperty("uid") + private String uid; + + /** apikey remarks */ + @JsonProperty("label") + private String label; + + /** apiKey */ + @JsonProperty("apiKey") + private String apiKey; + + /** apiVersion */ + @JsonProperty("apiVersion") + private Integer apiVersion; + + /** [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list */ + @JsonProperty("permissions") + private List permissions = new ArrayList<>(); + + /** IP whitelist list */ + @JsonProperty("ipWhitelist") + private List ipWhitelist = new ArrayList<>(); + + /** Creation time, Unix timestamp (milliseconds) */ + @JsonProperty("createdAt") + private Long createdAt; + + public enum PermissionsEnum { + /** */ + GENERAL("General"), + /** */ + SPOT("Spot"), + /** */ + FUTURES("Futures"); + + private final String value; + + PermissionsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PermissionsEnum fromValue(String value) { + for (PermissionsEnum b : PermissionsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountAPIReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountAPIReq.java new file mode 100644 index 00000000..93817e45 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountAPIReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSubAccountAPIReq implements Request { + /** Sub-account UID */ + @JsonProperty("uid") + private String uid; + + /** Sub-account apiKey */ + @JsonProperty("apiKey") + private String apiKey; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountAPIResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountAPIResp.java new file mode 100644 index 00000000..f2f85d0e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountAPIResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSubAccountAPIResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetSubAccountAPIResp fromJson(List data) { + // original response + GetSubAccountAPIResp obj = new GetSubAccountAPIResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountItems.java new file mode 100644 index 00000000..40723576 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountItems.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSubAccountItems { + /** Sub-account name */ + @JsonProperty("accountName") + private String accountName; + + /** Sub-account UID */ + @JsonProperty("uid") + private String uid; + + /** Creation time, Unix timestamp (milliseconds) */ + @JsonProperty("createdAt") + private Long createdAt; + + /** Sub-account VIP level */ + @JsonProperty("level") + private Integer level; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountReq.java new file mode 100644 index 00000000..6ea9c3bc --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountReq.java @@ -0,0 +1,32 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSubAccountReq implements Request { + /** Sub-account UID */ + @JsonProperty("uid") + private String uid; + + /** Current page, default is 1 */ + @JsonProperty("currentPage") + @Builder.Default + private Integer currentPage = 1; + + /** The number returned per page, the default is 20, the maximum is 100 */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 20; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountResp.java new file mode 100644 index 00000000..797f2cb1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSubAccountResp + implements Response> { + /** Current page */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** Page Size */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** Total Number */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** Total Pages */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetTransferHistoryReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetTransferHistoryReq.java new file mode 100644 index 00000000..b2f799fd --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetTransferHistoryReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTransferHistoryReq implements Request { + /** Transfer Order ID */ + @JsonProperty("orderId") + private String orderId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetTransferHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetTransferHistoryResp.java new file mode 100644 index 00000000..c0b5174f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetTransferHistoryResp.java @@ -0,0 +1,190 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTransferHistoryResp + implements Response> { + /** Transfer Order ID */ + @JsonProperty("orderId") + private String orderId; + + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Transfer Amount */ + @JsonProperty("amount") + private String amount; + + /** UID of the user transferring out */ + @JsonProperty("fromUid") + private Integer fromUid; + + /** From Account Type: Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED */ + @JsonProperty("fromAccountType") + private FromAccountTypeEnum fromAccountType; + + /** Trading pair (required if the account type is ISOLATED), e.g., BTC-USDT */ + @JsonProperty("fromAccountTag") + private String fromAccountTag; + + /** UID of the user transferring in */ + @JsonProperty("toUid") + private Integer toUid; + + /** Account Type: Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED */ + @JsonProperty("toAccountType") + private ToAccountTypeEnum toAccountType; + + /** To Trading pair (required if the account type is ISOLATED), e.g., BTC-USDT */ + @JsonProperty("toAccountTag") + private String toAccountTag; + + /** Status: PROCESSING (processing), SUCCESS (successful), FAILURE (failed) */ + @JsonProperty("status") + private StatusEnum status; + + /** Failure Reason */ + @JsonProperty("reason") + private String reason; + + /** Creation Time (Unix timestamp in milliseconds) */ + @JsonProperty("createdAt") + private Long createdAt; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum FromAccountTypeEnum { + /** */ + MAIN("MAIN"), + /** */ + TRADE("TRADE"), + /** */ + CONTRACT("CONTRACT"), + /** */ + MARGIN("MARGIN"), + /** */ + ISOLATED("ISOLATED"); + + private final String value; + + FromAccountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FromAccountTypeEnum fromValue(String value) { + for (FromAccountTypeEnum b : FromAccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum ToAccountTypeEnum { + /** */ + MAIN("MAIN"), + /** */ + TRADE("TRADE"), + /** */ + CONTRACT("CONTRACT"), + /** */ + MARGIN("MARGIN"), + /** */ + ISOLATED("ISOLATED"); + + private final String value; + + ToAccountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ToAccountTypeEnum fromValue(String value) { + for (ToAccountTypeEnum b : ToAccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StatusEnum { + /** */ + PROCESSING("PROCESSING"), + /** */ + SUCCESS("SUCCESS"), + /** */ + FAILURE("FAILURE"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetWithdrawDetailReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetWithdrawDetailReq.java new file mode 100644 index 00000000..379a8c98 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetWithdrawDetailReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetWithdrawDetailReq implements Request { + /** Withdrawal ID */ + @JsonProperty("withdrawalId") + private String withdrawalId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetWithdrawDetailResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetWithdrawDetailResp.java new file mode 100644 index 00000000..877dd3df --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetWithdrawDetailResp.java @@ -0,0 +1,124 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetWithdrawDetailResp + implements Response> { + /** Withdrawal ID */ + @JsonProperty("id") + private String id; + + /** Chain ID of currency */ + @JsonProperty("chain") + private String chain; + + /** Wallet Transaction ID */ + @JsonProperty("walletTxId") + private String walletTxId; + + /** UID */ + @JsonProperty("uid") + private Integer uid; + + /** Update Time (milliseconds) */ + @JsonProperty("updatedAt") + private Long updatedAt; + + /** Amount */ + @JsonProperty("amount") + private String amount; + + /** Memo */ + @JsonProperty("memo") + private String memo; + + /** Fee */ + @JsonProperty("fee") + private String fee; + + /** Address */ + @JsonProperty("address") + private String address; + + /** Remark */ + @JsonProperty("remark") + private String remark; + + /** Is Internal (true or false) */ + @JsonProperty("isInner") + private Boolean isInner; + + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Status (PROCESSING, WALLET_PROCESSING, REVIEW, SUCCESS, FAILURE) */ + @JsonProperty("status") + private StatusEnum status; + + /** Creation Time (milliseconds) */ + @JsonProperty("createdAt") + private Long createdAt; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum StatusEnum { + /** */ + PROCESSING("PROCESSING"), + /** */ + WALLET_PROCESSING("WALLET_PROCESSING"), + /** */ + REVIEW("REVIEW"), + /** */ + SUCCESS("SUCCESS"), + /** */ + FAILURE("FAILURE"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/ModifySubAccountApiReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/ModifySubAccountApiReq.java new file mode 100644 index 00000000..a9c4238e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/ModifySubAccountApiReq.java @@ -0,0 +1,82 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifySubAccountApiReq implements Request { + /** Sub-account UID */ + @JsonProperty("uid") + private String uid; + + /** IP whitelist list, supports up to 20 IPs */ + @JsonProperty("ipWhitelist") + @Builder.Default + private List ipWhitelist = new ArrayList<>(); + + /** + * [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list (only General, Spot and + * Futures permissions can be set, such as \"General, Trade\"). + */ + @JsonProperty("permissions") + @Builder.Default + private List permissions = new ArrayList<>(); + + /** apikey remarks (length 4~32) */ + @JsonProperty("label") + private String label; + + /** Sub-account apiKey */ + @JsonProperty("apiKey") + private String apiKey; + + public enum PermissionsEnum { + /** */ + GENERAL("general"), + /** */ + SPOT("spot"), + /** */ + FUTURES("futures"); + + private final String value; + + PermissionsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PermissionsEnum fromValue(String value) { + for (PermissionsEnum b : PermissionsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/ModifySubAccountApiResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/ModifySubAccountApiResp.java new file mode 100644 index 00000000..394b3765 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/ModifySubAccountApiResp.java @@ -0,0 +1,57 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifySubAccountApiResp + implements Response> { + /** Sub-account UID */ + @JsonProperty("uid") + private String uid; + + /** apikey remarks */ + @JsonProperty("label") + private String label; + + /** apiKey */ + @JsonProperty("apiKey") + private String apiKey; + + /** apiVersion */ + @JsonProperty("apiVersion") + private Integer apiVersion; + + /** [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list */ + @JsonProperty("permissions") + private List permissions = new ArrayList<>(); + + /** IP whitelist list */ + @JsonProperty("ipWhitelist") + private List ipWhitelist = new ArrayList<>(); + + /** Creation time, Unix timestamp (milliseconds) */ + @JsonProperty("createdAt") + private Long createdAt; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApi.java new file mode 100644 index 00000000..5ad82767 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApi.java @@ -0,0 +1,155 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +public interface NdBrokerApi { + /** + * Submit KYC This endpointcan submit kyc information for a sub-account of nd broker docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | + * API-RATE-LIMIT-WEIGHT | NULL | +-----------------------+---------+ + */ + SubmitKYCResp submitKYC(SubmitKYCReq req); + + /** + * Get KYC Status This endpoint can query the specified Kyc status docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | + * API-RATE-LIMIT-WEIGHT | NULL | +-----------------------+---------+ + */ + GetKYCStatusResp getKYCStatus(GetKYCStatusReq req); + + /** + * Get KYC Status List This endpoint can query the specified Kyc status list docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | + * API-RATE-LIMIT-WEIGHT | NULL | +-----------------------+---------+ + */ + GetKYCStatusListResp getKYCStatusList(GetKYCStatusListReq req); + + /** + * Get Broker Info This endpoint supports querying the basic information of the current Broker. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetBrokerInfoResp getBrokerInfo(GetBrokerInfoReq req); + + /** + * Add sub-account This endpoint supports Broker users creating sub-accounts. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + */ + AddSubAccountResp addSubAccount(AddSubAccountReq req); + + /** + * Get sub-account This interface supports querying sub-accounts created by Broker. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetSubAccountResp getSubAccount(GetSubAccountReq req); + + /** + * Add sub-account API This interface supports the creation of Broker sub-account APIKEY. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + */ + AddSubAccountApiResp addSubAccountApi(AddSubAccountApiReq req); + + /** + * Get sub-account API This interface supports querying the Broker’s sub-account APIKEY. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetSubAccountAPIResp getSubAccountAPI(GetSubAccountAPIReq req); + + /** + * Modify sub-account API This interface supports modifying the Broker’s sub-account APIKEY. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + */ + ModifySubAccountApiResp modifySubAccountApi(ModifySubAccountApiReq req); + + /** + * Delete sub-account API This interface supports deleting Broker’s sub-account APIKEY. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + */ + DeleteSubAccountAPIResp deleteSubAccountAPI(DeleteSubAccountAPIReq req); + + /** + * Transfer 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | + * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + */ + TransferResp transfer(TransferReq req); + + /** + * Get Transfer History This endpoint supports querying the transfer records of the broker itself + * and its created sub-accounts. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | BROKER | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ + */ + GetTransferHistoryResp getTransferHistory(GetTransferHistoryReq req); + + /** + * Get Deposit List The deposit records of each sub-account under the ND broker can be obtained at + * this endpoint. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | BROKER | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ + */ + GetDepositListResp getDepositList(GetDepositListReq req); + + /** + * Get Deposit Detail This endpoint supports querying the deposit record of sub-accounts created + * by a Broker (excluding main account of ND broker). docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | + * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + */ + GetDepositDetailResp getDepositDetail(GetDepositDetailReq req); + + /** + * Get Withdraw Detail This endpoint supports querying the withdrawal records of sub-accounts + * created by a Broker (excluding main account of ND broker). docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | + * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + */ + GetWithdrawDetailResp getWithdrawDetail(GetWithdrawDetailReq req); + + /** + * Get Broker Rebate This interface supports the downloading of Broker rebate orders. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + */ + GetRebaseResp getRebase(GetRebaseReq req); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApi.template new file mode 100644 index 00000000..a6f48069 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApi.template @@ -0,0 +1,337 @@ + + /** + * submitKYC + * Submit KYC + * /api/kyc/ndBroker/proxyClient/submit + */ + public void testSubmitKYC() { + SubmitKYCReq.SubmitKYCReqBuilder builder = SubmitKYCReq.builder(); + builder.clientUid(?).firstName(?).lastName(?).issueCountry(?).birthDate(?).identityType(?).identityNumber(?).expireDate(?).frontPhoto(?).backendPhoto(?).facePhoto(?); + SubmitKYCReq req = builder.build(); + SubmitKYCResp resp = this.api.submitKYC(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getKYCStatus + * Get KYC Status + * /api/kyc/ndBroker/proxyClient/status/list + */ + public void testGetKYCStatus() { + GetKYCStatusReq.GetKYCStatusReqBuilder builder = GetKYCStatusReq.builder(); + builder.clientUids(?); + GetKYCStatusReq req = builder.build(); + GetKYCStatusResp resp = this.api.getKYCStatus(req); + foreach($resp->data as $item) { + self::assertNotNull($item->clientUid); + self::assertNotNull($item->status); + self::assertNotNull($item->rejectReason); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getKYCStatusList + * Get KYC Status List + * /api/kyc/ndBroker/proxyClient/status/page + */ + public void testGetKYCStatusList() { + GetKYCStatusListReq.GetKYCStatusListReqBuilder builder = GetKYCStatusListReq.builder(); + builder.pageNumber(?).pageSize(?); + GetKYCStatusListReq req = builder.build(); + GetKYCStatusListResp resp = this.api.getKYCStatusList(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->clientUid); + self::assertNotNull($item->status); + self::assertNotNull($item->rejectReason); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getBrokerInfo + * Get Broker Info + * /api/v1/broker/nd/info + */ + public void testGetBrokerInfo() { + GetBrokerInfoReq.GetBrokerInfoReqBuilder builder = GetBrokerInfoReq.builder(); + builder.begin(?).end(?).tradeType(?); + GetBrokerInfoReq req = builder.build(); + GetBrokerInfoResp resp = this.api.getBrokerInfo(req); + self::assertNotNull($resp->accountSize); + self::assertNotNull($resp->maxAccountSize); + self::assertNotNull($resp->level); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addSubAccount + * Add sub-account + * /api/v1/broker/nd/account + */ + public void testAddSubAccount() { + AddSubAccountReq.AddSubAccountReqBuilder builder = AddSubAccountReq.builder(); + builder.accountName(?); + AddSubAccountReq req = builder.build(); + AddSubAccountResp resp = this.api.addSubAccount(req); + self::assertNotNull($resp->accountName); + self::assertNotNull($resp->uid); + self::assertNotNull($resp->createdAt); + self::assertNotNull($resp->level); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSubAccount + * Get sub-account + * /api/v1/broker/nd/account + */ + public void testGetSubAccount() { + GetSubAccountReq.GetSubAccountReqBuilder builder = GetSubAccountReq.builder(); + builder.uid(?).currentPage(?).pageSize(?); + GetSubAccountReq req = builder.build(); + GetSubAccountResp resp = this.api.getSubAccount(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->accountName); + self::assertNotNull($item->uid); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->level); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addSubAccountApi + * Add sub-account API + * /api/v1/broker/nd/account/apikey + */ + public void testAddSubAccountApi() { + AddSubAccountApiReq.AddSubAccountApiReqBuilder builder = AddSubAccountApiReq.builder(); + builder.uid(?).passphrase(?).ipWhitelist(?).permissions(?).label(?); + AddSubAccountApiReq req = builder.build(); + AddSubAccountApiResp resp = this.api.addSubAccountApi(req); + self::assertNotNull($resp->uid); + self::assertNotNull($resp->label); + self::assertNotNull($resp->apiKey); + self::assertNotNull($resp->secretKey); + self::assertNotNull($resp->apiVersion); + foreach($resp->permissions as $item) { + } + + foreach($resp->ipWhitelist as $item) { + } + + self::assertNotNull($resp->createdAt); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSubAccountAPI + * Get sub-account API + * /api/v1/broker/nd/account/apikey + */ + public void testGetSubAccountAPI() { + GetSubAccountAPIReq.GetSubAccountAPIReqBuilder builder = GetSubAccountAPIReq.builder(); + builder.uid(?).apiKey(?); + GetSubAccountAPIReq req = builder.build(); + GetSubAccountAPIResp resp = this.api.getSubAccountAPI(req); + foreach($resp->data as $item) { + self::assertNotNull($item->uid); + self::assertNotNull($item->label); + self::assertNotNull($item->apiKey); + self::assertNotNull($item->apiVersion); + self::assertNotNull($item->permissions); + self::assertNotNull($item->ipWhitelist); + self::assertNotNull($item->createdAt); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * modifySubAccountApi + * Modify sub-account API + * /api/v1/broker/nd/account/update-apikey + */ + public void testModifySubAccountApi() { + ModifySubAccountApiReq.ModifySubAccountApiReqBuilder builder = ModifySubAccountApiReq.builder(); + builder.uid(?).ipWhitelist(?).permissions(?).label(?).apiKey(?); + ModifySubAccountApiReq req = builder.build(); + ModifySubAccountApiResp resp = this.api.modifySubAccountApi(req); + self::assertNotNull($resp->uid); + self::assertNotNull($resp->label); + self::assertNotNull($resp->apiKey); + self::assertNotNull($resp->apiVersion); + foreach($resp->permissions as $item) { + } + + foreach($resp->ipWhitelist as $item) { + } + + self::assertNotNull($resp->createdAt); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * deleteSubAccountAPI + * Delete sub-account API + * /api/v1/broker/nd/account/apikey + */ + public void testDeleteSubAccountAPI() { + DeleteSubAccountAPIReq.DeleteSubAccountAPIReqBuilder builder = DeleteSubAccountAPIReq.builder(); + builder.uid(?).apiKey(?); + DeleteSubAccountAPIReq req = builder.build(); + DeleteSubAccountAPIResp resp = this.api.deleteSubAccountAPI(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * transfer + * Transfer + * /api/v1/broker/nd/transfer + */ + public void testTransfer() { + TransferReq.TransferReqBuilder builder = TransferReq.builder(); + builder.currency(?).amount(?).direction(?).accountType(?).specialUid(?).specialAccountType(?).clientOid(?); + TransferReq req = builder.build(); + TransferResp resp = this.api.transfer(req); + self::assertNotNull($resp->orderId); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getTransferHistory + * Get Transfer History + * /api/v3/broker/nd/transfer/detail + */ + public void testGetTransferHistory() { + GetTransferHistoryReq.GetTransferHistoryReqBuilder builder = GetTransferHistoryReq.builder(); + builder.orderId(?); + GetTransferHistoryReq req = builder.build(); + GetTransferHistoryResp resp = this.api.getTransferHistory(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->currency); + self::assertNotNull($resp->amount); + self::assertNotNull($resp->fromUid); + self::assertNotNull($resp->fromAccountType); + self::assertNotNull($resp->fromAccountTag); + self::assertNotNull($resp->toUid); + self::assertNotNull($resp->toAccountType); + self::assertNotNull($resp->toAccountTag); + self::assertNotNull($resp->status); + self::assertNotNull($resp->reason); + self::assertNotNull($resp->createdAt); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getDepositList + * Get Deposit List + * /api/v1/asset/ndbroker/deposit/list + */ + public void testGetDepositList() { + GetDepositListReq.GetDepositListReqBuilder builder = GetDepositListReq.builder(); + builder.currency(?).status(?).hash(?).startTimestamp(?).endTimestamp(?).limit(?); + GetDepositListReq req = builder.build(); + GetDepositListResp resp = this.api.getDepositList(req); + foreach($resp->data as $item) { + self::assertNotNull($item->uid); + self::assertNotNull($item->hash); + self::assertNotNull($item->address); + self::assertNotNull($item->memo); + self::assertNotNull($item->amount); + self::assertNotNull($item->fee); + self::assertNotNull($item->currency); + self::assertNotNull($item->isInner); + self::assertNotNull($item->walletTxId); + self::assertNotNull($item->status); + self::assertNotNull($item->remark); + self::assertNotNull($item->chain); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->updatedAt); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getDepositDetail + * Get Deposit Detail + * /api/v3/broker/nd/deposit/detail + */ + public void testGetDepositDetail() { + GetDepositDetailReq.GetDepositDetailReqBuilder builder = GetDepositDetailReq.builder(); + builder.currency(?).hash(?); + GetDepositDetailReq req = builder.build(); + GetDepositDetailResp resp = this.api.getDepositDetail(req); + self::assertNotNull($resp->chain); + self::assertNotNull($resp->hash); + self::assertNotNull($resp->walletTxId); + self::assertNotNull($resp->uid); + self::assertNotNull($resp->updatedAt); + self::assertNotNull($resp->amount); + self::assertNotNull($resp->memo); + self::assertNotNull($resp->fee); + self::assertNotNull($resp->address); + self::assertNotNull($resp->remark); + self::assertNotNull($resp->isInner); + self::assertNotNull($resp->currency); + self::assertNotNull($resp->status); + self::assertNotNull($resp->createdAt); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getWithdrawDetail + * Get Withdraw Detail + * /api/v3/broker/nd/withdraw/detail + */ + public void testGetWithdrawDetail() { + GetWithdrawDetailReq.GetWithdrawDetailReqBuilder builder = GetWithdrawDetailReq.builder(); + builder.withdrawalId(?); + GetWithdrawDetailReq req = builder.build(); + GetWithdrawDetailResp resp = this.api.getWithdrawDetail(req); + self::assertNotNull($resp->id); + self::assertNotNull($resp->chain); + self::assertNotNull($resp->walletTxId); + self::assertNotNull($resp->uid); + self::assertNotNull($resp->updatedAt); + self::assertNotNull($resp->amount); + self::assertNotNull($resp->memo); + self::assertNotNull($resp->fee); + self::assertNotNull($resp->address); + self::assertNotNull($resp->remark); + self::assertNotNull($resp->isInner); + self::assertNotNull($resp->currency); + self::assertNotNull($resp->status); + self::assertNotNull($resp->createdAt); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getRebase + * Get Broker Rebate + * /api/v1/broker/nd/rebase/download + */ + public void testGetRebase() { + GetRebaseReq.GetRebaseReqBuilder builder = GetRebaseReq.builder(); + builder.begin(?).end(?).tradeType(?); + GetRebaseReq req = builder.build(); + GetRebaseResp resp = this.api.getRebase(req); + self::assertNotNull($resp->url); + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApiAutoGeneratedTest.java new file mode 100644 index 00000000..b016a1d6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApiAutoGeneratedTest.java @@ -0,0 +1,538 @@ +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class NdBrokerApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** submitKYC Request Submit KYC /api/kyc/ndBroker/proxyClient/submit */ + public static void testSubmitKYCRequest() throws Exception { + String data = + "{\"clientUid\": \"226383154\", \"firstName\": \"Kaylah\", \"lastName\": \"Padberg\"," + + " \"issueCountry\": \"JP\", \"birthDate\": \"2000-01-01\", \"expireDate\":" + + " \"2030-01-01\", \"identityType\": \"passport\", \"identityNumber\": \"55\"," + + " \"facePhoto\":" + + " \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wgARCAKyArIDASIAAhEBAxEB/8QAHAABAAICAwEAAAAAAAAAAAAAAAYHAQUCAwQI/8QAGgEBAAMBAQEAAAAAAAAAAAAAAAEDBAIFBv/aAAwDAQACEAMQAAABtQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwZaCOFhddTQMu+OVHgsXxwYTn112LckVBZPqHv8AmGal0o5IwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdZ007qYwDBnDIxstcYAAAzgZm0IyfSW3+X7lJ2xkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQecac+b8bbaxMUWtouZguTvmceT3SWm2n8ZxdUAAAAzgW1Z/yvcBZIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHi4UieW5qp8VVly+Op5rX3Ura+vRTM5N7sZNPzzjONmUAAAAB29Qv+V/OH0UdoAAAAAAAAAAAAAAAAAAAAAAAAAAAADrqQsyv4NPOOoBZUn7KLaslMThFvH0LU/rnHHfLc1rZlfWOPPFffzlx5cd+MJAAAAAZuCn9yfSDGQAAAAAAAAAAAAAAAAAAAAAAAAAABx5ViROQeayaLePIy3Ojv1XUUV1m/LIbrqa2s19OXJTVyxLjy81Pfz1x5c9+Tqe3yHFlLAAAAGcZPovfV3YgAAAAAAAAAAAAAAAAAAAAAAAAAABx+cr3pmJt3vPP1APP6Evnfru3r1U5kWM5rtdsSDw+4in7U9juMR+QuZoPWXhSGzPjB3yAAAzjJYtyUndgAAAAAAAAAAAAAAAAAAAAAAAAAABoanuz595m8hg1AOjv4uuns5cup8nrOYByAEAlmir0pu+uKYNVAAADOMlhXPW1kgAAAAAAAAAAAAAAAAAAAAAAAAAACgb+hJ3baprZxaAr7AAAAAMZAFEWdTWmniNFQAADONuXfJOPIAAAAAAAAAAAAAAAAAAAAAAAAAAHE5dUcp46bIjUep6vNGZNm0BzIAAAFPd2l027NbunrlE93ThZwAAABm26o3MLZjGnk+K7U7X1aSvqz/d86Xx6OfZiQAAAAAAAAAAAAAAAAAAAAADo0dMomteSaO984tvqgnn3TCIcJp2qKwJNGbIsbsoWd1XT95vTT0ESEgKN0c2hO/LjGcdQAAABkkXE9dqd/f8v6OGcebeCNFAp/Xn1fnT3t0Hn9rDYclojWV2fR6mLHr7kDGQAAAAAAAAAAAAAAAAABD+NRTCc9vp9LBofJ17jztfh9cNvvJfzqO3Pn6J9k51sYmywqnncMtq5bze6+nRud9Sux75u3u+e/VzF9qNzE27SOz8NtetcudnHVjvynz59XOJ8TbeuLI9sJFoolcMelfz2jA8fQA6+2utlekm2kkv3/z7JsyMZQ0sVsTFN2ntukMYN17Ortr7AAAAAAAAAAAAAAAAQvlUExiw+Pp9Lzwvphe60cs8T1IndNB33nu6qHuij5mfZjvuo1RryeiQbMm5jWs9lOj2+j3w7nZ3S3POu/Ar0YZGMgzgkDOCJeH3ceq/FZFOXH5fl4HkaBqLeddDPFYn3HjduT2vLAAARGXYr719sfOH0D5Xpe8R0AAAAAAAAAAAAAAi3royYzPsev0sGMl9AEJmEQlng+rpczuoc9tkQqO2Be3NaXrXdfe4zX+v7jhKI/mNXVvs7KnWFG0EgAAAADMxD7npa6cXjjq8PT0VL3Sn7LyvX7j6PxgmAABCK7JurXdU2+iReXSUX3mM14AAAAAAAAAAAADw+2izTzTx7z0MWRqygARPddEK8n0bAiXjtHBpg2izNe7Onbx3yc99GgmcXs4mbo78fvM4c9gAAAAAABPMQuem7kw+RisO/o20eyTH1fhh3wAABrI3J4l5Po23VlqQP5f1eUa3sa+s8r6QGe4AAAAAAAAAAAACC1tmZaKO/J6fnhAADjXNkYqthOd/q/P2eTfxbxZ9c5QLOe6eRbwdXXMi2sH9kbJYivPi6UI12R3IGj58zuWs5Oti8OYn2vET7Xi4I2LWdcxt+Oi8ndPn3cXmmzxNdNGfX8wLKwAAAEOmLiytvBa1deftn0Ik8E75+nHz3Z+XRNQAAAAAAAAAAAPL6o0UlZUCnvo4Q05gAAAAAMdfaifN1e/ET4OOxQ1PDck6HrkSJjPTLETD+EzRMJxN0TB04JhHOaEQ70yhMR737J1zxzlZWAAAAAAAhkz0dN0LuKBWZ5foeOorqqtN07GOyIAAAAAAAAAAAV7YVPGslei33q+aFtQAAAAAAAAAAAAAAAAAAAAAA8sT6kLxTdNXj9l1ITCv5rDcmqx9weft4UvM/RKy/WAAAAAAAAAADz86JPVD7ShRKtl5PX7HlB1yAAAAAAAAAAAAAAAAAAAAABxredxbzt0wSZ8P7lL2PFdt9v4m3Ov0cMOlle3V5Pp8/J660460P0NCp8kAAAAAAAAAAYKx1kSuU7KduKqiV+jU7b2PLDrgAAAAAAAAAAAAAAAAAAAAADhXFleDPfsu2uNf8563fYUdlP0Hl4jUhrfqJhPvJ3+bv0sD8t3y3WQAAAAAAAAAAeD39J8+3DSl0HZH5AKVn/orTRTZiKyffh5mgRuo/DPPj2SHq0Si6R7mBuubd7KnnezLvRozgAAAAAAAADBlq9dXZJUZ2JtXHl3WEgAAGs2fl47is0r/ALc2nt32ps/HpzXErgfPUws7hzAAAAAAAAAAAAK5r36Hi5rNtVHgLm6Kg4G9iOy29tes0eevjoY56zj1SAirbaoc+vJYW/qa0vRwd405wAAAAAABC67NjDvHjzt+cFVgHqmMEzZXb+YNOfSwBZWIxx3J+mu/Xl077S7reU3VbY0t7qLcY5V9CM3fC7SkAAAAAAAAAAAAAA4cxAq3+hYL1Gqj2p0+jP5uOeOXS93isQmPuDhUFxREqlnBmcQf32cWjmu+vXlshXvt65mqJ+vviQtJ6O+dm8vZMdzhymMgA0tc77QeZ6ODNNpv7VKP6/oCAFfYzg5TyA7C2u0mM+r5isLPh+XTZ3ZSWz8/bbSouRbaovAmxoR7bmPZ2AAAAAAAAAAAAAAAABilrqrEqTGcGbMrLdF1OHMQ2V04abGcGZ5A7ZLQ48h4NVJBBfBZKIqvV3QmaE8/0GR878PotL5vz9Hj5w6vpTxnzLwInGccy7tnx5DGRR2s3uiHLjklvZM9ldVXWLE5FW6u85DX3Et9tHM6338yQAAAAAAAAAAAAAAAAAGv2A+XfPb9QmM4G238KybLW4Aydv0bCLOAAAAAAAHHkPl/yz2BDOBdG8o2fkz1sfr88XVnA5Yk5enuAAAAAAAAAAAAAAAAAAAAAAABWllj5b6vpSuCssSbyGkSWTlcWnOdyYyAAAAAAAAGk+ePqKIFC49XmDAzgM4z2GL71FhAAAAAAAAAAAAAAAAAAAAAAAAAAGGQAAAAAAAAAAABqqvuUfMHm+ptYfNfd9F7QpO0t8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEgAgAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgEgAgAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/xAAxEAABBAEBBwMDBAIDAQAAAAAEAQIDBQAGEBESExQwQBUgUCExNRYiI2AyMyQ0oCX/2gAIAQEAAQUC/wDXq97Y2k31fBkurIkyTVRS4upz8TU5+R6qKRYtWR4PqCvmyKaOZv8ASjLcMTH6qERTNUyOwowgpewOTMO4LUxMSV9yIav9GJnjHiuNQSleBVagIEyvsBzo/wChvcjG3lm6wJ9sIzph+2PPIPLR3zC2/wBC1fO6Kr92k1/5+ow0FL7mnr3ixP6DagssBLIKQAkCkIKiH06OzL+qjEj2aTb/AMzU8fHW93S9vz0/oBZEYsDEktrT+OGNkjH5ZRc8DZpQfgHtI+bXd1j3Mdp6y9QE+eNLhDiubSSznjn9IjiCOsnSgn17qa5Ql1iM8UusrJjXwRNghITfB3qg1wBsT2yR/NmHDhtP1TkcZdnPWVLAowqeTqfWwGLHJHPHdgKERWzMPBRN2x3+Pf0cbxwfMyPbGy31HI9wwRdg8PT8ESxsbGzNSHLKRmliXNKuoOfW6SmVJdi/Zfv3qgrpLD5hyo1t7avsJ6ekajERETZO/lwPcr3Zp/8ALqm9KJyxXOx32X79+jI6mr+X1dYqxumq5HJ7LX8bs0tErrDKdFW82Erwj41jnK4Wdqd3Rc3ED8s5UakznWNpDGkMXsIZzYJo3RSNarlpAOhEyEIeGfYcx0gdbTTETjDRDR5Y1UBiHhyBzdvRT9x3y1u/l1mmo+O091jVjnKBUjBORd/augusC7ejPyvy18nFT6VX/wCj7ZncDYXK5kjeJsDVb27mLk2Xa0UzfY/LFR84aof09r7XJvRE3J3NTbvVe1oqHhF+X1IKottVk9UD4VvNz7DtaeH6ap+X1RX9WFpw9B5vBvrBBB+1Vi9Yc1ERPl5HtYy15CH0NihUHc1GS6SyAvph2N1EGqGaj3pLI6WTtaRESCArUQMCyark3/qsjBdVRucIXAXH8iq7stLkcKIgk21mHod7CIJ60qotGGs7dx+U7se5HzklWLxqGV6Q04bE9MDwyijeg8pNSbXmxHD/AB00rIWWWp8KKIJWvEeZOMPGNGZZDi4dbsKia5Wurb9UyN7ZG9m7Tda92sr3myCixCs9lsC0yCnsX1pX6rixuqhlwW+AIxkjJE+Jt7aGuYWWVakQV0UEaI44wYeIOCyt3zLXUpBiQ6dEYjqEBUN045rRySAZQ9RRuweeMhnv1QMsZvcqK9TZIomRM9twV0odWIhL1qxlxaiHJadyZuLr3h6nJjyvtxDl+Gu7mMBkcc9iQMNGOy5fwB6Zi4pdQm5p6pa9uXNsS4uG0OHdW6gZKuoa5hA0EfNkWIkZRr4uLIdRwOyO1CfjJY3ptsQ2mjFDyDTdkSKKTAxXGEjQMHh9sj2xxmkPsTBoWjw7VRFSeuglwkGYZanUb4shkZLH8HfXDQGDwzHEQRMhjy/d+3T26OuHYp1ixqMb9sR3OsZI2SIYDyk09arxyN5J+TDQOTg45Vr5ce18L2El7kOPTPUT89VPTCS5ytnC5c5b85T85Eq4gsy4gEy4ytXGAwohg3IdpxsXQ+6/P41qBOW33L9csK3flJbyV0kUjZY/gb+4aDGNBKdPDE2GPZf/AOwBN2ntM/l8Idwj1qbzNhsXIIV6vmje17LInflePwIaTyWjDuIexqMbs3Jm5M3J2TWcY2mZ+Gf23dh00dSLzpezcCZpCw4XfAagtkAhHilOJgiZDHtv/wDdTtR9QHKoNi1Uclu/l1gs3IkZZpv66DgKnUmQmp5FRGU+OAEbmOlekccaOJIY1GN7zk3tqV4LT2WRrA4YY5TiYo2xM7KpvwlrgjgSGlCedeWzK2OGOawKghbBH7L/AP3UP4zUAOUd107dSzN9I08C0siejDlbahdCVTV48Qmo5Wx1gjGPkcRDG0olxChD8lngQfS02lztGgmklsCxIGjQ9u9i3xaLn3xebb2UdeN/PZGDQNHi9t+n8mn131qpvS1ZAwt7ZmwaSc3l5qcJ73D3BcERpk5r+gl3Nr5VwcRkS+CP9bPZLI2KOxMecRXiIPH2TbN7nq4xjQbReI9vGHpKTguPMMJjEHNImszQhmixe6/b+zTbt4N1YdNHUAKXJqKVvNhcQG4fUjkz9RCcNhYxEZEu6XxK362eKqIlzZdU6rB5admyesYVAO0gxURUvgmiz1knPBo38q48tc1HZ9cTViciL320XNDFMmFwIWU8hyxhBwNcWXuRUkCgfnpkeRBwx5Yt4C4HccPhL9qr8mv0y7suctSFv7Z8fNEpCkFMzVEqcFG3cLX/AJby9VWHTCVAvNl7DkRzTg3DvEt5h0trJDGVixRxI5F9lwz99a/iG8J3+Nc9sdhbWqkZWAca9yxrl4ozSoGq50kkcaRQ0jeO48u+mcVcDxpDD2d2TV48mPp25JVkNxRCWZzCI86udM64jJipJmjkvgT1GXPUZM9SdiWWepJiWLMSwixDoM62DOrgzqoM6qDOqgzqoM6yDOtgxT4cdYtx9g9cjiklcDWtj76tRctG8B5hPJChhnkwa4PFdSXbbBfIKl5AwCc4/wABY2LiwRLnSwZ0Y+dENi142LWi56UNi1I+ejw46nbno2ejOz0d+ejyZ6PJno8mejyYlM7EpsSnjxKodMjCHjxE3eDexLzFfKU4EZogxAsJDToHV59fP1IXj6jk5dPRs3lfMXEqME00LzCNmp/yOnvw3j60k4QKFv7PmLibmlVI/TA45yMaQ99hYiQoMN4+siWSz0zeEL5AieMdktu/iit38QxEZDNpUqQQUo/V2GzUhnBFo8Dx55mQRW97OW+aJ8T69NwXx7lRrZXyGlC0w0TCqYaVrVlAMY5Ht2Xk2+TTo3KBwqZo440UlnYjxNgh8WR7Y2XVnLZk1FW0Vt/+UE+gvx5+/otO7vUtmp0Tq6r/AKOSPSNkTHnHMajGZqI7myaUrumG8bV1jwt09X7m5eflYP8AR8e9qPZ/IAYHZjkMJsBh2kSyWJsMaRRZdz8EOlxvplwb0Y1EAtieibvGVdyTuWxtWNRjM1LErbCslSUP5AsVhTJqqdqziTQMo2s5WSORjJXPNNFhQceR7Y2GSyWVjUgMrxPGsF4QKFN9psuQ+sEDJeHNBNHO32SSMjbNbRNx1tOueqE4y2nTIbaJ2Me2RPhrFnGFQv8A5MtzOYungFYmajO4n6RruFnjzs5kI6uAsY3tkZss6uMzJIiQZRLVrsa9r0ywsEgyaZ8zvbDM+F4Fg0jxvtkh47MdbwpiXEWRnjPxFRU7Rf8A1aZ7YyD7FZcp6p0792W5vRi0detkcxqNb5GpKbnpX2UwKgnwmM2TRMmZZ1UEKRyvjxbMhY3LvX3tXctWZ1DPDNsmwrORLMvshnlhUKzSRfe+RjEktoGqXaOmjhikmfW0rYVxzka2wJfYG04Da8PyrOkFOw6jNDclgfBjrU5cUs6bIq8mXErYx4nLvdtgglnclEYqFgECeyCRYpIZEli8GyseLs1Z6xr7LCy5T+YWVkdQbJkOnv2j0okWRRsibs1FYZpOs3J5rmNdmp6vqRq4/kZHIyRt5NwxbQx3FThixiQ49qPbcg9ERto5t8PgWpHIH9n3xzHN9iZTE8yPbEjVOja1jPba2jBWUwD7M1jUa3z7fT8Rbp6w8N075Xrt0tAm7bqZnEBtEGmKkcNYQ51JkeMtCW424kxty3G20C4loMuNPGdiEQrnNjzjaub09tzJxmbamucdIKLCMxzUclzUIjdoMvJK22Ve90kRJQi+uG4t0auNuzEx90a7FIMKWvoDCXBCxhj/AAWsm7rPbpZ6dNt1PJwhbdGpvtcVEXJQxpckpK9+S6ZBfjtKQY/SeSaWLTH6fsWqtHZJno9jnpVgmdEc3OnsM5VhiqY3HuVzttbAgwW2xiSA3YmR26tZ6znrOLc5NaSSNggnMmp6WEQda8NcYCIxUaifC61HV0e2pL6Mtjmvbk0jYY7UxTSduiYf4++bv6Ta3/JPttul4rPbVUYRFaum6/P01X4mm69Mho6+JY42Rp8QeO0sSeJ0Mu0M8gTP1ARuLNnKXbGxZH1QnRA99yb0JiWAjbTloUFssCmiDSOV79iYDFyQ/jtVVLpk7OlqlY08HVofIP2glyBzD347knvx24aXIZLt06IpVn8hf0HOdJG6N3tYx0jqPT/A9Pp4VuEh4U8T4Jewxqudp6t6AT5E0AY1CtKyIstHYxr6UfkVJYSYLpWVVCrRQvFvqhthGRDIPL7o2Okfpyl6X+nnADmxn6YnjyWCWFdkcT5FA04WQlbVDAN/qKtRyPrgn4lYCmMY1if+Ir//xAAqEQABAwIEBgMBAAMAAAAAAAABAAIDETEEEhMhECAwQEFRFCJQMmGAkP/aAAgBAwEBPwH/AIRAVRYeAbVv5LTRZvBVEBRv44aSmx0ui7LZVzBMsj+Mxnk8DwjsmfjC/JpFUpxDQEQCnNp+E2/FuxRO9U415ZLfhtNR0ZD4/DBLUDXmLt1nPO2BxRw7grdy14dZWV0KhB4PK6/M1uY0CihDOOKLWmq12JsjXW7Uml1JMXbBYYfVX4OiLd15RiIsmh5sFn8LN/hO3VCspWm70m4eR3hSYV8YqVh4wBXjJJkCxM2Y04snc1NeHDbsiabqWXOeEH8hNVitRpRvsg4y/UKQ6LREy6gw4jG91lCyhZQqDjIKtIWHO1ODnZRVYvEV5Y35DVA137AmillzbccP/IRTdynt9LNtQKEyxj6tUEBrnkv0DZQXPDF4lE1NTyRxl9k/DOaoD9adhNLXYcmGd9VdRx5t1pvTmFm5TDVvRdZQeVicTQUCe8vNTy4KinaMlVH/AEevM/KOWKXIm4hqZiQBRDEhSTNcFDjGNYAUMdGvmRe18qL2vkR+1rs9rWZ7Wuz2vkx+1JjI6XT8RkBUkheeaOQsOyZPqbKAHcnr4k/boVKzFZ3e1qO9rVf7Wu9a718hy+Q5fIetd6Mrj56MJo7sJj9+4ArstB6Ipfhhmeewf/XcYNgJWk2ixkdEN0xuUU7B4+3cQS6ZQxlQsTIXGigZU17GSEPTo3NumML7JmHAutNvpGJpUkGXcdQROKMTh4VKcsf9KSIvemtyinZF7bIAC3LPHlNR0Y4y8pkbW8Xxh91JGWcGML7IYb2UIWt7MioomwZXV5ntzCiOG9L47lovWm70spWUqhVFE3K3lkbmbww7gDv+HRU59Jq0WIAC3+4n/8QALhEAAgECBAQGAgEFAAAAAAAAAQIAAxEEEiExBRATIBQiMEBQUTJBQhUjYYCQ/9oACAECAQE/Af8AhETbeCoDpyLWf4lxmmS2ol9IWu1/hy4EasTtMufeDyNaVNDB8NUqW0HJdTyq/lK28G/wpNhCb8hpOsLRmuYTeCNULQMREfMPgm29Khv8HUXKfRor+/gyVqeURly9wUEQU1HfV4jQp6XlPilBzaA329wBeMmQXMYtXNl2i06dOZlfSNRI2luxdu53FNczTG8QasbLtz4QtR6VjPDPGpMu/tQLmwlKiE1mPaH+2uUSkP2YHR9ItxpBWDGxEKJOjOj/AJiKV05XmYQ1FEWqraTiuKZn6f6HPB4U4h7fqYSgKS83oK0emUOvsgMxsJRohByxxsZW+5THlM6TCDbWCmEOYxRnOYypUzS8vLy/NTYzjCWqBvvlRpNVbKs4dgRRW3bUQOLRhY29gBeUaOTnxD9yg+dcplsi6Sm+usyG9zHCtuZUqaZV9ATjP8YqljYThXDukNd4AALDsqVAm8TFK0xK+a/sKFHLqezHUsxtCRSGRd4z9OwmemYrhtBDv6InGNWUThXDbedt4iBBYdvEg2U5ZwypVFbKZV1Uevh0zNftq0hUjYIg5pUwjE3hwplOiUa8eiSbidBp0WnSadNpkaZGnTadJotFrxcGKrhyNpTQILDuqUw41j4YU/MJiDsPXwo8voZRMgmRfqdNfqdFfqdBPqeHSeGSeGSeHSdBIKSj0a4ukJv69EWT3BNp4lICDqOWKfS3sE/Ee4x9Uouk/qFfPmzTh1Y1EB+4TKrZmv7BNV9xXo9QQ8Fp580wlIIukxD5Rb2NKuUiVFfaM4XePiT/ABnVb7i13Ep4gPofUNVRBVQ/uA37X/GUqoRNY75jf2QpvvGYnftw9XMLH0alQILmPWZ+aVWSU6gccncILmNi/qNXZvZq2U3EbEZlt3U3yG8GKEGKSCuhnUX7mYS4l5eV3zN20nytyxKkjSEfAXl5czMe8V3E67xmJ3/3E//EAEUQAAIAAwMGCwYEBgEDBQAAAAECAAMREiExBCIyQVFhEBMgIzAzQEJScZFQYnKBobEUksHRJDRgc4KiQ1OgsgVjg+Hx/9oACAEBAAY/Av8Au9bTsFXaY67jDsQVjmsmdviakc3JlL51Mf8ACP8AGP8Ah/LHOSpLDdURzuTMPhasCs3izscRalOrrtU1/ouk2cLXhW8xmyZx9IIySSE957zH8ROd/M9DakTHQ+6YC5QqzhtwMWZcyy/he4/0OZk5wiDWYaVk1ZcjCutuwBJ3PSRtxEWpD12qcR/QhZrgMYNCeIXQH68qY8u8y72G7pFmSWKuNYhZWU0TKPo39B2UNOMeyfLlzBqMv9YDSxSXMvps6Vcmy1s7BJh1+f8AQRkuaa1OwwZM0qWxzYWZVUQ4Vjn3aYfSFnZPWxWjDZwzm2J+sW9aMD034XKW5waDHXu/oF5s1qKog1uMw1O4QqkhVAoKmMxg3kYny9ZW7hmTj3zQfKMoX3D0wZCQwvBEUc8/Luffv9v8ZlDhV+8KqgrKBzEgpLo2WPp+5ujjaFrXfYxxtCKd5DAk5RRZuo7YmI413bxAoLMrW8JKliiqKRMG1T06Tho4MNogOhtKbwR7crlE1U3a4K5FL/zf9o701zizYCGYm3lBGl4YaZ/6jmSlvJZtKLAY0GxbotIwdDAmyrpTm6ndMS5jqGOBrti7DgPYHyRsUzl8vbRdyFUXkmGlZBmy/wDqazFoBmrjMYwGnsZp2YCAqAKo1DgOToebTHeeBpHccV+cThSpUWhE6VW4i1wnsEmbWi1o3l7ZLMaARYS7J10Rt3ws7LBVjeE2ecUFw4Zj+FSYLNeTeeCR8/tFDCqNZK8J7Dk8w42bJ+XtgZHKOkKzP2j8VOWvgH68nKf7Z4TMpci8CfG3DNbYp4KKpJ3RVpMwDevTTZWtHr6+1yTgIYjSnPduhZaaKinJmS/EpENLcUZbjAC3kxR+se9t27gadLl0mNieGciaTIQI/iFaVLXGoxixJQKOAmlib4hHFzR5Hb0k5PFLr6H/AO/a+VN/7ZhT4AW5YZ6q47yxbFWfxNqi7omA6xc5ekf+0fuPa+VgeCG3oeVdF8EQa9HPQYWq9HNfUJdPr7Xmy/EpWJBa7Osn7cq+LulemwdHPna2az6f/vtiZ4ZmesSpmulD59jnuMK3dHIU4kWz8/bHGp1sm/zEGRMPNzMNx7EZaEcc4u3Db0cmTqY3+UADD2wWdgqjWYmHI3tSiajdAlTDzyD8w29K6VzZdwgS5q8ao1k3xeJoOyzBXJZdPeaC8xizHWejfLZxC27lrsghWaaw8Ajm8lUebR/LyvrFMqkFN6GsW8nmBx7SvioYTZhwVTFHLTNijARWfMIbYsChII0XGuLD0WeNW3y6TKfj6YFhUbIVL2A0ZaC4fKAZ7hN2Ji9C52sY/l1iuTGw2w4QDerDFfEIE2SfMbD7PLzXCqNZgpkKf/I37RanzXfzMBFuGs7ICShQfeKM1p9iwZZycU2kxVSQdsCXlt48Y/WAyMGU6x0WU/F03hljFosyVpybutXRMFqFpZuZY/ln/NGdImjypFOO4ttky6KoysNoPsrPzppGagjOJPhQYCDMyjPIFaaoVVABY0A2RZS4C8mCmTkpK26zAdjxUo6zjHOGZMO80jq2Hk0WskmW/daDxbMjA3rFMqQodq3iLclw67ugE7uzB9elq10pcTASWKKNXKamm9ywxmaA+8YMPnFzuI5qYD5xaRnlHapgLlKLOG3AxZkvR/A1x9jmXLo2U6hs84Z3JYk5zmKIPMwR4jSJs090UEfhpZ+OFyrKRUYovBNkyXMtEazm4mOumHc98CXlYEtvEMIOUSl51LzTvCLNaExVba71gcZSau/GOelunlfF2UJ87oqjqw3HkNKbHunYYaXNWjDomM6aEVRXe3lFiUKD7CFlyhRRymdzRRjAs4YKsBE+e/kXxcLB92LYvA7y6oEvLqumAcYjzhXlsGQ4EexOLlUbKTgPDvgsxJrezmAksUHBKXziZMPiJhV1zHvgKooouA4LXimWvrFHUNFuVeuvdC5JlJqhzUOzdDqO5Mp9eAllA34RZl6zdF1DFDc0Zk6dTcxjr53rHXzY694HHtbphdwXAxon0jRPpHVt6R1bRgB84znA8ovq0XXqYtJpk5/L/DSjmjT8446YM44bugMzJx5rHFzatk5xXZ5QroaqwqD7CMqUa5Qwu93fBJY+8xgJLFFHDK8om71eJfkftwTW2KTC7uE2bhiIttiTUwGU1Bjik+ccY4vOEUXT+0Wm0du2KKKDhwjCMOhbdfEySe8KjlcVKPOt/qI4xxza/XouPlj4oORzTcb5f7ewTLlGuUtgPDvgliTW9mMBJYoORL+GFU4NaH1hHN1h6H9YBU1BjKT7hEW6VjPS7dBNr5RWlNkLlDV47Fhugy1164tvo/eCxwEX68YAXDpyIk/FTk1PWHREEm8m9jARBQDor4rLNCptKYlTl74r2+gzp7DNEMzsSTezGAiYffky/hiV8/vH4mUPj/eBIyqvFd1vDGY1RMIAI9YczltSkH1jNUyjtUxxVu3dWsSZvFhprLatGHUnOe4RzrALGmKbooLl2RU6Z7Cn939eQ018BFTpNgNkBF+Z29IkwYqaGJ8gnRNoduttfMOgu2Czm07YnZARPXbypR3Qm4mKG8QVyatNfnC2rQlNeNkT1tC2TWm7gXKZYqAKNCy5biyuFRCtPapFwjFYvoIrpN2KX/cH34WdzRRiYurYwVYqesOPRFZBou3bFsmcBtvixlP5omj3awB41I7a86caKsW20jco2CLI0tZ5cptl0Mux44qUeeb6RbfqQb98SpCYSxCTpdUJFxj+IkA70MaE3ypBWRkkqV71L4Wu3ssj4xwEm4COKknmR9YE2aM/UNnRTCPKCZl6oK02xQi6FaUKS31bIo15GbGTH36dt4uUeYl4e8dsW3HOH6dA1O7nQ/EtS1jGunecwSBRJYwgs19TaaKEXRo08o02jRqdphvWEbaOySPji+OIkHm+8dsCdNF3dH69HMQY0jP0HFk8EqVrrahjtaMm/vL9+2CRLNJs3/xjjHGYuG89CQcDBoCZeowFKo6eVIRJdpV7wMGrqHbfFxB5CPtFIA2djMSXc0UNeYMuRdK+8CbOGbqG3pTMkCtcViwk11GyKzGJJ1mAiYARkw9+vbJ19QrcWsLLGodHoWTtWMyafmIzaN5GOqf5Re0wR1hjT+kWXp6QbNL9sYLGCxoLF6fWOr+sXqYwaMT6Rp/SOsjrBHWCOsEdYI040vpHeMZqGLlURmKT5QHnZz7NnT3gQ912MB+8wugvJR2s61ECk52A7sy+OLmgS5+zUe0zZp7iloS1jW0ew3qvpHVp6R1Mv0jqU9I6lY6r6x1f1jBvWLi4+cabxdNPpHXf6x1w9I61Y61Y61I61I61Ivmj0jrv9YvmNF9s/OM2Uvzvi67sKTdVKRKl4kZqiFlL8ztMETZatBVG0c5TEmdrdQT2jKTtFn1gtsX2yRdVroaewuTDz4V+AfrGS/D2iUnieJrfL2zZGCXRLQ6WJ4CzGii8mM3GY1lREuSuCLTtEiVLcMUqWpqgHxGvtG1MMc0gpvjnUBG6LUs15DOflAtiqrnNw/hpbZzaXlD5ZMHuy/17O0yawVBiTBl5OxlyMLsWizNUq2NDEny9oEnAQBiSaKI51eMfaY5scU26CGuZTQiAy4HhWSO7eY4w6U2/5cDzXwUQFrnTGzjshJUsUVRQdmLuQFF5JixLrxNaIm2BMmi1P/8AGJny+0SvhHtCdTwwtfCeGWdZS+Jdd/AXbAXwBrdoCrcouHB+HlGqrpecfiZnWThduHZxkcprzfM/aBlU3SOgP14J3y+0S/hHtAqcDdAIuZTdvgZ4R9atFWmgnYt8WqXtgNkKi4DgEpcXx8omZQdeavAbPWtcsZ9eKXOc/pF3ZqwxH/LMu8oVRgBTgt6nWE2rcfaNHxGBjMo43RamrQYQzgc5Wh4CzGgEZgznNFEJKXBRBdzRRiY5sXsbKLAlppYsdp7PlBH/AE2+0Sfn9uGidYt6xRgad5YtS2ryauwUb45oFj6CLrA+UaQ9IvCt8o5wFDFUYEbvY83cKxMTaK8HFSjmjGPxM0XkZg4Pw0s5o0/OPxk1c5rpflt7Q6HvCkKXGdLajCAyGqnA8NsZk7xbfOM4NLbbFnKM0+KKqQRu4LEuhmfaKzGJPKtS2oYsvRZn37NfF8wHyvi5XMXo4jrAPOKg1HRzfhMOzkBbMFJObL26zAm5QpEoXgHvRdBI6xrlEc7a4pb3MBVFALu0tlWTDnu8viizpS9aGKy2o2tTjw2Zihl3wWlZQie45iqOw8oKki/Xr6G6LD9Yv17IUlC0+3VFZjk8mstyICTs1turoM91XzMUUM0MiJZUxZlIzHdAmZTR31LqHASxoBFRrNlFhZY0ze52ntZYji5vjWKqhmJ4pcU46YPiEdefQRTjZzeUVs2figzcoa3ZvoIJpyLMlCx3RWksf5Rz0s02i8chXXEQrrgR2Iy5Bu1t0IlTTmajs5JlyaFhiYoOMmbhHVWfiMc9OodiiM5TMPvGLMtFVdgHD+Fkn+4f0j8bPH9sH79uzlBgTcnXnJXdGsRxc2+X9otIwIhZY7155CykxMCXKF334CriqnERmV4ptHkNLJvBu7DRdN7uTdGcpHmOTxTnOXDy5CjKNG3nQBLAC6qcorKIaedXhjOrxYNZjQFUUAuHsBpuTkSpx/KYvkv8SXwOOLEjbyJs846I5AbwPyLGTpbelaRfKyhfkYvaYPOLyG8xF8tYzpR+Ri8OPlGkR8oumj53RdNT1jTX1jSHKK6lFORjZlDFoCykA364owBENPyUUpeyftyEfVW/kGbJvriIzHdNxjSX8saa/ljSU+axphfJY050zcIBmrxMvWWx9IWTJFFH19hodssfc8icmsNXkInjbkMdko/pwXiOcyeU3msX5Mo8rozeNl+TRm5RMHmIzMr9Ujm5kpvpF0kN5OI/lm9RH8rMj+Vnekfy+UD/ABMdVlP5THV5V6NGdx486xVjU8iWgxpU+fInS10Q13IAMqtN8dT/ALR1P+0XSv8AaKWE9KxZkyy7+6I59EmzWvaorTdF+SyT/gIqmTSR5IIuAHsWRlA7ua3IWYb0NzQGQ1U4HgLzDRRFvBBco5GUT9pCDsE6mNg/bkCByJ9NtORImTpRMxlqTaMaD/njCZ+eNBz/AJxUZOpPvGsUlqqjYB7JmyGwcYw8uYKMpoeRzT5vhOEdVKrHPPUbNXIVFvZjQCJUjWovO/sFDhEyU2KMV5CHvrmsOFpjY6htMFmvJv5EiX4UA9n/AIzJxVwM8bRt6IZZlC5x6tTq39i48aE778i3KPmNsc8rI3qI5lXc+gi3NPkNnIlXZks229otlGRUtnSl7fKCsxSrDURTlBUBLHUISfl2IvEv9+xvJNzYqd8NLmiy6mhHQhVFScBHOU4972/b2lTKJQbYdYgnJp6kag90X5Mx+G+P5Sd+WLsmYfFdAOUzlUbEvj+HlAHxa+y25YC5QMG27oMuchRxqPLCS1LMbgBH4jKgOPOiPB/R9nKEB36xDNkjiavhNzRSbLdD7wpw0lozHcKxanUkL72PpHMrV9btj/SVCKiM7JZJ/wABF2SSPyCKIoUbv+yL/8QALhABAAIABAIKAwEBAAMAAAAAAQARITFBUWFxECAwgZGhscHR8EBQ4fFggJCg/9oACAEBAAE/If8A69LI8Hs1oIQ4R/1cvOeQAfKOYd9mZEZHIfzA525/3OVED3GIri6HqqEWU1J55Qq+bB/xSzGx+mrKUAveh7wwYTM8glu2EwDkZdhc5jKCeHjf7sIG+jg0e6Df/DZtWmmLdYvqo4fgC6cUsLg/Mo3RsOcf8IpgO06EajPWXhu4xeqSmD4jqcveV2aBVsSJlkRy5XGDf/BBsAu7K+nUrpU1YvwSmsUgwWp937QUcGo7tfgD5RYf8CopXV2MGCFxRV4TVT9nTepjGxjD8wPSrVvgem7gHxEFfkjD37UiBcHEYn3f8Cba85uxxj/nP0/kYSxDIKMICpxxJSJa6cTE8yJj0MO9K/p8oSJeIczH2jn2rPVsKRghgqjyd79+t0KvPgDWb2MQru8ZgogtmH37xOM+wR3fyAq/HjA5zYRHl8WPFCy+JgxcbXTDkbzCgMlH6Dy7fFN9yYKsegJ+84Fsm1yM4VaHWzyh+mcI8zSCEoRGC4TCmpEYue0S8rrw0AinMxGZzAeUfENPcEXQgCgAyAroPgRz7fW55mrM7n1/dDLPIAIylTXtdo5OLSvFzgw1LkByCg6Hjj4T64dDNcnNh/ISPcDTGIfAScTB9Tp8tM7t8rx3xgwbBP3BsBWq0BFyqKHzpnZc8vppDQgZAV0/5zJFMtqOr0Wwd/UhPlJTMg9Plj8dPkpiXbk+bEYPb9wIe7AzDSKdgNNuQdT6XbpzWM3xcPnoUgyTyenHyrXlGcPJC5xIYpKbxO1Nt9MH8f26l0FrBzqjbReHgQ7KEe7q2hl4yRWTqHSAUooDWNsHIqCK1ov+dPmvSVK7i06HgIGMfF5vQucHh75rE/FHkdztH0PyB+3VpmU+FS//AKh79cS9uLTjecRbape5AFoeXZATM1rXbvj/AMFoXcF8MYATmI8TrLbmcJcM9ziZKfl7MTlYAOOPZpqT8Q+P294/OEXIjGaXB1RqFkKoUHa+IPw7M0dG5D9wQQpvGz87gE5u4sH8MHVqvIYe3Zr/AE2HpX7jADASHeEYmJj0/r211n1MHmwgXsmFvQ9BiwWaBQfuM3FS0EDruCqtqHCV6Kjbj2osiwyHhaw3euATnLLwUPvEU7HHORH0FbqdkQDSLsNHNvi+kwpiaHi4RSouM+0NXxYKA/sk5AFzOZ+yMqgDNYD+dOLoS8mu8H3fuwLWDCnDnecY1C5B7UTTxfDtPOO2dWtt3G0SLhFRy4AKuk/hBZvge0VG/NiZe9WoZRcuy2IWtMtbaf1+bQ5aJia9VPp8pj1XK8MphhOOmINcM3XiZ5sLe+MRacWO5Cxk2BpI5tgLEjIpQlj2SkePxLj2lTworyOMorOrmvfK6ipNFe5wZWkLbq9mVZ+Gnmnl7yoxLQ9eXnOce0fqqNZ51HN0hzOfp/OZ5JNCUdhLIytAC3rhmzIphGHwwTnMY4E8KCHlHIJ3S4qtDaHuYO1obKzcgn1jK0g9U10czsCCbrgw9K7QiWxXO4EJzlx1hYsJq33gtteNOcZZyUsMS40wq+BmpTsnCM3kCf8AOXIU3T/B7oP6VjhKODx/CWURaH7tM5bVzYomj7vaGAxBuefpMYweaPSW85tZJukMCjKOHIL0hxlkOMK+cfwcDOvtDUBXCFITlL3iPCddPMlERNDXiI0C2rQQMqXv90N7uCwemrkzeaRkz/Hj2NRTDnKvhcUCXdtcyXqZC79atF7TK+InFZQ5ss27fqIACOjL14rgPCYmcd9GEayy/wBKesFutqsf0j1geAN3xFf6i0oHz6G2yqXVoscgIu7xXJdvlCvFoZBFpbMr53qSlI4xkR02sYctteZwm9EHdGc1S4iAY+lFoXNymXCq2coHJXAQeinmlfvQ9xgzOEzE2d9SnaGcXI6TOMp4uIUd4VM65yEeWLjoKOq1EsWiYRDjRPl3dfX1YjXZHwweF0dcURyg0AfrUrKxxHv8ISasGp+iJlhg07vaICW3jupRAsLjfOMzcevxANvDglUfzJ3pPl0ZlOJNZBwdI5e7d3zQTJl9fAzmvCNhAsGxAsseUMncWKgYYNOngJwE4TsauZ4Eu3h3wdbRxZ+ZM2y5OqHY3lPhDzi7u1vr7ofoDgB3qboq4UelA+fU+lxmWuJ3qY1runLyQSgrE1IKLWE5pU191VXH4k4kaqrNmMCUgwBFo2xZwHl35Ri0VfByjUeHK9UyBycV1rYgVUCu34gFTZ/v4dV2wi8djkLLOhKDDoOyAILHODlEeiigiDg0dTx/PInizmBxY7J4xU4NfV1frcZ5v1ppWsgQF7DJxeB3JeoPwwfohRcYFTFl7yufeqmYDooaVnHGJLEzxw2mKuQd8bZhwWi5wLijCscEniYbp32vDh+CsDhg6i/3g6u0zOJVmA2mLC57roOyo1mDgzP8AuDg+h4/nNkMLbivglI1VtkPYhQc9zrd9J5ylbPzgMAmCMfWnLmGwlCGMXM7kKyi7uDPofPX5ma3Kemqi0SlhKAoJhnuFiVIucNPmOn4TumrdIIx7TSV4gNP7nDYjntuB2K0W5Ssd4Vzgg65PAygQrSuXOUdjkd2MxLo939vza0C712IrC1o5bUM4jx33r2aJMb4N6EFAIZmnfnMXpiu/YjCwy5kLp5ecTi4DqbMIDcKHky9XbwfmAAC3cv8y5jALUz/AA3JhxurefQzIC1dI1i9T8QsTOZo359lnjp5moeJiXkuMpMUVTtKQhw3DSJcYh8Z9Wbw9/zFRbpGx49M7z4QQDn8m3YJqXoSpBkWLijHFvSf2ZShRLSMQcLigB2TdPfDMX4ZSJW4kwHgNCbgB+HmTyaICqgzYbKo4Ov4jqmGZ2ZM4LHMxhddXHbjBsExHJJVbdy4GR7xlMmrwJ91t/MZRwOGmrxy8ZxiNoZQ64h2FMXkH1YYMYVi+UM0GOodIpJGI5CFeCN9SjSQbgOvw/IQ0V0mkt267VP8zjCX83LtcLZiDTlNLCW08cpawWKWwOqw0v7/ACx9oP5eiwDYMPW5km1dkhKQYK2eQRV0O8iuX5EdVwNRcyXA1YTIH8IVVA3ABcbE/wAWGv4bCnHzIhkvKDUh7NxTifdFZlHEeKD6PB6C+iz6bH+UxL+GO98UMYeBBOI5tQdDPGUB/ghZzOvl25K1PKUkokHhKayx4YIPLFzT3QazRwvLHGLDLEDg8Pj8ksmeCFx1q1c45/gIOePOIWrmJmz92P8AMxTOJb2YvR4orUcnFI3ehPiOh5M0c5xyfrnHSj/zWf5LP8xn+Yze8BmgU7v274fO8gJnjmxjiHf5oZog2CvwaoHOu0N+GCawpTAvxhllcM0xO/OMCtGr4SywBo0dfyNzD8QImnN+dXVr8ZP2wwzEDw+f/PXppgcbxjUfdv5Chuu8gfkle9T9yvMq8es1PDv3oKEGw5EVow/AZEWVTFeH5BQJArs1g8cJxWPZ7fscEc0NWXFHv2H5i4UnMBGp1HMpDvOksOtrXbz6RAGdXTZ3zGFT/R7eP44QnvJEymWZOc+0DIQajGVzn/YKHRWvCHy+HEhXiaYeExZ6Ll7yCVzpEQCwsem+GA7xmFOJ8Xv0OoYjm6Ef6bwmXV7iHQGA2/GNy7kATAPNRr3eMHYh3cBx4xXww+SCjt6X7DjC040weddIiHzDEv1MXoyDG0Mot54GvgQt6NGx0EF14zXb3TlAf3zz8Px3obKNtPdCJZlmh0PP+hHaGXsfsAFs7ES4rJbPiLmGYivPWbMWa0Q5jWZSZCzXRagkUVf1L0ApaL790OYycX/UAAKDCvxidZGLMGd7pbDygB0IcjoBMwiPEwfaUC4FXL9iUvMhzJR+fKfOBLO6hi9UA7cOinALWYwH2ImnuubqwFZ7TQgq1Bw33GWzKxez6fjrmYQ8UC9pbzdLoF9/bkf4hpMH/YJEdtTmdXjLBQ5N3sHsHJj/AAsXwrjSV5uzMnHuyv8ATkR2PdKNseD/AGMALudNWCic8Bv0VWtaeAltpAdNXehl+OGVlfeRYQ/yDAOFsNem/p2RhADszQ9+TKQDYZQi9ZKvos9xTzJFHqnEcLWEGm6vyfjKBUAZr0Gkp6YRrhm5TMlZsUhoSZJ2ep+xAEp2vMi6nIYMJkwV/mFMMmkCpOctd+6MsTmfhfH5gIBADQ/IcoOGDEtPDjMG6XQ1y2lEXIbpSO2guUTgvOdzE+9KWhIrDQiIra9ggKRNZcrgZ7PxBgFuwRXwBp4R6hvgO8PCHiLkc0G8uvfhIM6HqFEAMGlW2CmPQXK9TiGPO3hASCtVylBVOQNJQE4F/KEuYhjoZ8zWJCJwvXwzJnk7WepM17sPaAYI7n2i1qnVVGmgWwh4SuAW5GnUNs+zLntL64BxTFAfcPUXmkua7y5fhVVjLucot9e5aSWCfeHVojgC5Dwiy3hKnlEjKdRIyHnr82Y9vbC8CcnJI6RRZYwVmJcCZfm6nmBFxQ/GsOf3kfPaO8glPUYibN3BHpzKXPY1ZRWGKua3egfhaTUhiXHadNzqEP4oLo/g2jaDgasvqAqgrwnp/nVW9zNb9LSWLDJpwvGHGuTLK6uH1wDfM/EOFvxLe7KHDA2D89LmOlJKxeO0fNE4PxIIAdGsj01awvK1fbqDrwPjh1HbhVSDRND/AFKvGHuW+vQhIqv8lI1wneTzYx8zOuecyk8j6pmz7s/w8MgvfOIeMvqNoiHr1Etr/DHGVtLZi5sSIGiXKfjAcq1fh1NslOSGWHSY+tr3wlU8GvBmB7KaIchB5gTDliZ1ju14ERyrg67kVSDV6rd4/oqI2j9TD7mFRwT+dStXHyT6dR9A9RFQSgTjPJr2eflfRFrfCu9RiHw5Z9B9420/FfZKZ9WZs9gm94h8ccx3TY4GCoJtOjL2tkTOXNekzhz13is+lBEcR0maQu5p0qmDMQq8N+U+3+J9v8RKwR+tpXZnH3JYotMj4ldxjDHAivjUrUfcE8vwlfpBDwbynE+8epThwEbMEiSw1OgbpbViiiCzodStRmDli+p+Ag+UpztHpoWZXPLdQ15A+ADqFNGQ784vI+S6LZ9zSnN7V5VnIdaP1Lk1R4HR8Y3RYnfqYNn7QtRwpxGPzLc5YhwHd1ChoAarACpwNqs38AHC1gkz/odz0mcsQV4jU17+lOzR4RF2tqd3pFtE0J8rP16BODeho5diSsAWAxH1h+CxhFot4HB9nqUTClJkILNfUQH4LuFMyhQZDqCmID8D+1+wSyKaGNkHFxcJmcMtOthEUAtY4LG1f3wgpR+E/XgYZRRtkNHsU5KoM1jPSzg41t+yXtZhk8hmjKSt4kQHFUehiTXn4tXF0eqa1LlbxhGT6Viu9/FX5rwy7pmnLLrr4OitWUxoOW+Yf8dw1U4chlCHy/wHyj/ZhfVK6OBgmUMMnQXWMzZuF8f8k0EmYlxS1t4O3agNBNBX/sZP/HL/2gAMAwEAAgADAAAAEPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPNCPHLAOMPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPBJGHPPPLGNPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPODHYAlPPPPPCPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPMPIPFPPPPPPLFPPPPPPPPPPPPPPPPPPPPPPPPPPPPPNOvR6EYnvPPPPPFPPPPPPPPPPPPPPPPPPPPPPPPPPPPKETiSBAGs+8PPPPONPPPPPPPPPPPPPPPPPPPPPPPPPPPDM/PPrrvTjSXPPPKPPPPPPPPPPPPPPPPPPPPPPPPPPPPEdPLhBvPPvCnPPPKPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP/PPPPPPPIvPPPOPPPPPPPPPPPPPPPPPPPPPPPPPPPPOCdPPPPLGWDPPPPC4Sk/PPPPPPPPPPPPPPPPPPPPPPPy7JHXN/vPIPPPPPGclPYwUOPPPPPPPPPPPPPPPPPPOAlcrX4jYCt9j6kpjOcPfYpLrzwdPPPPPPPPPPPPPPPPFm9ycCZQ3Po/b/rPXvy/eSp/vvm0fPPPPPPPPPPPPPPJdPvXqtV63d/8A777777pf6yF/77L/AE888888888888884U2++J8ak28u+++++++ryOv++++elO88888888888888Xl+++taYej+1I3w3+zINfDe++++MAcU888888888888oq++++++N9Uv999dBxZsmdd++++++uHU888888888888k5+++++++++++++++++++++++/wDffpYvHPPPPPPPPPPOMpfvvvvvvvvvvvvvvvvvvvvvvJ7Nfk2dPPPPPPPPPPODBuPvvvvPPvvvvvvvvvvvvvvvviyc+3pHPPPPPPPPPPKNEGOeybPWffvvvvvvvvvddf8A7776owaCTzzzzzzzzzzyzzS6WuZzArnT77777777ZCCPz76bgQpzzzzzzzzzzzzzzwxCMyIobTHnvvHLHb57hQRw/wDbzpUE88888888888888888sUYie0UcMPMPtdK4oIQUodWZN8M88888888888888888s4s4c8Y888888840skc8gU88888888888888888888888cgcwQ8888888884YMcUI888888888888888888888888888c888888888888I8Uc888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888++++888888888888888888888888888888888888888+6A8++88888888888888888888888888888888888888uAM+++8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888/8QAIxEBAAICAQUBAQADAAAAAAAAAQARITFBECBAUWEwUHGAkP/aAAgBAwEBPxD/AIRJpAFvTI/yeKZjfBL3Uwkf42kgQF1Ll+ohymjH+KCQutRYjMHNY6lZiJv+GbBDBXSrKmSFdQIlldNApJdx/CVDqixg4Jbt7Tt/My3D+HmKgCzuQcui32heCD3VQ64iqfIUMsRThAM5brLdkIzBHXYEV9yBAC3L2QcVzYPFAXDvBBAwyuJaBAqagCLglqF3ZUteGZf2nPU+UH4YLymkii89hvUnWM4egpqIUtkvy8IBaPQahDL0lgrA1MNp1lUcLcEuGS3H0T5w9c+Uo6G56mT6dAsRUh2oMUweAAtjumuhFcMGycuEFxXAzKFkeZf/AIbdHf8Ali0WwKocR+yF6gS7uX2ceBe4uwK/INri7qiOJRSAE/HfGGfuE2jugI1fuJgAE/fHnPaj+RBlhwVE7JQyWp2RPMEgaRoF4T54jwiPGBQWgEvcsD3WKFiD2P3sB3imp9oHpn2QGAoA5n2h099k+3Qirll97jUACj97l5CukuLqK66Mi/AVryLEzWqA7OILUShg/dBD5G01MQJ0Tz/R4OYMMZoRCo9nYBB1VFG0j+QLgmmJlmFYPakFTCNQqngrW5vGa12+on8aAQWg6hUIrTropXQjVh4Z3IGT3Dei8olzEuInuE+J8Z8oJahh97TYYlNR0cpd6/g0SnqU9d67aT4Q2h/uJ//EACoRAQACAQIGAgEDBQAAAAAAAAEAESExQRAgMEBRYVBxoWCAgZCRscHh/9oACAECAQE/EP6EQG4SpwwPxO+aJei3KFmLW+H1tmAgqGRmOGHEaTUQ0+Ggttw0kI8JoTME0Jd/B3DEVvB2shkbxLmLqipvhiljCu3+CNslVwIsdeVZHwf87z08HBXwS0WzPmYip5TWARIpYSq5VAtiNrvqWAp9wBas7hFRHg6BhEb1Y5yZjKKNTkYlOZ41BLNV4+Yt8NqN4jsTQnavINtrGyH1MfUhN5KmQFMoK4AxNcRPmVgmziWSnmeyagxCjERx+R4ldjVh2iq0+uCDrDcFMq3ZHgWJ14f3Ul7IZqi66ioGuJoWWiRVRpLeZbzLeZbzLeFSwTdn+OAsssOg+3yzG3I7URl2CuiAbdeJ/KYr0jZh2ihkmIj4IPgdDVNP84TO1mQ1tX/XLoHuF6lFG/XMwhvvIjDeE9RBK5hlaR+ZRD0dZChG0Wo5fj/vNAfvqxMxkzdyy3rnc2lUVyCZ1lRFstS4HeWxF8E4ntHwz1T1T1T0QXaJGJkIeW3OgoUJ+T1CAtuvW3zz1FNpbtwl8KxbHpnpnonqgW00IgBp0AS4yt69R3AC2ZKuG2cK6d+uawUHruGbsFiFC102iINFwAuW0HWNYqE7gpmSGvG0Co+phTlmvYYByQC1C7UW0Kircbjc2gemoZYlSxSoAWPKRVzI2Y1yV2ALpKlMTCq65BrJPIR0hDGWXwYw4lyOKANkOq432TQLxlPM9ebsiNZuEF0gTee6UiCI/rlYqmuSG2EMPwFpbzPdPbL5bglDFt/2yKZUr9P/AP/EAC4QAQABAwMCBAcAAwADAAAAAAERACExQVFhcYEQkaGxIDBAUMHR8GDh8YCQoP/aAAgBAQABPxD/AOvRCJc1jtSvWLYqA9YZPookr9h9LD3U74PJ8yj18h7qnbOF/wACh6eype9jyo8f6o0Hurix5L0D6qwEWKncqT/CYGlkfkwHUl5op2B4UntOo+HLIdxgO89KMxllKbhgdilkv8RUt63Y2yvWM96GSEmXmhLyKPEoMcy6XeYWgEn+DJ7QIIvYOXgplYKqxTeXWtZfd0pXdrPjFvkzQ3qR4UYnrsNuxKUD0bw/xctzUn+BvjK1ABKvFJ4rczwg3RN8DFSPwu/gJdbEXIZ4lpSjPypoOeoQnDucNmk15YFpiU2epjbYN2xv/gSakgMsM7wOlKxdqKjihRh8CghEgHFofeh6xxA2A4uPzBpRGEcUXB0Uu1s7rgFnW92W5/wEtD1AaINS6Js70bFMVLWFkEbTDSJv9CzMAYtq0RyY+mT6qnVukUkgssMJdzFN2tKJjMb+G3pT8CGOwpnopz8xwzQzbDsOLtwXnUNy46f4A4aylBituLAUrUya49ugDmKDl8kAEAS7FWMMKUPKmvUEw/iCkEOlFQXoyTeVOqFBEzCdiD5irV1+aTN8MJkR0RoYMCwOCGmrZnSPvyxQ19IVLxhXXSgm0BuliDK0Cxgmo/yYhouV75gwTF4orslEe+7SbQIoVLQeVrB1Iox02tn2jYl2YcYqyeV7IoO3rNEFi7GyOr03qAgA621ede9LmHm6KcvzgISeaJDqRJyFBPmtKiRPvbilNsT2Bt3Ypk3VQYluDfeV7U9TCg5JdhwdikAewCWvvnL/AMqGWfI4zKyll1xUpKRZAWsQMHB6VCC+QmS49m48lPxJuoQumMRlbHFW9BfI4YneR6JQ+3QIBwFRUxuFnpWb5ww0MAHT5PYHcn/X70rMKUFlXasb2MesUtd0m2lXM9yS4VvLgloSVTZc5Bl8+1HtmDugCx4C6UItHKvGEbjxSzehOqEaMudZT0Km4PamHcdQTvSTFhuEkOpJ0KGfDUbvahB8vz2cgazA53gGe1EwkSR+8PK8eAuquCmbbyyxyLoaaZqDUibB0hq42Gs6WAMBANgKCKvU3oZTFx/FNXRFKjKr1adqhGd5o2rPQXE7JTO3w3AvcVEeChnAn0pyHK/PUbUuKRKys7Xrd3+8HkGeyexMS6xG7UpxB7CX53IOi7UIKav4TkJmzHXT4JSSZGCidYfJT2pDaM8B4qiST/Rv4oXaAs2Gp7FcPOF5pSSEEsjaKRH5ZUgSDNiR6/dw2CjtAJWrCES6SEux5VFME8APx8IxoUqTFiab2EK6KLiQaVOAKkgLDMWW7LzytNH18t8SywLEnaKiLZrSryoXumB3bUhveMmYv63zgDpRuauxKbpd/tqCJjLnmpXhAWXSKw9eaD4ZBzbJt7U/KKP+s9QHu+7s7gJTF1j1aDFYvRYj6loxR4vgBgIIWiIn8uaFs+TB4gQ85qHF3U+E2o+GKiKgkpuCgZ3wLdYdKKKIiZPlFJhm2H7uhBKdnBehTMQEbsseQ0fDGaWg7VJuZAQiSoViQRO9FBBNiZ70Z+SWopZoywEgedPyShgXA7KT3fdwgkXrkPzTp8NZFPSawJ+FMZMjQgmAFGKj5SsWpwUKTd2P4j5RQkWfSD7+j7wA4xh3vZB7IpesT290Se9GPig+XMb1JWdtxD8oFmgRv+q4nZDt94NnpyS2/TJOnNFzNIzYhOxhO4aXqxjHzUIkEsE/AghrAtZW2oc9Gpr6/KLiNWN0+Q+lA0KBgAgPvBXgk83K2Kby0rCK2RIcO0UIYZkRG7LgfPX5jUGImwJh1EqdikBFBpSGQxpJxMUCja69QUdgoW5Nxk7r2psylJVWnyRLT/aMhZlYAA45U4fJEzesI5Jq+GbTqdhFSLg4D80qc2tU8oEOi0bnuGaJslzufcrlfkQB1qXtwazwJA83SgNghQHbAO5zTGQUaHy9AjrWMMPQYt5wj6jSiDQ7EJf8mR0vR8qYrFdBpLfNQyONiJllpOJ0qC4kEwQBWILSyxlq8I5hBtsc6tApZe5PRBRpc7IfOaOKJZzdhyetBbuY3kqiyJqY0p67BLjCluTnDp9vCVqml3abEBYZN+bfyUicOQSPTB2KlYuuf9LgKPzYQk25lf7owp4ovNB3Z4pphuztoCz3vUhUykaImKKC6RwOBnqX4aFM0lg4T5LWQBR6APesPllYTSmFaKyPyL0zUkqz3fOXbFF3jE0IBoQf6zps1EuE8WYNJHXZTWsZUan66nD+Ibim4nUV56gqxgDdy1Sb/aFigN8bhixMECdXN4mKNSJXQDBY91eogkNkkvX24oIiCYLNg2C73rcrdzLmoh8LmCL3yOM75ir5aoVlZtyO6m96DEZu+QAHzWnS7EW81PSlqLVnJw2XFkOulRAQbckI9uK2jwajyr9k0EkJkvwyDwx8bUoIs7BEfzrT8sTT0CorK0be13Q7UTfIJY35Vby7/E9Q1jCL9h6xScN8gUwT2ZoJCNLnuNPecIvYpQg6r0SaLcJCw9lLPRoUuoYB1JXkdahbs9n8Zg1k1J9lQDW+reylmPTJkwS1O1okk9P0PQoyeZYX+X8UgELcZjKkt9BaLWHMeqkMcDEM6fm9So0LYOa4vLgxZWZKAVgWA0DFTpfqYQqb3ZsVzJjk7TjtFQM18y03z5OSnVfwXLimULjfEa0lj4c4dBxRkNop5lIwiDKA0NblGmm6yh+z6U6Q7CM6wKbKMCHyaBiEZxFTeHO1TUkXvSUsdF4eFq8FRJYOA6jp4Q/BFFRUtqQTlzYEFESmJW0zDDWN6TZK6usY5aLKDOusnVfiJKm1EBRYcGSDqvOr+ijeWDqrlf2LUYoKc1bTshI1PKoxYHnDyilCJxdFGqF+qY5qBawAhmJ2TfZrQ5pRo8P2NY2q66Wsoxy7aulXtQ+X/bsewUIkOdVqu7RQAN6m6AHu04/KX82KalS2bjSHQPlQ04gwAgA7USFYFpGvShwpUcAMRlO+fKiKRlTyNygozoNU2G1WDMMGMFhff0R6UgEYRLkZqGHijZyx+acnvQxOWOL1LxfR96WqBLfe4qdCsYb1okIN196m37r/AFQUH9BkqaqOBobADHFc3yoyRuVqb9qr351GC0dT9FHgV3fdThEupfiainiF90VwOijpH+6HMzouMYf69KUcxAmB0M9V+KMVPz+EpseB83pWMgBXXXq+3XwMfCIgUQjea1EmNhtn9fLajm47X0k85wetDRA5IhI/YVgmmomICJY5dmsbZadzWu/LlYscUEHADV3eefF5eDuGH4o1WfJYUaMxeqX4WsqR8CMukN/FSXQP5v3RbrSCBIQjqUhiiNocdGad9yoWS+9AINI66PrV4FIdZH4a0/skbKZe9J5o4aN3mjoL8yVqHNDNOwP6aLYpByTX/Jr/AJJX/FK7FFsWqXdpvUG1aRp4qGkuhGfSaFQIQ8tjsvl8RMLPDdPc6edJEtQOM7WXtWH+qD4WtKQc0UJJa7JpHiIfPeoGssixOS64cjq0pB+wYc9QCvZtg1eKUPl6ct7xlwH4LEjvIyrdcr/Wo8XZ5e6iekh4C+9TSQzE5peZo/gHpEJEdqmS1Lonq0kIEyoZ1qA76mTsxSE0LNjaU5G8LHO7T5kZidiBE5T6u1RawhkpcXO+lC5ryP4RSYxIg30Kuoq5ManQMUYWKAU/OkjDLuRTyFnI7Afy+EDISz1mMB/ypt8eiRv+goCEIL911eaPkRQVhIEkTpR0D/oTPkSHpTfSh0PYkdvrzIItEpicwZtljuSJW5KC++gG2xUf++6lqnVaMUU4oxXqXuq6omwETLTNvwehzSPY1QdovlbXOmElM0ITcPR1lzz0TY3IF5VHHLjfJVI8qKZMwLhMCS3tQ0ujmIgBtAQtRxDK1QU7A35KlmUYi9um7UKgwXIdCodvALq0XmrBkE8WlDB9A+ijI6KHxUiEAZMwDq1OI5/NAnAXfNoxRcK+5040p+WHyxArep61Mmt6cNnunX64HpkIh6u0hL+Uog4GT2BgwHQoJJBMV9RaCoPBxRikI1nyH+1ZH/M380V8UCRG0JSbhQjdrrlDvcb7IEfSYMSDE3bm9DEXkwQgbSxWuKikLRRFETS6LpbSoIME6GDGCfKNqBlBrMt4C0u/BtVrSoKkT0onu8z9qTBDQt0FR9BNqj2oZ5WungjMekCocaqTrApqp/FFgwXB6zbfeij4yZABKuhvQYnoLvToVAL9SdYhbU2XNgg9Ayc/9oTUlQXlse1TnI00YA/W7/VkMrG4raKW8VhwqDglV5WiAMVX2Dg0+NiS5nlBPZq9U2vhQ9ZqDgJSZ57Nh36jjBSTOT9zpO9XYu7MJAOAUiKKCRNy14w0azLS31vcoSWnJZ4m2pTViPveAlvd5oj5fLaS1LJlWjwn6C3pVHoQh6qKdKRaAGVqEygqCO8mzQ70qaGTEIfxtQVFBHxsZBQ8AvRasz0yUsBwuvYKRyOQkYREbcU2xBDEaRxcTvVjty8iLT2Q7VIu1k7X6yJ0AEq6FRpuqyYOjpwl1qJWbnKgnDd/1Tdo+KGxOX7BH0WgQ02EWmEkskt+adRFHJJMsuqvBUsrVF3Ylyq53aiRFRfUT1g606LELJHtTChfUYdsVkWP5tTZWEqvLHpUrMmByfupSZSesX+js6DRk3SgSglRgArMHYEFocI79KUrcFhWbI2286n5T22BxMoA7xHepSMJxNkXcPNomIKUSPSlAoRHSudV8lAfHYgE+c0xixZ+spm7pFys50uBxwp1atILSW6xWBHyALFidRIT1pOMzFJGy0T1obU2QJw2eY1Ja8symQ3An+irMYtCGC/nUm6V+yraPg0gRcJ5GT3oNZb6Nz3+F+Xp4Zr1/wBqAKViwCZpgfwPJ87cPOmiIsDdmo9mvTIRQfJaSRq9YnOLcbccUnISDT2kvJRAix65aVaksOblhleXNGdkA+1nST6pw0YjiFhNp1k71i10oiXV7q03o+Q2GJCJM1Jw2ZJ+WPSgpHoF6hKcQ3wKO8UMG6hDuTTFC7IeTSVneYfelrt6/rqI+qwEe3WhXiJJMbUann/3RWVn8a0W5d6XbqwfinNzt/rScN5D+qhgG8H80T5+n2q/7n6qBkPhL8V/S/qv6v0r+j9KAZen6KYi/k/VQzPwfopFNNgnvUEF39sDT3kQqK96mDbeVioOEhm86ZaAAAgKPlNFaetciAQ1GBapBCPzPlRwBGndEvYfahY0wBb4NORCEKhqwdka792mpneSL3MXveBH6ie+fRln/CnrNsdEt8ytKj5mKBn/AFWEnQmp8XdD7UA3zd/xSmVHf/VQXoiUpcOhPzS8odB/NYDkfs1oV0/YoG+dSmSB5V+KUeXr7JU9PM0QesX7pNfXqlx3aHS/k4on/k8qJ/QUIjsyfzSSQRrFEVLmbh71HTGsBPkFPmwIv1NRenRD0qKigj50pZ7UhU85fKh2ZDUKYO+PKpX8haxc7+gVPmgCnSxdkqCpf2BMrqRHanxIgClh3n6g5aAnP4RaiLN85UD80Yv9bBqKjisYox4I8Iox9EOa8bMGVOm+i0SYOdLIZ7exQcRVtcUlIJChv+iKnnTu+oELEfKtHnRJmndhX3Kn7vjNQgTumX6dq9lColO2O3gpzMCAJVelTbyEYkD5Qves4InGAS9bvf6deaOamIIAhbJbON634X84elEt9w2C4SV2DWnmHYEqeSFGB9kHzijVlIMPZeSjxOeiDdLPP0mpTZ7KyGx3lFtYa08J6BBUucW0o7HNM3sWbszEPkH6dNfUMB++NaBVVBoVyVwdkZvNQ4ChABIpp0q1sSfOr+fuBPmnYASvlVjMcwjY7avDQvPBNBYwBLdZaQRgZSp0k06R3p0EAmRok5Ew9GhsnG1HXwVBTNNHGZZCx2L96gt4RcEh93eoouh8V4OosHer3oUjLBtgHYK0Db1AjzcvP0zHlmgRKroBRhj2QVgIylsOBtq1cxWW8vY0T1BaZc14/kOtcbv0fcNY7DaL+k0UoIpO/wDBNGPAvwBgRMEL5PlT8lSBOwR4NZD+gXqZclmb8rp7FGNDKQAQHlW9D5XcAJLu7u8VOzIFSLsmdbOjqoIx9K4aZuUdXLWbnLoaNJbYArfmNw4ml10KkTTDFQSSUw9n3CcfO6EhKIfSOJfcWTlpNJiDQ6wrD14pxAyhOxxY71JBFOwPSdgle9FRAzzz3zUzUGJpE3B+32aUzDILwI8V4OzQYqPqTlQ6vgM9YojFvSS+RO77xLpRtBAGAMH0zCwcmxq1Ju0Ty0JdIeVGiGewQehTek4mm1CDrZdyvLCkbD0jz+4OKGCac1/JxSYJNke8I92nuwKbxJ0bYp4yJVOAnA/XgKxRmgZoxCrWhgfvvQvAVp1O43pe0mYA1WhQfIw3WmcTKtp2KtXu5LEFNhEBocr9P6wHBRKcvMdUi9b9qCx4EJXdQFqTueoUC0oehHGgpS9JZRx5B+FUe6ArG9x/0PQpOkaDvutbY9P1UI3qIvRomWNwe3eiqVofZ9RNTU/MZ0o4xvmzd+/OpxlhdiUUcHFTN9JrC2B1DP8AyjfhTZcy+UiOJ3ovV6dZRnLs5eXioWkEm944HAdhdaEA+n9HjxB961ROjAUzey35oUpWZA+HWh2wrYCWBriJyc1GuZiw2mBIY870zGiLk3k07ViMGAfKijU48mSzWMvE0tx3LwcGlYHjNDDR45mVuCYabhjCaLc8uKPpJoyjSiAqdk5iCjzLU0IR1AfWojukg7SVHDvYPVSKyNKUj3KPlQNFf89PXWXAHv01ESCwxh2OKgmJJiyc6b6zFEQgFgEBV3F2YaumXnBrTQnoks1s1qp5iVD4WaACAOAPqM1ppFYcYsAXAY7anqRSdzC1llcY4oeQ5AdvU5KbeGRapR64eaxv+ObexXeiPWj62RZTzMNKZWD2hIJ7UuZUqsr1pprT4Cl6pIGEpwSFNhpz1Nf90Y+izz3ijNHCgv2y+1Gy3fB6YFJdalippXenLheMn1VmmSRCg6k4fSiAoRuJ8X4zS7fQCkolkRPNn0p4m51jtgKekIS4TvGDlpmlgKT1ZehzmgAABAFjFNfVHAGq6FQRkMyiY7lZetFvnihcxN4LAW9Wj6mFmKkVv7ZUdLqzzUn3RhbKbnmG9M2laMzszQtuc76CtHlQMaSgIl8+hv6VHiM0+LSyy9KIIWQYJODilqfBWPBCpLVYHLUyDH/OE9ailPEXQRYeGGkjwmmKnhGO3ck70UUCjOWp2ZO1T9C8uFEw7zYc69Mypc0tT8JClMPlpVofy1CLZHkZ+BpNIedkNU3bcUvm1m6GiCCpIQpAB6z6UNVMwB3CfKlFX4DpAec0JEsAm3goqKweYMNhA6m7xG9KA37lGt2+DiXUoII+sQ6V0IbfupNoEESXgawSGpJdgrjGMLi3k1ONNK3aeK+zzTfAYDgg830qFPgIloKxmToFO4uGnUJq0GmlPQBeBMlGhIPlWq7ltMJz4jagwxnBQvHRHzqIonDn58boDq2PYY78UpLs+ITR1AwCVpOEtk91R4qGadoHKss0R2x0TxZlETpNMbKi5M22su00WtbAIbkVZcAnYrG1RHhjNqL7iKHQ6nc0NYKdDCy9y99KPkCJYEB5fXwIoLAK9KuC7tknpNZqWJlN7sd4qAqCnBPN6XgZKUIQNsgT4DlC49YCjzTy8SrkQJwApKblMoFkCOwihVBHSj0NEANxT6RWCfmQfVqyf4/cFZdOQelFn+LaTTwKfwQKZjpX7qHw/wDG9FT0gtDFm7KA4R6XrNYzSxU6vXIl6sdvEJQMtSXORF18t9h2qFm7xK7wS+1Z2rGHk1FoEDZ/0nybUnijTHcCz6NMQqR18S8GcwDqd05jP4PizdfbelRC+llZmrlE4FNjsBT1o8csV9ZpIYTI16XpUjfEknmTjIHO8It0w3zhdOv2GKYsFK4iC6gP4pZ8CZIzRJHTIQfNVMk+IlMVTc193xFCYuK9SqFceSElKyhut5pU3KufzaoSzZD1nrTxE0k/Mir82Y/qKkQ/C+9pU+FGsX0Kk5eNPYqzJ1YD+aPmD/JFLwYaH4ysMJsfrptXgRfinZcGpi86Szl3KvM0+FwphgFHIBXnboFOfAmwUKwmtF9EM2d/QnjAJpRGosqwBMS5qW2uW2tfAip/CkzPrM8rPSiBslKAnLAAvltVhbrGHVMG+q9Kmi26PxXOAye1BoA5CKhQBj7HPaiIuXVdCROopPGJKF6F1uog9o1qVP6ZEwz4LL4lGNOrpUP/AJy+svK57VPgVlzcDQWP4t8MVFR4R4R4GPFD4bdhA+dZVp4NMyAo7TWmxCPg994inqeIxU28RKVhggWjBWLH+N5pRsRsL9UlJu34sUMOMQfmj0oyEaLygqKPs8qSDCYr9gD2oWjzRAY8tuPEYpQYKBu2cdkpcBhkMneKE0VDStwWnnNLbxXnnGIgDqtJpNMW+85joH0AXgqNRyVODKDqoT3ifHBTZiYpIEC1gEzvO3jCoC+uhYG27Si1zyjK+vipAqsAa1M5J02RH1+3k70XyCwZkZNo2ukZ+QGR0xNNGYsCC7N0Y4S6kBH0GFqdPlyWABPJ5j8FkUHrtk9ZIShs4uvXCX7RT+Pks3uVv6VbrBqbQH3b+ILim5NAwOIPWCNpoID7eCDhpySzoTq2Ba4Oba24tLB1G9RUfA8fJcjYChlBbcjEjY63hsS6UMBAYPoigtCTXSeG48LS0SZ4PfrrUfBPwCo+TKGADVWhY0qjCYHUC7yv3GKMhlgXWzc6YqVJ1XE2vD1gommWD75jQRSPQ84oLvYGeYfepV9FhzaQA8w1Nl5nN9LKTGCDigBx9Gg0cC5iAjKabLMdKaGkRSbPI6JZpEyfEen6tbABlqHxCt5BldJz2LatCPukXqL1H07SJPaNZbNzpjcam9FbYNjUOstqMNmPwQVKgvQFlsPHYFp1fXQu4GO6UissIVto4GbAd6CP8Qgoi/QME2RpS+3VM94osIGRW9ygylAcHYqDb/02Pif4nPwH+IuKTqU/Af4m+Ef+DH//2Q==\"," + + " \"frontPhoto\":" + + " \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQ....\"," + + " \"backendPhoto\":" + + " \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQ....\"}"; + SubmitKYCReq obj = mapper.readValue(data, SubmitKYCReq.class); + } + + /** submitKYC Response Submit KYC /api/kyc/ndBroker/proxyClient/submit */ + public static void testSubmitKYCResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":null}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getKYCStatus Request Get KYC Status /api/kyc/ndBroker/proxyClient/status/list */ + public static void testGetKYCStatusRequest() throws Exception { + String data = "{\"clientUids\": \"226383154\"}"; + GetKYCStatusReq obj = mapper.readValue(data, GetKYCStatusReq.class); + } + + /** getKYCStatus Response Get KYC Status /api/kyc/ndBroker/proxyClient/status/list */ + public static void testGetKYCStatusResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"clientUid\": 226383154,\n" + + " \"status\": \"PROCESS\",\n" + + " \"rejectReason\": null\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getKYCStatusList Request Get KYC Status List /api/kyc/ndBroker/proxyClient/status/page */ + public static void testGetKYCStatusListRequest() throws Exception { + String data = "{\"pageNumber\": 1, \"pageSize\": 100}"; + GetKYCStatusListReq obj = mapper.readValue(data, GetKYCStatusListReq.class); + } + + /** getKYCStatusList Response Get KYC Status List /api/kyc/ndBroker/proxyClient/status/page */ + public static void testGetKYCStatusListResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 100,\n" + + " \"totalNum\": 9,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"clientUid\": 226383154,\n" + + " \"status\": \"PROCESS\",\n" + + " \"rejectReason\": null\n" + + " },\n" + + " {\n" + + " \"clientUid\": 232772137,\n" + + " \"status\": \"REJECT\",\n" + + " \"rejectReason\": \"frontPhoto:Picture is not" + + " clear/covered/incomplete\"\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getBrokerInfo Request Get Broker Info /api/v1/broker/nd/info */ + public static void testGetBrokerInfoRequest() throws Exception { + String data = "{\"begin\": \"20240510\", \"end\": \"20241010\", \"tradeType\": \"1\"}"; + GetBrokerInfoReq obj = mapper.readValue(data, GetBrokerInfoReq.class); + } + + /** getBrokerInfo Response Get Broker Info /api/v1/broker/nd/info */ + public static void testGetBrokerInfoResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"accountSize\": 0,\n" + + " \"maxAccountSize\": null,\n" + + " \"level\": 0\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addSubAccount Request Add sub-account /api/v1/broker/nd/account */ + public static void testAddSubAccountRequest() throws Exception { + String data = "{\"accountName\": \"Account1\"}"; + AddSubAccountReq obj = mapper.readValue(data, AddSubAccountReq.class); + } + + /** addSubAccount Response Add sub-account /api/v1/broker/nd/account */ + public static void testAddSubAccountResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"accountName\": \"Account15\",\n" + + " \"uid\": \"226383154\",\n" + + " \"createdAt\": 1729819381908,\n" + + " \"level\": 0\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getSubAccount Request Get sub-account /api/v1/broker/nd/account */ + public static void testGetSubAccountRequest() throws Exception { + String data = "{\"uid\": \"226383154\", \"currentPage\": 1, \"pageSize\": 20}"; + GetSubAccountReq obj = mapper.readValue(data, GetSubAccountReq.class); + } + + /** getSubAccount Response Get sub-account /api/v1/broker/nd/account */ + public static void testGetSubAccountResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addSubAccountApi Request Add sub-account API /api/v1/broker/nd/account/apikey */ + public static void testAddSubAccountApiRequest() throws Exception { + String data = + "{\"uid\": \"226383154\", \"passphrase\": \"11223344\", \"ipWhitelist\": [\"127.0.0.1\"," + + " \"123.123.123.123\"], \"permissions\": [\"general\", \"spot\"], \"label\": \"This" + + " is remarks\"}"; + AddSubAccountApiReq obj = mapper.readValue(data, AddSubAccountApiReq.class); + } + + /** addSubAccountApi Response Add sub-account API /api/v1/broker/nd/account/apikey */ + public static void testAddSubAccountApiResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getSubAccountAPI Request Get sub-account API /api/v1/broker/nd/account/apikey */ + public static void testGetSubAccountAPIRequest() throws Exception { + String data = "{\"uid\": \"226383154\", \"apiKey\": \"671afb36cee20f00015cfaf1\"}"; + GetSubAccountAPIReq obj = mapper.readValue(data, GetSubAccountAPIReq.class); + } + + /** getSubAccountAPI Response Get sub-account API /api/v1/broker/nd/account/apikey */ + public static void testGetSubAccountAPIResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** modifySubAccountApi Request Modify sub-account API /api/v1/broker/nd/account/update-apikey */ + public static void testModifySubAccountApiRequest() throws Exception { + String data = + "{\"uid\": \"226383154\", \"apiKey\": \"671afb36cee20f00015cfaf1\", \"ipWhitelist\":" + + " [\"127.0.0.1\", \"123.123.123.123\"], \"permissions\": [\"general\", \"spot\"]," + + " \"label\": \"This is remarks\"}"; + ModifySubAccountApiReq obj = mapper.readValue(data, ModifySubAccountApiReq.class); + } + + /** modifySubAccountApi Response Modify sub-account API /api/v1/broker/nd/account/update-apikey */ + public static void testModifySubAccountApiResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** deleteSubAccountAPI Request Delete sub-account API /api/v1/broker/nd/account/apikey */ + public static void testDeleteSubAccountAPIRequest() throws Exception { + String data = "{\"uid\": \"226383154\", \"apiKey\": \"671afb36cee20f00015cfaf1\"}"; + DeleteSubAccountAPIReq obj = mapper.readValue(data, DeleteSubAccountAPIReq.class); + } + + /** deleteSubAccountAPI Response Delete sub-account API /api/v1/broker/nd/account/apikey */ + public static void testDeleteSubAccountAPIResponse() throws Exception { + String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** transfer Request Transfer /api/v1/broker/nd/transfer */ + public static void testTransferRequest() throws Exception { + String data = + "{\"currency\": \"USDT\", \"amount\": \"1\", \"clientOid\":" + + " \"e6c24d23-6bc2-401b-bf9e-55e2daddfbc1\", \"direction\": \"OUT\", \"accountType\":" + + " \"MAIN\", \"specialUid\": \"226383154\", \"specialAccountType\": \"MAIN\"}"; + TransferReq obj = mapper.readValue(data, TransferReq.class); + } + + /** transfer Response Transfer /api/v1/broker/nd/transfer */ + public static void testTransferResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"671b4600c1e3dd000726866d\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getTransferHistory Request Get Transfer History /api/v3/broker/nd/transfer/detail */ + public static void testGetTransferHistoryRequest() throws Exception { + String data = "{\"orderId\": \"671b4600c1e3dd000726866d\"}"; + GetTransferHistoryReq obj = mapper.readValue(data, GetTransferHistoryReq.class); + } + + /** getTransferHistory Response Get Transfer History /api/v3/broker/nd/transfer/detail */ + public static void testGetTransferHistoryResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"671b4600c1e3dd000726866d\",\n" + + " \"currency\": \"USDT\",\n" + + " \"amount\": \"1\",\n" + + " \"fromUid\": 165111215,\n" + + " \"fromAccountType\": \"MAIN\",\n" + + " \"fromAccountTag\": \"DEFAULT\",\n" + + " \"toUid\": 226383154,\n" + + " \"toAccountType\": \"MAIN\",\n" + + " \"toAccountTag\": \"DEFAULT\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"reason\": null,\n" + + " \"createdAt\": 1729840640000\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getDepositList Request Get Deposit List /api/v1/asset/ndbroker/deposit/list */ + public static void testGetDepositListRequest() throws Exception { + String data = + "{\"currency\": \"USDT\", \"status\": \"SUCCESS\", \"hash\":" + + " \"example_string_default_value\", \"startTimestamp\": 123456, \"endTimestamp\":" + + " 123456, \"limit\": 100}"; + GetDepositListReq obj = mapper.readValue(data, GetDepositListReq.class); + } + + /** getDepositList Response Get Deposit List /api/v1/asset/ndbroker/deposit/list */ + public static void testGetDepositListResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"uid\": 165111215,\n" + + " \"hash\": \"6724e363a492800007ec602b\",\n" + + " \"address\": \"xxxxxxx@gmail.com\",\n" + + " \"memo\": \"\",\n" + + " \"amount\": \"3.0\",\n" + + " \"fee\": \"0.0\",\n" + + " \"currency\": \"USDT\",\n" + + " \"isInner\": true,\n" + + " \"walletTxId\": \"bbbbbbbbb\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"chain\": \"\",\n" + + " \"remark\": \"\",\n" + + " \"createdAt\": 1730470760000,\n" + + " \"updatedAt\": 1730470760000\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getDepositDetail Request Get Deposit Detail /api/v3/broker/nd/deposit/detail */ + public static void testGetDepositDetailRequest() throws Exception { + String data = "{\"currency\": \"USDT\", \"hash\": \"30bb0e0b***4156c5188\"}"; + GetDepositDetailReq obj = mapper.readValue(data, GetDepositDetailReq.class); + } + + /** getDepositDetail Response Get Deposit Detail /api/v3/broker/nd/deposit/detail */ + public static void testGetDepositDetailResponse() throws Exception { + String data = + "{\n" + + " \"data\" : {\n" + + " \"chain\" : \"trx\",\n" + + " \"hash\" : \"30bb0e0b***4156c5188\",\n" + + " \"walletTxId\" : \"30bb0***610d1030f\",\n" + + " \"uid\" : 201496341,\n" + + " \"updatedAt\" : 1713429174000,\n" + + " \"amount\" : \"8.5\",\n" + + " \"memo\" : \"\",\n" + + " \"fee\" : \"0.0\",\n" + + " \"address\" : \"THLPzUrbd1o***vP7d\",\n" + + " \"remark\" : \"Deposit\",\n" + + " \"isInner\" : false,\n" + + " \"currency\" : \"USDT\",\n" + + " \"status\" : \"SUCCESS\",\n" + + " \"createdAt\" : 1713429173000\n" + + " },\n" + + " \"code\" : \"200000\"\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getWithdrawDetail Request Get Withdraw Detail /api/v3/broker/nd/withdraw/detail */ + public static void testGetWithdrawDetailRequest() throws Exception { + String data = "{\"withdrawalId\": \"66617a2***3c9a\"}"; + GetWithdrawDetailReq obj = mapper.readValue(data, GetWithdrawDetailReq.class); + } + + /** getWithdrawDetail Response Get Withdraw Detail /api/v3/broker/nd/withdraw/detail */ + public static void testGetWithdrawDetailResponse() throws Exception { + String data = + "{\n" + + " \"data\": {\n" + + " \"id\": \"66617a2***3c9a\",\n" + + " \"chain\": \"ton\",\n" + + " \"walletTxId\": \"AJ***eRI=\",\n" + + " \"uid\": 157267400,\n" + + " \"amount\": \"1.00000000\",\n" + + " \"memo\": \"7025734\",\n" + + " \"fee\": \"0.00000000\",\n" + + " \"address\": \"EQDn***dKbGzr\",\n" + + " \"remark\": \"\",\n" + + " \"isInner\": false,\n" + + " \"currency\": \"USDT\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"createdAt\": 1717664288000,\n" + + " \"updatedAt\": 1717664375000\n" + + " },\n" + + " \"code\": \"200000\"\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getRebase Request Get Broker Rebate /api/v1/broker/nd/rebase/download */ + public static void testGetRebaseRequest() throws Exception { + String data = "{\"begin\": \"20240610\", \"end\": \"20241010\", \"tradeType\": \"1\"}"; + GetRebaseReq obj = mapper.readValue(data, GetRebaseReq.class); + } + + /** getRebase Response Get Broker Rebate /api/v1/broker/nd/rebase/download */ + public static void testGetRebaseResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"url\":" + + " \"https://kc-v2-promotion.s3.ap-northeast-1.amazonaws.com/broker/671aec522593f600019766d0_file.csv?X-Amz-Security-Token=IQo*********2cd90f14efb\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(NdBrokerApiAutoGeneratedTest::testSubmitKYCRequest, "testSubmitKYCRequest"); + run(NdBrokerApiAutoGeneratedTest::testSubmitKYCResponse, "testSubmitKYCResponse"); + run(NdBrokerApiAutoGeneratedTest::testGetKYCStatusRequest, "testGetKYCStatusRequest"); + run(NdBrokerApiAutoGeneratedTest::testGetKYCStatusResponse, "testGetKYCStatusResponse"); + run(NdBrokerApiAutoGeneratedTest::testGetKYCStatusListRequest, "testGetKYCStatusListRequest"); + run(NdBrokerApiAutoGeneratedTest::testGetKYCStatusListResponse, "testGetKYCStatusListResponse"); + run(NdBrokerApiAutoGeneratedTest::testGetBrokerInfoRequest, "testGetBrokerInfoRequest"); + run(NdBrokerApiAutoGeneratedTest::testGetBrokerInfoResponse, "testGetBrokerInfoResponse"); + run(NdBrokerApiAutoGeneratedTest::testAddSubAccountRequest, "testAddSubAccountRequest"); + run(NdBrokerApiAutoGeneratedTest::testAddSubAccountResponse, "testAddSubAccountResponse"); + run(NdBrokerApiAutoGeneratedTest::testGetSubAccountRequest, "testGetSubAccountRequest"); + run(NdBrokerApiAutoGeneratedTest::testGetSubAccountResponse, "testGetSubAccountResponse"); + run(NdBrokerApiAutoGeneratedTest::testAddSubAccountApiRequest, "testAddSubAccountApiRequest"); + run(NdBrokerApiAutoGeneratedTest::testAddSubAccountApiResponse, "testAddSubAccountApiResponse"); + run(NdBrokerApiAutoGeneratedTest::testGetSubAccountAPIRequest, "testGetSubAccountAPIRequest"); + run(NdBrokerApiAutoGeneratedTest::testGetSubAccountAPIResponse, "testGetSubAccountAPIResponse"); + run( + NdBrokerApiAutoGeneratedTest::testModifySubAccountApiRequest, + "testModifySubAccountApiRequest"); + run( + NdBrokerApiAutoGeneratedTest::testModifySubAccountApiResponse, + "testModifySubAccountApiResponse"); + run( + NdBrokerApiAutoGeneratedTest::testDeleteSubAccountAPIRequest, + "testDeleteSubAccountAPIRequest"); + run( + NdBrokerApiAutoGeneratedTest::testDeleteSubAccountAPIResponse, + "testDeleteSubAccountAPIResponse"); + run(NdBrokerApiAutoGeneratedTest::testTransferRequest, "testTransferRequest"); + run(NdBrokerApiAutoGeneratedTest::testTransferResponse, "testTransferResponse"); + run( + NdBrokerApiAutoGeneratedTest::testGetTransferHistoryRequest, + "testGetTransferHistoryRequest"); + run( + NdBrokerApiAutoGeneratedTest::testGetTransferHistoryResponse, + "testGetTransferHistoryResponse"); + run(NdBrokerApiAutoGeneratedTest::testGetDepositListRequest, "testGetDepositListRequest"); + run(NdBrokerApiAutoGeneratedTest::testGetDepositListResponse, "testGetDepositListResponse"); + run(NdBrokerApiAutoGeneratedTest::testGetDepositDetailRequest, "testGetDepositDetailRequest"); + run(NdBrokerApiAutoGeneratedTest::testGetDepositDetailResponse, "testGetDepositDetailResponse"); + run(NdBrokerApiAutoGeneratedTest::testGetWithdrawDetailRequest, "testGetWithdrawDetailRequest"); + run( + NdBrokerApiAutoGeneratedTest::testGetWithdrawDetailResponse, + "testGetWithdrawDetailResponse"); + run(NdBrokerApiAutoGeneratedTest::testGetRebaseRequest, "testGetRebaseRequest"); + run(NdBrokerApiAutoGeneratedTest::testGetRebaseResponse, "testGetRebaseResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApiImpl.java new file mode 100644 index 00000000..61fce46b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApiImpl.java @@ -0,0 +1,165 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class NdBrokerApiImpl implements NdBrokerApi { + private final Transport transport; + + public NdBrokerApiImpl(Transport transport) { + this.transport = transport; + } + + public SubmitKYCResp submitKYC(SubmitKYCReq req) { + return this.transport.call( + "broker", + true, + "POST", + "/api/kyc/ndBroker/proxyClient/submit", + req, + SubmitKYCResp.class, + false); + } + + public GetKYCStatusResp getKYCStatus(GetKYCStatusReq req) { + return this.transport.call( + "broker", + true, + "GET", + "/api/kyc/ndBroker/proxyClient/status/list", + req, + GetKYCStatusResp.class, + false); + } + + public GetKYCStatusListResp getKYCStatusList(GetKYCStatusListReq req) { + return this.transport.call( + "broker", + true, + "GET", + "/api/kyc/ndBroker/proxyClient/status/page", + req, + GetKYCStatusListResp.class, + false); + } + + public GetBrokerInfoResp getBrokerInfo(GetBrokerInfoReq req) { + return this.transport.call( + "broker", true, "GET", "/api/v1/broker/nd/info", req, GetBrokerInfoResp.class, false); + } + + public AddSubAccountResp addSubAccount(AddSubAccountReq req) { + return this.transport.call( + "broker", true, "POST", "/api/v1/broker/nd/account", req, AddSubAccountResp.class, false); + } + + public GetSubAccountResp getSubAccount(GetSubAccountReq req) { + return this.transport.call( + "broker", true, "GET", "/api/v1/broker/nd/account", req, GetSubAccountResp.class, false); + } + + public AddSubAccountApiResp addSubAccountApi(AddSubAccountApiReq req) { + return this.transport.call( + "broker", + true, + "POST", + "/api/v1/broker/nd/account/apikey", + req, + AddSubAccountApiResp.class, + false); + } + + public GetSubAccountAPIResp getSubAccountAPI(GetSubAccountAPIReq req) { + return this.transport.call( + "broker", + true, + "GET", + "/api/v1/broker/nd/account/apikey", + req, + GetSubAccountAPIResp.class, + false); + } + + public ModifySubAccountApiResp modifySubAccountApi(ModifySubAccountApiReq req) { + return this.transport.call( + "broker", + true, + "POST", + "/api/v1/broker/nd/account/update-apikey", + req, + ModifySubAccountApiResp.class, + false); + } + + public DeleteSubAccountAPIResp deleteSubAccountAPI(DeleteSubAccountAPIReq req) { + return this.transport.call( + "broker", + true, + "DELETE", + "/api/v1/broker/nd/account/apikey", + req, + DeleteSubAccountAPIResp.class, + false); + } + + public TransferResp transfer(TransferReq req) { + return this.transport.call( + "broker", true, "POST", "/api/v1/broker/nd/transfer", req, TransferResp.class, false); + } + + public GetTransferHistoryResp getTransferHistory(GetTransferHistoryReq req) { + return this.transport.call( + "broker", + true, + "GET", + "/api/v3/broker/nd/transfer/detail", + req, + GetTransferHistoryResp.class, + false); + } + + public GetDepositListResp getDepositList(GetDepositListReq req) { + return this.transport.call( + "broker", + true, + "GET", + "/api/v1/asset/ndbroker/deposit/list", + req, + GetDepositListResp.class, + false); + } + + public GetDepositDetailResp getDepositDetail(GetDepositDetailReq req) { + return this.transport.call( + "broker", + true, + "GET", + "/api/v3/broker/nd/deposit/detail", + req, + GetDepositDetailResp.class, + false); + } + + public GetWithdrawDetailResp getWithdrawDetail(GetWithdrawDetailReq req) { + return this.transport.call( + "broker", + true, + "GET", + "/api/v3/broker/nd/withdraw/detail", + req, + GetWithdrawDetailResp.class, + false); + } + + public GetRebaseResp getRebase(GetRebaseReq req) { + return this.transport.call( + "broker", + true, + "GET", + "/api/v1/broker/nd/rebase/download", + req, + GetRebaseResp.class, + false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/SubmitKYCReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/SubmitKYCReq.java new file mode 100644 index 00000000..5f6018f0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/SubmitKYCReq.java @@ -0,0 +1,108 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class SubmitKYCReq implements Request { + /** client uid */ + @JsonProperty("clientUid") + private String clientUid; + + /** first Name */ + @JsonProperty("firstName") + private String firstName; + + /** last Name */ + @JsonProperty("lastName") + private String lastName; + + /** ISO country code */ + @JsonProperty("issueCountry") + private String issueCountry; + + /** Birth Date */ + @JsonProperty("birthDate") + private String birthDate; + + /** Identity type */ + @JsonProperty("identityType") + private IdentityTypeEnum identityType; + + /** Identity Number */ + @JsonProperty("identityNumber") + private String identityNumber; + + /** expire Date. If there is no expiration date, please fill in: 2099-01-01 */ + @JsonProperty("expireDate") + private String expireDate; + + /** + * **Optional when identityType=bvn,** Front photo of the ID card, in base64 format, PNG or JPG is + * recommended, and the size cannot exceed 2MB. If it exceeds 2MB, it is recommended to adjust the + * resolution and compress it to less than 2MB + */ + @JsonProperty("frontPhoto") + private String frontPhoto; + + /** **Optional when identityType=passport/bvn,** Back photo of ID, same as above */ + @JsonProperty("backendPhoto") + private String backendPhoto; + + /** + * Selfie photo, in base64 format, PNG or JPG is recommended, and the size cannot exceed 2MB. If + * it exceeds 2MB, it is recommended to adjust the resolution and compress it to less than 2MB + */ + @JsonProperty("facePhoto") + private String facePhoto; + + public enum IdentityTypeEnum { + /** id card */ + IDCARD("idcard"), + /** driving license */ + DRIVINGLICENSE("drivinglicense"), + /** passport */ + PASSPORT("passport"), + /** bvn */ + BVN("bvn"); + + private final String value; + + IdentityTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IdentityTypeEnum fromValue(String value) { + for (IdentityTypeEnum b : IdentityTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/SubmitKYCResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/SubmitKYCResp.java new file mode 100644 index 00000000..70a00805 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/SubmitKYCResp.java @@ -0,0 +1,39 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class SubmitKYCResp implements Response> { + /** */ + @JsonProperty("data") + private String data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static SubmitKYCResp fromJson(String data) { + // original response + SubmitKYCResp obj = new SubmitKYCResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/TransferReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/TransferReq.java new file mode 100644 index 00000000..23931be5 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/TransferReq.java @@ -0,0 +1,153 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class TransferReq implements Request { + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Transfer Amount (must be a positive integer in the currency's precision) */ + @JsonProperty("amount") + private String amount; + + /** + * Fund transfer direction: OUT (Broker account is transferred to Broker sub-account), IN (Broker + * sub-account is transferred to Broker account) + */ + @JsonProperty("direction") + private DirectionEnum direction; + + /** Broker account types: MAIN (Funding account), TRADE (Spot trading account) */ + @JsonProperty("accountType") + private AccountTypeEnum accountType; + + /** Broker sub-account UID, must be the Broker sub-account created by the current Broker user. */ + @JsonProperty("specialUid") + private String specialUid; + + /** Broker sub-account types: MAIN (Funding account), TRADE (Spot trading account) */ + @JsonProperty("specialAccountType") + private SpecialAccountTypeEnum specialAccountType; + + /** + * Client Order ID, the unique identifier created by the client. It is recommended to use UUID. + * The maximum length is 128 bits. + */ + @JsonProperty("clientOid") + private String clientOid; + + public enum DirectionEnum { + /** */ + OUT("OUT"), + /** */ + IN("IN"); + + private final String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum AccountTypeEnum { + /** */ + MAIN("MAIN"), + /** */ + TRADE("TRADE"); + + private final String value; + + AccountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AccountTypeEnum fromValue(String value) { + for (AccountTypeEnum b : AccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SpecialAccountTypeEnum { + /** */ + MAIN("MAIN"), + /** */ + TRADE("TRADE"); + + private final String value; + + SpecialAccountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SpecialAccountTypeEnum fromValue(String value) { + for (SpecialAccountTypeEnum b : SpecialAccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/TransferResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/TransferResp.java new file mode 100644 index 00000000..991c3127 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/TransferResp.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class TransferResp implements Response> { + /** */ + @JsonProperty("orderId") + private String orderId; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddIsolatedMarginReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddIsolatedMarginReq.java new file mode 100644 index 00000000..e8cab7d4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddIsolatedMarginReq.java @@ -0,0 +1,36 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddIsolatedMarginReq implements Request { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Margin amount (min. margin amount≥0.00001667XBT) */ + @JsonProperty("margin") + private Double margin; + + /** + * A unique ID generated by the user, to ensure the operation is processed by the system only + * once, The maximum length cannot exceed 36 + */ + @JsonProperty("bizNo") + private String bizNo; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddIsolatedMarginResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddIsolatedMarginResp.java new file mode 100644 index 00000000..6695ddba --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddIsolatedMarginResp.java @@ -0,0 +1,174 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddIsolatedMarginResp + implements Response> { + /** Position ID */ + @JsonProperty("id") + private String id; + + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Auto deposit margin or not */ + @JsonProperty("autoDeposit") + private Boolean autoDeposit; + + /** Maintenance margin requirement */ + @JsonProperty("maintMarginReq") + private String maintMarginReq; + + /** Risk limit */ + @JsonProperty("riskLimit") + private Integer riskLimit; + + /** Leverage o the order */ + @JsonProperty("realLeverage") + private String realLeverage; + + /** Cross mode or not */ + @JsonProperty("crossMode") + private Boolean crossMode; + + /** ADL ranking percentile */ + @JsonProperty("delevPercentage") + private Double delevPercentage; + + /** Open time */ + @JsonProperty("openingTimestamp") + private Long openingTimestamp; + + /** Current timestamp */ + @JsonProperty("currentTimestamp") + private Long currentTimestamp; + + /** Current postion quantity */ + @JsonProperty("currentQty") + private Integer currentQty; + + /** Current postion value */ + @JsonProperty("currentCost") + private String currentCost; + + /** Current commission */ + @JsonProperty("currentComm") + private String currentComm; + + /** Unrealised value */ + @JsonProperty("unrealisedCost") + private String unrealisedCost; + + /** Accumulated realised gross profit value */ + @JsonProperty("realisedGrossCost") + private String realisedGrossCost; + + /** Current realised position value */ + @JsonProperty("realisedCost") + private String realisedCost; + + /** Opened position or not */ + @JsonProperty("isOpen") + private Boolean isOpen; + + /** Mark price */ + @JsonProperty("markPrice") + private String markPrice; + + /** Mark value */ + @JsonProperty("markValue") + private String markValue; + + /** Position value */ + @JsonProperty("posCost") + private String posCost; + + /** added margin */ + @JsonProperty("posCross") + private String posCross; + + /** Leverage margin */ + @JsonProperty("posInit") + private String posInit; + + /** Bankruptcy cost */ + @JsonProperty("posComm") + private String posComm; + + /** Funding fees paid out */ + @JsonProperty("posLoss") + private String posLoss; + + /** Position margin */ + @JsonProperty("posMargin") + private String posMargin; + + /** Maintenance margin */ + @JsonProperty("posMaint") + private String posMaint; + + /** Position margin */ + @JsonProperty("maintMargin") + private String maintMargin; + + /** Accumulated realised gross profit value */ + @JsonProperty("realisedGrossPnl") + private String realisedGrossPnl; + + /** Realised profit and loss */ + @JsonProperty("realisedPnl") + private String realisedPnl; + + /** Unrealised profit and loss */ + @JsonProperty("unrealisedPnl") + private String unrealisedPnl; + + /** Profit-loss ratio of the position */ + @JsonProperty("unrealisedPnlPcnt") + private String unrealisedPnlPcnt; + + /** Rate of return on investment */ + @JsonProperty("unrealisedRoePcnt") + private String unrealisedRoePcnt; + + /** Average entry price */ + @JsonProperty("avgEntryPrice") + private String avgEntryPrice; + + /** Liquidation price */ + @JsonProperty("liquidationPrice") + private String liquidationPrice; + + /** Bankruptcy price */ + @JsonProperty("bankruptPrice") + private String bankruptPrice; + + /** Currency used to clear and settle the trades */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddOrderReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddOrderReq.java new file mode 100644 index 00000000..e7e285c6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddOrderReq.java @@ -0,0 +1,350 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddOrderReq implements Request { + /** + * 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(-) + */ + @JsonProperty("clientOid") + private String clientOid; + + /** specify if the order is to 'buy' or 'sell' */ + @JsonProperty("side") + private SideEnum side; + + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** + * Used to calculate the margin to be frozen for the order. If you are to close the position, this + * parameter is not required. + */ + @JsonProperty("leverage") + private Integer leverage; + + /** specify if the order is an 'limit' order or 'market' order */ + @JsonProperty("type") + @Builder.Default + private TypeEnum type = TypeEnum.LIMIT; + + /** + * Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be + * provieded. + */ + @JsonProperty("stop") + private StopEnum stop; + + /** Either 'TP' or 'MP', Need to be defined if stop is specified. */ + @JsonProperty("stopPriceType") + private StopPriceTypeEnum stopPriceType; + + /** Need to be defined if stop is specified. */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** + * 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. + */ + @JsonProperty("reduceOnly") + @Builder.Default + private Boolean reduceOnly = false; + + /** + * 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. + */ + @JsonProperty("closeOrder") + @Builder.Default + private Boolean closeOrder = false; + + /** Margin mode: ISOLATED, default: ISOLATED */ + @JsonProperty("marginMode") + @Builder.Default + private MarginModeEnum marginMode = MarginModeEnum.ISOLATED; + + /** Required for type is 'limit' order, indicating the operating price */ + @JsonProperty("price") + private String price; + + /** + * Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is + * size(lot), and other units are not supported. + */ + @JsonProperty("size") + private Integer size; + + /** + * 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 + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GOODTILLCANCELED; + + /** + * 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. + */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** + * Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not + * allowed choose postOnly. + */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = 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. + */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = 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. + * Need to be defined if iceberg is specified. + */ + @JsonProperty("visibleSize") + private String visibleSize; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopEnum { + /** Triggers when the price reaches or goes below the stopPrice. */ + DOWN("down"), + /** Triggers when the price reaches or goes above the stopPrice */ + UP("up"); + + private final String value; + + StopEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopEnum fromValue(String value) { + for (StopEnum b : StopEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopPriceTypeEnum { + /** + * 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. + */ + TRADEPRICE("TP"), + /** + * MP for mark price, The mark price can be obtained through relevant OPEN API for index + * services + */ + MARKPRICE("MP"); + + private final String value; + + StopPriceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopPriceTypeEnum fromValue(String value) { + for (StopPriceTypeEnum b : StopPriceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum MarginModeEnum { + /** Isolated Margin */ + ISOLATED("ISOLATED"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** + * order remains open on the order book until canceled. This is the default type if the field is + * left empty. + */ + GOODTILLCANCELED("GTC"), + /** + * being matched or not, the remaining size of the order will be instantly canceled instead of + * entering the order book. + */ + IMMEDIATEORCANCEL("IOC"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddOrderResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddOrderResp.java new file mode 100644 index 00000000..11059883 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddOrderResp.java @@ -0,0 +1,37 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public 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. + */ + @JsonProperty("orderId") + private String orderId; + + /** The user self-defined order id. */ + @JsonProperty("clientOid") + private String clientOid; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddOrderTestReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddOrderTestReq.java new file mode 100644 index 00000000..2c5cfcd8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddOrderTestReq.java @@ -0,0 +1,350 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddOrderTestReq implements Request { + /** + * 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 (-). + */ + @JsonProperty("clientOid") + private String clientOid; + + /** Specify if the order is to 'buy' or 'sell'. */ + @JsonProperty("side") + private SideEnum side; + + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** + * Used to calculate the margin to be frozen for the order. If you are to close the position, this + * parameter is not required. + */ + @JsonProperty("leverage") + private Integer leverage; + + /** Specify if the order is a 'limit' order or 'market' order */ + @JsonProperty("type") + @Builder.Default + private TypeEnum type = TypeEnum.LIMIT; + + /** + * Either 'down' or 'up'. If stop is used, parameter stopPrice and stopPriceType also need to be + * provided. + */ + @JsonProperty("stop") + private StopEnum stop; + + /** Either 'TP' or 'MP' need to be defined if stop is specified. */ + @JsonProperty("stopPriceType") + private StopPriceTypeEnum stopPriceType; + + /** Needs to be defined if stop is specified. */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** + * 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. + */ + @JsonProperty("reduceOnly") + @Builder.Default + private Boolean reduceOnly = false; + + /** + * 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. + */ + @JsonProperty("closeOrder") + @Builder.Default + private Boolean closeOrder = false; + + /** Margin mode: ISOLATED, default: ISOLATED */ + @JsonProperty("marginMode") + @Builder.Default + private MarginModeEnum marginMode = MarginModeEnum.ISOLATED; + + /** Required for type is 'limit' order, indicating the operating price */ + @JsonProperty("price") + private String price; + + /** + * Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size + * (lot), and other units are not supported. + */ + @JsonProperty("size") + private Integer size; + + /** + * 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 + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GOODTILLCANCELED; + + /** + * 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. + */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** + * Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, + * choosing postOnly is not allowed. + */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = false; + + /** + * 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. + */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = 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. + * Need to be defined if iceberg is specified. + */ + @JsonProperty("visibleSize") + private String visibleSize; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopEnum { + /** Triggers when the price reaches or goes below the stopPrice. */ + DOWN("down"), + /** Triggers when the price reaches or goes above the stopPrice. */ + UP("up"); + + private final String value; + + StopEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopEnum fromValue(String value) { + for (StopEnum b : StopEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopPriceTypeEnum { + /** + * 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. + */ + TRADEPRICE("TP"), + /** + * MP for mark price. The mark price can be obtained through relevant OPEN API for index + * services. + */ + MARKPRICE("MP"); + + private final String value; + + StopPriceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopPriceTypeEnum fromValue(String value) { + for (StopPriceTypeEnum b : StopPriceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum MarginModeEnum { + /** Isolated Margin */ + ISOLATED("ISOLATED"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** + * order remains open on the order book until canceled. This is the default type if the field is + * left empty. + */ + GOODTILLCANCELED("GTC"), + /** + * being matched or not, the remaining size of the order will be instantly canceled instead of + * entering the order book. + */ + IMMEDIATEORCANCEL("IOC"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddOrderTestResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddOrderTestResp.java new file mode 100644 index 00000000..b71cec26 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddOrderTestResp.java @@ -0,0 +1,38 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public 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. + */ + @JsonProperty("orderId") + private String orderId; + + /** The user self-defined order id. */ + @JsonProperty("clientOid") + private String clientOid; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddTPSLOrderReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddTPSLOrderReq.java new file mode 100644 index 00000000..4c1f1b8b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddTPSLOrderReq.java @@ -0,0 +1,314 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddTPSLOrderReq implements Request { + /** + * 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 (-). + */ + @JsonProperty("clientOid") + private String clientOid; + + /** Specify if the order is to 'buy' or 'sell'. */ + @JsonProperty("side") + private SideEnum side; + + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** + * Used to calculate the margin to be frozen for the order. If you are to close the position, this + * parameter is not required. + */ + @JsonProperty("leverage") + private Integer leverage; + + /** Specify if the order is a 'limit' order or 'market' order */ + @JsonProperty("type") + @Builder.Default + private TypeEnum type = TypeEnum.LIMIT; + + /** Either 'TP' or 'MP' */ + @JsonProperty("stopPriceType") + private StopPriceTypeEnum stopPriceType; + + /** + * 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. + */ + @JsonProperty("reduceOnly") + @Builder.Default + private Boolean reduceOnly = false; + + /** + * 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. + */ + @JsonProperty("closeOrder") + @Builder.Default + private Boolean closeOrder = false; + + /** Margin mode: ISOLATED, default: ISOLATED */ + @JsonProperty("marginMode") + @Builder.Default + private MarginModeEnum marginMode = MarginModeEnum.ISOLATED; + + /** Required for type is 'limit' order, indicating the operating price */ + @JsonProperty("price") + private String price; + + /** + * Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size + * (lot), and other units are not supported. + */ + @JsonProperty("size") + private Integer size; + + /** + * 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 + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GOODTILLCANCELED; + + /** + * 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. + */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** + * Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, + * choosing postOnly is not allowed. + */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = false; + + /** + * 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. + */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = 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. + * Need to be defined if iceberg is specified. + */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** Take profit price */ + @JsonProperty("triggerStopUpPrice") + private String triggerStopUpPrice; + + /** Stop loss price */ + @JsonProperty("triggerStopDownPrice") + private String triggerStopDownPrice; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** limit order */ + LIMIT("limit"), + /** market order */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopPriceTypeEnum { + /** + * 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. + */ + TRADEPRICE("TP"), + /** + * MP for mark price. The mark price can be obtained through relevant OPEN API for index + * services. + */ + MARKPRICE("MP"); + + private final String value; + + StopPriceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopPriceTypeEnum fromValue(String value) { + for (StopPriceTypeEnum b : StopPriceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum MarginModeEnum { + /** */ + ISOLATED("ISOLATED"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** + * Order remains open on the order book until canceled. This is the default type if the field is + * left empty. + */ + GOODTILLCANCELED("GTC"), + /** + * Being matched or not, the remaining size of the order will be instantly canceled instead of + * entering the order book. + */ + IMMEDIATEORCANCEL("IOC"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddTPSLOrderResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddTPSLOrderResp.java new file mode 100644 index 00000000..b2f82fef --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/AddTPSLOrderResp.java @@ -0,0 +1,38 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public 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. + */ + @JsonProperty("orderId") + private String orderId; + + /** The user self-defined order ID. */ + @JsonProperty("clientOid") + private String clientOid; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/CancelOrderByClientOidReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/CancelOrderByClientOidReq.java new file mode 100644 index 00000000..d96a824d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/CancelOrderByClientOidReq.java @@ -0,0 +1,29 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByClientOidReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** The user self-defined order ID. */ + @JsonProperty("clientOid") + private String clientOid; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/CancelOrderByClientOidResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/CancelOrderByClientOidResp.java new file mode 100644 index 00000000..c8b4c7f0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/CancelOrderByClientOidResp.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByClientOidResp + implements Response> { + /** */ + @JsonProperty("clientOid") + private String clientOid; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/CancelOrderByIdReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/CancelOrderByIdReq.java new file mode 100644 index 00000000..031d9ec2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/CancelOrderByIdReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByIdReq implements Request { + /** Order ID */ + @JsonProperty("orderId") + private String orderId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/CancelOrderByIdResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/CancelOrderByIdResp.java new file mode 100644 index 00000000..7bb96131 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/CancelOrderByIdResp.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByIdResp + implements Response> { + /** The orderId that is to be canceled */ + @JsonProperty("cancelledOrderIds") + private List cancelledOrderIds = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApi.java new file mode 100644 index 00000000..cc84a6b6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApi.java @@ -0,0 +1,122 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +public interface FuturesApi { + /** + * Add Order 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. docs + * +-----------------------+------------------+ | Extra API Info | Value | + * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+------------------+ + */ + AddOrderResp addOrder(AddOrderReq req); + + /** + * Add Order Test Place order the futures trading system just for validation docs + * +-----------------------+------------------+ | Extra API Info | Value | + * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+------------------+ + */ + AddOrderTestResp addOrderTest(AddOrderTestReq req); + + /** + * Add Take Profit And Stop Loss Order 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. docs + * +-----------------------+------------------+ | Extra API Info | Value | + * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+------------------+ + */ + AddTPSLOrderResp addTPSLOrder(AddTPSLOrderReq req); + + /** + * Cancel Order By OrderId Cancel order by system-generated orderId. docs + * +-----------------------+------------------+ | Extra API Info | Value | + * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | + * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+------------------+ + */ + CancelOrderByIdResp cancelOrderById(CancelOrderByIdReq req); + + /** + * Cancel Order By ClientOid Cancel order by client-defined orderId. docs + * +-----------------------+------------------+ | Extra API Info | Value | + * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | + * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+------------------+ + */ + CancelOrderByClientOidResp cancelOrderByClientOid(CancelOrderByClientOidReq req); + + /** + * Get Max Open Size Get Maximum Open Position Size. docs + * +-----------------------+------------------+ | Extra API Info | Value | + * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | + * API-RATE-LIMIT-WEIGHT | 4 | +-----------------------+------------------+ + */ + GetMaxOpenSizeResp getMaxOpenSize(GetMaxOpenSizeReq req); + + /** + * Get Max Withdraw Margin This interface can query the maximum amount of margin that the current + * position supports withdrawal. docs + * +-----------------------+------------------+ | Extra API Info | Value | + * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | + * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+------------------+ + */ + GetMaxWithdrawMarginResp getMaxWithdrawMargin(GetMaxWithdrawMarginReq req); + + /** + * Add Isolated Margin Add Isolated Margin Manually. docs + * +-----------------------+------------------+ | Extra API Info | Value | + * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | + * API-RATE-LIMIT-WEIGHT | 4 | +-----------------------+------------------+ + */ + AddIsolatedMarginResp addIsolatedMargin(AddIsolatedMarginReq req); + + /** + * Remove Isolated Margin Remove Isolated Margin Manually. docs + * +-----------------------+------------------+ | Extra API Info | Value | + * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | + * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+------------------+ + */ + RemoveIsolatedMarginResp removeIsolatedMargin(RemoveIsolatedMarginReq req); + + /** + * Modify Isolated Margin Risk Limit This interface can be used to obtain information about risk + * limit level of a specific contract (only valid for Isolated Margin). docs + * +-----------------------+------------------+ | Extra API Info | Value | + * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+------------------+ + */ + ModifyIsolatedMarginRiskLimtResp modifyIsolatedMarginRiskLimt( + ModifyIsolatedMarginRiskLimtReq req); + + /** + * Modify Isolated Margin Auto-Deposit Status This endpoint is only applicable to isolated margin + * and is no longer recommended. It is recommended to use cross margin instead. docs + * +-----------------------+------------------+ | Extra API Info | Value | + * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | + * API-RATE-LIMIT-WEIGHT | 4 | +-----------------------+------------------+ + */ + ModifyAutoDepositStatusResp modifyAutoDepositStatus(ModifyAutoDepositStatusReq req); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApi.template new file mode 100644 index 00000000..826e4314 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApi.template @@ -0,0 +1,197 @@ + + /** + * addOrder + * Add Order + * /api/v1/copy-trade/futures/orders + */ + public void testAddOrder() { + AddOrderReq.AddOrderReqBuilder builder = AddOrderReq.builder(); + builder.clientOid(?).side(?).symbol(?).leverage(?).type(?).stop(?).stopPriceType(?).stopPrice(?).reduceOnly(?).closeOrder(?).marginMode(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?); + AddOrderReq req = builder.build(); + AddOrderResp resp = this.api.addOrder(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->clientOid); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addOrderTest + * Add Order Test + * /api/v1/copy-trade/futures/orders/test + */ + public void testAddOrderTest() { + AddOrderTestReq.AddOrderTestReqBuilder builder = AddOrderTestReq.builder(); + builder.clientOid(?).side(?).symbol(?).leverage(?).type(?).stop(?).stopPriceType(?).stopPrice(?).reduceOnly(?).closeOrder(?).marginMode(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?); + AddOrderTestReq req = builder.build(); + AddOrderTestResp resp = this.api.addOrderTest(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->clientOid); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addTPSLOrder + * Add Take Profit And Stop Loss Order + * /api/v1/copy-trade/futures/st-orders + */ + public void testAddTPSLOrder() { + AddTPSLOrderReq.AddTPSLOrderReqBuilder builder = AddTPSLOrderReq.builder(); + builder.clientOid(?).side(?).symbol(?).leverage(?).type(?).stopPriceType(?).reduceOnly(?).closeOrder(?).marginMode(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).triggerStopUpPrice(?).triggerStopDownPrice(?); + AddTPSLOrderReq req = builder.build(); + AddTPSLOrderResp resp = this.api.addTPSLOrder(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->clientOid); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelOrderById + * Cancel Order By OrderId + * /api/v1/copy-trade/futures/orders + */ + public void testCancelOrderById() { + CancelOrderByIdReq.CancelOrderByIdReqBuilder builder = CancelOrderByIdReq.builder(); + builder.orderId(?); + CancelOrderByIdReq req = builder.build(); + CancelOrderByIdResp resp = this.api.cancelOrderById(req); + foreach($resp->cancelledOrderIds as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelOrderByClientOid + * Cancel Order By ClientOid + * /api/v1/copy-trade/futures/orders/client-order + */ + public void testCancelOrderByClientOid() { + CancelOrderByClientOidReq.CancelOrderByClientOidReqBuilder builder = CancelOrderByClientOidReq.builder(); + builder.symbol(?).clientOid(?); + CancelOrderByClientOidReq req = builder.build(); + CancelOrderByClientOidResp resp = this.api.cancelOrderByClientOid(req); + self::assertNotNull($resp->clientOid); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getMaxOpenSize + * Get Max Open Size + * /api/v1/copy-trade/futures/get-max-open-size + */ + public void testGetMaxOpenSize() { + GetMaxOpenSizeReq.GetMaxOpenSizeReqBuilder builder = GetMaxOpenSizeReq.builder(); + builder.symbol(?).price(?).leverage(?); + GetMaxOpenSizeReq req = builder.build(); + GetMaxOpenSizeResp resp = this.api.getMaxOpenSize(req); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->maxBuyOpenSize); + self::assertNotNull($resp->maxSellOpenSize); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getMaxWithdrawMargin + * Get Max Withdraw Margin + * /api/v1/copy-trade/futures/position/margin/max-withdraw-margin + */ + public void testGetMaxWithdrawMargin() { + GetMaxWithdrawMarginReq.GetMaxWithdrawMarginReqBuilder builder = GetMaxWithdrawMarginReq.builder(); + builder.symbol(?); + GetMaxWithdrawMarginReq req = builder.build(); + GetMaxWithdrawMarginResp resp = this.api.getMaxWithdrawMargin(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addIsolatedMargin + * Add Isolated Margin + * /api/v1/copy-trade/futures/position/margin/deposit-margin + */ + public void testAddIsolatedMargin() { + AddIsolatedMarginReq.AddIsolatedMarginReqBuilder builder = AddIsolatedMarginReq.builder(); + builder.symbol(?).margin(?).bizNo(?); + AddIsolatedMarginReq req = builder.build(); + AddIsolatedMarginResp resp = this.api.addIsolatedMargin(req); + self::assertNotNull($resp->id); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->autoDeposit); + self::assertNotNull($resp->maintMarginReq); + self::assertNotNull($resp->riskLimit); + self::assertNotNull($resp->realLeverage); + self::assertNotNull($resp->crossMode); + self::assertNotNull($resp->delevPercentage); + self::assertNotNull($resp->openingTimestamp); + self::assertNotNull($resp->currentTimestamp); + self::assertNotNull($resp->currentQty); + self::assertNotNull($resp->currentCost); + self::assertNotNull($resp->currentComm); + self::assertNotNull($resp->unrealisedCost); + self::assertNotNull($resp->realisedGrossCost); + self::assertNotNull($resp->realisedCost); + self::assertNotNull($resp->isOpen); + self::assertNotNull($resp->markPrice); + self::assertNotNull($resp->markValue); + self::assertNotNull($resp->posCost); + self::assertNotNull($resp->posCross); + self::assertNotNull($resp->posInit); + self::assertNotNull($resp->posComm); + self::assertNotNull($resp->posLoss); + self::assertNotNull($resp->posMargin); + self::assertNotNull($resp->posMaint); + self::assertNotNull($resp->maintMargin); + self::assertNotNull($resp->realisedGrossPnl); + self::assertNotNull($resp->realisedPnl); + self::assertNotNull($resp->unrealisedPnl); + self::assertNotNull($resp->unrealisedPnlPcnt); + self::assertNotNull($resp->unrealisedRoePcnt); + self::assertNotNull($resp->avgEntryPrice); + self::assertNotNull($resp->liquidationPrice); + self::assertNotNull($resp->bankruptPrice); + self::assertNotNull($resp->settleCurrency); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * removeIsolatedMargin + * Remove Isolated Margin + * /api/v1/copy-trade/futures/position/margin/withdraw-margin + */ + public void testRemoveIsolatedMargin() { + RemoveIsolatedMarginReq.RemoveIsolatedMarginReqBuilder builder = RemoveIsolatedMarginReq.builder(); + builder.symbol(?).withdrawAmount(?); + RemoveIsolatedMarginReq req = builder.build(); + RemoveIsolatedMarginResp resp = this.api.removeIsolatedMargin(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * modifyIsolatedMarginRiskLimt + * Modify Isolated Margin Risk Limit + * /api/v1/copy-trade/futures/position/risk-limit-level/change + */ + public void testModifyIsolatedMarginRiskLimt() { + ModifyIsolatedMarginRiskLimtReq.ModifyIsolatedMarginRiskLimtReqBuilder builder = ModifyIsolatedMarginRiskLimtReq.builder(); + builder.symbol(?).level(?); + ModifyIsolatedMarginRiskLimtReq req = builder.build(); + ModifyIsolatedMarginRiskLimtResp resp = this.api.modifyIsolatedMarginRiskLimt(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * modifyAutoDepositStatus + * Modify Isolated Margin Auto-Deposit Status + * /api/v1/copy-trade/futures/position/margin/auto-deposit-status + */ + public void testModifyAutoDepositStatus() { + ModifyAutoDepositStatusReq.ModifyAutoDepositStatusReqBuilder builder = ModifyAutoDepositStatusReq.builder(); + builder.symbol(?).status(?); + ModifyAutoDepositStatusReq req = builder.build(); + ModifyAutoDepositStatusResp resp = this.api.modifyAutoDepositStatus(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApiAutoGeneratedTest.java new file mode 100644 index 00000000..2c507403 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApiAutoGeneratedTest.java @@ -0,0 +1,380 @@ +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class FuturesApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** addOrder Request Add Order /api/v1/copy-trade/futures/orders */ + public static void testAddOrderRequest() throws Exception { + String data = + "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," + + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," + + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.1\", \"size\":" + + " 1, \"timeInForce\": \"GTC\"}"; + AddOrderReq obj = mapper.readValue(data, AddOrderReq.class); + } + + /** addOrder Response Add Order /api/v1/copy-trade/futures/orders */ + public static void testAddOrderResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"263485113055133696\",\n" + + " \"clientOid\": \"5c52e11203aa677f331e493fb\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addOrderTest Request Add Order Test /api/v1/copy-trade/futures/orders/test */ + public static void testAddOrderTestRequest() throws Exception { + String data = + "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," + + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," + + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.1\", \"size\":" + + " 1, \"timeInForce\": \"GTC\"}"; + AddOrderTestReq obj = mapper.readValue(data, AddOrderTestReq.class); + } + + /** addOrderTest Response Add Order Test /api/v1/copy-trade/futures/orders/test */ + public static void testAddOrderTestResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"234125150956625920\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * addTPSLOrder Request Add Take Profit And Stop Loss Order /api/v1/copy-trade/futures/st-orders + */ + public static void testAddTPSLOrderRequest() throws Exception { + String data = + "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," + + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," + + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.2\", \"size\":" + + " 1, \"timeInForce\": \"GTC\", \"triggerStopUpPrice\": \"0.3\"," + + " \"triggerStopDownPrice\": \"0.1\", \"stopPriceType\": \"TP\"}"; + AddTPSLOrderReq obj = mapper.readValue(data, AddTPSLOrderReq.class); + } + + /** + * addTPSLOrder Response Add Take Profit And Stop Loss Order /api/v1/copy-trade/futures/st-orders + */ + public static void testAddTPSLOrderResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"234125150956625920\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** cancelOrderById Request Cancel Order By OrderId /api/v1/copy-trade/futures/orders */ + public static void testCancelOrderByIdRequest() throws Exception { + String data = "{\"orderId\": \"263485113055133696\"}"; + CancelOrderByIdReq obj = mapper.readValue(data, CancelOrderByIdReq.class); + } + + /** cancelOrderById Response Cancel Order By OrderId /api/v1/copy-trade/futures/orders */ + public static void testCancelOrderByIdResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"263485113055133696\"\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * cancelOrderByClientOid Request Cancel Order By ClientOid + * /api/v1/copy-trade/futures/orders/client-order + */ + public static void testCancelOrderByClientOidRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\", \"clientOid\": \"5c52e11203aa677f331e493fb\"}"; + CancelOrderByClientOidReq obj = mapper.readValue(data, CancelOrderByClientOidReq.class); + } + + /** + * cancelOrderByClientOid Response Cancel Order By ClientOid + * /api/v1/copy-trade/futures/orders/client-order + */ + public static void testCancelOrderByClientOidResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"clientOid\": \"5c52e11203aa677f331e4913fb\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getMaxOpenSize Request Get Max Open Size /api/v1/copy-trade/futures/get-max-open-size */ + public static void testGetMaxOpenSizeRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\", \"price\": 123456.0, \"leverage\": 123456}"; + GetMaxOpenSizeReq obj = mapper.readValue(data, GetMaxOpenSizeReq.class); + } + + /** getMaxOpenSize Response Get Max Open Size /api/v1/copy-trade/futures/get-max-open-size */ + public static void testGetMaxOpenSizeResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"maxBuyOpenSize\": \"1000000\",\n" + + " \"maxSellOpenSize\": \"51\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * getMaxWithdrawMargin Request Get Max Withdraw Margin + * /api/v1/copy-trade/futures/position/margin/max-withdraw-margin + */ + public static void testGetMaxWithdrawMarginRequest() throws Exception { + String data = "{\"symbol\": \"example_string_default_value\"}"; + GetMaxWithdrawMarginReq obj = mapper.readValue(data, GetMaxWithdrawMarginReq.class); + } + + /** + * getMaxWithdrawMargin Response Get Max Withdraw Margin + * /api/v1/copy-trade/futures/position/margin/max-withdraw-margin + */ + public static void testGetMaxWithdrawMarginResponse() throws Exception { + String data = "{\n \"code\": \"200000\",\n \"data\": \"21.1135719252\"\n}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * addIsolatedMargin Request Add Isolated Margin + * /api/v1/copy-trade/futures/position/margin/deposit-margin + */ + public static void testAddIsolatedMarginRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\", \"margin\": 3, \"bizNo\": \"112233\"}"; + AddIsolatedMarginReq obj = mapper.readValue(data, AddIsolatedMarginReq.class); + } + + /** + * addIsolatedMargin Response Add Isolated Margin + * /api/v1/copy-trade/futures/position/margin/deposit-margin + */ + public static void testAddIsolatedMarginResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"400000000000974886\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"autoDeposit\": true,\n" + + " \"maintMarginReq\": \"0.004\",\n" + + " \"riskLimit\": 100000,\n" + + " \"realLeverage\": \"1.83\",\n" + + " \"crossMode\": false,\n" + + " \"marginMode\": \"\",\n" + + " \"positionSide\": \"\",\n" + + " \"leverage\": \"1.83\",\n" + + " \"delevPercentage\": 0.2,\n" + + " \"openingTimestamp\": 1736932881164,\n" + + " \"currentTimestamp\": 1736933530230,\n" + + " \"currentQty\": 1,\n" + + " \"currentCost\": \"97.302\",\n" + + " \"currentComm\": \"0.0583812\",\n" + + " \"unrealisedCost\": \"97.302\",\n" + + " \"realisedGrossCost\": \"0.0000000000\",\n" + + " \"realisedCost\": \"0.0583812000\",\n" + + " \"isOpen\": true,\n" + + " \"markPrice\": \"96939.98\",\n" + + " \"markValue\": \"96.9399800000\",\n" + + " \"posCost\": \"97.302\",\n" + + " \"posCross\": \"20.9874\",\n" + + " \"posInit\": \"32.4339999967\",\n" + + " \"posComm\": \"0.0904415999\",\n" + + " \"posLoss\": \"0\",\n" + + " \"posMargin\": \"53.5118415966\",\n" + + " \"posMaint\": \"0.4796495999\",\n" + + " \"maintMargin\": \"53.1498215966\",\n" + + " \"realisedGrossPnl\": \"0.0000000000\",\n" + + " \"realisedPnl\": \"-0.0583812000\",\n" + + " \"unrealisedPnl\": \"-0.3620200000\",\n" + + " \"unrealisedPnlPcnt\": \"-0.0037\",\n" + + " \"unrealisedRoePcnt\": \"-0.0112\",\n" + + " \"avgEntryPrice\": \"97302.00\",\n" + + " \"liquidationPrice\": \"44269.81\",\n" + + " \"bankruptPrice\": \"43880.61\",\n" + + " \"settleCurrency\": \"USDT\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * removeIsolatedMargin Request Remove Isolated Margin + * /api/v1/copy-trade/futures/position/margin/withdraw-margin + */ + public static void testRemoveIsolatedMarginRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\", \"withdrawAmount\": 1e-07}"; + RemoveIsolatedMarginReq obj = mapper.readValue(data, RemoveIsolatedMarginReq.class); + } + + /** + * removeIsolatedMargin Response Remove Isolated Margin + * /api/v1/copy-trade/futures/position/margin/withdraw-margin + */ + public static void testRemoveIsolatedMarginResponse() throws Exception { + String data = "{\n \"code\": \"200000\",\n \"data\": \"0.1\"\n}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * modifyIsolatedMarginRiskLimt Request Modify Isolated Margin Risk Limit + * /api/v1/copy-trade/futures/position/risk-limit-level/change + */ + public static void testModifyIsolatedMarginRiskLimtRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\", \"level\": 1}"; + ModifyIsolatedMarginRiskLimtReq obj = + mapper.readValue(data, ModifyIsolatedMarginRiskLimtReq.class); + } + + /** + * modifyIsolatedMarginRiskLimt Response Modify Isolated Margin Risk Limit + * /api/v1/copy-trade/futures/position/risk-limit-level/change + */ + public static void testModifyIsolatedMarginRiskLimtResponse() throws Exception { + String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; + RestResponse resp = + mapper.readValue( + data, new TypeReference>() {}); + } + + /** + * modifyAutoDepositStatus Request Modify Isolated Margin Auto-Deposit Status + * /api/v1/copy-trade/futures/position/margin/auto-deposit-status + */ + public static void testModifyAutoDepositStatusRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\", \"status\": true}"; + ModifyAutoDepositStatusReq obj = mapper.readValue(data, ModifyAutoDepositStatusReq.class); + } + + /** + * modifyAutoDepositStatus Response Modify Isolated Margin Auto-Deposit Status + * /api/v1/copy-trade/futures/position/margin/auto-deposit-status + */ + public static void testModifyAutoDepositStatusResponse() throws Exception { + String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(FuturesApiAutoGeneratedTest::testAddOrderRequest, "testAddOrderRequest"); + run(FuturesApiAutoGeneratedTest::testAddOrderResponse, "testAddOrderResponse"); + run(FuturesApiAutoGeneratedTest::testAddOrderTestRequest, "testAddOrderTestRequest"); + run(FuturesApiAutoGeneratedTest::testAddOrderTestResponse, "testAddOrderTestResponse"); + run(FuturesApiAutoGeneratedTest::testAddTPSLOrderRequest, "testAddTPSLOrderRequest"); + run(FuturesApiAutoGeneratedTest::testAddTPSLOrderResponse, "testAddTPSLOrderResponse"); + run(FuturesApiAutoGeneratedTest::testCancelOrderByIdRequest, "testCancelOrderByIdRequest"); + run(FuturesApiAutoGeneratedTest::testCancelOrderByIdResponse, "testCancelOrderByIdResponse"); + run( + FuturesApiAutoGeneratedTest::testCancelOrderByClientOidRequest, + "testCancelOrderByClientOidRequest"); + run( + FuturesApiAutoGeneratedTest::testCancelOrderByClientOidResponse, + "testCancelOrderByClientOidResponse"); + run(FuturesApiAutoGeneratedTest::testGetMaxOpenSizeRequest, "testGetMaxOpenSizeRequest"); + run(FuturesApiAutoGeneratedTest::testGetMaxOpenSizeResponse, "testGetMaxOpenSizeResponse"); + run( + FuturesApiAutoGeneratedTest::testGetMaxWithdrawMarginRequest, + "testGetMaxWithdrawMarginRequest"); + run( + FuturesApiAutoGeneratedTest::testGetMaxWithdrawMarginResponse, + "testGetMaxWithdrawMarginResponse"); + run(FuturesApiAutoGeneratedTest::testAddIsolatedMarginRequest, "testAddIsolatedMarginRequest"); + run( + FuturesApiAutoGeneratedTest::testAddIsolatedMarginResponse, + "testAddIsolatedMarginResponse"); + run( + FuturesApiAutoGeneratedTest::testRemoveIsolatedMarginRequest, + "testRemoveIsolatedMarginRequest"); + run( + FuturesApiAutoGeneratedTest::testRemoveIsolatedMarginResponse, + "testRemoveIsolatedMarginResponse"); + run( + FuturesApiAutoGeneratedTest::testModifyIsolatedMarginRiskLimtRequest, + "testModifyIsolatedMarginRiskLimtRequest"); + run( + FuturesApiAutoGeneratedTest::testModifyIsolatedMarginRiskLimtResponse, + "testModifyIsolatedMarginRiskLimtResponse"); + run( + FuturesApiAutoGeneratedTest::testModifyAutoDepositStatusRequest, + "testModifyAutoDepositStatusRequest"); + run( + FuturesApiAutoGeneratedTest::testModifyAutoDepositStatusResponse, + "testModifyAutoDepositStatusResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApiImpl.java new file mode 100644 index 00000000..c10b0081 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApiImpl.java @@ -0,0 +1,135 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class FuturesApiImpl implements FuturesApi { + private final Transport transport; + + public FuturesApiImpl(Transport transport) { + this.transport = transport; + } + + public AddOrderResp addOrder(AddOrderReq req) { + return this.transport.call( + "futures", + false, + "POST", + "/api/v1/copy-trade/futures/orders", + req, + AddOrderResp.class, + false); + } + + public AddOrderTestResp addOrderTest(AddOrderTestReq req) { + return this.transport.call( + "futures", + false, + "POST", + "/api/v1/copy-trade/futures/orders/test", + req, + AddOrderTestResp.class, + false); + } + + public AddTPSLOrderResp addTPSLOrder(AddTPSLOrderReq req) { + return this.transport.call( + "futures", + false, + "POST", + "/api/v1/copy-trade/futures/st-orders", + req, + AddTPSLOrderResp.class, + false); + } + + public CancelOrderByIdResp cancelOrderById(CancelOrderByIdReq req) { + return this.transport.call( + "futures", + false, + "DELETE", + "/api/v1/copy-trade/futures/orders", + req, + CancelOrderByIdResp.class, + false); + } + + public CancelOrderByClientOidResp cancelOrderByClientOid(CancelOrderByClientOidReq req) { + return this.transport.call( + "futures", + false, + "DELETE", + "/api/v1/copy-trade/futures/orders/client-order", + req, + CancelOrderByClientOidResp.class, + false); + } + + public GetMaxOpenSizeResp getMaxOpenSize(GetMaxOpenSizeReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/copy-trade/futures/get-max-open-size", + req, + GetMaxOpenSizeResp.class, + false); + } + + public GetMaxWithdrawMarginResp getMaxWithdrawMargin(GetMaxWithdrawMarginReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/copy-trade/futures/position/margin/max-withdraw-margin", + req, + GetMaxWithdrawMarginResp.class, + false); + } + + public AddIsolatedMarginResp addIsolatedMargin(AddIsolatedMarginReq req) { + return this.transport.call( + "futures", + false, + "POST", + "/api/v1/copy-trade/futures/position/margin/deposit-margin", + req, + AddIsolatedMarginResp.class, + false); + } + + public RemoveIsolatedMarginResp removeIsolatedMargin(RemoveIsolatedMarginReq req) { + return this.transport.call( + "futures", + false, + "POST", + "/api/v1/copy-trade/futures/position/margin/withdraw-margin", + req, + RemoveIsolatedMarginResp.class, + false); + } + + public ModifyIsolatedMarginRiskLimtResp modifyIsolatedMarginRiskLimt( + ModifyIsolatedMarginRiskLimtReq req) { + return this.transport.call( + "futures", + false, + "POST", + "/api/v1/copy-trade/futures/position/risk-limit-level/change", + req, + ModifyIsolatedMarginRiskLimtResp.class, + false); + } + + public ModifyAutoDepositStatusResp modifyAutoDepositStatus(ModifyAutoDepositStatusReq req) { + return this.transport.call( + "futures", + false, + "POST", + "/api/v1/copy-trade/futures/position/margin/auto-deposit-status", + req, + ModifyAutoDepositStatusResp.class, + false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxOpenSizeReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxOpenSizeReq.java new file mode 100644 index 00000000..293409c6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxOpenSizeReq.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMaxOpenSizeReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Order Price */ + @JsonProperty("price") + private Double price; + + /** Leverage */ + @JsonProperty("leverage") + private Integer leverage; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxOpenSizeResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxOpenSizeResp.java new file mode 100644 index 00000000..2179b548 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxOpenSizeResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMaxOpenSizeResp + implements Response> { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Maximum buy size */ + @JsonProperty("maxBuyOpenSize") + private String maxBuyOpenSize; + + /** Maximum buy size */ + @JsonProperty("maxSellOpenSize") + private String maxSellOpenSize; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxWithdrawMarginReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxWithdrawMarginReq.java new file mode 100644 index 00000000..a954976f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxWithdrawMarginReq.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMaxWithdrawMarginReq implements Request { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxWithdrawMarginResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxWithdrawMarginResp.java new file mode 100644 index 00000000..2c6019f0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxWithdrawMarginResp.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMaxWithdrawMarginResp + implements Response> { + /** + * 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 + */ + @JsonProperty("data") + private String data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetMaxWithdrawMarginResp fromJson(String data) { + // original response + GetMaxWithdrawMarginResp obj = new GetMaxWithdrawMarginResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyAutoDepositStatusReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyAutoDepositStatusReq.java new file mode 100644 index 00000000..9e05f39d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyAutoDepositStatusReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifyAutoDepositStatusReq implements Request { + /** Symbol of the contract */ + @JsonProperty("symbol") + private String symbol; + + /** Status */ + @JsonProperty("status") + private Boolean status; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyAutoDepositStatusResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyAutoDepositStatusResp.java new file mode 100644 index 00000000..c3f5bf65 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyAutoDepositStatusResp.java @@ -0,0 +1,40 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifyAutoDepositStatusResp + implements Response> { + /** */ + @JsonProperty("data") + private Boolean data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static ModifyAutoDepositStatusResp fromJson(Boolean data) { + // original response + ModifyAutoDepositStatusResp obj = new ModifyAutoDepositStatusResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyIsolatedMarginRiskLimtReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyIsolatedMarginRiskLimtReq.java new file mode 100644 index 00000000..3e768d77 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyIsolatedMarginRiskLimtReq.java @@ -0,0 +1,29 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifyIsolatedMarginRiskLimtReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Level */ + @JsonProperty("level") + private Integer level; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyIsolatedMarginRiskLimtResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyIsolatedMarginRiskLimtResp.java new file mode 100644 index 00000000..581bc1f9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyIsolatedMarginRiskLimtResp.java @@ -0,0 +1,44 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifyIsolatedMarginRiskLimtResp + implements Response< + ModifyIsolatedMarginRiskLimtResp, RestResponse> { + /** + * Adjusting the level will result in the cancellation of any open orders. The response will + * indicate only whether the adjustment request was successfully submitted. + */ + @JsonProperty("data") + private Boolean data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static ModifyIsolatedMarginRiskLimtResp fromJson(Boolean data) { + // original response + ModifyIsolatedMarginRiskLimtResp obj = new ModifyIsolatedMarginRiskLimtResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/RemoveIsolatedMarginReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/RemoveIsolatedMarginReq.java new file mode 100644 index 00000000..1e23a602 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/RemoveIsolatedMarginReq.java @@ -0,0 +1,32 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class RemoveIsolatedMarginReq implements Request { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** + * 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 + */ + @JsonProperty("withdrawAmount") + private Double withdrawAmount; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/RemoveIsolatedMarginResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/RemoveIsolatedMarginResp.java new file mode 100644 index 00000000..4ff12855 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/RemoveIsolatedMarginResp.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.copytrading.futures; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class RemoveIsolatedMarginResp + implements Response> { + /** + * 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 + */ + @JsonProperty("data") + private String data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static RemoveIsolatedMarginResp fromJson(String data) { + // original response + RemoveIsolatedMarginResp obj = new RemoveIsolatedMarginResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApi.java new file mode 100644 index 00000000..f4253608 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApi.java @@ -0,0 +1,94 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +public interface EarnApi { + /** + * Purchase This endpoint allows you to subscribe Earn products. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | EARN | | API-RATE-LIMIT-POOL | EARN | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + PurchaseResp purchase(PurchaseReq req); + + /** + * Get Redeem Preview This endpoint allows you to subscribe Earn products. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | EARN | | API-RATE-LIMIT-POOL | EARN | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + GetRedeemPreviewResp getRedeemPreview(GetRedeemPreviewReq req); + + /** + * Redeem 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. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | EARN | | API-RATE-LIMIT-POOL | EARN | | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ + */ + RedeemResp redeem(RedeemReq req); + + /** + * Get Savings Products Available savings products can be obtained at this endpoint. If no + * products are available, an empty list is returned. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | EARN | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + GetSavingsProductsResp getSavingsProducts(GetSavingsProductsReq req); + + /** + * Get Promotion Products Available limited-duration products can be obtained at this endpoint. If + * no products are available, an empty list is returned. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | EARN | | + * API-RATE-LIMIT-WEIGHT | NULL | +-----------------------+---------+ + */ + GetPromotionProductsResp getPromotionProducts(GetPromotionProductsReq req); + + /** + * Get Staking Products Available staking products can be obtained at this endpoint. If no + * products are available, an empty list is returned. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | EARN | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + GetStakingProductsResp getStakingProducts(GetStakingProductsReq req); + + /** + * Get KCS Staking Products Available KCS staking products can be obtained at this endpoint. If no + * products are available, an empty list is returned. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | EARN | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + GetKcsStakingProductsResp getKcsStakingProducts(GetKcsStakingProductsReq req); + + /** + * Get ETH Staking Products Available ETH staking products can be obtained at this endpoint. If no + * products are available, an empty list is returned. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | EARN | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + GetETHStakingProductsResp getETHStakingProducts(GetETHStakingProductsReq req); + + /** + * Get Account Holding Information on currently held assets can be obtained at this endpoint. If + * no assets are currently held, an empty list is returned. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | EARN | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + GetAccountHoldingResp getAccountHolding(GetAccountHoldingReq req); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApi.template new file mode 100644 index 00000000..d96a5284 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApi.template @@ -0,0 +1,284 @@ + + /** + * purchase + * Purchase + * /api/v1/earn/orders + */ + public void testPurchase() { + PurchaseReq.PurchaseReqBuilder builder = PurchaseReq.builder(); + builder.productId(?).amount(?).accountType(?); + PurchaseReq req = builder.build(); + PurchaseResp resp = this.api.purchase(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->orderTxId); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getRedeemPreview + * Get Redeem Preview + * /api/v1/earn/redeem-preview + */ + public void testGetRedeemPreview() { + GetRedeemPreviewReq.GetRedeemPreviewReqBuilder builder = GetRedeemPreviewReq.builder(); + builder.orderId(?).fromAccountType(?); + GetRedeemPreviewReq req = builder.build(); + GetRedeemPreviewResp resp = this.api.getRedeemPreview(req); + self::assertNotNull($resp->currency); + self::assertNotNull($resp->redeemAmount); + self::assertNotNull($resp->penaltyInterestAmount); + self::assertNotNull($resp->redeemPeriod); + self::assertNotNull($resp->deliverTime); + self::assertNotNull($resp->manualRedeemable); + self::assertNotNull($resp->redeemAll); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * redeem + * Redeem + * /api/v1/earn/orders + */ + public void testRedeem() { + RedeemReq.RedeemReqBuilder builder = RedeemReq.builder(); + builder.orderId(?).amount(?).fromAccountType(?).confirmPunishRedeem(?); + RedeemReq req = builder.build(); + RedeemResp resp = this.api.redeem(req); + self::assertNotNull($resp->orderTxId); + self::assertNotNull($resp->deliverTime); + self::assertNotNull($resp->status); + self::assertNotNull($resp->amount); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSavingsProducts + * Get Savings Products + * /api/v1/earn/saving/products + */ + public void testGetSavingsProducts() { + GetSavingsProductsReq.GetSavingsProductsReqBuilder builder = GetSavingsProductsReq.builder(); + builder.currency(?); + GetSavingsProductsReq req = builder.build(); + GetSavingsProductsResp resp = this.api.getSavingsProducts(req); + foreach($resp->data as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->currency); + self::assertNotNull($item->category); + self::assertNotNull($item->type); + self::assertNotNull($item->precision); + self::assertNotNull($item->productUpperLimit); + self::assertNotNull($item->userUpperLimit); + self::assertNotNull($item->userLowerLimit); + self::assertNotNull($item->redeemPeriod); + self::assertNotNull($item->lockStartTime); + self::assertNotNull($item->lockEndTime); + self::assertNotNull($item->applyStartTime); + self::assertNotNull($item->applyEndTime); + self::assertNotNull($item->returnRate); + self::assertNotNull($item->incomeCurrency); + self::assertNotNull($item->earlyRedeemSupported); + self::assertNotNull($item->productRemainAmount); + self::assertNotNull($item->status); + self::assertNotNull($item->redeemType); + self::assertNotNull($item->incomeReleaseType); + self::assertNotNull($item->interestDate); + self::assertNotNull($item->duration); + self::assertNotNull($item->newUserOnly); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getPromotionProducts + * Get Promotion Products + * /api/v1/earn/promotion/products + */ + public void testGetPromotionProducts() { + GetPromotionProductsReq.GetPromotionProductsReqBuilder builder = GetPromotionProductsReq.builder(); + builder.currency(?); + GetPromotionProductsReq req = builder.build(); + GetPromotionProductsResp resp = this.api.getPromotionProducts(req); + foreach($resp->data as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->currency); + self::assertNotNull($item->category); + self::assertNotNull($item->type); + self::assertNotNull($item->precision); + self::assertNotNull($item->productUpperLimit); + self::assertNotNull($item->userUpperLimit); + self::assertNotNull($item->userLowerLimit); + self::assertNotNull($item->redeemPeriod); + self::assertNotNull($item->lockStartTime); + self::assertNotNull($item->lockEndTime); + self::assertNotNull($item->applyStartTime); + self::assertNotNull($item->applyEndTime); + self::assertNotNull($item->returnRate); + self::assertNotNull($item->incomeCurrency); + self::assertNotNull($item->earlyRedeemSupported); + self::assertNotNull($item->productRemainAmount); + self::assertNotNull($item->status); + self::assertNotNull($item->redeemType); + self::assertNotNull($item->incomeReleaseType); + self::assertNotNull($item->interestDate); + self::assertNotNull($item->duration); + self::assertNotNull($item->newUserOnly); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getStakingProducts + * Get Staking Products + * /api/v1/earn/staking/products + */ + public void testGetStakingProducts() { + GetStakingProductsReq.GetStakingProductsReqBuilder builder = GetStakingProductsReq.builder(); + builder.currency(?); + GetStakingProductsReq req = builder.build(); + GetStakingProductsResp resp = this.api.getStakingProducts(req); + foreach($resp->data as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->currency); + self::assertNotNull($item->category); + self::assertNotNull($item->type); + self::assertNotNull($item->precision); + self::assertNotNull($item->productUpperLimit); + self::assertNotNull($item->userUpperLimit); + self::assertNotNull($item->userLowerLimit); + self::assertNotNull($item->redeemPeriod); + self::assertNotNull($item->lockStartTime); + self::assertNotNull($item->lockEndTime); + self::assertNotNull($item->applyStartTime); + self::assertNotNull($item->applyEndTime); + self::assertNotNull($item->returnRate); + self::assertNotNull($item->incomeCurrency); + self::assertNotNull($item->earlyRedeemSupported); + self::assertNotNull($item->productRemainAmount); + self::assertNotNull($item->status); + self::assertNotNull($item->redeemType); + self::assertNotNull($item->incomeReleaseType); + self::assertNotNull($item->interestDate); + self::assertNotNull($item->duration); + self::assertNotNull($item->newUserOnly); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getKcsStakingProducts + * Get KCS Staking Products + * /api/v1/earn/kcs-staking/products + */ + public void testGetKcsStakingProducts() { + GetKcsStakingProductsReq.GetKcsStakingProductsReqBuilder builder = GetKcsStakingProductsReq.builder(); + builder.currency(?); + GetKcsStakingProductsReq req = builder.build(); + GetKcsStakingProductsResp resp = this.api.getKcsStakingProducts(req); + foreach($resp->data as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->currency); + self::assertNotNull($item->category); + self::assertNotNull($item->type); + self::assertNotNull($item->precision); + self::assertNotNull($item->productUpperLimit); + self::assertNotNull($item->userUpperLimit); + self::assertNotNull($item->userLowerLimit); + self::assertNotNull($item->redeemPeriod); + self::assertNotNull($item->lockStartTime); + self::assertNotNull($item->lockEndTime); + self::assertNotNull($item->applyStartTime); + self::assertNotNull($item->applyEndTime); + self::assertNotNull($item->returnRate); + self::assertNotNull($item->incomeCurrency); + self::assertNotNull($item->earlyRedeemSupported); + self::assertNotNull($item->productRemainAmount); + self::assertNotNull($item->status); + self::assertNotNull($item->redeemType); + self::assertNotNull($item->incomeReleaseType); + self::assertNotNull($item->interestDate); + self::assertNotNull($item->duration); + self::assertNotNull($item->newUserOnly); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getETHStakingProducts + * Get ETH Staking Products + * /api/v1/earn/eth-staking/products + */ + public void testGetETHStakingProducts() { + GetETHStakingProductsReq.GetETHStakingProductsReqBuilder builder = GetETHStakingProductsReq.builder(); + builder.currency(?); + GetETHStakingProductsReq req = builder.build(); + GetETHStakingProductsResp resp = this.api.getETHStakingProducts(req); + foreach($resp->data as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->category); + self::assertNotNull($item->type); + self::assertNotNull($item->precision); + self::assertNotNull($item->currency); + self::assertNotNull($item->incomeCurrency); + self::assertNotNull($item->returnRate); + self::assertNotNull($item->userLowerLimit); + self::assertNotNull($item->userUpperLimit); + self::assertNotNull($item->productUpperLimit); + self::assertNotNull($item->productRemainAmount); + self::assertNotNull($item->redeemPeriod); + self::assertNotNull($item->redeemType); + self::assertNotNull($item->incomeReleaseType); + self::assertNotNull($item->applyStartTime); + self::assertNotNull($item->applyEndTime); + self::assertNotNull($item->lockStartTime); + self::assertNotNull($item->lockEndTime); + self::assertNotNull($item->interestDate); + self::assertNotNull($item->newUserOnly); + self::assertNotNull($item->earlyRedeemSupported); + self::assertNotNull($item->duration); + self::assertNotNull($item->status); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getAccountHolding + * Get Account Holding + * /api/v1/earn/hold-assets + */ + public void testGetAccountHolding() { + GetAccountHoldingReq.GetAccountHoldingReqBuilder builder = GetAccountHoldingReq.builder(); + builder.currency(?).productId(?).productCategory(?).currentPage(?).pageSize(?); + GetAccountHoldingReq req = builder.build(); + GetAccountHoldingResp resp = this.api.getAccountHolding(req); + self::assertNotNull($resp->totalNum); + foreach($resp->items as $item) { + self::assertNotNull($item->orderId); + self::assertNotNull($item->productId); + self::assertNotNull($item->productCategory); + self::assertNotNull($item->productType); + self::assertNotNull($item->currency); + self::assertNotNull($item->incomeCurrency); + self::assertNotNull($item->returnRate); + self::assertNotNull($item->holdAmount); + self::assertNotNull($item->redeemedAmount); + self::assertNotNull($item->redeemingAmount); + self::assertNotNull($item->lockStartTime); + self::assertNotNull($item->lockEndTime); + self::assertNotNull($item->purchaseTime); + self::assertNotNull($item->redeemPeriod); + self::assertNotNull($item->status); + self::assertNotNull($item->earlyRedeemSupported); + } + + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalPage); + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApiAutoGeneratedTest.java new file mode 100644 index 00000000..ee4c9d8f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApiAutoGeneratedTest.java @@ -0,0 +1,409 @@ +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class EarnApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** purchase Request Purchase /api/v1/earn/orders */ + public static void testPurchaseRequest() throws Exception { + String data = "{\"productId\": \"2611\", \"amount\": \"1\", \"accountType\": \"TRADE\"}"; + PurchaseReq obj = mapper.readValue(data, PurchaseReq.class); + } + + /** purchase Response Purchase /api/v1/earn/orders */ + public static void testPurchaseResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"2767291\",\n" + + " \"orderTxId\": \"6603694\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getRedeemPreview Request Get Redeem Preview /api/v1/earn/redeem-preview */ + public static void testGetRedeemPreviewRequest() throws Exception { + String data = "{\"orderId\": \"2767291\", \"fromAccountType\": \"MAIN\"}"; + GetRedeemPreviewReq obj = mapper.readValue(data, GetRedeemPreviewReq.class); + } + + /** getRedeemPreview Response Get Redeem Preview /api/v1/earn/redeem-preview */ + public static void testGetRedeemPreviewResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currency\": \"KCS\",\n" + + " \"redeemAmount\": \"1\",\n" + + " \"penaltyInterestAmount\": \"0\",\n" + + " \"redeemPeriod\": 3,\n" + + " \"deliverTime\": 1729518951000,\n" + + " \"manualRedeemable\": true,\n" + + " \"redeemAll\": false\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** redeem Request Redeem /api/v1/earn/orders */ + public static void testRedeemRequest() throws Exception { + String data = + "{\"orderId\": \"2767291\", \"amount\": \"example_string_default_value\"," + + " \"fromAccountType\": \"MAIN\", \"confirmPunishRedeem\": \"1\"}"; + RedeemReq obj = mapper.readValue(data, RedeemReq.class); + } + + /** redeem Response Redeem /api/v1/earn/orders */ + public static void testRedeemResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderTxId\": \"6603700\",\n" + + " \"deliverTime\": 1729517805000,\n" + + " \"status\": \"PENDING\",\n" + + " \"amount\": \"1\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getSavingsProducts Request Get Savings Products /api/v1/earn/saving/products */ + public static void testGetSavingsProductsRequest() throws Exception { + String data = "{\"currency\": \"BTC\"}"; + GetSavingsProductsReq obj = mapper.readValue(data, GetSavingsProductsReq.class); + } + + /** getSavingsProducts Response Get Savings Products /api/v1/earn/saving/products */ + public static void testGetSavingsProductsResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"2172\",\n" + + " \"currency\": \"BTC\",\n" + + " \"category\": \"DEMAND\",\n" + + " \"type\": \"DEMAND\",\n" + + " \"precision\": 8,\n" + + " \"productUpperLimit\": \"480\",\n" + + " \"productRemainAmount\": \"132.36153083\",\n" + + " \"userUpperLimit\": \"20\",\n" + + " \"userLowerLimit\": \"0.01\",\n" + + " \"redeemPeriod\": 0,\n" + + " \"lockStartTime\": 1644807600000,\n" + + " \"lockEndTime\": null,\n" + + " \"applyStartTime\": 1644807600000,\n" + + " \"applyEndTime\": null,\n" + + " \"returnRate\": \"0.00047208\",\n" + + " \"incomeCurrency\": \"BTC\",\n" + + " \"earlyRedeemSupported\": 0,\n" + + " \"status\": \"ONGOING\",\n" + + " \"redeemType\": \"MANUAL\",\n" + + " \"incomeReleaseType\": \"DAILY\",\n" + + " \"interestDate\": 1729267200000,\n" + + " \"duration\": 0,\n" + + " \"newUserOnly\": 0\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getPromotionProducts Request Get Promotion Products /api/v1/earn/promotion/products */ + public static void testGetPromotionProductsRequest() throws Exception { + String data = "{\"currency\": \"BTC\"}"; + GetPromotionProductsReq obj = mapper.readValue(data, GetPromotionProductsReq.class); + } + + /** getPromotionProducts Response Get Promotion Products /api/v1/earn/promotion/products */ + public static void testGetPromotionProductsResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"2685\",\n" + + " \"currency\": \"BTC\",\n" + + " \"category\": \"ACTIVITY\",\n" + + " \"type\": \"TIME\",\n" + + " \"precision\": 8,\n" + + " \"productUpperLimit\": \"50\",\n" + + " \"userUpperLimit\": \"1\",\n" + + " \"userLowerLimit\": \"0.001\",\n" + + " \"redeemPeriod\": 0,\n" + + " \"lockStartTime\": 1702371601000,\n" + + " \"lockEndTime\": 1729858405000,\n" + + " \"applyStartTime\": 1702371600000,\n" + + " \"applyEndTime\": null,\n" + + " \"returnRate\": \"0.03\",\n" + + " \"incomeCurrency\": \"BTC\",\n" + + " \"earlyRedeemSupported\": 0,\n" + + " \"productRemainAmount\": \"49.78203998\",\n" + + " \"status\": \"ONGOING\",\n" + + " \"redeemType\": \"TRANS_DEMAND\",\n" + + " \"incomeReleaseType\": \"DAILY\",\n" + + " \"interestDate\": 1729253605000,\n" + + " \"duration\": 7,\n" + + " \"newUserOnly\": 1\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getStakingProducts Request Get Staking Products /api/v1/earn/staking/products */ + public static void testGetStakingProductsRequest() throws Exception { + String data = "{\"currency\": \"BTC\"}"; + GetStakingProductsReq obj = mapper.readValue(data, GetStakingProductsReq.class); + } + + /** getStakingProducts Response Get Staking Products /api/v1/earn/staking/products */ + public static void testGetStakingProductsResponse() throws Exception { + String data = + "{\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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getKcsStakingProducts Request Get KCS Staking Products /api/v1/earn/kcs-staking/products */ + public static void testGetKcsStakingProductsRequest() throws Exception { + String data = "{\"currency\": \"BTC\"}"; + GetKcsStakingProductsReq obj = mapper.readValue(data, GetKcsStakingProductsReq.class); + } + + /** getKcsStakingProducts Response Get KCS Staking Products /api/v1/earn/kcs-staking/products */ + public static void testGetKcsStakingProductsResponse() throws Exception { + String data = + "{\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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getETHStakingProducts Request Get ETH Staking Products /api/v1/earn/eth-staking/products */ + public static void testGetETHStakingProductsRequest() throws Exception { + String data = "{\"currency\": \"BTC\"}"; + GetETHStakingProductsReq obj = mapper.readValue(data, GetETHStakingProductsReq.class); + } + + /** getETHStakingProducts Response Get ETH Staking Products /api/v1/earn/eth-staking/products */ + public static void testGetETHStakingProductsResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getAccountHolding Request Get Account Holding /api/v1/earn/hold-assets */ + public static void testGetAccountHoldingRequest() throws Exception { + String data = + "{\"currency\": \"KCS\", \"productId\": \"example_string_default_value\"," + + " \"productCategory\": \"DEMAND\", \"currentPage\": 1, \"pageSize\": 10}"; + GetAccountHoldingReq obj = mapper.readValue(data, GetAccountHoldingReq.class); + } + + /** getAccountHolding Response Get Account Holding /api/v1/earn/hold-assets */ + public static void testGetAccountHoldingResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(EarnApiAutoGeneratedTest::testPurchaseRequest, "testPurchaseRequest"); + run(EarnApiAutoGeneratedTest::testPurchaseResponse, "testPurchaseResponse"); + run(EarnApiAutoGeneratedTest::testGetRedeemPreviewRequest, "testGetRedeemPreviewRequest"); + run(EarnApiAutoGeneratedTest::testGetRedeemPreviewResponse, "testGetRedeemPreviewResponse"); + run(EarnApiAutoGeneratedTest::testRedeemRequest, "testRedeemRequest"); + run(EarnApiAutoGeneratedTest::testRedeemResponse, "testRedeemResponse"); + run(EarnApiAutoGeneratedTest::testGetSavingsProductsRequest, "testGetSavingsProductsRequest"); + run(EarnApiAutoGeneratedTest::testGetSavingsProductsResponse, "testGetSavingsProductsResponse"); + run( + EarnApiAutoGeneratedTest::testGetPromotionProductsRequest, + "testGetPromotionProductsRequest"); + run( + EarnApiAutoGeneratedTest::testGetPromotionProductsResponse, + "testGetPromotionProductsResponse"); + run(EarnApiAutoGeneratedTest::testGetStakingProductsRequest, "testGetStakingProductsRequest"); + run(EarnApiAutoGeneratedTest::testGetStakingProductsResponse, "testGetStakingProductsResponse"); + run( + EarnApiAutoGeneratedTest::testGetKcsStakingProductsRequest, + "testGetKcsStakingProductsRequest"); + run( + EarnApiAutoGeneratedTest::testGetKcsStakingProductsResponse, + "testGetKcsStakingProductsResponse"); + run( + EarnApiAutoGeneratedTest::testGetETHStakingProductsRequest, + "testGetETHStakingProductsRequest"); + run( + EarnApiAutoGeneratedTest::testGetETHStakingProductsResponse, + "testGetETHStakingProductsResponse"); + run(EarnApiAutoGeneratedTest::testGetAccountHoldingRequest, "testGetAccountHoldingRequest"); + run(EarnApiAutoGeneratedTest::testGetAccountHoldingResponse, "testGetAccountHoldingResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApiImpl.java new file mode 100644 index 00000000..0a26c766 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApiImpl.java @@ -0,0 +1,94 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class EarnApiImpl implements EarnApi { + private final Transport transport; + + public EarnApiImpl(Transport transport) { + this.transport = transport; + } + + public PurchaseResp purchase(PurchaseReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v1/earn/orders", req, PurchaseResp.class, false); + } + + public GetRedeemPreviewResp getRedeemPreview(GetRedeemPreviewReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/earn/redeem-preview", + req, + GetRedeemPreviewResp.class, + false); + } + + public RedeemResp redeem(RedeemReq req) { + return this.transport.call( + "spot", false, "DELETE", "/api/v1/earn/orders", req, RedeemResp.class, false); + } + + public GetSavingsProductsResp getSavingsProducts(GetSavingsProductsReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/earn/saving/products", + req, + GetSavingsProductsResp.class, + false); + } + + public GetPromotionProductsResp getPromotionProducts(GetPromotionProductsReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/earn/promotion/products", + req, + GetPromotionProductsResp.class, + false); + } + + public GetStakingProductsResp getStakingProducts(GetStakingProductsReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/earn/staking/products", + req, + GetStakingProductsResp.class, + false); + } + + public GetKcsStakingProductsResp getKcsStakingProducts(GetKcsStakingProductsReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/earn/kcs-staking/products", + req, + GetKcsStakingProductsResp.class, + false); + } + + public GetETHStakingProductsResp getETHStakingProducts(GetETHStakingProductsReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/earn/eth-staking/products", + req, + GetETHStakingProductsResp.class, + false); + } + + public GetAccountHoldingResp getAccountHolding(GetAccountHoldingReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v1/earn/hold-assets", req, GetAccountHoldingResp.class, false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetAccountHoldingItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetAccountHoldingItems.java new file mode 100644 index 00000000..5c1d0fa4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetAccountHoldingItems.java @@ -0,0 +1,147 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAccountHoldingItems { + /** Holding ID */ + @JsonProperty("orderId") + private String orderId; + + /** Product ID */ + @JsonProperty("productId") + private String productId; + + /** Product category */ + @JsonProperty("productCategory") + private String productCategory; + + /** Product sub-type */ + @JsonProperty("productType") + private String productType; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Income currency */ + @JsonProperty("incomeCurrency") + private String incomeCurrency; + + /** Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return */ + @JsonProperty("returnRate") + private String returnRate; + + /** Holding amount */ + @JsonProperty("holdAmount") + private String holdAmount; + + /** Redeemed amount */ + @JsonProperty("redeemedAmount") + private String redeemedAmount; + + /** Redeeming amount */ + @JsonProperty("redeemingAmount") + private String redeemingAmount; + + /** Product earliest interest start time, in milliseconds */ + @JsonProperty("lockStartTime") + private Long lockStartTime; + + /** Product maturity time, in milliseconds */ + @JsonProperty("lockEndTime") + private Long lockEndTime; + + /** Most recent subscription time, in milliseconds */ + @JsonProperty("purchaseTime") + private Long purchaseTime; + + /** Redemption waiting period (days) */ + @JsonProperty("redeemPeriod") + private Integer redeemPeriod; + + /** Status: LOCKED (holding), REDEEMING (redeeming) */ + @JsonProperty("status") + private StatusEnum status; + + /** Whether the fixed product supports early redemption: 0 (no), 1 (yes) */ + @JsonProperty("earlyRedeemSupported") + private EarlyRedeemSupportedEnum earlyRedeemSupported; + + public enum StatusEnum { + /** */ + LOCKED("LOCKED"), + /** */ + REDEEMING("REDEEMING"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum EarlyRedeemSupportedEnum { + /** */ + _0(0), + /** */ + _1(1); + + private final Integer value; + + EarlyRedeemSupportedEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EarlyRedeemSupportedEnum fromValue(Integer value) { + for (EarlyRedeemSupportedEnum b : EarlyRedeemSupportedEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetAccountHoldingReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetAccountHoldingReq.java new file mode 100644 index 00000000..264123a2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetAccountHoldingReq.java @@ -0,0 +1,81 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAccountHoldingReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Product ID */ + @JsonProperty("productId") + private String productId; + + /** Product category */ + @JsonProperty("productCategory") + private ProductCategoryEnum productCategory; + + /** Current request page. */ + @JsonProperty("currentPage") + @Builder.Default + private Integer currentPage = 1; + + /** Number of results per request. Minimum is 10, maximum is 500. */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 15; + + public enum ProductCategoryEnum { + /** Savings */ + DEMAND("DEMAND"), + /** Activity */ + ACTIVITY("ACTIVITY"), + /** Staking */ + STAKING("STAKING"), + /** KCS Staking */ + KCS_STAKING("KCS_STAKING"), + /** ETHStaking */ + ETH2("ETH2"); + + private final String value; + + ProductCategoryEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ProductCategoryEnum fromValue(String value) { + for (ProductCategoryEnum b : ProductCategoryEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetAccountHoldingResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetAccountHoldingResp.java new file mode 100644 index 00000000..33efccb0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetAccountHoldingResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAccountHoldingResp + implements Response> { + /** total number */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** current page */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** page size */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** total pages */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetETHStakingProductsData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetETHStakingProductsData.java new file mode 100644 index 00000000..30b5c139 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetETHStakingProductsData.java @@ -0,0 +1,348 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetETHStakingProductsData { + /** Product ID */ + @JsonProperty("id") + private String id; + + /** Product category: ETH2 (ETH Staking) */ + @JsonProperty("category") + private CategoryEnum category; + + /** Product subtype: DEMAND (demand) */ + @JsonProperty("type") + private TypeEnum type; + + /** Maximum precision supported */ + @JsonProperty("precision") + private Integer precision; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Income currency */ + @JsonProperty("incomeCurrency") + private String incomeCurrency; + + /** Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return */ + @JsonProperty("returnRate") + private String returnRate; + + /** Min. user subscribe amount */ + @JsonProperty("userLowerLimit") + private String userLowerLimit; + + /** Max. user subscription amount */ + @JsonProperty("userUpperLimit") + private String userUpperLimit; + + /** Products total subscription amount */ + @JsonProperty("productUpperLimit") + private String productUpperLimit; + + /** Remaining product subscription amount */ + @JsonProperty("productRemainAmount") + private String productRemainAmount; + + /** Redemption waiting period (days) */ + @JsonProperty("redeemPeriod") + private Integer redeemPeriod; + + /** + * Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand + * product upon maturity), AUTO (redeem to funding account upon maturity) + */ + @JsonProperty("redeemType") + private RedeemTypeEnum redeemType; + + /** Income release type: DAILY (daily release), AFTER (release after product ends) */ + @JsonProperty("incomeReleaseType") + private IncomeReleaseTypeEnum incomeReleaseType; + + /** Subscription start time, in milliseconds */ + @JsonProperty("applyStartTime") + private Long applyStartTime; + + /** Subscription end time, in milliseconds */ + @JsonProperty("applyEndTime") + private Long applyEndTime; + + /** Product earliest interest start time, in milliseconds */ + @JsonProperty("lockStartTime") + private Long lockStartTime; + + /** Product maturity time, in milliseconds */ + @JsonProperty("lockEndTime") + private Long lockEndTime; + + /** Most recent interest date (milliseconds) */ + @JsonProperty("interestDate") + private Long interestDate; + + /** Whether the product is exclusive to new users: 0 (no), 1 (yes) */ + @JsonProperty("newUserOnly") + private NewUserOnlyEnum newUserOnly; + + /** Whether the fixed product supports early redemption: 0 (no), 1 (yes) */ + @JsonProperty("earlyRedeemSupported") + private EarlyRedeemSupportedEnum earlyRedeemSupported; + + /** Product duration (days) */ + @JsonProperty("duration") + private Integer duration; + + /** + * Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL + * (Subscribed), INTERESTING (Interest in progress) + */ + @JsonProperty("status") + private StatusEnum status; + + public enum CategoryEnum { + /** */ + ETH2("ETH2"); + + private final String value; + + CategoryEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CategoryEnum fromValue(String value) { + for (CategoryEnum b : CategoryEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** demand */ + DEMAND("DEMAND"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum RedeemTypeEnum { + /** */ + MANUAL("MANUAL"), + /** */ + TRANS_DEMAND("TRANS_DEMAND"), + /** */ + AUTO("AUTO"); + + private final String value; + + RedeemTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RedeemTypeEnum fromValue(String value) { + for (RedeemTypeEnum b : RedeemTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum IncomeReleaseTypeEnum { + /** */ + DAILY("DAILY"), + /** */ + AFTER("AFTER"); + + private final String value; + + IncomeReleaseTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IncomeReleaseTypeEnum fromValue(String value) { + for (IncomeReleaseTypeEnum b : IncomeReleaseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum NewUserOnlyEnum { + /** */ + _0(0), + /** */ + _1(1); + + private final Integer value; + + NewUserOnlyEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NewUserOnlyEnum fromValue(Integer value) { + for (NewUserOnlyEnum b : NewUserOnlyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum EarlyRedeemSupportedEnum { + /** */ + _0(0), + /** */ + _1(1); + + private final Integer value; + + EarlyRedeemSupportedEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EarlyRedeemSupportedEnum fromValue(Integer value) { + for (EarlyRedeemSupportedEnum b : EarlyRedeemSupportedEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StatusEnum { + /** */ + ONGOING("ONGOING"), + /** */ + PENDING("PENDING"), + /** */ + FULL("FULL"), + /** */ + INTERESTING("INTERESTING"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetETHStakingProductsReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetETHStakingProductsReq.java new file mode 100644 index 00000000..6e5fd80e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetETHStakingProductsReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetETHStakingProductsReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetETHStakingProductsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetETHStakingProductsResp.java new file mode 100644 index 00000000..aa7f0853 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetETHStakingProductsResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetETHStakingProductsResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetETHStakingProductsResp fromJson(List data) { + // original response + GetETHStakingProductsResp obj = new GetETHStakingProductsResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetKcsStakingProductsData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetKcsStakingProductsData.java new file mode 100644 index 00000000..f7ba5a25 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetKcsStakingProductsData.java @@ -0,0 +1,350 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetKcsStakingProductsData { + /** Product ID */ + @JsonProperty("id") + private String id; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Product category: KCS_STAKING */ + @JsonProperty("category") + private CategoryEnum category; + + /** Product subtype: TIME (fixed), DEMAND (demand) */ + @JsonProperty("type") + private TypeEnum type; + + /** Maximum precision supported */ + @JsonProperty("precision") + private Integer precision; + + /** Products total subscription amount */ + @JsonProperty("productUpperLimit") + private String productUpperLimit; + + /** Max. user subscription amount */ + @JsonProperty("userUpperLimit") + private String userUpperLimit; + + /** Min. user subscribe amount */ + @JsonProperty("userLowerLimit") + private String userLowerLimit; + + /** Redemption waiting period (days) */ + @JsonProperty("redeemPeriod") + private Integer redeemPeriod; + + /** Product earliest interest start time, in milliseconds */ + @JsonProperty("lockStartTime") + private Long lockStartTime; + + /** Product maturity time, in milliseconds */ + @JsonProperty("lockEndTime") + private Long lockEndTime; + + /** Subscription start time, in milliseconds */ + @JsonProperty("applyStartTime") + private Long applyStartTime; + + /** Subscription end time, in milliseconds */ + @JsonProperty("applyEndTime") + private Long applyEndTime; + + /** Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return */ + @JsonProperty("returnRate") + private String returnRate; + + /** Income currency */ + @JsonProperty("incomeCurrency") + private String incomeCurrency; + + /** Whether the fixed product supports early redemption: 0 (no), 1 (yes) */ + @JsonProperty("earlyRedeemSupported") + private EarlyRedeemSupportedEnum earlyRedeemSupported; + + /** Remaining product subscription amount */ + @JsonProperty("productRemainAmount") + private String productRemainAmount; + + /** + * Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL + * (Subscribed), INTERESTING (Interest in progress) + */ + @JsonProperty("status") + private StatusEnum status; + + /** + * Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand + * product upon maturity), AUTO (redeem to funding account upon maturity) + */ + @JsonProperty("redeemType") + private RedeemTypeEnum redeemType; + + /** Income release type: DAILY (daily release), AFTER (release after product ends) */ + @JsonProperty("incomeReleaseType") + private IncomeReleaseTypeEnum incomeReleaseType; + + /** Most recent interest date (milliseconds) */ + @JsonProperty("interestDate") + private Long interestDate; + + /** Product duration (days) */ + @JsonProperty("duration") + private Integer duration; + + /** Whether the product is exclusive to new users: 0 (no), 1 (yes) */ + @JsonProperty("newUserOnly") + private NewUserOnlyEnum newUserOnly; + + public enum CategoryEnum { + /** */ + KCS_STAKING("KCS_STAKING"); + + private final String value; + + CategoryEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CategoryEnum fromValue(String value) { + for (CategoryEnum b : CategoryEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** fixed */ + TIME("TIME"), + /** demand */ + DEMAND("DEMAND"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum EarlyRedeemSupportedEnum { + /** */ + _0(0), + /** */ + _1(1); + + private final Integer value; + + EarlyRedeemSupportedEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EarlyRedeemSupportedEnum fromValue(Integer value) { + for (EarlyRedeemSupportedEnum b : EarlyRedeemSupportedEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StatusEnum { + /** */ + ONGOING("ONGOING"), + /** */ + PENDING("PENDING"), + /** */ + FULL("FULL"), + /** */ + INTERESTING("INTERESTING"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum RedeemTypeEnum { + /** */ + MANUAL("MANUAL"), + /** */ + TRANS_DEMAND("TRANS_DEMAND"), + /** */ + AUTO("AUTO"); + + private final String value; + + RedeemTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RedeemTypeEnum fromValue(String value) { + for (RedeemTypeEnum b : RedeemTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum IncomeReleaseTypeEnum { + /** */ + DAILY("DAILY"), + /** */ + AFTER("AFTER"); + + private final String value; + + IncomeReleaseTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IncomeReleaseTypeEnum fromValue(String value) { + for (IncomeReleaseTypeEnum b : IncomeReleaseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum NewUserOnlyEnum { + /** */ + _0(0), + /** */ + _1(1); + + private final Integer value; + + NewUserOnlyEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NewUserOnlyEnum fromValue(Integer value) { + for (NewUserOnlyEnum b : NewUserOnlyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetKcsStakingProductsReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetKcsStakingProductsReq.java new file mode 100644 index 00000000..36b6b907 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetKcsStakingProductsReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetKcsStakingProductsReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetKcsStakingProductsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetKcsStakingProductsResp.java new file mode 100644 index 00000000..9e226bae --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetKcsStakingProductsResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetKcsStakingProductsResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetKcsStakingProductsResp fromJson(List data) { + // original response + GetKcsStakingProductsResp obj = new GetKcsStakingProductsResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetPromotionProductsData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetPromotionProductsData.java new file mode 100644 index 00000000..c2599ee4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetPromotionProductsData.java @@ -0,0 +1,350 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPromotionProductsData { + /** Product ID */ + @JsonProperty("id") + private String id; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Product category: ACTIVITY */ + @JsonProperty("category") + private CategoryEnum category; + + /** Product subtype: TIME (fixed), DEMAND (demand) */ + @JsonProperty("type") + private TypeEnum type; + + /** Maximum precision supported */ + @JsonProperty("precision") + private Integer precision; + + /** Products total subscription amount */ + @JsonProperty("productUpperLimit") + private String productUpperLimit; + + /** Max. user subscription amount */ + @JsonProperty("userUpperLimit") + private String userUpperLimit; + + /** Min. user subscribe amount */ + @JsonProperty("userLowerLimit") + private String userLowerLimit; + + /** Redemption waiting period (days) */ + @JsonProperty("redeemPeriod") + private Integer redeemPeriod; + + /** Product earliest interest start time, in milliseconds */ + @JsonProperty("lockStartTime") + private Long lockStartTime; + + /** Earliest interest end time of product, in milliseconds */ + @JsonProperty("lockEndTime") + private Long lockEndTime; + + /** Subscription start time, in milliseconds */ + @JsonProperty("applyStartTime") + private Long applyStartTime; + + /** Subscription end time, in milliseconds */ + @JsonProperty("applyEndTime") + private Long applyEndTime; + + /** Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return */ + @JsonProperty("returnRate") + private String returnRate; + + /** Income currency */ + @JsonProperty("incomeCurrency") + private String incomeCurrency; + + /** Whether the fixed product supports early redemption: 0 (no), 1 (yes) */ + @JsonProperty("earlyRedeemSupported") + private EarlyRedeemSupportedEnum earlyRedeemSupported; + + /** Remaining product subscription amount */ + @JsonProperty("productRemainAmount") + private String productRemainAmount; + + /** + * Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL + * (Subscribed), INTERESTING (Interest in progress) + */ + @JsonProperty("status") + private StatusEnum status; + + /** + * Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand + * product upon maturity), AUTO (redeem to funding account upon maturity) + */ + @JsonProperty("redeemType") + private RedeemTypeEnum redeemType; + + /** Income release type: DAILY (daily release), AFTER (release after product ends) */ + @JsonProperty("incomeReleaseType") + private IncomeReleaseTypeEnum incomeReleaseType; + + /** Most recent interest date (milliseconds) */ + @JsonProperty("interestDate") + private Long interestDate; + + /** Product duration (days) */ + @JsonProperty("duration") + private Integer duration; + + /** Whether the product is exclusive to new users: 0 (no), 1 (yes) */ + @JsonProperty("newUserOnly") + private NewUserOnlyEnum newUserOnly; + + public enum CategoryEnum { + /** */ + ACTIVITY("ACTIVITY"); + + private final String value; + + CategoryEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CategoryEnum fromValue(String value) { + for (CategoryEnum b : CategoryEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** fixed */ + TIME("TIME"), + /** demand */ + DEMAND("DEMAND"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum EarlyRedeemSupportedEnum { + /** */ + _0(0), + /** */ + _1(1); + + private final Integer value; + + EarlyRedeemSupportedEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EarlyRedeemSupportedEnum fromValue(Integer value) { + for (EarlyRedeemSupportedEnum b : EarlyRedeemSupportedEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StatusEnum { + /** */ + ONGOING("ONGOING"), + /** */ + PENDING("PENDING"), + /** */ + FULL("FULL"), + /** */ + INTERESTING("INTERESTING"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum RedeemTypeEnum { + /** */ + MANUAL("MANUAL"), + /** */ + TRANS_DEMAND("TRANS_DEMAND"), + /** */ + AUTO("AUTO"); + + private final String value; + + RedeemTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RedeemTypeEnum fromValue(String value) { + for (RedeemTypeEnum b : RedeemTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum IncomeReleaseTypeEnum { + /** */ + DAILY("DAILY"), + /** */ + AFTER("AFTER"); + + private final String value; + + IncomeReleaseTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IncomeReleaseTypeEnum fromValue(String value) { + for (IncomeReleaseTypeEnum b : IncomeReleaseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum NewUserOnlyEnum { + /** */ + _0(0), + /** */ + _1(1); + + private final Integer value; + + NewUserOnlyEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NewUserOnlyEnum fromValue(Integer value) { + for (NewUserOnlyEnum b : NewUserOnlyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetPromotionProductsReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetPromotionProductsReq.java new file mode 100644 index 00000000..d0663bb7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetPromotionProductsReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPromotionProductsReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetPromotionProductsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetPromotionProductsResp.java new file mode 100644 index 00000000..032d29d5 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetPromotionProductsResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPromotionProductsResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetPromotionProductsResp fromJson(List data) { + // original response + GetPromotionProductsResp obj = new GetPromotionProductsResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetRedeemPreviewReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetRedeemPreviewReq.java new file mode 100644 index 00000000..db76cb73 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetRedeemPreviewReq.java @@ -0,0 +1,64 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRedeemPreviewReq implements Request { + /** Holding ID */ + @JsonProperty("orderId") + private String orderId; + + /** + * Account type: MAIN (funding account), TRADE (spot trading account). This parameter is valid + * only when orderId=ETH2 + */ + @JsonProperty("fromAccountType") + private FromAccountTypeEnum fromAccountType; + + public enum FromAccountTypeEnum { + /** */ + MAIN("MAIN"), + /** */ + TRADE("TRADE"); + + private final String value; + + FromAccountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FromAccountTypeEnum fromValue(String value) { + for (FromAccountTypeEnum b : FromAccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetRedeemPreviewResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetRedeemPreviewResp.java new file mode 100644 index 00000000..f86d4151 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetRedeemPreviewResp.java @@ -0,0 +1,58 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRedeemPreviewResp + implements Response> { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Expected redemption amount */ + @JsonProperty("redeemAmount") + private String redeemAmount; + + /** Penalty interest amount, incurred for early redemption of fixed-term products */ + @JsonProperty("penaltyInterestAmount") + private String penaltyInterestAmount; + + /** Redemption waiting period (days) */ + @JsonProperty("redeemPeriod") + private Integer redeemPeriod; + + /** Expected deliver time (milliseconds) */ + @JsonProperty("deliverTime") + private Long deliverTime; + + /** Whether manual redemption is possible */ + @JsonProperty("manualRedeemable") + private Boolean manualRedeemable; + + /** + * Whether the entire holding must be redeemed, required for early redemption of fixed-term + * products + */ + @JsonProperty("redeemAll") + private Boolean redeemAll; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetSavingsProductsData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetSavingsProductsData.java new file mode 100644 index 00000000..7d3ebf3e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetSavingsProductsData.java @@ -0,0 +1,350 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSavingsProductsData { + /** Product ID */ + @JsonProperty("id") + private String id; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Product category: DEMAND (savings) */ + @JsonProperty("category") + private CategoryEnum category; + + /** Product subtype: TIME (fixed), DEMAND (demand) */ + @JsonProperty("type") + private TypeEnum type; + + /** Maximum precision supported */ + @JsonProperty("precision") + private Integer precision; + + /** Products total subscription amount */ + @JsonProperty("productUpperLimit") + private String productUpperLimit; + + /** Max. user subscription amount */ + @JsonProperty("userUpperLimit") + private String userUpperLimit; + + /** Min. user subscribe amount */ + @JsonProperty("userLowerLimit") + private String userLowerLimit; + + /** Redemption waiting period (days) */ + @JsonProperty("redeemPeriod") + private Integer redeemPeriod; + + /** Product earliest interest start time, in milliseconds */ + @JsonProperty("lockStartTime") + private Long lockStartTime; + + /** Product maturity time, in milliseconds */ + @JsonProperty("lockEndTime") + private Long lockEndTime; + + /** Subscription start time, in milliseconds */ + @JsonProperty("applyStartTime") + private Long applyStartTime; + + /** Subscription end time, in milliseconds */ + @JsonProperty("applyEndTime") + private Long applyEndTime; + + /** Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return */ + @JsonProperty("returnRate") + private String returnRate; + + /** Income currency */ + @JsonProperty("incomeCurrency") + private String incomeCurrency; + + /** Whether the fixed product supports early redemption: 0 (no), 1 (yes) */ + @JsonProperty("earlyRedeemSupported") + private EarlyRedeemSupportedEnum earlyRedeemSupported; + + /** Remaining product subscription amount */ + @JsonProperty("productRemainAmount") + private String productRemainAmount; + + /** + * Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL + * (Subscribed), INTERESTING (Interest in progress) + */ + @JsonProperty("status") + private StatusEnum status; + + /** + * Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand + * product upon maturity), AUTO (redeem to funding account upon maturity) + */ + @JsonProperty("redeemType") + private RedeemTypeEnum redeemType; + + /** Income release type: DAILY (daily release), AFTER (release after product ends) */ + @JsonProperty("incomeReleaseType") + private IncomeReleaseTypeEnum incomeReleaseType; + + /** Most recent interest date (milliseconds) */ + @JsonProperty("interestDate") + private Long interestDate; + + /** Product duration (days) */ + @JsonProperty("duration") + private Integer duration; + + /** Whether the product is exclusive to new users: 0 (no), 1 (yes) */ + @JsonProperty("newUserOnly") + private NewUserOnlyEnum newUserOnly; + + public enum CategoryEnum { + /** savings */ + DEMAND("DEMAND"); + + private final String value; + + CategoryEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CategoryEnum fromValue(String value) { + for (CategoryEnum b : CategoryEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** fixed */ + TIME("TIME"), + /** demand */ + DEMAND("DEMAND"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum EarlyRedeemSupportedEnum { + /** */ + _0(0), + /** */ + _1(1); + + private final Integer value; + + EarlyRedeemSupportedEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EarlyRedeemSupportedEnum fromValue(Integer value) { + for (EarlyRedeemSupportedEnum b : EarlyRedeemSupportedEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StatusEnum { + /** */ + ONGOING("ONGOING"), + /** */ + PENDING("PENDING"), + /** */ + FULL("FULL"), + /** */ + INTERESTING("INTERESTING"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum RedeemTypeEnum { + /** */ + MANUAL("MANUAL"), + /** */ + TRANS_DEMAND("TRANS_DEMAND"), + /** */ + AUTO("AUTO"); + + private final String value; + + RedeemTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RedeemTypeEnum fromValue(String value) { + for (RedeemTypeEnum b : RedeemTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum IncomeReleaseTypeEnum { + /** */ + DAILY("DAILY"), + /** */ + AFTER("AFTER"); + + private final String value; + + IncomeReleaseTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IncomeReleaseTypeEnum fromValue(String value) { + for (IncomeReleaseTypeEnum b : IncomeReleaseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum NewUserOnlyEnum { + /** */ + _0(0), + /** */ + _1(1); + + private final Integer value; + + NewUserOnlyEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NewUserOnlyEnum fromValue(Integer value) { + for (NewUserOnlyEnum b : NewUserOnlyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetSavingsProductsReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetSavingsProductsReq.java new file mode 100644 index 00000000..47e1a23e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetSavingsProductsReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSavingsProductsReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetSavingsProductsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetSavingsProductsResp.java new file mode 100644 index 00000000..279a230e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetSavingsProductsResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSavingsProductsResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetSavingsProductsResp fromJson(List data) { + // original response + GetSavingsProductsResp obj = new GetSavingsProductsResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetStakingProductsData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetStakingProductsData.java new file mode 100644 index 00000000..4c0a66b7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetStakingProductsData.java @@ -0,0 +1,350 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetStakingProductsData { + /** Product ID */ + @JsonProperty("id") + private String id; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Product category: STAKING */ + @JsonProperty("category") + private CategoryEnum category; + + /** Product subtype: TIME (fixed), DEMAND (demand) */ + @JsonProperty("type") + private TypeEnum type; + + /** Maximum precision supported */ + @JsonProperty("precision") + private Integer precision; + + /** Products total subscription amount */ + @JsonProperty("productUpperLimit") + private String productUpperLimit; + + /** Max. user subscription amount */ + @JsonProperty("userUpperLimit") + private String userUpperLimit; + + /** Min. user subscription amount */ + @JsonProperty("userLowerLimit") + private String userLowerLimit; + + /** Redemption waiting period (days) */ + @JsonProperty("redeemPeriod") + private Integer redeemPeriod; + + /** Product earliest interest start time, in milliseconds */ + @JsonProperty("lockStartTime") + private Long lockStartTime; + + /** Product maturity time, in milliseconds */ + @JsonProperty("lockEndTime") + private Long lockEndTime; + + /** Subscription start time, in milliseconds */ + @JsonProperty("applyStartTime") + private Long applyStartTime; + + /** Subscription end time, in milliseconds */ + @JsonProperty("applyEndTime") + private Long applyEndTime; + + /** Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return */ + @JsonProperty("returnRate") + private String returnRate; + + /** Income currency */ + @JsonProperty("incomeCurrency") + private String incomeCurrency; + + /** Whether the fixed product supports early redemption: 0 (no), 1 (yes) */ + @JsonProperty("earlyRedeemSupported") + private EarlyRedeemSupportedEnum earlyRedeemSupported; + + /** Remaining product subscription amount */ + @JsonProperty("productRemainAmount") + private String productRemainAmount; + + /** + * Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL + * (Subscribed), INTERESTING (Interest accrual in progress) + */ + @JsonProperty("status") + private StatusEnum status; + + /** + * Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand + * product upon maturity), AUTO (redeem to funding account upon maturity) + */ + @JsonProperty("redeemType") + private RedeemTypeEnum redeemType; + + /** Income release type: DAILY (daily release), AFTER (release after product ends) */ + @JsonProperty("incomeReleaseType") + private IncomeReleaseTypeEnum incomeReleaseType; + + /** Most recent interest date (milliseconds) */ + @JsonProperty("interestDate") + private Long interestDate; + + /** Product duration (days) */ + @JsonProperty("duration") + private Integer duration; + + /** Whether the product is exclusive to new users: 0 (no), 1 (yes) */ + @JsonProperty("newUserOnly") + private NewUserOnlyEnum newUserOnly; + + public enum CategoryEnum { + /** */ + STAKING("STAKING"); + + private final String value; + + CategoryEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CategoryEnum fromValue(String value) { + for (CategoryEnum b : CategoryEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** fixed */ + TIME("TIME"), + /** demand */ + DEMAND("DEMAND"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum EarlyRedeemSupportedEnum { + /** */ + _0(0), + /** */ + _1(1); + + private final Integer value; + + EarlyRedeemSupportedEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EarlyRedeemSupportedEnum fromValue(Integer value) { + for (EarlyRedeemSupportedEnum b : EarlyRedeemSupportedEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StatusEnum { + /** */ + ONGOING("ONGOING"), + /** */ + PENDING("PENDING"), + /** */ + FULL("FULL"), + /** */ + INTERESTING("INTERESTING"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum RedeemTypeEnum { + /** */ + MANUAL("MANUAL"), + /** */ + TRANS_DEMAND("TRANS_DEMAND"), + /** */ + AUTO("AUTO"); + + private final String value; + + RedeemTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RedeemTypeEnum fromValue(String value) { + for (RedeemTypeEnum b : RedeemTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum IncomeReleaseTypeEnum { + /** */ + DAILY("DAILY"), + /** */ + AFTER("AFTER"); + + private final String value; + + IncomeReleaseTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IncomeReleaseTypeEnum fromValue(String value) { + for (IncomeReleaseTypeEnum b : IncomeReleaseTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum NewUserOnlyEnum { + /** */ + _0(0), + /** */ + _1(1); + + private final Integer value; + + NewUserOnlyEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NewUserOnlyEnum fromValue(Integer value) { + for (NewUserOnlyEnum b : NewUserOnlyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetStakingProductsReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetStakingProductsReq.java new file mode 100644 index 00000000..f9143524 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetStakingProductsReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetStakingProductsReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetStakingProductsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetStakingProductsResp.java new file mode 100644 index 00000000..b927f9c6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetStakingProductsResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetStakingProductsResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetStakingProductsResp fromJson(List data) { + // original response + GetStakingProductsResp obj = new GetStakingProductsResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/PurchaseReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/PurchaseReq.java new file mode 100644 index 00000000..06c63d9c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/PurchaseReq.java @@ -0,0 +1,65 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class PurchaseReq implements Request { + /** Product ID */ + @JsonProperty("productId") + private String productId; + + /** Subscription amount */ + @JsonProperty("amount") + private String amount; + + /** MAIN (funding account), TRADE (spot trading account) */ + @JsonProperty("accountType") + private AccountTypeEnum accountType; + + public enum AccountTypeEnum { + /** */ + MAIN("MAIN"), + /** */ + TRADE("TRADE"); + + private final String value; + + AccountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AccountTypeEnum fromValue(String value) { + for (AccountTypeEnum b : AccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/PurchaseResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/PurchaseResp.java new file mode 100644 index 00000000..01add009 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/PurchaseResp.java @@ -0,0 +1,34 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class PurchaseResp implements Response> { + /** Holding ID */ + @JsonProperty("orderId") + private String orderId; + + /** Subscription order ID */ + @JsonProperty("orderTxId") + private String orderTxId; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/RedeemReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/RedeemReq.java new file mode 100644 index 00000000..47c9d9e5 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/RedeemReq.java @@ -0,0 +1,75 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class RedeemReq implements Request { + /** Holding ID */ + @JsonProperty("orderId") + private String orderId; + + /** Redemption amount */ + @JsonProperty("amount") + private String amount; + + /** + * Account type: MAIN (funding account), TRADE (spot trading account). This parameter is valid + * only when orderId=ETH2 + */ + @JsonProperty("fromAccountType") + private FromAccountTypeEnum fromAccountType; + + /** + * Confirmation field for early redemption penalty: 1 (confirm early redemption, and the current + * holding will be fully redeemed). This parameter is valid only for fixed-term products + */ + @JsonProperty("confirmPunishRedeem") + private String confirmPunishRedeem; + + public enum FromAccountTypeEnum { + /** */ + MAIN("MAIN"), + /** */ + TRADE("TRADE"); + + private final String value; + + FromAccountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FromAccountTypeEnum fromValue(String value) { + for (FromAccountTypeEnum b : FromAccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/RedeemResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/RedeemResp.java new file mode 100644 index 00000000..9c96a763 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/RedeemResp.java @@ -0,0 +1,77 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.earn.earn; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class RedeemResp implements Response> { + /** Redemption order ID */ + @JsonProperty("orderTxId") + private String orderTxId; + + /** Expected deliver time (milliseconds) */ + @JsonProperty("deliverTime") + private Long deliverTime; + + /** Redemption status: SUCCESS (successful), PENDING (redemption pending) */ + @JsonProperty("status") + private StatusEnum status; + + /** Redemption amount */ + @JsonProperty("amount") + private String amount; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum StatusEnum { + /** */ + SUCCESS("SUCCESS"), + /** */ + PENDING("PENDING"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApi.java new file mode 100644 index 00000000..d2dd6e9c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApi.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.fundingfees; + +public interface FundingFeesApi { + /** + * Get Current Funding Rate Get Current Funding Rate. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetCurrentFundingRateResp getCurrentFundingRate(GetCurrentFundingRateReq req); + + /** + * Get Public Funding History Query the funding rate at each settlement time point within a + * certain time range of the corresponding contract. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + GetPublicFundingHistoryResp getPublicFundingHistory(GetPublicFundingHistoryReq req); + + /** + * Get Private Funding History Submit request to get the funding history. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + GetPrivateFundingHistoryResp getPrivateFundingHistory(GetPrivateFundingHistoryReq req); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApi.template new file mode 100644 index 00000000..db51c248 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApi.template @@ -0,0 +1,70 @@ + + /** + * getCurrentFundingRate + * Get Current Funding Rate + * /api/v1/funding-rate/{symbol}/current + */ + public void testGetCurrentFundingRate() { + GetCurrentFundingRateReq.GetCurrentFundingRateReqBuilder builder = GetCurrentFundingRateReq.builder(); + builder.symbol(?); + GetCurrentFundingRateReq req = builder.build(); + GetCurrentFundingRateResp resp = this.api.getCurrentFundingRate(req); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->granularity); + self::assertNotNull($resp->timePoint); + self::assertNotNull($resp->value); + self::assertNotNull($resp->predictedValue); + self::assertNotNull($resp->fundingRateCap); + self::assertNotNull($resp->fundingRateFloor); + self::assertNotNull($resp->period); + self::assertNotNull($resp->fundingTime); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getPublicFundingHistory + * Get Public Funding History + * /api/v1/contract/funding-rates + */ + public void testGetPublicFundingHistory() { + GetPublicFundingHistoryReq.GetPublicFundingHistoryReqBuilder builder = GetPublicFundingHistoryReq.builder(); + builder.symbol(?).from(?).to(?); + GetPublicFundingHistoryReq req = builder.build(); + GetPublicFundingHistoryResp resp = this.api.getPublicFundingHistory(req); + foreach($resp->data as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->fundingRate); + self::assertNotNull($item->timepoint); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getPrivateFundingHistory + * Get Private Funding History + * /api/v1/funding-history + */ + public void testGetPrivateFundingHistory() { + GetPrivateFundingHistoryReq.GetPrivateFundingHistoryReqBuilder builder = GetPrivateFundingHistoryReq.builder(); + builder.symbol(?).startAt(?).endAt(?).reverse(?).offset(?).forward(?).maxCount(?); + GetPrivateFundingHistoryReq req = builder.build(); + GetPrivateFundingHistoryResp resp = this.api.getPrivateFundingHistory(req); + foreach($resp->dataList as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->symbol); + self::assertNotNull($item->timePoint); + self::assertNotNull($item->fundingRate); + self::assertNotNull($item->markPrice); + self::assertNotNull($item->positionQty); + self::assertNotNull($item->positionCost); + self::assertNotNull($item->funding); + self::assertNotNull($item->settleCurrency); + self::assertNotNull($item->context); + self::assertNotNull($item->marginMode); + } + + self::assertNotNull($resp->hasMore); + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApiAutoGeneratedTest.java new file mode 100644 index 00000000..daec1d88 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApiAutoGeneratedTest.java @@ -0,0 +1,500 @@ +package com.kucoin.universal.sdk.generate.futures.fundingfees; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class FundingFeesApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** + * getCurrentFundingRate Request Get Current Funding Rate /api/v1/funding-rate/{symbol}/current + */ + public static void testGetCurrentFundingRateRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\"}"; + GetCurrentFundingRateReq obj = mapper.readValue(data, GetCurrentFundingRateReq.class); + } + + /** + * getCurrentFundingRate Response Get Current Funding Rate /api/v1/funding-rate/{symbol}/current + */ + public static void testGetCurrentFundingRateResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbol\": \".XBTUSDTMFPI8H\",\n" + + " \"granularity\": 28800000,\n" + + " \"timePoint\": 1748462400000,\n" + + " \"value\": 6.1E-5,\n" + + " \"predictedValue\": 1.09E-4,\n" + + " \"fundingRateCap\": 0.003,\n" + + " \"fundingRateFloor\": -0.003,\n" + + " \"period\": 0,\n" + + " \"fundingTime\": 1748491200000\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getPublicFundingHistory Request Get Public Funding History /api/v1/contract/funding-rates */ + public static void testGetPublicFundingHistoryRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\", \"from\": 1700310700000, \"to\": 1702310700000}"; + GetPublicFundingHistoryReq obj = mapper.readValue(data, GetPublicFundingHistoryReq.class); + } + + /** getPublicFundingHistory Response Get Public Funding History /api/v1/contract/funding-rates */ + public static void testGetPublicFundingHistoryResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 2.1E-4,\n" + + " \"timepoint\": 1702296000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 3.47E-4,\n" + + " \"timepoint\": 1702267200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.52E-4,\n" + + " \"timepoint\": 1702238400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 5.13E-4,\n" + + " \"timepoint\": 1702209600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.21E-4,\n" + + " \"timepoint\": 1702180800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 5.06E-4,\n" + + " \"timepoint\": 1702152000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 7.68E-4,\n" + + " \"timepoint\": 1702123200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.82E-4,\n" + + " \"timepoint\": 1702094400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.0E-4,\n" + + " \"timepoint\": 1702065600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 5.46E-4,\n" + + " \"timepoint\": 1702036800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 7.97E-4,\n" + + " \"timepoint\": 1702008000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 5.76E-4,\n" + + " \"timepoint\": 1701979200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.22E-4,\n" + + " \"timepoint\": 1701950400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 3.92E-4,\n" + + " \"timepoint\": 1701921600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.1E-4,\n" + + " \"timepoint\": 1701892800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.48E-4,\n" + + " \"timepoint\": 1701864000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 3.68E-4,\n" + + " \"timepoint\": 1701835200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 3.51E-4,\n" + + " \"timepoint\": 1701806400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.44E-4,\n" + + " \"timepoint\": 1701777600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.25E-4,\n" + + " \"timepoint\": 1701748800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": -8.2E-5,\n" + + " \"timepoint\": 1701720000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.64E-4,\n" + + " \"timepoint\": 1701691200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.14E-4,\n" + + " \"timepoint\": 1701662400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 2.44E-4,\n" + + " \"timepoint\": 1701633600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.99E-4,\n" + + " \"timepoint\": 1701604800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.79E-4,\n" + + " \"timepoint\": 1701576000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 8.7E-5,\n" + + " \"timepoint\": 1701547200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.6E-5,\n" + + " \"timepoint\": 1701518400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": -3.7E-5,\n" + + " \"timepoint\": 1701489600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.5E-5,\n" + + " \"timepoint\": 1701460800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 6.8E-5,\n" + + " \"timepoint\": 1701432000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 7.2E-5,\n" + + " \"timepoint\": 1701403200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.45E-4,\n" + + " \"timepoint\": 1701374400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.41E-4,\n" + + " \"timepoint\": 1701345600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 9.4E-5,\n" + + " \"timepoint\": 1701316800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.08E-4,\n" + + " \"timepoint\": 1701288000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 7.6E-5,\n" + + " \"timepoint\": 1701259200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.0E-5,\n" + + " \"timepoint\": 1701230400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.0E-5,\n" + + " \"timepoint\": 1701201600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.16E-4,\n" + + " \"timepoint\": 1701172800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 2.04E-4,\n" + + " \"timepoint\": 1701144000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 2.3E-4,\n" + + " \"timepoint\": 1701115200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 6.2E-5,\n" + + " \"timepoint\": 1701086400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.33E-4,\n" + + " \"timepoint\": 1701057600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 8.0E-5,\n" + + " \"timepoint\": 1701028800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.11E-4,\n" + + " \"timepoint\": 1701000000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 7.4E-5,\n" + + " \"timepoint\": 1700971200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.01E-4,\n" + + " \"timepoint\": 1700942400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 3.9E-5,\n" + + " \"timepoint\": 1700913600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.1E-5,\n" + + " \"timepoint\": 1700884800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 3.0E-6,\n" + + " \"timepoint\": 1700856000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.03E-4,\n" + + " \"timepoint\": 1700827200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 3.0E-6,\n" + + " \"timepoint\": 1700798400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 6.7E-5,\n" + + " \"timepoint\": 1700769600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.47E-4,\n" + + " \"timepoint\": 1700740800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 7.8E-5,\n" + + " \"timepoint\": 1700712000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.39E-4,\n" + + " \"timepoint\": 1700683200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 7.5E-5,\n" + + " \"timepoint\": 1700654400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.11E-4,\n" + + " \"timepoint\": 1700625600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 9.8E-5,\n" + + " \"timepoint\": 1700596800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.18E-4,\n" + + " \"timepoint\": 1700568000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.16E-4,\n" + + " \"timepoint\": 1700539200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.6E-4,\n" + + " \"timepoint\": 1700510400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.92E-4,\n" + + " \"timepoint\": 1700481600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.13E-4,\n" + + " \"timepoint\": 1700452800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 2.47E-4,\n" + + " \"timepoint\": 1700424000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 2.3E-4,\n" + + " \"timepoint\": 1700395200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 2.63E-4,\n" + + " \"timepoint\": 1700366400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.32E-4,\n" + + " \"timepoint\": 1700337600000\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getPrivateFundingHistory Request Get Private Funding History /api/v1/funding-history */ + public static void testGetPrivateFundingHistoryRequest() throws Exception { + String data = + "{\"symbol\": \"XBTUSDTM\", \"startAt\": 1700310700000, \"endAt\": 1702310700000," + + " \"reverse\": true, \"offset\": 123456, \"forward\": true, \"maxCount\": 123456}"; + GetPrivateFundingHistoryReq obj = mapper.readValue(data, GetPrivateFundingHistoryReq.class); + } + + /** getPrivateFundingHistory Response Get Private Funding History /api/v1/funding-history */ + public static void testGetPrivateFundingHistoryResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"dataList\": [\n" + + " {\n" + + " \"id\": 1472387374042586,\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"timePoint\": 1731470400000,\n" + + " \"fundingRate\": 6.41E-4,\n" + + " \"markPrice\": 87139.92,\n" + + " \"positionQty\": 1,\n" + + " \"positionCost\": 87.13992,\n" + + " \"funding\": -0.05585669,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"context\": \"{\\\"marginMode\\\": \\\"ISOLATED\\\"," + + " \\\"positionSide\\\": \\\"BOTH\\\"}\",\n" + + " \"marginMode\": \"ISOLATED\"\n" + + " }\n" + + " ],\n" + + " \"hasMore\": true\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run( + FundingFeesApiAutoGeneratedTest::testGetCurrentFundingRateRequest, + "testGetCurrentFundingRateRequest"); + run( + FundingFeesApiAutoGeneratedTest::testGetCurrentFundingRateResponse, + "testGetCurrentFundingRateResponse"); + run( + FundingFeesApiAutoGeneratedTest::testGetPublicFundingHistoryRequest, + "testGetPublicFundingHistoryRequest"); + run( + FundingFeesApiAutoGeneratedTest::testGetPublicFundingHistoryResponse, + "testGetPublicFundingHistoryResponse"); + run( + FundingFeesApiAutoGeneratedTest::testGetPrivateFundingHistoryRequest, + "testGetPrivateFundingHistoryRequest"); + run( + FundingFeesApiAutoGeneratedTest::testGetPrivateFundingHistoryResponse, + "testGetPrivateFundingHistoryResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApiImpl.java new file mode 100644 index 00000000..876d4044 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApiImpl.java @@ -0,0 +1,46 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.fundingfees; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class FundingFeesApiImpl implements FundingFeesApi { + private final Transport transport; + + public FundingFeesApiImpl(Transport transport) { + this.transport = transport; + } + + public GetCurrentFundingRateResp getCurrentFundingRate(GetCurrentFundingRateReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/funding-rate/{symbol}/current", + req, + GetCurrentFundingRateResp.class, + false); + } + + public GetPublicFundingHistoryResp getPublicFundingHistory(GetPublicFundingHistoryReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/contract/funding-rates", + req, + GetPublicFundingHistoryResp.class, + false); + } + + public GetPrivateFundingHistoryResp getPrivateFundingHistory(GetPrivateFundingHistoryReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/funding-history", + req, + GetPrivateFundingHistoryResp.class, + false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetCurrentFundingRateReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetCurrentFundingRateReq.java new file mode 100644 index 00000000..484ce083 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetCurrentFundingRateReq.java @@ -0,0 +1,29 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.fundingfees; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCurrentFundingRateReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonIgnore + @PathVar("symbol") + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetCurrentFundingRateResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetCurrentFundingRateResp.java new file mode 100644 index 00000000..690831f8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetCurrentFundingRateResp.java @@ -0,0 +1,108 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.fundingfees; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCurrentFundingRateResp + implements Response> { + /** Funding Rate Symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Granularity (milliseconds) */ + @JsonProperty("granularity") + private Integer granularity; + + /** + * The funding rate settlement time point of the previous cycle (milliseconds) Before going live, + * the system will pre-generate the first funding rate record to ensure the billing cycle can + * start immediately after the contract is launched. The timePoint field represents the time the + * funding rate data was generated, not the actual time it takes effect or is settled. The first + * actual settlement will occur at the designated settlement time (00:00 / 08:00 / 14:00) after + * the contract goes live. + */ + @JsonProperty("timePoint") + private Long timePoint; + + /** Current cycle funding rate */ + @JsonProperty("value") + private Double value; + + /** Predicted funding rate */ + @JsonProperty("predictedValue") + private Double predictedValue; + + /** Maximum Funding Rate */ + @JsonProperty("fundingRateCap") + private Double fundingRateCap; + + /** Minimum Funding Rate */ + @JsonProperty("fundingRateFloor") + private Double fundingRateFloor; + + /** Indicates whether the current funding fee is charged within this cycle */ + @JsonProperty("period") + private PeriodEnum period; + + /** + * Indicates the next funding fee settlement time point, which can be used to synchronize periodic + * settlement timing. + */ + @JsonProperty("fundingTime") + private Long fundingTime; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum PeriodEnum { + /** Indicates that funding will be charged in the current cycle */ + _1(1), + /** Indicates a cross-cycle expense record that is not charged in the current cycle. */ + _0(0); + + private final Integer value; + + PeriodEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PeriodEnum fromValue(Integer value) { + for (PeriodEnum b : PeriodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPrivateFundingHistoryDataList.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPrivateFundingHistoryDataList.java new file mode 100644 index 00000000..013caa5d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPrivateFundingHistoryDataList.java @@ -0,0 +1,100 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.fundingfees; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPrivateFundingHistoryDataList { + /** ID */ + @JsonProperty("id") + private Long id; + + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Time point (milliseconds) */ + @JsonProperty("timePoint") + private Long timePoint; + + /** Funding rate */ + @JsonProperty("fundingRate") + private Double fundingRate; + + /** Mark price */ + @JsonProperty("markPrice") + private Double markPrice; + + /** Position size */ + @JsonProperty("positionQty") + private Integer positionQty; + + /** Position value at settlement period */ + @JsonProperty("positionCost") + private Double positionCost; + + /** + * Settled funding fees A positive number means that the user received the funding fee, and vice + * versa. + */ + @JsonProperty("funding") + private Double funding; + + /** Settlement currency */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** Context */ + @JsonProperty("context") + private String context; + + /** Margin mode: ISOLATED (isolated), CROSS (cross margin). */ + @JsonProperty("marginMode") + private MarginModeEnum marginMode; + + public enum MarginModeEnum { + /** isolated margin */ + ISOLATED("ISOLATED"), + /** cross margin */ + CROSS("CROSS"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPrivateFundingHistoryReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPrivateFundingHistoryReq.java new file mode 100644 index 00000000..22b265de --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPrivateFundingHistoryReq.java @@ -0,0 +1,58 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.fundingfees; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPrivateFundingHistoryReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Begin time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + /** + * 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. + */ + @JsonProperty("reverse") + private Boolean reverse; + + /** + * 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. + */ + @JsonProperty("offset") + private Integer offset; + + /** + * 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. + */ + @JsonProperty("forward") + private Boolean forward; + + /** Max. record count. The default record count is 10 */ + @JsonProperty("maxCount") + private Integer maxCount; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPrivateFundingHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPrivateFundingHistoryResp.java new file mode 100644 index 00000000..c570a9dd --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPrivateFundingHistoryResp.java @@ -0,0 +1,37 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.fundingfees; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPrivateFundingHistoryResp + implements Response> { + /** */ + @JsonProperty("dataList") + private List dataList = new ArrayList<>(); + + /** Whether there are more pages */ + @JsonProperty("hasMore") + private Boolean hasMore; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPublicFundingHistoryData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPublicFundingHistoryData.java new file mode 100644 index 00000000..8053ee04 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPublicFundingHistoryData.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.fundingfees; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPublicFundingHistoryData { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Funding rate */ + @JsonProperty("fundingRate") + private Double fundingRate; + + /** Time point (milliseconds) */ + @JsonProperty("timepoint") + private Long timepoint; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPublicFundingHistoryReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPublicFundingHistoryReq.java new file mode 100644 index 00000000..c144d7d1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPublicFundingHistoryReq.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.fundingfees; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPublicFundingHistoryReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Begin time (milliseconds) */ + @JsonProperty("from") + private Long from; + + /** End time (milliseconds) */ + @JsonProperty("to") + private Long to; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPublicFundingHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPublicFundingHistoryResp.java new file mode 100644 index 00000000..c81d8425 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPublicFundingHistoryResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.fundingfees; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPublicFundingHistoryResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetPublicFundingHistoryResp fromJson(List data) { + // original response + GetPublicFundingHistoryResp obj = new GetPublicFundingHistoryResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllOrderEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllOrderEvent.java new file mode 100644 index 00000000..584313c0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllOrderEvent.java @@ -0,0 +1,419 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futuresprivate; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AllOrderEvent implements Response> { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-221752070) + */ + @JsonProperty("symbol") + private String symbol; + + /** User-specified order type */ + @JsonProperty("orderType") + private OrderTypeEnum orderType; + + /** buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** Cumulative number of cancellations */ + @JsonProperty("canceledSize") + private String canceledSize; + + /** The unique order id generated by the trading system */ + @JsonProperty("orderId") + private String orderId; + + /** Margin Mode */ + @JsonProperty("marginMode") + private MarginModeEnum marginMode; + + /** Order Type */ + @JsonProperty("type") + private TypeEnum type; + + /** Gateway received the message time (milliseconds) */ + @JsonProperty("orderTime") + private Long orderTime; + + /** User-specified order size */ + @JsonProperty("size") + private String size; + + /** Cumulative number filled */ + @JsonProperty("filledSize") + private String filledSize; + + /** Price */ + @JsonProperty("price") + private String price; + + /** Remain size */ + @JsonProperty("remainSize") + private String remainSize; + + /** Order Status */ + @JsonProperty("status") + private StatusEnum status; + + /** Match engine received the message time (nanoseconds) */ + @JsonProperty("ts") + private Long ts; + + /** + * 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** + */ + @JsonProperty("liquidity") + private LiquidityEnum liquidity; + + /** Actual Fee Type */ + @JsonProperty("feeType") + private FeeTypeEnum feeType; + + /** Match Price (when the type is \"match\") */ + @JsonProperty("matchPrice") + private String matchPrice; + + /** Match Size (when the type is \"match\") */ + @JsonProperty("matchSize") + private String matchSize; + + /** Trade ID: Generated by Matching engine. */ + @JsonProperty("tradeId") + private String tradeId; + + /** The size before order update */ + @JsonProperty("oldSize") + private String oldSize; + + /** Client Order ID: The ClientOid field is a unique ID created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** normal order or liquid order */ + @JsonProperty("tradeType") + private TradeTypeEnum tradeType; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, AllOrderEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } + + public enum OrderTypeEnum { + /** limit */ + LIMIT("limit"), + /** market */ + MARKET("market"); + + private final String value; + + OrderTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OrderTypeEnum fromValue(String value) { + for (OrderTypeEnum b : OrderTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** buy */ + BUY("buy"), + /** sell */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum MarginModeEnum { + /** Isolated Margin */ + ISOLATED("ISOLATED"), + /** Cross Margin */ + CROSS("CROSS"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** 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. + */ + 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 */ + CANCELED("canceled"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StatusEnum { + /** the order is in the order book (maker order) */ + OPEN("open"), + /** + * when taker order executes with orders in the order book, the taker order status is “match” + */ + MATCH("match"), + /** the order is fully executed successfully */ + DONE("done"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum LiquidityEnum { + /** taker */ + TAKER("taker"), + /** maker */ + MAKER("maker"); + + private final String value; + + LiquidityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LiquidityEnum fromValue(String value) { + for (LiquidityEnum b : LiquidityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum FeeTypeEnum { + /** takerFee */ + TAKERFEE("takerFee"), + /** makerFee */ + MAKERFEE("makerFee"); + + private final String value; + + FeeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FeeTypeEnum fromValue(String value) { + for (FeeTypeEnum b : FeeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TradeTypeEnum { + /** Normal trade order */ + TRADE("trade"), + /** Liquid order; all other types with the exception of type=update will be pushed */ + LIQUID("liquid"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllPositionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllPositionEvent.java new file mode 100644 index 00000000..75a4ebac --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllPositionEvent.java @@ -0,0 +1,306 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futuresprivate; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AllPositionEvent implements Response> { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-221752070) + */ + @JsonProperty("symbol") + private String symbol; + + /** Whether it is cross margin. */ + @JsonProperty("crossMode") + private Boolean crossMode; + + /** ADL ranking percentile */ + @JsonProperty("delevPercentage") + private Double delevPercentage; + + /** Open time */ + @JsonProperty("openingTimestamp") + private Long openingTimestamp; + + /** Current timestamp */ + @JsonProperty("currentTimestamp") + private Long currentTimestamp; + + /** Current position quantity */ + @JsonProperty("currentQty") + private Integer currentQty; + + /** Current position value */ + @JsonProperty("currentCost") + private Double currentCost; + + /** Current commission */ + @JsonProperty("currentComm") + private Double currentComm; + + /** Unrealized value */ + @JsonProperty("unrealisedCost") + private Double unrealisedCost; + + /** Accumulated realized gross profit value */ + @JsonProperty("realisedGrossCost") + private Double realisedGrossCost; + + /** Current realized position value */ + @JsonProperty("realisedCost") + private Double realisedCost; + + /** Opened position or not */ + @JsonProperty("isOpen") + private Boolean isOpen; + + /** Mark price */ + @JsonProperty("markPrice") + private Double markPrice; + + /** Mark Value */ + @JsonProperty("markValue") + private Double markValue; + + /** Position value */ + @JsonProperty("posCost") + private Double posCost; + + /** + * Inital margin Cross = opening value/cross leverage; isolated = accumulation of initial margin + * for each transaction + */ + @JsonProperty("posInit") + private Double posInit; + + /** + * Bankruptcy cost Cross = mark value * imr; Isolated = position margin (accumulation of initial + * margin, additional margin, generated funding fees, etc.) + */ + @JsonProperty("posMargin") + private Double posMargin; + + /** Accumulated realized gross profit value */ + @JsonProperty("realisedGrossPnl") + private Double realisedGrossPnl; + + /** Realized profit and loss */ + @JsonProperty("realisedPnl") + private Double realisedPnl; + + /** Unrealized profit and loss */ + @JsonProperty("unrealisedPnl") + private Double unrealisedPnl; + + /** Profit-loss ratio of the position */ + @JsonProperty("unrealisedPnlPcnt") + private Double unrealisedPnlPcnt; + + /** Rate of return on investment */ + @JsonProperty("unrealisedRoePcnt") + private Double unrealisedRoePcnt; + + /** Average entry price */ + @JsonProperty("avgEntryPrice") + private Double avgEntryPrice; + + /** + * Liquidation price: For Cross Margin, you can refer to the liquidationPrice, and the liquidation + * is based on the risk rate. + */ + @JsonProperty("liquidationPrice") + private Double liquidationPrice; + + /** + * Bankruptcy price: For Cross Margin, you can refer to the bankruptPrice, and the liquidation is + * based on the risk rate. + */ + @JsonProperty("bankruptPrice") + private Double bankruptPrice; + + /** Currency used to clear and settle the trades */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** Margin Mode: CROSS, ISOLATED */ + @JsonProperty("marginMode") + private MarginModeEnum marginMode; + + /** Position Side */ + @JsonProperty("positionSide") + private PositionSideEnum positionSide; + + /** Leverage */ + @JsonProperty("leverage") + private Double leverage; + + /** Auto deposit margin or not **Only applicable to Isolated Margin** */ + @JsonProperty("autoDeposit") + private Boolean autoDeposit; + + /** Maintenance margin requirement */ + @JsonProperty("maintMarginReq") + private Double maintMarginReq; + + /** Risk limit **Only applicable to Isolated Margin** */ + @JsonProperty("riskLimit") + private Integer riskLimit; + + /** Leverage of the order **Only applicable to Isolated Margin** */ + @JsonProperty("realLeverage") + private Double realLeverage; + + /** Added margin **Only applicable to Isolated Margin** */ + @JsonProperty("posCross") + private Double posCross; + + /** Bankruptcy cost **Only applicable to Isolated Margin** */ + @JsonProperty("posComm") + private Double posComm; + + /** Funding fees paid out **Only applicable to Isolated Margin** */ + @JsonProperty("posLoss") + private Double posLoss; + + /** + * The current remaining unsettled funding fee for the position **Only applicable to Isolated + * Margin** + */ + @JsonProperty("posFunding") + private Double posFunding; + + /** Maintenance margin */ + @JsonProperty("posMaint") + private Double posMaint; + + /** Position margin **Only applicable to Isolated Margin** */ + @JsonProperty("maintMargin") + private Double maintMargin; + + /** Funding time */ + @JsonProperty("fundingTime") + private Long fundingTime; + + /** Position size */ + @JsonProperty("qty") + private Integer qty; + + /** Funding rate */ + @JsonProperty("fundingRate") + private Double fundingRate; + + /** Funding fees */ + @JsonProperty("fundingFee") + private Double fundingFee; + + /** Funding Fee Settlement Time (nanoseconds) */ + @JsonProperty("ts") + private Long ts; + + /** Adjustment isolated margin risk limit level successful or not */ + @JsonProperty("success") + private Boolean success; + + /** Adjustment isolated margin risk limit level failure reason */ + @JsonProperty("msg") + private String msg; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, AllPositionEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } + + public enum MarginModeEnum { + /** cross margin */ + CROSS("CROSS"), + /** isolated margin */ + ISOLATED("ISOLATED"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum PositionSideEnum { + /** One-way position */ + BOTH("BOTH"); + + private final String value; + + PositionSideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PositionSideEnum fromValue(String value) { + for (PositionSideEnum b : PositionSideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/BalanceEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/BalanceEvent.java new file mode 100644 index 00000000..acad3755 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/BalanceEvent.java @@ -0,0 +1,102 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futuresprivate; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BalanceEvent implements Response> { + /** Margin of the cross margin position */ + @JsonProperty("crossPosMargin") + private String crossPosMargin; + + /** Margin of the isolated margin order */ + @JsonProperty("isolatedOrderMargin") + private String isolatedOrderMargin; + + /** Frozen Balance */ + @JsonProperty("holdBalance") + private String holdBalance; + + /** Equity */ + @JsonProperty("equity") + private String equity; + + /** + * Version. When holding a cross margin position, the available balance may change with + * fluctuations in the mark price, leading to discrepancies in the available balance for the same + * version number. + */ + @JsonProperty("version") + private String version; + + /** Available Balance */ + @JsonProperty("availableBalance") + private String availableBalance; + + /** Margin of the isolated margin position, including isolated margin funding fees */ + @JsonProperty("isolatedPosMargin") + private String isolatedPosMargin; + + /** Wallet Balance */ + @JsonProperty("walletBalance") + private String walletBalance; + + /** Isolated margin funding fee */ + @JsonProperty("isolatedFundingFeeMargin") + private String isolatedFundingFeeMargin; + + /** Unrealized PNL in cross margin mode */ + @JsonProperty("crossUnPnl") + private String crossUnPnl; + + /** Total margin under cross margin mode */ + @JsonProperty("totalCrossMargin") + private String totalCrossMargin; + + /** Currency Symbol */ + @JsonProperty("currency") + private String currency; + + /** Unrealized PNL in isolated margin mode */ + @JsonProperty("isolatedUnPnl") + private String isolatedUnPnl; + + /** Margin of the cross margin order */ + @JsonProperty("crossOrderMargin") + private String crossOrderMargin; + + /** Last modified time */ + @JsonProperty("timestamp") + private String timestamp; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, BalanceEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageDataValue.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageDataValue.java new file mode 100644 index 00000000..5be2edd2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageDataValue.java @@ -0,0 +1,19 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futuresprivate; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +class CrossLeverageDataValue { + /** */ + @JsonProperty("leverage") + private String leverage; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageEvent.java new file mode 100644 index 00000000..6e46885d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageEvent.java @@ -0,0 +1,54 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futuresprivate; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.HashMap; +import java.util.Map; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CrossLeverageEvent + implements Response> { + /** */ + @JsonProperty("data") + private Map data = new HashMap<>(); + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @JsonCreator + public static CrossLeverageEvent fromJson(Map data) { + // original response + CrossLeverageEvent obj = new CrossLeverageEvent(); + obj.data = data; + return obj; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, CrossLeverageEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWs.java new file mode 100644 index 00000000..0975da84 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWs.java @@ -0,0 +1,57 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futuresprivate; + +public interface FuturesPrivateWs { + + /** All Order change pushes. Push order changes for all symbol push frequency: real-time */ + public String allOrder(AllOrderEvent.Callback callback); + + /** + * All symbol position change events push Subscribe to this topic to get real-time pushes on all + * symbols’ position change events push frequency: real-time + */ + public String allPosition(AllPositionEvent.Callback callback); + + /** + * the balance change push Subscribe to this topic to get real-time balance change pushes push + * frequency: real-time + */ + public String balance(BalanceEvent.Callback callback); + + /** + * the leverage change push Subscribe to this topic to get real-time pushes on leverage changes of + * contracts that are in cross margin mode push frequency: real-time + */ + public String crossLeverage(CrossLeverageEvent.Callback callback); + + /** + * the margin mode change Subscribe to this topic to get real-time pushes on symbols’ margin mode + * change events push frequency: real-time + */ + public String marginMode(MarginModeEvent.Callback callback); + + /** Order change pushes. Push order changes for the specified symbol push frequency: real-time */ + public String order(String symbol, OrderEvent.Callback callback); + + /** + * the position change events push Subscribe this topic to get real-time pushes on symbols’ + * position change events push frequency: real-time + */ + public String position(String symbol, PositionEvent.Callback callback); + + /** + * stop order change pushes. Subscribe to this topic to get real-time pushes on stop order + * changes. push frequency: real-time + */ + public String stopOrders(StopOrdersEvent.Callback callback); + + /** Unsubscribe from topics */ + public void unSubscribe(String id); + + /** Start websocket */ + public void start(); + + /** Stop websocket */ + public void stop(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsAutoGeneratedTest.java new file mode 100644 index 00000000..6141e585 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsAutoGeneratedTest.java @@ -0,0 +1,123 @@ +package com.kucoin.universal.sdk.generate.futures.futuresprivate; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.ArrayList; +import java.util.List; + +class FuturesPrivateWsAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** allOrder All Order change pushes. /allOrder/contractMarket/tradeOrders */ + public static void testAllOrderResponse() throws Exception { + String data = + "{\"topic\":\"/contractMarket/tradeOrders:XBTUSDTM\",\"type\":\"message\",\"subject\":\"symbolOrderChange\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"symbol\":\"XBTUSDTM\",\"side\":\"buy\",\"canceledSize\":\"0\",\"orderId\":\"247899236673269761\",\"liquidity\":\"maker\",\"marginMode\":\"ISOLATED\",\"type\":\"open\",\"orderTime\":1731916985768138917,\"size\":\"1\",\"filledSize\":\"0\",\"price\":\"91670\",\"remainSize\":\"1\",\"status\":\"open\",\"ts\":1731916985789000000}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** allPosition All symbol position change events push /allPosition/contract/positionAll */ + public static void testAllPositionResponse() throws Exception { + String data = + "{\"topic\":\"/contract/position:XBTUSDTM\",\"type\":\"message\",\"data\":{\"symbol\":\"XBTUSDTM\",\"maintMarginReq\":0.005,\"riskLimit\":500000,\"realLeverage\":4.9685590767,\"crossMode\":false,\"delevPercentage\":0.10,\"openingTimestamp\":1731916913097,\"autoDeposit\":true,\"currentTimestamp\":1731924561514,\"currentQty\":1,\"currentCost\":91.5306,\"currentComm\":0.09179284,\"unrealisedCost\":91.6945,\"realisedCost\":-0.07210716,\"isOpen\":true,\"markPrice\":91839.79,\"markValue\":91.83979,\"posCost\":91.6945,\"posCross\":0,\"posInit\":18.3389,\"posComm\":0.06602004,\"posLoss\":0,\"posMargin\":18.40492004,\"posFunding\":0,\"posMaint\":0.5634627025,\"maintMargin\":18.55021004,\"avgEntryPrice\":91694.5,\"liquidationPrice\":73853.0426625,\"bankruptPrice\":73355.6,\"settleCurrency\":\"USDT\",\"changeReason\":\"positionChange\",\"riskLimitLevel\":2,\"realisedGrossCost\":-0.1639,\"realisedGrossPnl\":0.1639,\"realisedPnl\":0.07210716,\"unrealisedPnl\":0.14529,\"unrealisedPnlPcnt\":0.0016,\"unrealisedRoePcnt\":0.0079,\"leverage\":4.9685590767,\"marginMode\":\"ISOLATED\",\"positionSide\":\"BOTH\"},\"subject\":\"position.change\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\"}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** balance the balance change push /balance/contractAccount/wallet */ + public static void testBalanceResponse() throws Exception { + String data = + "{\"topic\":\"/contractAccount/wallet\",\"type\":\"message\",\"subject\":\"walletBalance.change\",\"id\":\"673b0bb925b4bc0001fadfef\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"crossPosMargin\":\"0\",\"isolatedOrderMargin\":\"18.1188\",\"holdBalance\":\"0\",\"equity\":\"81.273621258\",\"version\":\"1337\",\"availableBalance\":\"26.144281178\",\"isolatedPosMargin\":\"36.80984008\",\"walletBalance\":\"81.072921258\",\"isolatedFundingFeeMargin\":\"0\",\"crossUnPnl\":\"0\",\"totalCrossMargin\":\"26.144281178\",\"currency\":\"USDT\",\"isolatedUnPnl\":\"0.2007\",\"crossOrderMargin\":\"0\",\"timestamp\":\"1731916996764\"}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** crossLeverage the leverage change push /crossLeverage/contract/crossLeverage */ + public static void testCrossLeverageResponse() throws Exception { + String data = + "{\"topic\":\"/contract/crossLeverage\",\"type\":\"message\",\"data\":{\"ETHUSDTM\":{\"leverage\":\"8\"}},\"subject\":\"user.config\",\"userId\":\"66f12e8befb04d0001882b49\",\"channelType\":\"private\"}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** marginMode the margin mode change /marginMode/contract/marginMode */ + public static void testMarginModeResponse() throws Exception { + String data = + "{\"topic\":\"/contract/marginMode\",\"type\":\"message\",\"data\":{\"ETHUSDTM\":\"ISOLATED\"},\"subject\":\"user.config\",\"userId\":\"66f12e8befb04d0001882b49\",\"channelType\":\"private\"}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** order Order change pushes. /order/contractMarket/tradeOrders:_symbol_ */ + public static void testOrderResponse() throws Exception { + String data = + "{\"topic\":\"/contractMarket/tradeOrders:XBTUSDTM\",\"type\":\"message\",\"subject\":\"symbolOrderChange\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"symbol\":\"XBTUSDTM\",\"side\":\"buy\",\"canceledSize\":\"0\",\"orderId\":\"247899236673269761\",\"liquidity\":\"maker\",\"marginMode\":\"ISOLATED\",\"type\":\"open\",\"orderTime\":1731916985768138917,\"size\":\"1\",\"filledSize\":\"0\",\"price\":\"91670\",\"remainSize\":\"1\",\"status\":\"open\",\"ts\":1731916985789000000}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** position the position change events push /position/contract/position:_symbol_ */ + public static void testPositionResponse() throws Exception { + String data = + "{\"topic\":\"/contract/position:XBTUSDTM\",\"type\":\"message\",\"data\":{\"symbol\":\"XBTUSDTM\",\"maintMarginReq\":0.005,\"riskLimit\":500000,\"realLeverage\":4.9685590767,\"crossMode\":false,\"delevPercentage\":0.10,\"openingTimestamp\":1731916913097,\"autoDeposit\":true,\"currentTimestamp\":1731924561514,\"currentQty\":1,\"currentCost\":91.5306,\"currentComm\":0.09179284,\"unrealisedCost\":91.6945,\"realisedCost\":-0.07210716,\"isOpen\":true,\"markPrice\":91839.79,\"markValue\":91.83979,\"posCost\":91.6945,\"posCross\":0,\"posInit\":18.3389,\"posComm\":0.06602004,\"posLoss\":0,\"posMargin\":18.40492004,\"posFunding\":0,\"posMaint\":0.5634627025,\"maintMargin\":18.55021004,\"avgEntryPrice\":91694.5,\"liquidationPrice\":73853.0426625,\"bankruptPrice\":73355.6,\"settleCurrency\":\"USDT\",\"changeReason\":\"positionChange\",\"riskLimitLevel\":2,\"realisedGrossCost\":-0.1639,\"realisedGrossPnl\":0.1639,\"realisedPnl\":0.07210716,\"unrealisedPnl\":0.14529,\"unrealisedPnlPcnt\":0.0016,\"unrealisedRoePcnt\":0.0079,\"leverage\":4.9685590767,\"marginMode\":\"ISOLATED\",\"positionSide\":\"BOTH\"},\"subject\":\"position.change\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\"}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** stopOrders stop order change pushes. /stopOrders/contractMarket/advancedOrders */ + public static void testStopOrdersResponse() throws Exception { + String data = + "{\"topic\":\"/contractMarket/advancedOrders\",\"type\":\"message\",\"data\":{\"createdAt\":1730194206837,\"marginMode\":\"ISOLATED\",\"orderId\":\"240673378116083712\",\"orderPrice\":\"0.1\",\"orderType\":\"stop\",\"side\":\"buy\",\"size\":1,\"stop\":\"down\",\"stopPrice\":\"1000\",\"stopPriceType\":\"TP\",\"symbol\":\"XBTUSDTM\",\"ts\":1730194206843133000,\"type\":\"open\"},\"subject\":\"stopOrder\",\"id\":\"6720ab1ea52a9b0001734392\",\"userId\":\"66f12e8befb04d0001882b49\",\"channelType\":\"private\"}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(FuturesPrivateWsAutoGeneratedTest::testAllOrderResponse, "testAllOrderResponse"); + run(FuturesPrivateWsAutoGeneratedTest::testAllPositionResponse, "testAllPositionResponse"); + run(FuturesPrivateWsAutoGeneratedTest::testBalanceResponse, "testBalanceResponse"); + run(FuturesPrivateWsAutoGeneratedTest::testCrossLeverageResponse, "testCrossLeverageResponse"); + run(FuturesPrivateWsAutoGeneratedTest::testMarginModeResponse, "testMarginModeResponse"); + run(FuturesPrivateWsAutoGeneratedTest::testOrderResponse, "testOrderResponse"); + run(FuturesPrivateWsAutoGeneratedTest::testPositionResponse, "testPositionResponse"); + run(FuturesPrivateWsAutoGeneratedTest::testStopOrdersResponse, "testStopOrdersResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsImpl.java new file mode 100644 index 00000000..5e539de6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsImpl.java @@ -0,0 +1,94 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futuresprivate; + +import com.kucoin.universal.sdk.internal.interfaces.WebSocketService; + +public class FuturesPrivateWsImpl implements FuturesPrivateWs { + + private final WebSocketService wsService; + + public FuturesPrivateWsImpl(WebSocketService wsService) { + this.wsService = wsService; + } + + public String allOrder(AllOrderEvent.Callback callback) { + String topicPrefix = "/contractMarket/tradeOrders"; + + String[] args = {}; + + return this.wsService.subscribe(topicPrefix, args, AllOrderEvent.CallbackAdapters.of(callback)); + } + + public String allPosition(AllPositionEvent.Callback callback) { + String topicPrefix = "/contract/positionAll"; + + String[] args = {}; + + return this.wsService.subscribe( + topicPrefix, args, AllPositionEvent.CallbackAdapters.of(callback)); + } + + public String balance(BalanceEvent.Callback callback) { + String topicPrefix = "/contractAccount/wallet"; + + String[] args = {}; + + return this.wsService.subscribe(topicPrefix, args, BalanceEvent.CallbackAdapters.of(callback)); + } + + public String crossLeverage(CrossLeverageEvent.Callback callback) { + String topicPrefix = "/contract/crossLeverage"; + + String[] args = {}; + + return this.wsService.subscribe( + topicPrefix, args, CrossLeverageEvent.CallbackAdapters.of(callback)); + } + + public String marginMode(MarginModeEvent.Callback callback) { + String topicPrefix = "/contract/marginMode"; + + String[] args = {}; + + return this.wsService.subscribe( + topicPrefix, args, MarginModeEvent.CallbackAdapters.of(callback)); + } + + public String order(String symbol, OrderEvent.Callback callback) { + String topicPrefix = "/contractMarket/tradeOrders"; + + String[] args = {symbol}; + + return this.wsService.subscribe(topicPrefix, args, OrderEvent.CallbackAdapters.of(callback)); + } + + public String position(String symbol, PositionEvent.Callback callback) { + String topicPrefix = "/contract/position"; + + String[] args = {symbol}; + + return this.wsService.subscribe(topicPrefix, args, PositionEvent.CallbackAdapters.of(callback)); + } + + public String stopOrders(StopOrdersEvent.Callback callback) { + String topicPrefix = "/contractMarket/advancedOrders"; + + String[] args = {}; + + return this.wsService.subscribe( + topicPrefix, args, StopOrdersEvent.CallbackAdapters.of(callback)); + } + + public void unSubscribe(String id) { + this.wsService.unsubscribe(id); + } + + public void start() { + this.wsService.start(); + } + + public void stop() { + this.wsService.stop(); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/MarginModeEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/MarginModeEvent.java new file mode 100644 index 00000000..5fd531f1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/MarginModeEvent.java @@ -0,0 +1,53 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futuresprivate; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.HashMap; +import java.util.Map; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class MarginModeEvent implements Response> { + /** The SYMBOL is the key with value \"CROSS\" or \"ISOLATED\" */ + @JsonProperty("data") + private Map data = new HashMap<>(); + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @JsonCreator + public static MarginModeEvent fromJson(Map data) { + // original response + MarginModeEvent obj = new MarginModeEvent(); + obj.data = data; + return obj; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, MarginModeEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/OrderEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/OrderEvent.java new file mode 100644 index 00000000..814390ad --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/OrderEvent.java @@ -0,0 +1,419 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futuresprivate; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class OrderEvent implements Response> { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-221752070) + */ + @JsonProperty("symbol") + private String symbol; + + /** User-specified order type */ + @JsonProperty("orderType") + private OrderTypeEnum orderType; + + /** buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** Cumulative number of cancellations */ + @JsonProperty("canceledSize") + private String canceledSize; + + /** The unique order id generated by the trading system */ + @JsonProperty("orderId") + private String orderId; + + /** Margin Mode */ + @JsonProperty("marginMode") + private MarginModeEnum marginMode; + + /** Order Type */ + @JsonProperty("type") + private TypeEnum type; + + /** Gateway received the message time (milliseconds) */ + @JsonProperty("orderTime") + private Long orderTime; + + /** User-specified order size */ + @JsonProperty("size") + private String size; + + /** Cumulative number filled */ + @JsonProperty("filledSize") + private String filledSize; + + /** Price */ + @JsonProperty("price") + private String price; + + /** Remain size */ + @JsonProperty("remainSize") + private String remainSize; + + /** Order Status */ + @JsonProperty("status") + private StatusEnum status; + + /** Match engine received the message time (nanoseconds) */ + @JsonProperty("ts") + private Long ts; + + /** + * 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** + */ + @JsonProperty("liquidity") + private LiquidityEnum liquidity; + + /** Actual Fee Type */ + @JsonProperty("feeType") + private FeeTypeEnum feeType; + + /** Match Price (when the type is \"match\") */ + @JsonProperty("matchPrice") + private String matchPrice; + + /** Match Size (when the type is \"match\") */ + @JsonProperty("matchSize") + private String matchSize; + + /** Trade ID: Generated by Matching engine. */ + @JsonProperty("tradeId") + private String tradeId; + + /** The size before order update */ + @JsonProperty("oldSize") + private String oldSize; + + /** Client Order ID: The ClientOid field is a unique ID created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** normal order or liquid order */ + @JsonProperty("tradeType") + private TradeTypeEnum tradeType; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, OrderEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } + + public enum OrderTypeEnum { + /** limit */ + LIMIT("limit"), + /** market */ + MARKET("market"); + + private final String value; + + OrderTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OrderTypeEnum fromValue(String value) { + for (OrderTypeEnum b : OrderTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** buy */ + BUY("buy"), + /** sell */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum MarginModeEnum { + /** Isolated Margin */ + ISOLATED("ISOLATED"), + /** Cross Margin */ + CROSS("CROSS"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** 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. + */ + 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 */ + CANCELED("canceled"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StatusEnum { + /** the order is in the order book (maker order) */ + OPEN("open"), + /** + * when taker order executes with orders in the order book, the taker order status is “match” + */ + MATCH("match"), + /** the order is fully executed successfully */ + DONE("done"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum LiquidityEnum { + /** taker */ + TAKER("taker"), + /** maker */ + MAKER("maker"); + + private final String value; + + LiquidityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LiquidityEnum fromValue(String value) { + for (LiquidityEnum b : LiquidityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum FeeTypeEnum { + /** takerFee */ + TAKERFEE("takerFee"), + /** makerFee */ + MAKERFEE("makerFee"); + + private final String value; + + FeeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FeeTypeEnum fromValue(String value) { + for (FeeTypeEnum b : FeeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TradeTypeEnum { + /** Normal trade order */ + TRADE("trade"), + /** Liquid order; all other types with the exception of type=update will be pushed */ + LIQUID("liquid"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/PositionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/PositionEvent.java new file mode 100644 index 00000000..1d30d6f0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/PositionEvent.java @@ -0,0 +1,306 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futuresprivate; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class PositionEvent implements Response> { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-221752070) + */ + @JsonProperty("symbol") + private String symbol; + + /** Whether it is cross margin. */ + @JsonProperty("crossMode") + private Boolean crossMode; + + /** ADL ranking percentile */ + @JsonProperty("delevPercentage") + private Double delevPercentage; + + /** Open time */ + @JsonProperty("openingTimestamp") + private Long openingTimestamp; + + /** Current timestamp */ + @JsonProperty("currentTimestamp") + private Long currentTimestamp; + + /** Current position quantity */ + @JsonProperty("currentQty") + private Integer currentQty; + + /** Current position value */ + @JsonProperty("currentCost") + private Double currentCost; + + /** Current commission */ + @JsonProperty("currentComm") + private Double currentComm; + + /** Unrealized value */ + @JsonProperty("unrealisedCost") + private Double unrealisedCost; + + /** Accumulated realized gross profit value */ + @JsonProperty("realisedGrossCost") + private Double realisedGrossCost; + + /** Current realized position value */ + @JsonProperty("realisedCost") + private Double realisedCost; + + /** Opened position or not */ + @JsonProperty("isOpen") + private Boolean isOpen; + + /** Mark price */ + @JsonProperty("markPrice") + private Double markPrice; + + /** Mark Value */ + @JsonProperty("markValue") + private Double markValue; + + /** Position value */ + @JsonProperty("posCost") + private Double posCost; + + /** + * Inital margin Cross = opening value/cross leverage; isolated = accumulation of initial margin + * for each transaction + */ + @JsonProperty("posInit") + private Double posInit; + + /** + * Bankruptcy cost Cross = mark value * imr; Isolated = position margin (accumulation of initial + * margin, additional margin, generated funding fees, etc.) + */ + @JsonProperty("posMargin") + private Double posMargin; + + /** Accumulated realized gross profit value */ + @JsonProperty("realisedGrossPnl") + private Double realisedGrossPnl; + + /** Realized profit and loss */ + @JsonProperty("realisedPnl") + private Double realisedPnl; + + /** Unrealized profit and loss */ + @JsonProperty("unrealisedPnl") + private Double unrealisedPnl; + + /** Profit-loss ratio of the position */ + @JsonProperty("unrealisedPnlPcnt") + private Double unrealisedPnlPcnt; + + /** Rate of return on investment */ + @JsonProperty("unrealisedRoePcnt") + private Double unrealisedRoePcnt; + + /** Average entry price */ + @JsonProperty("avgEntryPrice") + private Double avgEntryPrice; + + /** + * Liquidation price: For Cross Margin, you can refer to the liquidationPrice, and the liquidation + * is based on the risk rate. + */ + @JsonProperty("liquidationPrice") + private Double liquidationPrice; + + /** + * Bankruptcy price: For Cross Margin, you can refer to the bankruptPrice, and the liquidation is + * based on the risk rate. + */ + @JsonProperty("bankruptPrice") + private Double bankruptPrice; + + /** Currency used to clear and settle the trades */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** Margin Mode: CROSS, ISOLATED */ + @JsonProperty("marginMode") + private MarginModeEnum marginMode; + + /** Position Side */ + @JsonProperty("positionSide") + private PositionSideEnum positionSide; + + /** Leverage */ + @JsonProperty("leverage") + private Double leverage; + + /** Auto deposit margin or not **Only applicable to Isolated Margin** */ + @JsonProperty("autoDeposit") + private Boolean autoDeposit; + + /** Maintenance margin requirement */ + @JsonProperty("maintMarginReq") + private Double maintMarginReq; + + /** Risk limit **Only applicable to Isolated Margin** */ + @JsonProperty("riskLimit") + private Integer riskLimit; + + /** Leverage of the order **Only applicable to Isolated Margin** */ + @JsonProperty("realLeverage") + private Double realLeverage; + + /** Added margin **Only applicable to Isolated Margin** */ + @JsonProperty("posCross") + private Double posCross; + + /** Bankruptcy cost **Only applicable to Isolated Margin** */ + @JsonProperty("posComm") + private Double posComm; + + /** Funding fees paid out **Only applicable to Isolated Margin** */ + @JsonProperty("posLoss") + private Double posLoss; + + /** + * The current remaining unsettled funding fee for the position **Only applicable to Isolated + * Margin** + */ + @JsonProperty("posFunding") + private Double posFunding; + + /** Maintenance margin */ + @JsonProperty("posMaint") + private Double posMaint; + + /** Position margin **Only applicable to Isolated Margin** */ + @JsonProperty("maintMargin") + private Double maintMargin; + + /** Funding time */ + @JsonProperty("fundingTime") + private Long fundingTime; + + /** Position size */ + @JsonProperty("qty") + private Integer qty; + + /** Funding rate */ + @JsonProperty("fundingRate") + private Double fundingRate; + + /** Funding fees */ + @JsonProperty("fundingFee") + private Double fundingFee; + + /** Funding Fee Settlement Time (nanoseconds) */ + @JsonProperty("ts") + private Long ts; + + /** Adjustment isolated margin risk limit level successful or not */ + @JsonProperty("success") + private Boolean success; + + /** Adjustment isolated margin risk limit level failure reason */ + @JsonProperty("msg") + private String msg; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, PositionEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } + + public enum MarginModeEnum { + /** cross margin */ + CROSS("CROSS"), + /** isolated margin */ + ISOLATED("ISOLATED"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum PositionSideEnum { + /** One-way position */ + BOTH("BOTH"); + + private final String value; + + PositionSideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PositionSideEnum fromValue(String value) { + for (PositionSideEnum b : PositionSideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/StopOrdersEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/StopOrdersEvent.java new file mode 100644 index 00000000..b7955909 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/StopOrdersEvent.java @@ -0,0 +1,260 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futuresprivate; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class StopOrdersEvent implements Response> { + /** */ + @JsonProperty("createdAt") + private Long createdAt; + + /** Margin Mode */ + @JsonProperty("marginMode") + private MarginModeEnum marginMode; + + /** The unique order id generated by the trading system */ + @JsonProperty("orderId") + private String orderId; + + /** Order Price */ + @JsonProperty("orderPrice") + private String orderPrice; + + /** User-specified order type */ + @JsonProperty("orderType") + private OrderTypeEnum orderType; + + /** buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** User-specified order size */ + @JsonProperty("size") + private Integer size; + + /** Either 'down' or 'up' */ + @JsonProperty("stop") + private StopEnum stop; + + /** Stop Price */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** */ + @JsonProperty("stopPriceType") + private String stopPriceType; + + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-221752070) + */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("ts") + private Long ts; + + /** Order Type */ + @JsonProperty("type") + private TypeEnum type; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, StopOrdersEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } + + public enum MarginModeEnum { + /** Isolated Margin */ + ISOLATED("ISOLATED"), + /** Cross Margin */ + CROSS("CROSS"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum OrderTypeEnum { + /** Stop order */ + STOP("stop"); + + private final String value; + + OrderTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OrderTypeEnum fromValue(String value) { + for (OrderTypeEnum b : OrderTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** buy */ + BUY("buy"), + /** sell */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopEnum { + /** Triggers when the price reaches or goes below the stopPrice */ + DOWN("down"), + /** Triggers when the price reaches or goes above the stopPrice. */ + UP("up"); + + private final String value; + + StopEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopEnum fromValue(String value) { + for (StopEnum b : StopEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** the order is in the order book (maker order) */ + OPEN("open"), + /** when the stop order has been triggered */ + TRIGGERED("triggered"), + /** when the order has been canceled */ + CANCEL("cancel"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/AnnouncementEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/AnnouncementEvent.java new file mode 100644 index 00000000..a5b6c927 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/AnnouncementEvent.java @@ -0,0 +1,55 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futurespublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AnnouncementEvent + implements Response> { + /** Symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Funding time */ + @JsonProperty("fundingTime") + private Long fundingTime; + + /** Funding rate */ + @JsonProperty("fundingRate") + private Double fundingRate; + + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, AnnouncementEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/ExecutionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/ExecutionEvent.java new file mode 100644 index 00000000..c01c37c9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/ExecutionEvent.java @@ -0,0 +1,74 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futurespublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ExecutionEvent implements Response> { + /** */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("sequence") + private Long sequence; + + /** */ + @JsonProperty("side") + private String side; + + /** */ + @JsonProperty("size") + private Integer size; + + /** */ + @JsonProperty("price") + private String price; + + /** */ + @JsonProperty("takerOrderId") + private String takerOrderId; + + /** */ + @JsonProperty("makerOrderId") + private String makerOrderId; + + /** */ + @JsonProperty("tradeId") + private String tradeId; + + /** */ + @JsonProperty("ts") + private Long ts; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, ExecutionEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWs.java new file mode 100644 index 00000000..29567f7f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWs.java @@ -0,0 +1,68 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futurespublic; + +public interface FuturesPublicWs { + + /** + * announcement Subscribe this topic to get Funding Fee Settlement. push frequency: Settlement is + * made every 8 hours, real-time push + */ + public String announcement(String symbol, AnnouncementEvent.Callback callback); + + /** + * Match execution data. For each order executed, the system will send you the match messages in + * the format as following. push frequency: real-time + */ + public String execution(String symbol, ExecutionEvent.Callback callback); + + /** + * instrument Subscribe this topic to get the mark Price, index Price or funding fee Rate push + * frequency: mark.index.price 1s, funding.rate 1min + */ + public String instrument(String symbol, InstrumentEvent.Callback callback); + + /** Klines Subscribe to this topic to get K-Line data. push frequency: 1s */ + public String klines(String symbol, String type, KlinesEvent.Callback callback); + + /** + * 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: real-time + */ + public String orderbookIncrement(String symbol, OrderbookIncrementEvent.Callback callback); + + /** Orderbook - Level50 The depth50 market data. push frequency: 100ms */ + public String orderbookLevel50(String symbol, OrderbookLevel50Event.Callback callback); + + /** + * 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 push frequency: 100ms + */ + public String orderbookLevel5(String symbol, OrderbookLevel5Event.Callback callback); + + /** Symbol Snapshot Get symbol snapshot. push frequency: 5000ms */ + public String symbolSnapshot(String symbol, SymbolSnapshotEvent.Callback callback); + + /** + * Get Ticker(not recommended) 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 + */ + public String tickerV1(String symbol, TickerV1Event.Callback callback); + + /** + * Get Ticker V2 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 + */ + public String tickerV2(String symbol, TickerV2Event.Callback callback); + + /** Unsubscribe from topics */ + public void unSubscribe(String id); + + /** Start websocket */ + public void start(); + + /** Stop websocket */ + public void stop(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsAutoGeneratedTest.java new file mode 100644 index 00000000..09ba5af8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsAutoGeneratedTest.java @@ -0,0 +1,149 @@ +package com.kucoin.universal.sdk.generate.futures.futurespublic; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.ArrayList; +import java.util.List; + +class FuturesPublicWsAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** announcement announcement /announcement/contract/announcement:_symbol_ */ + public static void testAnnouncementResponse() throws Exception { + String data = + "{\"topic\":\"/contract/announcement\",\"subject\":\"funding.begin\",\"data\":{\"symbol\":\"XBTUSDTM\",\"fundingTime\":1551770400000,\"fundingRate\":-0.002966,\"timestamp\":1551770400000}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** execution Match execution data. /execution/contractMarket/execution:_symbol_ */ + public static void testExecutionResponse() throws Exception { + String data = + "{\"topic\":\"/contractMarket/execution:XBTUSDTM\",\"type\":\"message\",\"subject\":\"match\",\"sn\":1794100537695,\"data\":{\"symbol\":\"XBTUSDTM\",\"sequence\":1794100537695,\"side\":\"buy\",\"size\":2,\"price\":\"90503.9\",\"takerOrderId\":\"247822202957807616\",\"makerOrderId\":\"247822167163555840\",\"tradeId\":\"1794100537695\",\"ts\":1731898619520000000}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** instrument instrument /instrument/contract/instrument:_symbol_ */ + public static void testInstrumentResponse() throws Exception { + String data = + "{\"topic\":\"/contract/instrument:XBTUSDTM\",\"type\":\"message\",\"subject\":\"mark.index.price\",\"data\":{\"markPrice\":90445.02,\"indexPrice\":90445.02,\"granularity\":1000,\"timestamp\":1731899129000}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** klines Klines /klines/contractMarket/limitCandle:_symbol___type_ */ + public static void testKlinesResponse() throws Exception { + String data = + "{\"topic\":\"/contractMarket/limitCandle:XBTUSDTM_1min\",\"type\":\"message\",\"data\":{\"symbol\":\"XBTUSDTM\",\"candles\":[\"1731898200\",\"90638.6\",\"90638.6\",\"90638.6\",\"90638.6\",\"21.0\",\"21\"],\"time\":1731898208357},\"subject\":\"candle.stick\"}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** orderbookIncrement Orderbook - Increment /orderbookIncrement/contractMarket/level2:_symbol_ */ + public static void testOrderbookIncrementResponse() throws Exception { + String data = + "{\"topic\":\"/contractMarket/level2:XBTUSDTM\",\"type\":\"message\",\"subject\":\"level2\",\"sn\":1709400450243,\"data\":{\"sequence\":1709400450243,\"change\":\"90631.2,sell,2\",\"timestamp\":1731897467182}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * orderbookLevel50 Orderbook - Level50 /orderbookLevel50/contractMarket/level2Depth50:_symbol_ + */ + public static void testOrderbookLevel50Response() throws Exception { + String data = + "{\"topic\":\"/contractMarket/level2Depth50:XBTUSDTM\",\"type\":\"message\",\"subject\":\"level2\",\"sn\":1731680249700,\"data\":{\"bids\":[[\"89778.6\",1534],[\"89778.2\",54]],\"sequence\":1709294490099,\"timestamp\":1731680249700,\"ts\":1731680249700,\"asks\":[[\"89778.7\",854],[\"89779.2\",4]]}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** orderbookLevel5 Orderbook - Level5 /orderbookLevel5/contractMarket/level2Depth5:_symbol_ */ + public static void testOrderbookLevel5Response() throws Exception { + String data = + "{\"topic\":\"/contractMarket/level2Depth5:XBTUSDTM\",\"type\":\"message\",\"subject\":\"level2\",\"sn\":1731680019100,\"data\":{\"bids\":[[\"89720.9\",513],[\"89720.8\",12],[\"89718.6\",113],[\"89718.4\",19],[\"89718.3\",7]],\"sequence\":1709294294670,\"timestamp\":1731680019100,\"ts\":1731680019100,\"asks\":[[\"89721\",906],[\"89721.1\",203],[\"89721.4\",113],[\"89723.2\",113],[\"89725.4\",113]]}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** symbolSnapshot Symbol Snapshot /symbolSnapshot/contractMarket/snapshot:_symbol_ */ + public static void testSymbolSnapshotResponse() throws Exception { + String data = + "{\"topic\":\"/contractMarket/snapshot:XBTUSDTM\",\"type\":\"message\",\"subject\":\"snapshot.24h\",\"id\":\"673ab3fff4088b0001664f41\",\"data\":{\"highPrice\":91512.8,\"lastPrice\":90326.7,\"lowPrice\":88747.8,\"price24HoursBefore\":89880.4,\"priceChg\":446.3,\"priceChgPct\":0.0049,\"symbol\":\"XBTUSDTM\",\"ts\":1731900415023929239,\"turnover\":526928331.0482177734,\"volume\":5834.46}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** tickerV1 Get Ticker(not recommended) /tickerV1/contractMarket/ticker:_symbol_ */ + public static void testTickerV1Response() throws Exception { + String data = + "{\"topic\":\"/contractMarket/ticker:XBTUSDTM\",\"type\":\"message\",\"subject\":\"ticker\",\"sn\":1793133570931,\"data\":{\"symbol\":\"XBTUSDTM\",\"sequence\":1793133570931,\"side\":\"sell\",\"size\":1,\"price\":\"90147.7\",\"bestBidSize\":2186,\"bestBidPrice\":\"90147.7\",\"bestAskPrice\":\"90147.8\",\"tradeId\":\"1793133570931\",\"bestAskSize\":275,\"ts\":1731679215637000000}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** tickerV2 Get Ticker V2 /tickerV2/contractMarket/tickerV2:_symbol_ */ + public static void testTickerV2Response() throws Exception { + String data = + "{\"topic\":\"/contractMarket/tickerV2:XBTUSDTM\",\"type\":\"message\",\"subject\":\"tickerV2\",\"sn\":1709284589209,\"data\":{\"symbol\":\"XBTUSDTM\",\"sequence\":1709284589209,\"bestBidSize\":713,\"bestBidPrice\":\"88987.4\",\"bestAskPrice\":\"88987.5\",\"bestAskSize\":1037,\"ts\":1731665526461000000}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(FuturesPublicWsAutoGeneratedTest::testAnnouncementResponse, "testAnnouncementResponse"); + run(FuturesPublicWsAutoGeneratedTest::testExecutionResponse, "testExecutionResponse"); + run(FuturesPublicWsAutoGeneratedTest::testInstrumentResponse, "testInstrumentResponse"); + run(FuturesPublicWsAutoGeneratedTest::testKlinesResponse, "testKlinesResponse"); + run( + FuturesPublicWsAutoGeneratedTest::testOrderbookIncrementResponse, + "testOrderbookIncrementResponse"); + run( + FuturesPublicWsAutoGeneratedTest::testOrderbookLevel50Response, + "testOrderbookLevel50Response"); + run( + FuturesPublicWsAutoGeneratedTest::testOrderbookLevel5Response, + "testOrderbookLevel5Response"); + run(FuturesPublicWsAutoGeneratedTest::testSymbolSnapshotResponse, "testSymbolSnapshotResponse"); + run(FuturesPublicWsAutoGeneratedTest::testTickerV1Response, "testTickerV1Response"); + run(FuturesPublicWsAutoGeneratedTest::testTickerV2Response, "testTickerV2Response"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsImpl.java new file mode 100644 index 00000000..5f614e99 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsImpl.java @@ -0,0 +1,113 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futurespublic; + +import com.kucoin.universal.sdk.internal.interfaces.WebSocketService; + +public class FuturesPublicWsImpl implements FuturesPublicWs { + + private final WebSocketService wsService; + + public FuturesPublicWsImpl(WebSocketService wsService) { + this.wsService = wsService; + } + + public String announcement(String symbol, AnnouncementEvent.Callback callback) { + String topicPrefix = "/contract/announcement"; + + String[] args = {symbol}; + + return this.wsService.subscribe( + topicPrefix, args, AnnouncementEvent.CallbackAdapters.of(callback)); + } + + public String execution(String symbol, ExecutionEvent.Callback callback) { + String topicPrefix = "/contractMarket/execution"; + + String[] args = {symbol}; + + return this.wsService.subscribe( + topicPrefix, args, ExecutionEvent.CallbackAdapters.of(callback)); + } + + public String instrument(String symbol, InstrumentEvent.Callback callback) { + String topicPrefix = "/contract/instrument"; + + String[] args = {symbol}; + + return this.wsService.subscribe( + topicPrefix, args, InstrumentEvent.CallbackAdapters.of(callback)); + } + + public String klines(String symbol, String type, KlinesEvent.Callback callback) { + String topicPrefix = "/contractMarket/limitCandle"; + + String[] args = {String.join("_", symbol, type)}; + + return this.wsService.subscribe(topicPrefix, args, KlinesEvent.CallbackAdapters.of(callback)); + } + + public String orderbookIncrement(String symbol, OrderbookIncrementEvent.Callback callback) { + String topicPrefix = "/contractMarket/level2"; + + String[] args = {symbol}; + + return this.wsService.subscribe( + topicPrefix, args, OrderbookIncrementEvent.CallbackAdapters.of(callback)); + } + + public String orderbookLevel50(String symbol, OrderbookLevel50Event.Callback callback) { + String topicPrefix = "/contractMarket/level2Depth50"; + + String[] args = {symbol}; + + return this.wsService.subscribe( + topicPrefix, args, OrderbookLevel50Event.CallbackAdapters.of(callback)); + } + + public String orderbookLevel5(String symbol, OrderbookLevel5Event.Callback callback) { + String topicPrefix = "/contractMarket/level2Depth5"; + + String[] args = {symbol}; + + return this.wsService.subscribe( + topicPrefix, args, OrderbookLevel5Event.CallbackAdapters.of(callback)); + } + + public String symbolSnapshot(String symbol, SymbolSnapshotEvent.Callback callback) { + String topicPrefix = "/contractMarket/snapshot"; + + String[] args = {symbol}; + + return this.wsService.subscribe( + topicPrefix, args, SymbolSnapshotEvent.CallbackAdapters.of(callback)); + } + + public String tickerV1(String symbol, TickerV1Event.Callback callback) { + String topicPrefix = "/contractMarket/ticker"; + + String[] args = {symbol}; + + return this.wsService.subscribe(topicPrefix, args, TickerV1Event.CallbackAdapters.of(callback)); + } + + public String tickerV2(String symbol, TickerV2Event.Callback callback) { + String topicPrefix = "/contractMarket/tickerV2"; + + String[] args = {symbol}; + + return this.wsService.subscribe(topicPrefix, args, TickerV2Event.CallbackAdapters.of(callback)); + } + + public void unSubscribe(String id) { + this.wsService.unsubscribe(id); + } + + public void start() { + this.wsService.start(); + } + + public void stop() { + this.wsService.stop(); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/InstrumentEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/InstrumentEvent.java new file mode 100644 index 00000000..311c41a2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/InstrumentEvent.java @@ -0,0 +1,61 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futurespublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class InstrumentEvent implements Response> { + /** + * Granularity (predicted funding rate: 1-min granularity: 60000; Funding rate: 8-hours + * granularity: 28800000.) + */ + @JsonProperty("granularity") + private Integer granularity; + + /** */ + @JsonProperty("fundingRate") + private Double fundingRate; + + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** */ + @JsonProperty("markPrice") + private Double markPrice; + + /** */ + @JsonProperty("indexPrice") + private Double indexPrice; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, InstrumentEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/KlinesEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/KlinesEvent.java new file mode 100644 index 00000000..6cd5e943 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/KlinesEvent.java @@ -0,0 +1,58 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futurespublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class KlinesEvent implements Response> { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** + * Start time, open price, close price, high price, low price, Transaction volume(This value is + * incorrect, please do not use it, we will fix it in subsequent versions), Transaction amount + */ + @JsonProperty("candles") + private List candles = new ArrayList<>(); + + /** timestamp(ms) */ + @JsonProperty("time") + private Long time; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, KlinesEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookIncrementEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookIncrementEvent.java new file mode 100644 index 00000000..6a459e10 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookIncrementEvent.java @@ -0,0 +1,51 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futurespublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class OrderbookIncrementEvent + implements Response> { + /** */ + @JsonProperty("sequence") + private Long sequence; + + /** */ + @JsonProperty("change") + private String change; + + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, OrderbookIncrementEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel50Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel50Event.java new file mode 100644 index 00000000..e2f34d3b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel50Event.java @@ -0,0 +1,61 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futurespublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class OrderbookLevel50Event + implements Response> { + /** */ + @JsonProperty("bids") + private List> bids = new ArrayList<>(); + + /** */ + @JsonProperty("sequence") + private Long sequence; + + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** */ + @JsonProperty("ts") + private Long ts; + + /** */ + @JsonProperty("asks") + private List> asks = new ArrayList<>(); + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, OrderbookLevel50Event data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel5Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel5Event.java new file mode 100644 index 00000000..8e03bd0e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel5Event.java @@ -0,0 +1,61 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futurespublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class OrderbookLevel5Event + implements Response> { + /** */ + @JsonProperty("bids") + private List> bids = new ArrayList<>(); + + /** */ + @JsonProperty("sequence") + private Long sequence; + + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** */ + @JsonProperty("ts") + private Long ts; + + /** */ + @JsonProperty("asks") + private List> asks = new ArrayList<>(); + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, OrderbookLevel5Event data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/SymbolSnapshotEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/SymbolSnapshotEvent.java new file mode 100644 index 00000000..1c38f80a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/SymbolSnapshotEvent.java @@ -0,0 +1,79 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futurespublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class SymbolSnapshotEvent + implements Response> { + /** */ + @JsonProperty("highPrice") + private Double highPrice; + + /** */ + @JsonProperty("lastPrice") + private Double lastPrice; + + /** */ + @JsonProperty("lowPrice") + private Double lowPrice; + + /** */ + @JsonProperty("price24HoursBefore") + private Double price24HoursBefore; + + /** */ + @JsonProperty("priceChg") + private Double priceChg; + + /** */ + @JsonProperty("priceChgPct") + private Double priceChgPct; + + /** */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("ts") + private Long ts; + + /** */ + @JsonProperty("turnover") + private Double turnover; + + /** */ + @JsonProperty("volume") + private Double volume; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, SymbolSnapshotEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV1Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV1Event.java new file mode 100644 index 00000000..52d5243b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV1Event.java @@ -0,0 +1,82 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futurespublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class TickerV1Event implements Response> { + /** */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("sequence") + private Long sequence; + + /** */ + @JsonProperty("side") + private String side; + + /** */ + @JsonProperty("size") + private Integer size; + + /** */ + @JsonProperty("price") + private String price; + + /** */ + @JsonProperty("bestBidSize") + private Integer bestBidSize; + + /** */ + @JsonProperty("bestBidPrice") + private String bestBidPrice; + + /** */ + @JsonProperty("bestAskPrice") + private String bestAskPrice; + + /** */ + @JsonProperty("tradeId") + private String tradeId; + + /** */ + @JsonProperty("bestAskSize") + private Integer bestAskSize; + + /** */ + @JsonProperty("ts") + private Long ts; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, TickerV1Event data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV2Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV2Event.java new file mode 100644 index 00000000..6a8eeac6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV2Event.java @@ -0,0 +1,66 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.futurespublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class TickerV2Event implements Response> { + /** */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("sequence") + private Long sequence; + + /** */ + @JsonProperty("bestBidSize") + private Integer bestBidSize; + + /** */ + @JsonProperty("bestBidPrice") + private String bestBidPrice; + + /** */ + @JsonProperty("bestAskPrice") + private String bestAskPrice; + + /** */ + @JsonProperty("bestAskSize") + private Integer bestAskSize; + + /** */ + @JsonProperty("ts") + private Long ts; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, TickerV2Event data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/Get24hrStatsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/Get24hrStatsResp.java new file mode 100644 index 00000000..e5beac9c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/Get24hrStatsResp.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class Get24hrStatsResp + implements Response> { + /** 24-hour platform Futures trading volume. Unit is USD */ + @JsonProperty("turnoverOf24h") + private Double turnoverOf24h; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllSymbolsData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllSymbolsData.java new file mode 100644 index 00000000..74e0b9d3 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllSymbolsData.java @@ -0,0 +1,421 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAllSymbolsData { + /** Symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Contract group */ + @JsonProperty("rootSymbol") + private String rootSymbol; + + /** Type of contract */ + @JsonProperty("type") + private TypeEnum type; + + /** First Open Date (milliseconds) */ + @JsonProperty("firstOpenDate") + private Long firstOpenDate; + + /** Expiration date (milliseconds) Null means it will never expire */ + @JsonProperty("expireDate") + private Long expireDate; + + /** Settlement date (milliseconds) Null indicates that automatic settlement is not supported */ + @JsonProperty("settleDate") + private Long settleDate; + + /** Base currency */ + @JsonProperty("baseCurrency") + private String baseCurrency; + + /** Quote currency */ + @JsonProperty("quoteCurrency") + private String quoteCurrency; + + /** Currency used to clear and settle the trades */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** Maximum order quantity */ + @JsonProperty("maxOrderQty") + private Integer maxOrderQty; + + /** Maximum order price */ + @JsonProperty("maxPrice") + private Double maxPrice; + + /** Minimum lot size */ + @JsonProperty("lotSize") + private Integer lotSize; + + /** Minimum price changes */ + @JsonProperty("tickSize") + private Double tickSize; + + /** Index price of tick size */ + @JsonProperty("indexPriceTickSize") + private Double indexPriceTickSize; + + /** + * 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. + */ + @JsonProperty("multiplier") + private Double multiplier; + + /** Initial margin requirement */ + @JsonProperty("initialMargin") + private Double initialMargin; + + /** Maintenance margin requirement */ + @JsonProperty("maintainMargin") + private Double maintainMargin; + + /** Maximum risk limit (unit: XBT) */ + @JsonProperty("maxRiskLimit") + private Integer maxRiskLimit; + + /** Minimum risk limit (unit: XBT) */ + @JsonProperty("minRiskLimit") + private Integer minRiskLimit; + + /** Risk limit increment value (unit: XBT) */ + @JsonProperty("riskStep") + private Integer riskStep; + + /** Maker fee rate */ + @JsonProperty("makerFeeRate") + private Double makerFeeRate; + + /** Taker fee rate */ + @JsonProperty("takerFeeRate") + private Double takerFeeRate; + + /** Deprecated param */ + @JsonProperty("takerFixFee") + private Double takerFixFee; + + /** Deprecated param */ + @JsonProperty("makerFixFee") + private Double makerFixFee; + + /** Settlement fee */ + @JsonProperty("settlementFee") + private Double settlementFee; + + /** Enabled ADL or not */ + @JsonProperty("isDeleverage") + private Boolean isDeleverage; + + /** Deprecated param */ + @JsonProperty("isQuanto") + private Boolean isQuanto; + + /** Whether it is a reverse contract */ + @JsonProperty("isInverse") + private Boolean isInverse; + + /** Marking method */ + @JsonProperty("markMethod") + private MarkMethodEnum markMethod; + + /** Fair price marking method; the Futures contract is null */ + @JsonProperty("fairMethod") + private FairMethodEnum fairMethod; + + /** Ticker symbol of the base currency */ + @JsonProperty("fundingBaseSymbol") + private String fundingBaseSymbol; + + /** Ticker symbol of the quote currency */ + @JsonProperty("fundingQuoteSymbol") + private String fundingQuoteSymbol; + + /** Funding rate symbol */ + @JsonProperty("fundingRateSymbol") + private String fundingRateSymbol; + + /** Index symbol */ + @JsonProperty("indexSymbol") + private String indexSymbol; + + /** Settlement symbol */ + @JsonProperty("settlementSymbol") + private String settlementSymbol; + + /** Contract status */ + @JsonProperty("status") + private StatusEnum status; + + /** Funding fee rate */ + @JsonProperty("fundingFeeRate") + private Double fundingFeeRate; + + /** Predicted funding fee rate */ + @JsonProperty("predictedFundingFeeRate") + private Double predictedFundingFeeRate; + + /** Funding interval (milliseconds) */ + @JsonProperty("fundingRateGranularity") + private Integer fundingRateGranularity; + + /** Open interest (unit: lots) */ + @JsonProperty("openInterest") + private String openInterest; + + /** 24-hour turnover */ + @JsonProperty("turnoverOf24h") + private Double turnoverOf24h; + + /** 24-hour volume */ + @JsonProperty("volumeOf24h") + private Double volumeOf24h; + + /** Mark price */ + @JsonProperty("markPrice") + private Double markPrice; + + /** Index price */ + @JsonProperty("indexPrice") + private Double indexPrice; + + /** Last trade price */ + @JsonProperty("lastTradePrice") + private Double lastTradePrice; + + /** Next funding rate time (milliseconds) */ + @JsonProperty("nextFundingRateTime") + private Integer nextFundingRateTime; + + /** Maximum leverage */ + @JsonProperty("maxLeverage") + private Integer maxLeverage; + + /** The contract index price source exchange */ + @JsonProperty("sourceExchanges") + private List sourceExchanges = new ArrayList<>(); + + /** Premium index symbol (1 minute) */ + @JsonProperty("premiumsSymbol1M") + private String premiumsSymbol1M; + + /** Premium index symbol (8 hours) */ + @JsonProperty("premiumsSymbol8H") + private String premiumsSymbol8H; + + /** Base currency interest rate symbol (1 minute) */ + @JsonProperty("fundingBaseSymbol1M") + private String fundingBaseSymbol1M; + + /** Quote currency interest rate symbol (1 minute) */ + @JsonProperty("fundingQuoteSymbol1M") + private String fundingQuoteSymbol1M; + + /** 24-hour lowest price */ + @JsonProperty("lowPrice") + private Double lowPrice; + + /** 24-hour highest price */ + @JsonProperty("highPrice") + private Double highPrice; + + /** 24-hour % price change */ + @JsonProperty("priceChgPct") + private Double priceChgPct; + + /** 24-hour price change */ + @JsonProperty("priceChg") + private Double priceChg; + + /** */ + @JsonProperty("k") + private Double k; + + /** */ + @JsonProperty("m") + private Double m; + + /** */ + @JsonProperty("f") + private Double f; + + /** */ + @JsonProperty("mmrLimit") + private Double mmrLimit; + + /** */ + @JsonProperty("mmrLevConstant") + private Double mmrLevConstant; + + /** Whether support Cross Margin */ + @JsonProperty("supportCross") + private Boolean supportCross; + + /** The current maximum buying price allowed */ + @JsonProperty("buyLimit") + private Double buyLimit; + + /** The current minimum selling price allowed */ + @JsonProperty("sellLimit") + private Double sellLimit; + + public enum TypeEnum { + /** + * Standardized swap contracts, standard financial futures on swaps, expiration swap funding + * rates + */ + FFWCSX("FFWCSX"), + /** Futures Contract */ + FFICSX("FFICSX"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum MarkMethodEnum { + /** FairPrice */ + FAIRPRICE("FairPrice"); + + private final String value; + + MarkMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarkMethodEnum fromValue(String value) { + for (MarkMethodEnum b : MarkMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum FairMethodEnum { + /** FundingRate */ + FUNDINGRATE("FundingRate"); + + private final String value; + + FairMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FairMethodEnum fromValue(String value) { + for (FairMethodEnum b : FairMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StatusEnum { + /** Initial */ + INIT("Init"), + /** Online */ + OPEN("Open"), + /** Settling */ + BEINGSETTLED("BeingSettled"), + /** Settled */ + SETTLED("Settled"), + /** Suspended */ + PAUSED("Paused"), + /** Offline */ + CLOSED("Closed"), + /** Orders can only be canceled */ + CANCELONLY("CancelOnly"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllSymbolsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllSymbolsResp.java new file mode 100644 index 00000000..93ca88b0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllSymbolsResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAllSymbolsResp + implements Response> { + /** List of all contracts */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetAllSymbolsResp fromJson(List data) { + // original response + GetAllSymbolsResp obj = new GetAllSymbolsResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllTickersData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllTickersData.java new file mode 100644 index 00000000..f189ad11 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllTickersData.java @@ -0,0 +1,97 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAllTickersData { + /** Sequence number, used to judge whether the messages pushed by Websocket are continuous. */ + @JsonProperty("sequence") + private Long sequence; + + /** Symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Trade direction */ + @JsonProperty("side") + private SideEnum side; + + /** + * 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. + */ + @JsonProperty("size") + private Integer size; + + /** Transaction ID */ + @JsonProperty("tradeId") + private String tradeId; + + /** Filled price */ + @JsonProperty("price") + private String price; + + /** Best bid price */ + @JsonProperty("bestBidPrice") + private String bestBidPrice; + + /** Best bid size */ + @JsonProperty("bestBidSize") + private Integer bestBidSize; + + /** Best ask price */ + @JsonProperty("bestAskPrice") + private String bestAskPrice; + + /** Best ask size */ + @JsonProperty("bestAskSize") + private Integer bestAskSize; + + /** Filled time (nanoseconds) */ + @JsonProperty("ts") + private Long ts; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllTickersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllTickersResp.java new file mode 100644 index 00000000..730adf5c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllTickersResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAllTickersResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetAllTickersResp fromJson(List data) { + // original response + GetAllTickersResp obj = new GetAllTickersResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetFullOrderBookReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetFullOrderBookReq.java new file mode 100644 index 00000000..9fe0b323 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetFullOrderBookReq.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFullOrderBookReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetFullOrderBookResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetFullOrderBookResp.java new file mode 100644 index 00000000..cc4e492a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetFullOrderBookResp.java @@ -0,0 +1,52 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFullOrderBookResp + implements Response> { + /** Sequence number */ + @JsonProperty("sequence") + private Long sequence; + + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** bids, from high to low */ + @JsonProperty("bids") + private List> bids = new ArrayList<>(); + + /** asks, from low to high */ + @JsonProperty("asks") + private List> asks = new ArrayList<>(); + + /** Timestamp (nanoseconds) */ + @JsonProperty("ts") + private Long ts; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetInterestRateIndexDataList.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetInterestRateIndexDataList.java new file mode 100644 index 00000000..3008ab31 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetInterestRateIndexDataList.java @@ -0,0 +1,35 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetInterestRateIndexDataList { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, + * fundingQuoteSymbol, fundingBaseSymbol1M, + * fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Granularity (milliseconds) */ + @JsonProperty("granularity") + private Integer granularity; + + /** Timestamp (milliseconds) */ + @JsonProperty("timePoint") + private Long timePoint; + + /** Interest rate value */ + @JsonProperty("value") + private Double value; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetInterestRateIndexReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetInterestRateIndexReq.java new file mode 100644 index 00000000..c48c78bf --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetInterestRateIndexReq.java @@ -0,0 +1,62 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetInterestRateIndexReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, + * fundingQuoteSymbol, fundingBaseSymbol1M, + * fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + /** + * This parameter functions to judge whether the lookup is reversed. True means “yes”. False means + * “no”. This parameter is set as True by default. + */ + @JsonProperty("reverse") + @Builder.Default + private Boolean reverse = true; + + /** + * 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. + */ + @JsonProperty("offset") + private Long offset; + + /** + * 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. + */ + @JsonProperty("forward") + @Builder.Default + private Boolean forward = true; + + /** Max. record count. The default record count is 10; the maximum length cannot exceed 100 */ + @JsonProperty("maxCount") + @Builder.Default + private Long maxCount = 10l; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetInterestRateIndexResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetInterestRateIndexResp.java new file mode 100644 index 00000000..e75c08dc --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetInterestRateIndexResp.java @@ -0,0 +1,37 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetInterestRateIndexResp + implements Response> { + /** */ + @JsonProperty("dataList") + private List dataList = new ArrayList<>(); + + /** Whether there are more pages */ + @JsonProperty("hasMore") + private Boolean hasMore; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetKlinesReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetKlinesReq.java new file mode 100644 index 00000000..86c90547 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetKlinesReq.java @@ -0,0 +1,90 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetKlinesReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol, indexSymbol, + * premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Type of candlestick patterns (minutes) */ + @JsonProperty("granularity") + private GranularityEnum granularity; + + /** Start time (milliseconds) */ + @JsonProperty("from") + private Long from; + + /** End time (milliseconds) */ + @JsonProperty("to") + private Long to; + + public enum GranularityEnum { + /** 1min */ + _1(1), + /** 5min */ + _5(5), + /** 15min */ + _15(15), + /** 30min */ + _30(30), + /** 1hour */ + _60(60), + /** 2hour */ + _120(120), + /** 4hour */ + _240(240), + /** 8hour */ + _480(480), + /** 12hour */ + _720(720), + /** 1day */ + _1440(1440), + /** 1week */ + _10080(10080); + + private final Long value; + + GranularityEnum(Long value) { + this.value = value; + } + + @JsonValue + public Long getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static GranularityEnum fromValue(Long value) { + for (GranularityEnum b : GranularityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetKlinesResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetKlinesResp.java new file mode 100644 index 00000000..fadeb48c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetKlinesResp.java @@ -0,0 +1,41 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetKlinesResp implements Response> { + /** */ + @JsonProperty("data") + private List> data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetKlinesResp fromJson(List> data) { + // original response + GetKlinesResp obj = new GetKlinesResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetMarkPriceReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetMarkPriceReq.java new file mode 100644 index 00000000..3799ff00 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetMarkPriceReq.java @@ -0,0 +1,29 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarkPriceReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonIgnore + @PathVar("symbol") + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetMarkPriceResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetMarkPriceResp.java new file mode 100644 index 00000000..1d7cf589 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetMarkPriceResp.java @@ -0,0 +1,50 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarkPriceResp + implements Response> { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Granularity (milliseconds) */ + @JsonProperty("granularity") + private Integer granularity; + + /** Time point (milliseconds) */ + @JsonProperty("timePoint") + private Long timePoint; + + /** Mark price */ + @JsonProperty("value") + private Double value; + + /** Index price */ + @JsonProperty("indexPrice") + private Double indexPrice; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPartOrderBookReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPartOrderBookReq.java new file mode 100644 index 00000000..f95ebf8d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPartOrderBookReq.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPartOrderBookReq implements Request { + /** Get the depth layer, optional value: 20, 100 */ + @JsonIgnore + @PathVar("size") + @JsonProperty("size") + private String size; + + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPartOrderBookResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPartOrderBookResp.java new file mode 100644 index 00000000..b54cc003 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPartOrderBookResp.java @@ -0,0 +1,52 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPartOrderBookResp + implements Response> { + /** Sequence number */ + @JsonProperty("sequence") + private Long sequence; + + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** bids, from high to low */ + @JsonProperty("bids") + private List> bids = new ArrayList<>(); + + /** asks, from low to high */ + @JsonProperty("asks") + private List> asks = new ArrayList<>(); + + /** Timestamp (nanoseconds) */ + @JsonProperty("ts") + private Long ts; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPremiumIndexDataList.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPremiumIndexDataList.java new file mode 100644 index 00000000..0141988f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPremiumIndexDataList.java @@ -0,0 +1,34 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPremiumIndexDataList { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, + * premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Granularity (milliseconds) */ + @JsonProperty("granularity") + private Integer granularity; + + /** Timestamp (milliseconds) */ + @JsonProperty("timePoint") + private Long timePoint; + + /** Premium index */ + @JsonProperty("value") + private Double value; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPremiumIndexReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPremiumIndexReq.java new file mode 100644 index 00000000..9c5c2b33 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPremiumIndexReq.java @@ -0,0 +1,61 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPremiumIndexReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, + * premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + /** + * This parameter functions to judge whether the lookup is reversed. True means “yes”. False means + * “no”. This parameter is set as True by default. + */ + @JsonProperty("reverse") + @Builder.Default + private Boolean reverse = true; + + /** + * 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. + */ + @JsonProperty("offset") + private Long offset; + + /** + * 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. + */ + @JsonProperty("forward") + @Builder.Default + private Boolean forward = true; + + /** Max. record count. The default record count is 10; the maximum length cannot exceed 100 */ + @JsonProperty("maxCount") + @Builder.Default + private Long maxCount = 10l; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPremiumIndexResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPremiumIndexResp.java new file mode 100644 index 00000000..514e6436 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPremiumIndexResp.java @@ -0,0 +1,37 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPremiumIndexResp + implements Response> { + /** */ + @JsonProperty("dataList") + private List dataList = new ArrayList<>(); + + /** Whether there are more pages */ + @JsonProperty("hasMore") + private Boolean hasMore; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPrivateTokenInstanceServers.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPrivateTokenInstanceServers.java new file mode 100644 index 00000000..ec83d348 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPrivateTokenInstanceServers.java @@ -0,0 +1,68 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPrivateTokenInstanceServers { + /** Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change. */ + @JsonProperty("endpoint") + private String endpoint; + + /** Whether to encrypt. Currently only supports wss, not ws */ + @JsonProperty("encrypt") + private Boolean encrypt; + + /** Network Protocol */ + @JsonProperty("protocol") + private ProtocolEnum protocol; + + /** Recommended ping interval (milliseconds) */ + @JsonProperty("pingInterval") + private Integer pingInterval; + + /** Heartbeat timeout (milliseconds) */ + @JsonProperty("pingTimeout") + private Integer pingTimeout; + + public enum ProtocolEnum { + /** Websocket */ + WEBSOCKET("websocket"); + + private final String value; + + ProtocolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ProtocolEnum fromValue(String value) { + for (ProtocolEnum b : ProtocolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPrivateTokenResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPrivateTokenResp.java new file mode 100644 index 00000000..7569c9d0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPrivateTokenResp.java @@ -0,0 +1,37 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPrivateTokenResp + implements Response> { + /** The token required to establish a Websocket connection */ + @JsonProperty("token") + private String token; + + /** */ + @JsonProperty("instanceServers") + private List instanceServers = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPublicTokenInstanceServers.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPublicTokenInstanceServers.java new file mode 100644 index 00000000..1c49d078 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPublicTokenInstanceServers.java @@ -0,0 +1,68 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPublicTokenInstanceServers { + /** Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change. */ + @JsonProperty("endpoint") + private String endpoint; + + /** Whether to encrypt. Currently only supports wss, not ws */ + @JsonProperty("encrypt") + private Boolean encrypt; + + /** Network Protocol */ + @JsonProperty("protocol") + private ProtocolEnum protocol; + + /** Recommended ping interval (milliseconds) */ + @JsonProperty("pingInterval") + private Integer pingInterval; + + /** Heartbeat timeout (milliseconds) */ + @JsonProperty("pingTimeout") + private Integer pingTimeout; + + public enum ProtocolEnum { + /** Websocket */ + WEBSOCKET("websocket"); + + private final String value; + + ProtocolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ProtocolEnum fromValue(String value) { + for (ProtocolEnum b : ProtocolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPublicTokenResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPublicTokenResp.java new file mode 100644 index 00000000..d499e0e6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetPublicTokenResp.java @@ -0,0 +1,37 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPublicTokenResp + implements Response> { + /** The token required to establish a Websocket connection */ + @JsonProperty("token") + private String token; + + /** */ + @JsonProperty("instanceServers") + private List instanceServers = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetServerTimeResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetServerTimeResp.java new file mode 100644 index 00000000..7cc83af7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetServerTimeResp.java @@ -0,0 +1,40 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetServerTimeResp + implements Response> { + /** ServerTime (milliseconds) */ + @JsonProperty("data") + private Long data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetServerTimeResp fromJson(Long data) { + // original response + GetServerTimeResp obj = new GetServerTimeResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetServiceStatusResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetServiceStatusResp.java new file mode 100644 index 00000000..fe3da9aa --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetServiceStatusResp.java @@ -0,0 +1,75 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetServiceStatusResp + implements Response> { + /** */ + @JsonProperty("msg") + private String msg; + + /** + * Status of service: open: normal transaction; close: Stop Trading/Maintenance; cancelonly: can + * only cancel the order but not place order + */ + @JsonProperty("status") + private StatusEnum status; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum StatusEnum { + /** normal transaction */ + OPEN("open"), + /** Stop Trading/Maintenance */ + CLOSE("close"), + /** can only cancel the order but not place order */ + CANCELONLY("cancelonly"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSpotIndexPriceDataList.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSpotIndexPriceDataList.java new file mode 100644 index 00000000..1ac7b763 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSpotIndexPriceDataList.java @@ -0,0 +1,40 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotIndexPriceDataList { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * indexSymbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Granularity (milliseconds) */ + @JsonProperty("granularity") + private Integer granularity; + + /** Timestamp (milliseconds) */ + @JsonProperty("timePoint") + private Long timePoint; + + /** Index Value */ + @JsonProperty("value") + private Double value; + + /** Component List */ + @JsonProperty("decomposionList") + private List decomposionList = new ArrayList<>(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSpotIndexPriceDataListDecomposionList.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSpotIndexPriceDataListDecomposionList.java new file mode 100644 index 00000000..4dc75100 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSpotIndexPriceDataListDecomposionList.java @@ -0,0 +1,27 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotIndexPriceDataListDecomposionList { + /** Exchange */ + @JsonProperty("exchange") + private String exchange; + + /** Price */ + @JsonProperty("price") + private Double price; + + /** Weight */ + @JsonProperty("weight") + private Double weight; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSpotIndexPriceReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSpotIndexPriceReq.java new file mode 100644 index 00000000..21421212 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSpotIndexPriceReq.java @@ -0,0 +1,61 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotIndexPriceReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * indexSymbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + /** + * This parameter functions to judge whether the lookup is reversed. True means “yes”. False means + * “no”. This parameter is set as True by default. + */ + @JsonProperty("reverse") + @Builder.Default + private Boolean reverse = true; + + /** + * 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. + */ + @JsonProperty("offset") + private Long offset; + + /** + * 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. + */ + @JsonProperty("forward") + @Builder.Default + private Boolean forward = true; + + /** Max. record count. The default record count is 10; the maximum length cannot exceed 100 */ + @JsonProperty("maxCount") + @Builder.Default + private Long maxCount = 10l; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSpotIndexPriceResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSpotIndexPriceResp.java new file mode 100644 index 00000000..81fcdd5d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSpotIndexPriceResp.java @@ -0,0 +1,37 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSpotIndexPriceResp + implements Response> { + /** */ + @JsonProperty("dataList") + private List dataList = new ArrayList<>(); + + /** Whether there are more pages */ + @JsonProperty("hasMore") + private Boolean hasMore; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSymbolReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSymbolReq.java new file mode 100644 index 00000000..b4785eb1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSymbolReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSymbolReq implements Request { + /** Path Parameter. Symbol of the contract */ + @JsonIgnore + @PathVar("symbol") + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSymbolResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSymbolResp.java new file mode 100644 index 00000000..338307fc --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetSymbolResp.java @@ -0,0 +1,432 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSymbolResp implements Response> { + /** Symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Contract group */ + @JsonProperty("rootSymbol") + private String rootSymbol; + + /** Type of contract */ + @JsonProperty("type") + private TypeEnum type; + + /** First Open Date (milliseconds) */ + @JsonProperty("firstOpenDate") + private Long firstOpenDate; + + /** Expiration date (milliseconds) Null means it will never expire */ + @JsonProperty("expireDate") + private Long expireDate; + + /** Settlement date (milliseconds) Null indicates that automatic settlement is not supported */ + @JsonProperty("settleDate") + private Long settleDate; + + /** Base currency */ + @JsonProperty("baseCurrency") + private String baseCurrency; + + /** Quote currency */ + @JsonProperty("quoteCurrency") + private String quoteCurrency; + + /** Currency used to clear and settle the trades */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** Maximum order quantity */ + @JsonProperty("maxOrderQty") + private Integer maxOrderQty; + + /** Maximum order price */ + @JsonProperty("maxPrice") + private Double maxPrice; + + /** Minimum lot size */ + @JsonProperty("lotSize") + private Integer lotSize; + + /** Minimum price changes */ + @JsonProperty("tickSize") + private Double tickSize; + + /** Index price of tick size */ + @JsonProperty("indexPriceTickSize") + private Double indexPriceTickSize; + + /** + * 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. + */ + @JsonProperty("multiplier") + private Double multiplier; + + /** Initial margin requirement */ + @JsonProperty("initialMargin") + private Double initialMargin; + + /** Maintenance margin requirement */ + @JsonProperty("maintainMargin") + private Double maintainMargin; + + /** Maximum risk limit (unit: XBT) */ + @JsonProperty("maxRiskLimit") + private Integer maxRiskLimit; + + /** Minimum risk limit (unit: XBT) */ + @JsonProperty("minRiskLimit") + private Integer minRiskLimit; + + /** Risk limit increment value (unit: XBT) */ + @JsonProperty("riskStep") + private Integer riskStep; + + /** Maker fee rate */ + @JsonProperty("makerFeeRate") + private Double makerFeeRate; + + /** Taker fee rate */ + @JsonProperty("takerFeeRate") + private Double takerFeeRate; + + /** Deprecated param */ + @JsonProperty("takerFixFee") + private Double takerFixFee; + + /** Deprecated param */ + @JsonProperty("makerFixFee") + private Double makerFixFee; + + /** Settlement fee */ + @JsonProperty("settlementFee") + private Double settlementFee; + + /** Enabled ADL or not */ + @JsonProperty("isDeleverage") + private Boolean isDeleverage; + + /** Deprecated param */ + @JsonProperty("isQuanto") + private Boolean isQuanto; + + /** Whether it is a reverse contract */ + @JsonProperty("isInverse") + private Boolean isInverse; + + /** Marking method */ + @JsonProperty("markMethod") + private MarkMethodEnum markMethod; + + /** Fair price marking method; the Futures contract is null */ + @JsonProperty("fairMethod") + private FairMethodEnum fairMethod; + + /** Ticker symbol of the base currency */ + @JsonProperty("fundingBaseSymbol") + private String fundingBaseSymbol; + + /** Ticker symbol of the quote currency */ + @JsonProperty("fundingQuoteSymbol") + private String fundingQuoteSymbol; + + /** Funding rate symbol */ + @JsonProperty("fundingRateSymbol") + private String fundingRateSymbol; + + /** Index symbol */ + @JsonProperty("indexSymbol") + private String indexSymbol; + + /** Settlement symbol */ + @JsonProperty("settlementSymbol") + private String settlementSymbol; + + /** Contract status */ + @JsonProperty("status") + private StatusEnum status; + + /** Funding fee rate */ + @JsonProperty("fundingFeeRate") + private Double fundingFeeRate; + + /** Predicted funding fee rate */ + @JsonProperty("predictedFundingFeeRate") + private Double predictedFundingFeeRate; + + /** Funding interval (milliseconds) */ + @JsonProperty("fundingRateGranularity") + private Integer fundingRateGranularity; + + /** Open interest (unit: lots) */ + @JsonProperty("openInterest") + private String openInterest; + + /** 24-hour turnover */ + @JsonProperty("turnoverOf24h") + private Double turnoverOf24h; + + /** 24-hour volume */ + @JsonProperty("volumeOf24h") + private Double volumeOf24h; + + /** Mark price */ + @JsonProperty("markPrice") + private Double markPrice; + + /** Index price */ + @JsonProperty("indexPrice") + private Double indexPrice; + + /** Last trade price */ + @JsonProperty("lastTradePrice") + private Double lastTradePrice; + + /** Next funding rate time (milliseconds) */ + @JsonProperty("nextFundingRateTime") + private Integer nextFundingRateTime; + + /** Maximum leverage */ + @JsonProperty("maxLeverage") + private Integer maxLeverage; + + /** The contract index price source exchange */ + @JsonProperty("sourceExchanges") + private List sourceExchanges = new ArrayList<>(); + + /** Premium index symbol (1 minute) */ + @JsonProperty("premiumsSymbol1M") + private String premiumsSymbol1M; + + /** Premium index symbol (8 hours) */ + @JsonProperty("premiumsSymbol8H") + private String premiumsSymbol8H; + + /** Base currency interest rate symbol (1 minute) */ + @JsonProperty("fundingBaseSymbol1M") + private String fundingBaseSymbol1M; + + /** Quote currency interest rate symbol (1 minute) */ + @JsonProperty("fundingQuoteSymbol1M") + private String fundingQuoteSymbol1M; + + /** 24-hour lowest price */ + @JsonProperty("lowPrice") + private Double lowPrice; + + /** 24-hour highest price */ + @JsonProperty("highPrice") + private Double highPrice; + + /** 24-hour % price change */ + @JsonProperty("priceChgPct") + private Double priceChgPct; + + /** 24-hour price change */ + @JsonProperty("priceChg") + private Double priceChg; + + /** */ + @JsonProperty("k") + private Double k; + + /** */ + @JsonProperty("m") + private Double m; + + /** */ + @JsonProperty("f") + private Double f; + + /** */ + @JsonProperty("mmrLimit") + private Double mmrLimit; + + /** */ + @JsonProperty("mmrLevConstant") + private Double mmrLevConstant; + + /** Whether support Cross Margin */ + @JsonProperty("supportCross") + private Boolean supportCross; + + /** The current maximum buying price allowed */ + @JsonProperty("buyLimit") + private Double buyLimit; + + /** The current minimum selling price allowed */ + @JsonProperty("sellLimit") + private Double sellLimit; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum TypeEnum { + /** + * Standardized swap contracts, standard financial futures on swaps, expiration swap funding + * rates + */ + FFWCSX("FFWCSX"), + /** Futures Contract */ + FFICSX("FFICSX"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum MarkMethodEnum { + /** FairPrice */ + FAIRPRICE("FairPrice"); + + private final String value; + + MarkMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarkMethodEnum fromValue(String value) { + for (MarkMethodEnum b : MarkMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum FairMethodEnum { + /** FundingRate */ + FUNDINGRATE("FundingRate"); + + private final String value; + + FairMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FairMethodEnum fromValue(String value) { + for (FairMethodEnum b : FairMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StatusEnum { + /** Initial */ + INIT("Init"), + /** Online */ + OPEN("Open"), + /** Settling */ + BEINGSETTLED("BeingSettled"), + /** Settled */ + SETTLED("Settled"), + /** Suspended */ + PAUSED("Paused"), + /** Offline */ + CLOSED("Closed"), + /** Orders can only be canceled */ + CANCELONLY("CancelOnly"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTickerReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTickerReq.java new file mode 100644 index 00000000..c6a954e9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTickerReq.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTickerReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTickerResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTickerResp.java new file mode 100644 index 00000000..a38ad269 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTickerResp.java @@ -0,0 +1,111 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTickerResp implements Response> { + /** Sequence number, used to judge whether the messages pushed by Websocket are continuous. */ + @JsonProperty("sequence") + private Long sequence; + + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** + * 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. + */ + @JsonProperty("side") + private SideEnum side; + + /** Filled quantity */ + @JsonProperty("size") + private Integer size; + + /** Transaction ID */ + @JsonProperty("tradeId") + private String tradeId; + + /** Filled price */ + @JsonProperty("price") + private String price; + + /** Best bid price */ + @JsonProperty("bestBidPrice") + private String bestBidPrice; + + /** Best bid size */ + @JsonProperty("bestBidSize") + private Integer bestBidSize; + + /** Best ask price */ + @JsonProperty("bestAskPrice") + private String bestAskPrice; + + /** Best ask size */ + @JsonProperty("bestAskSize") + private Integer bestAskSize; + + /** Filled time (nanoseconds) */ + @JsonProperty("ts") + private Long ts; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum SideEnum { + /** buy */ + BUY("buy"), + /** sell */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTradeHistoryData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTradeHistoryData.java new file mode 100644 index 00000000..47865971 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTradeHistoryData.java @@ -0,0 +1,89 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryData { + /** Sequence number */ + @JsonProperty("sequence") + private Long sequence; + + /** Deprecated param */ + @JsonProperty("contractId") + private Integer contractId; + + /** Transaction ID */ + @JsonProperty("tradeId") + private String tradeId; + + /** Maker order ID */ + @JsonProperty("makerOrderId") + private String makerOrderId; + + /** Taker order ID */ + @JsonProperty("takerOrderId") + private String takerOrderId; + + /** Filled timestamp (nanosecond) */ + @JsonProperty("ts") + private Long ts; + + /** Filled amount */ + @JsonProperty("size") + private Integer size; + + /** Filled price */ + @JsonProperty("price") + private String price; + + /** + * 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. + */ + @JsonProperty("side") + private SideEnum side; + + public enum SideEnum { + /** buy */ + BUY("buy"), + /** sell */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTradeHistoryReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTradeHistoryReq.java new file mode 100644 index 00000000..6f6ebd78 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTradeHistoryReq.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTradeHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTradeHistoryResp.java new file mode 100644 index 00000000..39e0b8c4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTradeHistoryResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetTradeHistoryResp fromJson(List data) { + // original response + GetTradeHistoryResp obj = new GetTradeHistoryResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApi.java new file mode 100644 index 00000000..a24b6671 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApi.java @@ -0,0 +1,182 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +public interface MarketApi { + /** + * Get Symbol 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + */ + GetSymbolResp getSymbol(GetSymbolReq req); + + /** + * Get All Symbols 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + */ + GetAllSymbolsResp getAllSymbols(); + + /** + * Get Ticker 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. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + GetTickerResp getTicker(GetTickerReq req); + + /** + * Get All Tickers 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. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ + */ + GetAllTickersResp getAllTickers(); + + /** + * Get Full OrderBook 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + */ + GetFullOrderBookResp getFullOrderBook(GetFullOrderBookReq req); + + /** + * Get Part OrderBook 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. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ + */ + GetPartOrderBookResp getPartOrderBook(GetPartOrderBookReq req); + + /** + * Get Trade History Request the trade history of the specified symbol via this endpoint. The + * returned quantity is the last 100 transaction records. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + GetTradeHistoryResp getTradeHistory(GetTradeHistoryReq req); + + /** + * Get Klines 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + */ + GetKlinesResp getKlines(GetKlinesReq req); + + /** + * Get Mark Price Get the current mark price (Update snapshots once per second, real-time query). + * docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ + */ + GetMarkPriceResp getMarkPrice(GetMarkPriceReq req); + + /** + * Get Spot Index Price Get Spot Index Price (Update snapshots once per second, and there is a 5s + * cache when querying). docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + GetSpotIndexPriceResp getSpotIndexPrice(GetSpotIndexPriceReq req); + + /** + * Get Interest Rate Index Get interest rate Index (real-time query). docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + GetInterestRateIndexResp getInterestRateIndex(GetInterestRateIndexReq req); + + /** + * Get Premium Index Submit request to get premium index (Update snapshots once per second, + * real-time query). docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ + */ + GetPremiumIndexResp getPremiumIndex(GetPremiumIndexReq req); + + /** + * Get 24hr stats Get the statistics of the platform futures trading volume in the last 24 hours. + * docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ + */ + Get24hrStatsResp get24hrStats(); + + /** + * Get Server Time Get the API server time. This is the Unix timestamp. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetServerTimeResp getServerTime(); + + /** + * Get Service Status Get the service status. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 4 | +-----------------------+---------+ + */ + GetServiceStatusResp getServiceStatus(); + + /** + * Get Public Token - Futures 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 docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+---------+ + */ + GetPublicTokenResp getPublicToken(); + + /** + * Get Private Token - Futures 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 docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+---------+ + */ + GetPrivateTokenResp getPrivateToken(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApi.template new file mode 100644 index 00000000..b6c038f0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApi.template @@ -0,0 +1,444 @@ + + /** + * getSymbol + * Get Symbol + * /api/v1/contracts/{symbol} + */ + public void testGetSymbol() { + GetSymbolReq.GetSymbolReqBuilder builder = GetSymbolReq.builder(); + builder.symbol(?); + GetSymbolReq req = builder.build(); + GetSymbolResp resp = this.api.getSymbol(req); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->rootSymbol); + self::assertNotNull($resp->type); + self::assertNotNull($resp->firstOpenDate); + self::assertNotNull($resp->expireDate); + self::assertNotNull($resp->settleDate); + self::assertNotNull($resp->baseCurrency); + self::assertNotNull($resp->quoteCurrency); + self::assertNotNull($resp->settleCurrency); + self::assertNotNull($resp->maxOrderQty); + self::assertNotNull($resp->maxPrice); + self::assertNotNull($resp->lotSize); + self::assertNotNull($resp->tickSize); + self::assertNotNull($resp->indexPriceTickSize); + self::assertNotNull($resp->multiplier); + self::assertNotNull($resp->initialMargin); + self::assertNotNull($resp->maintainMargin); + self::assertNotNull($resp->maxRiskLimit); + self::assertNotNull($resp->minRiskLimit); + self::assertNotNull($resp->riskStep); + self::assertNotNull($resp->makerFeeRate); + self::assertNotNull($resp->takerFeeRate); + self::assertNotNull($resp->takerFixFee); + self::assertNotNull($resp->makerFixFee); + self::assertNotNull($resp->settlementFee); + self::assertNotNull($resp->isDeleverage); + self::assertNotNull($resp->isQuanto); + self::assertNotNull($resp->isInverse); + self::assertNotNull($resp->markMethod); + self::assertNotNull($resp->fairMethod); + self::assertNotNull($resp->fundingBaseSymbol); + self::assertNotNull($resp->fundingQuoteSymbol); + self::assertNotNull($resp->fundingRateSymbol); + self::assertNotNull($resp->indexSymbol); + self::assertNotNull($resp->settlementSymbol); + self::assertNotNull($resp->status); + self::assertNotNull($resp->fundingFeeRate); + self::assertNotNull($resp->predictedFundingFeeRate); + self::assertNotNull($resp->fundingRateGranularity); + self::assertNotNull($resp->openInterest); + self::assertNotNull($resp->turnoverOf24h); + self::assertNotNull($resp->volumeOf24h); + self::assertNotNull($resp->markPrice); + self::assertNotNull($resp->indexPrice); + self::assertNotNull($resp->lastTradePrice); + self::assertNotNull($resp->nextFundingRateTime); + self::assertNotNull($resp->maxLeverage); + foreach($resp->sourceExchanges as $item) { + } + + self::assertNotNull($resp->premiumsSymbol1M); + self::assertNotNull($resp->premiumsSymbol8H); + self::assertNotNull($resp->fundingBaseSymbol1M); + self::assertNotNull($resp->fundingQuoteSymbol1M); + self::assertNotNull($resp->lowPrice); + self::assertNotNull($resp->highPrice); + self::assertNotNull($resp->priceChgPct); + self::assertNotNull($resp->priceChg); + self::assertNotNull($resp->k); + self::assertNotNull($resp->m); + self::assertNotNull($resp->f); + self::assertNotNull($resp->mmrLimit); + self::assertNotNull($resp->mmrLevConstant); + self::assertNotNull($resp->supportCross); + self::assertNotNull($resp->buyLimit); + self::assertNotNull($resp->sellLimit); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getAllSymbols + * Get All Symbols + * /api/v1/contracts/active + */ + public void testGetAllSymbols() { + GetAllSymbolsResp resp = this.api.getAllSymbols(); + foreach($resp->data as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->rootSymbol); + self::assertNotNull($item->type); + self::assertNotNull($item->firstOpenDate); + self::assertNotNull($item->expireDate); + self::assertNotNull($item->settleDate); + self::assertNotNull($item->baseCurrency); + self::assertNotNull($item->quoteCurrency); + self::assertNotNull($item->settleCurrency); + self::assertNotNull($item->maxOrderQty); + self::assertNotNull($item->maxPrice); + self::assertNotNull($item->lotSize); + self::assertNotNull($item->tickSize); + self::assertNotNull($item->indexPriceTickSize); + self::assertNotNull($item->multiplier); + self::assertNotNull($item->initialMargin); + self::assertNotNull($item->maintainMargin); + self::assertNotNull($item->maxRiskLimit); + self::assertNotNull($item->minRiskLimit); + self::assertNotNull($item->riskStep); + self::assertNotNull($item->makerFeeRate); + self::assertNotNull($item->takerFeeRate); + self::assertNotNull($item->takerFixFee); + self::assertNotNull($item->makerFixFee); + self::assertNotNull($item->settlementFee); + self::assertNotNull($item->isDeleverage); + self::assertNotNull($item->isQuanto); + self::assertNotNull($item->isInverse); + self::assertNotNull($item->markMethod); + self::assertNotNull($item->fairMethod); + self::assertNotNull($item->fundingBaseSymbol); + self::assertNotNull($item->fundingQuoteSymbol); + self::assertNotNull($item->fundingRateSymbol); + self::assertNotNull($item->indexSymbol); + self::assertNotNull($item->settlementSymbol); + self::assertNotNull($item->status); + self::assertNotNull($item->fundingFeeRate); + self::assertNotNull($item->predictedFundingFeeRate); + self::assertNotNull($item->fundingRateGranularity); + self::assertNotNull($item->openInterest); + self::assertNotNull($item->turnoverOf24h); + self::assertNotNull($item->volumeOf24h); + self::assertNotNull($item->markPrice); + self::assertNotNull($item->indexPrice); + self::assertNotNull($item->lastTradePrice); + self::assertNotNull($item->nextFundingRateTime); + self::assertNotNull($item->maxLeverage); + self::assertNotNull($item->sourceExchanges); + self::assertNotNull($item->premiumsSymbol1M); + self::assertNotNull($item->premiumsSymbol8H); + self::assertNotNull($item->fundingBaseSymbol1M); + self::assertNotNull($item->fundingQuoteSymbol1M); + self::assertNotNull($item->lowPrice); + self::assertNotNull($item->highPrice); + self::assertNotNull($item->priceChgPct); + self::assertNotNull($item->priceChg); + self::assertNotNull($item->k); + self::assertNotNull($item->m); + self::assertNotNull($item->f); + self::assertNotNull($item->mmrLimit); + self::assertNotNull($item->mmrLevConstant); + self::assertNotNull($item->supportCross); + self::assertNotNull($item->buyLimit); + self::assertNotNull($item->sellLimit); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getTicker + * Get Ticker + * /api/v1/ticker + */ + public void testGetTicker() { + GetTickerReq.GetTickerReqBuilder builder = GetTickerReq.builder(); + builder.symbol(?); + GetTickerReq req = builder.build(); + GetTickerResp resp = this.api.getTicker(req); + self::assertNotNull($resp->sequence); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->side); + self::assertNotNull($resp->size); + self::assertNotNull($resp->tradeId); + self::assertNotNull($resp->price); + self::assertNotNull($resp->bestBidPrice); + self::assertNotNull($resp->bestBidSize); + self::assertNotNull($resp->bestAskPrice); + self::assertNotNull($resp->bestAskSize); + self::assertNotNull($resp->ts); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getAllTickers + * Get All Tickers + * /api/v1/allTickers + */ + public void testGetAllTickers() { + GetAllTickersResp resp = this.api.getAllTickers(); + foreach($resp->data as $item) { + self::assertNotNull($item->sequence); + self::assertNotNull($item->symbol); + self::assertNotNull($item->side); + self::assertNotNull($item->size); + self::assertNotNull($item->tradeId); + self::assertNotNull($item->price); + self::assertNotNull($item->bestBidPrice); + self::assertNotNull($item->bestBidSize); + self::assertNotNull($item->bestAskPrice); + self::assertNotNull($item->bestAskSize); + self::assertNotNull($item->ts); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getFullOrderBook + * Get Full OrderBook + * /api/v1/level2/snapshot + */ + public void testGetFullOrderBook() { + GetFullOrderBookReq.GetFullOrderBookReqBuilder builder = GetFullOrderBookReq.builder(); + builder.symbol(?); + GetFullOrderBookReq req = builder.build(); + GetFullOrderBookResp resp = this.api.getFullOrderBook(req); + self::assertNotNull($resp->sequence); + self::assertNotNull($resp->symbol); + foreach($resp->bids as $item) { + } + + foreach($resp->asks as $item) { + } + + self::assertNotNull($resp->ts); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getPartOrderBook + * Get Part OrderBook + * /api/v1/level2/depth{size} + */ + public void testGetPartOrderBook() { + GetPartOrderBookReq.GetPartOrderBookReqBuilder builder = GetPartOrderBookReq.builder(); + builder.size(?).symbol(?); + GetPartOrderBookReq req = builder.build(); + GetPartOrderBookResp resp = this.api.getPartOrderBook(req); + self::assertNotNull($resp->sequence); + self::assertNotNull($resp->symbol); + foreach($resp->bids as $item) { + } + + foreach($resp->asks as $item) { + } + + self::assertNotNull($resp->ts); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getTradeHistory + * Get Trade History + * /api/v1/trade/history + */ + public void testGetTradeHistory() { + GetTradeHistoryReq.GetTradeHistoryReqBuilder builder = GetTradeHistoryReq.builder(); + builder.symbol(?); + GetTradeHistoryReq req = builder.build(); + GetTradeHistoryResp resp = this.api.getTradeHistory(req); + foreach($resp->data as $item) { + self::assertNotNull($item->sequence); + self::assertNotNull($item->contractId); + self::assertNotNull($item->tradeId); + self::assertNotNull($item->makerOrderId); + self::assertNotNull($item->takerOrderId); + self::assertNotNull($item->ts); + self::assertNotNull($item->size); + self::assertNotNull($item->price); + self::assertNotNull($item->side); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getKlines + * Get Klines + * /api/v1/kline/query + */ + public void testGetKlines() { + GetKlinesReq.GetKlinesReqBuilder builder = GetKlinesReq.builder(); + builder.symbol(?).granularity(?).from(?).to(?); + GetKlinesReq req = builder.build(); + GetKlinesResp resp = this.api.getKlines(req); + foreach($resp->data as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getMarkPrice + * Get Mark Price + * /api/v1/mark-price/{symbol}/current + */ + public void testGetMarkPrice() { + GetMarkPriceReq.GetMarkPriceReqBuilder builder = GetMarkPriceReq.builder(); + builder.symbol(?); + GetMarkPriceReq req = builder.build(); + GetMarkPriceResp resp = this.api.getMarkPrice(req); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->granularity); + self::assertNotNull($resp->timePoint); + self::assertNotNull($resp->value); + self::assertNotNull($resp->indexPrice); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSpotIndexPrice + * Get Spot Index Price + * /api/v1/index/query + */ + public void testGetSpotIndexPrice() { + GetSpotIndexPriceReq.GetSpotIndexPriceReqBuilder builder = GetSpotIndexPriceReq.builder(); + builder.symbol(?).startAt(?).endAt(?).reverse(?).offset(?).forward(?).maxCount(?); + GetSpotIndexPriceReq req = builder.build(); + GetSpotIndexPriceResp resp = this.api.getSpotIndexPrice(req); + foreach($resp->dataList as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->granularity); + self::assertNotNull($item->timePoint); + self::assertNotNull($item->value); + self::assertNotNull($item->decomposionList); + } + + self::assertNotNull($resp->hasMore); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getInterestRateIndex + * Get Interest Rate Index + * /api/v1/interest/query + */ + public void testGetInterestRateIndex() { + GetInterestRateIndexReq.GetInterestRateIndexReqBuilder builder = GetInterestRateIndexReq.builder(); + builder.symbol(?).startAt(?).endAt(?).reverse(?).offset(?).forward(?).maxCount(?); + GetInterestRateIndexReq req = builder.build(); + GetInterestRateIndexResp resp = this.api.getInterestRateIndex(req); + foreach($resp->dataList as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->granularity); + self::assertNotNull($item->timePoint); + self::assertNotNull($item->value); + } + + self::assertNotNull($resp->hasMore); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getPremiumIndex + * Get Premium Index + * /api/v1/premium/query + */ + public void testGetPremiumIndex() { + GetPremiumIndexReq.GetPremiumIndexReqBuilder builder = GetPremiumIndexReq.builder(); + builder.symbol(?).startAt(?).endAt(?).reverse(?).offset(?).forward(?).maxCount(?); + GetPremiumIndexReq req = builder.build(); + GetPremiumIndexResp resp = this.api.getPremiumIndex(req); + foreach($resp->dataList as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->granularity); + self::assertNotNull($item->timePoint); + self::assertNotNull($item->value); + } + + self::assertNotNull($resp->hasMore); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * get24hrStats + * Get 24hr stats + * /api/v1/trade-statistics + */ + public void testGet24hrStats() { + Get24hrStatsResp resp = this.api.get24hrStats(); + self::assertNotNull($resp->turnoverOf24h); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getServerTime + * Get Server Time + * /api/v1/timestamp + */ + public void testGetServerTime() { + GetServerTimeResp resp = this.api.getServerTime(); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getServiceStatus + * Get Service Status + * /api/v1/status + */ + public void testGetServiceStatus() { + GetServiceStatusResp resp = this.api.getServiceStatus(); + self::assertNotNull($resp->msg); + self::assertNotNull($resp->status); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getPublicToken + * Get Public Token - Futures + * /api/v1/bullet-public + */ + public void testGetPublicToken() { + GetPublicTokenResp resp = this.api.getPublicToken(); + self::assertNotNull($resp->token); + foreach($resp->instanceServers as $item) { + self::assertNotNull($item->endpoint); + self::assertNotNull($item->encrypt); + self::assertNotNull($item->protocol); + self::assertNotNull($item->pingInterval); + self::assertNotNull($item->pingTimeout); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getPrivateToken + * Get Private Token - Futures + * /api/v1/bullet-private + */ + public void testGetPrivateToken() { + GetPrivateTokenResp resp = this.api.getPrivateToken(); + self::assertNotNull($resp->token); + foreach($resp->instanceServers as $item) { + self::assertNotNull($item->endpoint); + self::assertNotNull($item->encrypt); + self::assertNotNull($item->protocol); + self::assertNotNull($item->pingInterval); + self::assertNotNull($item->pingTimeout); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiAutoGeneratedTest.java new file mode 100644 index 00000000..78d7edcd --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiAutoGeneratedTest.java @@ -0,0 +1,764 @@ +package com.kucoin.universal.sdk.generate.futures.market; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class MarketApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** getSymbol Request Get Symbol /api/v1/contracts/{symbol} */ + public static void testGetSymbolRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\"}"; + GetSymbolReq obj = mapper.readValue(data, GetSymbolReq.class); + } + + /** getSymbol Response Get Symbol /api/v1/contracts/{symbol} */ + public static void testGetSymbolResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getAllSymbols Request Get All Symbols /api/v1/contracts/active */ + public static void testGetAllSymbolsRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getAllSymbols Response Get All Symbols /api/v1/contracts/active */ + public static void testGetAllSymbolsResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getTicker Request Get Ticker /api/v1/ticker */ + public static void testGetTickerRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\"}"; + GetTickerReq obj = mapper.readValue(data, GetTickerReq.class); + } + + /** getTicker Response Get Ticker /api/v1/ticker */ + public static void testGetTickerResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"sequence\":1697895100310,\"symbol\":\"XBTUSDM\",\"side\":\"sell\",\"size\":2936,\"tradeId\":\"1697901180000\",\"price\":\"67158.4\",\"bestBidPrice\":\"67169.6\",\"bestBidSize\":32345,\"bestAskPrice\":\"67169.7\",\"bestAskSize\":7251,\"ts\":1729163001780000000}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getAllTickers Request Get All Tickers /api/v1/allTickers */ + public static void testGetAllTickersRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getAllTickers Response Get All Tickers /api/v1/allTickers */ + public static void testGetAllTickersResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"sequence\": 1707992727046,\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"side\": \"sell\",\n" + + " \"size\": 21,\n" + + " \"tradeId\": \"1784299761369\",\n" + + " \"price\": \"67153\",\n" + + " \"bestBidPrice\": \"67153\",\n" + + " \"bestBidSize\": 2767,\n" + + " \"bestAskPrice\": \"67153.1\",\n" + + " \"bestAskSize\": 5368,\n" + + " \"ts\": 1729163466659000000\n" + + " },\n" + + " {\n" + + " \"sequence\": 1697895166299,\n" + + " \"symbol\": \"XBTUSDM\",\n" + + " \"side\": \"sell\",\n" + + " \"size\": 1956,\n" + + " \"tradeId\": \"1697901245065\",\n" + + " \"price\": \"67145.2\",\n" + + " \"bestBidPrice\": \"67135.3\",\n" + + " \"bestBidSize\": 1,\n" + + " \"bestAskPrice\": \"67135.8\",\n" + + " \"bestAskSize\": 3,\n" + + " \"ts\": 1729163445340000000\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getFullOrderBook Request Get Full OrderBook /api/v1/level2/snapshot */ + public static void testGetFullOrderBookRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDM\"}"; + GetFullOrderBookReq obj = mapper.readValue(data, GetFullOrderBookReq.class); + } + + /** getFullOrderBook Response Get Full OrderBook /api/v1/level2/snapshot */ + public static void testGetFullOrderBookResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"sequence\": 1697895963339,\n" + + " \"symbol\": \"XBTUSDM\",\n" + + " \"bids\": [\n" + + " [\n" + + " 66968,\n" + + " 2\n" + + " ],\n" + + " [\n" + + " 66964.8,\n" + + " 25596\n" + + " ]\n" + + " ],\n" + + " \"asks\": [\n" + + " [\n" + + " 66968.1,\n" + + " 13501\n" + + " ],\n" + + " [\n" + + " 66968.7,\n" + + " 2032\n" + + " ]\n" + + " ],\n" + + " \"ts\": 1729168101216000000\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getPartOrderBook Request Get Part OrderBook /api/v1/level2/depth{size} */ + public static void testGetPartOrderBookRequest() throws Exception { + String data = "{\"size\": \"20\", \"symbol\": \"XBTUSDM\"}"; + GetPartOrderBookReq obj = mapper.readValue(data, GetPartOrderBookReq.class); + } + + /** getPartOrderBook Response Get Part OrderBook /api/v1/level2/depth{size} */ + public static void testGetPartOrderBookResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"sequence\": 1697895963339,\n" + + " \"symbol\": \"XBTUSDM\",\n" + + " \"bids\": [\n" + + " [\n" + + " 66968,\n" + + " 2\n" + + " ],\n" + + " [\n" + + " 66964.8,\n" + + " 25596\n" + + " ]\n" + + " ],\n" + + " \"asks\": [\n" + + " [\n" + + " 66968.1,\n" + + " 13501\n" + + " ],\n" + + " [\n" + + " 66968.7,\n" + + " 2032\n" + + " ]\n" + + " ],\n" + + " \"ts\": 1729168101216000000\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getTradeHistory Request Get Trade History /api/v1/trade/history */ + public static void testGetTradeHistoryRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDM\"}"; + GetTradeHistoryReq obj = mapper.readValue(data, GetTradeHistoryReq.class); + } + + /** getTradeHistory Response Get Trade History /api/v1/trade/history */ + public static void testGetTradeHistoryResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"sequence\": 1697915257909,\n" + + " \"contractId\": 1,\n" + + " \"tradeId\": \"1697915257909\",\n" + + " \"makerOrderId\": \"236679665752801280\",\n" + + " \"takerOrderId\": \"236679667975745536\",\n" + + " \"ts\": 1729242032152000000,\n" + + " \"size\": 1,\n" + + " \"price\": \"67878\",\n" + + " \"side\": \"sell\"\n" + + " },\n" + + " {\n" + + " \"sequence\": 1697915257749,\n" + + " \"contractId\": 1,\n" + + " \"tradeId\": \"1697915257749\",\n" + + " \"makerOrderId\": \"236679660971245570\",\n" + + " \"takerOrderId\": \"236679665400492032\",\n" + + " \"ts\": 1729242031535000000,\n" + + " \"size\": 1,\n" + + " \"price\": \"67867.8\",\n" + + " \"side\": \"sell\"\n" + + " },\n" + + " {\n" + + " \"sequence\": 1697915257701,\n" + + " \"contractId\": 1,\n" + + " \"tradeId\": \"1697915257701\",\n" + + " \"makerOrderId\": \"236679660971245570\",\n" + + " \"takerOrderId\": \"236679661919211521\",\n" + + " \"ts\": 1729242030932000000,\n" + + " \"size\": 1,\n" + + " \"price\": \"67867.8\",\n" + + " \"side\": \"sell\"\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getKlines Request Get Klines /api/v1/kline/query */ + public static void testGetKlinesRequest() throws Exception { + String data = + "{\"symbol\": \"XBTUSDTM\", \"granularity\": 1, \"from\": 1728552342000, \"to\":" + + " 1729243542000}"; + GetKlinesReq obj = mapper.readValue(data, GetKlinesReq.class); + } + + /** getKlines Response Get Klines /api/v1/kline/query */ + public static void testGetKlinesResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " [\n" + + " 1728576000000,\n" + + " 60791.1,\n" + + " 61035,\n" + + " 58940,\n" + + " 60300,\n" + + " 5501167\n" + + " ],\n" + + " [\n" + + " 1728604800000,\n" + + " 60299.9,\n" + + " 60924.1,\n" + + " 60077.4,\n" + + " 60666.1,\n" + + " 1220980\n" + + " ],\n" + + " [\n" + + " 1728633600000,\n" + + " 60665.7,\n" + + " 62436.8,\n" + + " 60650.1,\n" + + " 62255.1,\n" + + " 3386359\n" + + " ]\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getMarkPrice Request Get Mark Price /api/v1/mark-price/{symbol}/current */ + public static void testGetMarkPriceRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\"}"; + GetMarkPriceReq obj = mapper.readValue(data, GetMarkPriceReq.class); + } + + /** getMarkPrice Response Get Mark Price /api/v1/mark-price/{symbol}/current */ + public static void testGetMarkPriceResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"symbol\":\"XBTUSDTM\",\"granularity\":1000,\"timePoint\":1729254307000,\"value\":67687.08,\"indexPrice\":67683.58}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getSpotIndexPrice Request Get Spot Index Price /api/v1/index/query */ + public static void testGetSpotIndexPriceRequest() throws Exception { + String data = + "{\"symbol\": \".KXBTUSDT\", \"startAt\": 123456, \"endAt\": 123456, \"reverse\": true," + + " \"offset\": 123456, \"forward\": true, \"maxCount\": 10}"; + GetSpotIndexPriceReq obj = mapper.readValue(data, GetSpotIndexPriceReq.class); + } + + /** getSpotIndexPrice Response Get Spot Index Price /api/v1/index/query */ + public static void testGetSpotIndexPriceResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"hasMore\": true,\n" + + " \"dataList\": [\n" + + " {\n" + + " \"symbol\": \".KXBTUSDT\",\n" + + " \"granularity\": 1000,\n" + + " \"timePoint\": 1730557515000,\n" + + " \"value\": 69202.94,\n" + + " \"decomposionList\": [\n" + + " {\n" + + " \"exchange\": \"gateio\",\n" + + " \"price\": 69209.27,\n" + + " \"weight\": 0.0533\n" + + " },\n" + + " {\n" + + " \"exchange\": \"bitmart\",\n" + + " \"price\": 69230.77,\n" + + " \"weight\": 0.0128\n" + + " },\n" + + " {\n" + + " \"exchange\": \"okex\",\n" + + " \"price\": 69195.34,\n" + + " \"weight\": 0.11\n" + + " },\n" + + " {\n" + + " \"exchange\": \"bybit\",\n" + + " \"price\": 69190.33,\n" + + " \"weight\": 0.0676\n" + + " },\n" + + " {\n" + + " \"exchange\": \"binance\",\n" + + " \"price\": 69204.55,\n" + + " \"weight\": 0.6195\n" + + " },\n" + + " {\n" + + " \"exchange\": \"kucoin\",\n" + + " \"price\": 69202.91,\n" + + " \"weight\": 0.1368\n" + + " }\n" + + " ]\n" + + " },\n" + + " {\n" + + " \"symbol\": \".KXBTUSDT\",\n" + + " \"granularity\": 1000,\n" + + " \"timePoint\": 1730557514000,\n" + + " \"value\": 69204.98,\n" + + " \"decomposionList\": [\n" + + " {\n" + + " \"exchange\": \"gateio\",\n" + + " \"price\": 69212.71,\n" + + " \"weight\": 0.0808\n" + + " },\n" + + " {\n" + + " \"exchange\": \"bitmart\",\n" + + " \"price\": 69230.77,\n" + + " \"weight\": 0.0134\n" + + " },\n" + + " {\n" + + " \"exchange\": \"okex\",\n" + + " \"price\": 69195.49,\n" + + " \"weight\": 0.0536\n" + + " },\n" + + " {\n" + + " \"exchange\": \"bybit\",\n" + + " \"price\": 69195.97,\n" + + " \"weight\": 0.0921\n" + + " },\n" + + " {\n" + + " \"exchange\": \"binance\",\n" + + " \"price\": 69204.56,\n" + + " \"weight\": 0.5476\n" + + " },\n" + + " {\n" + + " \"exchange\": \"kucoin\",\n" + + " \"price\": 69207.8,\n" + + " \"weight\": 0.2125\n" + + " }\n" + + " ]\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getInterestRateIndex Request Get Interest Rate Index /api/v1/interest/query */ + public static void testGetInterestRateIndexRequest() throws Exception { + String data = + "{\"symbol\": \".XBTINT8H\", \"startAt\": 1728663338000, \"endAt\": 1728692138000," + + " \"reverse\": true, \"offset\": 254062248624417, \"forward\": true, \"maxCount\":" + + " 10}"; + GetInterestRateIndexReq obj = mapper.readValue(data, GetInterestRateIndexReq.class); + } + + /** getInterestRateIndex Response Get Interest Rate Index /api/v1/interest/query */ + public static void testGetInterestRateIndexResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"dataList\": [\n" + + " {\n" + + " \"symbol\": \".XBTINT\",\n" + + " \"granularity\": 60000,\n" + + " \"timePoint\": 1728692100000,\n" + + " \"value\": 3.0E-4\n" + + " },\n" + + " {\n" + + " \"symbol\": \".XBTINT\",\n" + + " \"granularity\": 60000,\n" + + " \"timePoint\": 1728692040000,\n" + + " \"value\": 3.0E-4\n" + + " }\n" + + " ],\n" + + " \"hasMore\": true\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getPremiumIndex Request Get Premium Index /api/v1/premium/query */ + public static void testGetPremiumIndexRequest() throws Exception { + String data = + "{\"symbol\": \".XBTUSDTMPI\", \"startAt\": 1728663338000, \"endAt\": 1728692138000," + + " \"reverse\": true, \"offset\": 254062248624417, \"forward\": true, \"maxCount\":" + + " 10}"; + GetPremiumIndexReq obj = mapper.readValue(data, GetPremiumIndexReq.class); + } + + /** getPremiumIndex Response Get Premium Index /api/v1/premium/query */ + public static void testGetPremiumIndexResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"hasMore\": true,\n" + + " \"dataList\": [\n" + + " {\n" + + " \"symbol\": \".XBTUSDTMPI\",\n" + + " \"granularity\": 60000,\n" + + " \"timePoint\": 1730558040000,\n" + + " \"value\": 0.00006\n" + + " },\n" + + " {\n" + + " \"symbol\": \".XBTUSDTMPI\",\n" + + " \"granularity\": 60000,\n" + + " \"timePoint\": 1730557980000,\n" + + " \"value\": -0.000025\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** get24hrStats Request Get 24hr stats /api/v1/trade-statistics */ + public static void testGet24hrStatsRequest() throws Exception { + // $this->assertTrue(true); + } + + /** get24hrStats Response Get 24hr stats /api/v1/trade-statistics */ + public static void testGet24hrStatsResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":{\"turnoverOf24h\":1.1155733413273683E9}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getServerTime Request Get Server Time /api/v1/timestamp */ + public static void testGetServerTimeRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getServerTime Response Get Server Time /api/v1/timestamp */ + public static void testGetServerTimeResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":1729260030774}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getServiceStatus Request Get Service Status /api/v1/status */ + public static void testGetServiceStatusRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getServiceStatus Response Get Service Status /api/v1/status */ + public static void testGetServiceStatusResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":{\"msg\":\"\",\"status\":\"open\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getPublicToken Request Get Public Token - Futures /api/v1/bullet-public */ + public static void testGetPublicTokenRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getPublicToken Response Get Public Token - Futures /api/v1/bullet-public */ + public static void testGetPublicTokenResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"token\":\"2neAiuYvAU61ZDXANAGAsiL4-iAExhsBXZxftpOeh_55i3Ysy2q2LEsEWU64mdzUOPusi34M_wGoSf7iNyEWJ6dACm4ny9vJtLTRq_YsRUlG5ADnAawegdiYB9J6i9GjsxUuhPw3Blq6rhZlGykT3Vp1phUafnulOOpts-MEmEF-3bpfetLOAjsMMBS5qwTWJBvJHl5Vs9Y=.gJEIAywPXFr_4L-WG10eug==\",\"instanceServers\":[{\"endpoint\":\"wss://ws-api-futures.kucoin.com/\",\"encrypt\":true,\"protocol\":\"websocket\",\"pingInterval\":18000,\"pingTimeout\":10000}]}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getPrivateToken Request Get Private Token - Futures /api/v1/bullet-private */ + public static void testGetPrivateTokenRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getPrivateToken Response Get Private Token - Futures /api/v1/bullet-private */ + public static void testGetPrivateTokenResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"token\":" + + " \"2neAiuYvAU737TOajb2U3uT8AEZqSWYe0fBD4LoHuXJDSC7gIzJiH4kNTWhCPISWo6nDpAe7aUaaHJ4fG8oRjFgMfUI2sM4IySWHrBceFocY8pKy2REU1HwZIngtMdMrjqPnP-biofFWbNaP1cl0X1pZc2SQ-33hDH1LgNP-yg8bktVoIG0dIxSN4m3uzO8u.ueCCihQ5_4GPpXKxWTDiFQ==\",\n" + + " \"instanceServers\": [\n" + + " {\n" + + " \"endpoint\": \"wss://ws-api-futures.kucoin.com/\",\n" + + " \"encrypt\": true,\n" + + " \"protocol\": \"websocket\",\n" + + " \"pingInterval\": 18000,\n" + + " \"pingTimeout\": 10000\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(MarketApiAutoGeneratedTest::testGetSymbolRequest, "testGetSymbolRequest"); + run(MarketApiAutoGeneratedTest::testGetSymbolResponse, "testGetSymbolResponse"); + run(MarketApiAutoGeneratedTest::testGetAllSymbolsRequest, "testGetAllSymbolsRequest"); + run(MarketApiAutoGeneratedTest::testGetAllSymbolsResponse, "testGetAllSymbolsResponse"); + run(MarketApiAutoGeneratedTest::testGetTickerRequest, "testGetTickerRequest"); + run(MarketApiAutoGeneratedTest::testGetTickerResponse, "testGetTickerResponse"); + run(MarketApiAutoGeneratedTest::testGetAllTickersRequest, "testGetAllTickersRequest"); + run(MarketApiAutoGeneratedTest::testGetAllTickersResponse, "testGetAllTickersResponse"); + run(MarketApiAutoGeneratedTest::testGetFullOrderBookRequest, "testGetFullOrderBookRequest"); + run(MarketApiAutoGeneratedTest::testGetFullOrderBookResponse, "testGetFullOrderBookResponse"); + run(MarketApiAutoGeneratedTest::testGetPartOrderBookRequest, "testGetPartOrderBookRequest"); + run(MarketApiAutoGeneratedTest::testGetPartOrderBookResponse, "testGetPartOrderBookResponse"); + run(MarketApiAutoGeneratedTest::testGetTradeHistoryRequest, "testGetTradeHistoryRequest"); + run(MarketApiAutoGeneratedTest::testGetTradeHistoryResponse, "testGetTradeHistoryResponse"); + run(MarketApiAutoGeneratedTest::testGetKlinesRequest, "testGetKlinesRequest"); + run(MarketApiAutoGeneratedTest::testGetKlinesResponse, "testGetKlinesResponse"); + run(MarketApiAutoGeneratedTest::testGetMarkPriceRequest, "testGetMarkPriceRequest"); + run(MarketApiAutoGeneratedTest::testGetMarkPriceResponse, "testGetMarkPriceResponse"); + run(MarketApiAutoGeneratedTest::testGetSpotIndexPriceRequest, "testGetSpotIndexPriceRequest"); + run(MarketApiAutoGeneratedTest::testGetSpotIndexPriceResponse, "testGetSpotIndexPriceResponse"); + run( + MarketApiAutoGeneratedTest::testGetInterestRateIndexRequest, + "testGetInterestRateIndexRequest"); + run( + MarketApiAutoGeneratedTest::testGetInterestRateIndexResponse, + "testGetInterestRateIndexResponse"); + run(MarketApiAutoGeneratedTest::testGetPremiumIndexRequest, "testGetPremiumIndexRequest"); + run(MarketApiAutoGeneratedTest::testGetPremiumIndexResponse, "testGetPremiumIndexResponse"); + run(MarketApiAutoGeneratedTest::testGet24hrStatsRequest, "testGet24hrStatsRequest"); + run(MarketApiAutoGeneratedTest::testGet24hrStatsResponse, "testGet24hrStatsResponse"); + run(MarketApiAutoGeneratedTest::testGetServerTimeRequest, "testGetServerTimeRequest"); + run(MarketApiAutoGeneratedTest::testGetServerTimeResponse, "testGetServerTimeResponse"); + run(MarketApiAutoGeneratedTest::testGetServiceStatusRequest, "testGetServiceStatusRequest"); + run(MarketApiAutoGeneratedTest::testGetServiceStatusResponse, "testGetServiceStatusResponse"); + run(MarketApiAutoGeneratedTest::testGetPublicTokenRequest, "testGetPublicTokenRequest"); + run(MarketApiAutoGeneratedTest::testGetPublicTokenResponse, "testGetPublicTokenResponse"); + run(MarketApiAutoGeneratedTest::testGetPrivateTokenRequest, "testGetPrivateTokenRequest"); + run(MarketApiAutoGeneratedTest::testGetPrivateTokenResponse, "testGetPrivateTokenResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiImpl.java new file mode 100644 index 00000000..a88682bd --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiImpl.java @@ -0,0 +1,116 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.market; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class MarketApiImpl implements MarketApi { + private final Transport transport; + + public MarketApiImpl(Transport transport) { + this.transport = transport; + } + + public GetSymbolResp getSymbol(GetSymbolReq req) { + return this.transport.call( + "futures", false, "GET", "/api/v1/contracts/{symbol}", req, GetSymbolResp.class, false); + } + + public GetAllSymbolsResp getAllSymbols() { + return this.transport.call( + "futures", false, "GET", "/api/v1/contracts/active", null, GetAllSymbolsResp.class, false); + } + + public GetTickerResp getTicker(GetTickerReq req) { + return this.transport.call( + "futures", false, "GET", "/api/v1/ticker", req, GetTickerResp.class, false); + } + + public GetAllTickersResp getAllTickers() { + return this.transport.call( + "futures", false, "GET", "/api/v1/allTickers", null, GetAllTickersResp.class, false); + } + + public GetFullOrderBookResp getFullOrderBook(GetFullOrderBookReq req) { + return this.transport.call( + "futures", false, "GET", "/api/v1/level2/snapshot", req, GetFullOrderBookResp.class, false); + } + + public GetPartOrderBookResp getPartOrderBook(GetPartOrderBookReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/level2/depth{size}", + req, + GetPartOrderBookResp.class, + false); + } + + public GetTradeHistoryResp getTradeHistory(GetTradeHistoryReq req) { + return this.transport.call( + "futures", false, "GET", "/api/v1/trade/history", req, GetTradeHistoryResp.class, false); + } + + public GetKlinesResp getKlines(GetKlinesReq req) { + return this.transport.call( + "futures", false, "GET", "/api/v1/kline/query", req, GetKlinesResp.class, false); + } + + public GetMarkPriceResp getMarkPrice(GetMarkPriceReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/mark-price/{symbol}/current", + req, + GetMarkPriceResp.class, + false); + } + + public GetSpotIndexPriceResp getSpotIndexPrice(GetSpotIndexPriceReq req) { + return this.transport.call( + "futures", false, "GET", "/api/v1/index/query", req, GetSpotIndexPriceResp.class, false); + } + + public GetInterestRateIndexResp getInterestRateIndex(GetInterestRateIndexReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/interest/query", + req, + GetInterestRateIndexResp.class, + false); + } + + public GetPremiumIndexResp getPremiumIndex(GetPremiumIndexReq req) { + return this.transport.call( + "futures", false, "GET", "/api/v1/premium/query", req, GetPremiumIndexResp.class, false); + } + + public Get24hrStatsResp get24hrStats() { + return this.transport.call( + "futures", false, "GET", "/api/v1/trade-statistics", null, Get24hrStatsResp.class, false); + } + + public GetServerTimeResp getServerTime() { + return this.transport.call( + "futures", false, "GET", "/api/v1/timestamp", null, GetServerTimeResp.class, false); + } + + public GetServiceStatusResp getServiceStatus() { + return this.transport.call( + "futures", false, "GET", "/api/v1/status", null, GetServiceStatusResp.class, false); + } + + public GetPublicTokenResp getPublicToken() { + return this.transport.call( + "futures", false, "POST", "/api/v1/bullet-public", null, GetPublicTokenResp.class, false); + } + + public GetPrivateTokenResp getPrivateToken() { + return this.transport.call( + "futures", false, "POST", "/api/v1/bullet-private", null, GetPrivateTokenResp.class, false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddOrderReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddOrderReq.java new file mode 100644 index 00000000..3fb71e69 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddOrderReq.java @@ -0,0 +1,429 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddOrderReq implements Request { + /** + * 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 (-). + */ + @JsonProperty("clientOid") + private String clientOid; + + /** Specify if the order is to 'buy' or 'sell'. */ + @JsonProperty("side") + private SideEnum side; + + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** + * Used to calculate the margin to be frozen for the order. If you are to close the position, this + * parameter is not required. + */ + @JsonProperty("leverage") + private Integer leverage; + + /** Specify if the order is a 'limit' order or 'market' order */ + @JsonProperty("type") + @Builder.Default + private TypeEnum type = TypeEnum.LIMIT; + + /** Remark for the order: Length cannot exceed 100 utf8 characters */ + @JsonProperty("remark") + private String remark; + + /** + * Either 'down' or 'up'. If stop is used, parameter stopPrice and stopPriceType also need to be + * provided. + */ + @JsonProperty("stop") + private StopEnum stop; + + /** Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. */ + @JsonProperty("stopPriceType") + private StopPriceTypeEnum stopPriceType; + + /** Needs to be defined if stop is specified. */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** + * 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. + */ + @JsonProperty("reduceOnly") + @Builder.Default + private Boolean reduceOnly = false; + + /** + * 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. + */ + @JsonProperty("closeOrder") + @Builder.Default + private Boolean closeOrder = false; + + /** + * 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. + */ + @JsonProperty("forceHold") + @Builder.Default + private Boolean forceHold = false; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these + * strategies: CN, CO, CB. DC not currently supported. + */ + @JsonProperty("stp") + private StpEnum stp; + + /** Margin mode: ISOLATED, CROSS, default: ISOLATED */ + @JsonProperty("marginMode") + @Builder.Default + private MarginModeEnum marginMode = MarginModeEnum.ISOLATED; + + /** Required for type is 'limit' order, indicating the operating price */ + @JsonProperty("price") + private String price; + + /** + * **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. + */ + @JsonProperty("size") + private Integer size; + + /** + * 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 + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GOODTILLCANCELED; + + /** + * 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. + */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** + * Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, + * choosing postOnly is not allowed. + */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = false; + + /** + * 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. + */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = 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. + * Need to be defined if iceberg is specified. + */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** + * **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. + */ + @JsonProperty("qty") + private String qty; + + /** + * **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. + */ + @JsonProperty("valueQty") + private String valueQty; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopEnum { + /** Triggers when the price reaches or goes below the stopPrice. */ + DOWN("down"), + /** Triggers when the price reaches or goes above the stopPrice. */ + UP("up"); + + private final String value; + + StopEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopEnum fromValue(String value) { + for (StopEnum b : StopEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopPriceTypeEnum { + /** + * 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. + */ + TRADEPRICE("TP"), + /** + * MP for mark price. The mark price can be obtained through relevant OPEN API for index + * services. + */ + MARKPRICE("MP"), + /** + * IP for index price. The index price can be obtained through relevant OPEN API for index + * services. + */ + INDEXPRICE("IP"); + + private final String value; + + StopPriceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopPriceTypeEnum fromValue(String value) { + for (StopPriceTypeEnum b : StopPriceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** Cancel new, Cancel the new order */ + CN("CN"), + /** Cancel old, Cancel the old order */ + CO("CO"), + /** Cancel both, Cancel both sides */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum MarginModeEnum { + /** Isolated Margin */ + ISOLATED("ISOLATED"), + /** Cross Margin */ + CROSS("CROSS"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** + * Order remains open on the order book until canceled. This is the default type if the field is + * left empty. + */ + GOODTILLCANCELED("GTC"), + /** + * Being matched or not, the remaining size of the order will be instantly canceled instead of + * entering the order book. + */ + IMMEDIATEORCANCEL("IOC"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddOrderResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddOrderResp.java new file mode 100644 index 00000000..0d3318ee --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddOrderResp.java @@ -0,0 +1,37 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public 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. + */ + @JsonProperty("orderId") + private String orderId; + + /** The user self-defined order ID. */ + @JsonProperty("clientOid") + private String clientOid; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddOrderTestReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddOrderTestReq.java new file mode 100644 index 00000000..d8c68c14 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddOrderTestReq.java @@ -0,0 +1,429 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddOrderTestReq implements Request { + /** + * 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(-) + */ + @JsonProperty("clientOid") + private String clientOid; + + /** specify if the order is to 'buy' or 'sell' */ + @JsonProperty("side") + private SideEnum side; + + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** + * Used to calculate the margin to be frozen for the order. If you are to close the position, this + * parameter is not required. + */ + @JsonProperty("leverage") + private Integer leverage; + + /** specify if the order is an 'limit' order or 'market' order */ + @JsonProperty("type") + @Builder.Default + private TypeEnum type = TypeEnum.LIMIT; + + /** remark for the order, length cannot exceed 100 utf8 characters */ + @JsonProperty("remark") + private String remark; + + /** + * Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be + * provieded. + */ + @JsonProperty("stop") + private StopEnum stop; + + /** Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. */ + @JsonProperty("stopPriceType") + private StopPriceTypeEnum stopPriceType; + + /** Need to be defined if stop is specified. */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** + * 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. + */ + @JsonProperty("reduceOnly") + @Builder.Default + private Boolean reduceOnly = false; + + /** + * 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. + */ + @JsonProperty("closeOrder") + @Builder.Default + private Boolean closeOrder = 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. + */ + @JsonProperty("forceHold") + @Builder.Default + private Boolean forceHold = 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. + */ + @JsonProperty("stp") + private StpEnum stp; + + /** Margin mode: ISOLATED, CROSS, default: ISOLATED */ + @JsonProperty("marginMode") + @Builder.Default + private MarginModeEnum marginMode = MarginModeEnum.ISOLATED; + + /** Required for type is 'limit' order, indicating the operating price */ + @JsonProperty("price") + private String price; + + /** + * **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. + */ + @JsonProperty("size") + private Integer size; + + /** + * 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 + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GOODTILLCANCELED; + + /** + * 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. + */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** + * Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not + * allowed choose postOnly. + */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = 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. + */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = 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. + * Need to be defined if iceberg is specified. + */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** + * **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 + */ + @JsonProperty("qty") + private String qty; + + /** + * **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 + */ + @JsonProperty("valueQty") + private String valueQty; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopEnum { + /** Triggers when the price reaches or goes below the stopPrice. */ + DOWN("down"), + /** Triggers when the price reaches or goes above the stopPrice */ + UP("up"); + + private final String value; + + StopEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopEnum fromValue(String value) { + for (StopEnum b : StopEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopPriceTypeEnum { + /** + * 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. + */ + TRADEPRICE("TP"), + /** + * MP for mark price, The mark price can be obtained through relevant OPEN API for index + * services + */ + MARKPRICE("MP"), + /** + * IP for index price, The index price can be obtained through relevant OPEN API for index + * services + */ + INDEXPRICE("IP"); + + private final String value; + + StopPriceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopPriceTypeEnum fromValue(String value) { + for (StopPriceTypeEnum b : StopPriceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** Cancel new, Cancel the new order */ + CN("CN"), + /** Cancel old, Cancel the old order */ + CO("CO"), + /** Cancel both, Cancel both sides */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum MarginModeEnum { + /** */ + ISOLATED("ISOLATED"), + /** */ + CROSS("CROSS"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** + * order remains open on the order book until canceled. This is the default type if the field is + * left empty. + */ + GOODTILLCANCELED("GTC"), + /** + * being matched or not, the remaining size of the order will be instantly canceled instead of + * entering the order book. + */ + IMMEDIATEORCANCEL("IOC"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddOrderTestResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddOrderTestResp.java new file mode 100644 index 00000000..ac66b20b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddOrderTestResp.java @@ -0,0 +1,38 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public 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. + */ + @JsonProperty("orderId") + private String orderId; + + /** The user self-defined order id. */ + @JsonProperty("clientOid") + private String clientOid; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddTPSLOrderReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddTPSLOrderReq.java new file mode 100644 index 00000000..9d917cd9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddTPSLOrderReq.java @@ -0,0 +1,393 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddTPSLOrderReq implements Request { + /** + * 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(-) + */ + @JsonProperty("clientOid") + private String clientOid; + + /** specify if the order is to 'buy' or 'sell' */ + @JsonProperty("side") + private SideEnum side; + + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** + * Used to calculate the margin to be frozen for the order. If you are to close the position, this + * parameter is not required. + */ + @JsonProperty("leverage") + private Integer leverage; + + /** specify if the order is an 'limit' order or 'market' order */ + @JsonProperty("type") + @Builder.Default + private TypeEnum type = TypeEnum.LIMIT; + + /** remark for the order, length cannot exceed 100 utf8 characters */ + @JsonProperty("remark") + private String remark; + + /** Either 'TP', 'IP' or 'MP' */ + @JsonProperty("stopPriceType") + private StopPriceTypeEnum stopPriceType; + + /** + * 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. + */ + @JsonProperty("reduceOnly") + @Builder.Default + private Boolean reduceOnly = false; + + /** + * 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. + */ + @JsonProperty("closeOrder") + @Builder.Default + private Boolean closeOrder = 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. + */ + @JsonProperty("forceHold") + @Builder.Default + private Boolean forceHold = 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. + */ + @JsonProperty("stp") + private StpEnum stp; + + /** Margin mode: ISOLATED, CROSS, default: ISOLATED */ + @JsonProperty("marginMode") + @Builder.Default + private MarginModeEnum marginMode = MarginModeEnum.ISOLATED; + + /** Required for type is 'limit' order, indicating the operating price */ + @JsonProperty("price") + private String price; + + /** + * **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. + */ + @JsonProperty("size") + private Integer size; + + /** + * 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 + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GOODTILLCANCELED; + + /** + * 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. + */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** + * Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not + * allowed choose postOnly. + */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = 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. + */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = 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. + * Need to be defined if iceberg is specified. + */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** Take profit price */ + @JsonProperty("triggerStopUpPrice") + private String triggerStopUpPrice; + + /** Stop loss price */ + @JsonProperty("triggerStopDownPrice") + private String triggerStopDownPrice; + + /** + * **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 + */ + @JsonProperty("qty") + private String qty; + + /** + * **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 + */ + @JsonProperty("valueQty") + private String valueQty; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** limit order */ + LIMIT("limit"), + /** market order */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopPriceTypeEnum { + /** + * 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. + */ + TRADEPRICE("TP"), + /** + * MP for mark price, The mark price can be obtained through relevant OPEN API for index + * services + */ + MARKPRICE("MP"), + /** + * IP for index price, The index price can be obtained through relevant OPEN API for index + * services + */ + INDEXPRICE("IP"); + + private final String value; + + StopPriceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopPriceTypeEnum fromValue(String value) { + for (StopPriceTypeEnum b : StopPriceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** Cancel new, Cancel the new order */ + CN("CN"), + /** Cancel old, Cancel the old order */ + CO("CO"), + /** Cancel both, Cancel both sides */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum MarginModeEnum { + /** */ + ISOLATED("ISOLATED"), + /** */ + CROSS("CROSS"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** + * order remains open on the order book until canceled. This is the default type if the field is + * left empty. + */ + GOODTILLCANCELED("GTC"), + /** + * being matched or not, the remaining size of the order will be instantly canceled instead of + * entering the order book. + */ + IMMEDIATEORCANCEL("IOC"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddTPSLOrderResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddTPSLOrderResp.java new file mode 100644 index 00000000..d512db0f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/AddTPSLOrderResp.java @@ -0,0 +1,38 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public 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. + */ + @JsonProperty("orderId") + private String orderId; + + /** The user self-defined order id. */ + @JsonProperty("clientOid") + private String clientOid; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersData.java new file mode 100644 index 00000000..ed7a95bd --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersData.java @@ -0,0 +1,44 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchAddOrdersData { + /** + * The unique order id generated by the trading system,which can be used later for further actions + * such as canceling the order. + */ + @JsonProperty("orderId") + private String orderId; + + /** + * 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(-) + */ + @JsonProperty("clientOid") + private String clientOid; + + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("code") + private String code; + + /** */ + @JsonProperty("msg") + private String msg; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersItem.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersItem.java new file mode 100644 index 00000000..2a869def --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersItem.java @@ -0,0 +1,428 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchAddOrdersItem implements Request { + /** + * 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(-) + */ + @JsonProperty("clientOid") + private String clientOid; + + /** specify if the order is to 'buy' or 'sell' */ + @JsonProperty("side") + private SideEnum side; + + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-221752070) + */ + @JsonProperty("symbol") + private String symbol; + + /** + * Used to calculate the margin to be frozen for the order. If you are to close the position, this + * parameter is not required. + */ + @JsonProperty("leverage") + private Integer leverage; + + /** specify if the order is an 'limit' order or 'market' order */ + @JsonProperty("type") + @Builder.Default + private TypeEnum type = TypeEnum.LIMIT; + + /** remark for the order, length cannot exceed 100 utf8 characters */ + @JsonProperty("remark") + private String remark; + + /** + * Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be + * provieded. + */ + @JsonProperty("stop") + private StopEnum stop; + + /** Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. */ + @JsonProperty("stopPriceType") + private StopPriceTypeEnum stopPriceType; + + /** Need to be defined if stop is specified. */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** + * 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. + */ + @JsonProperty("reduceOnly") + @Builder.Default + private Boolean reduceOnly = false; + + /** + * 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. + */ + @JsonProperty("closeOrder") + @Builder.Default + private Boolean closeOrder = 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. + */ + @JsonProperty("forceHold") + @Builder.Default + private Boolean forceHold = 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. + */ + @JsonProperty("stp") + private StpEnum stp; + + /** Margin mode: ISOLATED, CROSS, default: ISOLATED */ + @JsonProperty("marginMode") + @Builder.Default + private MarginModeEnum marginMode = MarginModeEnum.ISOLATED; + + /** Required for type is 'limit' order, indicating the operating price */ + @JsonProperty("price") + private String price; + + /** + * **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. + */ + @JsonProperty("size") + private Integer size; + + /** + * 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 + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GOODTILLCANCELED; + + /** + * 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. + */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** + * Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not + * allowed choose postOnly. + */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = 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. + */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = 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. + */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** + * **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 + */ + @JsonProperty("qty") + private String qty; + + /** + * **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 + */ + @JsonProperty("valueQty") + private String valueQty; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopEnum { + /** Triggers when the price reaches or goes below the stopPrice. */ + DOWN("down"), + /** Triggers when the price reaches or goes above the stopPrice */ + UP("up"); + + private final String value; + + StopEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopEnum fromValue(String value) { + for (StopEnum b : StopEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopPriceTypeEnum { + /** + * 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. + */ + TRADEPRICE("TP"), + /** + * MP for mark price, The mark price can be obtained through relevant OPEN API for index + * services + */ + MARKPRICE("MP"), + /** + * IP for index price, The index price can be obtained through relevant OPEN API for index + * services + */ + INDEXPRICE("IP"); + + private final String value; + + StopPriceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopPriceTypeEnum fromValue(String value) { + for (StopPriceTypeEnum b : StopPriceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** Cancel new, Cancel the new order */ + CN("CN"), + /** Cancel old, Cancel the old order */ + CO("CO"), + /** Cancel both, Cancel both sides */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum MarginModeEnum { + /** */ + ISOLATED("ISOLATED"), + /** */ + CROSS("CROSS"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** + * order remains open on the order book until canceled. This is the default type if the field is + * left empty. + */ + GOODTILLCANCELED("GTC"), + /** + * being matched or not, the remaining size of the order will be instantly canceled instead of + * entering the order book. + */ + IMMEDIATEORCANCEL("IOC"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersReq.java new file mode 100644 index 00000000..f4c2230a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersReq.java @@ -0,0 +1,34 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchAddOrdersReq implements Request { + /** */ + @JsonProperty("items") + @Builder.Default + private List items = new ArrayList<>(); + + @JsonCreator + public static BatchAddOrdersReq fromJson(List data) { + // raw array + BatchAddOrdersReq obj = new BatchAddOrdersReq(); + obj.items = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersResp.java new file mode 100644 index 00000000..92cdbbaa --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchAddOrdersResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static BatchAddOrdersResp fromJson(List data) { + // original response + BatchAddOrdersResp obj = new BatchAddOrdersResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersClientOidsList.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersClientOidsList.java new file mode 100644 index 00000000..11543472 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersClientOidsList.java @@ -0,0 +1,29 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchCancelOrdersClientOidsList implements Request { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("clientOid") + private String clientOid; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersData.java new file mode 100644 index 00000000..e13e14f1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersData.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchCancelOrdersData { + /** */ + @JsonProperty("orderId") + private String orderId; + + /** */ + @JsonProperty("clientOid") + private String clientOid; + + /** */ + @JsonProperty("code") + private String code; + + /** */ + @JsonProperty("msg") + private String msg; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersReq.java new file mode 100644 index 00000000..2465f747 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchCancelOrdersReq implements Request { + /** the list of orderId */ + @JsonProperty("orderIdsList") + @Builder.Default + private List orderIdsList = new ArrayList<>(); + + /** the list of client orderId */ + @JsonProperty("clientOidsList") + @Builder.Default + private List clientOidsList = new ArrayList<>(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersResp.java new file mode 100644 index 00000000..797e7d24 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchCancelOrdersResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static BatchCancelOrdersResp fromJson(List data) { + // original response + BatchCancelOrdersResp obj = new BatchCancelOrdersResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllOrdersV1Req.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllOrdersV1Req.java new file mode 100644 index 00000000..e9cdbf67 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllOrdersV1Req.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelAllOrdersV1Req implements Request { + /** + * 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) + */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllOrdersV1Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllOrdersV1Resp.java new file mode 100644 index 00000000..ae7618ed --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllOrdersV1Resp.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelAllOrdersV1Resp + implements Response> { + /** Unique ID of the canceled order */ + @JsonProperty("cancelledOrderIds") + private List cancelledOrderIds = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllOrdersV3Req.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllOrdersV3Req.java new file mode 100644 index 00000000..fbb1aa37 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllOrdersV3Req.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelAllOrdersV3Req implements Request { + /** + * Cancel all limit orders for a specific symbol only, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllOrdersV3Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllOrdersV3Resp.java new file mode 100644 index 00000000..a9c9860d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllOrdersV3Resp.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelAllOrdersV3Resp + implements Response> { + /** Unique ID of the cancelled order */ + @JsonProperty("cancelledOrderIds") + private List cancelledOrderIds = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllStopOrdersReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllStopOrdersReq.java new file mode 100644 index 00000000..505f7e88 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllStopOrdersReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelAllStopOrdersReq implements Request { + /** + * 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) + */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllStopOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllStopOrdersResp.java new file mode 100644 index 00000000..3890ca69 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelAllStopOrdersResp.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelAllStopOrdersResp + implements Response> { + /** Unique ID of the cancelled order */ + @JsonProperty("cancelledOrderIds") + private List cancelledOrderIds = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelOrderByClientOidReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelOrderByClientOidReq.java new file mode 100644 index 00000000..1fd4ff8a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelOrderByClientOidReq.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByClientOidReq implements Request { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** client order id */ + @JsonIgnore + @PathVar("clientOid") + @JsonProperty("clientOid") + private String clientOid; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelOrderByClientOidResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelOrderByClientOidResp.java new file mode 100644 index 00000000..c20b39e8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelOrderByClientOidResp.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByClientOidResp + implements Response> { + /** */ + @JsonProperty("clientOid") + private String clientOid; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelOrderByIdReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelOrderByIdReq.java new file mode 100644 index 00000000..75be46ab --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelOrderByIdReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByIdReq implements Request { + /** */ + @JsonIgnore + @PathVar("orderId") + @JsonProperty("orderId") + private String orderId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelOrderByIdResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelOrderByIdResp.java new file mode 100644 index 00000000..55403fd2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/CancelOrderByIdResp.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByIdResp + implements Response> { + /** The orderId that is to be canceled */ + @JsonProperty("cancelledOrderIds") + private List cancelledOrderIds = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOpenOrderValueReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOpenOrderValueReq.java new file mode 100644 index 00000000..97891141 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOpenOrderValueReq.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOpenOrderValueReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOpenOrderValueResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOpenOrderValueResp.java new file mode 100644 index 00000000..3349edc5 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOpenOrderValueResp.java @@ -0,0 +1,47 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOpenOrderValueResp + implements Response> { + /** Total number of unexecuted buy orders */ + @JsonProperty("openOrderBuySize") + private Integer openOrderBuySize; + + /** Total number of unexecuted sell orders */ + @JsonProperty("openOrderSellSize") + private Integer openOrderSellSize; + + /** Value of all unexecuted buy orders */ + @JsonProperty("openOrderBuyCost") + private String openOrderBuyCost; + + /** Value of all unexecuted sell orders */ + @JsonProperty("openOrderSellCost") + private String openOrderSellCost; + + /** Settlement currency */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByClientOidReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByClientOidReq.java new file mode 100644 index 00000000..250c24dd --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByClientOidReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderByClientOidReq implements Request { + /** The user self-defined order ID. */ + @JsonProperty("clientOid") + private String clientOid; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByClientOidResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByClientOidResp.java new file mode 100644 index 00000000..9050d7b8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByClientOidResp.java @@ -0,0 +1,441 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderByClientOidResp + implements Response> { + /** Order ID */ + @JsonProperty("id") + private String id; + + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Order type, market order or limit order */ + @JsonProperty("type") + private TypeEnum type; + + /** Transaction side */ + @JsonProperty("side") + private SideEnum side; + + /** Order Price */ + @JsonProperty("price") + private String price; + + /** Order quantity */ + @JsonProperty("size") + private Integer size; + + /** Order value */ + @JsonProperty("value") + private String value; + + /** Executed size of funds */ + @JsonProperty("dealValue") + private String dealValue; + + /** Executed quantity */ + @JsonProperty("dealSize") + private Integer dealSize; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these + * strategies: CN, CO, CB. DC not currently supported. + */ + @JsonProperty("stp") + private StpEnum stp; + + /** A mark to the stop order type */ + @JsonProperty("stop") + private StopEnum stop; + + /** Trigger price type of stop orders */ + @JsonProperty("stopPriceType") + private StopPriceTypeEnum stopPriceType; + + /** Mark to show whether the stop order is triggered */ + @JsonProperty("stopTriggered") + private Boolean stopTriggered; + + /** Trigger price of stop orders */ + @JsonProperty("stopPrice") + private Double stopPrice; + + /** Time in force policy type */ + @JsonProperty("timeInForce") + private String timeInForce; + + /** Mark of post only */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** Mark of the hidden order */ + @JsonProperty("hidden") + private Boolean hidden; + + /** Mark of the iceberg order */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** Leverage of the order */ + @JsonProperty("leverage") + private String leverage; + + /** A mark to force-hold the funds for an order */ + @JsonProperty("forceHold") + private Boolean forceHold; + + /** A mark to close the position */ + @JsonProperty("closeOrder") + private Boolean closeOrder; + + /** Visible size of the iceberg order */ + @JsonProperty("visibleSize") + private Integer visibleSize; + + /** Unique order ID created by users to identify their orders */ + @JsonProperty("clientOid") + private String clientOid; + + /** Remark */ + @JsonProperty("remark") + private String remark; + + /** Tag order source */ + @JsonProperty("tags") + private String tags; + + /** Mark of the active orders */ + @JsonProperty("isActive") + private Boolean isActive; + + /** Mark of the canceled orders */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** Order creation time */ + @JsonProperty("createdAt") + private Long createdAt; + + /** Last update time */ + @JsonProperty("updatedAt") + private Long updatedAt; + + /** Order Endtime */ + @JsonProperty("endAt") + private Long endAt; + + /** Order creation time in nanoseconds */ + @JsonProperty("orderTime") + private Long orderTime; + + /** Settlement currency */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** Margin mode: ISOLATED (isolated), CROSS (cross margin). */ + @JsonProperty("marginMode") + private MarginModeEnum marginMode; + + /** + * 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 + */ + @JsonProperty("avgDealPrice") + private String avgDealPrice; + + /** Value of the executed orders */ + @JsonProperty("filledSize") + private Integer filledSize; + + /** Executed order quantity */ + @JsonProperty("filledValue") + private String filledValue; + + /** order status: “open” or “done” */ + @JsonProperty("status") + private StatusEnum status; + + /** A mark to reduce the position size only */ + @JsonProperty("reduceOnly") + private Boolean reduceOnly; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum TypeEnum { + /** Market Order */ + MARKET("market"), + /** Limit Order */ + LIMIT("limit"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** buy */ + BUY("buy"), + /** sell */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** None */ + NULL(""), + /** Cancel new, Cancel the new order */ + CN("CN"), + /** Cancel old, Cancel the old order */ + CO("CO"), + /** Cancel both, Cancel both sides */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopEnum { + /** Triggers when the price reaches or goes below the stopPrice. */ + DOWN("down"), + /** Triggers when the price reaches or goes above the stopPrice. */ + UP("up"), + /** Not a stop order */ + NONE(""); + + private final String value; + + StopEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopEnum fromValue(String value) { + for (StopEnum b : StopEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopPriceTypeEnum { + /** + * 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. + */ + TRADEPRICE("TP"), + /** + * MP for mark price. The mark price can be obtained through relevant OPEN API for index + * services. + */ + MARKPRICE("MP"), + /** + * IP for index price. The index price can be obtained through relevant OPEN API for index + * services. + */ + INDEXPRICE("IP"), + /** Not a stop order */ + NONE(""); + + private final String value; + + StopPriceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopPriceTypeEnum fromValue(String value) { + for (StopPriceTypeEnum b : StopPriceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum MarginModeEnum { + /** Cross margin */ + CROSS("CROSS"), + /** Isolated margin */ + ISOLATED("ISOLATED"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StatusEnum { + /** open order */ + OPEN("open"), + /** done order */ + DONE("done"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByOrderIdReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByOrderIdReq.java new file mode 100644 index 00000000..b81d791c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByOrderIdReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderByOrderIdReq implements Request { + /** */ + @JsonIgnore + @PathVar("orderId") + @JsonProperty("order-id") + private String orderId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByOrderIdResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByOrderIdResp.java new file mode 100644 index 00000000..4285d263 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByOrderIdResp.java @@ -0,0 +1,441 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderByOrderIdResp + implements Response> { + /** Order ID */ + @JsonProperty("id") + private String id; + + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Order type, market order or limit order */ + @JsonProperty("type") + private TypeEnum type; + + /** Transaction side */ + @JsonProperty("side") + private SideEnum side; + + /** Order price */ + @JsonProperty("price") + private String price; + + /** Order quantity */ + @JsonProperty("size") + private Integer size; + + /** Order value */ + @JsonProperty("value") + private String value; + + /** Executed size of funds */ + @JsonProperty("dealValue") + private String dealValue; + + /** Executed quantity */ + @JsonProperty("dealSize") + private Integer dealSize; + + /** + * [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. + */ + @JsonProperty("stp") + private StpEnum stp; + + /** A mark to the stop order type */ + @JsonProperty("stop") + private StopEnum stop; + + /** Trigger price type of stop orders */ + @JsonProperty("stopPriceType") + private StopPriceTypeEnum stopPriceType; + + /** Mark to show whether the stop order is triggered */ + @JsonProperty("stopTriggered") + private Boolean stopTriggered; + + /** Trigger price of stop orders */ + @JsonProperty("stopPrice") + private Double stopPrice; + + /** Time in force policy type */ + @JsonProperty("timeInForce") + private String timeInForce; + + /** Mark of post only */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** Mark of the hidden order */ + @JsonProperty("hidden") + private Boolean hidden; + + /** Mark of the iceberg order */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** Leverage of the order */ + @JsonProperty("leverage") + private String leverage; + + /** A mark to forcely hold the funds for an order */ + @JsonProperty("forceHold") + private Boolean forceHold; + + /** A mark to close the position */ + @JsonProperty("closeOrder") + private Boolean closeOrder; + + /** Visible size of the iceberg order */ + @JsonProperty("visibleSize") + private Integer visibleSize; + + /** Unique order id created by users to identify their orders */ + @JsonProperty("clientOid") + private String clientOid; + + /** Remark */ + @JsonProperty("remark") + private String remark; + + /** tag order source */ + @JsonProperty("tags") + private String tags; + + /** Mark of the active orders */ + @JsonProperty("isActive") + private Boolean isActive; + + /** Mark of the canceled orders */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** Time the order created */ + @JsonProperty("createdAt") + private Long createdAt; + + /** last update time */ + @JsonProperty("updatedAt") + private Long updatedAt; + + /** Order Endtime */ + @JsonProperty("endAt") + private Long endAt; + + /** Order create time in nanosecond */ + @JsonProperty("orderTime") + private Long orderTime; + + /** settlement currency */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** Margin mode: ISOLATED (isolated), CROSS (cross margin). */ + @JsonProperty("marginMode") + private MarginModeEnum marginMode; + + /** + * 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 + */ + @JsonProperty("avgDealPrice") + private String avgDealPrice; + + /** Value of the executed orders */ + @JsonProperty("filledSize") + private Integer filledSize; + + /** Executed order quantity */ + @JsonProperty("filledValue") + private String filledValue; + + /** order status: “open” or “done” */ + @JsonProperty("status") + private StatusEnum status; + + /** A mark to reduce the position size only */ + @JsonProperty("reduceOnly") + private Boolean reduceOnly; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum TypeEnum { + /** Market Order */ + MARKET("market"), + /** Limit Order */ + LIMIT("limit"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** buy */ + BUY("buy"), + /** sell */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** Null means not stp order */ + NULL(""), + /** Cancel new, Cancel the new order */ + CN("CN"), + /** Cancel old, Cancel the old order */ + CO("CO"), + /** Cancel both, Cancel both sides */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopEnum { + /** Triggers when the price reaches or goes below the stopPrice. */ + DOWN("down"), + /** Triggers when the price reaches or goes above the stopPrice. */ + UP("up"), + /** Not a stop order */ + NONE(""); + + private final String value; + + StopEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopEnum fromValue(String value) { + for (StopEnum b : StopEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopPriceTypeEnum { + /** + * 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. + */ + TRADEPRICE("TP"), + /** + * MP for mark price, The mark price can be obtained through relevant OPEN API for index + * services + */ + MARKPRICE("MP"), + /** + * IP for index price, The index price can be obtained through relevant OPEN API for index + * services + */ + INDEXPRICE("IP"), + /** Not a stop order */ + NONE(""); + + private final String value; + + StopPriceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopPriceTypeEnum fromValue(String value) { + for (StopPriceTypeEnum b : StopPriceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum MarginModeEnum { + /** Cross margin */ + CROSS("CROSS"), + /** Isolated margin */ + ISOLATED("ISOLATED"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StatusEnum { + /** open order */ + OPEN("open"), + /** done order */ + DONE("done"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderListItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderListItems.java new file mode 100644 index 00000000..2d69d3a1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderListItems.java @@ -0,0 +1,257 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderListItems { + /** Order ID */ + @JsonProperty("id") + private String id; + + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Order type, market order or limit order */ + @JsonProperty("type") + private String type; + + /** Transaction side */ + @JsonProperty("side") + private String side; + + /** Order price */ + @JsonProperty("price") + private String price; + + /** Order quantity */ + @JsonProperty("size") + private Integer size; + + /** Order value */ + @JsonProperty("value") + private String value; + + /** Executed size of funds */ + @JsonProperty("dealValue") + private String dealValue; + + /** Executed quantity */ + @JsonProperty("dealSize") + private Integer dealSize; + + /** self trade prevention */ + @JsonProperty("stp") + private String stp; + + /** A mark to the stop order type */ + @JsonProperty("stop") + private StopEnum stop; + + /** Trigger price type of stop orders */ + @JsonProperty("stopPriceType") + private StopPriceTypeEnum stopPriceType; + + /** Mark to show whether the stop order is triggered */ + @JsonProperty("stopTriggered") + private Boolean stopTriggered; + + /** Trigger price of stop orders */ + @JsonProperty("stopPrice") + private Integer stopPrice; + + /** Time in force policy type */ + @JsonProperty("timeInForce") + private String timeInForce; + + /** Mark of post only */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** Mark of the hidden order */ + @JsonProperty("hidden") + private Boolean hidden; + + /** Mark of the iceberg order */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** Leverage of the order */ + @JsonProperty("leverage") + private String leverage; + + /** A mark to forcely hold the funds for an order */ + @JsonProperty("forceHold") + private Boolean forceHold; + + /** A mark to close the position */ + @JsonProperty("closeOrder") + private Boolean closeOrder; + + /** Visible size of the iceberg order */ + @JsonProperty("visibleSize") + private Integer visibleSize; + + /** Unique order id created by users to identify their orders */ + @JsonProperty("clientOid") + private String clientOid; + + /** Remark of the order */ + @JsonProperty("remark") + private String remark; + + /** tag order source */ + @JsonProperty("tags") + private String tags; + + /** Mark of the active orders */ + @JsonProperty("isActive") + private Boolean isActive; + + /** Mark of the canceled orders */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** Time the order created */ + @JsonProperty("createdAt") + private Long createdAt; + + /** last update time */ + @JsonProperty("updatedAt") + private Long updatedAt; + + /** End time */ + @JsonProperty("endAt") + private Long endAt; + + /** Order create time in nanosecond */ + @JsonProperty("orderTime") + private Long orderTime; + + /** settlement currency */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** Margin mode: ISOLATED (isolated), CROSS (cross margin). */ + @JsonProperty("marginMode") + private String marginMode; + + /** + * 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 + */ + @JsonProperty("avgDealPrice") + private String avgDealPrice; + + /** order status: “open” or “done” */ + @JsonProperty("status") + private String status; + + /** Value of the executed orders */ + @JsonProperty("filledSize") + private Integer filledSize; + + /** Executed order quantity */ + @JsonProperty("filledValue") + private String filledValue; + + /** A mark to reduce the position size only */ + @JsonProperty("reduceOnly") + private Boolean reduceOnly; + + public enum StopEnum { + /** Triggers when the price reaches or goes below the stopPrice. */ + DOWN("down"), + /** Triggers when the price reaches or goes above the stopPrice. */ + UP("up"), + /** Not a stop order */ + NONE(""); + + private final String value; + + StopEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopEnum fromValue(String value) { + for (StopEnum b : StopEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopPriceTypeEnum { + /** + * 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. + */ + TRADEPRICE("TP"), + /** + * MP for mark price. The mark price can be obtained through relevant OPEN API for index + * services. + */ + MARKPRICE("MP"), + /** + * IP for index price. The index price can be obtained through relevant OPEN API for index + * services. + */ + INDEXPRICE("IP"), + /** Not a stop order */ + NONE(""); + + private final String value; + + StopPriceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopPriceTypeEnum fromValue(String value) { + for (StopPriceTypeEnum b : StopPriceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderListReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderListReq.java new file mode 100644 index 00000000..82871693 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderListReq.java @@ -0,0 +1,164 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderListReq implements Request { + /** active or done, done as default. Only list orders for a specific status */ + @JsonProperty("status") + private StatusEnum status; + + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** Order Type */ + @JsonProperty("type") + private TypeEnum type; + + /** Start time (milisecond) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milisecond) */ + @JsonProperty("endAt") + private Long endAt; + + /** Current request page, The default currentPage is 1 */ + @JsonProperty("currentPage") + @Builder.Default + private Integer currentPage = 1; + + /** pageSize, The default pageSize is 50, The maximum cannot exceed 1000 */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 50; + + public enum StatusEnum { + /** */ + ACTIVE("active"), + /** */ + DONE("done"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** Limit order */ + LIMIT("limit"), + /** Market order */ + MARKET("market"), + /** Stop limit order */ + LIMITSTOP("limit_stop"), + /** Stop market order */ + MARKETSTOP("market_stop"), + /** Oco limit order */ + OCOLIMIT("oco_limit"), + /** Oco stop order */ + OCOSTOP("oco_stop"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderListResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderListResp.java new file mode 100644 index 00000000..96a2db16 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderListResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderListResp + implements Response> { + /** Current request page, The default currentPage is 1 */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** pageSize, The default pageSize is 50, The maximum cannot exceed 1000 */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentClosedOrdersData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentClosedOrdersData.java new file mode 100644 index 00000000..bfa28de1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentClosedOrdersData.java @@ -0,0 +1,257 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRecentClosedOrdersData { + /** Order ID */ + @JsonProperty("id") + private String id; + + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Order type, market order or limit order */ + @JsonProperty("type") + private String type; + + /** Transaction side */ + @JsonProperty("side") + private String side; + + /** Order price */ + @JsonProperty("price") + private String price; + + /** Order quantity */ + @JsonProperty("size") + private Integer size; + + /** Order value */ + @JsonProperty("value") + private String value; + + /** Executed size of funds */ + @JsonProperty("dealValue") + private String dealValue; + + /** Executed quantity */ + @JsonProperty("dealSize") + private Integer dealSize; + + /** self trade prevention */ + @JsonProperty("stp") + private String stp; + + /** A mark to the stop order type */ + @JsonProperty("stop") + private StopEnum stop; + + /** Trigger price type of stop orders */ + @JsonProperty("stopPriceType") + private StopPriceTypeEnum stopPriceType; + + /** Mark to show whether the stop order is triggered */ + @JsonProperty("stopTriggered") + private Boolean stopTriggered; + + /** Trigger price of stop orders */ + @JsonProperty("stopPrice") + private Integer stopPrice; + + /** Time in force policy type */ + @JsonProperty("timeInForce") + private String timeInForce; + + /** Mark of post only */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** Mark of the hidden order */ + @JsonProperty("hidden") + private Boolean hidden; + + /** Mark of the iceberg order */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** Leverage of the order */ + @JsonProperty("leverage") + private String leverage; + + /** A mark to forcely hold the funds for an order */ + @JsonProperty("forceHold") + private Boolean forceHold; + + /** A mark to close the position */ + @JsonProperty("closeOrder") + private Boolean closeOrder; + + /** Visible size of the iceberg order */ + @JsonProperty("visibleSize") + private Integer visibleSize; + + /** Unique order id created by users to identify their orders */ + @JsonProperty("clientOid") + private String clientOid; + + /** Remark of the order */ + @JsonProperty("remark") + private String remark; + + /** tag order source */ + @JsonProperty("tags") + private String tags; + + /** Mark of the active orders */ + @JsonProperty("isActive") + private Boolean isActive; + + /** Mark of the canceled orders */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** Time the order created */ + @JsonProperty("createdAt") + private Long createdAt; + + /** last update time */ + @JsonProperty("updatedAt") + private Long updatedAt; + + /** End time */ + @JsonProperty("endAt") + private Long endAt; + + /** Order create time in nanosecond */ + @JsonProperty("orderTime") + private Long orderTime; + + /** settlement currency */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** Margin mode: ISOLATED (isolated), CROSS (cross margin). */ + @JsonProperty("marginMode") + private String marginMode; + + /** + * 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 + */ + @JsonProperty("avgDealPrice") + private String avgDealPrice; + + /** Value of the executed orders */ + @JsonProperty("filledSize") + private Integer filledSize; + + /** Executed order quantity */ + @JsonProperty("filledValue") + private String filledValue; + + /** order status: “open” or “done” */ + @JsonProperty("status") + private String status; + + /** A mark to reduce the position size only */ + @JsonProperty("reduceOnly") + private Boolean reduceOnly; + + public enum StopEnum { + /** Triggers when the price reaches or goes below the stopPrice. */ + DOWN("down"), + /** Triggers when the price reaches or goes above the stopPrice. */ + UP("up"), + /** Not a stop order */ + NONE(""); + + private final String value; + + StopEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopEnum fromValue(String value) { + for (StopEnum b : StopEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopPriceTypeEnum { + /** + * 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. + */ + TRADEPRICE("TP"), + /** + * MP for mark price. The mark price can be obtained through relevant OPEN API for index + * services. + */ + MARKPRICE("MP"), + /** + * IP for index price. The index price can be obtained through relevant OPEN API for index + * services. + */ + INDEXPRICE("IP"), + /** Not a stop order */ + NONE(""); + + private final String value; + + StopPriceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopPriceTypeEnum fromValue(String value) { + for (StopPriceTypeEnum b : StopPriceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentClosedOrdersReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentClosedOrdersReq.java new file mode 100644 index 00000000..b25c5c3c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentClosedOrdersReq.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRecentClosedOrdersReq implements Request { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentClosedOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentClosedOrdersResp.java new file mode 100644 index 00000000..f17b56b2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentClosedOrdersResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRecentClosedOrdersResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetRecentClosedOrdersResp fromJson(List data) { + // original response + GetRecentClosedOrdersResp obj = new GetRecentClosedOrdersResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentTradeHistoryData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentTradeHistoryData.java new file mode 100644 index 00000000..a75395da --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentTradeHistoryData.java @@ -0,0 +1,359 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRecentTradeHistoryData { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Trade ID */ + @JsonProperty("tradeId") + private String tradeId; + + /** Order ID */ + @JsonProperty("orderId") + private String orderId; + + /** Transaction side */ + @JsonProperty("side") + private SideEnum side; + + /** Liquidity-taker or -maker */ + @JsonProperty("liquidity") + private LiquidityEnum liquidity; + + /** Whether to force processing as a taker */ + @JsonProperty("forceTaker") + private Boolean forceTaker; + + /** Filled price */ + @JsonProperty("price") + private String price; + + /** Filled amount */ + @JsonProperty("size") + private Integer size; + + /** Order value */ + @JsonProperty("value") + private String value; + + /** Opening transaction fee */ + @JsonProperty("openFeePay") + private String openFeePay; + + /** Closing transaction fee */ + @JsonProperty("closeFeePay") + private String closeFeePay; + + /** A mark to the stop order type */ + @JsonProperty("stop") + private StopEnum stop; + + /** Fee Rate */ + @JsonProperty("feeRate") + private String feeRate; + + /** Fixed fees (Deprecated field, no actual use of the value field) */ + @JsonProperty("fixFee") + private String fixFee; + + /** Charging currency */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** Trade time in nanoseconds */ + @JsonProperty("tradeTime") + private Long tradeTime; + + /** Deprecated field, no actual use of the value field */ + @JsonProperty("subTradeType") + private String subTradeType; + + /** Margin mode: ISOLATED (isolated), CROSS (cross margin). */ + @JsonProperty("marginMode") + private MarginModeEnum marginMode; + + /** Order Type */ + @JsonProperty("displayType") + private DisplayTypeEnum displayType; + + /** Transaction fee */ + @JsonProperty("fee") + private String fee; + + /** Settle Currency */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** Order type */ + @JsonProperty("orderType") + private OrderTypeEnum orderType; + + /** Trade type (trade, liquid, cancel, adl or settlement) */ + @JsonProperty("tradeType") + private TradeTypeEnum tradeType; + + /** Order creation time */ + @JsonProperty("createdAt") + private Long createdAt; + + public enum SideEnum { + /** buy */ + BUY("buy"), + /** sell */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum LiquidityEnum { + /** taker */ + TAKER("taker"), + /** maker */ + MAKER("maker"); + + private final String value; + + LiquidityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LiquidityEnum fromValue(String value) { + for (LiquidityEnum b : LiquidityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopEnum { + /** Triggers when the price reaches or goes below the stopPrice. */ + DOWN("down"), + /** Triggers when the price reaches or goes above the stopPrice. */ + UP("up"), + /** Not a stop order */ + NONE(""); + + private final String value; + + StopEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopEnum fromValue(String value) { + for (StopEnum b : StopEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum MarginModeEnum { + /** Isolated Margin */ + ISOLATED("ISOLATED"), + /** Cross Margin */ + CROSS("CROSS"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum DisplayTypeEnum { + /** Limit order */ + LIMIT("limit"), + /** Market order */ + MARKET("market"), + /** Stop limit order */ + LIMITSTOP("limit_stop"), + /** Stop Market order */ + MARKETSTOP("market_stop"); + + private final String value; + + DisplayTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DisplayTypeEnum fromValue(String value) { + for (DisplayTypeEnum b : DisplayTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum OrderTypeEnum { + /** market */ + MARKET("market"), + /** limit */ + LIMIT("limit"); + + private final String value; + + OrderTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OrderTypeEnum fromValue(String value) { + for (OrderTypeEnum b : OrderTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TradeTypeEnum { + /** trade */ + TRADE("trade"), + /** Partially filled and canceled orders */ + CANCEL("cancel"), + /** liquid */ + LIQUID("liquid"), + /** adl */ + ADL("adl"), + /** settlement */ + SETTLEMENT("settlement"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentTradeHistoryReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentTradeHistoryReq.java new file mode 100644 index 00000000..f97cca57 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentTradeHistoryReq.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRecentTradeHistoryReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentTradeHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentTradeHistoryResp.java new file mode 100644 index 00000000..73f17eef --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentTradeHistoryResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRecentTradeHistoryResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetRecentTradeHistoryResp fromJson(List data) { + // original response + GetRecentTradeHistoryResp obj = new GetRecentTradeHistoryResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetStopOrderListItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetStopOrderListItems.java new file mode 100644 index 00000000..cd9ba9f1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetStopOrderListItems.java @@ -0,0 +1,257 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetStopOrderListItems { + /** Order ID */ + @JsonProperty("id") + private String id; + + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Order type, market order or limit order */ + @JsonProperty("type") + private String type; + + /** Transaction side */ + @JsonProperty("side") + private String side; + + /** Order price */ + @JsonProperty("price") + private String price; + + /** Order quantity */ + @JsonProperty("size") + private Integer size; + + /** Order value */ + @JsonProperty("value") + private String value; + + /** Executed size of funds */ + @JsonProperty("dealValue") + private String dealValue; + + /** Executed quantity */ + @JsonProperty("dealSize") + private Integer dealSize; + + /** self trade prevention */ + @JsonProperty("stp") + private String stp; + + /** A mark to the stop order type */ + @JsonProperty("stop") + private StopEnum stop; + + /** Trigger price type of stop orders */ + @JsonProperty("stopPriceType") + private StopPriceTypeEnum stopPriceType; + + /** Mark to show whether the stop order is triggered */ + @JsonProperty("stopTriggered") + private Boolean stopTriggered; + + /** Trigger price of stop orders */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** Time in force policy type */ + @JsonProperty("timeInForce") + private String timeInForce; + + /** Mark of post only */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** Mark of the hidden order */ + @JsonProperty("hidden") + private Boolean hidden; + + /** Mark of the iceberg order */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** Leverage of the order */ + @JsonProperty("leverage") + private String leverage; + + /** A mark to forcely hold the funds for an order */ + @JsonProperty("forceHold") + private Boolean forceHold; + + /** A mark to close the position */ + @JsonProperty("closeOrder") + private Boolean closeOrder; + + /** Visible size of the iceberg order */ + @JsonProperty("visibleSize") + private Integer visibleSize; + + /** Unique order id created by users to identify their orders */ + @JsonProperty("clientOid") + private String clientOid; + + /** Remark of the order */ + @JsonProperty("remark") + private String remark; + + /** tag order source */ + @JsonProperty("tags") + private String tags; + + /** Mark of the active orders */ + @JsonProperty("isActive") + private Boolean isActive; + + /** Mark of the canceled orders */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** Time the order created */ + @JsonProperty("createdAt") + private Long createdAt; + + /** last update time */ + @JsonProperty("updatedAt") + private Long updatedAt; + + /** End time */ + @JsonProperty("endAt") + private Long endAt; + + /** Order create time in nanosecond */ + @JsonProperty("orderTime") + private Long orderTime; + + /** settlement currency */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** Margin mode: ISOLATED (isolated), CROSS (cross margin). */ + @JsonProperty("marginMode") + private String marginMode; + + /** + * 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 + */ + @JsonProperty("avgDealPrice") + private String avgDealPrice; + + /** Value of the executed orders */ + @JsonProperty("filledSize") + private Integer filledSize; + + /** Executed order quantity */ + @JsonProperty("filledValue") + private String filledValue; + + /** order status: “open” or “done” */ + @JsonProperty("status") + private String status; + + /** A mark to reduce the position size only */ + @JsonProperty("reduceOnly") + private Boolean reduceOnly; + + public enum StopEnum { + /** Triggers when the price reaches or goes below the stopPrice. */ + DOWN("down"), + /** Triggers when the price reaches or goes above the stopPrice. */ + UP("up"), + /** Not a stop order */ + NONE(""); + + private final String value; + + StopEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopEnum fromValue(String value) { + for (StopEnum b : StopEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopPriceTypeEnum { + /** + * 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. + */ + TRADEPRICE("TP"), + /** + * MP for mark price. The mark price can be obtained through relevant OPEN API for index + * services. + */ + MARKPRICE("MP"), + /** + * IP for index price. The index price can be obtained through relevant OPEN API for index + * services. + */ + INDEXPRICE("IP"), + /** Not a stop order */ + NONE(""); + + private final String value; + + StopPriceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopPriceTypeEnum fromValue(String value) { + for (StopPriceTypeEnum b : StopPriceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetStopOrderListReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetStopOrderListReq.java new file mode 100644 index 00000000..8a6cf399 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetStopOrderListReq.java @@ -0,0 +1,118 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetStopOrderListReq implements Request { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** limit, market */ + @JsonProperty("type") + private TypeEnum type; + + /** Start time (milisecond) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milisecond) */ + @JsonProperty("endAt") + private Long endAt; + + /** Current request page, The default currentPage is 1 */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** pageSize, The default pageSize is 50, The maximum cannot exceed 1000 */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 50; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetStopOrderListResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetStopOrderListResp.java new file mode 100644 index 00000000..e90d0125 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetStopOrderListResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetStopOrderListResp + implements Response> { + /** Current request page, The default currentPage is 1 */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** pageSize, The default pageSize is 50, The maximum cannot exceed 1000 */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetTradeHistoryItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetTradeHistoryItems.java new file mode 100644 index 00000000..c2eff15b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetTradeHistoryItems.java @@ -0,0 +1,365 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryItems { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Trade ID */ + @JsonProperty("tradeId") + private String tradeId; + + /** Order ID */ + @JsonProperty("orderId") + private String orderId; + + /** Transaction side */ + @JsonProperty("side") + private SideEnum side; + + /** Liquidity-taker or -maker */ + @JsonProperty("liquidity") + private LiquidityEnum liquidity; + + /** Whether to force processing as a taker */ + @JsonProperty("forceTaker") + private Boolean forceTaker; + + /** Filled price */ + @JsonProperty("price") + private String price; + + /** Filled amount */ + @JsonProperty("size") + private Integer size; + + /** Order value */ + @JsonProperty("value") + private String value; + + /** Opening transaction fee */ + @JsonProperty("openFeePay") + private String openFeePay; + + /** Closing transaction fee */ + @JsonProperty("closeFeePay") + private String closeFeePay; + + /** A mark to the stop order type */ + @JsonProperty("stop") + private StopEnum stop; + + /** Fee Rate */ + @JsonProperty("feeRate") + private String feeRate; + + /** Fixed fees (Deprecated field, no actual use of the value field) */ + @JsonProperty("fixFee") + private String fixFee; + + /** Charging currency */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** Trade time in nanoseconds */ + @JsonProperty("tradeTime") + private Long tradeTime; + + /** Deprecated field, no actual use of the value field */ + @JsonProperty("subTradeType") + private String subTradeType; + + /** Margin mode: ISOLATED (isolated), CROSS (cross margin). */ + @JsonProperty("marginMode") + private MarginModeEnum marginMode; + + /** Settle currency */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** Order type */ + @JsonProperty("displayType") + private DisplayTypeEnum displayType; + + /** Trading fee */ + @JsonProperty("fee") + private String fee; + + /** Order type */ + @JsonProperty("orderType") + private OrderTypeEnum orderType; + + /** Trade type (trade, liquid, adl or settlement) */ + @JsonProperty("tradeType") + private TradeTypeEnum tradeType; + + /** Order creation time */ + @JsonProperty("createdAt") + private Long createdAt; + + /** Opening tax fee (Only KYC users in some regions have this parameter) */ + @JsonProperty("openFeeTaxPay") + private String openFeeTaxPay; + + /** Close tax fee (Only KYC users in some regions have this parameter) */ + @JsonProperty("closeFeeTaxPay") + private String closeFeeTaxPay; + + public enum SideEnum { + /** buy */ + BUY("buy"), + /** sell */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum LiquidityEnum { + /** taker */ + TAKER("taker"), + /** maker */ + MAKER("maker"); + + private final String value; + + LiquidityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LiquidityEnum fromValue(String value) { + for (LiquidityEnum b : LiquidityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopEnum { + /** Triggers when the price reaches or goes below the stopPrice. */ + DOWN("down"), + /** Triggers when the price reaches or goes above the stopPrice. */ + UP("up"), + /** Not a stop order */ + NONE(""); + + private final String value; + + StopEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopEnum fromValue(String value) { + for (StopEnum b : StopEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum MarginModeEnum { + /** Isolated margin */ + ISOLATED("ISOLATED"), + /** Cross margin */ + CROSS("CROSS"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum DisplayTypeEnum { + /** limit order */ + LIMIT("limit"), + /** market order */ + MARKET("market"), + /** stop limit order */ + LIMITSTOP("limit_stop"), + /** stop market order */ + MARKETSTOP("market_stop"); + + private final String value; + + DisplayTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DisplayTypeEnum fromValue(String value) { + for (DisplayTypeEnum b : DisplayTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum OrderTypeEnum { + /** market */ + MARKET("market"), + /** limit */ + LIMIT("limit"); + + private final String value; + + OrderTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OrderTypeEnum fromValue(String value) { + for (OrderTypeEnum b : OrderTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TradeTypeEnum { + /** trade */ + TRADE("trade"), + /** liquid */ + LIQUID("liquid"), + /** adl */ + ADL("adl"), + /** settlement */ + SETTLEMENT("settlement"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetTradeHistoryReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetTradeHistoryReq.java new file mode 100644 index 00000000..9d4eba50 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetTradeHistoryReq.java @@ -0,0 +1,136 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryReq implements Request { + /** + * List fills for a specific order only (if you specify orderId, other parameters can be ignored) + */ + @JsonProperty("orderId") + private String orderId; + + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Order side */ + @JsonProperty("side") + private SideEnum side; + + /** Order Type */ + @JsonProperty("type") + private TypeEnum type; + + /** + * Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same + * time, separated by commas. Query all types when empty + */ + @JsonProperty("tradeTypes") + private String tradeTypes; + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + /** Current request page. The default currentPage is 1 */ + @JsonProperty("currentPage") + @Builder.Default + private Integer currentPage = 1; + + /** pageSize, The default pageSize is 50; the maximum cannot exceed 1000 */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 50; + + public enum SideEnum { + /** buy */ + BUY("buy"), + /** sell */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** Limit order */ + LIMIT("limit"), + /** Market order */ + MARKET("market"), + /** Stop limit order */ + LIMITSTOP("limit_stop"), + /** Stop Market order */ + MARKETSTOP("market_stop"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetTradeHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetTradeHistoryResp.java new file mode 100644 index 00000000..2b1920dd --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetTradeHistoryResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryResp + implements Response> { + /** */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.java new file mode 100644 index 00000000..98780fa7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.java @@ -0,0 +1,190 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +public interface OrderApi { + /** + * Add Order 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + AddOrderResp addOrder(AddOrderReq req); + + /** + * Add Order Test Place order to the futures trading system just for validation docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + AddOrderTestResp addOrderTest(AddOrderTestReq req); + + /** + * Batch Add Orders 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 20 | +-----------------------+---------+ + */ + BatchAddOrdersResp batchAddOrders(BatchAddOrdersReq req); + + /** + * Add Take Profit And Stop Loss Order 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. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + AddTPSLOrderResp addTPSLOrder(AddTPSLOrderReq req); + + /** + * Cancel Order By OrderId Cancel order by system generated orderId. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + */ + CancelOrderByIdResp cancelOrderById(CancelOrderByIdReq req); + + /** + * Cancel Order By ClientOid Cancel order by client defined orderId. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + */ + CancelOrderByClientOidResp cancelOrderByClientOid(CancelOrderByClientOidReq req); + + /** + * Batch Cancel Orders Cancel a bach of orders by client defined orderId or system generated + * orderId docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+---------+ + */ + BatchCancelOrdersResp batchCancelOrders(BatchCancelOrdersReq req); + + /** + * Cancel All Orders Cancel all open orders (excluding stop orders). The response is a list of + * orderIDs of the canceled orders. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ + */ + CancelAllOrdersV3Resp cancelAllOrdersV3(CancelAllOrdersV3Req req); + + /** + * Cancel All Stop orders 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'. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+---------+ + */ + CancelAllStopOrdersResp cancelAllStopOrders(CancelAllStopOrdersReq req); + + /** + * Get Order By OrderId Get a single order by order id (including a stop order). docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + GetOrderByOrderIdResp getOrderByOrderId(GetOrderByOrderIdReq req); + + /** + * Get Order By ClientOid Get a single order by client order ID (including a stop order). docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + GetOrderByClientOidResp getOrderByClientOid(GetOrderByClientOidReq req); + + /** + * Get Order List List your current orders. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetOrderListResp getOrderList(GetOrderListReq req); + + /** + * Get Recent Closed Orders 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + GetRecentClosedOrdersResp getRecentClosedOrders(GetRecentClosedOrdersReq req); + + /** + * Get Stop Order List Get the un-triggered stop orders list. Stop orders that have been triggered + * can be queried through the general order interface docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 6 | +-----------------------+---------+ + */ + GetStopOrderListResp getStopOrderList(GetStopOrderListReq req); + + /** + * Get Open Order Value You can query this endpoint to get the total number and value of all your + * active orders. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ + */ + GetOpenOrderValueResp getOpenOrderValue(GetOpenOrderValueReq req); + + /** + * Get Recent Trade History 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | NULL | +-----------------------+---------+ + */ + GetRecentTradeHistoryResp getRecentTradeHistory(GetRecentTradeHistoryReq req); + + /** + * Get Trade History 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. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ + */ + GetTradeHistoryResp getTradeHistory(GetTradeHistoryReq req); + + /** + * Cancel All Orders - V1 Cancel all open orders (excluding stop orders). The response is a list + * of orderIDs of the canceled orders. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 800 + * | +-----------------------+---------+ + */ + CancelAllOrdersV1Resp cancelAllOrdersV1(CancelAllOrdersV1Req req); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.template new file mode 100644 index 00000000..436fb51f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.template @@ -0,0 +1,541 @@ + + /** + * addOrder + * Add Order + * /api/v1/orders + */ + public void testAddOrder() { + AddOrderReq.AddOrderReqBuilder builder = AddOrderReq.builder(); + builder.clientOid(?).side(?).symbol(?).leverage(?).type(?).remark(?).stop(?).stopPriceType(?).stopPrice(?).reduceOnly(?).closeOrder(?).forceHold(?).stp(?).marginMode(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).qty(?).valueQty(?); + AddOrderReq req = builder.build(); + AddOrderResp resp = this.api.addOrder(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->clientOid); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addOrderTest + * Add Order Test + * /api/v1/orders/test + */ + public void testAddOrderTest() { + AddOrderTestReq.AddOrderTestReqBuilder builder = AddOrderTestReq.builder(); + builder.clientOid(?).side(?).symbol(?).leverage(?).type(?).remark(?).stop(?).stopPriceType(?).stopPrice(?).reduceOnly(?).closeOrder(?).forceHold(?).stp(?).marginMode(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).qty(?).valueQty(?); + AddOrderTestReq req = builder.build(); + AddOrderTestResp resp = this.api.addOrderTest(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->clientOid); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * batchAddOrders + * Batch Add Orders + * /api/v1/orders/multi + */ + public void testBatchAddOrders() { + BatchAddOrdersReq.BatchAddOrdersReqBuilder builder = BatchAddOrdersReq.builder(); + builder.items(?); + BatchAddOrdersReq req = builder.build(); + BatchAddOrdersResp resp = this.api.batchAddOrders(req); + foreach($resp->data as $item) { + self::assertNotNull($item->orderId); + self::assertNotNull($item->clientOid); + self::assertNotNull($item->symbol); + self::assertNotNull($item->code); + self::assertNotNull($item->msg); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addTPSLOrder + * Add Take Profit And Stop Loss Order + * /api/v1/st-orders + */ + public void testAddTPSLOrder() { + AddTPSLOrderReq.AddTPSLOrderReqBuilder builder = AddTPSLOrderReq.builder(); + builder.clientOid(?).side(?).symbol(?).leverage(?).type(?).remark(?).stopPriceType(?).reduceOnly(?).closeOrder(?).forceHold(?).stp(?).marginMode(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).triggerStopUpPrice(?).triggerStopDownPrice(?).qty(?).valueQty(?); + AddTPSLOrderReq req = builder.build(); + AddTPSLOrderResp resp = this.api.addTPSLOrder(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->clientOid); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelOrderById + * Cancel Order By OrderId + * /api/v1/orders/{orderId} + */ + public void testCancelOrderById() { + CancelOrderByIdReq.CancelOrderByIdReqBuilder builder = CancelOrderByIdReq.builder(); + builder.orderId(?); + CancelOrderByIdReq req = builder.build(); + CancelOrderByIdResp resp = this.api.cancelOrderById(req); + foreach($resp->cancelledOrderIds as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelOrderByClientOid + * Cancel Order By ClientOid + * /api/v1/orders/client-order/{clientOid} + */ + public void testCancelOrderByClientOid() { + CancelOrderByClientOidReq.CancelOrderByClientOidReqBuilder builder = CancelOrderByClientOidReq.builder(); + builder.symbol(?).clientOid(?); + CancelOrderByClientOidReq req = builder.build(); + CancelOrderByClientOidResp resp = this.api.cancelOrderByClientOid(req); + self::assertNotNull($resp->clientOid); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * batchCancelOrders + * Batch Cancel Orders + * /api/v1/orders/multi-cancel + */ + public void testBatchCancelOrders() { + BatchCancelOrdersReq.BatchCancelOrdersReqBuilder builder = BatchCancelOrdersReq.builder(); + builder.orderIdsList(?).clientOidsList(?); + BatchCancelOrdersReq req = builder.build(); + BatchCancelOrdersResp resp = this.api.batchCancelOrders(req); + foreach($resp->data as $item) { + self::assertNotNull($item->orderId); + self::assertNotNull($item->clientOid); + self::assertNotNull($item->code); + self::assertNotNull($item->msg); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelAllOrdersV3 + * Cancel All Orders + * /api/v3/orders + */ + public void testCancelAllOrdersV3() { + CancelAllOrdersV3Req.CancelAllOrdersV3ReqBuilder builder = CancelAllOrdersV3Req.builder(); + builder.symbol(?); + CancelAllOrdersV3Req req = builder.build(); + CancelAllOrdersV3Resp resp = this.api.cancelAllOrdersV3(req); + foreach($resp->cancelledOrderIds as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelAllStopOrders + * Cancel All Stop orders + * /api/v1/stopOrders + */ + public void testCancelAllStopOrders() { + CancelAllStopOrdersReq.CancelAllStopOrdersReqBuilder builder = CancelAllStopOrdersReq.builder(); + builder.symbol(?); + CancelAllStopOrdersReq req = builder.build(); + CancelAllStopOrdersResp resp = this.api.cancelAllStopOrders(req); + foreach($resp->cancelledOrderIds as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOrderByOrderId + * Get Order By OrderId + * /api/v1/orders/{order-id} + */ + public void testGetOrderByOrderId() { + GetOrderByOrderIdReq.GetOrderByOrderIdReqBuilder builder = GetOrderByOrderIdReq.builder(); + builder.orderId(?); + GetOrderByOrderIdReq req = builder.build(); + GetOrderByOrderIdResp resp = this.api.getOrderByOrderId(req); + self::assertNotNull($resp->id); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->type); + self::assertNotNull($resp->side); + self::assertNotNull($resp->price); + self::assertNotNull($resp->size); + self::assertNotNull($resp->value); + self::assertNotNull($resp->dealValue); + self::assertNotNull($resp->dealSize); + self::assertNotNull($resp->stp); + self::assertNotNull($resp->stop); + self::assertNotNull($resp->stopPriceType); + self::assertNotNull($resp->stopTriggered); + self::assertNotNull($resp->stopPrice); + self::assertNotNull($resp->timeInForce); + self::assertNotNull($resp->postOnly); + self::assertNotNull($resp->hidden); + self::assertNotNull($resp->iceberg); + self::assertNotNull($resp->leverage); + self::assertNotNull($resp->forceHold); + self::assertNotNull($resp->closeOrder); + self::assertNotNull($resp->visibleSize); + self::assertNotNull($resp->clientOid); + self::assertNotNull($resp->remark); + self::assertNotNull($resp->tags); + self::assertNotNull($resp->isActive); + self::assertNotNull($resp->cancelExist); + self::assertNotNull($resp->createdAt); + self::assertNotNull($resp->updatedAt); + self::assertNotNull($resp->endAt); + self::assertNotNull($resp->orderTime); + self::assertNotNull($resp->settleCurrency); + self::assertNotNull($resp->marginMode); + self::assertNotNull($resp->avgDealPrice); + self::assertNotNull($resp->filledSize); + self::assertNotNull($resp->filledValue); + self::assertNotNull($resp->status); + self::assertNotNull($resp->reduceOnly); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOrderByClientOid + * Get Order By ClientOid + * /api/v1/orders/byClientOid + */ + public void testGetOrderByClientOid() { + GetOrderByClientOidReq.GetOrderByClientOidReqBuilder builder = GetOrderByClientOidReq.builder(); + builder.clientOid(?); + GetOrderByClientOidReq req = builder.build(); + GetOrderByClientOidResp resp = this.api.getOrderByClientOid(req); + self::assertNotNull($resp->id); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->type); + self::assertNotNull($resp->side); + self::assertNotNull($resp->price); + self::assertNotNull($resp->size); + self::assertNotNull($resp->value); + self::assertNotNull($resp->dealValue); + self::assertNotNull($resp->dealSize); + self::assertNotNull($resp->stp); + self::assertNotNull($resp->stop); + self::assertNotNull($resp->stopPriceType); + self::assertNotNull($resp->stopTriggered); + self::assertNotNull($resp->stopPrice); + self::assertNotNull($resp->timeInForce); + self::assertNotNull($resp->postOnly); + self::assertNotNull($resp->hidden); + self::assertNotNull($resp->iceberg); + self::assertNotNull($resp->leverage); + self::assertNotNull($resp->forceHold); + self::assertNotNull($resp->closeOrder); + self::assertNotNull($resp->visibleSize); + self::assertNotNull($resp->clientOid); + self::assertNotNull($resp->remark); + self::assertNotNull($resp->tags); + self::assertNotNull($resp->isActive); + self::assertNotNull($resp->cancelExist); + self::assertNotNull($resp->createdAt); + self::assertNotNull($resp->updatedAt); + self::assertNotNull($resp->endAt); + self::assertNotNull($resp->orderTime); + self::assertNotNull($resp->settleCurrency); + self::assertNotNull($resp->marginMode); + self::assertNotNull($resp->avgDealPrice); + self::assertNotNull($resp->filledSize); + self::assertNotNull($resp->filledValue); + self::assertNotNull($resp->status); + self::assertNotNull($resp->reduceOnly); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOrderList + * Get Order List + * /api/v1/orders + */ + public void testGetOrderList() { + GetOrderListReq.GetOrderListReqBuilder builder = GetOrderListReq.builder(); + builder.status(?).symbol(?).side(?).type(?).startAt(?).endAt(?).currentPage(?).pageSize(?); + GetOrderListReq req = builder.build(); + GetOrderListResp resp = this.api.getOrderList(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->symbol); + self::assertNotNull($item->type); + self::assertNotNull($item->side); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->value); + self::assertNotNull($item->dealValue); + self::assertNotNull($item->dealSize); + self::assertNotNull($item->stp); + self::assertNotNull($item->stop); + self::assertNotNull($item->stopPriceType); + self::assertNotNull($item->stopTriggered); + self::assertNotNull($item->stopPrice); + self::assertNotNull($item->timeInForce); + self::assertNotNull($item->postOnly); + self::assertNotNull($item->hidden); + self::assertNotNull($item->iceberg); + self::assertNotNull($item->leverage); + self::assertNotNull($item->forceHold); + self::assertNotNull($item->closeOrder); + self::assertNotNull($item->visibleSize); + self::assertNotNull($item->clientOid); + self::assertNotNull($item->remark); + self::assertNotNull($item->tags); + self::assertNotNull($item->isActive); + self::assertNotNull($item->cancelExist); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->updatedAt); + self::assertNotNull($item->endAt); + self::assertNotNull($item->orderTime); + self::assertNotNull($item->settleCurrency); + self::assertNotNull($item->marginMode); + self::assertNotNull($item->avgDealPrice); + self::assertNotNull($item->status); + self::assertNotNull($item->filledSize); + self::assertNotNull($item->filledValue); + self::assertNotNull($item->reduceOnly); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getRecentClosedOrders + * Get Recent Closed Orders + * /api/v1/recentDoneOrders + */ + public void testGetRecentClosedOrders() { + GetRecentClosedOrdersReq.GetRecentClosedOrdersReqBuilder builder = GetRecentClosedOrdersReq.builder(); + builder.symbol(?); + GetRecentClosedOrdersReq req = builder.build(); + GetRecentClosedOrdersResp resp = this.api.getRecentClosedOrders(req); + foreach($resp->data as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->symbol); + self::assertNotNull($item->type); + self::assertNotNull($item->side); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->value); + self::assertNotNull($item->dealValue); + self::assertNotNull($item->dealSize); + self::assertNotNull($item->stp); + self::assertNotNull($item->stop); + self::assertNotNull($item->stopPriceType); + self::assertNotNull($item->stopTriggered); + self::assertNotNull($item->stopPrice); + self::assertNotNull($item->timeInForce); + self::assertNotNull($item->postOnly); + self::assertNotNull($item->hidden); + self::assertNotNull($item->iceberg); + self::assertNotNull($item->leverage); + self::assertNotNull($item->forceHold); + self::assertNotNull($item->closeOrder); + self::assertNotNull($item->visibleSize); + self::assertNotNull($item->clientOid); + self::assertNotNull($item->remark); + self::assertNotNull($item->tags); + self::assertNotNull($item->isActive); + self::assertNotNull($item->cancelExist); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->updatedAt); + self::assertNotNull($item->endAt); + self::assertNotNull($item->orderTime); + self::assertNotNull($item->settleCurrency); + self::assertNotNull($item->marginMode); + self::assertNotNull($item->avgDealPrice); + self::assertNotNull($item->filledSize); + self::assertNotNull($item->filledValue); + self::assertNotNull($item->status); + self::assertNotNull($item->reduceOnly); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getStopOrderList + * Get Stop Order List + * /api/v1/stopOrders + */ + public void testGetStopOrderList() { + GetStopOrderListReq.GetStopOrderListReqBuilder builder = GetStopOrderListReq.builder(); + builder.symbol(?).side(?).type(?).startAt(?).endAt(?).currentPage(?).pageSize(?); + GetStopOrderListReq req = builder.build(); + GetStopOrderListResp resp = this.api.getStopOrderList(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->symbol); + self::assertNotNull($item->type); + self::assertNotNull($item->side); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->value); + self::assertNotNull($item->dealValue); + self::assertNotNull($item->dealSize); + self::assertNotNull($item->stp); + self::assertNotNull($item->stop); + self::assertNotNull($item->stopPriceType); + self::assertNotNull($item->stopTriggered); + self::assertNotNull($item->stopPrice); + self::assertNotNull($item->timeInForce); + self::assertNotNull($item->postOnly); + self::assertNotNull($item->hidden); + self::assertNotNull($item->iceberg); + self::assertNotNull($item->leverage); + self::assertNotNull($item->forceHold); + self::assertNotNull($item->closeOrder); + self::assertNotNull($item->visibleSize); + self::assertNotNull($item->clientOid); + self::assertNotNull($item->remark); + self::assertNotNull($item->tags); + self::assertNotNull($item->isActive); + self::assertNotNull($item->cancelExist); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->updatedAt); + self::assertNotNull($item->endAt); + self::assertNotNull($item->orderTime); + self::assertNotNull($item->settleCurrency); + self::assertNotNull($item->marginMode); + self::assertNotNull($item->avgDealPrice); + self::assertNotNull($item->filledSize); + self::assertNotNull($item->filledValue); + self::assertNotNull($item->status); + self::assertNotNull($item->reduceOnly); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOpenOrderValue + * Get Open Order Value + * /api/v1/openOrderStatistics + */ + public void testGetOpenOrderValue() { + GetOpenOrderValueReq.GetOpenOrderValueReqBuilder builder = GetOpenOrderValueReq.builder(); + builder.symbol(?); + GetOpenOrderValueReq req = builder.build(); + GetOpenOrderValueResp resp = this.api.getOpenOrderValue(req); + self::assertNotNull($resp->openOrderBuySize); + self::assertNotNull($resp->openOrderSellSize); + self::assertNotNull($resp->openOrderBuyCost); + self::assertNotNull($resp->openOrderSellCost); + self::assertNotNull($resp->settleCurrency); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getRecentTradeHistory + * Get Recent Trade History + * /api/v1/recentFills + */ + public void testGetRecentTradeHistory() { + GetRecentTradeHistoryReq.GetRecentTradeHistoryReqBuilder builder = GetRecentTradeHistoryReq.builder(); + builder.symbol(?); + GetRecentTradeHistoryReq req = builder.build(); + GetRecentTradeHistoryResp resp = this.api.getRecentTradeHistory(req); + foreach($resp->data as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->tradeId); + self::assertNotNull($item->orderId); + self::assertNotNull($item->side); + self::assertNotNull($item->liquidity); + self::assertNotNull($item->forceTaker); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->value); + self::assertNotNull($item->openFeePay); + self::assertNotNull($item->closeFeePay); + self::assertNotNull($item->stop); + self::assertNotNull($item->feeRate); + self::assertNotNull($item->fixFee); + self::assertNotNull($item->feeCurrency); + self::assertNotNull($item->tradeTime); + self::assertNotNull($item->subTradeType); + self::assertNotNull($item->marginMode); + self::assertNotNull($item->displayType); + self::assertNotNull($item->fee); + self::assertNotNull($item->settleCurrency); + self::assertNotNull($item->orderType); + self::assertNotNull($item->tradeType); + self::assertNotNull($item->createdAt); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getTradeHistory + * Get Trade History + * /api/v1/fills + */ + public void testGetTradeHistory() { + GetTradeHistoryReq.GetTradeHistoryReqBuilder builder = GetTradeHistoryReq.builder(); + builder.orderId(?).symbol(?).side(?).type(?).tradeTypes(?).startAt(?).endAt(?).currentPage(?).pageSize(?); + GetTradeHistoryReq req = builder.build(); + GetTradeHistoryResp resp = this.api.getTradeHistory(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->tradeId); + self::assertNotNull($item->orderId); + self::assertNotNull($item->side); + self::assertNotNull($item->liquidity); + self::assertNotNull($item->forceTaker); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->value); + self::assertNotNull($item->openFeePay); + self::assertNotNull($item->closeFeePay); + self::assertNotNull($item->stop); + self::assertNotNull($item->feeRate); + self::assertNotNull($item->fixFee); + self::assertNotNull($item->feeCurrency); + self::assertNotNull($item->tradeTime); + self::assertNotNull($item->subTradeType); + self::assertNotNull($item->marginMode); + self::assertNotNull($item->settleCurrency); + self::assertNotNull($item->displayType); + self::assertNotNull($item->fee); + self::assertNotNull($item->orderType); + self::assertNotNull($item->tradeType); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->openFeeTaxPay); + self::assertNotNull($item->closeFeeTaxPay); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelAllOrdersV1 + * Cancel All Orders - V1 + * /api/v1/orders + */ + public void testCancelAllOrdersV1() { + CancelAllOrdersV1Req.CancelAllOrdersV1ReqBuilder builder = CancelAllOrdersV1Req.builder(); + builder.symbol(?); + CancelAllOrdersV1Req req = builder.build(); + CancelAllOrdersV1Resp resp = this.api.cancelAllOrdersV1(req); + foreach($resp->cancelledOrderIds as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApiAutoGeneratedTest.java new file mode 100644 index 00000000..a08b49de --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApiAutoGeneratedTest.java @@ -0,0 +1,892 @@ +package com.kucoin.universal.sdk.generate.futures.order; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class OrderApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** addOrder Request Add Order /api/v1/orders */ + public static void testAddOrderRequest() throws Exception { + String data = + "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," + + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," + + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.1\", \"size\":" + + " 1, \"timeInForce\": \"GTC\"}"; + AddOrderReq obj = mapper.readValue(data, AddOrderReq.class); + } + + /** addOrder Response Add Order /api/v1/orders */ + public static void testAddOrderResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"234125150956625920\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addOrderTest Request Add Order Test /api/v1/orders/test */ + public static void testAddOrderTestRequest() throws Exception { + String data = + "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," + + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," + + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.1\", \"size\":" + + " 1, \"timeInForce\": \"GTC\"}"; + AddOrderTestReq obj = mapper.readValue(data, AddOrderTestReq.class); + } + + /** addOrderTest Response Add Order Test /api/v1/orders/test */ + public static void testAddOrderTestResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"234125150956625920\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** batchAddOrders Request Batch Add Orders /api/v1/orders/multi */ + public static void testBatchAddOrdersRequest() throws Exception { + String data = + "[{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\":" + + " \"XBTUSDTM\", \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," + + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.1\", \"size\":" + + " 1, \"timeInForce\": \"GTC\"}, {\"clientOid\": \"5c52e11203aa677f33e493fc\"," + + " \"side\": \"buy\", \"symbol\": \"XBTUSDTM\", \"leverage\": 3, \"type\": \"limit\"," + + " \"remark\": \"order remarks\", \"reduceOnly\": false, \"marginMode\": \"ISOLATED\"," + + " \"price\": \"0.1\", \"size\": 1, \"timeInForce\": \"GTC\"}]"; + BatchAddOrdersReq obj = mapper.readValue(data, BatchAddOrdersReq.class); + } + + /** batchAddOrders Response Batch Add Orders /api/v1/orders/multi */ + public static void testBatchAddOrdersResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"orderId\": \"235919387779985408\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"code\": \"200000\",\n" + + " \"msg\": \"success\"\n" + + " },\n" + + " {\n" + + " \"orderId\": \"235919387855482880\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fc\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"code\": \"200000\",\n" + + " \"msg\": \"success\"\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addTPSLOrder Request Add Take Profit And Stop Loss Order /api/v1/st-orders */ + public static void testAddTPSLOrderRequest() throws Exception { + String data = + "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," + + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," + + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.2\", \"size\":" + + " 1, \"timeInForce\": \"GTC\", \"triggerStopUpPrice\": \"0.3\"," + + " \"triggerStopDownPrice\": \"0.1\", \"stopPriceType\": \"TP\"}"; + AddTPSLOrderReq obj = mapper.readValue(data, AddTPSLOrderReq.class); + } + + /** addTPSLOrder Response Add Take Profit And Stop Loss Order /api/v1/st-orders */ + public static void testAddTPSLOrderResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"234125150956625920\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** cancelOrderById Request Cancel Order By OrderId /api/v1/orders/{orderId} */ + public static void testCancelOrderByIdRequest() throws Exception { + String data = "{\"orderId\": \"example_string_default_value\"}"; + CancelOrderByIdReq obj = mapper.readValue(data, CancelOrderByIdReq.class); + } + + /** cancelOrderById Response Cancel Order By OrderId /api/v1/orders/{orderId} */ + public static void testCancelOrderByIdResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"235303670076489728\"\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * cancelOrderByClientOid Request Cancel Order By ClientOid + * /api/v1/orders/client-order/{clientOid} + */ + public static void testCancelOrderByClientOidRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\", \"clientOid\": \"example_string_default_value\"}"; + CancelOrderByClientOidReq obj = mapper.readValue(data, CancelOrderByClientOidReq.class); + } + + /** + * cancelOrderByClientOid Response Cancel Order By ClientOid + * /api/v1/orders/client-order/{clientOid} + */ + public static void testCancelOrderByClientOidResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"clientOid\": \"017485b0-2957-4681-8a14-5d46b35aee0d\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** batchCancelOrders Request Batch Cancel Orders /api/v1/orders/multi-cancel */ + public static void testBatchCancelOrdersRequest() throws Exception { + String data = "{\"orderIdsList\": [\"250445104152670209\", \"250445181751463936\"]}"; + BatchCancelOrdersReq obj = mapper.readValue(data, BatchCancelOrdersReq.class); + } + + /** batchCancelOrders Response Batch Cancel Orders /api/v1/orders/multi-cancel */ + public static void testBatchCancelOrdersResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"orderId\": \"250445104152670209\",\n" + + " \"clientOid\": null,\n" + + " \"code\": \"200\",\n" + + " \"msg\": \"success\"\n" + + " },\n" + + " {\n" + + " \"orderId\": \"250445181751463936\",\n" + + " \"clientOid\": null,\n" + + " \"code\": \"200\",\n" + + " \"msg\": \"success\"\n" + + " }\n" + + " ]\n" + + "}\n"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** cancelAllOrdersV3 Request Cancel All Orders /api/v3/orders */ + public static void testCancelAllOrdersV3Request() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\"}"; + CancelAllOrdersV3Req obj = mapper.readValue(data, CancelAllOrdersV3Req.class); + } + + /** cancelAllOrdersV3 Response Cancel All Orders /api/v3/orders */ + public static void testCancelAllOrdersV3Response() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"235919172150824960\",\n" + + " \"235919172150824961\"\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** cancelAllStopOrders Request Cancel All Stop orders /api/v1/stopOrders */ + public static void testCancelAllStopOrdersRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\"}"; + CancelAllStopOrdersReq obj = mapper.readValue(data, CancelAllStopOrdersReq.class); + } + + /** cancelAllStopOrders Response Cancel All Stop orders /api/v1/stopOrders */ + public static void testCancelAllStopOrdersResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"235919172150824960\",\n" + + " \"235919172150824961\"\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getOrderByOrderId Request Get Order By OrderId /api/v1/orders/{order-id} */ + public static void testGetOrderByOrderIdRequest() throws Exception { + String data = "{\"order-id\": \"236655147005071361\"}"; + GetOrderByOrderIdReq obj = mapper.readValue(data, GetOrderByOrderIdReq.class); + } + + /** getOrderByOrderId Response Get Order By OrderId /api/v1/orders/{order-id} */ + public static void testGetOrderByOrderIdResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"236655147005071361\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"0.1\",\n" + + " \"size\": 1,\n" + + " \"value\": \"0.0001\",\n" + + " \"dealValue\": \"0\",\n" + + " \"dealSize\": 0,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPriceType\": \"\",\n" + + " \"stopTriggered\": false,\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberg\": false,\n" + + " \"leverage\": \"3\",\n" + + " \"forceHold\": false,\n" + + " \"closeOrder\": false,\n" + + " \"visibleSize\": 0,\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"remark\": null,\n" + + " \"tags\": \"\",\n" + + " \"isActive\": true,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1729236185949,\n" + + " \"updatedAt\": 1729236185949,\n" + + " \"endAt\": null,\n" + + " \"orderTime\": 1729236185885647952,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"avgDealPrice\": \"0\",\n" + + " \"filledSize\": 0,\n" + + " \"filledValue\": \"0\",\n" + + " \"status\": \"open\",\n" + + " \"reduceOnly\": false\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getOrderByClientOid Request Get Order By ClientOid /api/v1/orders/byClientOid */ + public static void testGetOrderByClientOidRequest() throws Exception { + String data = "{\"clientOid\": \"5c52e11203aa677f33e493fb\"}"; + GetOrderByClientOidReq obj = mapper.readValue(data, GetOrderByClientOidReq.class); + } + + /** getOrderByClientOid Response Get Order By ClientOid /api/v1/orders/byClientOid */ + public static void testGetOrderByClientOidResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"250444645610336256\",\n" + + " \"symbol\": \"XRPUSDTM\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"0.1\",\n" + + " \"size\": 1,\n" + + " \"value\": \"1\",\n" + + " \"dealValue\": \"0\",\n" + + " \"dealSize\": 0,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPriceType\": \"\",\n" + + " \"stopTriggered\": false,\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberg\": false,\n" + + " \"leverage\": \"3\",\n" + + " \"forceHold\": false,\n" + + " \"closeOrder\": false,\n" + + " \"visibleSize\": 0,\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"remark\": null,\n" + + " \"tags\": \"\",\n" + + " \"isActive\": true,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1732523858568,\n" + + " \"updatedAt\": 1732523858568,\n" + + " \"endAt\": null,\n" + + " \"orderTime\": 1732523858550892322,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"avgDealPrice\": \"0\",\n" + + " \"filledSize\": 0,\n" + + " \"filledValue\": \"0\",\n" + + " \"status\": \"open\",\n" + + " \"reduceOnly\": false\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getOrderList Request Get Order List /api/v1/orders */ + public static void testGetOrderListRequest() throws Exception { + String data = + "{\"status\": \"done\", \"symbol\": \"example_string_default_value\", \"side\": \"buy\"," + + " \"type\": \"limit\", \"startAt\": 123456, \"endAt\": 123456, \"currentPage\": 1," + + " \"pageSize\": 50}"; + GetOrderListReq obj = mapper.readValue(data, GetOrderListReq.class); + } + + /** getOrderList Response Get Order List /api/v1/orders */ + public static void testGetOrderListResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 1,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"id\": \"230181737576050688\",\n" + + " \"symbol\": \"PEOPLEUSDTM\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"0.05\",\n" + + " \"size\": 10,\n" + + " \"value\": \"5\",\n" + + " \"dealValue\": \"0\",\n" + + " \"dealSize\": 0,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPriceType\": \"\",\n" + + " \"stopTriggered\": false,\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberg\": false,\n" + + " \"leverage\": \"1\",\n" + + " \"forceHold\": false,\n" + + " \"closeOrder\": false,\n" + + " \"visibleSize\": 0,\n" + + " \"clientOid\": \"5a80bd847f1811ef8a7faa665a37b3d7\",\n" + + " \"remark\": null,\n" + + " \"tags\": \"\",\n" + + " \"isActive\": true,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1727692804813,\n" + + " \"updatedAt\": 1727692804813,\n" + + " \"endAt\": null,\n" + + " \"orderTime\": 1727692804808418000,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"avgDealPrice\": \"0\",\n" + + " \"filledSize\": 0,\n" + + " \"filledValue\": \"0\",\n" + + " \"status\": \"open\",\n" + + " \"reduceOnly\": false\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getRecentClosedOrders Request Get Recent Closed Orders /api/v1/recentDoneOrders */ + public static void testGetRecentClosedOrdersRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\"}"; + GetRecentClosedOrdersReq obj = mapper.readValue(data, GetRecentClosedOrdersReq.class); + } + + /** getRecentClosedOrders Response Get Recent Closed Orders /api/v1/recentDoneOrders */ + public static void testGetRecentClosedOrdersResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"236387137732231168\",\n" + + " \"symbol\": \"XRPUSDTM\",\n" + + " \"type\": \"market\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"0\",\n" + + " \"size\": 1,\n" + + " \"value\": \"5.51\",\n" + + " \"dealValue\": \"5.511\",\n" + + " \"dealSize\": 1,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPriceType\": \"\",\n" + + " \"stopTriggered\": false,\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberg\": false,\n" + + " \"leverage\": \"10.0\",\n" + + " \"forceHold\": false,\n" + + " \"closeOrder\": false,\n" + + " \"visibleSize\": 0,\n" + + " \"clientOid\": \"16698fe6-2746-4aeb-a7fa-61f633ab6090\",\n" + + " \"remark\": null,\n" + + " \"tags\": \"\",\n" + + " \"isActive\": false,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1729172287496,\n" + + " \"updatedAt\": 1729172287568,\n" + + " \"endAt\": 1729172287568,\n" + + " \"orderTime\": 1729172287496950800,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"avgDealPrice\": \"0.5511\",\n" + + " \"filledSize\": 1,\n" + + " \"filledValue\": \"5.511\",\n" + + " \"status\": \"done\",\n" + + " \"reduceOnly\": false\n" + + " },\n" + + " {\n" + + " \"id\": \"236317213710184449\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"type\": \"market\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"0\",\n" + + " \"size\": 1,\n" + + " \"value\": \"67.4309\",\n" + + " \"dealValue\": \"67.4309\",\n" + + " \"dealSize\": 1,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPriceType\": \"\",\n" + + " \"stopTriggered\": false,\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberg\": false,\n" + + " \"leverage\": \"3\",\n" + + " \"forceHold\": false,\n" + + " \"closeOrder\": false,\n" + + " \"visibleSize\": 0,\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"remark\": null,\n" + + " \"tags\": \"\",\n" + + " \"isActive\": false,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1729155616310,\n" + + " \"updatedAt\": 1729155616324,\n" + + " \"endAt\": 1729155616324,\n" + + " \"orderTime\": 1729155616310180400,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"avgDealPrice\": \"67430.9\",\n" + + " \"filledSize\": 1,\n" + + " \"filledValue\": \"67.4309\",\n" + + " \"status\": \"done\",\n" + + " \"reduceOnly\": false\n" + + " },\n" + + " {\n" + + " \"id\": \"236317094436728832\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"type\": \"market\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"0\",\n" + + " \"size\": 1,\n" + + " \"value\": \"67.445\",\n" + + " \"dealValue\": \"67.445\",\n" + + " \"dealSize\": 1,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPriceType\": \"\",\n" + + " \"stopTriggered\": false,\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberg\": false,\n" + + " \"leverage\": \"3\",\n" + + " \"forceHold\": false,\n" + + " \"closeOrder\": false,\n" + + " \"visibleSize\": 0,\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"remark\": null,\n" + + " \"tags\": \"\",\n" + + " \"isActive\": false,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1729155587873,\n" + + " \"updatedAt\": 1729155587946,\n" + + " \"endAt\": 1729155587946,\n" + + " \"orderTime\": 1729155587873332000,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"avgDealPrice\": \"67445.0\",\n" + + " \"filledSize\": 1,\n" + + " \"filledValue\": \"67.445\",\n" + + " \"status\": \"done\",\n" + + " \"reduceOnly\": false\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getStopOrderList Request Get Stop Order List /api/v1/stopOrders */ + public static void testGetStopOrderListRequest() throws Exception { + String data = + "{\"symbol\": \"XBTUSDTM\", \"side\": \"buy\", \"type\": \"limit\", \"startAt\": 123456," + + " \"endAt\": 123456, \"currentPage\": 123456, \"pageSize\": 50}"; + GetStopOrderListReq obj = mapper.readValue(data, GetStopOrderListReq.class); + } + + /** getStopOrderList Response Get Stop Order List /api/v1/stopOrders */ + public static void testGetStopOrderListResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 1,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"id\": \"230181737576050688\",\n" + + " \"symbol\": \"PEOPLEUSDTM\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"0.05\",\n" + + " \"size\": 10,\n" + + " \"value\": \"5\",\n" + + " \"dealValue\": \"0\",\n" + + " \"dealSize\": 0,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPriceType\": \"\",\n" + + " \"stopTriggered\": false,\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberg\": false,\n" + + " \"leverage\": \"1\",\n" + + " \"forceHold\": false,\n" + + " \"closeOrder\": false,\n" + + " \"visibleSize\": 0,\n" + + " \"clientOid\": \"5a80bd847f1811ef8a7faa665a37b3d7\",\n" + + " \"remark\": null,\n" + + " \"tags\": \"\",\n" + + " \"isActive\": true,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1727692804813,\n" + + " \"updatedAt\": 1727692804813,\n" + + " \"endAt\": null,\n" + + " \"orderTime\": 1727692804808418000,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"avgDealPrice\": \"0\",\n" + + " \"filledSize\": 0,\n" + + " \"filledValue\": \"0\",\n" + + " \"status\": \"open\",\n" + + " \"reduceOnly\": false\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getOpenOrderValue Request Get Open Order Value /api/v1/openOrderStatistics */ + public static void testGetOpenOrderValueRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\"}"; + GetOpenOrderValueReq obj = mapper.readValue(data, GetOpenOrderValueReq.class); + } + + /** getOpenOrderValue Response Get Open Order Value /api/v1/openOrderStatistics */ + public static void testGetOpenOrderValueResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"openOrderBuySize\": 1,\n" + + " \"openOrderSellSize\": 0,\n" + + " \"openOrderBuyCost\": \"0.0001\",\n" + + " \"openOrderSellCost\": \"0\",\n" + + " \"settleCurrency\": \"USDT\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getRecentTradeHistory Request Get Recent Trade History /api/v1/recentFills */ + public static void testGetRecentTradeHistoryRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\"}"; + GetRecentTradeHistoryReq obj = mapper.readValue(data, GetRecentTradeHistoryReq.class); + } + + /** getRecentTradeHistory Response Get Recent Trade History /api/v1/recentFills */ + public static void testGetRecentTradeHistoryResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"tradeId\": \"1784277229880\",\n" + + " \"orderId\": \"236317213710184449\",\n" + + " \"side\": \"buy\",\n" + + " \"liquidity\": \"taker\",\n" + + " \"forceTaker\": false,\n" + + " \"price\": \"67430.9\",\n" + + " \"size\": 1,\n" + + " \"value\": \"67.4309\",\n" + + " \"openFeePay\": \"0.04045854\",\n" + + " \"closeFeePay\": \"0\",\n" + + " \"stop\": \"\",\n" + + " \"feeRate\": \"0.00060\",\n" + + " \"fixFee\": \"0\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"fee\": \"0.04045854\",\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"orderType\": \"market\",\n" + + " \"displayType\": \"market\",\n" + + " \"tradeType\": \"trade\",\n" + + " \"subTradeType\": null,\n" + + " \"tradeTime\": 1729155616320000000,\n" + + " \"createdAt\": 1729155616493\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"tradeId\": \"1784277132002\",\n" + + " \"orderId\": \"236317094436728832\",\n" + + " \"side\": \"buy\",\n" + + " \"liquidity\": \"taker\",\n" + + " \"forceTaker\": false,\n" + + " \"price\": \"67445\",\n" + + " \"size\": 1,\n" + + " \"value\": \"67.445\",\n" + + " \"openFeePay\": \"0\",\n" + + " \"closeFeePay\": \"0.040467\",\n" + + " \"stop\": \"\",\n" + + " \"feeRate\": \"0.00060\",\n" + + " \"fixFee\": \"0\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"fee\": \"0.040467\",\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"orderType\": \"market\",\n" + + " \"displayType\": \"market\",\n" + + " \"tradeType\": \"trade\",\n" + + " \"subTradeType\": null,\n" + + " \"tradeTime\": 1729155587944000000,\n" + + " \"createdAt\": 1729155588104\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getTradeHistory Request Get Trade History /api/v1/fills */ + public static void testGetTradeHistoryRequest() throws Exception { + String data = + "{\"orderId\": \"236655147005071361\", \"symbol\": \"example_string_default_value\"," + + " \"side\": \"buy\", \"type\": \"limit\", \"tradeTypes\": \"trade\", \"startAt\":" + + " 123456, \"endAt\": 123456, \"currentPage\": 1, \"pageSize\": 50}"; + GetTradeHistoryReq obj = mapper.readValue(data, GetTradeHistoryReq.class); + } + + /** getTradeHistory Response Get Trade History /api/v1/fills */ + public static void testGetTradeHistoryResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** cancelAllOrdersV1 Request Cancel All Orders - V1 /api/v1/orders */ + public static void testCancelAllOrdersV1Request() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\"}"; + CancelAllOrdersV1Req obj = mapper.readValue(data, CancelAllOrdersV1Req.class); + } + + /** cancelAllOrdersV1 Response Cancel All Orders - V1 /api/v1/orders */ + public static void testCancelAllOrdersV1Response() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"235919172150824960\",\n" + + " \"235919172150824961\"\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(OrderApiAutoGeneratedTest::testAddOrderRequest, "testAddOrderRequest"); + run(OrderApiAutoGeneratedTest::testAddOrderResponse, "testAddOrderResponse"); + run(OrderApiAutoGeneratedTest::testAddOrderTestRequest, "testAddOrderTestRequest"); + run(OrderApiAutoGeneratedTest::testAddOrderTestResponse, "testAddOrderTestResponse"); + run(OrderApiAutoGeneratedTest::testBatchAddOrdersRequest, "testBatchAddOrdersRequest"); + run(OrderApiAutoGeneratedTest::testBatchAddOrdersResponse, "testBatchAddOrdersResponse"); + run(OrderApiAutoGeneratedTest::testAddTPSLOrderRequest, "testAddTPSLOrderRequest"); + run(OrderApiAutoGeneratedTest::testAddTPSLOrderResponse, "testAddTPSLOrderResponse"); + run(OrderApiAutoGeneratedTest::testCancelOrderByIdRequest, "testCancelOrderByIdRequest"); + run(OrderApiAutoGeneratedTest::testCancelOrderByIdResponse, "testCancelOrderByIdResponse"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByClientOidRequest, + "testCancelOrderByClientOidRequest"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByClientOidResponse, + "testCancelOrderByClientOidResponse"); + run(OrderApiAutoGeneratedTest::testBatchCancelOrdersRequest, "testBatchCancelOrdersRequest"); + run(OrderApiAutoGeneratedTest::testBatchCancelOrdersResponse, "testBatchCancelOrdersResponse"); + run(OrderApiAutoGeneratedTest::testCancelAllOrdersV3Request, "testCancelAllOrdersV3Request"); + run(OrderApiAutoGeneratedTest::testCancelAllOrdersV3Response, "testCancelAllOrdersV3Response"); + run( + OrderApiAutoGeneratedTest::testCancelAllStopOrdersRequest, + "testCancelAllStopOrdersRequest"); + run( + OrderApiAutoGeneratedTest::testCancelAllStopOrdersResponse, + "testCancelAllStopOrdersResponse"); + run(OrderApiAutoGeneratedTest::testGetOrderByOrderIdRequest, "testGetOrderByOrderIdRequest"); + run(OrderApiAutoGeneratedTest::testGetOrderByOrderIdResponse, "testGetOrderByOrderIdResponse"); + run( + OrderApiAutoGeneratedTest::testGetOrderByClientOidRequest, + "testGetOrderByClientOidRequest"); + run( + OrderApiAutoGeneratedTest::testGetOrderByClientOidResponse, + "testGetOrderByClientOidResponse"); + run(OrderApiAutoGeneratedTest::testGetOrderListRequest, "testGetOrderListRequest"); + run(OrderApiAutoGeneratedTest::testGetOrderListResponse, "testGetOrderListResponse"); + run( + OrderApiAutoGeneratedTest::testGetRecentClosedOrdersRequest, + "testGetRecentClosedOrdersRequest"); + run( + OrderApiAutoGeneratedTest::testGetRecentClosedOrdersResponse, + "testGetRecentClosedOrdersResponse"); + run(OrderApiAutoGeneratedTest::testGetStopOrderListRequest, "testGetStopOrderListRequest"); + run(OrderApiAutoGeneratedTest::testGetStopOrderListResponse, "testGetStopOrderListResponse"); + run(OrderApiAutoGeneratedTest::testGetOpenOrderValueRequest, "testGetOpenOrderValueRequest"); + run(OrderApiAutoGeneratedTest::testGetOpenOrderValueResponse, "testGetOpenOrderValueResponse"); + run( + OrderApiAutoGeneratedTest::testGetRecentTradeHistoryRequest, + "testGetRecentTradeHistoryRequest"); + run( + OrderApiAutoGeneratedTest::testGetRecentTradeHistoryResponse, + "testGetRecentTradeHistoryResponse"); + run(OrderApiAutoGeneratedTest::testGetTradeHistoryRequest, "testGetTradeHistoryRequest"); + run(OrderApiAutoGeneratedTest::testGetTradeHistoryResponse, "testGetTradeHistoryResponse"); + run(OrderApiAutoGeneratedTest::testCancelAllOrdersV1Request, "testCancelAllOrdersV1Request"); + run(OrderApiAutoGeneratedTest::testCancelAllOrdersV1Response, "testCancelAllOrdersV1Response"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApiImpl.java new file mode 100644 index 00000000..f6825c43 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApiImpl.java @@ -0,0 +1,157 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.order; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class OrderApiImpl implements OrderApi { + private final Transport transport; + + public OrderApiImpl(Transport transport) { + this.transport = transport; + } + + public AddOrderResp addOrder(AddOrderReq req) { + return this.transport.call( + "futures", false, "POST", "/api/v1/orders", req, AddOrderResp.class, false); + } + + public AddOrderTestResp addOrderTest(AddOrderTestReq req) { + return this.transport.call( + "futures", false, "POST", "/api/v1/orders/test", req, AddOrderTestResp.class, false); + } + + public BatchAddOrdersResp batchAddOrders(BatchAddOrdersReq req) { + return this.transport.call( + "futures", false, "POST", "/api/v1/orders/multi", req, BatchAddOrdersResp.class, false); + } + + public AddTPSLOrderResp addTPSLOrder(AddTPSLOrderReq req) { + return this.transport.call( + "futures", false, "POST", "/api/v1/st-orders", req, AddTPSLOrderResp.class, false); + } + + public CancelOrderByIdResp cancelOrderById(CancelOrderByIdReq req) { + return this.transport.call( + "futures", + false, + "DELETE", + "/api/v1/orders/{orderId}", + req, + CancelOrderByIdResp.class, + false); + } + + public CancelOrderByClientOidResp cancelOrderByClientOid(CancelOrderByClientOidReq req) { + return this.transport.call( + "futures", + false, + "DELETE", + "/api/v1/orders/client-order/{clientOid}", + req, + CancelOrderByClientOidResp.class, + false); + } + + public BatchCancelOrdersResp batchCancelOrders(BatchCancelOrdersReq req) { + return this.transport.call( + "futures", + false, + "DELETE", + "/api/v1/orders/multi-cancel", + req, + BatchCancelOrdersResp.class, + true); + } + + public CancelAllOrdersV3Resp cancelAllOrdersV3(CancelAllOrdersV3Req req) { + return this.transport.call( + "futures", false, "DELETE", "/api/v3/orders", req, CancelAllOrdersV3Resp.class, false); + } + + public CancelAllStopOrdersResp cancelAllStopOrders(CancelAllStopOrdersReq req) { + return this.transport.call( + "futures", + false, + "DELETE", + "/api/v1/stopOrders", + req, + CancelAllStopOrdersResp.class, + false); + } + + public GetOrderByOrderIdResp getOrderByOrderId(GetOrderByOrderIdReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/orders/{order-id}", + req, + GetOrderByOrderIdResp.class, + false); + } + + public GetOrderByClientOidResp getOrderByClientOid(GetOrderByClientOidReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/orders/byClientOid", + req, + GetOrderByClientOidResp.class, + false); + } + + public GetOrderListResp getOrderList(GetOrderListReq req) { + return this.transport.call( + "futures", false, "GET", "/api/v1/orders", req, GetOrderListResp.class, false); + } + + public GetRecentClosedOrdersResp getRecentClosedOrders(GetRecentClosedOrdersReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/recentDoneOrders", + req, + GetRecentClosedOrdersResp.class, + false); + } + + public GetStopOrderListResp getStopOrderList(GetStopOrderListReq req) { + return this.transport.call( + "futures", false, "GET", "/api/v1/stopOrders", req, GetStopOrderListResp.class, false); + } + + public GetOpenOrderValueResp getOpenOrderValue(GetOpenOrderValueReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/openOrderStatistics", + req, + GetOpenOrderValueResp.class, + false); + } + + public GetRecentTradeHistoryResp getRecentTradeHistory(GetRecentTradeHistoryReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/recentFills", + req, + GetRecentTradeHistoryResp.class, + false); + } + + public GetTradeHistoryResp getTradeHistory(GetTradeHistoryReq req) { + return this.transport.call( + "futures", false, "GET", "/api/v1/fills", req, GetTradeHistoryResp.class, false); + } + + public CancelAllOrdersV1Resp cancelAllOrdersV1(CancelAllOrdersV1Req req) { + return this.transport.call( + "futures", false, "DELETE", "/api/v1/orders", req, CancelAllOrdersV1Resp.class, false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/AddIsolatedMarginReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/AddIsolatedMarginReq.java new file mode 100644 index 00000000..2bf633ba --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/AddIsolatedMarginReq.java @@ -0,0 +1,36 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddIsolatedMarginReq implements Request { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Margin amount (min. margin amount≥0.00001667XBT) */ + @JsonProperty("margin") + private Double margin; + + /** + * A unique ID generated by the user, to ensure the operation is processed by the system only + * once, The maximum length cannot exceed 36 + */ + @JsonProperty("bizNo") + private String bizNo; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/AddIsolatedMarginResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/AddIsolatedMarginResp.java new file mode 100644 index 00000000..fb0f92a1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/AddIsolatedMarginResp.java @@ -0,0 +1,178 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddIsolatedMarginResp + implements Response> { + /** Position ID */ + @JsonProperty("id") + private String id; + + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Auto deposit margin or not */ + @JsonProperty("autoDeposit") + private Boolean autoDeposit; + + /** Maintenance margin requirement */ + @JsonProperty("maintMarginReq") + private Double maintMarginReq; + + /** Risk limit */ + @JsonProperty("riskLimit") + private Integer riskLimit; + + /** Leverage o the order */ + @JsonProperty("realLeverage") + private Double realLeverage; + + /** Cross mode or not */ + @JsonProperty("crossMode") + private Boolean crossMode; + + /** ADL ranking percentile */ + @JsonProperty("delevPercentage") + private Double delevPercentage; + + /** Open time */ + @JsonProperty("openingTimestamp") + private Long openingTimestamp; + + /** Current timestamp */ + @JsonProperty("currentTimestamp") + private Long currentTimestamp; + + /** Current postion quantity */ + @JsonProperty("currentQty") + private Integer currentQty; + + /** Current postion value */ + @JsonProperty("currentCost") + private Double currentCost; + + /** Current commission */ + @JsonProperty("currentComm") + private Double currentComm; + + /** Unrealised value */ + @JsonProperty("unrealisedCost") + private Double unrealisedCost; + + /** Accumulated realised gross profit value */ + @JsonProperty("realisedGrossCost") + private Double realisedGrossCost; + + /** Current realised position value */ + @JsonProperty("realisedCost") + private Double realisedCost; + + /** Opened position or not */ + @JsonProperty("isOpen") + private Boolean isOpen; + + /** Mark price */ + @JsonProperty("markPrice") + private Double markPrice; + + /** Mark value */ + @JsonProperty("markValue") + private Double markValue; + + /** Position value */ + @JsonProperty("posCost") + private Double posCost; + + /** added margin */ + @JsonProperty("posCross") + private Double posCross; + + /** Leverage margin */ + @JsonProperty("posInit") + private Double posInit; + + /** Bankruptcy cost */ + @JsonProperty("posComm") + private Double posComm; + + /** Funding fees paid out */ + @JsonProperty("posLoss") + private Double posLoss; + + /** Position margin */ + @JsonProperty("posMargin") + private Double posMargin; + + /** Maintenance margin */ + @JsonProperty("posMaint") + private Double posMaint; + + /** Position margin */ + @JsonProperty("maintMargin") + private Double maintMargin; + + /** Accumulated realised gross profit value */ + @JsonProperty("realisedGrossPnl") + private Double realisedGrossPnl; + + /** Realised profit and loss */ + @JsonProperty("realisedPnl") + private Double realisedPnl; + + /** Unrealised profit and loss */ + @JsonProperty("unrealisedPnl") + private Double unrealisedPnl; + + /** Profit-loss ratio of the position */ + @JsonProperty("unrealisedPnlPcnt") + private Double unrealisedPnlPcnt; + + /** Rate of return on investment */ + @JsonProperty("unrealisedRoePcnt") + private Double unrealisedRoePcnt; + + /** Average entry price */ + @JsonProperty("avgEntryPrice") + private Double avgEntryPrice; + + /** Liquidation price */ + @JsonProperty("liquidationPrice") + private Double liquidationPrice; + + /** Bankruptcy price */ + @JsonProperty("bankruptPrice") + private Double bankruptPrice; + + /** userId */ + @JsonProperty("userId") + private Integer userId; + + /** Currency used to clear and settle the trades */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/BatchSwitchMarginModeErrors.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/BatchSwitchMarginModeErrors.java new file mode 100644 index 00000000..f25c12f1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/BatchSwitchMarginModeErrors.java @@ -0,0 +1,27 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchSwitchMarginModeErrors { + /** Error code */ + @JsonProperty("code") + private String code; + + /** Error message */ + @JsonProperty("msg") + private String msg; + + /** Symbol */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/BatchSwitchMarginModeReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/BatchSwitchMarginModeReq.java new file mode 100644 index 00000000..1a738801 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/BatchSwitchMarginModeReq.java @@ -0,0 +1,67 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchSwitchMarginModeReq implements Request { + /** Modified margin model: ISOLATED (isolated), CROSS (cross margin). */ + @JsonProperty("marginMode") + private MarginModeEnum marginMode; + + /** + * Symbol list of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbols") + @Builder.Default + private List symbols = new ArrayList<>(); + + public enum MarginModeEnum { + /** Isolated Margin Mode */ + ISOLATED("ISOLATED"), + /** Cross Margin MOde */ + CROSS("CROSS"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/BatchSwitchMarginModeResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/BatchSwitchMarginModeResp.java new file mode 100644 index 00000000..a58ac974 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/BatchSwitchMarginModeResp.java @@ -0,0 +1,39 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchSwitchMarginModeResp + implements Response> { + /** Target Margin Model, Symbols that failed to be modified will also be included */ + @JsonProperty("marginMode") + private Map marginMode = new HashMap<>(); + + /** Symbol which modification failed */ + @JsonProperty("errors") + private List errors = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginLeverageReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginLeverageReq.java new file mode 100644 index 00000000..4869d1c3 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginLeverageReq.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCrossMarginLeverageReq implements Request { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginLeverageResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginLeverageResp.java new file mode 100644 index 00000000..8ae03f73 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginLeverageResp.java @@ -0,0 +1,38 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCrossMarginLeverageResp + implements Response> { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Leverage multiple */ + @JsonProperty("leverage") + private String leverage; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginRiskLimitData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginRiskLimitData.java new file mode 100644 index 00000000..0e935ff4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginRiskLimitData.java @@ -0,0 +1,54 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCrossMarginRiskLimitData { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Maximum amount of open position(Unit is **lots**) */ + @JsonProperty("maxOpenSize") + private Integer maxOpenSize; + + /** Maximum value of open position(Unit is **quoteCcy**) */ + @JsonProperty("maxOpenValue") + private String maxOpenValue; + + /** Margin amount used for max position calculation. */ + @JsonProperty("totalMargin") + private String totalMargin; + + /** Price used for max position calculation. Defaults to latest transaction price */ + @JsonProperty("price") + private String price; + + /** Leverage used for max position calculation. */ + @JsonProperty("leverage") + private String leverage; + + /** Maintenance Margin Rate */ + @JsonProperty("mmr") + private String mmr; + + /** Initial Margin Rate */ + @JsonProperty("imr") + private String imr; + + /** Margin Currency */ + @JsonProperty("currency") + private String currency; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginRiskLimitReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginRiskLimitReq.java new file mode 100644 index 00000000..5f3b1bf5 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginRiskLimitReq.java @@ -0,0 +1,41 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCrossMarginRiskLimitReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220), (You may add up to 50 symbols. Use a + * halfwidth comma to each IP) + */ + @JsonProperty("symbol") + private String symbol; + + /** + * The position opening amount, in the contract's settlement currency. Defaults to 10,000 in + * margin currency for max position calculation. For USDT/USDC, it's 10,000 USD; for others, it's + * 10,000 divided by the token's USDT price. + */ + @JsonProperty("totalMargin") + private String totalMargin; + + /** + * Calculates the max position size at the specified leverage. Defaults to the symbol’s max cross + * leverage. + */ + @JsonProperty("leverage") + private Integer leverage; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginRiskLimitResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginRiskLimitResp.java new file mode 100644 index 00000000..eb942c8f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginRiskLimitResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCrossMarginRiskLimitResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetCrossMarginRiskLimitResp fromJson(List data) { + // original response + GetCrossMarginRiskLimitResp obj = new GetCrossMarginRiskLimitResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetIsolatedMarginRiskLimitData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetIsolatedMarginRiskLimitData.java new file mode 100644 index 00000000..9654deb4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetIsolatedMarginRiskLimitData.java @@ -0,0 +1,46 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginRiskLimitData { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Level */ + @JsonProperty("level") + private Integer level; + + /** Upper limit USDT (included) */ + @JsonProperty("maxRiskLimit") + private Integer maxRiskLimit; + + /** Lower limit USDT */ + @JsonProperty("minRiskLimit") + private Integer minRiskLimit; + + /** Max. leverage */ + @JsonProperty("maxLeverage") + private Integer maxLeverage; + + /** Initial margin rate */ + @JsonProperty("initialMargin") + private Double initialMargin; + + /** Maintenance margin rate */ + @JsonProperty("maintainMargin") + private Double maintainMargin; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetIsolatedMarginRiskLimitReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetIsolatedMarginRiskLimitReq.java new file mode 100644 index 00000000..65d9801b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetIsolatedMarginRiskLimitReq.java @@ -0,0 +1,29 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginRiskLimitReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonIgnore + @PathVar("symbol") + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetIsolatedMarginRiskLimitResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetIsolatedMarginRiskLimitResp.java new file mode 100644 index 00000000..e5debf42 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetIsolatedMarginRiskLimitResp.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginRiskLimitResp + implements Response< + GetIsolatedMarginRiskLimitResp, RestResponse> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetIsolatedMarginRiskLimitResp fromJson(List data) { + // original response + GetIsolatedMarginRiskLimitResp obj = new GetIsolatedMarginRiskLimitResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMarginModeReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMarginModeReq.java new file mode 100644 index 00000000..eea399a2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMarginModeReq.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarginModeReq implements Request { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMarginModeResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMarginModeResp.java new file mode 100644 index 00000000..c0d71d15 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMarginModeResp.java @@ -0,0 +1,73 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarginModeResp + implements Response> { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Margin mode: ISOLATED (isolated), CROSS (cross margin). */ + @JsonProperty("marginMode") + private MarginModeEnum marginMode; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum MarginModeEnum { + /** isolated margin */ + ISOLATED("ISOLATED"), + /** cross margin */ + CROSS("CROSS"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMaxOpenSizeReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMaxOpenSizeReq.java new file mode 100644 index 00000000..296e498d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMaxOpenSizeReq.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMaxOpenSizeReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Order Price */ + @JsonProperty("price") + private String price; + + /** Leverage */ + @JsonProperty("leverage") + private Integer leverage; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMaxOpenSizeResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMaxOpenSizeResp.java new file mode 100644 index 00000000..26cafb76 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMaxOpenSizeResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMaxOpenSizeResp + implements Response> { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Maximum buy size (unit: lot) */ + @JsonProperty("maxBuyOpenSize") + private Integer maxBuyOpenSize; + + /** Maximum buy size (unit: lot) */ + @JsonProperty("maxSellOpenSize") + private Integer maxSellOpenSize; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMaxWithdrawMarginReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMaxWithdrawMarginReq.java new file mode 100644 index 00000000..9d69d2a0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMaxWithdrawMarginReq.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMaxWithdrawMarginReq implements Request { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMaxWithdrawMarginResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMaxWithdrawMarginResp.java new file mode 100644 index 00000000..c6914063 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetMaxWithdrawMarginResp.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMaxWithdrawMarginResp + implements Response> { + /** + * 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 + */ + @JsonProperty("data") + private String data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetMaxWithdrawMarginResp fromJson(String data) { + // original response + GetMaxWithdrawMarginResp obj = new GetMaxWithdrawMarginResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionDetailsReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionDetailsReq.java new file mode 100644 index 00000000..c7c2fbd7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionDetailsReq.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPositionDetailsReq implements Request { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionDetailsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionDetailsResp.java new file mode 100644 index 00000000..3eef8520 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionDetailsResp.java @@ -0,0 +1,290 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPositionDetailsResp + implements Response> { + /** Position ID */ + @JsonProperty("id") + private String id; + + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Whether it is cross margin. */ + @JsonProperty("crossMode") + private Boolean crossMode; + + /** ADL ranking percentile */ + @JsonProperty("delevPercentage") + private Double delevPercentage; + + /** First opening time */ + @JsonProperty("openingTimestamp") + private Long openingTimestamp; + + /** Current timestamp */ + @JsonProperty("currentTimestamp") + private Long currentTimestamp; + + /** Current postion quantity */ + @JsonProperty("currentQty") + private Integer currentQty; + + /** Current postion value */ + @JsonProperty("currentCost") + private Double currentCost; + + /** Current commission */ + @JsonProperty("currentComm") + private Double currentComm; + + /** Unrealised value */ + @JsonProperty("unrealisedCost") + private Double unrealisedCost; + + /** Accumulated realised gross profit value */ + @JsonProperty("realisedGrossCost") + private Double realisedGrossCost; + + /** Current realised position value */ + @JsonProperty("realisedCost") + private Double realisedCost; + + /** Opened position or not */ + @JsonProperty("isOpen") + private Boolean isOpen; + + /** Mark price */ + @JsonProperty("markPrice") + private Double markPrice; + + /** Mark Value */ + @JsonProperty("markValue") + private Double markValue; + + /** Position value */ + @JsonProperty("posCost") + private Double posCost; + + /** + * Inital margin Cross = opening value/cross leverage; isolated = accumulation of initial margin + * for each transaction + */ + @JsonProperty("posInit") + private Double posInit; + + /** + * Bankruptcy cost Cross = mark value * imr; Isolated = position margin (accumulation of initial + * margin, additional margin, generated funding fees, etc.) + */ + @JsonProperty("posMargin") + private Double posMargin; + + /** Accumulated realised gross profit value */ + @JsonProperty("realisedGrossPnl") + private Double realisedGrossPnl; + + /** Realised profit and loss */ + @JsonProperty("realisedPnl") + private Double realisedPnl; + + /** Unrealised profit and loss */ + @JsonProperty("unrealisedPnl") + private Double unrealisedPnl; + + /** Profit-loss ratio of the position */ + @JsonProperty("unrealisedPnlPcnt") + private Double unrealisedPnlPcnt; + + /** Rate of return on investment */ + @JsonProperty("unrealisedRoePcnt") + private Double unrealisedRoePcnt; + + /** Average entry price */ + @JsonProperty("avgEntryPrice") + private Double avgEntryPrice; + + /** + * Liquidation price For Cross Margin, you can refer to the liquidationPrice, and the liquidation + * is based on the risk rate. + */ + @JsonProperty("liquidationPrice") + private Double liquidationPrice; + + /** + * Bankruptcy price For Cross Margin, you can refer to the bankruptPrice, and the liquidation is + * based on the risk rate. + */ + @JsonProperty("bankruptPrice") + private Double bankruptPrice; + + /** Currency used to clear and settle the trades */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** Reverse contract or not */ + @JsonProperty("isInverse") + private Boolean isInverse; + + /** Margin Mode: CROSS,ISOLATED */ + @JsonProperty("marginMode") + private MarginModeEnum marginMode; + + /** Position Side */ + @JsonProperty("positionSide") + private PositionSideEnum positionSide; + + /** Leverage */ + @JsonProperty("leverage") + private Double leverage; + + /** Auto deposit margin or not **Only applicable to Isolated Margin** */ + @JsonProperty("autoDeposit") + private Boolean autoDeposit; + + /** Maintenance margin requirement */ + @JsonProperty("maintMarginReq") + private Double maintMarginReq; + + /** Risk limit **Only applicable to Isolated Margin** */ + @JsonProperty("riskLimit") + private Integer riskLimit; + + /** Leverage of the order **Only applicable to Isolated Margin** */ + @JsonProperty("realLeverage") + private Double realLeverage; + + /** added margin **Only applicable to Isolated Margin** */ + @JsonProperty("posCross") + private Double posCross; + + /** + * Additional margin calls (automatic, manual, adjusted risk limits) **Only applicable to Isolated + * Margin** + */ + @JsonProperty("posCrossMargin") + private Integer posCrossMargin; + + /** Bankruptcy cost **Only applicable to Isolated Margin** */ + @JsonProperty("posComm") + private Double posComm; + + /** Part of bankruptcy cost (positioning, add margin) **Only applicable to Isolated Margin** */ + @JsonProperty("posCommCommon") + private Double posCommCommon; + + /** Funding fees paid out **Only applicable to Isolated Margin** */ + @JsonProperty("posLoss") + private Double posLoss; + + /** + * The current remaining unsettled funding fee for the position **Only applicable to Isolated + * Margin** + */ + @JsonProperty("posFunding") + private Double posFunding; + + /** Maintenance margin */ + @JsonProperty("posMaint") + private Double posMaint; + + /** Position margin **Only applicable to Isolated Margin** */ + @JsonProperty("maintMargin") + private Double maintMargin; + + /** Maintenance margin rate **Only applicable to Isolated Margin** */ + @JsonProperty("maintainMargin") + private Double maintainMargin; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum MarginModeEnum { + /** cross margin */ + CROSS("CROSS"), + /** isolated margin */ + ISOLATED("ISOLATED"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum PositionSideEnum { + /** One-way position */ + BOTH("BOTH"); + + private final String value; + + PositionSideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PositionSideEnum fromValue(String value) { + for (PositionSideEnum b : PositionSideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionListData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionListData.java new file mode 100644 index 00000000..c8c4a2e8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionListData.java @@ -0,0 +1,278 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPositionListData { + /** Position ID */ + @JsonProperty("id") + private String id; + + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Whether it is cross margin. */ + @JsonProperty("crossMode") + private Boolean crossMode; + + /** ADL ranking percentile */ + @JsonProperty("delevPercentage") + private Double delevPercentage; + + /** First opening time */ + @JsonProperty("openingTimestamp") + private Long openingTimestamp; + + /** Current timestamp */ + @JsonProperty("currentTimestamp") + private Long currentTimestamp; + + /** Current postion quantity */ + @JsonProperty("currentQty") + private Integer currentQty; + + /** Current postion value */ + @JsonProperty("currentCost") + private Double currentCost; + + /** Current commission */ + @JsonProperty("currentComm") + private Double currentComm; + + /** Unrealised value */ + @JsonProperty("unrealisedCost") + private Double unrealisedCost; + + /** Accumulated realised gross profit value */ + @JsonProperty("realisedGrossCost") + private Double realisedGrossCost; + + /** Current realised position value */ + @JsonProperty("realisedCost") + private Double realisedCost; + + /** Opened position or not */ + @JsonProperty("isOpen") + private Boolean isOpen; + + /** Mark price */ + @JsonProperty("markPrice") + private Double markPrice; + + /** Mark Value */ + @JsonProperty("markValue") + private Double markValue; + + /** Position value */ + @JsonProperty("posCost") + private Double posCost; + + /** + * Inital margin Cross = opening value/cross leverage; isolated = accumulation of initial margin + * for each transaction + */ + @JsonProperty("posInit") + private Double posInit; + + /** + * Bankruptcy cost Cross = mark value * imr; Isolated = position margin (accumulation of initial + * margin, additional margin, generated funding fees, etc.) + */ + @JsonProperty("posMargin") + private Double posMargin; + + /** Accumulated realised gross profit value */ + @JsonProperty("realisedGrossPnl") + private Double realisedGrossPnl; + + /** Realised profit and loss */ + @JsonProperty("realisedPnl") + private Double realisedPnl; + + /** Unrealised profit and loss */ + @JsonProperty("unrealisedPnl") + private Double unrealisedPnl; + + /** Profit-loss ratio of the position */ + @JsonProperty("unrealisedPnlPcnt") + private Double unrealisedPnlPcnt; + + /** Rate of return on investment */ + @JsonProperty("unrealisedRoePcnt") + private Double unrealisedRoePcnt; + + /** Average entry price */ + @JsonProperty("avgEntryPrice") + private Double avgEntryPrice; + + /** + * Liquidation price For Cross Margin, you can refer to the liquidationPrice, and the liquidation + * is based on the risk rate. + */ + @JsonProperty("liquidationPrice") + private Double liquidationPrice; + + /** + * Bankruptcy price For Cross Margin, you can refer to the bankruptPrice, and the liquidation is + * based on the risk rate. + */ + @JsonProperty("bankruptPrice") + private Double bankruptPrice; + + /** Currency used to clear and settle the trades */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** Reverse contract or not */ + @JsonProperty("isInverse") + private Boolean isInverse; + + /** Margin Mode: CROSS,ISOLATED */ + @JsonProperty("marginMode") + private MarginModeEnum marginMode; + + /** Position Side */ + @JsonProperty("positionSide") + private PositionSideEnum positionSide; + + /** Leverage */ + @JsonProperty("leverage") + private Double leverage; + + /** Auto deposit margin or not **Only applicable to Isolated Margin** */ + @JsonProperty("autoDeposit") + private Boolean autoDeposit; + + /** Maintenance margin requirement */ + @JsonProperty("maintMarginReq") + private Double maintMarginReq; + + /** Risk limit **Only applicable to Isolated Margin** */ + @JsonProperty("riskLimit") + private Double riskLimit; + + /** Leverage of the order **Only applicable to Isolated Margin** */ + @JsonProperty("realLeverage") + private Double realLeverage; + + /** added margin **Only applicable to Isolated Margin** */ + @JsonProperty("posCross") + private Double posCross; + + /** + * Additional margin calls (automatic, manual, adjusted risk limits) **Only applicable to Isolated + * Margin** + */ + @JsonProperty("posCrossMargin") + private Double posCrossMargin; + + /** Bankruptcy cost **Only applicable to Isolated Margin** */ + @JsonProperty("posComm") + private Double posComm; + + /** Part of bankruptcy cost (positioning, add margin) **Only applicable to Isolated Margin** */ + @JsonProperty("posCommCommon") + private Double posCommCommon; + + /** Funding fees paid out **Only applicable to Isolated Margin** */ + @JsonProperty("posLoss") + private Double posLoss; + + /** + * The current remaining unsettled funding fee for the position **Only applicable to Isolated + * Margin** + */ + @JsonProperty("posFunding") + private Double posFunding; + + /** Maintenance margin */ + @JsonProperty("posMaint") + private Double posMaint; + + /** Position margin **Only applicable to Isolated Margin** */ + @JsonProperty("maintMargin") + private Double maintMargin; + + /** Maintenance margin rate **Only applicable to Isolated Margin** */ + @JsonProperty("maintainMargin") + private Double maintainMargin; + + public enum MarginModeEnum { + /** cross margin */ + CROSS("CROSS"), + /** isolated margin */ + ISOLATED("ISOLATED"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum PositionSideEnum { + /** One-way position */ + BOTH("BOTH"); + + private final String value; + + PositionSideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PositionSideEnum fromValue(String value) { + for (PositionSideEnum b : PositionSideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionListReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionListReq.java new file mode 100644 index 00000000..a044ba42 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionListReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPositionListReq implements Request { + /** + * Quote currency code, Please refer to + * [rootSymbol](https://www.kucoin.com/docs-new/api-221752070) , such as USDT,XBT. Query all + * positions when empty + */ + @JsonProperty("currency") + private String currency; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionListResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionListResp.java new file mode 100644 index 00000000..229544fa --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionListResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPositionListResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetPositionListResp fromJson(List data) { + // original response + GetPositionListResp obj = new GetPositionListResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionsHistoryItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionsHistoryItems.java new file mode 100644 index 00000000..93c3aa08 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionsHistoryItems.java @@ -0,0 +1,141 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPositionsHistoryItems { + /** Close ID */ + @JsonProperty("closeId") + private String closeId; + + /** User ID */ + @JsonProperty("userId") + private String userId; + + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Currency used to settle trades */ + @JsonProperty("settleCurrency") + private String settleCurrency; + + /** Leverage applied to the order */ + @JsonProperty("leverage") + private String leverage; + + /** Type of closure */ + @JsonProperty("type") + private String type; + + /** Net profit and loss (after deducting fees and funding costs) */ + @JsonProperty("pnl") + private String pnl; + + /** Accumulated realised gross profit value */ + @JsonProperty("realisedGrossCost") + private String realisedGrossCost; + + /** Accumulated realised profit withdrawn from the position */ + @JsonProperty("withdrawPnl") + private String withdrawPnl; + + /** Accumulated trading fees */ + @JsonProperty("tradeFee") + private String tradeFee; + + /** Accumulated funding fees */ + @JsonProperty("fundingFee") + private String fundingFee; + + /** Time when the position was opened */ + @JsonProperty("openTime") + private Long openTime; + + /** Time when the position was closed (default sorted in descending order) */ + @JsonProperty("closeTime") + private Long closeTime; + + /** Opening price of the position */ + @JsonProperty("openPrice") + private String openPrice; + + /** Closing price of the position */ + @JsonProperty("closePrice") + private String closePrice; + + /** Margin Mode: CROSS,ISOLATED */ + @JsonProperty("marginMode") + private MarginModeEnum marginMode; + + /** */ + @JsonProperty("realisedGrossCostNew") + private String realisedGrossCostNew; + + /** Tax */ + @JsonProperty("tax") + private String tax; + + /** */ + @JsonProperty("roe") + private String roe; + + /** */ + @JsonProperty("liquidAmount") + private String liquidAmount; + + /** */ + @JsonProperty("liquidPrice") + private String liquidPrice; + + /** Position side */ + @JsonProperty("side") + private String side; + + public enum MarginModeEnum { + /** cross margin */ + CROSS("CROSS"), + /** isolated margin */ + ISOLATED("ISOLATED"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionsHistoryReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionsHistoryReq.java new file mode 100644 index 00000000..47c33631 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionsHistoryReq.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPositionsHistoryReq implements Request { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Closing start time(ms) */ + @JsonProperty("from") + private Long from; + + /** Closing end time(ms) */ + @JsonProperty("to") + private Long to; + + /** Number of requests per page, max 200, default 10 */ + @JsonProperty("limit") + @Builder.Default + private Integer limit = 10; + + /** Current page number, default 1 */ + @JsonProperty("pageId") + @Builder.Default + private Integer pageId = 1; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionsHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionsHistoryResp.java new file mode 100644 index 00000000..d0e15785 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetPositionsHistoryResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPositionsHistoryResp + implements Response> { + /** Current page number */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** Number of results per page */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** Total number of results */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** Total number of pages */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyAutoDepositStatusReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyAutoDepositStatusReq.java new file mode 100644 index 00000000..a4d859a8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyAutoDepositStatusReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifyAutoDepositStatusReq implements Request { + /** Symbol of the contract */ + @JsonProperty("symbol") + private String symbol; + + /** Status */ + @JsonProperty("status") + private Boolean status; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyAutoDepositStatusResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyAutoDepositStatusResp.java new file mode 100644 index 00000000..edcb5854 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyAutoDepositStatusResp.java @@ -0,0 +1,40 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifyAutoDepositStatusResp + implements Response> { + /** */ + @JsonProperty("data") + private Boolean data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static ModifyAutoDepositStatusResp fromJson(Boolean data) { + // original response + ModifyAutoDepositStatusResp obj = new ModifyAutoDepositStatusResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyIsolatedMarginRiskLimtReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyIsolatedMarginRiskLimtReq.java new file mode 100644 index 00000000..a0dc8039 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyIsolatedMarginRiskLimtReq.java @@ -0,0 +1,29 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifyIsolatedMarginRiskLimtReq implements Request { + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Level */ + @JsonProperty("level") + private Integer level; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyIsolatedMarginRiskLimtResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyIsolatedMarginRiskLimtResp.java new file mode 100644 index 00000000..cbb9c8e4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyIsolatedMarginRiskLimtResp.java @@ -0,0 +1,44 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifyIsolatedMarginRiskLimtResp + implements Response< + ModifyIsolatedMarginRiskLimtResp, RestResponse> { + /** + * Adjusting the level will result in the cancellation of any open orders. The response will + * indicate only whether the adjustment request was successfully submitted. + */ + @JsonProperty("data") + private Boolean data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static ModifyIsolatedMarginRiskLimtResp fromJson(Boolean data) { + // original response + ModifyIsolatedMarginRiskLimtResp obj = new ModifyIsolatedMarginRiskLimtResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyMarginLeverageReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyMarginLeverageReq.java new file mode 100644 index 00000000..b77eb478 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyMarginLeverageReq.java @@ -0,0 +1,29 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifyMarginLeverageReq implements Request { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Leverage multiple */ + @JsonProperty("leverage") + private String leverage; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyMarginLeverageResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyMarginLeverageResp.java new file mode 100644 index 00000000..180e2e3c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyMarginLeverageResp.java @@ -0,0 +1,40 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifyMarginLeverageResp + implements Response> { + /** */ + @JsonProperty("data") + private Boolean data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static ModifyMarginLeverageResp fromJson(Boolean data) { + // original response + ModifyMarginLeverageResp obj = new ModifyMarginLeverageResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.java new file mode 100644 index 00000000..9cf32b3f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.java @@ -0,0 +1,158 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +public interface PositionsApi { + /** + * Get Margin Mode This interface can query the margin mode of the current symbol. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetMarginModeResp getMarginMode(GetMarginModeReq req); + + /** + * Switch Margin Mode This interface can modify the margin mode of the current symbol. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + SwitchMarginModeResp switchMarginMode(SwitchMarginModeReq req); + + /** + * Batch Switch Margin Mode Batch modify the margin mode of the symbols. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + BatchSwitchMarginModeResp batchSwitchMarginMode(BatchSwitchMarginModeReq req); + + /** + * Get Max Open Size Get Maximum Open Position Size. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetMaxOpenSizeResp getMaxOpenSize(GetMaxOpenSizeReq req); + + /** + * Get Position Details Get the position details of a specified position. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetPositionDetailsResp getPositionDetails(GetPositionDetailsReq req); + + /** + * Get Position List Get the position details of a specified position. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetPositionListResp getPositionList(GetPositionListReq req); + + /** + * Get Positions History This interface can query position history information records. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetPositionsHistoryResp getPositionsHistory(GetPositionsHistoryReq req); + + /** + * Get Max Withdraw Margin This interface can query the maximum amount of margin that the current + * position supports withdrawal. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ + */ + GetMaxWithdrawMarginResp getMaxWithdrawMargin(GetMaxWithdrawMarginReq req); + + /** + * Get Cross Margin Leverage This interface can query the current symbol’s cross-margin leverage + * multiple. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + GetCrossMarginLeverageResp getCrossMarginLeverage(GetCrossMarginLeverageReq req); + + /** + * Modify Cross Margin Leverage This interface can modify the current symbol’s cross-margin + * leverage multiple. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + ModifyMarginLeverageResp modifyMarginLeverage(ModifyMarginLeverageReq req); + + /** + * Add Isolated Margin Add Isolated Margin Manually. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 4 | +-----------------------+---------+ + */ + AddIsolatedMarginResp addIsolatedMargin(AddIsolatedMarginReq req); + + /** + * Remove Isolated Margin Remove Isolated Margin Manually. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+---------+ + */ + RemoveIsolatedMarginResp removeIsolatedMargin(RemoveIsolatedMarginReq req); + + /** + * Get Cross Margin Risk Limit Batch get cross margin risk limit. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetCrossMarginRiskLimitResp getCrossMarginRiskLimit(GetCrossMarginRiskLimitReq req); + + /** + * Get Isolated Margin Risk Limit This interface can be used to obtain information about risk + * limit level of a specific contract (only valid for Isolated Margin). docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + GetIsolatedMarginRiskLimitResp getIsolatedMarginRiskLimit(GetIsolatedMarginRiskLimitReq req); + + /** + * Modify Isolated Margin Risk Limit This interface can be used to obtain information about risk + * limit level of a specific contract (only valid for Isolated Margin). docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + ModifyIsolatedMarginRiskLimtResp modifyIsolatedMarginRiskLimt( + ModifyIsolatedMarginRiskLimtReq req); + + /** + * Modify Isolated Margin Auto-Deposit Status This endpoint is only applicable to isolated margin + * and is no longer recommended. It is recommended to use cross margin instead. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 4 | + * +-----------------------+---------+ + */ + ModifyAutoDepositStatusResp modifyAutoDepositStatus(ModifyAutoDepositStatusReq req); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.template new file mode 100644 index 00000000..6749fd13 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.template @@ -0,0 +1,409 @@ + + /** + * getMarginMode + * Get Margin Mode + * /api/v2/position/getMarginMode + */ + public void testGetMarginMode() { + GetMarginModeReq.GetMarginModeReqBuilder builder = GetMarginModeReq.builder(); + builder.symbol(?); + GetMarginModeReq req = builder.build(); + GetMarginModeResp resp = this.api.getMarginMode(req); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->marginMode); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * switchMarginMode + * Switch Margin Mode + * /api/v2/position/changeMarginMode + */ + public void testSwitchMarginMode() { + SwitchMarginModeReq.SwitchMarginModeReqBuilder builder = SwitchMarginModeReq.builder(); + builder.symbol(?).marginMode(?); + SwitchMarginModeReq req = builder.build(); + SwitchMarginModeResp resp = this.api.switchMarginMode(req); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->marginMode); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * batchSwitchMarginMode + * Batch Switch Margin Mode + * /api/v2/position/batchChangeMarginMode + */ + public void testBatchSwitchMarginMode() { + BatchSwitchMarginModeReq.BatchSwitchMarginModeReqBuilder builder = BatchSwitchMarginModeReq.builder(); + builder.marginMode(?).symbols(?); + BatchSwitchMarginModeReq req = builder.build(); + BatchSwitchMarginModeResp resp = this.api.batchSwitchMarginMode(req); + self::assertNotNull($resp->marginMode); + foreach($resp->errors as $item) { + self::assertNotNull($item->code); + self::assertNotNull($item->msg); + self::assertNotNull($item->symbol); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getMaxOpenSize + * Get Max Open Size + * /api/v2/getMaxOpenSize + */ + public void testGetMaxOpenSize() { + GetMaxOpenSizeReq.GetMaxOpenSizeReqBuilder builder = GetMaxOpenSizeReq.builder(); + builder.symbol(?).price(?).leverage(?); + GetMaxOpenSizeReq req = builder.build(); + GetMaxOpenSizeResp resp = this.api.getMaxOpenSize(req); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->maxBuyOpenSize); + self::assertNotNull($resp->maxSellOpenSize); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getPositionDetails + * Get Position Details + * /api/v1/position + */ + public void testGetPositionDetails() { + GetPositionDetailsReq.GetPositionDetailsReqBuilder builder = GetPositionDetailsReq.builder(); + builder.symbol(?); + GetPositionDetailsReq req = builder.build(); + GetPositionDetailsResp resp = this.api.getPositionDetails(req); + self::assertNotNull($resp->id); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->crossMode); + self::assertNotNull($resp->delevPercentage); + self::assertNotNull($resp->openingTimestamp); + self::assertNotNull($resp->currentTimestamp); + self::assertNotNull($resp->currentQty); + self::assertNotNull($resp->currentCost); + self::assertNotNull($resp->currentComm); + self::assertNotNull($resp->unrealisedCost); + self::assertNotNull($resp->realisedGrossCost); + self::assertNotNull($resp->realisedCost); + self::assertNotNull($resp->isOpen); + self::assertNotNull($resp->markPrice); + self::assertNotNull($resp->markValue); + self::assertNotNull($resp->posCost); + self::assertNotNull($resp->posInit); + self::assertNotNull($resp->posMargin); + self::assertNotNull($resp->realisedGrossPnl); + self::assertNotNull($resp->realisedPnl); + self::assertNotNull($resp->unrealisedPnl); + self::assertNotNull($resp->unrealisedPnlPcnt); + self::assertNotNull($resp->unrealisedRoePcnt); + self::assertNotNull($resp->avgEntryPrice); + self::assertNotNull($resp->liquidationPrice); + self::assertNotNull($resp->bankruptPrice); + self::assertNotNull($resp->settleCurrency); + self::assertNotNull($resp->isInverse); + self::assertNotNull($resp->marginMode); + self::assertNotNull($resp->positionSide); + self::assertNotNull($resp->leverage); + self::assertNotNull($resp->autoDeposit); + self::assertNotNull($resp->maintMarginReq); + self::assertNotNull($resp->riskLimit); + self::assertNotNull($resp->realLeverage); + self::assertNotNull($resp->posCross); + self::assertNotNull($resp->posCrossMargin); + self::assertNotNull($resp->posComm); + self::assertNotNull($resp->posCommCommon); + self::assertNotNull($resp->posLoss); + self::assertNotNull($resp->posFunding); + self::assertNotNull($resp->posMaint); + self::assertNotNull($resp->maintMargin); + self::assertNotNull($resp->maintainMargin); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getPositionList + * Get Position List + * /api/v1/positions + */ + public void testGetPositionList() { + GetPositionListReq.GetPositionListReqBuilder builder = GetPositionListReq.builder(); + builder.currency(?); + GetPositionListReq req = builder.build(); + GetPositionListResp resp = this.api.getPositionList(req); + foreach($resp->data as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->symbol); + self::assertNotNull($item->crossMode); + self::assertNotNull($item->delevPercentage); + self::assertNotNull($item->openingTimestamp); + self::assertNotNull($item->currentTimestamp); + self::assertNotNull($item->currentQty); + self::assertNotNull($item->currentCost); + self::assertNotNull($item->currentComm); + self::assertNotNull($item->unrealisedCost); + self::assertNotNull($item->realisedGrossCost); + self::assertNotNull($item->realisedCost); + self::assertNotNull($item->isOpen); + self::assertNotNull($item->markPrice); + self::assertNotNull($item->markValue); + self::assertNotNull($item->posCost); + self::assertNotNull($item->posInit); + self::assertNotNull($item->posMargin); + self::assertNotNull($item->realisedGrossPnl); + self::assertNotNull($item->realisedPnl); + self::assertNotNull($item->unrealisedPnl); + self::assertNotNull($item->unrealisedPnlPcnt); + self::assertNotNull($item->unrealisedRoePcnt); + self::assertNotNull($item->avgEntryPrice); + self::assertNotNull($item->liquidationPrice); + self::assertNotNull($item->bankruptPrice); + self::assertNotNull($item->settleCurrency); + self::assertNotNull($item->isInverse); + self::assertNotNull($item->marginMode); + self::assertNotNull($item->positionSide); + self::assertNotNull($item->leverage); + self::assertNotNull($item->autoDeposit); + self::assertNotNull($item->maintMarginReq); + self::assertNotNull($item->riskLimit); + self::assertNotNull($item->realLeverage); + self::assertNotNull($item->posCross); + self::assertNotNull($item->posCrossMargin); + self::assertNotNull($item->posComm); + self::assertNotNull($item->posCommCommon); + self::assertNotNull($item->posLoss); + self::assertNotNull($item->posFunding); + self::assertNotNull($item->posMaint); + self::assertNotNull($item->maintMargin); + self::assertNotNull($item->maintainMargin); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getPositionsHistory + * Get Positions History + * /api/v1/history-positions + */ + public void testGetPositionsHistory() { + GetPositionsHistoryReq.GetPositionsHistoryReqBuilder builder = GetPositionsHistoryReq.builder(); + builder.symbol(?).from(?).to(?).limit(?).pageId(?); + GetPositionsHistoryReq req = builder.build(); + GetPositionsHistoryResp resp = this.api.getPositionsHistory(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->closeId); + self::assertNotNull($item->userId); + self::assertNotNull($item->symbol); + self::assertNotNull($item->settleCurrency); + self::assertNotNull($item->leverage); + self::assertNotNull($item->type); + self::assertNotNull($item->pnl); + self::assertNotNull($item->realisedGrossCost); + self::assertNotNull($item->withdrawPnl); + self::assertNotNull($item->tradeFee); + self::assertNotNull($item->fundingFee); + self::assertNotNull($item->openTime); + self::assertNotNull($item->closeTime); + self::assertNotNull($item->openPrice); + self::assertNotNull($item->closePrice); + self::assertNotNull($item->marginMode); + self::assertNotNull($item->realisedGrossCostNew); + self::assertNotNull($item->tax); + self::assertNotNull($item->roe); + self::assertNotNull($item->liquidAmount); + self::assertNotNull($item->liquidPrice); + self::assertNotNull($item->side); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getMaxWithdrawMargin + * Get Max Withdraw Margin + * /api/v1/margin/maxWithdrawMargin + */ + public void testGetMaxWithdrawMargin() { + GetMaxWithdrawMarginReq.GetMaxWithdrawMarginReqBuilder builder = GetMaxWithdrawMarginReq.builder(); + builder.symbol(?); + GetMaxWithdrawMarginReq req = builder.build(); + GetMaxWithdrawMarginResp resp = this.api.getMaxWithdrawMargin(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getCrossMarginLeverage + * Get Cross Margin Leverage + * /api/v2/getCrossUserLeverage + */ + public void testGetCrossMarginLeverage() { + GetCrossMarginLeverageReq.GetCrossMarginLeverageReqBuilder builder = GetCrossMarginLeverageReq.builder(); + builder.symbol(?); + GetCrossMarginLeverageReq req = builder.build(); + GetCrossMarginLeverageResp resp = this.api.getCrossMarginLeverage(req); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->leverage); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * modifyMarginLeverage + * Modify Cross Margin Leverage + * /api/v2/changeCrossUserLeverage + */ + public void testModifyMarginLeverage() { + ModifyMarginLeverageReq.ModifyMarginLeverageReqBuilder builder = ModifyMarginLeverageReq.builder(); + builder.symbol(?).leverage(?); + ModifyMarginLeverageReq req = builder.build(); + ModifyMarginLeverageResp resp = this.api.modifyMarginLeverage(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addIsolatedMargin + * Add Isolated Margin + * /api/v1/position/margin/deposit-margin + */ + public void testAddIsolatedMargin() { + AddIsolatedMarginReq.AddIsolatedMarginReqBuilder builder = AddIsolatedMarginReq.builder(); + builder.symbol(?).margin(?).bizNo(?); + AddIsolatedMarginReq req = builder.build(); + AddIsolatedMarginResp resp = this.api.addIsolatedMargin(req); + self::assertNotNull($resp->id); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->autoDeposit); + self::assertNotNull($resp->maintMarginReq); + self::assertNotNull($resp->riskLimit); + self::assertNotNull($resp->realLeverage); + self::assertNotNull($resp->crossMode); + self::assertNotNull($resp->delevPercentage); + self::assertNotNull($resp->openingTimestamp); + self::assertNotNull($resp->currentTimestamp); + self::assertNotNull($resp->currentQty); + self::assertNotNull($resp->currentCost); + self::assertNotNull($resp->currentComm); + self::assertNotNull($resp->unrealisedCost); + self::assertNotNull($resp->realisedGrossCost); + self::assertNotNull($resp->realisedCost); + self::assertNotNull($resp->isOpen); + self::assertNotNull($resp->markPrice); + self::assertNotNull($resp->markValue); + self::assertNotNull($resp->posCost); + self::assertNotNull($resp->posCross); + self::assertNotNull($resp->posInit); + self::assertNotNull($resp->posComm); + self::assertNotNull($resp->posLoss); + self::assertNotNull($resp->posMargin); + self::assertNotNull($resp->posMaint); + self::assertNotNull($resp->maintMargin); + self::assertNotNull($resp->realisedGrossPnl); + self::assertNotNull($resp->realisedPnl); + self::assertNotNull($resp->unrealisedPnl); + self::assertNotNull($resp->unrealisedPnlPcnt); + self::assertNotNull($resp->unrealisedRoePcnt); + self::assertNotNull($resp->avgEntryPrice); + self::assertNotNull($resp->liquidationPrice); + self::assertNotNull($resp->bankruptPrice); + self::assertNotNull($resp->userId); + self::assertNotNull($resp->settleCurrency); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * removeIsolatedMargin + * Remove Isolated Margin + * /api/v1/margin/withdrawMargin + */ + public void testRemoveIsolatedMargin() { + RemoveIsolatedMarginReq.RemoveIsolatedMarginReqBuilder builder = RemoveIsolatedMarginReq.builder(); + builder.symbol(?).withdrawAmount(?); + RemoveIsolatedMarginReq req = builder.build(); + RemoveIsolatedMarginResp resp = this.api.removeIsolatedMargin(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getCrossMarginRiskLimit + * Get Cross Margin Risk Limit + * /api/v2/batchGetCrossOrderLimit + */ + public void testGetCrossMarginRiskLimit() { + GetCrossMarginRiskLimitReq.GetCrossMarginRiskLimitReqBuilder builder = GetCrossMarginRiskLimitReq.builder(); + builder.symbol(?).totalMargin(?).leverage(?); + GetCrossMarginRiskLimitReq req = builder.build(); + GetCrossMarginRiskLimitResp resp = this.api.getCrossMarginRiskLimit(req); + foreach($resp->data as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->maxOpenSize); + self::assertNotNull($item->maxOpenValue); + self::assertNotNull($item->totalMargin); + self::assertNotNull($item->price); + self::assertNotNull($item->leverage); + self::assertNotNull($item->mmr); + self::assertNotNull($item->imr); + self::assertNotNull($item->currency); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getIsolatedMarginRiskLimit + * Get Isolated Margin Risk Limit + * /api/v1/contracts/risk-limit/{symbol} + */ + public void testGetIsolatedMarginRiskLimit() { + GetIsolatedMarginRiskLimitReq.GetIsolatedMarginRiskLimitReqBuilder builder = GetIsolatedMarginRiskLimitReq.builder(); + builder.symbol(?); + GetIsolatedMarginRiskLimitReq req = builder.build(); + GetIsolatedMarginRiskLimitResp resp = this.api.getIsolatedMarginRiskLimit(req); + foreach($resp->data as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->level); + self::assertNotNull($item->maxRiskLimit); + self::assertNotNull($item->minRiskLimit); + self::assertNotNull($item->maxLeverage); + self::assertNotNull($item->initialMargin); + self::assertNotNull($item->maintainMargin); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * modifyIsolatedMarginRiskLimt + * Modify Isolated Margin Risk Limit + * /api/v1/position/risk-limit-level/change + */ + public void testModifyIsolatedMarginRiskLimt() { + ModifyIsolatedMarginRiskLimtReq.ModifyIsolatedMarginRiskLimtReqBuilder builder = ModifyIsolatedMarginRiskLimtReq.builder(); + builder.symbol(?).level(?); + ModifyIsolatedMarginRiskLimtReq req = builder.build(); + ModifyIsolatedMarginRiskLimtResp resp = this.api.modifyIsolatedMarginRiskLimt(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * modifyAutoDepositStatus + * Modify Isolated Margin Auto-Deposit Status + * /api/v1/position/margin/auto-deposit-status + */ + public void testModifyAutoDepositStatus() { + ModifyAutoDepositStatusReq.ModifyAutoDepositStatusReqBuilder builder = ModifyAutoDepositStatusReq.builder(); + builder.symbol(?).status(?); + ModifyAutoDepositStatusReq req = builder.build(); + ModifyAutoDepositStatusResp resp = this.api.modifyAutoDepositStatus(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApiAutoGeneratedTest.java new file mode 100644 index 00000000..ef405840 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApiAutoGeneratedTest.java @@ -0,0 +1,769 @@ +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class PositionsApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** getMarginMode Request Get Margin Mode /api/v2/position/getMarginMode */ + public static void testGetMarginModeRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\"}"; + GetMarginModeReq obj = mapper.readValue(data, GetMarginModeReq.class); + } + + /** getMarginMode Response Get Margin Mode /api/v2/position/getMarginMode */ + public static void testGetMarginModeResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"marginMode\": \"ISOLATED\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** switchMarginMode Request Switch Margin Mode /api/v2/position/changeMarginMode */ + public static void testSwitchMarginModeRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\", \"marginMode\": \"ISOLATED\"}"; + SwitchMarginModeReq obj = mapper.readValue(data, SwitchMarginModeReq.class); + } + + /** switchMarginMode Response Switch Margin Mode /api/v2/position/changeMarginMode */ + public static void testSwitchMarginModeResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"marginMode\": \"ISOLATED\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * batchSwitchMarginMode Request Batch Switch Margin Mode /api/v2/position/batchChangeMarginMode + */ + public static void testBatchSwitchMarginModeRequest() throws Exception { + String data = "{\"marginMode\": \"ISOLATED\", \"symbols\": [\"XBTUSDTM\", \"ETHUSDTM\"]}"; + BatchSwitchMarginModeReq obj = mapper.readValue(data, BatchSwitchMarginModeReq.class); + } + + /** + * batchSwitchMarginMode Response Batch Switch Margin Mode /api/v2/position/batchChangeMarginMode + */ + public static void testBatchSwitchMarginModeResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"marginMode\": {\n" + + " \"ETHUSDTM\": \"ISOLATED\",\n" + + " \"XBTUSDTM\": \"CROSS\"\n" + + " },\n" + + " \"errors\": [\n" + + " {\n" + + " \"code\": \"50002\",\n" + + " \"msg\": \"exist.order.or.position\",\n" + + " \"symbol\": \"XBTUSDTM\"\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getMaxOpenSize Request Get Max Open Size /api/v2/getMaxOpenSize */ + public static void testGetMaxOpenSizeRequest() throws Exception { + String data = + "{\"symbol\": \"XBTUSDTM\", \"price\": \"example_string_default_value\", \"leverage\":" + + " 123456}"; + GetMaxOpenSizeReq obj = mapper.readValue(data, GetMaxOpenSizeReq.class); + } + + /** getMaxOpenSize Response Get Max Open Size /api/v2/getMaxOpenSize */ + public static void testGetMaxOpenSizeResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"maxBuyOpenSize\": 0,\n" + + " \"maxSellOpenSize\": 0\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getPositionDetails Request Get Position Details /api/v1/position */ + public static void testGetPositionDetailsRequest() throws Exception { + String data = "{\"symbol\": \"example_string_default_value\"}"; + GetPositionDetailsReq obj = mapper.readValue(data, GetPositionDetailsReq.class); + } + + /** getPositionDetails Response Get Position Details /api/v1/position */ + public static void testGetPositionDetailsResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"500000000000988255\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"autoDeposit\": false,\n" + + " \"crossMode\": false,\n" + + " \"maintMarginReq\": 0.005,\n" + + " \"riskLimit\": 500000,\n" + + " \"realLeverage\": 2.88,\n" + + " \"delevPercentage\": 0.18,\n" + + " \"openingTimestamp\": 1729155616322,\n" + + " \"currentTimestamp\": 1729482542135,\n" + + " \"currentQty\": 1,\n" + + " \"currentCost\": 67.4309,\n" + + " \"currentComm\": 0.01925174,\n" + + " \"unrealisedCost\": 67.4309,\n" + + " \"realisedGrossCost\": 0.0,\n" + + " \"realisedCost\": 0.01925174,\n" + + " \"isOpen\": true,\n" + + " \"markPrice\": 68900.7,\n" + + " \"markValue\": 68.9007,\n" + + " \"posCost\": 67.4309,\n" + + " \"posCross\": 0.01645214,\n" + + " \"posCrossMargin\": 0,\n" + + " \"posInit\": 22.4769666644,\n" + + " \"posComm\": 0.0539546299,\n" + + " \"posCommCommon\": 0.0539447199,\n" + + " \"posLoss\": 0.03766885,\n" + + " \"posMargin\": 22.5097045843,\n" + + " \"posFunding\": -0.0212068,\n" + + " \"posMaint\": 0.3931320569,\n" + + " \"maintMargin\": 23.9795045843,\n" + + " \"realisedGrossPnl\": 0.0,\n" + + " \"realisedPnl\": -0.06166534,\n" + + " \"unrealisedPnl\": 1.4698,\n" + + " \"unrealisedPnlPcnt\": 0.0218,\n" + + " \"unrealisedRoePcnt\": 0.0654,\n" + + " \"avgEntryPrice\": 67430.9,\n" + + " \"liquidationPrice\": 45314.33,\n" + + " \"bankruptPrice\": 44975.16,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"maintainMargin\": 0.005,\n" + + " \"riskLimitLevel\": 2,\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"positionSide\": \"BOTH\",\n" + + " \"leverage\": 2.88\n" + + " }\n" + + "}\n"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getPositionList Request Get Position List /api/v1/positions */ + public static void testGetPositionListRequest() throws Exception { + String data = "{\"currency\": \"USDT\"}"; + GetPositionListReq obj = mapper.readValue(data, GetPositionListReq.class); + } + + /** getPositionList Response Get Position List /api/v1/positions */ + public static void testGetPositionListResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"500000000001046430\",\n" + + " \"symbol\": \"ETHUSDM\",\n" + + " \"crossMode\": true,\n" + + " \"delevPercentage\": 0.71,\n" + + " \"openingTimestamp\": 1730635780702,\n" + + " \"currentTimestamp\": 1730636040926,\n" + + " \"currentQty\": 1,\n" + + " \"currentCost\": -4.069805E-4,\n" + + " \"currentComm\": 2.441E-7,\n" + + " \"unrealisedCost\": -4.069805E-4,\n" + + " \"realisedGrossCost\": 0.0,\n" + + " \"realisedCost\": 2.441E-7,\n" + + " \"isOpen\": true,\n" + + " \"markPrice\": 2454.12,\n" + + " \"markValue\": -4.07478E-4,\n" + + " \"posCost\": -4.069805E-4,\n" + + " \"posInit\": 4.06981E-5,\n" + + " \"posMargin\": 4.07478E-5,\n" + + " \"realisedGrossPnl\": 0.0,\n" + + " \"realisedPnl\": -2.441E-7,\n" + + " \"unrealisedPnl\": -4.975E-7,\n" + + " \"unrealisedPnlPcnt\": -0.0012,\n" + + " \"unrealisedRoePcnt\": -0.0122,\n" + + " \"avgEntryPrice\": 2457.12,\n" + + " \"liquidationPrice\": 1429.96,\n" + + " \"bankruptPrice\": 1414.96,\n" + + " \"settleCurrency\": \"ETH\",\n" + + " \"isInverse\": true,\n" + + " \"marginMode\": \"CROSS\",\n" + + " \"positionSide\": \"BOTH\",\n" + + " \"leverage\": 10\n" + + " },\n" + + " {\n" + + " \"id\": \"500000000000988255\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"autoDeposit\": true,\n" + + " \"crossMode\": false,\n" + + " \"maintMarginReq\": 0.005,\n" + + " \"riskLimit\": 500000,\n" + + " \"realLeverage\": 2.97,\n" + + " \"delevPercentage\": 0.5,\n" + + " \"openingTimestamp\": 1729155616322,\n" + + " \"currentTimestamp\": 1730636040926,\n" + + " \"currentQty\": 1,\n" + + " \"currentCost\": 67.4309,\n" + + " \"currentComm\": -0.15936162,\n" + + " \"unrealisedCost\": 67.4309,\n" + + " \"realisedGrossCost\": 0.0,\n" + + " \"realisedCost\": -0.15936162,\n" + + " \"isOpen\": true,\n" + + " \"markPrice\": 68323.06,\n" + + " \"markValue\": 68.32306,\n" + + " \"posCost\": 67.4309,\n" + + " \"posCross\": 0.06225152,\n" + + " \"posCrossMargin\": 0,\n" + + " \"posInit\": 22.2769666644,\n" + + " \"posComm\": 0.0539821899,\n" + + " \"posCommCommon\": 0.0539447199,\n" + + " \"posLoss\": 0.26210915,\n" + + " \"posMargin\": 22.1310912243,\n" + + " \"posFunding\": -0.19982016,\n" + + " \"posMaint\": 0.4046228699,\n" + + " \"maintMargin\": 23.0232512243,\n" + + " \"realisedGrossPnl\": 0.0,\n" + + " \"realisedPnl\": -0.2402787,\n" + + " \"unrealisedPnl\": 0.89216,\n" + + " \"unrealisedPnlPcnt\": 0.0132,\n" + + " \"unrealisedRoePcnt\": 0.04,\n" + + " \"avgEntryPrice\": 67430.9,\n" + + " \"liquidationPrice\": 45704.44,\n" + + " \"bankruptPrice\": 45353.8,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"isInverse\": false,\n" + + " \"maintainMargin\": 0.005,\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"positionSide\": \"BOTH\",\n" + + " \"leverage\": 2.97\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getPositionsHistory Request Get Positions History /api/v1/history-positions */ + public static void testGetPositionsHistoryRequest() throws Exception { + String data = + "{\"symbol\": \"example_string_default_value\", \"from\": 123456, \"to\": 123456," + + " \"limit\": 10, \"pageId\": 1}"; + GetPositionsHistoryReq obj = mapper.readValue(data, GetPositionsHistoryReq.class); + } + + /** getPositionsHistory Response Get Positions History /api/v1/history-positions */ + public static void testGetPositionsHistoryResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getMaxWithdrawMargin Request Get Max Withdraw Margin /api/v1/margin/maxWithdrawMargin */ + public static void testGetMaxWithdrawMarginRequest() throws Exception { + String data = "{\"symbol\": \"example_string_default_value\"}"; + GetMaxWithdrawMarginReq obj = mapper.readValue(data, GetMaxWithdrawMarginReq.class); + } + + /** getMaxWithdrawMargin Response Get Max Withdraw Margin /api/v1/margin/maxWithdrawMargin */ + public static void testGetMaxWithdrawMarginResponse() throws Exception { + String data = "{\n \"code\": \"200000\",\n \"data\": \"21.1135719252\"\n}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getCrossMarginLeverage Request Get Cross Margin Leverage /api/v2/getCrossUserLeverage */ + public static void testGetCrossMarginLeverageRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\"}"; + GetCrossMarginLeverageReq obj = mapper.readValue(data, GetCrossMarginLeverageReq.class); + } + + /** getCrossMarginLeverage Response Get Cross Margin Leverage /api/v2/getCrossUserLeverage */ + public static void testGetCrossMarginLeverageResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"leverage\": \"3\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** modifyMarginLeverage Request Modify Cross Margin Leverage /api/v2/changeCrossUserLeverage */ + public static void testModifyMarginLeverageRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\", \"leverage\": \"10\"}"; + ModifyMarginLeverageReq obj = mapper.readValue(data, ModifyMarginLeverageReq.class); + } + + /** modifyMarginLeverage Response Modify Cross Margin Leverage /api/v2/changeCrossUserLeverage */ + public static void testModifyMarginLeverageResponse() throws Exception { + String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addIsolatedMargin Request Add Isolated Margin /api/v1/position/margin/deposit-margin */ + public static void testAddIsolatedMarginRequest() throws Exception { + String data = "{\"symbol\": \"string\", \"margin\": 0, \"bizNo\": \"string\"}"; + AddIsolatedMarginReq obj = mapper.readValue(data, AddIsolatedMarginReq.class); + } + + /** addIsolatedMargin Response Add Isolated Margin /api/v1/position/margin/deposit-margin */ + public static void testAddIsolatedMarginResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"6200c9b83aecfb000152ddcd\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"autoDeposit\": false,\n" + + " \"maintMarginReq\": 0.005,\n" + + " \"riskLimit\": 500000,\n" + + " \"realLeverage\": 18.72,\n" + + " \"crossMode\": false,\n" + + " \"delevPercentage\": 0.66,\n" + + " \"openingTimestamp\": 1646287090131,\n" + + " \"currentTimestamp\": 1646295055021,\n" + + " \"currentQty\": 1,\n" + + " \"currentCost\": 43.388,\n" + + " \"currentComm\": 0.0260328,\n" + + " \"unrealisedCost\": 43.388,\n" + + " \"realisedGrossCost\": 0,\n" + + " \"realisedCost\": 0.0260328,\n" + + " \"isOpen\": true,\n" + + " \"markPrice\": 43536.65,\n" + + " \"markValue\": 43.53665,\n" + + " \"posCost\": 43.388,\n" + + " \"posCross\": 0.000024985,\n" + + " \"posInit\": 2.1694,\n" + + " \"posComm\": 0.02733446,\n" + + " \"posLoss\": 0,\n" + + " \"posMargin\": 2.19675944,\n" + + " \"posMaint\": 0.24861326,\n" + + " \"maintMargin\": 2.34540944,\n" + + " \"realisedGrossPnl\": 0,\n" + + " \"realisedPnl\": -0.0260328,\n" + + " \"unrealisedPnl\": 0.14865,\n" + + " \"unrealisedPnlPcnt\": 0.0034,\n" + + " \"unrealisedRoePcnt\": 0.0685,\n" + + " \"avgEntryPrice\": 43388,\n" + + " \"liquidationPrice\": 41440,\n" + + " \"bankruptPrice\": 41218,\n" + + " \"userId\": 1234321123,\n" + + " \"settleCurrency\": \"USDT\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** removeIsolatedMargin Request Remove Isolated Margin /api/v1/margin/withdrawMargin */ + public static void testRemoveIsolatedMarginRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\", \"withdrawAmount\": \"0.0000001\"}"; + RemoveIsolatedMarginReq obj = mapper.readValue(data, RemoveIsolatedMarginReq.class); + } + + /** removeIsolatedMargin Response Remove Isolated Margin /api/v1/margin/withdrawMargin */ + public static void testRemoveIsolatedMarginResponse() throws Exception { + String data = "{\n \"code\": \"200000\",\n \"data\": \"0.1\"\n}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getCrossMarginRiskLimit Request Get Cross Margin Risk Limit /api/v2/batchGetCrossOrderLimit */ + public static void testGetCrossMarginRiskLimitRequest() throws Exception { + String data = + "{\"symbol\": \"XBTUSDTM\", \"totalMargin\": \"example_string_default_value\"," + + " \"leverage\": 123456}"; + GetCrossMarginRiskLimitReq obj = mapper.readValue(data, GetCrossMarginRiskLimitReq.class); + } + + /** + * getCrossMarginRiskLimit Response Get Cross Margin Risk Limit /api/v2/batchGetCrossOrderLimit + */ + public static void testGetCrossMarginRiskLimitResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"maxOpenSize\": 12102,\n" + + " \"maxOpenValue\": \"1234549.2240000000\",\n" + + " \"totalMargin\": \"10000\",\n" + + " \"price\": \"102012\",\n" + + " \"leverage\": \"125.00\",\n" + + " \"mmr\": \"0.00416136\",\n" + + " \"imr\": \"0.008\",\n" + + " \"currency\": \"USDT\"\n" + + " },\n" + + " {\n" + + " \"symbol\": \"ETHUSDTM\",\n" + + " \"maxOpenSize\": 38003,\n" + + " \"maxOpenValue\": \"971508.6920000000\",\n" + + " \"totalMargin\": \"10000\",\n" + + " \"price\": \"2556.4\",\n" + + " \"leverage\": \"100.00\",\n" + + " \"mmr\": \"0.0054623236\",\n" + + " \"imr\": \"0.01\",\n" + + " \"currency\": \"USDT\"\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * getIsolatedMarginRiskLimit Request Get Isolated Margin Risk Limit + * /api/v1/contracts/risk-limit/{symbol} + */ + public static void testGetIsolatedMarginRiskLimitRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\"}"; + GetIsolatedMarginRiskLimitReq obj = mapper.readValue(data, GetIsolatedMarginRiskLimitReq.class); + } + + /** + * getIsolatedMarginRiskLimit Response Get Isolated Margin Risk Limit + * /api/v1/contracts/risk-limit/{symbol} + */ + public static void testGetIsolatedMarginRiskLimitResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 1,\n" + + " \"maxRiskLimit\": 100000,\n" + + " \"minRiskLimit\": 0,\n" + + " \"maxLeverage\": 125,\n" + + " \"initialMargin\": 0.008,\n" + + " \"maintainMargin\": 0.004\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 2,\n" + + " \"maxRiskLimit\": 500000,\n" + + " \"minRiskLimit\": 100000,\n" + + " \"maxLeverage\": 100,\n" + + " \"initialMargin\": 0.01,\n" + + " \"maintainMargin\": 0.005\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 3,\n" + + " \"maxRiskLimit\": 1000000,\n" + + " \"minRiskLimit\": 500000,\n" + + " \"maxLeverage\": 75,\n" + + " \"initialMargin\": 0.014,\n" + + " \"maintainMargin\": 0.007\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 4,\n" + + " \"maxRiskLimit\": 2000000,\n" + + " \"minRiskLimit\": 1000000,\n" + + " \"maxLeverage\": 50,\n" + + " \"initialMargin\": 0.02,\n" + + " \"maintainMargin\": 0.01\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 5,\n" + + " \"maxRiskLimit\": 3000000,\n" + + " \"minRiskLimit\": 2000000,\n" + + " \"maxLeverage\": 30,\n" + + " \"initialMargin\": 0.034,\n" + + " \"maintainMargin\": 0.017\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 6,\n" + + " \"maxRiskLimit\": 5000000,\n" + + " \"minRiskLimit\": 3000000,\n" + + " \"maxLeverage\": 20,\n" + + " \"initialMargin\": 0.05,\n" + + " \"maintainMargin\": 0.025\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 7,\n" + + " \"maxRiskLimit\": 8000000,\n" + + " \"minRiskLimit\": 5000000,\n" + + " \"maxLeverage\": 10,\n" + + " \"initialMargin\": 0.1,\n" + + " \"maintainMargin\": 0.05\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 8,\n" + + " \"maxRiskLimit\": 12000000,\n" + + " \"minRiskLimit\": 8000000,\n" + + " \"maxLeverage\": 5,\n" + + " \"initialMargin\": 0.2,\n" + + " \"maintainMargin\": 0.1\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 9,\n" + + " \"maxRiskLimit\": 20000000,\n" + + " \"minRiskLimit\": 12000000,\n" + + " \"maxLeverage\": 4,\n" + + " \"initialMargin\": 0.25,\n" + + " \"maintainMargin\": 0.125\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 10,\n" + + " \"maxRiskLimit\": 30000000,\n" + + " \"minRiskLimit\": 20000000,\n" + + " \"maxLeverage\": 3,\n" + + " \"initialMargin\": 0.334,\n" + + " \"maintainMargin\": 0.167\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 11,\n" + + " \"maxRiskLimit\": 40000000,\n" + + " \"minRiskLimit\": 30000000,\n" + + " \"maxLeverage\": 2,\n" + + " \"initialMargin\": 0.5,\n" + + " \"maintainMargin\": 0.25\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 12,\n" + + " \"maxRiskLimit\": 50000000,\n" + + " \"minRiskLimit\": 40000000,\n" + + " \"maxLeverage\": 1,\n" + + " \"initialMargin\": 1.0,\n" + + " \"maintainMargin\": 0.5\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue( + data, new TypeReference>() {}); + } + + /** + * modifyIsolatedMarginRiskLimt Request Modify Isolated Margin Risk Limit + * /api/v1/position/risk-limit-level/change + */ + public static void testModifyIsolatedMarginRiskLimtRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\", \"level\": 2}"; + ModifyIsolatedMarginRiskLimtReq obj = + mapper.readValue(data, ModifyIsolatedMarginRiskLimtReq.class); + } + + /** + * modifyIsolatedMarginRiskLimt Response Modify Isolated Margin Risk Limit + * /api/v1/position/risk-limit-level/change + */ + public static void testModifyIsolatedMarginRiskLimtResponse() throws Exception { + String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; + RestResponse resp = + mapper.readValue( + data, new TypeReference>() {}); + } + + /** + * modifyAutoDepositStatus Request Modify Isolated Margin Auto-Deposit Status + * /api/v1/position/margin/auto-deposit-status + */ + public static void testModifyAutoDepositStatusRequest() throws Exception { + String data = "{\"symbol\": \"XBTUSDTM\", \"status\": true}"; + ModifyAutoDepositStatusReq obj = mapper.readValue(data, ModifyAutoDepositStatusReq.class); + } + + /** + * modifyAutoDepositStatus Response Modify Isolated Margin Auto-Deposit Status + * /api/v1/position/margin/auto-deposit-status + */ + public static void testModifyAutoDepositStatusResponse() throws Exception { + String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(PositionsApiAutoGeneratedTest::testGetMarginModeRequest, "testGetMarginModeRequest"); + run(PositionsApiAutoGeneratedTest::testGetMarginModeResponse, "testGetMarginModeResponse"); + run(PositionsApiAutoGeneratedTest::testSwitchMarginModeRequest, "testSwitchMarginModeRequest"); + run( + PositionsApiAutoGeneratedTest::testSwitchMarginModeResponse, + "testSwitchMarginModeResponse"); + run( + PositionsApiAutoGeneratedTest::testBatchSwitchMarginModeRequest, + "testBatchSwitchMarginModeRequest"); + run( + PositionsApiAutoGeneratedTest::testBatchSwitchMarginModeResponse, + "testBatchSwitchMarginModeResponse"); + run(PositionsApiAutoGeneratedTest::testGetMaxOpenSizeRequest, "testGetMaxOpenSizeRequest"); + run(PositionsApiAutoGeneratedTest::testGetMaxOpenSizeResponse, "testGetMaxOpenSizeResponse"); + run( + PositionsApiAutoGeneratedTest::testGetPositionDetailsRequest, + "testGetPositionDetailsRequest"); + run( + PositionsApiAutoGeneratedTest::testGetPositionDetailsResponse, + "testGetPositionDetailsResponse"); + run(PositionsApiAutoGeneratedTest::testGetPositionListRequest, "testGetPositionListRequest"); + run(PositionsApiAutoGeneratedTest::testGetPositionListResponse, "testGetPositionListResponse"); + run( + PositionsApiAutoGeneratedTest::testGetPositionsHistoryRequest, + "testGetPositionsHistoryRequest"); + run( + PositionsApiAutoGeneratedTest::testGetPositionsHistoryResponse, + "testGetPositionsHistoryResponse"); + run( + PositionsApiAutoGeneratedTest::testGetMaxWithdrawMarginRequest, + "testGetMaxWithdrawMarginRequest"); + run( + PositionsApiAutoGeneratedTest::testGetMaxWithdrawMarginResponse, + "testGetMaxWithdrawMarginResponse"); + run( + PositionsApiAutoGeneratedTest::testGetCrossMarginLeverageRequest, + "testGetCrossMarginLeverageRequest"); + run( + PositionsApiAutoGeneratedTest::testGetCrossMarginLeverageResponse, + "testGetCrossMarginLeverageResponse"); + run( + PositionsApiAutoGeneratedTest::testModifyMarginLeverageRequest, + "testModifyMarginLeverageRequest"); + run( + PositionsApiAutoGeneratedTest::testModifyMarginLeverageResponse, + "testModifyMarginLeverageResponse"); + run( + PositionsApiAutoGeneratedTest::testAddIsolatedMarginRequest, + "testAddIsolatedMarginRequest"); + run( + PositionsApiAutoGeneratedTest::testAddIsolatedMarginResponse, + "testAddIsolatedMarginResponse"); + run( + PositionsApiAutoGeneratedTest::testRemoveIsolatedMarginRequest, + "testRemoveIsolatedMarginRequest"); + run( + PositionsApiAutoGeneratedTest::testRemoveIsolatedMarginResponse, + "testRemoveIsolatedMarginResponse"); + run( + PositionsApiAutoGeneratedTest::testGetCrossMarginRiskLimitRequest, + "testGetCrossMarginRiskLimitRequest"); + run( + PositionsApiAutoGeneratedTest::testGetCrossMarginRiskLimitResponse, + "testGetCrossMarginRiskLimitResponse"); + run( + PositionsApiAutoGeneratedTest::testGetIsolatedMarginRiskLimitRequest, + "testGetIsolatedMarginRiskLimitRequest"); + run( + PositionsApiAutoGeneratedTest::testGetIsolatedMarginRiskLimitResponse, + "testGetIsolatedMarginRiskLimitResponse"); + run( + PositionsApiAutoGeneratedTest::testModifyIsolatedMarginRiskLimtRequest, + "testModifyIsolatedMarginRiskLimtRequest"); + run( + PositionsApiAutoGeneratedTest::testModifyIsolatedMarginRiskLimtResponse, + "testModifyIsolatedMarginRiskLimtResponse"); + run( + PositionsApiAutoGeneratedTest::testModifyAutoDepositStatusRequest, + "testModifyAutoDepositStatusRequest"); + run( + PositionsApiAutoGeneratedTest::testModifyAutoDepositStatusResponse, + "testModifyAutoDepositStatusResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApiImpl.java new file mode 100644 index 00000000..e5060384 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApiImpl.java @@ -0,0 +1,173 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class PositionsApiImpl implements PositionsApi { + private final Transport transport; + + public PositionsApiImpl(Transport transport) { + this.transport = transport; + } + + public GetMarginModeResp getMarginMode(GetMarginModeReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v2/position/getMarginMode", + req, + GetMarginModeResp.class, + false); + } + + public SwitchMarginModeResp switchMarginMode(SwitchMarginModeReq req) { + return this.transport.call( + "futures", + false, + "POST", + "/api/v2/position/changeMarginMode", + req, + SwitchMarginModeResp.class, + false); + } + + public BatchSwitchMarginModeResp batchSwitchMarginMode(BatchSwitchMarginModeReq req) { + return this.transport.call( + "futures", + false, + "POST", + "/api/v2/position/batchChangeMarginMode", + req, + BatchSwitchMarginModeResp.class, + false); + } + + public GetMaxOpenSizeResp getMaxOpenSize(GetMaxOpenSizeReq req) { + return this.transport.call( + "futures", false, "GET", "/api/v2/getMaxOpenSize", req, GetMaxOpenSizeResp.class, false); + } + + public GetPositionDetailsResp getPositionDetails(GetPositionDetailsReq req) { + return this.transport.call( + "futures", false, "GET", "/api/v1/position", req, GetPositionDetailsResp.class, false); + } + + public GetPositionListResp getPositionList(GetPositionListReq req) { + return this.transport.call( + "futures", false, "GET", "/api/v1/positions", req, GetPositionListResp.class, false); + } + + public GetPositionsHistoryResp getPositionsHistory(GetPositionsHistoryReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/history-positions", + req, + GetPositionsHistoryResp.class, + false); + } + + public GetMaxWithdrawMarginResp getMaxWithdrawMargin(GetMaxWithdrawMarginReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/margin/maxWithdrawMargin", + req, + GetMaxWithdrawMarginResp.class, + false); + } + + public GetCrossMarginLeverageResp getCrossMarginLeverage(GetCrossMarginLeverageReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v2/getCrossUserLeverage", + req, + GetCrossMarginLeverageResp.class, + false); + } + + public ModifyMarginLeverageResp modifyMarginLeverage(ModifyMarginLeverageReq req) { + return this.transport.call( + "futures", + false, + "POST", + "/api/v2/changeCrossUserLeverage", + req, + ModifyMarginLeverageResp.class, + false); + } + + public AddIsolatedMarginResp addIsolatedMargin(AddIsolatedMarginReq req) { + return this.transport.call( + "futures", + false, + "POST", + "/api/v1/position/margin/deposit-margin", + req, + AddIsolatedMarginResp.class, + false); + } + + public RemoveIsolatedMarginResp removeIsolatedMargin(RemoveIsolatedMarginReq req) { + return this.transport.call( + "futures", + false, + "POST", + "/api/v1/margin/withdrawMargin", + req, + RemoveIsolatedMarginResp.class, + false); + } + + public GetCrossMarginRiskLimitResp getCrossMarginRiskLimit(GetCrossMarginRiskLimitReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v2/batchGetCrossOrderLimit", + req, + GetCrossMarginRiskLimitResp.class, + false); + } + + public GetIsolatedMarginRiskLimitResp getIsolatedMarginRiskLimit( + GetIsolatedMarginRiskLimitReq req) { + return this.transport.call( + "futures", + false, + "GET", + "/api/v1/contracts/risk-limit/{symbol}", + req, + GetIsolatedMarginRiskLimitResp.class, + false); + } + + public ModifyIsolatedMarginRiskLimtResp modifyIsolatedMarginRiskLimt( + ModifyIsolatedMarginRiskLimtReq req) { + return this.transport.call( + "futures", + false, + "POST", + "/api/v1/position/risk-limit-level/change", + req, + ModifyIsolatedMarginRiskLimtResp.class, + false); + } + + public ModifyAutoDepositStatusResp modifyAutoDepositStatus(ModifyAutoDepositStatusReq req) { + return this.transport.call( + "futures", + false, + "POST", + "/api/v1/position/margin/auto-deposit-status", + req, + ModifyAutoDepositStatusResp.class, + false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/RemoveIsolatedMarginReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/RemoveIsolatedMarginReq.java new file mode 100644 index 00000000..6b3afd3e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/RemoveIsolatedMarginReq.java @@ -0,0 +1,32 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class RemoveIsolatedMarginReq implements Request { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** + * 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 + */ + @JsonProperty("withdrawAmount") + private String withdrawAmount; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/RemoveIsolatedMarginResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/RemoveIsolatedMarginResp.java new file mode 100644 index 00000000..563abb2a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/RemoveIsolatedMarginResp.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class RemoveIsolatedMarginResp + implements Response> { + /** + * 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 + */ + @JsonProperty("data") + private String data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static RemoveIsolatedMarginResp fromJson(String data) { + // original response + RemoveIsolatedMarginResp obj = new RemoveIsolatedMarginResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/SwitchMarginModeReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/SwitchMarginModeReq.java new file mode 100644 index 00000000..9418a212 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/SwitchMarginModeReq.java @@ -0,0 +1,64 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class SwitchMarginModeReq implements Request { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Modified margin model: ISOLATED (isolated), CROSS (cross margin). */ + @JsonProperty("marginMode") + private MarginModeEnum marginMode; + + public enum MarginModeEnum { + /** Isolated Margin Mode */ + ISOLATED("ISOLATED"), + /** Cross Margin MOde */ + CROSS("CROSS"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/SwitchMarginModeResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/SwitchMarginModeResp.java new file mode 100644 index 00000000..359800d0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/SwitchMarginModeResp.java @@ -0,0 +1,73 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.futures.positions; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class SwitchMarginModeResp + implements Response> { + /** + * Symbol of the contract, Please refer to [Get Symbol endpoint: + * symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + @JsonProperty("symbol") + private String symbol; + + /** Margin mode: ISOLATED (isolated), CROSS (cross margin). */ + @JsonProperty("marginMode") + private MarginModeEnum marginMode; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum MarginModeEnum { + /** isolated margin */ + ISOLATED("ISOLATED"), + /** cross margin */ + CROSS("CROSS"); + + private final String value; + + MarginModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModeEnum fromValue(String value) { + for (MarginModeEnum b : MarginModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApi.java new file mode 100644 index 00000000..385a069f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApi.java @@ -0,0 +1,72 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +public interface CreditApi { + /** + * Get Loan Market This API endpoint is used to get the information about the currencies available + * for lending. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ + */ + GetLoanMarketResp getLoanMarket(GetLoanMarketReq req); + + /** + * Get Loan Market Interest Rate This API endpoint is used to get the interest rates of the margin + * lending market over the past 7 days. docs +-----------------------+--------+ + * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+--------+ + */ + GetLoanMarketInterestRateResp getLoanMarketInterestRate(GetLoanMarketInterestRateReq req); + + /** + * Purchase Invest credit in the market and earn interest docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 15 | +-----------------------+---------+ + */ + PurchaseResp purchase(PurchaseReq req); + + /** + * Modify Purchase 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. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ + */ + ModifyPurchaseResp modifyPurchase(ModifyPurchaseReq req); + + /** + * Get Purchase Orders This API endpoint provides a pagination query for the purchase orders. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+---------+ + */ + GetPurchaseOrdersResp getPurchaseOrders(GetPurchaseOrdersReq req); + + /** + * Redeem Redeem your loan order. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+---------+ + */ + RedeemResp redeem(RedeemReq req); + + /** + * Get Redeem Orders This API endpoint provides pagination query for the redeem orders. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+---------+ + */ + GetRedeemOrdersResp getRedeemOrders(GetRedeemOrdersReq req); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApi.template new file mode 100644 index 00000000..03d51458 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApi.template @@ -0,0 +1,143 @@ + + /** + * getLoanMarket + * Get Loan Market + * /api/v3/project/list + */ + public void testGetLoanMarket() { + GetLoanMarketReq.GetLoanMarketReqBuilder builder = GetLoanMarketReq.builder(); + builder.currency(?); + GetLoanMarketReq req = builder.build(); + GetLoanMarketResp resp = this.api.getLoanMarket(req); + foreach($resp->data as $item) { + self::assertNotNull($item->currency); + self::assertNotNull($item->purchaseEnable); + self::assertNotNull($item->redeemEnable); + self::assertNotNull($item->increment); + self::assertNotNull($item->minPurchaseSize); + self::assertNotNull($item->minInterestRate); + self::assertNotNull($item->maxInterestRate); + self::assertNotNull($item->interestIncrement); + self::assertNotNull($item->maxPurchaseSize); + self::assertNotNull($item->marketInterestRate); + self::assertNotNull($item->autoPurchaseEnable); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getLoanMarketInterestRate + * Get Loan Market Interest Rate + * /api/v3/project/marketInterestRate + */ + public void testGetLoanMarketInterestRate() { + GetLoanMarketInterestRateReq.GetLoanMarketInterestRateReqBuilder builder = GetLoanMarketInterestRateReq.builder(); + builder.currency(?); + GetLoanMarketInterestRateReq req = builder.build(); + GetLoanMarketInterestRateResp resp = this.api.getLoanMarketInterestRate(req); + foreach($resp->data as $item) { + self::assertNotNull($item->time); + self::assertNotNull($item->marketInterestRate); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * purchase + * Purchase + * /api/v3/purchase + */ + public void testPurchase() { + PurchaseReq.PurchaseReqBuilder builder = PurchaseReq.builder(); + builder.currency(?).size(?).interestRate(?); + PurchaseReq req = builder.build(); + PurchaseResp resp = this.api.purchase(req); + self::assertNotNull($resp->orderNo); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * modifyPurchase + * Modify Purchase + * /api/v3/lend/purchase/update + */ + public void testModifyPurchase() { + ModifyPurchaseReq.ModifyPurchaseReqBuilder builder = ModifyPurchaseReq.builder(); + builder.currency(?).interestRate(?).purchaseOrderNo(?); + ModifyPurchaseReq req = builder.build(); + ModifyPurchaseResp resp = this.api.modifyPurchase(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getPurchaseOrders + * Get Purchase Orders + * /api/v3/purchase/orders + */ + public void testGetPurchaseOrders() { + GetPurchaseOrdersReq.GetPurchaseOrdersReqBuilder builder = GetPurchaseOrdersReq.builder(); + builder.status(?).currency(?).purchaseOrderNo(?).currentPage(?).pageSize(?); + GetPurchaseOrdersReq req = builder.build(); + GetPurchaseOrdersResp resp = this.api.getPurchaseOrders(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->currency); + self::assertNotNull($item->purchaseOrderNo); + self::assertNotNull($item->purchaseSize); + self::assertNotNull($item->matchSize); + self::assertNotNull($item->interestRate); + self::assertNotNull($item->incomeSize); + self::assertNotNull($item->applyTime); + self::assertNotNull($item->status); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * redeem + * Redeem + * /api/v3/redeem + */ + public void testRedeem() { + RedeemReq.RedeemReqBuilder builder = RedeemReq.builder(); + builder.currency(?).size(?).purchaseOrderNo(?); + RedeemReq req = builder.build(); + RedeemResp resp = this.api.redeem(req); + self::assertNotNull($resp->orderNo); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getRedeemOrders + * Get Redeem Orders + * /api/v3/redeem/orders + */ + public void testGetRedeemOrders() { + GetRedeemOrdersReq.GetRedeemOrdersReqBuilder builder = GetRedeemOrdersReq.builder(); + builder.status(?).currency(?).redeemOrderNo(?).currentPage(?).pageSize(?); + GetRedeemOrdersReq req = builder.build(); + GetRedeemOrdersResp resp = this.api.getRedeemOrders(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->currency); + self::assertNotNull($item->purchaseOrderNo); + self::assertNotNull($item->redeemOrderNo); + self::assertNotNull($item->redeemSize); + self::assertNotNull($item->receiptSize); + self::assertNotNull($item->applyTime); + self::assertNotNull($item->status); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApiAutoGeneratedTest.java new file mode 100644 index 00000000..c971ed7d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApiAutoGeneratedTest.java @@ -0,0 +1,258 @@ +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class CreditApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** getLoanMarket Request Get Loan Market /api/v3/project/list */ + public static void testGetLoanMarketRequest() throws Exception { + String data = "{\"currency\": \"BTC\"}"; + GetLoanMarketReq obj = mapper.readValue(data, GetLoanMarketReq.class); + } + + /** getLoanMarket Response Get Loan Market /api/v3/project/list */ + public static void testGetLoanMarketResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"currency\": \"BTC\",\n" + + " \"purchaseEnable\": true,\n" + + " \"redeemEnable\": true,\n" + + " \"increment\": \"0.00000001\",\n" + + " \"minPurchaseSize\": \"0.001\",\n" + + " \"maxPurchaseSize\": \"40\",\n" + + " \"interestIncrement\": \"0.0001\",\n" + + " \"minInterestRate\": \"0.005\",\n" + + " \"marketInterestRate\": \"0.005\",\n" + + " \"maxInterestRate\": \"0.32\",\n" + + " \"autoPurchaseEnable\": false\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * getLoanMarketInterestRate Request Get Loan Market Interest Rate + * /api/v3/project/marketInterestRate + */ + public static void testGetLoanMarketInterestRateRequest() throws Exception { + String data = "{\"currency\": \"BTC\"}"; + GetLoanMarketInterestRateReq obj = mapper.readValue(data, GetLoanMarketInterestRateReq.class); + } + + /** + * getLoanMarketInterestRate Response Get Loan Market Interest Rate + * /api/v3/project/marketInterestRate + */ + public static void testGetLoanMarketInterestRateResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"time\": \"202410170000\",\n" + + " \"marketInterestRate\": \"0.005\"\n" + + " },\n" + + " {\n" + + " \"time\": \"202410170100\",\n" + + " \"marketInterestRate\": \"0.005\"\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** purchase Request Purchase /api/v3/purchase */ + public static void testPurchaseRequest() throws Exception { + String data = "{\"currency\": \"BTC\", \"size\": \"0.001\", \"interestRate\": \"0.1\"}"; + PurchaseReq obj = mapper.readValue(data, PurchaseReq.class); + } + + /** purchase Response Purchase /api/v3/purchase */ + public static void testPurchaseResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderNo\": \"671bafa804c26d000773c533\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** modifyPurchase Request Modify Purchase /api/v3/lend/purchase/update */ + public static void testModifyPurchaseRequest() throws Exception { + String data = + "{\"currency\": \"BTC\", \"purchaseOrderNo\": \"671bafa804c26d000773c533\"," + + " \"interestRate\": \"0.09\"}"; + ModifyPurchaseReq obj = mapper.readValue(data, ModifyPurchaseReq.class); + } + + /** modifyPurchase Response Modify Purchase /api/v3/lend/purchase/update */ + public static void testModifyPurchaseResponse() throws Exception { + String data = "{\n \"code\": \"200000\",\n \"data\": null\n}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getPurchaseOrders Request Get Purchase Orders /api/v3/purchase/orders */ + public static void testGetPurchaseOrdersRequest() throws Exception { + String data = + "{\"status\": \"DONE\", \"currency\": \"BTC\", \"purchaseOrderNo\":" + + " \"example_string_default_value\", \"currentPage\": 1, \"pageSize\": 50}"; + GetPurchaseOrdersReq obj = mapper.readValue(data, GetPurchaseOrdersReq.class); + } + + /** getPurchaseOrders Response Get Purchase Orders /api/v3/purchase/orders */ + public static void testGetPurchaseOrdersResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 10,\n" + + " \"totalNum\": 1,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"currency\": \"BTC\",\n" + + " \"purchaseOrderNo\": \"671bb15a3b3f930007880bae\",\n" + + " \"purchaseSize\": \"0.001\",\n" + + " \"matchSize\": \"0\",\n" + + " \"interestRate\": \"0.1\",\n" + + " \"incomeSize\": \"0\",\n" + + " \"applyTime\": 1729868122172,\n" + + " \"status\": \"PENDING\"\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** redeem Request Redeem /api/v3/redeem */ + public static void testRedeemRequest() throws Exception { + String data = + "{\"currency\": \"BTC\", \"size\": \"0.001\", \"purchaseOrderNo\":" + + " \"671bafa804c26d000773c533\"}"; + RedeemReq obj = mapper.readValue(data, RedeemReq.class); + } + + /** redeem Response Redeem /api/v3/redeem */ + public static void testRedeemResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderNo\": \"671bafa804c26d000773c533\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getRedeemOrders Request Get Redeem Orders /api/v3/redeem/orders */ + public static void testGetRedeemOrdersRequest() throws Exception { + String data = + "{\"status\": \"DONE\", \"currency\": \"BTC\", \"redeemOrderNo\":" + + " \"example_string_default_value\", \"currentPage\": 1, \"pageSize\": 50}"; + GetRedeemOrdersReq obj = mapper.readValue(data, GetRedeemOrdersReq.class); + } + + /** getRedeemOrders Response Get Redeem Orders /api/v3/redeem/orders */ + public static void testGetRedeemOrdersResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 10,\n" + + " \"totalNum\": 1,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"currency\": \"BTC\",\n" + + " \"purchaseOrderNo\": \"671bafa804c26d000773c533\",\n" + + " \"redeemOrderNo\": \"671bb01004c26d000773c55c\",\n" + + " \"redeemSize\": \"0.001\",\n" + + " \"receiptSize\": \"0.001\",\n" + + " \"applyTime\": null,\n" + + " \"status\": \"DONE\"\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(CreditApiAutoGeneratedTest::testGetLoanMarketRequest, "testGetLoanMarketRequest"); + run(CreditApiAutoGeneratedTest::testGetLoanMarketResponse, "testGetLoanMarketResponse"); + run( + CreditApiAutoGeneratedTest::testGetLoanMarketInterestRateRequest, + "testGetLoanMarketInterestRateRequest"); + run( + CreditApiAutoGeneratedTest::testGetLoanMarketInterestRateResponse, + "testGetLoanMarketInterestRateResponse"); + run(CreditApiAutoGeneratedTest::testPurchaseRequest, "testPurchaseRequest"); + run(CreditApiAutoGeneratedTest::testPurchaseResponse, "testPurchaseResponse"); + run(CreditApiAutoGeneratedTest::testModifyPurchaseRequest, "testModifyPurchaseRequest"); + run(CreditApiAutoGeneratedTest::testModifyPurchaseResponse, "testModifyPurchaseResponse"); + run(CreditApiAutoGeneratedTest::testGetPurchaseOrdersRequest, "testGetPurchaseOrdersRequest"); + run(CreditApiAutoGeneratedTest::testGetPurchaseOrdersResponse, "testGetPurchaseOrdersResponse"); + run(CreditApiAutoGeneratedTest::testRedeemRequest, "testRedeemRequest"); + run(CreditApiAutoGeneratedTest::testRedeemResponse, "testRedeemResponse"); + run(CreditApiAutoGeneratedTest::testGetRedeemOrdersRequest, "testGetRedeemOrdersRequest"); + run(CreditApiAutoGeneratedTest::testGetRedeemOrdersResponse, "testGetRedeemOrdersResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApiImpl.java new file mode 100644 index 00000000..f0c9ca93 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApiImpl.java @@ -0,0 +1,60 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class CreditApiImpl implements CreditApi { + private final Transport transport; + + public CreditApiImpl(Transport transport) { + this.transport = transport; + } + + public GetLoanMarketResp getLoanMarket(GetLoanMarketReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v3/project/list", req, GetLoanMarketResp.class, false); + } + + public GetLoanMarketInterestRateResp getLoanMarketInterestRate(GetLoanMarketInterestRateReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v3/project/marketInterestRate", + req, + GetLoanMarketInterestRateResp.class, + false); + } + + public PurchaseResp purchase(PurchaseReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v3/purchase", req, PurchaseResp.class, false); + } + + public ModifyPurchaseResp modifyPurchase(ModifyPurchaseReq req) { + return this.transport.call( + "spot", + false, + "POST", + "/api/v3/lend/purchase/update", + req, + ModifyPurchaseResp.class, + false); + } + + public GetPurchaseOrdersResp getPurchaseOrders(GetPurchaseOrdersReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v3/purchase/orders", req, GetPurchaseOrdersResp.class, false); + } + + public RedeemResp redeem(RedeemReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v3/redeem", req, RedeemResp.class, false); + } + + public GetRedeemOrdersResp getRedeemOrders(GetRedeemOrdersReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v3/redeem/orders", req, GetRedeemOrdersResp.class, false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketData.java new file mode 100644 index 00000000..705f6763 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketData.java @@ -0,0 +1,59 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetLoanMarketData { + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Whether purchase is supported. */ + @JsonProperty("purchaseEnable") + private Boolean purchaseEnable; + + /** Whether redeem is supported. */ + @JsonProperty("redeemEnable") + private Boolean redeemEnable; + + /** Increment precision for purchase and redemption */ + @JsonProperty("increment") + private String increment; + + /** Minimum purchase amount */ + @JsonProperty("minPurchaseSize") + private String minPurchaseSize; + + /** Minimum lending rate */ + @JsonProperty("minInterestRate") + private String minInterestRate; + + /** Maximum lending rate */ + @JsonProperty("maxInterestRate") + private String maxInterestRate; + + /** Increment precision for interest; default is 0.0001 */ + @JsonProperty("interestIncrement") + private String interestIncrement = "0.0001"; + + /** Maximum purchase amount */ + @JsonProperty("maxPurchaseSize") + private String maxPurchaseSize; + + /** Latest market lending rate */ + @JsonProperty("marketInterestRate") + private String marketInterestRate; + + /** Whether to allow automatic purchase: True: on; false: off */ + @JsonProperty("autoPurchaseEnable") + private Boolean autoPurchaseEnable; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketInterestRateData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketInterestRateData.java new file mode 100644 index 00000000..84a5719a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketInterestRateData.java @@ -0,0 +1,23 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetLoanMarketInterestRateData { + /** Time: YYYYMMDDHH00 */ + @JsonProperty("time") + private String time; + + /** Market lending rate */ + @JsonProperty("marketInterestRate") + private String marketInterestRate; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketInterestRateReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketInterestRateReq.java new file mode 100644 index 00000000..8daafb0a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketInterestRateReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetLoanMarketInterestRateReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketInterestRateResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketInterestRateResp.java new file mode 100644 index 00000000..1c702a85 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketInterestRateResp.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetLoanMarketInterestRateResp + implements Response< + GetLoanMarketInterestRateResp, RestResponse> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetLoanMarketInterestRateResp fromJson(List data) { + // original response + GetLoanMarketInterestRateResp obj = new GetLoanMarketInterestRateResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketReq.java new file mode 100644 index 00000000..9be77f25 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetLoanMarketReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketResp.java new file mode 100644 index 00000000..806b2db0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetLoanMarketResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetLoanMarketResp fromJson(List data) { + // original response + GetLoanMarketResp obj = new GetLoanMarketResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetPurchaseOrdersItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetPurchaseOrdersItems.java new file mode 100644 index 00000000..c674a915 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetPurchaseOrdersItems.java @@ -0,0 +1,82 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPurchaseOrdersItems { + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Purchase order ID */ + @JsonProperty("purchaseOrderNo") + private String purchaseOrderNo; + + /** Total purchase size */ + @JsonProperty("purchaseSize") + private String purchaseSize; + + /** Executed size */ + @JsonProperty("matchSize") + private String matchSize; + + /** Target annualized interest rate */ + @JsonProperty("interestRate") + private String interestRate; + + /** Redeemed amount */ + @JsonProperty("incomeSize") + private String incomeSize; + + /** Time of purchase */ + @JsonProperty("applyTime") + private Long applyTime; + + /** Status: DONE-completed; PENDING-settling */ + @JsonProperty("status") + private StatusEnum status; + + public enum StatusEnum { + /** */ + DONE("DONE"), + /** */ + PENDING("PENDING"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetPurchaseOrdersReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetPurchaseOrdersReq.java new file mode 100644 index 00000000..3e63eacf --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetPurchaseOrdersReq.java @@ -0,0 +1,75 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPurchaseOrdersReq implements Request { + /** DONE-completed; PENDING-settling */ + @JsonProperty("status") + private StatusEnum status; + + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Purchase order ID */ + @JsonProperty("purchaseOrderNo") + private String purchaseOrderNo; + + /** Current page; default is 1 */ + @JsonProperty("currentPage") + @Builder.Default + private Integer currentPage = 1; + + /** Page size; 1<=pageSize<=50; default is 50 */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 50; + + public enum StatusEnum { + /** completed */ + DONE("DONE"), + /** settling */ + PENDING("PENDING"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetPurchaseOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetPurchaseOrdersResp.java new file mode 100644 index 00000000..1553d020 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetPurchaseOrdersResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPurchaseOrdersResp + implements Response> { + /** Current Page */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** Page Size */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** Total Number */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** Total Pages */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetRedeemOrdersItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetRedeemOrdersItems.java new file mode 100644 index 00000000..4202fe57 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetRedeemOrdersItems.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRedeemOrdersItems { + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Purchase order ID */ + @JsonProperty("purchaseOrderNo") + private String purchaseOrderNo; + + /** Redeem order ID */ + @JsonProperty("redeemOrderNo") + private String redeemOrderNo; + + /** Redemption size */ + @JsonProperty("redeemSize") + private String redeemSize; + + /** Redeemed size */ + @JsonProperty("receiptSize") + private String receiptSize; + + /** Time of redeem */ + @JsonProperty("applyTime") + private String applyTime; + + /** Status: DONE-completed; PENDING-settling */ + @JsonProperty("status") + private String status; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetRedeemOrdersReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetRedeemOrdersReq.java new file mode 100644 index 00000000..7d4cf5be --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetRedeemOrdersReq.java @@ -0,0 +1,75 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRedeemOrdersReq implements Request { + /** DONE-completed; PENDING-settling */ + @JsonProperty("status") + private StatusEnum status; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Redeem order ID */ + @JsonProperty("redeemOrderNo") + private String redeemOrderNo; + + /** Current page; default is 1 */ + @JsonProperty("currentPage") + @Builder.Default + private Integer currentPage = 1; + + /** Page size; 1<=pageSize<=50; default is 50 */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 50; + + public enum StatusEnum { + /** completed */ + DONE("DONE"), + /** settling */ + PENDING("PENDING"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetRedeemOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetRedeemOrdersResp.java new file mode 100644 index 00000000..c41ddd2b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetRedeemOrdersResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRedeemOrdersResp + implements Response> { + /** Current Page */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** Page Size */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** Total Number */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** Total Pages */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/ModifyPurchaseReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/ModifyPurchaseReq.java new file mode 100644 index 00000000..4d661eb6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/ModifyPurchaseReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifyPurchaseReq implements Request { + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Modified purchase interest rate */ + @JsonProperty("interestRate") + private String interestRate; + + /** Purchase order ID */ + @JsonProperty("purchaseOrderNo") + private String purchaseOrderNo; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/ModifyPurchaseResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/ModifyPurchaseResp.java new file mode 100644 index 00000000..4a8b2102 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/ModifyPurchaseResp.java @@ -0,0 +1,40 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifyPurchaseResp + implements Response> { + /** */ + @JsonProperty("data") + private String data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static ModifyPurchaseResp fromJson(String data) { + // original response + ModifyPurchaseResp obj = new ModifyPurchaseResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/PurchaseReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/PurchaseReq.java new file mode 100644 index 00000000..94ad8a19 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/PurchaseReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class PurchaseReq implements Request { + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Purchase amount */ + @JsonProperty("size") + private String size; + + /** Purchase interest rate */ + @JsonProperty("interestRate") + private String interestRate; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/PurchaseResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/PurchaseResp.java new file mode 100644 index 00000000..c4c223b0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/PurchaseResp.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class PurchaseResp implements Response> { + /** Purchase order ID */ + @JsonProperty("orderNo") + private String orderNo; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/RedeemReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/RedeemReq.java new file mode 100644 index 00000000..091c0086 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/RedeemReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class RedeemReq implements Request { + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Redemption amount */ + @JsonProperty("size") + private String size; + + /** Purchase order ID */ + @JsonProperty("purchaseOrderNo") + private String purchaseOrderNo; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/RedeemResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/RedeemResp.java new file mode 100644 index 00000000..61d7a813 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/RedeemResp.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.credit; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class RedeemResp implements Response> { + /** Redeem order ID */ + @JsonProperty("orderNo") + private String orderNo; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/BorrowReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/BorrowReq.java new file mode 100644 index 00000000..d13818f2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/BorrowReq.java @@ -0,0 +1,79 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.debit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BorrowReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Borrow amount */ + @JsonProperty("size") + private Double size; + + /** timeInForce: IOC, FOK */ + @JsonProperty("timeInForce") + private TimeInForceEnum timeInForce; + + /** symbol, mandatory for isolated margin account */ + @JsonProperty("symbol") + private String symbol; + + /** true-isolated, false-cross; default is false */ + @JsonProperty("isIsolated") + @Builder.Default + private Boolean isIsolated = false; + + /** true: high frequency borrowing, false: low frequency borrowing; default false */ + @JsonProperty("isHf") + @Builder.Default + private Boolean isHf = false; + + public enum TimeInForceEnum { + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/BorrowResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/BorrowResp.java new file mode 100644 index 00000000..5b6d817c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/BorrowResp.java @@ -0,0 +1,34 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.debit; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BorrowResp implements Response> { + /** Borrow Order ID */ + @JsonProperty("orderNo") + private String orderNo; + + /** Actual borrowed amount */ + @JsonProperty("actualSize") + private String actualSize; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApi.java new file mode 100644 index 00000000..e349323f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApi.java @@ -0,0 +1,65 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.debit; + +public interface DebitApi { + /** + * Borrow This API endpoint is used to initiate an application for cross or isolated margin + * borrowing. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+---------+ + */ + BorrowResp borrow(BorrowReq req); + + /** + * Get Borrow History This API endpoint is used to get the borrowing orders for cross and isolated + * margin accounts. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+---------+ + */ + GetBorrowHistoryResp getBorrowHistory(GetBorrowHistoryReq req); + + /** + * Repay This API endpoint is used to initiate an application for cross or isolated margin + * repayment. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ + */ + RepayResp repay(RepayReq req); + + /** + * Get Repay History This API endpoint is used to get the borrowing orders for cross and isolated + * margin accounts. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+---------+ + */ + GetRepayHistoryResp getRepayHistory(GetRepayHistoryReq req); + + /** + * Get Interest History. Request the interest records of the cross/isolated margin lending via + * this endpoint. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+---------+ + */ + GetInterestHistoryResp getInterestHistory(GetInterestHistoryReq req); + + /** + * Modify Leverage This endpoint allows modifying the leverage multiplier for cross margin or + * isolated margin. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 8 | + * +-----------------------+---------+ + */ + ModifyLeverageResp modifyLeverage(ModifyLeverageReq req); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApi.template new file mode 100644 index 00000000..1ae3a6f0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApi.template @@ -0,0 +1,128 @@ + + /** + * borrow + * Borrow + * /api/v3/margin/borrow + */ + public void testBorrow() { + BorrowReq.BorrowReqBuilder builder = BorrowReq.builder(); + builder.currency(?).size(?).timeInForce(?).symbol(?).isIsolated(?).isHf(?); + BorrowReq req = builder.build(); + BorrowResp resp = this.api.borrow(req); + self::assertNotNull($resp->orderNo); + self::assertNotNull($resp->actualSize); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getBorrowHistory + * Get Borrow History + * /api/v3/margin/borrow + */ + public void testGetBorrowHistory() { + GetBorrowHistoryReq.GetBorrowHistoryReqBuilder builder = GetBorrowHistoryReq.builder(); + builder.currency(?).isIsolated(?).symbol(?).orderNo(?).startTime(?).endTime(?).currentPage(?).pageSize(?); + GetBorrowHistoryReq req = builder.build(); + GetBorrowHistoryResp resp = this.api.getBorrowHistory(req); + self::assertNotNull($resp->timestamp); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->orderNo); + self::assertNotNull($item->symbol); + self::assertNotNull($item->currency); + self::assertNotNull($item->size); + self::assertNotNull($item->actualSize); + self::assertNotNull($item->status); + self::assertNotNull($item->createdTime); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * repay + * Repay + * /api/v3/margin/repay + */ + public void testRepay() { + RepayReq.RepayReqBuilder builder = RepayReq.builder(); + builder.currency(?).size(?).symbol(?).isIsolated(?).isHf(?); + RepayReq req = builder.build(); + RepayResp resp = this.api.repay(req); + self::assertNotNull($resp->timestamp); + self::assertNotNull($resp->orderNo); + self::assertNotNull($resp->actualSize); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getRepayHistory + * Get Repay History + * /api/v3/margin/repay + */ + public void testGetRepayHistory() { + GetRepayHistoryReq.GetRepayHistoryReqBuilder builder = GetRepayHistoryReq.builder(); + builder.currency(?).isIsolated(?).symbol(?).orderNo(?).startTime(?).endTime(?).currentPage(?).pageSize(?); + GetRepayHistoryReq req = builder.build(); + GetRepayHistoryResp resp = this.api.getRepayHistory(req); + self::assertNotNull($resp->timestamp); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->orderNo); + self::assertNotNull($item->symbol); + self::assertNotNull($item->currency); + self::assertNotNull($item->size); + self::assertNotNull($item->principal); + self::assertNotNull($item->interest); + self::assertNotNull($item->status); + self::assertNotNull($item->createdTime); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getInterestHistory + * Get Interest History. + * /api/v3/margin/interest + */ + public void testGetInterestHistory() { + GetInterestHistoryReq.GetInterestHistoryReqBuilder builder = GetInterestHistoryReq.builder(); + builder.currency(?).isIsolated(?).symbol(?).startTime(?).endTime(?).currentPage(?).pageSize(?); + GetInterestHistoryReq req = builder.build(); + GetInterestHistoryResp resp = this.api.getInterestHistory(req); + self::assertNotNull($resp->timestamp); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->currency); + self::assertNotNull($item->dayRatio); + self::assertNotNull($item->interestAmount); + self::assertNotNull($item->createdTime); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * modifyLeverage + * Modify Leverage + * /api/v3/position/update-user-leverage + */ + public void testModifyLeverage() { + ModifyLeverageReq.ModifyLeverageReqBuilder builder = ModifyLeverageReq.builder(); + builder.symbol(?).isIsolated(?).leverage(?); + ModifyLeverageReq req = builder.build(); + ModifyLeverageResp resp = this.api.modifyLeverage(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApiAutoGeneratedTest.java new file mode 100644 index 00000000..266ac374 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApiAutoGeneratedTest.java @@ -0,0 +1,187 @@ +package com.kucoin.universal.sdk.generate.margin.debit; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class DebitApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** borrow Request Borrow /api/v3/margin/borrow */ + public static void testBorrowRequest() throws Exception { + String data = + "{\"currency\": \"USDT\", \"size\": 10, \"timeInForce\": \"FOK\", \"isIsolated\": false," + + " \"isHf\": false}"; + BorrowReq obj = mapper.readValue(data, BorrowReq.class); + } + + /** borrow Response Borrow /api/v3/margin/borrow */ + public static void testBorrowResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"orderNo\":\"67187162c0d6990007717b15\",\"actualSize\":\"10\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getBorrowHistory Request Get Borrow History /api/v3/margin/borrow */ + public static void testGetBorrowHistoryRequest() throws Exception { + String data = + "{\"currency\": \"BTC\", \"isIsolated\": true, \"symbol\": \"BTC-USDT\", \"orderNo\":" + + " \"example_string_default_value\", \"startTime\": 123456, \"endTime\": 123456," + + " \"currentPage\": 1, \"pageSize\": 50}"; + GetBorrowHistoryReq obj = mapper.readValue(data, GetBorrowHistoryReq.class); + } + + /** getBorrowHistory Response Get Borrow History /api/v3/margin/borrow */ + public static void testGetBorrowHistoryResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"timestamp\": 1729657580449,\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 2,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"orderNo\": \"67187162c0d6990007717b15\",\n" + + " \"symbol\": null,\n" + + " \"currency\": \"USDT\",\n" + + " \"size\": \"10\",\n" + + " \"actualSize\": \"10\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"createdTime\": 1729655138000\n" + + " },\n" + + " {\n" + + " \"orderNo\": \"67187155b088e70007149585\",\n" + + " \"symbol\": null,\n" + + " \"currency\": \"USDT\",\n" + + " \"size\": \"0.1\",\n" + + " \"actualSize\": \"0\",\n" + + " \"status\": \"FAILED\",\n" + + " \"createdTime\": 1729655125000\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** repay Request Repay /api/v3/margin/repay */ + public static void testRepayRequest() throws Exception { + String data = "{\"currency\": \"USDT\", \"size\": 10}"; + RepayReq obj = mapper.readValue(data, RepayReq.class); + } + + /** repay Response Repay /api/v3/margin/repay */ + public static void testRepayResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"timestamp\":1729655606816,\"orderNo\":\"671873361d5bd400075096ad\",\"actualSize\":\"10\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getRepayHistory Request Get Repay History /api/v3/margin/repay */ + public static void testGetRepayHistoryRequest() throws Exception { + String data = + "{\"currency\": \"BTC\", \"isIsolated\": true, \"symbol\": \"BTC-USDT\", \"orderNo\":" + + " \"example_string_default_value\", \"startTime\": 123456, \"endTime\": 123456," + + " \"currentPage\": 1, \"pageSize\": 50}"; + GetRepayHistoryReq obj = mapper.readValue(data, GetRepayHistoryReq.class); + } + + /** getRepayHistory Response Get Repay History /api/v3/margin/repay */ + public static void testGetRepayHistoryResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"timestamp\":1729663471891,\"currentPage\":1,\"pageSize\":50,\"totalNum\":1,\"totalPage\":1,\"items\":[{\"orderNo\":\"671873361d5bd400075096ad\",\"symbol\":null,\"currency\":\"USDT\",\"size\":\"10\",\"principal\":\"9.99986518\",\"interest\":\"0.00013482\",\"status\":\"SUCCESS\",\"createdTime\":1729655606000}]}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getInterestHistory Request Get Interest History. /api/v3/margin/interest */ + public static void testGetInterestHistoryRequest() throws Exception { + String data = + "{\"currency\": \"BTC\", \"isIsolated\": true, \"symbol\": \"BTC-USDT\", \"startTime\":" + + " 123456, \"endTime\": 123456, \"currentPage\": 1, \"pageSize\": 50}"; + GetInterestHistoryReq obj = mapper.readValue(data, GetInterestHistoryReq.class); + } + + /** getInterestHistory Response Get Interest History. /api/v3/margin/interest */ + public static void testGetInterestHistoryResponse() throws Exception { + String 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}]}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** modifyLeverage Request Modify Leverage /api/v3/position/update-user-leverage */ + public static void testModifyLeverageRequest() throws Exception { + String data = "{\"leverage\": \"5\"}"; + ModifyLeverageReq obj = mapper.readValue(data, ModifyLeverageReq.class); + } + + /** modifyLeverage Response Modify Leverage /api/v3/position/update-user-leverage */ + public static void testModifyLeverageResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":null}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(DebitApiAutoGeneratedTest::testBorrowRequest, "testBorrowRequest"); + run(DebitApiAutoGeneratedTest::testBorrowResponse, "testBorrowResponse"); + run(DebitApiAutoGeneratedTest::testGetBorrowHistoryRequest, "testGetBorrowHistoryRequest"); + run(DebitApiAutoGeneratedTest::testGetBorrowHistoryResponse, "testGetBorrowHistoryResponse"); + run(DebitApiAutoGeneratedTest::testRepayRequest, "testRepayRequest"); + run(DebitApiAutoGeneratedTest::testRepayResponse, "testRepayResponse"); + run(DebitApiAutoGeneratedTest::testGetRepayHistoryRequest, "testGetRepayHistoryRequest"); + run(DebitApiAutoGeneratedTest::testGetRepayHistoryResponse, "testGetRepayHistoryResponse"); + run(DebitApiAutoGeneratedTest::testGetInterestHistoryRequest, "testGetInterestHistoryRequest"); + run( + DebitApiAutoGeneratedTest::testGetInterestHistoryResponse, + "testGetInterestHistoryResponse"); + run(DebitApiAutoGeneratedTest::testModifyLeverageRequest, "testModifyLeverageRequest"); + run(DebitApiAutoGeneratedTest::testModifyLeverageResponse, "testModifyLeverageResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApiImpl.java new file mode 100644 index 00000000..085bd7bc --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApiImpl.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.debit; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class DebitApiImpl implements DebitApi { + private final Transport transport; + + public DebitApiImpl(Transport transport) { + this.transport = transport; + } + + public BorrowResp borrow(BorrowReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v3/margin/borrow", req, BorrowResp.class, false); + } + + public GetBorrowHistoryResp getBorrowHistory(GetBorrowHistoryReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v3/margin/borrow", req, GetBorrowHistoryResp.class, false); + } + + public RepayResp repay(RepayReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v3/margin/repay", req, RepayResp.class, false); + } + + public GetRepayHistoryResp getRepayHistory(GetRepayHistoryReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v3/margin/repay", req, GetRepayHistoryResp.class, false); + } + + public GetInterestHistoryResp getInterestHistory(GetInterestHistoryReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v3/margin/interest", req, GetInterestHistoryResp.class, false); + } + + public ModifyLeverageResp modifyLeverage(ModifyLeverageReq req) { + return this.transport.call( + "spot", + false, + "POST", + "/api/v3/position/update-user-leverage", + req, + ModifyLeverageResp.class, + false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetBorrowHistoryItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetBorrowHistoryItems.java new file mode 100644 index 00000000..34d62ae5 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetBorrowHistoryItems.java @@ -0,0 +1,80 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.debit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetBorrowHistoryItems { + /** Borrow Order ID */ + @JsonProperty("orderNo") + private String orderNo; + + /** Isolated Margin symbol; empty for cross margin */ + @JsonProperty("symbol") + private String symbol; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Initiated borrow amount */ + @JsonProperty("size") + private String size; + + /** Actual borrow amount */ + @JsonProperty("actualSize") + private String actualSize; + + /** PENDING: Processing, SUCCESS: Successful, FAILED: Failed */ + @JsonProperty("status") + private StatusEnum status; + + /** Borrow time */ + @JsonProperty("createdTime") + private Long createdTime; + + public enum StatusEnum { + /** */ + PENDING("PENDING"), + /** */ + SUCCESS("SUCCESS"), + /** */ + FAILED("FAILED"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetBorrowHistoryReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetBorrowHistoryReq.java new file mode 100644 index 00000000..3e0091be --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetBorrowHistoryReq.java @@ -0,0 +1,56 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.debit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetBorrowHistoryReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** true-isolated, false-cross; default is false */ + @JsonProperty("isIsolated") + @Builder.Default + private Boolean isIsolated = false; + + /** symbol, mandatory for isolated margin account */ + @JsonProperty("symbol") + private String symbol; + + /** Borrow Order ID */ + @JsonProperty("orderNo") + private String orderNo; + + /** + * 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) + */ + @JsonProperty("startTime") + private Long startTime; + + /** End time */ + @JsonProperty("endTime") + private Long endTime; + + /** Current query page, with a starting value of 1. Default:1 */ + @JsonProperty("currentPage") + @Builder.Default + private Integer currentPage = 1; + + /** Number of results per page. Default is 50, minimum is 10, maximum is 500 */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 50; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetBorrowHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetBorrowHistoryResp.java new file mode 100644 index 00000000..303f211e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetBorrowHistoryResp.java @@ -0,0 +1,53 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.debit; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetBorrowHistoryResp + implements Response> { + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** current page */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** page size */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** total number */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** total pages */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetInterestHistoryItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetInterestHistoryItems.java new file mode 100644 index 00000000..49410d9a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetInterestHistoryItems.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.debit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetInterestHistoryItems { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Daily interest rate */ + @JsonProperty("dayRatio") + private String dayRatio; + + /** Interest amount */ + @JsonProperty("interestAmount") + private String interestAmount; + + /** Interest Timestamp */ + @JsonProperty("createdTime") + private Long createdTime; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetInterestHistoryReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetInterestHistoryReq.java new file mode 100644 index 00000000..416da1e7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetInterestHistoryReq.java @@ -0,0 +1,52 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.debit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetInterestHistoryReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** true-isolated, false-cross; default is false */ + @JsonProperty("isIsolated") + @Builder.Default + private Boolean isIsolated = false; + + /** symbol, mandatory for isolated margin account */ + @JsonProperty("symbol") + private String symbol; + + /** + * 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) + */ + @JsonProperty("startTime") + private Long startTime; + + /** End time */ + @JsonProperty("endTime") + private Long endTime; + + /** Current query page, with a starting value of 1. Default:1 */ + @JsonProperty("currentPage") + @Builder.Default + private Integer currentPage = 1; + + /** Number of results per page. Default is 50, minimum is 10, maximum is 500 */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 50; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetInterestHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetInterestHistoryResp.java new file mode 100644 index 00000000..2e68e1c1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetInterestHistoryResp.java @@ -0,0 +1,53 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.debit; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetInterestHistoryResp + implements Response> { + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** current page */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** page size */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** total number */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** total pages */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetRepayHistoryItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetRepayHistoryItems.java new file mode 100644 index 00000000..2bc05de7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetRepayHistoryItems.java @@ -0,0 +1,84 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.debit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRepayHistoryItems { + /** Repay order ID */ + @JsonProperty("orderNo") + private String orderNo; + + /** Isolated Margin symbol; empty for cross margin */ + @JsonProperty("symbol") + private String symbol; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Amount of initiated repay */ + @JsonProperty("size") + private String size; + + /** Amount of principal paid */ + @JsonProperty("principal") + private String principal; + + /** Amount of interest paid */ + @JsonProperty("interest") + private String interest; + + /** PENDING: Processing, SUCCESS: Successful, FAILED: Failed */ + @JsonProperty("status") + private StatusEnum status; + + /** Repayment time */ + @JsonProperty("createdTime") + private Long createdTime; + + public enum StatusEnum { + /** */ + PENDING("PENDING"), + /** */ + SUCCESS("SUCCESS"), + /** */ + FAILED("FAILED"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetRepayHistoryReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetRepayHistoryReq.java new file mode 100644 index 00000000..844e9a6c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetRepayHistoryReq.java @@ -0,0 +1,56 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.debit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRepayHistoryReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** true-isolated, false-cross; default is false */ + @JsonProperty("isIsolated") + @Builder.Default + private Boolean isIsolated = false; + + /** symbol, mandatory for isolated margin account */ + @JsonProperty("symbol") + private String symbol; + + /** Repay order ID */ + @JsonProperty("orderNo") + private String orderNo; + + /** + * 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) + */ + @JsonProperty("startTime") + private Long startTime; + + /** End time */ + @JsonProperty("endTime") + private Long endTime; + + /** Current query page, with a starting value of 1. Default:1 */ + @JsonProperty("currentPage") + @Builder.Default + private Integer currentPage = 1; + + /** Number of results per page. Default is 50, minimum is 10, maximum is 500 */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 50; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetRepayHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetRepayHistoryResp.java new file mode 100644 index 00000000..98c3d954 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/GetRepayHistoryResp.java @@ -0,0 +1,53 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.debit; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRepayHistoryResp + implements Response> { + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** current page */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** page size */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** total number */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** total pages */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/ModifyLeverageReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/ModifyLeverageReq.java new file mode 100644 index 00000000..71551a0a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/ModifyLeverageReq.java @@ -0,0 +1,34 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.debit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifyLeverageReq implements Request { + /** symbol, mandatory for isolated margin account */ + @JsonProperty("symbol") + private String symbol; + + /** true-isolated, false-cross; default is false */ + @JsonProperty("isIsolated") + @Builder.Default + private Boolean isIsolated = false; + + /** + * New leverage multiplier. Must be greater than 1 and up to two decimal places, and cannot be + * less than the user's current debt leverage or greater than the system's maximum leverage + */ + @JsonProperty("leverage") + private String leverage; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/ModifyLeverageResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/ModifyLeverageResp.java new file mode 100644 index 00000000..1f1ae18f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/ModifyLeverageResp.java @@ -0,0 +1,40 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.debit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifyLeverageResp + implements Response> { + /** */ + @JsonProperty("data") + private String data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static ModifyLeverageResp fromJson(String data) { + // original response + ModifyLeverageResp obj = new ModifyLeverageResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/RepayReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/RepayReq.java new file mode 100644 index 00000000..9faccdc6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/RepayReq.java @@ -0,0 +1,40 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.debit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class RepayReq implements Request { + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Borrow amount */ + @JsonProperty("size") + private Double size; + + /** symbol, mandatory for isolated margin account */ + @JsonProperty("symbol") + private String symbol; + + /** true-isolated, false-cross; default is false */ + @JsonProperty("isIsolated") + @Builder.Default + private Boolean isIsolated = false; + + /** true: high frequency borrowing, false: low frequency borrowing; default false */ + @JsonProperty("isHf") + @Builder.Default + private Boolean isHf = false; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/RepayResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/RepayResp.java new file mode 100644 index 00000000..d1c44cba --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/RepayResp.java @@ -0,0 +1,38 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.debit; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class RepayResp implements Response> { + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** Repay order ID */ + @JsonProperty("orderNo") + private String orderNo; + + /** Actual repay amount */ + @JsonProperty("actualSize") + private String actualSize; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionAssetListValue.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionAssetListValue.java new file mode 100644 index 00000000..c22e2cc5 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionAssetListValue.java @@ -0,0 +1,27 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.marginprivate; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +class CrossMarginPositionAssetListValue { + /** */ + @JsonProperty("total") + private String total; + + /** */ + @JsonProperty("available") + private String available; + + /** */ + @JsonProperty("hold") + private String hold; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionEvent.java new file mode 100644 index 00000000..38d3d016 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionEvent.java @@ -0,0 +1,128 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.marginprivate; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.HashMap; +import java.util.Map; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CrossMarginPositionEvent + implements Response> { + /** Debt ratio */ + @JsonProperty("debtRatio") + private Double debtRatio; + + /** Total assets in BTC (interest included) */ + @JsonProperty("totalAsset") + private Double totalAsset; + + /** */ + @JsonProperty("marginCoefficientTotalAsset") + private String marginCoefficientTotalAsset; + + /** Total debt in BTC (interest included) */ + @JsonProperty("totalDebt") + private String totalDebt; + + /** Asset list (interest included) */ + @JsonProperty("assetList") + private Map assetList = new HashMap<>(); + + /** Debt list (interest included) */ + @JsonProperty("debtList") + private Map debtList = new HashMap<>(); + + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** Event type, **Only applicable to \"debt.ratio\" subject** */ + @JsonProperty("type") + private TypeEnum type; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, CrossMarginPositionEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } + + public enum TypeEnum { + /** + * When the debt ratio exceeds the liquidation threshold and the position is frozen, the system + * will push this event. + */ + FROZEN_FL("FROZEN_FL"), + /** + * When the liquidation is finished and the position returns to “EFFECTIVE” status, the system + * will push this event. + */ + UNFROZEN_FL("UNFROZEN_FL"), + /** + * When the auto-borrow renewing is complete and the position returns to “EFFECTIVE” status, the + * system will push this event. + */ + FROZEN_RENEW("FROZEN_RENEW"), + /** When the account reaches a negative balance, the system will push this event. */ + UNFROZEN_RENEW("UNFROZEN_RENEW"), + /** When the account reaches a negative balance, the system will push this event. */ + LIABILITY("LIABILITY"), + /** + * When all the liabilities are repaid and the position returns to “EFFECTIVE” status, the + * system will push this event. + */ + UNLIABILITY("UNLIABILITY"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionChangeAssetsValue.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionChangeAssetsValue.java new file mode 100644 index 00000000..37377b05 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionChangeAssetsValue.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.marginprivate; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +class IsolatedMarginPositionChangeAssetsValue { + /** */ + @JsonProperty("total") + private String total; + + /** */ + @JsonProperty("hold") + private String hold; + + /** */ + @JsonProperty("liabilityPrincipal") + private String liabilityPrincipal; + + /** */ + @JsonProperty("liabilityInterest") + private String liabilityInterest; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionEvent.java new file mode 100644 index 00000000..942de73c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionEvent.java @@ -0,0 +1,157 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.marginprivate; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.HashMap; +import java.util.Map; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class IsolatedMarginPositionEvent + implements Response> { + /** Isolated margin symbol */ + @JsonProperty("tag") + private String tag; + + /** Position status */ + @JsonProperty("status") + private StatusEnum status; + + /** Status type */ + @JsonProperty("statusBizType") + private StatusBizTypeEnum statusBizType; + + /** Accumulated principal */ + @JsonProperty("accumulatedPrincipal") + private String accumulatedPrincipal; + + /** */ + @JsonProperty("changeAssets") + private Map changeAssets = new HashMap<>(); + + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, IsolatedMarginPositionEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } + + public enum StatusEnum { + /** Debt */ + DEBT("DEBT"), + /** debt-free */ + CLEAR("CLEAR"), + /** Borrowing */ + IN_BORROW("IN_BORROW"), + /** Repayment in progress */ + IN_REPAY("IN_REPAY"), + /** Position closing */ + IN_LIQUIDATION("IN_LIQUIDATION"), + /** Automatically renewing */ + IN_AUTO_RENEW("IN_AUTO_RENEW"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StatusBizTypeEnum { + /** Liquidation */ + FORCE_LIQUIDATION("FORCE_LIQUIDATION"), + /** User borrow */ + USER_BORROW("USER_BORROW"), + /** Trade auto borrow */ + TRADE_AUTO_BORROW("TRADE_AUTO_BORROW"), + /** User reply */ + USER_REPAY("USER_REPAY"), + /** Auto reply */ + AUTO_REPAY("AUTO_REPAY"), + /** In debt */ + DEFAULT_DEBT("DEFAULT_DEBT"), + /** No debt */ + DEFAULT_CLEAR("DEFAULT_CLEAR"), + /** One click liquidation */ + ONE_CLICK_LIQUIDATION("ONE_CLICK_LIQUIDATION"), + /** B2C interest settle liquidation */ + B2C_INTEREST_SETTLE_LIQUIDATION("B2C_INTEREST_SETTLE_LIQUIDATION"), + /** Air drop liquidation */ + AIR_DROP_LIQUIDATION("AIR_DROP_LIQUIDATION"); + + private final String value; + + StatusBizTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusBizTypeEnum fromValue(String value) { + for (StatusBizTypeEnum b : StatusBizTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWs.java new file mode 100644 index 00000000..6161379a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWs.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.marginprivate; + +public interface MarginPrivateWs { + + /** + * 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. push + * frequency: once every 4s + */ + public String crossMarginPosition(CrossMarginPositionEvent.Callback callback); + + /** + * 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. push + * frequency: real time + */ + public String isolatedMarginPosition( + String symbol, IsolatedMarginPositionEvent.Callback callback); + + /** Unsubscribe from topics */ + public void unSubscribe(String id); + + /** Start websocket */ + public void start(); + + /** Stop websocket */ + public void stop(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsAutoGeneratedTest.java new file mode 100644 index 00000000..7463472e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsAutoGeneratedTest.java @@ -0,0 +1,76 @@ +package com.kucoin.universal.sdk.generate.margin.marginprivate; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.ArrayList; +import java.util.List; + +class MarginPrivateWsAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** crossMarginPosition Get Cross Margin Position change /crossMarginPosition/margin/position */ + public static void testCrossMarginPositionResponse() throws Exception { + String data = + "{\"topic\":\"/margin/position\",\"subject\":\"debt.ratio\",\"type\":\"message\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"debtRatio\":0,\"totalAsset\":0.00052431772284080000000,\"marginCoefficientTotalAsset\":\"0.0005243177228408\",\"totalDebt\":\"0\",\"assetList\":{\"BTC\":{\"total\":\"0.00002\",\"available\":\"0\",\"hold\":\"0.00002\"},\"USDT\":{\"total\":\"33.68855864\",\"available\":\"15.01916691\",\"hold\":\"18.66939173\"}},\"debtList\":{\"BTC\":\"0\",\"USDT\":\"0\"},\"timestamp\":1729912435657}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * isolatedMarginPosition Get Isolated Margin Position change + * /isolatedMarginPosition/margin/isolatedPosition:_symbol_ + */ + public static void testIsolatedMarginPositionResponse() throws Exception { + String data = + "{\"topic\":\"/margin/isolatedPosition:BTC-USDT\",\"subject\":\"positionChange\",\"type\":\"message\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"tag\":\"BTC-USDT\",\"status\":\"DEBT\",\"statusBizType\":\"DEFAULT_DEBT\",\"accumulatedPrincipal\":\"5.01\",\"changeAssets\":{\"BTC\":{\"total\":\"0.00043478\",\"hold\":\"0\",\"liabilityPrincipal\":\"0\",\"liabilityInterest\":\"0\"},\"USDT\":{\"total\":\"0.98092004\",\"hold\":\"0\",\"liabilityPrincipal\":\"26\",\"liabilityInterest\":\"0.00025644\"}},\"timestamp\":1730121097742}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run( + MarginPrivateWsAutoGeneratedTest::testCrossMarginPositionResponse, + "testCrossMarginPositionResponse"); + run( + MarginPrivateWsAutoGeneratedTest::testIsolatedMarginPositionResponse, + "testIsolatedMarginPositionResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsImpl.java new file mode 100644 index 00000000..ce96353c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsImpl.java @@ -0,0 +1,45 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.marginprivate; + +import com.kucoin.universal.sdk.internal.interfaces.WebSocketService; + +public class MarginPrivateWsImpl implements MarginPrivateWs { + + private final WebSocketService wsService; + + public MarginPrivateWsImpl(WebSocketService wsService) { + this.wsService = wsService; + } + + public String crossMarginPosition(CrossMarginPositionEvent.Callback callback) { + String topicPrefix = "/margin/position"; + + String[] args = {}; + + return this.wsService.subscribe( + topicPrefix, args, CrossMarginPositionEvent.CallbackAdapters.of(callback)); + } + + public String isolatedMarginPosition( + String symbol, IsolatedMarginPositionEvent.Callback callback) { + String topicPrefix = "/margin/isolatedPosition"; + + String[] args = {symbol}; + + return this.wsService.subscribe( + topicPrefix, args, IsolatedMarginPositionEvent.CallbackAdapters.of(callback)); + } + + public void unSubscribe(String id) { + this.wsService.unsubscribe(id); + } + + public void start() { + this.wsService.start(); + } + + public void stop() { + this.wsService.stop(); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/IndexPriceEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/IndexPriceEvent.java new file mode 100644 index 00000000..3f5de598 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/IndexPriceEvent.java @@ -0,0 +1,54 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.marginpublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class IndexPriceEvent implements Response> { + /** */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("granularity") + private Integer granularity; + + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** */ + @JsonProperty("value") + private Double value; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, IndexPriceEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWs.java new file mode 100644 index 00000000..007a5848 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWs.java @@ -0,0 +1,28 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.marginpublic; + +public interface MarginPublicWs { + + /** + * Index Price 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 + */ + public String indexPrice(String[] symbol, IndexPriceEvent.Callback callback); + + /** + * Mark Price 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 + */ + public String markPrice(String[] symbol, MarkPriceEvent.Callback callback); + + /** Unsubscribe from topics */ + public void unSubscribe(String id); + + /** Start websocket */ + public void start(); + + /** Stop websocket */ + public void stop(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsAutoGeneratedTest.java new file mode 100644 index 00000000..3f00bcc0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsAutoGeneratedTest.java @@ -0,0 +1,69 @@ +package com.kucoin.universal.sdk.generate.margin.marginpublic; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.ArrayList; +import java.util.List; + +class MarginPublicWsAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** indexPrice Index Price /indexPrice/indicator/index:_symbol_,_symbol_ */ + public static void testIndexPriceResponse() throws Exception { + String data = + "{\"id\":\"5c24c5da03aa673885cd67a0\",\"type\":\"message\",\"topic\":\"/indicator/index:USDT-BTC\",\"subject\":\"tick\",\"data\":{\"symbol\":\"USDT-BTC\",\"granularity\":5000,\"timestamp\":1551770400000,\"value\":0.0001092}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** markPrice Mark Price /markPrice/indicator/markPrice:_symbol_,_symbol_ */ + public static void testMarkPriceResponse() throws Exception { + String data = + "{\"id\":\"5c24c5da03aa673885cd67aa\",\"type\":\"message\",\"topic\":\"/indicator/markPrice:USDT-BTC\",\"subject\":\"tick\",\"data\":{\"symbol\":\"USDT-BTC\",\"granularity\":5000,\"timestamp\":1551770400000,\"value\":0.0001093}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(MarginPublicWsAutoGeneratedTest::testIndexPriceResponse, "testIndexPriceResponse"); + run(MarginPublicWsAutoGeneratedTest::testMarkPriceResponse, "testMarkPriceResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsImpl.java new file mode 100644 index 00000000..a99b641e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsImpl.java @@ -0,0 +1,44 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.marginpublic; + +import com.kucoin.universal.sdk.internal.interfaces.WebSocketService; + +public class MarginPublicWsImpl implements MarginPublicWs { + + private final WebSocketService wsService; + + public MarginPublicWsImpl(WebSocketService wsService) { + this.wsService = wsService; + } + + public String indexPrice(String[] symbol, IndexPriceEvent.Callback callback) { + String topicPrefix = "/indicator/index"; + + String[] args = symbol; + + return this.wsService.subscribe( + topicPrefix, args, IndexPriceEvent.CallbackAdapters.of(callback)); + } + + public String markPrice(String[] symbol, MarkPriceEvent.Callback callback) { + String topicPrefix = "/indicator/markPrice"; + + String[] args = symbol; + + return this.wsService.subscribe( + topicPrefix, args, MarkPriceEvent.CallbackAdapters.of(callback)); + } + + public void unSubscribe(String id) { + this.wsService.unsubscribe(id); + } + + public void start() { + this.wsService.start(); + } + + public void stop() { + this.wsService.stop(); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarkPriceEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarkPriceEvent.java new file mode 100644 index 00000000..89345b9c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarkPriceEvent.java @@ -0,0 +1,54 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.marginpublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class MarkPriceEvent implements Response> { + /** */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("granularity") + private Integer granularity; + + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** */ + @JsonProperty("value") + private Double value; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, MarkPriceEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetCrossMarginSymbolsItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetCrossMarginSymbolsItems.java new file mode 100644 index 00000000..fea6f6f9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetCrossMarginSymbolsItems.java @@ -0,0 +1,94 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCrossMarginSymbolsItems { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Symbol name */ + @JsonProperty("name") + private String name; + + /** Whether trading is enabled: True for enabled; false for disabled */ + @JsonProperty("enableTrading") + private Boolean enableTrading; + + /** Trading market */ + @JsonProperty("market") + private String market; + + /** Base currency, e.g. BTC. */ + @JsonProperty("baseCurrency") + private String baseCurrency; + + /** Quote currency, e.g. USDT. */ + @JsonProperty("quoteCurrency") + private String quoteCurrency; + + /** + * 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. + */ + @JsonProperty("baseIncrement") + private String baseIncrement; + + /** The minimum order quantity required to place an order. */ + @JsonProperty("baseMinSize") + private String baseMinSize; + + /** + * 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. + */ + @JsonProperty("quoteIncrement") + private String quoteIncrement; + + /** The minimum order funds required to place a market order. */ + @JsonProperty("quoteMinSize") + private String quoteMinSize; + + /** The maximum order size required to place an order. */ + @JsonProperty("baseMaxSize") + private String baseMaxSize; + + /** The maximum order funds required to place a market order. */ + @JsonProperty("quoteMaxSize") + private String quoteMaxSize; + + /** + * 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. + */ + @JsonProperty("priceIncrement") + private String priceIncrement; + + /** The currency of charged fees. */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** Threshold for price protection */ + @JsonProperty("priceLimitRate") + private String priceLimitRate; + + /** The minimum trading amounts */ + @JsonProperty("minFunds") + private String minFunds; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetCrossMarginSymbolsReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetCrossMarginSymbolsReq.java new file mode 100644 index 00000000..e504d159 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetCrossMarginSymbolsReq.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCrossMarginSymbolsReq implements Request { + /** + * If not provided, all cross margin symbol will be queried. If provided, only the specified + * symbol will be queried. + */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetCrossMarginSymbolsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetCrossMarginSymbolsResp.java new file mode 100644 index 00000000..c9735457 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetCrossMarginSymbolsResp.java @@ -0,0 +1,37 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCrossMarginSymbolsResp + implements Response> { + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetETFInfoData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetETFInfoData.java new file mode 100644 index 00000000..697fd114 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetETFInfoData.java @@ -0,0 +1,39 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetETFInfoData { + /** ETF Currency */ + @JsonProperty("currency") + private String currency; + + /** Net worth */ + @JsonProperty("netAsset") + private String netAsset; + + /** Target leverage */ + @JsonProperty("targetLeverage") + private String targetLeverage; + + /** Actual leverage */ + @JsonProperty("actualLeverage") + private String actualLeverage; + + /** The amount of currency issued */ + @JsonProperty("issuedSize") + private String issuedSize; + + /** Basket information */ + @JsonProperty("basket") + private String basket; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetETFInfoReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetETFInfoReq.java new file mode 100644 index 00000000..610d034d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetETFInfoReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetETFInfoReq implements Request { + /** ETF Currency: If empty, query all currencies */ + @JsonProperty("currency") + private String currency; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetETFInfoResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetETFInfoResp.java new file mode 100644 index 00000000..136e0a31 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetETFInfoResp.java @@ -0,0 +1,41 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetETFInfoResp implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetETFInfoResp fromJson(List data) { + // original response + GetETFInfoResp obj = new GetETFInfoResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetIsolatedMarginSymbolsData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetIsolatedMarginSymbolsData.java new file mode 100644 index 00000000..e2674a91 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetIsolatedMarginSymbolsData.java @@ -0,0 +1,71 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginSymbolsData { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Symbol name */ + @JsonProperty("symbolName") + private String symbolName; + + /** Base currency, e.g. BTC. */ + @JsonProperty("baseCurrency") + private String baseCurrency; + + /** Quote currency, e.g. USDT. */ + @JsonProperty("quoteCurrency") + private String quoteCurrency; + + /** Max. leverage of this symbol */ + @JsonProperty("maxLeverage") + private Integer maxLeverage; + + /** */ + @JsonProperty("flDebtRatio") + private String flDebtRatio; + + /** */ + @JsonProperty("tradeEnable") + private Boolean tradeEnable; + + /** */ + @JsonProperty("autoRenewMaxDebtRatio") + private String autoRenewMaxDebtRatio; + + /** */ + @JsonProperty("baseBorrowEnable") + private Boolean baseBorrowEnable; + + /** */ + @JsonProperty("quoteBorrowEnable") + private Boolean quoteBorrowEnable; + + /** */ + @JsonProperty("baseTransferInEnable") + private Boolean baseTransferInEnable; + + /** */ + @JsonProperty("quoteTransferInEnable") + private Boolean quoteTransferInEnable; + + /** */ + @JsonProperty("baseBorrowCoefficient") + private String baseBorrowCoefficient; + + /** */ + @JsonProperty("quoteBorrowCoefficient") + private String quoteBorrowCoefficient; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetIsolatedMarginSymbolsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetIsolatedMarginSymbolsResp.java new file mode 100644 index 00000000..5c12eba4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetIsolatedMarginSymbolsResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetIsolatedMarginSymbolsResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetIsolatedMarginSymbolsResp fromJson(List data) { + // original response + GetIsolatedMarginSymbolsResp obj = new GetIsolatedMarginSymbolsResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarginConfigResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarginConfigResp.java new file mode 100644 index 00000000..ef15358e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarginConfigResp.java @@ -0,0 +1,45 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarginConfigResp + implements Response> { + /** Available currencies for margin trade */ + @JsonProperty("currencyList") + private List currencyList = new ArrayList<>(); + + /** Max. leverage available */ + @JsonProperty("maxLeverage") + private Integer maxLeverage; + + /** The warning debt ratio of the forced liquidation */ + @JsonProperty("warningDebtRatio") + private String warningDebtRatio; + + /** The debt ratio of the forced liquidation */ + @JsonProperty("liqDebtRatio") + private String liqDebtRatio; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarkPriceDetailReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarkPriceDetailReq.java new file mode 100644 index 00000000..b7a781f2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarkPriceDetailReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarkPriceDetailReq implements Request { + /** symbol */ + @JsonIgnore + @PathVar("symbol") + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarkPriceDetailResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarkPriceDetailResp.java new file mode 100644 index 00000000..10d79ed9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarkPriceDetailResp.java @@ -0,0 +1,39 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarkPriceDetailResp + implements Response> { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Timestamp (milliseconds) */ + @JsonProperty("timePoint") + private Long timePoint; + + /** Mark price */ + @JsonProperty("value") + private Double value; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarkPriceListData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarkPriceListData.java new file mode 100644 index 00000000..81fc417b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarkPriceListData.java @@ -0,0 +1,27 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarkPriceListData { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Timestamp (milliseconds) */ + @JsonProperty("timePoint") + private Long timePoint; + + /** Mark price */ + @JsonProperty("value") + private Double value; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarkPriceListResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarkPriceListResp.java new file mode 100644 index 00000000..a231beb8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetMarkPriceListResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarkPriceListResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetMarkPriceListResp fromJson(List data) { + // original response + GetMarkPriceListResp obj = new GetMarkPriceListResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApi.java new file mode 100644 index 00000000..f398a924 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApi.java @@ -0,0 +1,63 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.market; + +public interface MarketApi { + /** + * Get Symbols - Cross Margin This endpoint allows querying the configuration of cross margin + * symbol. docs + * +-----------------------+--------+ | Extra API Info | Value | + * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ + */ + GetCrossMarginSymbolsResp getCrossMarginSymbols(GetCrossMarginSymbolsReq req); + + /** + * Get ETF Info This interface returns leveraged token information. docs +-----------------------+--------+ + * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+--------+ + */ + GetETFInfoResp getETFInfo(GetETFInfoReq req); + + /** + * Get Mark Price Detail This endpoint returns the current Mark price for specified margin trading + * pairs. docs + * +-----------------------+--------+ | Extra API Info | Value | + * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+--------+ + */ + GetMarkPriceDetailResp getMarkPriceDetail(GetMarkPriceDetailReq req); + + /** + * Get Margin Config Request the configure info of the cross margin via this endpoint. docs +-----------------------+--------+ + * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 25 | +-----------------------+--------+ + */ + GetMarginConfigResp getMarginConfig(); + + /** + * Get Mark Price List This endpoint returns the current Mark price for all margin trading pairs. + * docs + * +-----------------------+--------+ | Extra API Info | Value | + * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+--------+ + */ + GetMarkPriceListResp getMarkPriceList(); + + /** + * Get Symbols - Isolated Margin This endpoint allows querying the configuration of isolated + * margin symbol. docs + * +-----------------------+--------+ | Extra API Info | Value | + * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ + */ + GetIsolatedMarginSymbolsResp getIsolatedMarginSymbols(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApi.template new file mode 100644 index 00000000..7975b392 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApi.template @@ -0,0 +1,131 @@ + + /** + * getCrossMarginSymbols + * Get Symbols - Cross Margin + * /api/v3/margin/symbols + */ + public void testGetCrossMarginSymbols() { + GetCrossMarginSymbolsReq.GetCrossMarginSymbolsReqBuilder builder = GetCrossMarginSymbolsReq.builder(); + builder.symbol(?); + GetCrossMarginSymbolsReq req = builder.build(); + GetCrossMarginSymbolsResp resp = this.api.getCrossMarginSymbols(req); + self::assertNotNull($resp->timestamp); + foreach($resp->items as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->name); + self::assertNotNull($item->enableTrading); + self::assertNotNull($item->market); + self::assertNotNull($item->baseCurrency); + self::assertNotNull($item->quoteCurrency); + self::assertNotNull($item->baseIncrement); + self::assertNotNull($item->baseMinSize); + self::assertNotNull($item->quoteIncrement); + self::assertNotNull($item->quoteMinSize); + self::assertNotNull($item->baseMaxSize); + self::assertNotNull($item->quoteMaxSize); + self::assertNotNull($item->priceIncrement); + self::assertNotNull($item->feeCurrency); + self::assertNotNull($item->priceLimitRate); + self::assertNotNull($item->minFunds); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getETFInfo + * Get ETF Info + * /api/v3/etf/info + */ + public void testGetETFInfo() { + GetETFInfoReq.GetETFInfoReqBuilder builder = GetETFInfoReq.builder(); + builder.currency(?); + GetETFInfoReq req = builder.build(); + GetETFInfoResp resp = this.api.getETFInfo(req); + foreach($resp->data as $item) { + self::assertNotNull($item->currency); + self::assertNotNull($item->netAsset); + self::assertNotNull($item->targetLeverage); + self::assertNotNull($item->actualLeverage); + self::assertNotNull($item->issuedSize); + self::assertNotNull($item->basket); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getMarkPriceDetail + * Get Mark Price Detail + * /api/v1/mark-price/{symbol}/current + */ + public void testGetMarkPriceDetail() { + GetMarkPriceDetailReq.GetMarkPriceDetailReqBuilder builder = GetMarkPriceDetailReq.builder(); + builder.symbol(?); + GetMarkPriceDetailReq req = builder.build(); + GetMarkPriceDetailResp resp = this.api.getMarkPriceDetail(req); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->timePoint); + self::assertNotNull($resp->value); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getMarginConfig + * Get Margin Config + * /api/v1/margin/config + */ + public void testGetMarginConfig() { + GetMarginConfigResp resp = this.api.getMarginConfig(); + foreach($resp->currencyList as $item) { + } + + self::assertNotNull($resp->maxLeverage); + self::assertNotNull($resp->warningDebtRatio); + self::assertNotNull($resp->liqDebtRatio); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getMarkPriceList + * Get Mark Price List + * /api/v3/mark-price/all-symbols + */ + public void testGetMarkPriceList() { + GetMarkPriceListResp resp = this.api.getMarkPriceList(); + foreach($resp->data as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->timePoint); + self::assertNotNull($item->value); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getIsolatedMarginSymbols + * Get Symbols - Isolated Margin + * /api/v1/isolated/symbols + */ + public void testGetIsolatedMarginSymbols() { + GetIsolatedMarginSymbolsResp resp = this.api.getIsolatedMarginSymbols(); + foreach($resp->data as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->symbolName); + self::assertNotNull($item->baseCurrency); + self::assertNotNull($item->quoteCurrency); + self::assertNotNull($item->maxLeverage); + self::assertNotNull($item->flDebtRatio); + self::assertNotNull($item->tradeEnable); + self::assertNotNull($item->autoRenewMaxDebtRatio); + self::assertNotNull($item->baseBorrowEnable); + self::assertNotNull($item->quoteBorrowEnable); + self::assertNotNull($item->baseTransferInEnable); + self::assertNotNull($item->quoteTransferInEnable); + self::assertNotNull($item->baseBorrowCoefficient); + self::assertNotNull($item->quoteBorrowCoefficient); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiAutoGeneratedTest.java new file mode 100644 index 00000000..e2e93866 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiAutoGeneratedTest.java @@ -0,0 +1,417 @@ +package com.kucoin.universal.sdk.generate.margin.market; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class MarketApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** getCrossMarginSymbols Request Get Symbols - Cross Margin /api/v3/margin/symbols */ + public static void testGetCrossMarginSymbolsRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\"}"; + GetCrossMarginSymbolsReq obj = mapper.readValue(data, GetCrossMarginSymbolsReq.class); + } + + /** getCrossMarginSymbols Response Get Symbols - Cross Margin /api/v3/margin/symbols */ + public static void testGetCrossMarginSymbolsResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"timestamp\": 1729665839353,\n" + + " \"items\": [\n" + + " {\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"name\": \"BTC-USDT\",\n" + + " \"enableTrading\": true,\n" + + " \"market\": \"USDS\",\n" + + " \"baseCurrency\": \"BTC\",\n" + + " \"quoteCurrency\": \"USDT\",\n" + + " \"baseIncrement\": \"0.00000001\",\n" + + " \"baseMinSize\": \"0.00001\",\n" + + " \"baseMaxSize\": \"10000000000\",\n" + + " \"quoteIncrement\": \"0.000001\",\n" + + " \"quoteMinSize\": \"0.1\",\n" + + " \"quoteMaxSize\": \"99999999\",\n" + + " \"priceIncrement\": \"0.1\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"priceLimitRate\": \"0.1\",\n" + + " \"minFunds\": \"0.1\"\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getETFInfo Request Get ETF Info /api/v3/etf/info */ + public static void testGetETFInfoRequest() throws Exception { + String data = "{\"currency\": \"BTCUP\"}"; + GetETFInfoReq obj = mapper.readValue(data, GetETFInfoReq.class); + } + + /** getETFInfo Response Get ETF Info /api/v3/etf/info */ + public static void testGetETFInfoResponse() throws Exception { + String data = + "{\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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getMarkPriceDetail Request Get Mark Price Detail /api/v1/mark-price/{symbol}/current */ + public static void testGetMarkPriceDetailRequest() throws Exception { + String data = "{\"symbol\": \"USDT-BTC\"}"; + GetMarkPriceDetailReq obj = mapper.readValue(data, GetMarkPriceDetailReq.class); + } + + /** getMarkPriceDetail Response Get Mark Price Detail /api/v1/mark-price/{symbol}/current */ + public static void testGetMarkPriceDetailResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbol\": \"USDT-BTC\",\n" + + " \"timePoint\": 1729676888000,\n" + + " \"value\": 1.5045E-5\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getMarginConfig Request Get Margin Config /api/v1/margin/config */ + public static void testGetMarginConfigRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getMarginConfig Response Get Margin Config /api/v1/margin/config */ + public static void testGetMarginConfigResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getMarkPriceList Request Get Mark Price List /api/v3/mark-price/all-symbols */ + public static void testGetMarkPriceListRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getMarkPriceList Response Get Mark Price List /api/v3/mark-price/all-symbols */ + public static void testGetMarkPriceListResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getIsolatedMarginSymbols Request Get Symbols - Isolated Margin /api/v1/isolated/symbols */ + public static void testGetIsolatedMarginSymbolsRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getIsolatedMarginSymbols Response Get Symbols - Isolated Margin /api/v1/isolated/symbols */ + public static void testGetIsolatedMarginSymbolsResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"symbolName\": \"BTC-USDT\",\n" + + " \"baseCurrency\": \"BTC\",\n" + + " \"quoteCurrency\": \"USDT\",\n" + + " \"maxLeverage\": 10,\n" + + " \"flDebtRatio\": \"0.97\",\n" + + " \"tradeEnable\": true,\n" + + " \"autoRenewMaxDebtRatio\": \"0.96\",\n" + + " \"baseBorrowEnable\": true,\n" + + " \"quoteBorrowEnable\": true,\n" + + " \"baseTransferInEnable\": true,\n" + + " \"quoteTransferInEnable\": true,\n" + + " \"baseBorrowCoefficient\": \"1\",\n" + + " \"quoteBorrowCoefficient\": \"1\"\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run( + MarketApiAutoGeneratedTest::testGetCrossMarginSymbolsRequest, + "testGetCrossMarginSymbolsRequest"); + run( + MarketApiAutoGeneratedTest::testGetCrossMarginSymbolsResponse, + "testGetCrossMarginSymbolsResponse"); + run(MarketApiAutoGeneratedTest::testGetETFInfoRequest, "testGetETFInfoRequest"); + run(MarketApiAutoGeneratedTest::testGetETFInfoResponse, "testGetETFInfoResponse"); + run(MarketApiAutoGeneratedTest::testGetMarkPriceDetailRequest, "testGetMarkPriceDetailRequest"); + run( + MarketApiAutoGeneratedTest::testGetMarkPriceDetailResponse, + "testGetMarkPriceDetailResponse"); + run(MarketApiAutoGeneratedTest::testGetMarginConfigRequest, "testGetMarginConfigRequest"); + run(MarketApiAutoGeneratedTest::testGetMarginConfigResponse, "testGetMarginConfigResponse"); + run(MarketApiAutoGeneratedTest::testGetMarkPriceListRequest, "testGetMarkPriceListRequest"); + run(MarketApiAutoGeneratedTest::testGetMarkPriceListResponse, "testGetMarkPriceListResponse"); + run( + MarketApiAutoGeneratedTest::testGetIsolatedMarginSymbolsRequest, + "testGetIsolatedMarginSymbolsRequest"); + run( + MarketApiAutoGeneratedTest::testGetIsolatedMarginSymbolsResponse, + "testGetIsolatedMarginSymbolsResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiImpl.java new file mode 100644 index 00000000..7184f9bc --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiImpl.java @@ -0,0 +1,67 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.market; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class MarketApiImpl implements MarketApi { + private final Transport transport; + + public MarketApiImpl(Transport transport) { + this.transport = transport; + } + + public GetCrossMarginSymbolsResp getCrossMarginSymbols(GetCrossMarginSymbolsReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v3/margin/symbols", + req, + GetCrossMarginSymbolsResp.class, + false); + } + + public GetETFInfoResp getETFInfo(GetETFInfoReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v3/etf/info", req, GetETFInfoResp.class, false); + } + + public GetMarkPriceDetailResp getMarkPriceDetail(GetMarkPriceDetailReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/mark-price/{symbol}/current", + req, + GetMarkPriceDetailResp.class, + false); + } + + public GetMarginConfigResp getMarginConfig() { + return this.transport.call( + "spot", false, "GET", "/api/v1/margin/config", null, GetMarginConfigResp.class, false); + } + + public GetMarkPriceListResp getMarkPriceList() { + return this.transport.call( + "spot", + false, + "GET", + "/api/v3/mark-price/all-symbols", + null, + GetMarkPriceListResp.class, + false); + } + + public GetIsolatedMarginSymbolsResp getIsolatedMarginSymbols() { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/isolated/symbols", + null, + GetIsolatedMarginSymbolsResp.class, + false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderReq.java new file mode 100644 index 00000000..b938583b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderReq.java @@ -0,0 +1,283 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddOrderReq implements Request { + /** + * 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. + */ + @JsonProperty("clientOid") + private String clientOid; + + /** Specify if the order is to 'buy' or 'sell'. */ + @JsonProperty("side") + private SideEnum side; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * 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. + */ + @JsonProperty("type") + @Builder.Default + private TypeEnum type = TypeEnum.LIMIT; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these + * strategies: CN, CO, CB , and DC + */ + @JsonProperty("stp") + private StpEnum stp; + + /** + * 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. + */ + @JsonProperty("price") + private String price; + + /** + * 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 + */ + @JsonProperty("size") + private String size; + + /** + * [Time in force](https://www.kucoin.com/docs-new/api-5176570) is a special strategy used during + * trading + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GTC; + + /** passive order labels, this is disabled when the order timing strategy is IOC or FOK */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = false; + + /** + * Whether or not only visible portions of orders are shown in [Iceberg + * orders](https://www.kucoin.com/docs-new/doc-338146) + */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = false; + + /** Maximum visible quantity in iceberg orders */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** Cancel after n seconds, the order timing strategy is GTT */ + @JsonProperty("cancelAfter") + private Long cancelAfter; + + /** When **type** is market, select one out of two: size or funds */ + @JsonProperty("funds") + private String funds; + + /** True - isolated margin; false - cross margin. Default is false */ + @JsonProperty("isIsolated") + @Builder.Default + private Boolean isIsolated = false; + + /** + * When Margin Account has inefficient balance, our system autoborrows inefficient assets and + * opens positions according to the lowest market interest rate. + */ + @JsonProperty("autoBorrow") + @Builder.Default + private Boolean autoBorrow = false; + + /** + * 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. + */ + @JsonProperty("autoRepay") + @Builder.Default + private Boolean autoRepay = false; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderResp.java new file mode 100644 index 00000000..8f261b03 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderResp.java @@ -0,0 +1,51 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public 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. + */ + @JsonProperty("orderId") + private String orderId; + + /** + * Borrow order ID. The field is returned only after placing the order under the mode of + * Auto-Borrow. + */ + @JsonProperty("loanApplyId") + private String loanApplyId; + + /** + * Borrowed amount. The field is returned only after placing the order under the mode of + * Auto-Borrow. + */ + @JsonProperty("borrowSize") + private String borrowSize; + + /** The user self-defined order ID. */ + @JsonProperty("clientOid") + private String clientOid; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderTestReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderTestReq.java new file mode 100644 index 00000000..044a5de8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderTestReq.java @@ -0,0 +1,283 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddOrderTestReq implements Request { + /** + * 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. + */ + @JsonProperty("clientOid") + private String clientOid; + + /** Specify if the order is to 'buy' or 'sell'. */ + @JsonProperty("side") + private SideEnum side; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * 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. + */ + @JsonProperty("type") + @Builder.Default + private TypeEnum type = TypeEnum.LIMIT; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these + * strategies: CN, CO, CB , and DC + */ + @JsonProperty("stp") + private StpEnum stp; + + /** + * 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. + */ + @JsonProperty("price") + private String price; + + /** + * 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 + */ + @JsonProperty("size") + private String size; + + /** + * [Time in force](https://www.kucoin.com/docs-new/api-5176570) is a special strategy used during + * trading + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GTC; + + /** passive order labels, this is disabled when the order timing strategy is IOC or FOK */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = false; + + /** + * Whether or not only visible portions of orders are shown in [Iceberg + * orders](https://www.kucoin.com/docs-new/doc-338146) + */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = false; + + /** Maximum visible quantity in iceberg orders */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** Cancel after n seconds, the order timing strategy is GTT */ + @JsonProperty("cancelAfter") + private Long cancelAfter; + + /** When **type** is market, select one out of two: size or funds */ + @JsonProperty("funds") + private String funds; + + /** True - isolated margin; false - cross margin. Default is false */ + @JsonProperty("isIsolated") + @Builder.Default + private Boolean isIsolated = false; + + /** + * When Margin Account has inefficient balance, our system autoborrows inefficient assets and + * opens positions according to the lowest market interest rate. + */ + @JsonProperty("autoBorrow") + @Builder.Default + private Boolean autoBorrow = false; + + /** + * 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. + */ + @JsonProperty("autoRepay") + @Builder.Default + private Boolean autoRepay = false; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderTestResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderTestResp.java new file mode 100644 index 00000000..cbe3b247 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderTestResp.java @@ -0,0 +1,52 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public 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. + */ + @JsonProperty("orderId") + private String orderId; + + /** + * Borrowed amount. The field is returned only after placing the order under the mode of + * Auto-Borrow. + */ + @JsonProperty("loanApplyId") + private String loanApplyId; + + /** + * ID of the borrowing response. The field is returned only after placing the order under the mode + * of Auto-Borrow. + */ + @JsonProperty("borrowSize") + private Double borrowSize; + + /** The user self-defined order ID. */ + @JsonProperty("clientOid") + private String clientOid; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderTestV1Req.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderTestV1Req.java new file mode 100644 index 00000000..27c43511 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderTestV1Req.java @@ -0,0 +1,316 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddOrderTestV1Req implements Request { + /** + * 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. + */ + @JsonProperty("clientOid") + private String clientOid; + + /** Specify if the order is to 'buy' or 'sell'. */ + @JsonProperty("side") + private SideEnum side; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * 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. + */ + @JsonProperty("type") + @Builder.Default + private TypeEnum type = TypeEnum.LIMIT; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/api-5176570) is divided into four + * strategies: CN, CO, CB , and DC + */ + @JsonProperty("stp") + private StpEnum stp; + + /** + * 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. + */ + @JsonProperty("price") + private String price; + + /** + * 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 + */ + @JsonProperty("size") + private String size; + + /** + * [Time in force](https://www.kucoin.com/docs-new/api-5176570) is a special strategy used during + * trading + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GTC; + + /** passive order labels, this is disabled when the order timing strategy is IOC or FOK */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** Hidden or not (not shown in order book) */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = false; + + /** Whether or not only visible portions of orders are shown in iceberg orders */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = false; + + /** Maximum visible quantity in iceberg orders */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** Cancel after n seconds, the order timing strategy is GTT */ + @JsonProperty("cancelAfter") + private Long cancelAfter; + + /** When **type** is market, select one out of two: size or funds */ + @JsonProperty("funds") + private String funds; + + /** + * When Margin Account has inefficient balance, our system autoborrows inefficient assets and + * opens positions according to the lowest market interest rate. + */ + @JsonProperty("autoBorrow") + @Builder.Default + private Boolean autoBorrow = false; + + /** + * 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. + */ + @JsonProperty("autoRepay") + @Builder.Default + private Boolean autoRepay = false; + + /** + * The type of trading, including cross (cross mode) and isolated (isolated mode). It is set at + * cross by default. + */ + @JsonProperty("marginModel") + @Builder.Default + private MarginModelEnum marginModel = MarginModelEnum.CROSS; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum MarginModelEnum { + /** */ + CROSS("cross"), + /** */ + ISOLATED("isolated"); + + private final String value; + + MarginModelEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModelEnum fromValue(String value) { + for (MarginModelEnum b : MarginModelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderTestV1Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderTestV1Resp.java new file mode 100644 index 00000000..8c75ae13 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderTestV1Resp.java @@ -0,0 +1,52 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public 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. + */ + @JsonProperty("orderId") + private String orderId; + + /** + * Borrow order ID. The field is returned only after placing the order under the mode of + * Auto-Borrow. + */ + @JsonProperty("loanApplyId") + private String loanApplyId; + + /** + * Borrowed amount. The field is returned only after placing the order under the mode of + * Auto-Borrow. + */ + @JsonProperty("borrowSize") + private String borrowSize; + + /** This return value is invalid */ + @JsonProperty("clientOid") + private String clientOid; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderV1Req.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderV1Req.java new file mode 100644 index 00000000..0d7b183f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderV1Req.java @@ -0,0 +1,316 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddOrderV1Req implements Request { + /** + * 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. + */ + @JsonProperty("clientOid") + private String clientOid; + + /** Specify if the order is to 'buy' or 'sell'. */ + @JsonProperty("side") + private SideEnum side; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * 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. + */ + @JsonProperty("type") + @Builder.Default + private TypeEnum type = TypeEnum.LIMIT; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four + * strategies: CN, CO, CB , and DC + */ + @JsonProperty("stp") + private StpEnum stp; + + /** + * 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. + */ + @JsonProperty("price") + private String price; + + /** + * 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 + */ + @JsonProperty("size") + private String size; + + /** + * [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during + * trading + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GTC; + + /** passive order labels, this is disabled when the order timing strategy is IOC or FOK */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** Hidden or not (not shown in order book) */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = false; + + /** Whether or not only visible portions of orders are shown in iceberg orders */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = false; + + /** Maximum visible quantity in iceberg orders */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** Cancel after n seconds, the order timing strategy is GTT */ + @JsonProperty("cancelAfter") + private Long cancelAfter; + + /** When **type** is market, select one out of two: size or funds */ + @JsonProperty("funds") + private String funds; + + /** + * When Margin Account has inefficient balance, our system autoborrows inefficient assets and + * opens positions according to the lowest market interest rate. + */ + @JsonProperty("autoBorrow") + @Builder.Default + private Boolean autoBorrow = false; + + /** + * 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. + */ + @JsonProperty("autoRepay") + @Builder.Default + private Boolean autoRepay = false; + + /** + * The type of trading, including cross (cross mode) and isolated (isolated mode). It is set at + * cross by default. + */ + @JsonProperty("marginModel") + @Builder.Default + private MarginModelEnum marginModel = MarginModelEnum.CROSS; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum MarginModelEnum { + /** */ + CROSS("cross"), + /** */ + ISOLATED("isolated"); + + private final String value; + + MarginModelEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarginModelEnum fromValue(String value) { + for (MarginModelEnum b : MarginModelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderV1Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderV1Resp.java new file mode 100644 index 00000000..f6222c3d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/AddOrderV1Resp.java @@ -0,0 +1,51 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public 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. + */ + @JsonProperty("orderId") + private String orderId; + + /** + * Borrow order ID. The field is returned only after placing the order under the mode of + * Auto-Borrow. + */ + @JsonProperty("loanApplyId") + private String loanApplyId; + + /** + * Borrowed amount. The field is returned only after placing the order under the mode of + * Auto-Borrow. + */ + @JsonProperty("borrowSize") + private String borrowSize; + + /** This return value is invalid */ + @JsonProperty("clientOid") + private String clientOid; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelAllOrdersBySymbolReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelAllOrdersBySymbolReq.java new file mode 100644 index 00000000..2d467e6a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelAllOrdersBySymbolReq.java @@ -0,0 +1,64 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelAllOrdersBySymbolReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * Transaction type: MARGIN_TRADE - cross margin trade, MARGIN_ISOLATED_TRADE - isolated margin + * trade + */ + @JsonProperty("tradeType") + private TradeTypeEnum tradeType; + + public enum TradeTypeEnum { + /** */ + MARGIN_TRADE("MARGIN_TRADE"), + /** */ + MARGIN_ISOLATED_TRADE("MARGIN_ISOLATED_TRADE"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelAllOrdersBySymbolResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelAllOrdersBySymbolResp.java new file mode 100644 index 00000000..f9e7be84 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelAllOrdersBySymbolResp.java @@ -0,0 +1,40 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelAllOrdersBySymbolResp + implements Response> { + /** */ + @JsonProperty("data") + private String data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static CancelAllOrdersBySymbolResp fromJson(String data) { + // original response + CancelAllOrdersBySymbolResp obj = new CancelAllOrdersBySymbolResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelOrderByClientOidReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelOrderByClientOidReq.java new file mode 100644 index 00000000..cd595d5b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelOrderByClientOidReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByClientOidReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Client Order Id, unique identifier created by the user */ + @JsonIgnore + @PathVar("clientOid") + @JsonProperty("clientOid") + private String clientOid; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelOrderByClientOidResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelOrderByClientOidResp.java new file mode 100644 index 00000000..3527ac6d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelOrderByClientOidResp.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByClientOidResp + implements Response> { + /** Client Order Id, unique identifier created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelOrderByOrderIdReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelOrderByOrderIdReq.java new file mode 100644 index 00000000..1e115072 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelOrderByOrderIdReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByOrderIdReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** The unique order id generated by the trading system */ + @JsonIgnore + @PathVar("orderId") + @JsonProperty("orderId") + private String orderId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelOrderByOrderIdResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelOrderByOrderIdResp.java new file mode 100644 index 00000000..61de3735 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelOrderByOrderIdResp.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByOrderIdResp + implements Response> { + /** Order id */ + @JsonProperty("orderId") + private String orderId; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetClosedOrdersItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetClosedOrdersItems.java new file mode 100644 index 00000000..623bf4f9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetClosedOrdersItems.java @@ -0,0 +1,277 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetClosedOrdersItems { + /** The unique order id generated by the trading system */ + @JsonProperty("id") + private String id; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("opType") + private String opType; + + /** Specify if the order is a 'limit' order or 'market' order. */ + @JsonProperty("type") + private TypeEnum type; + + /** Buy or sell */ + @JsonProperty("side") + private String side; + + /** Order Price */ + @JsonProperty("price") + private String price; + + /** Order Size */ + @JsonProperty("size") + private String size; + + /** Order Funds */ + @JsonProperty("funds") + private String funds; + + /** Number of filled transactions */ + @JsonProperty("dealSize") + private String dealSize; + + /** Funds of filled transactions */ + @JsonProperty("dealFunds") + private String dealFunds; + + /** [Handling fees](https://www.kucoin.com/docs-new/api-5327739) */ + @JsonProperty("fee") + private String fee; + + /** Currency used to calculate trading fee */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these + * strategies: CN, CO, CB , and DC + */ + @JsonProperty("stp") + private StpEnum stp; + + /** */ + @JsonProperty("stop") + private String stop; + + /** */ + @JsonProperty("stopTriggered") + private Boolean stopTriggered; + + /** */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** Time in force */ + @JsonProperty("timeInForce") + private TimeInForceEnum timeInForce; + + /** Whether it’s a postOnly order. */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** Whether it’s a hidden order. */ + @JsonProperty("hidden") + private Boolean hidden; + + /** Whether it’s a iceberg order. */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** Visible size of iceberg order in order book. */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** A GTT timeInForce that expires in n seconds */ + @JsonProperty("cancelAfter") + private Integer cancelAfter; + + /** */ + @JsonProperty("channel") + private String channel; + + /** Client Order Id, unique identifier created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** Order placement remarks */ + @JsonProperty("remark") + private String remark; + + /** Order tag */ + @JsonProperty("tags") + private String tags; + + /** Whether there is a cancellation record for the order. */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** */ + @JsonProperty("createdAt") + private Long createdAt; + + /** */ + @JsonProperty("lastUpdatedAt") + private Long lastUpdatedAt; + + /** Trade type, redundancy param */ + @JsonProperty("tradeType") + private String tradeType; + + /** + * Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook + */ + @JsonProperty("inOrderBook") + private Boolean inOrderBook; + + /** Number of canceled transactions */ + @JsonProperty("cancelledSize") + private String cancelledSize; + + /** Funds of canceled transactions */ + @JsonProperty("cancelledFunds") + private String cancelledFunds; + + /** Number of remain transactions */ + @JsonProperty("remainSize") + private String remainSize; + + /** Funds of remain transactions */ + @JsonProperty("remainFunds") + private String remainFunds; + + /** Users in some regions have this field */ + @JsonProperty("tax") + private String tax; + + /** Order status: true-The status of the order is active; false-The status of the order is done */ + @JsonProperty("active") + private Boolean active; + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetClosedOrdersReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetClosedOrdersReq.java new file mode 100644 index 00000000..860dd6e3 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetClosedOrdersReq.java @@ -0,0 +1,160 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetClosedOrdersReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * Transaction type: MARGIN_TRADE - cross margin trade, MARGIN_ISOLATED_TRADE - isolated margin + * trade + */ + @JsonProperty("tradeType") + private TradeTypeEnum tradeType; + + /** Specify if the order is to 'buy' or 'sell'. */ + @JsonProperty("side") + private SideEnum side; + + /** Specify if the order is a 'limit' order or 'market' order. */ + @JsonProperty("type") + private TypeEnum type; + + /** + * 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. + */ + @JsonProperty("lastId") + private Long lastId; + + /** Default20, Max100 */ + @JsonProperty("limit") + @Builder.Default + private Integer limit = 20; + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + public enum TradeTypeEnum { + /** */ + MARGIN_TRADE("MARGIN_TRADE"), + /** */ + MARGIN_ISOLATED_TRADE("MARGIN_ISOLATED_TRADE"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetClosedOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetClosedOrdersResp.java new file mode 100644 index 00000000..efa99a58 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetClosedOrdersResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetClosedOrdersResp + implements Response> { + /** + * 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. + */ + @JsonProperty("lastId") + private Long lastId; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOpenOrdersData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOpenOrdersData.java new file mode 100644 index 00000000..1ec97e48 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOpenOrdersData.java @@ -0,0 +1,310 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOpenOrdersData { + /** The unique order id generated by the trading system */ + @JsonProperty("id") + private String id; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("opType") + private String opType; + + /** Specify if the order is a 'limit' order or 'market' order. */ + @JsonProperty("type") + private TypeEnum type; + + /** Buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** Order Price */ + @JsonProperty("price") + private String price; + + /** Order Size */ + @JsonProperty("size") + private String size; + + /** Order Funds */ + @JsonProperty("funds") + private String funds; + + /** Number of filled transactions */ + @JsonProperty("dealSize") + private String dealSize; + + /** Funds of filled transactions */ + @JsonProperty("dealFunds") + private String dealFunds; + + /** Trading fee */ + @JsonProperty("fee") + private String fee; + + /** Currency used to calculate trading fee */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these + * strategies: CN, CO, CB , and DC + */ + @JsonProperty("stp") + private StpEnum stp; + + /** */ + @JsonProperty("stop") + private String stop; + + /** */ + @JsonProperty("stopTriggered") + private Boolean stopTriggered; + + /** */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** Time in force */ + @JsonProperty("timeInForce") + private TimeInForceEnum timeInForce; + + /** Whether it’s a postOnly order. */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** Whether it’s a hidden order. */ + @JsonProperty("hidden") + private Boolean hidden; + + /** Whether it’s a iceberg order. */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** Visible size of iceberg order in order book. */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** A GTT timeInForce that expires in n seconds */ + @JsonProperty("cancelAfter") + private Integer cancelAfter; + + /** */ + @JsonProperty("channel") + private String channel; + + /** Client Order Id, unique identifier created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** Order placement remarks */ + @JsonProperty("remark") + private String remark; + + /** Order tag */ + @JsonProperty("tags") + private String tags; + + /** Whether there is a cancellation record for the order. */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** */ + @JsonProperty("createdAt") + private Long createdAt; + + /** */ + @JsonProperty("lastUpdatedAt") + private Long lastUpdatedAt; + + /** Trade type, redundancy param */ + @JsonProperty("tradeType") + private String tradeType; + + /** + * Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook + */ + @JsonProperty("inOrderBook") + private Boolean inOrderBook; + + /** Number of canceled transactions */ + @JsonProperty("cancelledSize") + private String cancelledSize; + + /** Funds of canceled transactions */ + @JsonProperty("cancelledFunds") + private String cancelledFunds; + + /** Number of remain transactions */ + @JsonProperty("remainSize") + private String remainSize; + + /** Funds of remain transactions */ + @JsonProperty("remainFunds") + private String remainFunds; + + /** Users in some regions have this field */ + @JsonProperty("tax") + private String tax; + + /** Order status: true-The status of the order is active; false-The status of the order is done */ + @JsonProperty("active") + private Boolean active; + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOpenOrdersReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOpenOrdersReq.java new file mode 100644 index 00000000..0775455d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOpenOrdersReq.java @@ -0,0 +1,64 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOpenOrdersReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * Order type: MARGIN_TRADE - cross margin trading order, MARGIN_ISOLATED_TRADE - isolated margin + * trading order + */ + @JsonProperty("tradeType") + private TradeTypeEnum tradeType; + + public enum TradeTypeEnum { + /** */ + MARGIN_TRADE("MARGIN_TRADE"), + /** */ + MARGIN_ISOLATED_TRADE("MARGIN_ISOLATED_TRADE"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOpenOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOpenOrdersResp.java new file mode 100644 index 00000000..8bc988d9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOpenOrdersResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOpenOrdersResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetOpenOrdersResp fromJson(List data) { + // original response + GetOpenOrdersResp obj = new GetOpenOrdersResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOrderByClientOidReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOrderByClientOidReq.java new file mode 100644 index 00000000..5afa37e8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOrderByClientOidReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderByClientOidReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Client Order Id, unique identifier created by the user */ + @JsonIgnore + @PathVar("clientOid") + @JsonProperty("clientOid") + private String clientOid; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOrderByClientOidResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOrderByClientOidResp.java new file mode 100644 index 00000000..44aa9045 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOrderByClientOidResp.java @@ -0,0 +1,322 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderByClientOidResp + implements Response> { + /** The unique order id generated by the trading system */ + @JsonProperty("id") + private String id; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("opType") + private String opType; + + /** Specify if the order is a 'limit' order or 'market' order. */ + @JsonProperty("type") + private TypeEnum type; + + /** Buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** Order Price */ + @JsonProperty("price") + private String price; + + /** Order Size */ + @JsonProperty("size") + private String size; + + /** Order Funds */ + @JsonProperty("funds") + private String funds; + + /** Number of filled transactions */ + @JsonProperty("dealSize") + private String dealSize; + + /** Funds of filled transactions */ + @JsonProperty("dealFunds") + private String dealFunds; + + /** [Handling fees](https://www.kucoin.com/docs-new/api-5327739) */ + @JsonProperty("fee") + private String fee; + + /** Currency used to calculate trading fee */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these + * strategies: CN, CO, CB , and DC + */ + @JsonProperty("stp") + private StpEnum stp; + + /** */ + @JsonProperty("stop") + private String stop; + + /** */ + @JsonProperty("stopTriggered") + private Boolean stopTriggered; + + /** */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** Time in force */ + @JsonProperty("timeInForce") + private TimeInForceEnum timeInForce; + + /** Whether it’s a postOnly order. */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** Whether it’s a hidden order. */ + @JsonProperty("hidden") + private Boolean hidden; + + /** Whether it’s a iceberg order. */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** Visible size of iceberg order in order book. */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** A GTT timeInForce that expires in n seconds */ + @JsonProperty("cancelAfter") + private Integer cancelAfter; + + /** */ + @JsonProperty("channel") + private String channel; + + /** Client Order Id, unique identifier created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** Order placement remarks */ + @JsonProperty("remark") + private String remark; + + /** Order tag */ + @JsonProperty("tags") + private String tags; + + /** Whether there is a cancellation record for the order. */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** */ + @JsonProperty("createdAt") + private Long createdAt; + + /** */ + @JsonProperty("lastUpdatedAt") + private Long lastUpdatedAt; + + /** Trade type, redundancy param */ + @JsonProperty("tradeType") + private String tradeType; + + /** + * Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook + */ + @JsonProperty("inOrderBook") + private Boolean inOrderBook; + + /** Number of canceled transactions */ + @JsonProperty("cancelledSize") + private String cancelledSize; + + /** Funds of canceled transactions */ + @JsonProperty("cancelledFunds") + private String cancelledFunds; + + /** Number of remain transactions */ + @JsonProperty("remainSize") + private String remainSize; + + /** Funds of remain transactions */ + @JsonProperty("remainFunds") + private String remainFunds; + + /** Users in some regions have this field */ + @JsonProperty("tax") + private String tax; + + /** Order status: true-The status of the order is active; false-The status of the order is done */ + @JsonProperty("active") + private Boolean active; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOrderByOrderIdReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOrderByOrderIdReq.java new file mode 100644 index 00000000..329e7fee --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOrderByOrderIdReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderByOrderIdReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** The unique order id generated by the trading system */ + @JsonIgnore + @PathVar("orderId") + @JsonProperty("orderId") + private String orderId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOrderByOrderIdResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOrderByOrderIdResp.java new file mode 100644 index 00000000..21bbb5f7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOrderByOrderIdResp.java @@ -0,0 +1,322 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderByOrderIdResp + implements Response> { + /** The unique order id generated by the trading system */ + @JsonProperty("id") + private String id; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("opType") + private String opType; + + /** Specify if the order is a 'limit' order or 'market' order. */ + @JsonProperty("type") + private TypeEnum type; + + /** Buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** Order Price */ + @JsonProperty("price") + private String price; + + /** Order Size */ + @JsonProperty("size") + private String size; + + /** Order Funds */ + @JsonProperty("funds") + private String funds; + + /** Number of filled transactions */ + @JsonProperty("dealSize") + private String dealSize; + + /** Funds of filled transactions */ + @JsonProperty("dealFunds") + private String dealFunds; + + /** [Handling fees](https://www.kucoin.com/docs-new/api-5327739) */ + @JsonProperty("fee") + private String fee; + + /** Currency used to calculate trading fee */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these + * strategies: CN, CO, CB , and DC + */ + @JsonProperty("stp") + private StpEnum stp; + + /** */ + @JsonProperty("stop") + private String stop; + + /** */ + @JsonProperty("stopTriggered") + private Boolean stopTriggered; + + /** */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** Time in force */ + @JsonProperty("timeInForce") + private TimeInForceEnum timeInForce; + + /** Whether it’s a postOnly order. */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** Whether it’s a hidden order. */ + @JsonProperty("hidden") + private Boolean hidden; + + /** Whether it’s a iceberg order. */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** Visible size of iceberg order in order book. */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** A GTT timeInForce that expires in n seconds */ + @JsonProperty("cancelAfter") + private Integer cancelAfter; + + /** */ + @JsonProperty("channel") + private String channel; + + /** Client Order Id, unique identifier created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** Order placement remarks */ + @JsonProperty("remark") + private String remark; + + /** Order tag */ + @JsonProperty("tags") + private String tags; + + /** Whether there is a cancellation record for the order. */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** */ + @JsonProperty("createdAt") + private Long createdAt; + + /** */ + @JsonProperty("lastUpdatedAt") + private Long lastUpdatedAt; + + /** Trade type, redundancy param */ + @JsonProperty("tradeType") + private String tradeType; + + /** + * Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook + */ + @JsonProperty("inOrderBook") + private Boolean inOrderBook; + + /** Number of canceled transactions */ + @JsonProperty("cancelledSize") + private String cancelledSize; + + /** Funds of canceled transactions */ + @JsonProperty("cancelledFunds") + private String cancelledFunds; + + /** Number of remain transactions */ + @JsonProperty("remainSize") + private String remainSize; + + /** Funds of remain transactions */ + @JsonProperty("remainFunds") + private String remainFunds; + + /** Users in some regions have this field */ + @JsonProperty("tax") + private String tax; + + /** Order status: true-The status of the order is active; false-The status of the order is done */ + @JsonProperty("active") + private Boolean active; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetSymbolsWithOpenOrderReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetSymbolsWithOpenOrderReq.java new file mode 100644 index 00000000..283c413c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetSymbolsWithOpenOrderReq.java @@ -0,0 +1,57 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSymbolsWithOpenOrderReq implements Request { + /** Cross Margin: MARGIN_TRADE, Isolated Margin: MARGIN_ISOLATED_TRADE */ + @JsonProperty("tradeType") + private TradeTypeEnum tradeType; + + public enum TradeTypeEnum { + /** */ + MARGIN_TRADE("MARGIN_TRADE"), + /** */ + MARGIN_ISOLATED_TRADE("MARGIN_ISOLATED_TRADE"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetSymbolsWithOpenOrderResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetSymbolsWithOpenOrderResp.java new file mode 100644 index 00000000..d942ba22 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetSymbolsWithOpenOrderResp.java @@ -0,0 +1,37 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSymbolsWithOpenOrderResp + implements Response> { + /** Symbol Size */ + @JsonProperty("symbolSize") + private Integer symbolSize; + + /** The symbol that has active orders */ + @JsonProperty("symbols") + private List symbols = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetTradeHistoryItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetTradeHistoryItems.java new file mode 100644 index 00000000..8f5daba7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetTradeHistoryItems.java @@ -0,0 +1,199 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryItems { + /** ID of transaction detail */ + @JsonProperty("id") + private Long id; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Trade ID, symbol latitude increment */ + @JsonProperty("tradeId") + private Long tradeId; + + /** The unique order id generated by the trading system */ + @JsonProperty("orderId") + private String orderId; + + /** Counterparty order ID */ + @JsonProperty("counterOrderId") + private String counterOrderId; + + /** Buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** Liquidity type: taker or maker */ + @JsonProperty("liquidity") + private LiquidityEnum liquidity; + + /** */ + @JsonProperty("forceTaker") + private Boolean forceTaker; + + /** Order Price */ + @JsonProperty("price") + private String price; + + /** Order Size */ + @JsonProperty("size") + private String size; + + /** Order Funds */ + @JsonProperty("funds") + private String funds; + + /** [Handling fees](https://www.kucoin.com/docs-new/api-5327739) */ + @JsonProperty("fee") + private String fee; + + /** Fee rate */ + @JsonProperty("feeRate") + private String feeRate; + + /** Currency used to calculate trading fee */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** + * Take Profit and Stop Loss type, currently HFT does not support the Take Profit and Stop Loss + * type, so it is empty + */ + @JsonProperty("stop") + private String stop; + + /** Trade type, redundancy param */ + @JsonProperty("tradeType") + private String tradeType; + + /** Users in some regions have this field */ + @JsonProperty("tax") + private String tax; + + /** Tax Rate: Users in some regions must query this field */ + @JsonProperty("taxRate") + private String taxRate; + + /** Specify if the order is a 'limit' order or 'market' order. */ + @JsonProperty("type") + private TypeEnum type; + + /** */ + @JsonProperty("createdAt") + private Long createdAt; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum LiquidityEnum { + /** */ + TAKER("taker"), + /** */ + MAKER("maker"); + + private final String value; + + LiquidityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LiquidityEnum fromValue(String value) { + for (LiquidityEnum b : LiquidityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetTradeHistoryReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetTradeHistoryReq.java new file mode 100644 index 00000000..a11c954e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetTradeHistoryReq.java @@ -0,0 +1,166 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * Trade type: MARGIN_TRADE - cross margin trade, MARGIN_ISOLATED_TRADE - isolated margin trade + */ + @JsonProperty("tradeType") + private TradeTypeEnum tradeType; + + /** + * The unique order id generated by the trading system (If orderId is specified, please ignore the + * other query parameters) + */ + @JsonProperty("orderId") + private String orderId; + + /** Specify if the order is to 'buy' or 'sell'. */ + @JsonProperty("side") + private SideEnum side; + + /** Specify if the order is a 'limit' order or 'market' order. */ + @JsonProperty("type") + private TypeEnum type; + + /** + * 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. + */ + @JsonProperty("lastId") + private Long lastId; + + /** Default20, Max100 */ + @JsonProperty("limit") + @Builder.Default + private Integer limit = 20; + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + public enum TradeTypeEnum { + /** */ + MARGIN_TRADE("MARGIN_TRADE"), + /** */ + MARGIN_ISOLATED_TRADE("MARGIN_ISOLATED_TRADE"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetTradeHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetTradeHistoryResp.java new file mode 100644 index 00000000..48655f85 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetTradeHistoryResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryResp + implements Response> { + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** + * 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. + */ + @JsonProperty("lastId") + private Long lastId; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.java new file mode 100644 index 00000000..862252f2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.java @@ -0,0 +1,163 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +public interface OrderApi { + /** + * Add Order 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + AddOrderResp addOrder(AddOrderReq req); + + /** + * Add Order Test 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. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + AddOrderTestResp addOrderTest(AddOrderTestReq req); + + /** + * Cancel Order By OrderId 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + CancelOrderByOrderIdResp cancelOrderByOrderId(CancelOrderByOrderIdReq req); + + /** + * Cancel Order By ClientOid 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + CancelOrderByClientOidResp cancelOrderByClientOid(CancelOrderByClientOidReq req); + + /** + * Cancel All Orders By Symbol 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + CancelAllOrdersBySymbolResp cancelAllOrdersBySymbol(CancelAllOrdersBySymbolReq req); + + /** + * Get Symbols With Open Order This interface can query all Margin symbols that have active + * orders. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 4 | + * +-----------------------+---------+ + */ + GetSymbolsWithOpenOrderResp getSymbolsWithOpenOrder(GetSymbolsWithOpenOrderReq req); + + /** + * Get Open Orders 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 4 | +-----------------------+---------+ + */ + GetOpenOrdersResp getOpenOrders(GetOpenOrdersReq req); + + /** + * Get Closed Orders 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+---------+ + */ + GetClosedOrdersResp getClosedOrders(GetClosedOrdersReq req); + + /** + * Get Trade History 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. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ + */ + GetTradeHistoryResp getTradeHistory(GetTradeHistoryReq req); + + /** + * Get Order By OrderId 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + GetOrderByOrderIdResp getOrderByOrderId(GetOrderByOrderIdReq req); + + /** + * Get Order By ClientOid 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + */ + GetOrderByClientOidResp getOrderByClientOid(GetOrderByClientOidReq req); + + /** + * Add Order - V1 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. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ + */ + AddOrderV1Resp addOrderV1(AddOrderV1Req req); + + /** + * Add Order Test - V1 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. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ + */ + AddOrderTestV1Resp addOrderTestV1(AddOrderTestV1Req req); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.template new file mode 100644 index 00000000..74189c2a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.template @@ -0,0 +1,372 @@ + + /** + * addOrder + * Add Order + * /api/v3/hf/margin/order + */ + public void testAddOrder() { + AddOrderReq.AddOrderReqBuilder builder = AddOrderReq.builder(); + builder.clientOid(?).side(?).symbol(?).type(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).cancelAfter(?).funds(?).isIsolated(?).autoBorrow(?).autoRepay(?); + AddOrderReq req = builder.build(); + AddOrderResp resp = this.api.addOrder(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->loanApplyId); + self::assertNotNull($resp->borrowSize); + self::assertNotNull($resp->clientOid); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addOrderTest + * Add Order Test + * /api/v3/hf/margin/order/test + */ + public void testAddOrderTest() { + AddOrderTestReq.AddOrderTestReqBuilder builder = AddOrderTestReq.builder(); + builder.clientOid(?).side(?).symbol(?).type(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).cancelAfter(?).funds(?).isIsolated(?).autoBorrow(?).autoRepay(?); + AddOrderTestReq req = builder.build(); + AddOrderTestResp resp = this.api.addOrderTest(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->loanApplyId); + self::assertNotNull($resp->borrowSize); + self::assertNotNull($resp->clientOid); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelOrderByOrderId + * Cancel Order By OrderId + * /api/v3/hf/margin/orders/{orderId} + */ + public void testCancelOrderByOrderId() { + CancelOrderByOrderIdReq.CancelOrderByOrderIdReqBuilder builder = CancelOrderByOrderIdReq.builder(); + builder.symbol(?).orderId(?); + CancelOrderByOrderIdReq req = builder.build(); + CancelOrderByOrderIdResp resp = this.api.cancelOrderByOrderId(req); + self::assertNotNull($resp->orderId); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelOrderByClientOid + * Cancel Order By ClientOid + * /api/v3/hf/margin/orders/client-order/{clientOid} + */ + public void testCancelOrderByClientOid() { + CancelOrderByClientOidReq.CancelOrderByClientOidReqBuilder builder = CancelOrderByClientOidReq.builder(); + builder.symbol(?).clientOid(?); + CancelOrderByClientOidReq req = builder.build(); + CancelOrderByClientOidResp resp = this.api.cancelOrderByClientOid(req); + self::assertNotNull($resp->clientOid); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelAllOrdersBySymbol + * Cancel All Orders By Symbol + * /api/v3/hf/margin/orders + */ + public void testCancelAllOrdersBySymbol() { + CancelAllOrdersBySymbolReq.CancelAllOrdersBySymbolReqBuilder builder = CancelAllOrdersBySymbolReq.builder(); + builder.symbol(?).tradeType(?); + CancelAllOrdersBySymbolReq req = builder.build(); + CancelAllOrdersBySymbolResp resp = this.api.cancelAllOrdersBySymbol(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSymbolsWithOpenOrder + * Get Symbols With Open Order + * /api/v3/hf/margin/order/active/symbols + */ + public void testGetSymbolsWithOpenOrder() { + GetSymbolsWithOpenOrderReq.GetSymbolsWithOpenOrderReqBuilder builder = GetSymbolsWithOpenOrderReq.builder(); + builder.tradeType(?); + GetSymbolsWithOpenOrderReq req = builder.build(); + GetSymbolsWithOpenOrderResp resp = this.api.getSymbolsWithOpenOrder(req); + self::assertNotNull($resp->symbolSize); + foreach($resp->symbols as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOpenOrders + * Get Open Orders + * /api/v3/hf/margin/orders/active + */ + public void testGetOpenOrders() { + GetOpenOrdersReq.GetOpenOrdersReqBuilder builder = GetOpenOrdersReq.builder(); + builder.symbol(?).tradeType(?); + GetOpenOrdersReq req = builder.build(); + GetOpenOrdersResp resp = this.api.getOpenOrders(req); + foreach($resp->data as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->symbol); + self::assertNotNull($item->opType); + self::assertNotNull($item->type); + self::assertNotNull($item->side); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->funds); + self::assertNotNull($item->dealSize); + self::assertNotNull($item->dealFunds); + self::assertNotNull($item->fee); + self::assertNotNull($item->feeCurrency); + self::assertNotNull($item->stp); + self::assertNotNull($item->stop); + self::assertNotNull($item->stopTriggered); + self::assertNotNull($item->stopPrice); + self::assertNotNull($item->timeInForce); + self::assertNotNull($item->postOnly); + self::assertNotNull($item->hidden); + self::assertNotNull($item->iceberg); + self::assertNotNull($item->visibleSize); + self::assertNotNull($item->cancelAfter); + self::assertNotNull($item->channel); + self::assertNotNull($item->clientOid); + self::assertNotNull($item->remark); + self::assertNotNull($item->tags); + self::assertNotNull($item->cancelExist); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->lastUpdatedAt); + self::assertNotNull($item->tradeType); + self::assertNotNull($item->inOrderBook); + self::assertNotNull($item->cancelledSize); + self::assertNotNull($item->cancelledFunds); + self::assertNotNull($item->remainSize); + self::assertNotNull($item->remainFunds); + self::assertNotNull($item->tax); + self::assertNotNull($item->active); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getClosedOrders + * Get Closed Orders + * /api/v3/hf/margin/orders/done + */ + public void testGetClosedOrders() { + GetClosedOrdersReq.GetClosedOrdersReqBuilder builder = GetClosedOrdersReq.builder(); + builder.symbol(?).tradeType(?).side(?).type(?).lastId(?).limit(?).startAt(?).endAt(?); + GetClosedOrdersReq req = builder.build(); + GetClosedOrdersResp resp = this.api.getClosedOrders(req); + self::assertNotNull($resp->lastId); + foreach($resp->items as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->symbol); + self::assertNotNull($item->opType); + self::assertNotNull($item->type); + self::assertNotNull($item->side); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->funds); + self::assertNotNull($item->dealSize); + self::assertNotNull($item->dealFunds); + self::assertNotNull($item->fee); + self::assertNotNull($item->feeCurrency); + self::assertNotNull($item->stp); + self::assertNotNull($item->stop); + self::assertNotNull($item->stopTriggered); + self::assertNotNull($item->stopPrice); + self::assertNotNull($item->timeInForce); + self::assertNotNull($item->postOnly); + self::assertNotNull($item->hidden); + self::assertNotNull($item->iceberg); + self::assertNotNull($item->visibleSize); + self::assertNotNull($item->cancelAfter); + self::assertNotNull($item->channel); + self::assertNotNull($item->clientOid); + self::assertNotNull($item->remark); + self::assertNotNull($item->tags); + self::assertNotNull($item->cancelExist); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->lastUpdatedAt); + self::assertNotNull($item->tradeType); + self::assertNotNull($item->inOrderBook); + self::assertNotNull($item->cancelledSize); + self::assertNotNull($item->cancelledFunds); + self::assertNotNull($item->remainSize); + self::assertNotNull($item->remainFunds); + self::assertNotNull($item->tax); + self::assertNotNull($item->active); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getTradeHistory + * Get Trade History + * /api/v3/hf/margin/fills + */ + public void testGetTradeHistory() { + GetTradeHistoryReq.GetTradeHistoryReqBuilder builder = GetTradeHistoryReq.builder(); + builder.symbol(?).tradeType(?).orderId(?).side(?).type(?).lastId(?).limit(?).startAt(?).endAt(?); + GetTradeHistoryReq req = builder.build(); + GetTradeHistoryResp resp = this.api.getTradeHistory(req); + foreach($resp->items as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->symbol); + self::assertNotNull($item->tradeId); + self::assertNotNull($item->orderId); + self::assertNotNull($item->counterOrderId); + self::assertNotNull($item->side); + self::assertNotNull($item->liquidity); + self::assertNotNull($item->forceTaker); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->funds); + self::assertNotNull($item->fee); + self::assertNotNull($item->feeRate); + self::assertNotNull($item->feeCurrency); + self::assertNotNull($item->stop); + self::assertNotNull($item->tradeType); + self::assertNotNull($item->tax); + self::assertNotNull($item->taxRate); + self::assertNotNull($item->type); + self::assertNotNull($item->createdAt); + } + + self::assertNotNull($resp->lastId); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOrderByOrderId + * Get Order By OrderId + * /api/v3/hf/margin/orders/{orderId} + */ + public void testGetOrderByOrderId() { + GetOrderByOrderIdReq.GetOrderByOrderIdReqBuilder builder = GetOrderByOrderIdReq.builder(); + builder.symbol(?).orderId(?); + GetOrderByOrderIdReq req = builder.build(); + GetOrderByOrderIdResp resp = this.api.getOrderByOrderId(req); + self::assertNotNull($resp->id); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->opType); + self::assertNotNull($resp->type); + self::assertNotNull($resp->side); + self::assertNotNull($resp->price); + self::assertNotNull($resp->size); + self::assertNotNull($resp->funds); + self::assertNotNull($resp->dealSize); + self::assertNotNull($resp->dealFunds); + self::assertNotNull($resp->fee); + self::assertNotNull($resp->feeCurrency); + self::assertNotNull($resp->stp); + self::assertNotNull($resp->stop); + self::assertNotNull($resp->stopTriggered); + self::assertNotNull($resp->stopPrice); + self::assertNotNull($resp->timeInForce); + self::assertNotNull($resp->postOnly); + self::assertNotNull($resp->hidden); + self::assertNotNull($resp->iceberg); + self::assertNotNull($resp->visibleSize); + self::assertNotNull($resp->cancelAfter); + self::assertNotNull($resp->channel); + self::assertNotNull($resp->clientOid); + self::assertNotNull($resp->remark); + self::assertNotNull($resp->tags); + self::assertNotNull($resp->cancelExist); + self::assertNotNull($resp->createdAt); + self::assertNotNull($resp->lastUpdatedAt); + self::assertNotNull($resp->tradeType); + self::assertNotNull($resp->inOrderBook); + self::assertNotNull($resp->cancelledSize); + self::assertNotNull($resp->cancelledFunds); + self::assertNotNull($resp->remainSize); + self::assertNotNull($resp->remainFunds); + self::assertNotNull($resp->tax); + self::assertNotNull($resp->active); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOrderByClientOid + * Get Order By ClientOid + * /api/v3/hf/margin/orders/client-order/{clientOid} + */ + public void testGetOrderByClientOid() { + GetOrderByClientOidReq.GetOrderByClientOidReqBuilder builder = GetOrderByClientOidReq.builder(); + builder.symbol(?).clientOid(?); + GetOrderByClientOidReq req = builder.build(); + GetOrderByClientOidResp resp = this.api.getOrderByClientOid(req); + self::assertNotNull($resp->id); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->opType); + self::assertNotNull($resp->type); + self::assertNotNull($resp->side); + self::assertNotNull($resp->price); + self::assertNotNull($resp->size); + self::assertNotNull($resp->funds); + self::assertNotNull($resp->dealSize); + self::assertNotNull($resp->dealFunds); + self::assertNotNull($resp->fee); + self::assertNotNull($resp->feeCurrency); + self::assertNotNull($resp->stp); + self::assertNotNull($resp->stop); + self::assertNotNull($resp->stopTriggered); + self::assertNotNull($resp->stopPrice); + self::assertNotNull($resp->timeInForce); + self::assertNotNull($resp->postOnly); + self::assertNotNull($resp->hidden); + self::assertNotNull($resp->iceberg); + self::assertNotNull($resp->visibleSize); + self::assertNotNull($resp->cancelAfter); + self::assertNotNull($resp->channel); + self::assertNotNull($resp->clientOid); + self::assertNotNull($resp->remark); + self::assertNotNull($resp->tags); + self::assertNotNull($resp->cancelExist); + self::assertNotNull($resp->createdAt); + self::assertNotNull($resp->lastUpdatedAt); + self::assertNotNull($resp->tradeType); + self::assertNotNull($resp->inOrderBook); + self::assertNotNull($resp->cancelledSize); + self::assertNotNull($resp->cancelledFunds); + self::assertNotNull($resp->remainSize); + self::assertNotNull($resp->remainFunds); + self::assertNotNull($resp->tax); + self::assertNotNull($resp->active); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addOrderV1 + * Add Order - V1 + * /api/v1/margin/order + */ + public void testAddOrderV1() { + AddOrderV1Req.AddOrderV1ReqBuilder builder = AddOrderV1Req.builder(); + builder.clientOid(?).side(?).symbol(?).type(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).cancelAfter(?).funds(?).autoBorrow(?).autoRepay(?).marginModel(?); + AddOrderV1Req req = builder.build(); + AddOrderV1Resp resp = this.api.addOrderV1(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->loanApplyId); + self::assertNotNull($resp->borrowSize); + self::assertNotNull($resp->clientOid); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addOrderTestV1 + * Add Order Test - V1 + * /api/v1/margin/order/test + */ + public void testAddOrderTestV1() { + AddOrderTestV1Req.AddOrderTestV1ReqBuilder builder = AddOrderTestV1Req.builder(); + builder.clientOid(?).side(?).symbol(?).type(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).cancelAfter(?).funds(?).autoBorrow(?).autoRepay(?).marginModel(?); + AddOrderTestV1Req req = builder.build(); + AddOrderTestV1Resp resp = this.api.addOrderTestV1(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->loanApplyId); + self::assertNotNull($resp->borrowSize); + self::assertNotNull($resp->clientOid); + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApiAutoGeneratedTest.java new file mode 100644 index 00000000..d60212b4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApiAutoGeneratedTest.java @@ -0,0 +1,555 @@ +package com.kucoin.universal.sdk.generate.margin.order; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class OrderApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** addOrder Request Add Order /api/v3/hf/margin/order */ + public static void testAddOrderRequest() throws Exception { + String data = + "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493fb\", \"remark\":" + + " \"order remarks\"}"; + AddOrderReq obj = mapper.readValue(data, AddOrderReq.class); + } + + /** addOrder Response Add Order /api/v3/hf/margin/order */ + public static void testAddOrderResponse() throws Exception { + String data = + "{\n" + + " \"success\": true,\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"671663e02188630007e21c9c\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e1493fb\",\n" + + " \"borrowSize\": \"10.2\",\n" + + " \"loanApplyId\": \"600656d9a33ac90009de4f6f\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addOrderTest Request Add Order Test /api/v3/hf/margin/order/test */ + public static void testAddOrderTestRequest() throws Exception { + String data = + "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493fb\", \"remark\":" + + " \"order remarks\"}"; + AddOrderTestReq obj = mapper.readValue(data, AddOrderTestReq.class); + } + + /** addOrderTest Response Add Order Test /api/v3/hf/margin/order/test */ + public static void testAddOrderTestResponse() throws Exception { + String data = + "{\n" + + " \"success\": true,\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"5bd6e9286d99522a52e458de\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"borrowSize\": 10.2,\n" + + " \"loanApplyId\": \"600656d9a33ac90009de4f6f\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** cancelOrderByOrderId Request Cancel Order By OrderId /api/v3/hf/margin/orders/{orderId} */ + public static void testCancelOrderByOrderIdRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\", \"orderId\": \"671663e02188630007e21c9c\"}"; + CancelOrderByOrderIdReq obj = mapper.readValue(data, CancelOrderByOrderIdReq.class); + } + + /** cancelOrderByOrderId Response Cancel Order By OrderId /api/v3/hf/margin/orders/{orderId} */ + public static void testCancelOrderByOrderIdResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":{\"orderId\":\"671663e02188630007e21c9c\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * cancelOrderByClientOid Request Cancel Order By ClientOid + * /api/v3/hf/margin/orders/client-order/{clientOid} + */ + public static void testCancelOrderByClientOidRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e1493fb\"}"; + CancelOrderByClientOidReq obj = mapper.readValue(data, CancelOrderByClientOidReq.class); + } + + /** + * cancelOrderByClientOid Response Cancel Order By ClientOid + * /api/v3/hf/margin/orders/client-order/{clientOid} + */ + public static void testCancelOrderByClientOidResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":{\"clientOid\":\"5c52e11203aa677f33e1493fb\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** cancelAllOrdersBySymbol Request Cancel All Orders By Symbol /api/v3/hf/margin/orders */ + public static void testCancelAllOrdersBySymbolRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\", \"tradeType\": \"MARGIN_TRADE\"}"; + CancelAllOrdersBySymbolReq obj = mapper.readValue(data, CancelAllOrdersBySymbolReq.class); + } + + /** cancelAllOrdersBySymbol Response Cancel All Orders By Symbol /api/v3/hf/margin/orders */ + public static void testCancelAllOrdersBySymbolResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":\"success\"}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * getSymbolsWithOpenOrder Request Get Symbols With Open Order + * /api/v3/hf/margin/order/active/symbols + */ + public static void testGetSymbolsWithOpenOrderRequest() throws Exception { + String data = "{\"tradeType\": \"MARGIN_TRADE\"}"; + GetSymbolsWithOpenOrderReq obj = mapper.readValue(data, GetSymbolsWithOpenOrderReq.class); + } + + /** + * getSymbolsWithOpenOrder Response Get Symbols With Open Order + * /api/v3/hf/margin/order/active/symbols + */ + public static void testGetSymbolsWithOpenOrderResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbolSize\": 1,\n" + + " \"symbols\": [\n" + + " \"BTC-USDT\"\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getOpenOrders Request Get Open Orders /api/v3/hf/margin/orders/active */ + public static void testGetOpenOrdersRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\", \"tradeType\": \"MARGIN_TRADE\"}"; + GetOpenOrdersReq obj = mapper.readValue(data, GetOpenOrdersReq.class); + } + + /** getOpenOrders Response Get Open Orders /api/v3/hf/margin/orders/active */ + public static void testGetOpenOrdersResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"671667306afcdb000723107f\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\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" + + " \"remainSize\": \"0.00001\",\n" + + " \"remainFunds\": \"0.5\",\n" + + " \"cancelledSize\": \"0\",\n" + + " \"cancelledFunds\": \"0\",\n" + + " \"fee\": \"0\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"stp\": null,\n" + + " \"stop\": null,\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" + + " \"remark\": null,\n" + + " \"tags\": null,\n" + + " \"cancelExist\": false,\n" + + " \"tradeType\": \"MARGIN_TRADE\",\n" + + " \"inOrderBook\": true,\n" + + " \"active\": true,\n" + + " \"tax\": \"0\",\n" + + " \"createdAt\": 1729521456248,\n" + + " \"lastUpdatedAt\": 1729521460940\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getClosedOrders Request Get Closed Orders /api/v3/hf/margin/orders/done */ + public static void testGetClosedOrdersRequest() throws Exception { + String data = + "{\"symbol\": \"BTC-USDT\", \"tradeType\": \"MARGIN_TRADE\", \"side\": \"buy\", \"type\":" + + " \"limit\", \"lastId\": 254062248624417, \"limit\": 20, \"startAt\": 1728663338000," + + " \"endAt\": 1728692138000}"; + GetClosedOrdersReq obj = mapper.readValue(data, GetClosedOrdersReq.class); + } + + /** getClosedOrders Response Get Closed Orders /api/v3/hf/margin/orders/done */ + public static void testGetClosedOrdersResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"lastId\": 136112949351,\n" + + " \"items\": [\n" + + " {\n" + + " \"id\": \"6716491f6afcdb00078365c8\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\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" + + " \"remainSize\": \"0\",\n" + + " \"remainFunds\": \"0\",\n" + + " \"cancelledSize\": \"0.00001\",\n" + + " \"cancelledFunds\": \"0.5\",\n" + + " \"fee\": \"0\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"stp\": null,\n" + + " \"stop\": null,\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" + + " \"remark\": null,\n" + + " \"tags\": null,\n" + + " \"cancelExist\": true,\n" + + " \"tradeType\": \"MARGIN_TRADE\",\n" + + " \"inOrderBook\": false,\n" + + " \"active\": false,\n" + + " \"tax\": \"0\",\n" + + " \"createdAt\": 1729513759162,\n" + + " \"lastUpdatedAt\": 1729521126597\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getTradeHistory Request Get Trade History /api/v3/hf/margin/fills */ + public static void testGetTradeHistoryRequest() throws Exception { + String data = + "{\"symbol\": \"BTC-USDT\", \"tradeType\": \"MARGIN_TRADE\", \"orderId\":" + + " \"example_string_default_value\", \"side\": \"buy\", \"type\": \"limit\"," + + " \"lastId\": 254062248624417, \"limit\": 100, \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000}"; + GetTradeHistoryReq obj = mapper.readValue(data, GetTradeHistoryReq.class); + } + + /** getTradeHistory Response Get Trade History /api/v3/hf/margin/fills */ + public static void testGetTradeHistoryResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"items\": [\n" + + " {\n" + + " \"id\": 137891621991,\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"tradeId\": 11040911994273793,\n" + + " \"orderId\": \"671868085584bc0007d85f46\",\n" + + " \"counterOrderId\": \"67186805b7cbdf00071621f9\",\n" + + " \"side\": \"buy\",\n" + + " \"liquidity\": \"taker\",\n" + + " \"forceTaker\": false,\n" + + " \"price\": \"67141.6\",\n" + + " \"size\": \"0.00001\",\n" + + " \"funds\": \"0.671416\",\n" + + " \"fee\": \"0.000671416\",\n" + + " \"feeRate\": \"0.001\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"stop\": \"\",\n" + + " \"tradeType\": \"MARGIN_TRADE\",\n" + + " \"tax\": \"0\",\n" + + " \"taxRate\": \"0\",\n" + + " \"type\": \"limit\",\n" + + " \"createdAt\": 1729652744998\n" + + " }\n" + + " ],\n" + + " \"lastId\": 137891621991\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getOrderByOrderId Request Get Order By OrderId /api/v3/hf/margin/orders/{orderId} */ + public static void testGetOrderByOrderIdRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\", \"orderId\": \"671667306afcdb000723107f\"}"; + GetOrderByOrderIdReq obj = mapper.readValue(data, GetOrderByOrderIdReq.class); + } + + /** getOrderByOrderId Response Get Order By OrderId /api/v3/hf/margin/orders/{orderId} */ + public static void testGetOrderByOrderIdResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"671667306afcdb000723107f\",\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" + + " \"stop\": null,\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\": \"5c52e11203aa677f33e493fb\",\n" + + " \"remark\": null,\n" + + " \"tags\": null,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1729521456248,\n" + + " \"lastUpdatedAt\": 1729651011877,\n" + + " \"tradeType\": \"MARGIN_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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * getOrderByClientOid Request Get Order By ClientOid + * /api/v3/hf/margin/orders/client-order/{clientOid} + */ + public static void testGetOrderByClientOidRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e493fb\"}"; + GetOrderByClientOidReq obj = mapper.readValue(data, GetOrderByClientOidReq.class); + } + + /** + * getOrderByClientOid Response Get Order By ClientOid + * /api/v3/hf/margin/orders/client-order/{clientOid} + */ + public static void testGetOrderByClientOidResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"671667306afcdb000723107f\",\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" + + " \"stop\": null,\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\": \"5c52e11203aa677f33e493fb\",\n" + + " \"remark\": null,\n" + + " \"tags\": null,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1729521456248,\n" + + " \"lastUpdatedAt\": 1729651011877,\n" + + " \"tradeType\": \"MARGIN_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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addOrderV1 Request Add Order - V1 /api/v1/margin/order */ + public static void testAddOrderV1Request() throws Exception { + String data = + "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e4193fb\", \"remark\":" + + " \"order remarks\"}"; + AddOrderV1Req obj = mapper.readValue(data, AddOrderV1Req.class); + } + + /** addOrderV1 Response Add Order - V1 /api/v1/margin/order */ + public static void testAddOrderV1Response() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"671bb90194422f00073ff4f0\",\n" + + " \"loanApplyId\": null,\n" + + " \"borrowSize\": null,\n" + + " \"clientOid\": null\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addOrderTestV1 Request Add Order Test - V1 /api/v1/margin/order/test */ + public static void testAddOrderTestV1Request() throws Exception { + String data = + "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e4193fb\", \"remark\":" + + " \"order remarks\"}"; + AddOrderTestV1Req obj = mapper.readValue(data, AddOrderTestV1Req.class); + } + + /** addOrderTestV1 Response Add Order Test - V1 /api/v1/margin/order/test */ + public static void testAddOrderTestV1Response() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"671bb90194422f00073ff4f0\",\n" + + " \"loanApplyId\": null,\n" + + " \"borrowSize\": null,\n" + + " \"clientOid\": null\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(OrderApiAutoGeneratedTest::testAddOrderRequest, "testAddOrderRequest"); + run(OrderApiAutoGeneratedTest::testAddOrderResponse, "testAddOrderResponse"); + run(OrderApiAutoGeneratedTest::testAddOrderTestRequest, "testAddOrderTestRequest"); + run(OrderApiAutoGeneratedTest::testAddOrderTestResponse, "testAddOrderTestResponse"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByOrderIdRequest, + "testCancelOrderByOrderIdRequest"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByOrderIdResponse, + "testCancelOrderByOrderIdResponse"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByClientOidRequest, + "testCancelOrderByClientOidRequest"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByClientOidResponse, + "testCancelOrderByClientOidResponse"); + run( + OrderApiAutoGeneratedTest::testCancelAllOrdersBySymbolRequest, + "testCancelAllOrdersBySymbolRequest"); + run( + OrderApiAutoGeneratedTest::testCancelAllOrdersBySymbolResponse, + "testCancelAllOrdersBySymbolResponse"); + run( + OrderApiAutoGeneratedTest::testGetSymbolsWithOpenOrderRequest, + "testGetSymbolsWithOpenOrderRequest"); + run( + OrderApiAutoGeneratedTest::testGetSymbolsWithOpenOrderResponse, + "testGetSymbolsWithOpenOrderResponse"); + run(OrderApiAutoGeneratedTest::testGetOpenOrdersRequest, "testGetOpenOrdersRequest"); + run(OrderApiAutoGeneratedTest::testGetOpenOrdersResponse, "testGetOpenOrdersResponse"); + run(OrderApiAutoGeneratedTest::testGetClosedOrdersRequest, "testGetClosedOrdersRequest"); + run(OrderApiAutoGeneratedTest::testGetClosedOrdersResponse, "testGetClosedOrdersResponse"); + run(OrderApiAutoGeneratedTest::testGetTradeHistoryRequest, "testGetTradeHistoryRequest"); + run(OrderApiAutoGeneratedTest::testGetTradeHistoryResponse, "testGetTradeHistoryResponse"); + run(OrderApiAutoGeneratedTest::testGetOrderByOrderIdRequest, "testGetOrderByOrderIdRequest"); + run(OrderApiAutoGeneratedTest::testGetOrderByOrderIdResponse, "testGetOrderByOrderIdResponse"); + run( + OrderApiAutoGeneratedTest::testGetOrderByClientOidRequest, + "testGetOrderByClientOidRequest"); + run( + OrderApiAutoGeneratedTest::testGetOrderByClientOidResponse, + "testGetOrderByClientOidResponse"); + run(OrderApiAutoGeneratedTest::testAddOrderV1Request, "testAddOrderV1Request"); + run(OrderApiAutoGeneratedTest::testAddOrderV1Response, "testAddOrderV1Response"); + run(OrderApiAutoGeneratedTest::testAddOrderTestV1Request, "testAddOrderTestV1Request"); + run(OrderApiAutoGeneratedTest::testAddOrderTestV1Response, "testAddOrderTestV1Response"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApiImpl.java new file mode 100644 index 00000000..b1aa2adc --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApiImpl.java @@ -0,0 +1,126 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.order; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class OrderApiImpl implements OrderApi { + private final Transport transport; + + public OrderApiImpl(Transport transport) { + this.transport = transport; + } + + public AddOrderResp addOrder(AddOrderReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v3/hf/margin/order", req, AddOrderResp.class, false); + } + + public AddOrderTestResp addOrderTest(AddOrderTestReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v3/hf/margin/order/test", req, AddOrderTestResp.class, false); + } + + public CancelOrderByOrderIdResp cancelOrderByOrderId(CancelOrderByOrderIdReq req) { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v3/hf/margin/orders/{orderId}", + req, + CancelOrderByOrderIdResp.class, + false); + } + + public CancelOrderByClientOidResp cancelOrderByClientOid(CancelOrderByClientOidReq req) { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v3/hf/margin/orders/client-order/{clientOid}", + req, + CancelOrderByClientOidResp.class, + false); + } + + public CancelAllOrdersBySymbolResp cancelAllOrdersBySymbol(CancelAllOrdersBySymbolReq req) { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v3/hf/margin/orders", + req, + CancelAllOrdersBySymbolResp.class, + false); + } + + public GetSymbolsWithOpenOrderResp getSymbolsWithOpenOrder(GetSymbolsWithOpenOrderReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v3/hf/margin/order/active/symbols", + req, + GetSymbolsWithOpenOrderResp.class, + false); + } + + public GetOpenOrdersResp getOpenOrders(GetOpenOrdersReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v3/hf/margin/orders/active", + req, + GetOpenOrdersResp.class, + false); + } + + public GetClosedOrdersResp getClosedOrders(GetClosedOrdersReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v3/hf/margin/orders/done", + req, + GetClosedOrdersResp.class, + false); + } + + public GetTradeHistoryResp getTradeHistory(GetTradeHistoryReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v3/hf/margin/fills", req, GetTradeHistoryResp.class, false); + } + + public GetOrderByOrderIdResp getOrderByOrderId(GetOrderByOrderIdReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v3/hf/margin/orders/{orderId}", + req, + GetOrderByOrderIdResp.class, + false); + } + + public GetOrderByClientOidResp getOrderByClientOid(GetOrderByClientOidReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v3/hf/margin/orders/client-order/{clientOid}", + req, + GetOrderByClientOidResp.class, + false); + } + + public AddOrderV1Resp addOrderV1(AddOrderV1Req req) { + return this.transport.call( + "spot", false, "POST", "/api/v1/margin/order", req, AddOrderV1Resp.class, false); + } + + public AddOrderTestV1Resp addOrderTestV1(AddOrderTestV1Req req) { + return this.transport.call( + "spot", false, "POST", "/api/v1/margin/order/test", req, AddOrderTestV1Resp.class, false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/GetMarginRiskLimitData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/GetMarginRiskLimitData.java new file mode 100644 index 00000000..29f74dd2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/GetMarginRiskLimitData.java @@ -0,0 +1,175 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.risklimit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarginRiskLimitData { + /** Time stamp */ + @JsonProperty("timestamp") + private Long timestamp; + + /** CROSS MARGIN RESPONSES, Currency */ + @JsonProperty("currency") + private String currency; + + /** + * CROSS MARGIN RESPONSES, Maximum personal borrow amount. If the platform has no borrowing + * amount, this value will still be displayed. + */ + @JsonProperty("borrowMaxAmount") + private String borrowMaxAmount; + + /** CROSS MARGIN RESPONSES, Maximum buy amount */ + @JsonProperty("buyMaxAmount") + private String buyMaxAmount; + + /** CROSS MARGIN RESPONSES, Maximum holding amount */ + @JsonProperty("holdMaxAmount") + private String holdMaxAmount; + + /** CROSS MARGIN RESPONSES, [Borrow Coefficient](https://www.kucoin.com/land/price-protect) */ + @JsonProperty("borrowCoefficient") + private String borrowCoefficient; + + /** CROSS MARGIN RESPONSES, [Margin Coefficient](https://www.kucoin.com/land/price-protect) */ + @JsonProperty("marginCoefficient") + private String marginCoefficient; + + /** + * 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 + */ + @JsonProperty("precision") + private Integer precision; + + /** CROSS MARGIN RESPONSES, Minimum personal borrow amount */ + @JsonProperty("borrowMinAmount") + private String borrowMinAmount; + + /** + * CROSS MARGIN RESPONSES, Minimum unit for borrowing; the borrowed amount must be an integer + * multiple of this value + */ + @JsonProperty("borrowMinUnit") + private String borrowMinUnit; + + /** CROSS MARGIN RESPONSES, Whether to support borrowing */ + @JsonProperty("borrowEnabled") + private Boolean borrowEnabled; + + /** ISOLATED MARGIN RESPONSES, Symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * ISOLATED MARGIN RESPONSES, Base maximum personal borrow amount. If the platform has no + * borrowing amount, this value will still be displayed. + */ + @JsonProperty("baseMaxBorrowAmount") + private String baseMaxBorrowAmount; + + /** + * ISOLATED MARGIN RESPONSES, Quote maximum personal borrow amount. If the platform has no + * borrowing amount, this value will still be displayed. + */ + @JsonProperty("quoteMaxBorrowAmount") + private String quoteMaxBorrowAmount; + + /** ISOLATED MARGIN RESPONSES, Base maximum buy amount */ + @JsonProperty("baseMaxBuyAmount") + private String baseMaxBuyAmount; + + /** ISOLATED MARGIN RESPONSES, Quote maximum buy amount */ + @JsonProperty("quoteMaxBuyAmount") + private String quoteMaxBuyAmount; + + /** ISOLATED MARGIN RESPONSES, Base maximum holding amount */ + @JsonProperty("baseMaxHoldAmount") + private String baseMaxHoldAmount; + + /** ISOLATED MARGIN RESPONSES, Quote maximum holding amount */ + @JsonProperty("quoteMaxHoldAmount") + private String quoteMaxHoldAmount; + + /** + * 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 + */ + @JsonProperty("basePrecision") + private Integer basePrecision; + + /** + * 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 + */ + @JsonProperty("quotePrecision") + private Integer quotePrecision; + + /** ISOLATED MARGIN RESPONSES, Base minimum personal borrow amount */ + @JsonProperty("baseBorrowMinAmount") + private String baseBorrowMinAmount; + + /** ISOLATED MARGIN RESPONSES, Quote minimum personal borrow amount */ + @JsonProperty("quoteBorrowMinAmount") + private String quoteBorrowMinAmount; + + /** + * ISOLATED MARGIN RESPONSES, Base minimum unit for borrowing, the borrowed amount must be an + * integer multiple of this value + */ + @JsonProperty("baseBorrowMinUnit") + private String baseBorrowMinUnit; + + /** + * ISOLATED MARGIN RESPONSES, Quote minimum unit for borrowing, the borrowed amount must be an + * integer multiple of this value + */ + @JsonProperty("quoteBorrowMinUnit") + private String quoteBorrowMinUnit; + + /** ISOLATED MARGIN RESPONSES, Base whether to support borrowing */ + @JsonProperty("baseBorrowEnabled") + private Boolean baseBorrowEnabled; + + /** ISOLATED MARGIN RESPONSES, Quote whether to support borrowing */ + @JsonProperty("quoteBorrowEnabled") + private Boolean quoteBorrowEnabled; + + /** + * ISOLATED MARGIN RESPONSES, [Base Borrow Coefficient](https://www.kucoin.com/land/price-protect) + */ + @JsonProperty("baseBorrowCoefficient") + private String baseBorrowCoefficient; + + /** + * ISOLATED MARGIN RESPONSES, [Quote Borrow + * Coefficient](https://www.kucoin.com/land/price-protect) + */ + @JsonProperty("quoteBorrowCoefficient") + private String quoteBorrowCoefficient; + + /** + * ISOLATED MARGIN RESPONSES, [Base Margin Coefficient](https://www.kucoin.com/land/price-protect) + */ + @JsonProperty("baseMarginCoefficient") + private String baseMarginCoefficient; + + /** + * ISOLATED MARGIN RESPONSES, [Quote Margin + * Coefficient](https://www.kucoin.com/land/price-protect) + */ + @JsonProperty("quoteMarginCoefficient") + private String quoteMarginCoefficient; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/GetMarginRiskLimitReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/GetMarginRiskLimitReq.java new file mode 100644 index 00000000..8345c7b5 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/GetMarginRiskLimitReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.risklimit; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarginRiskLimitReq implements Request { + /** True-isolated, false-cross */ + @JsonProperty("isIsolated") + private Boolean isIsolated; + + /** Currency: This field is only required for cross margin */ + @JsonProperty("currency") + private String currency; + + /** Symbol: This field is only required for isolated margin */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/GetMarginRiskLimitResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/GetMarginRiskLimitResp.java new file mode 100644 index 00000000..6b5d5c34 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/GetMarginRiskLimitResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.risklimit; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarginRiskLimitResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetMarginRiskLimitResp fromJson(List data) { + // original response + GetMarginRiskLimitResp obj = new GetMarginRiskLimitResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApi.java new file mode 100644 index 00000000..cc879184 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApi.java @@ -0,0 +1,14 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.risklimit; + +public interface RiskLimitApi { + /** + * Get Margin Risk Limit Request Configure and Risk limit info of the margin via this endpoint. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 20 | +-----------------------+---------+ + */ + GetMarginRiskLimitResp getMarginRiskLimit(GetMarginRiskLimitReq req); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApi.template new file mode 100644 index 00000000..cc779daa --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApi.template @@ -0,0 +1,47 @@ + + /** + * getMarginRiskLimit + * Get Margin Risk Limit + * /api/v3/margin/currencies + */ + public void testGetMarginRiskLimit() { + GetMarginRiskLimitReq.GetMarginRiskLimitReqBuilder builder = GetMarginRiskLimitReq.builder(); + builder.isIsolated(?).currency(?).symbol(?); + GetMarginRiskLimitReq req = builder.build(); + GetMarginRiskLimitResp resp = this.api.getMarginRiskLimit(req); + foreach($resp->data as $item) { + self::assertNotNull($item->timestamp); + self::assertNotNull($item->currency); + self::assertNotNull($item->borrowMaxAmount); + self::assertNotNull($item->buyMaxAmount); + self::assertNotNull($item->holdMaxAmount); + self::assertNotNull($item->borrowCoefficient); + self::assertNotNull($item->marginCoefficient); + self::assertNotNull($item->precision); + self::assertNotNull($item->borrowMinAmount); + self::assertNotNull($item->borrowMinUnit); + self::assertNotNull($item->borrowEnabled); + self::assertNotNull($item->symbol); + self::assertNotNull($item->baseMaxBorrowAmount); + self::assertNotNull($item->quoteMaxBorrowAmount); + self::assertNotNull($item->baseMaxBuyAmount); + self::assertNotNull($item->quoteMaxBuyAmount); + self::assertNotNull($item->baseMaxHoldAmount); + self::assertNotNull($item->quoteMaxHoldAmount); + self::assertNotNull($item->basePrecision); + self::assertNotNull($item->quotePrecision); + self::assertNotNull($item->baseBorrowMinAmount); + self::assertNotNull($item->quoteBorrowMinAmount); + self::assertNotNull($item->baseBorrowMinUnit); + self::assertNotNull($item->quoteBorrowMinUnit); + self::assertNotNull($item->baseBorrowEnabled); + self::assertNotNull($item->quoteBorrowEnabled); + self::assertNotNull($item->baseBorrowCoefficient); + self::assertNotNull($item->quoteBorrowCoefficient); + self::assertNotNull($item->baseMarginCoefficient); + self::assertNotNull($item->quoteMarginCoefficient); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApiAutoGeneratedTest.java new file mode 100644 index 00000000..ffb5ef94 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApiAutoGeneratedTest.java @@ -0,0 +1,88 @@ +package com.kucoin.universal.sdk.generate.margin.risklimit; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class RiskLimitApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** getMarginRiskLimit Request Get Margin Risk Limit /api/v3/margin/currencies */ + public static void testGetMarginRiskLimitRequest() throws Exception { + String data = "{\"isIsolated\": true, \"currency\": \"BTC\", \"symbol\": \"BTC-USDT\"}"; + GetMarginRiskLimitReq obj = mapper.readValue(data, GetMarginRiskLimitReq.class); + } + + /** getMarginRiskLimit Response Get Margin Risk Limit /api/v3/margin/currencies */ + public static void testGetMarginRiskLimitResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"timestamp\": 1729678659275,\n" + + " \"currency\": \"BTC\",\n" + + " \"borrowMaxAmount\": \"75.15\",\n" + + " \"buyMaxAmount\": \"217.12\",\n" + + " \"holdMaxAmount\": \"217.12\",\n" + + " \"borrowCoefficient\": \"1\",\n" + + " \"marginCoefficient\": \"1\",\n" + + " \"precision\": 8,\n" + + " \"borrowMinAmount\": \"0.001\",\n" + + " \"borrowMinUnit\": \"0.0001\",\n" + + " \"borrowEnabled\": true\n" + + " }\n" + + " ]\n" + + "}\n"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run( + RiskLimitApiAutoGeneratedTest::testGetMarginRiskLimitRequest, + "testGetMarginRiskLimitRequest"); + run( + RiskLimitApiAutoGeneratedTest::testGetMarginRiskLimitResponse, + "testGetMarginRiskLimitResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApiImpl.java new file mode 100644 index 00000000..3d4c9d5c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApiImpl.java @@ -0,0 +1,24 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.margin.risklimit; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class RiskLimitApiImpl implements RiskLimitApi { + private final Transport transport; + + public RiskLimitApiImpl(Transport transport) { + this.transport = transport; + } + + public GetMarginRiskLimitResp getMarginRiskLimit(GetMarginRiskLimitReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v3/margin/currencies", + req, + GetMarginRiskLimitResp.class, + false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AccountService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AccountService.java new file mode 100644 index 00000000..b6bf8b5d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AccountService.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.account.account.AccountApi; +import com.kucoin.universal.sdk.generate.account.deposit.DepositApi; +import com.kucoin.universal.sdk.generate.account.fee.FeeApi; +import com.kucoin.universal.sdk.generate.account.subaccount.SubAccountApi; +import com.kucoin.universal.sdk.generate.account.transfer.TransferApi; +import com.kucoin.universal.sdk.generate.account.withdrawal.WithdrawalApi; + +public interface AccountService { + + public AccountApi getAccountApi(); + + public DepositApi getDepositApi(); + + public WithdrawalApi getWithdrawalApi(); + + public FeeApi getFeeApi(); + + public SubAccountApi getSubAccountApi(); + + public TransferApi getTransferApi(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AccountServiceImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AccountServiceImpl.java new file mode 100644 index 00000000..8a0a4794 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AccountServiceImpl.java @@ -0,0 +1,61 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.account.account.AccountApi; +import com.kucoin.universal.sdk.generate.account.account.AccountApiImpl; +import com.kucoin.universal.sdk.generate.account.deposit.DepositApi; +import com.kucoin.universal.sdk.generate.account.deposit.DepositApiImpl; +import com.kucoin.universal.sdk.generate.account.fee.FeeApi; +import com.kucoin.universal.sdk.generate.account.fee.FeeApiImpl; +import com.kucoin.universal.sdk.generate.account.subaccount.SubAccountApi; +import com.kucoin.universal.sdk.generate.account.subaccount.SubAccountApiImpl; +import com.kucoin.universal.sdk.generate.account.transfer.TransferApi; +import com.kucoin.universal.sdk.generate.account.transfer.TransferApiImpl; +import com.kucoin.universal.sdk.generate.account.withdrawal.WithdrawalApi; +import com.kucoin.universal.sdk.generate.account.withdrawal.WithdrawalApiImpl; +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class AccountServiceImpl implements AccountService { + private Transport transport; + private AccountApi account; + private DepositApi deposit; + private WithdrawalApi withdrawal; + private FeeApi fee; + private SubAccountApi subAccount; + private TransferApi transfer; + + public AccountServiceImpl(Transport transport) { + this.transport = transport; + this.account = new AccountApiImpl(transport); + this.deposit = new DepositApiImpl(transport); + this.withdrawal = new WithdrawalApiImpl(transport); + this.fee = new FeeApiImpl(transport); + this.subAccount = new SubAccountApiImpl(transport); + this.transfer = new TransferApiImpl(transport); + } + + public AccountApi getAccountApi() { + return this.account; + } + + public DepositApi getDepositApi() { + return this.deposit; + } + + public WithdrawalApi getWithdrawalApi() { + return this.withdrawal; + } + + public FeeApi getFeeApi() { + return this.fee; + } + + public SubAccountApi getSubAccountApi() { + return this.subAccount; + } + + public TransferApi getTransferApi() { + return this.transfer; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AffiliateService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AffiliateService.java new file mode 100644 index 00000000..31feeaea --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AffiliateService.java @@ -0,0 +1,9 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.affiliate.affiliate.AffiliateApi; + +public interface AffiliateService { + public AffiliateApi getAffiliateApi(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AffiliateServiceImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AffiliateServiceImpl.java new file mode 100644 index 00000000..dd0966dc --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AffiliateServiceImpl.java @@ -0,0 +1,21 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.affiliate.affiliate.AffiliateApi; +import com.kucoin.universal.sdk.generate.affiliate.affiliate.AffiliateApiImpl; +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class AffiliateServiceImpl implements AffiliateService { + private Transport transport; + private AffiliateApi affiliate; + + public AffiliateServiceImpl(Transport transport) { + this.transport = transport; + this.affiliate = new AffiliateApiImpl(transport); + } + + public AffiliateApi getAffiliateApi() { + return this.affiliate; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/BrokerService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/BrokerService.java new file mode 100644 index 00000000..3870640b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/BrokerService.java @@ -0,0 +1,13 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.broker.apibroker.APIBrokerApi; +import com.kucoin.universal.sdk.generate.broker.ndbroker.NDBrokerApi; + +public interface BrokerService { + + public APIBrokerApi getAPIBrokerApi(); + + public NDBrokerApi getNDBrokerApi(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/BrokerServiceImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/BrokerServiceImpl.java new file mode 100644 index 00000000..3a512e12 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/BrokerServiceImpl.java @@ -0,0 +1,29 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.broker.apibroker.APIBrokerApi; +import com.kucoin.universal.sdk.generate.broker.apibroker.APIBrokerApiImpl; +import com.kucoin.universal.sdk.generate.broker.ndbroker.NDBrokerApi; +import com.kucoin.universal.sdk.generate.broker.ndbroker.NDBrokerApiImpl; +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class BrokerServiceImpl implements BrokerService { + private Transport transport; + private APIBrokerApi aPIBroker; + private NDBrokerApi nDBroker; + + public BrokerServiceImpl(Transport transport) { + this.transport = transport; + this.aPIBroker = new APIBrokerApiImpl(transport); + this.nDBroker = new NDBrokerApiImpl(transport); + } + + public APIBrokerApi getAPIBrokerApi() { + return this.aPIBroker; + } + + public NDBrokerApi getNDBrokerApi() { + return this.nDBroker; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/CopyTradingService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/CopyTradingService.java new file mode 100644 index 00000000..d2119154 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/CopyTradingService.java @@ -0,0 +1,9 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.copytrading.futures.FuturesApi; + +public interface CopyTradingService { + public FuturesApi getFuturesApi(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/CopyTradingServiceImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/CopyTradingServiceImpl.java new file mode 100644 index 00000000..f52a4d4f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/CopyTradingServiceImpl.java @@ -0,0 +1,21 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.copytrading.futures.FuturesApi; +import com.kucoin.universal.sdk.generate.copytrading.futures.FuturesApiImpl; +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class CopyTradingServiceImpl implements CopyTradingService { + private Transport transport; + private FuturesApi futures; + + public CopyTradingServiceImpl(Transport transport) { + this.transport = transport; + this.futures = new FuturesApiImpl(transport); + } + + public FuturesApi getFuturesApi() { + return this.futures; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/EarnService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/EarnService.java new file mode 100644 index 00000000..4c61a1c6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/EarnService.java @@ -0,0 +1,9 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.earn.earn.EarnApi; + +public interface EarnService { + public EarnApi getEarnApi(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/EarnServiceImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/EarnServiceImpl.java new file mode 100644 index 00000000..25325871 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/EarnServiceImpl.java @@ -0,0 +1,21 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.earn.earn.EarnApi; +import com.kucoin.universal.sdk.generate.earn.earn.EarnApiImpl; +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class EarnServiceImpl implements EarnService { + private Transport transport; + private EarnApi earn; + + public EarnServiceImpl(Transport transport) { + this.transport = transport; + this.earn = new EarnApiImpl(transport); + } + + public EarnApi getEarnApi() { + return this.earn; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/FuturesService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/FuturesService.java new file mode 100644 index 00000000..845f61c3 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/FuturesService.java @@ -0,0 +1,19 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.futures.fundingfees.FundingFeesApi; +import com.kucoin.universal.sdk.generate.futures.market.MarketApi; +import com.kucoin.universal.sdk.generate.futures.order.OrderApi; +import com.kucoin.universal.sdk.generate.futures.positions.PositionsApi; + +public interface FuturesService { + + public OrderApi getOrderApi(); + + public PositionsApi getPositionsApi(); + + public FundingFeesApi getFundingFeesApi(); + + public MarketApi getMarketApi(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/FuturesServiceImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/FuturesServiceImpl.java new file mode 100644 index 00000000..3d9cf045 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/FuturesServiceImpl.java @@ -0,0 +1,45 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.futures.fundingfees.FundingFeesApi; +import com.kucoin.universal.sdk.generate.futures.fundingfees.FundingFeesApiImpl; +import com.kucoin.universal.sdk.generate.futures.market.MarketApi; +import com.kucoin.universal.sdk.generate.futures.market.MarketApiImpl; +import com.kucoin.universal.sdk.generate.futures.order.OrderApi; +import com.kucoin.universal.sdk.generate.futures.order.OrderApiImpl; +import com.kucoin.universal.sdk.generate.futures.positions.PositionsApi; +import com.kucoin.universal.sdk.generate.futures.positions.PositionsApiImpl; +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class FuturesServiceImpl implements FuturesService { + private Transport transport; + private OrderApi order; + private PositionsApi positions; + private FundingFeesApi fundingFees; + private MarketApi market; + + public FuturesServiceImpl(Transport transport) { + this.transport = transport; + this.order = new OrderApiImpl(transport); + this.positions = new PositionsApiImpl(transport); + this.fundingFees = new FundingFeesApiImpl(transport); + this.market = new MarketApiImpl(transport); + } + + public OrderApi getOrderApi() { + return this.order; + } + + public PositionsApi getPositionsApi() { + return this.positions; + } + + public FundingFeesApi getFundingFeesApi() { + return this.fundingFees; + } + + public MarketApi getMarketApi() { + return this.market; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/MarginService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/MarginService.java new file mode 100644 index 00000000..998207e9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/MarginService.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.margin.credit.CreditApi; +import com.kucoin.universal.sdk.generate.margin.debit.DebitApi; +import com.kucoin.universal.sdk.generate.margin.market.MarketApi; +import com.kucoin.universal.sdk.generate.margin.order.OrderApi; +import com.kucoin.universal.sdk.generate.margin.risklimit.RiskLimitApi; + +public interface MarginService { + + public OrderApi getOrderApi(); + + public DebitApi getDebitApi(); + + public CreditApi getCreditApi(); + + public MarketApi getMarketApi(); + + public RiskLimitApi getRiskLimitApi(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/MarginServiceImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/MarginServiceImpl.java new file mode 100644 index 00000000..a50d02f6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/MarginServiceImpl.java @@ -0,0 +1,53 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.margin.credit.CreditApi; +import com.kucoin.universal.sdk.generate.margin.credit.CreditApiImpl; +import com.kucoin.universal.sdk.generate.margin.debit.DebitApi; +import com.kucoin.universal.sdk.generate.margin.debit.DebitApiImpl; +import com.kucoin.universal.sdk.generate.margin.market.MarketApi; +import com.kucoin.universal.sdk.generate.margin.market.MarketApiImpl; +import com.kucoin.universal.sdk.generate.margin.order.OrderApi; +import com.kucoin.universal.sdk.generate.margin.order.OrderApiImpl; +import com.kucoin.universal.sdk.generate.margin.risklimit.RiskLimitApi; +import com.kucoin.universal.sdk.generate.margin.risklimit.RiskLimitApiImpl; +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class MarginServiceImpl implements MarginService { + private Transport transport; + private OrderApi order; + private DebitApi debit; + private CreditApi credit; + private MarketApi market; + private RiskLimitApi riskLimit; + + public MarginServiceImpl(Transport transport) { + this.transport = transport; + this.order = new OrderApiImpl(transport); + this.debit = new DebitApiImpl(transport); + this.credit = new CreditApiImpl(transport); + this.market = new MarketApiImpl(transport); + this.riskLimit = new RiskLimitApiImpl(transport); + } + + public OrderApi getOrderApi() { + return this.order; + } + + public DebitApi getDebitApi() { + return this.debit; + } + + public CreditApi getCreditApi() { + return this.credit; + } + + public MarketApi getMarketApi() { + return this.market; + } + + public RiskLimitApi getRiskLimitApi() { + return this.riskLimit; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/SpotService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/SpotService.java new file mode 100644 index 00000000..6450f40a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/SpotService.java @@ -0,0 +1,13 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.spot.market.MarketApi; +import com.kucoin.universal.sdk.generate.spot.order.OrderApi; + +public interface SpotService { + + public OrderApi getOrderApi(); + + public MarketApi getMarketApi(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/SpotServiceImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/SpotServiceImpl.java new file mode 100644 index 00000000..a5333f15 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/SpotServiceImpl.java @@ -0,0 +1,29 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.spot.market.MarketApi; +import com.kucoin.universal.sdk.generate.spot.market.MarketApiImpl; +import com.kucoin.universal.sdk.generate.spot.order.OrderApi; +import com.kucoin.universal.sdk.generate.spot.order.OrderApiImpl; +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class SpotServiceImpl implements SpotService { + private Transport transport; + private OrderApi order; + private MarketApi market; + + public SpotServiceImpl(Transport transport) { + this.transport = transport; + this.order = new OrderApiImpl(transport); + this.market = new MarketApiImpl(transport); + } + + public OrderApi getOrderApi() { + return this.order; + } + + public MarketApi getMarketApi() { + return this.market; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/VIPLendingService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/VIPLendingService.java new file mode 100644 index 00000000..cfdb6eea --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/VIPLendingService.java @@ -0,0 +1,9 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.viplending.viplending.VIPLendingApi; + +public interface VIPLendingService { + public VIPLendingApi getVIPLendingApi(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/VIPLendingServiceImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/VIPLendingServiceImpl.java new file mode 100644 index 00000000..83e5e847 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/VIPLendingServiceImpl.java @@ -0,0 +1,21 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.service; + +import com.kucoin.universal.sdk.generate.viplending.viplending.VIPLendingApi; +import com.kucoin.universal.sdk.generate.viplending.viplending.VIPLendingApiImpl; +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class VIPLendingServiceImpl implements VIPLendingService { + private Transport transport; + private VIPLendingApi vIPLending; + + public VIPLendingServiceImpl(Transport transport) { + this.transport = transport; + this.vIPLending = new VIPLendingApiImpl(transport); + } + + public VIPLendingApi getVIPLendingApi() { + return this.vIPLending; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/Get24hrStatsReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/Get24hrStatsReq.java new file mode 100644 index 00000000..9d20fb28 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/Get24hrStatsReq.java @@ -0,0 +1,23 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class Get24hrStatsReq implements Request { + /** + * symbol + */ + @JsonProperty("symbol") private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/Get24hrStatsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/Get24hrStatsResp.java new file mode 100644 index 00000000..d7a1ad2b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/Get24hrStatsResp.java @@ -0,0 +1,97 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class Get24hrStatsResp + implements Response> { + /** timestamp */ + @JsonProperty("time") + private Long time; + + /** Symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Best bid price */ + @JsonProperty("buy") + private String buy; + + /** Best ask price */ + @JsonProperty("sell") + private String sell; + + /** 24h change rate */ + @JsonProperty("changeRate") + private String changeRate; + + /** 24h change price */ + @JsonProperty("changePrice") + private String changePrice; + + /** Highest price in 24h */ + @JsonProperty("high") + private String high; + + /** Lowest price in 24h */ + @JsonProperty("low") + private String low; + + /** 24h volume, executed based on base currency */ + @JsonProperty("vol") + private String vol; + + /** 24h traded amount */ + @JsonProperty("volValue") + private String volValue; + + /** Last traded price */ + @JsonProperty("last") + private String last; + + /** Average trading price in the last 24 hours */ + @JsonProperty("averagePrice") + private String averagePrice; + + /** Basic Taker Fee */ + @JsonProperty("takerFeeRate") + private String takerFeeRate; + + /** Basic Maker Fee */ + @JsonProperty("makerFeeRate") + private String makerFeeRate; + + /** + * 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 + */ + @JsonProperty("takerCoefficient") + private String takerCoefficient; + + /** + * 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 + */ + @JsonProperty("makerCoefficient") + private String makerCoefficient; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesData.java new file mode 100644 index 00000000..fb895ad4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesData.java @@ -0,0 +1,63 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAllCurrenciesData { + /** + * A unique currency code that will never change + */ + @JsonProperty("currency") private String currency; + + /** + * Currency name; will change after renaming + */ + @JsonProperty("name") private String name; + + /** + * Full currency name; will change after renaming + */ + @JsonProperty("fullName") private String fullName; + + /** + * Currency precision + */ + @JsonProperty("precision") private Integer precision; + + /** + * Number of block confirmations + */ + @JsonProperty("confirms") private Integer confirms; + + /** + * Contract address + */ + @JsonProperty("contractAddress") private String contractAddress; + + /** + * Margin support or not + */ + @JsonProperty("isMarginEnabled") private Boolean isMarginEnabled; + + /** + * Debit support or not + */ + @JsonProperty("isDebitEnabled") private Boolean isDebitEnabled; + + /** + * Chain list + */ + @JsonProperty("chains") + private List chains = new ArrayList<>(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesDataChains.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesDataChains.java new file mode 100644 index 00000000..4ed89d85 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesDataChains.java @@ -0,0 +1,90 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAllCurrenciesDataChains { + /** Chain name of currency */ + @JsonProperty("chainName") + private String chainName; + + /** Minimum withdrawal amount */ + @JsonProperty("withdrawalMinSize") + private String withdrawalMinSize; + + /** Minimum deposit amount */ + @JsonProperty("depositMinSize") + private String depositMinSize; + + /** Withdraw fee rate */ + @JsonProperty("withdrawFeeRate") + private String withdrawFeeRate; + + /** Minimum fees charged for withdrawal */ + @JsonProperty("withdrawalMinFee") + private String withdrawalMinFee; + + /** Withdrawal support or not */ + @JsonProperty("isWithdrawEnabled") + private Boolean isWithdrawEnabled; + + /** Deposit support or not */ + @JsonProperty("isDepositEnabled") + private Boolean isDepositEnabled; + + /** Number of block confirmations */ + @JsonProperty("confirms") + private Integer confirms; + + /** The number of blocks (confirmations) for advance on-chain verification */ + @JsonProperty("preConfirms") + private Integer preConfirms; + + /** Contract address */ + @JsonProperty("contractAddress") + private String contractAddress; + + /** + * Withdrawal precision bit, indicating the maximum supported length after the decimal point of + * the withdrawal amount + */ + @JsonProperty("withdrawPrecision") + private Integer withdrawPrecision; + + /** Maximum amount of single withdrawal */ + @JsonProperty("maxWithdraw") + private String maxWithdraw; + + /** Maximum amount of single deposit (only applicable to Lightning Network) */ + @JsonProperty("maxDeposit") + private String maxDeposit; + + /** Need for memo/tag or not */ + @JsonProperty("needTag") + private Boolean needTag; + + /** Chain id of currency */ + @JsonProperty("chainId") + private String chainId; + + /** Deposit fee rate (some currencies have this param; the default is empty) */ + @JsonProperty("depositFeeRate") + private String depositFeeRate; + + /** Withdraw max. fee (some currencies have this param; the default is empty) */ + @JsonProperty("withdrawMaxFee") + private String withdrawMaxFee; + + /** */ + @JsonProperty("depositTierFee") + private String depositTierFee; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesResp.java new file mode 100644 index 00000000..0650d23c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAllCurrenciesResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetAllCurrenciesResp fromJson(List data) { + // original response + GetAllCurrenciesResp obj = new GetAllCurrenciesResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsData.java new file mode 100644 index 00000000..ca82b117 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsData.java @@ -0,0 +1,221 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAllSymbolsData { + /** + * Unique code of a symbol; it will not change after renaming + */ + @JsonProperty("symbol") private String symbol; + + /** + * Name of trading pairs, it will change after renaming + */ + @JsonProperty("name") private String name; + + /** + * Base currency, e.g. BTC. + */ + @JsonProperty("baseCurrency") private String baseCurrency; + + /** + * Quote currency, e.g. USDT. + */ + @JsonProperty("quoteCurrency") private String quoteCurrency; + + /** + * The currency of charged fees. + */ + @JsonProperty("feeCurrency") private String feeCurrency; + + /** + * The trading market. + */ + @JsonProperty("market") private String market; + + /** + * The minimum order quantity required to place an order. + */ + @JsonProperty("baseMinSize") private String baseMinSize; + + /** + * The minimum order funds required to place a market order. + */ + @JsonProperty("quoteMinSize") private String quoteMinSize; + + /** + * The maximum order size required to place an order. + */ + @JsonProperty("baseMaxSize") private String baseMaxSize; + + /** + * The maximum order funds required to place a market order. + */ + @JsonProperty("quoteMaxSize") private String quoteMaxSize; + + /** + * 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. + */ + @JsonProperty("baseIncrement") private String baseIncrement; + + /** + * 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. + */ + @JsonProperty("quoteIncrement") private String quoteIncrement; + + /** + * 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. + */ + @JsonProperty("priceIncrement") private String priceIncrement; + + /** + * Threshold for price protection + */ + @JsonProperty("priceLimitRate") private String priceLimitRate; + + /** + * The minimum trading amounts + */ + @JsonProperty("minFunds") private String minFunds; + + /** + * Available for margin or not. + */ + @JsonProperty("isMarginEnabled") private Boolean isMarginEnabled; + + /** + * Available for transaction or not. + */ + @JsonProperty("enableTrading") private Boolean enableTrading; + + /** + * [Fee Type](https://www.kucoin.com/vip/privilege) + */ + @JsonProperty("feeCategory") private FeeCategoryEnum feeCategory; + + /** + * 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 + */ + @JsonProperty("makerFeeCoefficient") private String makerFeeCoefficient; + + /** + * 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 + */ + @JsonProperty("takerFeeCoefficient") private String takerFeeCoefficient; + + /** + * Whether it is a [Special + * Treatment](https://www.kucoin.com/legal/special-treatment) symbol + */ + @JsonProperty("st") private Boolean st; + + /** + * The [call auction](https://www.kucoin.com/support/40999744334105) status + * returns true/false + */ + @JsonProperty("callauctionIsEnabled") private Boolean callauctionIsEnabled; + + /** + * The lowest price declared in the call auction + */ + @JsonProperty("callauctionPriceFloor") private String callauctionPriceFloor; + + /** + * The highest bid price in the call auction + */ + @JsonProperty("callauctionPriceCeiling") + private String callauctionPriceCeiling; + + /** + * The first phase of the call auction starts at (Allow add orders, allow + * cancel orders) + */ + @JsonProperty("callauctionFirstStageStartTime") + private Long callauctionFirstStageStartTime; + + /** + * The second phase of the call auction starts at (Allow add orders, don't + * allow cancel orders) + */ + @JsonProperty("callauctionSecondStageStartTime") + private Long callauctionSecondStageStartTime; + + /** + * The third phase of the call auction starts at (Don't allow add orders, + * don't allow cancel orders) + */ + @JsonProperty("callauctionThirdStageStartTime") + private Long callauctionThirdStageStartTime; + + /** + * Official opening time (end time of the third phase of call auction) + */ + @JsonProperty("tradingStartTime") private Long tradingStartTime; + + public enum FeeCategoryEnum { + /** + * classA + */ + CLASSA(1), + /** + * classB + */ + CLASSB(2), + /** + * classC + */ + CLASSC(3); + + private final Integer value; + + FeeCategoryEnum(Integer value) { this.value = value; } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FeeCategoryEnum fromValue(Integer value) { + for (FeeCategoryEnum b : FeeCategoryEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsReq.java new file mode 100644 index 00000000..4a2d6982 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAllSymbolsReq implements Request { + /** [The trading market](https://www.kucoin.com/docs-new/api-222921786) */ + @JsonProperty("market") + private String market; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsResp.java new file mode 100644 index 00000000..85238420 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsResp.java @@ -0,0 +1,46 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAllSymbolsResp + implements Response> { + /** + * + */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** + * common response + */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetAllSymbolsResp fromJson(List data) { + // original response + GetAllSymbolsResp obj = new GetAllSymbolsResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllTickersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllTickersResp.java new file mode 100644 index 00000000..a9327612 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllTickersResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAllTickersResp + implements Response> { + /** + * timestamp + */ + @JsonProperty("time") private Long time; + + /** + * + */ + @JsonProperty("ticker") + private List ticker = new ArrayList<>(); + + /** + * common response + */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllTickersTicker.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllTickersTicker.java new file mode 100644 index 00000000..6f919ed4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllTickersTicker.java @@ -0,0 +1,182 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAllTickersTicker { + /** + * Symbol + */ + @JsonProperty("symbol") private String symbol; + + /** + * Name of trading pairs, it will change after renaming + */ + @JsonProperty("symbolName") private String symbolName; + + /** + * Best bid price + */ + @JsonProperty("buy") private String buy; + + /** + * Best bid size + */ + @JsonProperty("bestBidSize") private String bestBidSize; + + /** + * Best ask price + */ + @JsonProperty("sell") private String sell; + + /** + * Best ask size + */ + @JsonProperty("bestAskSize") private String bestAskSize; + + /** + * 24h change rate + */ + @JsonProperty("changeRate") private String changeRate; + + /** + * 24h change price + */ + @JsonProperty("changePrice") private String changePrice; + + /** + * Highest price in 24h + */ + @JsonProperty("high") private String high; + + /** + * Lowest price in 24h + */ + @JsonProperty("low") private String low; + + /** + * 24h volume, executed based on base currency + */ + @JsonProperty("vol") private String vol; + + /** + * 24h traded amount + */ + @JsonProperty("volValue") private String volValue; + + /** + * Last traded price + */ + @JsonProperty("last") private String last; + + /** + * Average trading price in the last 24 hours + */ + @JsonProperty("averagePrice") private String averagePrice; + + /** + * Basic Taker Fee + */ + @JsonProperty("takerFeeRate") private String takerFeeRate; + + /** + * Basic Maker Fee + */ + @JsonProperty("makerFeeRate") private String makerFeeRate; + + /** + * 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 + */ + @JsonProperty("takerCoefficient") + private TakerCoefficientEnum takerCoefficient; + + /** + * 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 + */ + @JsonProperty("makerCoefficient") + private MakerCoefficientEnum makerCoefficient; + + public enum TakerCoefficientEnum { + /** + * The taker fee coefficient is 1 + */ + _1("1"), + /** + * No fee + */ + _0("0"); + + private final String value; + + TakerCoefficientEnum(String value) { this.value = value; } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TakerCoefficientEnum fromValue(String value) { + for (TakerCoefficientEnum b : TakerCoefficientEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + public enum MakerCoefficientEnum { + /** + * The maker fee coefficient is 1 + */ + _1("1"), + /** + * No fee + */ + _0("0"); + + private final String value; + + MakerCoefficientEnum(String value) { this.value = value; } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MakerCoefficientEnum fromValue(String value) { + for (MakerCoefficientEnum b : MakerCoefficientEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsItems.java new file mode 100644 index 00000000..dff7c4d6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsItems.java @@ -0,0 +1,52 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAnnouncementsItems { + /** + * Announcement ID + */ + @JsonProperty("annId") private Integer annId; + + /** + * Announcement title + */ + @JsonProperty("annTitle") private String annTitle; + + /** + * Announcement type + */ + @JsonProperty("annType") private List annType = new ArrayList<>(); + + /** + * Announcement description + */ + @JsonProperty("annDesc") private String annDesc; + + /** + * Announcement release time, Unix millisecond timestamp format + */ + @JsonProperty("cTime") private Long cTime; + + /** + * language type + */ + @JsonProperty("language") private String language; + + /** + * Announcement link + */ + @JsonProperty("annUrl") private String annUrl; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsReq.java new file mode 100644 index 00000000..32de0892 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsReq.java @@ -0,0 +1,234 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAnnouncementsReq implements Request { + /** + * page number + */ + @JsonProperty("currentPage") private Long currentPage; + + /** + * page Size + */ + @JsonProperty("pageSize") private Long pageSize; + + /** + * Announcement types: latest-announcements , activities (latest activities), + * new-listings (new currency online), product-updates (product updates), vip + * (institutions and VIPs), maintenance-updates (system maintenance), product + * -updates (product news), delistings (currency offline), others, + * api-campaigns (API user activities), default : latest-announcements + */ + @JsonProperty("annType") + @Builder.Default + private AnnTypeEnum annType = AnnTypeEnum.LATEST_ANNOUNCEMENTS; + + /** + * Language type, the default is en_US, the specific value parameters are as + * follows + */ + @JsonProperty("lang") @Builder.Default private LangEnum lang = LangEnum.EN_US; + + /** + * Announcement online start time (milliseconds) + */ + @JsonProperty("startTime") private Long startTime; + + /** + * Announcement online end time (milliseconds) + */ + @JsonProperty("endTime") private Long endTime; + + public enum AnnTypeEnum { + /** + * latest-announcements + */ + LATEST_ANNOUNCEMENTS("latest-announcements"), + /** + * latest activities + */ + ACTIVITIES("activities"), + /** + * product updates + */ + PRODUCT_UPDATES("product-updates"), + /** + * institutions and VIPs + */ + VIPS("vip"), + /** + * system maintenance + */ + MAINTENANCE_UPDATE("maintenance-updates"), + /** + * currency offline + */ + DELISTINGS("delistings"), + /** + * others + */ + OTHERS("others"), + /** + * API user activities + */ + API_CAMPAIGNS("api-campaigns"), + /** + * new currency online + */ + NEW_LISTINGS("new-listings"); + + private final String value; + + AnnTypeEnum(String value) { this.value = value; } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AnnTypeEnum fromValue(String value) { + for (AnnTypeEnum b : AnnTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + public enum LangEnum { + /** + * Chinese (Hong Kong) + */ + ZH_HK("zh_HK"), + /** + * Japanese (Japan) + */ + JA_JP("ja_JP"), + /** + * Korean (Korea) + */ + KO_KR("ko_KR"), + /** + * English + */ + EN_US("en_US"), + /** + * Polish (Poland) + */ + PL_PL("pl_PL"), + /** + * Spanish (Spain) + */ + ES_ES("es_ES"), + /** + * French (France) + */ + FR_FR("fr_FR"), + /** + * Arabic (Egypt) + */ + AR_AE("ar_AE"), + /** + * Italian (Italy) + */ + IT_IT("it_IT"), + /** + * Indonesian (Indonesia) + */ + ID_ID("id_ID"), + /** + * Dutch (Netherlands) + */ + NL_NL("nl_NL"), + /** + * Portuguese (Brazil) + */ + PT_PT("pt_PT"), + /** + * Vietnamese (Vietnam) + */ + VI_VN("vi_VN"), + /** + * German (Germany) + */ + DE_DE("de_DE"), + /** + * Turkish (Turkey) + */ + TR_TR("tr_TR"), + /** + * Malay (Malaysia) + */ + MS_MY("ms_MY"), + /** + * Russian (Russia) + */ + RU_RU("ru_RU"), + /** + * Thai (Thailand) + */ + TH_TH("th_TH"), + /** + * Hindi (India) + */ + HI_IN("hi_IN"), + /** + * Bengali (Bangladesh) + */ + BN_BD("bn_BD"), + /** + * Filipino (Philippines) + */ + FIL_PH("fil_PH"), + /** + * Urdu (Pakistan) + */ + UR_PK("ur_PK"); + + private final String value; + + LangEnum(String value) { this.value = value; } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LangEnum fromValue(String value) { + for (LangEnum b : LangEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsResp.java new file mode 100644 index 00000000..317c5380 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsResp.java @@ -0,0 +1,58 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAnnouncementsResp + implements Response> { + /** + * Total Number + */ + @JsonProperty("totalNum") private Integer totalNum; + + /** + * + */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** + * Current page + */ + @JsonProperty("currentPage") private Integer currentPage; + + /** + * Page size + */ + @JsonProperty("pageSize") private Integer pageSize; + + /** + * Total Page + */ + @JsonProperty("totalPage") private Integer totalPage; + + /** + * common response + */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionInfoReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionInfoReq.java new file mode 100644 index 00000000..d50bc5e1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionInfoReq.java @@ -0,0 +1,23 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCallAuctionInfoReq implements Request { + /** + * symbol + */ + @JsonProperty("symbol") private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionInfoResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionInfoResp.java new file mode 100644 index 00000000..56f963d9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionInfoResp.java @@ -0,0 +1,71 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCallAuctionInfoResp + implements Response> { + /** + * Symbol + */ + @JsonProperty("symbol") private String symbol; + + /** + * Estimated price + */ + @JsonProperty("estimatedPrice") private String estimatedPrice; + + /** + * Estimated size + */ + @JsonProperty("estimatedSize") private String estimatedSize; + + /** + * Sell ​​order minimum price + */ + @JsonProperty("sellOrderRangeLowPrice") private String sellOrderRangeLowPrice; + + /** + * Sell ​​order maximum price + */ + @JsonProperty("sellOrderRangeHighPrice") + private String sellOrderRangeHighPrice; + + /** + * Buy order minimum price + */ + @JsonProperty("buyOrderRangeLowPrice") private String buyOrderRangeLowPrice; + + /** + * Buy ​​order maximum price + */ + @JsonProperty("buyOrderRangeHighPrice") private String buyOrderRangeHighPrice; + + /** + * Timestamp (ms) + */ + @JsonProperty("time") private Long time; + + /** + * common response + */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionPartOrderBookReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionPartOrderBookReq.java new file mode 100644 index 00000000..1b772939 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionPartOrderBookReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCallAuctionPartOrderBookReq implements Request { + /** + * symbol + */ + @JsonProperty("symbol") private String symbol; + + /** + * Get the depth layer, optional value: 20, 100 + */ + @JsonIgnore @PathVar("size") @JsonProperty("size") private String size; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionPartOrderBookResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionPartOrderBookResp.java new file mode 100644 index 00000000..76e59e2f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionPartOrderBookResp.java @@ -0,0 +1,46 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCallAuctionPartOrderBookResp + implements Response< + GetCallAuctionPartOrderBookResp, RestResponse> { + /** Timestamp (milliseconds) */ + @JsonProperty("time") + private Long time; + + /** Sequence number */ + @JsonProperty("sequence") + private String sequence; + + /** bids, from high to low */ + @JsonProperty("bids") + private List> bids = new ArrayList<>(); + + /** asks, from low to high */ + @JsonProperty("asks") + private List> asks = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetClientIPAddressResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetClientIPAddressResp.java new file mode 100644 index 00000000..7898cdc8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetClientIPAddressResp.java @@ -0,0 +1,44 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetClientIPAddressResp + implements Response> { + /** + * + */ + @JsonProperty("data") private String data; + + /** + * common response + */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetClientIPAddressResp fromJson(String data) { + // original response + GetClientIPAddressResp obj = new GetClientIPAddressResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyChains.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyChains.java new file mode 100644 index 00000000..3b800fc9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyChains.java @@ -0,0 +1,91 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCurrencyChains { + /** + * Chain name of currency + */ + @JsonProperty("chainName") private String chainName; + + /** + * Minimum withdrawal amount + */ + @JsonProperty("withdrawalMinSize") private String withdrawalMinSize; + + /** + * Minimum deposit amount + */ + @JsonProperty("depositMinSize") private String depositMinSize; + + /** + * Withdraw fee rate + */ + @JsonProperty("withdrawFeeRate") private String withdrawFeeRate; + + /** + * Minimum fees charged for withdrawal + */ + @JsonProperty("withdrawalMinFee") private String withdrawalMinFee; + + /** + * Withdrawal support or not + */ + @JsonProperty("isWithdrawEnabled") private Boolean isWithdrawEnabled; + + /** + * Deposit support or not + */ + @JsonProperty("isDepositEnabled") private Boolean isDepositEnabled; + + /** + * Number of block confirmations + */ + @JsonProperty("confirms") private Integer confirms; + + /** + * The number of blocks (confirmations) for advance on-chain verification + */ + @JsonProperty("preConfirms") private Integer preConfirms; + + /** + * Contract address + */ + @JsonProperty("contractAddress") private String contractAddress; + + /** + * Withdrawal precision bit, indicating the maximum supported length after the + * decimal point of the withdrawal amount + */ + @JsonProperty("withdrawPrecision") private Integer withdrawPrecision; + + /** + * Maximum amount of single withdrawal + */ + @JsonProperty("maxWithdraw") private Double maxWithdraw; + + /** + * Maximum amount of single deposit (only applicable to Lightning Network) + */ + @JsonProperty("maxDeposit") private String maxDeposit; + + /** + * Need for memo/tag or not + */ + @JsonProperty("needTag") private Boolean needTag; + + /** + * Chain id of currency + */ + @JsonProperty("chainId") private String chainId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyReq.java new file mode 100644 index 00000000..cb7b3e15 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyReq.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCurrencyReq implements Request { + /** + * 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. + */ + @JsonProperty("chain") + private String chain; + + /** Path parameter, Currency */ + @JsonIgnore + @PathVar("currency") + @JsonProperty("currency") + private String currency; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyResp.java new file mode 100644 index 00000000..99e7fd8a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyResp.java @@ -0,0 +1,77 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetCurrencyResp + implements Response> { + /** + * A unique currency code that will never change + */ + @JsonProperty("currency") private String currency; + + /** + * Currency name; will change after renaming + */ + @JsonProperty("name") private String name; + + /** + * Full currency name; will change after renaming + */ + @JsonProperty("fullName") private String fullName; + + /** + * Currency precision + */ + @JsonProperty("precision") private Integer precision; + + /** + * Number of block confirmations + */ + @JsonProperty("confirms") private Integer confirms; + + /** + * Contract address + */ + @JsonProperty("contractAddress") private String contractAddress; + + /** + * Margin support or not + */ + @JsonProperty("isMarginEnabled") private Boolean isMarginEnabled; + + /** + * Debit support or not + */ + @JsonProperty("isDebitEnabled") private Boolean isDebitEnabled; + + /** + * Chain list + */ + @JsonProperty("chains") + private List chains = new ArrayList<>(); + + /** + * common response + */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceReq.java new file mode 100644 index 00000000..6e9164ff --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceReq.java @@ -0,0 +1,29 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFiatPriceReq implements Request { + /** + * Ticker symbol of a base currency, e.g. USD, EUR. Default is USD + */ + @JsonProperty("base") @Builder.Default private String base = "USD"; + + /** + * Comma-separated cryptocurrencies to be converted into fiat, e.g.: BTC,ETH, + * etc. Default to return the fiat price of all currencies. + */ + @JsonProperty("currencies") private String currencies; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceResp.java new file mode 100644 index 00000000..2d2cab46 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceResp.java @@ -0,0 +1,4509 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFiatPriceResp + implements Response> { + /** + * + */ + @JsonProperty("AGLD") private String AGLD; + + /** + * + */ + @JsonProperty("DFI") private String DFI; + + /** + * + */ + @JsonProperty("PYTHUP") private String PYTHUP; + + /** + * + */ + @JsonProperty("ISLM") private String ISLM; + + /** + * + */ + @JsonProperty("NEAR") private String NEAR; + + /** + * + */ + @JsonProperty("AIOZ") private String AIOZ; + + /** + * + */ + @JsonProperty("AUDIO") private String AUDIO; + + /** + * + */ + @JsonProperty("BBL") private String BBL; + + /** + * + */ + @JsonProperty("WLD") private String WLD; + + /** + * + */ + @JsonProperty("HNT") private String HNT; + + /** + * + */ + @JsonProperty("ETHFI") private String ETHFI; + + /** + * + */ + @JsonProperty("DMAIL") private String DMAIL; + + /** + * + */ + @JsonProperty("OPUP") private String OPUP; + + /** + * + */ + @JsonProperty("VET3S") private String VET3S; + + /** + * + */ + @JsonProperty("MANA3S") private String MANA3S; + + /** + * + */ + @JsonProperty("TIDAL") private String TIDAL; + + /** + * + */ + @JsonProperty("HALO") private String HALO; + + /** + * + */ + @JsonProperty("OPUL") private String OPUL; + + /** + * + */ + @JsonProperty("MANA3L") private String MANA3L; + + /** + * + */ + @JsonProperty("DGB") private String DGB; + + /** + * + */ + @JsonProperty("AA") private String AA; + + /** + * + */ + @JsonProperty("BCH") private String BCH; + + /** + * + */ + @JsonProperty("GMEE") private String GMEE; + + /** + * + */ + @JsonProperty("JST") private String JST; + + /** + * + */ + @JsonProperty("PBUX") private String PBUX; + + /** + * + */ + @JsonProperty("AR") private String AR; + + /** + * + */ + @JsonProperty("SEI") private String SEI; + + /** + * + */ + @JsonProperty("PSTAKE") private String PSTAKE; + + /** + * + */ + @JsonProperty("LMWR") private String LMWR; + + /** + * + */ + @JsonProperty("UNFIDOWN") private String UNFIDOWN; + + /** + * + */ + @JsonProperty("BB") private String BB; + + /** + * + */ + @JsonProperty("JTO") private String JTO; + + /** + * + */ + @JsonProperty("WEMIX") private String WEMIX; + + /** + * + */ + @JsonProperty("G") private String G; + + /** + * + */ + @JsonProperty("MARSH") private String MARSH; + + /** + * + */ + @JsonProperty("BN") private String BN; + + /** + * + */ + @JsonProperty("FLIP") private String FLIP; + + /** + * + */ + @JsonProperty("FLR") private String FLR; + + /** + * + */ + @JsonProperty("BIGTIME") private String BIGTIME; + + /** + * + */ + @JsonProperty("FLY") private String FLY; + + /** + * + */ + @JsonProperty("T") private String T; + + /** + * + */ + @JsonProperty("W") private String W; + + /** + * + */ + @JsonProperty("BDX") private String BDX; + + /** + * + */ + @JsonProperty("BABYDOGE") private String BABYDOGE; + + /** + * + */ + @JsonProperty("SFP") private String SFP; + + /** + * + */ + @JsonProperty("DIA") private String DIA; + + /** + * + */ + @JsonProperty("ISME") private String ISME; + + /** + * + */ + @JsonProperty("LYM") private String LYM; + + /** + * + */ + @JsonProperty("VET3L") private String VET3L; + + /** + * + */ + @JsonProperty("JUP") private String JUP; + + /** + * + */ + @JsonProperty("LYX") private String LYX; + + /** + * + */ + @JsonProperty("AIEPK") private String AIEPK; + + /** + * + */ + @JsonProperty("SILLY") private String SILLY; + + /** + * + */ + @JsonProperty("SCPT") private String SCPT; + + /** + * + */ + @JsonProperty("WOO") private String WOO; + + /** + * + */ + @JsonProperty("BLUR") private String BLUR; + + /** + * + */ + @JsonProperty("STRK") private String STRK; + + /** + * + */ + @JsonProperty("BFC") private String BFC; + + /** + * + */ + @JsonProperty("DC") private String DC; + + /** + * + */ + @JsonProperty("KARATE") private String KARATE; + + /** + * + */ + @JsonProperty("SUSHI3L") private String SUSHI3L; + + /** + * + */ + @JsonProperty("NETVR") private String NETVR; + + /** + * + */ + @JsonProperty("WAVES") private String WAVES; + + /** + * + */ + @JsonProperty("LITH") private String LITH; + + /** + * + */ + @JsonProperty("HAPI") private String HAPI; + + /** + * + */ + @JsonProperty("SUSHI3S") private String SUSHI3S; + + /** + * + */ + @JsonProperty("CEEK") private String CEEK; + + /** + * + */ + @JsonProperty("FLOKI") private String FLOKI; + + /** + * + */ + @JsonProperty("SHR") private String SHR; + + /** + * + */ + @JsonProperty("SAND") private String SAND; + + /** + * + */ + @JsonProperty("TURT") private String TURT; + + /** + * + */ + @JsonProperty("UMA") private String UMA; + + /** + * + */ + @JsonProperty("BEPRO") private String BEPRO; + + /** + * + */ + @JsonProperty("SCRT") private String SCRT; + + /** + * + */ + @JsonProperty("TUSD") private String TUSD; + + /** + * + */ + @JsonProperty("COOKIE") private String COOKIE; + + /** + * + */ + @JsonProperty("LRDS") private String LRDS; + + /** + * + */ + @JsonProperty("SIN") private String SIN; + + /** + * + */ + @JsonProperty("OAS") private String OAS; + + /** + * + */ + @JsonProperty("ROOT") private String ROOT; + + /** + * + */ + @JsonProperty("ADA3L") private String ADA3L; + + /** + * + */ + @JsonProperty("TIAUP") private String TIAUP; + + /** + * + */ + @JsonProperty("HTR") private String HTR; + + /** + * + */ + @JsonProperty("UNB") private String UNB; + + /** + * + */ + @JsonProperty("UNA") private String UNA; + + /** + * + */ + @JsonProperty("HARD") private String HARD; + + /** + * + */ + @JsonProperty("G3") private String G3; + + /** + * + */ + @JsonProperty("ADA3S") private String ADA3S; + + /** + * + */ + @JsonProperty("MYRO") private String MYRO; + + /** + * + */ + @JsonProperty("HTX") private String HTX; + + /** + * + */ + @JsonProperty("FT") private String FT; + + /** + * + */ + @JsonProperty("BTCDOWN") private String BTCDOWN; + + /** + * + */ + @JsonProperty("UNI") private String UNI; + + /** + * + */ + @JsonProperty("FX") private String FX; + + /** + * + */ + @JsonProperty("OBI") private String OBI; + + /** + * + */ + @JsonProperty("UNO") private String UNO; + + /** + * + */ + @JsonProperty("WRX") private String WRX; + + /** + * + */ + @JsonProperty("TIADOWN") private String TIADOWN; + + /** + * + */ + @JsonProperty("ETHDOWN") private String ETHDOWN; + + /** + * + */ + @JsonProperty("WELL") private String WELL; + + /** + * + */ + @JsonProperty("SWFTC") private String SWFTC; + + /** + * + */ + @JsonProperty("SKL") private String SKL; + + /** + * + */ + @JsonProperty("UOS") private String UOS; + + /** + * + */ + @JsonProperty("AIPAD") private String AIPAD; + + /** + * + */ + @JsonProperty("BRETT") private String BRETT; + + /** + * + */ + @JsonProperty("SKY") private String SKY; + + /** + * + */ + @JsonProperty("FRM") private String FRM; + + /** + * + */ + @JsonProperty("VISION") private String VISION; + + /** + * + */ + @JsonProperty("LENDS") private String LENDS; + + /** + * + */ + @JsonProperty("SLF") private String SLF; + + /** + * + */ + @JsonProperty("BULL") private String BULL; + + /** + * + */ + @JsonProperty("FLOW") private String FLOW; + + /** + * + */ + @JsonProperty("ODDZ") private String ODDZ; + + /** + * + */ + @JsonProperty("SLN") private String SLN; + + /** + * + */ + @JsonProperty("UPO") private String UPO; + + /** + * + */ + @JsonProperty("SLP") private String SLP; + + /** + * + */ + @JsonProperty("ID") private String ID; + + /** + * + */ + @JsonProperty("SLIM") private String SLIM; + + /** + * + */ + @JsonProperty("SPOT") private String SPOT; + + /** + * + */ + @JsonProperty("DOP") private String DOP; + + /** + * + */ + @JsonProperty("ISSP") private String ISSP; + + /** + * + */ + @JsonProperty("UQC") private String UQC; + + /** + * + */ + @JsonProperty("IO") private String IO; + + /** + * + */ + @JsonProperty("DOT") private String DOT; + + /** + * + */ + @JsonProperty("1INCH") private String _1INCH; + + /** + * + */ + @JsonProperty("SMH") private String SMH; + + /** + * + */ + @JsonProperty("MAK") private String MAK; + + /** + * + */ + @JsonProperty("TOKO") private String TOKO; + + /** + * + */ + @JsonProperty("TURBO") private String TURBO; + + /** + * + */ + @JsonProperty("UNFI") private String UNFI; + + /** + * + */ + @JsonProperty("MAN") private String MAN; + + /** + * + */ + @JsonProperty("EVER") private String EVER; + + /** + * + */ + @JsonProperty("FTM") private String FTM; + + /** + * + */ + @JsonProperty("SHRAP") private String SHRAP; + + /** + * + */ + @JsonProperty("MAV") private String MAV; + + /** + * + */ + @JsonProperty("MAX") private String MAX; + + /** + * + */ + @JsonProperty("DPR") private String DPR; + + /** + * + */ + @JsonProperty("FTT") private String FTT; + + /** + * + */ + @JsonProperty("ARKM") private String ARKM; + + /** + * + */ + @JsonProperty("ATOM") private String ATOM; + + /** + * + */ + @JsonProperty("PENDLE") private String PENDLE; + + /** + * + */ + @JsonProperty("QUICK") private String QUICK; + + /** + * + */ + @JsonProperty("BLZ") private String BLZ; + + /** + * + */ + @JsonProperty("BOBA") private String BOBA; + + /** + * + */ + @JsonProperty("MBL") private String MBL; + + /** + * + */ + @JsonProperty("OFN") private String OFN; + + /** + * + */ + @JsonProperty("UNIO") private String UNIO; + + /** + * + */ + @JsonProperty("SNS") private String SNS; + + /** + * + */ + @JsonProperty("SNX") private String SNX; + + /** + * + */ + @JsonProperty("NXRA") private String NXRA; + + /** + * + */ + @JsonProperty("TAIKO") private String TAIKO; + + /** + * + */ + @JsonProperty("AVAX3L") private String AVAX3L; + + /** + * + */ + @JsonProperty("L3") private String L3; + + /** + * + */ + @JsonProperty("API3") private String API3; + + /** + * + */ + @JsonProperty("XRP3S") private String XRP3S; + + /** + * + */ + @JsonProperty("QKC") private String QKC; + + /** + * + */ + @JsonProperty("AVAX3S") private String AVAX3S; + + /** + * + */ + @JsonProperty("ROSE") private String ROSE; + + /** + * + */ + @JsonProperty("SATS") private String SATS; + + /** + * + */ + @JsonProperty("BMX") private String BMX; + + /** + * + */ + @JsonProperty("PORTAL") private String PORTAL; + + /** + * + */ + @JsonProperty("TOMI") private String TOMI; + + /** + * + */ + @JsonProperty("XRP3L") private String XRP3L; + + /** + * + */ + @JsonProperty("SOL") private String SOL; + + /** + * + */ + @JsonProperty("SON") private String SON; + + /** + * + */ + @JsonProperty("BNC") private String BNC; + + /** + * + */ + @JsonProperty("SOCIAL") private String SOCIAL; + + /** + * + */ + @JsonProperty("CGPT") private String CGPT; + + /** + * + */ + @JsonProperty("CELR") private String CELR; + + /** + * + */ + @JsonProperty("BNB") private String BNB; + + /** + * + */ + @JsonProperty("OGN") private String OGN; + + /** + * + */ + @JsonProperty("CELO") private String CELO; + + /** + * + */ + @JsonProperty("AUCTION") private String AUCTION; + + /** + * + */ + @JsonProperty("MANTA") private String MANTA; + + /** + * + */ + @JsonProperty("LAYER") private String LAYER; + + /** + * + */ + @JsonProperty("AERO") private String AERO; + + /** + * + */ + @JsonProperty("CETUS") private String CETUS; + + /** + * + */ + @JsonProperty("LL") private String LL; + + /** + * + */ + @JsonProperty("SPA") private String SPA; + + /** + * + */ + @JsonProperty("PYTHDOWN") private String PYTHDOWN; + + /** + * + */ + @JsonProperty("NEIROCTO") private String NEIROCTO; + + /** + * + */ + @JsonProperty("UTK") private String UTK; + + /** + * + */ + @JsonProperty("GMRX") private String GMRX; + + /** + * + */ + @JsonProperty("BOB") private String BOB; + + /** + * + */ + @JsonProperty("HOTCROSS") private String HOTCROSS; + + /** + * + */ + @JsonProperty("AERGO") private String AERGO; + + /** + * + */ + @JsonProperty("MOCA") private String MOCA; + + /** + * + */ + @JsonProperty("SQD") private String SQD; + + /** + * + */ + @JsonProperty("MV") private String MV; + + /** + * + */ + @JsonProperty("BNB3L") private String BNB3L; + + /** + * + */ + @JsonProperty("BNB3S") private String BNB3S; + + /** + * + */ + @JsonProperty("GALAX3L") private String GALAX3L; + + /** + * + */ + @JsonProperty("KAI") private String KAI; + + /** + * + */ + @JsonProperty("SQR") private String SQR; + + /** + * + */ + @JsonProperty("GALAX3S") private String GALAX3S; + + /** + * + */ + @JsonProperty("EGLD") private String EGLD; + + /** + * + */ + @JsonProperty("ZBCN") private String ZBCN; + + /** + * + */ + @JsonProperty("KAS") private String KAS; + + /** + * + */ + @JsonProperty("MEW") private String MEW; + + /** + * + */ + @JsonProperty("PUNDIX") private String PUNDIX; + + /** + * + */ + @JsonProperty("LOOKS") private String LOOKS; + + /** + * + */ + @JsonProperty("FXS") private String FXS; + + /** + * + */ + @JsonProperty("BOSON") private String BOSON; + + /** + * + */ + @JsonProperty("BRISE") private String BRISE; + + /** + * + */ + @JsonProperty("AEVO") private String AEVO; + + /** + * + */ + @JsonProperty("FLUX") private String FLUX; + + /** + * + */ + @JsonProperty("PRCL") private String PRCL; + + /** + * + */ + @JsonProperty("UNFIUP") private String UNFIUP; + + /** + * + */ + @JsonProperty("SEIDOWN") private String SEIDOWN; + + /** + * + */ + @JsonProperty("DOAI") private String DOAI; + + /** + * + */ + @JsonProperty("QNT") private String QNT; + + /** + * + */ + @JsonProperty("REDO") private String REDO; + + /** + * + */ + @JsonProperty("STRIKE") private String STRIKE; + + /** + * + */ + @JsonProperty("ETHW") private String ETHW; + + /** + * + */ + @JsonProperty("OM") private String OM; + + /** + * + */ + @JsonProperty("OP") private String OP; + + /** + * + */ + @JsonProperty("WHALE") private String WHALE; + + /** + * + */ + @JsonProperty("1CAT") private String _1CAT; + + /** + * + */ + @JsonProperty("NEON") private String NEON; + + /** + * + */ + @JsonProperty("GTAI") private String GTAI; + + /** + * + */ + @JsonProperty("SSV") private String SSV; + + /** + * + */ + @JsonProperty("ETH2") private String ETH2; + + /** + * + */ + @JsonProperty("KCS") private String KCS; + + /** + * + */ + @JsonProperty("ARPA") private String ARPA; + + /** + * + */ + @JsonProperty("ARTFI") private String ARTFI; + + /** + * + */ + @JsonProperty("BRL") private String BRL; + + /** + * + */ + @JsonProperty("ALEX") private String ALEX; + + /** + * + */ + @JsonProperty("STG") private String STG; + + /** + * + */ + @JsonProperty("SHIB") private String SHIB; + + /** + * + */ + @JsonProperty("IOTX") private String IOTX; + + /** + * + */ + @JsonProperty("OLE") private String OLE; + + /** + * + */ + @JsonProperty("KDA") private String KDA; + + /** + * + */ + @JsonProperty("CERE") private String CERE; + + /** + * + */ + @JsonProperty("DOCK") private String DOCK; + + /** + * + */ + @JsonProperty("STX") private String STX; + + /** + * + */ + @JsonProperty("OLT") private String OLT; + + /** + * + */ + @JsonProperty("QI") private String QI; + + /** + * + */ + @JsonProperty("SDAO") private String SDAO; + + /** + * + */ + @JsonProperty("BLAST") private String BLAST; + + /** + * + */ + @JsonProperty("LINK3S") private String LINK3S; + + /** + * + */ + @JsonProperty("IOST") private String IOST; + + /** + * + */ + @JsonProperty("SUI") private String SUI; + + /** + * + */ + @JsonProperty("CAKE") private String CAKE; + + /** + * + */ + @JsonProperty("BSW") private String BSW; + + /** + * + */ + @JsonProperty("OMG") private String OMG; + + /** + * + */ + @JsonProperty("VOLT") private String VOLT; + + /** + * + */ + @JsonProperty("LINK3L") private String LINK3L; + + /** + * + */ + @JsonProperty("GEEQ") private String GEEQ; + + /** + * + */ + @JsonProperty("PYUSD") private String PYUSD; + + /** + * + */ + @JsonProperty("SUN") private String SUN; + + /** + * + */ + @JsonProperty("TOWER") private String TOWER; + + /** + * + */ + @JsonProperty("BTC") private String BTC; + + /** + * + */ + @JsonProperty("IOTA") private String IOTA; + + /** + * + */ + @JsonProperty("REEF") private String REEF; + + /** + * + */ + @JsonProperty("TRIAS") private String TRIAS; + + /** + * + */ + @JsonProperty("KEY") private String KEY; + + /** + * + */ + @JsonProperty("ETH3L") private String ETH3L; + + /** + * + */ + @JsonProperty("BTT") private String BTT; + + /** + * + */ + @JsonProperty("ONE") private String ONE; + + /** + * + */ + @JsonProperty("RENDER") private String RENDER; + + /** + * + */ + @JsonProperty("ETH3S") private String ETH3S; + + /** + * + */ + @JsonProperty("ANKR") private String ANKR; + + /** + * + */ + @JsonProperty("ALGO") private String ALGO; + + /** + * + */ + @JsonProperty("SYLO") private String SYLO; + + /** + * + */ + @JsonProperty("ZCX") private String ZCX; + + /** + * + */ + @JsonProperty("SD") private String SD; + + /** + * + */ + @JsonProperty("ONT") private String ONT; + + /** + * + */ + @JsonProperty("MJT") private String MJT; + + /** + * + */ + @JsonProperty("DYM") private String DYM; + + /** + * + */ + @JsonProperty("DYP") private String DYP; + + /** + * + */ + @JsonProperty("BAKEUP") private String BAKEUP; + + /** + * + */ + @JsonProperty("OOE") private String OOE; + + /** + * + */ + @JsonProperty("ZELIX") private String ZELIX; + + /** + * + */ + @JsonProperty("DOGE3L") private String DOGE3L; + + /** + * + */ + @JsonProperty("ARTY") private String ARTY; + + /** + * + */ + @JsonProperty("QORPO") private String QORPO; + + /** + * + */ + @JsonProperty("ICE") private String ICE; + + /** + * + */ + @JsonProperty("NOTAI") private String NOTAI; + + /** + * + */ + @JsonProperty("DOGE3S") private String DOGE3S; + + /** + * + */ + @JsonProperty("NAKA") private String NAKA; + + /** + * + */ + @JsonProperty("GALAX") private String GALAX; + + /** + * + */ + @JsonProperty("MKR") private String MKR; + + /** + * + */ + @JsonProperty("DODO") private String DODO; + + /** + * + */ + @JsonProperty("ICP") private String ICP; + + /** + * + */ + @JsonProperty("ZEC") private String ZEC; + + /** + * + */ + @JsonProperty("ZEE") private String ZEE; + + /** + * + */ + @JsonProperty("ICX") private String ICX; + + /** + * + */ + @JsonProperty("KMNO") private String KMNO; + + /** + * + */ + @JsonProperty("TT") private String TT; + + /** + * + */ + @JsonProperty("DOT3L") private String DOT3L; + + /** + * + */ + @JsonProperty("XAI") private String XAI; + + /** + * + */ + @JsonProperty("ZEN") private String ZEN; + + /** + * + */ + @JsonProperty("DOGE") private String DOGE; + + /** + * + */ + @JsonProperty("ALPHA") private String ALPHA; + + /** + * + */ + @JsonProperty("DUSK") private String DUSK; + + /** + * + */ + @JsonProperty("DOT3S") private String DOT3S; + + /** + * + */ + @JsonProperty("SXP") private String SXP; + + /** + * + */ + @JsonProperty("HBAR") private String HBAR; + + /** + * + */ + @JsonProperty("SYNT") private String SYNT; + + /** + * + */ + @JsonProperty("ZEX") private String ZEX; + + /** + * + */ + @JsonProperty("BONDLY") private String BONDLY; + + /** + * + */ + @JsonProperty("MLK") private String MLK; + + /** + * + */ + @JsonProperty("KICKS") private String KICKS; + + /** + * + */ + @JsonProperty("PEPE") private String PEPE; + + /** + * + */ + @JsonProperty("OUSD") private String OUSD; + + /** + * + */ + @JsonProperty("LUNCDOWN") private String LUNCDOWN; + + /** + * + */ + @JsonProperty("DOGS") private String DOGS; + + /** + * + */ + @JsonProperty("REV3L") private String REV3L; + + /** + * + */ + @JsonProperty("CTSI") private String CTSI; + + /** + * + */ + @JsonProperty("C98") private String C98; + + /** + * + */ + @JsonProperty("OSMO") private String OSMO; + + /** + * + */ + @JsonProperty("NTRN") private String NTRN; + + /** + * + */ + @JsonProperty("CFX2S") private String CFX2S; + + /** + * + */ + @JsonProperty("SYN") private String SYN; + + /** + * + */ + @JsonProperty("VIDT") private String VIDT; + + /** + * + */ + @JsonProperty("SYS") private String SYS; + + /** + * + */ + @JsonProperty("GAS") private String GAS; + + /** + * + */ + @JsonProperty("BOME") private String BOME; + + /** + * + */ + @JsonProperty("COMBO") private String COMBO; + + /** + * + */ + @JsonProperty("XCH") private String XCH; + + /** + * + */ + @JsonProperty("VR") private String VR; + + /** + * + */ + @JsonProperty("CFX2L") private String CFX2L; + + /** + * + */ + @JsonProperty("VSYS") private String VSYS; + + /** + * + */ + @JsonProperty("PANDORA") private String PANDORA; + + /** + * + */ + @JsonProperty("THETA") private String THETA; + + /** + * + */ + @JsonProperty("XCN") private String XCN; + + /** + * + */ + @JsonProperty("NEXG") private String NEXG; + + /** + * + */ + @JsonProperty("MELOS") private String MELOS; + + /** + * + */ + @JsonProperty("XCV") private String XCV; + + /** + * + */ + @JsonProperty("ORN") private String ORN; + + /** + * + */ + @JsonProperty("WLKN") private String WLKN; + + /** + * + */ + @JsonProperty("AAVE") private String AAVE; + + /** + * + */ + @JsonProperty("MNT") private String MNT; + + /** + * + */ + @JsonProperty("BONK") private String BONK; + + /** + * + */ + @JsonProperty("PERP") private String PERP; + + /** + * + */ + @JsonProperty("XDC") private String XDC; + + /** + * + */ + @JsonProperty("MNW") private String MNW; + + /** + * + */ + @JsonProperty("XDB") private String XDB; + + /** + * + */ + @JsonProperty("BOND") private String BOND; + + /** + * + */ + @JsonProperty("SUIA") private String SUIA; + + /** + * + */ + @JsonProperty("MOG") private String MOG; + + /** + * + */ + @JsonProperty("SUTER") private String SUTER; + + /** + * + */ + @JsonProperty("TIME") private String TIME; + + /** + * + */ + @JsonProperty("RACA") private String RACA; + + /** + * + */ + @JsonProperty("BICO") private String BICO; + + /** + * + */ + @JsonProperty("MON") private String MON; + + /** + * + */ + @JsonProperty("SWEAT") private String SWEAT; + + /** + * + */ + @JsonProperty("MOXIE") private String MOXIE; + + /** + * + */ + @JsonProperty("BABYBNB") private String BABYBNB; + + /** + * + */ + @JsonProperty("IGU") private String IGU; + + /** + * + */ + @JsonProperty("HMSTR") private String HMSTR; + + /** + * + */ + @JsonProperty("XEC") private String XEC; + + /** + * + */ + @JsonProperty("MONI") private String MONI; + + /** + * + */ + @JsonProperty("XR") private String XR; + + /** + * + */ + @JsonProperty("PEOPLE") private String PEOPLE; + + /** + * + */ + @JsonProperty("PUMLX") private String PUMLX; + + /** + * + */ + @JsonProperty("ZIL") private String ZIL; + + /** + * + */ + @JsonProperty("WLDDOWN") private String WLDDOWN; + + /** + * + */ + @JsonProperty("VAI") private String VAI; + + /** + * + */ + @JsonProperty("XEN") private String XEN; + + /** + * + */ + @JsonProperty("MPC") private String MPC; + + /** + * + */ + @JsonProperty("XEM") private String XEM; + + /** + * + */ + @JsonProperty("JASMY3S") private String JASMY3S; + + /** + * + */ + @JsonProperty("OTK") private String OTK; + + /** + * + */ + @JsonProperty("TRAC") private String TRAC; + + /** + * + */ + @JsonProperty("DFYN") private String DFYN; + + /** + * + */ + @JsonProperty("BIDP") private String BIDP; + + /** + * + */ + @JsonProperty("JASMY3L") private String JASMY3L; + + /** + * + */ + @JsonProperty("INJDOWN") private String INJDOWN; + + /** + * + */ + @JsonProperty("KLV") private String KLV; + + /** + * + */ + @JsonProperty("WAXL") private String WAXL; + + /** + * + */ + @JsonProperty("TRBDOWN") private String TRBDOWN; + + /** + * + */ + @JsonProperty("BCH3L") private String BCH3L; + + /** + * + */ + @JsonProperty("GMT3S") private String GMT3S; + + /** + * + */ + @JsonProperty("KMD") private String KMD; + + /** + * + */ + @JsonProperty("BCH3S") private String BCH3S; + + /** + * + */ + @JsonProperty("ECOX") private String ECOX; + + /** + * + */ + @JsonProperty("AAVE3S") private String AAVE3S; + + /** + * + */ + @JsonProperty("GMT3L") private String GMT3L; + + /** + * + */ + @JsonProperty("EPIK") private String EPIK; + + /** + * + */ + @JsonProperty("SUIP") private String SUIP; + + /** + * + */ + @JsonProperty("AAVE3L") private String AAVE3L; + + /** + * + */ + @JsonProperty("ZK") private String ZK; + + /** + * + */ + @JsonProperty("ZKF") private String ZKF; + + /** + * + */ + @JsonProperty("OMNIA") private String OMNIA; + + /** + * + */ + @JsonProperty("ZKJ") private String ZKJ; + + /** + * + */ + @JsonProperty("ZKL") private String ZKL; + + /** + * + */ + @JsonProperty("GAFI") private String GAFI; + + /** + * + */ + @JsonProperty("CARV") private String CARV; + + /** + * + */ + @JsonProperty("KNC") private String KNC; + + /** + * + */ + @JsonProperty("CATS") private String CATS; + + /** + * + */ + @JsonProperty("PROM") private String PROM; + + /** + * + */ + @JsonProperty("ALEPH") private String ALEPH; + + /** + * + */ + @JsonProperty("PONKE") private String PONKE; + + /** + * + */ + @JsonProperty("OVR") private String OVR; + + /** + * + */ + @JsonProperty("CATI") private String CATI; + + /** + * + */ + @JsonProperty("ORDER") private String ORDER; + + /** + * + */ + @JsonProperty("GFT") private String GFT; + + /** + * + */ + @JsonProperty("BIFI") private String BIFI; + + /** + * + */ + @JsonProperty("GGC") private String GGC; + + /** + * + */ + @JsonProperty("GGG") private String GGG; + + /** + * + */ + @JsonProperty("DAPPX") private String DAPPX; + + /** + * + */ + @JsonProperty("SUKU") private String SUKU; + + /** + * + */ + @JsonProperty("ULTI") private String ULTI; + + /** + * + */ + @JsonProperty("CREDI") private String CREDI; + + /** + * + */ + @JsonProperty("ERTHA") private String ERTHA; + + /** + * + */ + @JsonProperty("FURY") private String FURY; + + /** + * + */ + @JsonProperty("KARRAT") private String KARRAT; + + /** + * + */ + @JsonProperty("MOBILE") private String MOBILE; + + /** + * + */ + @JsonProperty("SIDUS") private String SIDUS; + + /** + * + */ + @JsonProperty("NAVI") private String NAVI; + + /** + * + */ + @JsonProperty("TAO") private String TAO; + + /** + * + */ + @JsonProperty("USDJ") private String USDJ; + + /** + * + */ + @JsonProperty("MTL") private String MTL; + + /** + * + */ + @JsonProperty("VET") private String VET; + + /** + * + */ + @JsonProperty("FITFI") private String FITFI; + + /** + * + */ + @JsonProperty("USDT") private String USDT; + + /** + * + */ + @JsonProperty("OXT") private String OXT; + + /** + * + */ + @JsonProperty("CANDY") private String CANDY; + + /** + * + */ + @JsonProperty("USDP") private String USDP; + + /** + * + */ + @JsonProperty("MTS") private String MTS; + + /** + * + */ + @JsonProperty("TADA") private String TADA; + + /** + * + */ + @JsonProperty("MTV") private String MTV; + + /** + * + */ + @JsonProperty("NAVX") private String NAVX; + + /** + * + */ + @JsonProperty("ILV") private String ILV; + + /** + * + */ + @JsonProperty("VINU") private String VINU; + + /** + * + */ + @JsonProperty("GHX") private String GHX; + + /** + * + */ + @JsonProperty("EDU") private String EDU; + + /** + * + */ + @JsonProperty("HYVE") private String HYVE; + + /** + * + */ + @JsonProperty("BTC3L") private String BTC3L; + + /** + * + */ + @JsonProperty("ANYONE") private String ANYONE; + + /** + * + */ + @JsonProperty("BEAT") private String BEAT; + + /** + * + */ + @JsonProperty("KING") private String KING; + + /** + * + */ + @JsonProperty("CREAM") private String CREAM; + + /** + * + */ + @JsonProperty("CAS") private String CAS; + + /** + * + */ + @JsonProperty("IMX") private String IMX; + + /** + * + */ + @JsonProperty("CAT") private String CAT; + + /** + * + */ + @JsonProperty("BTC3S") private String BTC3S; + + /** + * + */ + @JsonProperty("USDE") private String USDE; + + /** + * + */ + @JsonProperty("USDD") private String USDD; + + /** + * + */ + @JsonProperty("CWAR") private String CWAR; + + /** + * + */ + @JsonProperty("USDC") private String USDC; + + /** + * + */ + @JsonProperty("KRL") private String KRL; + + /** + * + */ + @JsonProperty("INJ") private String INJ; + + /** + * + */ + @JsonProperty("GAME") private String GAME; + + /** + * + */ + @JsonProperty("TRIBL") private String TRIBL; + + /** + * + */ + @JsonProperty("XLM") private String XLM; + + /** + * + */ + @JsonProperty("TRBUP") private String TRBUP; + + /** + * + */ + @JsonProperty("VRADOWN") private String VRADOWN; + + /** + * + */ + @JsonProperty("SUPER") private String SUPER; + + /** + * + */ + @JsonProperty("EIGEN") private String EIGEN; + + /** + * + */ + @JsonProperty("IOI") private String IOI; + + /** + * + */ + @JsonProperty("KSM") private String KSM; + + /** + * + */ + @JsonProperty("CCD") private String CCD; + + /** + * + */ + @JsonProperty("EGO") private String EGO; + + /** + * + */ + @JsonProperty("EGP") private String EGP; + + /** + * + */ + @JsonProperty("MXC") private String MXC; + + /** + * + */ + @JsonProperty("TEL") private String TEL; + + /** + * + */ + @JsonProperty("MOVR") private String MOVR; + + /** + * + */ + @JsonProperty("XMR") private String XMR; + + /** + * + */ + @JsonProperty("MXM") private String MXM; + + /** + * + */ + @JsonProperty("OORT") private String OORT; + + /** + * + */ + @JsonProperty("GLM") private String GLM; + + /** + * + */ + @JsonProperty("RAY") private String RAY; + + /** + * + */ + @JsonProperty("XTAG") private String XTAG; + + /** + * + */ + @JsonProperty("GLQ") private String GLQ; + + /** + * + */ + @JsonProperty("CWEB") private String CWEB; + + /** + * + */ + @JsonProperty("REVU") private String REVU; + + /** + * + */ + @JsonProperty("REVV") private String REVV; + + /** + * + */ + @JsonProperty("ZRO") private String ZRO; + + /** + * + */ + @JsonProperty("XNL") private String XNL; + + /** + * + */ + @JsonProperty("XNO") private String XNO; + + /** + * + */ + @JsonProperty("SAROS") private String SAROS; + + /** + * + */ + @JsonProperty("KACE") private String KACE; + + /** + * + */ + @JsonProperty("ZRX") private String ZRX; + + /** + * + */ + @JsonProperty("WLTH") private String WLTH; + + /** + * + */ + @JsonProperty("ATOM3L") private String ATOM3L; + + /** + * + */ + @JsonProperty("GMM") private String GMM; + + /** + * + */ + @JsonProperty("BEER") private String BEER; + + /** + * + */ + @JsonProperty("GMT") private String GMT; + + /** + * + */ + @JsonProperty("HEART") private String HEART; + + /** + * + */ + @JsonProperty("GMX") private String GMX; + + /** + * + */ + @JsonProperty("ABBC") private String ABBC; + + /** + * + */ + @JsonProperty("OMNI") private String OMNI; + + /** + * + */ + @JsonProperty("ATOM3S") private String ATOM3S; + + /** + * + */ + @JsonProperty("IRL") private String IRL; + + /** + * + */ + @JsonProperty("CFG") private String CFG; + + /** + * + */ + @JsonProperty("WSDM") private String WSDM; + + /** + * + */ + @JsonProperty("GNS") private String GNS; + + /** + * + */ + @JsonProperty("VANRY") private String VANRY; + + /** + * + */ + @JsonProperty("CFX") private String CFX; + + /** + * + */ + @JsonProperty("GRAIL") private String GRAIL; + + /** + * + */ + @JsonProperty("BEFI") private String BEFI; + + /** + * + */ + @JsonProperty("VELO") private String VELO; + + /** + * + */ + @JsonProperty("XPR") private String XPR; + + /** + * + */ + @JsonProperty("DOVI") private String DOVI; + + /** + * + */ + @JsonProperty("ACE") private String ACE; + + /** + * + */ + @JsonProperty("ACH") private String ACH; + + /** + * + */ + @JsonProperty("ISP") private String ISP; + + /** + * + */ + @JsonProperty("XCAD") private String XCAD; + + /** + * + */ + @JsonProperty("MINA") private String MINA; + + /** + * + */ + @JsonProperty("TIA") private String TIA; + + /** + * + */ + @JsonProperty("DRIFT") private String DRIFT; + + /** + * + */ + @JsonProperty("ACQ") private String ACQ; + + /** + * + */ + @JsonProperty("ACS") private String ACS; + + /** + * + */ + @JsonProperty("MIND") private String MIND; + + /** + * + */ + @JsonProperty("STORE") private String STORE; + + /** + * + */ + @JsonProperty("REN") private String REN; + + /** + * + */ + @JsonProperty("ELA") private String ELA; + + /** + * + */ + @JsonProperty("DREAMS") private String DREAMS; + + /** + * + */ + @JsonProperty("ADA") private String ADA; + + /** + * + */ + @JsonProperty("ELF") private String ELF; + + /** + * + */ + @JsonProperty("REQ") private String REQ; + + /** + * + */ + @JsonProperty("STORJ") private String STORJ; + + /** + * + */ + @JsonProperty("LADYS") private String LADYS; + + /** + * + */ + @JsonProperty("PAXG") private String PAXG; + + /** + * + */ + @JsonProperty("REZ") private String REZ; + + /** + * + */ + @JsonProperty("XRD") private String XRD; + + /** + * + */ + @JsonProperty("CHO") private String CHO; + + /** + * + */ + @JsonProperty("CHR") private String CHR; + + /** + * + */ + @JsonProperty("ADS") private String ADS; + + /** + * + */ + @JsonProperty("CHZ") private String CHZ; + + /** + * + */ + @JsonProperty("ADX") private String ADX; + + /** + * + */ + @JsonProperty("XRP") private String XRP; + + /** + * + */ + @JsonProperty("JASMY") private String JASMY; + + /** + * + */ + @JsonProperty("KAGI") private String KAGI; + + /** + * + */ + @JsonProperty("FIDA") private String FIDA; + + /** + * + */ + @JsonProperty("PBR") private String PBR; + + /** + * + */ + @JsonProperty("AEG") private String AEG; + + /** + * + */ + @JsonProperty("H2O") private String H2O; + + /** + * + */ + @JsonProperty("CHMB") private String CHMB; + + /** + * + */ + @JsonProperty("SAND3L") private String SAND3L; + + /** + * + */ + @JsonProperty("PBX") private String PBX; + + /** + * + */ + @JsonProperty("SOLVE") private String SOLVE; + + /** + * + */ + @JsonProperty("DECHAT") private String DECHAT; + + /** + * + */ + @JsonProperty("GARI") private String GARI; + + /** + * + */ + @JsonProperty("SHIB2L") private String SHIB2L; + + /** + * + */ + @JsonProperty("SHIB2S") private String SHIB2S; + + /** + * + */ + @JsonProperty("ENA") private String ENA; + + /** + * + */ + @JsonProperty("VEMP") private String VEMP; + + /** + * + */ + @JsonProperty("ENJ") private String ENJ; + + /** + * + */ + @JsonProperty("AFG") private String AFG; + + /** + * + */ + @JsonProperty("RATS") private String RATS; + + /** + * + */ + @JsonProperty("GRT") private String GRT; + + /** + * + */ + @JsonProperty("FORWARD") private String FORWARD; + + /** + * + */ + @JsonProperty("TFUEL") private String TFUEL; + + /** + * + */ + @JsonProperty("ENS") private String ENS; + + /** + * + */ + @JsonProperty("KASDOWN") private String KASDOWN; + + /** + * + */ + @JsonProperty("XTM") private String XTM; + + /** + * + */ + @JsonProperty("DEGEN") private String DEGEN; + + /** + * + */ + @JsonProperty("TLM") private String TLM; + + /** + * + */ + @JsonProperty("DYDXDOWN") private String DYDXDOWN; + + /** + * + */ + @JsonProperty("CKB") private String CKB; + + /** + * + */ + @JsonProperty("LUNC") private String LUNC; + + /** + * + */ + @JsonProperty("AURORA") private String AURORA; + + /** + * + */ + @JsonProperty("LUNA") private String LUNA; + + /** + * + */ + @JsonProperty("XTZ") private String XTZ; + + /** + * + */ + @JsonProperty("ELON") private String ELON; + + /** + * + */ + @JsonProperty("DMTR") private String DMTR; + + /** + * + */ + @JsonProperty("EOS") private String EOS; + + /** + * + */ + @JsonProperty("GST") private String GST; + + /** + * + */ + @JsonProperty("FORT") private String FORT; + + /** + * + */ + @JsonProperty("FLAME") private String FLAME; + + /** + * + */ + @JsonProperty("PATEX") private String PATEX; + + /** + * + */ + @JsonProperty("DEEP") private String DEEP; + + /** + * + */ + @JsonProperty("ID3L") private String ID3L; + + /** + * + */ + @JsonProperty("GTC") private String GTC; + + /** + * + */ + @JsonProperty("ID3S") private String ID3S; + + /** + * + */ + @JsonProperty("RIO") private String RIO; + + /** + * + */ + @JsonProperty("CLH") private String CLH; + + /** + * + */ + @JsonProperty("BURGER") private String BURGER; + + /** + * + */ + @JsonProperty("VRA") private String VRA; + + /** + * + */ + @JsonProperty("SUNDOG") private String SUNDOG; + + /** + * + */ + @JsonProperty("GTT") private String GTT; + + /** + * + */ + @JsonProperty("INJUP") private String INJUP; + + /** + * + */ + @JsonProperty("CPOOL") private String CPOOL; + + /** + * + */ + @JsonProperty("EPX") private String EPX; + + /** + * + */ + @JsonProperty("CLV") private String CLV; + + /** + * + */ + @JsonProperty("FEAR") private String FEAR; + + /** + * + */ + @JsonProperty("MEME") private String MEME; + + /** + * + */ + @JsonProperty("ROOBEE") private String ROOBEE; + + /** + * + */ + @JsonProperty("DEFI") private String DEFI; + + /** + * + */ + @JsonProperty("TOKEN") private String TOKEN; + + /** + * + */ + @JsonProperty("GRAPE") private String GRAPE; + + /** + * + */ + @JsonProperty("KASUP") private String KASUP; + + /** + * + */ + @JsonProperty("XWG") private String XWG; + + /** + * + */ + @JsonProperty("SKEY") private String SKEY; + + /** + * + */ + @JsonProperty("SFUND") private String SFUND; + + /** + * + */ + @JsonProperty("EQX") private String EQX; + + /** + * + */ + @JsonProperty("ORDIUP") private String ORDIUP; + + /** + * + */ + @JsonProperty("TON") private String TON; + + /** + * + */ + @JsonProperty("DEGO") private String DEGO; + + /** + * + */ + @JsonProperty("IZI") private String IZI; + + /** + * + */ + @JsonProperty("ERG") private String ERG; + + /** + * + */ + @JsonProperty("ERN") private String ERN; + + /** + * + */ + @JsonProperty("VENOM") private String VENOM; + + /** + * + */ + @JsonProperty("VOXEL") private String VOXEL; + + /** + * + */ + @JsonProperty("RLC") private String RLC; + + /** + * + */ + @JsonProperty("PHA") private String PHA; + + /** + * + */ + @JsonProperty("DYDXUP") private String DYDXUP; + + /** + * + */ + @JsonProperty("APE3S") private String APE3S; + + /** + * + */ + @JsonProperty("ORBS") private String ORBS; + + /** + * + */ + @JsonProperty("OPDOWN") private String OPDOWN; + + /** + * + */ + @JsonProperty("ESE") private String ESE; + + /** + * + */ + @JsonProperty("APE3L") private String APE3L; + + /** + * + */ + @JsonProperty("HMND") private String HMND; + + /** + * + */ + @JsonProperty("COQ") private String COQ; + + /** + * + */ + @JsonProperty("AURY") private String AURY; + + /** + * + */ + @JsonProperty("CULT") private String CULT; + + /** + * + */ + @JsonProperty("AKT") private String AKT; + + /** + * + */ + @JsonProperty("GLMR") private String GLMR; + + /** + * + */ + @JsonProperty("XYM") private String XYM; + + /** + * + */ + @JsonProperty("ORAI") private String ORAI; + + /** + * + */ + @JsonProperty("XYO") private String XYO; + + /** + * + */ + @JsonProperty("ETC") private String ETC; + + /** + * + */ + @JsonProperty("LAI") private String LAI; + + /** + * + */ + @JsonProperty("PIP") private String PIP; + + /** + * + */ + @JsonProperty("ETH") private String ETH; + + /** + * + */ + @JsonProperty("NEO") private String NEO; + + /** + * + */ + @JsonProperty("RMV") private String RMV; + + /** + * + */ + @JsonProperty("KLAY") private String KLAY; + + /** + * + */ + @JsonProperty("PIT") private String PIT; + + /** + * + */ + @JsonProperty("TARA") private String TARA; + + /** + * + */ + @JsonProperty("KALT") private String KALT; + + /** + * + */ + @JsonProperty("PIX") private String PIX; + + /** + * + */ + @JsonProperty("ETN") private String ETN; + + /** + * + */ + @JsonProperty("CSIX") private String CSIX; + + /** + * + */ + @JsonProperty("TRADE") private String TRADE; + + /** + * + */ + @JsonProperty("MAVIA") private String MAVIA; + + /** + * + */ + @JsonProperty("HIGH") private String HIGH; + + /** + * + */ + @JsonProperty("TRB") private String TRB; + + /** + * + */ + @JsonProperty("ORDI") private String ORDI; + + /** + * + */ + @JsonProperty("TRVL") private String TRVL; + + /** + * + */ + @JsonProperty("AMB") private String AMB; + + /** + * + */ + @JsonProperty("TRU") private String TRU; + + /** + * + */ + @JsonProperty("LOGX") private String LOGX; + + /** + * + */ + @JsonProperty("FINC") private String FINC; + + /** + * + */ + @JsonProperty("INFRA") private String INFRA; + + /** + * + */ + @JsonProperty("NATIX") private String NATIX; + + /** + * + */ + @JsonProperty("NFP") private String NFP; + + /** + * + */ + @JsonProperty("TRY") private String TRY; + + /** + * + */ + @JsonProperty("TRX") private String TRX; + + /** + * + */ + @JsonProperty("LBP") private String LBP; + + /** + * + */ + @JsonProperty("LBR") private String LBR; + + /** + * + */ + @JsonProperty("EUL") private String EUL; + + /** + * + */ + @JsonProperty("NFT") private String NFT; + + /** + * + */ + @JsonProperty("SEIUP") private String SEIUP; + + /** + * + */ + @JsonProperty("PUFFER") private String PUFFER; + + /** + * + */ + @JsonProperty("EUR") private String EUR; + + /** + * + */ + @JsonProperty("ORCA") private String ORCA; + + /** + * + */ + @JsonProperty("NEAR3L") private String NEAR3L; + + /** + * + */ + @JsonProperty("AMP") private String AMP; + + /** + * + */ + @JsonProperty("XDEFI") private String XDEFI; + + /** + * + */ + @JsonProperty("HIFI") private String HIFI; + + /** + * + */ + @JsonProperty("TRUF") private String TRUF; + + /** + * + */ + @JsonProperty("AITECH") private String AITECH; + + /** + * + */ + @JsonProperty("AMU") private String AMU; + + /** + * + */ + @JsonProperty("USTC") private String USTC; + + /** + * + */ + @JsonProperty("KNGL") private String KNGL; + + /** + * + */ + @JsonProperty("FOXY") private String FOXY; + + /** + * + */ + @JsonProperty("NGC") private String NGC; + + /** + * + */ + @JsonProperty("TENET") private String TENET; + + /** + * + */ + @JsonProperty("NEAR3S") private String NEAR3S; + + /** + * + */ + @JsonProperty("MAHA") private String MAHA; + + /** + * + */ + @JsonProperty("NGL") private String NGL; + + /** + * + */ + @JsonProperty("TST") private String TST; + + /** + * + */ + @JsonProperty("HIPPO") private String HIPPO; + + /** + * + */ + @JsonProperty("AXS3S") private String AXS3S; + + /** + * + */ + @JsonProperty("CRO") private String CRO; + + /** + * + */ + @JsonProperty("ZPAY") private String ZPAY; + + /** + * + */ + @JsonProperty("MNDE") private String MNDE; + + /** + * + */ + @JsonProperty("CRV") private String CRV; + + /** + * + */ + @JsonProperty("SWASH") private String SWASH; + + /** + * + */ + @JsonProperty("AXS3L") private String AXS3L; + + /** + * + */ + @JsonProperty("VERSE") private String VERSE; + + /** + * + */ + @JsonProperty("RPK") private String RPK; + + /** + * + */ + @JsonProperty("RPL") private String RPL; + + /** + * + */ + @JsonProperty("AZERO") private String AZERO; + + /** + * + */ + @JsonProperty("SOUL") private String SOUL; + + /** + * + */ + @JsonProperty("VXV") private String VXV; + + /** + * + */ + @JsonProperty("LDO") private String LDO; + + /** + * + */ + @JsonProperty("MAGIC") private String MAGIC; + + /** + * + */ + @JsonProperty("ALICE") private String ALICE; + + /** + * + */ + @JsonProperty("SEAM") private String SEAM; + + /** + * + */ + @JsonProperty("PLU") private String PLU; + + /** + * + */ + @JsonProperty("AOG") private String AOG; + + /** + * + */ + @JsonProperty("SMOLE") private String SMOLE; + + /** + * + */ + @JsonProperty("EWT") private String EWT; + + /** + * + */ + @JsonProperty("TSUGT") private String TSUGT; + + /** + * + */ + @JsonProperty("PMG") private String PMG; + + /** + * + */ + @JsonProperty("OPAI") private String OPAI; + + /** + * + */ + @JsonProperty("LOCUS") private String LOCUS; + + /** + * + */ + @JsonProperty("CTA") private String CTA; + + /** + * + */ + @JsonProperty("NIM") private String NIM; + + /** + * + */ + @JsonProperty("CTC") private String CTC; + + /** + * + */ + @JsonProperty("APE") private String APE; + + /** + * + */ + @JsonProperty("MERL") private String MERL; + + /** + * + */ + @JsonProperty("JAM") private String JAM; + + /** + * + */ + @JsonProperty("CTI") private String CTI; + + /** + * + */ + @JsonProperty("APP") private String APP; + + /** + * + */ + @JsonProperty("APT") private String APT; + + /** + * + */ + @JsonProperty("WLDUP") private String WLDUP; + + /** + * + */ + @JsonProperty("ZEND") private String ZEND; + + /** + * + */ + @JsonProperty("FIRE") private String FIRE; + + /** + * + */ + @JsonProperty("DENT") private String DENT; + + /** + * + */ + @JsonProperty("PYTH") private String PYTH; + + /** + * + */ + @JsonProperty("LFT") private String LFT; + + /** + * + */ + @JsonProperty("DPET") private String DPET; + + /** + * + */ + @JsonProperty("ORDIDOWN") private String ORDIDOWN; + + /** + * + */ + @JsonProperty("KPOL") private String KPOL; + + /** + * + */ + @JsonProperty("ETHUP") private String ETHUP; + + /** + * + */ + @JsonProperty("BAND") private String BAND; + + /** + * + */ + @JsonProperty("POL") private String POL; + + /** + * + */ + @JsonProperty("ASTR") private String ASTR; + + /** + * + */ + @JsonProperty("NKN") private String NKN; + + /** + * + */ + @JsonProperty("RSR") private String RSR; + + /** + * + */ + @JsonProperty("DVPN") private String DVPN; + + /** + * + */ + @JsonProperty("TWT") private String TWT; + + /** + * + */ + @JsonProperty("ARB") private String ARB; + + /** + * + */ + @JsonProperty("CVC") private String CVC; + + /** + * + */ + @JsonProperty("ARC") private String ARC; + + /** + * + */ + @JsonProperty("XETA") private String XETA; + + /** + * + */ + @JsonProperty("MTRG") private String MTRG; + + /** + * + */ + @JsonProperty("LOKA") private String LOKA; + + /** + * + */ + @JsonProperty("LPOOL") private String LPOOL; + + /** + * + */ + @JsonProperty("TURBOS") private String TURBOS; + + /** + * + */ + @JsonProperty("CVX") private String CVX; + + /** + * + */ + @JsonProperty("ARX") private String ARX; + + /** + * + */ + @JsonProperty("MPLX") private String MPLX; + + /** + * + */ + @JsonProperty("SUSHI") private String SUSHI; + + /** + * + */ + @JsonProperty("NLK") private String NLK; + + /** + * + */ + @JsonProperty("PEPE2") private String PEPE2; + + /** + * + */ + @JsonProperty("WBTC") private String WBTC; + + /** + * + */ + @JsonProperty("SUI3L") private String SUI3L; + + /** + * + */ + @JsonProperty("CWS") private String CWS; + + /** + * + */ + @JsonProperty("SUI3S") private String SUI3S; + + /** + * + */ + @JsonProperty("INSP") private String INSP; + + /** + * + */ + @JsonProperty("MANA") private String MANA; + + /** + * + */ + @JsonProperty("VRTX") private String VRTX; + + /** + * + */ + @JsonProperty("CSPR") private String CSPR; + + /** + * + */ + @JsonProperty("ATA") private String ATA; + + /** + * + */ + @JsonProperty("OPEN") private String OPEN; + + /** + * + */ + @JsonProperty("HAI") private String HAI; + + /** + * + */ + @JsonProperty("NMR") private String NMR; + + /** + * + */ + @JsonProperty("ATH") private String ATH; + + /** + * + */ + @JsonProperty("LIT") private String LIT; + + /** + * + */ + @JsonProperty("TLOS") private String TLOS; + + /** + * + */ + @JsonProperty("TNSR") private String TNSR; + + /** + * + */ + @JsonProperty("CXT") private String CXT; + + /** + * + */ + @JsonProperty("POLYX") private String POLYX; + + /** + * + */ + @JsonProperty("ZERO") private String ZERO; + + /** + * + */ + @JsonProperty("ROUTE") private String ROUTE; + + /** + * + */ + @JsonProperty("LOOM") private String LOOM; + + /** + * + */ + @JsonProperty("PRE") private String PRE; + + /** + * + */ + @JsonProperty("VRAUP") private String VRAUP; + + /** + * + */ + @JsonProperty("HBB") private String HBB; + + /** + * + */ + @JsonProperty("RVN") private String RVN; + + /** + * + */ + @JsonProperty("PRQ") private String PRQ; + + /** + * + */ + @JsonProperty("ONDO") private String ONDO; + + /** + * + */ + @JsonProperty("PEPEDOWN") private String PEPEDOWN; + + /** + * + */ + @JsonProperty("WOOP") private String WOOP; + + /** + * + */ + @JsonProperty("LUNCUP") private String LUNCUP; + + /** + * + */ + @JsonProperty("KAVA") private String KAVA; + + /** + * + */ + @JsonProperty("LKI") private String LKI; + + /** + * + */ + @JsonProperty("AVA") private String AVA; + + /** + * + */ + @JsonProperty("NOM") private String NOM; + + /** + * + */ + @JsonProperty("MAPO") private String MAPO; + + /** + * + */ + @JsonProperty("PEPEUP") private String PEPEUP; + + /** + * + */ + @JsonProperty("STRAX") private String STRAX; + + /** + * + */ + @JsonProperty("NOT") private String NOT; + + /** + * + */ + @JsonProperty("ZERC") private String ZERC; + + /** + * + */ + @JsonProperty("BCUT") private String BCUT; + + /** + * + */ + @JsonProperty("MASA") private String MASA; + + /** + * + */ + @JsonProperty("WAN") private String WAN; + + /** + * + */ + @JsonProperty("WAT") private String WAT; + + /** + * + */ + @JsonProperty("WAX") private String WAX; + + /** + * + */ + @JsonProperty("MASK") private String MASK; + + /** + * + */ + @JsonProperty("EOS3L") private String EOS3L; + + /** + * + */ + @JsonProperty("IDEA") private String IDEA; + + /** + * + */ + @JsonProperty("EOS3S") private String EOS3S; + + /** + * + */ + @JsonProperty("YFI") private String YFI; + + /** + * + */ + @JsonProperty("MOODENG") private String MOODENG; + + /** + * + */ + @JsonProperty("XCUR") private String XCUR; + + /** + * + */ + @JsonProperty("HYDRA") private String HYDRA; + + /** + * + */ + @JsonProperty("POPCAT") private String POPCAT; + + /** + * + */ + @JsonProperty("LQTY") private String LQTY; + + /** + * + */ + @JsonProperty("PIXEL") private String PIXEL; + + /** + * + */ + @JsonProperty("LMR") private String LMR; + + /** + * + */ + @JsonProperty("ZETA") private String ZETA; + + /** + * + */ + @JsonProperty("YGG") private String YGG; + + /** + * + */ + @JsonProperty("AXS") private String AXS; + + /** + * + */ + @JsonProperty("BCHSV") private String BCHSV; + + /** + * + */ + @JsonProperty("NRN") private String NRN; + + /** + * + */ + @JsonProperty("FTON") private String FTON; + + /** + * + */ + @JsonProperty("COMP") private String COMP; + + /** + * + */ + @JsonProperty("XPRT") private String XPRT; + + /** + * + */ + @JsonProperty("HFT") private String HFT; + + /** + * + */ + @JsonProperty("UXLINK") private String UXLINK; + + /** + * + */ + @JsonProperty("STAMP") private String STAMP; + + /** + * + */ + @JsonProperty("RUNE") private String RUNE; + + /** + * + */ + @JsonProperty("ZEUS") private String ZEUS; + + /** + * + */ + @JsonProperty("LTC3L") private String LTC3L; + + /** + * + */ + @JsonProperty("DAPP") private String DAPP; + + /** + * + */ + @JsonProperty("FORTH") private String FORTH; + + /** + * + */ + @JsonProperty("ALPINE") private String ALPINE; + + /** + * + */ + @JsonProperty("SENSO") private String SENSO; + + /** + * + */ + @JsonProperty("LTC3S") private String LTC3S; + + /** + * + */ + @JsonProperty("DEXE") private String DEXE; + + /** + * + */ + @JsonProperty("GOAL") private String GOAL; + + /** + * + */ + @JsonProperty("AVAX") private String AVAX; + + /** + * + */ + @JsonProperty("LISTA") private String LISTA; + + /** + * + */ + @JsonProperty("AMPL") private String AMPL; + + /** + * + */ + @JsonProperty("WORK") private String WORK; + + /** + * + */ + @JsonProperty("BRWL") private String BRWL; + + /** + * + */ + @JsonProperty("BANANA") private String BANANA; + + /** + * + */ + @JsonProperty("PUSH") private String PUSH; + + /** + * + */ + @JsonProperty("WEN") private String WEN; + + /** + * + */ + @JsonProperty("NEIRO") private String NEIRO; + + /** + * + */ + @JsonProperty("BTCUP") private String BTCUP; + + /** + * + */ + @JsonProperty("SOL3S") private String SOL3S; + + /** + * + */ + @JsonProperty("BRAWL") private String BRAWL; + + /** + * + */ + @JsonProperty("LAY3R") private String LAY3R; + + /** + * + */ + @JsonProperty("LPT") private String LPT; + + /** + * + */ + @JsonProperty("GODS") private String GODS; + + /** + * + */ + @JsonProperty("SAND3S") private String SAND3S; + + /** + * + */ + @JsonProperty("RDNT") private String RDNT; + + /** + * + */ + @JsonProperty("SOL3L") private String SOL3L; + + /** + * + */ + @JsonProperty("NIBI") private String NIBI; + + /** + * + */ + @JsonProperty("NUM") private String NUM; + + /** + * + */ + @JsonProperty("PYR") private String PYR; + + /** + * + */ + @JsonProperty("DAG") private String DAG; + + /** + * + */ + @JsonProperty("DAI") private String DAI; + + /** + * + */ + @JsonProperty("HIP") private String HIP; + + /** + * + */ + @JsonProperty("DAO") private String DAO; + + /** + * + */ + @JsonProperty("AVAIL") private String AVAIL; + + /** + * + */ + @JsonProperty("DAR") private String DAR; + + /** + * + */ + @JsonProperty("FET") private String FET; + + /** + * + */ + @JsonProperty("FCON") private String FCON; + + /** + * + */ + @JsonProperty("XAVA") private String XAVA; + + /** + * + */ + @JsonProperty("LRC") private String LRC; + + /** + * + */ + @JsonProperty("UNI3S") private String UNI3S; + + /** + * + */ + @JsonProperty("POKT") private String POKT; + + /** + * + */ + @JsonProperty("DASH") private String DASH; + + /** + * + */ + @JsonProperty("BAKEDOWN") private String BAKEDOWN; + + /** + * + */ + @JsonProperty("POLC") private String POLC; + + /** + * + */ + @JsonProperty("CIRUS") private String CIRUS; + + /** + * + */ + @JsonProperty("UNI3L") private String UNI3L; + + /** + * + */ + @JsonProperty("NWC") private String NWC; + + /** + * + */ + @JsonProperty("POLK") private String POLK; + + /** + * + */ + @JsonProperty("LSD") private String LSD; + + /** + * + */ + @JsonProperty("MARS4") private String MARS4; + + /** + * + */ + @JsonProperty("LSK") private String LSK; + + /** + * + */ + @JsonProperty("BLOCK") private String BLOCK; + + /** + * + */ + @JsonProperty("ANALOS") private String ANALOS; + + /** + * + */ + @JsonProperty("SAFE") private String SAFE; + + /** + * + */ + @JsonProperty("DCK") private String DCK; + + /** + * + */ + @JsonProperty("LSS") private String LSS; + + /** + * + */ + @JsonProperty("DCR") private String DCR; + + /** + * + */ + @JsonProperty("LIKE") private String LIKE; + + /** + * + */ + @JsonProperty("DATA") private String DATA; + + /** + * + */ + @JsonProperty("WIF") private String WIF; + + /** + * + */ + @JsonProperty("BLOK") private String BLOK; + + /** + * + */ + @JsonProperty("LTC") private String LTC; + + /** + * + */ + @JsonProperty("METIS") private String METIS; + + /** + * + */ + @JsonProperty("WIN") private String WIN; + + /** + * + */ + @JsonProperty("HLG") private String HLG; + + /** + * + */ + @JsonProperty("LTO") private String LTO; + + /** + * + */ + @JsonProperty("DYDX") private String DYDX; + + /** + * + */ + @JsonProperty("ARB3S") private String ARB3S; + + /** + * + */ + @JsonProperty("MUBI") private String MUBI; + + /** + * + */ + @JsonProperty("ARB3L") private String ARB3L; + + /** + * + */ + @JsonProperty("RBTC1") private String RBTC1; + + /** + * + */ + @JsonProperty("POND") private String POND; + + /** + * + */ + @JsonProperty("LINA") private String LINA; + + /** + * + */ + @JsonProperty("MYRIA") private String MYRIA; + + /** + * + */ + @JsonProperty("LINK") private String LINK; + + /** + * + */ + @JsonProperty("QTUM") private String QTUM; + + /** + * + */ + @JsonProperty("TUNE") private String TUNE; + + /** + * + */ + @JsonProperty("UFO") private String UFO; + + /** + * + */ + @JsonProperty("CYBER") private String CYBER; + + /** + * + */ + @JsonProperty("WILD") private String WILD; + + /** + * + */ + @JsonProperty("POLS") private String POLS; + + /** + * + */ + @JsonProperty("NYM") private String NYM; + + /** + * + */ + @JsonProperty("FIL") private String FIL; + + /** + * + */ + @JsonProperty("BAL") private String BAL; + + /** + * + */ + @JsonProperty("SCA") private String SCA; + + /** + * + */ + @JsonProperty("STND") private String STND; + + /** + * + */ + @JsonProperty("WMTX") private String WMTX; + + /** + * + */ + @JsonProperty("SCLP") private String SCLP; + + /** + * + */ + @JsonProperty("MANEKI") private String MANEKI; + + /** + * + */ + @JsonProperty("BAT") private String BAT; + + /** + * + */ + @JsonProperty("AKRO") private String AKRO; + + /** + * + */ + @JsonProperty("FTM3L") private String FTM3L; + + /** + * + */ + @JsonProperty("BAX") private String BAX; + + /** + * + */ + @JsonProperty("FTM3S") private String FTM3S; + + /** + * + */ + @JsonProperty("COTI") private String COTI; + + /** + * common response + */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFullOrderBookReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFullOrderBookReq.java new file mode 100644 index 00000000..3f8529d3 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFullOrderBookReq.java @@ -0,0 +1,23 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFullOrderBookReq implements Request { + /** + * symbol + */ + @JsonProperty("symbol") private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFullOrderBookResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFullOrderBookResp.java new file mode 100644 index 00000000..0ba95160 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFullOrderBookResp.java @@ -0,0 +1,45 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetFullOrderBookResp + implements Response> { + /** Timestamp(millisecond) */ + @JsonProperty("time") + private Long time; + + /** Sequence number */ + @JsonProperty("sequence") + private String sequence; + + /** bids, from high to low */ + @JsonProperty("bids") + private List> bids = new ArrayList<>(); + + /** asks, from low to high */ + @JsonProperty("asks") + private List> asks = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesReq.java new file mode 100644 index 00000000..108e406d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesReq.java @@ -0,0 +1,124 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetKlinesReq implements Request { + /** + * symbol + */ + @JsonProperty("symbol") private String symbol; + + /** + * Type of candlestick patterns: 1min, 3min, 5min, 15min, 30min, 1hour, 2hour, + * 4hour, 6hour, 8hour, 12hour, 1day, 1week, 1month + */ + @JsonProperty("type") private TypeEnum type; + + /** + * Start time (second), default is 0 + */ + @JsonProperty("startAt") @Builder.Default private Long startAt = 0l; + + /** + * End time (second), default is 0 + */ + @JsonProperty("endAt") @Builder.Default private Long endAt = 0l; + + public enum TypeEnum { + /** + * 1min + */ + _1MIN("1min"), + /** + * 3min + */ + _3MIN("3min"), + /** + * 5min + */ + _5MIN("5min"), + /** + * 15min + */ + _15MIN("15min"), + /** + * 30min + */ + _30MIN("30min"), + /** + * 1hour + */ + _1HOUR("1hour"), + /** + * 2hour + */ + _2HOUR("2hour"), + /** + * 4hour + */ + _4HOUR("4hour"), + /** + * 6hour + */ + _6HOUR("6hour"), + /** + * 8hour + */ + _8HOUR("8hour"), + /** + * 12hour + */ + _12HOUR("12hour"), + /** + * 1day + */ + _1DAY("1day"), + /** + * 1week + */ + _1WEEK("1week"), + /** + * 1month + */ + _1MONTH("1month"); + + private final String value; + + TypeEnum(String value) { this.value = value; } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesResp.java new file mode 100644 index 00000000..c3bf69a2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesResp.java @@ -0,0 +1,45 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetKlinesResp + implements Response> { + /** + * + */ + @JsonProperty("data") private List> data = new ArrayList<>(); + + /** + * common response + */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetKlinesResp fromJson(List> data) { + // original response + GetKlinesResp obj = new GetKlinesResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetMarketListResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetMarketListResp.java new file mode 100644 index 00000000..666f032f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetMarketListResp.java @@ -0,0 +1,45 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetMarketListResp + implements Response> { + /** + * + */ + @JsonProperty("data") private List data = new ArrayList<>(); + + /** + * common response + */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetMarketListResp fromJson(List data) { + // original response + GetMarketListResp obj = new GetMarketListResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPartOrderBookReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPartOrderBookReq.java new file mode 100644 index 00000000..7972b711 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPartOrderBookReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPartOrderBookReq implements Request { + /** + * symbol + */ + @JsonProperty("symbol") private String symbol; + + /** + * Get the depth layer, optional value: 20, 100 + */ + @JsonIgnore @PathVar("size") @JsonProperty("size") private String size; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPartOrderBookResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPartOrderBookResp.java new file mode 100644 index 00000000..88f65625 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPartOrderBookResp.java @@ -0,0 +1,52 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPartOrderBookResp + implements Response> { + /** + * Timestamp(millisecond) + */ + @JsonProperty("time") private Long time; + + /** + * Sequence number + */ + @JsonProperty("sequence") private String sequence; + + /** + * bids, from high to low + */ + @JsonProperty("bids") private List> bids = new ArrayList<>(); + + /** + * asks, from low to high + */ + @JsonProperty("asks") private List> asks = new ArrayList<>(); + + /** + * common response + */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPrivateTokenInstanceServers.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPrivateTokenInstanceServers.java new file mode 100644 index 00000000..563ab814 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPrivateTokenInstanceServers.java @@ -0,0 +1,74 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPrivateTokenInstanceServers { + /** + * Websocket domain URL. It is recommended to use a dynamic URL, as the URL + * may change. + */ + @JsonProperty("endpoint") private String endpoint; + + /** + * Whether to encrypt. Currently only supports wss, not ws + */ + @JsonProperty("encrypt") private Boolean encrypt; + + /** + * Network Protocol + */ + @JsonProperty("protocol") private ProtocolEnum protocol; + + /** + * Recommended ping interval (milliseconds) + */ + @JsonProperty("pingInterval") private Integer pingInterval; + + /** + * Heartbeat timeout (milliseconds) + */ + @JsonProperty("pingTimeout") private Integer pingTimeout; + + public enum ProtocolEnum { + /** + * Websocket + */ + WEBSOCKET("websocket"); + + private final String value; + + ProtocolEnum(String value) { this.value = value; } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ProtocolEnum fromValue(String value) { + for (ProtocolEnum b : ProtocolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPrivateTokenResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPrivateTokenResp.java new file mode 100644 index 00000000..3f8d1273 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPrivateTokenResp.java @@ -0,0 +1,44 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPrivateTokenResp + implements Response> { + /** + * The token required to establish a Websocket connection + */ + @JsonProperty("token") private String token; + + /** + * + */ + @JsonProperty("instanceServers") + private List instanceServers = + new ArrayList<>(); + + /** + * common response + */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPublicTokenInstanceServers.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPublicTokenInstanceServers.java new file mode 100644 index 00000000..dcdb609f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPublicTokenInstanceServers.java @@ -0,0 +1,74 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPublicTokenInstanceServers { + /** + * Websocket domain URL. It is recommended to use a dynamic URL, as the URL + * may change. + */ + @JsonProperty("endpoint") private String endpoint; + + /** + * Whether to encrypt. Currently only supports wss, not ws + */ + @JsonProperty("encrypt") private Boolean encrypt; + + /** + * Network Protocol + */ + @JsonProperty("protocol") private ProtocolEnum protocol; + + /** + * Recommended ping interval (milliseconds) + */ + @JsonProperty("pingInterval") private Integer pingInterval; + + /** + * Heartbeat timeout (milliseconds) + */ + @JsonProperty("pingTimeout") private Integer pingTimeout; + + public enum ProtocolEnum { + /** + * Websocket + */ + WEBSOCKET("websocket"); + + private final String value; + + ProtocolEnum(String value) { this.value = value; } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ProtocolEnum fromValue(String value) { + for (ProtocolEnum b : ProtocolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPublicTokenResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPublicTokenResp.java new file mode 100644 index 00000000..c40a7dab --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPublicTokenResp.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetPublicTokenResp + implements Response> { + /** + * The token required to establish a Websocket connection + */ + @JsonProperty("token") private String token; + + /** + * + */ + @JsonProperty("instanceServers") + private List instanceServers = + new ArrayList<>(); + + /** + * common response + */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServerTimeResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServerTimeResp.java new file mode 100644 index 00000000..4be1fbf5 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServerTimeResp.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetServerTimeResp + implements Response> { + /** + * ServerTime (milliseconds) + */ + @JsonProperty("data") private Long data; + + /** + * common response + */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetServerTimeResp fromJson(Long data) { + // original response + GetServerTimeResp obj = new GetServerTimeResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServiceStatusResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServiceStatusResp.java new file mode 100644 index 00000000..97f3c31c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServiceStatusResp.java @@ -0,0 +1,83 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetServiceStatusResp + implements Response> { + /** + * Status of service: open: normal transaction; close: Stop + * Trading/Maintenance; cancelonly: can only cancel the order but not place + * order + */ + @JsonProperty("status") private StatusEnum status; + + /** + * Remark for operation + */ + @JsonProperty("msg") private String msg; + + /** + * common response + */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum StatusEnum { + /** + * normal transaction + */ + OPEN("open"), + /** + * Stop Trading/Maintenance + */ + CLOSE("close"), + /** + * can only cancel the order but not place order + */ + CANCELONLY("cancelonly"); + + private final String value; + + StatusEnum(String value) { this.value = value; } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetSymbolReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetSymbolReq.java new file mode 100644 index 00000000..ad169a0d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetSymbolReq.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSymbolReq implements Request { + /** + * Path parameter, Symbol + */ + @JsonIgnore @PathVar("symbol") @JsonProperty("symbol") private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetSymbolResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetSymbolResp.java new file mode 100644 index 00000000..5bd267d9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetSymbolResp.java @@ -0,0 +1,200 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSymbolResp implements Response> { + /** unique code of a symbol, it would not change after renaming */ + @JsonProperty("symbol") + private String symbol; + + /** Name of trading pairs, it would change after renaming */ + @JsonProperty("name") + private String name; + + /** Base currency,e.g. BTC. */ + @JsonProperty("baseCurrency") + private String baseCurrency; + + /** Quote currency,e.g. USDT. */ + @JsonProperty("quoteCurrency") + private String quoteCurrency; + + /** The currency of charged fees. */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** The trading market. */ + @JsonProperty("market") + private String market; + + /** The minimum order quantity requried to place an order. */ + @JsonProperty("baseMinSize") + private String baseMinSize; + + /** The minimum order funds required to place a market order. */ + @JsonProperty("quoteMinSize") + private String quoteMinSize; + + /** The maximum order size required to place an order. */ + @JsonProperty("baseMaxSize") + private String baseMaxSize; + + /** The maximum order funds required to place a market order. */ + @JsonProperty("quoteMaxSize") + private String quoteMaxSize; + + /** + * 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. + */ + @JsonProperty("baseIncrement") + private String baseIncrement; + + /** + * 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. + */ + @JsonProperty("quoteIncrement") + private String quoteIncrement; + + /** + * 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. + */ + @JsonProperty("priceIncrement") + private String priceIncrement; + + /** Threshold for price portection */ + @JsonProperty("priceLimitRate") + private String priceLimitRate; + + /** The minimum trading amounts */ + @JsonProperty("minFunds") + private String minFunds; + + /** Available for margin or not. */ + @JsonProperty("isMarginEnabled") + private Boolean isMarginEnabled; + + /** Available for transaction or not. */ + @JsonProperty("enableTrading") + private Boolean enableTrading; + + /** [Fee Type](https://www.kucoin.com/vip/privilege) */ + @JsonProperty("feeCategory") + private FeeCategoryEnum feeCategory; + + /** + * 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 + */ + @JsonProperty("makerFeeCoefficient") + private String makerFeeCoefficient; + + /** + * 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 + */ + @JsonProperty("takerFeeCoefficient") + private String takerFeeCoefficient; + + /** Whether it is a [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol */ + @JsonProperty("st") + private Boolean st; + + /** The [call auction](https://www.kucoin.com/support/40999744334105) status returns true/false */ + @JsonProperty("callauctionIsEnabled") + private Boolean callauctionIsEnabled; + + /** The lowest price declared in the call auction */ + @JsonProperty("callauctionPriceFloor") + private String callauctionPriceFloor; + + /** The highest bid price in the call auction */ + @JsonProperty("callauctionPriceCeiling") + private String callauctionPriceCeiling; + + /** The first phase of the call auction starts at (Allow add orders, allow cancel orders) */ + @JsonProperty("callauctionFirstStageStartTime") + private Long callauctionFirstStageStartTime; + + /** + * The second phase of the call auction starts at (Allow add orders, don't allow cancel orders) + */ + @JsonProperty("callauctionSecondStageStartTime") + private Long callauctionSecondStageStartTime; + + /** + * The third phase of the call auction starts at (Don't allow add orders, don't allow cancel + * orders) + */ + @JsonProperty("callauctionThirdStageStartTime") + private Long callauctionThirdStageStartTime; + + /** Official opening time (end time of the third phase of call auction) */ + @JsonProperty("tradingStartTime") + private Long tradingStartTime; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum FeeCategoryEnum { + /** classA */ + CLASSA(1), + /** classB */ + CLASSB(2), + /** classC */ + CLASSC(3); + + private final Integer value; + + FeeCategoryEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FeeCategoryEnum fromValue(Integer value) { + for (FeeCategoryEnum b : FeeCategoryEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTickerReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTickerReq.java new file mode 100644 index 00000000..e924c59c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTickerReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTickerReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTickerResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTickerResp.java new file mode 100644 index 00000000..93fc0a00 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTickerResp.java @@ -0,0 +1,69 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTickerResp + implements Response> { + /** + * timestamp + */ + @JsonProperty("time") private Long time; + + /** + * Sequence + */ + @JsonProperty("sequence") private String sequence; + + /** + * Last traded price + */ + @JsonProperty("price") private String price; + + /** + * Last traded size + */ + @JsonProperty("size") private String size; + + /** + * Best bid price + */ + @JsonProperty("bestBid") private String bestBid; + + /** + * Best bid size + */ + @JsonProperty("bestBidSize") private String bestBidSize; + + /** + * Best ask price + */ + @JsonProperty("bestAsk") private String bestAsk; + + /** + * Best ask size + */ + @JsonProperty("bestAskSize") private String bestAskSize; + + /** + * common response + */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryData.java new file mode 100644 index 00000000..0faf701d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryData.java @@ -0,0 +1,73 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryData { + /** Sequence number */ + @JsonProperty("sequence") + private String sequence; + + /** Filled price */ + @JsonProperty("price") + private String price; + + /** Filled amount */ + @JsonProperty("size") + private String size; + + /** + * 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. + */ + @JsonProperty("side") + private SideEnum side; + + /** Filled timestamp(nanosecond) */ + @JsonProperty("time") + private Long time; + + public enum SideEnum { + /** buy */ + BUY("buy"), + /** sell */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryReq.java new file mode 100644 index 00000000..f942b79c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryReq.java @@ -0,0 +1,23 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryReq implements Request { + /** + * symbol + */ + @JsonProperty("symbol") private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryResp.java new file mode 100644 index 00000000..62421fad --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryResp.java @@ -0,0 +1,47 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryResp + implements Response> { + /** + * + */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** + * common response + */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetTradeHistoryResp fromJson(List data) { + // original response + GetTradeHistoryResp obj = new GetTradeHistoryResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.java new file mode 100644 index 00000000..db43e9a0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.java @@ -0,0 +1,373 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; + +public interface MarketApi { + /** + * Get Announcements + * This interface can obtain the latest news announcements, and the default + * page search is for announcements within a month. docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+--------+ + */ + GetAnnouncementsResp getAnnouncements(GetAnnouncementsReq req); + + /** + * Get Currency + * Request the currency details of a specified currency via this endpoint. + * docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ + */ + GetCurrencyResp getCurrency(GetCurrencyReq req); + + /** + * Get All Currencies + * Request a currency list via this endpoint. Not all currencies can currently + * be used for trading. docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ + */ + GetAllCurrenciesResp getAllCurrencies(); + + /** + * Get Symbol + * 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. docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 4 | + * +-----------------------+--------+ + */ + GetSymbolResp getSymbol(GetSymbolReq req); + + /** + * Get All Symbols + * 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. docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 4 | + * +-----------------------+--------+ + */ + GetAllSymbolsResp getAllSymbols(GetAllSymbolsReq req); + + /** + * Get Ticker + * 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. docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+--------+ + */ + GetTickerResp getTicker(GetTickerReq req); + + /** + * Get All Tickers + * 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. docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+--------+ + */ + GetAllTickersResp getAllTickers(); + + /** + * Get Trade History + * Request via this endpoint to get the trade history of the specified symbol, + * the returned quantity is the last 100 transaction records. docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ + */ + GetTradeHistoryResp getTradeHistory(GetTradeHistoryReq req); + + /** + * Get Klines + * 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. docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ + */ + GetKlinesResp getKlines(GetKlinesReq req); + + /** + * Get Part OrderBook + * 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. docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+--------+ + */ + GetPartOrderBookResp getPartOrderBook(GetPartOrderBookReq req); + + /** + * Get Full OrderBook + * 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. docs + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ + */ + GetFullOrderBookResp getFullOrderBook(GetFullOrderBookReq req); + + /** + * Get Call Auction Part OrderBook + * 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. docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+--------+ + */ + GetCallAuctionPartOrderBookResp + getCallAuctionPartOrderBook(GetCallAuctionPartOrderBookReq req); + + /** + * Get Call Auction Info + * 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. docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+--------+ + */ + GetCallAuctionInfoResp getCallAuctionInfo(GetCallAuctionInfoReq req); + + /** + * Get Fiat Price + * Request the fiat price of the currencies for the available trading pairs + * via this endpoint. docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ + */ + GetFiatPriceResp getFiatPrice(GetFiatPriceReq req); + + /** + * Get 24hr Stats + * Request via this endpoint to get the statistics of the specified ticker in + * the last 24 hours. docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+--------+ + */ + Get24hrStatsResp get24hrStats(Get24hrStatsReq req); + + /** + * Get Market List + * Request via this endpoint the transaction currency for the entire trading + * market. docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ + */ + GetMarketListResp getMarketList(); + + /** + * Get Client IP Address + * Get the server time. + * docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 0 | + * +-----------------------+--------+ + */ + GetClientIPAddressResp getClientIPAddress(); + + /** + * Get Server Time + * Get the server time. + * docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ + */ + GetServerTimeResp getServerTime(); + + /** + * Get Service Status + * Get the service status. + * docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ + */ + GetServiceStatusResp getServiceStatus(); + + /** + * Get Public Token - Spot/Margin + * 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 docs + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+--------+ + */ + GetPublicTokenResp getPublicToken(); + + /** + * Get Private Token - Spot/Margin + * 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 docs + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ + */ + GetPrivateTokenResp getPrivateToken(); +} \ No newline at end of file diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.template new file mode 100644 index 00000000..c296c373 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.template @@ -0,0 +1,1371 @@ + + /** + * getAnnouncements + * Get Announcements + * /api/v3/announcements + */ + public void testGetAnnouncements() { + GetAnnouncementsReq.GetAnnouncementsReqBuilder builder = GetAnnouncementsReq.builder(); + builder.currentPage(?).pageSize(?).annType(?).lang(?).startTime(?).endTime(?); + GetAnnouncementsReq req = builder.build(); + GetAnnouncementsResp resp = this.api.getAnnouncements(req); + self::assertNotNull($resp->totalNum); + foreach($resp->items as $item) { + self::assertNotNull($item->annId); + self::assertNotNull($item->annTitle); + self::assertNotNull($item->annType); + self::assertNotNull($item->annDesc); + self::assertNotNull($item->cTime); + self::assertNotNull($item->language); + self::assertNotNull($item->annUrl); + } + + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalPage); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getCurrency + * Get Currency + * /api/v3/currencies/{currency} + */ + public void testGetCurrency() { + GetCurrencyReq.GetCurrencyReqBuilder builder = GetCurrencyReq.builder(); + builder.chain(?).currency(?); + GetCurrencyReq req = builder.build(); + GetCurrencyResp resp = this.api.getCurrency(req); + self::assertNotNull($resp->currency); + self::assertNotNull($resp->name); + self::assertNotNull($resp->fullName); + self::assertNotNull($resp->precision); + self::assertNotNull($resp->confirms); + self::assertNotNull($resp->contractAddress); + self::assertNotNull($resp->isMarginEnabled); + self::assertNotNull($resp->isDebitEnabled); + foreach($resp->chains as $item) { + self::assertNotNull($item->chainName); + self::assertNotNull($item->withdrawalMinSize); + self::assertNotNull($item->depositMinSize); + self::assertNotNull($item->withdrawFeeRate); + self::assertNotNull($item->withdrawalMinFee); + self::assertNotNull($item->isWithdrawEnabled); + self::assertNotNull($item->isDepositEnabled); + self::assertNotNull($item->confirms); + self::assertNotNull($item->preConfirms); + self::assertNotNull($item->contractAddress); + self::assertNotNull($item->withdrawPrecision); + self::assertNotNull($item->maxWithdraw); + self::assertNotNull($item->maxDeposit); + self::assertNotNull($item->needTag); + self::assertNotNull($item->chainId); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getAllCurrencies + * Get All Currencies + * /api/v3/currencies + */ + public void testGetAllCurrencies() { + GetAllCurrenciesResp resp = this.api.getAllCurrencies(); + foreach($resp->data as $item) { + self::assertNotNull($item->currency); + self::assertNotNull($item->name); + self::assertNotNull($item->fullName); + self::assertNotNull($item->precision); + self::assertNotNull($item->confirms); + self::assertNotNull($item->contractAddress); + self::assertNotNull($item->isMarginEnabled); + self::assertNotNull($item->isDebitEnabled); + self::assertNotNull($item->chains); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSymbol + * Get Symbol + * /api/v2/symbols/{symbol} + */ + public void testGetSymbol() { + GetSymbolReq.GetSymbolReqBuilder builder = GetSymbolReq.builder(); + builder.symbol(?); + GetSymbolReq req = builder.build(); + GetSymbolResp resp = this.api.getSymbol(req); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->name); + self::assertNotNull($resp->baseCurrency); + self::assertNotNull($resp->quoteCurrency); + self::assertNotNull($resp->feeCurrency); + self::assertNotNull($resp->market); + self::assertNotNull($resp->baseMinSize); + self::assertNotNull($resp->quoteMinSize); + self::assertNotNull($resp->baseMaxSize); + self::assertNotNull($resp->quoteMaxSize); + self::assertNotNull($resp->baseIncrement); + self::assertNotNull($resp->quoteIncrement); + self::assertNotNull($resp->priceIncrement); + self::assertNotNull($resp->priceLimitRate); + self::assertNotNull($resp->minFunds); + self::assertNotNull($resp->isMarginEnabled); + self::assertNotNull($resp->enableTrading); + self::assertNotNull($resp->feeCategory); + self::assertNotNull($resp->makerFeeCoefficient); + self::assertNotNull($resp->takerFeeCoefficient); + self::assertNotNull($resp->st); + self::assertNotNull($resp->callauctionIsEnabled); + self::assertNotNull($resp->callauctionPriceFloor); + self::assertNotNull($resp->callauctionPriceCeiling); + self::assertNotNull($resp->callauctionFirstStageStartTime); + self::assertNotNull($resp->callauctionSecondStageStartTime); + self::assertNotNull($resp->callauctionThirdStageStartTime); + self::assertNotNull($resp->tradingStartTime); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getAllSymbols + * Get All Symbols + * /api/v2/symbols + */ + public void testGetAllSymbols() { + GetAllSymbolsReq.GetAllSymbolsReqBuilder builder = GetAllSymbolsReq.builder(); + builder.market(?); + GetAllSymbolsReq req = builder.build(); + GetAllSymbolsResp resp = this.api.getAllSymbols(req); + foreach($resp->data as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->name); + self::assertNotNull($item->baseCurrency); + self::assertNotNull($item->quoteCurrency); + self::assertNotNull($item->feeCurrency); + self::assertNotNull($item->market); + self::assertNotNull($item->baseMinSize); + self::assertNotNull($item->quoteMinSize); + self::assertNotNull($item->baseMaxSize); + self::assertNotNull($item->quoteMaxSize); + self::assertNotNull($item->baseIncrement); + self::assertNotNull($item->quoteIncrement); + self::assertNotNull($item->priceIncrement); + self::assertNotNull($item->priceLimitRate); + self::assertNotNull($item->minFunds); + self::assertNotNull($item->isMarginEnabled); + self::assertNotNull($item->enableTrading); + self::assertNotNull($item->feeCategory); + self::assertNotNull($item->makerFeeCoefficient); + self::assertNotNull($item->takerFeeCoefficient); + self::assertNotNull($item->st); + self::assertNotNull($item->callauctionIsEnabled); + self::assertNotNull($item->callauctionPriceFloor); + self::assertNotNull($item->callauctionPriceCeiling); + self::assertNotNull($item->callauctionFirstStageStartTime); + self::assertNotNull($item->callauctionSecondStageStartTime); + self::assertNotNull($item->callauctionThirdStageStartTime); + self::assertNotNull($item->tradingStartTime); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getTicker + * Get Ticker + * /api/v1/market/orderbook/level1 + */ + public void testGetTicker() { + GetTickerReq.GetTickerReqBuilder builder = GetTickerReq.builder(); + builder.symbol(?); + GetTickerReq req = builder.build(); + GetTickerResp resp = this.api.getTicker(req); + self::assertNotNull($resp->time); + self::assertNotNull($resp->sequence); + self::assertNotNull($resp->price); + self::assertNotNull($resp->size); + self::assertNotNull($resp->bestBid); + self::assertNotNull($resp->bestBidSize); + self::assertNotNull($resp->bestAsk); + self::assertNotNull($resp->bestAskSize); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getAllTickers + * Get All Tickers + * /api/v1/market/allTickers + */ + public void testGetAllTickers() { + GetAllTickersResp resp = this.api.getAllTickers(); + self::assertNotNull($resp->time); + foreach($resp->ticker as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->symbolName); + self::assertNotNull($item->buy); + self::assertNotNull($item->bestBidSize); + self::assertNotNull($item->sell); + self::assertNotNull($item->bestAskSize); + self::assertNotNull($item->changeRate); + self::assertNotNull($item->changePrice); + self::assertNotNull($item->high); + self::assertNotNull($item->low); + self::assertNotNull($item->vol); + self::assertNotNull($item->volValue); + self::assertNotNull($item->last); + self::assertNotNull($item->averagePrice); + self::assertNotNull($item->takerFeeRate); + self::assertNotNull($item->makerFeeRate); + self::assertNotNull($item->takerCoefficient); + self::assertNotNull($item->makerCoefficient); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getTradeHistory + * Get Trade History + * /api/v1/market/histories + */ + public void testGetTradeHistory() { + GetTradeHistoryReq.GetTradeHistoryReqBuilder builder = GetTradeHistoryReq.builder(); + builder.symbol(?); + GetTradeHistoryReq req = builder.build(); + GetTradeHistoryResp resp = this.api.getTradeHistory(req); + foreach($resp->data as $item) { + self::assertNotNull($item->sequence); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->side); + self::assertNotNull($item->time); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getKlines + * Get Klines + * /api/v1/market/candles + */ + public void testGetKlines() { + GetKlinesReq.GetKlinesReqBuilder builder = GetKlinesReq.builder(); + builder.symbol(?).type(?).startAt(?).endAt(?); + GetKlinesReq req = builder.build(); + GetKlinesResp resp = this.api.getKlines(req); + foreach($resp->data as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getPartOrderBook + * Get Part OrderBook + * /api/v1/market/orderbook/level2_{size} + */ + public void testGetPartOrderBook() { + GetPartOrderBookReq.GetPartOrderBookReqBuilder builder = GetPartOrderBookReq.builder(); + builder.symbol(?).size(?); + GetPartOrderBookReq req = builder.build(); + GetPartOrderBookResp resp = this.api.getPartOrderBook(req); + self::assertNotNull($resp->time); + self::assertNotNull($resp->sequence); + foreach($resp->bids as $item) { + } + + foreach($resp->asks as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getFullOrderBook + * Get Full OrderBook + * /api/v3/market/orderbook/level2 + */ + public void testGetFullOrderBook() { + GetFullOrderBookReq.GetFullOrderBookReqBuilder builder = GetFullOrderBookReq.builder(); + builder.symbol(?); + GetFullOrderBookReq req = builder.build(); + GetFullOrderBookResp resp = this.api.getFullOrderBook(req); + self::assertNotNull($resp->time); + self::assertNotNull($resp->sequence); + foreach($resp->bids as $item) { + } + + foreach($resp->asks as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getCallAuctionPartOrderBook + * Get Call Auction Part OrderBook + * /api/v1/market/orderbook/callauction/level2_{size} + */ + public void testGetCallAuctionPartOrderBook() { + GetCallAuctionPartOrderBookReq.GetCallAuctionPartOrderBookReqBuilder builder = GetCallAuctionPartOrderBookReq.builder(); + builder.symbol(?).size(?); + GetCallAuctionPartOrderBookReq req = builder.build(); + GetCallAuctionPartOrderBookResp resp = this.api.getCallAuctionPartOrderBook(req); + self::assertNotNull($resp->time); + self::assertNotNull($resp->sequence); + foreach($resp->bids as $item) { + } + + foreach($resp->asks as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getCallAuctionInfo + * Get Call Auction Info + * /api/v1/market/callauctionData + */ + public void testGetCallAuctionInfo() { + GetCallAuctionInfoReq.GetCallAuctionInfoReqBuilder builder = GetCallAuctionInfoReq.builder(); + builder.symbol(?); + GetCallAuctionInfoReq req = builder.build(); + GetCallAuctionInfoResp resp = this.api.getCallAuctionInfo(req); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->estimatedPrice); + self::assertNotNull($resp->estimatedSize); + self::assertNotNull($resp->sellOrderRangeLowPrice); + self::assertNotNull($resp->sellOrderRangeHighPrice); + self::assertNotNull($resp->buyOrderRangeLowPrice); + self::assertNotNull($resp->buyOrderRangeHighPrice); + self::assertNotNull($resp->time); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getFiatPrice + * Get Fiat Price + * /api/v1/prices + */ + public void testGetFiatPrice() { + GetFiatPriceReq.GetFiatPriceReqBuilder builder = GetFiatPriceReq.builder(); + builder.base(?).currencies(?); + GetFiatPriceReq req = builder.build(); + GetFiatPriceResp resp = this.api.getFiatPrice(req); + self::assertNotNull($resp->AGLD); + self::assertNotNull($resp->DFI); + self::assertNotNull($resp->PYTHUP); + self::assertNotNull($resp->ISLM); + self::assertNotNull($resp->NEAR); + self::assertNotNull($resp->AIOZ); + self::assertNotNull($resp->AUDIO); + self::assertNotNull($resp->BBL); + self::assertNotNull($resp->WLD); + self::assertNotNull($resp->HNT); + self::assertNotNull($resp->ETHFI); + self::assertNotNull($resp->DMAIL); + self::assertNotNull($resp->OPUP); + self::assertNotNull($resp->VET3S); + self::assertNotNull($resp->MANA3S); + self::assertNotNull($resp->TIDAL); + self::assertNotNull($resp->HALO); + self::assertNotNull($resp->OPUL); + self::assertNotNull($resp->MANA3L); + self::assertNotNull($resp->DGB); + self::assertNotNull($resp->AA); + self::assertNotNull($resp->BCH); + self::assertNotNull($resp->GMEE); + self::assertNotNull($resp->JST); + self::assertNotNull($resp->PBUX); + self::assertNotNull($resp->AR); + self::assertNotNull($resp->SEI); + self::assertNotNull($resp->PSTAKE); + self::assertNotNull($resp->LMWR); + self::assertNotNull($resp->UNFIDOWN); + self::assertNotNull($resp->BB); + self::assertNotNull($resp->JTO); + self::assertNotNull($resp->WEMIX); + self::assertNotNull($resp->G); + self::assertNotNull($resp->MARSH); + self::assertNotNull($resp->BN); + self::assertNotNull($resp->FLIP); + self::assertNotNull($resp->FLR); + self::assertNotNull($resp->BIGTIME); + self::assertNotNull($resp->FLY); + self::assertNotNull($resp->T); + self::assertNotNull($resp->W); + self::assertNotNull($resp->BDX); + self::assertNotNull($resp->BABYDOGE); + self::assertNotNull($resp->SFP); + self::assertNotNull($resp->DIA); + self::assertNotNull($resp->ISME); + self::assertNotNull($resp->LYM); + self::assertNotNull($resp->VET3L); + self::assertNotNull($resp->JUP); + self::assertNotNull($resp->LYX); + self::assertNotNull($resp->AIEPK); + self::assertNotNull($resp->SILLY); + self::assertNotNull($resp->SCPT); + self::assertNotNull($resp->WOO); + self::assertNotNull($resp->BLUR); + self::assertNotNull($resp->STRK); + self::assertNotNull($resp->BFC); + self::assertNotNull($resp->DC); + self::assertNotNull($resp->KARATE); + self::assertNotNull($resp->SUSHI3L); + self::assertNotNull($resp->NETVR); + self::assertNotNull($resp->WAVES); + self::assertNotNull($resp->LITH); + self::assertNotNull($resp->HAPI); + self::assertNotNull($resp->SUSHI3S); + self::assertNotNull($resp->CEEK); + self::assertNotNull($resp->FLOKI); + self::assertNotNull($resp->SHR); + self::assertNotNull($resp->SAND); + self::assertNotNull($resp->TURT); + self::assertNotNull($resp->UMA); + self::assertNotNull($resp->BEPRO); + self::assertNotNull($resp->SCRT); + self::assertNotNull($resp->TUSD); + self::assertNotNull($resp->COOKIE); + self::assertNotNull($resp->LRDS); + self::assertNotNull($resp->SIN); + self::assertNotNull($resp->OAS); + self::assertNotNull($resp->ROOT); + self::assertNotNull($resp->ADA3L); + self::assertNotNull($resp->TIAUP); + self::assertNotNull($resp->HTR); + self::assertNotNull($resp->UNB); + self::assertNotNull($resp->UNA); + self::assertNotNull($resp->HARD); + self::assertNotNull($resp->G3); + self::assertNotNull($resp->ADA3S); + self::assertNotNull($resp->MYRO); + self::assertNotNull($resp->HTX); + self::assertNotNull($resp->FT); + self::assertNotNull($resp->BTCDOWN); + self::assertNotNull($resp->UNI); + self::assertNotNull($resp->FX); + self::assertNotNull($resp->OBI); + self::assertNotNull($resp->UNO); + self::assertNotNull($resp->WRX); + self::assertNotNull($resp->TIADOWN); + self::assertNotNull($resp->ETHDOWN); + self::assertNotNull($resp->WELL); + self::assertNotNull($resp->SWFTC); + self::assertNotNull($resp->SKL); + self::assertNotNull($resp->UOS); + self::assertNotNull($resp->AIPAD); + self::assertNotNull($resp->BRETT); + self::assertNotNull($resp->SKY); + self::assertNotNull($resp->FRM); + self::assertNotNull($resp->VISION); + self::assertNotNull($resp->LENDS); + self::assertNotNull($resp->SLF); + self::assertNotNull($resp->BULL); + self::assertNotNull($resp->FLOW); + self::assertNotNull($resp->ODDZ); + self::assertNotNull($resp->SLN); + self::assertNotNull($resp->UPO); + self::assertNotNull($resp->SLP); + self::assertNotNull($resp->ID); + self::assertNotNull($resp->SLIM); + self::assertNotNull($resp->SPOT); + self::assertNotNull($resp->DOP); + self::assertNotNull($resp->ISSP); + self::assertNotNull($resp->UQC); + self::assertNotNull($resp->IO); + self::assertNotNull($resp->DOT); + self::assertNotNull($resp->_1INCH); + self::assertNotNull($resp->SMH); + self::assertNotNull($resp->MAK); + self::assertNotNull($resp->TOKO); + self::assertNotNull($resp->TURBO); + self::assertNotNull($resp->UNFI); + self::assertNotNull($resp->MAN); + self::assertNotNull($resp->EVER); + self::assertNotNull($resp->FTM); + self::assertNotNull($resp->SHRAP); + self::assertNotNull($resp->MAV); + self::assertNotNull($resp->MAX); + self::assertNotNull($resp->DPR); + self::assertNotNull($resp->FTT); + self::assertNotNull($resp->ARKM); + self::assertNotNull($resp->ATOM); + self::assertNotNull($resp->PENDLE); + self::assertNotNull($resp->QUICK); + self::assertNotNull($resp->BLZ); + self::assertNotNull($resp->BOBA); + self::assertNotNull($resp->MBL); + self::assertNotNull($resp->OFN); + self::assertNotNull($resp->UNIO); + self::assertNotNull($resp->SNS); + self::assertNotNull($resp->SNX); + self::assertNotNull($resp->NXRA); + self::assertNotNull($resp->TAIKO); + self::assertNotNull($resp->AVAX3L); + self::assertNotNull($resp->L3); + self::assertNotNull($resp->API3); + self::assertNotNull($resp->XRP3S); + self::assertNotNull($resp->QKC); + self::assertNotNull($resp->AVAX3S); + self::assertNotNull($resp->ROSE); + self::assertNotNull($resp->SATS); + self::assertNotNull($resp->BMX); + self::assertNotNull($resp->PORTAL); + self::assertNotNull($resp->TOMI); + self::assertNotNull($resp->XRP3L); + self::assertNotNull($resp->SOL); + self::assertNotNull($resp->SON); + self::assertNotNull($resp->BNC); + self::assertNotNull($resp->SOCIAL); + self::assertNotNull($resp->CGPT); + self::assertNotNull($resp->CELR); + self::assertNotNull($resp->BNB); + self::assertNotNull($resp->OGN); + self::assertNotNull($resp->CELO); + self::assertNotNull($resp->AUCTION); + self::assertNotNull($resp->MANTA); + self::assertNotNull($resp->LAYER); + self::assertNotNull($resp->AERO); + self::assertNotNull($resp->CETUS); + self::assertNotNull($resp->LL); + self::assertNotNull($resp->SPA); + self::assertNotNull($resp->PYTHDOWN); + self::assertNotNull($resp->NEIROCTO); + self::assertNotNull($resp->UTK); + self::assertNotNull($resp->GMRX); + self::assertNotNull($resp->BOB); + self::assertNotNull($resp->HOTCROSS); + self::assertNotNull($resp->AERGO); + self::assertNotNull($resp->MOCA); + self::assertNotNull($resp->SQD); + self::assertNotNull($resp->MV); + self::assertNotNull($resp->BNB3L); + self::assertNotNull($resp->BNB3S); + self::assertNotNull($resp->GALAX3L); + self::assertNotNull($resp->KAI); + self::assertNotNull($resp->SQR); + self::assertNotNull($resp->GALAX3S); + self::assertNotNull($resp->EGLD); + self::assertNotNull($resp->ZBCN); + self::assertNotNull($resp->KAS); + self::assertNotNull($resp->MEW); + self::assertNotNull($resp->PUNDIX); + self::assertNotNull($resp->LOOKS); + self::assertNotNull($resp->FXS); + self::assertNotNull($resp->BOSON); + self::assertNotNull($resp->BRISE); + self::assertNotNull($resp->AEVO); + self::assertNotNull($resp->FLUX); + self::assertNotNull($resp->PRCL); + self::assertNotNull($resp->UNFIUP); + self::assertNotNull($resp->SEIDOWN); + self::assertNotNull($resp->DOAI); + self::assertNotNull($resp->QNT); + self::assertNotNull($resp->REDO); + self::assertNotNull($resp->STRIKE); + self::assertNotNull($resp->ETHW); + self::assertNotNull($resp->OM); + self::assertNotNull($resp->OP); + self::assertNotNull($resp->WHALE); + self::assertNotNull($resp->_1CAT); + self::assertNotNull($resp->NEON); + self::assertNotNull($resp->GTAI); + self::assertNotNull($resp->SSV); + self::assertNotNull($resp->ETH2); + self::assertNotNull($resp->KCS); + self::assertNotNull($resp->ARPA); + self::assertNotNull($resp->ARTFI); + self::assertNotNull($resp->BRL); + self::assertNotNull($resp->ALEX); + self::assertNotNull($resp->STG); + self::assertNotNull($resp->SHIB); + self::assertNotNull($resp->IOTX); + self::assertNotNull($resp->OLE); + self::assertNotNull($resp->KDA); + self::assertNotNull($resp->CERE); + self::assertNotNull($resp->DOCK); + self::assertNotNull($resp->STX); + self::assertNotNull($resp->OLT); + self::assertNotNull($resp->QI); + self::assertNotNull($resp->SDAO); + self::assertNotNull($resp->BLAST); + self::assertNotNull($resp->LINK3S); + self::assertNotNull($resp->IOST); + self::assertNotNull($resp->SUI); + self::assertNotNull($resp->CAKE); + self::assertNotNull($resp->BSW); + self::assertNotNull($resp->OMG); + self::assertNotNull($resp->VOLT); + self::assertNotNull($resp->LINK3L); + self::assertNotNull($resp->GEEQ); + self::assertNotNull($resp->PYUSD); + self::assertNotNull($resp->SUN); + self::assertNotNull($resp->TOWER); + self::assertNotNull($resp->BTC); + self::assertNotNull($resp->IOTA); + self::assertNotNull($resp->REEF); + self::assertNotNull($resp->TRIAS); + self::assertNotNull($resp->KEY); + self::assertNotNull($resp->ETH3L); + self::assertNotNull($resp->BTT); + self::assertNotNull($resp->ONE); + self::assertNotNull($resp->RENDER); + self::assertNotNull($resp->ETH3S); + self::assertNotNull($resp->ANKR); + self::assertNotNull($resp->ALGO); + self::assertNotNull($resp->SYLO); + self::assertNotNull($resp->ZCX); + self::assertNotNull($resp->SD); + self::assertNotNull($resp->ONT); + self::assertNotNull($resp->MJT); + self::assertNotNull($resp->DYM); + self::assertNotNull($resp->DYP); + self::assertNotNull($resp->BAKEUP); + self::assertNotNull($resp->OOE); + self::assertNotNull($resp->ZELIX); + self::assertNotNull($resp->DOGE3L); + self::assertNotNull($resp->ARTY); + self::assertNotNull($resp->QORPO); + self::assertNotNull($resp->ICE); + self::assertNotNull($resp->NOTAI); + self::assertNotNull($resp->DOGE3S); + self::assertNotNull($resp->NAKA); + self::assertNotNull($resp->GALAX); + self::assertNotNull($resp->MKR); + self::assertNotNull($resp->DODO); + self::assertNotNull($resp->ICP); + self::assertNotNull($resp->ZEC); + self::assertNotNull($resp->ZEE); + self::assertNotNull($resp->ICX); + self::assertNotNull($resp->KMNO); + self::assertNotNull($resp->TT); + self::assertNotNull($resp->DOT3L); + self::assertNotNull($resp->XAI); + self::assertNotNull($resp->ZEN); + self::assertNotNull($resp->DOGE); + self::assertNotNull($resp->ALPHA); + self::assertNotNull($resp->DUSK); + self::assertNotNull($resp->DOT3S); + self::assertNotNull($resp->SXP); + self::assertNotNull($resp->HBAR); + self::assertNotNull($resp->SYNT); + self::assertNotNull($resp->ZEX); + self::assertNotNull($resp->BONDLY); + self::assertNotNull($resp->MLK); + self::assertNotNull($resp->KICKS); + self::assertNotNull($resp->PEPE); + self::assertNotNull($resp->OUSD); + self::assertNotNull($resp->LUNCDOWN); + self::assertNotNull($resp->DOGS); + self::assertNotNull($resp->REV3L); + self::assertNotNull($resp->CTSI); + self::assertNotNull($resp->C98); + self::assertNotNull($resp->OSMO); + self::assertNotNull($resp->NTRN); + self::assertNotNull($resp->CFX2S); + self::assertNotNull($resp->SYN); + self::assertNotNull($resp->VIDT); + self::assertNotNull($resp->SYS); + self::assertNotNull($resp->GAS); + self::assertNotNull($resp->BOME); + self::assertNotNull($resp->COMBO); + self::assertNotNull($resp->XCH); + self::assertNotNull($resp->VR); + self::assertNotNull($resp->CFX2L); + self::assertNotNull($resp->VSYS); + self::assertNotNull($resp->PANDORA); + self::assertNotNull($resp->THETA); + self::assertNotNull($resp->XCN); + self::assertNotNull($resp->NEXG); + self::assertNotNull($resp->MELOS); + self::assertNotNull($resp->XCV); + self::assertNotNull($resp->ORN); + self::assertNotNull($resp->WLKN); + self::assertNotNull($resp->AAVE); + self::assertNotNull($resp->MNT); + self::assertNotNull($resp->BONK); + self::assertNotNull($resp->PERP); + self::assertNotNull($resp->XDC); + self::assertNotNull($resp->MNW); + self::assertNotNull($resp->XDB); + self::assertNotNull($resp->BOND); + self::assertNotNull($resp->SUIA); + self::assertNotNull($resp->MOG); + self::assertNotNull($resp->SUTER); + self::assertNotNull($resp->TIME); + self::assertNotNull($resp->RACA); + self::assertNotNull($resp->BICO); + self::assertNotNull($resp->MON); + self::assertNotNull($resp->SWEAT); + self::assertNotNull($resp->MOXIE); + self::assertNotNull($resp->BABYBNB); + self::assertNotNull($resp->IGU); + self::assertNotNull($resp->HMSTR); + self::assertNotNull($resp->XEC); + self::assertNotNull($resp->MONI); + self::assertNotNull($resp->XR); + self::assertNotNull($resp->PEOPLE); + self::assertNotNull($resp->PUMLX); + self::assertNotNull($resp->ZIL); + self::assertNotNull($resp->WLDDOWN); + self::assertNotNull($resp->VAI); + self::assertNotNull($resp->XEN); + self::assertNotNull($resp->MPC); + self::assertNotNull($resp->XEM); + self::assertNotNull($resp->JASMY3S); + self::assertNotNull($resp->OTK); + self::assertNotNull($resp->TRAC); + self::assertNotNull($resp->DFYN); + self::assertNotNull($resp->BIDP); + self::assertNotNull($resp->JASMY3L); + self::assertNotNull($resp->INJDOWN); + self::assertNotNull($resp->KLV); + self::assertNotNull($resp->WAXL); + self::assertNotNull($resp->TRBDOWN); + self::assertNotNull($resp->BCH3L); + self::assertNotNull($resp->GMT3S); + self::assertNotNull($resp->KMD); + self::assertNotNull($resp->BCH3S); + self::assertNotNull($resp->ECOX); + self::assertNotNull($resp->AAVE3S); + self::assertNotNull($resp->GMT3L); + self::assertNotNull($resp->EPIK); + self::assertNotNull($resp->SUIP); + self::assertNotNull($resp->AAVE3L); + self::assertNotNull($resp->ZK); + self::assertNotNull($resp->ZKF); + self::assertNotNull($resp->OMNIA); + self::assertNotNull($resp->ZKJ); + self::assertNotNull($resp->ZKL); + self::assertNotNull($resp->GAFI); + self::assertNotNull($resp->CARV); + self::assertNotNull($resp->KNC); + self::assertNotNull($resp->CATS); + self::assertNotNull($resp->PROM); + self::assertNotNull($resp->ALEPH); + self::assertNotNull($resp->PONKE); + self::assertNotNull($resp->OVR); + self::assertNotNull($resp->CATI); + self::assertNotNull($resp->ORDER); + self::assertNotNull($resp->GFT); + self::assertNotNull($resp->BIFI); + self::assertNotNull($resp->GGC); + self::assertNotNull($resp->GGG); + self::assertNotNull($resp->DAPPX); + self::assertNotNull($resp->SUKU); + self::assertNotNull($resp->ULTI); + self::assertNotNull($resp->CREDI); + self::assertNotNull($resp->ERTHA); + self::assertNotNull($resp->FURY); + self::assertNotNull($resp->KARRAT); + self::assertNotNull($resp->MOBILE); + self::assertNotNull($resp->SIDUS); + self::assertNotNull($resp->NAVI); + self::assertNotNull($resp->TAO); + self::assertNotNull($resp->USDJ); + self::assertNotNull($resp->MTL); + self::assertNotNull($resp->VET); + self::assertNotNull($resp->FITFI); + self::assertNotNull($resp->USDT); + self::assertNotNull($resp->OXT); + self::assertNotNull($resp->CANDY); + self::assertNotNull($resp->USDP); + self::assertNotNull($resp->MTS); + self::assertNotNull($resp->TADA); + self::assertNotNull($resp->MTV); + self::assertNotNull($resp->NAVX); + self::assertNotNull($resp->ILV); + self::assertNotNull($resp->VINU); + self::assertNotNull($resp->GHX); + self::assertNotNull($resp->EDU); + self::assertNotNull($resp->HYVE); + self::assertNotNull($resp->BTC3L); + self::assertNotNull($resp->ANYONE); + self::assertNotNull($resp->BEAT); + self::assertNotNull($resp->KING); + self::assertNotNull($resp->CREAM); + self::assertNotNull($resp->CAS); + self::assertNotNull($resp->IMX); + self::assertNotNull($resp->CAT); + self::assertNotNull($resp->BTC3S); + self::assertNotNull($resp->USDE); + self::assertNotNull($resp->USDD); + self::assertNotNull($resp->CWAR); + self::assertNotNull($resp->USDC); + self::assertNotNull($resp->KRL); + self::assertNotNull($resp->INJ); + self::assertNotNull($resp->GAME); + self::assertNotNull($resp->TRIBL); + self::assertNotNull($resp->XLM); + self::assertNotNull($resp->TRBUP); + self::assertNotNull($resp->VRADOWN); + self::assertNotNull($resp->SUPER); + self::assertNotNull($resp->EIGEN); + self::assertNotNull($resp->IOI); + self::assertNotNull($resp->KSM); + self::assertNotNull($resp->CCD); + self::assertNotNull($resp->EGO); + self::assertNotNull($resp->EGP); + self::assertNotNull($resp->MXC); + self::assertNotNull($resp->TEL); + self::assertNotNull($resp->MOVR); + self::assertNotNull($resp->XMR); + self::assertNotNull($resp->MXM); + self::assertNotNull($resp->OORT); + self::assertNotNull($resp->GLM); + self::assertNotNull($resp->RAY); + self::assertNotNull($resp->XTAG); + self::assertNotNull($resp->GLQ); + self::assertNotNull($resp->CWEB); + self::assertNotNull($resp->REVU); + self::assertNotNull($resp->REVV); + self::assertNotNull($resp->ZRO); + self::assertNotNull($resp->XNL); + self::assertNotNull($resp->XNO); + self::assertNotNull($resp->SAROS); + self::assertNotNull($resp->KACE); + self::assertNotNull($resp->ZRX); + self::assertNotNull($resp->WLTH); + self::assertNotNull($resp->ATOM3L); + self::assertNotNull($resp->GMM); + self::assertNotNull($resp->BEER); + self::assertNotNull($resp->GMT); + self::assertNotNull($resp->HEART); + self::assertNotNull($resp->GMX); + self::assertNotNull($resp->ABBC); + self::assertNotNull($resp->OMNI); + self::assertNotNull($resp->ATOM3S); + self::assertNotNull($resp->IRL); + self::assertNotNull($resp->CFG); + self::assertNotNull($resp->WSDM); + self::assertNotNull($resp->GNS); + self::assertNotNull($resp->VANRY); + self::assertNotNull($resp->CFX); + self::assertNotNull($resp->GRAIL); + self::assertNotNull($resp->BEFI); + self::assertNotNull($resp->VELO); + self::assertNotNull($resp->XPR); + self::assertNotNull($resp->DOVI); + self::assertNotNull($resp->ACE); + self::assertNotNull($resp->ACH); + self::assertNotNull($resp->ISP); + self::assertNotNull($resp->XCAD); + self::assertNotNull($resp->MINA); + self::assertNotNull($resp->TIA); + self::assertNotNull($resp->DRIFT); + self::assertNotNull($resp->ACQ); + self::assertNotNull($resp->ACS); + self::assertNotNull($resp->MIND); + self::assertNotNull($resp->STORE); + self::assertNotNull($resp->REN); + self::assertNotNull($resp->ELA); + self::assertNotNull($resp->DREAMS); + self::assertNotNull($resp->ADA); + self::assertNotNull($resp->ELF); + self::assertNotNull($resp->REQ); + self::assertNotNull($resp->STORJ); + self::assertNotNull($resp->LADYS); + self::assertNotNull($resp->PAXG); + self::assertNotNull($resp->REZ); + self::assertNotNull($resp->XRD); + self::assertNotNull($resp->CHO); + self::assertNotNull($resp->CHR); + self::assertNotNull($resp->ADS); + self::assertNotNull($resp->CHZ); + self::assertNotNull($resp->ADX); + self::assertNotNull($resp->XRP); + self::assertNotNull($resp->JASMY); + self::assertNotNull($resp->KAGI); + self::assertNotNull($resp->FIDA); + self::assertNotNull($resp->PBR); + self::assertNotNull($resp->AEG); + self::assertNotNull($resp->H2O); + self::assertNotNull($resp->CHMB); + self::assertNotNull($resp->SAND3L); + self::assertNotNull($resp->PBX); + self::assertNotNull($resp->SOLVE); + self::assertNotNull($resp->DECHAT); + self::assertNotNull($resp->GARI); + self::assertNotNull($resp->SHIB2L); + self::assertNotNull($resp->SHIB2S); + self::assertNotNull($resp->ENA); + self::assertNotNull($resp->VEMP); + self::assertNotNull($resp->ENJ); + self::assertNotNull($resp->AFG); + self::assertNotNull($resp->RATS); + self::assertNotNull($resp->GRT); + self::assertNotNull($resp->FORWARD); + self::assertNotNull($resp->TFUEL); + self::assertNotNull($resp->ENS); + self::assertNotNull($resp->KASDOWN); + self::assertNotNull($resp->XTM); + self::assertNotNull($resp->DEGEN); + self::assertNotNull($resp->TLM); + self::assertNotNull($resp->DYDXDOWN); + self::assertNotNull($resp->CKB); + self::assertNotNull($resp->LUNC); + self::assertNotNull($resp->AURORA); + self::assertNotNull($resp->LUNA); + self::assertNotNull($resp->XTZ); + self::assertNotNull($resp->ELON); + self::assertNotNull($resp->DMTR); + self::assertNotNull($resp->EOS); + self::assertNotNull($resp->GST); + self::assertNotNull($resp->FORT); + self::assertNotNull($resp->FLAME); + self::assertNotNull($resp->PATEX); + self::assertNotNull($resp->DEEP); + self::assertNotNull($resp->ID3L); + self::assertNotNull($resp->GTC); + self::assertNotNull($resp->ID3S); + self::assertNotNull($resp->RIO); + self::assertNotNull($resp->CLH); + self::assertNotNull($resp->BURGER); + self::assertNotNull($resp->VRA); + self::assertNotNull($resp->SUNDOG); + self::assertNotNull($resp->GTT); + self::assertNotNull($resp->INJUP); + self::assertNotNull($resp->CPOOL); + self::assertNotNull($resp->EPX); + self::assertNotNull($resp->CLV); + self::assertNotNull($resp->FEAR); + self::assertNotNull($resp->MEME); + self::assertNotNull($resp->ROOBEE); + self::assertNotNull($resp->DEFI); + self::assertNotNull($resp->TOKEN); + self::assertNotNull($resp->GRAPE); + self::assertNotNull($resp->KASUP); + self::assertNotNull($resp->XWG); + self::assertNotNull($resp->SKEY); + self::assertNotNull($resp->SFUND); + self::assertNotNull($resp->EQX); + self::assertNotNull($resp->ORDIUP); + self::assertNotNull($resp->TON); + self::assertNotNull($resp->DEGO); + self::assertNotNull($resp->IZI); + self::assertNotNull($resp->ERG); + self::assertNotNull($resp->ERN); + self::assertNotNull($resp->VENOM); + self::assertNotNull($resp->VOXEL); + self::assertNotNull($resp->RLC); + self::assertNotNull($resp->PHA); + self::assertNotNull($resp->DYDXUP); + self::assertNotNull($resp->APE3S); + self::assertNotNull($resp->ORBS); + self::assertNotNull($resp->OPDOWN); + self::assertNotNull($resp->ESE); + self::assertNotNull($resp->APE3L); + self::assertNotNull($resp->HMND); + self::assertNotNull($resp->COQ); + self::assertNotNull($resp->AURY); + self::assertNotNull($resp->CULT); + self::assertNotNull($resp->AKT); + self::assertNotNull($resp->GLMR); + self::assertNotNull($resp->XYM); + self::assertNotNull($resp->ORAI); + self::assertNotNull($resp->XYO); + self::assertNotNull($resp->ETC); + self::assertNotNull($resp->LAI); + self::assertNotNull($resp->PIP); + self::assertNotNull($resp->ETH); + self::assertNotNull($resp->NEO); + self::assertNotNull($resp->RMV); + self::assertNotNull($resp->KLAY); + self::assertNotNull($resp->PIT); + self::assertNotNull($resp->TARA); + self::assertNotNull($resp->KALT); + self::assertNotNull($resp->PIX); + self::assertNotNull($resp->ETN); + self::assertNotNull($resp->CSIX); + self::assertNotNull($resp->TRADE); + self::assertNotNull($resp->MAVIA); + self::assertNotNull($resp->HIGH); + self::assertNotNull($resp->TRB); + self::assertNotNull($resp->ORDI); + self::assertNotNull($resp->TRVL); + self::assertNotNull($resp->AMB); + self::assertNotNull($resp->TRU); + self::assertNotNull($resp->LOGX); + self::assertNotNull($resp->FINC); + self::assertNotNull($resp->INFRA); + self::assertNotNull($resp->NATIX); + self::assertNotNull($resp->NFP); + self::assertNotNull($resp->TRY); + self::assertNotNull($resp->TRX); + self::assertNotNull($resp->LBP); + self::assertNotNull($resp->LBR); + self::assertNotNull($resp->EUL); + self::assertNotNull($resp->NFT); + self::assertNotNull($resp->SEIUP); + self::assertNotNull($resp->PUFFER); + self::assertNotNull($resp->EUR); + self::assertNotNull($resp->ORCA); + self::assertNotNull($resp->NEAR3L); + self::assertNotNull($resp->AMP); + self::assertNotNull($resp->XDEFI); + self::assertNotNull($resp->HIFI); + self::assertNotNull($resp->TRUF); + self::assertNotNull($resp->AITECH); + self::assertNotNull($resp->AMU); + self::assertNotNull($resp->USTC); + self::assertNotNull($resp->KNGL); + self::assertNotNull($resp->FOXY); + self::assertNotNull($resp->NGC); + self::assertNotNull($resp->TENET); + self::assertNotNull($resp->NEAR3S); + self::assertNotNull($resp->MAHA); + self::assertNotNull($resp->NGL); + self::assertNotNull($resp->TST); + self::assertNotNull($resp->HIPPO); + self::assertNotNull($resp->AXS3S); + self::assertNotNull($resp->CRO); + self::assertNotNull($resp->ZPAY); + self::assertNotNull($resp->MNDE); + self::assertNotNull($resp->CRV); + self::assertNotNull($resp->SWASH); + self::assertNotNull($resp->AXS3L); + self::assertNotNull($resp->VERSE); + self::assertNotNull($resp->RPK); + self::assertNotNull($resp->RPL); + self::assertNotNull($resp->AZERO); + self::assertNotNull($resp->SOUL); + self::assertNotNull($resp->VXV); + self::assertNotNull($resp->LDO); + self::assertNotNull($resp->MAGIC); + self::assertNotNull($resp->ALICE); + self::assertNotNull($resp->SEAM); + self::assertNotNull($resp->PLU); + self::assertNotNull($resp->AOG); + self::assertNotNull($resp->SMOLE); + self::assertNotNull($resp->EWT); + self::assertNotNull($resp->TSUGT); + self::assertNotNull($resp->PMG); + self::assertNotNull($resp->OPAI); + self::assertNotNull($resp->LOCUS); + self::assertNotNull($resp->CTA); + self::assertNotNull($resp->NIM); + self::assertNotNull($resp->CTC); + self::assertNotNull($resp->APE); + self::assertNotNull($resp->MERL); + self::assertNotNull($resp->JAM); + self::assertNotNull($resp->CTI); + self::assertNotNull($resp->APP); + self::assertNotNull($resp->APT); + self::assertNotNull($resp->WLDUP); + self::assertNotNull($resp->ZEND); + self::assertNotNull($resp->FIRE); + self::assertNotNull($resp->DENT); + self::assertNotNull($resp->PYTH); + self::assertNotNull($resp->LFT); + self::assertNotNull($resp->DPET); + self::assertNotNull($resp->ORDIDOWN); + self::assertNotNull($resp->KPOL); + self::assertNotNull($resp->ETHUP); + self::assertNotNull($resp->BAND); + self::assertNotNull($resp->POL); + self::assertNotNull($resp->ASTR); + self::assertNotNull($resp->NKN); + self::assertNotNull($resp->RSR); + self::assertNotNull($resp->DVPN); + self::assertNotNull($resp->TWT); + self::assertNotNull($resp->ARB); + self::assertNotNull($resp->CVC); + self::assertNotNull($resp->ARC); + self::assertNotNull($resp->XETA); + self::assertNotNull($resp->MTRG); + self::assertNotNull($resp->LOKA); + self::assertNotNull($resp->LPOOL); + self::assertNotNull($resp->TURBOS); + self::assertNotNull($resp->CVX); + self::assertNotNull($resp->ARX); + self::assertNotNull($resp->MPLX); + self::assertNotNull($resp->SUSHI); + self::assertNotNull($resp->NLK); + self::assertNotNull($resp->PEPE2); + self::assertNotNull($resp->WBTC); + self::assertNotNull($resp->SUI3L); + self::assertNotNull($resp->CWS); + self::assertNotNull($resp->SUI3S); + self::assertNotNull($resp->INSP); + self::assertNotNull($resp->MANA); + self::assertNotNull($resp->VRTX); + self::assertNotNull($resp->CSPR); + self::assertNotNull($resp->ATA); + self::assertNotNull($resp->OPEN); + self::assertNotNull($resp->HAI); + self::assertNotNull($resp->NMR); + self::assertNotNull($resp->ATH); + self::assertNotNull($resp->LIT); + self::assertNotNull($resp->TLOS); + self::assertNotNull($resp->TNSR); + self::assertNotNull($resp->CXT); + self::assertNotNull($resp->POLYX); + self::assertNotNull($resp->ZERO); + self::assertNotNull($resp->ROUTE); + self::assertNotNull($resp->LOOM); + self::assertNotNull($resp->PRE); + self::assertNotNull($resp->VRAUP); + self::assertNotNull($resp->HBB); + self::assertNotNull($resp->RVN); + self::assertNotNull($resp->PRQ); + self::assertNotNull($resp->ONDO); + self::assertNotNull($resp->PEPEDOWN); + self::assertNotNull($resp->WOOP); + self::assertNotNull($resp->LUNCUP); + self::assertNotNull($resp->KAVA); + self::assertNotNull($resp->LKI); + self::assertNotNull($resp->AVA); + self::assertNotNull($resp->NOM); + self::assertNotNull($resp->MAPO); + self::assertNotNull($resp->PEPEUP); + self::assertNotNull($resp->STRAX); + self::assertNotNull($resp->NOT); + self::assertNotNull($resp->ZERC); + self::assertNotNull($resp->BCUT); + self::assertNotNull($resp->MASA); + self::assertNotNull($resp->WAN); + self::assertNotNull($resp->WAT); + self::assertNotNull($resp->WAX); + self::assertNotNull($resp->MASK); + self::assertNotNull($resp->EOS3L); + self::assertNotNull($resp->IDEA); + self::assertNotNull($resp->EOS3S); + self::assertNotNull($resp->YFI); + self::assertNotNull($resp->MOODENG); + self::assertNotNull($resp->XCUR); + self::assertNotNull($resp->HYDRA); + self::assertNotNull($resp->POPCAT); + self::assertNotNull($resp->LQTY); + self::assertNotNull($resp->PIXEL); + self::assertNotNull($resp->LMR); + self::assertNotNull($resp->ZETA); + self::assertNotNull($resp->YGG); + self::assertNotNull($resp->AXS); + self::assertNotNull($resp->BCHSV); + self::assertNotNull($resp->NRN); + self::assertNotNull($resp->FTON); + self::assertNotNull($resp->COMP); + self::assertNotNull($resp->XPRT); + self::assertNotNull($resp->HFT); + self::assertNotNull($resp->UXLINK); + self::assertNotNull($resp->STAMP); + self::assertNotNull($resp->RUNE); + self::assertNotNull($resp->ZEUS); + self::assertNotNull($resp->LTC3L); + self::assertNotNull($resp->DAPP); + self::assertNotNull($resp->FORTH); + self::assertNotNull($resp->ALPINE); + self::assertNotNull($resp->SENSO); + self::assertNotNull($resp->LTC3S); + self::assertNotNull($resp->DEXE); + self::assertNotNull($resp->GOAL); + self::assertNotNull($resp->AVAX); + self::assertNotNull($resp->LISTA); + self::assertNotNull($resp->AMPL); + self::assertNotNull($resp->WORK); + self::assertNotNull($resp->BRWL); + self::assertNotNull($resp->BANANA); + self::assertNotNull($resp->PUSH); + self::assertNotNull($resp->WEN); + self::assertNotNull($resp->NEIRO); + self::assertNotNull($resp->BTCUP); + self::assertNotNull($resp->SOL3S); + self::assertNotNull($resp->BRAWL); + self::assertNotNull($resp->LAY3R); + self::assertNotNull($resp->LPT); + self::assertNotNull($resp->GODS); + self::assertNotNull($resp->SAND3S); + self::assertNotNull($resp->RDNT); + self::assertNotNull($resp->SOL3L); + self::assertNotNull($resp->NIBI); + self::assertNotNull($resp->NUM); + self::assertNotNull($resp->PYR); + self::assertNotNull($resp->DAG); + self::assertNotNull($resp->DAI); + self::assertNotNull($resp->HIP); + self::assertNotNull($resp->DAO); + self::assertNotNull($resp->AVAIL); + self::assertNotNull($resp->DAR); + self::assertNotNull($resp->FET); + self::assertNotNull($resp->FCON); + self::assertNotNull($resp->XAVA); + self::assertNotNull($resp->LRC); + self::assertNotNull($resp->UNI3S); + self::assertNotNull($resp->POKT); + self::assertNotNull($resp->DASH); + self::assertNotNull($resp->BAKEDOWN); + self::assertNotNull($resp->POLC); + self::assertNotNull($resp->CIRUS); + self::assertNotNull($resp->UNI3L); + self::assertNotNull($resp->NWC); + self::assertNotNull($resp->POLK); + self::assertNotNull($resp->LSD); + self::assertNotNull($resp->MARS4); + self::assertNotNull($resp->LSK); + self::assertNotNull($resp->BLOCK); + self::assertNotNull($resp->ANALOS); + self::assertNotNull($resp->SAFE); + self::assertNotNull($resp->DCK); + self::assertNotNull($resp->LSS); + self::assertNotNull($resp->DCR); + self::assertNotNull($resp->LIKE); + self::assertNotNull($resp->DATA); + self::assertNotNull($resp->WIF); + self::assertNotNull($resp->BLOK); + self::assertNotNull($resp->LTC); + self::assertNotNull($resp->METIS); + self::assertNotNull($resp->WIN); + self::assertNotNull($resp->HLG); + self::assertNotNull($resp->LTO); + self::assertNotNull($resp->DYDX); + self::assertNotNull($resp->ARB3S); + self::assertNotNull($resp->MUBI); + self::assertNotNull($resp->ARB3L); + self::assertNotNull($resp->RBTC1); + self::assertNotNull($resp->POND); + self::assertNotNull($resp->LINA); + self::assertNotNull($resp->MYRIA); + self::assertNotNull($resp->LINK); + self::assertNotNull($resp->QTUM); + self::assertNotNull($resp->TUNE); + self::assertNotNull($resp->UFO); + self::assertNotNull($resp->CYBER); + self::assertNotNull($resp->WILD); + self::assertNotNull($resp->POLS); + self::assertNotNull($resp->NYM); + self::assertNotNull($resp->FIL); + self::assertNotNull($resp->BAL); + self::assertNotNull($resp->SCA); + self::assertNotNull($resp->STND); + self::assertNotNull($resp->WMTX); + self::assertNotNull($resp->SCLP); + self::assertNotNull($resp->MANEKI); + self::assertNotNull($resp->BAT); + self::assertNotNull($resp->AKRO); + self::assertNotNull($resp->FTM3L); + self::assertNotNull($resp->BAX); + self::assertNotNull($resp->FTM3S); + self::assertNotNull($resp->COTI); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * get24hrStats + * Get 24hr Stats + * /api/v1/market/stats + */ + public void testGet24hrStats() { + Get24hrStatsReq.Get24hrStatsReqBuilder builder = Get24hrStatsReq.builder(); + builder.symbol(?); + Get24hrStatsReq req = builder.build(); + Get24hrStatsResp resp = this.api.get24hrStats(req); + self::assertNotNull($resp->time); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->buy); + self::assertNotNull($resp->sell); + self::assertNotNull($resp->changeRate); + self::assertNotNull($resp->changePrice); + self::assertNotNull($resp->high); + self::assertNotNull($resp->low); + self::assertNotNull($resp->vol); + self::assertNotNull($resp->volValue); + self::assertNotNull($resp->last); + self::assertNotNull($resp->averagePrice); + self::assertNotNull($resp->takerFeeRate); + self::assertNotNull($resp->makerFeeRate); + self::assertNotNull($resp->takerCoefficient); + self::assertNotNull($resp->makerCoefficient); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getMarketList + * Get Market List + * /api/v1/markets + */ + public void testGetMarketList() { + GetMarketListResp resp = this.api.getMarketList(); + foreach($resp->data as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getClientIPAddress + * Get Client IP Address + * /api/v1/my-ip + */ + public void testGetClientIPAddress() { + GetClientIPAddressResp resp = this.api.getClientIPAddress(); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getServerTime + * Get Server Time + * /api/v1/timestamp + */ + public void testGetServerTime() { + GetServerTimeResp resp = this.api.getServerTime(); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getServiceStatus + * Get Service Status + * /api/v1/status + */ + public void testGetServiceStatus() { + GetServiceStatusResp resp = this.api.getServiceStatus(); + self::assertNotNull($resp->status); + self::assertNotNull($resp->msg); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getPublicToken + * Get Public Token - Spot/Margin + * /api/v1/bullet-public + */ + public void testGetPublicToken() { + GetPublicTokenResp resp = this.api.getPublicToken(); + self::assertNotNull($resp->token); + foreach($resp->instanceServers as $item) { + self::assertNotNull($item->endpoint); + self::assertNotNull($item->encrypt); + self::assertNotNull($item->protocol); + self::assertNotNull($item->pingInterval); + self::assertNotNull($item->pingTimeout); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getPrivateToken + * Get Private Token - Spot/Margin + * /api/v1/bullet-private + */ + public void testGetPrivateToken() { + GetPrivateTokenResp resp = this.api.getPrivateToken(); + self::assertNotNull($resp->token); + foreach($resp->instanceServers as $item) { + self::assertNotNull($item->endpoint); + self::assertNotNull($item->encrypt); + self::assertNotNull($item->protocol); + self::assertNotNull($item->pingInterval); + self::assertNotNull($item->pingTimeout); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java new file mode 100644 index 00000000..bb227131 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java @@ -0,0 +1,573 @@ +package com.kucoin.universal.sdk.generate.spot.market; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class MarketApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** + * getAnnouncements Request + * Get Announcements + * /api/v3/announcements + */ + public static void testGetAnnouncementsRequest() throws Exception { + String data = + "{\"currentPage\": 1, \"pageSize\": 50, \"annType\": \"latest-announcements\", \"lang\": \"en_US\", \"startTime\": 1729594043000, \"endTime\": 1729697729000}"; + GetAnnouncementsReq obj = mapper.readValue(data, GetAnnouncementsReq.class); + } + + /** + * getAnnouncements Response + * Get Announcements + * /api/v3/announcements + */ + public static void testGetAnnouncementsResponse() throws Exception { + String data = + "{\n \"code\": \"200000\",\n \"data\": {\n \"totalNum\": 195,\n \"totalPage\": 13,\n \"currentPage\": 1,\n \"pageSize\": 15,\n \"items\": [\n {\n \"annId\": 129045,\n \"annTitle\": \"KuCoin Isolated Margin Adds the Scroll (SCR) Trading Pair\",\n \"annType\": [\n \"latest-announcements\"\n ],\n \"annDesc\": \"To enrich the variety of assets available,\xa0KuCoin\u2019s Isolated Margin Trading platform has added the Scroll (SCR)\xa0asset and trading pair.\",\n \"cTime\": 1729594043000,\n \"language\": \"en_US\",\n \"annUrl\": \"https://www.kucoin.com/announcement/kucoin-isolated-margin-adds-scr?lang=en_US\"\n },\n {\n \"annId\": 129001,\n \"annTitle\": \"DAPP-30D Fixed Promotion, Enjoy an APR of 200%!\u200b\",\n \"annType\": [\n \"latest-announcements\",\n \"activities\"\n ],\n \"annDesc\": \"KuCoin Earn will be launching the DAPP Fixed Promotion at 10:00:00 on October 22, 2024 (UTC). The available product is \u201cDAPP-30D'' with an APR of 200%.\",\n \"cTime\": 1729588460000,\n \"language\": \"en_US\",\n \"annUrl\": \"https://www.kucoin.com/announcement/dapp-30d-fixed-promotion-enjoy?lang=en_US\"\n },\n {\n \"annId\": 128581,\n \"annTitle\": \"NAYM (NAYM) Gets Listed on KuCoin! World Premiere!\",\n \"annType\": [\n \"latest-announcements\",\n \"new-listings\"\n ],\n \"annDesc\": \"Trading:\xa011:00 on October 22, 2024 (UTC)\",\n \"cTime\": 1729497729000,\n \"language\": \"en_US\",\n \"annUrl\": \"https://www.kucoin.com/announcement/en-naym-naym-gets-listed-on-kucoin-world-premiere?lang=en_US\"\n }\n ]\n }\n}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getCurrency Request + * Get Currency + * /api/v3/currencies/{currency} + */ + public static void testGetCurrencyRequest() throws Exception { + String data = "{\"chain\": \"eth\", \"currency\": \"BTC\"}"; + GetCurrencyReq obj = mapper.readValue(data, GetCurrencyReq.class); + } + + /** + * getCurrency Response + * Get Currency + * /api/v3/currencies/{currency} + */ + public static void testGetCurrencyResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"currency\":\"BTC\",\"name\":\"BTC\",\"fullName\":\"Bitcoin\",\"precision\":8,\"confirms\":null,\"contractAddress\":null,\"isMarginEnabled\":true,\"isDebitEnabled\":true,\"chains\":[{\"chainName\":\"BTC\",\"withdrawalMinSize\":\"0.001\",\"depositMinSize\":\"0.0002\",\"withdrawFeeRate\":\"0\",\"withdrawalMinFee\":\"0.0005\",\"isWithdrawEnabled\":true,\"isDepositEnabled\":true,\"confirms\":3,\"preConfirms\":1,\"contractAddress\":\"\",\"withdrawPrecision\":8,\"maxWithdraw\":null,\"maxDeposit\":null,\"needTag\":false,\"chainId\":\"btc\"},{\"chainName\":\"Lightning Network\",\"withdrawalMinSize\":\"0.00001\",\"depositMinSize\":\"0.00001\",\"withdrawFeeRate\":\"0\",\"withdrawalMinFee\":\"0.000015\",\"isWithdrawEnabled\":true,\"isDepositEnabled\":true,\"confirms\":1,\"preConfirms\":1,\"contractAddress\":\"\",\"withdrawPrecision\":8,\"maxWithdraw\":null,\"maxDeposit\":\"0.03\",\"needTag\":false,\"chainId\":\"btcln\"},{\"chainName\":\"KCC\",\"withdrawalMinSize\":\"0.0008\",\"depositMinSize\":null,\"withdrawFeeRate\":\"0\",\"withdrawalMinFee\":\"0.00002\",\"isWithdrawEnabled\":true,\"isDepositEnabled\":true,\"confirms\":20,\"preConfirms\":20,\"contractAddress\":\"0xfa93c12cd345c658bc4644d1d4e1b9615952258c\",\"withdrawPrecision\":8,\"maxWithdraw\":null,\"maxDeposit\":null,\"needTag\":false,\"chainId\":\"kcc\"},{\"chainName\":\"BTC-Segwit\",\"withdrawalMinSize\":\"0.0008\",\"depositMinSize\":\"0.0002\",\"withdrawFeeRate\":\"0\",\"withdrawalMinFee\":\"0.0005\",\"isWithdrawEnabled\":false,\"isDepositEnabled\":true,\"confirms\":2,\"preConfirms\":2,\"contractAddress\":\"\",\"withdrawPrecision\":8,\"maxWithdraw\":null,\"maxDeposit\":null,\"needTag\":false,\"chainId\":\"bech32\"}]}}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getAllCurrencies Request + * Get All Currencies + * /api/v3/currencies + */ + public static void testGetAllCurrenciesRequest() throws Exception { + // $this->assertTrue(true); + } + + /** + * getAllCurrencies Response + * Get All Currencies + * /api/v3/currencies + */ + public static void testGetAllCurrenciesResponse() throws Exception { + String data = + "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"currency\": \"BTC\",\n \"name\": \"BTC\",\n \"fullName\": \"Bitcoin\",\n \"precision\": 8,\n \"confirms\": null,\n \"contractAddress\": null,\n \"isMarginEnabled\": true,\n \"isDebitEnabled\": true,\n \"chains\": [\n {\n \"chainName\": \"BTC\",\n \"withdrawalMinSize\": \"0.001\",\n \"depositMinSize\": \"0.0002\",\n \"withdrawFeeRate\": \"0\",\n \"withdrawalMinFee\": \"0.0005\",\n \"isWithdrawEnabled\": true,\n \"isDepositEnabled\": true,\n \"confirms\": 3,\n \"preConfirms\": 1,\n \"contractAddress\": \"\",\n \"withdrawPrecision\": 8,\n \"maxWithdraw\": null,\n \"maxDeposit\": null,\n \"needTag\": false,\n \"chainId\": \"btc\"\n },\n {\n \"chainName\": \"Lightning Network\",\n \"withdrawalMinSize\": \"0.00001\",\n \"depositMinSize\": \"0.00001\",\n \"withdrawFeeRate\": \"0\",\n \"withdrawalMinFee\": \"0.000015\",\n \"isWithdrawEnabled\": true,\n \"isDepositEnabled\": true,\n \"confirms\": 1,\n \"preConfirms\": 1,\n \"contractAddress\": \"\",\n \"withdrawPrecision\": 8,\n \"maxWithdraw\": null,\n \"maxDeposit\": \"0.03\",\n \"needTag\": false,\n \"chainId\": \"btcln\"\n },\n {\n \"chainName\": \"KCC\",\n \"withdrawalMinSize\": \"0.0008\",\n \"depositMinSize\": null,\n \"withdrawFeeRate\": \"0\",\n \"withdrawalMinFee\": \"0.00002\",\n \"isWithdrawEnabled\": true,\n \"isDepositEnabled\": true,\n \"confirms\": 20,\n \"preConfirms\": 20,\n \"contractAddress\": \"0xfa93c12cd345c658bc4644d1d4e1b9615952258c\",\n \"withdrawPrecision\": 8,\n \"maxWithdraw\": null,\n \"maxDeposit\": null,\n \"needTag\": false,\n \"chainId\": \"kcc\"\n },\n {\n \"chainName\": \"BTC-Segwit\",\n \"withdrawalMinSize\": \"0.0008\",\n \"depositMinSize\": \"0.0002\",\n \"withdrawFeeRate\": \"0\",\n \"withdrawalMinFee\": \"0.0005\",\n \"isWithdrawEnabled\": false,\n \"isDepositEnabled\": true,\n \"confirms\": 2,\n \"preConfirms\": 2,\n \"contractAddress\": \"\",\n \"withdrawPrecision\": 8,\n \"maxWithdraw\": null,\n \"maxDeposit\": null,\n \"needTag\": false,\n \"chainId\": \"bech32\"\n }\n ]\n },\n {\n \"currency\": \"BTCP\",\n \"name\": \"BTCP\",\n \"fullName\": \"Bitcoin Private\",\n \"precision\": 8,\n \"confirms\": null,\n \"contractAddress\": null,\n \"isMarginEnabled\": false,\n \"isDebitEnabled\": false,\n \"chains\": [\n {\n \"chainName\": \"BTCP\",\n \"withdrawalMinSize\": \"0.100000\",\n \"depositMinSize\": null,\n \"withdrawFeeRate\": \"0\",\n \"withdrawalMinFee\": \"0.010000\",\n \"isWithdrawEnabled\": false,\n \"isDepositEnabled\": false,\n \"confirms\": 6,\n \"preConfirms\": 6,\n \"contractAddress\": \"\",\n \"withdrawPrecision\": 8,\n \"maxWithdraw\": null,\n \"maxDeposit\": null,\n \"needTag\": false,\n \"chainId\": \"btcp\"\n }\n ]\n }\n ]\n}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getSymbol Request + * Get Symbol + * /api/v2/symbols/{symbol} + */ + public static void testGetSymbolRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\"}"; + GetSymbolReq obj = mapper.readValue(data, GetSymbolReq.class); + } + + /** + * getSymbol Response + * Get Symbol + * /api/v2/symbols/{symbol} + */ + public static void testGetSymbolResponse() throws Exception { + String 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}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getAllSymbols Request + * Get All Symbols + * /api/v2/symbols + */ + public static void testGetAllSymbolsRequest() throws Exception { + String data = "{\"market\": \"ALTS\"}"; + GetAllSymbolsReq obj = mapper.readValue(data, GetAllSymbolsReq.class); + } + + /** + * getAllSymbols Response + * Get All Symbols + * /api/v2/symbols + */ + public static void testGetAllSymbolsResponse() throws Exception { + String 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}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getTicker Request + * Get Ticker + * /api/v1/market/orderbook/level1 + */ + public static void testGetTickerRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\"}"; + GetTickerReq obj = mapper.readValue(data, GetTickerReq.class); + } + + /** + * getTicker Response + * Get Ticker + * /api/v1/market/orderbook/level1 + */ + public static void testGetTickerResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"time\":1729172965609,\"sequence\":\"14609309753\",\"price\":\"67269\",\"size\":\"0.000025\",\"bestBid\":\"67267.5\",\"bestBidSize\":\"0.000025\",\"bestAsk\":\"67267.6\",\"bestAskSize\":\"1.24808993\"}}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getAllTickers Request + * Get All Tickers + * /api/v1/market/allTickers + */ + public static void testGetAllTickersRequest() throws Exception { + // $this->assertTrue(true); + } + + /** + * getAllTickers Response + * Get All Tickers + * /api/v1/market/allTickers + */ + public static void testGetAllTickersResponse() throws Exception { + String data = + "{\n \"code\": \"200000\",\n \"data\": {\n \"time\": 1729173207043,\n \"ticker\": [\n {\n \"symbol\": \"BTC-USDT\",\n \"symbolName\": \"BTC-USDT\",\n \"buy\": \"67192.5\",\n \"bestBidSize\": \"0.000025\",\n \"sell\": \"67192.6\",\n \"bestAskSize\": \"1.24949204\",\n \"changeRate\": \"-0.0014\",\n \"changePrice\": \"-98.5\",\n \"high\": \"68321.4\",\n \"low\": \"66683.3\",\n \"vol\": \"1836.03034612\",\n \"volValue\": \"124068431.06726933\",\n \"last\": \"67193\",\n \"averagePrice\": \"67281.21437289\",\n \"takerFeeRate\": \"0.001\",\n \"makerFeeRate\": \"0.001\",\n \"takerCoefficient\": \"1\",\n \"makerCoefficient\": \"1\"\n }\n ]\n }\n}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getTradeHistory Request + * Get Trade History + * /api/v1/market/histories + */ + public static void testGetTradeHistoryRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\"}"; + GetTradeHistoryReq obj = mapper.readValue(data, GetTradeHistoryReq.class); + } + + /** + * getTradeHistory Response + * Get Trade History + * /api/v1/market/histories + */ + public static void testGetTradeHistoryResponse() throws Exception { + String data = + "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"sequence\": \"10976028003549185\",\n \"price\": \"67122\",\n \"size\": \"0.000025\",\n \"side\": \"buy\",\n \"time\": 1729177117877000000\n },\n {\n \"sequence\": \"10976028003549188\",\n \"price\": \"67122\",\n \"size\": \"0.01792257\",\n \"side\": \"buy\",\n \"time\": 1729177117877000000\n },\n {\n \"sequence\": \"10976028003549191\",\n \"price\": \"67122.9\",\n \"size\": \"0.05654289\",\n \"side\": \"buy\",\n \"time\": 1729177117877000000\n }\n ]\n}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getKlines Request + * Get Klines + * /api/v1/market/candles + */ + public static void testGetKlinesRequest() throws Exception { + String data = + "{\"symbol\": \"BTC-USDT\", \"type\": \"1min\", \"startAt\": 1566703297, \"endAt\": 1566789757}"; + GetKlinesReq obj = mapper.readValue(data, GetKlinesReq.class); + } + + /** + * getKlines Response + * Get Klines + * /api/v1/market/candles + */ + public static void testGetKlinesResponse() throws Exception { + String data = + "{\n \"code\": \"200000\",\n \"data\": [\n [\n \"1566789720\",\n \"10411.5\",\n \"10401.9\",\n \"10411.5\",\n \"10396.3\",\n \"29.11357276\",\n \"302889.301529914\"\n ],\n [\n \"1566789660\",\n \"10416\",\n \"10411.5\",\n \"10422.3\",\n \"10411.5\",\n \"15.61781842\",\n \"162703.708997029\"\n ],\n [\n \"1566789600\",\n \"10408.6\",\n \"10416\",\n \"10416\",\n \"10405.4\",\n \"12.45584973\",\n \"129666.51508559\"\n ]\n ]\n}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getPartOrderBook Request + * Get Part OrderBook + * /api/v1/market/orderbook/level2_{size} + */ + public static void testGetPartOrderBookRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\", \"size\": \"20\"}"; + GetPartOrderBookReq obj = mapper.readValue(data, GetPartOrderBookReq.class); + } + + /** + * getPartOrderBook Response + * Get Part OrderBook + * /api/v1/market/orderbook/level2_{size} + */ + public static void testGetPartOrderBookResponse() throws Exception { + String 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}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getFullOrderBook Request + * Get Full OrderBook + * /api/v3/market/orderbook/level2 + */ + public static void testGetFullOrderBookRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\"}"; + GetFullOrderBookReq obj = mapper.readValue(data, GetFullOrderBookReq.class); + } + + /** + * getFullOrderBook Response + * Get Full OrderBook + * /api/v3/market/orderbook/level2 + */ + public static void testGetFullOrderBookResponse() throws Exception { + String 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}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getCallAuctionPartOrderBook Request + * Get Call Auction Part OrderBook + * /api/v1/market/orderbook/callauction/level2_{size} + */ + public static void testGetCallAuctionPartOrderBookRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\", \"size\": \"20\"}"; + GetCallAuctionPartOrderBookReq obj = + mapper.readValue(data, GetCallAuctionPartOrderBookReq.class); + } + + /** + * getCallAuctionPartOrderBook Response + * Get Call Auction Part OrderBook + * /api/v1/market/orderbook/callauction/level2_{size} + */ + public static void testGetCallAuctionPartOrderBookResponse() + throws Exception { + String 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}"; + RestResponse resp = mapper.readValue( + data, + new TypeReference>() {}); + } + /** + * getCallAuctionInfo Request + * Get Call Auction Info + * /api/v1/market/callauctionData + */ + public static void testGetCallAuctionInfoRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\"}"; + GetCallAuctionInfoReq obj = + mapper.readValue(data, GetCallAuctionInfoReq.class); + } + + /** + * getCallAuctionInfo Response + * Get Call Auction Info + * /api/v1/market/callauctionData + */ + public static void testGetCallAuctionInfoResponse() throws Exception { + String 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}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getFiatPrice Request + * Get Fiat Price + * /api/v1/prices + */ + public static void testGetFiatPriceRequest() throws Exception { + String data = + "{\"base\": \"USD\", \"currencies\": \"example_string_default_value\"}"; + GetFiatPriceReq obj = mapper.readValue(data, GetFiatPriceReq.class); + } + + /** + * getFiatPrice Response + * Get Fiat Price + * /api/v1/prices + */ + public static void testGetFiatPriceResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"AGLD\":\"1.1174410000000001\",\"DFI\":\"0.0168915500000000\",\"PYTHUP\":\"0.0397880960000000\",\"ISLM\":\"0.0606196750000000\",\"NEAR\":\"4.7185395500000000\",\"AIOZ\":\"0.4862867350000000\",\"AUDIO\":\"0.1219390000000000\",\"BBL\":\"0.0067766100000000\",\"WLD\":\"2.2893547500000000\",\"HNT\":\"5.8990489999999984\",\"ETHFI\":\"1.5892050000000000\",\"DMAIL\":\"0.2726636000000000\",\"OPUP\":\"0.0986506500000000\",\"VET3S\":\"0.0003700448850000\",\"MANA3S\":\"0.0006056970000000\",\"TIDAL\":\"0.0001154422500000\",\"HALO\":\"0.0058270850000000\",\"OPUL\":\"0.0839480050000000\",\"MANA3L\":\"0.0029569407900000\",\"DGB\":\"0.0066556705000000\",\"AA\":\"0.2406796000000000\",\"BCH\":\"366.2167999999996484\",\"GMEE\":\"0.0113333305000000\",\"JST\":\"0.0302348750000000\",\"PBUX\":\"0.0208795550000000\",\"AR\":\"18.5457224999999909\",\"SEI\":\"0.4332832500000000\",\"PSTAKE\":\"0.0493153300000000\",\"LMWR\":\"0.1618190500000000\",\"UNFIDOWN\":\"0.0062058955000000\",\"BB\":\"0.3245376500000000\",\"JTO\":\"2.1239375000000002\",\"WEMIX\":\"0.7916040000000000\",\"G\":\"0.0324037900000000\",\"MARSH\":\"0.0617591050000000\",\"BN\":\"0.0036961510000000\",\"FLIP\":\"1.0976509000000000\",\"FLR\":\"0.0144827550000000\",\"BIGTIME\":\"0.1238780300000000\",\"FLY\":\"0.0005157420000000\",\"T\":\"0.0233483200000000\",\"W\":\"0.2865566500000000\",\"BDX\":\"0.0774012800000000\",\"BABYDOGE\":\"0.0000000029375305\",\"SFP\":\"0.7256370000000000\",\"DIA\":\"0.9179408000000000\",\"ISME\":\"0.0022388800000000\",\"LYM\":\"0.0010155919500000\",\"VET3L\":\"0.0000289755050000\",\"JUP\":\"0.8230882500000000\",\"LYX\":\"1.4501745500000001\",\"AIEPK\":\"0.0050094940000000\",\"SILLY\":\"0.0159420250000000\",\"SCPT\":\"0.0122038950000000\",\"WOO\":\"0.1796601250000000\",\"BLUR\":\"0.2462768000000000\",\"STRK\":\"0.3963117450000000\",\"BFC\":\"0.0383608100000000\",\"DC\":\"0.0003097450500000\",\"KARATE\":\"0.0007296350000000\",\"SUSHI3L\":\"0.5115441000000000\",\"NETVR\":\"0.0976111700000000\",\"WAVES\":\"1.0806594000000000\",\"LITH\":\"0.0001520239500000\",\"HAPI\":\"8.6533711499999987\",\"SUSHI3S\":\"1.2752620500000000\",\"CEEK\":\"0.0294852500000000\",\"FLOKI\":\"0.0001414292500000\",\"SHR\":\"0.0012463765000000\",\"SAND\":\"0.2566616050000000\",\"TURT\":\"0.0020889550000000\",\"UMA\":\"2.5207390000000000\",\"BEPRO\":\"0.0003955021500000\",\"SCRT\":\"0.1995002000000000\",\"TUSD\":\"0.9945025000000000\",\"COOKIE\":\"0.0220089900000000\",\"LRDS\":\"0.6218889000000000\",\"SIN\":\"0.0033633175000000\",\"OAS\":\"0.0331933950000000\",\"ROOT\":\"0.0183108400000000\",\"ADA3L\":\"0.0046396790000000\",\"TIAUP\":\"0.1228385500000000\",\"HTR\":\"0.0353023400000000\",\"UNB\":\"0.0003837080500000\",\"UNA\":\"0.0164917500000000\",\"HARD\":\"0.1087056200000000\",\"G3\":\"0.0502648550000000\",\"ADA3S\":\"0.0006191202850000\",\"MYRO\":\"0.1071863800000000\",\"HTX\":\"0.0000013693150000\",\"FT\":\"0.3585206500000000\",\"BTCDOWN\":\"0.1065467000000000\",\"UNI\":\"7.3571195999999993\",\"FX\":\"0.1379310000000000\",\"OBI\":\"0.0079030465000000\",\"UNO\":\"0.0137131400000000\",\"WRX\":\"0.1221389000000000\",\"TIADOWN\":\"0.0000914642450000\",\"ETHDOWN\":\"0.1306346500000000\",\"WELL\":\"0.0471244260000000\",\"SWFTC\":\"0.0028966509500000\",\"SKL\":\"0.0362418700000000\",\"UOS\":\"0.0867765900000000\",\"AIPAD\":\"0.0478660550000000\",\"BRETT\":\"0.1037481000000000\",\"SKY\":\"0.0520139800000000\",\"FRM\":\"0.0153123400000000\",\"VISION\":\"0.0014451770500000\",\"LENDS\":\"0.0047276350000000\",\"SLF\":\"0.3318340000000000\",\"BULL\":\"0.0023988000000000\",\"FLOW\":\"0.5372312500000000\",\"ODDZ\":\"0.0063368300000000\",\"SLN\":\"0.2804597000000000\",\"UPO\":\"0.0440779500000000\",\"SLP\":\"0.0023997995000000\",\"ID\":\"0.3718140000000000\",\"SLIM\":\"0.0906446550000000\",\"SPOT\":\"0.0021289350000000\",\"DOP\":\"0.0023028480000000\",\"ISSP\":\"0.0000874562500000\",\"UQC\":\"3.2339822000000003\",\"IO\":\"1.8185902499999999\",\"DOT\":\"4.2022978000000005\",\"1INCH\":\"0.2645676500000000\",\"SMH\":\"0.3448275000000000\",\"MAK\":\"0.0396701550000000\",\"TOKO\":\"0.0005923037000000\",\"TURBO\":\"0.0108085930000000\",\"UNFI\":\"2.8555714999999996\",\"MAN\":\"0.0210764565000000\",\"EVER\":\"0.0332733550000000\",\"FTM\":\"0.7259068650000000\",\"SHRAP\":\"0.0476361700000000\",\"MAV\":\"0.1738130500000000\",\"MAX\":\"0.2864966800000000\",\"DPR\":\"0.0018240875000000\",\"FTT\":\"2.0559715000000002\",\"ARKM\":\"1.7444273499999999\",\"ATOM\":\"4.2954512000000002\",\"PENDLE\":\"4.1554212500000007\",\"QUICK\":\"0.0365317250000000\",\"BLZ\":\"0.1217191100000000\",\"BOBA\":\"0.2014092450000000\",\"MBL\":\"0.0027856065000000\",\"OFN\":\"0.1252373500000000\",\"UNIO\":\"0.0025487250000000\",\"SNS\":\"0.0200899500000000\",\"SNX\":\"1.4282854999999999\",\"NXRA\":\"0.0272763550000000\",\"TAIKO\":\"1.4392800000000001\",\"AVAX3L\":\"0.1410875109550000\",\"L3\":\"0.0608395650000000\",\"API3\":\"1.3728132500000001\",\"XRP3S\":\"0.0028095945000000\",\"QKC\":\"0.0085157400000000\",\"AVAX3S\":\"0.5148424500000000\",\"ROSE\":\"0.0693453100000000\",\"SATS\":\"0.0000002701648500\",\"BMX\":\"0.3100449000000000\",\"PORTAL\":\"0.2811593500000000\",\"TOMI\":\"0.0309045400000000\",\"XRP3L\":\"2.1586201500000002\",\"SOL\":\"151.7250995000003583\",\"SON\":\"0.0002421788500000\",\"BNC\":\"0.1882058500000000\",\"SOCIAL\":\"0.0026486750000000\",\"CGPT\":\"0.1305147100000000\",\"CELR\":\"0.0127736100000000\",\"BNB\":\"591.0973035000118935\",\"OGN\":\"0.0852573500000000\",\"CELO\":\"0.7711142500000000\",\"AUCTION\":\"13.1634150000000014\",\"MANTA\":\"0.7564216000000000\",\"LAYER\":\"0.0372713550000000\",\"AERO\":\"1.3783104999999999\",\"CETUS\":\"0.1808295400000000\",\"LL\":\"0.0201199350000000\",\"SPA\":\"0.0067426270000000\",\"PYTHDOWN\":\"0.0011834080000000\",\"NEIROCTO\":\"0.0019964013000000\",\"UTK\":\"0.0365217300000000\",\"GMRX\":\"0.0007386305000000\",\"BOB\":\"0.0000380619595000\",\"HOTCROSS\":\"0.0056491740000000\",\"AERGO\":\"0.1007595950000000\",\"MOCA\":\"0.0783608000000000\",\"SQD\":\"0.0380809500000000\",\"MV\":\"0.0081359300000000\",\"BNB3L\":\"0.2761618500000000\",\"BNB3S\":\"0.0008545725000000\",\"GALAX3L\":\"0.0057571999600000\",\"KAI\":\"0.0020080954500000\",\"SQR\":\"0.0470764500000000\",\"GALAX3S\":\"0.1933033000000000\",\"EGLD\":\"25.5272299999999713\",\"ZBCN\":\"0.0010404795000000\",\"KAS\":\"0.1216691350000000\",\"MEW\":\"0.0086176890000000\",\"PUNDIX\":\"0.4130933500000000\",\"LOOKS\":\"0.0392803500000000\",\"FXS\":\"1.9060465000000000\",\"BOSON\":\"0.2732633000000000\",\"BRISE\":\"0.0000000860569500\",\"AEVO\":\"0.3388305000000000\",\"FLUX\":\"0.5276360500000000\",\"PRCL\":\"0.1969015000000000\",\"UNFIUP\":\"0.0011654170000000\",\"SEIDOWN\":\"0.0442778500000000\",\"DOAI\":\"0.0052363805000000\",\"QNT\":\"65.4312679999998206\",\"REDO\":\"0.2837580500000000\",\"STRIKE\":\"6.8225869999999997\",\"ETHW\":\"3.2418782499999998\",\"OM\":\"1.5396797750000000\",\"OP\":\"1.6911539999999999\",\"WHALE\":\"0.8134930500000000\",\"1CAT\":\"0.0018460765000000\",\"NEON\":\"0.4446775500000000\",\"GTAI\":\"0.7786105000000000\",\"SSV\":\"21.2393749999999841\",\"ETH2\":\"2601.6678843156403923\",\"KCS\":\"8.7646155000000020\",\"ARPA\":\"0.0393882960000000\",\"ARTFI\":\"0.0141029450000000\",\"BRL\":\"0.1742807323452485\",\"ALEX\":\"0.0924537500000000\",\"STG\":\"0.2943527500000000\",\"SHIB\":\"0.0000178060925000\",\"IOTX\":\"0.0394202800000000\",\"OLE\":\"0.0171414250000000\",\"KDA\":\"0.5653172000000000\",\"CERE\":\"0.0022548720000000\",\"DOCK\":\"0.0018990500000000\",\"STX\":\"1.8157916500000000\",\"OLT\":\"0.0007596200000000\",\"QI\":\"0.0131754090000000\",\"SDAO\":\"0.2748625000000000\",\"BLAST\":\"0.0087636160000000\",\"LINK3S\":\"0.0000702948350000\",\"IOST\":\"0.0049745115000000\",\"SUI\":\"2.0589700000000000\",\"CAKE\":\"1.7941024999999999\",\"BSW\":\"0.0586706500000000\",\"OMG\":\"0.2597700500000000\",\"VOLT\":\"0.0000002716641000\",\"LINK3L\":\"1.3408292499999999\",\"GEEQ\":\"0.0385607100000000\",\"PYUSD\":\"0.9988003500000000\",\"SUN\":\"0.0186106900000000\",\"TOWER\":\"0.0014812590000000\",\"BTC\":\"67133.4165000832051564\",\"IOTA\":\"0.1189405000000000\",\"REEF\":\"0.0019960015000000\",\"TRIAS\":\"3.3683149999999998\",\"KEY\":\"0.0037594713240047\",\"ETH3L\":\"0.0003305946200000\",\"BTT\":\"0.0000009117439000\",\"ONE\":\"0.0132003965000000\",\"RENDER\":\"5.2263854999999995\",\"ETH3S\":\"0.5517240000000000\",\"ANKR\":\"0.0264867500000000\",\"ALGO\":\"0.1188405500000000\",\"SYLO\":\"0.0007600198000000\",\"ZCX\":\"0.0784707450000000\",\"SD\":\"0.3851073500000000\",\"ONT\":\"0.1877960550000000\",\"MJT\":\"0.0132433750000000\",\"DYM\":\"1.6659666000000001\",\"DYP\":\"0.0205397250000000\",\"BAKEUP\":\"0.0389894955000000\",\"OOE\":\"0.0079360300000000\",\"ZELIX\":\"0.0000649675000000\",\"DOGE3L\":\"0.3837080500000000\",\"ARTY\":\"0.3980009000000000\",\"QORPO\":\"0.1204297550000000\",\"ICE\":\"0.0051504235000000\",\"NOTAI\":\"0.0000892753400000\",\"DOGE3S\":\"0.2291853500000000\",\"NAKA\":\"1.0695649500000000\",\"GALAX\":\"0.0212893500000000\",\"MKR\":\"1245.8767500000163833\",\"DODO\":\"0.1152423500000000\",\"ICP\":\"7.6731615000000027\",\"ZEC\":\"35.9400209999999543\",\"ZEE\":\"0.0065767100000000\",\"ICX\":\"0.1383308000000000\",\"KMNO\":\"0.0921499020000000\",\"TT\":\"0.0033883050000000\",\"DOT3L\":\"0.1454272500000000\",\"XAI\":\"0.2038980000000000\",\"ZEN\":\"8.0149905000000007\",\"DOGE\":\"0.1213093150000000\",\"ALPHA\":\"0.0567416150000000\",\"DUSK\":\"0.1964517250000000\",\"DOT3S\":\"0.0053613180000000\",\"SXP\":\"0.2538730000000000\",\"HBAR\":\"0.0510044850000000\",\"SYNT\":\"0.0467166300000000\",\"ZEX\":\"0.0571714000000000\",\"BONDLY\":\"0.0022208890000000\",\"MLK\":\"0.2080859050000000\",\"KICKS\":\"0.0001301249050000\",\"PEPE\":\"0.0000100249850000\",\"OUSD\":\"0.9982006500000000\",\"LUNCDOWN\":\"0.0000733333150000\",\"DOGS\":\"0.0007086455000000\",\"REV3L\":\"0.0094672640000000\",\"CTSI\":\"0.1257371000000000\",\"C98\":\"0.1219390000000000\",\"OSMO\":\"0.5370313500000000\",\"NTRN\":\"0.3869064500000000\",\"CFX2S\":\"0.0084757600000000\",\"SYN\":\"0.5636180500000000\",\"VIDT\":\"0.0308745550000000\",\"SYS\":\"0.0997501000000000\",\"GAS\":\"4.3029474500000008\",\"BOME\":\"0.0087336310000000\",\"COMBO\":\"0.4068964500000000\",\"XCH\":\"14.9825050000000010\",\"VR\":\"0.0063538215000000\",\"CFX2L\":\"0.0499660045000000\",\"VSYS\":\"0.0005201398000000\",\"PANDORA\":\"1629.2949450001102772\",\"THETA\":\"1.2461766000000000\",\"XCN\":\"0.0012699647000000\",\"NEXG\":\"0.0039180400000000\",\"MELOS\":\"0.0021244372500000\",\"XCV\":\"0.0013253370000000\",\"ORN\":\"0.8797599000000000\",\"WLKN\":\"0.0010624685000000\",\"AAVE\":\"154.2708259999996162\",\"MNT\":\"0.6168914000000000\",\"BONK\":\"0.0000227296295000\",\"PERP\":\"0.6037979500000000\",\"XDC\":\"0.0276361750000000\",\"MNW\":\"0.3681158500000000\",\"XDB\":\"0.0002578710000000\",\"BOND\":\"1.5662165000000000\",\"SUIA\":\"0.0809595000000000\",\"MOG\":\"0.0000019330330000\",\"SUTER\":\"0.0001840079500000\",\"TIME\":\"16.2648634999999969\",\"RACA\":\"0.0001949025000000\",\"BICO\":\"0.2021988500000000\",\"MON\":\"0.1066466500000000\",\"SWEAT\":\"0.0063718125000000\",\"MOXIE\":\"0.0022088950000000\",\"BABYBNB\":\"0.0289755050000000\",\"IGU\":\"0.0050674650000000\",\"HMSTR\":\"0.0037990995000000\",\"XEC\":\"0.0000354722550000\",\"MONI\":\"0.0058470750000000\",\"XR\":\"0.2374812000000000\",\"PEOPLE\":\"0.0796601500000000\",\"PUMLX\":\"0.0054572700000000\",\"ZIL\":\"0.0145927000000000\",\"WLDDOWN\":\"0.2089954500000000\",\"VAI\":\"0.0799999800000000\",\"XEN\":\"0.0000000839580000\",\"MPC\":\"0.1001499000000000\",\"XEM\":\"0.0176951480000000\",\"JASMY3S\":\"0.0019670160000000\",\"OTK\":\"0.0290464695000000\",\"TRAC\":\"0.4521738000000000\",\"DFYN\":\"0.0070664650000000\",\"BIDP\":\"0.0001939030000000\",\"JASMY3L\":\"0.0001653772700000\",\"INJDOWN\":\"0.0000194902500000\",\"KLV\":\"0.0019310340000000\",\"WAXL\":\"0.7858069000000000\",\"TRBDOWN\":\"0.0023138425000000\",\"BCH3L\":\"4.6390663064999996\",\"GMT3S\":\"0.0000457771000000\",\"KMD\":\"0.2493752500000000\",\"BCH3S\":\"0.9634180500000000\",\"ECOX\":\"0.0987506000000000\",\"AAVE3S\":\"0.0560719500000000\",\"GMT3L\":\"0.0053983694650000\",\"EPIK\":\"0.0045857060000000\",\"SUIP\":\"0.1067565950000000\",\"AAVE3L\":\"0.3638687346200000\",\"ZK\":\"0.1262368500000000\",\"ZKF\":\"0.0008595700000000\",\"OMNIA\":\"0.7624186000000000\",\"ZKJ\":\"1.1124435000000000\",\"ZKL\":\"0.1255372000000000\",\"GAFI\":\"3.0634675000000001\",\"CARV\":\"0.8703646000000000\",\"KNC\":\"0.4433782000000000\",\"CATS\":\"0.0000599700000000\",\"PROM\":\"5.2833570000000006\",\"ALEPH\":\"0.1756121500000000\",\"PONKE\":\"0.3958020000000000\",\"OVR\":\"0.1553223000000000\",\"CATI\":\"0.4105146400000000\",\"ORDER\":\"0.1183008200000000\",\"GFT\":\"0.0166616650000000\",\"BIFI\":\"0.0020489750000000\",\"GGC\":\"6.9965029985000000\",\"GGG\":\"0.0403798000000000\",\"DAPPX\":\"0.0043788095000000\",\"SUKU\":\"0.0618790450000000\",\"ULTI\":\"0.0168015950000000\",\"CREDI\":\"0.0192903500000000\",\"ERTHA\":\"0.0010014990000000\",\"FURY\":\"0.1405297000000000\",\"KARRAT\":\"0.5577210000000000\",\"MOBILE\":\"0.0009005495000000\",\"SIDUS\":\"0.0037671155000000\",\"NAVI\":\"0.1254672350000000\",\"TAO\":\"583.4081500000051807\",\"USDJ\":\"1.1386304000000001\",\"MTL\":\"0.9563216000000000\",\"VET\":\"0.0225387250000000\",\"FITFI\":\"0.0036421780000000\",\"USDT\":\"0.9995000000000000\",\"OXT\":\"0.0695652000000000\",\"CANDY\":\"0.0005597200000000\",\"USDP\":\"0.9932031500000000\",\"MTS\":\"0.0027516235000000\",\"TADA\":\"0.0283858000000000\",\"MTV\":\"0.0006559718500000\",\"NAVX\":\"0.1342228550000000\",\"ILV\":\"35.6771524999999671\",\"VINU\":\"0.0000000109045450\",\"GHX\":\"0.0903548000000000\",\"EDU\":\"0.5167415000000000\",\"HYVE\":\"0.0137331300000000\",\"BTC3L\":\"0.0058620675000000\",\"ANYONE\":\"0.9015490000000000\",\"BEAT\":\"0.0012593700000000\",\"KING\":\"0.0004821588000000\",\"CREAM\":\"15.6541689999999973\",\"CAS\":\"0.0038590695000000\",\"IMX\":\"1.4944524000000000\",\"CAT\":\"0.0000256981445000\",\"BTC3S\":\"0.0014142925000000\",\"USDE\":\"0.9985005000000000\",\"USDD\":\"1.0000997000000000\",\"CWAR\":\"0.0037981000000000\",\"USDC\":\"0.9997998500000000\",\"KRL\":\"0.3543127550000000\",\"INJ\":\"21.7691100000000194\",\"GAME\":\"0.0139630150000000\",\"TRIBL\":\"1.0994500000000000\",\"XLM\":\"0.0948525500000000\",\"TRBUP\":\"0.0012293850000000\",\"VRADOWN\":\"0.0013433280000000\",\"SUPER\":\"1.2853570000000000\",\"EIGEN\":\"3.1536223999999999\",\"IOI\":\"0.0146926500000000\",\"KSM\":\"17.5212350000000129\",\"CCD\":\"0.0034832575000000\",\"EGO\":\"0.0093553200000000\",\"EGP\":\"2.7946019999999998\",\"MXC\":\"0.0066866550000000\",\"TEL\":\"0.0014432780000000\",\"MOVR\":\"9.1340307000000027\",\"XMR\":\"155.5421899999990755\",\"MXM\":\"0.0092853550000000\",\"OORT\":\"0.1099949750000000\",\"GLM\":\"0.3231383500000000\",\"RAY\":\"2.0228880499999998\",\"XTAG\":\"0.0218190850000000\",\"GLQ\":\"0.0854572500000000\",\"CWEB\":\"0.0038480750000000\",\"REVU\":\"0.0105047450000000\",\"REVV\":\"0.0039760110000000\",\"ZRO\":\"3.7952014499999994\",\"XNL\":\"0.0093853050000000\",\"XNO\":\"0.8496749500000000\",\"SAROS\":\"0.0019290350000000\",\"KACE\":\"2.1165411999999998\",\"ZRX\":\"0.3186406000000000\",\"WLTH\":\"0.0374312750000000\",\"ATOM3L\":\"0.0321719060000000\",\"GMM\":\"0.0001497251000000\",\"BEER\":\"0.0000138670630000\",\"GMT\":\"0.1275362000000000\",\"HEART\":\"0.0159920000000000\",\"GMX\":\"22.7186349999999882\",\"ABBC\":\"0.0061769100000000\",\"OMNI\":\"8.9235359999999970\",\"ATOM3S\":\"0.0007945225400000\",\"IRL\":\"0.0099650150000000\",\"CFG\":\"0.3248375000000000\",\"WSDM\":\"0.0139830050000000\",\"GNS\":\"1.8390800000000001\",\"VANRY\":\"0.0809295150000000\",\"CFX\":\"0.1595202000000000\",\"GRAIL\":\"817.1212349999937891\",\"BEFI\":\"0.0175712100000000\",\"VELO\":\"0.0132043945000000\",\"XPR\":\"0.0008077959000000\",\"DOVI\":\"0.0584707500000000\",\"ACE\":\"0.0021349320000000\",\"ACH\":\"0.0190534685000000\",\"ISP\":\"0.0012161916000000\",\"XCAD\":\"0.2834582000000000\",\"MINA\":\"0.5630183500000000\",\"TIA\":\"5.9318325999999999\",\"DRIFT\":\"0.4350823500000000\",\"ACQ\":\"0.0056981495000000\",\"ACS\":\"0.0014917537500000\",\"MIND\":\"0.0018920535000000\",\"STORE\":\"0.0062358805000000\",\"REN\":\"0.0351224300000000\",\"ELA\":\"1.7282354500000000\",\"DREAMS\":\"0.0002498750000000\",\"ADA\":\"0.3463267500000000\",\"ELF\":\"0.3777110500000000\",\"REQ\":\"0.0959919800000000\",\"STORJ\":\"0.5662167500000000\",\"LADYS\":\"0.0000000837581000\",\"PAXG\":\"2697.9303600003123340\",\"REZ\":\"0.0409795000000000\",\"XRD\":\"0.0157821050000000\",\"CHO\":\"0.0205097400000000\",\"CHR\":\"0.1769115000000000\",\"ADS\":\"0.1889055000000000\",\"CHZ\":\"0.0738030800000000\",\"ADX\":\"0.1575212000000000\",\"XRP\":\"0.5525036100000000\",\"JASMY\":\"0.0188615645000000\",\"KAGI\":\"0.1834582250000000\",\"FIDA\":\"0.2282858000000000\",\"PBR\":\"0.0291953950000000\",\"AEG\":\"0.0093453250000000\",\"H2O\":\"0.1610194500000000\",\"CHMB\":\"0.0001715641750000\",\"SAND3L\":\"0.0015447972150000\",\"PBX\":\"0.0006879558500000\",\"SOLVE\":\"0.0084557700000000\",\"DECHAT\":\"0.1512243500000000\",\"GARI\":\"0.0076861550000000\",\"SHIB2L\":\"1.1996998499999999\",\"SHIB2S\":\"0.0240879500000000\",\"ENA\":\"0.3942028000000000\",\"VEMP\":\"0.0029335325000000\",\"ENJ\":\"0.1467266000000000\",\"AFG\":\"0.0072163900000000\",\"RATS\":\"0.0001211593900000\",\"GRT\":\"0.1646076550000000\",\"FORWARD\":\"0.0012873560000000\",\"TFUEL\":\"0.0598800450000000\",\"ENS\":\"17.0634640000000052\",\"KASDOWN\":\"0.0258770550000000\",\"XTM\":\"0.0251074400000000\",\"DEGEN\":\"0.0084857550000000\",\"TLM\":\"0.0100449750000000\",\"DYDXDOWN\":\"0.1042598440000000\",\"CKB\":\"0.0146026950000000\",\"LUNC\":\"0.0000889255150000\",\"AURORA\":\"0.1204397500000000\",\"LUNA\":\"0.3624187000000000\",\"XTZ\":\"0.6776610000000000\",\"ELON\":\"0.0000001410294500\",\"DMTR\":\"0.0891554000000000\",\"EOS\":\"0.4759619000000000\",\"GST\":\"0.0118940500000000\",\"FORT\":\"0.1155422000000000\",\"FLAME\":\"0.0247076400000000\",\"PATEX\":\"0.9605195000000000\",\"DEEP\":\"0.0328885475000000\",\"ID3L\":\"0.0016201895000000\",\"GTC\":\"0.6625685500000000\",\"ID3S\":\"0.0071674145000000\",\"RIO\":\"0.7616190000000000\",\"CLH\":\"0.0008555720000000\",\"BURGER\":\"0.4016990500000000\",\"VRA\":\"0.0029765110000000\",\"SUNDOG\":\"0.2173912500000000\",\"GTT\":\"0.0002038980000000\",\"INJUP\":\"0.2327835500000000\",\"CPOOL\":\"0.1557720750000000\",\"EPX\":\"0.0000740629500000\",\"CLV\":\"0.0329835000000000\",\"FEAR\":\"0.0560519600000000\",\"MEME\":\"0.0124847545000000\",\"ROOBEE\":\"0.0004520738500000\",\"DEFI\":\"0.0192903500000000\",\"TOKEN\":\"0.0477361200000000\",\"GRAPE\":\"0.0020599695000000\",\"KASUP\":\"0.3996001000000000\",\"XWG\":\"0.0003843077500000\",\"SKEY\":\"0.0621289200000000\",\"SFUND\":\"1.3243375000000000\",\"EQX\":\"0.0032823580000000\",\"ORDIUP\":\"0.0548315705000000\",\"TON\":\"5.1857058499999995\",\"DEGO\":\"2.2667660500000001\",\"IZI\":\"0.0088455750000000\",\"ERG\":\"0.6605695500000000\",\"ERN\":\"1.9255367500000001\",\"VENOM\":\"0.0817591000000000\",\"VOXEL\":\"0.1497251000000000\",\"RLC\":\"1.4649671500000000\",\"PHA\":\"0.1093453000000000\",\"DYDXUP\":\"0.0112573685000000\",\"APE3S\":\"0.0008475760000000\",\"ORBS\":\"0.0288955450000000\",\"OPDOWN\":\"0.6758619000000000\",\"ESE\":\"0.0139130400000000\",\"APE3L\":\"0.1339330000000000\",\"HMND\":\"0.0982208650000000\",\"COQ\":\"0.0000014432780000\",\"AURY\":\"0.3340329000000000\",\"CULT\":\"0.0000028025980000\",\"AKT\":\"2.4642672500000001\",\"GLMR\":\"0.1606196500000000\",\"XYM\":\"0.0142528700000000\",\"ORAI\":\"6.1769100000000012\",\"XYO\":\"0.0058680645000000\",\"ETC\":\"18.8458723500000169\",\"LAI\":\"0.0142828550000000\",\"PIP\":\"0.0178310800000000\",\"ETH\":\"2607.6655149998362673\",\"NEO\":\"10.3575186499999991\",\"RMV\":\"0.0081659150000000\",\"KLAY\":\"0.1251374000000000\",\"PIT\":\"0.0000000003268365\",\"TARA\":\"0.0043978000000000\",\"KALT\":\"0.1128735350000000\",\"PIX\":\"0.0001023687900000\",\"ETN\":\"0.0021579205000000\",\"CSIX\":\"0.0141729100000000\",\"TRADE\":\"0.4708644500000000\",\"MAVIA\":\"1.3592200500000001\",\"HIGH\":\"1.3043474999999999\",\"TRB\":\"62.5387150000000006\",\"ORDI\":\"35.7421200000000126\",\"TRVL\":\"0.0373643085000000\",\"AMB\":\"0.0059670150000000\",\"TRU\":\"0.0762018800000000\",\"LOGX\":\"0.0271963950000000\",\"FINC\":\"0.0362018900000000\",\"INFRA\":\"0.1978010500000000\",\"NATIX\":\"0.0008729633000000\",\"NFP\":\"0.2152923000000000\",\"TRY\":\"0.0292166033323590\",\"TRX\":\"0.1597201000000000\",\"LBP\":\"0.0001243378000000\",\"LBR\":\"0.0595702000000000\",\"EUL\":\"2.9735125000000000\",\"NFT\":\"0.0000004077960000\",\"SEIUP\":\"0.0478110825000000\",\"PUFFER\":\"0.3676161000000000\",\"EUR\":\"1.0811249323958897\",\"ORCA\":\"2.0664662499999999\",\"NEAR3L\":\"0.0117010765350000\",\"AMP\":\"0.0038330825000000\",\"XDEFI\":\"0.0472563600000000\",\"HIFI\":\"0.4947525000000000\",\"TRUF\":\"0.0459570100000000\",\"AITECH\":\"0.1045477000000000\",\"AMU\":\"0.0043978000000000\",\"USTC\":\"0.0214692600000000\",\"KNGL\":\"0.0499750000000000\",\"FOXY\":\"0.0102686631000000\",\"NGC\":\"0.0147935995000000\",\"TENET\":\"0.0043278350000000\",\"NEAR3S\":\"0.0072553705000000\",\"MAHA\":\"1.1904045000000000\",\"NGL\":\"0.0701748950000000\",\"TST\":\"0.0080359800000000\",\"HIPPO\":\"0.0104447750000000\",\"AXS3S\":\"0.0308705570000000\",\"CRO\":\"0.0781409100000000\",\"ZPAY\":\"0.0050574700000000\",\"MNDE\":\"0.1026786350000000\",\"CRV\":\"0.2534732000000000\",\"SWASH\":\"0.0056271850000000\",\"AXS3L\":\"0.0106388779000000\",\"VERSE\":\"0.0001803098000000\",\"RPK\":\"0.0049975000000000\",\"RPL\":\"10.9745099999999958\",\"AZERO\":\"0.3789104500000000\",\"SOUL\":\"0.0534332700000000\",\"VXV\":\"0.2619689500000000\",\"LDO\":\"1.0885554500000000\",\"MAGIC\":\"0.3390304000000000\",\"ALICE\":\"1.0324835000000000\",\"SEAM\":\"1.1933030499999999\",\"PLU\":\"1.9300345000000001\",\"AOG\":\"0.0031224380000000\",\"SMOLE\":\"0.0000387806000000\",\"EWT\":\"1.1094450000000000\",\"TSUGT\":\"0.0029185400000000\",\"PMG\":\"0.0800599500000000\",\"OPAI\":\"0.0006826585000000\",\"LOCUS\":\"0.0216591650000000\",\"CTA\":\"0.0825087250000000\",\"NIM\":\"0.0013673160000000\",\"CTC\":\"0.4033982000000000\",\"APE\":\"0.7035480500000000\",\"MERL\":\"0.2720639000000000\",\"JAM\":\"0.0004770613500000\",\"CTI\":\"0.0130314810000000\",\"APP\":\"0.0021989000000000\",\"APT\":\"9.9947001500000000\",\"WLDUP\":\"0.0093043455000000\",\"ZEND\":\"0.1280759300000000\",\"FIRE\":\"0.9113441000000000\",\"DENT\":\"0.0008630682500000\",\"PYTH\":\"0.3390603850000000\",\"LFT\":\"0.0155322300000000\",\"DPET\":\"0.0319040400000000\",\"ORDIDOWN\":\"0.3788105000000000\",\"KPOL\":\"0.0029175405000000\",\"ETHUP\":\"8.4971493000000032\",\"BAND\":\"1.0939527500000001\",\"POL\":\"0.3656171000000000\",\"ASTR\":\"0.0582608550000000\",\"NKN\":\"0.0691654000000000\",\"RSR\":\"0.0068055955000000\",\"DVPN\":\"0.0005979009000000\",\"TWT\":\"1.1119437500000000\",\"ARB\":\"0.5510243500000000\",\"CVC\":\"0.1409801746501747\",\"ARC\":\"0.0300849500000000\",\"XETA\":\"0.0022888550000000\",\"MTRG\":\"0.4007995000000000\",\"LOKA\":\"0.1867066000000000\",\"LPOOL\":\"0.0660069800000000\",\"TURBOS\":\"0.0034812585000000\",\"CVX\":\"1.7816087499999999\",\"ARX\":\"0.0007556220000000\",\"MPLX\":\"0.4355221300000000\",\"SUSHI\":\"0.7011492500000000\",\"NLK\":\"0.0114442750000000\",\"PEPE2\":\"0.0000000313843000\",\"WBTC\":\"66881.4425499645548419\",\"SUI3L\":\"0.0211204345000000\",\"CWS\":\"0.1927036000000000\",\"SUI3S\":\"0.0000579110300000\",\"INSP\":\"0.0264167850000000\",\"MANA\":\"0.2945026750000000\",\"VRTX\":\"0.0641679000000000\",\"CSPR\":\"0.0116441750000000\",\"ATA\":\"0.0785007300000000\",\"OPEN\":\"0.0080049955000000\",\"HAI\":\"0.0448275750000000\",\"NMR\":\"14.7436245000000072\",\"ATH\":\"0.0540929400000000\",\"LIT\":\"0.6282857000000000\",\"TLOS\":\"0.3263467450000000\",\"TNSR\":\"0.3662168000000000\",\"CXT\":\"0.0871364100000000\",\"POLYX\":\"0.2346826000000000\",\"ZERO\":\"0.0002507745500000\",\"ROUTE\":\"0.0610694500000000\",\"LOOM\":\"0.0580009850000000\",\"PRE\":\"0.0078680640000000\",\"VRAUP\":\"0.0134652640000000\",\"HBB\":\"0.0714742450000000\",\"RVN\":\"0.0165017450000000\",\"PRQ\":\"0.0715741950000000\",\"ONDO\":\"0.7134930750000000\",\"PEPEDOWN\":\"0.0000155022450000\",\"WOOP\":\"0.0020179905000000\",\"LUNCUP\":\"0.0168355780000000\",\"KAVA\":\"0.3522238000000000\",\"LKI\":\"0.0104187880000000\",\"AVA\":\"0.4857570000000000\",\"NOM\":\"0.0233883000000000\",\"MAPO\":\"0.0089015470000000\",\"PEPEUP\":\"0.0114252845000000\",\"STRAX\":\"0.0487156300000000\",\"NOT\":\"0.0078670645000000\",\"ZERC\":\"0.1108245600000000\",\"BCUT\":\"0.0255672100000000\",\"MASA\":\"0.0691354150000000\",\"WAN\":\"0.1785077544737212\",\"WAT\":\"0.0003273762300000\",\"WAX\":\"0.0327636100000000\",\"MASK\":\"2.2259864500000002\",\"EOS3L\":\"0.0002122138400000\",\"IDEA\":\"0.0005887055000000\",\"EOS3S\":\"0.0034472755000000\",\"YFI\":\"4919.4290549999908843\",\"MOODENG\":\"0.0774612500000000\",\"XCUR\":\"0.0048845565000000\",\"HYDRA\":\"0.2225886500000000\",\"POPCAT\":\"1.3382305500000000\",\"LQTY\":\"0.7848074000000000\",\"PIXEL\":\"0.1406596350000000\",\"LMR\":\"0.0145437245000000\",\"ZETA\":\"0.5997999500000000\",\"YGG\":\"0.4717640000000000\",\"AXS\":\"4.6006985000000006\",\"BCHSV\":\"49.8250749999999370\",\"NRN\":\"0.0395802000000000\",\"FTON\":\"0.0091954000000000\",\"COMP\":\"43.6581599999999881\",\"XPRT\":\"0.1819090000000000\",\"HFT\":\"0.1443278000000000\",\"UXLINK\":\"0.5085456000000000\",\"STAMP\":\"0.0335032400000000\",\"RUNE\":\"4.9233370999999996\",\"ZEUS\":\"0.2587705500000000\",\"LTC3L\":\"1.8294848000000001\",\"DAPP\":\"0.1763118000000000\",\"FORTH\":\"2.9508238500000004\",\"ALPINE\":\"1.5322335000000000\",\"SENSO\":\"0.0328835500000000\",\"LTC3S\":\"0.0006986505000000\",\"DEXE\":\"8.3795081500000028\",\"GOAL\":\"0.0175912000000000\",\"AVAX\":\"27.5602130000000058\",\"LISTA\":\"0.3782108000000000\",\"AMPL\":\"1.3743124999999999\",\"WORK\":\"0.1384307500000000\",\"BRWL\":\"0.0017391300000000\",\"BANANA\":\"57.1314200000001362\",\"PUSH\":\"0.0750624500000000\",\"WEN\":\"0.0001015492000000\",\"NEIRO\":\"0.0879560000000000\",\"BTCUP\":\"34.7711057499999789\",\"SOL3S\":\"0.0007816090000000\",\"BRAWL\":\"0.0004776610500000\",\"LAY3R\":\"0.2161918500000000\",\"LPT\":\"11.9304317999999945\",\"GODS\":\"0.1807096000000000\",\"SAND3S\":\"4.6152911999999992\",\"RDNT\":\"0.0640679500000000\",\"SOL3L\":\"1.8351913752850000\",\"NIBI\":\"0.0653772950000000\",\"NUM\":\"0.0436181800000000\",\"PYR\":\"2.5590198499999997\",\"DAG\":\"0.0226176855000000\",\"DAI\":\"0.9989006596042375\",\"HIP\":\"0.0034982500000000\",\"DAO\":\"0.2848575000000000\",\"AVAIL\":\"0.1300929210000000\",\"DAR\":\"0.1512243500000000\",\"FET\":\"1.3760116500000000\",\"FCON\":\"0.0001197600900000\",\"XAVA\":\"0.3789104500000000\",\"LRC\":\"0.1208395500000000\",\"UNI3S\":\"0.0000653573050000\",\"PZP\":\"0.0599600050000000\",\"POKT\":\"0.0424787500000000\",\"DASH\":\"23.6881500000000109\",\"BAKEDOWN\":\"0.0003324636850000\",\"POLC\":\"0.0061389290000000\",\"DBR\":\"0.0377671070000000\",\"CIRUS\":\"0.0055772100000000\",\"UNI3L\":\"0.0993921490650000\",\"NWC\":\"0.0681659000000000\",\"POLK\":\"0.0142628650000000\",\"LSD\":\"0.9420287500000000\",\"MARS4\":\"0.0005878059500000\",\"LSK\":\"0.8080957500000000\",\"BLOCK\":\"0.0261869000000000\",\"ANALOS\":\"0.0000446776500000\",\"SAFE\":\"0.8779608000000000\",\"DCK\":\"0.0234082900000000\",\"LSS\":\"0.0562718500000000\",\"DCR\":\"12.4337799999999929\",\"LIKE\":\"0.0559720000000000\",\"DATA\":\"0.0361819000000000\",\"WIF\":\"2.5696145499999999\",\"BLOK\":\"0.0006546725000000\",\"LTC\":\"71.6261690000000611\",\"METIS\":\"42.0289750000000612\",\"WIN\":\"0.0000868365600000\",\"HLG\":\"0.0018790600000000\",\"LTO\":\"0.1166116650000000\",\"DYDX\":\"0.9341327000000000\",\"ARB3S\":\"0.0509025360000000\",\"MUBI\":\"0.0303848000000000\",\"ARB3L\":\"0.0025917035000000\",\"RBTC1\":\"0.0000039480250000\",\"POND\":\"0.0118640650000000\",\"LINA\":\"0.0037771105000000\",\"MYRIA\":\"0.0025337325000000\",\"LINK\":\"11.0244849999999944\",\"QTUM\":\"2.4262016723130069\",\"TUNE\":\"0.0148025950000000\",\"UFO\":\"0.0000006479758500\",\"CYBER\":\"2.8755615000000001\",\"WILD\":\"0.2433782500000000\",\"POLS\":\"0.2809594500000000\",\"NYM\":\"0.0719640000000000\",\"FIL\":\"3.6786597500000005\",\"BAL\":\"2.0099945000000000\",\"SCA\":\"0.3999999000000000\",\"STND\":\"0.0133123405000000\",\"WMTX\":\"0.2138930000000000\",\"SCLP\":\"0.1545227000000000\",\"MANEKI\":\"0.0073963000000000\",\"BAT\":\"0.1721139000000000\",\"AKRO\":\"0.0042302838000000\",\"FTM3L\":\"8.2574692000000024\",\"BAX\":\"0.0000709645000000\",\"FTM3S\":\"0.0000255072400000\",\"COTI\":\"0.0951524000000000\"}}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * get24hrStats Request + * Get 24hr Stats + * /api/v1/market/stats + */ + public static void testGet24hrStatsRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\"}"; + Get24hrStatsReq obj = mapper.readValue(data, Get24hrStatsReq.class); + } + + /** + * get24hrStats Response + * Get 24hr Stats + * /api/v1/market/stats + */ + public static void testGet24hrStatsResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"time\":1729175612158,\"symbol\":\"BTC-USDT\",\"buy\":\"66982.4\",\"sell\":\"66982.5\",\"changeRate\":\"-0.0114\",\"changePrice\":\"-778.1\",\"high\":\"68107.7\",\"low\":\"66683.3\",\"vol\":\"1738.02898182\",\"volValue\":\"117321982.415978333\",\"last\":\"66981.5\",\"averagePrice\":\"67281.21437289\",\"takerFeeRate\":\"0.001\",\"makerFeeRate\":\"0.001\",\"takerCoefficient\":\"1\",\"makerCoefficient\":\"1\"}}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getMarketList Request + * Get Market List + * /api/v1/markets + */ + public static void testGetMarketListRequest() throws Exception { + // $this->assertTrue(true); + } + + /** + * getMarketList Response + * Get Market List + * /api/v1/markets + */ + public static void testGetMarketListResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":[\"USDS\",\"TON\",\"AI\",\"DePIN\",\"PoW\",\"BRC-20\",\"ETF\",\"KCS\",\"Meme\",\"Solana\",\"FIAT\",\"VR&AR\",\"DeFi\",\"Polkadot\",\"BTC\",\"ALTS\",\"Layer 1\"]}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getClientIPAddress Request + * Get Client IP Address + * /api/v1/my-ip + */ + public static void testGetClientIPAddressRequest() throws Exception { + // $this->assertTrue(true); + } + + /** + * getClientIPAddress Response + * Get Client IP Address + * /api/v1/my-ip + */ + public static void testGetClientIPAddressResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":\"20.***.***.128\"}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getServerTime Request + * Get Server Time + * /api/v1/timestamp + */ + public static void testGetServerTimeRequest() throws Exception { + // $this->assertTrue(true); + } + + /** + * getServerTime Response + * Get Server Time + * /api/v1/timestamp + */ + public static void testGetServerTimeResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":1729100692873}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getServiceStatus Request + * Get Service Status + * /api/v1/status + */ + public static void testGetServiceStatusRequest() throws Exception { + // $this->assertTrue(true); + } + + /** + * getServiceStatus Response + * Get Service Status + * /api/v1/status + */ + public static void testGetServiceStatusResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"status\":\"open\",\"msg\":\"\"}}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getPublicToken Request + * Get Public Token - Spot/Margin + * /api/v1/bullet-public + */ + public static void testGetPublicTokenRequest() throws Exception { + // $this->assertTrue(true); + } + + /** + * getPublicToken Response + * Get Public Token - Spot/Margin + * /api/v1/bullet-public + */ + public static void testGetPublicTokenResponse() throws Exception { + String data = + "{\n \"code\": \"200000\",\n \"data\": {\n \"token\": \"2neAiuYvAU61ZDXANAGAsiL4-iAExhsBXZxftpOeh_55i3Ysy2q2LEsEWU64mdzUOPusi34M_wGoSf7iNyEWJ93g2WHl-j4M7tCZ_S21PuIByWXUJFDywtiYB9J6i9GjsxUuhPw3Blq6rhZlGykT3Vp1phUafnulOOpts-MEmEF-3bpfetLOAq79RbGaLlE4JBvJHl5Vs9Y=.ymP9jIr6v-vucrZr8761yA==\",\n \"instanceServers\": [\n {\n \"endpoint\": \"wss://ws-api-spot.kucoin.com/\",\n \"encrypt\": true,\n \"protocol\": \"websocket\",\n \"pingInterval\": 18000,\n \"pingTimeout\": 10000\n }\n ]\n }\n}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * getPrivateToken Request + * Get Private Token - Spot/Margin + * /api/v1/bullet-private + */ + public static void testGetPrivateTokenRequest() throws Exception { + // $this->assertTrue(true); + } + + /** + * getPrivateToken Response + * Get Private Token - Spot/Margin + * /api/v1/bullet-private + */ + public static void testGetPrivateTokenResponse() throws Exception { + String data = + "{\n \"code\": \"200000\",\n \"data\": {\n \"token\": \"2neAiuYvAU737TOajb2U3uT8AEZqSWYe0fBD4LoHuXJDSC7gIzJiH4kNTWhCPISWo6nDpAe7aUaaHJ4fG8oRjFgMfUI2sM4IySWHrBceFocY8pKy2REU1HwZIngtMdMrjqPnP-biofFWbNaP1cl0X1pZc2SQ-33hDH1LgNP-yg80ZJv_Ctaj8sAFhTOZ8m1L.jut4vBQxXAseWKxODdGVGg==\",\n \"instanceServers\": [\n {\n \"endpoint\": \"wss://ws-api-spot.kucoin.com/\",\n \"encrypt\": true,\n \"protocol\": \"websocket\",\n \"pingInterval\": 18000,\n \"pingTimeout\": 10000\n }\n ]\n }\n}"; + RestResponse resp = mapper.readValue( + data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(MarketApiAutoGeneratedTest::testGetAnnouncementsRequest, + "testGetAnnouncementsRequest"); + run(MarketApiAutoGeneratedTest::testGetAnnouncementsResponse, + "testGetAnnouncementsResponse"); + run(MarketApiAutoGeneratedTest::testGetCurrencyRequest, + "testGetCurrencyRequest"); + run(MarketApiAutoGeneratedTest::testGetCurrencyResponse, + "testGetCurrencyResponse"); + run(MarketApiAutoGeneratedTest::testGetAllCurrenciesRequest, + "testGetAllCurrenciesRequest"); + run(MarketApiAutoGeneratedTest::testGetAllCurrenciesResponse, + "testGetAllCurrenciesResponse"); + run(MarketApiAutoGeneratedTest::testGetSymbolRequest, + "testGetSymbolRequest"); + run(MarketApiAutoGeneratedTest::testGetSymbolResponse, + "testGetSymbolResponse"); + run(MarketApiAutoGeneratedTest::testGetAllSymbolsRequest, + "testGetAllSymbolsRequest"); + run(MarketApiAutoGeneratedTest::testGetAllSymbolsResponse, + "testGetAllSymbolsResponse"); + run(MarketApiAutoGeneratedTest::testGetTickerRequest, + "testGetTickerRequest"); + run(MarketApiAutoGeneratedTest::testGetTickerResponse, + "testGetTickerResponse"); + run(MarketApiAutoGeneratedTest::testGetAllTickersRequest, + "testGetAllTickersRequest"); + run(MarketApiAutoGeneratedTest::testGetAllTickersResponse, + "testGetAllTickersResponse"); + run(MarketApiAutoGeneratedTest::testGetTradeHistoryRequest, + "testGetTradeHistoryRequest"); + run(MarketApiAutoGeneratedTest::testGetTradeHistoryResponse, + "testGetTradeHistoryResponse"); + run(MarketApiAutoGeneratedTest::testGetKlinesRequest, + "testGetKlinesRequest"); + run(MarketApiAutoGeneratedTest::testGetKlinesResponse, + "testGetKlinesResponse"); + run(MarketApiAutoGeneratedTest::testGetPartOrderBookRequest, + "testGetPartOrderBookRequest"); + run(MarketApiAutoGeneratedTest::testGetPartOrderBookResponse, + "testGetPartOrderBookResponse"); + run(MarketApiAutoGeneratedTest::testGetFullOrderBookRequest, + "testGetFullOrderBookRequest"); + run(MarketApiAutoGeneratedTest::testGetFullOrderBookResponse, + "testGetFullOrderBookResponse"); + run(MarketApiAutoGeneratedTest::testGetCallAuctionPartOrderBookRequest, + "testGetCallAuctionPartOrderBookRequest"); + run(MarketApiAutoGeneratedTest::testGetCallAuctionPartOrderBookResponse, + "testGetCallAuctionPartOrderBookResponse"); + run(MarketApiAutoGeneratedTest::testGetCallAuctionInfoRequest, + "testGetCallAuctionInfoRequest"); + run(MarketApiAutoGeneratedTest::testGetCallAuctionInfoResponse, + "testGetCallAuctionInfoResponse"); + run(MarketApiAutoGeneratedTest::testGetFiatPriceRequest, + "testGetFiatPriceRequest"); + run(MarketApiAutoGeneratedTest::testGetFiatPriceResponse, + "testGetFiatPriceResponse"); + run(MarketApiAutoGeneratedTest::testGet24hrStatsRequest, + "testGet24hrStatsRequest"); + run(MarketApiAutoGeneratedTest::testGet24hrStatsResponse, + "testGet24hrStatsResponse"); + run(MarketApiAutoGeneratedTest::testGetMarketListRequest, + "testGetMarketListRequest"); + run(MarketApiAutoGeneratedTest::testGetMarketListResponse, + "testGetMarketListResponse"); + run(MarketApiAutoGeneratedTest::testGetClientIPAddressRequest, + "testGetClientIPAddressRequest"); + run(MarketApiAutoGeneratedTest::testGetClientIPAddressResponse, + "testGetClientIPAddressResponse"); + run(MarketApiAutoGeneratedTest::testGetServerTimeRequest, + "testGetServerTimeRequest"); + run(MarketApiAutoGeneratedTest::testGetServerTimeResponse, + "testGetServerTimeResponse"); + run(MarketApiAutoGeneratedTest::testGetServiceStatusRequest, + "testGetServiceStatusRequest"); + run(MarketApiAutoGeneratedTest::testGetServiceStatusResponse, + "testGetServiceStatusResponse"); + run(MarketApiAutoGeneratedTest::testGetPublicTokenRequest, + "testGetPublicTokenRequest"); + run(MarketApiAutoGeneratedTest::testGetPublicTokenResponse, + "testGetPublicTokenResponse"); + run(MarketApiAutoGeneratedTest::testGetPrivateTokenRequest, + "testGetPrivateTokenRequest"); + run(MarketApiAutoGeneratedTest::testGetPrivateTokenResponse, + "testGetPrivateTokenResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} \ No newline at end of file diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiImpl.java new file mode 100644 index 00000000..e4c1c5b9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiImpl.java @@ -0,0 +1,124 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.market; +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class MarketApiImpl implements MarketApi { + private final Transport transport; + + public MarketApiImpl(Transport transport) { this.transport = transport; } + + public GetAnnouncementsResp getAnnouncements(GetAnnouncementsReq req) { + return this.transport.call("spot", false, "GET", "/api/v3/announcements", + req, GetAnnouncementsResp.class, false); + } + + public GetCurrencyResp getCurrency(GetCurrencyReq req) { + return this.transport.call("spot", false, "GET", + "/api/v3/currencies/{currency}", req, + GetCurrencyResp.class, false); + } + + public GetAllCurrenciesResp getAllCurrencies() { + return this.transport.call("spot", false, "GET", "/api/v3/currencies", null, + GetAllCurrenciesResp.class, false); + } + + public GetSymbolResp getSymbol(GetSymbolReq req) { + return this.transport.call("spot", false, "GET", "/api/v2/symbols/{symbol}", + req, GetSymbolResp.class, false); + } + + public GetAllSymbolsResp getAllSymbols(GetAllSymbolsReq req) { + return this.transport.call("spot", false, "GET", "/api/v2/symbols", req, + GetAllSymbolsResp.class, false); + } + + public GetTickerResp getTicker(GetTickerReq req) { + return this.transport.call("spot", false, "GET", + "/api/v1/market/orderbook/level1", req, + GetTickerResp.class, false); + } + + public GetAllTickersResp getAllTickers() { + return this.transport.call("spot", false, "GET", + "/api/v1/market/allTickers", null, + GetAllTickersResp.class, false); + } + + public GetTradeHistoryResp getTradeHistory(GetTradeHistoryReq req) { + return this.transport.call("spot", false, "GET", "/api/v1/market/histories", + req, GetTradeHistoryResp.class, false); + } + + public GetKlinesResp getKlines(GetKlinesReq req) { + return this.transport.call("spot", false, "GET", "/api/v1/market/candles", + req, GetKlinesResp.class, false); + } + + public GetPartOrderBookResp getPartOrderBook(GetPartOrderBookReq req) { + return this.transport.call("spot", false, "GET", + "/api/v1/market/orderbook/level2_{size}", req, + GetPartOrderBookResp.class, false); + } + + public GetFullOrderBookResp getFullOrderBook(GetFullOrderBookReq req) { + return this.transport.call("spot", false, "GET", + "/api/v3/market/orderbook/level2", req, + GetFullOrderBookResp.class, false); + } + + public GetCallAuctionPartOrderBookResp + getCallAuctionPartOrderBook(GetCallAuctionPartOrderBookReq req) { + return this.transport.call( + "spot", false, "GET", + "/api/v1/market/orderbook/callauction/level2_{size}", req, + GetCallAuctionPartOrderBookResp.class, false); + } + + public GetCallAuctionInfoResp getCallAuctionInfo(GetCallAuctionInfoReq req) { + return this.transport.call("spot", false, "GET", + "/api/v1/market/callauctionData", req, + GetCallAuctionInfoResp.class, false); + } + + public GetFiatPriceResp getFiatPrice(GetFiatPriceReq req) { + return this.transport.call("spot", false, "GET", "/api/v1/prices", req, + GetFiatPriceResp.class, false); + } + + public Get24hrStatsResp get24hrStats(Get24hrStatsReq req) { + return this.transport.call("spot", false, "GET", "/api/v1/market/stats", + req, Get24hrStatsResp.class, false); + } + + public GetMarketListResp getMarketList() { + return this.transport.call("spot", false, "GET", "/api/v1/markets", null, + GetMarketListResp.class, false); + } + + public GetClientIPAddressResp getClientIPAddress() { + return this.transport.call("spot", false, "GET", "/api/v1/my-ip", null, + GetClientIPAddressResp.class, false); + } + + public GetServerTimeResp getServerTime() { + return this.transport.call("spot", false, "GET", "/api/v1/timestamp", null, + GetServerTimeResp.class, false); + } + + public GetServiceStatusResp getServiceStatus() { + return this.transport.call("spot", false, "GET", "/api/v1/status", null, + GetServiceStatusResp.class, false); + } + + public GetPublicTokenResp getPublicToken() { + return this.transport.call("spot", false, "POST", "/api/v1/bullet-public", + null, GetPublicTokenResp.class, false); + } + + public GetPrivateTokenResp getPrivateToken() { + return this.transport.call("spot", false, "POST", "/api/v1/bullet-private", + null, GetPrivateTokenResp.class, false); + } +} \ No newline at end of file diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOcoOrderReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOcoOrderReq.java new file mode 100644 index 00000000..14e7b98c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOcoOrderReq.java @@ -0,0 +1,128 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddOcoOrderReq implements Request { + /** + * 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. + */ + @JsonProperty("clientOid") + private String clientOid; + + /** specify if the order is to 'buy' or 'sell' */ + @JsonProperty("side") + private SideEnum side; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Order placement remarks, length cannot exceed 20 characters (ASCII) */ + @JsonProperty("remark") + private String remark; + + /** Specify price for order */ + @JsonProperty("price") + private String price; + + /** Specify quantity for order */ + @JsonProperty("size") + private String size; + + /** trigger price. */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** The limit order price after take-profit and stop-loss are triggered. */ + @JsonProperty("limitPrice") + private String limitPrice; + + /** Transaction Type, currently only supports TRADE (spot transactions), the default is TRADE */ + @JsonProperty("tradeType") + private TradeTypeEnum tradeType; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TradeTypeEnum { + /** Spot Trading */ + TRADE("TRADE"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOcoOrderResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOcoOrderResp.java new file mode 100644 index 00000000..5ec79f49 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOcoOrderResp.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddOcoOrderResp implements Response> { + /** + * The unique order id generated by the trading system,which can be used later for further actions + * such as canceling the order. + */ + @JsonProperty("orderId") + private String orderId; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderOldReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderOldReq.java new file mode 100644 index 00000000..84a1ac1c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderOldReq.java @@ -0,0 +1,307 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddOrderOldReq implements Request { + /** + * 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. + */ + @JsonProperty("clientOid") + private String clientOid; + + /** specify if the order is to 'buy' or 'sell' */ + @JsonProperty("side") + private SideEnum side; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * 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. + */ + @JsonProperty("type") + @Builder.Default + private TypeEnum type = TypeEnum.LIMIT; + + /** Order placement remarks, length cannot exceed 20 characters (ASCII) */ + @JsonProperty("remark") + private String remark; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four + * strategies: CN, CO, CB , and DC + */ + @JsonProperty("stp") + private StpEnum stp; + + /** + * 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. + */ + @JsonProperty("price") + private String price; + + /** + * 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 + */ + @JsonProperty("size") + private String size; + + /** + * [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during + * trading + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GTC; + + /** passive order labels, this is disabled when the order timing strategy is IOC or FOK */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** Hidden or not (not shown in order book) */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = false; + + /** Whether or not only visible portions of orders are shown in iceberg orders */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = false; + + /** Maximum visible quantity in iceberg orders */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** Cancel after n seconds,the order timing strategy is GTT */ + @JsonProperty("cancelAfter") + private Long cancelAfter; + + /** When **type** is market, select one out of two: size or funds */ + @JsonProperty("funds") + private String funds; + + /** + * The type of trading : **TRADE**(Spot Trade), **MARGIN_TRADE** (Margin Trade). Default is + * **TRADE**. **Note: To improve the system performance and to accelerate order placing and + * processing, KuCoin has added a new interface for order placing of margin. For traders still + * using the current interface, please move to the new one as soon as possible. The current one + * will no longer accept margin orders by May 1st, 2021 (UTC). At the time, KuCoin will notify + * users via the announcement, please pay attention to it.** + */ + @JsonProperty("tradeType") + @Builder.Default + private TradeTypeEnum tradeType = TradeTypeEnum.TRADE; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** limit order */ + LIMIT("limit"), + /** market order */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TradeTypeEnum { + /** Spot */ + TRADE("TRADE"), + /** Margin */ + MARGIN_TRADE("MARGIN_TRADE"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderOldResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderOldResp.java new file mode 100644 index 00000000..06530998 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderOldResp.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddOrderOldResp implements Response> { + /** + * The unique order id generated by the trading system,which can be used later for further actions + * such as canceling the order. + */ + @JsonProperty("orderId") + private String orderId; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderReq.java new file mode 100644 index 00000000..e05327d8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderReq.java @@ -0,0 +1,289 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddOrderReq implements Request { + /** + * 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. + */ + @JsonProperty("clientOid") + private String clientOid; + + /** specify if the order is to 'buy' or 'sell' */ + @JsonProperty("side") + private SideEnum side; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * 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. + */ + @JsonProperty("type") + private TypeEnum type; + + /** Order placement remarks, length cannot exceed 20 characters (ASCII) */ + @JsonProperty("remark") + private String remark; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four + * strategies: CN, CO, CB , and DC + */ + @JsonProperty("stp") + private StpEnum stp; + + /** + * 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. + */ + @JsonProperty("price") + private String price; + + /** + * 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 + */ + @JsonProperty("size") + private String size; + + /** + * [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during + * trading + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GTC; + + /** passive order labels, this is disabled when the order timing strategy is IOC or FOK */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = false; + + /** + * Whether or not only visible portions of orders are shown in [Iceberg + * orders](https://www.kucoin.com/docs-new/doc-338146) + */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = false; + + /** Maximum visible quantity in iceberg orders */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** Order tag, length cannot exceed 20 characters (ASCII) */ + @JsonProperty("tags") + private String tags; + + /** + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled + * automatically, the default value is -1 + */ + @JsonProperty("cancelAfter") + @Builder.Default + private Long cancelAfter = -1l; + + /** + * 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. + */ + @JsonProperty("funds") + private String funds; + + /** + * Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < + * Gateway received the message time, this order will fail. + */ + @JsonProperty("allowMaxTimeWindow") + private Long allowMaxTimeWindow; + + /** Equal to KC-API-TIMESTAMP, Need to be defined if allowMaxTimeWindow is specified. */ + @JsonProperty("clientTimestamp") + private Long clientTimestamp; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderResp.java new file mode 100644 index 00000000..f879e390 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderResp.java @@ -0,0 +1,37 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public 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. + */ + @JsonProperty("orderId") + private String orderId; + + /** The user self-defined order id. */ + @JsonProperty("clientOid") + private String clientOid; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderSyncReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderSyncReq.java new file mode 100644 index 00000000..606a9b6e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderSyncReq.java @@ -0,0 +1,283 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddOrderSyncReq implements Request { + /** + * 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. + */ + @JsonProperty("clientOid") + private String clientOid; + + /** Specify if the order is to 'buy' or 'sell'. */ + @JsonProperty("side") + private SideEnum side; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * 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. + */ + @JsonProperty("type") + private TypeEnum type; + + /** Order placement remarks, length cannot exceed 20 characters (ASCII) */ + @JsonProperty("remark") + private String remark; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four + * strategies: CN, CO, CB , and DC + */ + @JsonProperty("stp") + private StpEnum stp; + + /** + * 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. + */ + @JsonProperty("price") + private String price; + + /** + * 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 + */ + @JsonProperty("size") + private String size; + + /** + * [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during + * trading + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GTC; + + /** passive order labels, this is disabled when the order timing strategy is IOC or FOK */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = false; + + /** + * Whether or not only visible portions of orders are shown in [Iceberg + * orders](https://www.kucoin.com/docs-new/doc-338146) + */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = false; + + /** Maximum visible quantity in iceberg orders */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** Order tag, length cannot exceed 20 characters (ASCII) */ + @JsonProperty("tags") + private String tags; + + /** + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled + * automatically, the default value is -1 + */ + @JsonProperty("cancelAfter") + @Builder.Default + private Long cancelAfter = -1l; + + /** When **type** is market, select one out of two: size or funds */ + @JsonProperty("funds") + private String funds; + + /** + * Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < + * Gateway received the message time, this order will fail. + */ + @JsonProperty("allowMaxTimeWindow") + private Long allowMaxTimeWindow; + + /** Equal to KC-API-TIMESTAMP. Needs to be defined if allowMaxTimeWindow is specified. */ + @JsonProperty("clientTimestamp") + private Long clientTimestamp; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderSyncResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderSyncResp.java new file mode 100644 index 00000000..5f0425a1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderSyncResp.java @@ -0,0 +1,101 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public 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. + */ + @JsonProperty("orderId") + private String orderId; + + /** The user self-defined order ID. */ + @JsonProperty("clientOid") + private String clientOid; + + /** */ + @JsonProperty("orderTime") + private Long orderTime; + + /** Original order size */ + @JsonProperty("originSize") + private String originSize; + + /** Deal size */ + @JsonProperty("dealSize") + private String dealSize; + + /** Remain size */ + @JsonProperty("remainSize") + private String remainSize; + + /** Cumulative canceled size */ + @JsonProperty("canceledSize") + private String canceledSize; + + /** Order Status. open: order is active; done: order has been completed */ + @JsonProperty("status") + private StatusEnum status; + + /** */ + @JsonProperty("matchTime") + private Long matchTime; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum StatusEnum { + /** */ + OPEN("open"), + /** */ + DONE("done"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderTestOldReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderTestOldReq.java new file mode 100644 index 00000000..8de2a40f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderTestOldReq.java @@ -0,0 +1,307 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddOrderTestOldReq implements Request { + /** + * 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. + */ + @JsonProperty("clientOid") + private String clientOid; + + /** specify if the order is to 'buy' or 'sell' */ + @JsonProperty("side") + private SideEnum side; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * 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. + */ + @JsonProperty("type") + @Builder.Default + private TypeEnum type = TypeEnum.LIMIT; + + /** Order placement remarks, length cannot exceed 20 characters (ASCII) */ + @JsonProperty("remark") + private String remark; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four + * strategies: CN, CO, CB , and DC + */ + @JsonProperty("stp") + private StpEnum stp; + + /** + * 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. + */ + @JsonProperty("price") + private String price; + + /** + * 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 + */ + @JsonProperty("size") + private String size; + + /** + * [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during + * trading + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GTC; + + /** passive order labels, this is disabled when the order timing strategy is IOC or FOK */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** Hidden or not (not shown in order book) */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = false; + + /** Whether or not only visible portions of orders are shown in iceberg orders */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = false; + + /** Maximum visible quantity in iceberg orders */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** Cancel after n seconds,the order timing strategy is GTT */ + @JsonProperty("cancelAfter") + private Long cancelAfter; + + /** When **type** is market, select one out of two: size or funds */ + @JsonProperty("funds") + private String funds; + + /** + * The type of trading : **TRADE**(Spot Trade), **MARGIN_TRADE** (Margin Trade). Default is + * **TRADE**. **Note: To improve the system performance and to accelerate order placing and + * processing, KuCoin has added a new interface for order placing of margin. For traders still + * using the current interface, please move to the new one as soon as possible. The current one + * will no longer accept margin orders by May 1st, 2021 (UTC). At the time, KuCoin will notify + * users via the announcement, please pay attention to it.** + */ + @JsonProperty("tradeType") + @Builder.Default + private TradeTypeEnum tradeType = TradeTypeEnum.TRADE; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** limit order */ + LIMIT("limit"), + /** market order */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TradeTypeEnum { + /** Spot */ + TRADE("TRADE"), + /** Margin */ + MARGIN_TRADE("MARGIN_TRADE"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderTestOldResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderTestOldResp.java new file mode 100644 index 00000000..137a3dae --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderTestOldResp.java @@ -0,0 +1,34 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddOrderTestOldResp + implements Response> { + /** + * The unique order id generated by the trading system,which can be used later for further actions + * such as canceling the order. + */ + @JsonProperty("orderId") + private String orderId; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderTestReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderTestReq.java new file mode 100644 index 00000000..4680eb99 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderTestReq.java @@ -0,0 +1,283 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddOrderTestReq implements Request { + /** + * 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. + */ + @JsonProperty("clientOid") + private String clientOid; + + /** specify if the order is to 'buy' or 'sell' */ + @JsonProperty("side") + private SideEnum side; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * 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. + */ + @JsonProperty("type") + private TypeEnum type; + + /** Order placement remarks, length cannot exceed 20 characters (ASCII) */ + @JsonProperty("remark") + private String remark; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four + * strategies: CN, CO, CB , and DC + */ + @JsonProperty("stp") + private StpEnum stp; + + /** + * 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. + */ + @JsonProperty("price") + private String price; + + /** + * 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 + */ + @JsonProperty("size") + private String size; + + /** + * [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during + * trading + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GTC; + + /** passive order labels, this is disabled when the order timing strategy is IOC or FOK */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = false; + + /** + * Whether or not only visible portions of orders are shown in [Iceberg + * orders](https://www.kucoin.com/docs-new/doc-338146) + */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = false; + + /** Maximum visible quantity in iceberg orders */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** Order tag, length cannot exceed 20 characters (ASCII) */ + @JsonProperty("tags") + private String tags; + + /** + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled + * automatically, the default value is -1 + */ + @JsonProperty("cancelAfter") + @Builder.Default + private Long cancelAfter = -1l; + + /** When **type** is market, select one out of two: size or funds */ + @JsonProperty("funds") + private String funds; + + /** + * Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < + * Gateway received the message time, this order will fail. + */ + @JsonProperty("allowMaxTimeWindow") + private Long allowMaxTimeWindow; + + /** Equal to KC-API-TIMESTAMP, Need to be defined if allowMaxTimeWindow is specified. */ + @JsonProperty("clientTimestamp") + private Long clientTimestamp; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderTestResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderTestResp.java new file mode 100644 index 00000000..5af05ecc --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddOrderTestResp.java @@ -0,0 +1,38 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public 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. + */ + @JsonProperty("orderId") + private String orderId; + + /** The user self-defined order id. */ + @JsonProperty("clientOid") + private String clientOid; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddStopOrderReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddStopOrderReq.java new file mode 100644 index 00000000..85981787 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddStopOrderReq.java @@ -0,0 +1,283 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddStopOrderReq implements Request { + /** + * 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. + */ + @JsonProperty("clientOid") + private String clientOid; + + /** specify if the order is to 'buy' or 'sell' */ + @JsonProperty("side") + private SideEnum side; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * 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. + */ + @JsonProperty("type") + private TypeEnum type; + + /** Order placement remarks, length cannot exceed 20 characters (ASCII) */ + @JsonProperty("remark") + private String remark; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four + * strategies: CN, CO, CB , and DC + */ + @JsonProperty("stp") + private StpEnum stp; + + /** + * 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. + */ + @JsonProperty("price") + private String price; + + /** + * 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 + */ + @JsonProperty("size") + private String size; + + /** + * [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during + * trading. Required for limit orders. + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GTC; + + /** + * passive order labels, this is disabled when the order timing strategy is IOC or FOK if **type** + * is limit. + */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = false; + + /** + * Whether or not only visible portions of orders are shown in [Iceberg + * orders](https://www.kucoin.com/docs-new/doc-338146) + */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = false; + + /** When **type** is limit, this is Maximum visible quantity in iceberg orders. */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled + * automatically, the default value is -1 + */ + @JsonProperty("cancelAfter") + @Builder.Default + private Long cancelAfter = -1l; + + /** When **type** is market, select one out of two: size or funds */ + @JsonProperty("funds") + private String funds; + + /** The trigger price. */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** + * The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated + * Margin). Default is TRADE + */ + @JsonProperty("tradeType") + private String tradeType; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddStopOrderResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddStopOrderResp.java new file mode 100644 index 00000000..d4c70289 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/AddStopOrderResp.java @@ -0,0 +1,34 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddStopOrderResp + implements Response> { + /** + * The unique order id generated by the trading system,which can be used later for further actions + * such as canceling the order. + */ + @JsonProperty("orderId") + private String orderId; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersData.java new file mode 100644 index 00000000..6645ca5d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersData.java @@ -0,0 +1,34 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchAddOrdersData { + /** + * The unique order ID generated by the trading system, which can be used later for further + * actions such as canceling the order. + */ + @JsonProperty("orderId") + private String orderId; + + /** The user self-defined order ID. */ + @JsonProperty("clientOid") + private String clientOid; + + /** Add order success/failure */ + @JsonProperty("success") + private Boolean success; + + /** Error message */ + @JsonProperty("failMsg") + private String failMsg; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOldData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOldData.java new file mode 100644 index 00000000..2c7e4da3 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOldData.java @@ -0,0 +1,99 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchAddOrdersOldData { + /** */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("type") + private String type; + + /** */ + @JsonProperty("side") + private String side; + + /** */ + @JsonProperty("price") + private String price; + + /** */ + @JsonProperty("size") + private String size; + + /** */ + @JsonProperty("funds") + private String funds; + + /** */ + @JsonProperty("stp") + private String stp; + + /** */ + @JsonProperty("stop") + private String stop; + + /** */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** */ + @JsonProperty("timeInForce") + private String timeInForce; + + /** */ + @JsonProperty("cancelAfter") + private Integer cancelAfter; + + /** */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** */ + @JsonProperty("hidden") + private Boolean hidden; + + /** */ + @JsonProperty("iceberge") + private Boolean iceberge; + + /** */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** */ + @JsonProperty("channel") + private String channel; + + /** */ + @JsonProperty("id") + private String id; + + /** */ + @JsonProperty("status") + private String status; + + /** */ + @JsonProperty("failMsg") + private String failMsg; + + /** */ + @JsonProperty("clientOid") + private String clientOid; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOldOrderList.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOldOrderList.java new file mode 100644 index 00000000..92dad5dc --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOldOrderList.java @@ -0,0 +1,323 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchAddOrdersOldOrderList implements Request { + /** + * 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. + */ + @JsonProperty("clientOid") + private String clientOid; + + /** specify if the order is to 'buy' or 'sell' */ + @JsonProperty("side") + private SideEnum side; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** only limit (default is limit) */ + @JsonProperty("type") + @Builder.Default + private TypeEnum type = TypeEnum.LIMIT; + + /** Order placement remarks, length cannot exceed 20 characters (ASCII) */ + @JsonProperty("remark") + private String remark; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four + * strategies: CN, CO, CB , and DC + */ + @JsonProperty("stp") + private StpEnum stp; + + /** + * 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. + */ + @JsonProperty("price") + private String price; + + /** + * 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 + */ + @JsonProperty("size") + private String size; + + /** + * [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during + * trading + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GTC; + + /** passive order labels, this is disabled when the order timing strategy is IOC or FOK */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** Hidden or not (not shown in order book) */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = false; + + /** Whether or not only visible portions of orders are shown in iceberg orders */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = false; + + /** Maximum visible quantity in iceberg orders */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** Cancel after n seconds,the order timing strategy is GTT */ + @JsonProperty("cancelAfter") + private Long cancelAfter; + + /** The type of trading : **TRADE**(Spot Trade) */ + @JsonProperty("tradeType") + @Builder.Default + private TradeTypeEnum tradeType = TradeTypeEnum.TRADE; + + /** Either loss or entry. Requires stopPrice to be defined */ + @JsonProperty("stop") + private StopEnum stop; + + /** Stop price, Need to be defined if stop is specified. */ + @JsonProperty("stopPrice") + private String stopPrice; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** limit order */ + LIMIT("limit"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TradeTypeEnum { + /** Spot */ + TRADE("TRADE"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopEnum { + /** <= */ + LOSS("loss"), + /** >= */ + ENTRY("entry"); + + private final String value; + + StopEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopEnum fromValue(String value) { + for (StopEnum b : StopEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOldReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOldReq.java new file mode 100644 index 00000000..69f0593f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOldReq.java @@ -0,0 +1,29 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchAddOrdersOldReq implements Request { + /** */ + @JsonProperty("orderList") + @Builder.Default + private List orderList = new ArrayList<>(); + + /** */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOldResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOldResp.java new file mode 100644 index 00000000..05374af1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOldResp.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchAddOrdersOldResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOrderList.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOrderList.java new file mode 100644 index 00000000..b05a89e3 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersOrderList.java @@ -0,0 +1,264 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchAddOrdersOrderList implements Request { + /** + * 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. + */ + @JsonProperty("clientOid") + private String clientOid; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Specify if the order is a 'limit' order or 'market' order. */ + @JsonProperty("type") + private TypeEnum type; + + /** + * [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during + * trading + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GTC; + + /** Specify if the order is to 'buy' or 'sell'. */ + @JsonProperty("side") + private SideEnum side; + + /** Specify price for order */ + @JsonProperty("price") + private String price; + + /** + * 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 + */ + @JsonProperty("size") + private String size; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four + * strategies: CN, CO, CB , and DC + */ + @JsonProperty("stp") + private StpEnum stp; + + /** + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled + * automatically, the default value is -1 + */ + @JsonProperty("cancelAfter") + @Builder.Default + private Long cancelAfter = -1l; + + /** passive order labels, this is disabled when the order timing strategy is IOC or FOK */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = false; + + /** + * Whether or not only visible portions of orders are shown in [Iceberg + * orders](https://www.kucoin.com/docs-new/doc-338146) + */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = false; + + /** Maximum visible quantity in iceberg orders */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** Order tag, length cannot exceed 20 characters (ASCII) */ + @JsonProperty("tags") + private String tags; + + /** Order placement remarks, length cannot exceed 20 characters (ASCII) */ + @JsonProperty("remark") + private String remark; + + /** When **type** is market, select one out of two: size or funds */ + @JsonProperty("funds") + private String funds; + + /** Equal to KC-API-TIMESTAMP. Needs to be defined if allowMaxTimeWindow is specified. */ + @JsonProperty("clientTimestamp") + private Long clientTimestamp; + + /** + * Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < + * Gateway received the message time, this order will fail. + */ + @JsonProperty("allowMaxTimeWindow") + private Long allowMaxTimeWindow; + + public enum TypeEnum { + /** */ + LIMIT("limit"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersReq.java new file mode 100644 index 00000000..ffcdf803 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersReq.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchAddOrdersReq implements Request { + /** Order List */ + @JsonProperty("orderList") + @Builder.Default + private List orderList = new ArrayList<>(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersResp.java new file mode 100644 index 00000000..2a6a4d55 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchAddOrdersResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static BatchAddOrdersResp fromJson(List data) { + // original response + BatchAddOrdersResp obj = new BatchAddOrdersResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncData.java new file mode 100644 index 00000000..636265f4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncData.java @@ -0,0 +1,97 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchAddOrdersSyncData { + /** + * The unique order ID generated by the trading system, which can be used later for further + * actions such as canceling the order. + */ + @JsonProperty("orderId") + private String orderId; + + /** The user self-defined order ID. */ + @JsonProperty("clientOid") + private String clientOid; + + /** */ + @JsonProperty("orderTime") + private Long orderTime; + + /** Original order size */ + @JsonProperty("originSize") + private String originSize; + + /** Deal size */ + @JsonProperty("dealSize") + private String dealSize; + + /** Remain size */ + @JsonProperty("remainSize") + private String remainSize; + + /** Cumulative canceled size */ + @JsonProperty("canceledSize") + private String canceledSize; + + /** Order Status. open: order is active; done: order has been completed */ + @JsonProperty("status") + private StatusEnum status; + + /** */ + @JsonProperty("matchTime") + private Long matchTime; + + /** Add order success/failure */ + @JsonProperty("success") + private Boolean success; + + /** Error message */ + @JsonProperty("failMsg") + private String failMsg; + + public enum StatusEnum { + /** */ + OPEN("open"), + /** */ + DONE("done"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncOrderList.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncOrderList.java new file mode 100644 index 00000000..0f409bc6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncOrderList.java @@ -0,0 +1,264 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchAddOrdersSyncOrderList implements Request { + /** + * 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. + */ + @JsonProperty("clientOid") + private String clientOid; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Specify if the order is a 'limit' order or 'market' order. */ + @JsonProperty("type") + private TypeEnum type; + + /** + * [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during + * trading + */ + @JsonProperty("timeInForce") + @Builder.Default + private TimeInForceEnum timeInForce = TimeInForceEnum.GTC; + + /** Specify if the order is to 'buy' or 'sell'. */ + @JsonProperty("side") + private SideEnum side; + + /** Specify price for order */ + @JsonProperty("price") + private String price; + + /** + * 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 + */ + @JsonProperty("size") + private String size; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four + * strategies: CN, CO, CB , and DC + */ + @JsonProperty("stp") + private StpEnum stp; + + /** + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled + * automatically, the default value is -1 + */ + @JsonProperty("cancelAfter") + @Builder.Default + private Long cancelAfter = -1l; + + /** passive order labels, this is disabled when the order timing strategy is IOC or FOK */ + @JsonProperty("postOnly") + @Builder.Default + private Boolean postOnly = false; + + /** [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) */ + @JsonProperty("hidden") + @Builder.Default + private Boolean hidden = false; + + /** + * Whether or not only visible portions of orders are shown in [Iceberg + * orders](https://www.kucoin.com/docs-new/doc-338146) + */ + @JsonProperty("iceberg") + @Builder.Default + private Boolean iceberg = false; + + /** Maximum visible quantity in iceberg orders */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** Order tag, length cannot exceed 20 characters (ASCII) */ + @JsonProperty("tags") + private String tags; + + /** Order placement remarks, length cannot exceed 20 characters (ASCII) */ + @JsonProperty("remark") + private String remark; + + /** When **type** is market, select one out of two: size or funds */ + @JsonProperty("funds") + private String funds; + + /** + * Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < + * Gateway received the message time, this order will fail. + */ + @JsonProperty("allowMaxTimeWindow") + private Long allowMaxTimeWindow; + + /** Equal to KC-API-TIMESTAMP. Needs to be defined if allowMaxTimeWindow is specified. */ + @JsonProperty("clientTimestamp") + private Long clientTimestamp; + + public enum TypeEnum { + /** */ + LIMIT("limit"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncReq.java new file mode 100644 index 00000000..4464da30 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncReq.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchAddOrdersSyncReq implements Request { + /** Order List */ + @JsonProperty("orderList") + @Builder.Default + private List orderList = new ArrayList<>(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncResp.java new file mode 100644 index 00000000..dcb7c3bd --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchAddOrdersSyncResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static BatchAddOrdersSyncResp fromJson(List data) { + // original response + BatchAddOrdersSyncResp obj = new BatchAddOrdersSyncResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelOcoOrdersReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelOcoOrdersReq.java new file mode 100644 index 00000000..dd0b69b1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelOcoOrdersReq.java @@ -0,0 +1,29 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchCancelOcoOrdersReq implements Request { + /** + * Specify the order ID; there can be multiple orders, separated by commas. If not passed, all OCO + * orders will be canceled by default. + */ + @JsonProperty("orderIds") + private String orderIds; + + /** Trading pair. If not passed, the OCO orders of all symbols will be canceled by default. */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelOcoOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelOcoOrdersResp.java new file mode 100644 index 00000000..2540b111 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelOcoOrdersResp.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchCancelOcoOrdersResp + implements Response> { + /** List of two order IDs related to the canceled OCO order */ + @JsonProperty("cancelledOrderIds") + private List cancelledOrderIds = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelOrderOldReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelOrderOldReq.java new file mode 100644 index 00000000..68ed1db1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelOrderOldReq.java @@ -0,0 +1,68 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchCancelOrderOldReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * The type of trading :TRADE(Spot Trading), MARGIN_TRADE(Cross Margin Trading), + * MARGIN_ISOLATED_TRADE(Isolated Margin Trading), and the default is TRADE to cancel the spot + * trading orders. + */ + @JsonProperty("tradeType") + @Builder.Default + private TradeTypeEnum tradeType = TradeTypeEnum.TRADE; + + public enum TradeTypeEnum { + /** Spot Trading */ + TRADE("TRADE"), + /** Cross Margin Trading */ + MARGIN_TRADE("MARGIN_TRADE"), + /** Isolated Margin Trading */ + MARGIN_ISOLATED_TRADE("MARGIN_ISOLATED_TRADE"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelOrderOldResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelOrderOldResp.java new file mode 100644 index 00000000..daf3ac73 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelOrderOldResp.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchCancelOrderOldResp + implements Response> { + /** */ + @JsonProperty("cancelledOrderIds") + private List cancelledOrderIds = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelStopOrderReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelStopOrderReq.java new file mode 100644 index 00000000..17232a39 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelStopOrderReq.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchCancelStopOrderReq implements Request { + /** Cancel the open order for the specified symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated + * Margin). + */ + @JsonProperty("tradeType") + private String tradeType; + + /** Comma seperated order IDs. */ + @JsonProperty("orderIds") + private String orderIds; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelStopOrderResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelStopOrderResp.java new file mode 100644 index 00000000..55d8e8aa --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchCancelStopOrderResp.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class BatchCancelStopOrderResp + implements Response> { + /** order id array */ + @JsonProperty("cancelledOrderIds") + private List cancelledOrderIds = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersBySymbolReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersBySymbolReq.java new file mode 100644 index 00000000..90642ef7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersBySymbolReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelAllOrdersBySymbolReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersBySymbolResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersBySymbolResp.java new file mode 100644 index 00000000..f0329c8c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersBySymbolResp.java @@ -0,0 +1,40 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelAllOrdersBySymbolResp + implements Response> { + /** */ + @JsonProperty("data") + private String data; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static CancelAllOrdersBySymbolResp fromJson(String data) { + // original response + CancelAllOrdersBySymbolResp obj = new CancelAllOrdersBySymbolResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersFailedSymbols.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersFailedSymbols.java new file mode 100644 index 00000000..d6d2d5ac --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersFailedSymbols.java @@ -0,0 +1,23 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelAllOrdersFailedSymbols { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** error message */ + @JsonProperty("error") + private String error; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersResp.java new file mode 100644 index 00000000..a2eda458 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersResp.java @@ -0,0 +1,37 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelAllOrdersResp + implements Response> { + /** The Symbols Successfully cancelled */ + @JsonProperty("succeedSymbols") + private List succeedSymbols = new ArrayList<>(); + + /** The Symbols Failed to cancel */ + @JsonProperty("failedSymbols") + private List failedSymbols = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOcoOrderByClientOidReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOcoOrderByClientOidReq.java new file mode 100644 index 00000000..f3b109a4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOcoOrderByClientOidReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOcoOrderByClientOidReq implements Request { + /** Client Order Id,unique identifier created by the user */ + @JsonIgnore + @PathVar("clientOid") + @JsonProperty("clientOid") + private String clientOid; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOcoOrderByClientOidResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOcoOrderByClientOidResp.java new file mode 100644 index 00000000..3c722484 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOcoOrderByClientOidResp.java @@ -0,0 +1,34 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOcoOrderByClientOidResp + implements Response< + CancelOcoOrderByClientOidResp, RestResponse> { + /** List of two order IDs related to the canceled OCO order */ + @JsonProperty("cancelledOrderIds") + private List cancelledOrderIds = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOcoOrderByOrderIdReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOcoOrderByOrderIdReq.java new file mode 100644 index 00000000..d4c2db51 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOcoOrderByOrderIdReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOcoOrderByOrderIdReq implements Request { + /** The unique order id generated by the trading system */ + @JsonIgnore + @PathVar("orderId") + @JsonProperty("orderId") + private String orderId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOcoOrderByOrderIdResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOcoOrderByOrderIdResp.java new file mode 100644 index 00000000..2378b288 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOcoOrderByOrderIdResp.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOcoOrderByOrderIdResp + implements Response> { + /** List of two order IDs related to the canceled OCO order */ + @JsonProperty("cancelledOrderIds") + private List cancelledOrderIds = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidOldReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidOldReq.java new file mode 100644 index 00000000..d0491551 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidOldReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByClientOidOldReq implements Request { + /** Client Order Id,unique identifier created by the user */ + @JsonIgnore + @PathVar("clientOid") + @JsonProperty("clientOid") + private String clientOid; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidOldResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidOldResp.java new file mode 100644 index 00000000..88348c1b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidOldResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByClientOidOldResp + implements Response< + CancelOrderByClientOidOldResp, RestResponse> { + /** Client Order Id,unique identifier created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** The unique order id generated by the trading system */ + @JsonProperty("cancelledOrderId") + private String cancelledOrderId; + + /** */ + @JsonProperty("cancelledOcoOrderIds") + private List cancelledOcoOrderIds = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidReq.java new file mode 100644 index 00000000..dba89069 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByClientOidReq implements Request { + /** Client Order Id,unique identifier created by the user */ + @JsonIgnore + @PathVar("clientOid") + @JsonProperty("clientOid") + private String clientOid; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidResp.java new file mode 100644 index 00000000..5be2a450 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidResp.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByClientOidResp + implements Response> { + /** Client Order Id,unique identifier created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidSyncReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidSyncReq.java new file mode 100644 index 00000000..48b53437 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidSyncReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByClientOidSyncReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Client Order Id,unique identifier created by the user */ + @JsonIgnore + @PathVar("clientOid") + @JsonProperty("clientOid") + private String clientOid; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidSyncResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidSyncResp.java new file mode 100644 index 00000000..b61d3c3a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByClientOidSyncResp.java @@ -0,0 +1,87 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByClientOidSyncResp + implements Response< + CancelOrderByClientOidSyncResp, RestResponse> { + /** Client Order Id,unique identifier created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** original order size */ + @JsonProperty("originSize") + private String originSize; + + /** deal size */ + @JsonProperty("dealSize") + private String dealSize; + + /** remain size */ + @JsonProperty("remainSize") + private String remainSize; + + /** Cumulative canceled size */ + @JsonProperty("canceledSize") + private String canceledSize; + + /** Order Status. open:order is active; done:order has been completed */ + @JsonProperty("status") + private StatusEnum status; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum StatusEnum { + /** order is active */ + OPEN("open"), + /** order has been completed */ + DONE("done"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdOldReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdOldReq.java new file mode 100644 index 00000000..50740f17 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdOldReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByOrderIdOldReq implements Request { + /** The unique order id generated by the trading system */ + @JsonIgnore + @PathVar("orderId") + @JsonProperty("orderId") + private String orderId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdOldResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdOldResp.java new file mode 100644 index 00000000..5753ff99 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdOldResp.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByOrderIdOldResp + implements Response> { + /** */ + @JsonProperty("cancelledOrderIds") + private List cancelledOrderIds = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdReq.java new file mode 100644 index 00000000..e12c18e1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByOrderIdReq implements Request { + /** The unique order id generated by the trading system */ + @JsonIgnore + @PathVar("orderId") + @JsonProperty("orderId") + private String orderId; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdResp.java new file mode 100644 index 00000000..db041af8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdResp.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByOrderIdResp + implements Response> { + /** Order id */ + @JsonProperty("orderId") + private String orderId; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdSyncReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdSyncReq.java new file mode 100644 index 00000000..f2844ef7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdSyncReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByOrderIdSyncReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** The unique order id generated by the trading system */ + @JsonIgnore + @PathVar("orderId") + @JsonProperty("orderId") + private String orderId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdSyncResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdSyncResp.java new file mode 100644 index 00000000..332b14d8 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelOrderByOrderIdSyncResp.java @@ -0,0 +1,86 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelOrderByOrderIdSyncResp + implements Response> { + /** order id */ + @JsonProperty("orderId") + private String orderId; + + /** original order size */ + @JsonProperty("originSize") + private String originSize; + + /** deal size */ + @JsonProperty("dealSize") + private String dealSize; + + /** remain size */ + @JsonProperty("remainSize") + private String remainSize; + + /** Cumulative canceled size */ + @JsonProperty("canceledSize") + private String canceledSize; + + /** Order Status. open:order is active; done:order has been completed */ + @JsonProperty("status") + private StatusEnum status; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum StatusEnum { + /** order is active */ + OPEN("open"), + /** order has been completed */ + DONE("done"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelPartialOrderReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelPartialOrderReq.java new file mode 100644 index 00000000..00e9db16 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelPartialOrderReq.java @@ -0,0 +1,34 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelPartialOrderReq implements Request { + /** The unique order id generated by the trading system */ + @JsonIgnore + @PathVar("orderId") + @JsonProperty("orderId") + private String orderId; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** The size you want cancel */ + @JsonProperty("cancelSize") + private String cancelSize; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelPartialOrderResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelPartialOrderResp.java new file mode 100644 index 00000000..155590cb --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelPartialOrderResp.java @@ -0,0 +1,35 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelPartialOrderResp + implements Response> { + /** order id */ + @JsonProperty("orderId") + private String orderId; + + /** The size you canceled */ + @JsonProperty("cancelSize") + private String cancelSize; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelStopOrderByClientOidReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelStopOrderByClientOidReq.java new file mode 100644 index 00000000..d9f2610f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelStopOrderByClientOidReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelStopOrderByClientOidReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Unique order id created by users to identify their orders */ + @JsonProperty("clientOid") + private String clientOid; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelStopOrderByClientOidResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelStopOrderByClientOidResp.java new file mode 100644 index 00000000..38cb9522 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelStopOrderByClientOidResp.java @@ -0,0 +1,36 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelStopOrderByClientOidResp + implements Response< + CancelStopOrderByClientOidResp, RestResponse> { + /** Client Order Id,unique identifier created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** Unique ID of the cancelled order */ + @JsonProperty("cancelledOrderId") + private String cancelledOrderId; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelStopOrderByOrderIdReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelStopOrderByOrderIdReq.java new file mode 100644 index 00000000..2581d384 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelStopOrderByOrderIdReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelStopOrderByOrderIdReq implements Request { + /** The unique order id generated by the trading system */ + @JsonIgnore + @PathVar("orderId") + @JsonProperty("orderId") + private String orderId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelStopOrderByOrderIdResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelStopOrderByOrderIdResp.java new file mode 100644 index 00000000..bc7101ba --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelStopOrderByOrderIdResp.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CancelStopOrderByOrderIdResp + implements Response> { + /** order ID array */ + @JsonProperty("cancelledOrderIds") + private List cancelledOrderIds = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetClosedOrdersItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetClosedOrdersItems.java new file mode 100644 index 00000000..09ad67bb --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetClosedOrdersItems.java @@ -0,0 +1,293 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetClosedOrdersItems { + /** The unique order id generated by the trading system */ + @JsonProperty("id") + private String id; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("opType") + private String opType; + + /** Specify if the order is an 'limit' order or 'market' order. */ + @JsonProperty("type") + private TypeEnum type; + + /** Buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** Order price */ + @JsonProperty("price") + private String price; + + /** Order size */ + @JsonProperty("size") + private String size; + + /** Order Funds */ + @JsonProperty("funds") + private String funds; + + /** Number of filled transactions */ + @JsonProperty("dealSize") + private String dealSize; + + /** Funds of filled transactions */ + @JsonProperty("dealFunds") + private String dealFunds; + + /** [Handling fees](https://www.kucoin.com/docs-new/api-5327739) */ + @JsonProperty("fee") + private String fee; + + /** currency used to calculate trading fee */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** [Self Trade Prevention](https://www.kucoin.com/docs-new/api-5176570) */ + @JsonProperty("stp") + private StpEnum stp; + + /** Time in force */ + @JsonProperty("timeInForce") + private TimeInForceEnum timeInForce; + + /** Whether its a postOnly order. */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** Whether its a hidden order. */ + @JsonProperty("hidden") + private Boolean hidden; + + /** Whether its a iceberg order. */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** Visible size of iceberg order in order book. */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** A GTT timeInForce that expires in n seconds */ + @JsonProperty("cancelAfter") + private Integer cancelAfter; + + /** */ + @JsonProperty("channel") + private String channel; + + /** Client Order Id,unique identifier created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** Order placement remarks */ + @JsonProperty("remark") + private String remark; + + /** Order tag */ + @JsonProperty("tags") + private String tags; + + /** Whether there is a cancellation record for the order. */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** */ + @JsonProperty("createdAt") + private Long createdAt; + + /** */ + @JsonProperty("lastUpdatedAt") + private Long lastUpdatedAt; + + /** Trade type, redundancy param */ + @JsonProperty("tradeType") + private String tradeType; + + /** Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook */ + @JsonProperty("inOrderBook") + private Boolean inOrderBook; + + /** Number of canceled transactions */ + @JsonProperty("cancelledSize") + private String cancelledSize; + + /** Funds of canceled transactions */ + @JsonProperty("cancelledFunds") + private String cancelledFunds; + + /** Number of remain transactions */ + @JsonProperty("remainSize") + private String remainSize; + + /** Funds of remain transactions */ + @JsonProperty("remainFunds") + private String remainFunds; + + /** Users in some regions need query this field */ + @JsonProperty("tax") + private String tax; + + /** Order status: true-The status of the order isactive; false-The status of the order is done */ + @JsonProperty("active") + private Boolean active; + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetClosedOrdersReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetClosedOrdersReq.java new file mode 100644 index 00000000..1e07779f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetClosedOrdersReq.java @@ -0,0 +1,120 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetClosedOrdersReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** specify if the order is to 'buy' or 'sell' */ + @JsonProperty("side") + private SideEnum side; + + /** specify if the order is an 'limit' order or 'market' order. */ + @JsonProperty("type") + private TypeEnum type; + + /** + * 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. + */ + @JsonProperty("lastId") + private Long lastId; + + /** Default20,Max100 */ + @JsonProperty("limit") + @Builder.Default + private Integer limit = 20; + + /** Start time (milisecond) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milisecond) */ + @JsonProperty("endAt") + private Long endAt; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetClosedOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetClosedOrdersResp.java new file mode 100644 index 00000000..efab0a62 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetClosedOrdersResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public 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. + */ + @JsonProperty("lastId") + private Long lastId; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetDCPResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetDCPResp.java new file mode 100644 index 00000000..be11c1b7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetDCPResp.java @@ -0,0 +1,45 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDCPResp implements Response> { + /** + * Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) + * or 5 <= timeout <= 86400 + */ + @JsonProperty("timeout") + private Integer timeout; + + /** List of trading pairs. Separated by commas; empty means all trading pairs */ + @JsonProperty("symbols") + private String symbols; + + /** System current time (in seconds) */ + @JsonProperty("currentTime") + private Long currentTime; + + /** Trigger cancellation time (in seconds) */ + @JsonProperty("triggerTime") + private Long triggerTime; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderByClientOidReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderByClientOidReq.java new file mode 100644 index 00000000..a59b564a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderByClientOidReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOcoOrderByClientOidReq implements Request { + /** Client Order Id,unique identifier created by the user */ + @JsonIgnore + @PathVar("clientOid") + @JsonProperty("clientOid") + private String clientOid; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderByClientOidResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderByClientOidResp.java new file mode 100644 index 00000000..898844cc --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderByClientOidResp.java @@ -0,0 +1,50 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOcoOrderByClientOidResp + implements Response> { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Client Order Id */ + @JsonProperty("clientOid") + private String clientOid; + + /** + * The unique order id generated by the trading system,which can be used later for further actions + * such as canceling the order. + */ + @JsonProperty("orderId") + private String orderId; + + /** Order placement time, milliseconds */ + @JsonProperty("orderTime") + private Long orderTime; + + /** Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELLED: Cancelled */ + @JsonProperty("status") + private String status; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderByOrderIdReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderByOrderIdReq.java new file mode 100644 index 00000000..68e915c4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderByOrderIdReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOcoOrderByOrderIdReq implements Request { + /** The unique order id generated by the trading system */ + @JsonIgnore + @PathVar("orderId") + @JsonProperty("orderId") + private String orderId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderByOrderIdResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderByOrderIdResp.java new file mode 100644 index 00000000..0dcddb2a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderByOrderIdResp.java @@ -0,0 +1,89 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOcoOrderByOrderIdResp + implements Response> { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Client Order ID */ + @JsonProperty("clientOid") + private String clientOid; + + /** + * The unique order ID generated by the trading system, which can be used later for further + * actions such as canceling the order. + */ + @JsonProperty("orderId") + private String orderId; + + /** Order placement time, milliseconds */ + @JsonProperty("orderTime") + private Long orderTime; + + /** Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELED: Canceled */ + @JsonProperty("status") + private StatusEnum status; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum StatusEnum { + /** New */ + NEW("NEW"), + /** Completed */ + DONE("DONE"), + /** Triggered */ + TRIGGERED("TRIGGERED"), + /** Canceled */ + CANCELED("CANCELLED"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderDetailByOrderIdOrders.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderDetailByOrderIdOrders.java new file mode 100644 index 00000000..797fee05 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderDetailByOrderIdOrders.java @@ -0,0 +1,43 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOcoOrderDetailByOrderIdOrders { + /** */ + @JsonProperty("id") + private String id; + + /** */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("side") + private String side; + + /** */ + @JsonProperty("price") + private String price; + + /** */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** */ + @JsonProperty("size") + private String size; + + /** */ + @JsonProperty("status") + private String status; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderDetailByOrderIdReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderDetailByOrderIdReq.java new file mode 100644 index 00000000..c019dc47 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderDetailByOrderIdReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOcoOrderDetailByOrderIdReq implements Request { + /** The unique order id generated by the trading system */ + @JsonIgnore + @PathVar("orderId") + @JsonProperty("orderId") + private String orderId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderDetailByOrderIdResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderDetailByOrderIdResp.java new file mode 100644 index 00000000..db23b35c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderDetailByOrderIdResp.java @@ -0,0 +1,57 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOcoOrderDetailByOrderIdResp + implements Response< + GetOcoOrderDetailByOrderIdResp, RestResponse> { + /** + * The unique order id generated by the trading system,which can be used later for further actions + * such as canceling the order. + */ + @JsonProperty("orderId") + private String orderId; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Client Order Id */ + @JsonProperty("clientOid") + private String clientOid; + + /** Order placement time, milliseconds */ + @JsonProperty("orderTime") + private Long orderTime; + + /** Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELLED: Cancelled */ + @JsonProperty("status") + private String status; + + /** */ + @JsonProperty("orders") + private List orders = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderListItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderListItems.java new file mode 100644 index 00000000..a8d62cee --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderListItems.java @@ -0,0 +1,77 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOcoOrderListItems { + /** + * The unique order ID generated by the trading system, which can be used later for further + * actions such as canceling the order. + */ + @JsonProperty("orderId") + private String orderId; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Client Order ID */ + @JsonProperty("clientOid") + private String clientOid; + + /** Order placement time, milliseconds */ + @JsonProperty("orderTime") + private Long orderTime; + + /** Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELED: Canceled */ + @JsonProperty("status") + private StatusEnum status; + + public enum StatusEnum { + /** New */ + NEW("NEW"), + /** Completed */ + DONE("DONE"), + /** Triggered */ + TRIGGERED("TRIGGERED"), + /** Canceled */ + CANCELED("CANCELLED"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderListReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderListReq.java new file mode 100644 index 00000000..7a9360d4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderListReq.java @@ -0,0 +1,44 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOcoOrderListReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + /** Specify orderId collection, up to 500 orders */ + @JsonProperty("orderIds") + private String orderIds; + + /** Size per page, minimum value 10, maximum value 500 */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 50; + + /** Page number, minimum value 1 */ + @JsonProperty("currentPage") + @Builder.Default + private Integer currentPage = 1; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderListResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderListResp.java new file mode 100644 index 00000000..0afcf130 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOcoOrderListResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOcoOrderListResp + implements Response> { + /** */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersByPageItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersByPageItems.java new file mode 100644 index 00000000..d2e63b91 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersByPageItems.java @@ -0,0 +1,293 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOpenOrdersByPageItems { + /** The unique order id generated by the trading system */ + @JsonProperty("id") + private String id; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("opType") + private String opType; + + /** Specify if the order is an 'limit' order or 'market' order. */ + @JsonProperty("type") + private TypeEnum type; + + /** Buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** Order price */ + @JsonProperty("price") + private String price; + + /** Order size */ + @JsonProperty("size") + private String size; + + /** Order Funds */ + @JsonProperty("funds") + private String funds; + + /** Number of filled transactions */ + @JsonProperty("dealSize") + private String dealSize; + + /** Funds of filled transactions */ + @JsonProperty("dealFunds") + private String dealFunds; + + /** [Handling fees](https://www.kucoin.com/docs-new/api-5327739) */ + @JsonProperty("fee") + private String fee; + + /** currency used to calculate trading fee */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** [Self Trade Prevention](https://www.kucoin.com/docs-new/api-5176570) */ + @JsonProperty("stp") + private StpEnum stp; + + /** Time in force */ + @JsonProperty("timeInForce") + private TimeInForceEnum timeInForce; + + /** Whether its a postOnly order. */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** Whether its a hidden order. */ + @JsonProperty("hidden") + private Boolean hidden; + + /** Whether its a iceberg order. */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** Visible size of iceberg order in order book. */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** A GTT timeInForce that expires in n seconds */ + @JsonProperty("cancelAfter") + private Long cancelAfter; + + /** */ + @JsonProperty("channel") + private String channel; + + /** Client Order Id,unique identifier created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** Order placement remarks */ + @JsonProperty("remark") + private String remark; + + /** Order tag */ + @JsonProperty("tags") + private String tags; + + /** Whether there is a cancellation record for the order. */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** */ + @JsonProperty("createdAt") + private Long createdAt; + + /** */ + @JsonProperty("lastUpdatedAt") + private Long lastUpdatedAt; + + /** Trade type, redundancy param */ + @JsonProperty("tradeType") + private String tradeType; + + /** Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook */ + @JsonProperty("inOrderBook") + private Boolean inOrderBook; + + /** Number of canceled transactions */ + @JsonProperty("cancelledSize") + private String cancelledSize; + + /** Funds of canceled transactions */ + @JsonProperty("cancelledFunds") + private String cancelledFunds; + + /** Number of remain transactions */ + @JsonProperty("remainSize") + private String remainSize; + + /** Funds of remain transactions */ + @JsonProperty("remainFunds") + private String remainFunds; + + /** Users in some regions need query this field */ + @JsonProperty("tax") + private String tax; + + /** Order status: true-The status of the order isactive; false-The status of the order is done */ + @JsonProperty("active") + private Boolean active; + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersByPageReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersByPageReq.java new file mode 100644 index 00000000..05097ce4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersByPageReq.java @@ -0,0 +1,32 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOpenOrdersByPageReq implements Request { + /** Symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Current page */ + @JsonProperty("pageNum") + @Builder.Default + private Integer pageNum = 1; + + /** Size per page */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 20; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersByPageResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersByPageResp.java new file mode 100644 index 00000000..a83531fb --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersByPageResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOpenOrdersByPageResp + implements Response> { + /** */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersData.java new file mode 100644 index 00000000..fae90667 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersData.java @@ -0,0 +1,293 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOpenOrdersData { + /** The unique order id generated by the trading system */ + @JsonProperty("id") + private String id; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("opType") + private String opType; + + /** Specify if the order is an 'limit' order or 'market' order. */ + @JsonProperty("type") + private TypeEnum type; + + /** Buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** Order price */ + @JsonProperty("price") + private String price; + + /** Order size */ + @JsonProperty("size") + private String size; + + /** Order Funds */ + @JsonProperty("funds") + private String funds; + + /** Number of filled transactions */ + @JsonProperty("dealSize") + private String dealSize; + + /** Funds of filled transactions */ + @JsonProperty("dealFunds") + private String dealFunds; + + /** [Handling fees](https://www.kucoin.com/docs-new/api-5327739) */ + @JsonProperty("fee") + private String fee; + + /** currency used to calculate trading fee */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** [Self Trade Prevention](https://www.kucoin.com/docs-new/api-5176570) */ + @JsonProperty("stp") + private StpEnum stp; + + /** Time in force */ + @JsonProperty("timeInForce") + private TimeInForceEnum timeInForce; + + /** Whether its a postOnly order. */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** Whether its a hidden order. */ + @JsonProperty("hidden") + private Boolean hidden; + + /** Whether its a iceberg order. */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** Visible size of iceberg order in order book. */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** A GTT timeInForce that expires in n seconds */ + @JsonProperty("cancelAfter") + private Long cancelAfter; + + /** */ + @JsonProperty("channel") + private String channel; + + /** Client Order Id,unique identifier created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** Order placement remarks */ + @JsonProperty("remark") + private String remark; + + /** Order tag */ + @JsonProperty("tags") + private String tags; + + /** Whether there is a cancellation record for the order. */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** */ + @JsonProperty("createdAt") + private Long createdAt; + + /** */ + @JsonProperty("lastUpdatedAt") + private Long lastUpdatedAt; + + /** Trade type, redundancy param */ + @JsonProperty("tradeType") + private String tradeType; + + /** Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook */ + @JsonProperty("inOrderBook") + private Boolean inOrderBook; + + /** Number of canceled transactions */ + @JsonProperty("cancelledSize") + private String cancelledSize; + + /** Funds of canceled transactions */ + @JsonProperty("cancelledFunds") + private String cancelledFunds; + + /** Number of remain transactions */ + @JsonProperty("remainSize") + private String remainSize; + + /** Funds of remain transactions */ + @JsonProperty("remainFunds") + private String remainFunds; + + /** Users in some regions need query this field */ + @JsonProperty("tax") + private String tax; + + /** Order status: true-The status of the order isactive; false-The status of the order is done */ + @JsonProperty("active") + private Boolean active; + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersReq.java new file mode 100644 index 00000000..5c694cfc --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersReq.java @@ -0,0 +1,22 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOpenOrdersReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersResp.java new file mode 100644 index 00000000..930ab2c2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOpenOrdersResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetOpenOrdersResp fromJson(List data) { + // original response + GetOpenOrdersResp obj = new GetOpenOrdersResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByClientOidOldReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByClientOidOldReq.java new file mode 100644 index 00000000..4a92bd32 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByClientOidOldReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderByClientOidOldReq implements Request { + /** Unique order ID created by users to identify their orders */ + @JsonIgnore + @PathVar("clientOid") + @JsonProperty("clientOid") + private String clientOid; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByClientOidOldResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByClientOidOldResp.java new file mode 100644 index 00000000..102b2e50 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByClientOidOldResp.java @@ -0,0 +1,159 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderByClientOidOldResp + implements Response> { + /** */ + @JsonProperty("id") + private String id; + + /** */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("opType") + private String opType; + + /** */ + @JsonProperty("type") + private String type; + + /** */ + @JsonProperty("side") + private String side; + + /** */ + @JsonProperty("price") + private String price; + + /** */ + @JsonProperty("size") + private String size; + + /** */ + @JsonProperty("funds") + private String funds; + + /** */ + @JsonProperty("dealFunds") + private String dealFunds; + + /** */ + @JsonProperty("dealSize") + private String dealSize; + + /** */ + @JsonProperty("fee") + private String fee; + + /** */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** */ + @JsonProperty("stp") + private String stp; + + /** */ + @JsonProperty("stop") + private String stop; + + /** */ + @JsonProperty("stopTriggered") + private Boolean stopTriggered; + + /** */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** */ + @JsonProperty("timeInForce") + private String timeInForce; + + /** */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** */ + @JsonProperty("hidden") + private Boolean hidden; + + /** */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** */ + @JsonProperty("cancelAfter") + private Integer cancelAfter; + + /** */ + @JsonProperty("channel") + private String channel; + + /** */ + @JsonProperty("clientOid") + private String clientOid; + + /** */ + @JsonProperty("remark") + private String remark; + + /** */ + @JsonProperty("tags") + private String tags; + + /** */ + @JsonProperty("isActive") + private Boolean isActive; + + /** */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** */ + @JsonProperty("createdAt") + private Long createdAt; + + /** */ + @JsonProperty("tradeType") + private String tradeType; + + /** */ + @JsonProperty("tax") + private String tax; + + /** */ + @JsonProperty("taxRate") + private String taxRate; + + /** */ + @JsonProperty("taxCurrency") + private String taxCurrency; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByClientOidReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByClientOidReq.java new file mode 100644 index 00000000..57da149d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByClientOidReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderByClientOidReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Client Order Id,unique identifier created by the user */ + @JsonIgnore + @PathVar("clientOid") + @JsonProperty("clientOid") + private String clientOid; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByClientOidResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByClientOidResp.java new file mode 100644 index 00000000..a06a918e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByClientOidResp.java @@ -0,0 +1,305 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderByClientOidResp + implements Response> { + /** The unique order id generated by the trading system */ + @JsonProperty("id") + private String id; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("opType") + private String opType; + + /** Specify if the order is an 'limit' order or 'market' order. */ + @JsonProperty("type") + private TypeEnum type; + + /** Buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** Order price */ + @JsonProperty("price") + private String price; + + /** Order size */ + @JsonProperty("size") + private String size; + + /** Order Funds */ + @JsonProperty("funds") + private String funds; + + /** Number of filled transactions */ + @JsonProperty("dealSize") + private String dealSize; + + /** Funds of filled transactions */ + @JsonProperty("dealFunds") + private String dealFunds; + + /** [Handling fees](https://www.kucoin.com/docs-new/api-5327739) */ + @JsonProperty("fee") + private String fee; + + /** currency used to calculate trading fee */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** [Self Trade Prevention](https://www.kucoin.com/docs-new/api-5176570) */ + @JsonProperty("stp") + private StpEnum stp; + + /** Time in force */ + @JsonProperty("timeInForce") + private TimeInForceEnum timeInForce; + + /** Whether its a postOnly order. */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** Whether its a hidden order. */ + @JsonProperty("hidden") + private Boolean hidden; + + /** Whether its a iceberg order. */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** Visible size of iceberg order in order book. */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** A GTT timeInForce that expires in n seconds */ + @JsonProperty("cancelAfter") + private Long cancelAfter; + + /** */ + @JsonProperty("channel") + private String channel; + + /** Client Order Id,unique identifier created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** Order placement remarks */ + @JsonProperty("remark") + private String remark; + + /** Order tag */ + @JsonProperty("tags") + private String tags; + + /** Whether there is a cancellation record for the order. */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** */ + @JsonProperty("createdAt") + private Long createdAt; + + /** */ + @JsonProperty("lastUpdatedAt") + private Long lastUpdatedAt; + + /** Trade type, redundancy param */ + @JsonProperty("tradeType") + private String tradeType; + + /** Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook */ + @JsonProperty("inOrderBook") + private Boolean inOrderBook; + + /** Number of canceled transactions */ + @JsonProperty("cancelledSize") + private String cancelledSize; + + /** Funds of canceled transactions */ + @JsonProperty("cancelledFunds") + private String cancelledFunds; + + /** Number of remain transactions */ + @JsonProperty("remainSize") + private String remainSize; + + /** Funds of remain transactions */ + @JsonProperty("remainFunds") + private String remainFunds; + + /** Users in some regions need query this field */ + @JsonProperty("tax") + private String tax; + + /** Order status: true-The status of the order isactive; false-The status of the order is done */ + @JsonProperty("active") + private Boolean active; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByOrderIdOldReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByOrderIdOldReq.java new file mode 100644 index 00000000..44307b83 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByOrderIdOldReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderByOrderIdOldReq implements Request { + /** The unique order id generated by the trading system */ + @JsonIgnore + @PathVar("orderId") + @JsonProperty("orderId") + private String orderId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByOrderIdOldResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByOrderIdOldResp.java new file mode 100644 index 00000000..9761e481 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByOrderIdOldResp.java @@ -0,0 +1,159 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderByOrderIdOldResp + implements Response> { + /** */ + @JsonProperty("id") + private String id; + + /** */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("opType") + private String opType; + + /** */ + @JsonProperty("type") + private String type; + + /** */ + @JsonProperty("side") + private String side; + + /** */ + @JsonProperty("price") + private String price; + + /** */ + @JsonProperty("size") + private String size; + + /** */ + @JsonProperty("funds") + private String funds; + + /** */ + @JsonProperty("dealFunds") + private String dealFunds; + + /** */ + @JsonProperty("dealSize") + private String dealSize; + + /** */ + @JsonProperty("fee") + private String fee; + + /** */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** */ + @JsonProperty("stp") + private String stp; + + /** */ + @JsonProperty("stop") + private String stop; + + /** */ + @JsonProperty("stopTriggered") + private Boolean stopTriggered; + + /** */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** */ + @JsonProperty("timeInForce") + private String timeInForce; + + /** */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** */ + @JsonProperty("hidden") + private Boolean hidden; + + /** */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** */ + @JsonProperty("cancelAfter") + private Integer cancelAfter; + + /** */ + @JsonProperty("channel") + private String channel; + + /** */ + @JsonProperty("clientOid") + private String clientOid; + + /** */ + @JsonProperty("remark") + private String remark; + + /** */ + @JsonProperty("tags") + private String tags; + + /** */ + @JsonProperty("isActive") + private Boolean isActive; + + /** */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** */ + @JsonProperty("createdAt") + private Long createdAt; + + /** */ + @JsonProperty("tradeType") + private String tradeType; + + /** */ + @JsonProperty("tax") + private String tax; + + /** */ + @JsonProperty("taxRate") + private String taxRate; + + /** */ + @JsonProperty("taxCurrency") + private String taxCurrency; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByOrderIdReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByOrderIdReq.java new file mode 100644 index 00000000..54d2e592 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByOrderIdReq.java @@ -0,0 +1,30 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderByOrderIdReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** The unique order id generated by the trading system */ + @JsonIgnore + @PathVar("orderId") + @JsonProperty("orderId") + private String orderId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByOrderIdResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByOrderIdResp.java new file mode 100644 index 00000000..8079e356 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrderByOrderIdResp.java @@ -0,0 +1,305 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrderByOrderIdResp + implements Response> { + /** The unique order id generated by the trading system */ + @JsonProperty("id") + private String id; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("opType") + private String opType; + + /** Specify if the order is an 'limit' order or 'market' order. */ + @JsonProperty("type") + private TypeEnum type; + + /** Buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** Order price */ + @JsonProperty("price") + private String price; + + /** Order size */ + @JsonProperty("size") + private String size; + + /** Order Funds */ + @JsonProperty("funds") + private String funds; + + /** Number of filled transactions */ + @JsonProperty("dealSize") + private String dealSize; + + /** Funds of filled transactions */ + @JsonProperty("dealFunds") + private String dealFunds; + + /** [Handling fees](https://www.kucoin.com/docs-new/api-5327739) */ + @JsonProperty("fee") + private String fee; + + /** currency used to calculate trading fee */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** [Self Trade Prevention](https://www.kucoin.com/docs-new/api-5176570) */ + @JsonProperty("stp") + private StpEnum stp; + + /** Time in force */ + @JsonProperty("timeInForce") + private TimeInForceEnum timeInForce; + + /** Whether its a postOnly order. */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** Whether its a hidden order. */ + @JsonProperty("hidden") + private Boolean hidden; + + /** Whether its a iceberg order. */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** Visible size of iceberg order in order book. */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** A GTT timeInForce that expires in n seconds */ + @JsonProperty("cancelAfter") + private Long cancelAfter; + + /** */ + @JsonProperty("channel") + private String channel; + + /** Client Order Id,unique identifier created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** Order placement remarks */ + @JsonProperty("remark") + private String remark; + + /** Order tag */ + @JsonProperty("tags") + private String tags; + + /** Whether there is a cancellation record for the order. */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** */ + @JsonProperty("createdAt") + private Long createdAt; + + /** */ + @JsonProperty("lastUpdatedAt") + private Long lastUpdatedAt; + + /** Trade type, redundancy param */ + @JsonProperty("tradeType") + private String tradeType; + + /** Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook */ + @JsonProperty("inOrderBook") + private Boolean inOrderBook; + + /** Number of canceled transactions */ + @JsonProperty("cancelledSize") + private String cancelledSize; + + /** Funds of canceled transactions */ + @JsonProperty("cancelledFunds") + private String cancelledFunds; + + /** Number of remain transactions */ + @JsonProperty("remainSize") + private String remainSize; + + /** Funds of remain transactions */ + @JsonProperty("remainFunds") + private String remainFunds; + + /** Users in some regions need query this field */ + @JsonProperty("tax") + private String tax; + + /** Order status: true-The status of the order isactive; false-The status of the order is done */ + @JsonProperty("active") + private Boolean active; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StpEnum { + /** */ + DC("DC"), + /** */ + CO("CO"), + /** */ + CN("CN"), + /** */ + CB("CB"); + + private final String value; + + StpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StpEnum fromValue(String value) { + for (StpEnum b : StpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TimeInForceEnum { + /** */ + GTC("GTC"), + /** */ + GTT("GTT"), + /** */ + IOC("IOC"), + /** */ + FOK("FOK"); + + private final String value; + + TimeInForceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForceEnum fromValue(String value) { + for (TimeInForceEnum b : TimeInForceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrdersListOldItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrdersListOldItems.java new file mode 100644 index 00000000..f68025f4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrdersListOldItems.java @@ -0,0 +1,147 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrdersListOldItems { + /** */ + @JsonProperty("id") + private String id; + + /** */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("opType") + private String opType; + + /** */ + @JsonProperty("type") + private String type; + + /** */ + @JsonProperty("side") + private String side; + + /** */ + @JsonProperty("price") + private String price; + + /** */ + @JsonProperty("size") + private String size; + + /** */ + @JsonProperty("funds") + private String funds; + + /** */ + @JsonProperty("dealFunds") + private String dealFunds; + + /** */ + @JsonProperty("dealSize") + private String dealSize; + + /** */ + @JsonProperty("fee") + private String fee; + + /** */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** */ + @JsonProperty("stp") + private String stp; + + /** */ + @JsonProperty("stop") + private String stop; + + /** */ + @JsonProperty("stopTriggered") + private Boolean stopTriggered; + + /** */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** */ + @JsonProperty("timeInForce") + private String timeInForce; + + /** */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** */ + @JsonProperty("hidden") + private Boolean hidden; + + /** */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** */ + @JsonProperty("cancelAfter") + private Integer cancelAfter; + + /** */ + @JsonProperty("channel") + private String channel; + + /** */ + @JsonProperty("clientOid") + private String clientOid; + + /** */ + @JsonProperty("remark") + private String remark; + + /** */ + @JsonProperty("tags") + private String tags; + + /** */ + @JsonProperty("isActive") + private Boolean isActive; + + /** */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** */ + @JsonProperty("createdAt") + private Long createdAt; + + /** */ + @JsonProperty("tradeType") + private String tradeType; + + /** */ + @JsonProperty("tax") + private String tax; + + /** */ + @JsonProperty("taxRate") + private String taxRate; + + /** */ + @JsonProperty("taxCurrency") + private String taxCurrency; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrdersListOldReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrdersListOldReq.java new file mode 100644 index 00000000..54177b4c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrdersListOldReq.java @@ -0,0 +1,205 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrdersListOldReq implements Request { + /** Symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Active or done (done as default); only list orders with a specific status. */ + @JsonProperty("status") + @Builder.Default + private StatusEnum status = StatusEnum.DONE; + + /** Buy or Sell */ + @JsonProperty("side") + private SideEnum side; + + /** Order type */ + @JsonProperty("type") + private TypeEnum type; + + /** + * The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin + * Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. + */ + @JsonProperty("tradeType") + @Builder.Default + private TradeTypeEnum tradeType = TradeTypeEnum.TRADE; + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + /** Current request page. */ + @JsonProperty("currentPage") + @Builder.Default + private Integer currentPage = 1; + + /** Number of results per request. Minimum is 10, maximum is 500. */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 50; + + public enum StatusEnum { + /** Active order */ + ACTIVE("active"), + /** Done orders */ + DONE("done"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** buy */ + BUY("buy"), + /** sell */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** limit */ + LIMIT("limit"), + /** market */ + MARKET("market"), + /** limit_stop */ + LIMITSTOP("limit_stop"), + /** market_stop */ + MARKETSTOP("market_stop"), + /** oco_limit */ + OCOLIMIT("oco_limit"), + /** oco_stop */ + OCOSTOP("oco_stop"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TradeTypeEnum { + /** Spot Trading */ + TRADE("TRADE"), + /** Cross Margin Trading */ + MARGIN_TRADE("MARGIN_TRADE"), + /** Isolated Margin Trading */ + MARGIN_ISOLATED_TRADE("MARGIN_ISOLATED_TRADE"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrdersListOldResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrdersListOldResp.java new file mode 100644 index 00000000..11f2b50c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOrdersListOldResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetOrdersListOldResp + implements Response> { + /** */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentOrdersListOldData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentOrdersListOldData.java new file mode 100644 index 00000000..c2e5f57c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentOrdersListOldData.java @@ -0,0 +1,147 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRecentOrdersListOldData { + /** */ + @JsonProperty("id") + private String id; + + /** */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("opType") + private String opType; + + /** */ + @JsonProperty("type") + private String type; + + /** */ + @JsonProperty("side") + private String side; + + /** */ + @JsonProperty("price") + private String price; + + /** */ + @JsonProperty("size") + private String size; + + /** */ + @JsonProperty("funds") + private String funds; + + /** */ + @JsonProperty("dealFunds") + private String dealFunds; + + /** */ + @JsonProperty("dealSize") + private String dealSize; + + /** */ + @JsonProperty("fee") + private String fee; + + /** */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** */ + @JsonProperty("stp") + private String stp; + + /** */ + @JsonProperty("stop") + private String stop; + + /** */ + @JsonProperty("stopTriggered") + private Boolean stopTriggered; + + /** */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** */ + @JsonProperty("timeInForce") + private String timeInForce; + + /** */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** */ + @JsonProperty("hidden") + private Boolean hidden; + + /** */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** */ + @JsonProperty("cancelAfter") + private Integer cancelAfter; + + /** */ + @JsonProperty("channel") + private String channel; + + /** */ + @JsonProperty("clientOid") + private String clientOid; + + /** */ + @JsonProperty("remark") + private String remark; + + /** */ + @JsonProperty("tags") + private String tags; + + /** */ + @JsonProperty("isActive") + private Boolean isActive; + + /** */ + @JsonProperty("cancelExist") + private Boolean cancelExist; + + /** */ + @JsonProperty("createdAt") + private Long createdAt; + + /** */ + @JsonProperty("tradeType") + private String tradeType; + + /** */ + @JsonProperty("tax") + private String tax; + + /** */ + @JsonProperty("taxRate") + private String taxRate; + + /** */ + @JsonProperty("taxCurrency") + private String taxCurrency; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentOrdersListOldResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentOrdersListOldResp.java new file mode 100644 index 00000000..d40c33d7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentOrdersListOldResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRecentOrdersListOldResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetRecentOrdersListOldResp fromJson(List data) { + // original response + GetRecentOrdersListOldResp obj = new GetRecentOrdersListOldResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentTradeHistoryOldData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentTradeHistoryOldData.java new file mode 100644 index 00000000..1cb80b32 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentTradeHistoryOldData.java @@ -0,0 +1,95 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRecentTradeHistoryOldData { + /** */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("tradeId") + private String tradeId; + + /** */ + @JsonProperty("orderId") + private String orderId; + + /** */ + @JsonProperty("counterOrderId") + private String counterOrderId; + + /** */ + @JsonProperty("side") + private String side; + + /** */ + @JsonProperty("liquidity") + private String liquidity; + + /** */ + @JsonProperty("forceTaker") + private Boolean forceTaker; + + /** */ + @JsonProperty("price") + private String price; + + /** */ + @JsonProperty("size") + private String size; + + /** */ + @JsonProperty("funds") + private String funds; + + /** */ + @JsonProperty("fee") + private String fee; + + /** */ + @JsonProperty("feeRate") + private String feeRate; + + /** */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** */ + @JsonProperty("stop") + private String stop; + + /** */ + @JsonProperty("tradeType") + private String tradeType; + + /** */ + @JsonProperty("type") + private String type; + + /** */ + @JsonProperty("createdAt") + private Long createdAt; + + /** */ + @JsonProperty("tax") + private String tax; + + /** */ + @JsonProperty("taxCurrency") + private String taxCurrency; + + /** */ + @JsonProperty("taxRate") + private String taxRate; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentTradeHistoryOldResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentTradeHistoryOldResp.java new file mode 100644 index 00000000..9c1b75d9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentTradeHistoryOldResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetRecentTradeHistoryOldResp + implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetRecentTradeHistoryOldResp fromJson(List data) { + // original response + GetRecentTradeHistoryOldResp obj = new GetRecentTradeHistoryOldResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByClientOidData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByClientOidData.java new file mode 100644 index 00000000..db53f641 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByClientOidData.java @@ -0,0 +1,177 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetStopOrderByClientOidData { + /** Order ID, the ID of an order. */ + @JsonProperty("id") + private String id; + + /** Symbol name */ + @JsonProperty("symbol") + private String symbol; + + /** User ID */ + @JsonProperty("userId") + private String userId; + + /** Order status, include NEW, TRIGGERED */ + @JsonProperty("status") + private String status; + + /** Order type */ + @JsonProperty("type") + private TypeEnum type; + + /** transaction direction,include buy and sell */ + @JsonProperty("side") + private String side; + + /** order price */ + @JsonProperty("price") + private String price; + + /** order quantity */ + @JsonProperty("size") + private String size; + + /** order funds */ + @JsonProperty("funds") + private String funds; + + /** */ + @JsonProperty("stp") + private String stp; + + /** time InForce,include GTC,GTT,IOC,FOK */ + @JsonProperty("timeInForce") + private String timeInForce; + + /** cancel orders after n seconds,requires timeInForce to be GTT */ + @JsonProperty("cancelAfter") + private Long cancelAfter; + + /** postOnly */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** hidden order */ + @JsonProperty("hidden") + private Boolean hidden; + + /** Iceberg order */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** displayed quantity for iceberg order */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** order source */ + @JsonProperty("channel") + private String channel; + + /** user-entered order unique mark */ + @JsonProperty("clientOid") + private String clientOid; + + /** Remarks at stop order creation */ + @JsonProperty("remark") + private String remark; + + /** tag order source */ + @JsonProperty("tags") + private String tags; + + /** domainId, e.g: kucoin */ + @JsonProperty("domainId") + private String domainId; + + /** trade source: USER(Order by user), MARGIN_SYSTEM(Order by margin system) */ + @JsonProperty("tradeSource") + private String tradeSource; + + /** + * The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated + * Margin). + */ + @JsonProperty("tradeType") + private String tradeType; + + /** The currency of the fee */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** Fee Rate of taker */ + @JsonProperty("takerFeeRate") + private String takerFeeRate; + + /** Fee Rate of maker */ + @JsonProperty("makerFeeRate") + private String makerFeeRate; + + /** order creation time */ + @JsonProperty("createdAt") + private Long createdAt; + + /** Stop order type, include loss and entry */ + @JsonProperty("stop") + private String stop; + + /** The trigger time of the stop order */ + @JsonProperty("stopTriggerTime") + private Long stopTriggerTime; + + /** stop price */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** Time of place a stop order, accurate to nanoseconds */ + @JsonProperty("orderTime") + private Long orderTime; + + public enum TypeEnum { + /** Limit order */ + LIMIT("limit"), + /** Market order */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByClientOidReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByClientOidReq.java new file mode 100644 index 00000000..2f47600f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByClientOidReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetStopOrderByClientOidReq implements Request { + /** The client order id */ + @JsonProperty("clientOid") + private String clientOid; + + /** symbol name */ + @JsonProperty("symbol") + private String symbol; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByClientOidResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByClientOidResp.java new file mode 100644 index 00000000..d345510f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByClientOidResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetStopOrderByClientOidResp + implements Response> { + /** the return code */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetStopOrderByClientOidResp fromJson(List data) { + // original response + GetStopOrderByClientOidResp obj = new GetStopOrderByClientOidResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByOrderIdReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByOrderIdReq.java new file mode 100644 index 00000000..2c13955f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByOrderIdReq.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetStopOrderByOrderIdReq implements Request { + /** The order id */ + @JsonIgnore + @PathVar("orderId") + @JsonProperty("orderId") + private String orderId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByOrderIdResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByOrderIdResp.java new file mode 100644 index 00000000..87a48561 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrderByOrderIdResp.java @@ -0,0 +1,189 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetStopOrderByOrderIdResp + implements Response> { + /** Order ID, the ID of an order. */ + @JsonProperty("id") + private String id; + + /** Symbol name */ + @JsonProperty("symbol") + private String symbol; + + /** User ID */ + @JsonProperty("userId") + private String userId; + + /** Order status, include NEW, TRIGGERED */ + @JsonProperty("status") + private String status; + + /** Order type */ + @JsonProperty("type") + private TypeEnum type; + + /** transaction direction,include buy and sell */ + @JsonProperty("side") + private String side; + + /** order price */ + @JsonProperty("price") + private String price; + + /** order quantity */ + @JsonProperty("size") + private String size; + + /** order funds */ + @JsonProperty("funds") + private String funds; + + /** */ + @JsonProperty("stp") + private String stp; + + /** time InForce,include GTC,GTT,IOC,FOK */ + @JsonProperty("timeInForce") + private String timeInForce; + + /** cancel orders after n seconds,requires timeInForce to be GTT */ + @JsonProperty("cancelAfter") + private Long cancelAfter; + + /** postOnly */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** hidden order */ + @JsonProperty("hidden") + private Boolean hidden; + + /** Iceberg order */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** displayed quantity for iceberg order */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** order source */ + @JsonProperty("channel") + private String channel; + + /** user-entered order unique mark */ + @JsonProperty("clientOid") + private String clientOid; + + /** Remarks at stop order creation */ + @JsonProperty("remark") + private String remark; + + /** tag order source */ + @JsonProperty("tags") + private String tags; + + /** domainId, e.g: kucoin */ + @JsonProperty("domainId") + private String domainId; + + /** trade source: USER(Order by user), MARGIN_SYSTEM(Order by margin system) */ + @JsonProperty("tradeSource") + private String tradeSource; + + /** + * The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated + * Margin). + */ + @JsonProperty("tradeType") + private String tradeType; + + /** The currency of the fee */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** Fee Rate of taker */ + @JsonProperty("takerFeeRate") + private String takerFeeRate; + + /** Fee Rate of maker */ + @JsonProperty("makerFeeRate") + private String makerFeeRate; + + /** order creation time */ + @JsonProperty("createdAt") + private Long createdAt; + + /** Stop order type, include loss and entry */ + @JsonProperty("stop") + private String stop; + + /** The trigger time of the stop order */ + @JsonProperty("stopTriggerTime") + private Long stopTriggerTime; + + /** stop price */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** Time of place a stop order, accurate to nanoseconds */ + @JsonProperty("orderTime") + private Long orderTime; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + public enum TypeEnum { + /** Limit order */ + LIMIT("limit"), + /** Market order */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrdersListItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrdersListItems.java new file mode 100644 index 00000000..06e6fd73 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrdersListItems.java @@ -0,0 +1,193 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetStopOrdersListItems { + /** Order ID, the ID of an order. */ + @JsonProperty("id") + private String id; + + /** Symbol name */ + @JsonProperty("symbol") + private String symbol; + + /** User ID */ + @JsonProperty("userId") + private String userId; + + /** Order status, include NEW, TRIGGERED */ + @JsonProperty("status") + private String status; + + /** Order type */ + @JsonProperty("type") + private TypeEnum type; + + /** transaction direction,include buy and sell */ + @JsonProperty("side") + private String side; + + /** order price */ + @JsonProperty("price") + private String price; + + /** order quantity */ + @JsonProperty("size") + private String size; + + /** order funds */ + @JsonProperty("funds") + private String funds; + + /** */ + @JsonProperty("stp") + private String stp; + + /** time InForce,include GTC,GTT,IOC,FOK */ + @JsonProperty("timeInForce") + private String timeInForce; + + /** cancel orders after n seconds,requires timeInForce to be GTT */ + @JsonProperty("cancelAfter") + private Integer cancelAfter; + + /** postOnly */ + @JsonProperty("postOnly") + private Boolean postOnly; + + /** hidden order */ + @JsonProperty("hidden") + private Boolean hidden; + + /** Iceberg order */ + @JsonProperty("iceberg") + private Boolean iceberg; + + /** displayed quantity for iceberg order */ + @JsonProperty("visibleSize") + private String visibleSize; + + /** order source */ + @JsonProperty("channel") + private String channel; + + /** user-entered order unique mark */ + @JsonProperty("clientOid") + private String clientOid; + + /** Remarks at stop order creation */ + @JsonProperty("remark") + private String remark; + + /** tag order source */ + @JsonProperty("tags") + private String tags; + + /** Time of place a stop order, accurate to nanoseconds */ + @JsonProperty("orderTime") + private Long orderTime; + + /** domainId, e.g: kucoin */ + @JsonProperty("domainId") + private String domainId; + + /** trade source: USER(Order by user), MARGIN_SYSTEM(Order by margin system) */ + @JsonProperty("tradeSource") + private String tradeSource; + + /** + * The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated + * Margin). + */ + @JsonProperty("tradeType") + private String tradeType; + + /** The currency of the fee */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** Fee Rate of taker */ + @JsonProperty("takerFeeRate") + private String takerFeeRate; + + /** Fee Rate of maker */ + @JsonProperty("makerFeeRate") + private String makerFeeRate; + + /** order creation time */ + @JsonProperty("createdAt") + private Long createdAt; + + /** Stop order type, include loss and entry */ + @JsonProperty("stop") + private String stop; + + /** The trigger time of the stop order */ + @JsonProperty("stopTriggerTime") + private Long stopTriggerTime; + + /** stop price */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** */ + @JsonProperty("relatedNo") + private String relatedNo; + + /** */ + @JsonProperty("limitPrice") + private String limitPrice; + + /** */ + @JsonProperty("pop") + private String pop; + + /** */ + @JsonProperty("activateCondition") + private String activateCondition; + + public enum TypeEnum { + /** Limit order */ + LIMIT("limit"), + /** Market order */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrdersListReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrdersListReq.java new file mode 100644 index 00000000..b871a2c7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrdersListReq.java @@ -0,0 +1,98 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetStopOrdersListReq implements Request { + /** Only list orders for a specific symbol */ + @JsonProperty("symbol") + private String symbol; + + /** buy or sell */ + @JsonProperty("side") + private String side; + + /** limit, market */ + @JsonProperty("type") + private TypeEnum type; + + /** + * The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated + * Margin). Default is TRADE + */ + @JsonProperty("tradeType") + private String tradeType; + + /** Start time (milisecond) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milisecond) */ + @JsonProperty("endAt") + private Long endAt; + + /** Current page */ + @JsonProperty("currentPage") + @Builder.Default + private Integer currentPage = 1; + + /** Comma seperated order ID list */ + @JsonProperty("orderIds") + private String orderIds; + + /** Page size */ + @JsonProperty("pageSize") + @Builder.Default + private Integer pageSize = 50; + + /** Order type: stop: stop loss order, oco: oco order */ + @JsonProperty("stop") + private String stop; + + public enum TypeEnum { + /** limit order */ + LIMIT("limit"), + /** market order */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrdersListResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrdersListResp.java new file mode 100644 index 00000000..569cde47 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetStopOrdersListResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetStopOrdersListResp + implements Response> { + /** current page id */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** the stop order count */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** total page count of the list */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** the list of stop orders */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetSymbolsWithOpenOrderResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetSymbolsWithOpenOrderResp.java new file mode 100644 index 00000000..9b2be4e4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetSymbolsWithOpenOrderResp.java @@ -0,0 +1,33 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetSymbolsWithOpenOrderResp + implements Response> { + /** The symbol that has active orders */ + @JsonProperty("symbols") + private List symbols = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryItems.java new file mode 100644 index 00000000..20835bb6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryItems.java @@ -0,0 +1,199 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryItems { + /** Id of transaction detail */ + @JsonProperty("id") + private Long id; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Trade Id, symbol latitude increment */ + @JsonProperty("tradeId") + private Long tradeId; + + /** The unique order id generated by the trading system */ + @JsonProperty("orderId") + private String orderId; + + /** Counterparty order Id */ + @JsonProperty("counterOrderId") + private String counterOrderId; + + /** Buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** Liquidity type: taker or maker */ + @JsonProperty("liquidity") + private LiquidityEnum liquidity; + + /** */ + @JsonProperty("forceTaker") + private Boolean forceTaker; + + /** Order price */ + @JsonProperty("price") + private String price; + + /** Order size */ + @JsonProperty("size") + private String size; + + /** Order Funds */ + @JsonProperty("funds") + private String funds; + + /** [Handling fees](https://www.kucoin.com/docs-new/api-5327739) */ + @JsonProperty("fee") + private String fee; + + /** Fee rate */ + @JsonProperty("feeRate") + private String feeRate; + + /** currency used to calculate trading fee */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** + * Take Profit and Stop Loss type, currently HFT does not support the Take Profit and Stop Loss + * type, so it is empty + */ + @JsonProperty("stop") + private String stop; + + /** Trade type, redundancy param */ + @JsonProperty("tradeType") + private String tradeType; + + /** Tax Rate, Users in some regions need query this field */ + @JsonProperty("taxRate") + private String taxRate; + + /** Users in some regions need query this field */ + @JsonProperty("tax") + private String tax; + + /** Specify if the order is an 'limit' order or 'market' order. */ + @JsonProperty("type") + private TypeEnum type; + + /** */ + @JsonProperty("createdAt") + private Long createdAt; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum LiquidityEnum { + /** */ + TAKER("taker"), + /** */ + MAKER("maker"); + + private final String value; + + LiquidityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LiquidityEnum fromValue(String value) { + for (LiquidityEnum b : LiquidityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryOldItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryOldItems.java new file mode 100644 index 00000000..f6e50be0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryOldItems.java @@ -0,0 +1,86 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryOldItems { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("tradeId") + private String tradeId; + + /** The unique order id generated by the trading system */ + @JsonProperty("orderId") + private String orderId; + + /** Counterparty order ID */ + @JsonProperty("counterOrderId") + private String counterOrderId; + + /** Buy or sell */ + @JsonProperty("side") + private String side; + + /** Liquidity type: taker or maker */ + @JsonProperty("liquidity") + private String liquidity; + + /** */ + @JsonProperty("forceTaker") + private Boolean forceTaker; + + /** Order Price */ + @JsonProperty("price") + private String price; + + /** Order Size */ + @JsonProperty("size") + private String size; + + /** Order Funds */ + @JsonProperty("funds") + private String funds; + + /** [Handling fees](https://www.kucoin.com/docs-new/api-5327739) */ + @JsonProperty("fee") + private String fee; + + /** Fee rate */ + @JsonProperty("feeRate") + private String feeRate; + + /** Currency used to calculate trading fee */ + @JsonProperty("feeCurrency") + private String feeCurrency; + + /** + * Take Profit and Stop Loss type, currently HFT does not support the Take Profit and Stop Loss + * type, so it is empty + */ + @JsonProperty("stop") + private String stop; + + /** Trade type, redundancy param */ + @JsonProperty("tradeType") + private String tradeType; + + /** Specify if the order is a 'limit' order or 'market' order. */ + @JsonProperty("type") + private String type; + + /** */ + @JsonProperty("createdAt") + private Long createdAt; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryOldReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryOldReq.java new file mode 100644 index 00000000..c06937d5 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryOldReq.java @@ -0,0 +1,169 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryOldReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * The unique order ID generated by the trading system. (If orderId is specified, please ignore + * the other query parameters.) + */ + @JsonProperty("orderId") + private String orderId; + + /** Specify if the order is to 'buy' or 'sell'. */ + @JsonProperty("side") + private SideEnum side; + + /** limit, market, limit_stop or market_stop */ + @JsonProperty("type") + private TypeEnum type; + + /** + * The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin + * Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. + */ + @JsonProperty("tradeType") + @Builder.Default + private TradeTypeEnum tradeType = TradeTypeEnum.TRADE; + + /** Start time (milliseconds) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milliseconds) */ + @JsonProperty("endAt") + private Long endAt; + + /** Current request page. */ + @JsonProperty("currentPage") + @Builder.Default + private Integer currentPage = 1; + + /** Number of results per request. Minimum is 10, maximum is 500. */ + @JsonProperty("pageSize") + private Integer pageSize; + + public enum SideEnum { + /** buy */ + BUY("buy"), + /** sell */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** limit */ + LIMIT("limit"), + /** market */ + MARKET("market"), + /** limit_stop */ + LIMITSTOP("limit_stop"), + /** market_stop */ + MARKETSTOP("market_stop"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TradeTypeEnum { + /** Spot Trading */ + TRADE("TRADE"), + /** Cross Margin Trading */ + MARGIN_TRADE("MARGIN_TRADE"), + /** Isolated Margin Trading */ + MARGIN_ISOLATED_TRADE("MARGIN_ISOLATED_TRADE"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryOldResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryOldResp.java new file mode 100644 index 00000000..e2f75624 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryOldResp.java @@ -0,0 +1,49 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryOldResp + implements Response> { + /** */ + @JsonProperty("currentPage") + private Integer currentPage; + + /** */ + @JsonProperty("pageSize") + private Integer pageSize; + + /** */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** */ + @JsonProperty("totalPage") + private Integer totalPage; + + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryReq.java new file mode 100644 index 00000000..3e1d9d0b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryReq.java @@ -0,0 +1,127 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryReq implements Request { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * The unique order id generated by the trading system (If orderId is specified,please ignore the + * other query parameters) + */ + @JsonProperty("orderId") + private String orderId; + + /** specify if the order is to 'buy' or 'sell' */ + @JsonProperty("side") + private SideEnum side; + + /** specify if the order is an 'limit' order or 'market' order. */ + @JsonProperty("type") + private TypeEnum type; + + /** + * 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. + */ + @JsonProperty("lastId") + private Long lastId; + + /** Default20,Max100 */ + @JsonProperty("limit") + @Builder.Default + private Integer limit = 20; + + /** Start time (milisecond) */ + @JsonProperty("startAt") + private Long startAt; + + /** End time (milisecond) */ + @JsonProperty("endAt") + private Long endAt; + + public enum SideEnum { + /** */ + BUY("buy"), + /** */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** */ + LIMIT("limit"), + /** */ + MARKET("market"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryResp.java new file mode 100644 index 00000000..a8ce66bd --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetTradeHistoryResp.java @@ -0,0 +1,42 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTradeHistoryResp + implements Response> { + /** */ + @JsonProperty("items") + private List items = new ArrayList<>(); + + /** + * 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. + */ + @JsonProperty("lastId") + private Long lastId; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/ModifyOrderReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/ModifyOrderReq.java new file mode 100644 index 00000000..1be48d43 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/ModifyOrderReq.java @@ -0,0 +1,38 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifyOrderReq implements Request { + /** One must be chose out of the old client order ID, orderId and clientOid */ + @JsonProperty("clientOid") + private String clientOid; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** One must be chosen out of the old order id, orderId and clientOid */ + @JsonProperty("orderId") + private String orderId; + + /** One must be chosen out of the modified price of the new order, newPrice and newSize */ + @JsonProperty("newPrice") + private String newPrice; + + /** One must be chosen out of the modified size of the new order, newPrice and newSize */ + @JsonProperty("newSize") + private String newSize; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/ModifyOrderResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/ModifyOrderResp.java new file mode 100644 index 00000000..e6f9da95 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/ModifyOrderResp.java @@ -0,0 +1,34 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModifyOrderResp implements Response> { + /** The new order ID */ + @JsonProperty("newOrderId") + private String newOrderId; + + /** The original client order ID */ + @JsonProperty("clientOid") + private String clientOid; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.java new file mode 100644 index 00000000..91400e48 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.java @@ -0,0 +1,582 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +public interface OrderApi { + /** + * Add Order 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + */ + AddOrderResp addOrder(AddOrderReq req); + + /** + * Add Order Sync 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + */ + AddOrderSyncResp addOrderSync(AddOrderSyncReq req); + + /** + * Add Order Test 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + */ + AddOrderTestResp addOrderTest(AddOrderTestReq req); + + /** + * Batch Add Orders 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 docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ + */ + BatchAddOrdersResp batchAddOrders(BatchAddOrdersReq req); + + /** + * Batch Add Orders Sync 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 docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ + */ + BatchAddOrdersSyncResp batchAddOrdersSync(BatchAddOrdersSyncReq req); + + /** + * Cancel Order By OrderId 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + */ + CancelOrderByOrderIdResp cancelOrderByOrderId(CancelOrderByOrderIdReq req); + + /** + * Cancel Order By OrderId Sync This endpoint can be used to cancel a spot order by orderId. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + */ + CancelOrderByOrderIdSyncResp cancelOrderByOrderIdSync(CancelOrderByOrderIdSyncReq req); + + /** + * Cancel Order By ClientOid 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + */ + CancelOrderByClientOidResp cancelOrderByClientOid(CancelOrderByClientOidReq req); + + /** + * Cancel Order By ClientOid Sync This endpoint can be used to cancel a spot order by orderId. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + */ + CancelOrderByClientOidSyncResp cancelOrderByClientOidSync(CancelOrderByClientOidSyncReq req); + + /** + * Cancel Partial Order 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 docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + CancelPartialOrderResp cancelPartialOrder(CancelPartialOrderReq req); + + /** + * Cancel All Orders By Symbol 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + CancelAllOrdersBySymbolResp cancelAllOrdersBySymbol(CancelAllOrdersBySymbolReq req); + + /** + * Cancel All Orders 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 30 | +-----------------------+---------+ + */ + CancelAllOrdersResp cancelAllOrders(); + + /** + * Modify Order 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. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ + */ + ModifyOrderResp modifyOrder(ModifyOrderReq req); + + /** + * Get Order By OrderId 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetOrderByOrderIdResp getOrderByOrderId(GetOrderByOrderIdReq req); + + /** + * Get Order By ClientOid 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetOrderByClientOidResp getOrderByClientOid(GetOrderByClientOidReq req); + + /** + * Get Symbols With Open Order This interface can query all spot symbol that has active orders docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetSymbolsWithOpenOrderResp getSymbolsWithOpenOrder(); + + /** + * Get Open Orders 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetOpenOrdersResp getOpenOrders(GetOpenOrdersReq req); + + /** + * Get Open Orders By Page 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetOpenOrdersByPageResp getOpenOrdersByPage(GetOpenOrdersByPageReq req); + + /** + * Get Closed Orders 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetClosedOrdersResp getClosedOrders(GetClosedOrdersReq req); + + /** + * Get Trade History 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. docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + GetTradeHistoryResp getTradeHistory(GetTradeHistoryReq req); + + /** + * Get DCP Get Disconnection Protect (Deadman Switch). Through this interface, you can query the + * settings of automatic order cancellation. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + GetDCPResp getDCP(); + + /** + * Set DCP 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + */ + SetDCPResp setDCP(SetDCPReq req); + + /** + * Add Stop Order 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. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ + */ + AddStopOrderResp addStopOrder(AddStopOrderReq req); + + /** + * Cancel Stop Order By ClientOid This endpoint can be used to cancel a spot stop order by + * clientOid. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ + */ + CancelStopOrderByClientOidResp cancelStopOrderByClientOid(CancelStopOrderByClientOidReq req); + + /** + * Cancel Stop Order By OrderId This endpoint can be used to cancel a spot stop order by orderId. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ + */ + CancelStopOrderByOrderIdResp cancelStopOrderByOrderId(CancelStopOrderByOrderIdReq req); + + /** + * Batch Cancel Stop Orders This endpoint can be used to cancel a spot stop orders by batch. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + */ + BatchCancelStopOrderResp batchCancelStopOrder(BatchCancelStopOrderReq req); + + /** + * Get Stop Orders List This interface is to obtain all Spot active stop order lists docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 8 | +-----------------------+---------+ + */ + GetStopOrdersListResp getStopOrdersList(GetStopOrdersListReq req); + + /** + * Get Stop Order By OrderId This interface is to obtain Spot stop order details by orderId docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + */ + GetStopOrderByOrderIdResp getStopOrderByOrderId(GetStopOrderByOrderIdReq req); + + /** + * Get Stop Order By ClientOid This interface is to obtain Spot stop order details by orderId docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + */ + GetStopOrderByClientOidResp getStopOrderByClientOid(GetStopOrderByClientOidReq req); + + /** + * Add OCO Order Place OCO order to the Spot trading system + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + AddOcoOrderResp addOcoOrder(AddOcoOrderReq req); + + /** + * Cancel OCO Order By OrderId 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. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ + */ + CancelOcoOrderByOrderIdResp cancelOcoOrderByOrderId(CancelOcoOrderByOrderIdReq req); + + /** + * Cancel OCO Order By ClientOid 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. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ + */ + CancelOcoOrderByClientOidResp cancelOcoOrderByClientOid(CancelOcoOrderByClientOidReq req); + + /** + * Batch Cancel OCO Order 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. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ + */ + BatchCancelOcoOrdersResp batchCancelOcoOrders(BatchCancelOcoOrdersReq req); + + /** + * Get OCO Order By OrderId Request via this interface an OCO order information via the order ID. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + GetOcoOrderByOrderIdResp getOcoOrderByOrderId(GetOcoOrderByOrderIdReq req); + + /** + * Get OCO Order By ClientOid Request via this interface to get a oco order information via the + * client order ID. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + GetOcoOrderByClientOidResp getOcoOrderByClientOid(GetOcoOrderByClientOidReq req); + + /** + * Get OCO Order Detail By OrderId Request via this interface to get a oco order detail via the + * order ID. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + GetOcoOrderDetailByOrderIdResp getOcoOrderDetailByOrderId(GetOcoOrderDetailByOrderIdReq req); + + /** + * Get OCO Order List 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. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + GetOcoOrderListResp getOcoOrderList(GetOcoOrderListReq req); + + /** + * Add Order - Old 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. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + AddOrderOldResp addOrderOld(AddOrderOldReq req); + + /** + * Add Order Test - Old 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. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + AddOrderTestOldResp addOrderTestOld(AddOrderTestOldReq req); + + /** + * Batch Add Orders - Old Request via this endpoint to place 5 orders at the same time. The order + * type must be a limit order of the same symbol. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ + */ + BatchAddOrdersOldResp batchAddOrdersOld(BatchAddOrdersOldReq req); + + /** + * Cancel Order By OrderId - Old 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. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ + */ + CancelOrderByOrderIdOldResp cancelOrderByOrderIdOld(CancelOrderByOrderIdOldReq req); + + /** + * Cancel Order By ClientOid - Old 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + */ + CancelOrderByClientOidOldResp cancelOrderByClientOidOld(CancelOrderByClientOidOldReq req); + + /** + * Batch Cancel Order - Old Request via this endpoint to cancel all open orders. The response is a + * list of ids of the canceled orders. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+---------+ + */ + BatchCancelOrderOldResp batchCancelOrderOld(BatchCancelOrderOldReq req); + + /** + * Get Orders List - Old Request your current order list via this endpoint. The return value is + * the data after Pagination, sorted in descending order according to time. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + GetOrdersListOldResp getOrdersListOld(GetOrdersListOldReq req); + + /** + * Get Recent Orders List - Old Request your current order list via this endpoint. The return + * value is the data after Pagination, sorted in descending order according to time. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ + */ + GetRecentOrdersListOldResp getRecentOrdersListOld(); + + /** + * Get Order By OrderId - Old Request a single order info by order ID via this endpoint. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + GetOrderByOrderIdOldResp getOrderByOrderIdOld(GetOrderByOrderIdOldReq req); + + /** + * Get Order By ClientOid - Old 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. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ + */ + GetOrderByClientOidOldResp getOrderByClientOidOld(GetOrderByClientOidOldReq req); + + /** + * Get Trade History - Old Request recent fills via this endpoint. The return value is the data + * after Pagination, sorted in descending order according to time. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ + */ + GetTradeHistoryOldResp getTradeHistoryOld(GetTradeHistoryOldReq req); + + /** + * Get Recent Trade History - Old 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. + * + * @deprecated docs + * +-----------------------+---------+ | Extra API Info | Value | + * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+---------+ + */ + GetRecentTradeHistoryOldResp getRecentTradeHistoryOld(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.template new file mode 100644 index 00000000..beab3c3c --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.template @@ -0,0 +1,1290 @@ + + /** + * addOrder + * Add Order + * /api/v1/hf/orders + */ + public void testAddOrder() { + AddOrderReq.AddOrderReqBuilder builder = AddOrderReq.builder(); + builder.clientOid(?).side(?).symbol(?).type(?).remark(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).tags(?).cancelAfter(?).funds(?).allowMaxTimeWindow(?).clientTimestamp(?); + AddOrderReq req = builder.build(); + AddOrderResp resp = this.api.addOrder(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->clientOid); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addOrderSync + * Add Order Sync + * /api/v1/hf/orders/sync + */ + public void testAddOrderSync() { + AddOrderSyncReq.AddOrderSyncReqBuilder builder = AddOrderSyncReq.builder(); + builder.clientOid(?).side(?).symbol(?).type(?).remark(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).tags(?).cancelAfter(?).funds(?).allowMaxTimeWindow(?).clientTimestamp(?); + AddOrderSyncReq req = builder.build(); + AddOrderSyncResp resp = this.api.addOrderSync(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->clientOid); + self::assertNotNull($resp->orderTime); + self::assertNotNull($resp->originSize); + self::assertNotNull($resp->dealSize); + self::assertNotNull($resp->remainSize); + self::assertNotNull($resp->canceledSize); + self::assertNotNull($resp->status); + self::assertNotNull($resp->matchTime); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addOrderTest + * Add Order Test + * /api/v1/hf/orders/test + */ + public void testAddOrderTest() { + AddOrderTestReq.AddOrderTestReqBuilder builder = AddOrderTestReq.builder(); + builder.clientOid(?).side(?).symbol(?).type(?).remark(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).tags(?).cancelAfter(?).funds(?).allowMaxTimeWindow(?).clientTimestamp(?); + AddOrderTestReq req = builder.build(); + AddOrderTestResp resp = this.api.addOrderTest(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->clientOid); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * batchAddOrders + * Batch Add Orders + * /api/v1/hf/orders/multi + */ + public void testBatchAddOrders() { + BatchAddOrdersReq.BatchAddOrdersReqBuilder builder = BatchAddOrdersReq.builder(); + builder.orderList(?); + BatchAddOrdersReq req = builder.build(); + BatchAddOrdersResp resp = this.api.batchAddOrders(req); + foreach($resp->data as $item) { + self::assertNotNull($item->orderId); + self::assertNotNull($item->clientOid); + self::assertNotNull($item->success); + self::assertNotNull($item->failMsg); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * batchAddOrdersSync + * Batch Add Orders Sync + * /api/v1/hf/orders/multi/sync + */ + public void testBatchAddOrdersSync() { + BatchAddOrdersSyncReq.BatchAddOrdersSyncReqBuilder builder = BatchAddOrdersSyncReq.builder(); + builder.orderList(?); + BatchAddOrdersSyncReq req = builder.build(); + BatchAddOrdersSyncResp resp = this.api.batchAddOrdersSync(req); + foreach($resp->data as $item) { + self::assertNotNull($item->orderId); + self::assertNotNull($item->clientOid); + self::assertNotNull($item->orderTime); + self::assertNotNull($item->originSize); + self::assertNotNull($item->dealSize); + self::assertNotNull($item->remainSize); + self::assertNotNull($item->canceledSize); + self::assertNotNull($item->status); + self::assertNotNull($item->matchTime); + self::assertNotNull($item->success); + self::assertNotNull($item->failMsg); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelOrderByOrderId + * Cancel Order By OrderId + * /api/v1/hf/orders/{orderId} + */ + public void testCancelOrderByOrderId() { + CancelOrderByOrderIdReq.CancelOrderByOrderIdReqBuilder builder = CancelOrderByOrderIdReq.builder(); + builder.orderId(?).symbol(?); + CancelOrderByOrderIdReq req = builder.build(); + CancelOrderByOrderIdResp resp = this.api.cancelOrderByOrderId(req); + self::assertNotNull($resp->orderId); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelOrderByOrderIdSync + * Cancel Order By OrderId Sync + * /api/v1/hf/orders/sync/{orderId} + */ + public void testCancelOrderByOrderIdSync() { + CancelOrderByOrderIdSyncReq.CancelOrderByOrderIdSyncReqBuilder builder = CancelOrderByOrderIdSyncReq.builder(); + builder.symbol(?).orderId(?); + CancelOrderByOrderIdSyncReq req = builder.build(); + CancelOrderByOrderIdSyncResp resp = this.api.cancelOrderByOrderIdSync(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->originSize); + self::assertNotNull($resp->dealSize); + self::assertNotNull($resp->remainSize); + self::assertNotNull($resp->canceledSize); + self::assertNotNull($resp->status); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelOrderByClientOid + * Cancel Order By ClientOid + * /api/v1/hf/orders/client-order/{clientOid} + */ + public void testCancelOrderByClientOid() { + CancelOrderByClientOidReq.CancelOrderByClientOidReqBuilder builder = CancelOrderByClientOidReq.builder(); + builder.clientOid(?).symbol(?); + CancelOrderByClientOidReq req = builder.build(); + CancelOrderByClientOidResp resp = this.api.cancelOrderByClientOid(req); + self::assertNotNull($resp->clientOid); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelOrderByClientOidSync + * Cancel Order By ClientOid Sync + * /api/v1/hf/orders/sync/client-order/{clientOid} + */ + public void testCancelOrderByClientOidSync() { + CancelOrderByClientOidSyncReq.CancelOrderByClientOidSyncReqBuilder builder = CancelOrderByClientOidSyncReq.builder(); + builder.symbol(?).clientOid(?); + CancelOrderByClientOidSyncReq req = builder.build(); + CancelOrderByClientOidSyncResp resp = this.api.cancelOrderByClientOidSync(req); + self::assertNotNull($resp->clientOid); + self::assertNotNull($resp->originSize); + self::assertNotNull($resp->dealSize); + self::assertNotNull($resp->remainSize); + self::assertNotNull($resp->canceledSize); + self::assertNotNull($resp->status); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelPartialOrder + * Cancel Partial Order + * /api/v1/hf/orders/cancel/{orderId} + */ + public void testCancelPartialOrder() { + CancelPartialOrderReq.CancelPartialOrderReqBuilder builder = CancelPartialOrderReq.builder(); + builder.orderId(?).symbol(?).cancelSize(?); + CancelPartialOrderReq req = builder.build(); + CancelPartialOrderResp resp = this.api.cancelPartialOrder(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->cancelSize); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelAllOrdersBySymbol + * Cancel All Orders By Symbol + * /api/v1/hf/orders + */ + public void testCancelAllOrdersBySymbol() { + CancelAllOrdersBySymbolReq.CancelAllOrdersBySymbolReqBuilder builder = CancelAllOrdersBySymbolReq.builder(); + builder.symbol(?); + CancelAllOrdersBySymbolReq req = builder.build(); + CancelAllOrdersBySymbolResp resp = this.api.cancelAllOrdersBySymbol(req); + self::assertNotNull($resp->data); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelAllOrders + * Cancel All Orders + * /api/v1/hf/orders/cancelAll + */ + public void testCancelAllOrders() { + CancelAllOrdersResp resp = this.api.cancelAllOrders(); + foreach($resp->succeedSymbols as $item) { + } + + foreach($resp->failedSymbols as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->error); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * modifyOrder + * Modify Order + * /api/v1/hf/orders/alter + */ + public void testModifyOrder() { + ModifyOrderReq.ModifyOrderReqBuilder builder = ModifyOrderReq.builder(); + builder.clientOid(?).symbol(?).orderId(?).newPrice(?).newSize(?); + ModifyOrderReq req = builder.build(); + ModifyOrderResp resp = this.api.modifyOrder(req); + self::assertNotNull($resp->newOrderId); + self::assertNotNull($resp->clientOid); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOrderByOrderId + * Get Order By OrderId + * /api/v1/hf/orders/{orderId} + */ + public void testGetOrderByOrderId() { + GetOrderByOrderIdReq.GetOrderByOrderIdReqBuilder builder = GetOrderByOrderIdReq.builder(); + builder.symbol(?).orderId(?); + GetOrderByOrderIdReq req = builder.build(); + GetOrderByOrderIdResp resp = this.api.getOrderByOrderId(req); + self::assertNotNull($resp->id); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->opType); + self::assertNotNull($resp->type); + self::assertNotNull($resp->side); + self::assertNotNull($resp->price); + self::assertNotNull($resp->size); + self::assertNotNull($resp->funds); + self::assertNotNull($resp->dealSize); + self::assertNotNull($resp->dealFunds); + self::assertNotNull($resp->fee); + self::assertNotNull($resp->feeCurrency); + self::assertNotNull($resp->stp); + self::assertNotNull($resp->timeInForce); + self::assertNotNull($resp->postOnly); + self::assertNotNull($resp->hidden); + self::assertNotNull($resp->iceberg); + self::assertNotNull($resp->visibleSize); + self::assertNotNull($resp->cancelAfter); + self::assertNotNull($resp->channel); + self::assertNotNull($resp->clientOid); + self::assertNotNull($resp->remark); + self::assertNotNull($resp->tags); + self::assertNotNull($resp->cancelExist); + self::assertNotNull($resp->createdAt); + self::assertNotNull($resp->lastUpdatedAt); + self::assertNotNull($resp->tradeType); + self::assertNotNull($resp->inOrderBook); + self::assertNotNull($resp->cancelledSize); + self::assertNotNull($resp->cancelledFunds); + self::assertNotNull($resp->remainSize); + self::assertNotNull($resp->remainFunds); + self::assertNotNull($resp->tax); + self::assertNotNull($resp->active); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOrderByClientOid + * Get Order By ClientOid + * /api/v1/hf/orders/client-order/{clientOid} + */ + public void testGetOrderByClientOid() { + GetOrderByClientOidReq.GetOrderByClientOidReqBuilder builder = GetOrderByClientOidReq.builder(); + builder.symbol(?).clientOid(?); + GetOrderByClientOidReq req = builder.build(); + GetOrderByClientOidResp resp = this.api.getOrderByClientOid(req); + self::assertNotNull($resp->id); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->opType); + self::assertNotNull($resp->type); + self::assertNotNull($resp->side); + self::assertNotNull($resp->price); + self::assertNotNull($resp->size); + self::assertNotNull($resp->funds); + self::assertNotNull($resp->dealSize); + self::assertNotNull($resp->dealFunds); + self::assertNotNull($resp->fee); + self::assertNotNull($resp->feeCurrency); + self::assertNotNull($resp->stp); + self::assertNotNull($resp->timeInForce); + self::assertNotNull($resp->postOnly); + self::assertNotNull($resp->hidden); + self::assertNotNull($resp->iceberg); + self::assertNotNull($resp->visibleSize); + self::assertNotNull($resp->cancelAfter); + self::assertNotNull($resp->channel); + self::assertNotNull($resp->clientOid); + self::assertNotNull($resp->remark); + self::assertNotNull($resp->tags); + self::assertNotNull($resp->cancelExist); + self::assertNotNull($resp->createdAt); + self::assertNotNull($resp->lastUpdatedAt); + self::assertNotNull($resp->tradeType); + self::assertNotNull($resp->inOrderBook); + self::assertNotNull($resp->cancelledSize); + self::assertNotNull($resp->cancelledFunds); + self::assertNotNull($resp->remainSize); + self::assertNotNull($resp->remainFunds); + self::assertNotNull($resp->tax); + self::assertNotNull($resp->active); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getSymbolsWithOpenOrder + * Get Symbols With Open Order + * /api/v1/hf/orders/active/symbols + */ + public void testGetSymbolsWithOpenOrder() { + GetSymbolsWithOpenOrderResp resp = this.api.getSymbolsWithOpenOrder(); + foreach($resp->symbols as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOpenOrders + * Get Open Orders + * /api/v1/hf/orders/active + */ + public void testGetOpenOrders() { + GetOpenOrdersReq.GetOpenOrdersReqBuilder builder = GetOpenOrdersReq.builder(); + builder.symbol(?); + GetOpenOrdersReq req = builder.build(); + GetOpenOrdersResp resp = this.api.getOpenOrders(req); + foreach($resp->data as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->symbol); + self::assertNotNull($item->opType); + self::assertNotNull($item->type); + self::assertNotNull($item->side); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->funds); + self::assertNotNull($item->dealSize); + self::assertNotNull($item->dealFunds); + self::assertNotNull($item->fee); + self::assertNotNull($item->feeCurrency); + self::assertNotNull($item->stp); + self::assertNotNull($item->timeInForce); + self::assertNotNull($item->postOnly); + self::assertNotNull($item->hidden); + self::assertNotNull($item->iceberg); + self::assertNotNull($item->visibleSize); + self::assertNotNull($item->cancelAfter); + self::assertNotNull($item->channel); + self::assertNotNull($item->clientOid); + self::assertNotNull($item->remark); + self::assertNotNull($item->tags); + self::assertNotNull($item->cancelExist); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->lastUpdatedAt); + self::assertNotNull($item->tradeType); + self::assertNotNull($item->inOrderBook); + self::assertNotNull($item->cancelledSize); + self::assertNotNull($item->cancelledFunds); + self::assertNotNull($item->remainSize); + self::assertNotNull($item->remainFunds); + self::assertNotNull($item->tax); + self::assertNotNull($item->active); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOpenOrdersByPage + * Get Open Orders By Page + * /api/v1/hf/orders/active/page + */ + public void testGetOpenOrdersByPage() { + GetOpenOrdersByPageReq.GetOpenOrdersByPageReqBuilder builder = GetOpenOrdersByPageReq.builder(); + builder.symbol(?).pageNum(?).pageSize(?); + GetOpenOrdersByPageReq req = builder.build(); + GetOpenOrdersByPageResp resp = this.api.getOpenOrdersByPage(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->symbol); + self::assertNotNull($item->opType); + self::assertNotNull($item->type); + self::assertNotNull($item->side); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->funds); + self::assertNotNull($item->dealSize); + self::assertNotNull($item->dealFunds); + self::assertNotNull($item->fee); + self::assertNotNull($item->feeCurrency); + self::assertNotNull($item->stp); + self::assertNotNull($item->timeInForce); + self::assertNotNull($item->postOnly); + self::assertNotNull($item->hidden); + self::assertNotNull($item->iceberg); + self::assertNotNull($item->visibleSize); + self::assertNotNull($item->cancelAfter); + self::assertNotNull($item->channel); + self::assertNotNull($item->clientOid); + self::assertNotNull($item->remark); + self::assertNotNull($item->tags); + self::assertNotNull($item->cancelExist); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->lastUpdatedAt); + self::assertNotNull($item->tradeType); + self::assertNotNull($item->inOrderBook); + self::assertNotNull($item->cancelledSize); + self::assertNotNull($item->cancelledFunds); + self::assertNotNull($item->remainSize); + self::assertNotNull($item->remainFunds); + self::assertNotNull($item->tax); + self::assertNotNull($item->active); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getClosedOrders + * Get Closed Orders + * /api/v1/hf/orders/done + */ + public void testGetClosedOrders() { + GetClosedOrdersReq.GetClosedOrdersReqBuilder builder = GetClosedOrdersReq.builder(); + builder.symbol(?).side(?).type(?).lastId(?).limit(?).startAt(?).endAt(?); + GetClosedOrdersReq req = builder.build(); + GetClosedOrdersResp resp = this.api.getClosedOrders(req); + self::assertNotNull($resp->lastId); + foreach($resp->items as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->symbol); + self::assertNotNull($item->opType); + self::assertNotNull($item->type); + self::assertNotNull($item->side); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->funds); + self::assertNotNull($item->dealSize); + self::assertNotNull($item->dealFunds); + self::assertNotNull($item->fee); + self::assertNotNull($item->feeCurrency); + self::assertNotNull($item->stp); + self::assertNotNull($item->timeInForce); + self::assertNotNull($item->postOnly); + self::assertNotNull($item->hidden); + self::assertNotNull($item->iceberg); + self::assertNotNull($item->visibleSize); + self::assertNotNull($item->cancelAfter); + self::assertNotNull($item->channel); + self::assertNotNull($item->clientOid); + self::assertNotNull($item->remark); + self::assertNotNull($item->tags); + self::assertNotNull($item->cancelExist); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->lastUpdatedAt); + self::assertNotNull($item->tradeType); + self::assertNotNull($item->inOrderBook); + self::assertNotNull($item->cancelledSize); + self::assertNotNull($item->cancelledFunds); + self::assertNotNull($item->remainSize); + self::assertNotNull($item->remainFunds); + self::assertNotNull($item->tax); + self::assertNotNull($item->active); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getTradeHistory + * Get Trade History + * /api/v1/hf/fills + */ + public void testGetTradeHistory() { + GetTradeHistoryReq.GetTradeHistoryReqBuilder builder = GetTradeHistoryReq.builder(); + builder.symbol(?).orderId(?).side(?).type(?).lastId(?).limit(?).startAt(?).endAt(?); + GetTradeHistoryReq req = builder.build(); + GetTradeHistoryResp resp = this.api.getTradeHistory(req); + foreach($resp->items as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->symbol); + self::assertNotNull($item->tradeId); + self::assertNotNull($item->orderId); + self::assertNotNull($item->counterOrderId); + self::assertNotNull($item->side); + self::assertNotNull($item->liquidity); + self::assertNotNull($item->forceTaker); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->funds); + self::assertNotNull($item->fee); + self::assertNotNull($item->feeRate); + self::assertNotNull($item->feeCurrency); + self::assertNotNull($item->stop); + self::assertNotNull($item->tradeType); + self::assertNotNull($item->taxRate); + self::assertNotNull($item->tax); + self::assertNotNull($item->type); + self::assertNotNull($item->createdAt); + } + + self::assertNotNull($resp->lastId); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getDCP + * Get DCP + * /api/v1/hf/orders/dead-cancel-all/query + */ + public void testGetDCP() { + GetDCPResp resp = this.api.getDCP(); + self::assertNotNull($resp->timeout); + self::assertNotNull($resp->symbols); + self::assertNotNull($resp->currentTime); + self::assertNotNull($resp->triggerTime); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * setDCP + * Set DCP + * /api/v1/hf/orders/dead-cancel-all + */ + public void testSetDCP() { + SetDCPReq.SetDCPReqBuilder builder = SetDCPReq.builder(); + builder.timeout(?).symbols(?); + SetDCPReq req = builder.build(); + SetDCPResp resp = this.api.setDCP(req); + self::assertNotNull($resp->currentTime); + self::assertNotNull($resp->triggerTime); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addStopOrder + * Add Stop Order + * /api/v1/stop-order + */ + public void testAddStopOrder() { + AddStopOrderReq.AddStopOrderReqBuilder builder = AddStopOrderReq.builder(); + builder.clientOid(?).side(?).symbol(?).type(?).remark(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).cancelAfter(?).funds(?).stopPrice(?).tradeType(?); + AddStopOrderReq req = builder.build(); + AddStopOrderResp resp = this.api.addStopOrder(req); + self::assertNotNull($resp->orderId); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelStopOrderByClientOid + * Cancel Stop Order By ClientOid + * /api/v1/stop-order/cancelOrderByClientOid + */ + public void testCancelStopOrderByClientOid() { + CancelStopOrderByClientOidReq.CancelStopOrderByClientOidReqBuilder builder = CancelStopOrderByClientOidReq.builder(); + builder.symbol(?).clientOid(?); + CancelStopOrderByClientOidReq req = builder.build(); + CancelStopOrderByClientOidResp resp = this.api.cancelStopOrderByClientOid(req); + self::assertNotNull($resp->clientOid); + self::assertNotNull($resp->cancelledOrderId); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelStopOrderByOrderId + * Cancel Stop Order By OrderId + * /api/v1/stop-order/{orderId} + */ + public void testCancelStopOrderByOrderId() { + CancelStopOrderByOrderIdReq.CancelStopOrderByOrderIdReqBuilder builder = CancelStopOrderByOrderIdReq.builder(); + builder.orderId(?); + CancelStopOrderByOrderIdReq req = builder.build(); + CancelStopOrderByOrderIdResp resp = this.api.cancelStopOrderByOrderId(req); + foreach($resp->cancelledOrderIds as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * batchCancelStopOrder + * Batch Cancel Stop Orders + * /api/v1/stop-order/cancel + */ + public void testBatchCancelStopOrder() { + BatchCancelStopOrderReq.BatchCancelStopOrderReqBuilder builder = BatchCancelStopOrderReq.builder(); + builder.symbol(?).tradeType(?).orderIds(?); + BatchCancelStopOrderReq req = builder.build(); + BatchCancelStopOrderResp resp = this.api.batchCancelStopOrder(req); + foreach($resp->cancelledOrderIds as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getStopOrdersList + * Get Stop Orders List + * /api/v1/stop-order + */ + public void testGetStopOrdersList() { + GetStopOrdersListReq.GetStopOrdersListReqBuilder builder = GetStopOrdersListReq.builder(); + builder.symbol(?).side(?).type(?).tradeType(?).startAt(?).endAt(?).currentPage(?).orderIds(?).pageSize(?).stop(?); + GetStopOrdersListReq req = builder.build(); + GetStopOrdersListResp resp = this.api.getStopOrdersList(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->symbol); + self::assertNotNull($item->userId); + self::assertNotNull($item->status); + self::assertNotNull($item->type); + self::assertNotNull($item->side); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->funds); + self::assertNotNull($item->stp); + self::assertNotNull($item->timeInForce); + self::assertNotNull($item->cancelAfter); + self::assertNotNull($item->postOnly); + self::assertNotNull($item->hidden); + self::assertNotNull($item->iceberg); + self::assertNotNull($item->visibleSize); + self::assertNotNull($item->channel); + self::assertNotNull($item->clientOid); + self::assertNotNull($item->remark); + self::assertNotNull($item->tags); + self::assertNotNull($item->orderTime); + self::assertNotNull($item->domainId); + self::assertNotNull($item->tradeSource); + self::assertNotNull($item->tradeType); + self::assertNotNull($item->feeCurrency); + self::assertNotNull($item->takerFeeRate); + self::assertNotNull($item->makerFeeRate); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->stop); + self::assertNotNull($item->stopTriggerTime); + self::assertNotNull($item->stopPrice); + self::assertNotNull($item->relatedNo); + self::assertNotNull($item->limitPrice); + self::assertNotNull($item->pop); + self::assertNotNull($item->activateCondition); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getStopOrderByOrderId + * Get Stop Order By OrderId + * /api/v1/stop-order/{orderId} + */ + public void testGetStopOrderByOrderId() { + GetStopOrderByOrderIdReq.GetStopOrderByOrderIdReqBuilder builder = GetStopOrderByOrderIdReq.builder(); + builder.orderId(?); + GetStopOrderByOrderIdReq req = builder.build(); + GetStopOrderByOrderIdResp resp = this.api.getStopOrderByOrderId(req); + self::assertNotNull($resp->id); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->userId); + self::assertNotNull($resp->status); + self::assertNotNull($resp->type); + self::assertNotNull($resp->side); + self::assertNotNull($resp->price); + self::assertNotNull($resp->size); + self::assertNotNull($resp->funds); + self::assertNotNull($resp->stp); + self::assertNotNull($resp->timeInForce); + self::assertNotNull($resp->cancelAfter); + self::assertNotNull($resp->postOnly); + self::assertNotNull($resp->hidden); + self::assertNotNull($resp->iceberg); + self::assertNotNull($resp->visibleSize); + self::assertNotNull($resp->channel); + self::assertNotNull($resp->clientOid); + self::assertNotNull($resp->remark); + self::assertNotNull($resp->tags); + self::assertNotNull($resp->domainId); + self::assertNotNull($resp->tradeSource); + self::assertNotNull($resp->tradeType); + self::assertNotNull($resp->feeCurrency); + self::assertNotNull($resp->takerFeeRate); + self::assertNotNull($resp->makerFeeRate); + self::assertNotNull($resp->createdAt); + self::assertNotNull($resp->stop); + self::assertNotNull($resp->stopTriggerTime); + self::assertNotNull($resp->stopPrice); + self::assertNotNull($resp->orderTime); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getStopOrderByClientOid + * Get Stop Order By ClientOid + * /api/v1/stop-order/queryOrderByClientOid + */ + public void testGetStopOrderByClientOid() { + GetStopOrderByClientOidReq.GetStopOrderByClientOidReqBuilder builder = GetStopOrderByClientOidReq.builder(); + builder.clientOid(?).symbol(?); + GetStopOrderByClientOidReq req = builder.build(); + GetStopOrderByClientOidResp resp = this.api.getStopOrderByClientOid(req); + foreach($resp->data as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->symbol); + self::assertNotNull($item->userId); + self::assertNotNull($item->status); + self::assertNotNull($item->type); + self::assertNotNull($item->side); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->funds); + self::assertNotNull($item->stp); + self::assertNotNull($item->timeInForce); + self::assertNotNull($item->cancelAfter); + self::assertNotNull($item->postOnly); + self::assertNotNull($item->hidden); + self::assertNotNull($item->iceberg); + self::assertNotNull($item->visibleSize); + self::assertNotNull($item->channel); + self::assertNotNull($item->clientOid); + self::assertNotNull($item->remark); + self::assertNotNull($item->tags); + self::assertNotNull($item->domainId); + self::assertNotNull($item->tradeSource); + self::assertNotNull($item->tradeType); + self::assertNotNull($item->feeCurrency); + self::assertNotNull($item->takerFeeRate); + self::assertNotNull($item->makerFeeRate); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->stop); + self::assertNotNull($item->stopTriggerTime); + self::assertNotNull($item->stopPrice); + self::assertNotNull($item->orderTime); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addOcoOrder + * Add OCO Order + * /api/v3/oco/order + */ + public void testAddOcoOrder() { + AddOcoOrderReq.AddOcoOrderReqBuilder builder = AddOcoOrderReq.builder(); + builder.clientOid(?).side(?).symbol(?).remark(?).price(?).size(?).stopPrice(?).limitPrice(?).tradeType(?); + AddOcoOrderReq req = builder.build(); + AddOcoOrderResp resp = this.api.addOcoOrder(req); + self::assertNotNull($resp->orderId); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelOcoOrderByOrderId + * Cancel OCO Order By OrderId + * /api/v3/oco/order/{orderId} + */ + public void testCancelOcoOrderByOrderId() { + CancelOcoOrderByOrderIdReq.CancelOcoOrderByOrderIdReqBuilder builder = CancelOcoOrderByOrderIdReq.builder(); + builder.orderId(?); + CancelOcoOrderByOrderIdReq req = builder.build(); + CancelOcoOrderByOrderIdResp resp = this.api.cancelOcoOrderByOrderId(req); + foreach($resp->cancelledOrderIds as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelOcoOrderByClientOid + * Cancel OCO Order By ClientOid + * /api/v3/oco/client-order/{clientOid} + */ + public void testCancelOcoOrderByClientOid() { + CancelOcoOrderByClientOidReq.CancelOcoOrderByClientOidReqBuilder builder = CancelOcoOrderByClientOidReq.builder(); + builder.clientOid(?); + CancelOcoOrderByClientOidReq req = builder.build(); + CancelOcoOrderByClientOidResp resp = this.api.cancelOcoOrderByClientOid(req); + foreach($resp->cancelledOrderIds as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * batchCancelOcoOrders + * Batch Cancel OCO Order + * /api/v3/oco/orders + */ + public void testBatchCancelOcoOrders() { + BatchCancelOcoOrdersReq.BatchCancelOcoOrdersReqBuilder builder = BatchCancelOcoOrdersReq.builder(); + builder.orderIds(?).symbol(?); + BatchCancelOcoOrdersReq req = builder.build(); + BatchCancelOcoOrdersResp resp = this.api.batchCancelOcoOrders(req); + foreach($resp->cancelledOrderIds as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOcoOrderByOrderId + * Get OCO Order By OrderId + * /api/v3/oco/order/{orderId} + */ + public void testGetOcoOrderByOrderId() { + GetOcoOrderByOrderIdReq.GetOcoOrderByOrderIdReqBuilder builder = GetOcoOrderByOrderIdReq.builder(); + builder.orderId(?); + GetOcoOrderByOrderIdReq req = builder.build(); + GetOcoOrderByOrderIdResp resp = this.api.getOcoOrderByOrderId(req); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->clientOid); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->orderTime); + self::assertNotNull($resp->status); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOcoOrderByClientOid + * Get OCO Order By ClientOid + * /api/v3/oco/client-order/{clientOid} + */ + public void testGetOcoOrderByClientOid() { + GetOcoOrderByClientOidReq.GetOcoOrderByClientOidReqBuilder builder = GetOcoOrderByClientOidReq.builder(); + builder.clientOid(?); + GetOcoOrderByClientOidReq req = builder.build(); + GetOcoOrderByClientOidResp resp = this.api.getOcoOrderByClientOid(req); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->clientOid); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->orderTime); + self::assertNotNull($resp->status); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOcoOrderDetailByOrderId + * Get OCO Order Detail By OrderId + * /api/v3/oco/order/details/{orderId} + */ + public void testGetOcoOrderDetailByOrderId() { + GetOcoOrderDetailByOrderIdReq.GetOcoOrderDetailByOrderIdReqBuilder builder = GetOcoOrderDetailByOrderIdReq.builder(); + builder.orderId(?); + GetOcoOrderDetailByOrderIdReq req = builder.build(); + GetOcoOrderDetailByOrderIdResp resp = this.api.getOcoOrderDetailByOrderId(req); + self::assertNotNull($resp->orderId); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->clientOid); + self::assertNotNull($resp->orderTime); + self::assertNotNull($resp->status); + foreach($resp->orders as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->symbol); + self::assertNotNull($item->side); + self::assertNotNull($item->price); + self::assertNotNull($item->stopPrice); + self::assertNotNull($item->size); + self::assertNotNull($item->status); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOcoOrderList + * Get OCO Order List + * /api/v3/oco/orders + */ + public void testGetOcoOrderList() { + GetOcoOrderListReq.GetOcoOrderListReqBuilder builder = GetOcoOrderListReq.builder(); + builder.symbol(?).startAt(?).endAt(?).orderIds(?).pageSize(?).currentPage(?); + GetOcoOrderListReq req = builder.build(); + GetOcoOrderListResp resp = this.api.getOcoOrderList(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->orderId); + self::assertNotNull($item->symbol); + self::assertNotNull($item->clientOid); + self::assertNotNull($item->orderTime); + self::assertNotNull($item->status); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addOrderOld + * Add Order - Old + * /api/v1/orders + */ + public void testAddOrderOld() { + AddOrderOldReq.AddOrderOldReqBuilder builder = AddOrderOldReq.builder(); + builder.clientOid(?).side(?).symbol(?).type(?).remark(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).cancelAfter(?).funds(?).tradeType(?); + AddOrderOldReq req = builder.build(); + AddOrderOldResp resp = this.api.addOrderOld(req); + self::assertNotNull($resp->orderId); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * addOrderTestOld + * Add Order Test - Old + * /api/v1/orders/test + */ + public void testAddOrderTestOld() { + AddOrderTestOldReq.AddOrderTestOldReqBuilder builder = AddOrderTestOldReq.builder(); + builder.clientOid(?).side(?).symbol(?).type(?).remark(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).cancelAfter(?).funds(?).tradeType(?); + AddOrderTestOldReq req = builder.build(); + AddOrderTestOldResp resp = this.api.addOrderTestOld(req); + self::assertNotNull($resp->orderId); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * batchAddOrdersOld + * Batch Add Orders - Old + * /api/v1/orders/multi + */ + public void testBatchAddOrdersOld() { + BatchAddOrdersOldReq.BatchAddOrdersOldReqBuilder builder = BatchAddOrdersOldReq.builder(); + builder.orderList(?).symbol(?); + BatchAddOrdersOldReq req = builder.build(); + BatchAddOrdersOldResp resp = this.api.batchAddOrdersOld(req); + foreach($resp->data as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->type); + self::assertNotNull($item->side); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->funds); + self::assertNotNull($item->stp); + self::assertNotNull($item->stop); + self::assertNotNull($item->stopPrice); + self::assertNotNull($item->timeInForce); + self::assertNotNull($item->cancelAfter); + self::assertNotNull($item->postOnly); + self::assertNotNull($item->hidden); + self::assertNotNull($item->iceberge); + self::assertNotNull($item->iceberg); + self::assertNotNull($item->visibleSize); + self::assertNotNull($item->channel); + self::assertNotNull($item->id); + self::assertNotNull($item->status); + self::assertNotNull($item->failMsg); + self::assertNotNull($item->clientOid); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelOrderByOrderIdOld + * Cancel Order By OrderId - Old + * /api/v1/orders/{orderId} + */ + public void testCancelOrderByOrderIdOld() { + CancelOrderByOrderIdOldReq.CancelOrderByOrderIdOldReqBuilder builder = CancelOrderByOrderIdOldReq.builder(); + builder.orderId(?); + CancelOrderByOrderIdOldReq req = builder.build(); + CancelOrderByOrderIdOldResp resp = this.api.cancelOrderByOrderIdOld(req); + foreach($resp->cancelledOrderIds as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * cancelOrderByClientOidOld + * Cancel Order By ClientOid - Old + * /api/v1/order/client-order/{clientOid} + */ + public void testCancelOrderByClientOidOld() { + CancelOrderByClientOidOldReq.CancelOrderByClientOidOldReqBuilder builder = CancelOrderByClientOidOldReq.builder(); + builder.clientOid(?); + CancelOrderByClientOidOldReq req = builder.build(); + CancelOrderByClientOidOldResp resp = this.api.cancelOrderByClientOidOld(req); + self::assertNotNull($resp->clientOid); + self::assertNotNull($resp->cancelledOrderId); + foreach($resp->cancelledOcoOrderIds as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * batchCancelOrderOld + * Batch Cancel Order - Old + * /api/v1/orders + */ + public void testBatchCancelOrderOld() { + BatchCancelOrderOldReq.BatchCancelOrderOldReqBuilder builder = BatchCancelOrderOldReq.builder(); + builder.symbol(?).tradeType(?); + BatchCancelOrderOldReq req = builder.build(); + BatchCancelOrderOldResp resp = this.api.batchCancelOrderOld(req); + foreach($resp->cancelledOrderIds as $item) { + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOrdersListOld + * Get Orders List - Old + * /api/v1/orders + */ + public void testGetOrdersListOld() { + GetOrdersListOldReq.GetOrdersListOldReqBuilder builder = GetOrdersListOldReq.builder(); + builder.symbol(?).status(?).side(?).type(?).tradeType(?).startAt(?).endAt(?).currentPage(?).pageSize(?); + GetOrdersListOldReq req = builder.build(); + GetOrdersListOldResp resp = this.api.getOrdersListOld(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->symbol); + self::assertNotNull($item->opType); + self::assertNotNull($item->type); + self::assertNotNull($item->side); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->funds); + self::assertNotNull($item->dealFunds); + self::assertNotNull($item->dealSize); + self::assertNotNull($item->fee); + self::assertNotNull($item->feeCurrency); + self::assertNotNull($item->stp); + self::assertNotNull($item->stop); + self::assertNotNull($item->stopTriggered); + self::assertNotNull($item->stopPrice); + self::assertNotNull($item->timeInForce); + self::assertNotNull($item->postOnly); + self::assertNotNull($item->hidden); + self::assertNotNull($item->iceberg); + self::assertNotNull($item->visibleSize); + self::assertNotNull($item->cancelAfter); + self::assertNotNull($item->channel); + self::assertNotNull($item->clientOid); + self::assertNotNull($item->remark); + self::assertNotNull($item->tags); + self::assertNotNull($item->isActive); + self::assertNotNull($item->cancelExist); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->tradeType); + self::assertNotNull($item->tax); + self::assertNotNull($item->taxRate); + self::assertNotNull($item->taxCurrency); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getRecentOrdersListOld + * Get Recent Orders List - Old + * /api/v1/limit/orders + */ + public void testGetRecentOrdersListOld() { + GetRecentOrdersListOldResp resp = this.api.getRecentOrdersListOld(); + foreach($resp->data as $item) { + self::assertNotNull($item->id); + self::assertNotNull($item->symbol); + self::assertNotNull($item->opType); + self::assertNotNull($item->type); + self::assertNotNull($item->side); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->funds); + self::assertNotNull($item->dealFunds); + self::assertNotNull($item->dealSize); + self::assertNotNull($item->fee); + self::assertNotNull($item->feeCurrency); + self::assertNotNull($item->stp); + self::assertNotNull($item->stop); + self::assertNotNull($item->stopTriggered); + self::assertNotNull($item->stopPrice); + self::assertNotNull($item->timeInForce); + self::assertNotNull($item->postOnly); + self::assertNotNull($item->hidden); + self::assertNotNull($item->iceberg); + self::assertNotNull($item->visibleSize); + self::assertNotNull($item->cancelAfter); + self::assertNotNull($item->channel); + self::assertNotNull($item->clientOid); + self::assertNotNull($item->remark); + self::assertNotNull($item->tags); + self::assertNotNull($item->isActive); + self::assertNotNull($item->cancelExist); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->tradeType); + self::assertNotNull($item->tax); + self::assertNotNull($item->taxRate); + self::assertNotNull($item->taxCurrency); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOrderByOrderIdOld + * Get Order By OrderId - Old + * /api/v1/orders/{orderId} + */ + public void testGetOrderByOrderIdOld() { + GetOrderByOrderIdOldReq.GetOrderByOrderIdOldReqBuilder builder = GetOrderByOrderIdOldReq.builder(); + builder.orderId(?); + GetOrderByOrderIdOldReq req = builder.build(); + GetOrderByOrderIdOldResp resp = this.api.getOrderByOrderIdOld(req); + self::assertNotNull($resp->id); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->opType); + self::assertNotNull($resp->type); + self::assertNotNull($resp->side); + self::assertNotNull($resp->price); + self::assertNotNull($resp->size); + self::assertNotNull($resp->funds); + self::assertNotNull($resp->dealFunds); + self::assertNotNull($resp->dealSize); + self::assertNotNull($resp->fee); + self::assertNotNull($resp->feeCurrency); + self::assertNotNull($resp->stp); + self::assertNotNull($resp->stop); + self::assertNotNull($resp->stopTriggered); + self::assertNotNull($resp->stopPrice); + self::assertNotNull($resp->timeInForce); + self::assertNotNull($resp->postOnly); + self::assertNotNull($resp->hidden); + self::assertNotNull($resp->iceberg); + self::assertNotNull($resp->visibleSize); + self::assertNotNull($resp->cancelAfter); + self::assertNotNull($resp->channel); + self::assertNotNull($resp->clientOid); + self::assertNotNull($resp->remark); + self::assertNotNull($resp->tags); + self::assertNotNull($resp->isActive); + self::assertNotNull($resp->cancelExist); + self::assertNotNull($resp->createdAt); + self::assertNotNull($resp->tradeType); + self::assertNotNull($resp->tax); + self::assertNotNull($resp->taxRate); + self::assertNotNull($resp->taxCurrency); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getOrderByClientOidOld + * Get Order By ClientOid - Old + * /api/v1/order/client-order/{clientOid} + */ + public void testGetOrderByClientOidOld() { + GetOrderByClientOidOldReq.GetOrderByClientOidOldReqBuilder builder = GetOrderByClientOidOldReq.builder(); + builder.clientOid(?); + GetOrderByClientOidOldReq req = builder.build(); + GetOrderByClientOidOldResp resp = this.api.getOrderByClientOidOld(req); + self::assertNotNull($resp->id); + self::assertNotNull($resp->symbol); + self::assertNotNull($resp->opType); + self::assertNotNull($resp->type); + self::assertNotNull($resp->side); + self::assertNotNull($resp->price); + self::assertNotNull($resp->size); + self::assertNotNull($resp->funds); + self::assertNotNull($resp->dealFunds); + self::assertNotNull($resp->dealSize); + self::assertNotNull($resp->fee); + self::assertNotNull($resp->feeCurrency); + self::assertNotNull($resp->stp); + self::assertNotNull($resp->stop); + self::assertNotNull($resp->stopTriggered); + self::assertNotNull($resp->stopPrice); + self::assertNotNull($resp->timeInForce); + self::assertNotNull($resp->postOnly); + self::assertNotNull($resp->hidden); + self::assertNotNull($resp->iceberg); + self::assertNotNull($resp->visibleSize); + self::assertNotNull($resp->cancelAfter); + self::assertNotNull($resp->channel); + self::assertNotNull($resp->clientOid); + self::assertNotNull($resp->remark); + self::assertNotNull($resp->tags); + self::assertNotNull($resp->isActive); + self::assertNotNull($resp->cancelExist); + self::assertNotNull($resp->createdAt); + self::assertNotNull($resp->tradeType); + self::assertNotNull($resp->tax); + self::assertNotNull($resp->taxRate); + self::assertNotNull($resp->taxCurrency); + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getTradeHistoryOld + * Get Trade History - Old + * /api/v1/fills + */ + public void testGetTradeHistoryOld() { + GetTradeHistoryOldReq.GetTradeHistoryOldReqBuilder builder = GetTradeHistoryOldReq.builder(); + builder.symbol(?).orderId(?).side(?).type(?).tradeType(?).startAt(?).endAt(?).currentPage(?).pageSize(?); + GetTradeHistoryOldReq req = builder.build(); + GetTradeHistoryOldResp resp = this.api.getTradeHistoryOld(req); + self::assertNotNull($resp->currentPage); + self::assertNotNull($resp->pageSize); + self::assertNotNull($resp->totalNum); + self::assertNotNull($resp->totalPage); + foreach($resp->items as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->tradeId); + self::assertNotNull($item->orderId); + self::assertNotNull($item->counterOrderId); + self::assertNotNull($item->side); + self::assertNotNull($item->liquidity); + self::assertNotNull($item->forceTaker); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->funds); + self::assertNotNull($item->fee); + self::assertNotNull($item->feeRate); + self::assertNotNull($item->feeCurrency); + self::assertNotNull($item->stop); + self::assertNotNull($item->tradeType); + self::assertNotNull($item->type); + self::assertNotNull($item->createdAt); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getRecentTradeHistoryOld + * Get Recent Trade History - Old + * /api/v1/limit/fills + */ + public void testGetRecentTradeHistoryOld() { + GetRecentTradeHistoryOldResp resp = this.api.getRecentTradeHistoryOld(); + foreach($resp->data as $item) { + self::assertNotNull($item->symbol); + self::assertNotNull($item->tradeId); + self::assertNotNull($item->orderId); + self::assertNotNull($item->counterOrderId); + self::assertNotNull($item->side); + self::assertNotNull($item->liquidity); + self::assertNotNull($item->forceTaker); + self::assertNotNull($item->price); + self::assertNotNull($item->size); + self::assertNotNull($item->funds); + self::assertNotNull($item->fee); + self::assertNotNull($item->feeRate); + self::assertNotNull($item->feeCurrency); + self::assertNotNull($item->stop); + self::assertNotNull($item->tradeType); + self::assertNotNull($item->type); + self::assertNotNull($item->createdAt); + self::assertNotNull($item->tax); + self::assertNotNull($item->taxCurrency); + self::assertNotNull($item->taxRate); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiAutoGeneratedTest.java new file mode 100644 index 00000000..04aa6fa5 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiAutoGeneratedTest.java @@ -0,0 +1,1893 @@ +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class OrderApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** addOrder Request Add Order /api/v1/hf/orders */ + public static void testAddOrderRequest() throws Exception { + String data = + "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493fb\", \"remark\":" + + " \"order remarks\"}"; + AddOrderReq obj = mapper.readValue(data, AddOrderReq.class); + } + + /** addOrder Response Add Order /api/v1/hf/orders */ + public static void testAddOrderResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"orderId\":\"670fd33bf9406e0007ab3945\",\"clientOid\":\"5c52e11203aa677f33e493fb\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addOrderSync Request Add Order Sync /api/v1/hf/orders/sync */ + public static void testAddOrderSyncRequest() throws Exception { + String data = + "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493f\", \"remark\":" + + " \"order remarks\"}"; + AddOrderSyncReq obj = mapper.readValue(data, AddOrderSyncReq.class); + } + + /** addOrderSync Response Add Order Sync /api/v1/hf/orders/sync */ + public static void testAddOrderSyncResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"orderId\":\"67111a7cb7cbdf000703e1f6\",\"clientOid\":\"5c52e11203aa677f33e493f\",\"orderTime\":1729174140586,\"originSize\":\"0.00001\",\"dealSize\":\"0\",\"remainSize\":\"0.00001\",\"canceledSize\":\"0\",\"status\":\"open\",\"matchTime\":1729174140588}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addOrderTest Request Add Order Test /api/v1/hf/orders/test */ + public static void testAddOrderTestRequest() throws Exception { + String data = + "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493f\", \"remark\":" + + " \"order remarks\"}"; + AddOrderTestReq obj = mapper.readValue(data, AddOrderTestReq.class); + } + + /** addOrderTest Response Add Order Test /api/v1/hf/orders/test */ + public static void testAddOrderTestResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"orderId\":\"670fd33bf9406e0007ab3945\",\"clientOid\":\"5c52e11203aa677f33e493fb\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** batchAddOrders Request Batch Add Orders /api/v1/hf/orders/multi */ + public static void testBatchAddOrdersRequest() throws Exception { + String data = + "{\"orderList\": [{\"clientOid\": \"client order id 12\", \"symbol\": \"BTC-USDT\"," + + " \"type\": \"limit\", \"side\": \"buy\", \"price\": \"30000\", \"size\":" + + " \"0.00001\"}, {\"clientOid\": \"client order id 13\", \"symbol\": \"ETH-USDT\"," + + " \"type\": \"limit\", \"side\": \"sell\", \"price\": \"2000\", \"size\":" + + " \"0.00001\"}]}"; + BatchAddOrdersReq obj = mapper.readValue(data, BatchAddOrdersReq.class); + } + + /** batchAddOrders Response Batch Add Orders /api/v1/hf/orders/multi */ + public static void testBatchAddOrdersResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"orderId\": \"6710d8336afcdb0007319c27\",\n" + + " \"clientOid\": \"client order id 12\",\n" + + " \"success\": true\n" + + " },\n" + + " {\n" + + " \"success\": false,\n" + + " \"failMsg\": \"The order funds should more then 0.1 USDT.\"\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** batchAddOrdersSync Request Batch Add Orders Sync /api/v1/hf/orders/multi/sync */ + public static void testBatchAddOrdersSyncRequest() throws Exception { + String data = + "{\"orderList\": [{\"clientOid\": \"client order id 13\", \"symbol\": \"BTC-USDT\"," + + " \"type\": \"limit\", \"side\": \"buy\", \"price\": \"30000\", \"size\":" + + " \"0.00001\"}, {\"clientOid\": \"client order id 14\", \"symbol\": \"ETH-USDT\"," + + " \"type\": \"limit\", \"side\": \"sell\", \"price\": \"2000\", \"size\":" + + " \"0.00001\"}]}"; + BatchAddOrdersSyncReq obj = mapper.readValue(data, BatchAddOrdersSyncReq.class); + } + + /** batchAddOrdersSync Response Batch Add Orders Sync /api/v1/hf/orders/multi/sync */ + public static void testBatchAddOrdersSyncResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":[{\"orderId\":\"6711195e5584bc0007bd5aef\",\"clientOid\":\"client" + + " order id" + + " 13\",\"orderTime\":1729173854299,\"originSize\":\"0.00001\",\"dealSize\":\"0\",\"remainSize\":\"0.00001\",\"canceledSize\":\"0\",\"status\":\"open\",\"matchTime\":1729173854326,\"success\":true},{\"success\":false,\"failMsg\":\"The" + + " order funds should more then 0.1 USDT.\"}]}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** cancelOrderByOrderId Request Cancel Order By OrderId /api/v1/hf/orders/{orderId} */ + public static void testCancelOrderByOrderIdRequest() throws Exception { + String data = "{\"orderId\": \"671124f9365ccb00073debd4\", \"symbol\": \"BTC-USDT\"}"; + CancelOrderByOrderIdReq obj = mapper.readValue(data, CancelOrderByOrderIdReq.class); + } + + /** cancelOrderByOrderId Response Cancel Order By OrderId /api/v1/hf/orders/{orderId} */ + public static void testCancelOrderByOrderIdResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"671124f9365ccb00073debd4\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * cancelOrderByOrderIdSync Request Cancel Order By OrderId Sync /api/v1/hf/orders/sync/{orderId} + */ + public static void testCancelOrderByOrderIdSyncRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\", \"orderId\": \"671128ee365ccb0007534d45\"}"; + CancelOrderByOrderIdSyncReq obj = mapper.readValue(data, CancelOrderByOrderIdSyncReq.class); + } + + /** + * cancelOrderByOrderIdSync Response Cancel Order By OrderId Sync /api/v1/hf/orders/sync/{orderId} + */ + public static void testCancelOrderByOrderIdSyncResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * cancelOrderByClientOid Request Cancel Order By ClientOid + * /api/v1/hf/orders/client-order/{clientOid} + */ + public static void testCancelOrderByClientOidRequest() throws Exception { + String data = "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"symbol\": \"BTC-USDT\"}"; + CancelOrderByClientOidReq obj = mapper.readValue(data, CancelOrderByClientOidReq.class); + } + + /** + * cancelOrderByClientOid Response Cancel Order By ClientOid + * /api/v1/hf/orders/client-order/{clientOid} + */ + public static void testCancelOrderByClientOidResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":{\"clientOid\":\"5c52e11203aa677f33e493fb\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * cancelOrderByClientOidSync Request Cancel Order By ClientOid Sync + * /api/v1/hf/orders/sync/client-order/{clientOid} + */ + public static void testCancelOrderByClientOidSyncRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e493fb\"}"; + CancelOrderByClientOidSyncReq obj = mapper.readValue(data, CancelOrderByClientOidSyncReq.class); + } + + /** + * cancelOrderByClientOidSync Response Cancel Order By ClientOid Sync + * /api/v1/hf/orders/sync/client-order/{clientOid} + */ + public static void testCancelOrderByClientOidSyncResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"originSize\": \"0.00001\",\n" + + " \"dealSize\": \"0\",\n" + + " \"remainSize\": \"0\",\n" + + " \"canceledSize\": \"0.00001\",\n" + + " \"status\": \"done\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue( + data, new TypeReference>() {}); + } + + /** cancelPartialOrder Request Cancel Partial Order /api/v1/hf/orders/cancel/{orderId} */ + public static void testCancelPartialOrderRequest() throws Exception { + String data = + "{\"orderId\": \"6711f73c1ef16c000717bb31\", \"symbol\": \"BTC-USDT\", \"cancelSize\":" + + " \"0.00001\"}"; + CancelPartialOrderReq obj = mapper.readValue(data, CancelPartialOrderReq.class); + } + + /** cancelPartialOrder Response Cancel Partial Order /api/v1/hf/orders/cancel/{orderId} */ + public static void testCancelPartialOrderResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"6711f73c1ef16c000717bb31\",\n" + + " \"cancelSize\": \"0.00001\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** cancelAllOrdersBySymbol Request Cancel All Orders By Symbol /api/v1/hf/orders */ + public static void testCancelAllOrdersBySymbolRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\"}"; + CancelAllOrdersBySymbolReq obj = mapper.readValue(data, CancelAllOrdersBySymbolReq.class); + } + + /** cancelAllOrdersBySymbol Response Cancel All Orders By Symbol /api/v1/hf/orders */ + public static void testCancelAllOrdersBySymbolResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":\"success\"}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** cancelAllOrders Request Cancel All Orders /api/v1/hf/orders/cancelAll */ + public static void testCancelAllOrdersRequest() throws Exception { + // $this->assertTrue(true); + } + + /** cancelAllOrders Response Cancel All Orders /api/v1/hf/orders/cancelAll */ + public static void testCancelAllOrdersResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"succeedSymbols\": [\n" + + " \"ETH-USDT\",\n" + + " \"BTC-USDT\"\n" + + " ],\n" + + " \"failedSymbols\": []\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** modifyOrder Request Modify Order /api/v1/hf/orders/alter */ + public static void testModifyOrderRequest() throws Exception { + String data = + "{\"symbol\": \"BTC-USDT\", \"orderId\": \"670fd33bf9406e0007ab3945\", \"newPrice\":" + + " \"30000\", \"newSize\": \"0.0001\"}"; + ModifyOrderReq obj = mapper.readValue(data, ModifyOrderReq.class); + } + + /** modifyOrder Response Modify Order /api/v1/hf/orders/alter */ + public static void testModifyOrderResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"newOrderId\":\"67112258f9406e0007408827\",\"clientOid\":\"client" + + " order id 12\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getOrderByOrderId Request Get Order By OrderId /api/v1/hf/orders/{orderId} */ + public static void testGetOrderByOrderIdRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\", \"orderId\": \"6717422bd51c29000775ea03\"}"; + GetOrderByOrderIdReq obj = mapper.readValue(data, GetOrderByOrderIdReq.class); + } + + /** getOrderByOrderId Response Get Order By OrderId /api/v1/hf/orders/{orderId} */ + public static void testGetOrderByOrderIdResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"6717422bd51c29000775ea03\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"opType\": \"DEAL\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"70000\",\n" + + " \"size\": \"0.00001\",\n" + + " \"funds\": \"0.7\",\n" + + " \"dealSize\": \"0.00001\",\n" + + " \"dealFunds\": \"0.677176\",\n" + + " \"remainSize\": \"0\",\n" + + " \"remainFunds\": \"0.022824\",\n" + + " \"cancelledSize\": \"0\",\n" + + " \"cancelledFunds\": \"0\",\n" + + " \"fee\": \"0.000677176\",\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" + + " \"remark\": \"order remarks\",\n" + + " \"tags\": null,\n" + + " \"cancelExist\": false,\n" + + " \"tradeType\": \"TRADE\",\n" + + " \"inOrderBook\": false,\n" + + " \"active\": false,\n" + + " \"tax\": \"0\",\n" + + " \"createdAt\": 1729577515444,\n" + + " \"lastUpdatedAt\": 1729577515481\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * getOrderByClientOid Request Get Order By ClientOid /api/v1/hf/orders/client-order/{clientOid} + */ + public static void testGetOrderByClientOidRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e493fb\"}"; + GetOrderByClientOidReq obj = mapper.readValue(data, GetOrderByClientOidReq.class); + } + + /** + * getOrderByClientOid Response Get Order By ClientOid /api/v1/hf/orders/client-order/{clientOid} + */ + public static void testGetOrderByClientOidResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"6717422bd51c29000775ea03\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"opType\": \"DEAL\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"70000\",\n" + + " \"size\": \"0.00001\",\n" + + " \"funds\": \"0.7\",\n" + + " \"dealSize\": \"0.00001\",\n" + + " \"dealFunds\": \"0.677176\",\n" + + " \"remainSize\": \"0\",\n" + + " \"remainFunds\": \"0.022824\",\n" + + " \"cancelledSize\": \"0\",\n" + + " \"cancelledFunds\": \"0\",\n" + + " \"fee\": \"0.000677176\",\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" + + " \"remark\": \"order remarks\",\n" + + " \"tags\": null,\n" + + " \"cancelExist\": false,\n" + + " \"tradeType\": \"TRADE\",\n" + + " \"inOrderBook\": false,\n" + + " \"active\": false,\n" + + " \"tax\": \"0\",\n" + + " \"createdAt\": 1729577515444,\n" + + " \"lastUpdatedAt\": 1729577515481\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * getSymbolsWithOpenOrder Request Get Symbols With Open Order /api/v1/hf/orders/active/symbols + */ + public static void testGetSymbolsWithOpenOrderRequest() throws Exception { + // $this->assertTrue(true); + } + + /** + * getSymbolsWithOpenOrder Response Get Symbols With Open Order /api/v1/hf/orders/active/symbols + */ + public static void testGetSymbolsWithOpenOrderResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbols\": [\n" + + " \"ETH-USDT\",\n" + + " \"BTC-USDT\"\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getOpenOrders Request Get Open Orders /api/v1/hf/orders/active */ + public static void testGetOpenOrdersRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\"}"; + GetOpenOrdersReq obj = mapper.readValue(data, GetOpenOrdersReq.class); + } + + /** getOpenOrders Response Get Open Orders /api/v1/hf/orders/active */ + public static void testGetOpenOrdersResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"67120bbef094e200070976f6\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\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" + + " \"remark\": \"order remarks\",\n" + + " \"tags\": \"order tags\",\n" + + " \"cancelExist\": false,\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" + + " \"createdAt\": 1729235902748,\n" + + " \"lastUpdatedAt\": 1729235909862\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getOpenOrdersByPage Request Get Open Orders By Page /api/v1/hf/orders/active/page */ + public static void testGetOpenOrdersByPageRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\", \"pageNum\": 1, \"pageSize\": 20}"; + GetOpenOrdersByPageReq obj = mapper.readValue(data, GetOpenOrdersByPageReq.class); + } + + /** getOpenOrdersByPage Response Get Open Orders By Page /api/v1/hf/orders/active/page */ + public static void testGetOpenOrdersByPageResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getClosedOrders Request Get Closed Orders /api/v1/hf/orders/done */ + public static void testGetClosedOrdersRequest() throws Exception { + String data = + "{\"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"type\": \"limit\", \"lastId\":" + + " 254062248624417, \"limit\": 20, \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000}"; + GetClosedOrdersReq obj = mapper.readValue(data, GetClosedOrdersReq.class); + } + + /** getClosedOrders Response Get Closed Orders /api/v1/hf/orders/done */ + public static void testGetClosedOrdersResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"lastId\": 19814995255305,\n" + + " \"items\": [\n" + + " {\n" + + " \"id\": \"6717422bd51c29000775ea03\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"opType\": \"DEAL\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"70000\",\n" + + " \"size\": \"0.00001\",\n" + + " \"funds\": \"0.7\",\n" + + " \"dealSize\": \"0.00001\",\n" + + " \"dealFunds\": \"0.677176\",\n" + + " \"remainSize\": \"0\",\n" + + " \"remainFunds\": \"0.022824\",\n" + + " \"cancelledSize\": \"0\",\n" + + " \"cancelledFunds\": \"0\",\n" + + " \"fee\": \"0.000677176\",\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" + + " \"remark\": \"order remarks\",\n" + + " \"tags\": null,\n" + + " \"cancelExist\": false,\n" + + " \"tradeType\": \"TRADE\",\n" + + " \"inOrderBook\": false,\n" + + " \"active\": false,\n" + + " \"tax\": \"0\",\n" + + " \"createdAt\": 1729577515444,\n" + + " \"lastUpdatedAt\": 1729577515481\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getTradeHistory Request Get Trade History /api/v1/hf/fills */ + public static void testGetTradeHistoryRequest() throws Exception { + String data = + "{\"symbol\": \"BTC-USDT\", \"orderId\": \"example_string_default_value\", \"side\":" + + " \"buy\", \"type\": \"limit\", \"lastId\": 254062248624417, \"limit\": 100," + + " \"startAt\": 1728663338000, \"endAt\": 1728692138000}"; + GetTradeHistoryReq obj = mapper.readValue(data, GetTradeHistoryReq.class); + } + + /** getTradeHistory Response Get Trade History /api/v1/hf/fills */ + public static void testGetTradeHistoryResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"items\": [\n" + + " {\n" + + " \"id\": 19814995255305,\n" + + " \"orderId\": \"6717422bd51c29000775ea03\",\n" + + " \"counterOrderId\": \"67174228135f9e000709da8c\",\n" + + " \"tradeId\": 11029373945659392,\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"side\": \"buy\",\n" + + " \"liquidity\": \"taker\",\n" + + " \"type\": \"limit\",\n" + + " \"forceTaker\": false,\n" + + " \"price\": \"67717.6\",\n" + + " \"size\": \"0.00001\",\n" + + " \"funds\": \"0.677176\",\n" + + " \"fee\": \"0.000677176\",\n" + + " \"feeRate\": \"0.001\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"stop\": \"\",\n" + + " \"tradeType\": \"TRADE\",\n" + + " \"taxRate\": \"0\",\n" + + " \"tax\": \"0\",\n" + + " \"createdAt\": 1729577515473\n" + + " }\n" + + " ],\n" + + " \"lastId\": 19814995255305\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getDCP Request Get DCP /api/v1/hf/orders/dead-cancel-all/query */ + public static void testGetDCPRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getDCP Response Get DCP /api/v1/hf/orders/dead-cancel-all/query */ + public static void testGetDCPResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"timeout\": 5,\n" + + " \"symbols\": \"BTC-USDT,ETH-USDT\",\n" + + " \"currentTime\": 1729241305,\n" + + " \"triggerTime\": 1729241308\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** setDCP Request Set DCP /api/v1/hf/orders/dead-cancel-all */ + public static void testSetDCPRequest() throws Exception { + String data = "{\"timeout\": 5, \"symbols\": \"BTC-USDT,ETH-USDT\"}"; + SetDCPReq obj = mapper.readValue(data, SetDCPReq.class); + } + + /** setDCP Response Set DCP /api/v1/hf/orders/dead-cancel-all */ + public static void testSetDCPResponse() throws Exception { + String data = + "{\"code\":\"200000\",\"data\":{\"currentTime\":1729656588,\"triggerTime\":1729656593}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addStopOrder Request Add Stop Order /api/v1/stop-order */ + public static void testAddStopOrderRequest() throws Exception { + String data = + "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," + + " \"stopPrice\": \"50000\", \"size\": \"0.00001\", \"clientOid\":" + + " \"5c52e11203aa677f33e493fb\", \"remark\": \"order remarks\"}"; + AddStopOrderReq obj = mapper.readValue(data, AddStopOrderReq.class); + } + + /** addStopOrder Response Add Stop Order /api/v1/stop-order */ + public static void testAddStopOrderResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"670fd33bf9406e0007ab3945\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * cancelStopOrderByClientOid Request Cancel Stop Order By ClientOid + * /api/v1/stop-order/cancelOrderByClientOid + */ + public static void testCancelStopOrderByClientOidRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"689ff597f4414061aa819cc414836abd\"}"; + CancelStopOrderByClientOidReq obj = mapper.readValue(data, CancelStopOrderByClientOidReq.class); + } + + /** + * cancelStopOrderByClientOid Response Cancel Stop Order By ClientOid + * /api/v1/stop-order/cancelOrderByClientOid + */ + public static void testCancelStopOrderByClientOidResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderId\": \"vs8hoo8ksc8mario0035a74n\",\n" + + " \"clientOid\": \"689ff597f4414061aa819cc414836abd\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue( + data, new TypeReference>() {}); + } + + /** cancelStopOrderByOrderId Request Cancel Stop Order By OrderId /api/v1/stop-order/{orderId} */ + public static void testCancelStopOrderByOrderIdRequest() throws Exception { + String data = "{\"orderId\": \"671124f9365ccb00073debd4\"}"; + CancelStopOrderByOrderIdReq obj = mapper.readValue(data, CancelStopOrderByOrderIdReq.class); + } + + /** cancelStopOrderByOrderId Response Cancel Stop Order By OrderId /api/v1/stop-order/{orderId} */ + public static void testCancelStopOrderByOrderIdResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"671124f9365ccb00073debd4\"\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** batchCancelStopOrder Request Batch Cancel Stop Orders /api/v1/stop-order/cancel */ + public static void testBatchCancelStopOrderRequest() throws Exception { + String data = + "{\"symbol\": \"example_string_default_value\", \"tradeType\":" + + " \"example_string_default_value\", \"orderIds\": \"example_string_default_value\"}"; + BatchCancelStopOrderReq obj = mapper.readValue(data, BatchCancelStopOrderReq.class); + } + + /** batchCancelStopOrder Response Batch Cancel Stop Orders /api/v1/stop-order/cancel */ + public static void testBatchCancelStopOrderResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"671124f9365ccb00073debd4\"\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getStopOrdersList Request Get Stop Orders List /api/v1/stop-order */ + public static void testGetStopOrdersListRequest() throws Exception { + String 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\"}"; + GetStopOrdersListReq obj = mapper.readValue(data, GetStopOrdersListReq.class); + } + + /** getStopOrdersList Response Get Stop Orders List /api/v1/stop-order */ + public static void testGetStopOrdersListResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getStopOrderByOrderId Request Get Stop Order By OrderId /api/v1/stop-order/{orderId} */ + public static void testGetStopOrderByOrderIdRequest() throws Exception { + String data = "{\"orderId\": \"example_string_default_value\"}"; + GetStopOrderByOrderIdReq obj = mapper.readValue(data, GetStopOrderByOrderIdReq.class); + } + + /** getStopOrderByOrderId Response Get Stop Order By OrderId /api/v1/stop-order/{orderId} */ + public static void testGetStopOrderByOrderIdResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\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\": 1629098781127530200,\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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * getStopOrderByClientOid Request Get Stop Order By ClientOid + * /api/v1/stop-order/queryOrderByClientOid + */ + public static void testGetStopOrderByClientOidRequest() throws Exception { + String data = + "{\"clientOid\": \"example_string_default_value\", \"symbol\":" + + " \"example_string_default_value\"}"; + GetStopOrderByClientOidReq obj = mapper.readValue(data, GetStopOrderByClientOidReq.class); + } + + /** + * getStopOrderByClientOid Response Get Stop Order By ClientOid + * /api/v1/stop-order/queryOrderByClientOid + */ + public static void testGetStopOrderByClientOidResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"vs8hoo8os561f5np0032vngj\",\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\": \"2b700942b5db41cebe578cff48960e09\",\n" + + " \"remark\": null,\n" + + " \"tags\": null,\n" + + " \"orderTime\": 1629020492834532600,\n" + + " \"domainId\": \"kucoin\",\n" + + " \"tradeSource\": \"USER\",\n" + + " \"tradeType\": \"TRADE\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"takerFeeRate\": \"0.00200000000000000000\",\n" + + " \"makerFeeRate\": \"0.00200000000000000000\",\n" + + " \"createdAt\": 1629020492837,\n" + + " \"stop\": \"loss\",\n" + + " \"stopTriggerTime\": null,\n" + + " \"stopPrice\": \"1.00000000000000000000\"\n" + + " }\n" + + " ]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addOcoOrder Request Add OCO Order /api/v3/oco/order */ + public static void testAddOcoOrderRequest() throws Exception { + String data = + "{\"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"94000\", \"size\": \"0.1\"," + + " \"clientOid\": \"5c52e11203aa67f1e493fb\", \"stopPrice\": \"98000\"," + + " \"limitPrice\": \"96000\", \"remark\": \"this is remark\", \"tradeType\":" + + " \"TRADE\"}"; + AddOcoOrderReq obj = mapper.readValue(data, AddOcoOrderReq.class); + } + + /** addOcoOrder Response Add OCO Order /api/v3/oco/order */ + public static void testAddOcoOrderResponse() throws Exception { + String data = "{\"code\":\"200000\",\"data\":{\"orderId\":\"674c316e688dea0007c7b986\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** cancelOcoOrderByOrderId Request Cancel OCO Order By OrderId /api/v3/oco/order/{orderId} */ + public static void testCancelOcoOrderByOrderIdRequest() throws Exception { + String data = "{\"orderId\": \"674c316e688dea0007c7b986\"}"; + CancelOcoOrderByOrderIdReq obj = mapper.readValue(data, CancelOcoOrderByOrderIdReq.class); + } + + /** cancelOcoOrderByOrderId Response Cancel OCO Order By OrderId /api/v3/oco/order/{orderId} */ + public static void testCancelOcoOrderByOrderIdResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"vs93gpqc6kkmkk57003gok16\",\n" + + " \"vs93gpqc6kkmkk57003gok17\"\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * cancelOcoOrderByClientOid Request Cancel OCO Order By ClientOid + * /api/v3/oco/client-order/{clientOid} + */ + public static void testCancelOcoOrderByClientOidRequest() throws Exception { + String data = "{\"clientOid\": \"5c52e11203aa67f1e493fb\"}"; + CancelOcoOrderByClientOidReq obj = mapper.readValue(data, CancelOcoOrderByClientOidReq.class); + } + + /** + * cancelOcoOrderByClientOid Response Cancel OCO Order By ClientOid + * /api/v3/oco/client-order/{clientOid} + */ + public static void testCancelOcoOrderByClientOidResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"vs93gpqc6r0mkk57003gok3h\",\n" + + " \"vs93gpqc6r0mkk57003gok3i\"\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** batchCancelOcoOrders Request Batch Cancel OCO Order /api/v3/oco/orders */ + public static void testBatchCancelOcoOrdersRequest() throws Exception { + String data = + "{\"orderIds\": \"674c388172cf2800072ee746,674c38bdfd8300000795167e\", \"symbol\":" + + " \"BTC-USDT\"}"; + BatchCancelOcoOrdersReq obj = mapper.readValue(data, BatchCancelOcoOrdersReq.class); + } + + /** batchCancelOcoOrders Response Batch Cancel OCO Order /api/v3/oco/orders */ + public static void testBatchCancelOcoOrdersResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"vs93gpqc750mkk57003gok6i\",\n" + + " \"vs93gpqc750mkk57003gok6j\",\n" + + " \"vs93gpqc75c39p83003tnriu\",\n" + + " \"vs93gpqc75c39p83003tnriv\"\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getOcoOrderByOrderId Request Get OCO Order By OrderId /api/v3/oco/order/{orderId} */ + public static void testGetOcoOrderByOrderIdRequest() throws Exception { + String data = "{\"orderId\": \"674c3b6e688dea0007c7bab2\"}"; + GetOcoOrderByOrderIdReq obj = mapper.readValue(data, GetOcoOrderByOrderIdReq.class); + } + + /** getOcoOrderByOrderId Response Get OCO Order By OrderId /api/v3/oco/order/{orderId} */ + public static void testGetOcoOrderByOrderIdResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"674c3b6e688dea0007c7bab2\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"clientOid\": \"5c52e1203aa6f37f1e493fb\",\n" + + " \"orderTime\": 1733049198863,\n" + + " \"status\": \"NEW\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * getOcoOrderByClientOid Request Get OCO Order By ClientOid /api/v3/oco/client-order/{clientOid} + */ + public static void testGetOcoOrderByClientOidRequest() throws Exception { + String data = "{\"clientOid\": \"5c52e1203aa6f3g7f1e493fb\"}"; + GetOcoOrderByClientOidReq obj = mapper.readValue(data, GetOcoOrderByClientOidReq.class); + } + + /** + * getOcoOrderByClientOid Response Get OCO Order By ClientOid /api/v3/oco/client-order/{clientOid} + */ + public static void testGetOcoOrderByClientOidResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"674c3cfa72cf2800072ee7ce\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"clientOid\": \"5c52e1203aa6f3g7f1e493fb\",\n" + + " \"orderTime\": 1733049594803,\n" + + " \"status\": \"NEW\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * getOcoOrderDetailByOrderId Request Get OCO Order Detail By OrderId + * /api/v3/oco/order/details/{orderId} + */ + public static void testGetOcoOrderDetailByOrderIdRequest() throws Exception { + String data = "{\"orderId\": \"674c3b6e688dea0007c7bab2\"}"; + GetOcoOrderDetailByOrderIdReq obj = mapper.readValue(data, GetOcoOrderDetailByOrderIdReq.class); + } + + /** + * getOcoOrderDetailByOrderId Response Get OCO Order Detail By OrderId + * /api/v3/oco/order/details/{orderId} + */ + public static void testGetOcoOrderDetailByOrderIdResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"674c3b6e688dea0007c7bab2\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"clientOid\": \"5c52e1203aa6f37f1e493fb\",\n" + + " \"orderTime\": 1733049198863,\n" + + " \"status\": \"NEW\",\n" + + " \"orders\": [\n" + + " {\n" + + " \"id\": \"vs93gpqc7dn6h3fa003sfelj\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"94000.00000000000000000000\",\n" + + " \"stopPrice\": \"94000.00000000000000000000\",\n" + + " \"size\": \"0.10000000000000000000\",\n" + + " \"status\": \"NEW\"\n" + + " },\n" + + " {\n" + + " \"id\": \"vs93gpqc7dn6h3fa003sfelk\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"96000.00000000000000000000\",\n" + + " \"stopPrice\": \"98000.00000000000000000000\",\n" + + " \"size\": \"0.10000000000000000000\",\n" + + " \"status\": \"NEW\"\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue( + data, new TypeReference>() {}); + } + + /** getOcoOrderList Request Get OCO Order List /api/v3/oco/orders */ + public static void testGetOcoOrderListRequest() throws Exception { + String data = + "{\"symbol\": \"BTC-USDT\", \"startAt\": 123456, \"endAt\": 123456, \"orderIds\":" + + " \"example_string_default_value\", \"pageSize\": 50, \"currentPage\": 1}"; + GetOcoOrderListReq obj = mapper.readValue(data, GetOcoOrderListReq.class); + } + + /** getOcoOrderList Response Get OCO Order List /api/v3/oco/orders */ + public static void testGetOcoOrderListResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 1,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"orderId\": \"674c3cfa72cf2800072ee7ce\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"clientOid\": \"5c52e1203aa6f3g7f1e493fb\",\n" + + " \"orderTime\": 1733049594803,\n" + + " \"status\": \"NEW\"\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addOrderOld Request Add Order - Old /api/v1/orders */ + public static void testAddOrderOldRequest() throws Exception { + String data = + "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493fb\", \"remark\":" + + " \"order remarks\"}"; + AddOrderOldReq obj = mapper.readValue(data, AddOrderOldReq.class); + } + + /** addOrderOld Response Add Order - Old /api/v1/orders */ + public static void testAddOrderOldResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"674a8635b38d120007709c0f\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addOrderTestOld Request Add Order Test - Old /api/v1/orders/test */ + public static void testAddOrderTestOldRequest() throws Exception { + String data = + "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493fb\", \"remark\":" + + " \"order remarks\"}"; + AddOrderTestOldReq obj = mapper.readValue(data, AddOrderTestOldReq.class); + } + + /** addOrderTestOld Response Add Order Test - Old /api/v1/orders/test */ + public static void testAddOrderTestOldResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"674a8776291d9e00074f1edf\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** batchAddOrdersOld Request Batch Add Orders - Old /api/v1/orders/multi */ + public static void testBatchAddOrdersOldRequest() throws Exception { + String data = + "{\"symbol\": \"BTC-USDT\", \"orderList\": [{\"clientOid\":" + + " \"3d07008668054da6b3cb12e432c2b13a\", \"side\": \"buy\", \"type\": \"limit\"," + + " \"price\": \"50000\", \"size\": \"0.0001\"}, {\"clientOid\":" + + " \"37245dbe6e134b5c97732bfb36cd4a9d\", \"side\": \"buy\", \"type\": \"limit\"," + + " \"price\": \"49999\", \"size\": \"0.0001\"}]}"; + BatchAddOrdersOldReq obj = mapper.readValue(data, BatchAddOrdersOldReq.class); + } + + /** batchAddOrdersOld Response Batch Add Orders - Old /api/v1/orders/multi */ + public static void testBatchAddOrdersOldResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"data\": [\n" + + " {\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"50000\",\n" + + " \"size\": \"0.0001\",\n" + + " \"funds\": null,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"cancelAfter\": 0,\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberge\": false,\n" + + " \"iceberg\": false,\n" + + " \"visibleSize\": null,\n" + + " \"channel\": \"API\",\n" + + " \"id\": \"674a97dfef434f0007efc431\",\n" + + " \"status\": \"success\",\n" + + " \"failMsg\": null,\n" + + " \"clientOid\": \"3d07008668054da6b3cb12e432c2b13a\"\n" + + " },\n" + + " {\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"49999\",\n" + + " \"size\": \"0.0001\",\n" + + " \"funds\": null,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"cancelAfter\": 0,\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberge\": false,\n" + + " \"iceberg\": false,\n" + + " \"visibleSize\": null,\n" + + " \"channel\": \"API\",\n" + + " \"id\": \"674a97dffb378b00077b9c20\",\n" + + " \"status\": \"fail\",\n" + + " \"failMsg\": \"Balance insufficient!\",\n" + + " \"clientOid\": \"37245dbe6e134b5c97732bfb36cd4a9d\"\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** cancelOrderByOrderIdOld Request Cancel Order By OrderId - Old /api/v1/orders/{orderId} */ + public static void testCancelOrderByOrderIdOldRequest() throws Exception { + String data = "{\"orderId\": \"674a97dfef434f0007efc431\"}"; + CancelOrderByOrderIdOldReq obj = mapper.readValue(data, CancelOrderByOrderIdOldReq.class); + } + + /** cancelOrderByOrderIdOld Response Cancel Order By OrderId - Old /api/v1/orders/{orderId} */ + public static void testCancelOrderByOrderIdOldResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"674a97dfef434f0007efc431\"\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * cancelOrderByClientOidOld Request Cancel Order By ClientOid - Old + * /api/v1/order/client-order/{clientOid} + */ + public static void testCancelOrderByClientOidOldRequest() throws Exception { + String data = "{\"clientOid\": \"5c52e11203aa677f331e493fb\"}"; + CancelOrderByClientOidOldReq obj = mapper.readValue(data, CancelOrderByClientOidOldReq.class); + } + + /** + * cancelOrderByClientOidOld Response Cancel Order By ClientOid - Old + * /api/v1/order/client-order/{clientOid} + */ + public static void testCancelOrderByClientOidOldResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderId\": \"67c3252a63d25e0007f91de9\",\n" + + " \"clientOid\": \"5c52e11203aa677f331e493fb\",\n" + + " \"cancelledOcoOrderIds\": null\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** batchCancelOrderOld Request Batch Cancel Order - Old /api/v1/orders */ + public static void testBatchCancelOrderOldRequest() throws Exception { + String data = "{\"symbol\": \"BTC-USDT\", \"tradeType\": \"TRADE\"}"; + BatchCancelOrderOldReq obj = mapper.readValue(data, BatchCancelOrderOldReq.class); + } + + /** batchCancelOrderOld Response Batch Cancel Order - Old /api/v1/orders */ + public static void testBatchCancelOrderOldResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"674a8635b38d120007709c0f\",\n" + + " \"674a8630439c100007d3bce1\"\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getOrdersListOld Request Get Orders List - Old /api/v1/orders */ + public static void testGetOrdersListOldRequest() throws Exception { + String data = + "{\"symbol\": \"BTC-USDT\", \"status\": \"active\", \"side\": \"buy\", \"type\": \"limit\"," + + " \"tradeType\": \"TRADE\", \"startAt\": 123456, \"endAt\": 123456, \"currentPage\":" + + " 1, \"pageSize\": 50}"; + GetOrdersListOldReq obj = mapper.readValue(data, GetOrdersListOldReq.class); + } + + /** getOrdersListOld Response Get Orders List - Old /api/v1/orders */ + public static void testGetOrdersListOldResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 1,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\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" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getRecentOrdersListOld Request Get Recent Orders List - Old /api/v1/limit/orders */ + public static void testGetRecentOrdersListOldRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getRecentOrdersListOld Response Get Recent Orders List - Old /api/v1/limit/orders */ + public static void testGetRecentOrdersListOldResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getOrderByOrderIdOld Request Get Order By OrderId - Old /api/v1/orders/{orderId} */ + public static void testGetOrderByOrderIdOldRequest() throws Exception { + String data = "{\"orderId\": \"674a97dfef434f0007efc431\"}"; + GetOrderByOrderIdOldReq obj = mapper.readValue(data, GetOrderByOrderIdOldReq.class); + } + + /** getOrderByOrderIdOld Response Get Order By OrderId - Old /api/v1/orders/{orderId} */ + public static void testGetOrderByOrderIdOldResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"674a97dfef434f0007efc431\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"opType\": \"DEAL\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"50000\",\n" + + " \"size\": \"0.0001\",\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\": \"3d07008668054da6b3cb12e432c2b13a\",\n" + + " \"remark\": null,\n" + + " \"tags\": null,\n" + + " \"isActive\": false,\n" + + " \"cancelExist\": true,\n" + + " \"createdAt\": 1732941791518,\n" + + " \"tradeType\": \"TRADE\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** + * getOrderByClientOidOld Request Get Order By ClientOid - Old + * /api/v1/order/client-order/{clientOid} + */ + public static void testGetOrderByClientOidOldRequest() throws Exception { + String data = "{\"clientOid\": \"3d07008668054da6b3cb12e432c2b13a\"}"; + GetOrderByClientOidOldReq obj = mapper.readValue(data, GetOrderByClientOidOldReq.class); + } + + /** + * getOrderByClientOidOld Response Get Order By ClientOid - Old + * /api/v1/order/client-order/{clientOid} + */ + public static void testGetOrderByClientOidOldResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"674a97dfef434f0007efc431\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"opType\": \"DEAL\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"50000\",\n" + + " \"size\": \"0.0001\",\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\": \"3d07008668054da6b3cb12e432c2b13a\",\n" + + " \"remark\": null,\n" + + " \"tags\": null,\n" + + " \"isActive\": false,\n" + + " \"cancelExist\": true,\n" + + " \"createdAt\": 1732941791518,\n" + + " \"tradeType\": \"TRADE\"\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getTradeHistoryOld Request Get Trade History - Old /api/v1/fills */ + public static void testGetTradeHistoryOldRequest() throws Exception { + String data = + "{\"symbol\": \"BTC-USDT\", \"orderId\": \"example_string_default_value\", \"side\":" + + " \"buy\", \"type\": \"limit\", \"tradeType\": \"TRADE\", \"startAt\": 1728663338000," + + " \"endAt\": 1728692138000, \"currentPage\": 1, \"pageSize\": 50}"; + GetTradeHistoryOldReq obj = mapper.readValue(data, GetTradeHistoryOldReq.class); + } + + /** getTradeHistoryOld Response Get Trade History - Old /api/v1/fills */ + public static void testGetTradeHistoryOldResponse() throws Exception { + String data = + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 1,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"symbol\": \"DOGE-USDT\",\n" + + " \"tradeId\": \"10862827223795713\",\n" + + " \"orderId\": \"6745698ef4f1200007c561a8\",\n" + + " \"counterOrderId\": \"6745695ef15b270007ac5076\",\n" + + " \"side\": \"buy\",\n" + + " \"liquidity\": \"taker\",\n" + + " \"forceTaker\": false,\n" + + " \"price\": \"0.40739\",\n" + + " \"size\": \"10\",\n" + + " \"funds\": \"4.0739\",\n" + + " \"fee\": \"0.0040739\",\n" + + " \"feeRate\": \"0.001\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"stop\": \"\",\n" + + " \"tradeType\": \"TRADE\",\n" + + " \"type\": \"market\",\n" + + " \"createdAt\": 1732602254928\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getRecentTradeHistoryOld Request Get Recent Trade History - Old /api/v1/limit/fills */ + public static void testGetRecentTradeHistoryOldRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getRecentTradeHistoryOld Response Get Recent Trade History - Old /api/v1/limit/fills */ + public static void testGetRecentTradeHistoryOldResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(OrderApiAutoGeneratedTest::testAddOrderRequest, "testAddOrderRequest"); + run(OrderApiAutoGeneratedTest::testAddOrderResponse, "testAddOrderResponse"); + run(OrderApiAutoGeneratedTest::testAddOrderSyncRequest, "testAddOrderSyncRequest"); + run(OrderApiAutoGeneratedTest::testAddOrderSyncResponse, "testAddOrderSyncResponse"); + run(OrderApiAutoGeneratedTest::testAddOrderTestRequest, "testAddOrderTestRequest"); + run(OrderApiAutoGeneratedTest::testAddOrderTestResponse, "testAddOrderTestResponse"); + run(OrderApiAutoGeneratedTest::testBatchAddOrdersRequest, "testBatchAddOrdersRequest"); + run(OrderApiAutoGeneratedTest::testBatchAddOrdersResponse, "testBatchAddOrdersResponse"); + run(OrderApiAutoGeneratedTest::testBatchAddOrdersSyncRequest, "testBatchAddOrdersSyncRequest"); + run( + OrderApiAutoGeneratedTest::testBatchAddOrdersSyncResponse, + "testBatchAddOrdersSyncResponse"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByOrderIdRequest, + "testCancelOrderByOrderIdRequest"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByOrderIdResponse, + "testCancelOrderByOrderIdResponse"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByOrderIdSyncRequest, + "testCancelOrderByOrderIdSyncRequest"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByOrderIdSyncResponse, + "testCancelOrderByOrderIdSyncResponse"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByClientOidRequest, + "testCancelOrderByClientOidRequest"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByClientOidResponse, + "testCancelOrderByClientOidResponse"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByClientOidSyncRequest, + "testCancelOrderByClientOidSyncRequest"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByClientOidSyncResponse, + "testCancelOrderByClientOidSyncResponse"); + run(OrderApiAutoGeneratedTest::testCancelPartialOrderRequest, "testCancelPartialOrderRequest"); + run( + OrderApiAutoGeneratedTest::testCancelPartialOrderResponse, + "testCancelPartialOrderResponse"); + run( + OrderApiAutoGeneratedTest::testCancelAllOrdersBySymbolRequest, + "testCancelAllOrdersBySymbolRequest"); + run( + OrderApiAutoGeneratedTest::testCancelAllOrdersBySymbolResponse, + "testCancelAllOrdersBySymbolResponse"); + run(OrderApiAutoGeneratedTest::testCancelAllOrdersRequest, "testCancelAllOrdersRequest"); + run(OrderApiAutoGeneratedTest::testCancelAllOrdersResponse, "testCancelAllOrdersResponse"); + run(OrderApiAutoGeneratedTest::testModifyOrderRequest, "testModifyOrderRequest"); + run(OrderApiAutoGeneratedTest::testModifyOrderResponse, "testModifyOrderResponse"); + run(OrderApiAutoGeneratedTest::testGetOrderByOrderIdRequest, "testGetOrderByOrderIdRequest"); + run(OrderApiAutoGeneratedTest::testGetOrderByOrderIdResponse, "testGetOrderByOrderIdResponse"); + run( + OrderApiAutoGeneratedTest::testGetOrderByClientOidRequest, + "testGetOrderByClientOidRequest"); + run( + OrderApiAutoGeneratedTest::testGetOrderByClientOidResponse, + "testGetOrderByClientOidResponse"); + run( + OrderApiAutoGeneratedTest::testGetSymbolsWithOpenOrderRequest, + "testGetSymbolsWithOpenOrderRequest"); + run( + OrderApiAutoGeneratedTest::testGetSymbolsWithOpenOrderResponse, + "testGetSymbolsWithOpenOrderResponse"); + run(OrderApiAutoGeneratedTest::testGetOpenOrdersRequest, "testGetOpenOrdersRequest"); + run(OrderApiAutoGeneratedTest::testGetOpenOrdersResponse, "testGetOpenOrdersResponse"); + run( + OrderApiAutoGeneratedTest::testGetOpenOrdersByPageRequest, + "testGetOpenOrdersByPageRequest"); + run( + OrderApiAutoGeneratedTest::testGetOpenOrdersByPageResponse, + "testGetOpenOrdersByPageResponse"); + run(OrderApiAutoGeneratedTest::testGetClosedOrdersRequest, "testGetClosedOrdersRequest"); + run(OrderApiAutoGeneratedTest::testGetClosedOrdersResponse, "testGetClosedOrdersResponse"); + run(OrderApiAutoGeneratedTest::testGetTradeHistoryRequest, "testGetTradeHistoryRequest"); + run(OrderApiAutoGeneratedTest::testGetTradeHistoryResponse, "testGetTradeHistoryResponse"); + run(OrderApiAutoGeneratedTest::testGetDCPRequest, "testGetDCPRequest"); + run(OrderApiAutoGeneratedTest::testGetDCPResponse, "testGetDCPResponse"); + run(OrderApiAutoGeneratedTest::testSetDCPRequest, "testSetDCPRequest"); + run(OrderApiAutoGeneratedTest::testSetDCPResponse, "testSetDCPResponse"); + run(OrderApiAutoGeneratedTest::testAddStopOrderRequest, "testAddStopOrderRequest"); + run(OrderApiAutoGeneratedTest::testAddStopOrderResponse, "testAddStopOrderResponse"); + run( + OrderApiAutoGeneratedTest::testCancelStopOrderByClientOidRequest, + "testCancelStopOrderByClientOidRequest"); + run( + OrderApiAutoGeneratedTest::testCancelStopOrderByClientOidResponse, + "testCancelStopOrderByClientOidResponse"); + run( + OrderApiAutoGeneratedTest::testCancelStopOrderByOrderIdRequest, + "testCancelStopOrderByOrderIdRequest"); + run( + OrderApiAutoGeneratedTest::testCancelStopOrderByOrderIdResponse, + "testCancelStopOrderByOrderIdResponse"); + run( + OrderApiAutoGeneratedTest::testBatchCancelStopOrderRequest, + "testBatchCancelStopOrderRequest"); + run( + OrderApiAutoGeneratedTest::testBatchCancelStopOrderResponse, + "testBatchCancelStopOrderResponse"); + run(OrderApiAutoGeneratedTest::testGetStopOrdersListRequest, "testGetStopOrdersListRequest"); + run(OrderApiAutoGeneratedTest::testGetStopOrdersListResponse, "testGetStopOrdersListResponse"); + run( + OrderApiAutoGeneratedTest::testGetStopOrderByOrderIdRequest, + "testGetStopOrderByOrderIdRequest"); + run( + OrderApiAutoGeneratedTest::testGetStopOrderByOrderIdResponse, + "testGetStopOrderByOrderIdResponse"); + run( + OrderApiAutoGeneratedTest::testGetStopOrderByClientOidRequest, + "testGetStopOrderByClientOidRequest"); + run( + OrderApiAutoGeneratedTest::testGetStopOrderByClientOidResponse, + "testGetStopOrderByClientOidResponse"); + run(OrderApiAutoGeneratedTest::testAddOcoOrderRequest, "testAddOcoOrderRequest"); + run(OrderApiAutoGeneratedTest::testAddOcoOrderResponse, "testAddOcoOrderResponse"); + run( + OrderApiAutoGeneratedTest::testCancelOcoOrderByOrderIdRequest, + "testCancelOcoOrderByOrderIdRequest"); + run( + OrderApiAutoGeneratedTest::testCancelOcoOrderByOrderIdResponse, + "testCancelOcoOrderByOrderIdResponse"); + run( + OrderApiAutoGeneratedTest::testCancelOcoOrderByClientOidRequest, + "testCancelOcoOrderByClientOidRequest"); + run( + OrderApiAutoGeneratedTest::testCancelOcoOrderByClientOidResponse, + "testCancelOcoOrderByClientOidResponse"); + run( + OrderApiAutoGeneratedTest::testBatchCancelOcoOrdersRequest, + "testBatchCancelOcoOrdersRequest"); + run( + OrderApiAutoGeneratedTest::testBatchCancelOcoOrdersResponse, + "testBatchCancelOcoOrdersResponse"); + run( + OrderApiAutoGeneratedTest::testGetOcoOrderByOrderIdRequest, + "testGetOcoOrderByOrderIdRequest"); + run( + OrderApiAutoGeneratedTest::testGetOcoOrderByOrderIdResponse, + "testGetOcoOrderByOrderIdResponse"); + run( + OrderApiAutoGeneratedTest::testGetOcoOrderByClientOidRequest, + "testGetOcoOrderByClientOidRequest"); + run( + OrderApiAutoGeneratedTest::testGetOcoOrderByClientOidResponse, + "testGetOcoOrderByClientOidResponse"); + run( + OrderApiAutoGeneratedTest::testGetOcoOrderDetailByOrderIdRequest, + "testGetOcoOrderDetailByOrderIdRequest"); + run( + OrderApiAutoGeneratedTest::testGetOcoOrderDetailByOrderIdResponse, + "testGetOcoOrderDetailByOrderIdResponse"); + run(OrderApiAutoGeneratedTest::testGetOcoOrderListRequest, "testGetOcoOrderListRequest"); + run(OrderApiAutoGeneratedTest::testGetOcoOrderListResponse, "testGetOcoOrderListResponse"); + run(OrderApiAutoGeneratedTest::testAddOrderOldRequest, "testAddOrderOldRequest"); + run(OrderApiAutoGeneratedTest::testAddOrderOldResponse, "testAddOrderOldResponse"); + run(OrderApiAutoGeneratedTest::testAddOrderTestOldRequest, "testAddOrderTestOldRequest"); + run(OrderApiAutoGeneratedTest::testAddOrderTestOldResponse, "testAddOrderTestOldResponse"); + run(OrderApiAutoGeneratedTest::testBatchAddOrdersOldRequest, "testBatchAddOrdersOldRequest"); + run(OrderApiAutoGeneratedTest::testBatchAddOrdersOldResponse, "testBatchAddOrdersOldResponse"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByOrderIdOldRequest, + "testCancelOrderByOrderIdOldRequest"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByOrderIdOldResponse, + "testCancelOrderByOrderIdOldResponse"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByClientOidOldRequest, + "testCancelOrderByClientOidOldRequest"); + run( + OrderApiAutoGeneratedTest::testCancelOrderByClientOidOldResponse, + "testCancelOrderByClientOidOldResponse"); + run( + OrderApiAutoGeneratedTest::testBatchCancelOrderOldRequest, + "testBatchCancelOrderOldRequest"); + run( + OrderApiAutoGeneratedTest::testBatchCancelOrderOldResponse, + "testBatchCancelOrderOldResponse"); + run(OrderApiAutoGeneratedTest::testGetOrdersListOldRequest, "testGetOrdersListOldRequest"); + run(OrderApiAutoGeneratedTest::testGetOrdersListOldResponse, "testGetOrdersListOldResponse"); + run( + OrderApiAutoGeneratedTest::testGetRecentOrdersListOldRequest, + "testGetRecentOrdersListOldRequest"); + run( + OrderApiAutoGeneratedTest::testGetRecentOrdersListOldResponse, + "testGetRecentOrdersListOldResponse"); + run( + OrderApiAutoGeneratedTest::testGetOrderByOrderIdOldRequest, + "testGetOrderByOrderIdOldRequest"); + run( + OrderApiAutoGeneratedTest::testGetOrderByOrderIdOldResponse, + "testGetOrderByOrderIdOldResponse"); + run( + OrderApiAutoGeneratedTest::testGetOrderByClientOidOldRequest, + "testGetOrderByClientOidOldRequest"); + run( + OrderApiAutoGeneratedTest::testGetOrderByClientOidOldResponse, + "testGetOrderByClientOidOldResponse"); + run(OrderApiAutoGeneratedTest::testGetTradeHistoryOldRequest, "testGetTradeHistoryOldRequest"); + run( + OrderApiAutoGeneratedTest::testGetTradeHistoryOldResponse, + "testGetTradeHistoryOldResponse"); + run( + OrderApiAutoGeneratedTest::testGetRecentTradeHistoryOldRequest, + "testGetRecentTradeHistoryOldRequest"); + run( + OrderApiAutoGeneratedTest::testGetRecentTradeHistoryOldResponse, + "testGetRecentTradeHistoryOldResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiImpl.java new file mode 100644 index 00000000..086db1d7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiImpl.java @@ -0,0 +1,435 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class OrderApiImpl implements OrderApi { + private final Transport transport; + + public OrderApiImpl(Transport transport) { + this.transport = transport; + } + + public AddOrderResp addOrder(AddOrderReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v1/hf/orders", req, AddOrderResp.class, false); + } + + public AddOrderSyncResp addOrderSync(AddOrderSyncReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v1/hf/orders/sync", req, AddOrderSyncResp.class, false); + } + + public AddOrderTestResp addOrderTest(AddOrderTestReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v1/hf/orders/test", req, AddOrderTestResp.class, false); + } + + public BatchAddOrdersResp batchAddOrders(BatchAddOrdersReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v1/hf/orders/multi", req, BatchAddOrdersResp.class, false); + } + + public BatchAddOrdersSyncResp batchAddOrdersSync(BatchAddOrdersSyncReq req) { + return this.transport.call( + "spot", + false, + "POST", + "/api/v1/hf/orders/multi/sync", + req, + BatchAddOrdersSyncResp.class, + false); + } + + public CancelOrderByOrderIdResp cancelOrderByOrderId(CancelOrderByOrderIdReq req) { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v1/hf/orders/{orderId}", + req, + CancelOrderByOrderIdResp.class, + false); + } + + public CancelOrderByOrderIdSyncResp cancelOrderByOrderIdSync(CancelOrderByOrderIdSyncReq req) { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v1/hf/orders/sync/{orderId}", + req, + CancelOrderByOrderIdSyncResp.class, + false); + } + + public CancelOrderByClientOidResp cancelOrderByClientOid(CancelOrderByClientOidReq req) { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v1/hf/orders/client-order/{clientOid}", + req, + CancelOrderByClientOidResp.class, + false); + } + + public CancelOrderByClientOidSyncResp cancelOrderByClientOidSync( + CancelOrderByClientOidSyncReq req) { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v1/hf/orders/sync/client-order/{clientOid}", + req, + CancelOrderByClientOidSyncResp.class, + false); + } + + public CancelPartialOrderResp cancelPartialOrder(CancelPartialOrderReq req) { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v1/hf/orders/cancel/{orderId}", + req, + CancelPartialOrderResp.class, + false); + } + + public CancelAllOrdersBySymbolResp cancelAllOrdersBySymbol(CancelAllOrdersBySymbolReq req) { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v1/hf/orders", + req, + CancelAllOrdersBySymbolResp.class, + false); + } + + public CancelAllOrdersResp cancelAllOrders() { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v1/hf/orders/cancelAll", + null, + CancelAllOrdersResp.class, + false); + } + + public ModifyOrderResp modifyOrder(ModifyOrderReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v1/hf/orders/alter", req, ModifyOrderResp.class, false); + } + + public GetOrderByOrderIdResp getOrderByOrderId(GetOrderByOrderIdReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/hf/orders/{orderId}", + req, + GetOrderByOrderIdResp.class, + false); + } + + public GetOrderByClientOidResp getOrderByClientOid(GetOrderByClientOidReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/hf/orders/client-order/{clientOid}", + req, + GetOrderByClientOidResp.class, + false); + } + + public GetSymbolsWithOpenOrderResp getSymbolsWithOpenOrder() { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/hf/orders/active/symbols", + null, + GetSymbolsWithOpenOrderResp.class, + false); + } + + public GetOpenOrdersResp getOpenOrders(GetOpenOrdersReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v1/hf/orders/active", req, GetOpenOrdersResp.class, false); + } + + public GetOpenOrdersByPageResp getOpenOrdersByPage(GetOpenOrdersByPageReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/hf/orders/active/page", + req, + GetOpenOrdersByPageResp.class, + false); + } + + public GetClosedOrdersResp getClosedOrders(GetClosedOrdersReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v1/hf/orders/done", req, GetClosedOrdersResp.class, false); + } + + public GetTradeHistoryResp getTradeHistory(GetTradeHistoryReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v1/hf/fills", req, GetTradeHistoryResp.class, false); + } + + public GetDCPResp getDCP() { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/hf/orders/dead-cancel-all/query", + null, + GetDCPResp.class, + false); + } + + public SetDCPResp setDCP(SetDCPReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v1/hf/orders/dead-cancel-all", req, SetDCPResp.class, false); + } + + public AddStopOrderResp addStopOrder(AddStopOrderReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v1/stop-order", req, AddStopOrderResp.class, false); + } + + public CancelStopOrderByClientOidResp cancelStopOrderByClientOid( + CancelStopOrderByClientOidReq req) { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v1/stop-order/cancelOrderByClientOid", + req, + CancelStopOrderByClientOidResp.class, + false); + } + + public CancelStopOrderByOrderIdResp cancelStopOrderByOrderId(CancelStopOrderByOrderIdReq req) { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v1/stop-order/{orderId}", + req, + CancelStopOrderByOrderIdResp.class, + false); + } + + public BatchCancelStopOrderResp batchCancelStopOrder(BatchCancelStopOrderReq req) { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v1/stop-order/cancel", + req, + BatchCancelStopOrderResp.class, + false); + } + + public GetStopOrdersListResp getStopOrdersList(GetStopOrdersListReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v1/stop-order", req, GetStopOrdersListResp.class, false); + } + + public GetStopOrderByOrderIdResp getStopOrderByOrderId(GetStopOrderByOrderIdReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/stop-order/{orderId}", + req, + GetStopOrderByOrderIdResp.class, + false); + } + + public GetStopOrderByClientOidResp getStopOrderByClientOid(GetStopOrderByClientOidReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/stop-order/queryOrderByClientOid", + req, + GetStopOrderByClientOidResp.class, + false); + } + + public AddOcoOrderResp addOcoOrder(AddOcoOrderReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v3/oco/order", req, AddOcoOrderResp.class, false); + } + + public CancelOcoOrderByOrderIdResp cancelOcoOrderByOrderId(CancelOcoOrderByOrderIdReq req) { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v3/oco/order/{orderId}", + req, + CancelOcoOrderByOrderIdResp.class, + false); + } + + public CancelOcoOrderByClientOidResp cancelOcoOrderByClientOid(CancelOcoOrderByClientOidReq req) { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v3/oco/client-order/{clientOid}", + req, + CancelOcoOrderByClientOidResp.class, + false); + } + + public BatchCancelOcoOrdersResp batchCancelOcoOrders(BatchCancelOcoOrdersReq req) { + return this.transport.call( + "spot", false, "DELETE", "/api/v3/oco/orders", req, BatchCancelOcoOrdersResp.class, false); + } + + public GetOcoOrderByOrderIdResp getOcoOrderByOrderId(GetOcoOrderByOrderIdReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v3/oco/order/{orderId}", + req, + GetOcoOrderByOrderIdResp.class, + false); + } + + public GetOcoOrderByClientOidResp getOcoOrderByClientOid(GetOcoOrderByClientOidReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v3/oco/client-order/{clientOid}", + req, + GetOcoOrderByClientOidResp.class, + false); + } + + public GetOcoOrderDetailByOrderIdResp getOcoOrderDetailByOrderId( + GetOcoOrderDetailByOrderIdReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v3/oco/order/details/{orderId}", + req, + GetOcoOrderDetailByOrderIdResp.class, + false); + } + + public GetOcoOrderListResp getOcoOrderList(GetOcoOrderListReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v3/oco/orders", req, GetOcoOrderListResp.class, false); + } + + public AddOrderOldResp addOrderOld(AddOrderOldReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v1/orders", req, AddOrderOldResp.class, false); + } + + public AddOrderTestOldResp addOrderTestOld(AddOrderTestOldReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v1/orders/test", req, AddOrderTestOldResp.class, false); + } + + public BatchAddOrdersOldResp batchAddOrdersOld(BatchAddOrdersOldReq req) { + return this.transport.call( + "spot", false, "POST", "/api/v1/orders/multi", req, BatchAddOrdersOldResp.class, false); + } + + public CancelOrderByOrderIdOldResp cancelOrderByOrderIdOld(CancelOrderByOrderIdOldReq req) { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v1/orders/{orderId}", + req, + CancelOrderByOrderIdOldResp.class, + false); + } + + public CancelOrderByClientOidOldResp cancelOrderByClientOidOld(CancelOrderByClientOidOldReq req) { + return this.transport.call( + "spot", + false, + "DELETE", + "/api/v1/order/client-order/{clientOid}", + req, + CancelOrderByClientOidOldResp.class, + false); + } + + public BatchCancelOrderOldResp batchCancelOrderOld(BatchCancelOrderOldReq req) { + return this.transport.call( + "spot", false, "DELETE", "/api/v1/orders", req, BatchCancelOrderOldResp.class, false); + } + + public GetOrdersListOldResp getOrdersListOld(GetOrdersListOldReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v1/orders", req, GetOrdersListOldResp.class, false); + } + + public GetRecentOrdersListOldResp getRecentOrdersListOld() { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/limit/orders", + null, + GetRecentOrdersListOldResp.class, + false); + } + + public GetOrderByOrderIdOldResp getOrderByOrderIdOld(GetOrderByOrderIdOldReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/orders/{orderId}", + req, + GetOrderByOrderIdOldResp.class, + false); + } + + public GetOrderByClientOidOldResp getOrderByClientOidOld(GetOrderByClientOidOldReq req) { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/order/client-order/{clientOid}", + req, + GetOrderByClientOidOldResp.class, + false); + } + + public GetTradeHistoryOldResp getTradeHistoryOld(GetTradeHistoryOldReq req) { + return this.transport.call( + "spot", false, "GET", "/api/v1/fills", req, GetTradeHistoryOldResp.class, false); + } + + public GetRecentTradeHistoryOldResp getRecentTradeHistoryOld() { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/limit/fills", + null, + GetRecentTradeHistoryOldResp.class, + false); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/SetDCPReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/SetDCPReq.java new file mode 100644 index 00000000..faa43a57 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/SetDCPReq.java @@ -0,0 +1,35 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Builder +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class SetDCPReq implements Request { + /** + * 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. + */ + @JsonProperty("timeout") + private Integer timeout; + + /** + * 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. + */ + @JsonProperty("symbols") + private String symbols; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/SetDCPResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/SetDCPResp.java new file mode 100644 index 00000000..6b8230bb --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/SetDCPResp.java @@ -0,0 +1,34 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class SetDCPResp implements Response> { + /** System current time (in seconds) */ + @JsonProperty("currentTime") + private Long currentTime; + + /** Trigger cancellation time (in seconds) */ + @JsonProperty("triggerTime") + private Long triggerTime; + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountEvent.java new file mode 100644 index 00000000..c4518e6a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountEvent.java @@ -0,0 +1,82 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotprivate; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AccountEvent implements Response> { + /** Account ID */ + @JsonProperty("accountId") + private String accountId; + + /** Funds available to withdraw or trade */ + @JsonProperty("available") + private String available; + + /** The change of available Funds */ + @JsonProperty("availableChange") + private String availableChange; + + /** currency */ + @JsonProperty("currency") + private String currency; + + /** Funds on hold (not available for use) */ + @JsonProperty("hold") + private String hold; + + /** The change of hold funds */ + @JsonProperty("holdChange") + private String holdChange; + + /** */ + @JsonProperty("relationContext") + private AccountRelationContext relationContext; + + /** Relation event */ + @JsonProperty("relationEvent") + private String relationEvent; + + /** Relation event Id */ + @JsonProperty("relationEventId") + private String relationEventId; + + /** */ + @JsonProperty("time") + private String time; + + /** Total balance = available + hold */ + @JsonProperty("total") + private String total; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, AccountEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountRelationContext.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountRelationContext.java new file mode 100644 index 00000000..711f5426 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountRelationContext.java @@ -0,0 +1,23 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotprivate; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +class AccountRelationContext { + /** */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("orderId") + private String orderId; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV1Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV1Event.java new file mode 100644 index 00000000..1f705ee1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV1Event.java @@ -0,0 +1,352 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotprivate; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class OrderV1Event implements Response> { + /** Cumulative number of cancellations */ + @JsonProperty("canceledSize") + private String canceledSize; + + /** Client Order ID: The ClientOid field is a unique ID created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** Cumulative number filled */ + @JsonProperty("filledSize") + private String filledSize; + + /** The unique order id generated by the trading system */ + @JsonProperty("orderId") + private String orderId; + + /** Gateway received the message time (milliseconds) */ + @JsonProperty("orderTime") + private Long orderTime; + + /** User-specified order type */ + @JsonProperty("orderType") + private OrderTypeEnum orderType; + + /** User-specified order size */ + @JsonProperty("originSize") + private String originSize; + + /** Specify price for currency */ + @JsonProperty("price") + private String price; + + /** Remain funds */ + @JsonProperty("remainFunds") + private String remainFunds; + + /** Remain size */ + @JsonProperty("remainSize") + private String remainSize; + + /** buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** User-specified order size */ + @JsonProperty("size") + private String size; + + /** Order Status */ + @JsonProperty("status") + private StatusEnum status; + + /** Symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Match engine received the message time (nanoseconds) */ + @JsonProperty("ts") + private Long ts; + + /** Order Type */ + @JsonProperty("type") + private TypeEnum type; + + /** The size before order update */ + @JsonProperty("oldSize") + private String oldSize; + + /** Actual Fee Type */ + @JsonProperty("feeType") + private FeeTypeEnum feeType; + + /** + * 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** + */ + @JsonProperty("liquidity") + private LiquidityEnum liquidity; + + /** Match Price (when the type is \"match\") */ + @JsonProperty("matchPrice") + private String matchPrice; + + /** Match Size (when the type is \"match\") */ + @JsonProperty("matchSize") + private String matchSize; + + /** Trade ID: Generated by Matching engine. */ + @JsonProperty("tradeId") + private String tradeId; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, OrderV1Event data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } + + public enum OrderTypeEnum { + /** limit */ + LIMIT("limit"), + /** market */ + MARKET("market"); + + private final String value; + + OrderTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OrderTypeEnum fromValue(String value) { + for (OrderTypeEnum b : OrderTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** buy */ + BUY("buy"), + /** sell */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StatusEnum { + /** the order enters the matching system */ + _NEW("new"), + /** the order is in the order book (maker order) */ + OPEN("open"), + /** + * when taker order executes with orders in the order book, the taker order status is “match” + */ + MATCH("match"), + /** the order is fully executed successfully */ + DONE("done"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** 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. + */ + 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 */ + CANCELED("canceled"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum FeeTypeEnum { + /** takerFee */ + TAKERFEE("takerFee"), + /** makerFee */ + MAKERFEE("makerFee"); + + private final String value; + + FeeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FeeTypeEnum fromValue(String value) { + for (FeeTypeEnum b : FeeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum LiquidityEnum { + /** taker */ + TAKER("taker"), + /** maker */ + MAKER("maker"); + + private final String value; + + LiquidityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LiquidityEnum fromValue(String value) { + for (LiquidityEnum b : LiquidityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV2Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV2Event.java new file mode 100644 index 00000000..afbc3cb4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV2Event.java @@ -0,0 +1,359 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotprivate; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class OrderV2Event implements Response> { + /** Cumulative number of cancellations */ + @JsonProperty("canceledSize") + private String canceledSize; + + /** Client Order ID: The ClientOid field is a unique ID created by the user */ + @JsonProperty("clientOid") + private String clientOid; + + /** Cumulative number filled */ + @JsonProperty("filledSize") + private String filledSize; + + /** The unique order id generated by the trading system */ + @JsonProperty("orderId") + private String orderId; + + /** Gateway received the message time (milliseconds) */ + @JsonProperty("orderTime") + private Long orderTime; + + /** User-specified order type */ + @JsonProperty("orderType") + private OrderTypeEnum orderType; + + /** User-specified order size */ + @JsonProperty("originSize") + private String originSize; + + /** Price */ + @JsonProperty("price") + private String price; + + /** Remain funds */ + @JsonProperty("remainFunds") + private String remainFunds; + + /** Remain size */ + @JsonProperty("remainSize") + private String remainSize; + + /** buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** User-specified order size */ + @JsonProperty("size") + private String size; + + /** Order Status */ + @JsonProperty("status") + private StatusEnum status; + + /** Symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Match engine received the message time (nanoseconds) */ + @JsonProperty("ts") + private Long ts; + + /** Order Type */ + @JsonProperty("type") + private TypeEnum type; + + /** The size before order update */ + @JsonProperty("oldSize") + private String oldSize; + + /** Actual Fee Type */ + @JsonProperty("feeType") + private FeeTypeEnum feeType; + + /** + * 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** + */ + @JsonProperty("liquidity") + private LiquidityEnum liquidity; + + /** Match Price (when the type is \"match\") */ + @JsonProperty("matchPrice") + private String matchPrice; + + /** Match Size (when the type is \"match\") */ + @JsonProperty("matchSize") + private String matchSize; + + /** Trade ID: Generated by Matching engine. */ + @JsonProperty("tradeId") + private String tradeId; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, OrderV2Event data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } + + public enum OrderTypeEnum { + /** limit */ + LIMIT("limit"), + /** market */ + MARKET("market"); + + private final String value; + + OrderTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OrderTypeEnum fromValue(String value) { + for (OrderTypeEnum b : OrderTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** buy */ + BUY("buy"), + /** sell */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StatusEnum { + /** the order enters the matching system */ + _NEW("new"), + /** the order is in the order book (maker order) */ + OPEN("open"), + /** + * when taker order executes with orders in the order book, the taker order status is “match” + */ + MATCH("match"), + /** the order is fully executed successfully */ + DONE("done"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TypeEnum { + /** 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. + */ + 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 */ + CANCELED("canceled"), + /** + * 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"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum FeeTypeEnum { + /** takerFee */ + TAKERFEE("takerFee"), + /** makerFee */ + MAKERFEE("makerFee"); + + private final String value; + + FeeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FeeTypeEnum fromValue(String value) { + for (FeeTypeEnum b : FeeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum LiquidityEnum { + /** taker */ + TAKER("taker"), + /** maker */ + MAKER("maker"); + + private final String value; + + LiquidityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LiquidityEnum fromValue(String value) { + for (LiquidityEnum b : LiquidityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWs.java new file mode 100644 index 00000000..06694818 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWs.java @@ -0,0 +1,39 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotprivate; + +public interface SpotPrivateWs { + + /** + * Get Account Balance You will receive this message when an account balance changes. The message + * contains the details of the change. push frequency: real-time + */ + public String account(AccountEvent.Callback callback); + + /** + * Get Order(V1) This topic will push all change events of your orders. push frequency: real-time + */ + public String orderV1(OrderV1Event.Callback callback); + + /** + * Get Order(V2) This topic will push all change events of your orders. Compared with v1, v2 adds + * an Order Status: \"new\", there is no difference in push speed push frequency: + * real-time + */ + public String orderV2(OrderV2Event.Callback callback); + + /** + * Get Stop Order This topic will push all change events of your stop orders. push frequency: + * real-time + */ + public String stopOrder(StopOrderEvent.Callback callback); + + /** Unsubscribe from topics */ + public void unSubscribe(String id); + + /** Start websocket */ + public void start(); + + /** Stop websocket */ + public void stop(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsAutoGeneratedTest.java new file mode 100644 index 00000000..c9f4d610 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsAutoGeneratedTest.java @@ -0,0 +1,87 @@ +package com.kucoin.universal.sdk.generate.spot.spotprivate; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.ArrayList; +import java.util.List; + +class SpotPrivateWsAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** account Get Account Balance /account/account/balance */ + public static void testAccountResponse() throws Exception { + String data = + "{\"topic\":\"/account/balance\",\"type\":\"message\",\"subject\":\"account.balance\",\"id\":\"354689988084000\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"accountId\":\"548674591753\",\"currency\":\"USDT\",\"total\":\"21.133773386762\",\"available\":\"20.132773386762\",\"hold\":\"1.001\",\"availableChange\":\"-0.5005\",\"holdChange\":\"0.5005\",\"relationContext\":{\"symbol\":\"BTC-USDT\",\"orderId\":\"6721d0632db25b0007071fdc\"},\"relationEvent\":\"trade.hold\",\"relationEventId\":\"354689988084000\",\"time\":\"1730269283892\"}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** orderV1 Get Order(V1) /orderV1/spotMarket/tradeOrders */ + public static void testOrderV1Response() throws Exception { + String data = + "{\"topic\":\"/spotMarket/tradeOrdersV2\",\"type\":\"message\",\"subject\":\"orderChange\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"canceledSize\":\"0\",\"clientOid\":\"5c52e11203aa677f33e493fb\",\"filledSize\":\"0\",\"orderId\":\"6720ecd9ec71f4000747731a\",\"orderTime\":1730211033305,\"orderType\":\"limit\",\"originSize\":\"0.00001\",\"price\":\"50000\",\"remainSize\":\"0.00001\",\"side\":\"buy\",\"size\":\"0.00001\",\"status\":\"open\",\"symbol\":\"BTC-USDT\",\"ts\":1730211033335000000,\"type\":\"open\"}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** orderV2 Get Order(V2) /orderV2/spotMarket/tradeOrdersV2 */ + public static void testOrderV2Response() throws Exception { + String 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\"}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** stopOrder Get Stop Order /stopOrder/spotMarket/advancedOrders */ + public static void testStopOrderResponse() throws Exception { + String 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}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(SpotPrivateWsAutoGeneratedTest::testAccountResponse, "testAccountResponse"); + run(SpotPrivateWsAutoGeneratedTest::testOrderV1Response, "testOrderV1Response"); + run(SpotPrivateWsAutoGeneratedTest::testOrderV2Response, "testOrderV2Response"); + run(SpotPrivateWsAutoGeneratedTest::testStopOrderResponse, "testStopOrderResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsImpl.java new file mode 100644 index 00000000..3a79658f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsImpl.java @@ -0,0 +1,59 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotprivate; + +import com.kucoin.universal.sdk.internal.interfaces.WebSocketService; + +public class SpotPrivateWsImpl implements SpotPrivateWs { + + private final WebSocketService wsService; + + public SpotPrivateWsImpl(WebSocketService wsService) { + this.wsService = wsService; + } + + public String account(AccountEvent.Callback callback) { + String topicPrefix = "/account/balance"; + + String[] args = {}; + + return this.wsService.subscribe(topicPrefix, args, AccountEvent.CallbackAdapters.of(callback)); + } + + public String orderV1(OrderV1Event.Callback callback) { + String topicPrefix = "/spotMarket/tradeOrders"; + + String[] args = {}; + + return this.wsService.subscribe(topicPrefix, args, OrderV1Event.CallbackAdapters.of(callback)); + } + + public String orderV2(OrderV2Event.Callback callback) { + String topicPrefix = "/spotMarket/tradeOrdersV2"; + + String[] args = {}; + + return this.wsService.subscribe(topicPrefix, args, OrderV2Event.CallbackAdapters.of(callback)); + } + + public String stopOrder(StopOrderEvent.Callback callback) { + String topicPrefix = "/spotMarket/advancedOrders"; + + String[] args = {}; + + return this.wsService.subscribe( + topicPrefix, args, StopOrderEvent.CallbackAdapters.of(callback)); + } + + public void unSubscribe(String id) { + this.wsService.unsubscribe(id); + } + + public void start() { + this.wsService.start(); + } + + public void stop() { + this.wsService.stop(); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/StopOrderEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/StopOrderEvent.java new file mode 100644 index 00000000..f39f5ed2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/StopOrderEvent.java @@ -0,0 +1,289 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotprivate; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class StopOrderEvent implements Response> { + /** Order created time (milliseconds) */ + @JsonProperty("createdAt") + private Long createdAt; + + /** The unique order id generated by the trading system */ + @JsonProperty("orderId") + private String orderId; + + /** Price */ + @JsonProperty("orderPrice") + private String orderPrice; + + /** User-specified order type */ + @JsonProperty("orderType") + private OrderTypeEnum orderType; + + /** buy or sell */ + @JsonProperty("side") + private SideEnum side; + + /** User-specified order size */ + @JsonProperty("size") + private String size; + + /** Order type */ + @JsonProperty("stop") + private StopEnum stop; + + /** Stop Price */ + @JsonProperty("stopPrice") + private String stopPrice; + + /** symbol */ + @JsonProperty("symbol") + private String symbol; + + /** + * The type of trading: TRADE (Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated + * Margin). + */ + @JsonProperty("tradeType") + private TradeTypeEnum tradeType; + + /** Push time (nanoseconds) */ + @JsonProperty("ts") + private Long ts; + + /** Order Type */ + @JsonProperty("type") + private TypeEnum type; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, StopOrderEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } + + public enum OrderTypeEnum { + /** stop */ + STOP("stop"); + + private final String value; + + OrderTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OrderTypeEnum fromValue(String value) { + for (OrderTypeEnum b : OrderTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum SideEnum { + /** buy */ + BUY("buy"), + /** sell */ + SELL("sell"); + + private final String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum StopEnum { + /** stop loss order */ + LOSS("loss"), + /** Take profit order */ + ENTRY("entry"), + /** Limit stop loss OCO order */ + LLO("l_l_o"), + /** Trigger stop loss OCO order */ + LSO("l_s_o"), + /** Limit stop profit OCO order */ + ELO("e_l_o"), + /** Trigger stop profit OCO order */ + ESO("e_s_o"), + /** Moving stop loss order */ + TSO("tso"); + + private final String value; + + StopEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StopEnum fromValue(String value) { + for (StopEnum b : StopEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public enum TradeTypeEnum { + /** Spot */ + TRADE("TRADE"), + /** Spot margin trade */ + MARGIN_TRADE("MARGIN_TRADE"), + /** Spot margin isolated trade */ + MARGIN_ISOLATED_TRADE("MARGIN_ISOLATED_TRADE"); + + private final String value; + + TradeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeTypeEnum fromValue(String value) { + for (TradeTypeEnum b : TradeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public 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"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java new file mode 100644 index 00000000..092155be --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java @@ -0,0 +1,75 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class AllTickersEvent + implements Response> { + /** + * + */ + @JsonProperty("bestAsk") private String bestAsk; + /** + * + */ + @JsonProperty("bestAskSize") private String bestAskSize; + /** + * + */ + @JsonProperty("bestBid") private String bestBid; + /** + * + */ + @JsonProperty("bestBidSize") private String bestBidSize; + /** + * + */ + @JsonProperty("price") private String price; + /** + * + */ + @JsonProperty("sequence") private String sequence; + /** + * + */ + @JsonProperty("size") private String size; + /** + * The matching time of the latest transaction + */ + @JsonProperty("time") private Long time; + /** + * common response + */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, AllTickersEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback + of(Callback callback) { + return msg + -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java new file mode 100644 index 00000000..0f31680a --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java @@ -0,0 +1,76 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CallAuctionInfoEvent + implements Response> { + /** + * Symbol + */ + @JsonProperty("symbol") private String symbol; + /** + * Estimated price + */ + @JsonProperty("estimatedPrice") private String estimatedPrice; + /** + * Estimated size + */ + @JsonProperty("estimatedSize") private String estimatedSize; + /** + * Sell ​​order minimum price + */ + @JsonProperty("sellOrderRangeLowPrice") private String sellOrderRangeLowPrice; + /** + * Sell ​​order maximum price + */ + @JsonProperty("sellOrderRangeHighPrice") + private String sellOrderRangeHighPrice; + /** + * Buy ​​order minimum price + */ + @JsonProperty("buyOrderRangeLowPrice") private String buyOrderRangeLowPrice; + /** + * Buy ​​order maximum price + */ + @JsonProperty("buyOrderRangeHighPrice") private String buyOrderRangeHighPrice; + /** + * Timestamp (ms) + */ + @JsonProperty("time") private Long time; + /** + * common response + */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, CallAuctionInfoEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback + of(Callback callback) { + return msg + -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java new file mode 100644 index 00000000..c3731323 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java @@ -0,0 +1,61 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class CallAuctionOrderbookLevel50Event + implements Response> { + /** + * price, size + */ + @JsonProperty("asks") private List> asks = new ArrayList<>(); + /** + * + */ + @JsonProperty("bids") private List> bids = new ArrayList<>(); + /** + * + */ + @JsonProperty("timestamp") private Long timestamp; + /** + * common response + */ + @JsonIgnore + private WsMessage commonResponse; + + @Override + public void + setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, + CallAuctionOrderbookLevel50Event data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback + of(Callback callback) { + return msg + -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java new file mode 100644 index 00000000..8e7ad6cb --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java @@ -0,0 +1,57 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class KlinesEvent + implements Response> { + /** + * symbol + */ + @JsonProperty("symbol") private String symbol; + /** + * Start time of the candle cycle,open price,close price, high price,low + * price,Transaction volume,Transaction amount + */ + @JsonProperty("candles") private List candles = new ArrayList<>(); + /** + * now(us) + */ + @JsonProperty("time") private Long time; + /** + * common response + */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, KlinesEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg + -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotData.java new file mode 100644 index 00000000..5b67c3ed --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotData.java @@ -0,0 +1,232 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +class MarketSnapshotData { + /** + * + */ + @JsonProperty("askSize") private Double askSize; + /** + * + */ + @JsonProperty("averagePrice") private Double averagePrice; + /** + * + */ + @JsonProperty("baseCurrency") private String baseCurrency; + /** + * + */ + @JsonProperty("bidSize") private Double bidSize; + /** + * Trading pair partition: 0. Primary partition 1.KuCoin Plus\", example = + * \"1\" + */ + @JsonProperty("board") private BoardEnum board; + /** + * + */ + @JsonProperty("buy") private Double buy; + /** + * + */ + @JsonProperty("changePrice") private Double changePrice; + /** + * + */ + @JsonProperty("changeRate") private Double changeRate; + /** + * + */ + @JsonProperty("close") private Double close; + /** + * + */ + @JsonProperty("datetime") private Long datetime; + /** + * + */ + @JsonProperty("high") private Double high; + /** + * + */ + @JsonProperty("lastTradedPrice") private Double lastTradedPrice; + /** + * + */ + @JsonProperty("low") private Double low; + /** + * + */ + @JsonProperty("makerCoefficient") private Double makerCoefficient; + /** + * + */ + @JsonProperty("makerFeeRate") private Double makerFeeRate; + /** + * + */ + @JsonProperty("marginTrade") private Boolean marginTrade; + /** + * Trading Pair Mark: 0. Default 1.ST. 2.NEW\", example = \"1\" + */ + @JsonProperty("mark") private MarkEnum mark; + /** + * + */ + @JsonProperty("market") private String market; + /** + * + */ + @JsonProperty("marketChange1h") + private MarketSnapshotDataMarketChange1h marketChange1h; + /** + * + */ + @JsonProperty("marketChange24h") + private MarketSnapshotDataMarketChange24h marketChange24h; + /** + * + */ + @JsonProperty("marketChange4h") + private MarketSnapshotDataMarketChange4h marketChange4h; + /** + * + */ + @JsonProperty("markets") private List markets = new ArrayList<>(); + /** + * + */ + @JsonProperty("open") private Double open; + /** + * + */ + @JsonProperty("quoteCurrency") private String quoteCurrency; + /** + * + */ + @JsonProperty("sell") private Double sell; + /** + * + */ + @JsonProperty("siteTypes") private List siteTypes = new ArrayList<>(); + /** + * sorting number + */ + @JsonProperty("sort") private Integer sort; + /** + * + */ + @JsonProperty("symbol") private String symbol; + /** + * + */ + @JsonProperty("symbolCode") private String symbolCode; + /** + * + */ + @JsonProperty("takerCoefficient") private Double takerCoefficient; + /** + * + */ + @JsonProperty("takerFeeRate") private Double takerFeeRate; + /** + * + */ + @JsonProperty("trading") private Boolean trading; + /** + * + */ + @JsonProperty("vol") private Double vol; + /** + * + */ + @JsonProperty("volValue") private Double volValue; + public enum BoardEnum { + /** + * primary partition + */ + _0(0), + /** + * KuCoin Plus + */ + _1(1); + + private final Integer value; + + BoardEnum(Integer value) { this.value = value; } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BoardEnum fromValue(Integer value) { + for (BoardEnum b : BoardEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + public enum MarkEnum { + /** + * default + */ + _0(0), + /** + * ST + */ + _1(1), + /** + * NEW + */ + _2(2); + + private final Integer value; + + MarkEnum(Integer value) { this.value = value; } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarkEnum fromValue(Integer value) { + for (MarkEnum b : MarkEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange1h.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange1h.java new file mode 100644 index 00000000..c1fbeb3f --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange1h.java @@ -0,0 +1,44 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +class MarketSnapshotDataMarketChange1h { + /** + * + */ + @JsonProperty("changePrice") private Double changePrice; + /** + * + */ + @JsonProperty("changeRate") private Double changeRate; + /** + * + */ + @JsonProperty("high") private Double high; + /** + * + */ + @JsonProperty("low") private Double low; + /** + * + */ + @JsonProperty("open") private Double open; + /** + * + */ + @JsonProperty("vol") private Double vol; + /** + * + */ + @JsonProperty("volValue") private Double volValue; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange24h.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange24h.java new file mode 100644 index 00000000..d4fb53e9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange24h.java @@ -0,0 +1,44 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +class MarketSnapshotDataMarketChange24h { + /** + * + */ + @JsonProperty("changePrice") private Double changePrice; + /** + * + */ + @JsonProperty("changeRate") private Double changeRate; + /** + * + */ + @JsonProperty("high") private Double high; + /** + * + */ + @JsonProperty("low") private Double low; + /** + * + */ + @JsonProperty("open") private Double open; + /** + * + */ + @JsonProperty("vol") private Double vol; + /** + * + */ + @JsonProperty("volValue") private Double volValue; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange4h.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange4h.java new file mode 100644 index 00000000..9f18459b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange4h.java @@ -0,0 +1,44 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +class MarketSnapshotDataMarketChange4h { + /** + * + */ + @JsonProperty("changePrice") private Double changePrice; + /** + * + */ + @JsonProperty("changeRate") private Double changeRate; + /** + * + */ + @JsonProperty("high") private Double high; + /** + * + */ + @JsonProperty("low") private Double low; + /** + * + */ + @JsonProperty("open") private Double open; + /** + * + */ + @JsonProperty("vol") private Double vol; + /** + * + */ + @JsonProperty("volValue") private Double volValue; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java new file mode 100644 index 00000000..82a2cd5b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java @@ -0,0 +1,51 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class MarketSnapshotEvent + implements Response> { + /** + * + */ + @JsonProperty("sequence") private String sequence; + /** + * + */ + @JsonProperty("data") private MarketSnapshotData data; + /** + * common response + */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, MarketSnapshotEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback + of(Callback callback) { + return msg + -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementChanges.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementChanges.java new file mode 100644 index 00000000..042f14a3 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementChanges.java @@ -0,0 +1,26 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +class OrderbookIncrementChanges { + /** + * price,size,sequence + */ + @JsonProperty("asks") private List> asks = new ArrayList<>(); + /** + * + */ + @JsonProperty("bids") private List> bids = new ArrayList<>(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java new file mode 100644 index 00000000..10c3ec68 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java @@ -0,0 +1,64 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class OrderbookIncrementEvent + implements Response> { + /** + * + */ + @JsonProperty("changes") private OrderbookIncrementChanges changes; + /** + * + */ + @JsonProperty("sequenceEnd") private Long sequenceEnd; + /** + * + */ + @JsonProperty("sequenceStart") private Long sequenceStart; + /** + * + */ + @JsonProperty("symbol") private String symbol; + /** + * milliseconds + */ + @JsonProperty("time") private Long time; + /** + * common response + */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, OrderbookIncrementEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback + of(Callback callback) { + return msg + -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java new file mode 100644 index 00000000..2b0463fb --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java @@ -0,0 +1,57 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class OrderbookLevel1Event + implements Response> { + /** + * price, size + */ + @JsonProperty("asks") private List asks = new ArrayList<>(); + /** + * + */ + @JsonProperty("bids") private List bids = new ArrayList<>(); + /** + * + */ + @JsonProperty("timestamp") private Long timestamp; + /** + * common response + */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, OrderbookLevel1Event data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback + of(Callback callback) { + return msg + -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java new file mode 100644 index 00000000..7d6da0e2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java @@ -0,0 +1,58 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class OrderbookLevel50Event + implements Response> { + /** + * price, size + */ + @JsonProperty("asks") private List> asks = new ArrayList<>(); + /** + * + */ + @JsonProperty("bids") private List> bids = new ArrayList<>(); + /** + * + */ + @JsonProperty("timestamp") private Long timestamp; + /** + * common response + */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, OrderbookLevel50Event data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback + of(Callback callback) { + return msg + -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java new file mode 100644 index 00000000..8a94e68e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java @@ -0,0 +1,57 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class OrderbookLevel5Event + implements Response> { + /** + * price, size + */ + @JsonProperty("asks") private List> asks = new ArrayList<>(); + /** + * + */ + @JsonProperty("bids") private List> bids = new ArrayList<>(); + /** + * + */ + @JsonProperty("timestamp") private Long timestamp; + /** + * common response + */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, OrderbookLevel5Event data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback + of(Callback callback) { + return msg + -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWs.java new file mode 100644 index 00000000..80770a59 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWs.java @@ -0,0 +1,119 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +public interface SpotPublicWs { + + /** + * Get All Tickers + * Subscribe to this topic to get pushes on all market symbol BBO changes. + * push frequency: once every 100ms + */ + public String allTickers(AllTickersEvent.Callback callback); + + /** + * Get Call Auction Info + * Subscribe to this topic to get the specified symbol call auction info. + * push frequency: once every 100ms + */ + public String callAuctionInfo(String symbol, + CallAuctionInfoEvent.Callback callback); + + /** + * 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 + */ + public String callAuctionOrderbookLevel50( + String symbol, CallAuctionOrderbookLevel50Event.Callback callback); + + /** + * Klines + * Subscribe to this topic to get K-Line data. + * push frequency: real-time + */ + public String klines(String symbol, String type, + KlinesEvent.Callback callback); + + /** + * Market Snapshot + * Subscribe to this topic to get snapshot data for the entire market. + * push frequency: once every 2s + */ + public String marketSnapshot(String market, + MarketSnapshotEvent.Callback callback); + + /** + * Orderbook - Increment + * 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 + */ + public String orderbookIncrement(String[] symbol, + OrderbookIncrementEvent.Callback callback); + + /** + * 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 push frequency: once every 10ms + */ + public String orderbookLevel1(String[] symbol, + OrderbookLevel1Event.Callback callback); + + /** + * Orderbook - Level50 + * 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 + */ + public String orderbookLevel50(String[] symbol, + OrderbookLevel50Event.Callback callback); + + /** + * 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 push frequency: once every 100ms + */ + public String orderbookLevel5(String[] symbol, + OrderbookLevel5Event.Callback callback); + + /** + * Symbol Snapshot + * Subscribe to get snapshot data for a single symbol. + * push frequency: once every 2s + */ + public String symbolSnapshot(String symbol, + SymbolSnapshotEvent.Callback callback); + + /** + * Get Ticker + * Subscribe to this topic to get specified symbol pushes on BBO changes. + * push frequency: once every 100ms + */ + public String ticker(String[] symbol, TickerEvent.Callback callback); + + /** + * Trade + * Subscribe to this topic to get Level 3 matching event data flows. A topic + * supports up to 100 symbols. push frequency: real-time + */ + public String trade(String[] symbol, TradeEvent.Callback callback); + + /** + * Unsubscribe from topics + */ + public void unSubscribe(String id); + + /** + * Start websocket + */ + public void start(); + + /** + * Stop websocket + */ + public void stop(); +} \ No newline at end of file diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsAutoGeneratedTest.java new file mode 100644 index 00000000..3a063011 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsAutoGeneratedTest.java @@ -0,0 +1,208 @@ +package com.kucoin.universal.sdk.generate.spot.spotpublic; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.WsMessage; +import java.util.ArrayList; +import java.util.List; + +class SpotPublicWsAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** + * allTickers + * Get All Tickers + * /allTickers/market/ticker:all + */ + public static void testAllTickersResponse() throws Exception { + String data = + "{\"topic\":\"/market/ticker:all\",\"type\":\"message\",\"subject\":\"BTC-USDT\",\"data\":{\"bestAsk\":\"67218.7\",\"bestAskSize\":\"1.92318539\",\"bestBid\":\"67218.6\",\"bestBidSize\":\"0.01045638\",\"price\":\"67220\",\"sequence\":\"14691455768\",\"size\":\"0.00004316\",\"time\":1729757723612}}"; + WsMessage resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * callAuctionInfo + * Get Call Auction Info + * /callAuctionInfo/callauction/callauctionData:_symbol_ + */ + public static void testCallAuctionInfoResponse() throws Exception { + String 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}}"; + WsMessage resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * callAuctionOrderbookLevel50 + * CallAuctionOrderbook - Level50 + * /callAuctionOrderbookLevel50/callauction/level2Depth50:_symbol_ + */ + public static void testCallAuctionOrderbookLevel50Response() + throws Exception { + String 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}}"; + WsMessage resp = mapper.readValue( + data, + new TypeReference>() {}); + } + /** + * klines + * Klines + * /klines/market/candles:_symbol___type_ + */ + public static void testKlinesResponse() throws Exception { + String data = + "{\"topic\":\"/market/candles:BTC-USDT_1hour\",\"type\":\"message\",\"subject\":\"trade.candles.update\",\"data\":{\"symbol\":\"BTC-USDT\",\"candles\":[\"1729839600\",\"67644.9\",\"67437.6\",\"67724.8\",\"67243.8\",\"44.88321441\",\"3027558.991928447\"],\"time\":1729842192785164840}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + /** + * marketSnapshot + * Market Snapshot + * /marketSnapshot/market/snapshot:_market_ + */ + public static void testMarketSnapshotResponse() throws Exception { + String data = + "{\"topic\":\"/market/snapshot:BTC\",\"type\":\"message\",\"subject\":\"trade.snapshot\",\"data\":{\"sequence\":\"1729785948015\",\"data\":{\"askSize\":1375.1096,\"averagePrice\":0.00000262,\"baseCurrency\":\"CHR\",\"bidSize\":152.0912,\"board\":0,\"buy\":0.00000263,\"changePrice\":0.00000005300000000000,\"changeRate\":0.0200,\"close\":0.000002698,\"datetime\":1729785948008,\"high\":0.00000274600000000000,\"lastTradedPrice\":0.000002698,\"low\":0.00000255800000000000,\"makerCoefficient\":1.000000,\"makerFeeRate\":0.001,\"marginTrade\":false,\"mark\":0,\"market\":\"BTC\",\"marketChange1h\":{\"changePrice\":-0.00000000900000000000,\"changeRate\":-0.0033,\"high\":0.00000270700000000000,\"low\":0.00000264200000000000,\"open\":0.00000270700000000000,\"vol\":27.10350000000000000000,\"volValue\":0.00007185015660000000},\"marketChange24h\":{\"changePrice\":0.00000005300000000000,\"changeRate\":0.0200,\"high\":0.00000274600000000000,\"low\":0.00000255800000000000,\"open\":0.00000264500000000000,\"vol\":6824.94800000000000000000,\"volValue\":0.01789509649520000000},\"marketChange4h\":{\"changePrice\":0.00000000600000000000,\"changeRate\":0.0022,\"high\":0.00000270700000000000,\"low\":0.00000264200000000000,\"open\":0.00000269200000000000,\"vol\":92.69020000000000000000,\"volValue\":0.00024903875740000000},\"markets\":[\"BTC\",\"DePIN\",\"Layer 1\"],\"open\":0.00000264500000000000,\"quoteCurrency\":\"BTC\",\"sell\":0.000002695,\"siteTypes\":[\"global\"],\"sort\":100,\"symbol\":\"CHR-BTC\",\"symbolCode\":\"CHR-BTC\",\"takerCoefficient\":1.000000,\"takerFeeRate\":0.001,\"trading\":true,\"vol\":6824.94800000000000000000,\"volValue\":0.01789509649520000000}}}"; + WsMessage resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * orderbookIncrement + * Orderbook - Increment + * /orderbookIncrement/market/level2:_symbol_,_symbol_ + */ + public static void testOrderbookIncrementResponse() throws Exception { + String data = + "{\"topic\":\"/market/level2:BTC-USDT\",\"type\":\"message\",\"subject\":\"trade.l2update\",\"data\":{\"changes\":{\"asks\":[[\"67993.3\",\"1.21427407\",\"14701689783\"]],\"bids\":[]},\"sequenceEnd\":14701689783,\"sequenceStart\":14701689783,\"symbol\":\"BTC-USDT\",\"time\":1729816425625}}"; + WsMessage resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * orderbookLevel1 + * Orderbook - Level1 + * /orderbookLevel1/spotMarket/level1:_symbol_,_symbol_ + */ + public static void testOrderbookLevel1Response() throws Exception { + String data = + "{\"topic\":\"/spotMarket/level1:BTC-USDT\",\"type\":\"message\",\"subject\":\"level1\",\"data\":{\"asks\":[\"68145.8\",\"0.51987471\"],\"bids\":[\"68145.7\",\"1.29267802\"],\"timestamp\":1729816058766}}"; + WsMessage resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * orderbookLevel50 + * Orderbook - Level50 + * /orderbookLevel50/spotMarket/level2Depth50:_symbol_,_symbol_ + */ + public static void testOrderbookLevel50Response() throws Exception { + String 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}}"; + WsMessage resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * orderbookLevel5 + * Orderbook - Level5 + * /orderbookLevel5/spotMarket/level2Depth5:_symbol_,_symbol_ + */ + public static void testOrderbookLevel5Response() throws Exception { + String data = + "{\"topic\":\"/spotMarket/level2Depth5:BTC-USDT\",\"type\":\"message\",\"subject\":\"level2\",\"data\":{\"asks\":[[\"67996.7\",\"1.14213262\"],[\"67996.8\",\"0.21748212\"],[\"67996.9\",\"0.1503747\"],[\"67997\",\"0.11446863\"],[\"67997.1\",\"0.14842782\"]],\"bids\":[[\"67996.6\",\"0.37969491\"],[\"67995.3\",\"0.20779746\"],[\"67994.5\",\"0.00047785\"],[\"67993.4\",\"0.405\"],[\"67993.3\",\"0.13528566\"]],\"timestamp\":1729822226746}}"; + WsMessage resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * symbolSnapshot + * Symbol Snapshot + * /symbolSnapshot/market/snapshot:_symbol_ + */ + public static void testSymbolSnapshotResponse() throws Exception { + String data = + "{\"topic\":\"/market/snapshot:BTC-USDT\",\"type\":\"message\",\"subject\":\"trade.snapshot\",\"data\":{\"sequence\":\"14691517895\",\"data\":{\"askSize\":1.15955795,\"averagePrice\":66867.89967612,\"baseCurrency\":\"BTC\",\"bidSize\":0.81772627,\"board\":1,\"buy\":67158.1,\"changePrice\":315.20000000000000000000,\"changeRate\":0.0047,\"close\":67158.1,\"datetime\":1729758286011,\"high\":67611.80000000000000000000,\"lastTradedPrice\":67158.1,\"low\":65257.10000000000000000000,\"makerCoefficient\":1.000000,\"makerFeeRate\":0.001,\"marginTrade\":true,\"mark\":0,\"market\":\"USDS\",\"marketChange1h\":{\"changePrice\":-102.10000000000000000000,\"changeRate\":-0.0015,\"high\":67310.60000000000000000000,\"low\":67051.80000000000000000000,\"open\":67260.20000000000000000000,\"vol\":53.73698081000000000000,\"volValue\":3609965.13819127700000000000},\"marketChange24h\":{\"changePrice\":315.20000000000000000000,\"changeRate\":0.0047,\"high\":67611.80000000000000000000,\"low\":65257.10000000000000000000,\"open\":66842.90000000000000000000,\"vol\":2227.69895852000000000000,\"volValue\":147972941.07857507300000000000},\"marketChange4h\":{\"changePrice\":-166.30000000000000000000,\"changeRate\":-0.0024,\"high\":67476.60000000000000000000,\"low\":67051.80000000000000000000,\"open\":67324.40000000000000000000,\"vol\":173.76971188000000000000,\"volValue\":11695949.43841656500000000000},\"markets\":[\"USDS\",\"PoW\"],\"open\":66842.90000000000000000000,\"quoteCurrency\":\"USDT\",\"sell\":67158.2,\"siteTypes\":[\"turkey\",\"thailand\",\"global\"],\"sort\":100,\"symbol\":\"BTC-USDT\",\"symbolCode\":\"BTC-USDT\",\"takerCoefficient\":1.000000,\"takerFeeRate\":0.001,\"trading\":true,\"vol\":2227.69895852000000000000,\"volValue\":147972941.07857507300000000000}}}"; + WsMessage resp = mapper.readValue( + data, new TypeReference>() {}); + } + /** + * ticker + * Get Ticker + * /ticker/market/ticker:_symbol_,_symbol_ + */ + public static void testTickerResponse() throws Exception { + String data = + "{\"type\":\"message\",\"topic\":\"/market/ticker:BTC-USDT\",\"subject\":\"trade.ticker\",\"data\":{\"sequence\":\"1545896668986\",\"price\":\"0.08\",\"size\":\"0.011\",\"bestAsk\":\"0.08\",\"bestAskSize\":\"0.18\",\"bestBid\":\"0.049\",\"bestBidSize\":\"0.036\",\"Time\":1704873323416}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + /** + * trade + * Trade + * /trade/market/match:_symbol_,_symbol_ + */ + public static void testTradeResponse() throws Exception { + String data = + "{\"topic\":\"/market/match:BTC-USDT\",\"type\":\"message\",\"subject\":\"trade.l3match\",\"data\":{\"makerOrderId\":\"671b5007389355000701b1d3\",\"price\":\"67523\",\"sequence\":\"11067996711960577\",\"side\":\"buy\",\"size\":\"0.003\",\"symbol\":\"BTC-USDT\",\"takerOrderId\":\"671b50161777ff00074c168d\",\"time\":\"1729843222921000000\",\"tradeId\":\"11067996711960577\",\"type\":\"match\"}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(SpotPublicWsAutoGeneratedTest::testAllTickersResponse, + "testAllTickersResponse"); + run(SpotPublicWsAutoGeneratedTest::testCallAuctionInfoResponse, + "testCallAuctionInfoResponse"); + run(SpotPublicWsAutoGeneratedTest::testCallAuctionOrderbookLevel50Response, + "testCallAuctionOrderbookLevel50Response"); + run(SpotPublicWsAutoGeneratedTest::testKlinesResponse, + "testKlinesResponse"); + run(SpotPublicWsAutoGeneratedTest::testMarketSnapshotResponse, + "testMarketSnapshotResponse"); + run(SpotPublicWsAutoGeneratedTest::testOrderbookIncrementResponse, + "testOrderbookIncrementResponse"); + run(SpotPublicWsAutoGeneratedTest::testOrderbookLevel1Response, + "testOrderbookLevel1Response"); + run(SpotPublicWsAutoGeneratedTest::testOrderbookLevel50Response, + "testOrderbookLevel50Response"); + run(SpotPublicWsAutoGeneratedTest::testOrderbookLevel5Response, + "testOrderbookLevel5Response"); + run(SpotPublicWsAutoGeneratedTest::testSymbolSnapshotResponse, + "testSymbolSnapshotResponse"); + run(SpotPublicWsAutoGeneratedTest::testTickerResponse, + "testTickerResponse"); + run(SpotPublicWsAutoGeneratedTest::testTradeResponse, "testTradeResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} \ No newline at end of file diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsImpl.java new file mode 100644 index 00000000..68428077 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsImpl.java @@ -0,0 +1,138 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketService; + +public class SpotPublicWsImpl implements SpotPublicWs { + + private final WebSocketService wsService; + + public SpotPublicWsImpl(WebSocketService wsService) { + this.wsService = wsService; + } + + public String allTickers(AllTickersEvent.Callback callback) { + String topicPrefix = "/market/ticker:all"; + + String[] args = {}; + + return this.wsService.subscribe( + topicPrefix, args, AllTickersEvent.CallbackAdapters.of(callback)); + } + + public String callAuctionInfo(String symbol, + CallAuctionInfoEvent.Callback callback) { + String topicPrefix = "/callauction/callauctionData"; + + String[] args = {symbol}; + + return this.wsService.subscribe( + topicPrefix, args, CallAuctionInfoEvent.CallbackAdapters.of(callback)); + } + + public String callAuctionOrderbookLevel50( + String symbol, CallAuctionOrderbookLevel50Event.Callback callback) { + String topicPrefix = "/callauction/level2Depth50"; + + String[] args = {symbol}; + + return this.wsService.subscribe( + topicPrefix, args, + CallAuctionOrderbookLevel50Event.CallbackAdapters.of(callback)); + } + + public String klines(String symbol, String type, + KlinesEvent.Callback callback) { + String topicPrefix = "/market/candles"; + + String[] args = {String.join("_", symbol, type)}; + + return this.wsService.subscribe(topicPrefix, args, + KlinesEvent.CallbackAdapters.of(callback)); + } + + public String marketSnapshot(String market, + MarketSnapshotEvent.Callback callback) { + String topicPrefix = "/market/snapshot"; + + String[] args = {market}; + + return this.wsService.subscribe( + topicPrefix, args, MarketSnapshotEvent.CallbackAdapters.of(callback)); + } + + public String orderbookIncrement(String[] symbol, + OrderbookIncrementEvent.Callback callback) { + String topicPrefix = "/market/level2"; + + String[] args = symbol; + + return this.wsService.subscribe( + topicPrefix, args, + OrderbookIncrementEvent.CallbackAdapters.of(callback)); + } + + public String orderbookLevel1(String[] symbol, + OrderbookLevel1Event.Callback callback) { + String topicPrefix = "/spotMarket/level1"; + + String[] args = symbol; + + return this.wsService.subscribe( + topicPrefix, args, OrderbookLevel1Event.CallbackAdapters.of(callback)); + } + + public String orderbookLevel50(String[] symbol, + OrderbookLevel50Event.Callback callback) { + String topicPrefix = "/spotMarket/level2Depth50"; + + String[] args = symbol; + + return this.wsService.subscribe( + topicPrefix, args, OrderbookLevel50Event.CallbackAdapters.of(callback)); + } + + public String orderbookLevel5(String[] symbol, + OrderbookLevel5Event.Callback callback) { + String topicPrefix = "/spotMarket/level2Depth5"; + + String[] args = symbol; + + return this.wsService.subscribe( + topicPrefix, args, OrderbookLevel5Event.CallbackAdapters.of(callback)); + } + + public String symbolSnapshot(String symbol, + SymbolSnapshotEvent.Callback callback) { + String topicPrefix = "/market/snapshot"; + + String[] args = {symbol}; + + return this.wsService.subscribe( + topicPrefix, args, SymbolSnapshotEvent.CallbackAdapters.of(callback)); + } + + public String ticker(String[] symbol, TickerEvent.Callback callback) { + String topicPrefix = "/market/ticker"; + + String[] args = symbol; + + return this.wsService.subscribe(topicPrefix, args, + TickerEvent.CallbackAdapters.of(callback)); + } + + public String trade(String[] symbol, TradeEvent.Callback callback) { + String topicPrefix = "/market/match"; + + String[] args = symbol; + + return this.wsService.subscribe(topicPrefix, args, + TradeEvent.CallbackAdapters.of(callback)); + } + + public void unSubscribe(String id) { this.wsService.unsubscribe(id); } + + public void start() { this.wsService.start(); } + + public void stop() { this.wsService.stop(); } +} \ No newline at end of file diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotData.java new file mode 100644 index 00000000..b7c7d609 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotData.java @@ -0,0 +1,232 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +class SymbolSnapshotData { + /** + * + */ + @JsonProperty("askSize") private Double askSize; + /** + * + */ + @JsonProperty("averagePrice") private Double averagePrice; + /** + * + */ + @JsonProperty("baseCurrency") private String baseCurrency; + /** + * + */ + @JsonProperty("bidSize") private Double bidSize; + /** + * Trading pair partition: 0. Primary partition 1.KuCoin Plus\", example = + * \"1\" + */ + @JsonProperty("board") private BoardEnum board; + /** + * + */ + @JsonProperty("buy") private Double buy; + /** + * + */ + @JsonProperty("changePrice") private Double changePrice; + /** + * + */ + @JsonProperty("changeRate") private Double changeRate; + /** + * + */ + @JsonProperty("close") private Double close; + /** + * + */ + @JsonProperty("datetime") private Long datetime; + /** + * + */ + @JsonProperty("high") private Double high; + /** + * + */ + @JsonProperty("lastTradedPrice") private Double lastTradedPrice; + /** + * + */ + @JsonProperty("low") private Double low; + /** + * + */ + @JsonProperty("makerCoefficient") private Double makerCoefficient; + /** + * + */ + @JsonProperty("makerFeeRate") private Double makerFeeRate; + /** + * + */ + @JsonProperty("marginTrade") private Boolean marginTrade; + /** + * Trading Pair Mark: 0. Default 1.ST. 2.NEW\", example = \"1\" + */ + @JsonProperty("mark") private MarkEnum mark; + /** + * + */ + @JsonProperty("market") private String market; + /** + * + */ + @JsonProperty("marketChange1h") + private SymbolSnapshotDataMarketChange1h marketChange1h; + /** + * + */ + @JsonProperty("marketChange24h") + private SymbolSnapshotDataMarketChange24h marketChange24h; + /** + * + */ + @JsonProperty("marketChange4h") + private SymbolSnapshotDataMarketChange4h marketChange4h; + /** + * + */ + @JsonProperty("markets") private List markets = new ArrayList<>(); + /** + * + */ + @JsonProperty("open") private Double open; + /** + * + */ + @JsonProperty("quoteCurrency") private String quoteCurrency; + /** + * + */ + @JsonProperty("sell") private Double sell; + /** + * + */ + @JsonProperty("siteTypes") private List siteTypes = new ArrayList<>(); + /** + * sorting number(Pointless) + */ + @JsonProperty("sort") private Integer sort; + /** + * + */ + @JsonProperty("symbol") private String symbol; + /** + * + */ + @JsonProperty("symbolCode") private String symbolCode; + /** + * + */ + @JsonProperty("takerCoefficient") private Double takerCoefficient; + /** + * + */ + @JsonProperty("takerFeeRate") private Double takerFeeRate; + /** + * + */ + @JsonProperty("trading") private Boolean trading; + /** + * + */ + @JsonProperty("vol") private Double vol; + /** + * 24-hour rolling transaction volume, refreshed every 2s + */ + @JsonProperty("volValue") private Double volValue; + public enum BoardEnum { + /** + * primary partition + */ + _0(0), + /** + * KuCoin Plus + */ + _1(1); + + private final Integer value; + + BoardEnum(Integer value) { this.value = value; } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BoardEnum fromValue(Integer value) { + for (BoardEnum b : BoardEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + public enum MarkEnum { + /** + * default + */ + _0(0), + /** + * ST + */ + _1(1), + /** + * NEW + */ + _2(2); + + private final Integer value; + + MarkEnum(Integer value) { this.value = value; } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MarkEnum fromValue(Integer value) { + for (MarkEnum b : MarkEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange1h.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange1h.java new file mode 100644 index 00000000..9a02c2a9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange1h.java @@ -0,0 +1,44 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +class SymbolSnapshotDataMarketChange1h { + /** + * + */ + @JsonProperty("changePrice") private Double changePrice; + /** + * + */ + @JsonProperty("changeRate") private Double changeRate; + /** + * + */ + @JsonProperty("high") private Double high; + /** + * + */ + @JsonProperty("low") private Double low; + /** + * + */ + @JsonProperty("open") private Double open; + /** + * + */ + @JsonProperty("vol") private Double vol; + /** + * + */ + @JsonProperty("volValue") private Double volValue; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange24h.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange24h.java new file mode 100644 index 00000000..ba52d025 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange24h.java @@ -0,0 +1,44 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +class SymbolSnapshotDataMarketChange24h { + /** + * + */ + @JsonProperty("changePrice") private Double changePrice; + /** + * + */ + @JsonProperty("changeRate") private Double changeRate; + /** + * + */ + @JsonProperty("high") private Double high; + /** + * + */ + @JsonProperty("low") private Double low; + /** + * + */ + @JsonProperty("open") private Double open; + /** + * + */ + @JsonProperty("vol") private Double vol; + /** + * + */ + @JsonProperty("volValue") private Double volValue; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange4h.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange4h.java new file mode 100644 index 00000000..99d4f52b --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange4h.java @@ -0,0 +1,44 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +class SymbolSnapshotDataMarketChange4h { + /** + * + */ + @JsonProperty("changePrice") private Double changePrice; + /** + * + */ + @JsonProperty("changeRate") private Double changeRate; + /** + * + */ + @JsonProperty("high") private Double high; + /** + * + */ + @JsonProperty("low") private Double low; + /** + * + */ + @JsonProperty("open") private Double open; + /** + * + */ + @JsonProperty("vol") private Double vol; + /** + * + */ + @JsonProperty("volValue") private Double volValue; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java new file mode 100644 index 00000000..8614de70 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java @@ -0,0 +1,51 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class SymbolSnapshotEvent + implements Response> { + /** + * + */ + @JsonProperty("sequence") private String sequence; + /** + * + */ + @JsonProperty("data") private SymbolSnapshotData data; + /** + * common response + */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, SymbolSnapshotEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback + of(Callback callback) { + return msg + -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java new file mode 100644 index 00000000..6ceddf13 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java @@ -0,0 +1,74 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class TickerEvent + implements Response> { + /** + * Sequence number + */ + @JsonProperty("sequence") private String sequence; + /** + * Last traded price + */ + @JsonProperty("price") private String price; + /** + * Last traded amount + */ + @JsonProperty("size") private String size; + /** + * Best ask price + */ + @JsonProperty("bestAsk") private String bestAsk; + /** + * Best ask size + */ + @JsonProperty("bestAskSize") private String bestAskSize; + /** + * Best bid price + */ + @JsonProperty("bestBid") private String bestBid; + /** + * Best bid size + */ + @JsonProperty("bestBidSize") private String bestBidSize; + /** + * The matching time of the latest transaction + */ + @JsonProperty("time") private Long time; + /** + * common response + */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, TickerEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg + -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java new file mode 100644 index 00000000..f170ba31 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java @@ -0,0 +1,81 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.spot.spotpublic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import com.kucoin.universal.sdk.model.WsMessage; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class TradeEvent implements Response> { + /** + * + */ + @JsonProperty("makerOrderId") private String makerOrderId; + /** + * + */ + @JsonProperty("price") private String price; + /** + * + */ + @JsonProperty("sequence") private String sequence; + /** + * + */ + @JsonProperty("side") private String side; + /** + * + */ + @JsonProperty("size") private String size; + /** + * + */ + @JsonProperty("symbol") private String symbol; + /** + * + */ + @JsonProperty("takerOrderId") private String takerOrderId; + /** + * + */ + @JsonProperty("time") private String time; + /** + * + */ + @JsonProperty("tradeId") private String tradeId; + /** + * + */ + @JsonProperty("type") private String type; + /** + * common response + */ + @JsonIgnore private WsMessage commonResponse; + + @Override + public void setCommonResponse(WsMessage response) { + this.commonResponse = response; + } + + @FunctionalInterface + public interface Callback { + void onEvent(String topic, String subject, TradeEvent data); + } + + public static class CallbackAdapters { + public static WebSocketMessageCallback of(Callback callback) { + return msg + -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetAccountsData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetAccountsData.java new file mode 100644 index 00000000..dd6a8fe3 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetAccountsData.java @@ -0,0 +1,39 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.viplending.viplending; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAccountsData { + /** UID */ + @JsonProperty("uid") + private String uid; + + /** Margin Currency */ + @JsonProperty("marginCcy") + private String marginCcy; + + /** Maintenance Quantity (Calculated with Margin Coefficient) */ + @JsonProperty("marginQty") + private String marginQty; + + /** Margin Coefficient */ + @JsonProperty("marginFactor") + private String marginFactor; + + /** Account Type: TRADE - Trading Account CONTRACT - Futures Account (for Total Futures Equity) */ + @JsonProperty("accountType") + private String accountType; + + /** If It Is Master Account */ + @JsonProperty("isParent") + private Boolean isParent; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetAccountsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetAccountsResp.java new file mode 100644 index 00000000..9c1e8e37 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetAccountsResp.java @@ -0,0 +1,41 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.viplending.viplending; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetAccountsResp implements Response> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetAccountsResp fromJson(List data) { + // original response + GetAccountsResp obj = new GetAccountsResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetDiscountRateConfigsData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetDiscountRateConfigsData.java new file mode 100644 index 00000000..a04153fb --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetDiscountRateConfigsData.java @@ -0,0 +1,25 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.viplending.viplending; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDiscountRateConfigsData { + /** Currency */ + @JsonProperty("currency") + private String currency; + + /** Gradient configuration list, amount converted into USDT */ + @JsonProperty("usdtLevels") + private List usdtLevels = new ArrayList<>(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetDiscountRateConfigsDataUsdtLevels.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetDiscountRateConfigsDataUsdtLevels.java new file mode 100644 index 00000000..f4deebcf --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetDiscountRateConfigsDataUsdtLevels.java @@ -0,0 +1,27 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.viplending.viplending; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetDiscountRateConfigsDataUsdtLevels { + /** Left end point of gradient interval, left> { + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } + + @JsonCreator + public static GetDiscountRateConfigsResp fromJson(List data) { + // original response + GetDiscountRateConfigsResp obj = new GetDiscountRateConfigsResp(); + obj.data = data; + return obj; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetLoanInfoLtv.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetLoanInfoLtv.java new file mode 100644 index 00000000..1e2a5975 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetLoanInfoLtv.java @@ -0,0 +1,35 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.viplending.viplending; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetLoanInfoLtv { + /** LTV of Restricted Transfers to Funding Account */ + @JsonProperty("transferLtv") + private String transferLtv; + + /** LTV of Reduce Only (Restricted Open Positions) */ + @JsonProperty("onlyClosePosLtv") + private String onlyClosePosLtv; + + /** LTV of Delayed Liquidation */ + @JsonProperty("delayedLiquidationLtv") + private String delayedLiquidationLtv; + + /** LTV of Instant Liquidation */ + @JsonProperty("instantLiquidationLtv") + private String instantLiquidationLtv; + + /** Current LTV */ + @JsonProperty("currentLtv") + private String currentLtv; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetLoanInfoMargins.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetLoanInfoMargins.java new file mode 100644 index 00000000..9dad0cb0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetLoanInfoMargins.java @@ -0,0 +1,27 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.viplending.viplending; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetLoanInfoMargins { + /** Margin Currency */ + @JsonProperty("marginCcy") + private String marginCcy; + + /** Maintenance Quantity (Calculated with Margin Coefficient) */ + @JsonProperty("marginQty") + private String marginQty; + + /** Margin Coefficient return real-time margin discount rate to USDT */ + @JsonProperty("marginFactor") + private String marginFactor; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetLoanInfoOrders.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetLoanInfoOrders.java new file mode 100644 index 00000000..0636de5e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetLoanInfoOrders.java @@ -0,0 +1,31 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.viplending.viplending; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetLoanInfoOrders { + /** Loan Orders ID */ + @JsonProperty("orderId") + private String orderId; + + /** Principal to Be Repaid */ + @JsonProperty("principal") + private String principal; + + /** Interest to Be Repaid */ + @JsonProperty("interest") + private String interest; + + /** Loan Currency */ + @JsonProperty("currency") + private String currency; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetLoanInfoResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetLoanInfoResp.java new file mode 100644 index 00000000..479d59ae --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetLoanInfoResp.java @@ -0,0 +1,52 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.viplending.viplending; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetLoanInfoResp implements Response> { + /** Master UID */ + @JsonProperty("parentUid") + private String parentUid; + + /** Loan Orders */ + @JsonProperty("orders") + private List orders = new ArrayList<>(); + + /** */ + @JsonProperty("ltv") + private GetLoanInfoLtv ltv; + + /** Total Margin Amount (USDT) */ + @JsonProperty("totalMarginAmount") + private String totalMarginAmount; + + /** Total Maintenance Margin for Restricted Transfers (USDT) */ + @JsonProperty("transferMarginAmount") + private String transferMarginAmount; + + /** */ + @JsonProperty("margins") + private List margins = new ArrayList<>(); + + /** common response */ + @JsonIgnore private RestResponse commonResponse; + + @Override + public void setCommonResponse(RestResponse response) { + this.commonResponse = response; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.java new file mode 100644 index 00000000..18c2215d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.java @@ -0,0 +1,36 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.viplending.viplending; + +public interface VipLendingApi { + /** + * Get Discount Rate Configs Get the gradient discount rate of each currency docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+---------+ + */ + GetDiscountRateConfigsResp getDiscountRateConfigs(); + + /** + * Get Loan Info 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. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+------------+ + */ + GetLoanInfoResp getLoanInfo(); + + /** + * Get Accounts Accounts participating in OTC lending. This interface is only for querying + * accounts currently running OTC lending. docs + * +-----------------------+------------+ | Extra API Info | Value | + * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | + * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ + */ + GetAccountsResp getAccounts(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.template new file mode 100644 index 00000000..6274a2fa --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.template @@ -0,0 +1,62 @@ + + /** + * getDiscountRateConfigs + * Get Discount Rate Configs + * /api/v1/otc-loan/discount-rate-configs + */ + public void testGetDiscountRateConfigs() { + GetDiscountRateConfigsResp resp = this.api.getDiscountRateConfigs(); + foreach($resp->data as $item) { + self::assertNotNull($item->currency); + self::assertNotNull($item->usdtLevels); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getLoanInfo + * Get Loan Info + * /api/v1/otc-loan/loan + */ + public void testGetLoanInfo() { + GetLoanInfoResp resp = this.api.getLoanInfo(); + self::assertNotNull($resp->parentUid); + foreach($resp->orders as $item) { + self::assertNotNull($item->orderId); + self::assertNotNull($item->principal); + self::assertNotNull($item->interest); + self::assertNotNull($item->currency); + } + + self::assertNotNull($resp->ltv); + self::assertNotNull($resp->totalMarginAmount); + self::assertNotNull($resp->transferMarginAmount); + foreach($resp->margins as $item) { + self::assertNotNull($item->marginCcy); + self::assertNotNull($item->marginQty); + self::assertNotNull($item->marginFactor); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + + /** + * getAccounts + * Get Accounts + * /api/v1/otc-loan/accounts + */ + public void testGetAccounts() { + GetAccountsResp resp = this.api.getAccounts(); + foreach($resp->data as $item) { + self::assertNotNull($item->uid); + self::assertNotNull($item->marginCcy); + self::assertNotNull($item->marginQty); + self::assertNotNull($item->marginFactor); + self::assertNotNull($item->accountType); + self::assertNotNull($item->isParent); + } + + Logger::info($resp->jsonSerialize($this->serializer)); + } + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiAutoGeneratedTest.java new file mode 100644 index 00000000..244f9931 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiAutoGeneratedTest.java @@ -0,0 +1,175 @@ +package com.kucoin.universal.sdk.generate.viplending.viplending; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class VipLendingApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** + * getDiscountRateConfigs Request Get Discount Rate Configs /api/v1/otc-loan/discount-rate-configs + */ + public static void testGetDiscountRateConfigsRequest() throws Exception { + // $this->assertTrue(true); + } + + /** + * getDiscountRateConfigs Response Get Discount Rate Configs + * /api/v1/otc-loan/discount-rate-configs + */ + public static void testGetDiscountRateConfigsResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getLoanInfo Request Get Loan Info /api/v1/otc-loan/loan */ + public static void testGetLoanInfoRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getLoanInfo Response Get Loan Info /api/v1/otc-loan/loan */ + public static void testGetLoanInfoResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getAccounts Request Get Accounts /api/v1/otc-loan/accounts */ + public static void testGetAccountsRequest() throws Exception { + // $this->assertTrue(true); + } + + /** getAccounts Response Get Accounts /api/v1/otc-loan/accounts */ + public static void testGetAccountsResponse() throws Exception { + String data = + "\n" + + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [{\n" + + " \"uid\": \"1260004199\",\n" + + " \"marginCcy\": \"USDT\",\n" + + " \"marginQty\": \"900\",\n" + + " \"marginFactor\": \"0.9000000000\",\n" + + " \"accountType\": \"TRADE\",\n" + + " \"isParent\": true\n" + + " }]\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run( + VipLendingApiAutoGeneratedTest::testGetDiscountRateConfigsRequest, + "testGetDiscountRateConfigsRequest"); + run( + VipLendingApiAutoGeneratedTest::testGetDiscountRateConfigsResponse, + "testGetDiscountRateConfigsResponse"); + run(VipLendingApiAutoGeneratedTest::testGetLoanInfoRequest, "testGetLoanInfoRequest"); + run(VipLendingApiAutoGeneratedTest::testGetLoanInfoResponse, "testGetLoanInfoResponse"); + run(VipLendingApiAutoGeneratedTest::testGetAccountsRequest, "testGetAccountsRequest"); + run(VipLendingApiAutoGeneratedTest::testGetAccountsResponse, "testGetAccountsResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiImpl.java new file mode 100644 index 00000000..5b0220d4 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiImpl.java @@ -0,0 +1,34 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package com.kucoin.universal.sdk.generate.viplending.viplending; + +import com.kucoin.universal.sdk.internal.interfaces.Transport; + +public class VipLendingApiImpl implements VipLendingApi { + private final Transport transport; + + public VipLendingApiImpl(Transport transport) { + this.transport = transport; + } + + public GetDiscountRateConfigsResp getDiscountRateConfigs() { + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/otc-loan/discount-rate-configs", + null, + GetDiscountRateConfigsResp.class, + false); + } + + public GetLoanInfoResp getLoanInfo() { + return this.transport.call( + "spot", false, "GET", "/api/v1/otc-loan/loan", null, GetLoanInfoResp.class, false); + } + + public GetAccountsResp getAccounts() { + return this.transport.call( + "spot", false, "GET", "/api/v1/otc-loan/accounts", null, GetAccountsResp.class, false); + } +} From ac2e4cbf1743419dabfb8cb5f6cea21f4340e695 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Wed, 2 Jul 2025 17:05:06 +0800 Subject: [PATCH 08/39] feat(api): add format for java --- Makefile | 10 +- generator/plugin/pom.xml | 7 + .../plugin/generator/JavaSdkGenerator.java | 34 +- .../sdk/plugin/util/KeywordsUtil.java | 2 +- .../sdk/plugin/SdkGeneratorTest.java | 4 +- .../account/AccountApiAutoGeneratedTest.java | 571 +- .../deposit/DepositApiAutoGeneratedTest.java | 192 +- .../account/fee/FeeApiAutoGeneratedTest.java | 22 +- .../SubAccountApiAutoGeneratedTest.java | 708 +- .../TransferApiAutoGeneratedTest.java | 101 +- .../WithdrawalApiAutoGeneratedTest.java | 212 +- .../AffiliateApiAutoGeneratedTest.java | 58 +- .../{ApiBrokerApi.java => APIBrokerApi.java} | 2 +- ...okerApi.template => APIBrokerApi.template} | 0 ...ava => APIBrokerApiAutoGeneratedTest.java} | 22 +- ...okerApiImpl.java => APIBrokerApiImpl.java} | 4 +- .../{NdBrokerApi.java => NDBrokerApi.java} | 2 +- ...rokerApi.template => NDBrokerApi.template} | 0 .../NDBrokerApiAutoGeneratedTest.java | 548 ++ ...rokerApiImpl.java => NDBrokerApiImpl.java} | 4 +- .../NdBrokerApiAutoGeneratedTest.java | 538 -- .../futures/FuturesApiAutoGeneratedTest.java | 217 +- .../earn/earn/EarnApiAutoGeneratedTest.java | 421 +- .../FundingFeesApiAutoGeneratedTest.java | 778 +- .../FuturesPrivateWsAutoGeneratedTest.java | 16 +- .../FuturesPublicWsAutoGeneratedTest.java | 20 +- .../generate/futures/market/GetKlinesReq.java | 8 +- .../market/MarketApiAutoGeneratedTest.java | 921 +- .../order/OrderApiAutoGeneratedTest.java | 1089 +-- .../PositionsApiAutoGeneratedTest.java | 822 +- .../credit/CreditApiAutoGeneratedTest.java | 184 +- .../debit/DebitApiAutoGeneratedTest.java | 95 +- .../MarginPrivateWsAutoGeneratedTest.java | 4 +- .../MarginPublicWsAutoGeneratedTest.java | 4 +- .../market/MarketApiAutoGeneratedTest.java | 532 +- .../order/OrderApiAutoGeneratedTest.java | 548 +- .../RiskLimitApiAutoGeneratedTest.java | 40 +- .../generate/spot/market/Get24hrStatsReq.java | 7 +- .../spot/market/GetAllCurrenciesData.java | 76 +- .../spot/market/GetAllSymbolsData.java | 219 +- .../spot/market/GetAllSymbolsResp.java | 8 +- .../spot/market/GetAllTickersResp.java | 15 +- .../spot/market/GetAllTickersTicker.java | 147 +- .../spot/market/GetAnnouncementsItems.java | 61 +- .../spot/market/GetAnnouncementsReq.java | 179 +- .../spot/market/GetAnnouncementsResp.java | 41 +- .../spot/market/GetCallAuctionInfoReq.java | 7 +- .../spot/market/GetCallAuctionInfoResp.java | 60 +- .../GetCallAuctionPartOrderBookReq.java | 16 +- .../spot/market/GetClientIPAddressResp.java | 14 +- .../spot/market/GetCurrencyChains.java | 105 +- .../generate/spot/market/GetCurrencyResp.java | 67 +- .../generate/spot/market/GetFiatPriceReq.java | 15 +- .../spot/market/GetFiatPriceResp.java | 8071 ++++++++--------- .../spot/market/GetFullOrderBookReq.java | 7 +- .../generate/spot/market/GetKlinesReq.java | 90 +- .../generate/spot/market/GetKlinesResp.java | 14 +- .../spot/market/GetMarketListResp.java | 11 +- .../spot/market/GetPartOrderBookReq.java | 16 +- .../spot/market/GetPartOrderBookResp.java | 43 +- .../GetPrivateTokenInstanceServers.java | 44 +- .../spot/market/GetPrivateTokenResp.java | 21 +- .../market/GetPublicTokenInstanceServers.java | 44 +- .../spot/market/GetPublicTokenResp.java | 18 +- .../spot/market/GetServerTimeResp.java | 11 +- .../spot/market/GetServiceStatusResp.java | 38 +- .../generate/spot/market/GetSymbolReq.java | 9 +- .../generate/spot/market/GetTickerResp.java | 63 +- .../spot/market/GetTradeHistoryReq.java | 7 +- .../spot/market/GetTradeHistoryResp.java | 11 +- .../sdk/generate/spot/market/MarketApi.java | 401 +- .../market/MarketApiAutoGeneratedTest.java | 998 +- .../generate/spot/market/MarketApiImpl.java | 125 +- .../spot/order/OrderApiAutoGeneratedTest.java | 1861 ++-- .../SpotPrivateWsAutoGeneratedTest.java | 8 +- .../spot/spotpublic/AllTickersEvent.java | 77 +- .../spot/spotpublic/CallAuctionInfoEvent.java | 71 +- .../CallAuctionOrderbookLevel50Event.java | 47 +- .../generate/spot/spotpublic/KlinesEvent.java | 34 +- .../spot/spotpublic/MarketSnapshotData.java | 293 +- .../MarketSnapshotDataMarketChange1h.java | 55 +- .../MarketSnapshotDataMarketChange24h.java | 55 +- .../MarketSnapshotDataMarketChange4h.java | 55 +- .../spot/spotpublic/MarketSnapshotEvent.java | 26 +- .../spotpublic/OrderbookIncrementChanges.java | 15 +- .../spotpublic/OrderbookIncrementEvent.java | 53 +- .../spot/spotpublic/OrderbookLevel1Event.java | 34 +- .../spotpublic/OrderbookLevel50Event.java | 37 +- .../spot/spotpublic/OrderbookLevel5Event.java | 34 +- .../spot/spotpublic/SpotPublicWs.java | 107 +- .../SpotPublicWsAutoGeneratedTest.java | 174 +- .../spot/spotpublic/SpotPublicWsImpl.java | 54 +- .../spot/spotpublic/SymbolSnapshotData.java | 293 +- .../SymbolSnapshotDataMarketChange1h.java | 55 +- .../SymbolSnapshotDataMarketChange24h.java | 55 +- .../SymbolSnapshotDataMarketChange4h.java | 55 +- .../spot/spotpublic/SymbolSnapshotEvent.java | 26 +- .../generate/spot/spotpublic/TickerEvent.java | 74 +- .../generate/spot/spotpublic/TradeEvent.java | 87 +- .../viplending/viplending/VIPLendingApi.java | 2 +- .../VIPLendingApiAutoGeneratedTest.java | 154 +- .../viplending/VIPLendingApiImpl.java | 4 +- 102 files changed, 11325 insertions(+), 12389 deletions(-) rename sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/{ApiBrokerApi.java => APIBrokerApi.java} (95%) rename sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/{ApiBrokerApi.template => APIBrokerApi.template} (100%) rename sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/{ApiBrokerApiAutoGeneratedTest.java => APIBrokerApiAutoGeneratedTest.java} (74%) rename sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/{ApiBrokerApiImpl.java => APIBrokerApiImpl.java} (81%) rename sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/{NdBrokerApi.java => NDBrokerApi.java} (99%) rename sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/{NdBrokerApi.template => NDBrokerApi.template} (100%) create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApiAutoGeneratedTest.java rename sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/{NdBrokerApiImpl.java => NDBrokerApiImpl.java} (97%) delete mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApiAutoGeneratedTest.java diff --git a/Makefile b/Makefile index 60a6572d..69b5bd28 100644 --- a/Makefile +++ b/Makefile @@ -87,11 +87,11 @@ endef .PHONY: generate 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) - $(call generate-code,php,/src/Generate,0.1.2-alpha) +# $(call generate-postman) +# $(call generate-code,golang,/pkg/generate) +# $(call generate-code,python,/kucoin_universal_sdk/generate) +# $(call generate-code,node,/src/generate) +# $(call generate-code,php,/src/Generate,0.1.2-alpha) $(call generate-code,java,/src/main/java/com/kucoin/universal/sdk/generate,0.1.0-alpha) .PHONY: gen-postman diff --git a/generator/plugin/pom.xml b/generator/plugin/pom.xml index dcbf4519..d567ffc6 100644 --- a/generator/plugin/pom.xml +++ b/generator/plugin/pom.xml @@ -17,6 +17,7 @@ 3.6.1 1.8.0 5.7.1 + 3.17.0 @@ -43,6 +44,12 @@ ${csv.version} compile + + org.apache.commons + commons-lang3 + ${commons-lang3.version} + compile + diff --git a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java index 6616e150..11099f9f 100644 --- a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java +++ b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java @@ -15,6 +15,7 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.servers.Server; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.languages.AbstractJavaCodegen; @@ -174,15 +175,20 @@ public CodegenProperty fromProperty(String name, Schema p, boolean required) { List enums = new ArrayList<>(); List> enumList; - String enumDataType = "String"; + CodegenProperty realEnumProp = null; if (prop.openApiType.equalsIgnoreCase("array")) { enumList = (List>) prop.mostInnerItems.vendorExtensions.get("x-api-enum"); - if (prop.mostInnerItems.isNumber) { - enumDataType = "Integer"; - } + realEnumProp = prop.mostInnerItems; } else { enumList = (List>) prop.vendorExtensions.get("x-api-enum"); - enumDataType = prop.dataType; + realEnumProp = prop; + } + + String enumDataType = "String"; + if (realEnumProp.isString) { + enumDataType= "String"; + } else { + enumDataType = "Integer"; } @@ -238,6 +244,7 @@ public String toModelName(String name) { @Override public String toApiName(String name) { + name = KeywordsUtil.getKeyword(name); return camelize(name + "_" + (modeSwitch.isWs() || modeSwitch.isWsTest() ? "Ws" : "Api")); } @@ -393,6 +400,8 @@ public ModelsMap postProcessModels(ModelsMap objs) { return objs; } + + @Override public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); @@ -404,6 +413,16 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List implImports = new TreeSet<>(); for (CodegenOperation op : operationMap.getOperation()) { + + if (op.vendorExtensions.containsKey("x-request-example")) { + op.vendorExtensions.put("x-request-example", StringEscapeUtils.escapeJava((String)op.vendorExtensions.get("x-request-example"))); + } + + if (op.vendorExtensions.containsKey("x-response-example")) { + op.vendorExtensions.put("x-response-example", StringEscapeUtils.escapeJava((String)op.vendorExtensions.get("x-response-example"))); + } + + Meta meta = SpecificationUtil.getMeta(op.vendorExtensions); if (meta != null) { switch (modeSwitch.getMode()) { @@ -413,13 +432,14 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List { if (v.getService().equalsIgnoreCase(meta.getService())) { Map kv = new HashMap<>(); + k = KeywordsUtil.getKeyword(k); kv.put("method", formatMethodName(k)); kv.put("methodUppercase", camelize(formatMethodName(k))); kv.put("target_service", formatService(k + "Api")); entryValue.add(kv); - imports.add(String.format("import com.kucoin.universal.sdk.generate.%s.%s.%s;", v.getService().toLowerCase(), v.getSubService().toLowerCase(), formatService(k + "Api"))); + imports.add(String.format("import com.kucoin.universal.sdk.generate.%s.%s.%s;", v.getService().toLowerCase(), v.getSubService().toLowerCase(), k + "Api")); imports.add("import com.kucoin.universal.sdk.internal.interfaces.Transport;"); - implImports.add(String.format("import com.kucoin.universal.sdk.generate.%s.%s.%s;", v.getService().toLowerCase(), v.getSubService().toLowerCase(), formatService(k + "ApiImpl"))); + implImports.add(String.format("import com.kucoin.universal.sdk.generate.%s.%s.%s;", v.getService().toLowerCase(), v.getSubService().toLowerCase(), k + "ApiImpl")); } }); Map apiEntryInfo = new HashMap<>(); diff --git a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/util/KeywordsUtil.java b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/util/KeywordsUtil.java index 8586e533..e493b45c 100644 --- a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/util/KeywordsUtil.java +++ b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/util/KeywordsUtil.java @@ -8,7 +8,7 @@ public class KeywordsUtil { private static Map specialKeywords = - Map.of("copytrading", "CopyTrading", "viplending", "VIPLending"); + Map.of("copytrading", "CopyTrading", "viplending", "VIPLending", "ndbroker", "NDBroker", "apibroker", "APIBroker"); public static String getKeyword(String key) { diff --git a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java index 2fd0984b..572876c7 100644 --- a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java +++ b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java @@ -8,8 +8,8 @@ public class SdkGeneratorTest { private static final String SDK_NAME = "java-sdk"; - private static final String SPEC_NAME = "../../spec/rest/api/openapi-viplending-viplending.json"; - private static final String SPEC_ENTRY_NAME = "../../spec/rest/entry/openapi-futures.json"; + private static final String SPEC_NAME = "../../spec/rest/api/openapi-futures-market.json"; + private static final String SPEC_ENTRY_NAME = "../../spec/rest/entry/openapi-broker.json"; private static final String WS_SPEC_NAME = "../../spec/ws/openapi-spot-public.json"; private static final String OUTPUT_DIR = "../../sdk/java/src/main/java/com/kucoin/universal/sdk/generate"; private static final String CSV_PATH = "../../spec"; diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiAutoGeneratedTest.java index 36e5cf54..7e4e5975 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiAutoGeneratedTest.java @@ -19,22 +19,22 @@ public static void testGetAccountInfoRequest() throws Exception { /** getAccountInfo Response Get Account Summary Info /api/v2/user-info */ public static void testGetAccountInfoResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"level\": 0,\n" - + " \"subQuantity\": 3,\n" - + " \"spotSubQuantity\": 3,\n" - + " \"marginSubQuantity\": 2,\n" - + " \"futuresSubQuantity\": 2,\n" - + " \"optionSubQuantity\": 0,\n" - + " \"maxSubQuantity\": 5,\n" - + " \"maxDefaultSubQuantity\": 5,\n" - + " \"maxSpotSubQuantity\": 0,\n" - + " \"maxMarginSubQuantity\": 0,\n" - + " \"maxFuturesSubQuantity\": 0,\n" - + " \"maxOptionSubQuantity\": 0\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"level\\\": 0,\\n" + + " \\\"subQuantity\\\": 3,\\n" + + " \\\"spotSubQuantity\\\": 3,\\n" + + " \\\"marginSubQuantity\\\": 2,\\n" + + " \\\"futuresSubQuantity\\\": 2,\\n" + + " \\\"optionSubQuantity\\\": 0,\\n" + + " \\\"maxSubQuantity\\\": 5,\\n" + + " \\\"maxDefaultSubQuantity\\\": 5,\\n" + + " \\\"maxSpotSubQuantity\\\": 0,\\n" + + " \\\"maxMarginSubQuantity\\\": 0,\\n" + + " \\\"maxFuturesSubQuantity\\\": 0,\\n" + + " \\\"maxOptionSubQuantity\\\": 0\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -48,19 +48,19 @@ public static void testGetApikeyInfoRequest() throws Exception { /** getApikeyInfo Response Get Apikey Info /api/v1/user/api-key */ public static void testGetApikeyInfoResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"remark\": \"account1\",\n" - + " \"apiKey\": \"6705f5c311545b000157d3eb\",\n" - + " \"apiVersion\": 3,\n" - + " \"permission\":" - + " \"General,Futures,Spot,Earn,InnerTransfer,Transfer,Margin\",\n" - + " \"ipWhitelist\": \"203.**.154,103.**.34\",\n" - + " \"createdAt\": 1728443843000,\n" - + " \"uid\": 165111215,\n" - + " \"isMaster\": true\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"remark\\\": \\\"account1\\\",\\n" + + " \\\"apiKey\\\": \\\"6705f5c311545b000157d3eb\\\",\\n" + + " \\\"apiVersion\\\": 3,\\n" + + " \\\"permission\\\":" + + " \\\"General,Futures,Spot,Earn,InnerTransfer,Transfer,Margin\\\",\\n" + + " \\\"ipWhitelist\\\": \\\"203.**.154,103.**.34\\\",\\n" + + " \\\"createdAt\\\": 1728443843000,\\n" + + " \\\"uid\\\": 165111215,\\n" + + " \\\"isMaster\\\": true\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -73,40 +73,40 @@ public static void testGetSpotAccountTypeRequest() throws Exception { /** getSpotAccountType Response Get Account Type - Spot /api/v1/hf/accounts/opened */ public static void testGetSpotAccountTypeResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":false}"; + String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":false}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** getSpotAccountList Request Get Account List - Spot /api/v1/accounts */ public static void testGetSpotAccountListRequest() throws Exception { - String data = "{\"currency\": \"USDT\", \"type\": \"main\"}"; + String data = "{\\\"currency\\\": \\\"USDT\\\", \\\"type\\\": \\\"main\\\"}"; GetSpotAccountListReq obj = mapper.readValue(data, GetSpotAccountListReq.class); } /** getSpotAccountList Response Get Account List - Spot /api/v1/accounts */ public static void testGetSpotAccountListResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"id\": \"548674591753\",\n" - + " \"currency\": \"USDT\",\n" - + " \"type\": \"trade\",\n" - + " \"balance\": \"26.66759503\",\n" - + " \"available\": \"26.66759503\",\n" - + " \"holds\": \"0\"\n" - + " },\n" - + " {\n" - + " \"id\": \"63355cd156298d0001b66e61\",\n" - + " \"currency\": \"USDT\",\n" - + " \"type\": \"main\",\n" - + " \"balance\": \"0.01\",\n" - + " \"available\": \"0.01\",\n" - + " \"holds\": \"0\"\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"id\\\": \\\"548674591753\\\",\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"type\\\": \\\"trade\\\",\\n" + + " \\\"balance\\\": \\\"26.66759503\\\",\\n" + + " \\\"available\\\": \\\"26.66759503\\\",\\n" + + " \\\"holds\\\": \\\"0\\\"\\n" + + " },\\n" + + " {\\n" + + " \\\"id\\\": \\\"63355cd156298d0001b66e61\\\",\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"type\\\": \\\"main\\\",\\n" + + " \\\"balance\\\": \\\"0.01\\\",\\n" + + " \\\"available\\\": \\\"0.01\\\",\\n" + + " \\\"holds\\\": \\\"0\\\"\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -114,49 +114,49 @@ public static void testGetSpotAccountListResponse() throws Exception { /** getSpotAccountDetail Request Get Account Detail - Spot /api/v1/accounts/{accountId} */ public static void testGetSpotAccountDetailRequest() throws Exception { - String data = "{\"accountId\": \"548674591753\"}"; + String data = "{\\\"accountId\\\": \\\"548674591753\\\"}"; GetSpotAccountDetailReq obj = mapper.readValue(data, GetSpotAccountDetailReq.class); } /** getSpotAccountDetail Response Get Account Detail - Spot /api/v1/accounts/{accountId} */ public static void testGetSpotAccountDetailResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"currency\":\"USDT\",\"balance\":\"26.66759503\",\"available\":\"26.66759503\",\"holds\":\"0\"}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"currency\\\":\\\"USDT\\\",\\\"balance\\\":\\\"26.66759503\\\",\\\"available\\\":\\\"26.66759503\\\",\\\"holds\\\":\\\"0\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** getCrossMarginAccount Request Get Account - Cross Margin /api/v3/margin/accounts */ public static void testGetCrossMarginAccountRequest() throws Exception { - String data = "{\"quoteCurrency\": \"USDT\", \"queryType\": \"MARGIN\"}"; + String data = "{\\\"quoteCurrency\\\": \\\"USDT\\\", \\\"queryType\\\": \\\"MARGIN\\\"}"; GetCrossMarginAccountReq obj = mapper.readValue(data, GetCrossMarginAccountReq.class); } /** getCrossMarginAccount Response Get Account - Cross Margin /api/v3/margin/accounts */ public static void testGetCrossMarginAccountResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"totalAssetOfQuoteCurrency\": \"40.8648372\",\n" - + " \"totalLiabilityOfQuoteCurrency\": \"0\",\n" - + " \"debtRatio\": \"0\",\n" - + " \"status\": \"EFFECTIVE\",\n" - + " \"accounts\": [\n" - + " {\n" - + " \"currency\": \"USDT\",\n" - + " \"total\": \"38.68855864\",\n" - + " \"available\": \"20.01916691\",\n" - + " \"hold\": \"18.66939173\",\n" - + " \"liability\": \"0\",\n" - + " \"liabilityPrincipal\": \"0\",\n" - + " \"liabilityInterest\": \"0\",\n" - + " \"maxBorrowSize\": \"163\",\n" - + " \"borrowEnabled\": true,\n" - + " \"transferInEnabled\": true\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"totalAssetOfQuoteCurrency\\\": \\\"40.8648372\\\",\\n" + + " \\\"totalLiabilityOfQuoteCurrency\\\": \\\"0\\\",\\n" + + " \\\"debtRatio\\\": \\\"0\\\",\\n" + + " \\\"status\\\": \\\"EFFECTIVE\\\",\\n" + + " \\\"accounts\\\": [\\n" + + " {\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"total\\\": \\\"38.68855864\\\",\\n" + + " \\\"available\\\": \\\"20.01916691\\\",\\n" + + " \\\"hold\\\": \\\"18.66939173\\\",\\n" + + " \\\"liability\\\": \\\"0\\\",\\n" + + " \\\"liabilityPrincipal\\\": \\\"0\\\",\\n" + + " \\\"liabilityInterest\\\": \\\"0\\\",\\n" + + " \\\"maxBorrowSize\\\": \\\"163\\\",\\n" + + " \\\"borrowEnabled\\\": true,\\n" + + " \\\"transferInEnabled\\\": true\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -165,51 +165,52 @@ public static void testGetCrossMarginAccountResponse() throws Exception { /** getIsolatedMarginAccount Request Get Account - Isolated Margin /api/v3/isolated/accounts */ public static void testGetIsolatedMarginAccountRequest() throws Exception { String data = - "{\"symbol\": \"BTC-USDT\", \"quoteCurrency\": \"USDT\", \"queryType\": \"ISOLATED\"}"; + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"quoteCurrency\\\": \\\"USDT\\\", \\\"queryType\\\":" + + " \\\"ISOLATED\\\"}"; GetIsolatedMarginAccountReq obj = mapper.readValue(data, GetIsolatedMarginAccountReq.class); } /** getIsolatedMarginAccount Response Get Account - Isolated Margin /api/v3/isolated/accounts */ public static void testGetIsolatedMarginAccountResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"totalAssetOfQuoteCurrency\": \"4.97047372\",\n" - + " \"totalLiabilityOfQuoteCurrency\": \"0.00038891\",\n" - + " \"timestamp\": 1747303659773,\n" - + " \"assets\": [\n" - + " {\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"status\": \"EFFECTIVE\",\n" - + " \"debtRatio\": \"0\",\n" - + " \"baseAsset\": {\n" - + " \"currency\": \"BTC\",\n" - + " \"borrowEnabled\": true,\n" - + " \"transferInEnabled\": true,\n" - + " \"liability\": \"0\",\n" - + " \"liabilityPrincipal\": \"0\",\n" - + " \"liabilityInterest\": \"0\",\n" - + " \"total\": \"0\",\n" - + " \"available\": \"0\",\n" - + " \"hold\": \"0\",\n" - + " \"maxBorrowSize\": \"0\"\n" - + " },\n" - + " \"quoteAsset\": {\n" - + " \"currency\": \"USDT\",\n" - + " \"borrowEnabled\": true,\n" - + " \"transferInEnabled\": true,\n" - + " \"liability\": \"0.00038891\",\n" - + " \"liabilityPrincipal\": \"0.00038888\",\n" - + " \"liabilityInterest\": \"0.00000003\",\n" - + " \"total\": \"4.97047372\",\n" - + " \"available\": \"4.97047372\",\n" - + " \"hold\": \"0\",\n" - + " \"maxBorrowSize\": \"44\"\n" - + " }\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"totalAssetOfQuoteCurrency\\\": \\\"4.97047372\\\",\\n" + + " \\\"totalLiabilityOfQuoteCurrency\\\": \\\"0.00038891\\\",\\n" + + " \\\"timestamp\\\": 1747303659773,\\n" + + " \\\"assets\\\": [\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"status\\\": \\\"EFFECTIVE\\\",\\n" + + " \\\"debtRatio\\\": \\\"0\\\",\\n" + + " \\\"baseAsset\\\": {\\n" + + " \\\"currency\\\": \\\"BTC\\\",\\n" + + " \\\"borrowEnabled\\\": true,\\n" + + " \\\"transferInEnabled\\\": true,\\n" + + " \\\"liability\\\": \\\"0\\\",\\n" + + " \\\"liabilityPrincipal\\\": \\\"0\\\",\\n" + + " \\\"liabilityInterest\\\": \\\"0\\\",\\n" + + " \\\"total\\\": \\\"0\\\",\\n" + + " \\\"available\\\": \\\"0\\\",\\n" + + " \\\"hold\\\": \\\"0\\\",\\n" + + " \\\"maxBorrowSize\\\": \\\"0\\\"\\n" + + " },\\n" + + " \\\"quoteAsset\\\": {\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"borrowEnabled\\\": true,\\n" + + " \\\"transferInEnabled\\\": true,\\n" + + " \\\"liability\\\": \\\"0.00038891\\\",\\n" + + " \\\"liabilityPrincipal\\\": \\\"0.00038888\\\",\\n" + + " \\\"liabilityInterest\\\": \\\"0.00000003\\\",\\n" + + " \\\"total\\\": \\\"4.97047372\\\",\\n" + + " \\\"available\\\": \\\"4.97047372\\\",\\n" + + " \\\"hold\\\": \\\"0\\\",\\n" + + " \\\"maxBorrowSize\\\": \\\"44\\\"\\n" + + " }\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -217,27 +218,27 @@ public static void testGetIsolatedMarginAccountResponse() throws Exception { /** getFuturesAccount Request Get Account - Futures /api/v1/account-overview */ public static void testGetFuturesAccountRequest() throws Exception { - String data = "{\"currency\": \"USDT\"}"; + String data = "{\\\"currency\\\": \\\"USDT\\\"}"; GetFuturesAccountReq obj = mapper.readValue(data, GetFuturesAccountReq.class); } /** getFuturesAccount Response Get Account - Futures /api/v1/account-overview */ public static void testGetFuturesAccountResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -246,36 +247,37 @@ public static void testGetFuturesAccountResponse() throws Exception { /** getSpotLedger Request Get Account Ledgers - Spot/Margin /api/v1/accounts/ledgers */ public static void testGetSpotLedgerRequest() throws Exception { String data = - "{\"currency\": \"BTC\", \"direction\": \"in\", \"bizType\": \"TRANSFER\", \"startAt\":" - + " 1728663338000, \"endAt\": 1728692138000, \"currentPage\": 1, \"pageSize\": 50}"; + "{\\\"currency\\\": \\\"BTC\\\", \\\"direction\\\": \\\"in\\\", \\\"bizType\\\":" + + " \\\"TRANSFER\\\", \\\"startAt\\\": 1728663338000, \\\"endAt\\\": 1728692138000," + + " \\\"currentPage\\\": 1, \\\"pageSize\\\": 50}"; GetSpotLedgerReq obj = mapper.readValue(data, GetSpotLedgerReq.class); } /** getSpotLedger Response Get Account Ledgers - Spot/Margin /api/v1/accounts/ledgers */ public static void testGetSpotLedgerResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"currentPage\": 1,\n" - + " \"pageSize\": 50,\n" - + " \"totalNum\": 1,\n" - + " \"totalPage\": 1,\n" - + " \"items\": [\n" - + " {\n" - + " \"id\": \"265329987780896\",\n" - + " \"currency\": \"USDT\",\n" - + " \"amount\": \"0.01\",\n" - + " \"fee\": \"0\",\n" - + " \"balance\": \"0\",\n" - + " \"accountType\": \"TRADE\",\n" - + " \"bizType\": \"SUB_TRANSFER\",\n" - + " \"direction\": \"out\",\n" - + " \"createdAt\": 1728658481484,\n" - + " \"context\": \"\"\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"currentPage\\\": 1,\\n" + + " \\\"pageSize\\\": 50,\\n" + + " \\\"totalNum\\\": 1,\\n" + + " \\\"totalPage\\\": 1,\\n" + + " \\\"items\\\": [\\n" + + " {\\n" + + " \\\"id\\\": \\\"265329987780896\\\",\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"amount\\\": \\\"0.01\\\",\\n" + + " \\\"fee\\\": \\\"0\\\",\\n" + + " \\\"balance\\\": \\\"0\\\",\\n" + + " \\\"accountType\\\": \\\"TRADE\\\",\\n" + + " \\\"bizType\\\": \\\"SUB_TRANSFER\\\",\\n" + + " \\\"direction\\\": \\\"out\\\",\\n" + + " \\\"createdAt\\\": 1728658481484,\\n" + + " \\\"context\\\": \\\"\\\"\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -284,33 +286,33 @@ public static void testGetSpotLedgerResponse() throws Exception { /** getSpotHFLedger Request Get Account Ledgers - Trade_hf /api/v1/hf/accounts/ledgers */ public static void testGetSpotHFLedgerRequest() throws Exception { String data = - "{\"currency\": \"BTC\", \"direction\": \"in\", \"bizType\": \"TRANSFER\", \"lastId\":" - + " 254062248624417, \"limit\": 100, \"startAt\": 1728663338000, \"endAt\":" - + " 1728692138000}"; + "{\\\"currency\\\": \\\"BTC\\\", \\\"direction\\\": \\\"in\\\", \\\"bizType\\\":" + + " \\\"TRANSFER\\\", \\\"lastId\\\": 254062248624417, \\\"limit\\\": 100," + + " \\\"startAt\\\": 1728663338000, \\\"endAt\\\": 1728692138000}"; GetSpotHFLedgerReq obj = mapper.readValue(data, GetSpotHFLedgerReq.class); } /** getSpotHFLedger Response Get Account Ledgers - Trade_hf /api/v1/hf/accounts/ledgers */ public static void testGetSpotHFLedgerResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"id\": \"254062248624417\",\n" - + " \"currency\": \"USDT\",\n" - + " \"amount\": \"1.59760080\",\n" - + " \"fee\": \"0.00159920\",\n" - + " \"tax\": \"0\",\n" - + " \"balance\": \"26.73759503\",\n" - + " \"accountType\": \"TRADE_HF\",\n" - + " \"bizType\": \"TRADE_EXCHANGE\",\n" - + " \"direction\": \"in\",\n" - + " \"createdAt\": \"1728443957539\",\n" - + " \"context\":" - + " \"{\\\"symbol\\\":\\\"KCS-USDT\\\",\\\"orderId\\\":\\\"6705f6350dc7210007d6a36d\\\",\\\"tradeId\\\":\\\"10046097631627265\\\"}\"\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"id\\\": \\\"254062248624417\\\",\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"amount\\\": \\\"1.59760080\\\",\\n" + + " \\\"fee\\\": \\\"0.00159920\\\",\\n" + + " \\\"tax\\\": \\\"0\\\",\\n" + + " \\\"balance\\\": \\\"26.73759503\\\",\\n" + + " \\\"accountType\\\": \\\"TRADE_HF\\\",\\n" + + " \\\"bizType\\\": \\\"TRADE_EXCHANGE\\\",\\n" + + " \\\"direction\\\": \\\"in\\\",\\n" + + " \\\"createdAt\\\": \\\"1728443957539\\\",\\n" + + " \\\"context\\\":" + + " \\\"{\\\\\\\"symbol\\\\\\\":\\\\\\\"KCS-USDT\\\\\\\",\\\\\\\"orderId\\\\\\\":\\\\\\\"6705f6350dc7210007d6a36d\\\\\\\",\\\\\\\"tradeId\\\\\\\":\\\\\\\"10046097631627265\\\\\\\"}\\\"\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -319,9 +321,9 @@ public static void testGetSpotHFLedgerResponse() throws Exception { /** getMarginHFLedger Request Get Account Ledgers - Margin_hf /api/v3/hf/margin/account/ledgers */ public static void testGetMarginHFLedgerRequest() throws Exception { String data = - "{\"currency\": \"BTC\", \"direction\": \"in\", \"bizType\": \"TRANSFER\", \"lastId\":" - + " 254062248624417, \"limit\": 100, \"startAt\": 1728663338000, \"endAt\":" - + " 1728692138000}"; + "{\\\"currency\\\": \\\"BTC\\\", \\\"direction\\\": \\\"in\\\", \\\"bizType\\\":" + + " \\\"TRANSFER\\\", \\\"lastId\\\": 254062248624417, \\\"limit\\\": 100," + + " \\\"startAt\\\": 1728663338000, \\\"endAt\\\": 1728692138000}"; GetMarginHFLedgerReq obj = mapper.readValue(data, GetMarginHFLedgerReq.class); } @@ -330,7 +332,7 @@ public static void testGetMarginHFLedgerRequest() throws Exception { */ public static void testGetMarginHFLedgerResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":[{\"id\":1949641706720,\"currency\":\"USDT\",\"amount\":\"0.01000000\",\"fee\":\"0.00000000\",\"balance\":\"0.01000000\",\"accountType\":\"MARGIN_V2\",\"bizType\":\"TRANSFER\",\"direction\":\"in\",\"createdAt\":1728664091208,\"context\":\"{}\",\"tax\":\"0.00000000\"}]}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":[{\\\"id\\\":1949641706720,\\\"currency\\\":\\\"USDT\\\",\\\"amount\\\":\\\"0.01000000\\\",\\\"fee\\\":\\\"0.00000000\\\",\\\"balance\\\":\\\"0.01000000\\\",\\\"accountType\\\":\\\"MARGIN_V2\\\",\\\"bizType\\\":\\\"TRANSFER\\\",\\\"direction\\\":\\\"in\\\",\\\"createdAt\\\":1728664091208,\\\"context\\\":\\\"{}\\\",\\\"tax\\\":\\\"0.00000000\\\"}]}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -338,44 +340,45 @@ public static void testGetMarginHFLedgerResponse() throws Exception { /** getFuturesLedger Request Get Account Ledgers - Futures /api/v1/transaction-history */ public static void testGetFuturesLedgerRequest() throws Exception { String data = - "{\"currency\": \"XBT\", \"type\": \"Transferin\", \"offset\": 254062248624417," - + " \"forward\": true, \"maxCount\": 50, \"startAt\": 1728663338000, \"endAt\":" - + " 1728692138000}"; + "{\\\"currency\\\": \\\"XBT\\\", \\\"type\\\": \\\"Transferin\\\", \\\"offset\\\":" + + " 254062248624417, \\\"forward\\\": true, \\\"maxCount\\\": 50, \\\"startAt\\\":" + + " 1728663338000, \\\"endAt\\\": 1728692138000}"; GetFuturesLedgerReq obj = mapper.readValue(data, GetFuturesLedgerReq.class); } /** getFuturesLedger Response Get Account Ledgers - Futures /api/v1/transaction-history */ public static void testGetFuturesLedgerResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"dataList\": [\n" - + " {\n" - + " \"time\": 1728665747000,\n" - + " \"type\": \"TransferIn\",\n" - + " \"amount\": 0.01,\n" - + " \"fee\": 0.0,\n" - + " \"accountEquity\": 14.02924938,\n" - + " \"status\": \"Completed\",\n" - + " \"remark\": \"Transferred from High-Frequency Trading Account\",\n" - + " \"offset\": 51360793,\n" - + " \"currency\": \"USDT\"\n" - + " },\n" - + " {\n" - + " \"time\": 1728648000000,\n" - + " \"type\": \"RealisedPNL\",\n" - + " \"amount\": 0.00630042,\n" - + " \"fee\": 0.0,\n" - + " \"accountEquity\": 20.0,\n" - + " \"status\": \"Completed\",\n" - + " \"remark\": \"XBTUSDTM\",\n" - + " \"offset\": 51352430,\n" - + " \"currency\": \"USDT\"\n" - + " }\n" - + " ],\n" - + " \"hasMore\": false\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"dataList\\\": [\\n" + + " {\\n" + + " \\\"time\\\": 1728665747000,\\n" + + " \\\"type\\\": \\\"TransferIn\\\",\\n" + + " \\\"amount\\\": 0.01,\\n" + + " \\\"fee\\\": 0.0,\\n" + + " \\\"accountEquity\\\": 14.02924938,\\n" + + " \\\"status\\\": \\\"Completed\\\",\\n" + + " \\\"remark\\\": \\\"Transferred from High-Frequency Trading" + + " Account\\\",\\n" + + " \\\"offset\\\": 51360793,\\n" + + " \\\"currency\\\": \\\"USDT\\\"\\n" + + " },\\n" + + " {\\n" + + " \\\"time\\\": 1728648000000,\\n" + + " \\\"type\\\": \\\"RealisedPNL\\\",\\n" + + " \\\"amount\\\": 0.00630042,\\n" + + " \\\"fee\\\": 0.0,\\n" + + " \\\"accountEquity\\\": 20.0,\\n" + + " \\\"status\\\": \\\"Completed\\\",\\n" + + " \\\"remark\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"offset\\\": 51352430,\\n" + + " \\\"currency\\\": \\\"USDT\\\"\\n" + + " }\\n" + + " ],\\n" + + " \\\"hasMore\\\": false\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -389,21 +392,21 @@ public static void testGetMarginAccountDetailRequest() throws Exception { /** getMarginAccountDetail Response Get Account Detail - Margin /api/v1/margin/account */ public static void testGetMarginAccountDetailResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"debtRatio\": \"0\",\n" - + " \"accounts\": [\n" - + " {\n" - + " \"currency\": \"USDT\",\n" - + " \"totalBalance\": \"0.03\",\n" - + " \"availableBalance\": \"0.02\",\n" - + " \"holdBalance\": \"0.01\",\n" - + " \"liability\": \"0\",\n" - + " \"maxBorrowSize\": \"0\"\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"debtRatio\\\": \\\"0\\\",\\n" + + " \\\"accounts\\\": [\\n" + + " {\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"totalBalance\\\": \\\"0.03\\\",\\n" + + " \\\"availableBalance\\\": \\\"0.02\\\",\\n" + + " \\\"holdBalance\\\": \\\"0.01\\\",\\n" + + " \\\"liability\\\": \\\"0\\\",\\n" + + " \\\"maxBorrowSize\\\": \\\"0\\\"\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -414,7 +417,7 @@ public static void testGetMarginAccountDetailResponse() throws Exception { * /api/v1/isolated/accounts */ public static void testGetIsolatedMarginAccountListV1Request() throws Exception { - String data = "{\"balanceCurrency\": \"USDT\"}"; + String data = "{\\\"balanceCurrency\\\": \\\"USDT\\\"}"; GetIsolatedMarginAccountListV1Req obj = mapper.readValue(data, GetIsolatedMarginAccountListV1Req.class); } @@ -425,37 +428,37 @@ public static void testGetIsolatedMarginAccountListV1Request() throws Exception */ public static void testGetIsolatedMarginAccountListV1Response() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"totalConversionBalance\": \"0.01\",\n" - + " \"liabilityConversionBalance\": \"0\",\n" - + " \"assets\": [\n" - + " {\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"status\": \"CLEAR\",\n" - + " \"debtRatio\": \"0\",\n" - + " \"baseAsset\": {\n" - + " \"currency\": \"BTC\",\n" - + " \"totalBalance\": \"0\",\n" - + " \"holdBalance\": \"0\",\n" - + " \"availableBalance\": \"0\",\n" - + " \"liability\": \"0\",\n" - + " \"interest\": \"0\",\n" - + " \"borrowableAmount\": \"0\"\n" - + " },\n" - + " \"quoteAsset\": {\n" - + " \"currency\": \"USDT\",\n" - + " \"totalBalance\": \"0.01\",\n" - + " \"holdBalance\": \"0\",\n" - + " \"availableBalance\": \"0.01\",\n" - + " \"liability\": \"0\",\n" - + " \"interest\": \"0\",\n" - + " \"borrowableAmount\": \"0\"\n" - + " }\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"totalConversionBalance\\\": \\\"0.01\\\",\\n" + + " \\\"liabilityConversionBalance\\\": \\\"0\\\",\\n" + + " \\\"assets\\\": [\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"status\\\": \\\"CLEAR\\\",\\n" + + " \\\"debtRatio\\\": \\\"0\\\",\\n" + + " \\\"baseAsset\\\": {\\n" + + " \\\"currency\\\": \\\"BTC\\\",\\n" + + " \\\"totalBalance\\\": \\\"0\\\",\\n" + + " \\\"holdBalance\\\": \\\"0\\\",\\n" + + " \\\"availableBalance\\\": \\\"0\\\",\\n" + + " \\\"liability\\\": \\\"0\\\",\\n" + + " \\\"interest\\\": \\\"0\\\",\\n" + + " \\\"borrowableAmount\\\": \\\"0\\\"\\n" + + " },\\n" + + " \\\"quoteAsset\\\": {\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"totalBalance\\\": \\\"0.01\\\",\\n" + + " \\\"holdBalance\\\": \\\"0\\\",\\n" + + " \\\"availableBalance\\\": \\\"0.01\\\",\\n" + + " \\\"liability\\\": \\\"0\\\",\\n" + + " \\\"interest\\\": \\\"0\\\",\\n" + + " \\\"borrowableAmount\\\": \\\"0\\\"\\n" + + " }\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue( @@ -467,7 +470,7 @@ public static void testGetIsolatedMarginAccountListV1Response() throws Exception * /api/v1/isolated/account/{symbol} */ public static void testGetIsolatedMarginAccountDetailV1Request() throws Exception { - String data = "{\"symbol\": \"example_string_default_value\"}"; + String data = "{\\\"symbol\\\": \\\"example_string_default_value\\\"}"; GetIsolatedMarginAccountDetailV1Req obj = mapper.readValue(data, GetIsolatedMarginAccountDetailV1Req.class); } @@ -478,31 +481,31 @@ public static void testGetIsolatedMarginAccountDetailV1Request() throws Exceptio */ public static void testGetIsolatedMarginAccountDetailV1Response() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"status\": \"CLEAR\",\n" - + " \"debtRatio\": \"0\",\n" - + " \"baseAsset\": {\n" - + " \"currency\": \"BTC\",\n" - + " \"totalBalance\": \"0\",\n" - + " \"holdBalance\": \"0\",\n" - + " \"availableBalance\": \"0\",\n" - + " \"liability\": \"0\",\n" - + " \"interest\": \"0\",\n" - + " \"borrowableAmount\": \"0\"\n" - + " },\n" - + " \"quoteAsset\": {\n" - + " \"currency\": \"USDT\",\n" - + " \"totalBalance\": \"0.01\",\n" - + " \"holdBalance\": \"0\",\n" - + " \"availableBalance\": \"0.01\",\n" - + " \"liability\": \"0\",\n" - + " \"interest\": \"0\",\n" - + " \"borrowableAmount\": \"0\"\n" - + " }\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"status\\\": \\\"CLEAR\\\",\\n" + + " \\\"debtRatio\\\": \\\"0\\\",\\n" + + " \\\"baseAsset\\\": {\\n" + + " \\\"currency\\\": \\\"BTC\\\",\\n" + + " \\\"totalBalance\\\": \\\"0\\\",\\n" + + " \\\"holdBalance\\\": \\\"0\\\",\\n" + + " \\\"availableBalance\\\": \\\"0\\\",\\n" + + " \\\"liability\\\": \\\"0\\\",\\n" + + " \\\"interest\\\": \\\"0\\\",\\n" + + " \\\"borrowableAmount\\\": \\\"0\\\"\\n" + + " },\\n" + + " \\\"quoteAsset\\\": {\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"totalBalance\\\": \\\"0.01\\\",\\n" + + " \\\"holdBalance\\\": \\\"0\\\",\\n" + + " \\\"availableBalance\\\": \\\"0.01\\\",\\n" + + " \\\"liability\\\": \\\"0\\\",\\n" + + " \\\"interest\\\": \\\"0\\\",\\n" + + " \\\"borrowableAmount\\\": \\\"0\\\"\\n" + + " }\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue( diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApiAutoGeneratedTest.java index 46dd794d..bb39e41f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApiAutoGeneratedTest.java @@ -13,14 +13,15 @@ class DepositApiAutoGeneratedTest { /** addDepositAddressV3 Request Add Deposit Address (V3) /api/v3/deposit-address/create */ public static void testAddDepositAddressV3Request() throws Exception { - String data = "{\"currency\": \"TON\", \"chain\": \"ton\", \"to\": \"trade\"}"; + String data = + "{\\\"currency\\\": \\\"TON\\\", \\\"chain\\\": \\\"ton\\\", \\\"to\\\": \\\"trade\\\"}"; AddDepositAddressV3Req obj = mapper.readValue(data, AddDepositAddressV3Req.class); } /** addDepositAddressV3 Response Add Deposit Address (V3) /api/v3/deposit-address/create */ public static void testAddDepositAddressV3Response() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"address\":\"EQCA1BI4QRZ8qYmskSRDzJmkucGodYRTZCf_b9hckjla6dZl\",\"memo\":\"2090821203\",\"chainId\":\"ton\",\"to\":\"TRADE\",\"expirationDate\":0,\"currency\":\"TON\",\"chainName\":\"TON\"}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"address\\\":\\\"EQCA1BI4QRZ8qYmskSRDzJmkucGodYRTZCf_b9hckjla6dZl\\\",\\\"memo\\\":\\\"2090821203\\\",\\\"chainId\\\":\\\"ton\\\",\\\"to\\\":\\\"TRADE\\\",\\\"expirationDate\\\":0,\\\"currency\\\":\\\"TON\\\",\\\"chainName\\\":\\\"TON\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -28,14 +29,15 @@ public static void testAddDepositAddressV3Response() throws Exception { /** getDepositAddressV3 Request Get Deposit Address (V3) /api/v3/deposit-addresses */ public static void testGetDepositAddressV3Request() throws Exception { String data = - "{\"currency\": \"BTC\", \"amount\": \"example_string_default_value\", \"chain\": \"eth\"}"; + "{\\\"currency\\\": \\\"BTC\\\", \\\"amount\\\": \\\"example_string_default_value\\\"," + + " \\\"chain\\\": \\\"eth\\\"}"; GetDepositAddressV3Req obj = mapper.readValue(data, GetDepositAddressV3Req.class); } /** getDepositAddressV3 Response Get Deposit Address (V3) /api/v3/deposit-addresses */ public static void testGetDepositAddressV3Response() throws Exception { String 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\"}]}"; + "{\\\"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\\\"}]}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -43,54 +45,55 @@ public static void testGetDepositAddressV3Response() throws Exception { /** getDepositHistory Request Get Deposit History /api/v1/deposits */ public static void testGetDepositHistoryRequest() throws Exception { String data = - "{\"currency\": \"BTC\", \"status\": \"SUCCESS\", \"startAt\": 1728663338000, \"endAt\":" - + " 1728692138000, \"currentPage\": 1, \"pageSize\": 50}"; + "{\\\"currency\\\": \\\"BTC\\\", \\\"status\\\": \\\"SUCCESS\\\", \\\"startAt\\\":" + + " 1728663338000, \\\"endAt\\\": 1728692138000, \\\"currentPage\\\": 1," + + " \\\"pageSize\\\": 50}"; GetDepositHistoryReq obj = mapper.readValue(data, GetDepositHistoryReq.class); } /** getDepositHistory Response Get Deposit History /api/v1/deposits */ public static void testGetDepositHistoryResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"currentPage\": 1,\n" - + " \"pageSize\": 50,\n" - + " \"totalNum\": 5,\n" - + " \"totalPage\": 1,\n" - + " \"items\": [\n" - + " {\n" - + " \"currency\": \"USDT\",\n" - + " \"chain\": \"\",\n" - + " \"status\": \"SUCCESS\",\n" - + " \"address\": \"a435*****@gmail.com\",\n" - + " \"memo\": \"\",\n" - + " \"isInner\": true,\n" - + " \"amount\": \"1.00000000\",\n" - + " \"fee\": \"0.00000000\",\n" - + " \"walletTxId\": null,\n" - + " \"createdAt\": 1728555875000,\n" - + " \"updatedAt\": 1728555875000,\n" - + " \"remark\": \"\",\n" - + " \"arrears\": false\n" - + " },\n" - + " {\n" - + " \"currency\": \"USDT\",\n" - + " \"chain\": \"trx\",\n" - + " \"status\": \"SUCCESS\",\n" - + " \"address\": \"TSv3L1fS7******X4nLP6rqNxYz\",\n" - + " \"memo\": \"\",\n" - + " \"isInner\": true,\n" - + " \"amount\": \"6.00000000\",\n" - + " \"fee\": \"0.00000000\",\n" - + " \"walletTxId\": null,\n" - + " \"createdAt\": 1721730920000,\n" - + " \"updatedAt\": 1721730920000,\n" - + " \"remark\": \"\",\n" - + " \"arrears\": false\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"currentPage\\\": 1,\\n" + + " \\\"pageSize\\\": 50,\\n" + + " \\\"totalNum\\\": 5,\\n" + + " \\\"totalPage\\\": 1,\\n" + + " \\\"items\\\": [\\n" + + " {\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"chain\\\": \\\"\\\",\\n" + + " \\\"status\\\": \\\"SUCCESS\\\",\\n" + + " \\\"address\\\": \\\"a435*****@gmail.com\\\",\\n" + + " \\\"memo\\\": \\\"\\\",\\n" + + " \\\"isInner\\\": true,\\n" + + " \\\"amount\\\": \\\"1.00000000\\\",\\n" + + " \\\"fee\\\": \\\"0.00000000\\\",\\n" + + " \\\"walletTxId\\\": null,\\n" + + " \\\"createdAt\\\": 1728555875000,\\n" + + " \\\"updatedAt\\\": 1728555875000,\\n" + + " \\\"remark\\\": \\\"\\\",\\n" + + " \\\"arrears\\\": false\\n" + + " },\\n" + + " {\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"chain\\\": \\\"trx\\\",\\n" + + " \\\"status\\\": \\\"SUCCESS\\\",\\n" + + " \\\"address\\\": \\\"TSv3L1fS7******X4nLP6rqNxYz\\\",\\n" + + " \\\"memo\\\": \\\"\\\",\\n" + + " \\\"isInner\\\": true,\\n" + + " \\\"amount\\\": \\\"6.00000000\\\",\\n" + + " \\\"fee\\\": \\\"0.00000000\\\",\\n" + + " \\\"walletTxId\\\": null,\\n" + + " \\\"createdAt\\\": 1721730920000,\\n" + + " \\\"updatedAt\\\": 1721730920000,\\n" + + " \\\"remark\\\": \\\"\\\",\\n" + + " \\\"arrears\\\": false\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -98,26 +101,26 @@ public static void testGetDepositHistoryResponse() throws Exception { /** getDepositAddressV2 Request Get Deposit Addresses (V2) /api/v2/deposit-addresses */ public static void testGetDepositAddressV2Request() throws Exception { - String data = "{\"currency\": \"BTC\", \"chain\": \"eth\"}"; + String data = "{\\\"currency\\\": \\\"BTC\\\", \\\"chain\\\": \\\"eth\\\"}"; GetDepositAddressV2Req obj = mapper.readValue(data, GetDepositAddressV2Req.class); } /** getDepositAddressV2 Response Get Deposit Addresses (V2) /api/v2/deposit-addresses */ public static void testGetDepositAddressV2Response() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -125,23 +128,23 @@ public static void testGetDepositAddressV2Response() throws Exception { /** getDepositAddressV1 Request Get Deposit Addresses - V1 /api/v1/deposit-addresses */ public static void testGetDepositAddressV1Request() throws Exception { - String data = "{\"currency\": \"BTC\", \"chain\": \"eth\"}"; + String data = "{\\\"currency\\\": \\\"BTC\\\", \\\"chain\\\": \\\"eth\\\"}"; GetDepositAddressV1Req obj = mapper.readValue(data, GetDepositAddressV1Req.class); } /** getDepositAddressV1 Response Get Deposit Addresses - V1 /api/v1/deposit-addresses */ public static void testGetDepositAddressV1Response() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"address\": \"0xea220bf61c3c2b0adc2cfa29fec3d2677745a379\",\n" - + " \"memo\": \"\",\n" - + " \"chain\": \"ERC20\",\n" - + " \"chainId\": \"eth\",\n" - + " \"to\": \"MAIN\",\n" - + " \"currency\": \"USDT\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"address\\\": \\\"0xea220bf61c3c2b0adc2cfa29fec3d2677745a379\\\",\\n" + + " \\\"memo\\\": \\\"\\\",\\n" + + " \\\"chain\\\": \\\"ERC20\\\",\\n" + + " \\\"chainId\\\": \\\"eth\\\",\\n" + + " \\\"to\\\": \\\"MAIN\\\",\\n" + + " \\\"currency\\\": \\\"USDT\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -150,33 +153,33 @@ public static void testGetDepositAddressV1Response() throws Exception { /** getDepositHistoryOld Request Get Deposit History - Old /api/v1/hist-deposits */ public static void testGetDepositHistoryOldRequest() throws Exception { String data = - "{\"currency\": \"BTC\", \"status\": \"SUCCESS\", \"startAt\": 1728663338000, \"endAt\":" - + " 1728692138000}"; + "{\\\"currency\\\": \\\"BTC\\\", \\\"status\\\": \\\"SUCCESS\\\", \\\"startAt\\\":" + + " 1728663338000, \\\"endAt\\\": 1728692138000}"; GetDepositHistoryOldReq obj = mapper.readValue(data, GetDepositHistoryOldReq.class); } /** getDepositHistoryOld Response Get Deposit History - Old /api/v1/hist-deposits */ public static void testGetDepositHistoryOldResponse() throws Exception { String data = - "{\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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -184,14 +187,15 @@ public static void testGetDepositHistoryOldResponse() throws Exception { /** addDepositAddressV1 Request Add Deposit Address - V1 /api/v1/deposit-addresses */ public static void testAddDepositAddressV1Request() throws Exception { - String data = "{\"currency\": \"ETH\", \"chain\": \"eth\", \"to\": \"MAIN\"}"; + String data = + "{\\\"currency\\\": \\\"ETH\\\", \\\"chain\\\": \\\"eth\\\", \\\"to\\\": \\\"MAIN\\\"}"; AddDepositAddressV1Req obj = mapper.readValue(data, AddDepositAddressV1Req.class); } /** addDepositAddressV1 Response Add Deposit Address - V1 /api/v1/deposit-addresses */ public static void testAddDepositAddressV1Response() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"address\":\"0x02028456f38e78609904e8a002c787ede7a73d7c\",\"memo\":null,\"chain\":\"ERC20\",\"chainId\":\"eth\",\"to\":\"MAIN\",\"currency\":\"ETH\"}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"address\\\":\\\"0x02028456f38e78609904e8a002c787ede7a73d7c\\\",\\\"memo\\\":null,\\\"chain\\\":\\\"ERC20\\\",\\\"chainId\\\":\\\"eth\\\",\\\"to\\\":\\\"MAIN\\\",\\\"currency\\\":\\\"ETH\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApiAutoGeneratedTest.java index 48c70cf4..e8947c0b 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApiAutoGeneratedTest.java @@ -13,19 +13,19 @@ class FeeApiAutoGeneratedTest { /** getBasicFee Request Get Basic Fee - Spot/Margin /api/v1/base-fee */ public static void testGetBasicFeeRequest() throws Exception { - String data = "{\"currencyType\": 1}"; + String data = "{\\\"currencyType\\\": 1}"; GetBasicFeeReq obj = mapper.readValue(data, GetBasicFeeReq.class); } /** getBasicFee Response Get Basic Fee - Spot/Margin /api/v1/base-fee */ public static void testGetBasicFeeResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"takerFeeRate\": \"0.001\",\n" - + " \"makerFeeRate\": \"0.001\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"takerFeeRate\\\": \\\"0.001\\\",\\n" + + " \\\"makerFeeRate\\\": \\\"0.001\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -33,28 +33,28 @@ public static void testGetBasicFeeResponse() throws Exception { /** getSpotActualFee Request Get Actual Fee - Spot/Margin /api/v1/trade-fees */ public static void testGetSpotActualFeeRequest() throws Exception { - String data = "{\"symbols\": \"BTC-USDT,ETH-USDT\"}"; + String data = "{\\\"symbols\\\": \\\"BTC-USDT,ETH-USDT\\\"}"; GetSpotActualFeeReq obj = mapper.readValue(data, GetSpotActualFeeReq.class); } /** getSpotActualFee Response Get Actual Fee - Spot/Margin /api/v1/trade-fees */ public static void testGetSpotActualFeeResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":[{\"symbol\":\"BTC-USDT\",\"takerFeeRate\":\"0.001\",\"makerFeeRate\":\"0.001\"},{\"symbol\":\"ETH-USDT\",\"takerFeeRate\":\"0.001\",\"makerFeeRate\":\"0.001\"}]}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":[{\\\"symbol\\\":\\\"BTC-USDT\\\",\\\"takerFeeRate\\\":\\\"0.001\\\",\\\"makerFeeRate\\\":\\\"0.001\\\"},{\\\"symbol\\\":\\\"ETH-USDT\\\",\\\"takerFeeRate\\\":\\\"0.001\\\",\\\"makerFeeRate\\\":\\\"0.001\\\"}]}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** getFuturesActualFee Request Get Actual Fee - Futures /api/v1/trade-fees */ public static void testGetFuturesActualFeeRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; GetFuturesActualFeeReq obj = mapper.readValue(data, GetFuturesActualFeeReq.class); } /** getFuturesActualFee Response Get Actual Fee - Futures /api/v1/trade-fees */ public static void testGetFuturesActualFeeResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"symbol\":\"XBTUSDTM\",\"takerFeeRate\":\"0.0006\",\"makerFeeRate\":\"0.0002\"}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"takerFeeRate\\\":\\\"0.0006\\\",\\\"makerFeeRate\\\":\\\"0.0002\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiAutoGeneratedTest.java index c9e38655..53e708ae 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiAutoGeneratedTest.java @@ -14,22 +14,22 @@ class SubAccountApiAutoGeneratedTest { /** addSubAccount Request Add sub-account /api/v2/sub/user/created */ public static void testAddSubAccountRequest() throws Exception { String data = - "{\"password\": \"q1234567\", \"access\": \"Spot\", \"subName\": \"subNameTest1\"," - + " \"remarks\": \"TheRemark\"}"; + "{\\\"password\\\": \\\"q1234567\\\", \\\"access\\\": \\\"Spot\\\", \\\"subName\\\":" + + " \\\"subNameTest1\\\", \\\"remarks\\\": \\\"TheRemark\\\"}"; AddSubAccountReq obj = mapper.readValue(data, AddSubAccountReq.class); } /** addSubAccount Response Add sub-account /api/v2/sub/user/created */ public static void testAddSubAccountResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"uid\": 245730746,\n" - + " \"subName\": \"subNameTest1\",\n" - + " \"remarks\": \"TheRemark\",\n" - + " \"access\": \"Spot\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"uid\\\": 245730746,\\n" + + " \\\"subName\\\": \\\"subNameTest1\\\",\\n" + + " \\\"remarks\\\": \\\"TheRemark\\\",\\n" + + " \\\"access\\\": \\\"Spot\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -40,7 +40,7 @@ public static void testAddSubAccountResponse() throws Exception { * /api/v3/sub/user/margin/enable */ public static void testAddSubAccountMarginPermissionRequest() throws Exception { - String data = "{\"uid\": \"169579801\"}"; + String data = "{\\\"uid\\\": \\\"169579801\\\"}"; AddSubAccountMarginPermissionReq obj = mapper.readValue(data, AddSubAccountMarginPermissionReq.class); } @@ -50,7 +50,7 @@ public static void testAddSubAccountMarginPermissionRequest() throws Exception { * /api/v3/sub/user/margin/enable */ public static void testAddSubAccountMarginPermissionResponse() throws Exception { - String data = "{\n \"code\": \"200000\",\n \"data\": null\n}"; + String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": null\\n}"; RestResponse resp = mapper.readValue( data, new TypeReference>() {}); @@ -61,7 +61,7 @@ public static void testAddSubAccountMarginPermissionResponse() throws Exception * /api/v3/sub/user/futures/enable */ public static void testAddSubAccountFuturesPermissionRequest() throws Exception { - String data = "{\"uid\": \"169579801\"}"; + String data = "{\\\"uid\\\": \\\"169579801\\\"}"; AddSubAccountFuturesPermissionReq obj = mapper.readValue(data, AddSubAccountFuturesPermissionReq.class); } @@ -71,7 +71,7 @@ public static void testAddSubAccountFuturesPermissionRequest() throws Exception * /api/v3/sub/user/futures/enable */ public static void testAddSubAccountFuturesPermissionResponse() throws Exception { - String data = "{\n \"code\": \"200000\",\n \"data\": null\n}"; + String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": null\\n}"; RestResponse resp = mapper.readValue( data, new TypeReference>() {}); @@ -79,7 +79,7 @@ public static void testAddSubAccountFuturesPermissionResponse() throws Exception /** getSpotSubAccountsSummaryV2 Request Get sub-account List - Summary Info /api/v2/sub/user */ public static void testGetSpotSubAccountsSummaryV2Request() throws Exception { - String data = "{\"currentPage\": 1, \"pageSize\": 10}"; + String data = "{\\\"currentPage\\\": 1, \\\"pageSize\\\": 10}"; GetSpotSubAccountsSummaryV2Req obj = mapper.readValue(data, GetSpotSubAccountsSummaryV2Req.class); } @@ -87,35 +87,35 @@ public static void testGetSpotSubAccountsSummaryV2Request() throws Exception { /** getSpotSubAccountsSummaryV2 Response Get sub-account List - Summary Info /api/v2/sub/user */ public static void testGetSpotSubAccountsSummaryV2Response() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue( @@ -128,9 +128,9 @@ public static void testGetSpotSubAccountsSummaryV2Response() throws Exception { */ public static void testGetSpotSubAccountDetailRequest() throws Exception { String data = - "{\"subUserId\": \"63743f07e0c5230001761d08\", \"includeBaseAmount\": true," - + " \"baseCurrency\": \"example_string_default_value\", \"baseAmount\":" - + " \"example_string_default_value\"}"; + "{\\\"subUserId\\\": \\\"63743f07e0c5230001761d08\\\", \\\"includeBaseAmount\\\": true," + + " \\\"baseCurrency\\\": \\\"example_string_default_value\\\", \\\"baseAmount\\\":" + + " \\\"example_string_default_value\\\"}"; GetSpotSubAccountDetailReq obj = mapper.readValue(data, GetSpotSubAccountDetailReq.class); } @@ -140,49 +140,49 @@ public static void testGetSpotSubAccountDetailRequest() throws Exception { */ public static void testGetSpotSubAccountDetailResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -192,7 +192,7 @@ public static void testGetSpotSubAccountDetailResponse() throws Exception { * getSpotSubAccountListV2 Request Get sub-account List - Spot Balance (V2) /api/v2/sub-accounts */ public static void testGetSpotSubAccountListV2Request() throws Exception { - String data = "{\"currentPage\": 1, \"pageSize\": 10}"; + String data = "{\\\"currentPage\\\": 1, \\\"pageSize\\\": 10}"; GetSpotSubAccountListV2Req obj = mapper.readValue(data, GetSpotSubAccountListV2Req.class); } @@ -201,73 +201,73 @@ public static void testGetSpotSubAccountListV2Request() throws Exception { */ public static void testGetSpotSubAccountListV2Response() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -278,7 +278,7 @@ public static void testGetSpotSubAccountListV2Response() throws Exception { * /api/v1/account-overview-all */ public static void testGetFuturesSubAccountListV2Request() throws Exception { - String data = "{\"currency\": \"USDT\"}"; + String data = "{\\\"currency\\\": \\\"USDT\\\"}"; GetFuturesSubAccountListV2Req obj = mapper.readValue(data, GetFuturesSubAccountListV2Req.class); } @@ -288,77 +288,77 @@ public static void testGetFuturesSubAccountListV2Request() throws Exception { */ public static void testGetFuturesSubAccountListV2Response() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue( @@ -368,26 +368,26 @@ public static void testGetFuturesSubAccountListV2Response() throws Exception { /** addSubAccountApi Request Add sub-account API /api/v1/sub/api-key */ public static void testAddSubAccountApiRequest() throws Exception { String data = - "{\"subName\": \"testapi6\", \"passphrase\": \"11223344\", \"remark\": \"TheRemark\"," - + " \"permission\": \"General,Spot,Futures\"}"; + "{\\\"subName\\\": \\\"testapi6\\\", \\\"passphrase\\\": \\\"11223344\\\", \\\"remark\\\":" + + " \\\"TheRemark\\\", \\\"permission\\\": \\\"General,Spot,Futures\\\"}"; AddSubAccountApiReq obj = mapper.readValue(data, AddSubAccountApiReq.class); } /** addSubAccountApi Response Add sub-account API /api/v1/sub/api-key */ public static void testAddSubAccountApiResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -396,21 +396,22 @@ public static void testAddSubAccountApiResponse() throws Exception { /** modifySubAccountApi Request Modify sub-account API /api/v1/sub/api-key/update */ public static void testModifySubAccountApiRequest() throws Exception { String data = - "{\"subName\": \"testapi6\", \"apiKey\": \"670621e3a25958000159c82f\", \"passphrase\":" - + " \"11223344\", \"permission\": \"General,Spot,Futures\"}"; + "{\\\"subName\\\": \\\"testapi6\\\", \\\"apiKey\\\": \\\"670621e3a25958000159c82f\\\"," + + " \\\"passphrase\\\": \\\"11223344\\\", \\\"permission\\\":" + + " \\\"General,Spot,Futures\\\"}"; ModifySubAccountApiReq obj = mapper.readValue(data, ModifySubAccountApiReq.class); } /** modifySubAccountApi Response Modify sub-account API /api/v1/sub/api-key/update */ public static void testModifySubAccountApiResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"subName\": \"testapi6\",\n" - + " \"apiKey\": \"670621e3a25958000159c82f\",\n" - + " \"permission\": \"General,Futures,Spot\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"subName\\\": \\\"testapi6\\\",\\n" + + " \\\"apiKey\\\": \\\"670621e3a25958000159c82f\\\",\\n" + + " \\\"permission\\\": \\\"General,Futures,Spot\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -418,28 +419,29 @@ public static void testModifySubAccountApiResponse() throws Exception { /** getSubAccountApiList Request Get sub-account API List /api/v1/sub/api-key */ public static void testGetSubAccountApiListRequest() throws Exception { - String data = "{\"apiKey\": \"example_string_default_value\", \"subName\": \"testapi6\"}"; + String data = + "{\\\"apiKey\\\": \\\"example_string_default_value\\\", \\\"subName\\\": \\\"testapi6\\\"}"; GetSubAccountApiListReq obj = mapper.readValue(data, GetSubAccountApiListReq.class); } /** getSubAccountApiList Response Get sub-account API List /api/v1/sub/api-key */ public static void testGetSubAccountApiListResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -448,15 +450,15 @@ public static void testGetSubAccountApiListResponse() throws Exception { /** deleteSubAccountApi Request Delete sub-account API /api/v1/sub/api-key */ public static void testDeleteSubAccountApiRequest() throws Exception { String data = - "{\"apiKey\": \"670621e3a25958000159c82f\", \"subName\": \"testapi6\", \"passphrase\":" - + " \"11223344\"}"; + "{\\\"apiKey\\\": \\\"670621e3a25958000159c82f\\\", \\\"subName\\\": \\\"testapi6\\\"," + + " \\\"passphrase\\\": \\\"11223344\\\"}"; DeleteSubAccountApiReq obj = mapper.readValue(data, DeleteSubAccountApiReq.class); } /** deleteSubAccountApi Response Delete sub-account API /api/v1/sub/api-key */ public static void testDeleteSubAccountApiResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"subName\":\"testapi6\",\"apiKey\":\"670621e3a25958000159c82f\"}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"subName\\\":\\\"testapi6\\\",\\\"apiKey\\\":\\\"670621e3a25958000159c82f\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -473,26 +475,26 @@ public static void testGetSpotSubAccountsSummaryV1Request() throws Exception { */ public static void testGetSpotSubAccountsSummaryV1Response() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue( @@ -511,67 +513,67 @@ public static void testGetSpotSubAccountListV1Request() throws Exception { */ public static void testGetSpotSubAccountListV1Response() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApiAutoGeneratedTest.java index 2f77e4e8..4f81e461 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApiAutoGeneratedTest.java @@ -13,14 +13,16 @@ class TransferApiAutoGeneratedTest { /** getTransferQuotas Request Get Transfer Quotas /api/v1/accounts/transferable */ public static void testGetTransferQuotasRequest() throws Exception { - String data = "{\"currency\": \"BTC\", \"type\": \"MAIN\", \"tag\": \"ETH-USDT\"}"; + String data = + "{\\\"currency\\\": \\\"BTC\\\", \\\"type\\\": \\\"MAIN\\\", \\\"tag\\\":" + + " \\\"ETH-USDT\\\"}"; GetTransferQuotasReq obj = mapper.readValue(data, GetTransferQuotasReq.class); } /** getTransferQuotas Response Get Transfer Quotas /api/v1/accounts/transferable */ public static void testGetTransferQuotasResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"currency\":\"USDT\",\"balance\":\"10.5\",\"available\":\"10.5\",\"holds\":\"0\",\"transferable\":\"10.5\"}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"currency\\\":\\\"USDT\\\",\\\"balance\\\":\\\"10.5\\\",\\\"available\\\":\\\"10.5\\\",\\\"holds\\\":\\\"0\\\",\\\"transferable\\\":\\\"10.5\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -28,20 +30,21 @@ public static void testGetTransferQuotasResponse() throws Exception { /** flexTransfer Request Flex Transfer /api/v3/accounts/universal-transfer */ public static void testFlexTransferRequest() throws Exception { String data = - "{\"clientOid\": \"64ccc0f164781800010d8c09\", \"type\": \"PARENT_TO_SUB\", \"currency\":" - + " \"USDT\", \"amount\": \"0.01\", \"fromAccountType\": \"TRADE\", \"toUserId\":" - + " \"63743f07e0c5230001761d08\", \"toAccountType\": \"TRADE\"}"; + "{\\\"clientOid\\\": \\\"64ccc0f164781800010d8c09\\\", \\\"type\\\": \\\"PARENT_TO_SUB\\\"," + + " \\\"currency\\\": \\\"USDT\\\", \\\"amount\\\": \\\"0.01\\\"," + + " \\\"fromAccountType\\\": \\\"TRADE\\\", \\\"toUserId\\\":" + + " \\\"63743f07e0c5230001761d08\\\", \\\"toAccountType\\\": \\\"TRADE\\\"}"; FlexTransferReq obj = mapper.readValue(data, FlexTransferReq.class); } /** flexTransfer Response Flex Transfer /api/v3/accounts/universal-transfer */ public static void testFlexTransferResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"6705f7248c6954000733ecac\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"6705f7248c6954000733ecac\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -50,15 +53,17 @@ public static void testFlexTransferResponse() throws Exception { /** subAccountTransfer Request Sub-account Transfer /api/v2/accounts/sub-transfer */ public static void testSubAccountTransferRequest() throws Exception { String data = - "{\"clientOid\": \"64ccc0f164781800010d8c09\", \"currency\": \"USDT\", \"amount\":" - + " \"0.01\", \"direction\": \"OUT\", \"accountType\": \"MAIN\", \"subAccountType\":" - + " \"MAIN\", \"subUserId\": \"63743f07e0c5230001761d08\"}"; + "{\\\"clientOid\\\": \\\"64ccc0f164781800010d8c09\\\", \\\"currency\\\": \\\"USDT\\\"," + + " \\\"amount\\\": \\\"0.01\\\", \\\"direction\\\": \\\"OUT\\\", \\\"accountType\\\":" + + " \\\"MAIN\\\", \\\"subAccountType\\\": \\\"MAIN\\\", \\\"subUserId\\\":" + + " \\\"63743f07e0c5230001761d08\\\"}"; SubAccountTransferReq obj = mapper.readValue(data, SubAccountTransferReq.class); } /** subAccountTransfer Response Sub-account Transfer /api/v2/accounts/sub-transfer */ public static void testSubAccountTransferResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":{\"orderId\":\"670be6b0b1b9080007040a9b\"}}"; + String data = + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"orderId\\\":\\\"670be6b0b1b9080007040a9b\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -66,14 +71,16 @@ public static void testSubAccountTransferResponse() throws Exception { /** innerTransfer Request Internal Transfer /api/v2/accounts/inner-transfer */ public static void testInnerTransferRequest() throws Exception { String data = - "{\"clientOid\": \"64ccc0f164781800010d8c09\", \"currency\": \"USDT\", \"amount\":" - + " \"0.01\", \"from\": \"main\", \"to\": \"trade\"}"; + "{\\\"clientOid\\\": \\\"64ccc0f164781800010d8c09\\\", \\\"currency\\\": \\\"USDT\\\"," + + " \\\"amount\\\": \\\"0.01\\\", \\\"from\\\": \\\"main\\\", \\\"to\\\":" + + " \\\"trade\\\"}"; InnerTransferReq obj = mapper.readValue(data, InnerTransferReq.class); } /** innerTransfer Response Internal Transfer /api/v2/accounts/inner-transfer */ public static void testInnerTransferResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":{\"orderId\":\"670beb3482a1bb0007dec644\"}}"; + String data = + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"orderId\\\":\\\"670beb3482a1bb0007dec644\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -84,9 +91,9 @@ public static void testInnerTransferResponse() throws Exception { */ public static void testGetFuturesAccountTransferOutLedgerRequest() throws Exception { String data = - "{\"currency\": \"XBT\", \"type\": \"MAIN\", \"tag\": [\"mock_a\", \"mock_b\"]," - + " \"startAt\": 1728663338000, \"endAt\": 1728692138000, \"currentPage\": 1," - + " \"pageSize\": 50}"; + "{\\\"currency\\\": \\\"XBT\\\", \\\"type\\\": \\\"MAIN\\\", \\\"tag\\\": [\\\"mock_a\\\"," + + " \\\"mock_b\\\"], \\\"startAt\\\": 1728663338000, \\\"endAt\\\": 1728692138000," + + " \\\"currentPage\\\": 1, \\\"pageSize\\\": 50}"; GetFuturesAccountTransferOutLedgerReq obj = mapper.readValue(data, GetFuturesAccountTransferOutLedgerReq.class); } @@ -97,7 +104,7 @@ public static void testGetFuturesAccountTransferOutLedgerRequest() throws Except */ public static void testGetFuturesAccountTransferOutLedgerResponse() throws Exception { String 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\":\"\"}]}}"; + "{\\\"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\\\":\\\"\\\"}]}}"; RestResponse resp = mapper.readValue( data, new TypeReference>() {}); @@ -105,34 +112,36 @@ public static void testGetFuturesAccountTransferOutLedgerResponse() throws Excep /** futuresAccountTransferOut Request Futures Account Transfer Out /api/v3/transfer-out */ public static void testFuturesAccountTransferOutRequest() throws Exception { - String data = "{\"currency\": \"USDT\", \"amount\": 0.01, \"recAccountType\": \"MAIN\"}"; + String data = + "{\\\"currency\\\": \\\"USDT\\\", \\\"amount\\\": 0.01, \\\"recAccountType\\\":" + + " \\\"MAIN\\\"}"; FuturesAccountTransferOutReq obj = mapper.readValue(data, FuturesAccountTransferOutReq.class); } /** futuresAccountTransferOut Response Futures Account Transfer Out /api/v3/transfer-out */ public static void testFuturesAccountTransferOutResponse() throws Exception { String data = - "{\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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -140,13 +149,15 @@ public static void testFuturesAccountTransferOutResponse() throws Exception { /** futuresAccountTransferIn Request Futures Account Transfer In /api/v1/transfer-in */ public static void testFuturesAccountTransferInRequest() throws Exception { - String data = "{\"currency\": \"USDT\", \"amount\": 0.01, \"payAccountType\": \"MAIN\"}"; + String data = + "{\\\"currency\\\": \\\"USDT\\\", \\\"amount\\\": 0.01, \\\"payAccountType\\\":" + + " \\\"MAIN\\\"}"; FuturesAccountTransferInReq obj = mapper.readValue(data, FuturesAccountTransferInReq.class); } /** futuresAccountTransferIn Response Futures Account Transfer In /api/v1/transfer-in */ public static void testFuturesAccountTransferInResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":null}"; + String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":null}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApiAutoGeneratedTest.java index 462c0597..973a9167 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApiAutoGeneratedTest.java @@ -13,14 +13,14 @@ class WithdrawalApiAutoGeneratedTest { /** getWithdrawalQuotas Request Get Withdrawal Quotas /api/v1/withdrawals/quotas */ public static void testGetWithdrawalQuotasRequest() throws Exception { - String data = "{\"currency\": \"BTC\", \"chain\": \"eth\"}"; + String data = "{\\\"currency\\\": \\\"BTC\\\", \\\"chain\\\": \\\"eth\\\"}"; GetWithdrawalQuotasReq obj = mapper.readValue(data, GetWithdrawalQuotasReq.class); } /** getWithdrawalQuotas Response Get Withdrawal Quotas /api/v1/withdrawals/quotas */ public static void testGetWithdrawalQuotasResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"currency\":\"BTC\",\"limitBTCAmount\":\"15.79590095\",\"usedBTCAmount\":\"0.00000000\",\"quotaCurrency\":\"USDT\",\"limitQuotaCurrencyAmount\":\"999999.00000000\",\"usedQuotaCurrencyAmount\":\"0\",\"remainAmount\":\"15.79590095\",\"availableAmount\":\"0\",\"withdrawMinFee\":\"0.0005\",\"innerWithdrawMinFee\":\"0\",\"withdrawMinSize\":\"0.001\",\"isWithdrawEnabled\":true,\"precision\":8,\"chain\":\"BTC\",\"reason\":null,\"lockedAmount\":\"0\"}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"currency\\\":\\\"BTC\\\",\\\"limitBTCAmount\\\":\\\"15.79590095\\\",\\\"usedBTCAmount\\\":\\\"0.00000000\\\",\\\"quotaCurrency\\\":\\\"USDT\\\",\\\"limitQuotaCurrencyAmount\\\":\\\"999999.00000000\\\",\\\"usedQuotaCurrencyAmount\\\":\\\"0\\\",\\\"remainAmount\\\":\\\"15.79590095\\\",\\\"availableAmount\\\":\\\"0\\\",\\\"withdrawMinFee\\\":\\\"0.0005\\\",\\\"innerWithdrawMinFee\\\":\\\"0\\\",\\\"withdrawMinSize\\\":\\\"0.001\\\",\\\"isWithdrawEnabled\\\":true,\\\"precision\\\":8,\\\"chain\\\":\\\"BTC\\\",\\\"reason\\\":null,\\\"lockedAmount\\\":\\\"0\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -28,28 +28,29 @@ public static void testGetWithdrawalQuotasResponse() throws Exception { /** withdrawalV3 Request Withdraw (V3) /api/v3/withdrawals */ public static void testWithdrawalV3Request() throws Exception { String data = - "{\"currency\": \"USDT\", \"toAddress\": \"TKFRQXSDcY****GmLrjJggwX8\", \"amount\": \"3\"," - + " \"withdrawType\": \"ADDRESS\", \"chain\": \"trx\", \"isInner\": true, \"remark\":" - + " \"this is Remark\"}"; + "{\\\"currency\\\": \\\"USDT\\\", \\\"toAddress\\\": \\\"TKFRQXSDcY****GmLrjJggwX8\\\"," + + " \\\"amount\\\": \\\"3\\\", \\\"withdrawType\\\": \\\"ADDRESS\\\", \\\"chain\\\":" + + " \\\"trx\\\", \\\"isInner\\\": true, \\\"remark\\\": \\\"this is Remark\\\"}"; WithdrawalV3Req obj = mapper.readValue(data, WithdrawalV3Req.class); } /** withdrawalV3 Response Withdraw (V3) /api/v3/withdrawals */ public static void testWithdrawalV3Response() throws Exception { - String data = "{\"code\":\"200000\",\"data\":{\"withdrawalId\":\"670deec84d64da0007d7c946\"}}"; + String data = + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"withdrawalId\\\":\\\"670deec84d64da0007d7c946\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** cancelWithdrawal Request Cancel Withdrawal /api/v1/withdrawals/{withdrawalId} */ public static void testCancelWithdrawalRequest() throws Exception { - String data = "{\"withdrawalId\": \"670b891f7e0f440007730692\"}"; + String data = "{\\\"withdrawalId\\\": \\\"670b891f7e0f440007730692\\\"}"; CancelWithdrawalReq obj = mapper.readValue(data, CancelWithdrawalReq.class); } /** cancelWithdrawal Response Cancel Withdrawal /api/v1/withdrawals/{withdrawalId} */ public static void testCancelWithdrawalResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":null}"; + String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":null}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -57,54 +58,55 @@ public static void testCancelWithdrawalResponse() throws Exception { /** getWithdrawalHistory Request Get Withdrawal History /api/v1/withdrawals */ public static void testGetWithdrawalHistoryRequest() throws Exception { String data = - "{\"currency\": \"BTC\", \"status\": \"SUCCESS\", \"startAt\": 1728663338000, \"endAt\":" - + " 1728692138000, \"currentPage\": 1, \"pageSize\": 50}"; + "{\\\"currency\\\": \\\"BTC\\\", \\\"status\\\": \\\"SUCCESS\\\", \\\"startAt\\\":" + + " 1728663338000, \\\"endAt\\\": 1728692138000, \\\"currentPage\\\": 1," + + " \\\"pageSize\\\": 50}"; GetWithdrawalHistoryReq obj = mapper.readValue(data, GetWithdrawalHistoryReq.class); } /** getWithdrawalHistory Response Get Withdrawal History /api/v1/withdrawals */ public static void testGetWithdrawalHistoryResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"currentPage\": 1,\n" - + " \"pageSize\": 50,\n" - + " \"totalNum\": 5,\n" - + " \"totalPage\": 1,\n" - + " \"items\": [\n" - + " {\n" - + " \"currency\": \"USDT\",\n" - + " \"chain\": \"\",\n" - + " \"status\": \"SUCCESS\",\n" - + " \"address\": \"a435*****@gmail.com\",\n" - + " \"memo\": \"\",\n" - + " \"isInner\": true,\n" - + " \"amount\": \"1.00000000\",\n" - + " \"fee\": \"0.00000000\",\n" - + " \"walletTxId\": null,\n" - + " \"createdAt\": 1728555875000,\n" - + " \"updatedAt\": 1728555875000,\n" - + " \"remark\": \"\",\n" - + " \"arrears\": false\n" - + " },\n" - + " {\n" - + " \"currency\": \"USDT\",\n" - + " \"chain\": \"trx\",\n" - + " \"status\": \"SUCCESS\",\n" - + " \"address\": \"TSv3L1fS7******X4nLP6rqNxYz\",\n" - + " \"memo\": \"\",\n" - + " \"isInner\": true,\n" - + " \"amount\": \"6.00000000\",\n" - + " \"fee\": \"0.00000000\",\n" - + " \"walletTxId\": null,\n" - + " \"createdAt\": 1721730920000,\n" - + " \"updatedAt\": 1721730920000,\n" - + " \"remark\": \"\",\n" - + " \"arrears\": false\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"currentPage\\\": 1,\\n" + + " \\\"pageSize\\\": 50,\\n" + + " \\\"totalNum\\\": 5,\\n" + + " \\\"totalPage\\\": 1,\\n" + + " \\\"items\\\": [\\n" + + " {\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"chain\\\": \\\"\\\",\\n" + + " \\\"status\\\": \\\"SUCCESS\\\",\\n" + + " \\\"address\\\": \\\"a435*****@gmail.com\\\",\\n" + + " \\\"memo\\\": \\\"\\\",\\n" + + " \\\"isInner\\\": true,\\n" + + " \\\"amount\\\": \\\"1.00000000\\\",\\n" + + " \\\"fee\\\": \\\"0.00000000\\\",\\n" + + " \\\"walletTxId\\\": null,\\n" + + " \\\"createdAt\\\": 1728555875000,\\n" + + " \\\"updatedAt\\\": 1728555875000,\\n" + + " \\\"remark\\\": \\\"\\\",\\n" + + " \\\"arrears\\\": false\\n" + + " },\\n" + + " {\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"chain\\\": \\\"trx\\\",\\n" + + " \\\"status\\\": \\\"SUCCESS\\\",\\n" + + " \\\"address\\\": \\\"TSv3L1fS7******X4nLP6rqNxYz\\\",\\n" + + " \\\"memo\\\": \\\"\\\",\\n" + + " \\\"isInner\\\": true,\\n" + + " \\\"amount\\\": \\\"6.00000000\\\",\\n" + + " \\\"fee\\\": \\\"0.00000000\\\",\\n" + + " \\\"walletTxId\\\": null,\\n" + + " \\\"createdAt\\\": 1721730920000,\\n" + + " \\\"updatedAt\\\": 1721730920000,\\n" + + " \\\"remark\\\": \\\"\\\",\\n" + + " \\\"arrears\\\": false\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -115,7 +117,7 @@ public static void testGetWithdrawalHistoryResponse() throws Exception { * /api/v1/withdrawals/{withdrawalId} */ public static void testGetWithdrawalHistoryByIdRequest() throws Exception { - String data = "{\"withdrawalId\": \"67e6515f7960ba0007b42025\"}"; + String data = "{\\\"withdrawalId\\\": \\\"67e6515f7960ba0007b42025\\\"}"; GetWithdrawalHistoryByIdReq obj = mapper.readValue(data, GetWithdrawalHistoryByIdReq.class); } @@ -125,34 +127,34 @@ public static void testGetWithdrawalHistoryByIdRequest() throws Exception { */ public static void testGetWithdrawalHistoryByIdResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"id\": \"67e6515f7960ba0007b42025\",\n" - + " \"uid\": 165111215,\n" - + " \"currency\": \"USDT\",\n" - + " \"chainId\": \"trx\",\n" - + " \"chainName\": \"TRC20\",\n" - + " \"currencyName\": \"USDT\",\n" - + " \"status\": \"SUCCESS\",\n" - + " \"failureReason\": \"\",\n" - + " \"failureReasonMsg\": null,\n" - + " \"address\": \"TKFRQXSDcY4kd3QLzw7uK16GmLrjJggwX8\",\n" - + " \"memo\": \"\",\n" - + " \"isInner\": true,\n" - + " \"amount\": \"3.00000000\",\n" - + " \"fee\": \"0.00000000\",\n" - + " \"walletTxId\": null,\n" - + " \"addressRemark\": null,\n" - + " \"remark\": \"this is Remark\",\n" - + " \"createdAt\": 1743147359000,\n" - + " \"cancelType\": \"NON_CANCELABLE\",\n" - + " \"taxes\": null,\n" - + " \"taxDescription\": null,\n" - + " \"returnStatus\": \"NOT_RETURN\",\n" - + " \"returnAmount\": null,\n" - + " \"returnCurrency\": \"KCS\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"id\\\": \\\"67e6515f7960ba0007b42025\\\",\\n" + + " \\\"uid\\\": 165111215,\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"chainId\\\": \\\"trx\\\",\\n" + + " \\\"chainName\\\": \\\"TRC20\\\",\\n" + + " \\\"currencyName\\\": \\\"USDT\\\",\\n" + + " \\\"status\\\": \\\"SUCCESS\\\",\\n" + + " \\\"failureReason\\\": \\\"\\\",\\n" + + " \\\"failureReasonMsg\\\": null,\\n" + + " \\\"address\\\": \\\"TKFRQXSDcY4kd3QLzw7uK16GmLrjJggwX8\\\",\\n" + + " \\\"memo\\\": \\\"\\\",\\n" + + " \\\"isInner\\\": true,\\n" + + " \\\"amount\\\": \\\"3.00000000\\\",\\n" + + " \\\"fee\\\": \\\"0.00000000\\\",\\n" + + " \\\"walletTxId\\\": null,\\n" + + " \\\"addressRemark\\\": null,\\n" + + " \\\"remark\\\": \\\"this is Remark\\\",\\n" + + " \\\"createdAt\\\": 1743147359000,\\n" + + " \\\"cancelType\\\": \\\"NON_CANCELABLE\\\",\\n" + + " \\\"taxes\\\": null,\\n" + + " \\\"taxDescription\\\": null,\\n" + + " \\\"returnStatus\\\": \\\"NOT_RETURN\\\",\\n" + + " \\\"returnAmount\\\": null,\\n" + + " \\\"returnCurrency\\\": \\\"KCS\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -161,34 +163,35 @@ public static void testGetWithdrawalHistoryByIdResponse() throws Exception { /** getWithdrawalHistoryOld Request Get Withdrawal History - Old /api/v1/hist-withdrawals */ public static void testGetWithdrawalHistoryOldRequest() throws Exception { String data = - "{\"currency\": \"BTC\", \"status\": \"SUCCESS\", \"startAt\": 1728663338000, \"endAt\":" - + " 1728692138000, \"currentPage\": 1, \"pageSize\": 50}"; + "{\\\"currency\\\": \\\"BTC\\\", \\\"status\\\": \\\"SUCCESS\\\", \\\"startAt\\\":" + + " 1728663338000, \\\"endAt\\\": 1728692138000, \\\"currentPage\\\": 1," + + " \\\"pageSize\\\": 50}"; GetWithdrawalHistoryOldReq obj = mapper.readValue(data, GetWithdrawalHistoryOldReq.class); } /** getWithdrawalHistoryOld Response Get Withdrawal History - Old /api/v1/hist-withdrawals */ public static void testGetWithdrawalHistoryOldResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"currentPage\": 1,\n" - + " \"pageSize\": 50,\n" - + " \"totalNum\": 1,\n" - + " \"totalPage\": 1,\n" - + " \"items\": [\n" - + " {\n" - + " \"currency\": \"BTC\",\n" - + " \"createAt\": 1526723468,\n" - + " \"amount\": \"0.534\",\n" - + " \"address\": \"33xW37ZSW4tQvg443Pc7NLCAs167Yc2XUV\",\n" - + " \"walletTxId\":" - + " \"aeacea864c020acf58e51606169240e96774838dcd4f7ce48acf38e3651323f4\",\n" - + " \"isInner\": false,\n" - + " \"status\": \"SUCCESS\"\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"currentPage\\\": 1,\\n" + + " \\\"pageSize\\\": 50,\\n" + + " \\\"totalNum\\\": 1,\\n" + + " \\\"totalPage\\\": 1,\\n" + + " \\\"items\\\": [\\n" + + " {\\n" + + " \\\"currency\\\": \\\"BTC\\\",\\n" + + " \\\"createAt\\\": 1526723468,\\n" + + " \\\"amount\\\": \\\"0.534\\\",\\n" + + " \\\"address\\\": \\\"33xW37ZSW4tQvg443Pc7NLCAs167Yc2XUV\\\",\\n" + + " \\\"walletTxId\\\":" + + " \\\"aeacea864c020acf58e51606169240e96774838dcd4f7ce48acf38e3651323f4\\\",\\n" + + " \\\"isInner\\\": false,\\n" + + " \\\"status\\\": \\\"SUCCESS\\\"\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -197,14 +200,15 @@ public static void testGetWithdrawalHistoryOldResponse() throws Exception { /** withdrawalV1 Request Withdraw - V1 /api/v1/withdrawals */ public static void testWithdrawalV1Request() throws Exception { String data = - "{\"currency\": \"USDT\", \"address\": \"TKFRQXSDc****16GmLrjJggwX8\", \"amount\": 3," - + " \"chain\": \"trx\", \"isInner\": true}"; + "{\\\"currency\\\": \\\"USDT\\\", \\\"address\\\": \\\"TKFRQXSDc****16GmLrjJggwX8\\\"," + + " \\\"amount\\\": 3, \\\"chain\\\": \\\"trx\\\", \\\"isInner\\\": true}"; WithdrawalV1Req obj = mapper.readValue(data, WithdrawalV1Req.class); } /** withdrawalV1 Response Withdraw - V1 /api/v1/withdrawals */ public static void testWithdrawalV1Response() throws Exception { - String data = "{\"code\":\"200000\",\"data\":{\"withdrawalId\":\"670a973cf07b3800070e216c\"}}"; + String data = + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"withdrawalId\\\":\\\"670a973cf07b3800070e216c\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiAutoGeneratedTest.java index f4f6c01a..f9a85608 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiAutoGeneratedTest.java @@ -19,35 +19,35 @@ public static void testGetAccountRequest() throws Exception { /** getAccount Response Get Account /api/v2/affiliate/inviter/statistics */ public static void testGetAccountResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"parentUid\": \"1000000\",\n" - + " \"orders\": [\n" - + " {\n" - + " \"orderId\": \"1668458892612980737\",\n" - + " \"currency\": \"USDT\",\n" - + " \"principal\": \"100\",\n" - + " \"interest\": \"0\"\n" - + " }\n" - + " ],\n" - + " \"ltv\": {\n" - + " \"transferLtv\": \"0.6000\",\n" - + " \"onlyClosePosLtv\": \"0.7500\",\n" - + " \"delayedLiquidationLtv\": \"0.9000\",\n" - + " \"instantLiquidationLtv\": \"0.9500\",\n" - + " \"currentLtv\": \"0.0854\"\n" - + " },\n" - + " \"totalMarginAmount\": \"1170.36181573\",\n" - + " \"transferMarginAmount\": \"166.66666666\",\n" - + " \"margins\": [\n" - + " {\n" - + " \"marginCcy\": \"USDT\",\n" - + " \"marginQty\": \"1170.36181573\",\n" - + " \"marginFactor\": \"1.000000000000000000\"\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"parentUid\\\": \\\"1000000\\\",\\n" + + " \\\"orders\\\": [\\n" + + " {\\n" + + " \\\"orderId\\\": \\\"1668458892612980737\\\",\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"principal\\\": \\\"100\\\",\\n" + + " \\\"interest\\\": \\\"0\\\"\\n" + + " }\\n" + + " ],\\n" + + " \\\"ltv\\\": {\\n" + + " \\\"transferLtv\\\": \\\"0.6000\\\",\\n" + + " \\\"onlyClosePosLtv\\\": \\\"0.7500\\\",\\n" + + " \\\"delayedLiquidationLtv\\\": \\\"0.9000\\\",\\n" + + " \\\"instantLiquidationLtv\\\": \\\"0.9500\\\",\\n" + + " \\\"currentLtv\\\": \\\"0.0854\\\"\\n" + + " },\\n" + + " \\\"totalMarginAmount\\\": \\\"1170.36181573\\\",\\n" + + " \\\"transferMarginAmount\\\": \\\"166.66666666\\\",\\n" + + " \\\"margins\\\": [\\n" + + " {\\n" + + " \\\"marginCcy\\\": \\\"USDT\\\",\\n" + + " \\\"marginQty\\\": \\\"1170.36181573\\\",\\n" + + " \\\"marginFactor\\\": \\\"1.000000000000000000\\\"\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApi.java similarity index 95% rename from sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApi.java rename to sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApi.java index f075e079..1309db7d 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApi.java @@ -2,7 +2,7 @@ package com.kucoin.universal.sdk.generate.broker.apibroker; -public interface ApiBrokerApi { +public interface APIBrokerApi { /** * Get Broker Rebate This interface supports the downloading of Broker rebate orders. docs diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApi.template similarity index 100% rename from sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApi.template rename to sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApi.template diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApiAutoGeneratedTest.java similarity index 74% rename from sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApiAutoGeneratedTest.java rename to sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApiAutoGeneratedTest.java index 7c0961a1..7c00fed0 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApiAutoGeneratedTest.java @@ -6,34 +6,36 @@ import java.util.ArrayList; import java.util.List; -class ApiBrokerApiAutoGeneratedTest { +class APIBrokerApiAutoGeneratedTest { public static ObjectMapper mapper = new ObjectMapper(); private static final List failedTests = new ArrayList<>(); /** getRebase Request Get Broker Rebate /api/v1/broker/api/rebase/download */ public static void testGetRebaseRequest() throws Exception { - String data = "{\"begin\": \"20240610\", \"end\": \"20241010\", \"tradeType\": \"1\"}"; + String data = + "{\\\"begin\\\": \\\"20240610\\\", \\\"end\\\": \\\"20241010\\\", \\\"tradeType\\\":" + + " \\\"1\\\"}"; GetRebaseReq obj = mapper.readValue(data, GetRebaseReq.class); } /** getRebase Response Get Broker Rebate /api/v1/broker/api/rebase/download */ public static void testGetRebaseResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"url\":" - + " \"https://kc-v2-promotion.s3.ap-northeast-1.amazonaws.com/broker/671aec522593f600019766d0_file.csv?X-Amz-Security-Token=IQo*********2cd90f14efb\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"url\\\":" + + " \\\"https://kc-v2-promotion.s3.ap-northeast-1.amazonaws.com/broker/671aec522593f600019766d0_file.csv?X-Amz-Security-Token=IQo*********2cd90f14efb\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } public static void runAllTests() { - run(ApiBrokerApiAutoGeneratedTest::testGetRebaseRequest, "testGetRebaseRequest"); - run(ApiBrokerApiAutoGeneratedTest::testGetRebaseResponse, "testGetRebaseResponse"); + run(APIBrokerApiAutoGeneratedTest::testGetRebaseRequest, "testGetRebaseRequest"); + run(APIBrokerApiAutoGeneratedTest::testGetRebaseResponse, "testGetRebaseResponse"); } private static void run(TestCase test, String name) { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApiImpl.java similarity index 81% rename from sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApiImpl.java rename to sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApiImpl.java index 00e79bee..135aba6b 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/ApiBrokerApiImpl.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApiImpl.java @@ -4,10 +4,10 @@ import com.kucoin.universal.sdk.internal.interfaces.Transport; -public class ApiBrokerApiImpl implements ApiBrokerApi { +public class APIBrokerApiImpl implements APIBrokerApi { private final Transport transport; - public ApiBrokerApiImpl(Transport transport) { + public APIBrokerApiImpl(Transport transport) { this.transport = transport; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApi.java similarity index 99% rename from sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApi.java rename to sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApi.java index 5ad82767..22451a1c 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApi.java @@ -2,7 +2,7 @@ package com.kucoin.universal.sdk.generate.broker.ndbroker; -public interface NdBrokerApi { +public interface NDBrokerApi { /** * Submit KYC This endpointcan submit kyc information for a sub-account of nd broker docs +-----------------------+---------+ diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApi.template similarity index 100% rename from sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApi.template rename to sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApi.template diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApiAutoGeneratedTest.java new file mode 100644 index 00000000..3af6aeba --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApiAutoGeneratedTest.java @@ -0,0 +1,548 @@ +package com.kucoin.universal.sdk.generate.broker.ndbroker; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.ArrayList; +import java.util.List; + +class NDBrokerApiAutoGeneratedTest { + public static ObjectMapper mapper = new ObjectMapper(); + + private static final List failedTests = new ArrayList<>(); + + /** submitKYC Request Submit KYC /api/kyc/ndBroker/proxyClient/submit */ + public static void testSubmitKYCRequest() throws Exception { + String data = + "{\\\"clientUid\\\": \\\"226383154\\\", \\\"firstName\\\": \\\"Kaylah\\\"," + + " \\\"lastName\\\": \\\"Padberg\\\", \\\"issueCountry\\\": \\\"JP\\\"," + + " \\\"birthDate\\\": \\\"2000-01-01\\\", \\\"expireDate\\\": \\\"2030-01-01\\\"," + + " \\\"identityType\\\": \\\"passport\\\", \\\"identityNumber\\\": \\\"55\\\"," + + " \\\"facePhoto\\\":" + + " \\\"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wgARCAKyArIDASIAAhEBAxEB/8QAHAABAAICAwEAAAAAAAAAAAAAAAYHAQUCAwQI/8QAGgEBAAMBAQEAAAAAAAAAAAAAAAEDBAIFBv/aAAwDAQACEAMQAAABtQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwZaCOFhddTQMu+OVHgsXxwYTn112LckVBZPqHv8AmGal0o5IwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdZ007qYwDBnDIxstcYAAAzgZm0IyfSW3+X7lJ2xkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQecac+b8bbaxMUWtouZguTvmceT3SWm2n8ZxdUAAAAzgW1Z/yvcBZIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHi4UieW5qp8VVly+Op5rX3Ura+vRTM5N7sZNPzzjONmUAAAAB29Qv+V/OH0UdoAAAAAAAAAAAAAAAAAAAAAAAAAAAADrqQsyv4NPOOoBZUn7KLaslMThFvH0LU/rnHHfLc1rZlfWOPPFffzlx5cd+MJAAAAAZuCn9yfSDGQAAAAAAAAAAAAAAAAAAAAAAAAAABx5ViROQeayaLePIy3Ojv1XUUV1m/LIbrqa2s19OXJTVyxLjy81Pfz1x5c9+Tqe3yHFlLAAAAGcZPovfV3YgAAAAAAAAAAAAAAAAAAAAAAAAAABx+cr3pmJt3vPP1APP6Evnfru3r1U5kWM5rtdsSDw+4in7U9juMR+QuZoPWXhSGzPjB3yAAAzjJYtyUndgAAAAAAAAAAAAAAAAAAAAAAAAAABoanuz595m8hg1AOjv4uuns5cup8nrOYByAEAlmir0pu+uKYNVAAADOMlhXPW1kgAAAAAAAAAAAAAAAAAAAAAAAAAACgb+hJ3baprZxaAr7AAAAAMZAFEWdTWmniNFQAADONuXfJOPIAAAAAAAAAAAAAAAAAAAAAAAAAAHE5dUcp46bIjUep6vNGZNm0BzIAAAFPd2l027NbunrlE93ThZwAAABm26o3MLZjGnk+K7U7X1aSvqz/d86Xx6OfZiQAAAAAAAAAAAAAAAAAAAAADo0dMomteSaO984tvqgnn3TCIcJp2qKwJNGbIsbsoWd1XT95vTT0ESEgKN0c2hO/LjGcdQAAABkkXE9dqd/f8v6OGcebeCNFAp/Xn1fnT3t0Hn9rDYclojWV2fR6mLHr7kDGQAAAAAAAAAAAAAAAAABD+NRTCc9vp9LBofJ17jztfh9cNvvJfzqO3Pn6J9k51sYmywqnncMtq5bze6+nRud9Sux75u3u+e/VzF9qNzE27SOz8NtetcudnHVjvynz59XOJ8TbeuLI9sJFoolcMelfz2jA8fQA6+2utlekm2kkv3/z7JsyMZQ0sVsTFN2ntukMYN17Ortr7AAAAAAAAAAAAAAAAQvlUExiw+Pp9Lzwvphe60cs8T1IndNB33nu6qHuij5mfZjvuo1RryeiQbMm5jWs9lOj2+j3w7nZ3S3POu/Ar0YZGMgzgkDOCJeH3ceq/FZFOXH5fl4HkaBqLeddDPFYn3HjduT2vLAAARGXYr719sfOH0D5Xpe8R0AAAAAAAAAAAAAAi3royYzPsev0sGMl9AEJmEQlng+rpczuoc9tkQqO2Be3NaXrXdfe4zX+v7jhKI/mNXVvs7KnWFG0EgAAAADMxD7npa6cXjjq8PT0VL3Sn7LyvX7j6PxgmAABCK7JurXdU2+iReXSUX3mM14AAAAAAAAAAAADw+2izTzTx7z0MWRqygARPddEK8n0bAiXjtHBpg2izNe7Onbx3yc99GgmcXs4mbo78fvM4c9gAAAAAABPMQuem7kw+RisO/o20eyTH1fhh3wAABrI3J4l5Po23VlqQP5f1eUa3sa+s8r6QGe4AAAAAAAAAAAACC1tmZaKO/J6fnhAADjXNkYqthOd/q/P2eTfxbxZ9c5QLOe6eRbwdXXMi2sH9kbJYivPi6UI12R3IGj58zuWs5Oti8OYn2vET7Xi4I2LWdcxt+Oi8ndPn3cXmmzxNdNGfX8wLKwAAAEOmLiytvBa1deftn0Ik8E75+nHz3Z+XRNQAAAAAAAAAAAPL6o0UlZUCnvo4Q05gAAAAAMdfaifN1e/ET4OOxQ1PDck6HrkSJjPTLETD+EzRMJxN0TB04JhHOaEQ70yhMR737J1zxzlZWAAAAAAAhkz0dN0LuKBWZ5foeOorqqtN07GOyIAAAAAAAAAAAV7YVPGslei33q+aFtQAAAAAAAAAAAAAAAAAAAAAA8sT6kLxTdNXj9l1ITCv5rDcmqx9weft4UvM/RKy/WAAAAAAAAAADz86JPVD7ShRKtl5PX7HlB1yAAAAAAAAAAAAAAAAAAAAABxredxbzt0wSZ8P7lL2PFdt9v4m3Ov0cMOlle3V5Pp8/J660460P0NCp8kAAAAAAAAAAYKx1kSuU7KduKqiV+jU7b2PLDrgAAAAAAAAAAAAAAAAAAAAADhXFleDPfsu2uNf8563fYUdlP0Hl4jUhrfqJhPvJ3+bv0sD8t3y3WQAAAAAAAAAAeD39J8+3DSl0HZH5AKVn/orTRTZiKyffh5mgRuo/DPPj2SHq0Si6R7mBuubd7KnnezLvRozgAAAAAAAADBlq9dXZJUZ2JtXHl3WEgAAGs2fl47is0r/ALc2nt32ps/HpzXErgfPUws7hzAAAAAAAAAAAAK5r36Hi5rNtVHgLm6Kg4G9iOy29tes0eevjoY56zj1SAirbaoc+vJYW/qa0vRwd405wAAAAAABC67NjDvHjzt+cFVgHqmMEzZXb+YNOfSwBZWIxx3J+mu/Xl077S7reU3VbY0t7qLcY5V9CM3fC7SkAAAAAAAAAAAAAA4cxAq3+hYL1Gqj2p0+jP5uOeOXS93isQmPuDhUFxREqlnBmcQf32cWjmu+vXlshXvt65mqJ+vviQtJ6O+dm8vZMdzhymMgA0tc77QeZ6ODNNpv7VKP6/oCAFfYzg5TyA7C2u0mM+r5isLPh+XTZ3ZSWz8/bbSouRbaovAmxoR7bmPZ2AAAAAAAAAAAAAAAABilrqrEqTGcGbMrLdF1OHMQ2V04abGcGZ5A7ZLQ48h4NVJBBfBZKIqvV3QmaE8/0GR878PotL5vz9Hj5w6vpTxnzLwInGccy7tnx5DGRR2s3uiHLjklvZM9ldVXWLE5FW6u85DX3Et9tHM6338yQAAAAAAAAAAAAAAAAAGv2A+XfPb9QmM4G238KybLW4Aydv0bCLOAAAAAAAHHkPl/yz2BDOBdG8o2fkz1sfr88XVnA5Yk5enuAAAAAAAAAAAAAAAAAAAAAAABWllj5b6vpSuCssSbyGkSWTlcWnOdyYyAAAAAAAAGk+ePqKIFC49XmDAzgM4z2GL71FhAAAAAAAAAAAAAAAAAAAAAAAAAAGGQAAAAAAAAAAABqqvuUfMHm+ptYfNfd9F7QpO0t8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEgAgAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgEgAgAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/xAAxEAABBAEBBwMDBAIDAQAAAAAEAQIDBQAGEBESExQwQBUgUCExNRYiI2AyMyQ0oCX/2gAIAQEAAQUC/wDXq97Y2k31fBkurIkyTVRS4upz8TU5+R6qKRYtWR4PqCvmyKaOZv8ASjLcMTH6qERTNUyOwowgpewOTMO4LUxMSV9yIav9GJnjHiuNQSleBVagIEyvsBzo/wChvcjG3lm6wJ9sIzph+2PPIPLR3zC2/wBC1fO6Kr92k1/5+ow0FL7mnr3ixP6DagssBLIKQAkCkIKiH06OzL+qjEj2aTb/AMzU8fHW93S9vz0/oBZEYsDEktrT+OGNkjH5ZRc8DZpQfgHtI+bXd1j3Mdp6y9QE+eNLhDiubSSznjn9IjiCOsnSgn17qa5Ql1iM8UusrJjXwRNghITfB3qg1wBsT2yR/NmHDhtP1TkcZdnPWVLAowqeTqfWwGLHJHPHdgKERWzMPBRN2x3+Pf0cbxwfMyPbGy31HI9wwRdg8PT8ESxsbGzNSHLKRmliXNKuoOfW6SmVJdi/Zfv3qgrpLD5hyo1t7avsJ6ekajERETZO/lwPcr3Zp/8ALqm9KJyxXOx32X79+jI6mr+X1dYqxumq5HJ7LX8bs0tErrDKdFW82Erwj41jnK4Wdqd3Rc3ED8s5UakznWNpDGkMXsIZzYJo3RSNarlpAOhEyEIeGfYcx0gdbTTETjDRDR5Y1UBiHhyBzdvRT9x3y1u/l1mmo+O091jVjnKBUjBORd/augusC7ejPyvy18nFT6VX/wCj7ZncDYXK5kjeJsDVb27mLk2Xa0UzfY/LFR84aof09r7XJvRE3J3NTbvVe1oqHhF+X1IKottVk9UD4VvNz7DtaeH6ap+X1RX9WFpw9B5vBvrBBB+1Vi9Yc1ERPl5HtYy15CH0NihUHc1GS6SyAvph2N1EGqGaj3pLI6WTtaRESCArUQMCyark3/qsjBdVRucIXAXH8iq7stLkcKIgk21mHod7CIJ60qotGGs7dx+U7se5HzklWLxqGV6Q04bE9MDwyijeg8pNSbXmxHD/AB00rIWWWp8KKIJWvEeZOMPGNGZZDi4dbsKia5Wurb9UyN7ZG9m7Tda92sr3myCixCs9lsC0yCnsX1pX6rixuqhlwW+AIxkjJE+Jt7aGuYWWVakQV0UEaI44wYeIOCyt3zLXUpBiQ6dEYjqEBUN045rRySAZQ9RRuweeMhnv1QMsZvcqK9TZIomRM9twV0odWIhL1qxlxaiHJadyZuLr3h6nJjyvtxDl+Gu7mMBkcc9iQMNGOy5fwB6Zi4pdQm5p6pa9uXNsS4uG0OHdW6gZKuoa5hA0EfNkWIkZRr4uLIdRwOyO1CfjJY3ptsQ2mjFDyDTdkSKKTAxXGEjQMHh9sj2xxmkPsTBoWjw7VRFSeuglwkGYZanUb4shkZLH8HfXDQGDwzHEQRMhjy/d+3T26OuHYp1ixqMb9sR3OsZI2SIYDyk09arxyN5J+TDQOTg45Vr5ce18L2El7kOPTPUT89VPTCS5ytnC5c5b85T85Eq4gsy4gEy4ytXGAwohg3IdpxsXQ+6/P41qBOW33L9csK3flJbyV0kUjZY/gb+4aDGNBKdPDE2GPZf/AOwBN2ntM/l8Idwj1qbzNhsXIIV6vmje17LInflePwIaTyWjDuIexqMbs3Jm5M3J2TWcY2mZ+Gf23dh00dSLzpezcCZpCw4XfAagtkAhHilOJgiZDHtv/wDdTtR9QHKoNi1Uclu/l1gs3IkZZpv66DgKnUmQmp5FRGU+OAEbmOlekccaOJIY1GN7zk3tqV4LT2WRrA4YY5TiYo2xM7KpvwlrgjgSGlCedeWzK2OGOawKghbBH7L/AP3UP4zUAOUd107dSzN9I08C0siejDlbahdCVTV48Qmo5Wx1gjGPkcRDG0olxChD8lngQfS02lztGgmklsCxIGjQ9u9i3xaLn3xebb2UdeN/PZGDQNHi9t+n8mn131qpvS1ZAwt7ZmwaSc3l5qcJ73D3BcERpk5r+gl3Nr5VwcRkS+CP9bPZLI2KOxMecRXiIPH2TbN7nq4xjQbReI9vGHpKTguPMMJjEHNImszQhmixe6/b+zTbt4N1YdNHUAKXJqKVvNhcQG4fUjkz9RCcNhYxEZEu6XxK362eKqIlzZdU6rB5admyesYVAO0gxURUvgmiz1knPBo38q48tc1HZ9cTViciL320XNDFMmFwIWU8hyxhBwNcWXuRUkCgfnpkeRBwx5Yt4C4HccPhL9qr8mv0y7suctSFv7Z8fNEpCkFMzVEqcFG3cLX/AJby9VWHTCVAvNl7DkRzTg3DvEt5h0trJDGVixRxI5F9lwz99a/iG8J3+Nc9sdhbWqkZWAca9yxrl4ozSoGq50kkcaRQ0jeO48u+mcVcDxpDD2d2TV48mPp25JVkNxRCWZzCI86udM64jJipJmjkvgT1GXPUZM9SdiWWepJiWLMSwixDoM62DOrgzqoM6qDOqgzqoM6yDOtgxT4cdYtx9g9cjiklcDWtj76tRctG8B5hPJChhnkwa4PFdSXbbBfIKl5AwCc4/wABY2LiwRLnSwZ0Y+dENi142LWi56UNi1I+ejw46nbno2ejOz0d+ejyZ6PJno8mejyYlM7EpsSnjxKodMjCHjxE3eDexLzFfKU4EZogxAsJDToHV59fP1IXj6jk5dPRs3lfMXEqME00LzCNmp/yOnvw3j60k4QKFv7PmLibmlVI/TA45yMaQ99hYiQoMN4+siWSz0zeEL5AieMdktu/iit38QxEZDNpUqQQUo/V2GzUhnBFo8Dx55mQRW97OW+aJ8T69NwXx7lRrZXyGlC0w0TCqYaVrVlAMY5Ht2Xk2+TTo3KBwqZo440UlnYjxNgh8WR7Y2XVnLZk1FW0Vt/+UE+gvx5+/otO7vUtmp0Tq6r/AKOSPSNkTHnHMajGZqI7myaUrumG8bV1jwt09X7m5eflYP8AR8e9qPZ/IAYHZjkMJsBh2kSyWJsMaRRZdz8EOlxvplwb0Y1EAtieibvGVdyTuWxtWNRjM1LErbCslSUP5AsVhTJqqdqziTQMo2s5WSORjJXPNNFhQceR7Y2GSyWVjUgMrxPGsF4QKFN9psuQ+sEDJeHNBNHO32SSMjbNbRNx1tOueqE4y2nTIbaJ2Me2RPhrFnGFQv8A5MtzOYungFYmajO4n6RruFnjzs5kI6uAsY3tkZss6uMzJIiQZRLVrsa9r0ywsEgyaZ8zvbDM+F4Fg0jxvtkh47MdbwpiXEWRnjPxFRU7Rf8A1aZ7YyD7FZcp6p0792W5vRi0detkcxqNb5GpKbnpX2UwKgnwmM2TRMmZZ1UEKRyvjxbMhY3LvX3tXctWZ1DPDNsmwrORLMvshnlhUKzSRfe+RjEktoGqXaOmjhikmfW0rYVxzka2wJfYG04Da8PyrOkFOw6jNDclgfBjrU5cUs6bIq8mXErYx4nLvdtgglnclEYqFgECeyCRYpIZEli8GyseLs1Z6xr7LCy5T+YWVkdQbJkOnv2j0okWRRsibs1FYZpOs3J5rmNdmp6vqRq4/kZHIyRt5NwxbQx3FThixiQ49qPbcg9ERto5t8PgWpHIH9n3xzHN9iZTE8yPbEjVOja1jPba2jBWUwD7M1jUa3z7fT8Rbp6w8N075Xrt0tAm7bqZnEBtEGmKkcNYQ51JkeMtCW424kxty3G20C4loMuNPGdiEQrnNjzjaub09tzJxmbamucdIKLCMxzUclzUIjdoMvJK22Ve90kRJQi+uG4t0auNuzEx90a7FIMKWvoDCXBCxhj/AAWsm7rPbpZ6dNt1PJwhbdGpvtcVEXJQxpckpK9+S6ZBfjtKQY/SeSaWLTH6fsWqtHZJno9jnpVgmdEc3OnsM5VhiqY3HuVzttbAgwW2xiSA3YmR26tZ6znrOLc5NaSSNggnMmp6WEQda8NcYCIxUaifC61HV0e2pL6Mtjmvbk0jYY7UxTSduiYf4++bv6Ta3/JPttul4rPbVUYRFaum6/P01X4mm69Mho6+JY42Rp8QeO0sSeJ0Mu0M8gTP1ARuLNnKXbGxZH1QnRA99yb0JiWAjbTloUFssCmiDSOV79iYDFyQ/jtVVLpk7OlqlY08HVofIP2glyBzD347knvx24aXIZLt06IpVn8hf0HOdJG6N3tYx0jqPT/A9Pp4VuEh4U8T4Jewxqudp6t6AT5E0AY1CtKyIstHYxr6UfkVJYSYLpWVVCrRQvFvqhthGRDIPL7o2Okfpyl6X+nnADmxn6YnjyWCWFdkcT5FA04WQlbVDAN/qKtRyPrgn4lYCmMY1if+Ir//xAAqEQABAwIEBgMBAAMAAAAAAAABAAIDETEEEhMhECAwQEFRFCJQMmGAkP/aAAgBAwEBPwH/AIRAVRYeAbVv5LTRZvBVEBRv44aSmx0ui7LZVzBMsj+Mxnk8DwjsmfjC/JpFUpxDQEQCnNp+E2/FuxRO9U415ZLfhtNR0ZD4/DBLUDXmLt1nPO2BxRw7grdy14dZWV0KhB4PK6/M1uY0CihDOOKLWmq12JsjXW7Uml1JMXbBYYfVX4OiLd15RiIsmh5sFn8LN/hO3VCspWm70m4eR3hSYV8YqVh4wBXjJJkCxM2Y04snc1NeHDbsiabqWXOeEH8hNVitRpRvsg4y/UKQ6LREy6gw4jG91lCyhZQqDjIKtIWHO1ODnZRVYvEV5Y35DVA137AmillzbccP/IRTdynt9LNtQKEyxj6tUEBrnkv0DZQXPDF4lE1NTyRxl9k/DOaoD9adhNLXYcmGd9VdRx5t1pvTmFm5TDVvRdZQeVicTQUCe8vNTy4KinaMlVH/AEevM/KOWKXIm4hqZiQBRDEhSTNcFDjGNYAUMdGvmRe18qL2vkR+1rs9rWZ7Wuz2vkx+1JjI6XT8RkBUkheeaOQsOyZPqbKAHcnr4k/boVKzFZ3e1qO9rVf7Wu9a718hy+Q5fIetd6Mrj56MJo7sJj9+4ArstB6Ipfhhmeewf/XcYNgJWk2ixkdEN0xuUU7B4+3cQS6ZQxlQsTIXGigZU17GSEPTo3NumML7JmHAutNvpGJpUkGXcdQROKMTh4VKcsf9KSIvemtyinZF7bIAC3LPHlNR0Y4y8pkbW8Xxh91JGWcGML7IYb2UIWt7MioomwZXV5ntzCiOG9L47lovWm70spWUqhVFE3K3lkbmbww7gDv+HRU59Jq0WIAC3+4n/8QALhEAAgECBAQGAgEFAAAAAAAAAQIAAxEEEiExBRATIBQiMEBQUTJBQhUjYYCQ/9oACAECAQE/Af8AhETbeCoDpyLWf4lxmmS2ol9IWu1/hy4EasTtMufeDyNaVNDB8NUqW0HJdTyq/lK28G/wpNhCb8hpOsLRmuYTeCNULQMREfMPgm29Khv8HUXKfRor+/gyVqeURly9wUEQU1HfV4jQp6XlPilBzaA329wBeMmQXMYtXNl2i06dOZlfSNRI2luxdu53FNczTG8QasbLtz4QtR6VjPDPGpMu/tQLmwlKiE1mPaH+2uUSkP2YHR9ItxpBWDGxEKJOjOj/AJiKV05XmYQ1FEWqraTiuKZn6f6HPB4U4h7fqYSgKS83oK0emUOvsgMxsJRohByxxsZW+5THlM6TCDbWCmEOYxRnOYypUzS8vLy/NTYzjCWqBvvlRpNVbKs4dgRRW3bUQOLRhY29gBeUaOTnxD9yg+dcplsi6Sm+usyG9zHCtuZUqaZV9ATjP8YqljYThXDukNd4AALDsqVAm8TFK0xK+a/sKFHLqezHUsxtCRSGRd4z9OwmemYrhtBDv6InGNWUThXDbedt4iBBYdvEg2U5ZwypVFbKZV1Uevh0zNftq0hUjYIg5pUwjE3hwplOiUa8eiSbidBp0WnSadNpkaZGnTadJotFrxcGKrhyNpTQILDuqUw41j4YU/MJiDsPXwo8voZRMgmRfqdNfqdFfqdBPqeHSeGSeGSeHSdBIKSj0a4ukJv69EWT3BNp4lICDqOWKfS3sE/Ee4x9Uouk/qFfPmzTh1Y1EB+4TKrZmv7BNV9xXo9QQ8Fp580wlIIukxD5Rb2NKuUiVFfaM4XePiT/ABnVb7i13Ep4gPofUNVRBVQ/uA37X/GUqoRNY75jf2QpvvGYnftw9XMLH0alQILmPWZ+aVWSU6gccncILmNi/qNXZvZq2U3EbEZlt3U3yG8GKEGKSCuhnUX7mYS4l5eV3zN20nytyxKkjSEfAXl5czMe8V3E67xmJ3/3E//EAEUQAAIAAwMGCwYEBgEDBQAAAAECAAMREiExBCIyQVFhEBMgIzAzQEJScZFQYnKBobEUksHRJDRgc4KiQ1OgsgVjg+Hx/9oACAEBAAY/Av8Au9bTsFXaY67jDsQVjmsmdviakc3JlL51Mf8ACP8AGP8Ah/LHOSpLDdURzuTMPhasCs3izscRalOrrtU1/ouk2cLXhW8xmyZx9IIySSE957zH8ROd/M9DakTHQ+6YC5QqzhtwMWZcyy/he4/0OZk5wiDWYaVk1ZcjCutuwBJ3PSRtxEWpD12qcR/QhZrgMYNCeIXQH68qY8u8y72G7pFmSWKuNYhZWU0TKPo39B2UNOMeyfLlzBqMv9YDSxSXMvps6Vcmy1s7BJh1+f8AQRkuaa1OwwZM0qWxzYWZVUQ4Vjn3aYfSFnZPWxWjDZwzm2J+sW9aMD034XKW5waDHXu/oF5s1qKog1uMw1O4QqkhVAoKmMxg3kYny9ZW7hmTj3zQfKMoX3D0wZCQwvBEUc8/Luffv9v8ZlDhV+8KqgrKBzEgpLo2WPp+5ujjaFrXfYxxtCKd5DAk5RRZuo7YmI413bxAoLMrW8JKliiqKRMG1T06Tho4MNogOhtKbwR7crlE1U3a4K5FL/zf9o701zizYCGYm3lBGl4YaZ/6jmSlvJZtKLAY0GxbotIwdDAmyrpTm6ndMS5jqGOBrti7DgPYHyRsUzl8vbRdyFUXkmGlZBmy/wDqazFoBmrjMYwGnsZp2YCAqAKo1DgOToebTHeeBpHccV+cThSpUWhE6VW4i1wnsEmbWi1o3l7ZLMaARYS7J10Rt3ws7LBVjeE2ecUFw4Zj+FSYLNeTeeCR8/tFDCqNZK8J7Dk8w42bJ+XtgZHKOkKzP2j8VOWvgH68nKf7Z4TMpci8CfG3DNbYp4KKpJ3RVpMwDevTTZWtHr6+1yTgIYjSnPduhZaaKinJmS/EpENLcUZbjAC3kxR+se9t27gadLl0mNieGciaTIQI/iFaVLXGoxixJQKOAmlib4hHFzR5Hb0k5PFLr6H/AO/a+VN/7ZhT4AW5YZ6q47yxbFWfxNqi7omA6xc5ekf+0fuPa+VgeCG3oeVdF8EQa9HPQYWq9HNfUJdPr7Xmy/EpWJBa7Osn7cq+LulemwdHPna2az6f/vtiZ4ZmesSpmulD59jnuMK3dHIU4kWz8/bHGp1sm/zEGRMPNzMNx7EZaEcc4u3Db0cmTqY3+UADD2wWdgqjWYmHI3tSiajdAlTDzyD8w29K6VzZdwgS5q8ao1k3xeJoOyzBXJZdPeaC8xizHWejfLZxC27lrsghWaaw8Ajm8lUebR/LyvrFMqkFN6GsW8nmBx7SvioYTZhwVTFHLTNijARWfMIbYsChII0XGuLD0WeNW3y6TKfj6YFhUbIVL2A0ZaC4fKAZ7hN2Ji9C52sY/l1iuTGw2w4QDerDFfEIE2SfMbD7PLzXCqNZgpkKf/I37RanzXfzMBFuGs7ICShQfeKM1p9iwZZycU2kxVSQdsCXlt48Y/WAyMGU6x0WU/F03hljFosyVpybutXRMFqFpZuZY/ln/NGdImjypFOO4ttky6KoysNoPsrPzppGagjOJPhQYCDMyjPIFaaoVVABY0A2RZS4C8mCmTkpK26zAdjxUo6zjHOGZMO80jq2Hk0WskmW/daDxbMjA3rFMqQodq3iLclw67ugE7uzB9elq10pcTASWKKNXKamm9ywxmaA+8YMPnFzuI5qYD5xaRnlHapgLlKLOG3AxZkvR/A1x9jmXLo2U6hs84Z3JYk5zmKIPMwR4jSJs090UEfhpZ+OFyrKRUYovBNkyXMtEazm4mOumHc98CXlYEtvEMIOUSl51LzTvCLNaExVba71gcZSau/GOelunlfF2UJ87oqjqw3HkNKbHunYYaXNWjDomM6aEVRXe3lFiUKD7CFlyhRRymdzRRjAs4YKsBE+e/kXxcLB92LYvA7y6oEvLqumAcYjzhXlsGQ4EexOLlUbKTgPDvgsxJrezmAksUHBKXziZMPiJhV1zHvgKooouA4LXimWvrFHUNFuVeuvdC5JlJqhzUOzdDqO5Mp9eAllA34RZl6zdF1DFDc0Zk6dTcxjr53rHXzY694HHtbphdwXAxon0jRPpHVt6R1bRgB84znA8ovq0XXqYtJpk5/L/DSjmjT8446YM44bugMzJx5rHFzatk5xXZ5QroaqwqD7CMqUa5Qwu93fBJY+8xgJLFFHDK8om71eJfkftwTW2KTC7uE2bhiIttiTUwGU1Bjik+ccY4vOEUXT+0Wm0du2KKKDhwjCMOhbdfEySe8KjlcVKPOt/qI4xxza/XouPlj4oORzTcb5f7ewTLlGuUtgPDvgliTW9mMBJYoORL+GFU4NaH1hHN1h6H9YBU1BjKT7hEW6VjPS7dBNr5RWlNkLlDV47Fhugy1164tvo/eCxwEX68YAXDpyIk/FTk1PWHREEm8m9jARBQDor4rLNCptKYlTl74r2+gzp7DNEMzsSTezGAiYffky/hiV8/vH4mUPj/eBIyqvFd1vDGY1RMIAI9YczltSkH1jNUyjtUxxVu3dWsSZvFhprLatGHUnOe4RzrALGmKbooLl2RU6Z7Cn939eQ018BFTpNgNkBF+Z29IkwYqaGJ8gnRNoduttfMOgu2Czm07YnZARPXbypR3Qm4mKG8QVyatNfnC2rQlNeNkT1tC2TWm7gXKZYqAKNCy5biyuFRCtPapFwjFYvoIrpN2KX/cH34WdzRRiYurYwVYqesOPRFZBou3bFsmcBtvixlP5omj3awB41I7a86caKsW20jco2CLI0tZ5cptl0Mux44qUeeb6RbfqQb98SpCYSxCTpdUJFxj+IkA70MaE3ypBWRkkqV71L4Wu3ssj4xwEm4COKknmR9YE2aM/UNnRTCPKCZl6oK02xQi6FaUKS31bIo15GbGTH36dt4uUeYl4e8dsW3HOH6dA1O7nQ/EtS1jGunecwSBRJYwgs19TaaKEXRo08o02jRqdphvWEbaOySPji+OIkHm+8dsCdNF3dH69HMQY0jP0HFk8EqVrrahjtaMm/vL9+2CRLNJs3/xjjHGYuG89CQcDBoCZeowFKo6eVIRJdpV7wMGrqHbfFxB5CPtFIA2djMSXc0UNeYMuRdK+8CbOGbqG3pTMkCtcViwk11GyKzGJJ1mAiYARkw9+vbJ19QrcWsLLGodHoWTtWMyafmIzaN5GOqf5Re0wR1hjT+kWXp6QbNL9sYLGCxoLF6fWOr+sXqYwaMT6Rp/SOsjrBHWCOsEdYI040vpHeMZqGLlURmKT5QHnZz7NnT3gQ912MB+8wugvJR2s61ECk52A7sy+OLmgS5+zUe0zZp7iloS1jW0ew3qvpHVp6R1Mv0jqU9I6lY6r6x1f1jBvWLi4+cabxdNPpHXf6x1w9I61Y61Y61I61I61Ivmj0jrv9YvmNF9s/OM2Uvzvi67sKTdVKRKl4kZqiFlL8ztMETZatBVG0c5TEmdrdQT2jKTtFn1gtsX2yRdVroaewuTDz4V+AfrGS/D2iUnieJrfL2zZGCXRLQ6WJ4CzGii8mM3GY1lREuSuCLTtEiVLcMUqWpqgHxGvtG1MMc0gpvjnUBG6LUs15DOflAtiqrnNw/hpbZzaXlD5ZMHuy/17O0yawVBiTBl5OxlyMLsWizNUq2NDEny9oEnAQBiSaKI51eMfaY5scU26CGuZTQiAy4HhWSO7eY4w6U2/5cDzXwUQFrnTGzjshJUsUVRQdmLuQFF5JixLrxNaIm2BMmi1P/8AGJny+0SvhHtCdTwwtfCeGWdZS+Jdd/AXbAXwBrdoCrcouHB+HlGqrpecfiZnWThduHZxkcprzfM/aBlU3SOgP14J3y+0S/hHtAqcDdAIuZTdvgZ4R9atFWmgnYt8WqXtgNkKi4DgEpcXx8omZQdeavAbPWtcsZ9eKXOc/pF3ZqwxH/LMu8oVRgBTgt6nWE2rcfaNHxGBjMo43RamrQYQzgc5Wh4CzGgEZgznNFEJKXBRBdzRRiY5sXsbKLAlppYsdp7PlBH/AE2+0Sfn9uGidYt6xRgad5YtS2ryauwUb45oFj6CLrA+UaQ9IvCt8o5wFDFUYEbvY83cKxMTaK8HFSjmjGPxM0XkZg4Pw0s5o0/OPxk1c5rpflt7Q6HvCkKXGdLajCAyGqnA8NsZk7xbfOM4NLbbFnKM0+KKqQRu4LEuhmfaKzGJPKtS2oYsvRZn37NfF8wHyvi5XMXo4jrAPOKg1HRzfhMOzkBbMFJObL26zAm5QpEoXgHvRdBI6xrlEc7a4pb3MBVFALu0tlWTDnu8viizpS9aGKy2o2tTjw2Zihl3wWlZQie45iqOw8oKki/Xr6G6LD9Yv17IUlC0+3VFZjk8mstyICTs1turoM91XzMUUM0MiJZUxZlIzHdAmZTR31LqHASxoBFRrNlFhZY0ze52ntZYji5vjWKqhmJ4pcU46YPiEdefQRTjZzeUVs2figzcoa3ZvoIJpyLMlCx3RWksf5Rz0s02i8chXXEQrrgR2Iy5Bu1t0IlTTmajs5JlyaFhiYoOMmbhHVWfiMc9OodiiM5TMPvGLMtFVdgHD+Fkn+4f0j8bPH9sH79uzlBgTcnXnJXdGsRxc2+X9otIwIhZY7155CykxMCXKF334CriqnERmV4ptHkNLJvBu7DRdN7uTdGcpHmOTxTnOXDy5CjKNG3nQBLAC6qcorKIaedXhjOrxYNZjQFUUAuHsBpuTkSpx/KYvkv8SXwOOLEjbyJs846I5AbwPyLGTpbelaRfKyhfkYvaYPOLyG8xF8tYzpR+Ri8OPlGkR8oumj53RdNT1jTX1jSHKK6lFORjZlDFoCykA364owBENPyUUpeyftyEfVW/kGbJvriIzHdNxjSX8saa/ljSU+axphfJY050zcIBmrxMvWWx9IWTJFFH19hodssfc8icmsNXkInjbkMdko/pwXiOcyeU3msX5Mo8rozeNl+TRm5RMHmIzMr9Ujm5kpvpF0kN5OI/lm9RH8rMj+Vnekfy+UD/ABMdVlP5THV5V6NGdx486xVjU8iWgxpU+fInS10Q13IAMqtN8dT/ALR1P+0XSv8AaKWE9KxZkyy7+6I59EmzWvaorTdF+SyT/gIqmTSR5IIuAHsWRlA7ua3IWYb0NzQGQ1U4HgLzDRRFvBBco5GUT9pCDsE6mNg/bkCByJ9NtORImTpRMxlqTaMaD/njCZ+eNBz/AJxUZOpPvGsUlqqjYB7JmyGwcYw8uYKMpoeRzT5vhOEdVKrHPPUbNXIVFvZjQCJUjWovO/sFDhEyU2KMV5CHvrmsOFpjY6htMFmvJv5EiX4UA9n/AIzJxVwM8bRt6IZZlC5x6tTq39i48aE778i3KPmNsc8rI3qI5lXc+gi3NPkNnIlXZks229otlGRUtnSl7fKCsxSrDURTlBUBLHUISfl2IvEv9+xvJNzYqd8NLmiy6mhHQhVFScBHOU4972/b2lTKJQbYdYgnJp6kag90X5Mx+G+P5Sd+WLsmYfFdAOUzlUbEvj+HlAHxa+y25YC5QMG27oMuchRxqPLCS1LMbgBH4jKgOPOiPB/R9nKEB36xDNkjiavhNzRSbLdD7wpw0lozHcKxanUkL72PpHMrV9btj/SVCKiM7JZJ/wABF2SSPyCKIoUbv+yL/8QALhABAAIABAIKAwEBAAMAAAAAAQARITFBUWFxECAwgZGhscHR8EBQ4fFggJCg/9oACAEBAAE/If8A69LI8Hs1oIQ4R/1cvOeQAfKOYd9mZEZHIfzA525/3OVED3GIri6HqqEWU1J55Qq+bB/xSzGx+mrKUAveh7wwYTM8glu2EwDkZdhc5jKCeHjf7sIG+jg0e6Df/DZtWmmLdYvqo4fgC6cUsLg/Mo3RsOcf8IpgO06EajPWXhu4xeqSmD4jqcveV2aBVsSJlkRy5XGDf/BBsAu7K+nUrpU1YvwSmsUgwWp937QUcGo7tfgD5RYf8CopXV2MGCFxRV4TVT9nTepjGxjD8wPSrVvgem7gHxEFfkjD37UiBcHEYn3f8Cba85uxxj/nP0/kYSxDIKMICpxxJSJa6cTE8yJj0MO9K/p8oSJeIczH2jn2rPVsKRghgqjyd79+t0KvPgDWb2MQru8ZgogtmH37xOM+wR3fyAq/HjA5zYRHl8WPFCy+JgxcbXTDkbzCgMlH6Dy7fFN9yYKsegJ+84Fsm1yM4VaHWzyh+mcI8zSCEoRGC4TCmpEYue0S8rrw0AinMxGZzAeUfENPcEXQgCgAyAroPgRz7fW55mrM7n1/dDLPIAIylTXtdo5OLSvFzgw1LkByCg6Hjj4T64dDNcnNh/ISPcDTGIfAScTB9Tp8tM7t8rx3xgwbBP3BsBWq0BFyqKHzpnZc8vppDQgZAV0/5zJFMtqOr0Wwd/UhPlJTMg9Plj8dPkpiXbk+bEYPb9wIe7AzDSKdgNNuQdT6XbpzWM3xcPnoUgyTyenHyrXlGcPJC5xIYpKbxO1Nt9MH8f26l0FrBzqjbReHgQ7KEe7q2hl4yRWTqHSAUooDWNsHIqCK1ov+dPmvSVK7i06HgIGMfF5vQucHh75rE/FHkdztH0PyB+3VpmU+FS//AKh79cS9uLTjecRbape5AFoeXZATM1rXbvj/AMFoXcF8MYATmI8TrLbmcJcM9ziZKfl7MTlYAOOPZpqT8Q+P294/OEXIjGaXB1RqFkKoUHa+IPw7M0dG5D9wQQpvGz87gE5u4sH8MHVqvIYe3Zr/AE2HpX7jADASHeEYmJj0/r211n1MHmwgXsmFvQ9BiwWaBQfuM3FS0EDruCqtqHCV6Kjbj2osiwyHhaw3euATnLLwUPvEU7HHORH0FbqdkQDSLsNHNvi+kwpiaHi4RSouM+0NXxYKA/sk5AFzOZ+yMqgDNYD+dOLoS8mu8H3fuwLWDCnDnecY1C5B7UTTxfDtPOO2dWtt3G0SLhFRy4AKuk/hBZvge0VG/NiZe9WoZRcuy2IWtMtbaf1+bQ5aJia9VPp8pj1XK8MphhOOmINcM3XiZ5sLe+MRacWO5Cxk2BpI5tgLEjIpQlj2SkePxLj2lTworyOMorOrmvfK6ipNFe5wZWkLbq9mVZ+Gnmnl7yoxLQ9eXnOce0fqqNZ51HN0hzOfp/OZ5JNCUdhLIytAC3rhmzIphGHwwTnMY4E8KCHlHIJ3S4qtDaHuYO1obKzcgn1jK0g9U10czsCCbrgw9K7QiWxXO4EJzlx1hYsJq33gtteNOcZZyUsMS40wq+BmpTsnCM3kCf8AOXIU3T/B7oP6VjhKODx/CWURaH7tM5bVzYomj7vaGAxBuefpMYweaPSW85tZJukMCjKOHIL0hxlkOMK+cfwcDOvtDUBXCFITlL3iPCddPMlERNDXiI0C2rQQMqXv90N7uCwemrkzeaRkz/Hj2NRTDnKvhcUCXdtcyXqZC79atF7TK+InFZQ5ss27fqIACOjL14rgPCYmcd9GEayy/wBKesFutqsf0j1geAN3xFf6i0oHz6G2yqXVoscgIu7xXJdvlCvFoZBFpbMr53qSlI4xkR02sYctteZwm9EHdGc1S4iAY+lFoXNymXCq2coHJXAQeinmlfvQ9xgzOEzE2d9SnaGcXI6TOMp4uIUd4VM65yEeWLjoKOq1EsWiYRDjRPl3dfX1YjXZHwweF0dcURyg0AfrUrKxxHv8ISasGp+iJlhg07vaICW3jupRAsLjfOMzcevxANvDglUfzJ3pPl0ZlOJNZBwdI5e7d3zQTJl9fAzmvCNhAsGxAsseUMncWKgYYNOngJwE4TsauZ4Eu3h3wdbRxZ+ZM2y5OqHY3lPhDzi7u1vr7ofoDgB3qboq4UelA+fU+lxmWuJ3qY1runLyQSgrE1IKLWE5pU191VXH4k4kaqrNmMCUgwBFo2xZwHl35Ri0VfByjUeHK9UyBycV1rYgVUCu34gFTZ/v4dV2wi8djkLLOhKDDoOyAILHODlEeiigiDg0dTx/PInizmBxY7J4xU4NfV1frcZ5v1ppWsgQF7DJxeB3JeoPwwfohRcYFTFl7yufeqmYDooaVnHGJLEzxw2mKuQd8bZhwWi5wLijCscEniYbp32vDh+CsDhg6i/3g6u0zOJVmA2mLC57roOyo1mDgzP8AuDg+h4/nNkMLbivglI1VtkPYhQc9zrd9J5ylbPzgMAmCMfWnLmGwlCGMXM7kKyi7uDPofPX5ma3Kemqi0SlhKAoJhnuFiVIucNPmOn4TumrdIIx7TSV4gNP7nDYjntuB2K0W5Ssd4Vzgg65PAygQrSuXOUdjkd2MxLo939vza0C712IrC1o5bUM4jx33r2aJMb4N6EFAIZmnfnMXpiu/YjCwy5kLp5ecTi4DqbMIDcKHky9XbwfmAAC3cv8y5jALUz/AA3JhxurefQzIC1dI1i9T8QsTOZo359lnjp5moeJiXkuMpMUVTtKQhw3DSJcYh8Z9Wbw9/zFRbpGx49M7z4QQDn8m3YJqXoSpBkWLijHFvSf2ZShRLSMQcLigB2TdPfDMX4ZSJW4kwHgNCbgB+HmTyaICqgzYbKo4Ov4jqmGZ2ZM4LHMxhddXHbjBsExHJJVbdy4GR7xlMmrwJ91t/MZRwOGmrxy8ZxiNoZQ64h2FMXkH1YYMYVi+UM0GOodIpJGI5CFeCN9SjSQbgOvw/IQ0V0mkt267VP8zjCX83LtcLZiDTlNLCW08cpawWKWwOqw0v7/ACx9oP5eiwDYMPW5km1dkhKQYK2eQRV0O8iuX5EdVwNRcyXA1YTIH8IVVA3ABcbE/wAWGv4bCnHzIhkvKDUh7NxTifdFZlHEeKD6PB6C+iz6bH+UxL+GO98UMYeBBOI5tQdDPGUB/ghZzOvl25K1PKUkokHhKayx4YIPLFzT3QazRwvLHGLDLEDg8Pj8ksmeCFx1q1c45/gIOePOIWrmJmz92P8AMxTOJb2YvR4orUcnFI3ehPiOh5M0c5xyfrnHSj/zWf5LP8xn+Yze8BmgU7v274fO8gJnjmxjiHf5oZog2CvwaoHOu0N+GCawpTAvxhllcM0xO/OMCtGr4SywBo0dfyNzD8QImnN+dXVr8ZP2wwzEDw+f/PXppgcbxjUfdv5Chuu8gfkle9T9yvMq8es1PDv3oKEGw5EVow/AZEWVTFeH5BQJArs1g8cJxWPZ7fscEc0NWXFHv2H5i4UnMBGp1HMpDvOksOtrXbz6RAGdXTZ3zGFT/R7eP44QnvJEymWZOc+0DIQajGVzn/YKHRWvCHy+HEhXiaYeExZ6Ll7yCVzpEQCwsem+GA7xmFOJ8Xv0OoYjm6Ef6bwmXV7iHQGA2/GNy7kATAPNRr3eMHYh3cBx4xXww+SCjt6X7DjC040weddIiHzDEv1MXoyDG0Mot54GvgQt6NGx0EF14zXb3TlAf3zz8Px3obKNtPdCJZlmh0PP+hHaGXsfsAFs7ES4rJbPiLmGYivPWbMWa0Q5jWZSZCzXRagkUVf1L0ApaL790OYycX/UAAKDCvxidZGLMGd7pbDygB0IcjoBMwiPEwfaUC4FXL9iUvMhzJR+fKfOBLO6hi9UA7cOinALWYwH2ImnuubqwFZ7TQgq1Bw33GWzKxez6fjrmYQ8UC9pbzdLoF9/bkf4hpMH/YJEdtTmdXjLBQ5N3sHsHJj/AAsXwrjSV5uzMnHuyv8ATkR2PdKNseD/AGMALudNWCic8Bv0VWtaeAltpAdNXehl+OGVlfeRYQ/yDAOFsNem/p2RhADszQ9+TKQDYZQi9ZKvos9xTzJFHqnEcLWEGm6vyfjKBUAZr0Gkp6YRrhm5TMlZsUhoSZJ2ep+xAEp2vMi6nIYMJkwV/mFMMmkCpOctd+6MsTmfhfH5gIBADQ/IcoOGDEtPDjMG6XQ1y2lEXIbpSO2guUTgvOdzE+9KWhIrDQiIra9ggKRNZcrgZ7PxBgFuwRXwBp4R6hvgO8PCHiLkc0G8uvfhIM6HqFEAMGlW2CmPQXK9TiGPO3hASCtVylBVOQNJQE4F/KEuYhjoZ8zWJCJwvXwzJnk7WepM17sPaAYI7n2i1qnVVGmgWwh4SuAW5GnUNs+zLntL64BxTFAfcPUXmkua7y5fhVVjLucot9e5aSWCfeHVojgC5Dwiy3hKnlEjKdRIyHnr82Y9vbC8CcnJI6RRZYwVmJcCZfm6nmBFxQ/GsOf3kfPaO8glPUYibN3BHpzKXPY1ZRWGKua3egfhaTUhiXHadNzqEP4oLo/g2jaDgasvqAqgrwnp/nVW9zNb9LSWLDJpwvGHGuTLK6uH1wDfM/EOFvxLe7KHDA2D89LmOlJKxeO0fNE4PxIIAdGsj01awvK1fbqDrwPjh1HbhVSDRND/AFKvGHuW+vQhIqv8lI1wneTzYx8zOuecyk8j6pmz7s/w8MgvfOIeMvqNoiHr1Etr/DHGVtLZi5sSIGiXKfjAcq1fh1NslOSGWHSY+tr3wlU8GvBmB7KaIchB5gTDliZ1ju14ERyrg67kVSDV6rd4/oqI2j9TD7mFRwT+dStXHyT6dR9A9RFQSgTjPJr2eflfRFrfCu9RiHw5Z9B9420/FfZKZ9WZs9gm94h8ccx3TY4GCoJtOjL2tkTOXNekzhz13is+lBEcR0maQu5p0qmDMQq8N+U+3+J9v8RKwR+tpXZnH3JYotMj4ldxjDHAivjUrUfcE8vwlfpBDwbynE+8epThwEbMEiSw1OgbpbViiiCzodStRmDli+p+Ag+UpztHpoWZXPLdQ15A+ADqFNGQ784vI+S6LZ9zSnN7V5VnIdaP1Lk1R4HR8Y3RYnfqYNn7QtRwpxGPzLc5YhwHd1ChoAarACpwNqs38AHC1gkz/odz0mcsQV4jU17+lOzR4RF2tqd3pFtE0J8rP16BODeho5diSsAWAxH1h+CxhFot4HB9nqUTClJkILNfUQH4LuFMyhQZDqCmID8D+1+wSyKaGNkHFxcJmcMtOthEUAtY4LG1f3wgpR+E/XgYZRRtkNHsU5KoM1jPSzg41t+yXtZhk8hmjKSt4kQHFUehiTXn4tXF0eqa1LlbxhGT6Viu9/FX5rwy7pmnLLrr4OitWUxoOW+Yf8dw1U4chlCHy/wHyj/ZhfVK6OBgmUMMnQXWMzZuF8f8k0EmYlxS1t4O3agNBNBX/sZP/HL/2gAMAwEAAgADAAAAEPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPNCPHLAOMPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPBJGHPPPLGNPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPODHYAlPPPPPCPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPMPIPFPPPPPPLFPPPPPPPPPPPPPPPPPPPPPPPPPPPPPNOvR6EYnvPPPPPFPPPPPPPPPPPPPPPPPPPPPPPPPPPPKETiSBAGs+8PPPPONPPPPPPPPPPPPPPPPPPPPPPPPPPPDM/PPrrvTjSXPPPKPPPPPPPPPPPPPPPPPPPPPPPPPPPPEdPLhBvPPvCnPPPKPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP/PPPPPPPIvPPPOPPPPPPPPPPPPPPPPPPPPPPPPPPPPOCdPPPPLGWDPPPPC4Sk/PPPPPPPPPPPPPPPPPPPPPPPy7JHXN/vPIPPPPPGclPYwUOPPPPPPPPPPPPPPPPPPOAlcrX4jYCt9j6kpjOcPfYpLrzwdPPPPPPPPPPPPPPPPFm9ycCZQ3Po/b/rPXvy/eSp/vvm0fPPPPPPPPPPPPPPJdPvXqtV63d/8A777777pf6yF/77L/AE888888888888884U2++J8ak28u+++++++ryOv++++elO88888888888888Xl+++taYej+1I3w3+zINfDe++++MAcU888888888888oq++++++N9Uv999dBxZsmdd++++++uHU888888888888k5+++++++++++++++++++++++/wDffpYvHPPPPPPPPPPOMpfvvvvvvvvvvvvvvvvvvvvvvJ7Nfk2dPPPPPPPPPPODBuPvvvvPPvvvvvvvvvvvvvvvviyc+3pHPPPPPPPPPPKNEGOeybPWffvvvvvvvvvddf8A7776owaCTzzzzzzzzzzyzzS6WuZzArnT77777777ZCCPz76bgQpzzzzzzzzzzzzzzwxCMyIobTHnvvHLHb57hQRw/wDbzpUE88888888888888888sUYie0UcMPMPtdK4oIQUodWZN8M88888888888888888s4s4c8Y888888840skc8gU88888888888888888888888cgcwQ8888888884YMcUI888888888888888888888888888c888888888888I8Uc888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888++++888888888888888888888888888888888888888+6A8++88888888888888888888888888888888888888uAM+++8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888/8QAIxEBAAICAQUBAQADAAAAAAAAAQARITFBECBAUWEwUHGAkP/aAAgBAwEBPxD/AIRJpAFvTI/yeKZjfBL3Uwkf42kgQF1Ll+ohymjH+KCQutRYjMHNY6lZiJv+GbBDBXSrKmSFdQIlldNApJdx/CVDqixg4Jbt7Tt/My3D+HmKgCzuQcui32heCD3VQ64iqfIUMsRThAM5brLdkIzBHXYEV9yBAC3L2QcVzYPFAXDvBBAwyuJaBAqagCLglqF3ZUteGZf2nPU+UH4YLymkii89hvUnWM4egpqIUtkvy8IBaPQahDL0lgrA1MNp1lUcLcEuGS3H0T5w9c+Uo6G56mT6dAsRUh2oMUweAAtjumuhFcMGycuEFxXAzKFkeZf/AIbdHf8Ali0WwKocR+yF6gS7uX2ceBe4uwK/INri7qiOJRSAE/HfGGfuE2jugI1fuJgAE/fHnPaj+RBlhwVE7JQyWp2RPMEgaRoF4T54jwiPGBQWgEvcsD3WKFiD2P3sB3imp9oHpn2QGAoA5n2h099k+3Qirll97jUACj97l5CukuLqK66Mi/AVryLEzWqA7OILUShg/dBD5G01MQJ0Tz/R4OYMMZoRCo9nYBB1VFG0j+QLgmmJlmFYPakFTCNQqngrW5vGa12+on8aAQWg6hUIrTropXQjVh4Z3IGT3Dei8olzEuInuE+J8Z8oJahh97TYYlNR0cpd6/g0SnqU9d67aT4Q2h/uJ//EACoRAQACAQIGAgEDBQAAAAAAAAEAESExQRAgMEBRYVBxoWCAgZCRscHh/9oACAECAQE/EP6EQG4SpwwPxO+aJei3KFmLW+H1tmAgqGRmOGHEaTUQ0+Ggttw0kI8JoTME0Jd/B3DEVvB2shkbxLmLqipvhiljCu3+CNslVwIsdeVZHwf87z08HBXwS0WzPmYip5TWARIpYSq5VAtiNrvqWAp9wBas7hFRHg6BhEb1Y5yZjKKNTkYlOZ41BLNV4+Yt8NqN4jsTQnavINtrGyH1MfUhN5KmQFMoK4AxNcRPmVgmziWSnmeyagxCjERx+R4ldjVh2iq0+uCDrDcFMq3ZHgWJ14f3Ul7IZqi66ioGuJoWWiRVRpLeZbzLeZbzLeFSwTdn+OAsssOg+3yzG3I7URl2CuiAbdeJ/KYr0jZh2ihkmIj4IPgdDVNP84TO1mQ1tX/XLoHuF6lFG/XMwhvvIjDeE9RBK5hlaR+ZRD0dZChG0Wo5fj/vNAfvqxMxkzdyy3rnc2lUVyCZ1lRFstS4HeWxF8E4ntHwz1T1T1T0QXaJGJkIeW3OgoUJ+T1CAtuvW3zz1FNpbtwl8KxbHpnpnonqgW00IgBp0AS4yt69R3AC2ZKuG2cK6d+uawUHruGbsFiFC102iINFwAuW0HWNYqE7gpmSGvG0Co+phTlmvYYByQC1C7UW0Kircbjc2gemoZYlSxSoAWPKRVzI2Y1yV2ALpKlMTCq65BrJPIR0hDGWXwYw4lyOKANkOq432TQLxlPM9ebsiNZuEF0gTee6UiCI/rlYqmuSG2EMPwFpbzPdPbL5bglDFt/2yKZUr9P/AP/EAC4QAQABAwMCBAcAAwADAAAAAAERACExQVFhcYEQkaGxIDBAUMHR8GDh8YCQoP/aAAgBAQABPxD/AOvRCJc1jtSvWLYqA9YZPookr9h9LD3U74PJ8yj18h7qnbOF/wACh6eype9jyo8f6o0Hurix5L0D6qwEWKncqT/CYGlkfkwHUl5op2B4UntOo+HLIdxgO89KMxllKbhgdilkv8RUt63Y2yvWM96GSEmXmhLyKPEoMcy6XeYWgEn+DJ7QIIvYOXgplYKqxTeXWtZfd0pXdrPjFvkzQ3qR4UYnrsNuxKUD0bw/xctzUn+BvjK1ABKvFJ4rczwg3RN8DFSPwu/gJdbEXIZ4lpSjPypoOeoQnDucNmk15YFpiU2epjbYN2xv/gSakgMsM7wOlKxdqKjihRh8CghEgHFofeh6xxA2A4uPzBpRGEcUXB0Uu1s7rgFnW92W5/wEtD1AaINS6Js70bFMVLWFkEbTDSJv9CzMAYtq0RyY+mT6qnVukUkgssMJdzFN2tKJjMb+G3pT8CGOwpnopz8xwzQzbDsOLtwXnUNy46f4A4aylBituLAUrUya49ugDmKDl8kAEAS7FWMMKUPKmvUEw/iCkEOlFQXoyTeVOqFBEzCdiD5irV1+aTN8MJkR0RoYMCwOCGmrZnSPvyxQ19IVLxhXXSgm0BuliDK0Cxgmo/yYhouV75gwTF4orslEe+7SbQIoVLQeVrB1Iox02tn2jYl2YcYqyeV7IoO3rNEFi7GyOr03qAgA621ede9LmHm6KcvzgISeaJDqRJyFBPmtKiRPvbilNsT2Bt3Ypk3VQYluDfeV7U9TCg5JdhwdikAewCWvvnL/AMqGWfI4zKyll1xUpKRZAWsQMHB6VCC+QmS49m48lPxJuoQumMRlbHFW9BfI4YneR6JQ+3QIBwFRUxuFnpWb5ww0MAHT5PYHcn/X70rMKUFlXasb2MesUtd0m2lXM9yS4VvLgloSVTZc5Bl8+1HtmDugCx4C6UItHKvGEbjxSzehOqEaMudZT0Km4PamHcdQTvSTFhuEkOpJ0KGfDUbvahB8vz2cgazA53gGe1EwkSR+8PK8eAuquCmbbyyxyLoaaZqDUibB0hq42Gs6WAMBANgKCKvU3oZTFx/FNXRFKjKr1adqhGd5o2rPQXE7JTO3w3AvcVEeChnAn0pyHK/PUbUuKRKys7Xrd3+8HkGeyexMS6xG7UpxB7CX53IOi7UIKav4TkJmzHXT4JSSZGCidYfJT2pDaM8B4qiST/Rv4oXaAs2Gp7FcPOF5pSSEEsjaKRH5ZUgSDNiR6/dw2CjtAJWrCES6SEux5VFME8APx8IxoUqTFiab2EK6KLiQaVOAKkgLDMWW7LzytNH18t8SywLEnaKiLZrSryoXumB3bUhveMmYv63zgDpRuauxKbpd/tqCJjLnmpXhAWXSKw9eaD4ZBzbJt7U/KKP+s9QHu+7s7gJTF1j1aDFYvRYj6loxR4vgBgIIWiIn8uaFs+TB4gQ85qHF3U+E2o+GKiKgkpuCgZ3wLdYdKKKIiZPlFJhm2H7uhBKdnBehTMQEbsseQ0fDGaWg7VJuZAQiSoViQRO9FBBNiZ70Z+SWopZoywEgedPyShgXA7KT3fdwgkXrkPzTp8NZFPSawJ+FMZMjQgmAFGKj5SsWpwUKTd2P4j5RQkWfSD7+j7wA4xh3vZB7IpesT290Se9GPig+XMb1JWdtxD8oFmgRv+q4nZDt94NnpyS2/TJOnNFzNIzYhOxhO4aXqxjHzUIkEsE/AghrAtZW2oc9Gpr6/KLiNWN0+Q+lA0KBgAgPvBXgk83K2Kby0rCK2RIcO0UIYZkRG7LgfPX5jUGImwJh1EqdikBFBpSGQxpJxMUCja69QUdgoW5Nxk7r2psylJVWnyRLT/aMhZlYAA45U4fJEzesI5Jq+GbTqdhFSLg4D80qc2tU8oEOi0bnuGaJslzufcrlfkQB1qXtwazwJA83SgNghQHbAO5zTGQUaHy9AjrWMMPQYt5wj6jSiDQ7EJf8mR0vR8qYrFdBpLfNQyONiJllpOJ0qC4kEwQBWILSyxlq8I5hBtsc6tApZe5PRBRpc7IfOaOKJZzdhyetBbuY3kqiyJqY0p67BLjCluTnDp9vCVqml3abEBYZN+bfyUicOQSPTB2KlYuuf9LgKPzYQk25lf7owp4ovNB3Z4pphuztoCz3vUhUykaImKKC6RwOBnqX4aFM0lg4T5LWQBR6APesPllYTSmFaKyPyL0zUkqz3fOXbFF3jE0IBoQf6zps1EuE8WYNJHXZTWsZUan66nD+Ibim4nUV56gqxgDdy1Sb/aFigN8bhixMECdXN4mKNSJXQDBY91eogkNkkvX24oIiCYLNg2C73rcrdzLmoh8LmCL3yOM75ir5aoVlZtyO6m96DEZu+QAHzWnS7EW81PSlqLVnJw2XFkOulRAQbckI9uK2jwajyr9k0EkJkvwyDwx8bUoIs7BEfzrT8sTT0CorK0be13Q7UTfIJY35Vby7/E9Q1jCL9h6xScN8gUwT2ZoJCNLnuNPecIvYpQg6r0SaLcJCw9lLPRoUuoYB1JXkdahbs9n8Zg1k1J9lQDW+reylmPTJkwS1O1okk9P0PQoyeZYX+X8UgELcZjKkt9BaLWHMeqkMcDEM6fm9So0LYOa4vLgxZWZKAVgWA0DFTpfqYQqb3ZsVzJjk7TjtFQM18y03z5OSnVfwXLimULjfEa0lj4c4dBxRkNop5lIwiDKA0NblGmm6yh+z6U6Q7CM6wKbKMCHyaBiEZxFTeHO1TUkXvSUsdF4eFq8FRJYOA6jp4Q/BFFRUtqQTlzYEFESmJW0zDDWN6TZK6usY5aLKDOusnVfiJKm1EBRYcGSDqvOr+ijeWDqrlf2LUYoKc1bTshI1PKoxYHnDyilCJxdFGqF+qY5qBawAhmJ2TfZrQ5pRo8P2NY2q66Wsoxy7aulXtQ+X/bsewUIkOdVqu7RQAN6m6AHu04/KX82KalS2bjSHQPlQ04gwAgA7USFYFpGvShwpUcAMRlO+fKiKRlTyNygozoNU2G1WDMMGMFhff0R6UgEYRLkZqGHijZyx+acnvQxOWOL1LxfR96WqBLfe4qdCsYb1okIN196m37r/AFQUH9BkqaqOBobADHFc3yoyRuVqb9qr351GC0dT9FHgV3fdThEupfiainiF90VwOijpH+6HMzouMYf69KUcxAmB0M9V+KMVPz+EpseB83pWMgBXXXq+3XwMfCIgUQjea1EmNhtn9fLajm47X0k85wetDRA5IhI/YVgmmomICJY5dmsbZadzWu/LlYscUEHADV3eefF5eDuGH4o1WfJYUaMxeqX4WsqR8CMukN/FSXQP5v3RbrSCBIQjqUhiiNocdGad9yoWS+9AINI66PrV4FIdZH4a0/skbKZe9J5o4aN3mjoL8yVqHNDNOwP6aLYpByTX/Jr/AJJX/FK7FFsWqXdpvUG1aRp4qGkuhGfSaFQIQ8tjsvl8RMLPDdPc6edJEtQOM7WXtWH+qD4WtKQc0UJJa7JpHiIfPeoGssixOS64cjq0pB+wYc9QCvZtg1eKUPl6ct7xlwH4LEjvIyrdcr/Wo8XZ5e6iekh4C+9TSQzE5peZo/gHpEJEdqmS1Lonq0kIEyoZ1qA76mTsxSE0LNjaU5G8LHO7T5kZidiBE5T6u1RawhkpcXO+lC5ryP4RSYxIg30Kuoq5ManQMUYWKAU/OkjDLuRTyFnI7Afy+EDISz1mMB/ypt8eiRv+goCEIL911eaPkRQVhIEkTpR0D/oTPkSHpTfSh0PYkdvrzIItEpicwZtljuSJW5KC++gG2xUf++6lqnVaMUU4oxXqXuq6omwETLTNvwehzSPY1QdovlbXOmElM0ITcPR1lzz0TY3IF5VHHLjfJVI8qKZMwLhMCS3tQ0ujmIgBtAQtRxDK1QU7A35KlmUYi9um7UKgwXIdCodvALq0XmrBkE8WlDB9A+ijI6KHxUiEAZMwDq1OI5/NAnAXfNoxRcK+5040p+WHyxArep61Mmt6cNnunX64HpkIh6u0hL+Uog4GT2BgwHQoJJBMV9RaCoPBxRikI1nyH+1ZH/M380V8UCRG0JSbhQjdrrlDvcb7IEfSYMSDE3bm9DEXkwQgbSxWuKikLRRFETS6LpbSoIME6GDGCfKNqBlBrMt4C0u/BtVrSoKkT0onu8z9qTBDQt0FR9BNqj2oZ5WungjMekCocaqTrApqp/FFgwXB6zbfeij4yZABKuhvQYnoLvToVAL9SdYhbU2XNgg9Ayc/9oTUlQXlse1TnI00YA/W7/VkMrG4raKW8VhwqDglV5WiAMVX2Dg0+NiS5nlBPZq9U2vhQ9ZqDgJSZ57Nh36jjBSTOT9zpO9XYu7MJAOAUiKKCRNy14w0azLS31vcoSWnJZ4m2pTViPveAlvd5oj5fLaS1LJlWjwn6C3pVHoQh6qKdKRaAGVqEygqCO8mzQ70qaGTEIfxtQVFBHxsZBQ8AvRasz0yUsBwuvYKRyOQkYREbcU2xBDEaRxcTvVjty8iLT2Q7VIu1k7X6yJ0AEq6FRpuqyYOjpwl1qJWbnKgnDd/1Tdo+KGxOX7BH0WgQ02EWmEkskt+adRFHJJMsuqvBUsrVF3Ylyq53aiRFRfUT1g606LELJHtTChfUYdsVkWP5tTZWEqvLHpUrMmByfupSZSesX+js6DRk3SgSglRgArMHYEFocI79KUrcFhWbI2286n5T22BxMoA7xHepSMJxNkXcPNomIKUSPSlAoRHSudV8lAfHYgE+c0xixZ+spm7pFys50uBxwp1atILSW6xWBHyALFidRIT1pOMzFJGy0T1obU2QJw2eY1Ja8symQ3An+irMYtCGC/nUm6V+yraPg0gRcJ5GT3oNZb6Nz3+F+Xp4Zr1/wBqAKViwCZpgfwPJ87cPOmiIsDdmo9mvTIRQfJaSRq9YnOLcbccUnISDT2kvJRAix65aVaksOblhleXNGdkA+1nST6pw0YjiFhNp1k71i10oiXV7q03o+Q2GJCJM1Jw2ZJ+WPSgpHoF6hKcQ3wKO8UMG6hDuTTFC7IeTSVneYfelrt6/rqI+qwEe3WhXiJJMbUann/3RWVn8a0W5d6XbqwfinNzt/rScN5D+qhgG8H80T5+n2q/7n6qBkPhL8V/S/qv6v0r+j9KAZen6KYi/k/VQzPwfopFNNgnvUEF39sDT3kQqK96mDbeVioOEhm86ZaAAAgKPlNFaetciAQ1GBapBCPzPlRwBGndEvYfahY0wBb4NORCEKhqwdka792mpneSL3MXveBH6ie+fRln/CnrNsdEt8ytKj5mKBn/AFWEnQmp8XdD7UA3zd/xSmVHf/VQXoiUpcOhPzS8odB/NYDkfs1oV0/YoG+dSmSB5V+KUeXr7JU9PM0QesX7pNfXqlx3aHS/k4on/k8qJ/QUIjsyfzSSQRrFEVLmbh71HTGsBPkFPmwIv1NRenRD0qKigj50pZ7UhU85fKh2ZDUKYO+PKpX8haxc7+gVPmgCnSxdkqCpf2BMrqRHanxIgClh3n6g5aAnP4RaiLN85UD80Yv9bBqKjisYox4I8Iox9EOa8bMGVOm+i0SYOdLIZ7exQcRVtcUlIJChv+iKnnTu+oELEfKtHnRJmndhX3Kn7vjNQgTumX6dq9lColO2O3gpzMCAJVelTbyEYkD5Qves4InGAS9bvf6deaOamIIAhbJbON634X84elEt9w2C4SV2DWnmHYEqeSFGB9kHzijVlIMPZeSjxOeiDdLPP0mpTZ7KyGx3lFtYa08J6BBUucW0o7HNM3sWbszEPkH6dNfUMB++NaBVVBoVyVwdkZvNQ4ChABIpp0q1sSfOr+fuBPmnYASvlVjMcwjY7avDQvPBNBYwBLdZaQRgZSp0k06R3p0EAmRok5Ew9GhsnG1HXwVBTNNHGZZCx2L96gt4RcEh93eoouh8V4OosHer3oUjLBtgHYK0Db1AjzcvP0zHlmgRKroBRhj2QVgIylsOBtq1cxWW8vY0T1BaZc14/kOtcbv0fcNY7DaL+k0UoIpO/wDBNGPAvwBgRMEL5PlT8lSBOwR4NZD+gXqZclmb8rp7FGNDKQAQHlW9D5XcAJLu7u8VOzIFSLsmdbOjqoIx9K4aZuUdXLWbnLoaNJbYArfmNw4ml10KkTTDFQSSUw9n3CcfO6EhKIfSOJfcWTlpNJiDQ6wrD14pxAyhOxxY71JBFOwPSdgle9FRAzzz3zUzUGJpE3B+32aUzDILwI8V4OzQYqPqTlQ6vgM9YojFvSS+RO77xLpRtBAGAMH0zCwcmxq1Ju0Ty0JdIeVGiGewQehTek4mm1CDrZdyvLCkbD0jz+4OKGCac1/JxSYJNke8I92nuwKbxJ0bYp4yJVOAnA/XgKxRmgZoxCrWhgfvvQvAVp1O43pe0mYA1WhQfIw3WmcTKtp2KtXu5LEFNhEBocr9P6wHBRKcvMdUi9b9qCx4EJXdQFqTueoUC0oehHGgpS9JZRx5B+FUe6ArG9x/0PQpOkaDvutbY9P1UI3qIvRomWNwe3eiqVofZ9RNTU/MZ0o4xvmzd+/OpxlhdiUUcHFTN9JrC2B1DP8AyjfhTZcy+UiOJ3ovV6dZRnLs5eXioWkEm944HAdhdaEA+n9HjxB961ROjAUzey35oUpWZA+HWh2wrYCWBriJyc1GuZiw2mBIY870zGiLk3k07ViMGAfKijU48mSzWMvE0tx3LwcGlYHjNDDR45mVuCYabhjCaLc8uKPpJoyjSiAqdk5iCjzLU0IR1AfWojukg7SVHDvYPVSKyNKUj3KPlQNFf89PXWXAHv01ESCwxh2OKgmJJiyc6b6zFEQgFgEBV3F2YaumXnBrTQnoks1s1qp5iVD4WaACAOAPqM1ppFYcYsAXAY7anqRSdzC1llcY4oeQ5AdvU5KbeGRapR64eaxv+ObexXeiPWj62RZTzMNKZWD2hIJ7UuZUqsr1pprT4Cl6pIGEpwSFNhpz1Nf90Y+izz3ijNHCgv2y+1Gy3fB6YFJdalippXenLheMn1VmmSRCg6k4fSiAoRuJ8X4zS7fQCkolkRPNn0p4m51jtgKekIS4TvGDlpmlgKT1ZehzmgAABAFjFNfVHAGq6FQRkMyiY7lZetFvnihcxN4LAW9Wj6mFmKkVv7ZUdLqzzUn3RhbKbnmG9M2laMzszQtuc76CtHlQMaSgIl8+hv6VHiM0+LSyy9KIIWQYJODilqfBWPBCpLVYHLUyDH/OE9ailPEXQRYeGGkjwmmKnhGO3ck70UUCjOWp2ZO1T9C8uFEw7zYc69Mypc0tT8JClMPlpVofy1CLZHkZ+BpNIedkNU3bcUvm1m6GiCCpIQpAB6z6UNVMwB3CfKlFX4DpAec0JEsAm3goqKweYMNhA6m7xG9KA37lGt2+DiXUoII+sQ6V0IbfupNoEESXgawSGpJdgrjGMLi3k1ONNK3aeK+zzTfAYDgg830qFPgIloKxmToFO4uGnUJq0GmlPQBeBMlGhIPlWq7ltMJz4jagwxnBQvHRHzqIonDn58boDq2PYY78UpLs+ITR1AwCVpOEtk91R4qGadoHKss0R2x0TxZlETpNMbKi5M22su00WtbAIbkVZcAnYrG1RHhjNqL7iKHQ6nc0NYKdDCy9y99KPkCJYEB5fXwIoLAK9KuC7tknpNZqWJlN7sd4qAqCnBPN6XgZKUIQNsgT4DlC49YCjzTy8SrkQJwApKblMoFkCOwihVBHSj0NEANxT6RWCfmQfVqyf4/cFZdOQelFn+LaTTwKfwQKZjpX7qHw/wDG9FT0gtDFm7KA4R6XrNYzSxU6vXIl6sdvEJQMtSXORF18t9h2qFm7xK7wS+1Z2rGHk1FoEDZ/0nybUnijTHcCz6NMQqR18S8GcwDqd05jP4PizdfbelRC+llZmrlE4FNjsBT1o8csV9ZpIYTI16XpUjfEknmTjIHO8It0w3zhdOv2GKYsFK4iC6gP4pZ8CZIzRJHTIQfNVMk+IlMVTc193xFCYuK9SqFceSElKyhut5pU3KufzaoSzZD1nrTxE0k/Mir82Y/qKkQ/C+9pU+FGsX0Kk5eNPYqzJ1YD+aPmD/JFLwYaH4ysMJsfrptXgRfinZcGpi86Szl3KvM0+FwphgFHIBXnboFOfAmwUKwmtF9EM2d/QnjAJpRGosqwBMS5qW2uW2tfAip/CkzPrM8rPSiBslKAnLAAvltVhbrGHVMG+q9Kmi26PxXOAye1BoA5CKhQBj7HPaiIuXVdCROopPGJKF6F1uog9o1qVP6ZEwz4LL4lGNOrpUP/AJy+svK57VPgVlzcDQWP4t8MVFR4R4R4GPFD4bdhA+dZVp4NMyAo7TWmxCPg994inqeIxU28RKVhggWjBWLH+N5pRsRsL9UlJu34sUMOMQfmj0oyEaLygqKPs8qSDCYr9gD2oWjzRAY8tuPEYpQYKBu2cdkpcBhkMneKE0VDStwWnnNLbxXnnGIgDqtJpNMW+85joH0AXgqNRyVODKDqoT3ifHBTZiYpIEC1gEzvO3jCoC+uhYG27Si1zyjK+vipAqsAa1M5J02RH1+3k70XyCwZkZNo2ukZ+QGR0xNNGYsCC7N0Y4S6kBH0GFqdPlyWABPJ5j8FkUHrtk9ZIShs4uvXCX7RT+Pks3uVv6VbrBqbQH3b+ILim5NAwOIPWCNpoID7eCDhpySzoTq2Ba4Oba24tLB1G9RUfA8fJcjYChlBbcjEjY63hsS6UMBAYPoigtCTXSeG48LS0SZ4PfrrUfBPwCo+TKGADVWhY0qjCYHUC7yv3GKMhlgXWzc6YqVJ1XE2vD1gommWD75jQRSPQ84oLvYGeYfepV9FhzaQA8w1Nl5nN9LKTGCDigBx9Gg0cC5iAjKabLMdKaGkRSbPI6JZpEyfEen6tbABlqHxCt5BldJz2LatCPukXqL1H07SJPaNZbNzpjcam9FbYNjUOstqMNmPwQVKgvQFlsPHYFp1fXQu4GO6UissIVto4GbAd6CP8Qgoi/QME2RpS+3VM94osIGRW9ygylAcHYqDb/02Pif4nPwH+IuKTqU/Af4m+Ef+DH//2Q==\\\"," + + " \\\"frontPhoto\\\":" + + " \\\"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQ....\\\"," + + " \\\"backendPhoto\\\":" + + " \\\"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQ....\\\"}"; + SubmitKYCReq obj = mapper.readValue(data, SubmitKYCReq.class); + } + + /** submitKYC Response Submit KYC /api/kyc/ndBroker/proxyClient/submit */ + public static void testSubmitKYCResponse() throws Exception { + String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":null}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getKYCStatus Request Get KYC Status /api/kyc/ndBroker/proxyClient/status/list */ + public static void testGetKYCStatusRequest() throws Exception { + String data = "{\\\"clientUids\\\": \\\"226383154\\\"}"; + GetKYCStatusReq obj = mapper.readValue(data, GetKYCStatusReq.class); + } + + /** getKYCStatus Response Get KYC Status /api/kyc/ndBroker/proxyClient/status/list */ + public static void testGetKYCStatusResponse() throws Exception { + String data = + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"clientUid\\\": 226383154,\\n" + + " \\\"status\\\": \\\"PROCESS\\\",\\n" + + " \\\"rejectReason\\\": null\\n" + + " }\\n" + + " ]\\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getKYCStatusList Request Get KYC Status List /api/kyc/ndBroker/proxyClient/status/page */ + public static void testGetKYCStatusListRequest() throws Exception { + String data = "{\\\"pageNumber\\\": 1, \\\"pageSize\\\": 100}"; + GetKYCStatusListReq obj = mapper.readValue(data, GetKYCStatusListReq.class); + } + + /** getKYCStatusList Response Get KYC Status List /api/kyc/ndBroker/proxyClient/status/page */ + public static void testGetKYCStatusListResponse() throws Exception { + String data = + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"currentPage\\\": 1,\\n" + + " \\\"pageSize\\\": 100,\\n" + + " \\\"totalNum\\\": 9,\\n" + + " \\\"totalPage\\\": 1,\\n" + + " \\\"items\\\": [\\n" + + " {\\n" + + " \\\"clientUid\\\": 226383154,\\n" + + " \\\"status\\\": \\\"PROCESS\\\",\\n" + + " \\\"rejectReason\\\": null\\n" + + " },\\n" + + " {\\n" + + " \\\"clientUid\\\": 232772137,\\n" + + " \\\"status\\\": \\\"REJECT\\\",\\n" + + " \\\"rejectReason\\\": \\\"frontPhoto:Picture is not" + + " clear/covered/incomplete\\\"\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getBrokerInfo Request Get Broker Info /api/v1/broker/nd/info */ + public static void testGetBrokerInfoRequest() throws Exception { + String data = + "{\\\"begin\\\": \\\"20240510\\\", \\\"end\\\": \\\"20241010\\\", \\\"tradeType\\\":" + + " \\\"1\\\"}"; + GetBrokerInfoReq obj = mapper.readValue(data, GetBrokerInfoReq.class); + } + + /** getBrokerInfo Response Get Broker Info /api/v1/broker/nd/info */ + public static void testGetBrokerInfoResponse() throws Exception { + String data = + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"accountSize\\\": 0,\\n" + + " \\\"maxAccountSize\\\": null,\\n" + + " \\\"level\\\": 0\\n" + + " }\\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addSubAccount Request Add sub-account /api/v1/broker/nd/account */ + public static void testAddSubAccountRequest() throws Exception { + String data = "{\\\"accountName\\\": \\\"Account1\\\"}"; + AddSubAccountReq obj = mapper.readValue(data, AddSubAccountReq.class); + } + + /** addSubAccount Response Add sub-account /api/v1/broker/nd/account */ + public static void testAddSubAccountResponse() throws Exception { + String data = + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"accountName\\\": \\\"Account15\\\",\\n" + + " \\\"uid\\\": \\\"226383154\\\",\\n" + + " \\\"createdAt\\\": 1729819381908,\\n" + + " \\\"level\\\": 0\\n" + + " }\\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getSubAccount Request Get sub-account /api/v1/broker/nd/account */ + public static void testGetSubAccountRequest() throws Exception { + String data = "{\\\"uid\\\": \\\"226383154\\\", \\\"currentPage\\\": 1, \\\"pageSize\\\": 20}"; + GetSubAccountReq obj = mapper.readValue(data, GetSubAccountReq.class); + } + + /** getSubAccount Response Get sub-account /api/v1/broker/nd/account */ + public static void testGetSubAccountResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** addSubAccountApi Request Add sub-account API /api/v1/broker/nd/account/apikey */ + public static void testAddSubAccountApiRequest() throws Exception { + String data = + "{\\\"uid\\\": \\\"226383154\\\", \\\"passphrase\\\": \\\"11223344\\\"," + + " \\\"ipWhitelist\\\": [\\\"127.0.0.1\\\", \\\"123.123.123.123\\\"]," + + " \\\"permissions\\\": [\\\"general\\\", \\\"spot\\\"], \\\"label\\\": \\\"This is" + + " remarks\\\"}"; + AddSubAccountApiReq obj = mapper.readValue(data, AddSubAccountApiReq.class); + } + + /** addSubAccountApi Response Add sub-account API /api/v1/broker/nd/account/apikey */ + public static void testAddSubAccountApiResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getSubAccountAPI Request Get sub-account API /api/v1/broker/nd/account/apikey */ + public static void testGetSubAccountAPIRequest() throws Exception { + String data = + "{\\\"uid\\\": \\\"226383154\\\", \\\"apiKey\\\": \\\"671afb36cee20f00015cfaf1\\\"}"; + GetSubAccountAPIReq obj = mapper.readValue(data, GetSubAccountAPIReq.class); + } + + /** getSubAccountAPI Response Get sub-account API /api/v1/broker/nd/account/apikey */ + public static void testGetSubAccountAPIResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** modifySubAccountApi Request Modify sub-account API /api/v1/broker/nd/account/update-apikey */ + public static void testModifySubAccountApiRequest() throws Exception { + String data = + "{\\\"uid\\\": \\\"226383154\\\", \\\"apiKey\\\": \\\"671afb36cee20f00015cfaf1\\\"," + + " \\\"ipWhitelist\\\": [\\\"127.0.0.1\\\", \\\"123.123.123.123\\\"]," + + " \\\"permissions\\\": [\\\"general\\\", \\\"spot\\\"], \\\"label\\\": \\\"This is" + + " remarks\\\"}"; + ModifySubAccountApiReq obj = mapper.readValue(data, ModifySubAccountApiReq.class); + } + + /** modifySubAccountApi Response Modify sub-account API /api/v1/broker/nd/account/update-apikey */ + public static void testModifySubAccountApiResponse() throws Exception { + String 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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** deleteSubAccountAPI Request Delete sub-account API /api/v1/broker/nd/account/apikey */ + public static void testDeleteSubAccountAPIRequest() throws Exception { + String data = + "{\\\"uid\\\": \\\"226383154\\\", \\\"apiKey\\\": \\\"671afb36cee20f00015cfaf1\\\"}"; + DeleteSubAccountAPIReq obj = mapper.readValue(data, DeleteSubAccountAPIReq.class); + } + + /** deleteSubAccountAPI Response Delete sub-account API /api/v1/broker/nd/account/apikey */ + public static void testDeleteSubAccountAPIResponse() throws Exception { + String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": true\\n}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** transfer Request Transfer /api/v1/broker/nd/transfer */ + public static void testTransferRequest() throws Exception { + String data = + "{\\\"currency\\\": \\\"USDT\\\", \\\"amount\\\": \\\"1\\\", \\\"clientOid\\\":" + + " \\\"e6c24d23-6bc2-401b-bf9e-55e2daddfbc1\\\", \\\"direction\\\": \\\"OUT\\\"," + + " \\\"accountType\\\": \\\"MAIN\\\", \\\"specialUid\\\": \\\"226383154\\\"," + + " \\\"specialAccountType\\\": \\\"MAIN\\\"}"; + TransferReq obj = mapper.readValue(data, TransferReq.class); + } + + /** transfer Response Transfer /api/v1/broker/nd/transfer */ + public static void testTransferResponse() throws Exception { + String data = + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"671b4600c1e3dd000726866d\\\"\\n" + + " }\\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getTransferHistory Request Get Transfer History /api/v3/broker/nd/transfer/detail */ + public static void testGetTransferHistoryRequest() throws Exception { + String data = "{\\\"orderId\\\": \\\"671b4600c1e3dd000726866d\\\"}"; + GetTransferHistoryReq obj = mapper.readValue(data, GetTransferHistoryReq.class); + } + + /** getTransferHistory Response Get Transfer History /api/v3/broker/nd/transfer/detail */ + public static void testGetTransferHistoryResponse() throws Exception { + String data = + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"671b4600c1e3dd000726866d\\\",\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"amount\\\": \\\"1\\\",\\n" + + " \\\"fromUid\\\": 165111215,\\n" + + " \\\"fromAccountType\\\": \\\"MAIN\\\",\\n" + + " \\\"fromAccountTag\\\": \\\"DEFAULT\\\",\\n" + + " \\\"toUid\\\": 226383154,\\n" + + " \\\"toAccountType\\\": \\\"MAIN\\\",\\n" + + " \\\"toAccountTag\\\": \\\"DEFAULT\\\",\\n" + + " \\\"status\\\": \\\"SUCCESS\\\",\\n" + + " \\\"reason\\\": null,\\n" + + " \\\"createdAt\\\": 1729840640000\\n" + + " }\\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getDepositList Request Get Deposit List /api/v1/asset/ndbroker/deposit/list */ + public static void testGetDepositListRequest() throws Exception { + String data = + "{\\\"currency\\\": \\\"USDT\\\", \\\"status\\\": \\\"SUCCESS\\\", \\\"hash\\\":" + + " \\\"example_string_default_value\\\", \\\"startTimestamp\\\": 123456," + + " \\\"endTimestamp\\\": 123456, \\\"limit\\\": 100}"; + GetDepositListReq obj = mapper.readValue(data, GetDepositListReq.class); + } + + /** getDepositList Response Get Deposit List /api/v1/asset/ndbroker/deposit/list */ + public static void testGetDepositListResponse() throws Exception { + String data = + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"uid\\\": 165111215,\\n" + + " \\\"hash\\\": \\\"6724e363a492800007ec602b\\\",\\n" + + " \\\"address\\\": \\\"xxxxxxx@gmail.com\\\",\\n" + + " \\\"memo\\\": \\\"\\\",\\n" + + " \\\"amount\\\": \\\"3.0\\\",\\n" + + " \\\"fee\\\": \\\"0.0\\\",\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"isInner\\\": true,\\n" + + " \\\"walletTxId\\\": \\\"bbbbbbbbb\\\",\\n" + + " \\\"status\\\": \\\"SUCCESS\\\",\\n" + + " \\\"chain\\\": \\\"\\\",\\n" + + " \\\"remark\\\": \\\"\\\",\\n" + + " \\\"createdAt\\\": 1730470760000,\\n" + + " \\\"updatedAt\\\": 1730470760000\\n" + + " }\\n" + + " ]\\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getDepositDetail Request Get Deposit Detail /api/v3/broker/nd/deposit/detail */ + public static void testGetDepositDetailRequest() throws Exception { + String data = "{\\\"currency\\\": \\\"USDT\\\", \\\"hash\\\": \\\"30bb0e0b***4156c5188\\\"}"; + GetDepositDetailReq obj = mapper.readValue(data, GetDepositDetailReq.class); + } + + /** getDepositDetail Response Get Deposit Detail /api/v3/broker/nd/deposit/detail */ + public static void testGetDepositDetailResponse() throws Exception { + String data = + "{\\n" + + " \\\"data\\\" : {\\n" + + " \\\"chain\\\" : \\\"trx\\\",\\n" + + " \\\"hash\\\" : \\\"30bb0e0b***4156c5188\\\",\\n" + + " \\\"walletTxId\\\" : \\\"30bb0***610d1030f\\\",\\n" + + " \\\"uid\\\" : 201496341,\\n" + + " \\\"updatedAt\\\" : 1713429174000,\\n" + + " \\\"amount\\\" : \\\"8.5\\\",\\n" + + " \\\"memo\\\" : \\\"\\\",\\n" + + " \\\"fee\\\" : \\\"0.0\\\",\\n" + + " \\\"address\\\" : \\\"THLPzUrbd1o***vP7d\\\",\\n" + + " \\\"remark\\\" : \\\"Deposit\\\",\\n" + + " \\\"isInner\\\" : false,\\n" + + " \\\"currency\\\" : \\\"USDT\\\",\\n" + + " \\\"status\\\" : \\\"SUCCESS\\\",\\n" + + " \\\"createdAt\\\" : 1713429173000\\n" + + " },\\n" + + " \\\"code\\\" : \\\"200000\\\"\\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getWithdrawDetail Request Get Withdraw Detail /api/v3/broker/nd/withdraw/detail */ + public static void testGetWithdrawDetailRequest() throws Exception { + String data = "{\\\"withdrawalId\\\": \\\"66617a2***3c9a\\\"}"; + GetWithdrawDetailReq obj = mapper.readValue(data, GetWithdrawDetailReq.class); + } + + /** getWithdrawDetail Response Get Withdraw Detail /api/v3/broker/nd/withdraw/detail */ + public static void testGetWithdrawDetailResponse() throws Exception { + String data = + "{\\n" + + " \\\"data\\\": {\\n" + + " \\\"id\\\": \\\"66617a2***3c9a\\\",\\n" + + " \\\"chain\\\": \\\"ton\\\",\\n" + + " \\\"walletTxId\\\": \\\"AJ***eRI=\\\",\\n" + + " \\\"uid\\\": 157267400,\\n" + + " \\\"amount\\\": \\\"1.00000000\\\",\\n" + + " \\\"memo\\\": \\\"7025734\\\",\\n" + + " \\\"fee\\\": \\\"0.00000000\\\",\\n" + + " \\\"address\\\": \\\"EQDn***dKbGzr\\\",\\n" + + " \\\"remark\\\": \\\"\\\",\\n" + + " \\\"isInner\\\": false,\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"status\\\": \\\"SUCCESS\\\",\\n" + + " \\\"createdAt\\\": 1717664288000,\\n" + + " \\\"updatedAt\\\": 1717664375000\\n" + + " },\\n" + + " \\\"code\\\": \\\"200000\\\"\\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + /** getRebase Request Get Broker Rebate /api/v1/broker/nd/rebase/download */ + public static void testGetRebaseRequest() throws Exception { + String data = + "{\\\"begin\\\": \\\"20240610\\\", \\\"end\\\": \\\"20241010\\\", \\\"tradeType\\\":" + + " \\\"1\\\"}"; + GetRebaseReq obj = mapper.readValue(data, GetRebaseReq.class); + } + + /** getRebase Response Get Broker Rebate /api/v1/broker/nd/rebase/download */ + public static void testGetRebaseResponse() throws Exception { + String data = + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"url\\\":" + + " \\\"https://kc-v2-promotion.s3.ap-northeast-1.amazonaws.com/broker/671aec522593f600019766d0_file.csv?X-Amz-Security-Token=IQo*********2cd90f14efb\\\"\\n" + + " }\\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); + } + + public static void runAllTests() { + run(NDBrokerApiAutoGeneratedTest::testSubmitKYCRequest, "testSubmitKYCRequest"); + run(NDBrokerApiAutoGeneratedTest::testSubmitKYCResponse, "testSubmitKYCResponse"); + run(NDBrokerApiAutoGeneratedTest::testGetKYCStatusRequest, "testGetKYCStatusRequest"); + run(NDBrokerApiAutoGeneratedTest::testGetKYCStatusResponse, "testGetKYCStatusResponse"); + run(NDBrokerApiAutoGeneratedTest::testGetKYCStatusListRequest, "testGetKYCStatusListRequest"); + run(NDBrokerApiAutoGeneratedTest::testGetKYCStatusListResponse, "testGetKYCStatusListResponse"); + run(NDBrokerApiAutoGeneratedTest::testGetBrokerInfoRequest, "testGetBrokerInfoRequest"); + run(NDBrokerApiAutoGeneratedTest::testGetBrokerInfoResponse, "testGetBrokerInfoResponse"); + run(NDBrokerApiAutoGeneratedTest::testAddSubAccountRequest, "testAddSubAccountRequest"); + run(NDBrokerApiAutoGeneratedTest::testAddSubAccountResponse, "testAddSubAccountResponse"); + run(NDBrokerApiAutoGeneratedTest::testGetSubAccountRequest, "testGetSubAccountRequest"); + run(NDBrokerApiAutoGeneratedTest::testGetSubAccountResponse, "testGetSubAccountResponse"); + run(NDBrokerApiAutoGeneratedTest::testAddSubAccountApiRequest, "testAddSubAccountApiRequest"); + run(NDBrokerApiAutoGeneratedTest::testAddSubAccountApiResponse, "testAddSubAccountApiResponse"); + run(NDBrokerApiAutoGeneratedTest::testGetSubAccountAPIRequest, "testGetSubAccountAPIRequest"); + run(NDBrokerApiAutoGeneratedTest::testGetSubAccountAPIResponse, "testGetSubAccountAPIResponse"); + run( + NDBrokerApiAutoGeneratedTest::testModifySubAccountApiRequest, + "testModifySubAccountApiRequest"); + run( + NDBrokerApiAutoGeneratedTest::testModifySubAccountApiResponse, + "testModifySubAccountApiResponse"); + run( + NDBrokerApiAutoGeneratedTest::testDeleteSubAccountAPIRequest, + "testDeleteSubAccountAPIRequest"); + run( + NDBrokerApiAutoGeneratedTest::testDeleteSubAccountAPIResponse, + "testDeleteSubAccountAPIResponse"); + run(NDBrokerApiAutoGeneratedTest::testTransferRequest, "testTransferRequest"); + run(NDBrokerApiAutoGeneratedTest::testTransferResponse, "testTransferResponse"); + run( + NDBrokerApiAutoGeneratedTest::testGetTransferHistoryRequest, + "testGetTransferHistoryRequest"); + run( + NDBrokerApiAutoGeneratedTest::testGetTransferHistoryResponse, + "testGetTransferHistoryResponse"); + run(NDBrokerApiAutoGeneratedTest::testGetDepositListRequest, "testGetDepositListRequest"); + run(NDBrokerApiAutoGeneratedTest::testGetDepositListResponse, "testGetDepositListResponse"); + run(NDBrokerApiAutoGeneratedTest::testGetDepositDetailRequest, "testGetDepositDetailRequest"); + run(NDBrokerApiAutoGeneratedTest::testGetDepositDetailResponse, "testGetDepositDetailResponse"); + run(NDBrokerApiAutoGeneratedTest::testGetWithdrawDetailRequest, "testGetWithdrawDetailRequest"); + run( + NDBrokerApiAutoGeneratedTest::testGetWithdrawDetailResponse, + "testGetWithdrawDetailResponse"); + run(NDBrokerApiAutoGeneratedTest::testGetRebaseRequest, "testGetRebaseRequest"); + run(NDBrokerApiAutoGeneratedTest::testGetRebaseResponse, "testGetRebaseResponse"); + } + + private static void run(TestCase test, String name) { + System.out.println("Running test: " + name); + try { + test.execute(); + System.out.println("PASSED: " + name); + } catch (Exception e) { + System.err.println("FAILED: " + name + " - " + e.getMessage()); + e.printStackTrace(System.err); + failedTests.add(name); + } + } + + @FunctionalInterface + interface TestCase { + void execute() throws Exception; + } + + public static void main(String[] args) { + runAllTests(); + finish(); + } + + public static void finish() { + if (!failedTests.isEmpty()) { + System.err.println("\n=== TEST SUMMARY ==="); + System.err.println("Failed tests:"); + for (String name : failedTests) { + System.err.println(" - " + name); + } + System.exit(1); + } else { + System.out.println("\nAll tests passed."); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApiImpl.java similarity index 97% rename from sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApiImpl.java rename to sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApiImpl.java index 61fce46b..034ca40a 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApiImpl.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApiImpl.java @@ -4,10 +4,10 @@ import com.kucoin.universal.sdk.internal.interfaces.Transport; -public class NdBrokerApiImpl implements NdBrokerApi { +public class NDBrokerApiImpl implements NDBrokerApi { private final Transport transport; - public NdBrokerApiImpl(Transport transport) { + public NDBrokerApiImpl(Transport transport) { this.transport = transport; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApiAutoGeneratedTest.java deleted file mode 100644 index b016a1d6..00000000 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NdBrokerApiAutoGeneratedTest.java +++ /dev/null @@ -1,538 +0,0 @@ -package com.kucoin.universal.sdk.generate.broker.ndbroker; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.kucoin.universal.sdk.model.RestResponse; -import java.util.ArrayList; -import java.util.List; - -class NdBrokerApiAutoGeneratedTest { - public static ObjectMapper mapper = new ObjectMapper(); - - private static final List failedTests = new ArrayList<>(); - - /** submitKYC Request Submit KYC /api/kyc/ndBroker/proxyClient/submit */ - public static void testSubmitKYCRequest() throws Exception { - String data = - "{\"clientUid\": \"226383154\", \"firstName\": \"Kaylah\", \"lastName\": \"Padberg\"," - + " \"issueCountry\": \"JP\", \"birthDate\": \"2000-01-01\", \"expireDate\":" - + " \"2030-01-01\", \"identityType\": \"passport\", \"identityNumber\": \"55\"," - + " \"facePhoto\":" - + " \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wgARCAKyArIDASIAAhEBAxEB/8QAHAABAAICAwEAAAAAAAAAAAAAAAYHAQUCAwQI/8QAGgEBAAMBAQEAAAAAAAAAAAAAAAEDBAIFBv/aAAwDAQACEAMQAAABtQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwZaCOFhddTQMu+OVHgsXxwYTn112LckVBZPqHv8AmGal0o5IwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdZ007qYwDBnDIxstcYAAAzgZm0IyfSW3+X7lJ2xkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQecac+b8bbaxMUWtouZguTvmceT3SWm2n8ZxdUAAAAzgW1Z/yvcBZIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHi4UieW5qp8VVly+Op5rX3Ura+vRTM5N7sZNPzzjONmUAAAAB29Qv+V/OH0UdoAAAAAAAAAAAAAAAAAAAAAAAAAAAADrqQsyv4NPOOoBZUn7KLaslMThFvH0LU/rnHHfLc1rZlfWOPPFffzlx5cd+MJAAAAAZuCn9yfSDGQAAAAAAAAAAAAAAAAAAAAAAAAAABx5ViROQeayaLePIy3Ojv1XUUV1m/LIbrqa2s19OXJTVyxLjy81Pfz1x5c9+Tqe3yHFlLAAAAGcZPovfV3YgAAAAAAAAAAAAAAAAAAAAAAAAAABx+cr3pmJt3vPP1APP6Evnfru3r1U5kWM5rtdsSDw+4in7U9juMR+QuZoPWXhSGzPjB3yAAAzjJYtyUndgAAAAAAAAAAAAAAAAAAAAAAAAAABoanuz595m8hg1AOjv4uuns5cup8nrOYByAEAlmir0pu+uKYNVAAADOMlhXPW1kgAAAAAAAAAAAAAAAAAAAAAAAAAACgb+hJ3baprZxaAr7AAAAAMZAFEWdTWmniNFQAADONuXfJOPIAAAAAAAAAAAAAAAAAAAAAAAAAAHE5dUcp46bIjUep6vNGZNm0BzIAAAFPd2l027NbunrlE93ThZwAAABm26o3MLZjGnk+K7U7X1aSvqz/d86Xx6OfZiQAAAAAAAAAAAAAAAAAAAAADo0dMomteSaO984tvqgnn3TCIcJp2qKwJNGbIsbsoWd1XT95vTT0ESEgKN0c2hO/LjGcdQAAABkkXE9dqd/f8v6OGcebeCNFAp/Xn1fnT3t0Hn9rDYclojWV2fR6mLHr7kDGQAAAAAAAAAAAAAAAAABD+NRTCc9vp9LBofJ17jztfh9cNvvJfzqO3Pn6J9k51sYmywqnncMtq5bze6+nRud9Sux75u3u+e/VzF9qNzE27SOz8NtetcudnHVjvynz59XOJ8TbeuLI9sJFoolcMelfz2jA8fQA6+2utlekm2kkv3/z7JsyMZQ0sVsTFN2ntukMYN17Ortr7AAAAAAAAAAAAAAAAQvlUExiw+Pp9Lzwvphe60cs8T1IndNB33nu6qHuij5mfZjvuo1RryeiQbMm5jWs9lOj2+j3w7nZ3S3POu/Ar0YZGMgzgkDOCJeH3ceq/FZFOXH5fl4HkaBqLeddDPFYn3HjduT2vLAAARGXYr719sfOH0D5Xpe8R0AAAAAAAAAAAAAAi3royYzPsev0sGMl9AEJmEQlng+rpczuoc9tkQqO2Be3NaXrXdfe4zX+v7jhKI/mNXVvs7KnWFG0EgAAAADMxD7npa6cXjjq8PT0VL3Sn7LyvX7j6PxgmAABCK7JurXdU2+iReXSUX3mM14AAAAAAAAAAAADw+2izTzTx7z0MWRqygARPddEK8n0bAiXjtHBpg2izNe7Onbx3yc99GgmcXs4mbo78fvM4c9gAAAAAABPMQuem7kw+RisO/o20eyTH1fhh3wAABrI3J4l5Po23VlqQP5f1eUa3sa+s8r6QGe4AAAAAAAAAAAACC1tmZaKO/J6fnhAADjXNkYqthOd/q/P2eTfxbxZ9c5QLOe6eRbwdXXMi2sH9kbJYivPi6UI12R3IGj58zuWs5Oti8OYn2vET7Xi4I2LWdcxt+Oi8ndPn3cXmmzxNdNGfX8wLKwAAAEOmLiytvBa1deftn0Ik8E75+nHz3Z+XRNQAAAAAAAAAAAPL6o0UlZUCnvo4Q05gAAAAAMdfaifN1e/ET4OOxQ1PDck6HrkSJjPTLETD+EzRMJxN0TB04JhHOaEQ70yhMR737J1zxzlZWAAAAAAAhkz0dN0LuKBWZ5foeOorqqtN07GOyIAAAAAAAAAAAV7YVPGslei33q+aFtQAAAAAAAAAAAAAAAAAAAAAA8sT6kLxTdNXj9l1ITCv5rDcmqx9weft4UvM/RKy/WAAAAAAAAAADz86JPVD7ShRKtl5PX7HlB1yAAAAAAAAAAAAAAAAAAAAABxredxbzt0wSZ8P7lL2PFdt9v4m3Ov0cMOlle3V5Pp8/J660460P0NCp8kAAAAAAAAAAYKx1kSuU7KduKqiV+jU7b2PLDrgAAAAAAAAAAAAAAAAAAAAADhXFleDPfsu2uNf8563fYUdlP0Hl4jUhrfqJhPvJ3+bv0sD8t3y3WQAAAAAAAAAAeD39J8+3DSl0HZH5AKVn/orTRTZiKyffh5mgRuo/DPPj2SHq0Si6R7mBuubd7KnnezLvRozgAAAAAAAADBlq9dXZJUZ2JtXHl3WEgAAGs2fl47is0r/ALc2nt32ps/HpzXErgfPUws7hzAAAAAAAAAAAAK5r36Hi5rNtVHgLm6Kg4G9iOy29tes0eevjoY56zj1SAirbaoc+vJYW/qa0vRwd405wAAAAAABC67NjDvHjzt+cFVgHqmMEzZXb+YNOfSwBZWIxx3J+mu/Xl077S7reU3VbY0t7qLcY5V9CM3fC7SkAAAAAAAAAAAAAA4cxAq3+hYL1Gqj2p0+jP5uOeOXS93isQmPuDhUFxREqlnBmcQf32cWjmu+vXlshXvt65mqJ+vviQtJ6O+dm8vZMdzhymMgA0tc77QeZ6ODNNpv7VKP6/oCAFfYzg5TyA7C2u0mM+r5isLPh+XTZ3ZSWz8/bbSouRbaovAmxoR7bmPZ2AAAAAAAAAAAAAAAABilrqrEqTGcGbMrLdF1OHMQ2V04abGcGZ5A7ZLQ48h4NVJBBfBZKIqvV3QmaE8/0GR878PotL5vz9Hj5w6vpTxnzLwInGccy7tnx5DGRR2s3uiHLjklvZM9ldVXWLE5FW6u85DX3Et9tHM6338yQAAAAAAAAAAAAAAAAAGv2A+XfPb9QmM4G238KybLW4Aydv0bCLOAAAAAAAHHkPl/yz2BDOBdG8o2fkz1sfr88XVnA5Yk5enuAAAAAAAAAAAAAAAAAAAAAAABWllj5b6vpSuCssSbyGkSWTlcWnOdyYyAAAAAAAAGk+ePqKIFC49XmDAzgM4z2GL71FhAAAAAAAAAAAAAAAAAAAAAAAAAAGGQAAAAAAAAAAABqqvuUfMHm+ptYfNfd9F7QpO0t8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEgAgAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgEgAgAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/xAAxEAABBAEBBwMDBAIDAQAAAAAEAQIDBQAGEBESExQwQBUgUCExNRYiI2AyMyQ0oCX/2gAIAQEAAQUC/wDXq97Y2k31fBkurIkyTVRS4upz8TU5+R6qKRYtWR4PqCvmyKaOZv8ASjLcMTH6qERTNUyOwowgpewOTMO4LUxMSV9yIav9GJnjHiuNQSleBVagIEyvsBzo/wChvcjG3lm6wJ9sIzph+2PPIPLR3zC2/wBC1fO6Kr92k1/5+ow0FL7mnr3ixP6DagssBLIKQAkCkIKiH06OzL+qjEj2aTb/AMzU8fHW93S9vz0/oBZEYsDEktrT+OGNkjH5ZRc8DZpQfgHtI+bXd1j3Mdp6y9QE+eNLhDiubSSznjn9IjiCOsnSgn17qa5Ql1iM8UusrJjXwRNghITfB3qg1wBsT2yR/NmHDhtP1TkcZdnPWVLAowqeTqfWwGLHJHPHdgKERWzMPBRN2x3+Pf0cbxwfMyPbGy31HI9wwRdg8PT8ESxsbGzNSHLKRmliXNKuoOfW6SmVJdi/Zfv3qgrpLD5hyo1t7avsJ6ekajERETZO/lwPcr3Zp/8ALqm9KJyxXOx32X79+jI6mr+X1dYqxumq5HJ7LX8bs0tErrDKdFW82Erwj41jnK4Wdqd3Rc3ED8s5UakznWNpDGkMXsIZzYJo3RSNarlpAOhEyEIeGfYcx0gdbTTETjDRDR5Y1UBiHhyBzdvRT9x3y1u/l1mmo+O091jVjnKBUjBORd/augusC7ejPyvy18nFT6VX/wCj7ZncDYXK5kjeJsDVb27mLk2Xa0UzfY/LFR84aof09r7XJvRE3J3NTbvVe1oqHhF+X1IKottVk9UD4VvNz7DtaeH6ap+X1RX9WFpw9B5vBvrBBB+1Vi9Yc1ERPl5HtYy15CH0NihUHc1GS6SyAvph2N1EGqGaj3pLI6WTtaRESCArUQMCyark3/qsjBdVRucIXAXH8iq7stLkcKIgk21mHod7CIJ60qotGGs7dx+U7se5HzklWLxqGV6Q04bE9MDwyijeg8pNSbXmxHD/AB00rIWWWp8KKIJWvEeZOMPGNGZZDi4dbsKia5Wurb9UyN7ZG9m7Tda92sr3myCixCs9lsC0yCnsX1pX6rixuqhlwW+AIxkjJE+Jt7aGuYWWVakQV0UEaI44wYeIOCyt3zLXUpBiQ6dEYjqEBUN045rRySAZQ9RRuweeMhnv1QMsZvcqK9TZIomRM9twV0odWIhL1qxlxaiHJadyZuLr3h6nJjyvtxDl+Gu7mMBkcc9iQMNGOy5fwB6Zi4pdQm5p6pa9uXNsS4uG0OHdW6gZKuoa5hA0EfNkWIkZRr4uLIdRwOyO1CfjJY3ptsQ2mjFDyDTdkSKKTAxXGEjQMHh9sj2xxmkPsTBoWjw7VRFSeuglwkGYZanUb4shkZLH8HfXDQGDwzHEQRMhjy/d+3T26OuHYp1ixqMb9sR3OsZI2SIYDyk09arxyN5J+TDQOTg45Vr5ce18L2El7kOPTPUT89VPTCS5ytnC5c5b85T85Eq4gsy4gEy4ytXGAwohg3IdpxsXQ+6/P41qBOW33L9csK3flJbyV0kUjZY/gb+4aDGNBKdPDE2GPZf/AOwBN2ntM/l8Idwj1qbzNhsXIIV6vmje17LInflePwIaTyWjDuIexqMbs3Jm5M3J2TWcY2mZ+Gf23dh00dSLzpezcCZpCw4XfAagtkAhHilOJgiZDHtv/wDdTtR9QHKoNi1Uclu/l1gs3IkZZpv66DgKnUmQmp5FRGU+OAEbmOlekccaOJIY1GN7zk3tqV4LT2WRrA4YY5TiYo2xM7KpvwlrgjgSGlCedeWzK2OGOawKghbBH7L/AP3UP4zUAOUd107dSzN9I08C0siejDlbahdCVTV48Qmo5Wx1gjGPkcRDG0olxChD8lngQfS02lztGgmklsCxIGjQ9u9i3xaLn3xebb2UdeN/PZGDQNHi9t+n8mn131qpvS1ZAwt7ZmwaSc3l5qcJ73D3BcERpk5r+gl3Nr5VwcRkS+CP9bPZLI2KOxMecRXiIPH2TbN7nq4xjQbReI9vGHpKTguPMMJjEHNImszQhmixe6/b+zTbt4N1YdNHUAKXJqKVvNhcQG4fUjkz9RCcNhYxEZEu6XxK362eKqIlzZdU6rB5admyesYVAO0gxURUvgmiz1knPBo38q48tc1HZ9cTViciL320XNDFMmFwIWU8hyxhBwNcWXuRUkCgfnpkeRBwx5Yt4C4HccPhL9qr8mv0y7suctSFv7Z8fNEpCkFMzVEqcFG3cLX/AJby9VWHTCVAvNl7DkRzTg3DvEt5h0trJDGVixRxI5F9lwz99a/iG8J3+Nc9sdhbWqkZWAca9yxrl4ozSoGq50kkcaRQ0jeO48u+mcVcDxpDD2d2TV48mPp25JVkNxRCWZzCI86udM64jJipJmjkvgT1GXPUZM9SdiWWepJiWLMSwixDoM62DOrgzqoM6qDOqgzqoM6yDOtgxT4cdYtx9g9cjiklcDWtj76tRctG8B5hPJChhnkwa4PFdSXbbBfIKl5AwCc4/wABY2LiwRLnSwZ0Y+dENi142LWi56UNi1I+ejw46nbno2ejOz0d+ejyZ6PJno8mejyYlM7EpsSnjxKodMjCHjxE3eDexLzFfKU4EZogxAsJDToHV59fP1IXj6jk5dPRs3lfMXEqME00LzCNmp/yOnvw3j60k4QKFv7PmLibmlVI/TA45yMaQ99hYiQoMN4+siWSz0zeEL5AieMdktu/iit38QxEZDNpUqQQUo/V2GzUhnBFo8Dx55mQRW97OW+aJ8T69NwXx7lRrZXyGlC0w0TCqYaVrVlAMY5Ht2Xk2+TTo3KBwqZo440UlnYjxNgh8WR7Y2XVnLZk1FW0Vt/+UE+gvx5+/otO7vUtmp0Tq6r/AKOSPSNkTHnHMajGZqI7myaUrumG8bV1jwt09X7m5eflYP8AR8e9qPZ/IAYHZjkMJsBh2kSyWJsMaRRZdz8EOlxvplwb0Y1EAtieibvGVdyTuWxtWNRjM1LErbCslSUP5AsVhTJqqdqziTQMo2s5WSORjJXPNNFhQceR7Y2GSyWVjUgMrxPGsF4QKFN9psuQ+sEDJeHNBNHO32SSMjbNbRNx1tOueqE4y2nTIbaJ2Me2RPhrFnGFQv8A5MtzOYungFYmajO4n6RruFnjzs5kI6uAsY3tkZss6uMzJIiQZRLVrsa9r0ywsEgyaZ8zvbDM+F4Fg0jxvtkh47MdbwpiXEWRnjPxFRU7Rf8A1aZ7YyD7FZcp6p0792W5vRi0detkcxqNb5GpKbnpX2UwKgnwmM2TRMmZZ1UEKRyvjxbMhY3LvX3tXctWZ1DPDNsmwrORLMvshnlhUKzSRfe+RjEktoGqXaOmjhikmfW0rYVxzka2wJfYG04Da8PyrOkFOw6jNDclgfBjrU5cUs6bIq8mXErYx4nLvdtgglnclEYqFgECeyCRYpIZEli8GyseLs1Z6xr7LCy5T+YWVkdQbJkOnv2j0okWRRsibs1FYZpOs3J5rmNdmp6vqRq4/kZHIyRt5NwxbQx3FThixiQ49qPbcg9ERto5t8PgWpHIH9n3xzHN9iZTE8yPbEjVOja1jPba2jBWUwD7M1jUa3z7fT8Rbp6w8N075Xrt0tAm7bqZnEBtEGmKkcNYQ51JkeMtCW424kxty3G20C4loMuNPGdiEQrnNjzjaub09tzJxmbamucdIKLCMxzUclzUIjdoMvJK22Ve90kRJQi+uG4t0auNuzEx90a7FIMKWvoDCXBCxhj/AAWsm7rPbpZ6dNt1PJwhbdGpvtcVEXJQxpckpK9+S6ZBfjtKQY/SeSaWLTH6fsWqtHZJno9jnpVgmdEc3OnsM5VhiqY3HuVzttbAgwW2xiSA3YmR26tZ6znrOLc5NaSSNggnMmp6WEQda8NcYCIxUaifC61HV0e2pL6Mtjmvbk0jYY7UxTSduiYf4++bv6Ta3/JPttul4rPbVUYRFaum6/P01X4mm69Mho6+JY42Rp8QeO0sSeJ0Mu0M8gTP1ARuLNnKXbGxZH1QnRA99yb0JiWAjbTloUFssCmiDSOV79iYDFyQ/jtVVLpk7OlqlY08HVofIP2glyBzD347knvx24aXIZLt06IpVn8hf0HOdJG6N3tYx0jqPT/A9Pp4VuEh4U8T4Jewxqudp6t6AT5E0AY1CtKyIstHYxr6UfkVJYSYLpWVVCrRQvFvqhthGRDIPL7o2Okfpyl6X+nnADmxn6YnjyWCWFdkcT5FA04WQlbVDAN/qKtRyPrgn4lYCmMY1if+Ir//xAAqEQABAwIEBgMBAAMAAAAAAAABAAIDETEEEhMhECAwQEFRFCJQMmGAkP/aAAgBAwEBPwH/AIRAVRYeAbVv5LTRZvBVEBRv44aSmx0ui7LZVzBMsj+Mxnk8DwjsmfjC/JpFUpxDQEQCnNp+E2/FuxRO9U415ZLfhtNR0ZD4/DBLUDXmLt1nPO2BxRw7grdy14dZWV0KhB4PK6/M1uY0CihDOOKLWmq12JsjXW7Uml1JMXbBYYfVX4OiLd15RiIsmh5sFn8LN/hO3VCspWm70m4eR3hSYV8YqVh4wBXjJJkCxM2Y04snc1NeHDbsiabqWXOeEH8hNVitRpRvsg4y/UKQ6LREy6gw4jG91lCyhZQqDjIKtIWHO1ODnZRVYvEV5Y35DVA137AmillzbccP/IRTdynt9LNtQKEyxj6tUEBrnkv0DZQXPDF4lE1NTyRxl9k/DOaoD9adhNLXYcmGd9VdRx5t1pvTmFm5TDVvRdZQeVicTQUCe8vNTy4KinaMlVH/AEevM/KOWKXIm4hqZiQBRDEhSTNcFDjGNYAUMdGvmRe18qL2vkR+1rs9rWZ7Wuz2vkx+1JjI6XT8RkBUkheeaOQsOyZPqbKAHcnr4k/boVKzFZ3e1qO9rVf7Wu9a718hy+Q5fIetd6Mrj56MJo7sJj9+4ArstB6Ipfhhmeewf/XcYNgJWk2ixkdEN0xuUU7B4+3cQS6ZQxlQsTIXGigZU17GSEPTo3NumML7JmHAutNvpGJpUkGXcdQROKMTh4VKcsf9KSIvemtyinZF7bIAC3LPHlNR0Y4y8pkbW8Xxh91JGWcGML7IYb2UIWt7MioomwZXV5ntzCiOG9L47lovWm70spWUqhVFE3K3lkbmbww7gDv+HRU59Jq0WIAC3+4n/8QALhEAAgECBAQGAgEFAAAAAAAAAQIAAxEEEiExBRATIBQiMEBQUTJBQhUjYYCQ/9oACAECAQE/Af8AhETbeCoDpyLWf4lxmmS2ol9IWu1/hy4EasTtMufeDyNaVNDB8NUqW0HJdTyq/lK28G/wpNhCb8hpOsLRmuYTeCNULQMREfMPgm29Khv8HUXKfRor+/gyVqeURly9wUEQU1HfV4jQp6XlPilBzaA329wBeMmQXMYtXNl2i06dOZlfSNRI2luxdu53FNczTG8QasbLtz4QtR6VjPDPGpMu/tQLmwlKiE1mPaH+2uUSkP2YHR9ItxpBWDGxEKJOjOj/AJiKV05XmYQ1FEWqraTiuKZn6f6HPB4U4h7fqYSgKS83oK0emUOvsgMxsJRohByxxsZW+5THlM6TCDbWCmEOYxRnOYypUzS8vLy/NTYzjCWqBvvlRpNVbKs4dgRRW3bUQOLRhY29gBeUaOTnxD9yg+dcplsi6Sm+usyG9zHCtuZUqaZV9ATjP8YqljYThXDukNd4AALDsqVAm8TFK0xK+a/sKFHLqezHUsxtCRSGRd4z9OwmemYrhtBDv6InGNWUThXDbedt4iBBYdvEg2U5ZwypVFbKZV1Uevh0zNftq0hUjYIg5pUwjE3hwplOiUa8eiSbidBp0WnSadNpkaZGnTadJotFrxcGKrhyNpTQILDuqUw41j4YU/MJiDsPXwo8voZRMgmRfqdNfqdFfqdBPqeHSeGSeGSeHSdBIKSj0a4ukJv69EWT3BNp4lICDqOWKfS3sE/Ee4x9Uouk/qFfPmzTh1Y1EB+4TKrZmv7BNV9xXo9QQ8Fp580wlIIukxD5Rb2NKuUiVFfaM4XePiT/ABnVb7i13Ep4gPofUNVRBVQ/uA37X/GUqoRNY75jf2QpvvGYnftw9XMLH0alQILmPWZ+aVWSU6gccncILmNi/qNXZvZq2U3EbEZlt3U3yG8GKEGKSCuhnUX7mYS4l5eV3zN20nytyxKkjSEfAXl5czMe8V3E67xmJ3/3E//EAEUQAAIAAwMGCwYEBgEDBQAAAAECAAMREiExBCIyQVFhEBMgIzAzQEJScZFQYnKBobEUksHRJDRgc4KiQ1OgsgVjg+Hx/9oACAEBAAY/Av8Au9bTsFXaY67jDsQVjmsmdviakc3JlL51Mf8ACP8AGP8Ah/LHOSpLDdURzuTMPhasCs3izscRalOrrtU1/ouk2cLXhW8xmyZx9IIySSE957zH8ROd/M9DakTHQ+6YC5QqzhtwMWZcyy/he4/0OZk5wiDWYaVk1ZcjCutuwBJ3PSRtxEWpD12qcR/QhZrgMYNCeIXQH68qY8u8y72G7pFmSWKuNYhZWU0TKPo39B2UNOMeyfLlzBqMv9YDSxSXMvps6Vcmy1s7BJh1+f8AQRkuaa1OwwZM0qWxzYWZVUQ4Vjn3aYfSFnZPWxWjDZwzm2J+sW9aMD034XKW5waDHXu/oF5s1qKog1uMw1O4QqkhVAoKmMxg3kYny9ZW7hmTj3zQfKMoX3D0wZCQwvBEUc8/Luffv9v8ZlDhV+8KqgrKBzEgpLo2WPp+5ujjaFrXfYxxtCKd5DAk5RRZuo7YmI413bxAoLMrW8JKliiqKRMG1T06Tho4MNogOhtKbwR7crlE1U3a4K5FL/zf9o701zizYCGYm3lBGl4YaZ/6jmSlvJZtKLAY0GxbotIwdDAmyrpTm6ndMS5jqGOBrti7DgPYHyRsUzl8vbRdyFUXkmGlZBmy/wDqazFoBmrjMYwGnsZp2YCAqAKo1DgOToebTHeeBpHccV+cThSpUWhE6VW4i1wnsEmbWi1o3l7ZLMaARYS7J10Rt3ws7LBVjeE2ecUFw4Zj+FSYLNeTeeCR8/tFDCqNZK8J7Dk8w42bJ+XtgZHKOkKzP2j8VOWvgH68nKf7Z4TMpci8CfG3DNbYp4KKpJ3RVpMwDevTTZWtHr6+1yTgIYjSnPduhZaaKinJmS/EpENLcUZbjAC3kxR+se9t27gadLl0mNieGciaTIQI/iFaVLXGoxixJQKOAmlib4hHFzR5Hb0k5PFLr6H/AO/a+VN/7ZhT4AW5YZ6q47yxbFWfxNqi7omA6xc5ekf+0fuPa+VgeCG3oeVdF8EQa9HPQYWq9HNfUJdPr7Xmy/EpWJBa7Osn7cq+LulemwdHPna2az6f/vtiZ4ZmesSpmulD59jnuMK3dHIU4kWz8/bHGp1sm/zEGRMPNzMNx7EZaEcc4u3Db0cmTqY3+UADD2wWdgqjWYmHI3tSiajdAlTDzyD8w29K6VzZdwgS5q8ao1k3xeJoOyzBXJZdPeaC8xizHWejfLZxC27lrsghWaaw8Ajm8lUebR/LyvrFMqkFN6GsW8nmBx7SvioYTZhwVTFHLTNijARWfMIbYsChII0XGuLD0WeNW3y6TKfj6YFhUbIVL2A0ZaC4fKAZ7hN2Ji9C52sY/l1iuTGw2w4QDerDFfEIE2SfMbD7PLzXCqNZgpkKf/I37RanzXfzMBFuGs7ICShQfeKM1p9iwZZycU2kxVSQdsCXlt48Y/WAyMGU6x0WU/F03hljFosyVpybutXRMFqFpZuZY/ln/NGdImjypFOO4ttky6KoysNoPsrPzppGagjOJPhQYCDMyjPIFaaoVVABY0A2RZS4C8mCmTkpK26zAdjxUo6zjHOGZMO80jq2Hk0WskmW/daDxbMjA3rFMqQodq3iLclw67ugE7uzB9elq10pcTASWKKNXKamm9ywxmaA+8YMPnFzuI5qYD5xaRnlHapgLlKLOG3AxZkvR/A1x9jmXLo2U6hs84Z3JYk5zmKIPMwR4jSJs090UEfhpZ+OFyrKRUYovBNkyXMtEazm4mOumHc98CXlYEtvEMIOUSl51LzTvCLNaExVba71gcZSau/GOelunlfF2UJ87oqjqw3HkNKbHunYYaXNWjDomM6aEVRXe3lFiUKD7CFlyhRRymdzRRjAs4YKsBE+e/kXxcLB92LYvA7y6oEvLqumAcYjzhXlsGQ4EexOLlUbKTgPDvgsxJrezmAksUHBKXziZMPiJhV1zHvgKooouA4LXimWvrFHUNFuVeuvdC5JlJqhzUOzdDqO5Mp9eAllA34RZl6zdF1DFDc0Zk6dTcxjr53rHXzY694HHtbphdwXAxon0jRPpHVt6R1bRgB84znA8ovq0XXqYtJpk5/L/DSjmjT8446YM44bugMzJx5rHFzatk5xXZ5QroaqwqD7CMqUa5Qwu93fBJY+8xgJLFFHDK8om71eJfkftwTW2KTC7uE2bhiIttiTUwGU1Bjik+ccY4vOEUXT+0Wm0du2KKKDhwjCMOhbdfEySe8KjlcVKPOt/qI4xxza/XouPlj4oORzTcb5f7ewTLlGuUtgPDvgliTW9mMBJYoORL+GFU4NaH1hHN1h6H9YBU1BjKT7hEW6VjPS7dBNr5RWlNkLlDV47Fhugy1164tvo/eCxwEX68YAXDpyIk/FTk1PWHREEm8m9jARBQDor4rLNCptKYlTl74r2+gzp7DNEMzsSTezGAiYffky/hiV8/vH4mUPj/eBIyqvFd1vDGY1RMIAI9YczltSkH1jNUyjtUxxVu3dWsSZvFhprLatGHUnOe4RzrALGmKbooLl2RU6Z7Cn939eQ018BFTpNgNkBF+Z29IkwYqaGJ8gnRNoduttfMOgu2Czm07YnZARPXbypR3Qm4mKG8QVyatNfnC2rQlNeNkT1tC2TWm7gXKZYqAKNCy5biyuFRCtPapFwjFYvoIrpN2KX/cH34WdzRRiYurYwVYqesOPRFZBou3bFsmcBtvixlP5omj3awB41I7a86caKsW20jco2CLI0tZ5cptl0Mux44qUeeb6RbfqQb98SpCYSxCTpdUJFxj+IkA70MaE3ypBWRkkqV71L4Wu3ssj4xwEm4COKknmR9YE2aM/UNnRTCPKCZl6oK02xQi6FaUKS31bIo15GbGTH36dt4uUeYl4e8dsW3HOH6dA1O7nQ/EtS1jGunecwSBRJYwgs19TaaKEXRo08o02jRqdphvWEbaOySPji+OIkHm+8dsCdNF3dH69HMQY0jP0HFk8EqVrrahjtaMm/vL9+2CRLNJs3/xjjHGYuG89CQcDBoCZeowFKo6eVIRJdpV7wMGrqHbfFxB5CPtFIA2djMSXc0UNeYMuRdK+8CbOGbqG3pTMkCtcViwk11GyKzGJJ1mAiYARkw9+vbJ19QrcWsLLGodHoWTtWMyafmIzaN5GOqf5Re0wR1hjT+kWXp6QbNL9sYLGCxoLF6fWOr+sXqYwaMT6Rp/SOsjrBHWCOsEdYI040vpHeMZqGLlURmKT5QHnZz7NnT3gQ912MB+8wugvJR2s61ECk52A7sy+OLmgS5+zUe0zZp7iloS1jW0ew3qvpHVp6R1Mv0jqU9I6lY6r6x1f1jBvWLi4+cabxdNPpHXf6x1w9I61Y61Y61I61I61Ivmj0jrv9YvmNF9s/OM2Uvzvi67sKTdVKRKl4kZqiFlL8ztMETZatBVG0c5TEmdrdQT2jKTtFn1gtsX2yRdVroaewuTDz4V+AfrGS/D2iUnieJrfL2zZGCXRLQ6WJ4CzGii8mM3GY1lREuSuCLTtEiVLcMUqWpqgHxGvtG1MMc0gpvjnUBG6LUs15DOflAtiqrnNw/hpbZzaXlD5ZMHuy/17O0yawVBiTBl5OxlyMLsWizNUq2NDEny9oEnAQBiSaKI51eMfaY5scU26CGuZTQiAy4HhWSO7eY4w6U2/5cDzXwUQFrnTGzjshJUsUVRQdmLuQFF5JixLrxNaIm2BMmi1P/8AGJny+0SvhHtCdTwwtfCeGWdZS+Jdd/AXbAXwBrdoCrcouHB+HlGqrpecfiZnWThduHZxkcprzfM/aBlU3SOgP14J3y+0S/hHtAqcDdAIuZTdvgZ4R9atFWmgnYt8WqXtgNkKi4DgEpcXx8omZQdeavAbPWtcsZ9eKXOc/pF3ZqwxH/LMu8oVRgBTgt6nWE2rcfaNHxGBjMo43RamrQYQzgc5Wh4CzGgEZgznNFEJKXBRBdzRRiY5sXsbKLAlppYsdp7PlBH/AE2+0Sfn9uGidYt6xRgad5YtS2ryauwUb45oFj6CLrA+UaQ9IvCt8o5wFDFUYEbvY83cKxMTaK8HFSjmjGPxM0XkZg4Pw0s5o0/OPxk1c5rpflt7Q6HvCkKXGdLajCAyGqnA8NsZk7xbfOM4NLbbFnKM0+KKqQRu4LEuhmfaKzGJPKtS2oYsvRZn37NfF8wHyvi5XMXo4jrAPOKg1HRzfhMOzkBbMFJObL26zAm5QpEoXgHvRdBI6xrlEc7a4pb3MBVFALu0tlWTDnu8viizpS9aGKy2o2tTjw2Zihl3wWlZQie45iqOw8oKki/Xr6G6LD9Yv17IUlC0+3VFZjk8mstyICTs1turoM91XzMUUM0MiJZUxZlIzHdAmZTR31LqHASxoBFRrNlFhZY0ze52ntZYji5vjWKqhmJ4pcU46YPiEdefQRTjZzeUVs2figzcoa3ZvoIJpyLMlCx3RWksf5Rz0s02i8chXXEQrrgR2Iy5Bu1t0IlTTmajs5JlyaFhiYoOMmbhHVWfiMc9OodiiM5TMPvGLMtFVdgHD+Fkn+4f0j8bPH9sH79uzlBgTcnXnJXdGsRxc2+X9otIwIhZY7155CykxMCXKF334CriqnERmV4ptHkNLJvBu7DRdN7uTdGcpHmOTxTnOXDy5CjKNG3nQBLAC6qcorKIaedXhjOrxYNZjQFUUAuHsBpuTkSpx/KYvkv8SXwOOLEjbyJs846I5AbwPyLGTpbelaRfKyhfkYvaYPOLyG8xF8tYzpR+Ri8OPlGkR8oumj53RdNT1jTX1jSHKK6lFORjZlDFoCykA364owBENPyUUpeyftyEfVW/kGbJvriIzHdNxjSX8saa/ljSU+axphfJY050zcIBmrxMvWWx9IWTJFFH19hodssfc8icmsNXkInjbkMdko/pwXiOcyeU3msX5Mo8rozeNl+TRm5RMHmIzMr9Ujm5kpvpF0kN5OI/lm9RH8rMj+Vnekfy+UD/ABMdVlP5THV5V6NGdx486xVjU8iWgxpU+fInS10Q13IAMqtN8dT/ALR1P+0XSv8AaKWE9KxZkyy7+6I59EmzWvaorTdF+SyT/gIqmTSR5IIuAHsWRlA7ua3IWYb0NzQGQ1U4HgLzDRRFvBBco5GUT9pCDsE6mNg/bkCByJ9NtORImTpRMxlqTaMaD/njCZ+eNBz/AJxUZOpPvGsUlqqjYB7JmyGwcYw8uYKMpoeRzT5vhOEdVKrHPPUbNXIVFvZjQCJUjWovO/sFDhEyU2KMV5CHvrmsOFpjY6htMFmvJv5EiX4UA9n/AIzJxVwM8bRt6IZZlC5x6tTq39i48aE778i3KPmNsc8rI3qI5lXc+gi3NPkNnIlXZks229otlGRUtnSl7fKCsxSrDURTlBUBLHUISfl2IvEv9+xvJNzYqd8NLmiy6mhHQhVFScBHOU4972/b2lTKJQbYdYgnJp6kag90X5Mx+G+P5Sd+WLsmYfFdAOUzlUbEvj+HlAHxa+y25YC5QMG27oMuchRxqPLCS1LMbgBH4jKgOPOiPB/R9nKEB36xDNkjiavhNzRSbLdD7wpw0lozHcKxanUkL72PpHMrV9btj/SVCKiM7JZJ/wABF2SSPyCKIoUbv+yL/8QALhABAAIABAIKAwEBAAMAAAAAAQARITFBUWFxECAwgZGhscHR8EBQ4fFggJCg/9oACAEBAAE/If8A69LI8Hs1oIQ4R/1cvOeQAfKOYd9mZEZHIfzA525/3OVED3GIri6HqqEWU1J55Qq+bB/xSzGx+mrKUAveh7wwYTM8glu2EwDkZdhc5jKCeHjf7sIG+jg0e6Df/DZtWmmLdYvqo4fgC6cUsLg/Mo3RsOcf8IpgO06EajPWXhu4xeqSmD4jqcveV2aBVsSJlkRy5XGDf/BBsAu7K+nUrpU1YvwSmsUgwWp937QUcGo7tfgD5RYf8CopXV2MGCFxRV4TVT9nTepjGxjD8wPSrVvgem7gHxEFfkjD37UiBcHEYn3f8Cba85uxxj/nP0/kYSxDIKMICpxxJSJa6cTE8yJj0MO9K/p8oSJeIczH2jn2rPVsKRghgqjyd79+t0KvPgDWb2MQru8ZgogtmH37xOM+wR3fyAq/HjA5zYRHl8WPFCy+JgxcbXTDkbzCgMlH6Dy7fFN9yYKsegJ+84Fsm1yM4VaHWzyh+mcI8zSCEoRGC4TCmpEYue0S8rrw0AinMxGZzAeUfENPcEXQgCgAyAroPgRz7fW55mrM7n1/dDLPIAIylTXtdo5OLSvFzgw1LkByCg6Hjj4T64dDNcnNh/ISPcDTGIfAScTB9Tp8tM7t8rx3xgwbBP3BsBWq0BFyqKHzpnZc8vppDQgZAV0/5zJFMtqOr0Wwd/UhPlJTMg9Plj8dPkpiXbk+bEYPb9wIe7AzDSKdgNNuQdT6XbpzWM3xcPnoUgyTyenHyrXlGcPJC5xIYpKbxO1Nt9MH8f26l0FrBzqjbReHgQ7KEe7q2hl4yRWTqHSAUooDWNsHIqCK1ov+dPmvSVK7i06HgIGMfF5vQucHh75rE/FHkdztH0PyB+3VpmU+FS//AKh79cS9uLTjecRbape5AFoeXZATM1rXbvj/AMFoXcF8MYATmI8TrLbmcJcM9ziZKfl7MTlYAOOPZpqT8Q+P294/OEXIjGaXB1RqFkKoUHa+IPw7M0dG5D9wQQpvGz87gE5u4sH8MHVqvIYe3Zr/AE2HpX7jADASHeEYmJj0/r211n1MHmwgXsmFvQ9BiwWaBQfuM3FS0EDruCqtqHCV6Kjbj2osiwyHhaw3euATnLLwUPvEU7HHORH0FbqdkQDSLsNHNvi+kwpiaHi4RSouM+0NXxYKA/sk5AFzOZ+yMqgDNYD+dOLoS8mu8H3fuwLWDCnDnecY1C5B7UTTxfDtPOO2dWtt3G0SLhFRy4AKuk/hBZvge0VG/NiZe9WoZRcuy2IWtMtbaf1+bQ5aJia9VPp8pj1XK8MphhOOmINcM3XiZ5sLe+MRacWO5Cxk2BpI5tgLEjIpQlj2SkePxLj2lTworyOMorOrmvfK6ipNFe5wZWkLbq9mVZ+Gnmnl7yoxLQ9eXnOce0fqqNZ51HN0hzOfp/OZ5JNCUdhLIytAC3rhmzIphGHwwTnMY4E8KCHlHIJ3S4qtDaHuYO1obKzcgn1jK0g9U10czsCCbrgw9K7QiWxXO4EJzlx1hYsJq33gtteNOcZZyUsMS40wq+BmpTsnCM3kCf8AOXIU3T/B7oP6VjhKODx/CWURaH7tM5bVzYomj7vaGAxBuefpMYweaPSW85tZJukMCjKOHIL0hxlkOMK+cfwcDOvtDUBXCFITlL3iPCddPMlERNDXiI0C2rQQMqXv90N7uCwemrkzeaRkz/Hj2NRTDnKvhcUCXdtcyXqZC79atF7TK+InFZQ5ss27fqIACOjL14rgPCYmcd9GEayy/wBKesFutqsf0j1geAN3xFf6i0oHz6G2yqXVoscgIu7xXJdvlCvFoZBFpbMr53qSlI4xkR02sYctteZwm9EHdGc1S4iAY+lFoXNymXCq2coHJXAQeinmlfvQ9xgzOEzE2d9SnaGcXI6TOMp4uIUd4VM65yEeWLjoKOq1EsWiYRDjRPl3dfX1YjXZHwweF0dcURyg0AfrUrKxxHv8ISasGp+iJlhg07vaICW3jupRAsLjfOMzcevxANvDglUfzJ3pPl0ZlOJNZBwdI5e7d3zQTJl9fAzmvCNhAsGxAsseUMncWKgYYNOngJwE4TsauZ4Eu3h3wdbRxZ+ZM2y5OqHY3lPhDzi7u1vr7ofoDgB3qboq4UelA+fU+lxmWuJ3qY1runLyQSgrE1IKLWE5pU191VXH4k4kaqrNmMCUgwBFo2xZwHl35Ri0VfByjUeHK9UyBycV1rYgVUCu34gFTZ/v4dV2wi8djkLLOhKDDoOyAILHODlEeiigiDg0dTx/PInizmBxY7J4xU4NfV1frcZ5v1ppWsgQF7DJxeB3JeoPwwfohRcYFTFl7yufeqmYDooaVnHGJLEzxw2mKuQd8bZhwWi5wLijCscEniYbp32vDh+CsDhg6i/3g6u0zOJVmA2mLC57roOyo1mDgzP8AuDg+h4/nNkMLbivglI1VtkPYhQc9zrd9J5ylbPzgMAmCMfWnLmGwlCGMXM7kKyi7uDPofPX5ma3Kemqi0SlhKAoJhnuFiVIucNPmOn4TumrdIIx7TSV4gNP7nDYjntuB2K0W5Ssd4Vzgg65PAygQrSuXOUdjkd2MxLo939vza0C712IrC1o5bUM4jx33r2aJMb4N6EFAIZmnfnMXpiu/YjCwy5kLp5ecTi4DqbMIDcKHky9XbwfmAAC3cv8y5jALUz/AA3JhxurefQzIC1dI1i9T8QsTOZo359lnjp5moeJiXkuMpMUVTtKQhw3DSJcYh8Z9Wbw9/zFRbpGx49M7z4QQDn8m3YJqXoSpBkWLijHFvSf2ZShRLSMQcLigB2TdPfDMX4ZSJW4kwHgNCbgB+HmTyaICqgzYbKo4Ov4jqmGZ2ZM4LHMxhddXHbjBsExHJJVbdy4GR7xlMmrwJ91t/MZRwOGmrxy8ZxiNoZQ64h2FMXkH1YYMYVi+UM0GOodIpJGI5CFeCN9SjSQbgOvw/IQ0V0mkt267VP8zjCX83LtcLZiDTlNLCW08cpawWKWwOqw0v7/ACx9oP5eiwDYMPW5km1dkhKQYK2eQRV0O8iuX5EdVwNRcyXA1YTIH8IVVA3ABcbE/wAWGv4bCnHzIhkvKDUh7NxTifdFZlHEeKD6PB6C+iz6bH+UxL+GO98UMYeBBOI5tQdDPGUB/ghZzOvl25K1PKUkokHhKayx4YIPLFzT3QazRwvLHGLDLEDg8Pj8ksmeCFx1q1c45/gIOePOIWrmJmz92P8AMxTOJb2YvR4orUcnFI3ehPiOh5M0c5xyfrnHSj/zWf5LP8xn+Yze8BmgU7v274fO8gJnjmxjiHf5oZog2CvwaoHOu0N+GCawpTAvxhllcM0xO/OMCtGr4SywBo0dfyNzD8QImnN+dXVr8ZP2wwzEDw+f/PXppgcbxjUfdv5Chuu8gfkle9T9yvMq8es1PDv3oKEGw5EVow/AZEWVTFeH5BQJArs1g8cJxWPZ7fscEc0NWXFHv2H5i4UnMBGp1HMpDvOksOtrXbz6RAGdXTZ3zGFT/R7eP44QnvJEymWZOc+0DIQajGVzn/YKHRWvCHy+HEhXiaYeExZ6Ll7yCVzpEQCwsem+GA7xmFOJ8Xv0OoYjm6Ef6bwmXV7iHQGA2/GNy7kATAPNRr3eMHYh3cBx4xXww+SCjt6X7DjC040weddIiHzDEv1MXoyDG0Mot54GvgQt6NGx0EF14zXb3TlAf3zz8Px3obKNtPdCJZlmh0PP+hHaGXsfsAFs7ES4rJbPiLmGYivPWbMWa0Q5jWZSZCzXRagkUVf1L0ApaL790OYycX/UAAKDCvxidZGLMGd7pbDygB0IcjoBMwiPEwfaUC4FXL9iUvMhzJR+fKfOBLO6hi9UA7cOinALWYwH2ImnuubqwFZ7TQgq1Bw33GWzKxez6fjrmYQ8UC9pbzdLoF9/bkf4hpMH/YJEdtTmdXjLBQ5N3sHsHJj/AAsXwrjSV5uzMnHuyv8ATkR2PdKNseD/AGMALudNWCic8Bv0VWtaeAltpAdNXehl+OGVlfeRYQ/yDAOFsNem/p2RhADszQ9+TKQDYZQi9ZKvos9xTzJFHqnEcLWEGm6vyfjKBUAZr0Gkp6YRrhm5TMlZsUhoSZJ2ep+xAEp2vMi6nIYMJkwV/mFMMmkCpOctd+6MsTmfhfH5gIBADQ/IcoOGDEtPDjMG6XQ1y2lEXIbpSO2guUTgvOdzE+9KWhIrDQiIra9ggKRNZcrgZ7PxBgFuwRXwBp4R6hvgO8PCHiLkc0G8uvfhIM6HqFEAMGlW2CmPQXK9TiGPO3hASCtVylBVOQNJQE4F/KEuYhjoZ8zWJCJwvXwzJnk7WepM17sPaAYI7n2i1qnVVGmgWwh4SuAW5GnUNs+zLntL64BxTFAfcPUXmkua7y5fhVVjLucot9e5aSWCfeHVojgC5Dwiy3hKnlEjKdRIyHnr82Y9vbC8CcnJI6RRZYwVmJcCZfm6nmBFxQ/GsOf3kfPaO8glPUYibN3BHpzKXPY1ZRWGKua3egfhaTUhiXHadNzqEP4oLo/g2jaDgasvqAqgrwnp/nVW9zNb9LSWLDJpwvGHGuTLK6uH1wDfM/EOFvxLe7KHDA2D89LmOlJKxeO0fNE4PxIIAdGsj01awvK1fbqDrwPjh1HbhVSDRND/AFKvGHuW+vQhIqv8lI1wneTzYx8zOuecyk8j6pmz7s/w8MgvfOIeMvqNoiHr1Etr/DHGVtLZi5sSIGiXKfjAcq1fh1NslOSGWHSY+tr3wlU8GvBmB7KaIchB5gTDliZ1ju14ERyrg67kVSDV6rd4/oqI2j9TD7mFRwT+dStXHyT6dR9A9RFQSgTjPJr2eflfRFrfCu9RiHw5Z9B9420/FfZKZ9WZs9gm94h8ccx3TY4GCoJtOjL2tkTOXNekzhz13is+lBEcR0maQu5p0qmDMQq8N+U+3+J9v8RKwR+tpXZnH3JYotMj4ldxjDHAivjUrUfcE8vwlfpBDwbynE+8epThwEbMEiSw1OgbpbViiiCzodStRmDli+p+Ag+UpztHpoWZXPLdQ15A+ADqFNGQ784vI+S6LZ9zSnN7V5VnIdaP1Lk1R4HR8Y3RYnfqYNn7QtRwpxGPzLc5YhwHd1ChoAarACpwNqs38AHC1gkz/odz0mcsQV4jU17+lOzR4RF2tqd3pFtE0J8rP16BODeho5diSsAWAxH1h+CxhFot4HB9nqUTClJkILNfUQH4LuFMyhQZDqCmID8D+1+wSyKaGNkHFxcJmcMtOthEUAtY4LG1f3wgpR+E/XgYZRRtkNHsU5KoM1jPSzg41t+yXtZhk8hmjKSt4kQHFUehiTXn4tXF0eqa1LlbxhGT6Viu9/FX5rwy7pmnLLrr4OitWUxoOW+Yf8dw1U4chlCHy/wHyj/ZhfVK6OBgmUMMnQXWMzZuF8f8k0EmYlxS1t4O3agNBNBX/sZP/HL/2gAMAwEAAgADAAAAEPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPNCPHLAOMPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPBJGHPPPLGNPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPODHYAlPPPPPCPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPMPIPFPPPPPPLFPPPPPPPPPPPPPPPPPPPPPPPPPPPPPNOvR6EYnvPPPPPFPPPPPPPPPPPPPPPPPPPPPPPPPPPPKETiSBAGs+8PPPPONPPPPPPPPPPPPPPPPPPPPPPPPPPPDM/PPrrvTjSXPPPKPPPPPPPPPPPPPPPPPPPPPPPPPPPPEdPLhBvPPvCnPPPKPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP/PPPPPPPIvPPPOPPPPPPPPPPPPPPPPPPPPPPPPPPPPOCdPPPPLGWDPPPPC4Sk/PPPPPPPPPPPPPPPPPPPPPPPy7JHXN/vPIPPPPPGclPYwUOPPPPPPPPPPPPPPPPPPOAlcrX4jYCt9j6kpjOcPfYpLrzwdPPPPPPPPPPPPPPPPFm9ycCZQ3Po/b/rPXvy/eSp/vvm0fPPPPPPPPPPPPPPJdPvXqtV63d/8A777777pf6yF/77L/AE888888888888884U2++J8ak28u+++++++ryOv++++elO88888888888888Xl+++taYej+1I3w3+zINfDe++++MAcU888888888888oq++++++N9Uv999dBxZsmdd++++++uHU888888888888k5+++++++++++++++++++++++/wDffpYvHPPPPPPPPPPOMpfvvvvvvvvvvvvvvvvvvvvvvJ7Nfk2dPPPPPPPPPPODBuPvvvvPPvvvvvvvvvvvvvvvviyc+3pHPPPPPPPPPPKNEGOeybPWffvvvvvvvvvddf8A7776owaCTzzzzzzzzzzyzzS6WuZzArnT77777777ZCCPz76bgQpzzzzzzzzzzzzzzwxCMyIobTHnvvHLHb57hQRw/wDbzpUE88888888888888888sUYie0UcMPMPtdK4oIQUodWZN8M88888888888888888s4s4c8Y888888840skc8gU88888888888888888888888cgcwQ8888888884YMcUI888888888888888888888888888c888888888888I8Uc888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888++++888888888888888888888888888888888888888+6A8++88888888888888888888888888888888888888uAM+++8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888/8QAIxEBAAICAQUBAQADAAAAAAAAAQARITFBECBAUWEwUHGAkP/aAAgBAwEBPxD/AIRJpAFvTI/yeKZjfBL3Uwkf42kgQF1Ll+ohymjH+KCQutRYjMHNY6lZiJv+GbBDBXSrKmSFdQIlldNApJdx/CVDqixg4Jbt7Tt/My3D+HmKgCzuQcui32heCD3VQ64iqfIUMsRThAM5brLdkIzBHXYEV9yBAC3L2QcVzYPFAXDvBBAwyuJaBAqagCLglqF3ZUteGZf2nPU+UH4YLymkii89hvUnWM4egpqIUtkvy8IBaPQahDL0lgrA1MNp1lUcLcEuGS3H0T5w9c+Uo6G56mT6dAsRUh2oMUweAAtjumuhFcMGycuEFxXAzKFkeZf/AIbdHf8Ali0WwKocR+yF6gS7uX2ceBe4uwK/INri7qiOJRSAE/HfGGfuE2jugI1fuJgAE/fHnPaj+RBlhwVE7JQyWp2RPMEgaRoF4T54jwiPGBQWgEvcsD3WKFiD2P3sB3imp9oHpn2QGAoA5n2h099k+3Qirll97jUACj97l5CukuLqK66Mi/AVryLEzWqA7OILUShg/dBD5G01MQJ0Tz/R4OYMMZoRCo9nYBB1VFG0j+QLgmmJlmFYPakFTCNQqngrW5vGa12+on8aAQWg6hUIrTropXQjVh4Z3IGT3Dei8olzEuInuE+J8Z8oJahh97TYYlNR0cpd6/g0SnqU9d67aT4Q2h/uJ//EACoRAQACAQIGAgEDBQAAAAAAAAEAESExQRAgMEBRYVBxoWCAgZCRscHh/9oACAECAQE/EP6EQG4SpwwPxO+aJei3KFmLW+H1tmAgqGRmOGHEaTUQ0+Ggttw0kI8JoTME0Jd/B3DEVvB2shkbxLmLqipvhiljCu3+CNslVwIsdeVZHwf87z08HBXwS0WzPmYip5TWARIpYSq5VAtiNrvqWAp9wBas7hFRHg6BhEb1Y5yZjKKNTkYlOZ41BLNV4+Yt8NqN4jsTQnavINtrGyH1MfUhN5KmQFMoK4AxNcRPmVgmziWSnmeyagxCjERx+R4ldjVh2iq0+uCDrDcFMq3ZHgWJ14f3Ul7IZqi66ioGuJoWWiRVRpLeZbzLeZbzLeFSwTdn+OAsssOg+3yzG3I7URl2CuiAbdeJ/KYr0jZh2ihkmIj4IPgdDVNP84TO1mQ1tX/XLoHuF6lFG/XMwhvvIjDeE9RBK5hlaR+ZRD0dZChG0Wo5fj/vNAfvqxMxkzdyy3rnc2lUVyCZ1lRFstS4HeWxF8E4ntHwz1T1T1T0QXaJGJkIeW3OgoUJ+T1CAtuvW3zz1FNpbtwl8KxbHpnpnonqgW00IgBp0AS4yt69R3AC2ZKuG2cK6d+uawUHruGbsFiFC102iINFwAuW0HWNYqE7gpmSGvG0Co+phTlmvYYByQC1C7UW0Kircbjc2gemoZYlSxSoAWPKRVzI2Y1yV2ALpKlMTCq65BrJPIR0hDGWXwYw4lyOKANkOq432TQLxlPM9ebsiNZuEF0gTee6UiCI/rlYqmuSG2EMPwFpbzPdPbL5bglDFt/2yKZUr9P/AP/EAC4QAQABAwMCBAcAAwADAAAAAAERACExQVFhcYEQkaGxIDBAUMHR8GDh8YCQoP/aAAgBAQABPxD/AOvRCJc1jtSvWLYqA9YZPookr9h9LD3U74PJ8yj18h7qnbOF/wACh6eype9jyo8f6o0Hurix5L0D6qwEWKncqT/CYGlkfkwHUl5op2B4UntOo+HLIdxgO89KMxllKbhgdilkv8RUt63Y2yvWM96GSEmXmhLyKPEoMcy6XeYWgEn+DJ7QIIvYOXgplYKqxTeXWtZfd0pXdrPjFvkzQ3qR4UYnrsNuxKUD0bw/xctzUn+BvjK1ABKvFJ4rczwg3RN8DFSPwu/gJdbEXIZ4lpSjPypoOeoQnDucNmk15YFpiU2epjbYN2xv/gSakgMsM7wOlKxdqKjihRh8CghEgHFofeh6xxA2A4uPzBpRGEcUXB0Uu1s7rgFnW92W5/wEtD1AaINS6Js70bFMVLWFkEbTDSJv9CzMAYtq0RyY+mT6qnVukUkgssMJdzFN2tKJjMb+G3pT8CGOwpnopz8xwzQzbDsOLtwXnUNy46f4A4aylBituLAUrUya49ugDmKDl8kAEAS7FWMMKUPKmvUEw/iCkEOlFQXoyTeVOqFBEzCdiD5irV1+aTN8MJkR0RoYMCwOCGmrZnSPvyxQ19IVLxhXXSgm0BuliDK0Cxgmo/yYhouV75gwTF4orslEe+7SbQIoVLQeVrB1Iox02tn2jYl2YcYqyeV7IoO3rNEFi7GyOr03qAgA621ede9LmHm6KcvzgISeaJDqRJyFBPmtKiRPvbilNsT2Bt3Ypk3VQYluDfeV7U9TCg5JdhwdikAewCWvvnL/AMqGWfI4zKyll1xUpKRZAWsQMHB6VCC+QmS49m48lPxJuoQumMRlbHFW9BfI4YneR6JQ+3QIBwFRUxuFnpWb5ww0MAHT5PYHcn/X70rMKUFlXasb2MesUtd0m2lXM9yS4VvLgloSVTZc5Bl8+1HtmDugCx4C6UItHKvGEbjxSzehOqEaMudZT0Km4PamHcdQTvSTFhuEkOpJ0KGfDUbvahB8vz2cgazA53gGe1EwkSR+8PK8eAuquCmbbyyxyLoaaZqDUibB0hq42Gs6WAMBANgKCKvU3oZTFx/FNXRFKjKr1adqhGd5o2rPQXE7JTO3w3AvcVEeChnAn0pyHK/PUbUuKRKys7Xrd3+8HkGeyexMS6xG7UpxB7CX53IOi7UIKav4TkJmzHXT4JSSZGCidYfJT2pDaM8B4qiST/Rv4oXaAs2Gp7FcPOF5pSSEEsjaKRH5ZUgSDNiR6/dw2CjtAJWrCES6SEux5VFME8APx8IxoUqTFiab2EK6KLiQaVOAKkgLDMWW7LzytNH18t8SywLEnaKiLZrSryoXumB3bUhveMmYv63zgDpRuauxKbpd/tqCJjLnmpXhAWXSKw9eaD4ZBzbJt7U/KKP+s9QHu+7s7gJTF1j1aDFYvRYj6loxR4vgBgIIWiIn8uaFs+TB4gQ85qHF3U+E2o+GKiKgkpuCgZ3wLdYdKKKIiZPlFJhm2H7uhBKdnBehTMQEbsseQ0fDGaWg7VJuZAQiSoViQRO9FBBNiZ70Z+SWopZoywEgedPyShgXA7KT3fdwgkXrkPzTp8NZFPSawJ+FMZMjQgmAFGKj5SsWpwUKTd2P4j5RQkWfSD7+j7wA4xh3vZB7IpesT290Se9GPig+XMb1JWdtxD8oFmgRv+q4nZDt94NnpyS2/TJOnNFzNIzYhOxhO4aXqxjHzUIkEsE/AghrAtZW2oc9Gpr6/KLiNWN0+Q+lA0KBgAgPvBXgk83K2Kby0rCK2RIcO0UIYZkRG7LgfPX5jUGImwJh1EqdikBFBpSGQxpJxMUCja69QUdgoW5Nxk7r2psylJVWnyRLT/aMhZlYAA45U4fJEzesI5Jq+GbTqdhFSLg4D80qc2tU8oEOi0bnuGaJslzufcrlfkQB1qXtwazwJA83SgNghQHbAO5zTGQUaHy9AjrWMMPQYt5wj6jSiDQ7EJf8mR0vR8qYrFdBpLfNQyONiJllpOJ0qC4kEwQBWILSyxlq8I5hBtsc6tApZe5PRBRpc7IfOaOKJZzdhyetBbuY3kqiyJqY0p67BLjCluTnDp9vCVqml3abEBYZN+bfyUicOQSPTB2KlYuuf9LgKPzYQk25lf7owp4ovNB3Z4pphuztoCz3vUhUykaImKKC6RwOBnqX4aFM0lg4T5LWQBR6APesPllYTSmFaKyPyL0zUkqz3fOXbFF3jE0IBoQf6zps1EuE8WYNJHXZTWsZUan66nD+Ibim4nUV56gqxgDdy1Sb/aFigN8bhixMECdXN4mKNSJXQDBY91eogkNkkvX24oIiCYLNg2C73rcrdzLmoh8LmCL3yOM75ir5aoVlZtyO6m96DEZu+QAHzWnS7EW81PSlqLVnJw2XFkOulRAQbckI9uK2jwajyr9k0EkJkvwyDwx8bUoIs7BEfzrT8sTT0CorK0be13Q7UTfIJY35Vby7/E9Q1jCL9h6xScN8gUwT2ZoJCNLnuNPecIvYpQg6r0SaLcJCw9lLPRoUuoYB1JXkdahbs9n8Zg1k1J9lQDW+reylmPTJkwS1O1okk9P0PQoyeZYX+X8UgELcZjKkt9BaLWHMeqkMcDEM6fm9So0LYOa4vLgxZWZKAVgWA0DFTpfqYQqb3ZsVzJjk7TjtFQM18y03z5OSnVfwXLimULjfEa0lj4c4dBxRkNop5lIwiDKA0NblGmm6yh+z6U6Q7CM6wKbKMCHyaBiEZxFTeHO1TUkXvSUsdF4eFq8FRJYOA6jp4Q/BFFRUtqQTlzYEFESmJW0zDDWN6TZK6usY5aLKDOusnVfiJKm1EBRYcGSDqvOr+ijeWDqrlf2LUYoKc1bTshI1PKoxYHnDyilCJxdFGqF+qY5qBawAhmJ2TfZrQ5pRo8P2NY2q66Wsoxy7aulXtQ+X/bsewUIkOdVqu7RQAN6m6AHu04/KX82KalS2bjSHQPlQ04gwAgA7USFYFpGvShwpUcAMRlO+fKiKRlTyNygozoNU2G1WDMMGMFhff0R6UgEYRLkZqGHijZyx+acnvQxOWOL1LxfR96WqBLfe4qdCsYb1okIN196m37r/AFQUH9BkqaqOBobADHFc3yoyRuVqb9qr351GC0dT9FHgV3fdThEupfiainiF90VwOijpH+6HMzouMYf69KUcxAmB0M9V+KMVPz+EpseB83pWMgBXXXq+3XwMfCIgUQjea1EmNhtn9fLajm47X0k85wetDRA5IhI/YVgmmomICJY5dmsbZadzWu/LlYscUEHADV3eefF5eDuGH4o1WfJYUaMxeqX4WsqR8CMukN/FSXQP5v3RbrSCBIQjqUhiiNocdGad9yoWS+9AINI66PrV4FIdZH4a0/skbKZe9J5o4aN3mjoL8yVqHNDNOwP6aLYpByTX/Jr/AJJX/FK7FFsWqXdpvUG1aRp4qGkuhGfSaFQIQ8tjsvl8RMLPDdPc6edJEtQOM7WXtWH+qD4WtKQc0UJJa7JpHiIfPeoGssixOS64cjq0pB+wYc9QCvZtg1eKUPl6ct7xlwH4LEjvIyrdcr/Wo8XZ5e6iekh4C+9TSQzE5peZo/gHpEJEdqmS1Lonq0kIEyoZ1qA76mTsxSE0LNjaU5G8LHO7T5kZidiBE5T6u1RawhkpcXO+lC5ryP4RSYxIg30Kuoq5ManQMUYWKAU/OkjDLuRTyFnI7Afy+EDISz1mMB/ypt8eiRv+goCEIL911eaPkRQVhIEkTpR0D/oTPkSHpTfSh0PYkdvrzIItEpicwZtljuSJW5KC++gG2xUf++6lqnVaMUU4oxXqXuq6omwETLTNvwehzSPY1QdovlbXOmElM0ITcPR1lzz0TY3IF5VHHLjfJVI8qKZMwLhMCS3tQ0ujmIgBtAQtRxDK1QU7A35KlmUYi9um7UKgwXIdCodvALq0XmrBkE8WlDB9A+ijI6KHxUiEAZMwDq1OI5/NAnAXfNoxRcK+5040p+WHyxArep61Mmt6cNnunX64HpkIh6u0hL+Uog4GT2BgwHQoJJBMV9RaCoPBxRikI1nyH+1ZH/M380V8UCRG0JSbhQjdrrlDvcb7IEfSYMSDE3bm9DEXkwQgbSxWuKikLRRFETS6LpbSoIME6GDGCfKNqBlBrMt4C0u/BtVrSoKkT0onu8z9qTBDQt0FR9BNqj2oZ5WungjMekCocaqTrApqp/FFgwXB6zbfeij4yZABKuhvQYnoLvToVAL9SdYhbU2XNgg9Ayc/9oTUlQXlse1TnI00YA/W7/VkMrG4raKW8VhwqDglV5WiAMVX2Dg0+NiS5nlBPZq9U2vhQ9ZqDgJSZ57Nh36jjBSTOT9zpO9XYu7MJAOAUiKKCRNy14w0azLS31vcoSWnJZ4m2pTViPveAlvd5oj5fLaS1LJlWjwn6C3pVHoQh6qKdKRaAGVqEygqCO8mzQ70qaGTEIfxtQVFBHxsZBQ8AvRasz0yUsBwuvYKRyOQkYREbcU2xBDEaRxcTvVjty8iLT2Q7VIu1k7X6yJ0AEq6FRpuqyYOjpwl1qJWbnKgnDd/1Tdo+KGxOX7BH0WgQ02EWmEkskt+adRFHJJMsuqvBUsrVF3Ylyq53aiRFRfUT1g606LELJHtTChfUYdsVkWP5tTZWEqvLHpUrMmByfupSZSesX+js6DRk3SgSglRgArMHYEFocI79KUrcFhWbI2286n5T22BxMoA7xHepSMJxNkXcPNomIKUSPSlAoRHSudV8lAfHYgE+c0xixZ+spm7pFys50uBxwp1atILSW6xWBHyALFidRIT1pOMzFJGy0T1obU2QJw2eY1Ja8symQ3An+irMYtCGC/nUm6V+yraPg0gRcJ5GT3oNZb6Nz3+F+Xp4Zr1/wBqAKViwCZpgfwPJ87cPOmiIsDdmo9mvTIRQfJaSRq9YnOLcbccUnISDT2kvJRAix65aVaksOblhleXNGdkA+1nST6pw0YjiFhNp1k71i10oiXV7q03o+Q2GJCJM1Jw2ZJ+WPSgpHoF6hKcQ3wKO8UMG6hDuTTFC7IeTSVneYfelrt6/rqI+qwEe3WhXiJJMbUann/3RWVn8a0W5d6XbqwfinNzt/rScN5D+qhgG8H80T5+n2q/7n6qBkPhL8V/S/qv6v0r+j9KAZen6KYi/k/VQzPwfopFNNgnvUEF39sDT3kQqK96mDbeVioOEhm86ZaAAAgKPlNFaetciAQ1GBapBCPzPlRwBGndEvYfahY0wBb4NORCEKhqwdka792mpneSL3MXveBH6ie+fRln/CnrNsdEt8ytKj5mKBn/AFWEnQmp8XdD7UA3zd/xSmVHf/VQXoiUpcOhPzS8odB/NYDkfs1oV0/YoG+dSmSB5V+KUeXr7JU9PM0QesX7pNfXqlx3aHS/k4on/k8qJ/QUIjsyfzSSQRrFEVLmbh71HTGsBPkFPmwIv1NRenRD0qKigj50pZ7UhU85fKh2ZDUKYO+PKpX8haxc7+gVPmgCnSxdkqCpf2BMrqRHanxIgClh3n6g5aAnP4RaiLN85UD80Yv9bBqKjisYox4I8Iox9EOa8bMGVOm+i0SYOdLIZ7exQcRVtcUlIJChv+iKnnTu+oELEfKtHnRJmndhX3Kn7vjNQgTumX6dq9lColO2O3gpzMCAJVelTbyEYkD5Qves4InGAS9bvf6deaOamIIAhbJbON634X84elEt9w2C4SV2DWnmHYEqeSFGB9kHzijVlIMPZeSjxOeiDdLPP0mpTZ7KyGx3lFtYa08J6BBUucW0o7HNM3sWbszEPkH6dNfUMB++NaBVVBoVyVwdkZvNQ4ChABIpp0q1sSfOr+fuBPmnYASvlVjMcwjY7avDQvPBNBYwBLdZaQRgZSp0k06R3p0EAmRok5Ew9GhsnG1HXwVBTNNHGZZCx2L96gt4RcEh93eoouh8V4OosHer3oUjLBtgHYK0Db1AjzcvP0zHlmgRKroBRhj2QVgIylsOBtq1cxWW8vY0T1BaZc14/kOtcbv0fcNY7DaL+k0UoIpO/wDBNGPAvwBgRMEL5PlT8lSBOwR4NZD+gXqZclmb8rp7FGNDKQAQHlW9D5XcAJLu7u8VOzIFSLsmdbOjqoIx9K4aZuUdXLWbnLoaNJbYArfmNw4ml10KkTTDFQSSUw9n3CcfO6EhKIfSOJfcWTlpNJiDQ6wrD14pxAyhOxxY71JBFOwPSdgle9FRAzzz3zUzUGJpE3B+32aUzDILwI8V4OzQYqPqTlQ6vgM9YojFvSS+RO77xLpRtBAGAMH0zCwcmxq1Ju0Ty0JdIeVGiGewQehTek4mm1CDrZdyvLCkbD0jz+4OKGCac1/JxSYJNke8I92nuwKbxJ0bYp4yJVOAnA/XgKxRmgZoxCrWhgfvvQvAVp1O43pe0mYA1WhQfIw3WmcTKtp2KtXu5LEFNhEBocr9P6wHBRKcvMdUi9b9qCx4EJXdQFqTueoUC0oehHGgpS9JZRx5B+FUe6ArG9x/0PQpOkaDvutbY9P1UI3qIvRomWNwe3eiqVofZ9RNTU/MZ0o4xvmzd+/OpxlhdiUUcHFTN9JrC2B1DP8AyjfhTZcy+UiOJ3ovV6dZRnLs5eXioWkEm944HAdhdaEA+n9HjxB961ROjAUzey35oUpWZA+HWh2wrYCWBriJyc1GuZiw2mBIY870zGiLk3k07ViMGAfKijU48mSzWMvE0tx3LwcGlYHjNDDR45mVuCYabhjCaLc8uKPpJoyjSiAqdk5iCjzLU0IR1AfWojukg7SVHDvYPVSKyNKUj3KPlQNFf89PXWXAHv01ESCwxh2OKgmJJiyc6b6zFEQgFgEBV3F2YaumXnBrTQnoks1s1qp5iVD4WaACAOAPqM1ppFYcYsAXAY7anqRSdzC1llcY4oeQ5AdvU5KbeGRapR64eaxv+ObexXeiPWj62RZTzMNKZWD2hIJ7UuZUqsr1pprT4Cl6pIGEpwSFNhpz1Nf90Y+izz3ijNHCgv2y+1Gy3fB6YFJdalippXenLheMn1VmmSRCg6k4fSiAoRuJ8X4zS7fQCkolkRPNn0p4m51jtgKekIS4TvGDlpmlgKT1ZehzmgAABAFjFNfVHAGq6FQRkMyiY7lZetFvnihcxN4LAW9Wj6mFmKkVv7ZUdLqzzUn3RhbKbnmG9M2laMzszQtuc76CtHlQMaSgIl8+hv6VHiM0+LSyy9KIIWQYJODilqfBWPBCpLVYHLUyDH/OE9ailPEXQRYeGGkjwmmKnhGO3ck70UUCjOWp2ZO1T9C8uFEw7zYc69Mypc0tT8JClMPlpVofy1CLZHkZ+BpNIedkNU3bcUvm1m6GiCCpIQpAB6z6UNVMwB3CfKlFX4DpAec0JEsAm3goqKweYMNhA6m7xG9KA37lGt2+DiXUoII+sQ6V0IbfupNoEESXgawSGpJdgrjGMLi3k1ONNK3aeK+zzTfAYDgg830qFPgIloKxmToFO4uGnUJq0GmlPQBeBMlGhIPlWq7ltMJz4jagwxnBQvHRHzqIonDn58boDq2PYY78UpLs+ITR1AwCVpOEtk91R4qGadoHKss0R2x0TxZlETpNMbKi5M22su00WtbAIbkVZcAnYrG1RHhjNqL7iKHQ6nc0NYKdDCy9y99KPkCJYEB5fXwIoLAK9KuC7tknpNZqWJlN7sd4qAqCnBPN6XgZKUIQNsgT4DlC49YCjzTy8SrkQJwApKblMoFkCOwihVBHSj0NEANxT6RWCfmQfVqyf4/cFZdOQelFn+LaTTwKfwQKZjpX7qHw/wDG9FT0gtDFm7KA4R6XrNYzSxU6vXIl6sdvEJQMtSXORF18t9h2qFm7xK7wS+1Z2rGHk1FoEDZ/0nybUnijTHcCz6NMQqR18S8GcwDqd05jP4PizdfbelRC+llZmrlE4FNjsBT1o8csV9ZpIYTI16XpUjfEknmTjIHO8It0w3zhdOv2GKYsFK4iC6gP4pZ8CZIzRJHTIQfNVMk+IlMVTc193xFCYuK9SqFceSElKyhut5pU3KufzaoSzZD1nrTxE0k/Mir82Y/qKkQ/C+9pU+FGsX0Kk5eNPYqzJ1YD+aPmD/JFLwYaH4ysMJsfrptXgRfinZcGpi86Szl3KvM0+FwphgFHIBXnboFOfAmwUKwmtF9EM2d/QnjAJpRGosqwBMS5qW2uW2tfAip/CkzPrM8rPSiBslKAnLAAvltVhbrGHVMG+q9Kmi26PxXOAye1BoA5CKhQBj7HPaiIuXVdCROopPGJKF6F1uog9o1qVP6ZEwz4LL4lGNOrpUP/AJy+svK57VPgVlzcDQWP4t8MVFR4R4R4GPFD4bdhA+dZVp4NMyAo7TWmxCPg994inqeIxU28RKVhggWjBWLH+N5pRsRsL9UlJu34sUMOMQfmj0oyEaLygqKPs8qSDCYr9gD2oWjzRAY8tuPEYpQYKBu2cdkpcBhkMneKE0VDStwWnnNLbxXnnGIgDqtJpNMW+85joH0AXgqNRyVODKDqoT3ifHBTZiYpIEC1gEzvO3jCoC+uhYG27Si1zyjK+vipAqsAa1M5J02RH1+3k70XyCwZkZNo2ukZ+QGR0xNNGYsCC7N0Y4S6kBH0GFqdPlyWABPJ5j8FkUHrtk9ZIShs4uvXCX7RT+Pks3uVv6VbrBqbQH3b+ILim5NAwOIPWCNpoID7eCDhpySzoTq2Ba4Oba24tLB1G9RUfA8fJcjYChlBbcjEjY63hsS6UMBAYPoigtCTXSeG48LS0SZ4PfrrUfBPwCo+TKGADVWhY0qjCYHUC7yv3GKMhlgXWzc6YqVJ1XE2vD1gommWD75jQRSPQ84oLvYGeYfepV9FhzaQA8w1Nl5nN9LKTGCDigBx9Gg0cC5iAjKabLMdKaGkRSbPI6JZpEyfEen6tbABlqHxCt5BldJz2LatCPukXqL1H07SJPaNZbNzpjcam9FbYNjUOstqMNmPwQVKgvQFlsPHYFp1fXQu4GO6UissIVto4GbAd6CP8Qgoi/QME2RpS+3VM94osIGRW9ygylAcHYqDb/02Pif4nPwH+IuKTqU/Af4m+Ef+DH//2Q==\"," - + " \"frontPhoto\":" - + " \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQ....\"," - + " \"backendPhoto\":" - + " \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQ....\"}"; - SubmitKYCReq obj = mapper.readValue(data, SubmitKYCReq.class); - } - - /** submitKYC Response Submit KYC /api/kyc/ndBroker/proxyClient/submit */ - public static void testSubmitKYCResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":null}"; - RestResponse resp = - mapper.readValue(data, new TypeReference>() {}); - } - - /** getKYCStatus Request Get KYC Status /api/kyc/ndBroker/proxyClient/status/list */ - public static void testGetKYCStatusRequest() throws Exception { - String data = "{\"clientUids\": \"226383154\"}"; - GetKYCStatusReq obj = mapper.readValue(data, GetKYCStatusReq.class); - } - - /** getKYCStatus Response Get KYC Status /api/kyc/ndBroker/proxyClient/status/list */ - public static void testGetKYCStatusResponse() throws Exception { - String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"clientUid\": 226383154,\n" - + " \"status\": \"PROCESS\",\n" - + " \"rejectReason\": null\n" - + " }\n" - + " ]\n" - + "}"; - RestResponse resp = - mapper.readValue(data, new TypeReference>() {}); - } - - /** getKYCStatusList Request Get KYC Status List /api/kyc/ndBroker/proxyClient/status/page */ - public static void testGetKYCStatusListRequest() throws Exception { - String data = "{\"pageNumber\": 1, \"pageSize\": 100}"; - GetKYCStatusListReq obj = mapper.readValue(data, GetKYCStatusListReq.class); - } - - /** getKYCStatusList Response Get KYC Status List /api/kyc/ndBroker/proxyClient/status/page */ - public static void testGetKYCStatusListResponse() throws Exception { - String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"currentPage\": 1,\n" - + " \"pageSize\": 100,\n" - + " \"totalNum\": 9,\n" - + " \"totalPage\": 1,\n" - + " \"items\": [\n" - + " {\n" - + " \"clientUid\": 226383154,\n" - + " \"status\": \"PROCESS\",\n" - + " \"rejectReason\": null\n" - + " },\n" - + " {\n" - + " \"clientUid\": 232772137,\n" - + " \"status\": \"REJECT\",\n" - + " \"rejectReason\": \"frontPhoto:Picture is not" - + " clear/covered/incomplete\"\n" - + " }\n" - + " ]\n" - + " }\n" - + "}"; - RestResponse resp = - mapper.readValue(data, new TypeReference>() {}); - } - - /** getBrokerInfo Request Get Broker Info /api/v1/broker/nd/info */ - public static void testGetBrokerInfoRequest() throws Exception { - String data = "{\"begin\": \"20240510\", \"end\": \"20241010\", \"tradeType\": \"1\"}"; - GetBrokerInfoReq obj = mapper.readValue(data, GetBrokerInfoReq.class); - } - - /** getBrokerInfo Response Get Broker Info /api/v1/broker/nd/info */ - public static void testGetBrokerInfoResponse() throws Exception { - String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"accountSize\": 0,\n" - + " \"maxAccountSize\": null,\n" - + " \"level\": 0\n" - + " }\n" - + "}"; - RestResponse resp = - mapper.readValue(data, new TypeReference>() {}); - } - - /** addSubAccount Request Add sub-account /api/v1/broker/nd/account */ - public static void testAddSubAccountRequest() throws Exception { - String data = "{\"accountName\": \"Account1\"}"; - AddSubAccountReq obj = mapper.readValue(data, AddSubAccountReq.class); - } - - /** addSubAccount Response Add sub-account /api/v1/broker/nd/account */ - public static void testAddSubAccountResponse() throws Exception { - String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"accountName\": \"Account15\",\n" - + " \"uid\": \"226383154\",\n" - + " \"createdAt\": 1729819381908,\n" - + " \"level\": 0\n" - + " }\n" - + "}"; - RestResponse resp = - mapper.readValue(data, new TypeReference>() {}); - } - - /** getSubAccount Request Get sub-account /api/v1/broker/nd/account */ - public static void testGetSubAccountRequest() throws Exception { - String data = "{\"uid\": \"226383154\", \"currentPage\": 1, \"pageSize\": 20}"; - GetSubAccountReq obj = mapper.readValue(data, GetSubAccountReq.class); - } - - /** getSubAccount Response Get sub-account /api/v1/broker/nd/account */ - public static void testGetSubAccountResponse() throws Exception { - String 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" - + "}"; - RestResponse resp = - mapper.readValue(data, new TypeReference>() {}); - } - - /** addSubAccountApi Request Add sub-account API /api/v1/broker/nd/account/apikey */ - public static void testAddSubAccountApiRequest() throws Exception { - String data = - "{\"uid\": \"226383154\", \"passphrase\": \"11223344\", \"ipWhitelist\": [\"127.0.0.1\"," - + " \"123.123.123.123\"], \"permissions\": [\"general\", \"spot\"], \"label\": \"This" - + " is remarks\"}"; - AddSubAccountApiReq obj = mapper.readValue(data, AddSubAccountApiReq.class); - } - - /** addSubAccountApi Response Add sub-account API /api/v1/broker/nd/account/apikey */ - public static void testAddSubAccountApiResponse() throws Exception { - String 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" - + "}"; - RestResponse resp = - mapper.readValue(data, new TypeReference>() {}); - } - - /** getSubAccountAPI Request Get sub-account API /api/v1/broker/nd/account/apikey */ - public static void testGetSubAccountAPIRequest() throws Exception { - String data = "{\"uid\": \"226383154\", \"apiKey\": \"671afb36cee20f00015cfaf1\"}"; - GetSubAccountAPIReq obj = mapper.readValue(data, GetSubAccountAPIReq.class); - } - - /** getSubAccountAPI Response Get sub-account API /api/v1/broker/nd/account/apikey */ - public static void testGetSubAccountAPIResponse() throws Exception { - String 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" - + "}"; - RestResponse resp = - mapper.readValue(data, new TypeReference>() {}); - } - - /** modifySubAccountApi Request Modify sub-account API /api/v1/broker/nd/account/update-apikey */ - public static void testModifySubAccountApiRequest() throws Exception { - String data = - "{\"uid\": \"226383154\", \"apiKey\": \"671afb36cee20f00015cfaf1\", \"ipWhitelist\":" - + " [\"127.0.0.1\", \"123.123.123.123\"], \"permissions\": [\"general\", \"spot\"]," - + " \"label\": \"This is remarks\"}"; - ModifySubAccountApiReq obj = mapper.readValue(data, ModifySubAccountApiReq.class); - } - - /** modifySubAccountApi Response Modify sub-account API /api/v1/broker/nd/account/update-apikey */ - public static void testModifySubAccountApiResponse() throws Exception { - String 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" - + "}"; - RestResponse resp = - mapper.readValue(data, new TypeReference>() {}); - } - - /** deleteSubAccountAPI Request Delete sub-account API /api/v1/broker/nd/account/apikey */ - public static void testDeleteSubAccountAPIRequest() throws Exception { - String data = "{\"uid\": \"226383154\", \"apiKey\": \"671afb36cee20f00015cfaf1\"}"; - DeleteSubAccountAPIReq obj = mapper.readValue(data, DeleteSubAccountAPIReq.class); - } - - /** deleteSubAccountAPI Response Delete sub-account API /api/v1/broker/nd/account/apikey */ - public static void testDeleteSubAccountAPIResponse() throws Exception { - String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; - RestResponse resp = - mapper.readValue(data, new TypeReference>() {}); - } - - /** transfer Request Transfer /api/v1/broker/nd/transfer */ - public static void testTransferRequest() throws Exception { - String data = - "{\"currency\": \"USDT\", \"amount\": \"1\", \"clientOid\":" - + " \"e6c24d23-6bc2-401b-bf9e-55e2daddfbc1\", \"direction\": \"OUT\", \"accountType\":" - + " \"MAIN\", \"specialUid\": \"226383154\", \"specialAccountType\": \"MAIN\"}"; - TransferReq obj = mapper.readValue(data, TransferReq.class); - } - - /** transfer Response Transfer /api/v1/broker/nd/transfer */ - public static void testTransferResponse() throws Exception { - String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"671b4600c1e3dd000726866d\"\n" - + " }\n" - + "}"; - RestResponse resp = - mapper.readValue(data, new TypeReference>() {}); - } - - /** getTransferHistory Request Get Transfer History /api/v3/broker/nd/transfer/detail */ - public static void testGetTransferHistoryRequest() throws Exception { - String data = "{\"orderId\": \"671b4600c1e3dd000726866d\"}"; - GetTransferHistoryReq obj = mapper.readValue(data, GetTransferHistoryReq.class); - } - - /** getTransferHistory Response Get Transfer History /api/v3/broker/nd/transfer/detail */ - public static void testGetTransferHistoryResponse() throws Exception { - String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"671b4600c1e3dd000726866d\",\n" - + " \"currency\": \"USDT\",\n" - + " \"amount\": \"1\",\n" - + " \"fromUid\": 165111215,\n" - + " \"fromAccountType\": \"MAIN\",\n" - + " \"fromAccountTag\": \"DEFAULT\",\n" - + " \"toUid\": 226383154,\n" - + " \"toAccountType\": \"MAIN\",\n" - + " \"toAccountTag\": \"DEFAULT\",\n" - + " \"status\": \"SUCCESS\",\n" - + " \"reason\": null,\n" - + " \"createdAt\": 1729840640000\n" - + " }\n" - + "}"; - RestResponse resp = - mapper.readValue(data, new TypeReference>() {}); - } - - /** getDepositList Request Get Deposit List /api/v1/asset/ndbroker/deposit/list */ - public static void testGetDepositListRequest() throws Exception { - String data = - "{\"currency\": \"USDT\", \"status\": \"SUCCESS\", \"hash\":" - + " \"example_string_default_value\", \"startTimestamp\": 123456, \"endTimestamp\":" - + " 123456, \"limit\": 100}"; - GetDepositListReq obj = mapper.readValue(data, GetDepositListReq.class); - } - - /** getDepositList Response Get Deposit List /api/v1/asset/ndbroker/deposit/list */ - public static void testGetDepositListResponse() throws Exception { - String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"uid\": 165111215,\n" - + " \"hash\": \"6724e363a492800007ec602b\",\n" - + " \"address\": \"xxxxxxx@gmail.com\",\n" - + " \"memo\": \"\",\n" - + " \"amount\": \"3.0\",\n" - + " \"fee\": \"0.0\",\n" - + " \"currency\": \"USDT\",\n" - + " \"isInner\": true,\n" - + " \"walletTxId\": \"bbbbbbbbb\",\n" - + " \"status\": \"SUCCESS\",\n" - + " \"chain\": \"\",\n" - + " \"remark\": \"\",\n" - + " \"createdAt\": 1730470760000,\n" - + " \"updatedAt\": 1730470760000\n" - + " }\n" - + " ]\n" - + "}"; - RestResponse resp = - mapper.readValue(data, new TypeReference>() {}); - } - - /** getDepositDetail Request Get Deposit Detail /api/v3/broker/nd/deposit/detail */ - public static void testGetDepositDetailRequest() throws Exception { - String data = "{\"currency\": \"USDT\", \"hash\": \"30bb0e0b***4156c5188\"}"; - GetDepositDetailReq obj = mapper.readValue(data, GetDepositDetailReq.class); - } - - /** getDepositDetail Response Get Deposit Detail /api/v3/broker/nd/deposit/detail */ - public static void testGetDepositDetailResponse() throws Exception { - String data = - "{\n" - + " \"data\" : {\n" - + " \"chain\" : \"trx\",\n" - + " \"hash\" : \"30bb0e0b***4156c5188\",\n" - + " \"walletTxId\" : \"30bb0***610d1030f\",\n" - + " \"uid\" : 201496341,\n" - + " \"updatedAt\" : 1713429174000,\n" - + " \"amount\" : \"8.5\",\n" - + " \"memo\" : \"\",\n" - + " \"fee\" : \"0.0\",\n" - + " \"address\" : \"THLPzUrbd1o***vP7d\",\n" - + " \"remark\" : \"Deposit\",\n" - + " \"isInner\" : false,\n" - + " \"currency\" : \"USDT\",\n" - + " \"status\" : \"SUCCESS\",\n" - + " \"createdAt\" : 1713429173000\n" - + " },\n" - + " \"code\" : \"200000\"\n" - + "}"; - RestResponse resp = - mapper.readValue(data, new TypeReference>() {}); - } - - /** getWithdrawDetail Request Get Withdraw Detail /api/v3/broker/nd/withdraw/detail */ - public static void testGetWithdrawDetailRequest() throws Exception { - String data = "{\"withdrawalId\": \"66617a2***3c9a\"}"; - GetWithdrawDetailReq obj = mapper.readValue(data, GetWithdrawDetailReq.class); - } - - /** getWithdrawDetail Response Get Withdraw Detail /api/v3/broker/nd/withdraw/detail */ - public static void testGetWithdrawDetailResponse() throws Exception { - String data = - "{\n" - + " \"data\": {\n" - + " \"id\": \"66617a2***3c9a\",\n" - + " \"chain\": \"ton\",\n" - + " \"walletTxId\": \"AJ***eRI=\",\n" - + " \"uid\": 157267400,\n" - + " \"amount\": \"1.00000000\",\n" - + " \"memo\": \"7025734\",\n" - + " \"fee\": \"0.00000000\",\n" - + " \"address\": \"EQDn***dKbGzr\",\n" - + " \"remark\": \"\",\n" - + " \"isInner\": false,\n" - + " \"currency\": \"USDT\",\n" - + " \"status\": \"SUCCESS\",\n" - + " \"createdAt\": 1717664288000,\n" - + " \"updatedAt\": 1717664375000\n" - + " },\n" - + " \"code\": \"200000\"\n" - + "}"; - RestResponse resp = - mapper.readValue(data, new TypeReference>() {}); - } - - /** getRebase Request Get Broker Rebate /api/v1/broker/nd/rebase/download */ - public static void testGetRebaseRequest() throws Exception { - String data = "{\"begin\": \"20240610\", \"end\": \"20241010\", \"tradeType\": \"1\"}"; - GetRebaseReq obj = mapper.readValue(data, GetRebaseReq.class); - } - - /** getRebase Response Get Broker Rebate /api/v1/broker/nd/rebase/download */ - public static void testGetRebaseResponse() throws Exception { - String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"url\":" - + " \"https://kc-v2-promotion.s3.ap-northeast-1.amazonaws.com/broker/671aec522593f600019766d0_file.csv?X-Amz-Security-Token=IQo*********2cd90f14efb\"\n" - + " }\n" - + "}"; - RestResponse resp = - mapper.readValue(data, new TypeReference>() {}); - } - - public static void runAllTests() { - run(NdBrokerApiAutoGeneratedTest::testSubmitKYCRequest, "testSubmitKYCRequest"); - run(NdBrokerApiAutoGeneratedTest::testSubmitKYCResponse, "testSubmitKYCResponse"); - run(NdBrokerApiAutoGeneratedTest::testGetKYCStatusRequest, "testGetKYCStatusRequest"); - run(NdBrokerApiAutoGeneratedTest::testGetKYCStatusResponse, "testGetKYCStatusResponse"); - run(NdBrokerApiAutoGeneratedTest::testGetKYCStatusListRequest, "testGetKYCStatusListRequest"); - run(NdBrokerApiAutoGeneratedTest::testGetKYCStatusListResponse, "testGetKYCStatusListResponse"); - run(NdBrokerApiAutoGeneratedTest::testGetBrokerInfoRequest, "testGetBrokerInfoRequest"); - run(NdBrokerApiAutoGeneratedTest::testGetBrokerInfoResponse, "testGetBrokerInfoResponse"); - run(NdBrokerApiAutoGeneratedTest::testAddSubAccountRequest, "testAddSubAccountRequest"); - run(NdBrokerApiAutoGeneratedTest::testAddSubAccountResponse, "testAddSubAccountResponse"); - run(NdBrokerApiAutoGeneratedTest::testGetSubAccountRequest, "testGetSubAccountRequest"); - run(NdBrokerApiAutoGeneratedTest::testGetSubAccountResponse, "testGetSubAccountResponse"); - run(NdBrokerApiAutoGeneratedTest::testAddSubAccountApiRequest, "testAddSubAccountApiRequest"); - run(NdBrokerApiAutoGeneratedTest::testAddSubAccountApiResponse, "testAddSubAccountApiResponse"); - run(NdBrokerApiAutoGeneratedTest::testGetSubAccountAPIRequest, "testGetSubAccountAPIRequest"); - run(NdBrokerApiAutoGeneratedTest::testGetSubAccountAPIResponse, "testGetSubAccountAPIResponse"); - run( - NdBrokerApiAutoGeneratedTest::testModifySubAccountApiRequest, - "testModifySubAccountApiRequest"); - run( - NdBrokerApiAutoGeneratedTest::testModifySubAccountApiResponse, - "testModifySubAccountApiResponse"); - run( - NdBrokerApiAutoGeneratedTest::testDeleteSubAccountAPIRequest, - "testDeleteSubAccountAPIRequest"); - run( - NdBrokerApiAutoGeneratedTest::testDeleteSubAccountAPIResponse, - "testDeleteSubAccountAPIResponse"); - run(NdBrokerApiAutoGeneratedTest::testTransferRequest, "testTransferRequest"); - run(NdBrokerApiAutoGeneratedTest::testTransferResponse, "testTransferResponse"); - run( - NdBrokerApiAutoGeneratedTest::testGetTransferHistoryRequest, - "testGetTransferHistoryRequest"); - run( - NdBrokerApiAutoGeneratedTest::testGetTransferHistoryResponse, - "testGetTransferHistoryResponse"); - run(NdBrokerApiAutoGeneratedTest::testGetDepositListRequest, "testGetDepositListRequest"); - run(NdBrokerApiAutoGeneratedTest::testGetDepositListResponse, "testGetDepositListResponse"); - run(NdBrokerApiAutoGeneratedTest::testGetDepositDetailRequest, "testGetDepositDetailRequest"); - run(NdBrokerApiAutoGeneratedTest::testGetDepositDetailResponse, "testGetDepositDetailResponse"); - run(NdBrokerApiAutoGeneratedTest::testGetWithdrawDetailRequest, "testGetWithdrawDetailRequest"); - run( - NdBrokerApiAutoGeneratedTest::testGetWithdrawDetailResponse, - "testGetWithdrawDetailResponse"); - run(NdBrokerApiAutoGeneratedTest::testGetRebaseRequest, "testGetRebaseRequest"); - run(NdBrokerApiAutoGeneratedTest::testGetRebaseResponse, "testGetRebaseResponse"); - } - - private static void run(TestCase test, String name) { - System.out.println("Running test: " + name); - try { - test.execute(); - System.out.println("PASSED: " + name); - } catch (Exception e) { - System.err.println("FAILED: " + name + " - " + e.getMessage()); - e.printStackTrace(System.err); - failedTests.add(name); - } - } - - @FunctionalInterface - interface TestCase { - void execute() throws Exception; - } - - public static void main(String[] args) { - runAllTests(); - finish(); - } - - public static void finish() { - if (!failedTests.isEmpty()) { - System.err.println("\n=== TEST SUMMARY ==="); - System.err.println("Failed tests:"); - for (String name : failedTests) { - System.err.println(" - " + name); - } - System.exit(1); - } else { - System.out.println("\nAll tests passed."); - } - } -} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApiAutoGeneratedTest.java index 2c507403..51a6c8a8 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApiAutoGeneratedTest.java @@ -14,22 +14,23 @@ class FuturesApiAutoGeneratedTest { /** addOrder Request Add Order /api/v1/copy-trade/futures/orders */ public static void testAddOrderRequest() throws Exception { String data = - "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," - + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," - + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.1\", \"size\":" - + " 1, \"timeInForce\": \"GTC\"}"; + "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\"," + + " \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\"," + + " \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false," + + " \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.1\\\", \\\"size\\\": 1," + + " \\\"timeInForce\\\": \\\"GTC\\\"}"; AddOrderReq obj = mapper.readValue(data, AddOrderReq.class); } /** addOrder Response Add Order /api/v1/copy-trade/futures/orders */ public static void testAddOrderResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"263485113055133696\",\n" - + " \"clientOid\": \"5c52e11203aa677f331e493fb\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"263485113055133696\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f331e493fb\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -38,22 +39,23 @@ public static void testAddOrderResponse() throws Exception { /** addOrderTest Request Add Order Test /api/v1/copy-trade/futures/orders/test */ public static void testAddOrderTestRequest() throws Exception { String data = - "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," - + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," - + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.1\", \"size\":" - + " 1, \"timeInForce\": \"GTC\"}"; + "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\"," + + " \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\"," + + " \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false," + + " \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.1\\\", \\\"size\\\": 1," + + " \\\"timeInForce\\\": \\\"GTC\\\"}"; AddOrderTestReq obj = mapper.readValue(data, AddOrderTestReq.class); } /** addOrderTest Response Add Order Test /api/v1/copy-trade/futures/orders/test */ public static void testAddOrderTestResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"234125150956625920\",\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"234125150956625920\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -64,11 +66,12 @@ public static void testAddOrderTestResponse() throws Exception { */ public static void testAddTPSLOrderRequest() throws Exception { String data = - "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," - + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," - + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.2\", \"size\":" - + " 1, \"timeInForce\": \"GTC\", \"triggerStopUpPrice\": \"0.3\"," - + " \"triggerStopDownPrice\": \"0.1\", \"stopPriceType\": \"TP\"}"; + "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\"," + + " \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\"," + + " \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false," + + " \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.2\\\", \\\"size\\\": 1," + + " \\\"timeInForce\\\": \\\"GTC\\\", \\\"triggerStopUpPrice\\\": \\\"0.3\\\"," + + " \\\"triggerStopDownPrice\\\": \\\"0.1\\\", \\\"stopPriceType\\\": \\\"TP\\\"}"; AddTPSLOrderReq obj = mapper.readValue(data, AddTPSLOrderReq.class); } @@ -77,12 +80,12 @@ public static void testAddTPSLOrderRequest() throws Exception { */ public static void testAddTPSLOrderResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"234125150956625920\",\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"234125150956625920\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -90,20 +93,20 @@ public static void testAddTPSLOrderResponse() throws Exception { /** cancelOrderById Request Cancel Order By OrderId /api/v1/copy-trade/futures/orders */ public static void testCancelOrderByIdRequest() throws Exception { - String data = "{\"orderId\": \"263485113055133696\"}"; + String data = "{\\\"orderId\\\": \\\"263485113055133696\\\"}"; CancelOrderByIdReq obj = mapper.readValue(data, CancelOrderByIdReq.class); } /** cancelOrderById Response Cancel Order By OrderId /api/v1/copy-trade/futures/orders */ public static void testCancelOrderByIdResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"cancelledOrderIds\": [\n" - + " \"263485113055133696\"\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"cancelledOrderIds\\\": [\\n" + + " \\\"263485113055133696\\\"\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -114,7 +117,8 @@ public static void testCancelOrderByIdResponse() throws Exception { * /api/v1/copy-trade/futures/orders/client-order */ public static void testCancelOrderByClientOidRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\", \"clientOid\": \"5c52e11203aa677f331e493fb\"}"; + String data = + "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"clientOid\\\": \\\"5c52e11203aa677f331e493fb\\\"}"; CancelOrderByClientOidReq obj = mapper.readValue(data, CancelOrderByClientOidReq.class); } @@ -124,11 +128,11 @@ public static void testCancelOrderByClientOidRequest() throws Exception { */ public static void testCancelOrderByClientOidResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"clientOid\": \"5c52e11203aa677f331e4913fb\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f331e4913fb\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -136,20 +140,21 @@ public static void testCancelOrderByClientOidResponse() throws Exception { /** getMaxOpenSize Request Get Max Open Size /api/v1/copy-trade/futures/get-max-open-size */ public static void testGetMaxOpenSizeRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\", \"price\": 123456.0, \"leverage\": 123456}"; + String data = + "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"price\\\": 123456.0, \\\"leverage\\\": 123456}"; GetMaxOpenSizeReq obj = mapper.readValue(data, GetMaxOpenSizeReq.class); } /** getMaxOpenSize Response Get Max Open Size /api/v1/copy-trade/futures/get-max-open-size */ public static void testGetMaxOpenSizeResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"maxBuyOpenSize\": \"1000000\",\n" - + " \"maxSellOpenSize\": \"51\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"maxBuyOpenSize\\\": \\\"1000000\\\",\\n" + + " \\\"maxSellOpenSize\\\": \\\"51\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -160,7 +165,7 @@ public static void testGetMaxOpenSizeResponse() throws Exception { * /api/v1/copy-trade/futures/position/margin/max-withdraw-margin */ public static void testGetMaxWithdrawMarginRequest() throws Exception { - String data = "{\"symbol\": \"example_string_default_value\"}"; + String data = "{\\\"symbol\\\": \\\"example_string_default_value\\\"}"; GetMaxWithdrawMarginReq obj = mapper.readValue(data, GetMaxWithdrawMarginReq.class); } @@ -169,7 +174,8 @@ public static void testGetMaxWithdrawMarginRequest() throws Exception { * /api/v1/copy-trade/futures/position/margin/max-withdraw-margin */ public static void testGetMaxWithdrawMarginResponse() throws Exception { - String data = "{\n \"code\": \"200000\",\n \"data\": \"21.1135719252\"\n}"; + String data = + "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": \\\"21.1135719252\\\"\\n}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -179,7 +185,8 @@ public static void testGetMaxWithdrawMarginResponse() throws Exception { * /api/v1/copy-trade/futures/position/margin/deposit-margin */ public static void testAddIsolatedMarginRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\", \"margin\": 3, \"bizNo\": \"112233\"}"; + String data = + "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"margin\\\": 3, \\\"bizNo\\\": \\\"112233\\\"}"; AddIsolatedMarginReq obj = mapper.readValue(data, AddIsolatedMarginReq.class); } @@ -189,49 +196,49 @@ public static void testAddIsolatedMarginRequest() throws Exception { */ public static void testAddIsolatedMarginResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"id\": \"400000000000974886\",\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"autoDeposit\": true,\n" - + " \"maintMarginReq\": \"0.004\",\n" - + " \"riskLimit\": 100000,\n" - + " \"realLeverage\": \"1.83\",\n" - + " \"crossMode\": false,\n" - + " \"marginMode\": \"\",\n" - + " \"positionSide\": \"\",\n" - + " \"leverage\": \"1.83\",\n" - + " \"delevPercentage\": 0.2,\n" - + " \"openingTimestamp\": 1736932881164,\n" - + " \"currentTimestamp\": 1736933530230,\n" - + " \"currentQty\": 1,\n" - + " \"currentCost\": \"97.302\",\n" - + " \"currentComm\": \"0.0583812\",\n" - + " \"unrealisedCost\": \"97.302\",\n" - + " \"realisedGrossCost\": \"0.0000000000\",\n" - + " \"realisedCost\": \"0.0583812000\",\n" - + " \"isOpen\": true,\n" - + " \"markPrice\": \"96939.98\",\n" - + " \"markValue\": \"96.9399800000\",\n" - + " \"posCost\": \"97.302\",\n" - + " \"posCross\": \"20.9874\",\n" - + " \"posInit\": \"32.4339999967\",\n" - + " \"posComm\": \"0.0904415999\",\n" - + " \"posLoss\": \"0\",\n" - + " \"posMargin\": \"53.5118415966\",\n" - + " \"posMaint\": \"0.4796495999\",\n" - + " \"maintMargin\": \"53.1498215966\",\n" - + " \"realisedGrossPnl\": \"0.0000000000\",\n" - + " \"realisedPnl\": \"-0.0583812000\",\n" - + " \"unrealisedPnl\": \"-0.3620200000\",\n" - + " \"unrealisedPnlPcnt\": \"-0.0037\",\n" - + " \"unrealisedRoePcnt\": \"-0.0112\",\n" - + " \"avgEntryPrice\": \"97302.00\",\n" - + " \"liquidationPrice\": \"44269.81\",\n" - + " \"bankruptPrice\": \"43880.61\",\n" - + " \"settleCurrency\": \"USDT\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"id\\\": \\\"400000000000974886\\\",\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"autoDeposit\\\": true,\\n" + + " \\\"maintMarginReq\\\": \\\"0.004\\\",\\n" + + " \\\"riskLimit\\\": 100000,\\n" + + " \\\"realLeverage\\\": \\\"1.83\\\",\\n" + + " \\\"crossMode\\\": false,\\n" + + " \\\"marginMode\\\": \\\"\\\",\\n" + + " \\\"positionSide\\\": \\\"\\\",\\n" + + " \\\"leverage\\\": \\\"1.83\\\",\\n" + + " \\\"delevPercentage\\\": 0.2,\\n" + + " \\\"openingTimestamp\\\": 1736932881164,\\n" + + " \\\"currentTimestamp\\\": 1736933530230,\\n" + + " \\\"currentQty\\\": 1,\\n" + + " \\\"currentCost\\\": \\\"97.302\\\",\\n" + + " \\\"currentComm\\\": \\\"0.0583812\\\",\\n" + + " \\\"unrealisedCost\\\": \\\"97.302\\\",\\n" + + " \\\"realisedGrossCost\\\": \\\"0.0000000000\\\",\\n" + + " \\\"realisedCost\\\": \\\"0.0583812000\\\",\\n" + + " \\\"isOpen\\\": true,\\n" + + " \\\"markPrice\\\": \\\"96939.98\\\",\\n" + + " \\\"markValue\\\": \\\"96.9399800000\\\",\\n" + + " \\\"posCost\\\": \\\"97.302\\\",\\n" + + " \\\"posCross\\\": \\\"20.9874\\\",\\n" + + " \\\"posInit\\\": \\\"32.4339999967\\\",\\n" + + " \\\"posComm\\\": \\\"0.0904415999\\\",\\n" + + " \\\"posLoss\\\": \\\"0\\\",\\n" + + " \\\"posMargin\\\": \\\"53.5118415966\\\",\\n" + + " \\\"posMaint\\\": \\\"0.4796495999\\\",\\n" + + " \\\"maintMargin\\\": \\\"53.1498215966\\\",\\n" + + " \\\"realisedGrossPnl\\\": \\\"0.0000000000\\\",\\n" + + " \\\"realisedPnl\\\": \\\"-0.0583812000\\\",\\n" + + " \\\"unrealisedPnl\\\": \\\"-0.3620200000\\\",\\n" + + " \\\"unrealisedPnlPcnt\\\": \\\"-0.0037\\\",\\n" + + " \\\"unrealisedRoePcnt\\\": \\\"-0.0112\\\",\\n" + + " \\\"avgEntryPrice\\\": \\\"97302.00\\\",\\n" + + " \\\"liquidationPrice\\\": \\\"44269.81\\\",\\n" + + " \\\"bankruptPrice\\\": \\\"43880.61\\\",\\n" + + " \\\"settleCurrency\\\": \\\"USDT\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -242,7 +249,7 @@ public static void testAddIsolatedMarginResponse() throws Exception { * /api/v1/copy-trade/futures/position/margin/withdraw-margin */ public static void testRemoveIsolatedMarginRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\", \"withdrawAmount\": 1e-07}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"withdrawAmount\\\": 1e-07}"; RemoveIsolatedMarginReq obj = mapper.readValue(data, RemoveIsolatedMarginReq.class); } @@ -251,7 +258,7 @@ public static void testRemoveIsolatedMarginRequest() throws Exception { * /api/v1/copy-trade/futures/position/margin/withdraw-margin */ public static void testRemoveIsolatedMarginResponse() throws Exception { - String data = "{\n \"code\": \"200000\",\n \"data\": \"0.1\"\n}"; + String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": \\\"0.1\\\"\\n}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -261,7 +268,7 @@ public static void testRemoveIsolatedMarginResponse() throws Exception { * /api/v1/copy-trade/futures/position/risk-limit-level/change */ public static void testModifyIsolatedMarginRiskLimtRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\", \"level\": 1}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"level\\\": 1}"; ModifyIsolatedMarginRiskLimtReq obj = mapper.readValue(data, ModifyIsolatedMarginRiskLimtReq.class); } @@ -271,7 +278,7 @@ public static void testModifyIsolatedMarginRiskLimtRequest() throws Exception { * /api/v1/copy-trade/futures/position/risk-limit-level/change */ public static void testModifyIsolatedMarginRiskLimtResponse() throws Exception { - String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; + String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": true\\n}"; RestResponse resp = mapper.readValue( data, new TypeReference>() {}); @@ -282,7 +289,7 @@ public static void testModifyIsolatedMarginRiskLimtResponse() throws Exception { * /api/v1/copy-trade/futures/position/margin/auto-deposit-status */ public static void testModifyAutoDepositStatusRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\", \"status\": true}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"status\\\": true}"; ModifyAutoDepositStatusReq obj = mapper.readValue(data, ModifyAutoDepositStatusReq.class); } @@ -291,7 +298,7 @@ public static void testModifyAutoDepositStatusRequest() throws Exception { * /api/v1/copy-trade/futures/position/margin/auto-deposit-status */ public static void testModifyAutoDepositStatusResponse() throws Exception { - String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; + String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": true\\n}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApiAutoGeneratedTest.java index ee4c9d8f..562f0ed5 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApiAutoGeneratedTest.java @@ -13,19 +13,21 @@ class EarnApiAutoGeneratedTest { /** purchase Request Purchase /api/v1/earn/orders */ public static void testPurchaseRequest() throws Exception { - String data = "{\"productId\": \"2611\", \"amount\": \"1\", \"accountType\": \"TRADE\"}"; + String data = + "{\\\"productId\\\": \\\"2611\\\", \\\"amount\\\": \\\"1\\\", \\\"accountType\\\":" + + " \\\"TRADE\\\"}"; PurchaseReq obj = mapper.readValue(data, PurchaseReq.class); } /** purchase Response Purchase /api/v1/earn/orders */ public static void testPurchaseResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"2767291\",\n" - + " \"orderTxId\": \"6603694\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"2767291\\\",\\n" + + " \\\"orderTxId\\\": \\\"6603694\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -33,24 +35,24 @@ public static void testPurchaseResponse() throws Exception { /** getRedeemPreview Request Get Redeem Preview /api/v1/earn/redeem-preview */ public static void testGetRedeemPreviewRequest() throws Exception { - String data = "{\"orderId\": \"2767291\", \"fromAccountType\": \"MAIN\"}"; + String data = "{\\\"orderId\\\": \\\"2767291\\\", \\\"fromAccountType\\\": \\\"MAIN\\\"}"; GetRedeemPreviewReq obj = mapper.readValue(data, GetRedeemPreviewReq.class); } /** getRedeemPreview Response Get Redeem Preview /api/v1/earn/redeem-preview */ public static void testGetRedeemPreviewResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"currency\": \"KCS\",\n" - + " \"redeemAmount\": \"1\",\n" - + " \"penaltyInterestAmount\": \"0\",\n" - + " \"redeemPeriod\": 3,\n" - + " \"deliverTime\": 1729518951000,\n" - + " \"manualRedeemable\": true,\n" - + " \"redeemAll\": false\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"currency\\\": \\\"KCS\\\",\\n" + + " \\\"redeemAmount\\\": \\\"1\\\",\\n" + + " \\\"penaltyInterestAmount\\\": \\\"0\\\",\\n" + + " \\\"redeemPeriod\\\": 3,\\n" + + " \\\"deliverTime\\\": 1729518951000,\\n" + + " \\\"manualRedeemable\\\": true,\\n" + + " \\\"redeemAll\\\": false\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -59,22 +61,22 @@ public static void testGetRedeemPreviewResponse() throws Exception { /** redeem Request Redeem /api/v1/earn/orders */ public static void testRedeemRequest() throws Exception { String data = - "{\"orderId\": \"2767291\", \"amount\": \"example_string_default_value\"," - + " \"fromAccountType\": \"MAIN\", \"confirmPunishRedeem\": \"1\"}"; + "{\\\"orderId\\\": \\\"2767291\\\", \\\"amount\\\": \\\"example_string_default_value\\\"," + + " \\\"fromAccountType\\\": \\\"MAIN\\\", \\\"confirmPunishRedeem\\\": \\\"1\\\"}"; RedeemReq obj = mapper.readValue(data, RedeemReq.class); } /** redeem Response Redeem /api/v1/earn/orders */ public static void testRedeemResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderTxId\": \"6603700\",\n" - + " \"deliverTime\": 1729517805000,\n" - + " \"status\": \"PENDING\",\n" - + " \"amount\": \"1\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderTxId\\\": \\\"6603700\\\",\\n" + + " \\\"deliverTime\\\": 1729517805000,\\n" + + " \\\"status\\\": \\\"PENDING\\\",\\n" + + " \\\"amount\\\": \\\"1\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -82,42 +84,42 @@ public static void testRedeemResponse() throws Exception { /** getSavingsProducts Request Get Savings Products /api/v1/earn/saving/products */ public static void testGetSavingsProductsRequest() throws Exception { - String data = "{\"currency\": \"BTC\"}"; + String data = "{\\\"currency\\\": \\\"BTC\\\"}"; GetSavingsProductsReq obj = mapper.readValue(data, GetSavingsProductsReq.class); } /** getSavingsProducts Response Get Savings Products /api/v1/earn/saving/products */ public static void testGetSavingsProductsResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"id\": \"2172\",\n" - + " \"currency\": \"BTC\",\n" - + " \"category\": \"DEMAND\",\n" - + " \"type\": \"DEMAND\",\n" - + " \"precision\": 8,\n" - + " \"productUpperLimit\": \"480\",\n" - + " \"productRemainAmount\": \"132.36153083\",\n" - + " \"userUpperLimit\": \"20\",\n" - + " \"userLowerLimit\": \"0.01\",\n" - + " \"redeemPeriod\": 0,\n" - + " \"lockStartTime\": 1644807600000,\n" - + " \"lockEndTime\": null,\n" - + " \"applyStartTime\": 1644807600000,\n" - + " \"applyEndTime\": null,\n" - + " \"returnRate\": \"0.00047208\",\n" - + " \"incomeCurrency\": \"BTC\",\n" - + " \"earlyRedeemSupported\": 0,\n" - + " \"status\": \"ONGOING\",\n" - + " \"redeemType\": \"MANUAL\",\n" - + " \"incomeReleaseType\": \"DAILY\",\n" - + " \"interestDate\": 1729267200000,\n" - + " \"duration\": 0,\n" - + " \"newUserOnly\": 0\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"id\\\": \\\"2172\\\",\\n" + + " \\\"currency\\\": \\\"BTC\\\",\\n" + + " \\\"category\\\": \\\"DEMAND\\\",\\n" + + " \\\"type\\\": \\\"DEMAND\\\",\\n" + + " \\\"precision\\\": 8,\\n" + + " \\\"productUpperLimit\\\": \\\"480\\\",\\n" + + " \\\"productRemainAmount\\\": \\\"132.36153083\\\",\\n" + + " \\\"userUpperLimit\\\": \\\"20\\\",\\n" + + " \\\"userLowerLimit\\\": \\\"0.01\\\",\\n" + + " \\\"redeemPeriod\\\": 0,\\n" + + " \\\"lockStartTime\\\": 1644807600000,\\n" + + " \\\"lockEndTime\\\": null,\\n" + + " \\\"applyStartTime\\\": 1644807600000,\\n" + + " \\\"applyEndTime\\\": null,\\n" + + " \\\"returnRate\\\": \\\"0.00047208\\\",\\n" + + " \\\"incomeCurrency\\\": \\\"BTC\\\",\\n" + + " \\\"earlyRedeemSupported\\\": 0,\\n" + + " \\\"status\\\": \\\"ONGOING\\\",\\n" + + " \\\"redeemType\\\": \\\"MANUAL\\\",\\n" + + " \\\"incomeReleaseType\\\": \\\"DAILY\\\",\\n" + + " \\\"interestDate\\\": 1729267200000,\\n" + + " \\\"duration\\\": 0,\\n" + + " \\\"newUserOnly\\\": 0\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -125,42 +127,42 @@ public static void testGetSavingsProductsResponse() throws Exception { /** getPromotionProducts Request Get Promotion Products /api/v1/earn/promotion/products */ public static void testGetPromotionProductsRequest() throws Exception { - String data = "{\"currency\": \"BTC\"}"; + String data = "{\\\"currency\\\": \\\"BTC\\\"}"; GetPromotionProductsReq obj = mapper.readValue(data, GetPromotionProductsReq.class); } /** getPromotionProducts Response Get Promotion Products /api/v1/earn/promotion/products */ public static void testGetPromotionProductsResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"id\": \"2685\",\n" - + " \"currency\": \"BTC\",\n" - + " \"category\": \"ACTIVITY\",\n" - + " \"type\": \"TIME\",\n" - + " \"precision\": 8,\n" - + " \"productUpperLimit\": \"50\",\n" - + " \"userUpperLimit\": \"1\",\n" - + " \"userLowerLimit\": \"0.001\",\n" - + " \"redeemPeriod\": 0,\n" - + " \"lockStartTime\": 1702371601000,\n" - + " \"lockEndTime\": 1729858405000,\n" - + " \"applyStartTime\": 1702371600000,\n" - + " \"applyEndTime\": null,\n" - + " \"returnRate\": \"0.03\",\n" - + " \"incomeCurrency\": \"BTC\",\n" - + " \"earlyRedeemSupported\": 0,\n" - + " \"productRemainAmount\": \"49.78203998\",\n" - + " \"status\": \"ONGOING\",\n" - + " \"redeemType\": \"TRANS_DEMAND\",\n" - + " \"incomeReleaseType\": \"DAILY\",\n" - + " \"interestDate\": 1729253605000,\n" - + " \"duration\": 7,\n" - + " \"newUserOnly\": 1\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"id\\\": \\\"2685\\\",\\n" + + " \\\"currency\\\": \\\"BTC\\\",\\n" + + " \\\"category\\\": \\\"ACTIVITY\\\",\\n" + + " \\\"type\\\": \\\"TIME\\\",\\n" + + " \\\"precision\\\": 8,\\n" + + " \\\"productUpperLimit\\\": \\\"50\\\",\\n" + + " \\\"userUpperLimit\\\": \\\"1\\\",\\n" + + " \\\"userLowerLimit\\\": \\\"0.001\\\",\\n" + + " \\\"redeemPeriod\\\": 0,\\n" + + " \\\"lockStartTime\\\": 1702371601000,\\n" + + " \\\"lockEndTime\\\": 1729858405000,\\n" + + " \\\"applyStartTime\\\": 1702371600000,\\n" + + " \\\"applyEndTime\\\": null,\\n" + + " \\\"returnRate\\\": \\\"0.03\\\",\\n" + + " \\\"incomeCurrency\\\": \\\"BTC\\\",\\n" + + " \\\"earlyRedeemSupported\\\": 0,\\n" + + " \\\"productRemainAmount\\\": \\\"49.78203998\\\",\\n" + + " \\\"status\\\": \\\"ONGOING\\\",\\n" + + " \\\"redeemType\\\": \\\"TRANS_DEMAND\\\",\\n" + + " \\\"incomeReleaseType\\\": \\\"DAILY\\\",\\n" + + " \\\"interestDate\\\": 1729253605000,\\n" + + " \\\"duration\\\": 7,\\n" + + " \\\"newUserOnly\\\": 1\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -168,42 +170,42 @@ public static void testGetPromotionProductsResponse() throws Exception { /** getStakingProducts Request Get Staking Products /api/v1/earn/staking/products */ public static void testGetStakingProductsRequest() throws Exception { - String data = "{\"currency\": \"BTC\"}"; + String data = "{\\\"currency\\\": \\\"BTC\\\"}"; GetStakingProductsReq obj = mapper.readValue(data, GetStakingProductsReq.class); } /** getStakingProducts Response Get Staking Products /api/v1/earn/staking/products */ public static void testGetStakingProductsResponse() throws Exception { String data = - "{\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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -211,42 +213,42 @@ public static void testGetStakingProductsResponse() throws Exception { /** getKcsStakingProducts Request Get KCS Staking Products /api/v1/earn/kcs-staking/products */ public static void testGetKcsStakingProductsRequest() throws Exception { - String data = "{\"currency\": \"BTC\"}"; + String data = "{\\\"currency\\\": \\\"BTC\\\"}"; GetKcsStakingProductsReq obj = mapper.readValue(data, GetKcsStakingProductsReq.class); } /** getKcsStakingProducts Response Get KCS Staking Products /api/v1/earn/kcs-staking/products */ public static void testGetKcsStakingProductsResponse() throws Exception { String data = - "{\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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -254,42 +256,42 @@ public static void testGetKcsStakingProductsResponse() throws Exception { /** getETHStakingProducts Request Get ETH Staking Products /api/v1/earn/eth-staking/products */ public static void testGetETHStakingProductsRequest() throws Exception { - String data = "{\"currency\": \"BTC\"}"; + String data = "{\\\"currency\\\": \\\"BTC\\\"}"; GetETHStakingProductsReq obj = mapper.readValue(data, GetETHStakingProductsReq.class); } /** getETHStakingProducts Response Get ETH Staking Products /api/v1/earn/eth-staking/products */ public static void testGetETHStakingProductsResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -298,42 +300,43 @@ public static void testGetETHStakingProductsResponse() throws Exception { /** getAccountHolding Request Get Account Holding /api/v1/earn/hold-assets */ public static void testGetAccountHoldingRequest() throws Exception { String data = - "{\"currency\": \"KCS\", \"productId\": \"example_string_default_value\"," - + " \"productCategory\": \"DEMAND\", \"currentPage\": 1, \"pageSize\": 10}"; + "{\\\"currency\\\": \\\"KCS\\\", \\\"productId\\\": \\\"example_string_default_value\\\"," + + " \\\"productCategory\\\": \\\"DEMAND\\\", \\\"currentPage\\\": 1, \\\"pageSize\\\":" + + " 10}"; GetAccountHoldingReq obj = mapper.readValue(data, GetAccountHoldingReq.class); } /** getAccountHolding Response Get Account Holding /api/v1/earn/hold-assets */ public static void testGetAccountHoldingResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApiAutoGeneratedTest.java index daec1d88..d28e30c0 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApiAutoGeneratedTest.java @@ -15,7 +15,7 @@ class FundingFeesApiAutoGeneratedTest { * getCurrentFundingRate Request Get Current Funding Rate /api/v1/funding-rate/{symbol}/current */ public static void testGetCurrentFundingRateRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; GetCurrentFundingRateReq obj = mapper.readValue(data, GetCurrentFundingRateReq.class); } @@ -24,19 +24,19 @@ public static void testGetCurrentFundingRateRequest() throws Exception { */ public static void testGetCurrentFundingRateResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"symbol\": \".XBTUSDTMFPI8H\",\n" - + " \"granularity\": 28800000,\n" - + " \"timePoint\": 1748462400000,\n" - + " \"value\": 6.1E-5,\n" - + " \"predictedValue\": 1.09E-4,\n" - + " \"fundingRateCap\": 0.003,\n" - + " \"fundingRateFloor\": -0.003,\n" - + " \"period\": 0,\n" - + " \"fundingTime\": 1748491200000\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"symbol\\\": \\\".XBTUSDTMFPI8H\\\",\\n" + + " \\\"granularity\\\": 28800000,\\n" + + " \\\"timePoint\\\": 1748462400000,\\n" + + " \\\"value\\\": 6.1E-5,\\n" + + " \\\"predictedValue\\\": 1.09E-4,\\n" + + " \\\"fundingRateCap\\\": 0.003,\\n" + + " \\\"fundingRateFloor\\\": -0.003,\\n" + + " \\\"period\\\": 0,\\n" + + " \\\"fundingTime\\\": 1748491200000\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -44,362 +44,364 @@ public static void testGetCurrentFundingRateResponse() throws Exception { /** getPublicFundingHistory Request Get Public Funding History /api/v1/contract/funding-rates */ public static void testGetPublicFundingHistoryRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\", \"from\": 1700310700000, \"to\": 1702310700000}"; + String data = + "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"from\\\": 1700310700000, \\\"to\\\":" + + " 1702310700000}"; GetPublicFundingHistoryReq obj = mapper.readValue(data, GetPublicFundingHistoryReq.class); } /** getPublicFundingHistory Response Get Public Funding History /api/v1/contract/funding-rates */ public static void testGetPublicFundingHistoryResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 2.1E-4,\n" - + " \"timepoint\": 1702296000000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 3.47E-4,\n" - + " \"timepoint\": 1702267200000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 4.52E-4,\n" - + " \"timepoint\": 1702238400000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 5.13E-4,\n" - + " \"timepoint\": 1702209600000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 4.21E-4,\n" - + " \"timepoint\": 1702180800000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 5.06E-4,\n" - + " \"timepoint\": 1702152000000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 7.68E-4,\n" - + " \"timepoint\": 1702123200000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 4.82E-4,\n" - + " \"timepoint\": 1702094400000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 4.0E-4,\n" - + " \"timepoint\": 1702065600000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 5.46E-4,\n" - + " \"timepoint\": 1702036800000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 7.97E-4,\n" - + " \"timepoint\": 1702008000000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 5.76E-4,\n" - + " \"timepoint\": 1701979200000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 4.22E-4,\n" - + " \"timepoint\": 1701950400000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 3.92E-4,\n" - + " \"timepoint\": 1701921600000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 4.1E-4,\n" - + " \"timepoint\": 1701892800000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 4.48E-4,\n" - + " \"timepoint\": 1701864000000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 3.68E-4,\n" - + " \"timepoint\": 1701835200000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 3.51E-4,\n" - + " \"timepoint\": 1701806400000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.44E-4,\n" - + " \"timepoint\": 1701777600000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 4.25E-4,\n" - + " \"timepoint\": 1701748800000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": -8.2E-5,\n" - + " \"timepoint\": 1701720000000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 4.64E-4,\n" - + " \"timepoint\": 1701691200000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 4.14E-4,\n" - + " \"timepoint\": 1701662400000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 2.44E-4,\n" - + " \"timepoint\": 1701633600000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.99E-4,\n" - + " \"timepoint\": 1701604800000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.79E-4,\n" - + " \"timepoint\": 1701576000000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 8.7E-5,\n" - + " \"timepoint\": 1701547200000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.6E-5,\n" - + " \"timepoint\": 1701518400000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": -3.7E-5,\n" - + " \"timepoint\": 1701489600000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.5E-5,\n" - + " \"timepoint\": 1701460800000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 6.8E-5,\n" - + " \"timepoint\": 1701432000000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 7.2E-5,\n" - + " \"timepoint\": 1701403200000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.45E-4,\n" - + " \"timepoint\": 1701374400000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.41E-4,\n" - + " \"timepoint\": 1701345600000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 9.4E-5,\n" - + " \"timepoint\": 1701316800000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.08E-4,\n" - + " \"timepoint\": 1701288000000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 7.6E-5,\n" - + " \"timepoint\": 1701259200000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.0E-5,\n" - + " \"timepoint\": 1701230400000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.0E-5,\n" - + " \"timepoint\": 1701201600000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.16E-4,\n" - + " \"timepoint\": 1701172800000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 2.04E-4,\n" - + " \"timepoint\": 1701144000000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 2.3E-4,\n" - + " \"timepoint\": 1701115200000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 6.2E-5,\n" - + " \"timepoint\": 1701086400000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.33E-4,\n" - + " \"timepoint\": 1701057600000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 8.0E-5,\n" - + " \"timepoint\": 1701028800000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.11E-4,\n" - + " \"timepoint\": 1701000000000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 7.4E-5,\n" - + " \"timepoint\": 1700971200000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.01E-4,\n" - + " \"timepoint\": 1700942400000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 3.9E-5,\n" - + " \"timepoint\": 1700913600000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.1E-5,\n" - + " \"timepoint\": 1700884800000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 3.0E-6,\n" - + " \"timepoint\": 1700856000000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.03E-4,\n" - + " \"timepoint\": 1700827200000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 3.0E-6,\n" - + " \"timepoint\": 1700798400000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 6.7E-5,\n" - + " \"timepoint\": 1700769600000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.47E-4,\n" - + " \"timepoint\": 1700740800000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 7.8E-5,\n" - + " \"timepoint\": 1700712000000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.39E-4,\n" - + " \"timepoint\": 1700683200000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 7.5E-5,\n" - + " \"timepoint\": 1700654400000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.11E-4,\n" - + " \"timepoint\": 1700625600000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 9.8E-5,\n" - + " \"timepoint\": 1700596800000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.18E-4,\n" - + " \"timepoint\": 1700568000000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.16E-4,\n" - + " \"timepoint\": 1700539200000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.6E-4,\n" - + " \"timepoint\": 1700510400000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.92E-4,\n" - + " \"timepoint\": 1700481600000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.13E-4,\n" - + " \"timepoint\": 1700452800000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 2.47E-4,\n" - + " \"timepoint\": 1700424000000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 2.3E-4,\n" - + " \"timepoint\": 1700395200000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 2.63E-4,\n" - + " \"timepoint\": 1700366400000\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"fundingRate\": 1.32E-4,\n" - + " \"timepoint\": 1700337600000\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 2.1E-4,\\n" + + " \\\"timepoint\\\": 1702296000000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 3.47E-4,\\n" + + " \\\"timepoint\\\": 1702267200000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 4.52E-4,\\n" + + " \\\"timepoint\\\": 1702238400000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 5.13E-4,\\n" + + " \\\"timepoint\\\": 1702209600000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 4.21E-4,\\n" + + " \\\"timepoint\\\": 1702180800000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 5.06E-4,\\n" + + " \\\"timepoint\\\": 1702152000000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 7.68E-4,\\n" + + " \\\"timepoint\\\": 1702123200000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 4.82E-4,\\n" + + " \\\"timepoint\\\": 1702094400000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 4.0E-4,\\n" + + " \\\"timepoint\\\": 1702065600000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 5.46E-4,\\n" + + " \\\"timepoint\\\": 1702036800000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 7.97E-4,\\n" + + " \\\"timepoint\\\": 1702008000000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 5.76E-4,\\n" + + " \\\"timepoint\\\": 1701979200000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 4.22E-4,\\n" + + " \\\"timepoint\\\": 1701950400000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 3.92E-4,\\n" + + " \\\"timepoint\\\": 1701921600000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 4.1E-4,\\n" + + " \\\"timepoint\\\": 1701892800000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 4.48E-4,\\n" + + " \\\"timepoint\\\": 1701864000000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 3.68E-4,\\n" + + " \\\"timepoint\\\": 1701835200000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 3.51E-4,\\n" + + " \\\"timepoint\\\": 1701806400000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.44E-4,\\n" + + " \\\"timepoint\\\": 1701777600000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 4.25E-4,\\n" + + " \\\"timepoint\\\": 1701748800000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": -8.2E-5,\\n" + + " \\\"timepoint\\\": 1701720000000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 4.64E-4,\\n" + + " \\\"timepoint\\\": 1701691200000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 4.14E-4,\\n" + + " \\\"timepoint\\\": 1701662400000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 2.44E-4,\\n" + + " \\\"timepoint\\\": 1701633600000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.99E-4,\\n" + + " \\\"timepoint\\\": 1701604800000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.79E-4,\\n" + + " \\\"timepoint\\\": 1701576000000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 8.7E-5,\\n" + + " \\\"timepoint\\\": 1701547200000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.6E-5,\\n" + + " \\\"timepoint\\\": 1701518400000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": -3.7E-5,\\n" + + " \\\"timepoint\\\": 1701489600000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.5E-5,\\n" + + " \\\"timepoint\\\": 1701460800000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 6.8E-5,\\n" + + " \\\"timepoint\\\": 1701432000000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 7.2E-5,\\n" + + " \\\"timepoint\\\": 1701403200000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.45E-4,\\n" + + " \\\"timepoint\\\": 1701374400000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.41E-4,\\n" + + " \\\"timepoint\\\": 1701345600000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 9.4E-5,\\n" + + " \\\"timepoint\\\": 1701316800000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.08E-4,\\n" + + " \\\"timepoint\\\": 1701288000000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 7.6E-5,\\n" + + " \\\"timepoint\\\": 1701259200000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.0E-5,\\n" + + " \\\"timepoint\\\": 1701230400000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.0E-5,\\n" + + " \\\"timepoint\\\": 1701201600000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.16E-4,\\n" + + " \\\"timepoint\\\": 1701172800000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 2.04E-4,\\n" + + " \\\"timepoint\\\": 1701144000000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 2.3E-4,\\n" + + " \\\"timepoint\\\": 1701115200000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 6.2E-5,\\n" + + " \\\"timepoint\\\": 1701086400000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.33E-4,\\n" + + " \\\"timepoint\\\": 1701057600000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 8.0E-5,\\n" + + " \\\"timepoint\\\": 1701028800000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.11E-4,\\n" + + " \\\"timepoint\\\": 1701000000000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 7.4E-5,\\n" + + " \\\"timepoint\\\": 1700971200000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.01E-4,\\n" + + " \\\"timepoint\\\": 1700942400000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 3.9E-5,\\n" + + " \\\"timepoint\\\": 1700913600000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.1E-5,\\n" + + " \\\"timepoint\\\": 1700884800000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 3.0E-6,\\n" + + " \\\"timepoint\\\": 1700856000000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.03E-4,\\n" + + " \\\"timepoint\\\": 1700827200000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 3.0E-6,\\n" + + " \\\"timepoint\\\": 1700798400000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 6.7E-5,\\n" + + " \\\"timepoint\\\": 1700769600000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.47E-4,\\n" + + " \\\"timepoint\\\": 1700740800000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 7.8E-5,\\n" + + " \\\"timepoint\\\": 1700712000000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.39E-4,\\n" + + " \\\"timepoint\\\": 1700683200000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 7.5E-5,\\n" + + " \\\"timepoint\\\": 1700654400000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.11E-4,\\n" + + " \\\"timepoint\\\": 1700625600000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 9.8E-5,\\n" + + " \\\"timepoint\\\": 1700596800000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.18E-4,\\n" + + " \\\"timepoint\\\": 1700568000000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.16E-4,\\n" + + " \\\"timepoint\\\": 1700539200000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.6E-4,\\n" + + " \\\"timepoint\\\": 1700510400000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.92E-4,\\n" + + " \\\"timepoint\\\": 1700481600000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.13E-4,\\n" + + " \\\"timepoint\\\": 1700452800000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 2.47E-4,\\n" + + " \\\"timepoint\\\": 1700424000000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 2.3E-4,\\n" + + " \\\"timepoint\\\": 1700395200000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 2.63E-4,\\n" + + " \\\"timepoint\\\": 1700366400000\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"fundingRate\\\": 1.32E-4,\\n" + + " \\\"timepoint\\\": 1700337600000\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -408,35 +410,37 @@ public static void testGetPublicFundingHistoryResponse() throws Exception { /** getPrivateFundingHistory Request Get Private Funding History /api/v1/funding-history */ public static void testGetPrivateFundingHistoryRequest() throws Exception { String data = - "{\"symbol\": \"XBTUSDTM\", \"startAt\": 1700310700000, \"endAt\": 1702310700000," - + " \"reverse\": true, \"offset\": 123456, \"forward\": true, \"maxCount\": 123456}"; + "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"startAt\\\": 1700310700000, \\\"endAt\\\":" + + " 1702310700000, \\\"reverse\\\": true, \\\"offset\\\": 123456, \\\"forward\\\":" + + " true, \\\"maxCount\\\": 123456}"; GetPrivateFundingHistoryReq obj = mapper.readValue(data, GetPrivateFundingHistoryReq.class); } /** getPrivateFundingHistory Response Get Private Funding History /api/v1/funding-history */ public static void testGetPrivateFundingHistoryResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"dataList\": [\n" - + " {\n" - + " \"id\": 1472387374042586,\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"timePoint\": 1731470400000,\n" - + " \"fundingRate\": 6.41E-4,\n" - + " \"markPrice\": 87139.92,\n" - + " \"positionQty\": 1,\n" - + " \"positionCost\": 87.13992,\n" - + " \"funding\": -0.05585669,\n" - + " \"settleCurrency\": \"USDT\",\n" - + " \"context\": \"{\\\"marginMode\\\": \\\"ISOLATED\\\"," - + " \\\"positionSide\\\": \\\"BOTH\\\"}\",\n" - + " \"marginMode\": \"ISOLATED\"\n" - + " }\n" - + " ],\n" - + " \"hasMore\": true\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"dataList\\\": [\\n" + + " {\\n" + + " \\\"id\\\": 1472387374042586,\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"timePoint\\\": 1731470400000,\\n" + + " \\\"fundingRate\\\": 6.41E-4,\\n" + + " \\\"markPrice\\\": 87139.92,\\n" + + " \\\"positionQty\\\": 1,\\n" + + " \\\"positionCost\\\": 87.13992,\\n" + + " \\\"funding\\\": -0.05585669,\\n" + + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"context\\\": \\\"{\\\\\\\"marginMode\\\\\\\":" + + " \\\\\\\"ISOLATED\\\\\\\", \\\\\\\"positionSide\\\\\\\":" + + " \\\\\\\"BOTH\\\\\\\"}\\\",\\n" + + " \\\"marginMode\\\": \\\"ISOLATED\\\"\\n" + + " }\\n" + + " ],\\n" + + " \\\"hasMore\\\": true\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsAutoGeneratedTest.java index 6141e585..ec31e6a0 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsAutoGeneratedTest.java @@ -14,7 +14,7 @@ class FuturesPrivateWsAutoGeneratedTest { /** allOrder All Order change pushes. /allOrder/contractMarket/tradeOrders */ public static void testAllOrderResponse() throws Exception { String data = - "{\"topic\":\"/contractMarket/tradeOrders:XBTUSDTM\",\"type\":\"message\",\"subject\":\"symbolOrderChange\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"symbol\":\"XBTUSDTM\",\"side\":\"buy\",\"canceledSize\":\"0\",\"orderId\":\"247899236673269761\",\"liquidity\":\"maker\",\"marginMode\":\"ISOLATED\",\"type\":\"open\",\"orderTime\":1731916985768138917,\"size\":\"1\",\"filledSize\":\"0\",\"price\":\"91670\",\"remainSize\":\"1\",\"status\":\"open\",\"ts\":1731916985789000000}}"; + "{\\\"topic\\\":\\\"/contractMarket/tradeOrders:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"symbolOrderChange\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\",\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"side\\\":\\\"buy\\\",\\\"canceledSize\\\":\\\"0\\\",\\\"orderId\\\":\\\"247899236673269761\\\",\\\"liquidity\\\":\\\"maker\\\",\\\"marginMode\\\":\\\"ISOLATED\\\",\\\"type\\\":\\\"open\\\",\\\"orderTime\\\":1731916985768138917,\\\"size\\\":\\\"1\\\",\\\"filledSize\\\":\\\"0\\\",\\\"price\\\":\\\"91670\\\",\\\"remainSize\\\":\\\"1\\\",\\\"status\\\":\\\"open\\\",\\\"ts\\\":1731916985789000000}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -22,7 +22,7 @@ public static void testAllOrderResponse() throws Exception { /** allPosition All symbol position change events push /allPosition/contract/positionAll */ public static void testAllPositionResponse() throws Exception { String data = - "{\"topic\":\"/contract/position:XBTUSDTM\",\"type\":\"message\",\"data\":{\"symbol\":\"XBTUSDTM\",\"maintMarginReq\":0.005,\"riskLimit\":500000,\"realLeverage\":4.9685590767,\"crossMode\":false,\"delevPercentage\":0.10,\"openingTimestamp\":1731916913097,\"autoDeposit\":true,\"currentTimestamp\":1731924561514,\"currentQty\":1,\"currentCost\":91.5306,\"currentComm\":0.09179284,\"unrealisedCost\":91.6945,\"realisedCost\":-0.07210716,\"isOpen\":true,\"markPrice\":91839.79,\"markValue\":91.83979,\"posCost\":91.6945,\"posCross\":0,\"posInit\":18.3389,\"posComm\":0.06602004,\"posLoss\":0,\"posMargin\":18.40492004,\"posFunding\":0,\"posMaint\":0.5634627025,\"maintMargin\":18.55021004,\"avgEntryPrice\":91694.5,\"liquidationPrice\":73853.0426625,\"bankruptPrice\":73355.6,\"settleCurrency\":\"USDT\",\"changeReason\":\"positionChange\",\"riskLimitLevel\":2,\"realisedGrossCost\":-0.1639,\"realisedGrossPnl\":0.1639,\"realisedPnl\":0.07210716,\"unrealisedPnl\":0.14529,\"unrealisedPnlPcnt\":0.0016,\"unrealisedRoePcnt\":0.0079,\"leverage\":4.9685590767,\"marginMode\":\"ISOLATED\",\"positionSide\":\"BOTH\"},\"subject\":\"position.change\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\"}"; + "{\\\"topic\\\":\\\"/contract/position:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"maintMarginReq\\\":0.005,\\\"riskLimit\\\":500000,\\\"realLeverage\\\":4.9685590767,\\\"crossMode\\\":false,\\\"delevPercentage\\\":0.10,\\\"openingTimestamp\\\":1731916913097,\\\"autoDeposit\\\":true,\\\"currentTimestamp\\\":1731924561514,\\\"currentQty\\\":1,\\\"currentCost\\\":91.5306,\\\"currentComm\\\":0.09179284,\\\"unrealisedCost\\\":91.6945,\\\"realisedCost\\\":-0.07210716,\\\"isOpen\\\":true,\\\"markPrice\\\":91839.79,\\\"markValue\\\":91.83979,\\\"posCost\\\":91.6945,\\\"posCross\\\":0,\\\"posInit\\\":18.3389,\\\"posComm\\\":0.06602004,\\\"posLoss\\\":0,\\\"posMargin\\\":18.40492004,\\\"posFunding\\\":0,\\\"posMaint\\\":0.5634627025,\\\"maintMargin\\\":18.55021004,\\\"avgEntryPrice\\\":91694.5,\\\"liquidationPrice\\\":73853.0426625,\\\"bankruptPrice\\\":73355.6,\\\"settleCurrency\\\":\\\"USDT\\\",\\\"changeReason\\\":\\\"positionChange\\\",\\\"riskLimitLevel\\\":2,\\\"realisedGrossCost\\\":-0.1639,\\\"realisedGrossPnl\\\":0.1639,\\\"realisedPnl\\\":0.07210716,\\\"unrealisedPnl\\\":0.14529,\\\"unrealisedPnlPcnt\\\":0.0016,\\\"unrealisedRoePcnt\\\":0.0079,\\\"leverage\\\":4.9685590767,\\\"marginMode\\\":\\\"ISOLATED\\\",\\\"positionSide\\\":\\\"BOTH\\\"},\\\"subject\\\":\\\"position.change\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\"}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -30,7 +30,7 @@ public static void testAllPositionResponse() throws Exception { /** balance the balance change push /balance/contractAccount/wallet */ public static void testBalanceResponse() throws Exception { String data = - "{\"topic\":\"/contractAccount/wallet\",\"type\":\"message\",\"subject\":\"walletBalance.change\",\"id\":\"673b0bb925b4bc0001fadfef\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"crossPosMargin\":\"0\",\"isolatedOrderMargin\":\"18.1188\",\"holdBalance\":\"0\",\"equity\":\"81.273621258\",\"version\":\"1337\",\"availableBalance\":\"26.144281178\",\"isolatedPosMargin\":\"36.80984008\",\"walletBalance\":\"81.072921258\",\"isolatedFundingFeeMargin\":\"0\",\"crossUnPnl\":\"0\",\"totalCrossMargin\":\"26.144281178\",\"currency\":\"USDT\",\"isolatedUnPnl\":\"0.2007\",\"crossOrderMargin\":\"0\",\"timestamp\":\"1731916996764\"}}"; + "{\\\"topic\\\":\\\"/contractAccount/wallet\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"walletBalance.change\\\",\\\"id\\\":\\\"673b0bb925b4bc0001fadfef\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\",\\\"data\\\":{\\\"crossPosMargin\\\":\\\"0\\\",\\\"isolatedOrderMargin\\\":\\\"18.1188\\\",\\\"holdBalance\\\":\\\"0\\\",\\\"equity\\\":\\\"81.273621258\\\",\\\"version\\\":\\\"1337\\\",\\\"availableBalance\\\":\\\"26.144281178\\\",\\\"isolatedPosMargin\\\":\\\"36.80984008\\\",\\\"walletBalance\\\":\\\"81.072921258\\\",\\\"isolatedFundingFeeMargin\\\":\\\"0\\\",\\\"crossUnPnl\\\":\\\"0\\\",\\\"totalCrossMargin\\\":\\\"26.144281178\\\",\\\"currency\\\":\\\"USDT\\\",\\\"isolatedUnPnl\\\":\\\"0.2007\\\",\\\"crossOrderMargin\\\":\\\"0\\\",\\\"timestamp\\\":\\\"1731916996764\\\"}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -38,7 +38,7 @@ public static void testBalanceResponse() throws Exception { /** crossLeverage the leverage change push /crossLeverage/contract/crossLeverage */ public static void testCrossLeverageResponse() throws Exception { String data = - "{\"topic\":\"/contract/crossLeverage\",\"type\":\"message\",\"data\":{\"ETHUSDTM\":{\"leverage\":\"8\"}},\"subject\":\"user.config\",\"userId\":\"66f12e8befb04d0001882b49\",\"channelType\":\"private\"}"; + "{\\\"topic\\\":\\\"/contract/crossLeverage\\\",\\\"type\\\":\\\"message\\\",\\\"data\\\":{\\\"ETHUSDTM\\\":{\\\"leverage\\\":\\\"8\\\"}},\\\"subject\\\":\\\"user.config\\\",\\\"userId\\\":\\\"66f12e8befb04d0001882b49\\\",\\\"channelType\\\":\\\"private\\\"}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -46,7 +46,7 @@ public static void testCrossLeverageResponse() throws Exception { /** marginMode the margin mode change /marginMode/contract/marginMode */ public static void testMarginModeResponse() throws Exception { String data = - "{\"topic\":\"/contract/marginMode\",\"type\":\"message\",\"data\":{\"ETHUSDTM\":\"ISOLATED\"},\"subject\":\"user.config\",\"userId\":\"66f12e8befb04d0001882b49\",\"channelType\":\"private\"}"; + "{\\\"topic\\\":\\\"/contract/marginMode\\\",\\\"type\\\":\\\"message\\\",\\\"data\\\":{\\\"ETHUSDTM\\\":\\\"ISOLATED\\\"},\\\"subject\\\":\\\"user.config\\\",\\\"userId\\\":\\\"66f12e8befb04d0001882b49\\\",\\\"channelType\\\":\\\"private\\\"}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -54,7 +54,7 @@ public static void testMarginModeResponse() throws Exception { /** order Order change pushes. /order/contractMarket/tradeOrders:_symbol_ */ public static void testOrderResponse() throws Exception { String data = - "{\"topic\":\"/contractMarket/tradeOrders:XBTUSDTM\",\"type\":\"message\",\"subject\":\"symbolOrderChange\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"symbol\":\"XBTUSDTM\",\"side\":\"buy\",\"canceledSize\":\"0\",\"orderId\":\"247899236673269761\",\"liquidity\":\"maker\",\"marginMode\":\"ISOLATED\",\"type\":\"open\",\"orderTime\":1731916985768138917,\"size\":\"1\",\"filledSize\":\"0\",\"price\":\"91670\",\"remainSize\":\"1\",\"status\":\"open\",\"ts\":1731916985789000000}}"; + "{\\\"topic\\\":\\\"/contractMarket/tradeOrders:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"symbolOrderChange\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\",\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"side\\\":\\\"buy\\\",\\\"canceledSize\\\":\\\"0\\\",\\\"orderId\\\":\\\"247899236673269761\\\",\\\"liquidity\\\":\\\"maker\\\",\\\"marginMode\\\":\\\"ISOLATED\\\",\\\"type\\\":\\\"open\\\",\\\"orderTime\\\":1731916985768138917,\\\"size\\\":\\\"1\\\",\\\"filledSize\\\":\\\"0\\\",\\\"price\\\":\\\"91670\\\",\\\"remainSize\\\":\\\"1\\\",\\\"status\\\":\\\"open\\\",\\\"ts\\\":1731916985789000000}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -62,7 +62,7 @@ public static void testOrderResponse() throws Exception { /** position the position change events push /position/contract/position:_symbol_ */ public static void testPositionResponse() throws Exception { String data = - "{\"topic\":\"/contract/position:XBTUSDTM\",\"type\":\"message\",\"data\":{\"symbol\":\"XBTUSDTM\",\"maintMarginReq\":0.005,\"riskLimit\":500000,\"realLeverage\":4.9685590767,\"crossMode\":false,\"delevPercentage\":0.10,\"openingTimestamp\":1731916913097,\"autoDeposit\":true,\"currentTimestamp\":1731924561514,\"currentQty\":1,\"currentCost\":91.5306,\"currentComm\":0.09179284,\"unrealisedCost\":91.6945,\"realisedCost\":-0.07210716,\"isOpen\":true,\"markPrice\":91839.79,\"markValue\":91.83979,\"posCost\":91.6945,\"posCross\":0,\"posInit\":18.3389,\"posComm\":0.06602004,\"posLoss\":0,\"posMargin\":18.40492004,\"posFunding\":0,\"posMaint\":0.5634627025,\"maintMargin\":18.55021004,\"avgEntryPrice\":91694.5,\"liquidationPrice\":73853.0426625,\"bankruptPrice\":73355.6,\"settleCurrency\":\"USDT\",\"changeReason\":\"positionChange\",\"riskLimitLevel\":2,\"realisedGrossCost\":-0.1639,\"realisedGrossPnl\":0.1639,\"realisedPnl\":0.07210716,\"unrealisedPnl\":0.14529,\"unrealisedPnlPcnt\":0.0016,\"unrealisedRoePcnt\":0.0079,\"leverage\":4.9685590767,\"marginMode\":\"ISOLATED\",\"positionSide\":\"BOTH\"},\"subject\":\"position.change\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\"}"; + "{\\\"topic\\\":\\\"/contract/position:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"maintMarginReq\\\":0.005,\\\"riskLimit\\\":500000,\\\"realLeverage\\\":4.9685590767,\\\"crossMode\\\":false,\\\"delevPercentage\\\":0.10,\\\"openingTimestamp\\\":1731916913097,\\\"autoDeposit\\\":true,\\\"currentTimestamp\\\":1731924561514,\\\"currentQty\\\":1,\\\"currentCost\\\":91.5306,\\\"currentComm\\\":0.09179284,\\\"unrealisedCost\\\":91.6945,\\\"realisedCost\\\":-0.07210716,\\\"isOpen\\\":true,\\\"markPrice\\\":91839.79,\\\"markValue\\\":91.83979,\\\"posCost\\\":91.6945,\\\"posCross\\\":0,\\\"posInit\\\":18.3389,\\\"posComm\\\":0.06602004,\\\"posLoss\\\":0,\\\"posMargin\\\":18.40492004,\\\"posFunding\\\":0,\\\"posMaint\\\":0.5634627025,\\\"maintMargin\\\":18.55021004,\\\"avgEntryPrice\\\":91694.5,\\\"liquidationPrice\\\":73853.0426625,\\\"bankruptPrice\\\":73355.6,\\\"settleCurrency\\\":\\\"USDT\\\",\\\"changeReason\\\":\\\"positionChange\\\",\\\"riskLimitLevel\\\":2,\\\"realisedGrossCost\\\":-0.1639,\\\"realisedGrossPnl\\\":0.1639,\\\"realisedPnl\\\":0.07210716,\\\"unrealisedPnl\\\":0.14529,\\\"unrealisedPnlPcnt\\\":0.0016,\\\"unrealisedRoePcnt\\\":0.0079,\\\"leverage\\\":4.9685590767,\\\"marginMode\\\":\\\"ISOLATED\\\",\\\"positionSide\\\":\\\"BOTH\\\"},\\\"subject\\\":\\\"position.change\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\"}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -70,7 +70,7 @@ public static void testPositionResponse() throws Exception { /** stopOrders stop order change pushes. /stopOrders/contractMarket/advancedOrders */ public static void testStopOrdersResponse() throws Exception { String data = - "{\"topic\":\"/contractMarket/advancedOrders\",\"type\":\"message\",\"data\":{\"createdAt\":1730194206837,\"marginMode\":\"ISOLATED\",\"orderId\":\"240673378116083712\",\"orderPrice\":\"0.1\",\"orderType\":\"stop\",\"side\":\"buy\",\"size\":1,\"stop\":\"down\",\"stopPrice\":\"1000\",\"stopPriceType\":\"TP\",\"symbol\":\"XBTUSDTM\",\"ts\":1730194206843133000,\"type\":\"open\"},\"subject\":\"stopOrder\",\"id\":\"6720ab1ea52a9b0001734392\",\"userId\":\"66f12e8befb04d0001882b49\",\"channelType\":\"private\"}"; + "{\\\"topic\\\":\\\"/contractMarket/advancedOrders\\\",\\\"type\\\":\\\"message\\\",\\\"data\\\":{\\\"createdAt\\\":1730194206837,\\\"marginMode\\\":\\\"ISOLATED\\\",\\\"orderId\\\":\\\"240673378116083712\\\",\\\"orderPrice\\\":\\\"0.1\\\",\\\"orderType\\\":\\\"stop\\\",\\\"side\\\":\\\"buy\\\",\\\"size\\\":1,\\\"stop\\\":\\\"down\\\",\\\"stopPrice\\\":\\\"1000\\\",\\\"stopPriceType\\\":\\\"TP\\\",\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"ts\\\":1730194206843133000,\\\"type\\\":\\\"open\\\"},\\\"subject\\\":\\\"stopOrder\\\",\\\"id\\\":\\\"6720ab1ea52a9b0001734392\\\",\\\"userId\\\":\\\"66f12e8befb04d0001882b49\\\",\\\"channelType\\\":\\\"private\\\"}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsAutoGeneratedTest.java index 09ba5af8..169c66e2 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsAutoGeneratedTest.java @@ -14,7 +14,7 @@ class FuturesPublicWsAutoGeneratedTest { /** announcement announcement /announcement/contract/announcement:_symbol_ */ public static void testAnnouncementResponse() throws Exception { String data = - "{\"topic\":\"/contract/announcement\",\"subject\":\"funding.begin\",\"data\":{\"symbol\":\"XBTUSDTM\",\"fundingTime\":1551770400000,\"fundingRate\":-0.002966,\"timestamp\":1551770400000}}"; + "{\\\"topic\\\":\\\"/contract/announcement\\\",\\\"subject\\\":\\\"funding.begin\\\",\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"fundingTime\\\":1551770400000,\\\"fundingRate\\\":-0.002966,\\\"timestamp\\\":1551770400000}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -22,7 +22,7 @@ public static void testAnnouncementResponse() throws Exception { /** execution Match execution data. /execution/contractMarket/execution:_symbol_ */ public static void testExecutionResponse() throws Exception { String data = - "{\"topic\":\"/contractMarket/execution:XBTUSDTM\",\"type\":\"message\",\"subject\":\"match\",\"sn\":1794100537695,\"data\":{\"symbol\":\"XBTUSDTM\",\"sequence\":1794100537695,\"side\":\"buy\",\"size\":2,\"price\":\"90503.9\",\"takerOrderId\":\"247822202957807616\",\"makerOrderId\":\"247822167163555840\",\"tradeId\":\"1794100537695\",\"ts\":1731898619520000000}}"; + "{\\\"topic\\\":\\\"/contractMarket/execution:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"match\\\",\\\"sn\\\":1794100537695,\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"sequence\\\":1794100537695,\\\"side\\\":\\\"buy\\\",\\\"size\\\":2,\\\"price\\\":\\\"90503.9\\\",\\\"takerOrderId\\\":\\\"247822202957807616\\\",\\\"makerOrderId\\\":\\\"247822167163555840\\\",\\\"tradeId\\\":\\\"1794100537695\\\",\\\"ts\\\":1731898619520000000}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -30,7 +30,7 @@ public static void testExecutionResponse() throws Exception { /** instrument instrument /instrument/contract/instrument:_symbol_ */ public static void testInstrumentResponse() throws Exception { String data = - "{\"topic\":\"/contract/instrument:XBTUSDTM\",\"type\":\"message\",\"subject\":\"mark.index.price\",\"data\":{\"markPrice\":90445.02,\"indexPrice\":90445.02,\"granularity\":1000,\"timestamp\":1731899129000}}"; + "{\\\"topic\\\":\\\"/contract/instrument:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"mark.index.price\\\",\\\"data\\\":{\\\"markPrice\\\":90445.02,\\\"indexPrice\\\":90445.02,\\\"granularity\\\":1000,\\\"timestamp\\\":1731899129000}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -38,7 +38,7 @@ public static void testInstrumentResponse() throws Exception { /** klines Klines /klines/contractMarket/limitCandle:_symbol___type_ */ public static void testKlinesResponse() throws Exception { String data = - "{\"topic\":\"/contractMarket/limitCandle:XBTUSDTM_1min\",\"type\":\"message\",\"data\":{\"symbol\":\"XBTUSDTM\",\"candles\":[\"1731898200\",\"90638.6\",\"90638.6\",\"90638.6\",\"90638.6\",\"21.0\",\"21\"],\"time\":1731898208357},\"subject\":\"candle.stick\"}"; + "{\\\"topic\\\":\\\"/contractMarket/limitCandle:XBTUSDTM_1min\\\",\\\"type\\\":\\\"message\\\",\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"candles\\\":[\\\"1731898200\\\",\\\"90638.6\\\",\\\"90638.6\\\",\\\"90638.6\\\",\\\"90638.6\\\",\\\"21.0\\\",\\\"21\\\"],\\\"time\\\":1731898208357},\\\"subject\\\":\\\"candle.stick\\\"}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -46,7 +46,7 @@ public static void testKlinesResponse() throws Exception { /** orderbookIncrement Orderbook - Increment /orderbookIncrement/contractMarket/level2:_symbol_ */ public static void testOrderbookIncrementResponse() throws Exception { String data = - "{\"topic\":\"/contractMarket/level2:XBTUSDTM\",\"type\":\"message\",\"subject\":\"level2\",\"sn\":1709400450243,\"data\":{\"sequence\":1709400450243,\"change\":\"90631.2,sell,2\",\"timestamp\":1731897467182}}"; + "{\\\"topic\\\":\\\"/contractMarket/level2:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"level2\\\",\\\"sn\\\":1709400450243,\\\"data\\\":{\\\"sequence\\\":1709400450243,\\\"change\\\":\\\"90631.2,sell,2\\\",\\\"timestamp\\\":1731897467182}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -56,7 +56,7 @@ public static void testOrderbookIncrementResponse() throws Exception { */ public static void testOrderbookLevel50Response() throws Exception { String data = - "{\"topic\":\"/contractMarket/level2Depth50:XBTUSDTM\",\"type\":\"message\",\"subject\":\"level2\",\"sn\":1731680249700,\"data\":{\"bids\":[[\"89778.6\",1534],[\"89778.2\",54]],\"sequence\":1709294490099,\"timestamp\":1731680249700,\"ts\":1731680249700,\"asks\":[[\"89778.7\",854],[\"89779.2\",4]]}}"; + "{\\\"topic\\\":\\\"/contractMarket/level2Depth50:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"level2\\\",\\\"sn\\\":1731680249700,\\\"data\\\":{\\\"bids\\\":[[\\\"89778.6\\\",1534],[\\\"89778.2\\\",54]],\\\"sequence\\\":1709294490099,\\\"timestamp\\\":1731680249700,\\\"ts\\\":1731680249700,\\\"asks\\\":[[\\\"89778.7\\\",854],[\\\"89779.2\\\",4]]}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -64,7 +64,7 @@ public static void testOrderbookLevel50Response() throws Exception { /** orderbookLevel5 Orderbook - Level5 /orderbookLevel5/contractMarket/level2Depth5:_symbol_ */ public static void testOrderbookLevel5Response() throws Exception { String data = - "{\"topic\":\"/contractMarket/level2Depth5:XBTUSDTM\",\"type\":\"message\",\"subject\":\"level2\",\"sn\":1731680019100,\"data\":{\"bids\":[[\"89720.9\",513],[\"89720.8\",12],[\"89718.6\",113],[\"89718.4\",19],[\"89718.3\",7]],\"sequence\":1709294294670,\"timestamp\":1731680019100,\"ts\":1731680019100,\"asks\":[[\"89721\",906],[\"89721.1\",203],[\"89721.4\",113],[\"89723.2\",113],[\"89725.4\",113]]}}"; + "{\\\"topic\\\":\\\"/contractMarket/level2Depth5:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"level2\\\",\\\"sn\\\":1731680019100,\\\"data\\\":{\\\"bids\\\":[[\\\"89720.9\\\",513],[\\\"89720.8\\\",12],[\\\"89718.6\\\",113],[\\\"89718.4\\\",19],[\\\"89718.3\\\",7]],\\\"sequence\\\":1709294294670,\\\"timestamp\\\":1731680019100,\\\"ts\\\":1731680019100,\\\"asks\\\":[[\\\"89721\\\",906],[\\\"89721.1\\\",203],[\\\"89721.4\\\",113],[\\\"89723.2\\\",113],[\\\"89725.4\\\",113]]}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -72,7 +72,7 @@ public static void testOrderbookLevel5Response() throws Exception { /** symbolSnapshot Symbol Snapshot /symbolSnapshot/contractMarket/snapshot:_symbol_ */ public static void testSymbolSnapshotResponse() throws Exception { String data = - "{\"topic\":\"/contractMarket/snapshot:XBTUSDTM\",\"type\":\"message\",\"subject\":\"snapshot.24h\",\"id\":\"673ab3fff4088b0001664f41\",\"data\":{\"highPrice\":91512.8,\"lastPrice\":90326.7,\"lowPrice\":88747.8,\"price24HoursBefore\":89880.4,\"priceChg\":446.3,\"priceChgPct\":0.0049,\"symbol\":\"XBTUSDTM\",\"ts\":1731900415023929239,\"turnover\":526928331.0482177734,\"volume\":5834.46}}"; + "{\\\"topic\\\":\\\"/contractMarket/snapshot:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"snapshot.24h\\\",\\\"id\\\":\\\"673ab3fff4088b0001664f41\\\",\\\"data\\\":{\\\"highPrice\\\":91512.8,\\\"lastPrice\\\":90326.7,\\\"lowPrice\\\":88747.8,\\\"price24HoursBefore\\\":89880.4,\\\"priceChg\\\":446.3,\\\"priceChgPct\\\":0.0049,\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"ts\\\":1731900415023929239,\\\"turnover\\\":526928331.0482177734,\\\"volume\\\":5834.46}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -80,7 +80,7 @@ public static void testSymbolSnapshotResponse() throws Exception { /** tickerV1 Get Ticker(not recommended) /tickerV1/contractMarket/ticker:_symbol_ */ public static void testTickerV1Response() throws Exception { String data = - "{\"topic\":\"/contractMarket/ticker:XBTUSDTM\",\"type\":\"message\",\"subject\":\"ticker\",\"sn\":1793133570931,\"data\":{\"symbol\":\"XBTUSDTM\",\"sequence\":1793133570931,\"side\":\"sell\",\"size\":1,\"price\":\"90147.7\",\"bestBidSize\":2186,\"bestBidPrice\":\"90147.7\",\"bestAskPrice\":\"90147.8\",\"tradeId\":\"1793133570931\",\"bestAskSize\":275,\"ts\":1731679215637000000}}"; + "{\\\"topic\\\":\\\"/contractMarket/ticker:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"ticker\\\",\\\"sn\\\":1793133570931,\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"sequence\\\":1793133570931,\\\"side\\\":\\\"sell\\\",\\\"size\\\":1,\\\"price\\\":\\\"90147.7\\\",\\\"bestBidSize\\\":2186,\\\"bestBidPrice\\\":\\\"90147.7\\\",\\\"bestAskPrice\\\":\\\"90147.8\\\",\\\"tradeId\\\":\\\"1793133570931\\\",\\\"bestAskSize\\\":275,\\\"ts\\\":1731679215637000000}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -88,7 +88,7 @@ public static void testTickerV1Response() throws Exception { /** tickerV2 Get Ticker V2 /tickerV2/contractMarket/tickerV2:_symbol_ */ public static void testTickerV2Response() throws Exception { String data = - "{\"topic\":\"/contractMarket/tickerV2:XBTUSDTM\",\"type\":\"message\",\"subject\":\"tickerV2\",\"sn\":1709284589209,\"data\":{\"symbol\":\"XBTUSDTM\",\"sequence\":1709284589209,\"bestBidSize\":713,\"bestBidPrice\":\"88987.4\",\"bestAskPrice\":\"88987.5\",\"bestAskSize\":1037,\"ts\":1731665526461000000}}"; + "{\\\"topic\\\":\\\"/contractMarket/tickerV2:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"tickerV2\\\",\\\"sn\\\":1709284589209,\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"sequence\\\":1709284589209,\\\"bestBidSize\\\":713,\\\"bestBidPrice\\\":\\\"88987.4\\\",\\\"bestAskPrice\\\":\\\"88987.5\\\",\\\"bestAskSize\\\":1037,\\\"ts\\\":1731665526461000000}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetKlinesReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetKlinesReq.java index 86c90547..05638662 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetKlinesReq.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetKlinesReq.java @@ -61,14 +61,14 @@ public enum GranularityEnum { /** 1week */ _10080(10080); - private final Long value; + private final Integer value; - GranularityEnum(Long value) { + GranularityEnum(Integer value) { this.value = value; } @JsonValue - public Long getValue() { + public Integer getValue() { return value; } @@ -78,7 +78,7 @@ public String toString() { } @JsonCreator - public static GranularityEnum fromValue(Long value) { + public static GranularityEnum fromValue(Integer value) { for (GranularityEnum b : GranularityEnum.values()) { if (b.value.equals(value)) { return b; diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiAutoGeneratedTest.java index 78d7edcd..297edd1e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiAutoGeneratedTest.java @@ -13,88 +13,88 @@ class MarketApiAutoGeneratedTest { /** getSymbol Request Get Symbol /api/v1/contracts/{symbol} */ public static void testGetSymbolRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; GetSymbolReq obj = mapper.readValue(data, GetSymbolReq.class); } /** getSymbol Response Get Symbol /api/v1/contracts/{symbol} */ public static void testGetSymbolResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -108,83 +108,83 @@ public static void testGetAllSymbolsRequest() throws Exception { /** getAllSymbols Response Get All Symbols /api/v1/contracts/active */ public static void testGetAllSymbolsResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -192,14 +192,14 @@ public static void testGetAllSymbolsResponse() throws Exception { /** getTicker Request Get Ticker /api/v1/ticker */ public static void testGetTickerRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; GetTickerReq obj = mapper.readValue(data, GetTickerReq.class); } /** getTicker Response Get Ticker /api/v1/ticker */ public static void testGetTickerResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"sequence\":1697895100310,\"symbol\":\"XBTUSDM\",\"side\":\"sell\",\"size\":2936,\"tradeId\":\"1697901180000\",\"price\":\"67158.4\",\"bestBidPrice\":\"67169.6\",\"bestBidSize\":32345,\"bestAskPrice\":\"67169.7\",\"bestAskSize\":7251,\"ts\":1729163001780000000}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"sequence\\\":1697895100310,\\\"symbol\\\":\\\"XBTUSDM\\\",\\\"side\\\":\\\"sell\\\",\\\"size\\\":2936,\\\"tradeId\\\":\\\"1697901180000\\\",\\\"price\\\":\\\"67158.4\\\",\\\"bestBidPrice\\\":\\\"67169.6\\\",\\\"bestBidSize\\\":32345,\\\"bestAskPrice\\\":\\\"67169.7\\\",\\\"bestAskSize\\\":7251,\\\"ts\\\":1729163001780000000}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -212,36 +212,36 @@ public static void testGetAllTickersRequest() throws Exception { /** getAllTickers Response Get All Tickers /api/v1/allTickers */ public static void testGetAllTickersResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"sequence\": 1707992727046,\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"side\": \"sell\",\n" - + " \"size\": 21,\n" - + " \"tradeId\": \"1784299761369\",\n" - + " \"price\": \"67153\",\n" - + " \"bestBidPrice\": \"67153\",\n" - + " \"bestBidSize\": 2767,\n" - + " \"bestAskPrice\": \"67153.1\",\n" - + " \"bestAskSize\": 5368,\n" - + " \"ts\": 1729163466659000000\n" - + " },\n" - + " {\n" - + " \"sequence\": 1697895166299,\n" - + " \"symbol\": \"XBTUSDM\",\n" - + " \"side\": \"sell\",\n" - + " \"size\": 1956,\n" - + " \"tradeId\": \"1697901245065\",\n" - + " \"price\": \"67145.2\",\n" - + " \"bestBidPrice\": \"67135.3\",\n" - + " \"bestBidSize\": 1,\n" - + " \"bestAskPrice\": \"67135.8\",\n" - + " \"bestAskSize\": 3,\n" - + " \"ts\": 1729163445340000000\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"sequence\\\": 1707992727046,\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"side\\\": \\\"sell\\\",\\n" + + " \\\"size\\\": 21,\\n" + + " \\\"tradeId\\\": \\\"1784299761369\\\",\\n" + + " \\\"price\\\": \\\"67153\\\",\\n" + + " \\\"bestBidPrice\\\": \\\"67153\\\",\\n" + + " \\\"bestBidSize\\\": 2767,\\n" + + " \\\"bestAskPrice\\\": \\\"67153.1\\\",\\n" + + " \\\"bestAskSize\\\": 5368,\\n" + + " \\\"ts\\\": 1729163466659000000\\n" + + " },\\n" + + " {\\n" + + " \\\"sequence\\\": 1697895166299,\\n" + + " \\\"symbol\\\": \\\"XBTUSDM\\\",\\n" + + " \\\"side\\\": \\\"sell\\\",\\n" + + " \\\"size\\\": 1956,\\n" + + " \\\"tradeId\\\": \\\"1697901245065\\\",\\n" + + " \\\"price\\\": \\\"67145.2\\\",\\n" + + " \\\"bestBidPrice\\\": \\\"67135.3\\\",\\n" + + " \\\"bestBidSize\\\": 1,\\n" + + " \\\"bestAskPrice\\\": \\\"67135.8\\\",\\n" + + " \\\"bestAskSize\\\": 3,\\n" + + " \\\"ts\\\": 1729163445340000000\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -249,40 +249,40 @@ public static void testGetAllTickersResponse() throws Exception { /** getFullOrderBook Request Get Full OrderBook /api/v1/level2/snapshot */ public static void testGetFullOrderBookRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDM\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDM\\\"}"; GetFullOrderBookReq obj = mapper.readValue(data, GetFullOrderBookReq.class); } /** getFullOrderBook Response Get Full OrderBook /api/v1/level2/snapshot */ public static void testGetFullOrderBookResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"sequence\": 1697895963339,\n" - + " \"symbol\": \"XBTUSDM\",\n" - + " \"bids\": [\n" - + " [\n" - + " 66968,\n" - + " 2\n" - + " ],\n" - + " [\n" - + " 66964.8,\n" - + " 25596\n" - + " ]\n" - + " ],\n" - + " \"asks\": [\n" - + " [\n" - + " 66968.1,\n" - + " 13501\n" - + " ],\n" - + " [\n" - + " 66968.7,\n" - + " 2032\n" - + " ]\n" - + " ],\n" - + " \"ts\": 1729168101216000000\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"sequence\\\": 1697895963339,\\n" + + " \\\"symbol\\\": \\\"XBTUSDM\\\",\\n" + + " \\\"bids\\\": [\\n" + + " [\\n" + + " 66968,\\n" + + " 2\\n" + + " ],\\n" + + " [\\n" + + " 66964.8,\\n" + + " 25596\\n" + + " ]\\n" + + " ],\\n" + + " \\\"asks\\\": [\\n" + + " [\\n" + + " 66968.1,\\n" + + " 13501\\n" + + " ],\\n" + + " [\\n" + + " 66968.7,\\n" + + " 2032\\n" + + " ]\\n" + + " ],\\n" + + " \\\"ts\\\": 1729168101216000000\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -290,40 +290,40 @@ public static void testGetFullOrderBookResponse() throws Exception { /** getPartOrderBook Request Get Part OrderBook /api/v1/level2/depth{size} */ public static void testGetPartOrderBookRequest() throws Exception { - String data = "{\"size\": \"20\", \"symbol\": \"XBTUSDM\"}"; + String data = "{\\\"size\\\": \\\"20\\\", \\\"symbol\\\": \\\"XBTUSDM\\\"}"; GetPartOrderBookReq obj = mapper.readValue(data, GetPartOrderBookReq.class); } /** getPartOrderBook Response Get Part OrderBook /api/v1/level2/depth{size} */ public static void testGetPartOrderBookResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"sequence\": 1697895963339,\n" - + " \"symbol\": \"XBTUSDM\",\n" - + " \"bids\": [\n" - + " [\n" - + " 66968,\n" - + " 2\n" - + " ],\n" - + " [\n" - + " 66964.8,\n" - + " 25596\n" - + " ]\n" - + " ],\n" - + " \"asks\": [\n" - + " [\n" - + " 66968.1,\n" - + " 13501\n" - + " ],\n" - + " [\n" - + " 66968.7,\n" - + " 2032\n" - + " ]\n" - + " ],\n" - + " \"ts\": 1729168101216000000\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"sequence\\\": 1697895963339,\\n" + + " \\\"symbol\\\": \\\"XBTUSDM\\\",\\n" + + " \\\"bids\\\": [\\n" + + " [\\n" + + " 66968,\\n" + + " 2\\n" + + " ],\\n" + + " [\\n" + + " 66964.8,\\n" + + " 25596\\n" + + " ]\\n" + + " ],\\n" + + " \\\"asks\\\": [\\n" + + " [\\n" + + " 66968.1,\\n" + + " 13501\\n" + + " ],\\n" + + " [\\n" + + " 66968.7,\\n" + + " 2032\\n" + + " ]\\n" + + " ],\\n" + + " \\\"ts\\\": 1729168101216000000\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -331,50 +331,50 @@ public static void testGetPartOrderBookResponse() throws Exception { /** getTradeHistory Request Get Trade History /api/v1/trade/history */ public static void testGetTradeHistoryRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDM\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDM\\\"}"; GetTradeHistoryReq obj = mapper.readValue(data, GetTradeHistoryReq.class); } /** getTradeHistory Response Get Trade History /api/v1/trade/history */ public static void testGetTradeHistoryResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"sequence\": 1697915257909,\n" - + " \"contractId\": 1,\n" - + " \"tradeId\": \"1697915257909\",\n" - + " \"makerOrderId\": \"236679665752801280\",\n" - + " \"takerOrderId\": \"236679667975745536\",\n" - + " \"ts\": 1729242032152000000,\n" - + " \"size\": 1,\n" - + " \"price\": \"67878\",\n" - + " \"side\": \"sell\"\n" - + " },\n" - + " {\n" - + " \"sequence\": 1697915257749,\n" - + " \"contractId\": 1,\n" - + " \"tradeId\": \"1697915257749\",\n" - + " \"makerOrderId\": \"236679660971245570\",\n" - + " \"takerOrderId\": \"236679665400492032\",\n" - + " \"ts\": 1729242031535000000,\n" - + " \"size\": 1,\n" - + " \"price\": \"67867.8\",\n" - + " \"side\": \"sell\"\n" - + " },\n" - + " {\n" - + " \"sequence\": 1697915257701,\n" - + " \"contractId\": 1,\n" - + " \"tradeId\": \"1697915257701\",\n" - + " \"makerOrderId\": \"236679660971245570\",\n" - + " \"takerOrderId\": \"236679661919211521\",\n" - + " \"ts\": 1729242030932000000,\n" - + " \"size\": 1,\n" - + " \"price\": \"67867.8\",\n" - + " \"side\": \"sell\"\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"sequence\\\": 1697915257909,\\n" + + " \\\"contractId\\\": 1,\\n" + + " \\\"tradeId\\\": \\\"1697915257909\\\",\\n" + + " \\\"makerOrderId\\\": \\\"236679665752801280\\\",\\n" + + " \\\"takerOrderId\\\": \\\"236679667975745536\\\",\\n" + + " \\\"ts\\\": 1729242032152000000,\\n" + + " \\\"size\\\": 1,\\n" + + " \\\"price\\\": \\\"67878\\\",\\n" + + " \\\"side\\\": \\\"sell\\\"\\n" + + " },\\n" + + " {\\n" + + " \\\"sequence\\\": 1697915257749,\\n" + + " \\\"contractId\\\": 1,\\n" + + " \\\"tradeId\\\": \\\"1697915257749\\\",\\n" + + " \\\"makerOrderId\\\": \\\"236679660971245570\\\",\\n" + + " \\\"takerOrderId\\\": \\\"236679665400492032\\\",\\n" + + " \\\"ts\\\": 1729242031535000000,\\n" + + " \\\"size\\\": 1,\\n" + + " \\\"price\\\": \\\"67867.8\\\",\\n" + + " \\\"side\\\": \\\"sell\\\"\\n" + + " },\\n" + + " {\\n" + + " \\\"sequence\\\": 1697915257701,\\n" + + " \\\"contractId\\\": 1,\\n" + + " \\\"tradeId\\\": \\\"1697915257701\\\",\\n" + + " \\\"makerOrderId\\\": \\\"236679660971245570\\\",\\n" + + " \\\"takerOrderId\\\": \\\"236679661919211521\\\",\\n" + + " \\\"ts\\\": 1729242030932000000,\\n" + + " \\\"size\\\": 1,\\n" + + " \\\"price\\\": \\\"67867.8\\\",\\n" + + " \\\"side\\\": \\\"sell\\\"\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -383,42 +383,42 @@ public static void testGetTradeHistoryResponse() throws Exception { /** getKlines Request Get Klines /api/v1/kline/query */ public static void testGetKlinesRequest() throws Exception { String data = - "{\"symbol\": \"XBTUSDTM\", \"granularity\": 1, \"from\": 1728552342000, \"to\":" - + " 1729243542000}"; + "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"granularity\\\": 1, \\\"from\\\": 1728552342000," + + " \\\"to\\\": 1729243542000}"; GetKlinesReq obj = mapper.readValue(data, GetKlinesReq.class); } /** getKlines Response Get Klines /api/v1/kline/query */ public static void testGetKlinesResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " [\n" - + " 1728576000000,\n" - + " 60791.1,\n" - + " 61035,\n" - + " 58940,\n" - + " 60300,\n" - + " 5501167\n" - + " ],\n" - + " [\n" - + " 1728604800000,\n" - + " 60299.9,\n" - + " 60924.1,\n" - + " 60077.4,\n" - + " 60666.1,\n" - + " 1220980\n" - + " ],\n" - + " [\n" - + " 1728633600000,\n" - + " 60665.7,\n" - + " 62436.8,\n" - + " 60650.1,\n" - + " 62255.1,\n" - + " 3386359\n" - + " ]\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " [\\n" + + " 1728576000000,\\n" + + " 60791.1,\\n" + + " 61035,\\n" + + " 58940,\\n" + + " 60300,\\n" + + " 5501167\\n" + + " ],\\n" + + " [\\n" + + " 1728604800000,\\n" + + " 60299.9,\\n" + + " 60924.1,\\n" + + " 60077.4,\\n" + + " 60666.1,\\n" + + " 1220980\\n" + + " ],\\n" + + " [\\n" + + " 1728633600000,\\n" + + " 60665.7,\\n" + + " 62436.8,\\n" + + " 60650.1,\\n" + + " 62255.1,\\n" + + " 3386359\\n" + + " ]\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -426,14 +426,14 @@ public static void testGetKlinesResponse() throws Exception { /** getMarkPrice Request Get Mark Price /api/v1/mark-price/{symbol}/current */ public static void testGetMarkPriceRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; GetMarkPriceReq obj = mapper.readValue(data, GetMarkPriceReq.class); } /** getMarkPrice Response Get Mark Price /api/v1/mark-price/{symbol}/current */ public static void testGetMarkPriceResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"symbol\":\"XBTUSDTM\",\"granularity\":1000,\"timePoint\":1729254307000,\"value\":67687.08,\"indexPrice\":67683.58}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"granularity\\\":1000,\\\"timePoint\\\":1729254307000,\\\"value\\\":67687.08,\\\"indexPrice\\\":67683.58}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -441,97 +441,98 @@ public static void testGetMarkPriceResponse() throws Exception { /** getSpotIndexPrice Request Get Spot Index Price /api/v1/index/query */ public static void testGetSpotIndexPriceRequest() throws Exception { String data = - "{\"symbol\": \".KXBTUSDT\", \"startAt\": 123456, \"endAt\": 123456, \"reverse\": true," - + " \"offset\": 123456, \"forward\": true, \"maxCount\": 10}"; + "{\\\"symbol\\\": \\\".KXBTUSDT\\\", \\\"startAt\\\": 123456, \\\"endAt\\\": 123456," + + " \\\"reverse\\\": true, \\\"offset\\\": 123456, \\\"forward\\\": true," + + " \\\"maxCount\\\": 10}"; GetSpotIndexPriceReq obj = mapper.readValue(data, GetSpotIndexPriceReq.class); } /** getSpotIndexPrice Response Get Spot Index Price /api/v1/index/query */ public static void testGetSpotIndexPriceResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"hasMore\": true,\n" - + " \"dataList\": [\n" - + " {\n" - + " \"symbol\": \".KXBTUSDT\",\n" - + " \"granularity\": 1000,\n" - + " \"timePoint\": 1730557515000,\n" - + " \"value\": 69202.94,\n" - + " \"decomposionList\": [\n" - + " {\n" - + " \"exchange\": \"gateio\",\n" - + " \"price\": 69209.27,\n" - + " \"weight\": 0.0533\n" - + " },\n" - + " {\n" - + " \"exchange\": \"bitmart\",\n" - + " \"price\": 69230.77,\n" - + " \"weight\": 0.0128\n" - + " },\n" - + " {\n" - + " \"exchange\": \"okex\",\n" - + " \"price\": 69195.34,\n" - + " \"weight\": 0.11\n" - + " },\n" - + " {\n" - + " \"exchange\": \"bybit\",\n" - + " \"price\": 69190.33,\n" - + " \"weight\": 0.0676\n" - + " },\n" - + " {\n" - + " \"exchange\": \"binance\",\n" - + " \"price\": 69204.55,\n" - + " \"weight\": 0.6195\n" - + " },\n" - + " {\n" - + " \"exchange\": \"kucoin\",\n" - + " \"price\": 69202.91,\n" - + " \"weight\": 0.1368\n" - + " }\n" - + " ]\n" - + " },\n" - + " {\n" - + " \"symbol\": \".KXBTUSDT\",\n" - + " \"granularity\": 1000,\n" - + " \"timePoint\": 1730557514000,\n" - + " \"value\": 69204.98,\n" - + " \"decomposionList\": [\n" - + " {\n" - + " \"exchange\": \"gateio\",\n" - + " \"price\": 69212.71,\n" - + " \"weight\": 0.0808\n" - + " },\n" - + " {\n" - + " \"exchange\": \"bitmart\",\n" - + " \"price\": 69230.77,\n" - + " \"weight\": 0.0134\n" - + " },\n" - + " {\n" - + " \"exchange\": \"okex\",\n" - + " \"price\": 69195.49,\n" - + " \"weight\": 0.0536\n" - + " },\n" - + " {\n" - + " \"exchange\": \"bybit\",\n" - + " \"price\": 69195.97,\n" - + " \"weight\": 0.0921\n" - + " },\n" - + " {\n" - + " \"exchange\": \"binance\",\n" - + " \"price\": 69204.56,\n" - + " \"weight\": 0.5476\n" - + " },\n" - + " {\n" - + " \"exchange\": \"kucoin\",\n" - + " \"price\": 69207.8,\n" - + " \"weight\": 0.2125\n" - + " }\n" - + " ]\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"hasMore\\\": true,\\n" + + " \\\"dataList\\\": [\\n" + + " {\\n" + + " \\\"symbol\\\": \\\".KXBTUSDT\\\",\\n" + + " \\\"granularity\\\": 1000,\\n" + + " \\\"timePoint\\\": 1730557515000,\\n" + + " \\\"value\\\": 69202.94,\\n" + + " \\\"decomposionList\\\": [\\n" + + " {\\n" + + " \\\"exchange\\\": \\\"gateio\\\",\\n" + + " \\\"price\\\": 69209.27,\\n" + + " \\\"weight\\\": 0.0533\\n" + + " },\\n" + + " {\\n" + + " \\\"exchange\\\": \\\"bitmart\\\",\\n" + + " \\\"price\\\": 69230.77,\\n" + + " \\\"weight\\\": 0.0128\\n" + + " },\\n" + + " {\\n" + + " \\\"exchange\\\": \\\"okex\\\",\\n" + + " \\\"price\\\": 69195.34,\\n" + + " \\\"weight\\\": 0.11\\n" + + " },\\n" + + " {\\n" + + " \\\"exchange\\\": \\\"bybit\\\",\\n" + + " \\\"price\\\": 69190.33,\\n" + + " \\\"weight\\\": 0.0676\\n" + + " },\\n" + + " {\\n" + + " \\\"exchange\\\": \\\"binance\\\",\\n" + + " \\\"price\\\": 69204.55,\\n" + + " \\\"weight\\\": 0.6195\\n" + + " },\\n" + + " {\\n" + + " \\\"exchange\\\": \\\"kucoin\\\",\\n" + + " \\\"price\\\": 69202.91,\\n" + + " \\\"weight\\\": 0.1368\\n" + + " }\\n" + + " ]\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\".KXBTUSDT\\\",\\n" + + " \\\"granularity\\\": 1000,\\n" + + " \\\"timePoint\\\": 1730557514000,\\n" + + " \\\"value\\\": 69204.98,\\n" + + " \\\"decomposionList\\\": [\\n" + + " {\\n" + + " \\\"exchange\\\": \\\"gateio\\\",\\n" + + " \\\"price\\\": 69212.71,\\n" + + " \\\"weight\\\": 0.0808\\n" + + " },\\n" + + " {\\n" + + " \\\"exchange\\\": \\\"bitmart\\\",\\n" + + " \\\"price\\\": 69230.77,\\n" + + " \\\"weight\\\": 0.0134\\n" + + " },\\n" + + " {\\n" + + " \\\"exchange\\\": \\\"okex\\\",\\n" + + " \\\"price\\\": 69195.49,\\n" + + " \\\"weight\\\": 0.0536\\n" + + " },\\n" + + " {\\n" + + " \\\"exchange\\\": \\\"bybit\\\",\\n" + + " \\\"price\\\": 69195.97,\\n" + + " \\\"weight\\\": 0.0921\\n" + + " },\\n" + + " {\\n" + + " \\\"exchange\\\": \\\"binance\\\",\\n" + + " \\\"price\\\": 69204.56,\\n" + + " \\\"weight\\\": 0.5476\\n" + + " },\\n" + + " {\\n" + + " \\\"exchange\\\": \\\"kucoin\\\",\\n" + + " \\\"price\\\": 69207.8,\\n" + + " \\\"weight\\\": 0.2125\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -540,34 +541,34 @@ public static void testGetSpotIndexPriceResponse() throws Exception { /** getInterestRateIndex Request Get Interest Rate Index /api/v1/interest/query */ public static void testGetInterestRateIndexRequest() throws Exception { String data = - "{\"symbol\": \".XBTINT8H\", \"startAt\": 1728663338000, \"endAt\": 1728692138000," - + " \"reverse\": true, \"offset\": 254062248624417, \"forward\": true, \"maxCount\":" - + " 10}"; + "{\\\"symbol\\\": \\\".XBTINT8H\\\", \\\"startAt\\\": 1728663338000, \\\"endAt\\\":" + + " 1728692138000, \\\"reverse\\\": true, \\\"offset\\\": 254062248624417," + + " \\\"forward\\\": true, \\\"maxCount\\\": 10}"; GetInterestRateIndexReq obj = mapper.readValue(data, GetInterestRateIndexReq.class); } /** getInterestRateIndex Response Get Interest Rate Index /api/v1/interest/query */ public static void testGetInterestRateIndexResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"dataList\": [\n" - + " {\n" - + " \"symbol\": \".XBTINT\",\n" - + " \"granularity\": 60000,\n" - + " \"timePoint\": 1728692100000,\n" - + " \"value\": 3.0E-4\n" - + " },\n" - + " {\n" - + " \"symbol\": \".XBTINT\",\n" - + " \"granularity\": 60000,\n" - + " \"timePoint\": 1728692040000,\n" - + " \"value\": 3.0E-4\n" - + " }\n" - + " ],\n" - + " \"hasMore\": true\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"dataList\\\": [\\n" + + " {\\n" + + " \\\"symbol\\\": \\\".XBTINT\\\",\\n" + + " \\\"granularity\\\": 60000,\\n" + + " \\\"timePoint\\\": 1728692100000,\\n" + + " \\\"value\\\": 3.0E-4\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\".XBTINT\\\",\\n" + + " \\\"granularity\\\": 60000,\\n" + + " \\\"timePoint\\\": 1728692040000,\\n" + + " \\\"value\\\": 3.0E-4\\n" + + " }\\n" + + " ],\\n" + + " \\\"hasMore\\\": true\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -576,34 +577,34 @@ public static void testGetInterestRateIndexResponse() throws Exception { /** getPremiumIndex Request Get Premium Index /api/v1/premium/query */ public static void testGetPremiumIndexRequest() throws Exception { String data = - "{\"symbol\": \".XBTUSDTMPI\", \"startAt\": 1728663338000, \"endAt\": 1728692138000," - + " \"reverse\": true, \"offset\": 254062248624417, \"forward\": true, \"maxCount\":" - + " 10}"; + "{\\\"symbol\\\": \\\".XBTUSDTMPI\\\", \\\"startAt\\\": 1728663338000, \\\"endAt\\\":" + + " 1728692138000, \\\"reverse\\\": true, \\\"offset\\\": 254062248624417," + + " \\\"forward\\\": true, \\\"maxCount\\\": 10}"; GetPremiumIndexReq obj = mapper.readValue(data, GetPremiumIndexReq.class); } /** getPremiumIndex Response Get Premium Index /api/v1/premium/query */ public static void testGetPremiumIndexResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"hasMore\": true,\n" - + " \"dataList\": [\n" - + " {\n" - + " \"symbol\": \".XBTUSDTMPI\",\n" - + " \"granularity\": 60000,\n" - + " \"timePoint\": 1730558040000,\n" - + " \"value\": 0.00006\n" - + " },\n" - + " {\n" - + " \"symbol\": \".XBTUSDTMPI\",\n" - + " \"granularity\": 60000,\n" - + " \"timePoint\": 1730557980000,\n" - + " \"value\": -0.000025\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"hasMore\\\": true,\\n" + + " \\\"dataList\\\": [\\n" + + " {\\n" + + " \\\"symbol\\\": \\\".XBTUSDTMPI\\\",\\n" + + " \\\"granularity\\\": 60000,\\n" + + " \\\"timePoint\\\": 1730558040000,\\n" + + " \\\"value\\\": 0.00006\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\".XBTUSDTMPI\\\",\\n" + + " \\\"granularity\\\": 60000,\\n" + + " \\\"timePoint\\\": 1730557980000,\\n" + + " \\\"value\\\": -0.000025\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -616,7 +617,8 @@ public static void testGet24hrStatsRequest() throws Exception { /** get24hrStats Response Get 24hr stats /api/v1/trade-statistics */ public static void testGet24hrStatsResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":{\"turnoverOf24h\":1.1155733413273683E9}}"; + String data = + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"turnoverOf24h\\\":1.1155733413273683E9}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -628,7 +630,7 @@ public static void testGetServerTimeRequest() throws Exception { /** getServerTime Response Get Server Time /api/v1/timestamp */ public static void testGetServerTimeResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":1729260030774}"; + String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":1729260030774}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -640,7 +642,8 @@ public static void testGetServiceStatusRequest() throws Exception { /** getServiceStatus Response Get Service Status /api/v1/status */ public static void testGetServiceStatusResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":{\"msg\":\"\",\"status\":\"open\"}}"; + String data = + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"msg\\\":\\\"\\\",\\\"status\\\":\\\"open\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -653,7 +656,7 @@ public static void testGetPublicTokenRequest() throws Exception { /** getPublicToken Response Get Public Token - Futures /api/v1/bullet-public */ public static void testGetPublicTokenResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"token\":\"2neAiuYvAU61ZDXANAGAsiL4-iAExhsBXZxftpOeh_55i3Ysy2q2LEsEWU64mdzUOPusi34M_wGoSf7iNyEWJ6dACm4ny9vJtLTRq_YsRUlG5ADnAawegdiYB9J6i9GjsxUuhPw3Blq6rhZlGykT3Vp1phUafnulOOpts-MEmEF-3bpfetLOAjsMMBS5qwTWJBvJHl5Vs9Y=.gJEIAywPXFr_4L-WG10eug==\",\"instanceServers\":[{\"endpoint\":\"wss://ws-api-futures.kucoin.com/\",\"encrypt\":true,\"protocol\":\"websocket\",\"pingInterval\":18000,\"pingTimeout\":10000}]}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"token\\\":\\\"2neAiuYvAU61ZDXANAGAsiL4-iAExhsBXZxftpOeh_55i3Ysy2q2LEsEWU64mdzUOPusi34M_wGoSf7iNyEWJ6dACm4ny9vJtLTRq_YsRUlG5ADnAawegdiYB9J6i9GjsxUuhPw3Blq6rhZlGykT3Vp1phUafnulOOpts-MEmEF-3bpfetLOAjsMMBS5qwTWJBvJHl5Vs9Y=.gJEIAywPXFr_4L-WG10eug==\\\",\\\"instanceServers\\\":[{\\\"endpoint\\\":\\\"wss://ws-api-futures.kucoin.com/\\\",\\\"encrypt\\\":true,\\\"protocol\\\":\\\"websocket\\\",\\\"pingInterval\\\":18000,\\\"pingTimeout\\\":10000}]}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -666,21 +669,21 @@ public static void testGetPrivateTokenRequest() throws Exception { /** getPrivateToken Response Get Private Token - Futures /api/v1/bullet-private */ public static void testGetPrivateTokenResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"token\":" - + " \"2neAiuYvAU737TOajb2U3uT8AEZqSWYe0fBD4LoHuXJDSC7gIzJiH4kNTWhCPISWo6nDpAe7aUaaHJ4fG8oRjFgMfUI2sM4IySWHrBceFocY8pKy2REU1HwZIngtMdMrjqPnP-biofFWbNaP1cl0X1pZc2SQ-33hDH1LgNP-yg8bktVoIG0dIxSN4m3uzO8u.ueCCihQ5_4GPpXKxWTDiFQ==\",\n" - + " \"instanceServers\": [\n" - + " {\n" - + " \"endpoint\": \"wss://ws-api-futures.kucoin.com/\",\n" - + " \"encrypt\": true,\n" - + " \"protocol\": \"websocket\",\n" - + " \"pingInterval\": 18000,\n" - + " \"pingTimeout\": 10000\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"token\\\":" + + " \\\"2neAiuYvAU737TOajb2U3uT8AEZqSWYe0fBD4LoHuXJDSC7gIzJiH4kNTWhCPISWo6nDpAe7aUaaHJ4fG8oRjFgMfUI2sM4IySWHrBceFocY8pKy2REU1HwZIngtMdMrjqPnP-biofFWbNaP1cl0X1pZc2SQ-33hDH1LgNP-yg8bktVoIG0dIxSN4m3uzO8u.ueCCihQ5_4GPpXKxWTDiFQ==\\\",\\n" + + " \\\"instanceServers\\\": [\\n" + + " {\\n" + + " \\\"endpoint\\\": \\\"wss://ws-api-futures.kucoin.com/\\\",\\n" + + " \\\"encrypt\\\": true,\\n" + + " \\\"protocol\\\": \\\"websocket\\\",\\n" + + " \\\"pingInterval\\\": 18000,\\n" + + " \\\"pingTimeout\\\": 10000\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApiAutoGeneratedTest.java index a08b49de..9ea9fb5d 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApiAutoGeneratedTest.java @@ -14,22 +14,23 @@ class OrderApiAutoGeneratedTest { /** addOrder Request Add Order /api/v1/orders */ public static void testAddOrderRequest() throws Exception { String data = - "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," - + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," - + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.1\", \"size\":" - + " 1, \"timeInForce\": \"GTC\"}"; + "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\"," + + " \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\"," + + " \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false," + + " \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.1\\\", \\\"size\\\": 1," + + " \\\"timeInForce\\\": \\\"GTC\\\"}"; AddOrderReq obj = mapper.readValue(data, AddOrderReq.class); } /** addOrder Response Add Order /api/v1/orders */ public static void testAddOrderResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"234125150956625920\",\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"234125150956625920\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -38,22 +39,23 @@ public static void testAddOrderResponse() throws Exception { /** addOrderTest Request Add Order Test /api/v1/orders/test */ public static void testAddOrderTestRequest() throws Exception { String data = - "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," - + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," - + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.1\", \"size\":" - + " 1, \"timeInForce\": \"GTC\"}"; + "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\"," + + " \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\"," + + " \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false," + + " \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.1\\\", \\\"size\\\": 1," + + " \\\"timeInForce\\\": \\\"GTC\\\"}"; AddOrderTestReq obj = mapper.readValue(data, AddOrderTestReq.class); } /** addOrderTest Response Add Order Test /api/v1/orders/test */ public static void testAddOrderTestResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"234125150956625920\",\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"234125150956625920\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -62,37 +64,40 @@ public static void testAddOrderTestResponse() throws Exception { /** batchAddOrders Request Batch Add Orders /api/v1/orders/multi */ public static void testBatchAddOrdersRequest() throws Exception { String data = - "[{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\":" - + " \"XBTUSDTM\", \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," - + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.1\", \"size\":" - + " 1, \"timeInForce\": \"GTC\"}, {\"clientOid\": \"5c52e11203aa677f33e493fc\"," - + " \"side\": \"buy\", \"symbol\": \"XBTUSDTM\", \"leverage\": 3, \"type\": \"limit\"," - + " \"remark\": \"order remarks\", \"reduceOnly\": false, \"marginMode\": \"ISOLATED\"," - + " \"price\": \"0.1\", \"size\": 1, \"timeInForce\": \"GTC\"}]"; + "[{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\"," + + " \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\"," + + " \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false," + + " \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.1\\\", \\\"size\\\": 1," + + " \\\"timeInForce\\\": \\\"GTC\\\"}, {\\\"clientOid\\\":" + + " \\\"5c52e11203aa677f33e493fc\\\", \\\"side\\\": \\\"buy\\\", \\\"symbol\\\":" + + " \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\", \\\"remark\\\":" + + " \\\"order remarks\\\", \\\"reduceOnly\\\": false, \\\"marginMode\\\":" + + " \\\"ISOLATED\\\", \\\"price\\\": \\\"0.1\\\", \\\"size\\\": 1, \\\"timeInForce\\\":" + + " \\\"GTC\\\"}]"; BatchAddOrdersReq obj = mapper.readValue(data, BatchAddOrdersReq.class); } /** batchAddOrders Response Batch Add Orders /api/v1/orders/multi */ public static void testBatchAddOrdersResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"orderId\": \"235919387779985408\",\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"code\": \"200000\",\n" - + " \"msg\": \"success\"\n" - + " },\n" - + " {\n" - + " \"orderId\": \"235919387855482880\",\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fc\",\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"code\": \"200000\",\n" - + " \"msg\": \"success\"\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"orderId\\\": \\\"235919387779985408\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"msg\\\": \\\"success\\\"\\n" + + " },\\n" + + " {\\n" + + " \\\"orderId\\\": \\\"235919387855482880\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fc\\\",\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"msg\\\": \\\"success\\\"\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -101,23 +106,24 @@ public static void testBatchAddOrdersResponse() throws Exception { /** addTPSLOrder Request Add Take Profit And Stop Loss Order /api/v1/st-orders */ public static void testAddTPSLOrderRequest() throws Exception { String data = - "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," - + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," - + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.2\", \"size\":" - + " 1, \"timeInForce\": \"GTC\", \"triggerStopUpPrice\": \"0.3\"," - + " \"triggerStopDownPrice\": \"0.1\", \"stopPriceType\": \"TP\"}"; + "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\"," + + " \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\"," + + " \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false," + + " \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.2\\\", \\\"size\\\": 1," + + " \\\"timeInForce\\\": \\\"GTC\\\", \\\"triggerStopUpPrice\\\": \\\"0.3\\\"," + + " \\\"triggerStopDownPrice\\\": \\\"0.1\\\", \\\"stopPriceType\\\": \\\"TP\\\"}"; AddTPSLOrderReq obj = mapper.readValue(data, AddTPSLOrderReq.class); } /** addTPSLOrder Response Add Take Profit And Stop Loss Order /api/v1/st-orders */ public static void testAddTPSLOrderResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"234125150956625920\",\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"234125150956625920\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -125,20 +131,20 @@ public static void testAddTPSLOrderResponse() throws Exception { /** cancelOrderById Request Cancel Order By OrderId /api/v1/orders/{orderId} */ public static void testCancelOrderByIdRequest() throws Exception { - String data = "{\"orderId\": \"example_string_default_value\"}"; + String data = "{\\\"orderId\\\": \\\"example_string_default_value\\\"}"; CancelOrderByIdReq obj = mapper.readValue(data, CancelOrderByIdReq.class); } /** cancelOrderById Response Cancel Order By OrderId /api/v1/orders/{orderId} */ public static void testCancelOrderByIdResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"cancelledOrderIds\": [\n" - + " \"235303670076489728\"\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"cancelledOrderIds\\\": [\\n" + + " \\\"235303670076489728\\\"\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -149,7 +155,9 @@ public static void testCancelOrderByIdResponse() throws Exception { * /api/v1/orders/client-order/{clientOid} */ public static void testCancelOrderByClientOidRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\", \"clientOid\": \"example_string_default_value\"}"; + String data = + "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"clientOid\\\":" + + " \\\"example_string_default_value\\\"}"; CancelOrderByClientOidReq obj = mapper.readValue(data, CancelOrderByClientOidReq.class); } @@ -159,11 +167,11 @@ public static void testCancelOrderByClientOidRequest() throws Exception { */ public static void testCancelOrderByClientOidResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"clientOid\": \"017485b0-2957-4681-8a14-5d46b35aee0d\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"clientOid\\\": \\\"017485b0-2957-4681-8a14-5d46b35aee0d\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -171,51 +179,52 @@ public static void testCancelOrderByClientOidResponse() throws Exception { /** batchCancelOrders Request Batch Cancel Orders /api/v1/orders/multi-cancel */ public static void testBatchCancelOrdersRequest() throws Exception { - String data = "{\"orderIdsList\": [\"250445104152670209\", \"250445181751463936\"]}"; + String data = + "{\\\"orderIdsList\\\": [\\\"250445104152670209\\\", \\\"250445181751463936\\\"]}"; BatchCancelOrdersReq obj = mapper.readValue(data, BatchCancelOrdersReq.class); } /** batchCancelOrders Response Batch Cancel Orders /api/v1/orders/multi-cancel */ public static void testBatchCancelOrdersResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"orderId\": \"250445104152670209\",\n" - + " \"clientOid\": null,\n" - + " \"code\": \"200\",\n" - + " \"msg\": \"success\"\n" - + " },\n" - + " {\n" - + " \"orderId\": \"250445181751463936\",\n" - + " \"clientOid\": null,\n" - + " \"code\": \"200\",\n" - + " \"msg\": \"success\"\n" - + " }\n" - + " ]\n" - + "}\n"; + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"orderId\\\": \\\"250445104152670209\\\",\\n" + + " \\\"clientOid\\\": null,\\n" + + " \\\"code\\\": \\\"200\\\",\\n" + + " \\\"msg\\\": \\\"success\\\"\\n" + + " },\\n" + + " {\\n" + + " \\\"orderId\\\": \\\"250445181751463936\\\",\\n" + + " \\\"clientOid\\\": null,\\n" + + " \\\"code\\\": \\\"200\\\",\\n" + + " \\\"msg\\\": \\\"success\\\"\\n" + + " }\\n" + + " ]\\n" + + "}\\n"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** cancelAllOrdersV3 Request Cancel All Orders /api/v3/orders */ public static void testCancelAllOrdersV3Request() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; CancelAllOrdersV3Req obj = mapper.readValue(data, CancelAllOrdersV3Req.class); } /** cancelAllOrdersV3 Response Cancel All Orders /api/v3/orders */ public static void testCancelAllOrdersV3Response() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"cancelledOrderIds\": [\n" - + " \"235919172150824960\",\n" - + " \"235919172150824961\"\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"cancelledOrderIds\\\": [\\n" + + " \\\"235919172150824960\\\",\\n" + + " \\\"235919172150824961\\\"\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -223,21 +232,21 @@ public static void testCancelAllOrdersV3Response() throws Exception { /** cancelAllStopOrders Request Cancel All Stop orders /api/v1/stopOrders */ public static void testCancelAllStopOrdersRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; CancelAllStopOrdersReq obj = mapper.readValue(data, CancelAllStopOrdersReq.class); } /** cancelAllStopOrders Response Cancel All Stop orders /api/v1/stopOrders */ public static void testCancelAllStopOrdersResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"cancelledOrderIds\": [\n" - + " \"235919172150824960\",\n" - + " \"235919172150824961\"\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"cancelledOrderIds\\\": [\\n" + + " \\\"235919172150824960\\\",\\n" + + " \\\"235919172150824961\\\"\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -245,55 +254,55 @@ public static void testCancelAllStopOrdersResponse() throws Exception { /** getOrderByOrderId Request Get Order By OrderId /api/v1/orders/{order-id} */ public static void testGetOrderByOrderIdRequest() throws Exception { - String data = "{\"order-id\": \"236655147005071361\"}"; + String data = "{\\\"order-id\\\": \\\"236655147005071361\\\"}"; GetOrderByOrderIdReq obj = mapper.readValue(data, GetOrderByOrderIdReq.class); } /** getOrderByOrderId Response Get Order By OrderId /api/v1/orders/{order-id} */ public static void testGetOrderByOrderIdResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"id\": \"236655147005071361\",\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"type\": \"limit\",\n" - + " \"side\": \"buy\",\n" - + " \"price\": \"0.1\",\n" - + " \"size\": 1,\n" - + " \"value\": \"0.0001\",\n" - + " \"dealValue\": \"0\",\n" - + " \"dealSize\": 0,\n" - + " \"stp\": \"\",\n" - + " \"stop\": \"\",\n" - + " \"stopPriceType\": \"\",\n" - + " \"stopTriggered\": false,\n" - + " \"stopPrice\": null,\n" - + " \"timeInForce\": \"GTC\",\n" - + " \"postOnly\": false,\n" - + " \"hidden\": false,\n" - + " \"iceberg\": false,\n" - + " \"leverage\": \"3\",\n" - + " \"forceHold\": false,\n" - + " \"closeOrder\": false,\n" - + " \"visibleSize\": 0,\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" - + " \"remark\": null,\n" - + " \"tags\": \"\",\n" - + " \"isActive\": true,\n" - + " \"cancelExist\": false,\n" - + " \"createdAt\": 1729236185949,\n" - + " \"updatedAt\": 1729236185949,\n" - + " \"endAt\": null,\n" - + " \"orderTime\": 1729236185885647952,\n" - + " \"settleCurrency\": \"USDT\",\n" - + " \"marginMode\": \"ISOLATED\",\n" - + " \"avgDealPrice\": \"0\",\n" - + " \"filledSize\": 0,\n" - + " \"filledValue\": \"0\",\n" - + " \"status\": \"open\",\n" - + " \"reduceOnly\": false\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"id\\\": \\\"236655147005071361\\\",\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"type\\\": \\\"limit\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"price\\\": \\\"0.1\\\",\\n" + + " \\\"size\\\": 1,\\n" + + " \\\"value\\\": \\\"0.0001\\\",\\n" + + " \\\"dealValue\\\": \\\"0\\\",\\n" + + " \\\"dealSize\\\": 0,\\n" + + " \\\"stp\\\": \\\"\\\",\\n" + + " \\\"stop\\\": \\\"\\\",\\n" + + " \\\"stopPriceType\\\": \\\"\\\",\\n" + + " \\\"stopTriggered\\\": false,\\n" + + " \\\"stopPrice\\\": null,\\n" + + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" + + " \\\"postOnly\\\": false,\\n" + + " \\\"hidden\\\": false,\\n" + + " \\\"iceberg\\\": false,\\n" + + " \\\"leverage\\\": \\\"3\\\",\\n" + + " \\\"forceHold\\\": false,\\n" + + " \\\"closeOrder\\\": false,\\n" + + " \\\"visibleSize\\\": 0,\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" + + " \\\"remark\\\": null,\\n" + + " \\\"tags\\\": \\\"\\\",\\n" + + " \\\"isActive\\\": true,\\n" + + " \\\"cancelExist\\\": false,\\n" + + " \\\"createdAt\\\": 1729236185949,\\n" + + " \\\"updatedAt\\\": 1729236185949,\\n" + + " \\\"endAt\\\": null,\\n" + + " \\\"orderTime\\\": 1729236185885647952,\\n" + + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" + + " \\\"avgDealPrice\\\": \\\"0\\\",\\n" + + " \\\"filledSize\\\": 0,\\n" + + " \\\"filledValue\\\": \\\"0\\\",\\n" + + " \\\"status\\\": \\\"open\\\",\\n" + + " \\\"reduceOnly\\\": false\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -301,55 +310,55 @@ public static void testGetOrderByOrderIdResponse() throws Exception { /** getOrderByClientOid Request Get Order By ClientOid /api/v1/orders/byClientOid */ public static void testGetOrderByClientOidRequest() throws Exception { - String data = "{\"clientOid\": \"5c52e11203aa677f33e493fb\"}"; + String data = "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"}"; GetOrderByClientOidReq obj = mapper.readValue(data, GetOrderByClientOidReq.class); } /** getOrderByClientOid Response Get Order By ClientOid /api/v1/orders/byClientOid */ public static void testGetOrderByClientOidResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"id\": \"250444645610336256\",\n" - + " \"symbol\": \"XRPUSDTM\",\n" - + " \"type\": \"limit\",\n" - + " \"side\": \"buy\",\n" - + " \"price\": \"0.1\",\n" - + " \"size\": 1,\n" - + " \"value\": \"1\",\n" - + " \"dealValue\": \"0\",\n" - + " \"dealSize\": 0,\n" - + " \"stp\": \"\",\n" - + " \"stop\": \"\",\n" - + " \"stopPriceType\": \"\",\n" - + " \"stopTriggered\": false,\n" - + " \"stopPrice\": null,\n" - + " \"timeInForce\": \"GTC\",\n" - + " \"postOnly\": false,\n" - + " \"hidden\": false,\n" - + " \"iceberg\": false,\n" - + " \"leverage\": \"3\",\n" - + " \"forceHold\": false,\n" - + " \"closeOrder\": false,\n" - + " \"visibleSize\": 0,\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" - + " \"remark\": null,\n" - + " \"tags\": \"\",\n" - + " \"isActive\": true,\n" - + " \"cancelExist\": false,\n" - + " \"createdAt\": 1732523858568,\n" - + " \"updatedAt\": 1732523858568,\n" - + " \"endAt\": null,\n" - + " \"orderTime\": 1732523858550892322,\n" - + " \"settleCurrency\": \"USDT\",\n" - + " \"marginMode\": \"ISOLATED\",\n" - + " \"avgDealPrice\": \"0\",\n" - + " \"filledSize\": 0,\n" - + " \"filledValue\": \"0\",\n" - + " \"status\": \"open\",\n" - + " \"reduceOnly\": false\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"id\\\": \\\"250444645610336256\\\",\\n" + + " \\\"symbol\\\": \\\"XRPUSDTM\\\",\\n" + + " \\\"type\\\": \\\"limit\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"price\\\": \\\"0.1\\\",\\n" + + " \\\"size\\\": 1,\\n" + + " \\\"value\\\": \\\"1\\\",\\n" + + " \\\"dealValue\\\": \\\"0\\\",\\n" + + " \\\"dealSize\\\": 0,\\n" + + " \\\"stp\\\": \\\"\\\",\\n" + + " \\\"stop\\\": \\\"\\\",\\n" + + " \\\"stopPriceType\\\": \\\"\\\",\\n" + + " \\\"stopTriggered\\\": false,\\n" + + " \\\"stopPrice\\\": null,\\n" + + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" + + " \\\"postOnly\\\": false,\\n" + + " \\\"hidden\\\": false,\\n" + + " \\\"iceberg\\\": false,\\n" + + " \\\"leverage\\\": \\\"3\\\",\\n" + + " \\\"forceHold\\\": false,\\n" + + " \\\"closeOrder\\\": false,\\n" + + " \\\"visibleSize\\\": 0,\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" + + " \\\"remark\\\": null,\\n" + + " \\\"tags\\\": \\\"\\\",\\n" + + " \\\"isActive\\\": true,\\n" + + " \\\"cancelExist\\\": false,\\n" + + " \\\"createdAt\\\": 1732523858568,\\n" + + " \\\"updatedAt\\\": 1732523858568,\\n" + + " \\\"endAt\\\": null,\\n" + + " \\\"orderTime\\\": 1732523858550892322,\\n" + + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" + + " \\\"avgDealPrice\\\": \\\"0\\\",\\n" + + " \\\"filledSize\\\": 0,\\n" + + " \\\"filledValue\\\": \\\"0\\\",\\n" + + " \\\"status\\\": \\\"open\\\",\\n" + + " \\\"reduceOnly\\\": false\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -358,65 +367,65 @@ public static void testGetOrderByClientOidResponse() throws Exception { /** getOrderList Request Get Order List /api/v1/orders */ public static void testGetOrderListRequest() throws Exception { String data = - "{\"status\": \"done\", \"symbol\": \"example_string_default_value\", \"side\": \"buy\"," - + " \"type\": \"limit\", \"startAt\": 123456, \"endAt\": 123456, \"currentPage\": 1," - + " \"pageSize\": 50}"; + "{\\\"status\\\": \\\"done\\\", \\\"symbol\\\": \\\"example_string_default_value\\\"," + + " \\\"side\\\": \\\"buy\\\", \\\"type\\\": \\\"limit\\\", \\\"startAt\\\": 123456," + + " \\\"endAt\\\": 123456, \\\"currentPage\\\": 1, \\\"pageSize\\\": 50}"; GetOrderListReq obj = mapper.readValue(data, GetOrderListReq.class); } /** getOrderList Response Get Order List /api/v1/orders */ public static void testGetOrderListResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"currentPage\": 1,\n" - + " \"pageSize\": 50,\n" - + " \"totalNum\": 1,\n" - + " \"totalPage\": 1,\n" - + " \"items\": [\n" - + " {\n" - + " \"id\": \"230181737576050688\",\n" - + " \"symbol\": \"PEOPLEUSDTM\",\n" - + " \"type\": \"limit\",\n" - + " \"side\": \"buy\",\n" - + " \"price\": \"0.05\",\n" - + " \"size\": 10,\n" - + " \"value\": \"5\",\n" - + " \"dealValue\": \"0\",\n" - + " \"dealSize\": 0,\n" - + " \"stp\": \"\",\n" - + " \"stop\": \"\",\n" - + " \"stopPriceType\": \"\",\n" - + " \"stopTriggered\": false,\n" - + " \"stopPrice\": null,\n" - + " \"timeInForce\": \"GTC\",\n" - + " \"postOnly\": false,\n" - + " \"hidden\": false,\n" - + " \"iceberg\": false,\n" - + " \"leverage\": \"1\",\n" - + " \"forceHold\": false,\n" - + " \"closeOrder\": false,\n" - + " \"visibleSize\": 0,\n" - + " \"clientOid\": \"5a80bd847f1811ef8a7faa665a37b3d7\",\n" - + " \"remark\": null,\n" - + " \"tags\": \"\",\n" - + " \"isActive\": true,\n" - + " \"cancelExist\": false,\n" - + " \"createdAt\": 1727692804813,\n" - + " \"updatedAt\": 1727692804813,\n" - + " \"endAt\": null,\n" - + " \"orderTime\": 1727692804808418000,\n" - + " \"settleCurrency\": \"USDT\",\n" - + " \"marginMode\": \"ISOLATED\",\n" - + " \"avgDealPrice\": \"0\",\n" - + " \"filledSize\": 0,\n" - + " \"filledValue\": \"0\",\n" - + " \"status\": \"open\",\n" - + " \"reduceOnly\": false\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"currentPage\\\": 1,\\n" + + " \\\"pageSize\\\": 50,\\n" + + " \\\"totalNum\\\": 1,\\n" + + " \\\"totalPage\\\": 1,\\n" + + " \\\"items\\\": [\\n" + + " {\\n" + + " \\\"id\\\": \\\"230181737576050688\\\",\\n" + + " \\\"symbol\\\": \\\"PEOPLEUSDTM\\\",\\n" + + " \\\"type\\\": \\\"limit\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"price\\\": \\\"0.05\\\",\\n" + + " \\\"size\\\": 10,\\n" + + " \\\"value\\\": \\\"5\\\",\\n" + + " \\\"dealValue\\\": \\\"0\\\",\\n" + + " \\\"dealSize\\\": 0,\\n" + + " \\\"stp\\\": \\\"\\\",\\n" + + " \\\"stop\\\": \\\"\\\",\\n" + + " \\\"stopPriceType\\\": \\\"\\\",\\n" + + " \\\"stopTriggered\\\": false,\\n" + + " \\\"stopPrice\\\": null,\\n" + + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" + + " \\\"postOnly\\\": false,\\n" + + " \\\"hidden\\\": false,\\n" + + " \\\"iceberg\\\": false,\\n" + + " \\\"leverage\\\": \\\"1\\\",\\n" + + " \\\"forceHold\\\": false,\\n" + + " \\\"closeOrder\\\": false,\\n" + + " \\\"visibleSize\\\": 0,\\n" + + " \\\"clientOid\\\": \\\"5a80bd847f1811ef8a7faa665a37b3d7\\\",\\n" + + " \\\"remark\\\": null,\\n" + + " \\\"tags\\\": \\\"\\\",\\n" + + " \\\"isActive\\\": true,\\n" + + " \\\"cancelExist\\\": false,\\n" + + " \\\"createdAt\\\": 1727692804813,\\n" + + " \\\"updatedAt\\\": 1727692804813,\\n" + + " \\\"endAt\\\": null,\\n" + + " \\\"orderTime\\\": 1727692804808418000,\\n" + + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" + + " \\\"avgDealPrice\\\": \\\"0\\\",\\n" + + " \\\"filledSize\\\": 0,\\n" + + " \\\"filledValue\\\": \\\"0\\\",\\n" + + " \\\"status\\\": \\\"open\\\",\\n" + + " \\\"reduceOnly\\\": false\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -424,137 +433,137 @@ public static void testGetOrderListResponse() throws Exception { /** getRecentClosedOrders Request Get Recent Closed Orders /api/v1/recentDoneOrders */ public static void testGetRecentClosedOrdersRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; GetRecentClosedOrdersReq obj = mapper.readValue(data, GetRecentClosedOrdersReq.class); } /** getRecentClosedOrders Response Get Recent Closed Orders /api/v1/recentDoneOrders */ public static void testGetRecentClosedOrdersResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"id\": \"236387137732231168\",\n" - + " \"symbol\": \"XRPUSDTM\",\n" - + " \"type\": \"market\",\n" - + " \"side\": \"buy\",\n" - + " \"price\": \"0\",\n" - + " \"size\": 1,\n" - + " \"value\": \"5.51\",\n" - + " \"dealValue\": \"5.511\",\n" - + " \"dealSize\": 1,\n" - + " \"stp\": \"\",\n" - + " \"stop\": \"\",\n" - + " \"stopPriceType\": \"\",\n" - + " \"stopTriggered\": false,\n" - + " \"stopPrice\": null,\n" - + " \"timeInForce\": \"GTC\",\n" - + " \"postOnly\": false,\n" - + " \"hidden\": false,\n" - + " \"iceberg\": false,\n" - + " \"leverage\": \"10.0\",\n" - + " \"forceHold\": false,\n" - + " \"closeOrder\": false,\n" - + " \"visibleSize\": 0,\n" - + " \"clientOid\": \"16698fe6-2746-4aeb-a7fa-61f633ab6090\",\n" - + " \"remark\": null,\n" - + " \"tags\": \"\",\n" - + " \"isActive\": false,\n" - + " \"cancelExist\": false,\n" - + " \"createdAt\": 1729172287496,\n" - + " \"updatedAt\": 1729172287568,\n" - + " \"endAt\": 1729172287568,\n" - + " \"orderTime\": 1729172287496950800,\n" - + " \"settleCurrency\": \"USDT\",\n" - + " \"marginMode\": \"ISOLATED\",\n" - + " \"avgDealPrice\": \"0.5511\",\n" - + " \"filledSize\": 1,\n" - + " \"filledValue\": \"5.511\",\n" - + " \"status\": \"done\",\n" - + " \"reduceOnly\": false\n" - + " },\n" - + " {\n" - + " \"id\": \"236317213710184449\",\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"type\": \"market\",\n" - + " \"side\": \"buy\",\n" - + " \"price\": \"0\",\n" - + " \"size\": 1,\n" - + " \"value\": \"67.4309\",\n" - + " \"dealValue\": \"67.4309\",\n" - + " \"dealSize\": 1,\n" - + " \"stp\": \"\",\n" - + " \"stop\": \"\",\n" - + " \"stopPriceType\": \"\",\n" - + " \"stopTriggered\": false,\n" - + " \"stopPrice\": null,\n" - + " \"timeInForce\": \"GTC\",\n" - + " \"postOnly\": false,\n" - + " \"hidden\": false,\n" - + " \"iceberg\": false,\n" - + " \"leverage\": \"3\",\n" - + " \"forceHold\": false,\n" - + " \"closeOrder\": false,\n" - + " \"visibleSize\": 0,\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" - + " \"remark\": null,\n" - + " \"tags\": \"\",\n" - + " \"isActive\": false,\n" - + " \"cancelExist\": false,\n" - + " \"createdAt\": 1729155616310,\n" - + " \"updatedAt\": 1729155616324,\n" - + " \"endAt\": 1729155616324,\n" - + " \"orderTime\": 1729155616310180400,\n" - + " \"settleCurrency\": \"USDT\",\n" - + " \"marginMode\": \"ISOLATED\",\n" - + " \"avgDealPrice\": \"67430.9\",\n" - + " \"filledSize\": 1,\n" - + " \"filledValue\": \"67.4309\",\n" - + " \"status\": \"done\",\n" - + " \"reduceOnly\": false\n" - + " },\n" - + " {\n" - + " \"id\": \"236317094436728832\",\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"type\": \"market\",\n" - + " \"side\": \"buy\",\n" - + " \"price\": \"0\",\n" - + " \"size\": 1,\n" - + " \"value\": \"67.445\",\n" - + " \"dealValue\": \"67.445\",\n" - + " \"dealSize\": 1,\n" - + " \"stp\": \"\",\n" - + " \"stop\": \"\",\n" - + " \"stopPriceType\": \"\",\n" - + " \"stopTriggered\": false,\n" - + " \"stopPrice\": null,\n" - + " \"timeInForce\": \"GTC\",\n" - + " \"postOnly\": false,\n" - + " \"hidden\": false,\n" - + " \"iceberg\": false,\n" - + " \"leverage\": \"3\",\n" - + " \"forceHold\": false,\n" - + " \"closeOrder\": false,\n" - + " \"visibleSize\": 0,\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" - + " \"remark\": null,\n" - + " \"tags\": \"\",\n" - + " \"isActive\": false,\n" - + " \"cancelExist\": false,\n" - + " \"createdAt\": 1729155587873,\n" - + " \"updatedAt\": 1729155587946,\n" - + " \"endAt\": 1729155587946,\n" - + " \"orderTime\": 1729155587873332000,\n" - + " \"settleCurrency\": \"USDT\",\n" - + " \"marginMode\": \"ISOLATED\",\n" - + " \"avgDealPrice\": \"67445.0\",\n" - + " \"filledSize\": 1,\n" - + " \"filledValue\": \"67.445\",\n" - + " \"status\": \"done\",\n" - + " \"reduceOnly\": false\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"id\\\": \\\"236387137732231168\\\",\\n" + + " \\\"symbol\\\": \\\"XRPUSDTM\\\",\\n" + + " \\\"type\\\": \\\"market\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"price\\\": \\\"0\\\",\\n" + + " \\\"size\\\": 1,\\n" + + " \\\"value\\\": \\\"5.51\\\",\\n" + + " \\\"dealValue\\\": \\\"5.511\\\",\\n" + + " \\\"dealSize\\\": 1,\\n" + + " \\\"stp\\\": \\\"\\\",\\n" + + " \\\"stop\\\": \\\"\\\",\\n" + + " \\\"stopPriceType\\\": \\\"\\\",\\n" + + " \\\"stopTriggered\\\": false,\\n" + + " \\\"stopPrice\\\": null,\\n" + + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" + + " \\\"postOnly\\\": false,\\n" + + " \\\"hidden\\\": false,\\n" + + " \\\"iceberg\\\": false,\\n" + + " \\\"leverage\\\": \\\"10.0\\\",\\n" + + " \\\"forceHold\\\": false,\\n" + + " \\\"closeOrder\\\": false,\\n" + + " \\\"visibleSize\\\": 0,\\n" + + " \\\"clientOid\\\": \\\"16698fe6-2746-4aeb-a7fa-61f633ab6090\\\",\\n" + + " \\\"remark\\\": null,\\n" + + " \\\"tags\\\": \\\"\\\",\\n" + + " \\\"isActive\\\": false,\\n" + + " \\\"cancelExist\\\": false,\\n" + + " \\\"createdAt\\\": 1729172287496,\\n" + + " \\\"updatedAt\\\": 1729172287568,\\n" + + " \\\"endAt\\\": 1729172287568,\\n" + + " \\\"orderTime\\\": 1729172287496950800,\\n" + + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" + + " \\\"avgDealPrice\\\": \\\"0.5511\\\",\\n" + + " \\\"filledSize\\\": 1,\\n" + + " \\\"filledValue\\\": \\\"5.511\\\",\\n" + + " \\\"status\\\": \\\"done\\\",\\n" + + " \\\"reduceOnly\\\": false\\n" + + " },\\n" + + " {\\n" + + " \\\"id\\\": \\\"236317213710184449\\\",\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"type\\\": \\\"market\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"price\\\": \\\"0\\\",\\n" + + " \\\"size\\\": 1,\\n" + + " \\\"value\\\": \\\"67.4309\\\",\\n" + + " \\\"dealValue\\\": \\\"67.4309\\\",\\n" + + " \\\"dealSize\\\": 1,\\n" + + " \\\"stp\\\": \\\"\\\",\\n" + + " \\\"stop\\\": \\\"\\\",\\n" + + " \\\"stopPriceType\\\": \\\"\\\",\\n" + + " \\\"stopTriggered\\\": false,\\n" + + " \\\"stopPrice\\\": null,\\n" + + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" + + " \\\"postOnly\\\": false,\\n" + + " \\\"hidden\\\": false,\\n" + + " \\\"iceberg\\\": false,\\n" + + " \\\"leverage\\\": \\\"3\\\",\\n" + + " \\\"forceHold\\\": false,\\n" + + " \\\"closeOrder\\\": false,\\n" + + " \\\"visibleSize\\\": 0,\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" + + " \\\"remark\\\": null,\\n" + + " \\\"tags\\\": \\\"\\\",\\n" + + " \\\"isActive\\\": false,\\n" + + " \\\"cancelExist\\\": false,\\n" + + " \\\"createdAt\\\": 1729155616310,\\n" + + " \\\"updatedAt\\\": 1729155616324,\\n" + + " \\\"endAt\\\": 1729155616324,\\n" + + " \\\"orderTime\\\": 1729155616310180400,\\n" + + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" + + " \\\"avgDealPrice\\\": \\\"67430.9\\\",\\n" + + " \\\"filledSize\\\": 1,\\n" + + " \\\"filledValue\\\": \\\"67.4309\\\",\\n" + + " \\\"status\\\": \\\"done\\\",\\n" + + " \\\"reduceOnly\\\": false\\n" + + " },\\n" + + " {\\n" + + " \\\"id\\\": \\\"236317094436728832\\\",\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"type\\\": \\\"market\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"price\\\": \\\"0\\\",\\n" + + " \\\"size\\\": 1,\\n" + + " \\\"value\\\": \\\"67.445\\\",\\n" + + " \\\"dealValue\\\": \\\"67.445\\\",\\n" + + " \\\"dealSize\\\": 1,\\n" + + " \\\"stp\\\": \\\"\\\",\\n" + + " \\\"stop\\\": \\\"\\\",\\n" + + " \\\"stopPriceType\\\": \\\"\\\",\\n" + + " \\\"stopTriggered\\\": false,\\n" + + " \\\"stopPrice\\\": null,\\n" + + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" + + " \\\"postOnly\\\": false,\\n" + + " \\\"hidden\\\": false,\\n" + + " \\\"iceberg\\\": false,\\n" + + " \\\"leverage\\\": \\\"3\\\",\\n" + + " \\\"forceHold\\\": false,\\n" + + " \\\"closeOrder\\\": false,\\n" + + " \\\"visibleSize\\\": 0,\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" + + " \\\"remark\\\": null,\\n" + + " \\\"tags\\\": \\\"\\\",\\n" + + " \\\"isActive\\\": false,\\n" + + " \\\"cancelExist\\\": false,\\n" + + " \\\"createdAt\\\": 1729155587873,\\n" + + " \\\"updatedAt\\\": 1729155587946,\\n" + + " \\\"endAt\\\": 1729155587946,\\n" + + " \\\"orderTime\\\": 1729155587873332000,\\n" + + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" + + " \\\"avgDealPrice\\\": \\\"67445.0\\\",\\n" + + " \\\"filledSize\\\": 1,\\n" + + " \\\"filledValue\\\": \\\"67.445\\\",\\n" + + " \\\"status\\\": \\\"done\\\",\\n" + + " \\\"reduceOnly\\\": false\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -563,64 +572,65 @@ public static void testGetRecentClosedOrdersResponse() throws Exception { /** getStopOrderList Request Get Stop Order List /api/v1/stopOrders */ public static void testGetStopOrderListRequest() throws Exception { String data = - "{\"symbol\": \"XBTUSDTM\", \"side\": \"buy\", \"type\": \"limit\", \"startAt\": 123456," - + " \"endAt\": 123456, \"currentPage\": 123456, \"pageSize\": 50}"; + "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"side\\\": \\\"buy\\\", \\\"type\\\": \\\"limit\\\"," + + " \\\"startAt\\\": 123456, \\\"endAt\\\": 123456, \\\"currentPage\\\": 123456," + + " \\\"pageSize\\\": 50}"; GetStopOrderListReq obj = mapper.readValue(data, GetStopOrderListReq.class); } /** getStopOrderList Response Get Stop Order List /api/v1/stopOrders */ public static void testGetStopOrderListResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"currentPage\": 1,\n" - + " \"pageSize\": 50,\n" - + " \"totalNum\": 1,\n" - + " \"totalPage\": 1,\n" - + " \"items\": [\n" - + " {\n" - + " \"id\": \"230181737576050688\",\n" - + " \"symbol\": \"PEOPLEUSDTM\",\n" - + " \"type\": \"limit\",\n" - + " \"side\": \"buy\",\n" - + " \"price\": \"0.05\",\n" - + " \"size\": 10,\n" - + " \"value\": \"5\",\n" - + " \"dealValue\": \"0\",\n" - + " \"dealSize\": 0,\n" - + " \"stp\": \"\",\n" - + " \"stop\": \"\",\n" - + " \"stopPriceType\": \"\",\n" - + " \"stopTriggered\": false,\n" - + " \"stopPrice\": null,\n" - + " \"timeInForce\": \"GTC\",\n" - + " \"postOnly\": false,\n" - + " \"hidden\": false,\n" - + " \"iceberg\": false,\n" - + " \"leverage\": \"1\",\n" - + " \"forceHold\": false,\n" - + " \"closeOrder\": false,\n" - + " \"visibleSize\": 0,\n" - + " \"clientOid\": \"5a80bd847f1811ef8a7faa665a37b3d7\",\n" - + " \"remark\": null,\n" - + " \"tags\": \"\",\n" - + " \"isActive\": true,\n" - + " \"cancelExist\": false,\n" - + " \"createdAt\": 1727692804813,\n" - + " \"updatedAt\": 1727692804813,\n" - + " \"endAt\": null,\n" - + " \"orderTime\": 1727692804808418000,\n" - + " \"settleCurrency\": \"USDT\",\n" - + " \"marginMode\": \"ISOLATED\",\n" - + " \"avgDealPrice\": \"0\",\n" - + " \"filledSize\": 0,\n" - + " \"filledValue\": \"0\",\n" - + " \"status\": \"open\",\n" - + " \"reduceOnly\": false\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"currentPage\\\": 1,\\n" + + " \\\"pageSize\\\": 50,\\n" + + " \\\"totalNum\\\": 1,\\n" + + " \\\"totalPage\\\": 1,\\n" + + " \\\"items\\\": [\\n" + + " {\\n" + + " \\\"id\\\": \\\"230181737576050688\\\",\\n" + + " \\\"symbol\\\": \\\"PEOPLEUSDTM\\\",\\n" + + " \\\"type\\\": \\\"limit\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"price\\\": \\\"0.05\\\",\\n" + + " \\\"size\\\": 10,\\n" + + " \\\"value\\\": \\\"5\\\",\\n" + + " \\\"dealValue\\\": \\\"0\\\",\\n" + + " \\\"dealSize\\\": 0,\\n" + + " \\\"stp\\\": \\\"\\\",\\n" + + " \\\"stop\\\": \\\"\\\",\\n" + + " \\\"stopPriceType\\\": \\\"\\\",\\n" + + " \\\"stopTriggered\\\": false,\\n" + + " \\\"stopPrice\\\": null,\\n" + + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" + + " \\\"postOnly\\\": false,\\n" + + " \\\"hidden\\\": false,\\n" + + " \\\"iceberg\\\": false,\\n" + + " \\\"leverage\\\": \\\"1\\\",\\n" + + " \\\"forceHold\\\": false,\\n" + + " \\\"closeOrder\\\": false,\\n" + + " \\\"visibleSize\\\": 0,\\n" + + " \\\"clientOid\\\": \\\"5a80bd847f1811ef8a7faa665a37b3d7\\\",\\n" + + " \\\"remark\\\": null,\\n" + + " \\\"tags\\\": \\\"\\\",\\n" + + " \\\"isActive\\\": true,\\n" + + " \\\"cancelExist\\\": false,\\n" + + " \\\"createdAt\\\": 1727692804813,\\n" + + " \\\"updatedAt\\\": 1727692804813,\\n" + + " \\\"endAt\\\": null,\\n" + + " \\\"orderTime\\\": 1727692804808418000,\\n" + + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" + + " \\\"avgDealPrice\\\": \\\"0\\\",\\n" + + " \\\"filledSize\\\": 0,\\n" + + " \\\"filledValue\\\": \\\"0\\\",\\n" + + " \\\"status\\\": \\\"open\\\",\\n" + + " \\\"reduceOnly\\\": false\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -628,22 +638,22 @@ public static void testGetStopOrderListResponse() throws Exception { /** getOpenOrderValue Request Get Open Order Value /api/v1/openOrderStatistics */ public static void testGetOpenOrderValueRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; GetOpenOrderValueReq obj = mapper.readValue(data, GetOpenOrderValueReq.class); } /** getOpenOrderValue Response Get Open Order Value /api/v1/openOrderStatistics */ public static void testGetOpenOrderValueResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"openOrderBuySize\": 1,\n" - + " \"openOrderSellSize\": 0,\n" - + " \"openOrderBuyCost\": \"0.0001\",\n" - + " \"openOrderSellCost\": \"0\",\n" - + " \"settleCurrency\": \"USDT\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"openOrderBuySize\\\": 1,\\n" + + " \\\"openOrderSellSize\\\": 0,\\n" + + " \\\"openOrderBuyCost\\\": \\\"0.0001\\\",\\n" + + " \\\"openOrderSellCost\\\": \\\"0\\\",\\n" + + " \\\"settleCurrency\\\": \\\"USDT\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -651,69 +661,69 @@ public static void testGetOpenOrderValueResponse() throws Exception { /** getRecentTradeHistory Request Get Recent Trade History /api/v1/recentFills */ public static void testGetRecentTradeHistoryRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; GetRecentTradeHistoryReq obj = mapper.readValue(data, GetRecentTradeHistoryReq.class); } /** getRecentTradeHistory Response Get Recent Trade History /api/v1/recentFills */ public static void testGetRecentTradeHistoryResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"tradeId\": \"1784277229880\",\n" - + " \"orderId\": \"236317213710184449\",\n" - + " \"side\": \"buy\",\n" - + " \"liquidity\": \"taker\",\n" - + " \"forceTaker\": false,\n" - + " \"price\": \"67430.9\",\n" - + " \"size\": 1,\n" - + " \"value\": \"67.4309\",\n" - + " \"openFeePay\": \"0.04045854\",\n" - + " \"closeFeePay\": \"0\",\n" - + " \"stop\": \"\",\n" - + " \"feeRate\": \"0.00060\",\n" - + " \"fixFee\": \"0\",\n" - + " \"feeCurrency\": \"USDT\",\n" - + " \"marginMode\": \"ISOLATED\",\n" - + " \"fee\": \"0.04045854\",\n" - + " \"settleCurrency\": \"USDT\",\n" - + " \"orderType\": \"market\",\n" - + " \"displayType\": \"market\",\n" - + " \"tradeType\": \"trade\",\n" - + " \"subTradeType\": null,\n" - + " \"tradeTime\": 1729155616320000000,\n" - + " \"createdAt\": 1729155616493\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"tradeId\": \"1784277132002\",\n" - + " \"orderId\": \"236317094436728832\",\n" - + " \"side\": \"buy\",\n" - + " \"liquidity\": \"taker\",\n" - + " \"forceTaker\": false,\n" - + " \"price\": \"67445\",\n" - + " \"size\": 1,\n" - + " \"value\": \"67.445\",\n" - + " \"openFeePay\": \"0\",\n" - + " \"closeFeePay\": \"0.040467\",\n" - + " \"stop\": \"\",\n" - + " \"feeRate\": \"0.00060\",\n" - + " \"fixFee\": \"0\",\n" - + " \"feeCurrency\": \"USDT\",\n" - + " \"marginMode\": \"ISOLATED\",\n" - + " \"fee\": \"0.040467\",\n" - + " \"settleCurrency\": \"USDT\",\n" - + " \"orderType\": \"market\",\n" - + " \"displayType\": \"market\",\n" - + " \"tradeType\": \"trade\",\n" - + " \"subTradeType\": null,\n" - + " \"tradeTime\": 1729155587944000000,\n" - + " \"createdAt\": 1729155588104\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"tradeId\\\": \\\"1784277229880\\\",\\n" + + " \\\"orderId\\\": \\\"236317213710184449\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"liquidity\\\": \\\"taker\\\",\\n" + + " \\\"forceTaker\\\": false,\\n" + + " \\\"price\\\": \\\"67430.9\\\",\\n" + + " \\\"size\\\": 1,\\n" + + " \\\"value\\\": \\\"67.4309\\\",\\n" + + " \\\"openFeePay\\\": \\\"0.04045854\\\",\\n" + + " \\\"closeFeePay\\\": \\\"0\\\",\\n" + + " \\\"stop\\\": \\\"\\\",\\n" + + " \\\"feeRate\\\": \\\"0.00060\\\",\\n" + + " \\\"fixFee\\\": \\\"0\\\",\\n" + + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" + + " \\\"fee\\\": \\\"0.04045854\\\",\\n" + + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"orderType\\\": \\\"market\\\",\\n" + + " \\\"displayType\\\": \\\"market\\\",\\n" + + " \\\"tradeType\\\": \\\"trade\\\",\\n" + + " \\\"subTradeType\\\": null,\\n" + + " \\\"tradeTime\\\": 1729155616320000000,\\n" + + " \\\"createdAt\\\": 1729155616493\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"tradeId\\\": \\\"1784277132002\\\",\\n" + + " \\\"orderId\\\": \\\"236317094436728832\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"liquidity\\\": \\\"taker\\\",\\n" + + " \\\"forceTaker\\\": false,\\n" + + " \\\"price\\\": \\\"67445\\\",\\n" + + " \\\"size\\\": 1,\\n" + + " \\\"value\\\": \\\"67.445\\\",\\n" + + " \\\"openFeePay\\\": \\\"0\\\",\\n" + + " \\\"closeFeePay\\\": \\\"0.040467\\\",\\n" + + " \\\"stop\\\": \\\"\\\",\\n" + + " \\\"feeRate\\\": \\\"0.00060\\\",\\n" + + " \\\"fixFee\\\": \\\"0\\\",\\n" + + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" + + " \\\"fee\\\": \\\"0.040467\\\",\\n" + + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"orderType\\\": \\\"market\\\",\\n" + + " \\\"displayType\\\": \\\"market\\\",\\n" + + " \\\"tradeType\\\": \\\"trade\\\",\\n" + + " \\\"subTradeType\\\": null,\\n" + + " \\\"tradeTime\\\": 1729155587944000000,\\n" + + " \\\"createdAt\\\": 1729155588104\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -722,53 +732,54 @@ public static void testGetRecentTradeHistoryResponse() throws Exception { /** getTradeHistory Request Get Trade History /api/v1/fills */ public static void testGetTradeHistoryRequest() throws Exception { String data = - "{\"orderId\": \"236655147005071361\", \"symbol\": \"example_string_default_value\"," - + " \"side\": \"buy\", \"type\": \"limit\", \"tradeTypes\": \"trade\", \"startAt\":" - + " 123456, \"endAt\": 123456, \"currentPage\": 1, \"pageSize\": 50}"; + "{\\\"orderId\\\": \\\"236655147005071361\\\", \\\"symbol\\\":" + + " \\\"example_string_default_value\\\", \\\"side\\\": \\\"buy\\\", \\\"type\\\":" + + " \\\"limit\\\", \\\"tradeTypes\\\": \\\"trade\\\", \\\"startAt\\\": 123456," + + " \\\"endAt\\\": 123456, \\\"currentPage\\\": 1, \\\"pageSize\\\": 50}"; GetTradeHistoryReq obj = mapper.readValue(data, GetTradeHistoryReq.class); } /** getTradeHistory Response Get Trade History /api/v1/fills */ public static void testGetTradeHistoryResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -776,21 +787,21 @@ public static void testGetTradeHistoryResponse() throws Exception { /** cancelAllOrdersV1 Request Cancel All Orders - V1 /api/v1/orders */ public static void testCancelAllOrdersV1Request() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; CancelAllOrdersV1Req obj = mapper.readValue(data, CancelAllOrdersV1Req.class); } /** cancelAllOrdersV1 Response Cancel All Orders - V1 /api/v1/orders */ public static void testCancelAllOrdersV1Response() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"cancelledOrderIds\": [\n" - + " \"235919172150824960\",\n" - + " \"235919172150824961\"\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"cancelledOrderIds\\\": [\\n" + + " \\\"235919172150824960\\\",\\n" + + " \\\"235919172150824961\\\"\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApiAutoGeneratedTest.java index ef405840..8dc7d238 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApiAutoGeneratedTest.java @@ -13,19 +13,19 @@ class PositionsApiAutoGeneratedTest { /** getMarginMode Request Get Margin Mode /api/v2/position/getMarginMode */ public static void testGetMarginModeRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; GetMarginModeReq obj = mapper.readValue(data, GetMarginModeReq.class); } /** getMarginMode Response Get Margin Mode /api/v2/position/getMarginMode */ public static void testGetMarginModeResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"marginMode\": \"ISOLATED\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"marginMode\\\": \\\"ISOLATED\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -33,19 +33,19 @@ public static void testGetMarginModeResponse() throws Exception { /** switchMarginMode Request Switch Margin Mode /api/v2/position/changeMarginMode */ public static void testSwitchMarginModeRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\", \"marginMode\": \"ISOLATED\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"marginMode\\\": \\\"ISOLATED\\\"}"; SwitchMarginModeReq obj = mapper.readValue(data, SwitchMarginModeReq.class); } /** switchMarginMode Response Switch Margin Mode /api/v2/position/changeMarginMode */ public static void testSwitchMarginModeResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"marginMode\": \"ISOLATED\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"marginMode\\\": \\\"ISOLATED\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -55,7 +55,9 @@ public static void testSwitchMarginModeResponse() throws Exception { * batchSwitchMarginMode Request Batch Switch Margin Mode /api/v2/position/batchChangeMarginMode */ public static void testBatchSwitchMarginModeRequest() throws Exception { - String data = "{\"marginMode\": \"ISOLATED\", \"symbols\": [\"XBTUSDTM\", \"ETHUSDTM\"]}"; + String data = + "{\\\"marginMode\\\": \\\"ISOLATED\\\", \\\"symbols\\\": [\\\"XBTUSDTM\\\"," + + " \\\"ETHUSDTM\\\"]}"; BatchSwitchMarginModeReq obj = mapper.readValue(data, BatchSwitchMarginModeReq.class); } @@ -64,21 +66,21 @@ public static void testBatchSwitchMarginModeRequest() throws Exception { */ public static void testBatchSwitchMarginModeResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"marginMode\": {\n" - + " \"ETHUSDTM\": \"ISOLATED\",\n" - + " \"XBTUSDTM\": \"CROSS\"\n" - + " },\n" - + " \"errors\": [\n" - + " {\n" - + " \"code\": \"50002\",\n" - + " \"msg\": \"exist.order.or.position\",\n" - + " \"symbol\": \"XBTUSDTM\"\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"marginMode\\\": {\\n" + + " \\\"ETHUSDTM\\\": \\\"ISOLATED\\\",\\n" + + " \\\"XBTUSDTM\\\": \\\"CROSS\\\"\\n" + + " },\\n" + + " \\\"errors\\\": [\\n" + + " {\\n" + + " \\\"code\\\": \\\"50002\\\",\\n" + + " \\\"msg\\\": \\\"exist.order.or.position\\\",\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\"\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -87,21 +89,21 @@ public static void testBatchSwitchMarginModeResponse() throws Exception { /** getMaxOpenSize Request Get Max Open Size /api/v2/getMaxOpenSize */ public static void testGetMaxOpenSizeRequest() throws Exception { String data = - "{\"symbol\": \"XBTUSDTM\", \"price\": \"example_string_default_value\", \"leverage\":" - + " 123456}"; + "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"price\\\": \\\"example_string_default_value\\\"," + + " \\\"leverage\\\": 123456}"; GetMaxOpenSizeReq obj = mapper.readValue(data, GetMaxOpenSizeReq.class); } /** getMaxOpenSize Response Get Max Open Size /api/v2/getMaxOpenSize */ public static void testGetMaxOpenSizeResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"maxBuyOpenSize\": 0,\n" - + " \"maxSellOpenSize\": 0\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"maxBuyOpenSize\\\": 0,\\n" + + " \\\"maxSellOpenSize\\\": 0\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -109,158 +111,158 @@ public static void testGetMaxOpenSizeResponse() throws Exception { /** getPositionDetails Request Get Position Details /api/v1/position */ public static void testGetPositionDetailsRequest() throws Exception { - String data = "{\"symbol\": \"example_string_default_value\"}"; + String data = "{\\\"symbol\\\": \\\"example_string_default_value\\\"}"; GetPositionDetailsReq obj = mapper.readValue(data, GetPositionDetailsReq.class); } /** getPositionDetails Response Get Position Details /api/v1/position */ public static void testGetPositionDetailsResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"id\": \"500000000000988255\",\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"autoDeposit\": false,\n" - + " \"crossMode\": false,\n" - + " \"maintMarginReq\": 0.005,\n" - + " \"riskLimit\": 500000,\n" - + " \"realLeverage\": 2.88,\n" - + " \"delevPercentage\": 0.18,\n" - + " \"openingTimestamp\": 1729155616322,\n" - + " \"currentTimestamp\": 1729482542135,\n" - + " \"currentQty\": 1,\n" - + " \"currentCost\": 67.4309,\n" - + " \"currentComm\": 0.01925174,\n" - + " \"unrealisedCost\": 67.4309,\n" - + " \"realisedGrossCost\": 0.0,\n" - + " \"realisedCost\": 0.01925174,\n" - + " \"isOpen\": true,\n" - + " \"markPrice\": 68900.7,\n" - + " \"markValue\": 68.9007,\n" - + " \"posCost\": 67.4309,\n" - + " \"posCross\": 0.01645214,\n" - + " \"posCrossMargin\": 0,\n" - + " \"posInit\": 22.4769666644,\n" - + " \"posComm\": 0.0539546299,\n" - + " \"posCommCommon\": 0.0539447199,\n" - + " \"posLoss\": 0.03766885,\n" - + " \"posMargin\": 22.5097045843,\n" - + " \"posFunding\": -0.0212068,\n" - + " \"posMaint\": 0.3931320569,\n" - + " \"maintMargin\": 23.9795045843,\n" - + " \"realisedGrossPnl\": 0.0,\n" - + " \"realisedPnl\": -0.06166534,\n" - + " \"unrealisedPnl\": 1.4698,\n" - + " \"unrealisedPnlPcnt\": 0.0218,\n" - + " \"unrealisedRoePcnt\": 0.0654,\n" - + " \"avgEntryPrice\": 67430.9,\n" - + " \"liquidationPrice\": 45314.33,\n" - + " \"bankruptPrice\": 44975.16,\n" - + " \"settleCurrency\": \"USDT\",\n" - + " \"maintainMargin\": 0.005,\n" - + " \"riskLimitLevel\": 2,\n" - + " \"marginMode\": \"ISOLATED\",\n" - + " \"positionSide\": \"BOTH\",\n" - + " \"leverage\": 2.88\n" - + " }\n" - + "}\n"; + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"id\\\": \\\"500000000000988255\\\",\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"autoDeposit\\\": false,\\n" + + " \\\"crossMode\\\": false,\\n" + + " \\\"maintMarginReq\\\": 0.005,\\n" + + " \\\"riskLimit\\\": 500000,\\n" + + " \\\"realLeverage\\\": 2.88,\\n" + + " \\\"delevPercentage\\\": 0.18,\\n" + + " \\\"openingTimestamp\\\": 1729155616322,\\n" + + " \\\"currentTimestamp\\\": 1729482542135,\\n" + + " \\\"currentQty\\\": 1,\\n" + + " \\\"currentCost\\\": 67.4309,\\n" + + " \\\"currentComm\\\": 0.01925174,\\n" + + " \\\"unrealisedCost\\\": 67.4309,\\n" + + " \\\"realisedGrossCost\\\": 0.0,\\n" + + " \\\"realisedCost\\\": 0.01925174,\\n" + + " \\\"isOpen\\\": true,\\n" + + " \\\"markPrice\\\": 68900.7,\\n" + + " \\\"markValue\\\": 68.9007,\\n" + + " \\\"posCost\\\": 67.4309,\\n" + + " \\\"posCross\\\": 0.01645214,\\n" + + " \\\"posCrossMargin\\\": 0,\\n" + + " \\\"posInit\\\": 22.4769666644,\\n" + + " \\\"posComm\\\": 0.0539546299,\\n" + + " \\\"posCommCommon\\\": 0.0539447199,\\n" + + " \\\"posLoss\\\": 0.03766885,\\n" + + " \\\"posMargin\\\": 22.5097045843,\\n" + + " \\\"posFunding\\\": -0.0212068,\\n" + + " \\\"posMaint\\\": 0.3931320569,\\n" + + " \\\"maintMargin\\\": 23.9795045843,\\n" + + " \\\"realisedGrossPnl\\\": 0.0,\\n" + + " \\\"realisedPnl\\\": -0.06166534,\\n" + + " \\\"unrealisedPnl\\\": 1.4698,\\n" + + " \\\"unrealisedPnlPcnt\\\": 0.0218,\\n" + + " \\\"unrealisedRoePcnt\\\": 0.0654,\\n" + + " \\\"avgEntryPrice\\\": 67430.9,\\n" + + " \\\"liquidationPrice\\\": 45314.33,\\n" + + " \\\"bankruptPrice\\\": 44975.16,\\n" + + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"maintainMargin\\\": 0.005,\\n" + + " \\\"riskLimitLevel\\\": 2,\\n" + + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" + + " \\\"positionSide\\\": \\\"BOTH\\\",\\n" + + " \\\"leverage\\\": 2.88\\n" + + " }\\n" + + "}\\n"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** getPositionList Request Get Position List /api/v1/positions */ public static void testGetPositionListRequest() throws Exception { - String data = "{\"currency\": \"USDT\"}"; + String data = "{\\\"currency\\\": \\\"USDT\\\"}"; GetPositionListReq obj = mapper.readValue(data, GetPositionListReq.class); } /** getPositionList Response Get Position List /api/v1/positions */ public static void testGetPositionListResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"id\": \"500000000001046430\",\n" - + " \"symbol\": \"ETHUSDM\",\n" - + " \"crossMode\": true,\n" - + " \"delevPercentage\": 0.71,\n" - + " \"openingTimestamp\": 1730635780702,\n" - + " \"currentTimestamp\": 1730636040926,\n" - + " \"currentQty\": 1,\n" - + " \"currentCost\": -4.069805E-4,\n" - + " \"currentComm\": 2.441E-7,\n" - + " \"unrealisedCost\": -4.069805E-4,\n" - + " \"realisedGrossCost\": 0.0,\n" - + " \"realisedCost\": 2.441E-7,\n" - + " \"isOpen\": true,\n" - + " \"markPrice\": 2454.12,\n" - + " \"markValue\": -4.07478E-4,\n" - + " \"posCost\": -4.069805E-4,\n" - + " \"posInit\": 4.06981E-5,\n" - + " \"posMargin\": 4.07478E-5,\n" - + " \"realisedGrossPnl\": 0.0,\n" - + " \"realisedPnl\": -2.441E-7,\n" - + " \"unrealisedPnl\": -4.975E-7,\n" - + " \"unrealisedPnlPcnt\": -0.0012,\n" - + " \"unrealisedRoePcnt\": -0.0122,\n" - + " \"avgEntryPrice\": 2457.12,\n" - + " \"liquidationPrice\": 1429.96,\n" - + " \"bankruptPrice\": 1414.96,\n" - + " \"settleCurrency\": \"ETH\",\n" - + " \"isInverse\": true,\n" - + " \"marginMode\": \"CROSS\",\n" - + " \"positionSide\": \"BOTH\",\n" - + " \"leverage\": 10\n" - + " },\n" - + " {\n" - + " \"id\": \"500000000000988255\",\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"autoDeposit\": true,\n" - + " \"crossMode\": false,\n" - + " \"maintMarginReq\": 0.005,\n" - + " \"riskLimit\": 500000,\n" - + " \"realLeverage\": 2.97,\n" - + " \"delevPercentage\": 0.5,\n" - + " \"openingTimestamp\": 1729155616322,\n" - + " \"currentTimestamp\": 1730636040926,\n" - + " \"currentQty\": 1,\n" - + " \"currentCost\": 67.4309,\n" - + " \"currentComm\": -0.15936162,\n" - + " \"unrealisedCost\": 67.4309,\n" - + " \"realisedGrossCost\": 0.0,\n" - + " \"realisedCost\": -0.15936162,\n" - + " \"isOpen\": true,\n" - + " \"markPrice\": 68323.06,\n" - + " \"markValue\": 68.32306,\n" - + " \"posCost\": 67.4309,\n" - + " \"posCross\": 0.06225152,\n" - + " \"posCrossMargin\": 0,\n" - + " \"posInit\": 22.2769666644,\n" - + " \"posComm\": 0.0539821899,\n" - + " \"posCommCommon\": 0.0539447199,\n" - + " \"posLoss\": 0.26210915,\n" - + " \"posMargin\": 22.1310912243,\n" - + " \"posFunding\": -0.19982016,\n" - + " \"posMaint\": 0.4046228699,\n" - + " \"maintMargin\": 23.0232512243,\n" - + " \"realisedGrossPnl\": 0.0,\n" - + " \"realisedPnl\": -0.2402787,\n" - + " \"unrealisedPnl\": 0.89216,\n" - + " \"unrealisedPnlPcnt\": 0.0132,\n" - + " \"unrealisedRoePcnt\": 0.04,\n" - + " \"avgEntryPrice\": 67430.9,\n" - + " \"liquidationPrice\": 45704.44,\n" - + " \"bankruptPrice\": 45353.8,\n" - + " \"settleCurrency\": \"USDT\",\n" - + " \"isInverse\": false,\n" - + " \"maintainMargin\": 0.005,\n" - + " \"marginMode\": \"ISOLATED\",\n" - + " \"positionSide\": \"BOTH\",\n" - + " \"leverage\": 2.97\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"id\\\": \\\"500000000001046430\\\",\\n" + + " \\\"symbol\\\": \\\"ETHUSDM\\\",\\n" + + " \\\"crossMode\\\": true,\\n" + + " \\\"delevPercentage\\\": 0.71,\\n" + + " \\\"openingTimestamp\\\": 1730635780702,\\n" + + " \\\"currentTimestamp\\\": 1730636040926,\\n" + + " \\\"currentQty\\\": 1,\\n" + + " \\\"currentCost\\\": -4.069805E-4,\\n" + + " \\\"currentComm\\\": 2.441E-7,\\n" + + " \\\"unrealisedCost\\\": -4.069805E-4,\\n" + + " \\\"realisedGrossCost\\\": 0.0,\\n" + + " \\\"realisedCost\\\": 2.441E-7,\\n" + + " \\\"isOpen\\\": true,\\n" + + " \\\"markPrice\\\": 2454.12,\\n" + + " \\\"markValue\\\": -4.07478E-4,\\n" + + " \\\"posCost\\\": -4.069805E-4,\\n" + + " \\\"posInit\\\": 4.06981E-5,\\n" + + " \\\"posMargin\\\": 4.07478E-5,\\n" + + " \\\"realisedGrossPnl\\\": 0.0,\\n" + + " \\\"realisedPnl\\\": -2.441E-7,\\n" + + " \\\"unrealisedPnl\\\": -4.975E-7,\\n" + + " \\\"unrealisedPnlPcnt\\\": -0.0012,\\n" + + " \\\"unrealisedRoePcnt\\\": -0.0122,\\n" + + " \\\"avgEntryPrice\\\": 2457.12,\\n" + + " \\\"liquidationPrice\\\": 1429.96,\\n" + + " \\\"bankruptPrice\\\": 1414.96,\\n" + + " \\\"settleCurrency\\\": \\\"ETH\\\",\\n" + + " \\\"isInverse\\\": true,\\n" + + " \\\"marginMode\\\": \\\"CROSS\\\",\\n" + + " \\\"positionSide\\\": \\\"BOTH\\\",\\n" + + " \\\"leverage\\\": 10\\n" + + " },\\n" + + " {\\n" + + " \\\"id\\\": \\\"500000000000988255\\\",\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"autoDeposit\\\": true,\\n" + + " \\\"crossMode\\\": false,\\n" + + " \\\"maintMarginReq\\\": 0.005,\\n" + + " \\\"riskLimit\\\": 500000,\\n" + + " \\\"realLeverage\\\": 2.97,\\n" + + " \\\"delevPercentage\\\": 0.5,\\n" + + " \\\"openingTimestamp\\\": 1729155616322,\\n" + + " \\\"currentTimestamp\\\": 1730636040926,\\n" + + " \\\"currentQty\\\": 1,\\n" + + " \\\"currentCost\\\": 67.4309,\\n" + + " \\\"currentComm\\\": -0.15936162,\\n" + + " \\\"unrealisedCost\\\": 67.4309,\\n" + + " \\\"realisedGrossCost\\\": 0.0,\\n" + + " \\\"realisedCost\\\": -0.15936162,\\n" + + " \\\"isOpen\\\": true,\\n" + + " \\\"markPrice\\\": 68323.06,\\n" + + " \\\"markValue\\\": 68.32306,\\n" + + " \\\"posCost\\\": 67.4309,\\n" + + " \\\"posCross\\\": 0.06225152,\\n" + + " \\\"posCrossMargin\\\": 0,\\n" + + " \\\"posInit\\\": 22.2769666644,\\n" + + " \\\"posComm\\\": 0.0539821899,\\n" + + " \\\"posCommCommon\\\": 0.0539447199,\\n" + + " \\\"posLoss\\\": 0.26210915,\\n" + + " \\\"posMargin\\\": 22.1310912243,\\n" + + " \\\"posFunding\\\": -0.19982016,\\n" + + " \\\"posMaint\\\": 0.4046228699,\\n" + + " \\\"maintMargin\\\": 23.0232512243,\\n" + + " \\\"realisedGrossPnl\\\": 0.0,\\n" + + " \\\"realisedPnl\\\": -0.2402787,\\n" + + " \\\"unrealisedPnl\\\": 0.89216,\\n" + + " \\\"unrealisedPnlPcnt\\\": 0.0132,\\n" + + " \\\"unrealisedRoePcnt\\\": 0.04,\\n" + + " \\\"avgEntryPrice\\\": 67430.9,\\n" + + " \\\"liquidationPrice\\\": 45704.44,\\n" + + " \\\"bankruptPrice\\\": 45353.8,\\n" + + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"isInverse\\\": false,\\n" + + " \\\"maintainMargin\\\": 0.005,\\n" + + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" + + " \\\"positionSide\\\": \\\"BOTH\\\",\\n" + + " \\\"leverage\\\": 2.97\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -269,48 +271,48 @@ public static void testGetPositionListResponse() throws Exception { /** getPositionsHistory Request Get Positions History /api/v1/history-positions */ public static void testGetPositionsHistoryRequest() throws Exception { String data = - "{\"symbol\": \"example_string_default_value\", \"from\": 123456, \"to\": 123456," - + " \"limit\": 10, \"pageId\": 1}"; + "{\\\"symbol\\\": \\\"example_string_default_value\\\", \\\"from\\\": 123456, \\\"to\\\":" + + " 123456, \\\"limit\\\": 10, \\\"pageId\\\": 1}"; GetPositionsHistoryReq obj = mapper.readValue(data, GetPositionsHistoryReq.class); } /** getPositionsHistory Response Get Positions History /api/v1/history-positions */ public static void testGetPositionsHistoryResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -318,32 +320,33 @@ public static void testGetPositionsHistoryResponse() throws Exception { /** getMaxWithdrawMargin Request Get Max Withdraw Margin /api/v1/margin/maxWithdrawMargin */ public static void testGetMaxWithdrawMarginRequest() throws Exception { - String data = "{\"symbol\": \"example_string_default_value\"}"; + String data = "{\\\"symbol\\\": \\\"example_string_default_value\\\"}"; GetMaxWithdrawMarginReq obj = mapper.readValue(data, GetMaxWithdrawMarginReq.class); } /** getMaxWithdrawMargin Response Get Max Withdraw Margin /api/v1/margin/maxWithdrawMargin */ public static void testGetMaxWithdrawMarginResponse() throws Exception { - String data = "{\n \"code\": \"200000\",\n \"data\": \"21.1135719252\"\n}"; + String data = + "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": \\\"21.1135719252\\\"\\n}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** getCrossMarginLeverage Request Get Cross Margin Leverage /api/v2/getCrossUserLeverage */ public static void testGetCrossMarginLeverageRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; GetCrossMarginLeverageReq obj = mapper.readValue(data, GetCrossMarginLeverageReq.class); } /** getCrossMarginLeverage Response Get Cross Margin Leverage /api/v2/getCrossUserLeverage */ public static void testGetCrossMarginLeverageResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"leverage\": \"3\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"leverage\\\": \\\"3\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -351,67 +354,68 @@ public static void testGetCrossMarginLeverageResponse() throws Exception { /** modifyMarginLeverage Request Modify Cross Margin Leverage /api/v2/changeCrossUserLeverage */ public static void testModifyMarginLeverageRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\", \"leverage\": \"10\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": \\\"10\\\"}"; ModifyMarginLeverageReq obj = mapper.readValue(data, ModifyMarginLeverageReq.class); } /** modifyMarginLeverage Response Modify Cross Margin Leverage /api/v2/changeCrossUserLeverage */ public static void testModifyMarginLeverageResponse() throws Exception { - String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; + String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": true\\n}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** addIsolatedMargin Request Add Isolated Margin /api/v1/position/margin/deposit-margin */ public static void testAddIsolatedMarginRequest() throws Exception { - String data = "{\"symbol\": \"string\", \"margin\": 0, \"bizNo\": \"string\"}"; + String data = + "{\\\"symbol\\\": \\\"string\\\", \\\"margin\\\": 0, \\\"bizNo\\\": \\\"string\\\"}"; AddIsolatedMarginReq obj = mapper.readValue(data, AddIsolatedMarginReq.class); } /** addIsolatedMargin Response Add Isolated Margin /api/v1/position/margin/deposit-margin */ public static void testAddIsolatedMarginResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"id\": \"6200c9b83aecfb000152ddcd\",\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"autoDeposit\": false,\n" - + " \"maintMarginReq\": 0.005,\n" - + " \"riskLimit\": 500000,\n" - + " \"realLeverage\": 18.72,\n" - + " \"crossMode\": false,\n" - + " \"delevPercentage\": 0.66,\n" - + " \"openingTimestamp\": 1646287090131,\n" - + " \"currentTimestamp\": 1646295055021,\n" - + " \"currentQty\": 1,\n" - + " \"currentCost\": 43.388,\n" - + " \"currentComm\": 0.0260328,\n" - + " \"unrealisedCost\": 43.388,\n" - + " \"realisedGrossCost\": 0,\n" - + " \"realisedCost\": 0.0260328,\n" - + " \"isOpen\": true,\n" - + " \"markPrice\": 43536.65,\n" - + " \"markValue\": 43.53665,\n" - + " \"posCost\": 43.388,\n" - + " \"posCross\": 0.000024985,\n" - + " \"posInit\": 2.1694,\n" - + " \"posComm\": 0.02733446,\n" - + " \"posLoss\": 0,\n" - + " \"posMargin\": 2.19675944,\n" - + " \"posMaint\": 0.24861326,\n" - + " \"maintMargin\": 2.34540944,\n" - + " \"realisedGrossPnl\": 0,\n" - + " \"realisedPnl\": -0.0260328,\n" - + " \"unrealisedPnl\": 0.14865,\n" - + " \"unrealisedPnlPcnt\": 0.0034,\n" - + " \"unrealisedRoePcnt\": 0.0685,\n" - + " \"avgEntryPrice\": 43388,\n" - + " \"liquidationPrice\": 41440,\n" - + " \"bankruptPrice\": 41218,\n" - + " \"userId\": 1234321123,\n" - + " \"settleCurrency\": \"USDT\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"id\\\": \\\"6200c9b83aecfb000152ddcd\\\",\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"autoDeposit\\\": false,\\n" + + " \\\"maintMarginReq\\\": 0.005,\\n" + + " \\\"riskLimit\\\": 500000,\\n" + + " \\\"realLeverage\\\": 18.72,\\n" + + " \\\"crossMode\\\": false,\\n" + + " \\\"delevPercentage\\\": 0.66,\\n" + + " \\\"openingTimestamp\\\": 1646287090131,\\n" + + " \\\"currentTimestamp\\\": 1646295055021,\\n" + + " \\\"currentQty\\\": 1,\\n" + + " \\\"currentCost\\\": 43.388,\\n" + + " \\\"currentComm\\\": 0.0260328,\\n" + + " \\\"unrealisedCost\\\": 43.388,\\n" + + " \\\"realisedGrossCost\\\": 0,\\n" + + " \\\"realisedCost\\\": 0.0260328,\\n" + + " \\\"isOpen\\\": true,\\n" + + " \\\"markPrice\\\": 43536.65,\\n" + + " \\\"markValue\\\": 43.53665,\\n" + + " \\\"posCost\\\": 43.388,\\n" + + " \\\"posCross\\\": 0.000024985,\\n" + + " \\\"posInit\\\": 2.1694,\\n" + + " \\\"posComm\\\": 0.02733446,\\n" + + " \\\"posLoss\\\": 0,\\n" + + " \\\"posMargin\\\": 2.19675944,\\n" + + " \\\"posMaint\\\": 0.24861326,\\n" + + " \\\"maintMargin\\\": 2.34540944,\\n" + + " \\\"realisedGrossPnl\\\": 0,\\n" + + " \\\"realisedPnl\\\": -0.0260328,\\n" + + " \\\"unrealisedPnl\\\": 0.14865,\\n" + + " \\\"unrealisedPnlPcnt\\\": 0.0034,\\n" + + " \\\"unrealisedRoePcnt\\\": 0.0685,\\n" + + " \\\"avgEntryPrice\\\": 43388,\\n" + + " \\\"liquidationPrice\\\": 41440,\\n" + + " \\\"bankruptPrice\\\": 41218,\\n" + + " \\\"userId\\\": 1234321123,\\n" + + " \\\"settleCurrency\\\": \\\"USDT\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -419,13 +423,13 @@ public static void testAddIsolatedMarginResponse() throws Exception { /** removeIsolatedMargin Request Remove Isolated Margin /api/v1/margin/withdrawMargin */ public static void testRemoveIsolatedMarginRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\", \"withdrawAmount\": \"0.0000001\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"withdrawAmount\\\": \\\"0.0000001\\\"}"; RemoveIsolatedMarginReq obj = mapper.readValue(data, RemoveIsolatedMarginReq.class); } /** removeIsolatedMargin Response Remove Isolated Margin /api/v1/margin/withdrawMargin */ public static void testRemoveIsolatedMarginResponse() throws Exception { - String data = "{\n \"code\": \"200000\",\n \"data\": \"0.1\"\n}"; + String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": \\\"0.1\\\"\\n}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -433,8 +437,8 @@ public static void testRemoveIsolatedMarginResponse() throws Exception { /** getCrossMarginRiskLimit Request Get Cross Margin Risk Limit /api/v2/batchGetCrossOrderLimit */ public static void testGetCrossMarginRiskLimitRequest() throws Exception { String data = - "{\"symbol\": \"XBTUSDTM\", \"totalMargin\": \"example_string_default_value\"," - + " \"leverage\": 123456}"; + "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"totalMargin\\\":" + + " \\\"example_string_default_value\\\", \\\"leverage\\\": 123456}"; GetCrossMarginRiskLimitReq obj = mapper.readValue(data, GetCrossMarginRiskLimitReq.class); } @@ -443,32 +447,32 @@ public static void testGetCrossMarginRiskLimitRequest() throws Exception { */ public static void testGetCrossMarginRiskLimitResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"maxOpenSize\": 12102,\n" - + " \"maxOpenValue\": \"1234549.2240000000\",\n" - + " \"totalMargin\": \"10000\",\n" - + " \"price\": \"102012\",\n" - + " \"leverage\": \"125.00\",\n" - + " \"mmr\": \"0.00416136\",\n" - + " \"imr\": \"0.008\",\n" - + " \"currency\": \"USDT\"\n" - + " },\n" - + " {\n" - + " \"symbol\": \"ETHUSDTM\",\n" - + " \"maxOpenSize\": 38003,\n" - + " \"maxOpenValue\": \"971508.6920000000\",\n" - + " \"totalMargin\": \"10000\",\n" - + " \"price\": \"2556.4\",\n" - + " \"leverage\": \"100.00\",\n" - + " \"mmr\": \"0.0054623236\",\n" - + " \"imr\": \"0.01\",\n" - + " \"currency\": \"USDT\"\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"maxOpenSize\\\": 12102,\\n" + + " \\\"maxOpenValue\\\": \\\"1234549.2240000000\\\",\\n" + + " \\\"totalMargin\\\": \\\"10000\\\",\\n" + + " \\\"price\\\": \\\"102012\\\",\\n" + + " \\\"leverage\\\": \\\"125.00\\\",\\n" + + " \\\"mmr\\\": \\\"0.00416136\\\",\\n" + + " \\\"imr\\\": \\\"0.008\\\",\\n" + + " \\\"currency\\\": \\\"USDT\\\"\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"ETHUSDTM\\\",\\n" + + " \\\"maxOpenSize\\\": 38003,\\n" + + " \\\"maxOpenValue\\\": \\\"971508.6920000000\\\",\\n" + + " \\\"totalMargin\\\": \\\"10000\\\",\\n" + + " \\\"price\\\": \\\"2556.4\\\",\\n" + + " \\\"leverage\\\": \\\"100.00\\\",\\n" + + " \\\"mmr\\\": \\\"0.0054623236\\\",\\n" + + " \\\"imr\\\": \\\"0.01\\\",\\n" + + " \\\"currency\\\": \\\"USDT\\\"\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -479,7 +483,7 @@ public static void testGetCrossMarginRiskLimitResponse() throws Exception { * /api/v1/contracts/risk-limit/{symbol} */ public static void testGetIsolatedMarginRiskLimitRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\"}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; GetIsolatedMarginRiskLimitReq obj = mapper.readValue(data, GetIsolatedMarginRiskLimitReq.class); } @@ -489,118 +493,118 @@ public static void testGetIsolatedMarginRiskLimitRequest() throws Exception { */ public static void testGetIsolatedMarginRiskLimitResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"level\": 1,\n" - + " \"maxRiskLimit\": 100000,\n" - + " \"minRiskLimit\": 0,\n" - + " \"maxLeverage\": 125,\n" - + " \"initialMargin\": 0.008,\n" - + " \"maintainMargin\": 0.004\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"level\": 2,\n" - + " \"maxRiskLimit\": 500000,\n" - + " \"minRiskLimit\": 100000,\n" - + " \"maxLeverage\": 100,\n" - + " \"initialMargin\": 0.01,\n" - + " \"maintainMargin\": 0.005\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"level\": 3,\n" - + " \"maxRiskLimit\": 1000000,\n" - + " \"minRiskLimit\": 500000,\n" - + " \"maxLeverage\": 75,\n" - + " \"initialMargin\": 0.014,\n" - + " \"maintainMargin\": 0.007\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"level\": 4,\n" - + " \"maxRiskLimit\": 2000000,\n" - + " \"minRiskLimit\": 1000000,\n" - + " \"maxLeverage\": 50,\n" - + " \"initialMargin\": 0.02,\n" - + " \"maintainMargin\": 0.01\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"level\": 5,\n" - + " \"maxRiskLimit\": 3000000,\n" - + " \"minRiskLimit\": 2000000,\n" - + " \"maxLeverage\": 30,\n" - + " \"initialMargin\": 0.034,\n" - + " \"maintainMargin\": 0.017\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"level\": 6,\n" - + " \"maxRiskLimit\": 5000000,\n" - + " \"minRiskLimit\": 3000000,\n" - + " \"maxLeverage\": 20,\n" - + " \"initialMargin\": 0.05,\n" - + " \"maintainMargin\": 0.025\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"level\": 7,\n" - + " \"maxRiskLimit\": 8000000,\n" - + " \"minRiskLimit\": 5000000,\n" - + " \"maxLeverage\": 10,\n" - + " \"initialMargin\": 0.1,\n" - + " \"maintainMargin\": 0.05\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"level\": 8,\n" - + " \"maxRiskLimit\": 12000000,\n" - + " \"minRiskLimit\": 8000000,\n" - + " \"maxLeverage\": 5,\n" - + " \"initialMargin\": 0.2,\n" - + " \"maintainMargin\": 0.1\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"level\": 9,\n" - + " \"maxRiskLimit\": 20000000,\n" - + " \"minRiskLimit\": 12000000,\n" - + " \"maxLeverage\": 4,\n" - + " \"initialMargin\": 0.25,\n" - + " \"maintainMargin\": 0.125\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"level\": 10,\n" - + " \"maxRiskLimit\": 30000000,\n" - + " \"minRiskLimit\": 20000000,\n" - + " \"maxLeverage\": 3,\n" - + " \"initialMargin\": 0.334,\n" - + " \"maintainMargin\": 0.167\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"level\": 11,\n" - + " \"maxRiskLimit\": 40000000,\n" - + " \"minRiskLimit\": 30000000,\n" - + " \"maxLeverage\": 2,\n" - + " \"initialMargin\": 0.5,\n" - + " \"maintainMargin\": 0.25\n" - + " },\n" - + " {\n" - + " \"symbol\": \"XBTUSDTM\",\n" - + " \"level\": 12,\n" - + " \"maxRiskLimit\": 50000000,\n" - + " \"minRiskLimit\": 40000000,\n" - + " \"maxLeverage\": 1,\n" - + " \"initialMargin\": 1.0,\n" - + " \"maintainMargin\": 0.5\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"level\\\": 1,\\n" + + " \\\"maxRiskLimit\\\": 100000,\\n" + + " \\\"minRiskLimit\\\": 0,\\n" + + " \\\"maxLeverage\\\": 125,\\n" + + " \\\"initialMargin\\\": 0.008,\\n" + + " \\\"maintainMargin\\\": 0.004\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"level\\\": 2,\\n" + + " \\\"maxRiskLimit\\\": 500000,\\n" + + " \\\"minRiskLimit\\\": 100000,\\n" + + " \\\"maxLeverage\\\": 100,\\n" + + " \\\"initialMargin\\\": 0.01,\\n" + + " \\\"maintainMargin\\\": 0.005\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"level\\\": 3,\\n" + + " \\\"maxRiskLimit\\\": 1000000,\\n" + + " \\\"minRiskLimit\\\": 500000,\\n" + + " \\\"maxLeverage\\\": 75,\\n" + + " \\\"initialMargin\\\": 0.014,\\n" + + " \\\"maintainMargin\\\": 0.007\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"level\\\": 4,\\n" + + " \\\"maxRiskLimit\\\": 2000000,\\n" + + " \\\"minRiskLimit\\\": 1000000,\\n" + + " \\\"maxLeverage\\\": 50,\\n" + + " \\\"initialMargin\\\": 0.02,\\n" + + " \\\"maintainMargin\\\": 0.01\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"level\\\": 5,\\n" + + " \\\"maxRiskLimit\\\": 3000000,\\n" + + " \\\"minRiskLimit\\\": 2000000,\\n" + + " \\\"maxLeverage\\\": 30,\\n" + + " \\\"initialMargin\\\": 0.034,\\n" + + " \\\"maintainMargin\\\": 0.017\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"level\\\": 6,\\n" + + " \\\"maxRiskLimit\\\": 5000000,\\n" + + " \\\"minRiskLimit\\\": 3000000,\\n" + + " \\\"maxLeverage\\\": 20,\\n" + + " \\\"initialMargin\\\": 0.05,\\n" + + " \\\"maintainMargin\\\": 0.025\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"level\\\": 7,\\n" + + " \\\"maxRiskLimit\\\": 8000000,\\n" + + " \\\"minRiskLimit\\\": 5000000,\\n" + + " \\\"maxLeverage\\\": 10,\\n" + + " \\\"initialMargin\\\": 0.1,\\n" + + " \\\"maintainMargin\\\": 0.05\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"level\\\": 8,\\n" + + " \\\"maxRiskLimit\\\": 12000000,\\n" + + " \\\"minRiskLimit\\\": 8000000,\\n" + + " \\\"maxLeverage\\\": 5,\\n" + + " \\\"initialMargin\\\": 0.2,\\n" + + " \\\"maintainMargin\\\": 0.1\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"level\\\": 9,\\n" + + " \\\"maxRiskLimit\\\": 20000000,\\n" + + " \\\"minRiskLimit\\\": 12000000,\\n" + + " \\\"maxLeverage\\\": 4,\\n" + + " \\\"initialMargin\\\": 0.25,\\n" + + " \\\"maintainMargin\\\": 0.125\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"level\\\": 10,\\n" + + " \\\"maxRiskLimit\\\": 30000000,\\n" + + " \\\"minRiskLimit\\\": 20000000,\\n" + + " \\\"maxLeverage\\\": 3,\\n" + + " \\\"initialMargin\\\": 0.334,\\n" + + " \\\"maintainMargin\\\": 0.167\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"level\\\": 11,\\n" + + " \\\"maxRiskLimit\\\": 40000000,\\n" + + " \\\"minRiskLimit\\\": 30000000,\\n" + + " \\\"maxLeverage\\\": 2,\\n" + + " \\\"initialMargin\\\": 0.5,\\n" + + " \\\"maintainMargin\\\": 0.25\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" + + " \\\"level\\\": 12,\\n" + + " \\\"maxRiskLimit\\\": 50000000,\\n" + + " \\\"minRiskLimit\\\": 40000000,\\n" + + " \\\"maxLeverage\\\": 1,\\n" + + " \\\"initialMargin\\\": 1.0,\\n" + + " \\\"maintainMargin\\\": 0.5\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue( @@ -612,7 +616,7 @@ public static void testGetIsolatedMarginRiskLimitResponse() throws Exception { * /api/v1/position/risk-limit-level/change */ public static void testModifyIsolatedMarginRiskLimtRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\", \"level\": 2}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"level\\\": 2}"; ModifyIsolatedMarginRiskLimtReq obj = mapper.readValue(data, ModifyIsolatedMarginRiskLimtReq.class); } @@ -622,7 +626,7 @@ public static void testModifyIsolatedMarginRiskLimtRequest() throws Exception { * /api/v1/position/risk-limit-level/change */ public static void testModifyIsolatedMarginRiskLimtResponse() throws Exception { - String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; + String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": true\\n}"; RestResponse resp = mapper.readValue( data, new TypeReference>() {}); @@ -633,7 +637,7 @@ public static void testModifyIsolatedMarginRiskLimtResponse() throws Exception { * /api/v1/position/margin/auto-deposit-status */ public static void testModifyAutoDepositStatusRequest() throws Exception { - String data = "{\"symbol\": \"XBTUSDTM\", \"status\": true}"; + String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"status\\\": true}"; ModifyAutoDepositStatusReq obj = mapper.readValue(data, ModifyAutoDepositStatusReq.class); } @@ -642,7 +646,7 @@ public static void testModifyAutoDepositStatusRequest() throws Exception { * /api/v1/position/margin/auto-deposit-status */ public static void testModifyAutoDepositStatusResponse() throws Exception { - String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; + String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": true\\n}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApiAutoGeneratedTest.java index c971ed7d..7a80b602 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApiAutoGeneratedTest.java @@ -13,30 +13,30 @@ class CreditApiAutoGeneratedTest { /** getLoanMarket Request Get Loan Market /api/v3/project/list */ public static void testGetLoanMarketRequest() throws Exception { - String data = "{\"currency\": \"BTC\"}"; + String data = "{\\\"currency\\\": \\\"BTC\\\"}"; GetLoanMarketReq obj = mapper.readValue(data, GetLoanMarketReq.class); } /** getLoanMarket Response Get Loan Market /api/v3/project/list */ public static void testGetLoanMarketResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"currency\": \"BTC\",\n" - + " \"purchaseEnable\": true,\n" - + " \"redeemEnable\": true,\n" - + " \"increment\": \"0.00000001\",\n" - + " \"minPurchaseSize\": \"0.001\",\n" - + " \"maxPurchaseSize\": \"40\",\n" - + " \"interestIncrement\": \"0.0001\",\n" - + " \"minInterestRate\": \"0.005\",\n" - + " \"marketInterestRate\": \"0.005\",\n" - + " \"maxInterestRate\": \"0.32\",\n" - + " \"autoPurchaseEnable\": false\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"currency\\\": \\\"BTC\\\",\\n" + + " \\\"purchaseEnable\\\": true,\\n" + + " \\\"redeemEnable\\\": true,\\n" + + " \\\"increment\\\": \\\"0.00000001\\\",\\n" + + " \\\"minPurchaseSize\\\": \\\"0.001\\\",\\n" + + " \\\"maxPurchaseSize\\\": \\\"40\\\",\\n" + + " \\\"interestIncrement\\\": \\\"0.0001\\\",\\n" + + " \\\"minInterestRate\\\": \\\"0.005\\\",\\n" + + " \\\"marketInterestRate\\\": \\\"0.005\\\",\\n" + + " \\\"maxInterestRate\\\": \\\"0.32\\\",\\n" + + " \\\"autoPurchaseEnable\\\": false\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -47,7 +47,7 @@ public static void testGetLoanMarketResponse() throws Exception { * /api/v3/project/marketInterestRate */ public static void testGetLoanMarketInterestRateRequest() throws Exception { - String data = "{\"currency\": \"BTC\"}"; + String data = "{\\\"currency\\\": \\\"BTC\\\"}"; GetLoanMarketInterestRateReq obj = mapper.readValue(data, GetLoanMarketInterestRateReq.class); } @@ -57,18 +57,18 @@ public static void testGetLoanMarketInterestRateRequest() throws Exception { */ public static void testGetLoanMarketInterestRateResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"time\": \"202410170000\",\n" - + " \"marketInterestRate\": \"0.005\"\n" - + " },\n" - + " {\n" - + " \"time\": \"202410170100\",\n" - + " \"marketInterestRate\": \"0.005\"\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"time\\\": \\\"202410170000\\\",\\n" + + " \\\"marketInterestRate\\\": \\\"0.005\\\"\\n" + + " },\\n" + + " {\\n" + + " \\\"time\\\": \\\"202410170100\\\",\\n" + + " \\\"marketInterestRate\\\": \\\"0.005\\\"\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -76,18 +76,20 @@ public static void testGetLoanMarketInterestRateResponse() throws Exception { /** purchase Request Purchase /api/v3/purchase */ public static void testPurchaseRequest() throws Exception { - String data = "{\"currency\": \"BTC\", \"size\": \"0.001\", \"interestRate\": \"0.1\"}"; + String data = + "{\\\"currency\\\": \\\"BTC\\\", \\\"size\\\": \\\"0.001\\\", \\\"interestRate\\\":" + + " \\\"0.1\\\"}"; PurchaseReq obj = mapper.readValue(data, PurchaseReq.class); } /** purchase Response Purchase /api/v3/purchase */ public static void testPurchaseResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderNo\": \"671bafa804c26d000773c533\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderNo\\\": \\\"671bafa804c26d000773c533\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -96,14 +98,14 @@ public static void testPurchaseResponse() throws Exception { /** modifyPurchase Request Modify Purchase /api/v3/lend/purchase/update */ public static void testModifyPurchaseRequest() throws Exception { String data = - "{\"currency\": \"BTC\", \"purchaseOrderNo\": \"671bafa804c26d000773c533\"," - + " \"interestRate\": \"0.09\"}"; + "{\\\"currency\\\": \\\"BTC\\\", \\\"purchaseOrderNo\\\": \\\"671bafa804c26d000773c533\\\"," + + " \\\"interestRate\\\": \\\"0.09\\\"}"; ModifyPurchaseReq obj = mapper.readValue(data, ModifyPurchaseReq.class); } /** modifyPurchase Response Modify Purchase /api/v3/lend/purchase/update */ public static void testModifyPurchaseResponse() throws Exception { - String data = "{\n \"code\": \"200000\",\n \"data\": null\n}"; + String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": null\\n}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -111,34 +113,35 @@ public static void testModifyPurchaseResponse() throws Exception { /** getPurchaseOrders Request Get Purchase Orders /api/v3/purchase/orders */ public static void testGetPurchaseOrdersRequest() throws Exception { String data = - "{\"status\": \"DONE\", \"currency\": \"BTC\", \"purchaseOrderNo\":" - + " \"example_string_default_value\", \"currentPage\": 1, \"pageSize\": 50}"; + "{\\\"status\\\": \\\"DONE\\\", \\\"currency\\\": \\\"BTC\\\", \\\"purchaseOrderNo\\\":" + + " \\\"example_string_default_value\\\", \\\"currentPage\\\": 1, \\\"pageSize\\\":" + + " 50}"; GetPurchaseOrdersReq obj = mapper.readValue(data, GetPurchaseOrdersReq.class); } /** getPurchaseOrders Response Get Purchase Orders /api/v3/purchase/orders */ public static void testGetPurchaseOrdersResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"currentPage\": 1,\n" - + " \"pageSize\": 10,\n" - + " \"totalNum\": 1,\n" - + " \"totalPage\": 1,\n" - + " \"items\": [\n" - + " {\n" - + " \"currency\": \"BTC\",\n" - + " \"purchaseOrderNo\": \"671bb15a3b3f930007880bae\",\n" - + " \"purchaseSize\": \"0.001\",\n" - + " \"matchSize\": \"0\",\n" - + " \"interestRate\": \"0.1\",\n" - + " \"incomeSize\": \"0\",\n" - + " \"applyTime\": 1729868122172,\n" - + " \"status\": \"PENDING\"\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" + + " \\\"currency\\\": \\\"BTC\\\",\\n" + + " \\\"purchaseOrderNo\\\": \\\"671bb15a3b3f930007880bae\\\",\\n" + + " \\\"purchaseSize\\\": \\\"0.001\\\",\\n" + + " \\\"matchSize\\\": \\\"0\\\",\\n" + + " \\\"interestRate\\\": \\\"0.1\\\",\\n" + + " \\\"incomeSize\\\": \\\"0\\\",\\n" + + " \\\"applyTime\\\": 1729868122172,\\n" + + " \\\"status\\\": \\\"PENDING\\\"\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -147,19 +150,19 @@ public static void testGetPurchaseOrdersResponse() throws Exception { /** redeem Request Redeem /api/v3/redeem */ public static void testRedeemRequest() throws Exception { String data = - "{\"currency\": \"BTC\", \"size\": \"0.001\", \"purchaseOrderNo\":" - + " \"671bafa804c26d000773c533\"}"; + "{\\\"currency\\\": \\\"BTC\\\", \\\"size\\\": \\\"0.001\\\", \\\"purchaseOrderNo\\\":" + + " \\\"671bafa804c26d000773c533\\\"}"; RedeemReq obj = mapper.readValue(data, RedeemReq.class); } /** redeem Response Redeem /api/v3/redeem */ public static void testRedeemResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderNo\": \"671bafa804c26d000773c533\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderNo\\\": \\\"671bafa804c26d000773c533\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -168,33 +171,34 @@ public static void testRedeemResponse() throws Exception { /** getRedeemOrders Request Get Redeem Orders /api/v3/redeem/orders */ public static void testGetRedeemOrdersRequest() throws Exception { String data = - "{\"status\": \"DONE\", \"currency\": \"BTC\", \"redeemOrderNo\":" - + " \"example_string_default_value\", \"currentPage\": 1, \"pageSize\": 50}"; + "{\\\"status\\\": \\\"DONE\\\", \\\"currency\\\": \\\"BTC\\\", \\\"redeemOrderNo\\\":" + + " \\\"example_string_default_value\\\", \\\"currentPage\\\": 1, \\\"pageSize\\\":" + + " 50}"; GetRedeemOrdersReq obj = mapper.readValue(data, GetRedeemOrdersReq.class); } /** getRedeemOrders Response Get Redeem Orders /api/v3/redeem/orders */ public static void testGetRedeemOrdersResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"currentPage\": 1,\n" - + " \"pageSize\": 10,\n" - + " \"totalNum\": 1,\n" - + " \"totalPage\": 1,\n" - + " \"items\": [\n" - + " {\n" - + " \"currency\": \"BTC\",\n" - + " \"purchaseOrderNo\": \"671bafa804c26d000773c533\",\n" - + " \"redeemOrderNo\": \"671bb01004c26d000773c55c\",\n" - + " \"redeemSize\": \"0.001\",\n" - + " \"receiptSize\": \"0.001\",\n" - + " \"applyTime\": null,\n" - + " \"status\": \"DONE\"\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" + + " \\\"currency\\\": \\\"BTC\\\",\\n" + + " \\\"purchaseOrderNo\\\": \\\"671bafa804c26d000773c533\\\",\\n" + + " \\\"redeemOrderNo\\\": \\\"671bb01004c26d000773c55c\\\",\\n" + + " \\\"redeemSize\\\": \\\"0.001\\\",\\n" + + " \\\"receiptSize\\\": \\\"0.001\\\",\\n" + + " \\\"applyTime\\\": null,\\n" + + " \\\"status\\\": \\\"DONE\\\"\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApiAutoGeneratedTest.java index 266ac374..6228526b 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApiAutoGeneratedTest.java @@ -14,15 +14,15 @@ class DebitApiAutoGeneratedTest { /** borrow Request Borrow /api/v3/margin/borrow */ public static void testBorrowRequest() throws Exception { String data = - "{\"currency\": \"USDT\", \"size\": 10, \"timeInForce\": \"FOK\", \"isIsolated\": false," - + " \"isHf\": false}"; + "{\\\"currency\\\": \\\"USDT\\\", \\\"size\\\": 10, \\\"timeInForce\\\": \\\"FOK\\\"," + + " \\\"isIsolated\\\": false, \\\"isHf\\\": false}"; BorrowReq obj = mapper.readValue(data, BorrowReq.class); } /** borrow Response Borrow /api/v3/margin/borrow */ public static void testBorrowResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"orderNo\":\"67187162c0d6990007717b15\",\"actualSize\":\"10\"}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"orderNo\\\":\\\"67187162c0d6990007717b15\\\",\\\"actualSize\\\":\\\"10\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -30,44 +30,45 @@ public static void testBorrowResponse() throws Exception { /** getBorrowHistory Request Get Borrow History /api/v3/margin/borrow */ public static void testGetBorrowHistoryRequest() throws Exception { String data = - "{\"currency\": \"BTC\", \"isIsolated\": true, \"symbol\": \"BTC-USDT\", \"orderNo\":" - + " \"example_string_default_value\", \"startTime\": 123456, \"endTime\": 123456," - + " \"currentPage\": 1, \"pageSize\": 50}"; + "{\\\"currency\\\": \\\"BTC\\\", \\\"isIsolated\\\": true, \\\"symbol\\\":" + + " \\\"BTC-USDT\\\", \\\"orderNo\\\": \\\"example_string_default_value\\\"," + + " \\\"startTime\\\": 123456, \\\"endTime\\\": 123456, \\\"currentPage\\\": 1," + + " \\\"pageSize\\\": 50}"; GetBorrowHistoryReq obj = mapper.readValue(data, GetBorrowHistoryReq.class); } /** getBorrowHistory Response Get Borrow History /api/v3/margin/borrow */ public static void testGetBorrowHistoryResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"timestamp\": 1729657580449,\n" - + " \"currentPage\": 1,\n" - + " \"pageSize\": 50,\n" - + " \"totalNum\": 2,\n" - + " \"totalPage\": 1,\n" - + " \"items\": [\n" - + " {\n" - + " \"orderNo\": \"67187162c0d6990007717b15\",\n" - + " \"symbol\": null,\n" - + " \"currency\": \"USDT\",\n" - + " \"size\": \"10\",\n" - + " \"actualSize\": \"10\",\n" - + " \"status\": \"SUCCESS\",\n" - + " \"createdTime\": 1729655138000\n" - + " },\n" - + " {\n" - + " \"orderNo\": \"67187155b088e70007149585\",\n" - + " \"symbol\": null,\n" - + " \"currency\": \"USDT\",\n" - + " \"size\": \"0.1\",\n" - + " \"actualSize\": \"0\",\n" - + " \"status\": \"FAILED\",\n" - + " \"createdTime\": 1729655125000\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"timestamp\\\": 1729657580449,\\n" + + " \\\"currentPage\\\": 1,\\n" + + " \\\"pageSize\\\": 50,\\n" + + " \\\"totalNum\\\": 2,\\n" + + " \\\"totalPage\\\": 1,\\n" + + " \\\"items\\\": [\\n" + + " {\\n" + + " \\\"orderNo\\\": \\\"67187162c0d6990007717b15\\\",\\n" + + " \\\"symbol\\\": null,\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"size\\\": \\\"10\\\",\\n" + + " \\\"actualSize\\\": \\\"10\\\",\\n" + + " \\\"status\\\": \\\"SUCCESS\\\",\\n" + + " \\\"createdTime\\\": 1729655138000\\n" + + " },\\n" + + " {\\n" + + " \\\"orderNo\\\": \\\"67187155b088e70007149585\\\",\\n" + + " \\\"symbol\\\": null,\\n" + + " \\\"currency\\\": \\\"USDT\\\",\\n" + + " \\\"size\\\": \\\"0.1\\\",\\n" + + " \\\"actualSize\\\": \\\"0\\\",\\n" + + " \\\"status\\\": \\\"FAILED\\\",\\n" + + " \\\"createdTime\\\": 1729655125000\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -75,14 +76,14 @@ public static void testGetBorrowHistoryResponse() throws Exception { /** repay Request Repay /api/v3/margin/repay */ public static void testRepayRequest() throws Exception { - String data = "{\"currency\": \"USDT\", \"size\": 10}"; + String data = "{\\\"currency\\\": \\\"USDT\\\", \\\"size\\\": 10}"; RepayReq obj = mapper.readValue(data, RepayReq.class); } /** repay Response Repay /api/v3/margin/repay */ public static void testRepayResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"timestamp\":1729655606816,\"orderNo\":\"671873361d5bd400075096ad\",\"actualSize\":\"10\"}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"timestamp\\\":1729655606816,\\\"orderNo\\\":\\\"671873361d5bd400075096ad\\\",\\\"actualSize\\\":\\\"10\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -90,16 +91,17 @@ public static void testRepayResponse() throws Exception { /** getRepayHistory Request Get Repay History /api/v3/margin/repay */ public static void testGetRepayHistoryRequest() throws Exception { String data = - "{\"currency\": \"BTC\", \"isIsolated\": true, \"symbol\": \"BTC-USDT\", \"orderNo\":" - + " \"example_string_default_value\", \"startTime\": 123456, \"endTime\": 123456," - + " \"currentPage\": 1, \"pageSize\": 50}"; + "{\\\"currency\\\": \\\"BTC\\\", \\\"isIsolated\\\": true, \\\"symbol\\\":" + + " \\\"BTC-USDT\\\", \\\"orderNo\\\": \\\"example_string_default_value\\\"," + + " \\\"startTime\\\": 123456, \\\"endTime\\\": 123456, \\\"currentPage\\\": 1," + + " \\\"pageSize\\\": 50}"; GetRepayHistoryReq obj = mapper.readValue(data, GetRepayHistoryReq.class); } /** getRepayHistory Response Get Repay History /api/v3/margin/repay */ public static void testGetRepayHistoryResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"timestamp\":1729663471891,\"currentPage\":1,\"pageSize\":50,\"totalNum\":1,\"totalPage\":1,\"items\":[{\"orderNo\":\"671873361d5bd400075096ad\",\"symbol\":null,\"currency\":\"USDT\",\"size\":\"10\",\"principal\":\"9.99986518\",\"interest\":\"0.00013482\",\"status\":\"SUCCESS\",\"createdTime\":1729655606000}]}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"timestamp\\\":1729663471891,\\\"currentPage\\\":1,\\\"pageSize\\\":50,\\\"totalNum\\\":1,\\\"totalPage\\\":1,\\\"items\\\":[{\\\"orderNo\\\":\\\"671873361d5bd400075096ad\\\",\\\"symbol\\\":null,\\\"currency\\\":\\\"USDT\\\",\\\"size\\\":\\\"10\\\",\\\"principal\\\":\\\"9.99986518\\\",\\\"interest\\\":\\\"0.00013482\\\",\\\"status\\\":\\\"SUCCESS\\\",\\\"createdTime\\\":1729655606000}]}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -107,28 +109,29 @@ public static void testGetRepayHistoryResponse() throws Exception { /** getInterestHistory Request Get Interest History. /api/v3/margin/interest */ public static void testGetInterestHistoryRequest() throws Exception { String data = - "{\"currency\": \"BTC\", \"isIsolated\": true, \"symbol\": \"BTC-USDT\", \"startTime\":" - + " 123456, \"endTime\": 123456, \"currentPage\": 1, \"pageSize\": 50}"; + "{\\\"currency\\\": \\\"BTC\\\", \\\"isIsolated\\\": true, \\\"symbol\\\":" + + " \\\"BTC-USDT\\\", \\\"startTime\\\": 123456, \\\"endTime\\\": 123456," + + " \\\"currentPage\\\": 1, \\\"pageSize\\\": 50}"; GetInterestHistoryReq obj = mapper.readValue(data, GetInterestHistoryReq.class); } /** getInterestHistory Response Get Interest History. /api/v3/margin/interest */ public static void testGetInterestHistoryResponse() throws Exception { String 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}]}}"; + "{\\\"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}]}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** modifyLeverage Request Modify Leverage /api/v3/position/update-user-leverage */ public static void testModifyLeverageRequest() throws Exception { - String data = "{\"leverage\": \"5\"}"; + String data = "{\\\"leverage\\\": \\\"5\\\"}"; ModifyLeverageReq obj = mapper.readValue(data, ModifyLeverageReq.class); } /** modifyLeverage Response Modify Leverage /api/v3/position/update-user-leverage */ public static void testModifyLeverageResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":null}"; + String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":null}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsAutoGeneratedTest.java index 7463472e..da67318d 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsAutoGeneratedTest.java @@ -14,7 +14,7 @@ class MarginPrivateWsAutoGeneratedTest { /** crossMarginPosition Get Cross Margin Position change /crossMarginPosition/margin/position */ public static void testCrossMarginPositionResponse() throws Exception { String data = - "{\"topic\":\"/margin/position\",\"subject\":\"debt.ratio\",\"type\":\"message\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"debtRatio\":0,\"totalAsset\":0.00052431772284080000000,\"marginCoefficientTotalAsset\":\"0.0005243177228408\",\"totalDebt\":\"0\",\"assetList\":{\"BTC\":{\"total\":\"0.00002\",\"available\":\"0\",\"hold\":\"0.00002\"},\"USDT\":{\"total\":\"33.68855864\",\"available\":\"15.01916691\",\"hold\":\"18.66939173\"}},\"debtList\":{\"BTC\":\"0\",\"USDT\":\"0\"},\"timestamp\":1729912435657}}"; + "{\\\"topic\\\":\\\"/margin/position\\\",\\\"subject\\\":\\\"debt.ratio\\\",\\\"type\\\":\\\"message\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\",\\\"data\\\":{\\\"debtRatio\\\":0,\\\"totalAsset\\\":0.00052431772284080000000,\\\"marginCoefficientTotalAsset\\\":\\\"0.0005243177228408\\\",\\\"totalDebt\\\":\\\"0\\\",\\\"assetList\\\":{\\\"BTC\\\":{\\\"total\\\":\\\"0.00002\\\",\\\"available\\\":\\\"0\\\",\\\"hold\\\":\\\"0.00002\\\"},\\\"USDT\\\":{\\\"total\\\":\\\"33.68855864\\\",\\\"available\\\":\\\"15.01916691\\\",\\\"hold\\\":\\\"18.66939173\\\"}},\\\"debtList\\\":{\\\"BTC\\\":\\\"0\\\",\\\"USDT\\\":\\\"0\\\"},\\\"timestamp\\\":1729912435657}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -25,7 +25,7 @@ public static void testCrossMarginPositionResponse() throws Exception { */ public static void testIsolatedMarginPositionResponse() throws Exception { String data = - "{\"topic\":\"/margin/isolatedPosition:BTC-USDT\",\"subject\":\"positionChange\",\"type\":\"message\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"tag\":\"BTC-USDT\",\"status\":\"DEBT\",\"statusBizType\":\"DEFAULT_DEBT\",\"accumulatedPrincipal\":\"5.01\",\"changeAssets\":{\"BTC\":{\"total\":\"0.00043478\",\"hold\":\"0\",\"liabilityPrincipal\":\"0\",\"liabilityInterest\":\"0\"},\"USDT\":{\"total\":\"0.98092004\",\"hold\":\"0\",\"liabilityPrincipal\":\"26\",\"liabilityInterest\":\"0.00025644\"}},\"timestamp\":1730121097742}}"; + "{\\\"topic\\\":\\\"/margin/isolatedPosition:BTC-USDT\\\",\\\"subject\\\":\\\"positionChange\\\",\\\"type\\\":\\\"message\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\",\\\"data\\\":{\\\"tag\\\":\\\"BTC-USDT\\\",\\\"status\\\":\\\"DEBT\\\",\\\"statusBizType\\\":\\\"DEFAULT_DEBT\\\",\\\"accumulatedPrincipal\\\":\\\"5.01\\\",\\\"changeAssets\\\":{\\\"BTC\\\":{\\\"total\\\":\\\"0.00043478\\\",\\\"hold\\\":\\\"0\\\",\\\"liabilityPrincipal\\\":\\\"0\\\",\\\"liabilityInterest\\\":\\\"0\\\"},\\\"USDT\\\":{\\\"total\\\":\\\"0.98092004\\\",\\\"hold\\\":\\\"0\\\",\\\"liabilityPrincipal\\\":\\\"26\\\",\\\"liabilityInterest\\\":\\\"0.00025644\\\"}},\\\"timestamp\\\":1730121097742}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsAutoGeneratedTest.java index 3f00bcc0..2e9eeaab 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsAutoGeneratedTest.java @@ -14,7 +14,7 @@ class MarginPublicWsAutoGeneratedTest { /** indexPrice Index Price /indexPrice/indicator/index:_symbol_,_symbol_ */ public static void testIndexPriceResponse() throws Exception { String data = - "{\"id\":\"5c24c5da03aa673885cd67a0\",\"type\":\"message\",\"topic\":\"/indicator/index:USDT-BTC\",\"subject\":\"tick\",\"data\":{\"symbol\":\"USDT-BTC\",\"granularity\":5000,\"timestamp\":1551770400000,\"value\":0.0001092}}"; + "{\\\"id\\\":\\\"5c24c5da03aa673885cd67a0\\\",\\\"type\\\":\\\"message\\\",\\\"topic\\\":\\\"/indicator/index:USDT-BTC\\\",\\\"subject\\\":\\\"tick\\\",\\\"data\\\":{\\\"symbol\\\":\\\"USDT-BTC\\\",\\\"granularity\\\":5000,\\\"timestamp\\\":1551770400000,\\\"value\\\":0.0001092}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -22,7 +22,7 @@ public static void testIndexPriceResponse() throws Exception { /** markPrice Mark Price /markPrice/indicator/markPrice:_symbol_,_symbol_ */ public static void testMarkPriceResponse() throws Exception { String data = - "{\"id\":\"5c24c5da03aa673885cd67aa\",\"type\":\"message\",\"topic\":\"/indicator/markPrice:USDT-BTC\",\"subject\":\"tick\",\"data\":{\"symbol\":\"USDT-BTC\",\"granularity\":5000,\"timestamp\":1551770400000,\"value\":0.0001093}}"; + "{\\\"id\\\":\\\"5c24c5da03aa673885cd67aa\\\",\\\"type\\\":\\\"message\\\",\\\"topic\\\":\\\"/indicator/markPrice:USDT-BTC\\\",\\\"subject\\\":\\\"tick\\\",\\\"data\\\":{\\\"symbol\\\":\\\"USDT-BTC\\\",\\\"granularity\\\":5000,\\\"timestamp\\\":1551770400000,\\\"value\\\":0.0001093}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiAutoGeneratedTest.java index e2e93866..87ba433a 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiAutoGeneratedTest.java @@ -13,38 +13,38 @@ class MarketApiAutoGeneratedTest { /** getCrossMarginSymbols Request Get Symbols - Cross Margin /api/v3/margin/symbols */ public static void testGetCrossMarginSymbolsRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\"}"; + String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; GetCrossMarginSymbolsReq obj = mapper.readValue(data, GetCrossMarginSymbolsReq.class); } /** getCrossMarginSymbols Response Get Symbols - Cross Margin /api/v3/margin/symbols */ public static void testGetCrossMarginSymbolsResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"timestamp\": 1729665839353,\n" - + " \"items\": [\n" - + " {\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"name\": \"BTC-USDT\",\n" - + " \"enableTrading\": true,\n" - + " \"market\": \"USDS\",\n" - + " \"baseCurrency\": \"BTC\",\n" - + " \"quoteCurrency\": \"USDT\",\n" - + " \"baseIncrement\": \"0.00000001\",\n" - + " \"baseMinSize\": \"0.00001\",\n" - + " \"baseMaxSize\": \"10000000000\",\n" - + " \"quoteIncrement\": \"0.000001\",\n" - + " \"quoteMinSize\": \"0.1\",\n" - + " \"quoteMaxSize\": \"99999999\",\n" - + " \"priceIncrement\": \"0.1\",\n" - + " \"feeCurrency\": \"USDT\",\n" - + " \"priceLimitRate\": \"0.1\",\n" - + " \"minFunds\": \"0.1\"\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"timestamp\\\": 1729665839353,\\n" + + " \\\"items\\\": [\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"name\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"enableTrading\\\": true,\\n" + + " \\\"market\\\": \\\"USDS\\\",\\n" + + " \\\"baseCurrency\\\": \\\"BTC\\\",\\n" + + " \\\"quoteCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"baseIncrement\\\": \\\"0.00000001\\\",\\n" + + " \\\"baseMinSize\\\": \\\"0.00001\\\",\\n" + + " \\\"baseMaxSize\\\": \\\"10000000000\\\",\\n" + + " \\\"quoteIncrement\\\": \\\"0.000001\\\",\\n" + + " \\\"quoteMinSize\\\": \\\"0.1\\\",\\n" + + " \\\"quoteMaxSize\\\": \\\"99999999\\\",\\n" + + " \\\"priceIncrement\\\": \\\"0.1\\\",\\n" + + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"priceLimitRate\\\": \\\"0.1\\\",\\n" + + " \\\"minFunds\\\": \\\"0.1\\\"\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -52,25 +52,25 @@ public static void testGetCrossMarginSymbolsResponse() throws Exception { /** getETFInfo Request Get ETF Info /api/v3/etf/info */ public static void testGetETFInfoRequest() throws Exception { - String data = "{\"currency\": \"BTCUP\"}"; + String data = "{\\\"currency\\\": \\\"BTCUP\\\"}"; GetETFInfoReq obj = mapper.readValue(data, GetETFInfoReq.class); } /** getETFInfo Response Get ETF Info /api/v3/etf/info */ public static void testGetETFInfoResponse() throws Exception { String data = - "{\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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -78,20 +78,20 @@ public static void testGetETFInfoResponse() throws Exception { /** getMarkPriceDetail Request Get Mark Price Detail /api/v1/mark-price/{symbol}/current */ public static void testGetMarkPriceDetailRequest() throws Exception { - String data = "{\"symbol\": \"USDT-BTC\"}"; + String data = "{\\\"symbol\\\": \\\"USDT-BTC\\\"}"; GetMarkPriceDetailReq obj = mapper.readValue(data, GetMarkPriceDetailReq.class); } /** getMarkPriceDetail Response Get Mark Price Detail /api/v1/mark-price/{symbol}/current */ public static void testGetMarkPriceDetailResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"symbol\": \"USDT-BTC\",\n" - + " \"timePoint\": 1729676888000,\n" - + " \"value\": 1.5045E-5\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"symbol\\\": \\\"USDT-BTC\\\",\\n" + + " \\\"timePoint\\\": 1729676888000,\\n" + + " \\\"value\\\": 1.5045E-5\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -105,191 +105,191 @@ public static void testGetMarginConfigRequest() throws Exception { /** getMarginConfig Response Get Margin Config /api/v1/margin/config */ public static void testGetMarginConfigResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -303,20 +303,20 @@ public static void testGetMarkPriceListRequest() throws Exception { /** getMarkPriceList Response Get Mark Price List /api/v3/mark-price/all-symbols */ public static void testGetMarkPriceListResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -330,26 +330,26 @@ public static void testGetIsolatedMarginSymbolsRequest() throws Exception { /** getIsolatedMarginSymbols Response Get Symbols - Isolated Margin /api/v1/isolated/symbols */ public static void testGetIsolatedMarginSymbolsResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"symbolName\": \"BTC-USDT\",\n" - + " \"baseCurrency\": \"BTC\",\n" - + " \"quoteCurrency\": \"USDT\",\n" - + " \"maxLeverage\": 10,\n" - + " \"flDebtRatio\": \"0.97\",\n" - + " \"tradeEnable\": true,\n" - + " \"autoRenewMaxDebtRatio\": \"0.96\",\n" - + " \"baseBorrowEnable\": true,\n" - + " \"quoteBorrowEnable\": true,\n" - + " \"baseTransferInEnable\": true,\n" - + " \"quoteTransferInEnable\": true,\n" - + " \"baseBorrowCoefficient\": \"1\",\n" - + " \"quoteBorrowCoefficient\": \"1\"\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"symbolName\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"baseCurrency\\\": \\\"BTC\\\",\\n" + + " \\\"quoteCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"maxLeverage\\\": 10,\\n" + + " \\\"flDebtRatio\\\": \\\"0.97\\\",\\n" + + " \\\"tradeEnable\\\": true,\\n" + + " \\\"autoRenewMaxDebtRatio\\\": \\\"0.96\\\",\\n" + + " \\\"baseBorrowEnable\\\": true,\\n" + + " \\\"quoteBorrowEnable\\\": true,\\n" + + " \\\"baseTransferInEnable\\\": true,\\n" + + " \\\"quoteTransferInEnable\\\": true,\\n" + + " \\\"baseBorrowCoefficient\\\": \\\"1\\\",\\n" + + " \\\"quoteBorrowCoefficient\\\": \\\"1\\\"\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApiAutoGeneratedTest.java index d60212b4..8db19b65 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApiAutoGeneratedTest.java @@ -14,24 +14,24 @@ class OrderApiAutoGeneratedTest { /** addOrder Request Add Order /api/v3/hf/margin/order */ public static void testAddOrderRequest() throws Exception { String 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\\\", \\\"size\\\": \\\"0.00001\\\", \\\"clientOid\\\":" + + " \\\"5c52e11203aa677f33e493fb\\\", \\\"remark\\\": \\\"order remarks\\\"}"; AddOrderReq obj = mapper.readValue(data, AddOrderReq.class); } /** addOrder Response Add Order /api/v3/hf/margin/order */ public static void testAddOrderResponse() throws Exception { String data = - "{\n" - + " \"success\": true,\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"671663e02188630007e21c9c\",\n" - + " \"clientOid\": \"5c52e11203aa677f33e1493fb\",\n" - + " \"borrowSize\": \"10.2\",\n" - + " \"loanApplyId\": \"600656d9a33ac90009de4f6f\"\n" - + " }\n" + "{\\n" + + " \\\"success\\\": true,\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"671663e02188630007e21c9c\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e1493fb\\\",\\n" + + " \\\"borrowSize\\\": \\\"10.2\\\",\\n" + + " \\\"loanApplyId\\\": \\\"600656d9a33ac90009de4f6f\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -40,24 +40,24 @@ public static void testAddOrderResponse() throws Exception { /** addOrderTest Request Add Order Test /api/v3/hf/margin/order/test */ public static void testAddOrderTestRequest() throws Exception { String 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\\\", \\\"size\\\": \\\"0.00001\\\", \\\"clientOid\\\":" + + " \\\"5c52e11203aa677f33e493fb\\\", \\\"remark\\\": \\\"order remarks\\\"}"; AddOrderTestReq obj = mapper.readValue(data, AddOrderTestReq.class); } /** addOrderTest Response Add Order Test /api/v3/hf/margin/order/test */ public static void testAddOrderTestResponse() throws Exception { String data = - "{\n" - + " \"success\": true,\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"5bd6e9286d99522a52e458de\",\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" - + " \"borrowSize\": 10.2,\n" - + " \"loanApplyId\": \"600656d9a33ac90009de4f6f\"\n" - + " }\n" + "{\\n" + + " \\\"success\\\": true,\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"5bd6e9286d99522a52e458de\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" + + " \\\"borrowSize\\\": 10.2,\\n" + + " \\\"loanApplyId\\\": \\\"600656d9a33ac90009de4f6f\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -65,13 +65,15 @@ public static void testAddOrderTestResponse() throws Exception { /** cancelOrderByOrderId Request Cancel Order By OrderId /api/v3/hf/margin/orders/{orderId} */ public static void testCancelOrderByOrderIdRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\", \"orderId\": \"671663e02188630007e21c9c\"}"; + String data = + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"orderId\\\": \\\"671663e02188630007e21c9c\\\"}"; CancelOrderByOrderIdReq obj = mapper.readValue(data, CancelOrderByOrderIdReq.class); } /** cancelOrderByOrderId Response Cancel Order By OrderId /api/v3/hf/margin/orders/{orderId} */ public static void testCancelOrderByOrderIdResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":{\"orderId\":\"671663e02188630007e21c9c\"}}"; + String data = + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"orderId\\\":\\\"671663e02188630007e21c9c\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -81,7 +83,8 @@ public static void testCancelOrderByOrderIdResponse() throws Exception { * /api/v3/hf/margin/orders/client-order/{clientOid} */ public static void testCancelOrderByClientOidRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e1493fb\"}"; + String data = + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"clientOid\\\": \\\"5c52e11203aa677f33e1493fb\\\"}"; CancelOrderByClientOidReq obj = mapper.readValue(data, CancelOrderByClientOidReq.class); } @@ -90,20 +93,21 @@ public static void testCancelOrderByClientOidRequest() throws Exception { * /api/v3/hf/margin/orders/client-order/{clientOid} */ public static void testCancelOrderByClientOidResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":{\"clientOid\":\"5c52e11203aa677f33e1493fb\"}}"; + String data = + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"clientOid\\\":\\\"5c52e11203aa677f33e1493fb\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** cancelAllOrdersBySymbol Request Cancel All Orders By Symbol /api/v3/hf/margin/orders */ public static void testCancelAllOrdersBySymbolRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\", \"tradeType\": \"MARGIN_TRADE\"}"; + String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"tradeType\\\": \\\"MARGIN_TRADE\\\"}"; CancelAllOrdersBySymbolReq obj = mapper.readValue(data, CancelAllOrdersBySymbolReq.class); } /** cancelAllOrdersBySymbol Response Cancel All Orders By Symbol /api/v3/hf/margin/orders */ public static void testCancelAllOrdersBySymbolResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":\"success\"}"; + String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":\\\"success\\\"}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -113,7 +117,7 @@ public static void testCancelAllOrdersBySymbolResponse() throws Exception { * /api/v3/hf/margin/order/active/symbols */ public static void testGetSymbolsWithOpenOrderRequest() throws Exception { - String data = "{\"tradeType\": \"MARGIN_TRADE\"}"; + String data = "{\\\"tradeType\\\": \\\"MARGIN_TRADE\\\"}"; GetSymbolsWithOpenOrderReq obj = mapper.readValue(data, GetSymbolsWithOpenOrderReq.class); } @@ -123,14 +127,14 @@ public static void testGetSymbolsWithOpenOrderRequest() throws Exception { */ public static void testGetSymbolsWithOpenOrderResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"symbolSize\": 1,\n" - + " \"symbols\": [\n" - + " \"BTC-USDT\"\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"symbolSize\\\": 1,\\n" + + " \\\"symbols\\\": [\\n" + + " \\\"BTC-USDT\\\"\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -138,56 +142,56 @@ public static void testGetSymbolsWithOpenOrderResponse() throws Exception { /** getOpenOrders Request Get Open Orders /api/v3/hf/margin/orders/active */ public static void testGetOpenOrdersRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\", \"tradeType\": \"MARGIN_TRADE\"}"; + String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"tradeType\\\": \\\"MARGIN_TRADE\\\"}"; GetOpenOrdersReq obj = mapper.readValue(data, GetOpenOrdersReq.class); } /** getOpenOrders Response Get Open Orders /api/v3/hf/margin/orders/active */ public static void testGetOpenOrdersResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"id\": \"671667306afcdb000723107f\",\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\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" - + " \"remainSize\": \"0.00001\",\n" - + " \"remainFunds\": \"0.5\",\n" - + " \"cancelledSize\": \"0\",\n" - + " \"cancelledFunds\": \"0\",\n" - + " \"fee\": \"0\",\n" - + " \"feeCurrency\": \"USDT\",\n" - + " \"stp\": null,\n" - + " \"stop\": null,\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" - + " \"remark\": null,\n" - + " \"tags\": null,\n" - + " \"cancelExist\": false,\n" - + " \"tradeType\": \"MARGIN_TRADE\",\n" - + " \"inOrderBook\": true,\n" - + " \"active\": true,\n" - + " \"tax\": \"0\",\n" - + " \"createdAt\": 1729521456248,\n" - + " \"lastUpdatedAt\": 1729521460940\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"id\\\": \\\"671667306afcdb000723107f\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\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" + + " \\\"remainSize\\\": \\\"0.00001\\\",\\n" + + " \\\"remainFunds\\\": \\\"0.5\\\",\\n" + + " \\\"cancelledSize\\\": \\\"0\\\",\\n" + + " \\\"cancelledFunds\\\": \\\"0\\\",\\n" + + " \\\"fee\\\": \\\"0\\\",\\n" + + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"stp\\\": null,\\n" + + " \\\"stop\\\": null,\\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" + + " \\\"remark\\\": null,\\n" + + " \\\"tags\\\": null,\\n" + + " \\\"cancelExist\\\": false,\\n" + + " \\\"tradeType\\\": \\\"MARGIN_TRADE\\\",\\n" + + " \\\"inOrderBook\\\": true,\\n" + + " \\\"active\\\": true,\\n" + + " \\\"tax\\\": \\\"0\\\",\\n" + + " \\\"createdAt\\\": 1729521456248,\\n" + + " \\\"lastUpdatedAt\\\": 1729521460940\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -196,61 +200,61 @@ public static void testGetOpenOrdersResponse() throws Exception { /** getClosedOrders Request Get Closed Orders /api/v3/hf/margin/orders/done */ public static void testGetClosedOrdersRequest() throws Exception { String data = - "{\"symbol\": \"BTC-USDT\", \"tradeType\": \"MARGIN_TRADE\", \"side\": \"buy\", \"type\":" - + " \"limit\", \"lastId\": 254062248624417, \"limit\": 20, \"startAt\": 1728663338000," - + " \"endAt\": 1728692138000}"; + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"tradeType\\\": \\\"MARGIN_TRADE\\\", \\\"side\\\":" + + " \\\"buy\\\", \\\"type\\\": \\\"limit\\\", \\\"lastId\\\": 254062248624417," + + " \\\"limit\\\": 20, \\\"startAt\\\": 1728663338000, \\\"endAt\\\": 1728692138000}"; GetClosedOrdersReq obj = mapper.readValue(data, GetClosedOrdersReq.class); } /** getClosedOrders Response Get Closed Orders /api/v3/hf/margin/orders/done */ public static void testGetClosedOrdersResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"lastId\": 136112949351,\n" - + " \"items\": [\n" - + " {\n" - + " \"id\": \"6716491f6afcdb00078365c8\",\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\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" - + " \"remainSize\": \"0\",\n" - + " \"remainFunds\": \"0\",\n" - + " \"cancelledSize\": \"0.00001\",\n" - + " \"cancelledFunds\": \"0.5\",\n" - + " \"fee\": \"0\",\n" - + " \"feeCurrency\": \"USDT\",\n" - + " \"stp\": null,\n" - + " \"stop\": null,\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" - + " \"remark\": null,\n" - + " \"tags\": null,\n" - + " \"cancelExist\": true,\n" - + " \"tradeType\": \"MARGIN_TRADE\",\n" - + " \"inOrderBook\": false,\n" - + " \"active\": false,\n" - + " \"tax\": \"0\",\n" - + " \"createdAt\": 1729513759162,\n" - + " \"lastUpdatedAt\": 1729521126597\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"lastId\\\": 136112949351,\\n" + + " \\\"items\\\": [\\n" + + " {\\n" + + " \\\"id\\\": \\\"6716491f6afcdb00078365c8\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\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" + + " \\\"remainSize\\\": \\\"0\\\",\\n" + + " \\\"remainFunds\\\": \\\"0\\\",\\n" + + " \\\"cancelledSize\\\": \\\"0.00001\\\",\\n" + + " \\\"cancelledFunds\\\": \\\"0.5\\\",\\n" + + " \\\"fee\\\": \\\"0\\\",\\n" + + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"stp\\\": null,\\n" + + " \\\"stop\\\": null,\\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" + + " \\\"remark\\\": null,\\n" + + " \\\"tags\\\": null,\\n" + + " \\\"cancelExist\\\": true,\\n" + + " \\\"tradeType\\\": \\\"MARGIN_TRADE\\\",\\n" + + " \\\"inOrderBook\\\": false,\\n" + + " \\\"active\\\": false,\\n" + + " \\\"tax\\\": \\\"0\\\",\\n" + + " \\\"createdAt\\\": 1729513759162,\\n" + + " \\\"lastUpdatedAt\\\": 1729521126597\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -259,45 +263,45 @@ public static void testGetClosedOrdersResponse() throws Exception { /** getTradeHistory Request Get Trade History /api/v3/hf/margin/fills */ public static void testGetTradeHistoryRequest() throws Exception { String data = - "{\"symbol\": \"BTC-USDT\", \"tradeType\": \"MARGIN_TRADE\", \"orderId\":" - + " \"example_string_default_value\", \"side\": \"buy\", \"type\": \"limit\"," - + " \"lastId\": 254062248624417, \"limit\": 100, \"startAt\": 1728663338000, \"endAt\":" - + " 1728692138000}"; + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"tradeType\\\": \\\"MARGIN_TRADE\\\"," + + " \\\"orderId\\\": \\\"example_string_default_value\\\", \\\"side\\\": \\\"buy\\\"," + + " \\\"type\\\": \\\"limit\\\", \\\"lastId\\\": 254062248624417, \\\"limit\\\": 100," + + " \\\"startAt\\\": 1728663338000, \\\"endAt\\\": 1728692138000}"; GetTradeHistoryReq obj = mapper.readValue(data, GetTradeHistoryReq.class); } /** getTradeHistory Response Get Trade History /api/v3/hf/margin/fills */ public static void testGetTradeHistoryResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"items\": [\n" - + " {\n" - + " \"id\": 137891621991,\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"tradeId\": 11040911994273793,\n" - + " \"orderId\": \"671868085584bc0007d85f46\",\n" - + " \"counterOrderId\": \"67186805b7cbdf00071621f9\",\n" - + " \"side\": \"buy\",\n" - + " \"liquidity\": \"taker\",\n" - + " \"forceTaker\": false,\n" - + " \"price\": \"67141.6\",\n" - + " \"size\": \"0.00001\",\n" - + " \"funds\": \"0.671416\",\n" - + " \"fee\": \"0.000671416\",\n" - + " \"feeRate\": \"0.001\",\n" - + " \"feeCurrency\": \"USDT\",\n" - + " \"stop\": \"\",\n" - + " \"tradeType\": \"MARGIN_TRADE\",\n" - + " \"tax\": \"0\",\n" - + " \"taxRate\": \"0\",\n" - + " \"type\": \"limit\",\n" - + " \"createdAt\": 1729652744998\n" - + " }\n" - + " ],\n" - + " \"lastId\": 137891621991\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"items\\\": [\\n" + + " {\\n" + + " \\\"id\\\": 137891621991,\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"tradeId\\\": 11040911994273793,\\n" + + " \\\"orderId\\\": \\\"671868085584bc0007d85f46\\\",\\n" + + " \\\"counterOrderId\\\": \\\"67186805b7cbdf00071621f9\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"liquidity\\\": \\\"taker\\\",\\n" + + " \\\"forceTaker\\\": false,\\n" + + " \\\"price\\\": \\\"67141.6\\\",\\n" + + " \\\"size\\\": \\\"0.00001\\\",\\n" + + " \\\"funds\\\": \\\"0.671416\\\",\\n" + + " \\\"fee\\\": \\\"0.000671416\\\",\\n" + + " \\\"feeRate\\\": \\\"0.001\\\",\\n" + + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"stop\\\": \\\"\\\",\\n" + + " \\\"tradeType\\\": \\\"MARGIN_TRADE\\\",\\n" + + " \\\"tax\\\": \\\"0\\\",\\n" + + " \\\"taxRate\\\": \\\"0\\\",\\n" + + " \\\"type\\\": \\\"limit\\\",\\n" + + " \\\"createdAt\\\": 1729652744998\\n" + + " }\\n" + + " ],\\n" + + " \\\"lastId\\\": 137891621991\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -305,54 +309,55 @@ public static void testGetTradeHistoryResponse() throws Exception { /** getOrderByOrderId Request Get Order By OrderId /api/v3/hf/margin/orders/{orderId} */ public static void testGetOrderByOrderIdRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\", \"orderId\": \"671667306afcdb000723107f\"}"; + String data = + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"orderId\\\": \\\"671667306afcdb000723107f\\\"}"; GetOrderByOrderIdReq obj = mapper.readValue(data, GetOrderByOrderIdReq.class); } /** getOrderByOrderId Response Get Order By OrderId /api/v3/hf/margin/orders/{orderId} */ public static void testGetOrderByOrderIdResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"id\": \"671667306afcdb000723107f\",\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" - + " \"stop\": null,\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\": \"5c52e11203aa677f33e493fb\",\n" - + " \"remark\": null,\n" - + " \"tags\": null,\n" - + " \"cancelExist\": false,\n" - + " \"createdAt\": 1729521456248,\n" - + " \"lastUpdatedAt\": 1729651011877,\n" - + " \"tradeType\": \"MARGIN_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" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"id\\\": \\\"671667306afcdb000723107f\\\",\\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" + + " \\\"stop\\\": null,\\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\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" + + " \\\"remark\\\": null,\\n" + + " \\\"tags\\\": null,\\n" + + " \\\"cancelExist\\\": false,\\n" + + " \\\"createdAt\\\": 1729521456248,\\n" + + " \\\"lastUpdatedAt\\\": 1729651011877,\\n" + + " \\\"tradeType\\\": \\\"MARGIN_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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -363,7 +368,8 @@ public static void testGetOrderByOrderIdResponse() throws Exception { * /api/v3/hf/margin/orders/client-order/{clientOid} */ public static void testGetOrderByClientOidRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e493fb\"}"; + String data = + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"}"; GetOrderByClientOidReq obj = mapper.readValue(data, GetOrderByClientOidReq.class); } @@ -373,47 +379,47 @@ public static void testGetOrderByClientOidRequest() throws Exception { */ public static void testGetOrderByClientOidResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"id\": \"671667306afcdb000723107f\",\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" - + " \"stop\": null,\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\": \"5c52e11203aa677f33e493fb\",\n" - + " \"remark\": null,\n" - + " \"tags\": null,\n" - + " \"cancelExist\": false,\n" - + " \"createdAt\": 1729521456248,\n" - + " \"lastUpdatedAt\": 1729651011877,\n" - + " \"tradeType\": \"MARGIN_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" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"id\\\": \\\"671667306afcdb000723107f\\\",\\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" + + " \\\"stop\\\": null,\\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\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" + + " \\\"remark\\\": null,\\n" + + " \\\"tags\\\": null,\\n" + + " \\\"cancelExist\\\": false,\\n" + + " \\\"createdAt\\\": 1729521456248,\\n" + + " \\\"lastUpdatedAt\\\": 1729651011877,\\n" + + " \\\"tradeType\\\": \\\"MARGIN_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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -422,23 +428,23 @@ public static void testGetOrderByClientOidResponse() throws Exception { /** addOrderV1 Request Add Order - V1 /api/v1/margin/order */ public static void testAddOrderV1Request() throws Exception { String data = - "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," - + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e4193fb\", \"remark\":" - + " \"order remarks\"}"; + "{\\\"type\\\": \\\"limit\\\", \\\"symbol\\\": \\\"BTC-USDT\\\", \\\"side\\\": \\\"buy\\\"," + + " \\\"price\\\": \\\"50000\\\", \\\"size\\\": \\\"0.00001\\\", \\\"clientOid\\\":" + + " \\\"5c52e11203aa677f33e4193fb\\\", \\\"remark\\\": \\\"order remarks\\\"}"; AddOrderV1Req obj = mapper.readValue(data, AddOrderV1Req.class); } /** addOrderV1 Response Add Order - V1 /api/v1/margin/order */ public static void testAddOrderV1Response() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"671bb90194422f00073ff4f0\",\n" - + " \"loanApplyId\": null,\n" - + " \"borrowSize\": null,\n" - + " \"clientOid\": null\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"671bb90194422f00073ff4f0\\\",\\n" + + " \\\"loanApplyId\\\": null,\\n" + + " \\\"borrowSize\\\": null,\\n" + + " \\\"clientOid\\\": null\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -447,23 +453,23 @@ public static void testAddOrderV1Response() throws Exception { /** addOrderTestV1 Request Add Order Test - V1 /api/v1/margin/order/test */ public static void testAddOrderTestV1Request() throws Exception { String data = - "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," - + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e4193fb\", \"remark\":" - + " \"order remarks\"}"; + "{\\\"type\\\": \\\"limit\\\", \\\"symbol\\\": \\\"BTC-USDT\\\", \\\"side\\\": \\\"buy\\\"," + + " \\\"price\\\": \\\"50000\\\", \\\"size\\\": \\\"0.00001\\\", \\\"clientOid\\\":" + + " \\\"5c52e11203aa677f33e4193fb\\\", \\\"remark\\\": \\\"order remarks\\\"}"; AddOrderTestV1Req obj = mapper.readValue(data, AddOrderTestV1Req.class); } /** addOrderTestV1 Response Add Order Test - V1 /api/v1/margin/order/test */ public static void testAddOrderTestV1Response() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"671bb90194422f00073ff4f0\",\n" - + " \"loanApplyId\": null,\n" - + " \"borrowSize\": null,\n" - + " \"clientOid\": null\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"671bb90194422f00073ff4f0\\\",\\n" + + " \\\"loanApplyId\\\": null,\\n" + + " \\\"borrowSize\\\": null,\\n" + + " \\\"clientOid\\\": null\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApiAutoGeneratedTest.java index ffb5ef94..64d4a3ec 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApiAutoGeneratedTest.java @@ -13,31 +13,33 @@ class RiskLimitApiAutoGeneratedTest { /** getMarginRiskLimit Request Get Margin Risk Limit /api/v3/margin/currencies */ public static void testGetMarginRiskLimitRequest() throws Exception { - String data = "{\"isIsolated\": true, \"currency\": \"BTC\", \"symbol\": \"BTC-USDT\"}"; + String data = + "{\\\"isIsolated\\\": true, \\\"currency\\\": \\\"BTC\\\", \\\"symbol\\\":" + + " \\\"BTC-USDT\\\"}"; GetMarginRiskLimitReq obj = mapper.readValue(data, GetMarginRiskLimitReq.class); } /** getMarginRiskLimit Response Get Margin Risk Limit /api/v3/margin/currencies */ public static void testGetMarginRiskLimitResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"timestamp\": 1729678659275,\n" - + " \"currency\": \"BTC\",\n" - + " \"borrowMaxAmount\": \"75.15\",\n" - + " \"buyMaxAmount\": \"217.12\",\n" - + " \"holdMaxAmount\": \"217.12\",\n" - + " \"borrowCoefficient\": \"1\",\n" - + " \"marginCoefficient\": \"1\",\n" - + " \"precision\": 8,\n" - + " \"borrowMinAmount\": \"0.001\",\n" - + " \"borrowMinUnit\": \"0.0001\",\n" - + " \"borrowEnabled\": true\n" - + " }\n" - + " ]\n" - + "}\n"; + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"timestamp\\\": 1729678659275,\\n" + + " \\\"currency\\\": \\\"BTC\\\",\\n" + + " \\\"borrowMaxAmount\\\": \\\"75.15\\\",\\n" + + " \\\"buyMaxAmount\\\": \\\"217.12\\\",\\n" + + " \\\"holdMaxAmount\\\": \\\"217.12\\\",\\n" + + " \\\"borrowCoefficient\\\": \\\"1\\\",\\n" + + " \\\"marginCoefficient\\\": \\\"1\\\",\\n" + + " \\\"precision\\\": 8,\\n" + + " \\\"borrowMinAmount\\\": \\\"0.001\\\",\\n" + + " \\\"borrowMinUnit\\\": \\\"0.0001\\\",\\n" + + " \\\"borrowEnabled\\\": true\\n" + + " }\\n" + + " ]\\n" + + "}\\n"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/Get24hrStatsReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/Get24hrStatsReq.java index 9d20fb28..8089d1b2 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/Get24hrStatsReq.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/Get24hrStatsReq.java @@ -16,8 +16,7 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class Get24hrStatsReq implements Request { - /** - * symbol - */ - @JsonProperty("symbol") private String symbol; + /** symbol */ + @JsonProperty("symbol") + private String symbol; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesData.java index fb895ad4..6ea11eca 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesData.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesData.java @@ -15,49 +15,39 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetAllCurrenciesData { - /** - * A unique currency code that will never change - */ - @JsonProperty("currency") private String currency; - - /** - * Currency name; will change after renaming - */ - @JsonProperty("name") private String name; - - /** - * Full currency name; will change after renaming - */ - @JsonProperty("fullName") private String fullName; - - /** - * Currency precision - */ - @JsonProperty("precision") private Integer precision; - - /** - * Number of block confirmations - */ - @JsonProperty("confirms") private Integer confirms; - - /** - * Contract address - */ - @JsonProperty("contractAddress") private String contractAddress; - - /** - * Margin support or not - */ - @JsonProperty("isMarginEnabled") private Boolean isMarginEnabled; - - /** - * Debit support or not - */ - @JsonProperty("isDebitEnabled") private Boolean isDebitEnabled; - - /** - * Chain list - */ + /** A unique currency code that will never change */ + @JsonProperty("currency") + private String currency; + + /** Currency name; will change after renaming */ + @JsonProperty("name") + private String name; + + /** Full currency name; will change after renaming */ + @JsonProperty("fullName") + private String fullName; + + /** Currency precision */ + @JsonProperty("precision") + private Integer precision; + + /** Number of block confirmations */ + @JsonProperty("confirms") + private Integer confirms; + + /** Contract address */ + @JsonProperty("contractAddress") + private String contractAddress; + + /** Margin support or not */ + @JsonProperty("isMarginEnabled") + private Boolean isMarginEnabled; + + /** Debit support or not */ + @JsonProperty("isDebitEnabled") + private Boolean isDebitEnabled; + + /** Chain list */ @JsonProperty("chains") private List chains = new ArrayList<>(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsData.java index ca82b117..d8ad770a 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsData.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsData.java @@ -15,188 +15,157 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetAllSymbolsData { - /** - * Unique code of a symbol; it will not change after renaming - */ - @JsonProperty("symbol") private String symbol; + /** Unique code of a symbol; it will not change after renaming */ + @JsonProperty("symbol") + private String symbol; - /** - * Name of trading pairs, it will change after renaming - */ - @JsonProperty("name") private String name; + /** Name of trading pairs, it will change after renaming */ + @JsonProperty("name") + private String name; - /** - * Base currency, e.g. BTC. - */ - @JsonProperty("baseCurrency") private String baseCurrency; + /** Base currency, e.g. BTC. */ + @JsonProperty("baseCurrency") + private String baseCurrency; - /** - * Quote currency, e.g. USDT. - */ - @JsonProperty("quoteCurrency") private String quoteCurrency; + /** Quote currency, e.g. USDT. */ + @JsonProperty("quoteCurrency") + private String quoteCurrency; - /** - * The currency of charged fees. - */ - @JsonProperty("feeCurrency") private String feeCurrency; + /** The currency of charged fees. */ + @JsonProperty("feeCurrency") + private String feeCurrency; - /** - * The trading market. - */ - @JsonProperty("market") private String market; + /** The trading market. */ + @JsonProperty("market") + private String market; - /** - * The minimum order quantity required to place an order. - */ - @JsonProperty("baseMinSize") private String baseMinSize; + /** The minimum order quantity required to place an order. */ + @JsonProperty("baseMinSize") + private String baseMinSize; - /** - * The minimum order funds required to place a market order. - */ - @JsonProperty("quoteMinSize") private String quoteMinSize; + /** The minimum order funds required to place a market order. */ + @JsonProperty("quoteMinSize") + private String quoteMinSize; - /** - * The maximum order size required to place an order. - */ - @JsonProperty("baseMaxSize") private String baseMaxSize; + /** The maximum order size required to place an order. */ + @JsonProperty("baseMaxSize") + private String baseMaxSize; - /** - * The maximum order funds required to place a market order. - */ - @JsonProperty("quoteMaxSize") private String quoteMaxSize; + /** The maximum order funds required to place a market order. */ + @JsonProperty("quoteMaxSize") + private String quoteMaxSize; /** - * 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. + * 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. */ - @JsonProperty("baseIncrement") private String baseIncrement; + @JsonProperty("baseIncrement") + private String baseIncrement; /** - * 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 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. */ - @JsonProperty("quoteIncrement") private String quoteIncrement; + @JsonProperty("quoteIncrement") + private String quoteIncrement; /** - * 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. */ - @JsonProperty("priceIncrement") private String priceIncrement; + @JsonProperty("priceIncrement") + private String priceIncrement; - /** - * Threshold for price protection - */ - @JsonProperty("priceLimitRate") private String priceLimitRate; + /** Threshold for price protection */ + @JsonProperty("priceLimitRate") + private String priceLimitRate; - /** - * The minimum trading amounts - */ - @JsonProperty("minFunds") private String minFunds; + /** The minimum trading amounts */ + @JsonProperty("minFunds") + private String minFunds; - /** - * Available for margin or not. - */ - @JsonProperty("isMarginEnabled") private Boolean isMarginEnabled; + /** Available for margin or not. */ + @JsonProperty("isMarginEnabled") + private Boolean isMarginEnabled; - /** - * Available for transaction or not. - */ - @JsonProperty("enableTrading") private Boolean enableTrading; + /** Available for transaction or not. */ + @JsonProperty("enableTrading") + private Boolean enableTrading; - /** - * [Fee Type](https://www.kucoin.com/vip/privilege) - */ - @JsonProperty("feeCategory") private FeeCategoryEnum feeCategory; + /** [Fee Type](https://www.kucoin.com/vip/privilege) */ + @JsonProperty("feeCategory") + private FeeCategoryEnum feeCategory; /** - * 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 + * 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 */ - @JsonProperty("makerFeeCoefficient") private String makerFeeCoefficient; + @JsonProperty("makerFeeCoefficient") + private String makerFeeCoefficient; /** - * 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 + * 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 */ - @JsonProperty("takerFeeCoefficient") private String takerFeeCoefficient; + @JsonProperty("takerFeeCoefficient") + private String takerFeeCoefficient; - /** - * Whether it is a [Special - * Treatment](https://www.kucoin.com/legal/special-treatment) symbol - */ - @JsonProperty("st") private Boolean st; + /** Whether it is a [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol */ + @JsonProperty("st") + private Boolean st; - /** - * The [call auction](https://www.kucoin.com/support/40999744334105) status - * returns true/false - */ - @JsonProperty("callauctionIsEnabled") private Boolean callauctionIsEnabled; + /** The [call auction](https://www.kucoin.com/support/40999744334105) status returns true/false */ + @JsonProperty("callauctionIsEnabled") + private Boolean callauctionIsEnabled; - /** - * The lowest price declared in the call auction - */ - @JsonProperty("callauctionPriceFloor") private String callauctionPriceFloor; + /** The lowest price declared in the call auction */ + @JsonProperty("callauctionPriceFloor") + private String callauctionPriceFloor; - /** - * The highest bid price in the call auction - */ + /** The highest bid price in the call auction */ @JsonProperty("callauctionPriceCeiling") private String callauctionPriceCeiling; - /** - * The first phase of the call auction starts at (Allow add orders, allow - * cancel orders) - */ + /** The first phase of the call auction starts at (Allow add orders, allow cancel orders) */ @JsonProperty("callauctionFirstStageStartTime") private Long callauctionFirstStageStartTime; /** - * The second phase of the call auction starts at (Allow add orders, don't - * allow cancel orders) + * The second phase of the call auction starts at (Allow add orders, don't allow cancel orders) */ @JsonProperty("callauctionSecondStageStartTime") private Long callauctionSecondStageStartTime; /** - * The third phase of the call auction starts at (Don't allow add orders, - * don't allow cancel orders) + * The third phase of the call auction starts at (Don't allow add orders, don't allow cancel + * orders) */ @JsonProperty("callauctionThirdStageStartTime") private Long callauctionThirdStageStartTime; - /** - * Official opening time (end time of the third phase of call auction) - */ - @JsonProperty("tradingStartTime") private Long tradingStartTime; + /** Official opening time (end time of the third phase of call auction) */ + @JsonProperty("tradingStartTime") + private Long tradingStartTime; public enum FeeCategoryEnum { - /** - * classA - */ + /** classA */ CLASSA(1), - /** - * classB - */ + /** classB */ CLASSB(2), - /** - * classC - */ + /** classC */ CLASSC(3); private final Integer value; - FeeCategoryEnum(Integer value) { this.value = value; } + FeeCategoryEnum(Integer value) { + this.value = value; + } @JsonValue public Integer getValue() { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsResp.java index 85238420..e9f59137 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsResp.java @@ -20,15 +20,11 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class GetAllSymbolsResp implements Response> { - /** - * - */ + /** */ @JsonProperty("data") private List data = new ArrayList<>(); - /** - * common response - */ + /** common response */ @JsonIgnore private RestResponse commonResponse; @Override diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllTickersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllTickersResp.java index a9327612..62fc0028 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllTickersResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllTickersResp.java @@ -19,20 +19,15 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class GetAllTickersResp implements Response> { - /** - * timestamp - */ - @JsonProperty("time") private Long time; + /** timestamp */ + @JsonProperty("time") + private Long time; - /** - * - */ + /** */ @JsonProperty("ticker") private List ticker = new ArrayList<>(); - /** - * common response - */ + /** common response */ @JsonIgnore private RestResponse commonResponse; @Override diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllTickersTicker.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllTickersTicker.java index 6f919ed4..421fc08c 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllTickersTicker.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllTickersTicker.java @@ -15,115 +15,95 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetAllTickersTicker { - /** - * Symbol - */ - @JsonProperty("symbol") private String symbol; + /** Symbol */ + @JsonProperty("symbol") + private String symbol; - /** - * Name of trading pairs, it will change after renaming - */ - @JsonProperty("symbolName") private String symbolName; + /** Name of trading pairs, it will change after renaming */ + @JsonProperty("symbolName") + private String symbolName; - /** - * Best bid price - */ - @JsonProperty("buy") private String buy; + /** Best bid price */ + @JsonProperty("buy") + private String buy; - /** - * Best bid size - */ - @JsonProperty("bestBidSize") private String bestBidSize; + /** Best bid size */ + @JsonProperty("bestBidSize") + private String bestBidSize; - /** - * Best ask price - */ - @JsonProperty("sell") private String sell; + /** Best ask price */ + @JsonProperty("sell") + private String sell; - /** - * Best ask size - */ - @JsonProperty("bestAskSize") private String bestAskSize; + /** Best ask size */ + @JsonProperty("bestAskSize") + private String bestAskSize; - /** - * 24h change rate - */ - @JsonProperty("changeRate") private String changeRate; + /** 24h change rate */ + @JsonProperty("changeRate") + private String changeRate; - /** - * 24h change price - */ - @JsonProperty("changePrice") private String changePrice; + /** 24h change price */ + @JsonProperty("changePrice") + private String changePrice; - /** - * Highest price in 24h - */ - @JsonProperty("high") private String high; + /** Highest price in 24h */ + @JsonProperty("high") + private String high; - /** - * Lowest price in 24h - */ - @JsonProperty("low") private String low; + /** Lowest price in 24h */ + @JsonProperty("low") + private String low; - /** - * 24h volume, executed based on base currency - */ - @JsonProperty("vol") private String vol; + /** 24h volume, executed based on base currency */ + @JsonProperty("vol") + private String vol; - /** - * 24h traded amount - */ - @JsonProperty("volValue") private String volValue; + /** 24h traded amount */ + @JsonProperty("volValue") + private String volValue; - /** - * Last traded price - */ - @JsonProperty("last") private String last; + /** Last traded price */ + @JsonProperty("last") + private String last; - /** - * Average trading price in the last 24 hours - */ - @JsonProperty("averagePrice") private String averagePrice; + /** Average trading price in the last 24 hours */ + @JsonProperty("averagePrice") + private String averagePrice; - /** - * Basic Taker Fee - */ - @JsonProperty("takerFeeRate") private String takerFeeRate; + /** Basic Taker Fee */ + @JsonProperty("takerFeeRate") + private String takerFeeRate; - /** - * Basic Maker Fee - */ - @JsonProperty("makerFeeRate") private String makerFeeRate; + /** Basic Maker Fee */ + @JsonProperty("makerFeeRate") + private String makerFeeRate; /** - * 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 + * 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 */ @JsonProperty("takerCoefficient") private TakerCoefficientEnum takerCoefficient; /** - * 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 + * 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 */ @JsonProperty("makerCoefficient") private MakerCoefficientEnum makerCoefficient; public enum TakerCoefficientEnum { - /** - * The taker fee coefficient is 1 - */ + /** The taker fee coefficient is 1 */ _1("1"), - /** - * No fee - */ + /** No fee */ _0("0"); private final String value; - TakerCoefficientEnum(String value) { this.value = value; } + TakerCoefficientEnum(String value) { + this.value = value; + } @JsonValue public String getValue() { @@ -145,19 +125,18 @@ public static TakerCoefficientEnum fromValue(String value) { throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } + public enum MakerCoefficientEnum { - /** - * The maker fee coefficient is 1 - */ + /** The maker fee coefficient is 1 */ _1("1"), - /** - * No fee - */ + /** No fee */ _0("0"); private final String value; - MakerCoefficientEnum(String value) { this.value = value; } + MakerCoefficientEnum(String value) { + this.value = value; + } @JsonValue public String getValue() { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsItems.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsItems.java index dff7c4d6..d8d9a709 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsItems.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsItems.java @@ -15,38 +15,31 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetAnnouncementsItems { - /** - * Announcement ID - */ - @JsonProperty("annId") private Integer annId; - - /** - * Announcement title - */ - @JsonProperty("annTitle") private String annTitle; - - /** - * Announcement type - */ - @JsonProperty("annType") private List annType = new ArrayList<>(); - - /** - * Announcement description - */ - @JsonProperty("annDesc") private String annDesc; - - /** - * Announcement release time, Unix millisecond timestamp format - */ - @JsonProperty("cTime") private Long cTime; - - /** - * language type - */ - @JsonProperty("language") private String language; - - /** - * Announcement link - */ - @JsonProperty("annUrl") private String annUrl; + /** Announcement ID */ + @JsonProperty("annId") + private Integer annId; + + /** Announcement title */ + @JsonProperty("annTitle") + private String annTitle; + + /** Announcement type */ + @JsonProperty("annType") + private List annType = new ArrayList<>(); + + /** Announcement description */ + @JsonProperty("annDesc") + private String annDesc; + + /** Announcement release time, Unix millisecond timestamp format */ + @JsonProperty("cTime") + private Long cTime; + + /** language type */ + @JsonProperty("language") + private String language; + + /** Announcement link */ + @JsonProperty("annUrl") + private String annUrl; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsReq.java index 32de0892..249c435c 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsReq.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsReq.java @@ -18,84 +18,62 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetAnnouncementsReq implements Request { - /** - * page number - */ - @JsonProperty("currentPage") private Long currentPage; + /** page number */ + @JsonProperty("currentPage") + private Long currentPage; - /** - * page Size - */ - @JsonProperty("pageSize") private Long pageSize; + /** page Size */ + @JsonProperty("pageSize") + private Long pageSize; /** - * Announcement types: latest-announcements , activities (latest activities), - * new-listings (new currency online), product-updates (product updates), vip - * (institutions and VIPs), maintenance-updates (system maintenance), product - * -updates (product news), delistings (currency offline), others, - * api-campaigns (API user activities), default : latest-announcements + * Announcement types: latest-announcements , activities (latest activities), new-listings (new + * currency online), product-updates (product updates), vip (institutions and VIPs), + * maintenance-updates (system maintenance), product -updates (product news), delistings (currency + * offline), others, api-campaigns (API user activities), default : latest-announcements */ @JsonProperty("annType") @Builder.Default private AnnTypeEnum annType = AnnTypeEnum.LATEST_ANNOUNCEMENTS; - /** - * Language type, the default is en_US, the specific value parameters are as - * follows - */ - @JsonProperty("lang") @Builder.Default private LangEnum lang = LangEnum.EN_US; + /** Language type, the default is en_US, the specific value parameters are as follows */ + @JsonProperty("lang") + @Builder.Default + private LangEnum lang = LangEnum.EN_US; - /** - * Announcement online start time (milliseconds) - */ - @JsonProperty("startTime") private Long startTime; + /** Announcement online start time (milliseconds) */ + @JsonProperty("startTime") + private Long startTime; - /** - * Announcement online end time (milliseconds) - */ - @JsonProperty("endTime") private Long endTime; + /** Announcement online end time (milliseconds) */ + @JsonProperty("endTime") + private Long endTime; public enum AnnTypeEnum { - /** - * latest-announcements - */ + /** latest-announcements */ LATEST_ANNOUNCEMENTS("latest-announcements"), - /** - * latest activities - */ + /** latest activities */ ACTIVITIES("activities"), - /** - * product updates - */ + /** product updates */ PRODUCT_UPDATES("product-updates"), - /** - * institutions and VIPs - */ + /** institutions and VIPs */ VIPS("vip"), - /** - * system maintenance - */ + /** system maintenance */ MAINTENANCE_UPDATE("maintenance-updates"), - /** - * currency offline - */ + /** currency offline */ DELISTINGS("delistings"), - /** - * others - */ + /** others */ OTHERS("others"), - /** - * API user activities - */ + /** API user activities */ API_CAMPAIGNS("api-campaigns"), - /** - * new currency online - */ + /** new currency online */ NEW_LISTINGS("new-listings"); private final String value; - AnnTypeEnum(String value) { this.value = value; } + AnnTypeEnum(String value) { + this.value = value; + } @JsonValue public String getValue() { @@ -117,99 +95,58 @@ public static AnnTypeEnum fromValue(String value) { throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } + public enum LangEnum { - /** - * Chinese (Hong Kong) - */ + /** Chinese (Hong Kong) */ ZH_HK("zh_HK"), - /** - * Japanese (Japan) - */ + /** Japanese (Japan) */ JA_JP("ja_JP"), - /** - * Korean (Korea) - */ + /** Korean (Korea) */ KO_KR("ko_KR"), - /** - * English - */ + /** English */ EN_US("en_US"), - /** - * Polish (Poland) - */ + /** Polish (Poland) */ PL_PL("pl_PL"), - /** - * Spanish (Spain) - */ + /** Spanish (Spain) */ ES_ES("es_ES"), - /** - * French (France) - */ + /** French (France) */ FR_FR("fr_FR"), - /** - * Arabic (Egypt) - */ + /** Arabic (Egypt) */ AR_AE("ar_AE"), - /** - * Italian (Italy) - */ + /** Italian (Italy) */ IT_IT("it_IT"), - /** - * Indonesian (Indonesia) - */ + /** Indonesian (Indonesia) */ ID_ID("id_ID"), - /** - * Dutch (Netherlands) - */ + /** Dutch (Netherlands) */ NL_NL("nl_NL"), - /** - * Portuguese (Brazil) - */ + /** Portuguese (Brazil) */ PT_PT("pt_PT"), - /** - * Vietnamese (Vietnam) - */ + /** Vietnamese (Vietnam) */ VI_VN("vi_VN"), - /** - * German (Germany) - */ + /** German (Germany) */ DE_DE("de_DE"), - /** - * Turkish (Turkey) - */ + /** Turkish (Turkey) */ TR_TR("tr_TR"), - /** - * Malay (Malaysia) - */ + /** Malay (Malaysia) */ MS_MY("ms_MY"), - /** - * Russian (Russia) - */ + /** Russian (Russia) */ RU_RU("ru_RU"), - /** - * Thai (Thailand) - */ + /** Thai (Thailand) */ TH_TH("th_TH"), - /** - * Hindi (India) - */ + /** Hindi (India) */ HI_IN("hi_IN"), - /** - * Bengali (Bangladesh) - */ + /** Bengali (Bangladesh) */ BN_BD("bn_BD"), - /** - * Filipino (Philippines) - */ + /** Filipino (Philippines) */ FIL_PH("fil_PH"), - /** - * Urdu (Pakistan) - */ + /** Urdu (Pakistan) */ UR_PK("ur_PK"); private final String value; - LangEnum(String value) { this.value = value; } + LangEnum(String value) { + this.value = value; + } @JsonValue public String getValue() { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsResp.java index 317c5380..fae5b3dc 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAnnouncementsResp.java @@ -18,37 +18,28 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetAnnouncementsResp - implements Response> { - /** - * Total Number - */ - @JsonProperty("totalNum") private Integer totalNum; - - /** - * - */ + implements Response> { + /** Total Number */ + @JsonProperty("totalNum") + private Integer totalNum; + + /** */ @JsonProperty("items") private List items = new ArrayList<>(); - /** - * Current page - */ - @JsonProperty("currentPage") private Integer currentPage; + /** Current page */ + @JsonProperty("currentPage") + private Integer currentPage; - /** - * Page size - */ - @JsonProperty("pageSize") private Integer pageSize; + /** Page size */ + @JsonProperty("pageSize") + private Integer pageSize; - /** - * Total Page - */ - @JsonProperty("totalPage") private Integer totalPage; + /** Total Page */ + @JsonProperty("totalPage") + private Integer totalPage; - /** - * common response - */ + /** common response */ @JsonIgnore private RestResponse commonResponse; @Override diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionInfoReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionInfoReq.java index d50bc5e1..d04cc527 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionInfoReq.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionInfoReq.java @@ -16,8 +16,7 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetCallAuctionInfoReq implements Request { - /** - * symbol - */ - @JsonProperty("symbol") private String symbol; + /** symbol */ + @JsonProperty("symbol") + private String symbol; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionInfoResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionInfoResp.java index 56f963d9..d6712752 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionInfoResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionInfoResp.java @@ -16,52 +16,40 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetCallAuctionInfoResp - implements Response> { - /** - * Symbol - */ - @JsonProperty("symbol") private String symbol; + implements Response> { + /** Symbol */ + @JsonProperty("symbol") + private String symbol; - /** - * Estimated price - */ - @JsonProperty("estimatedPrice") private String estimatedPrice; + /** Estimated price */ + @JsonProperty("estimatedPrice") + private String estimatedPrice; - /** - * Estimated size - */ - @JsonProperty("estimatedSize") private String estimatedSize; + /** Estimated size */ + @JsonProperty("estimatedSize") + private String estimatedSize; - /** - * Sell ​​order minimum price - */ - @JsonProperty("sellOrderRangeLowPrice") private String sellOrderRangeLowPrice; + /** Sell ​​order minimum price */ + @JsonProperty("sellOrderRangeLowPrice") + private String sellOrderRangeLowPrice; - /** - * Sell ​​order maximum price - */ + /** Sell ​​order maximum price */ @JsonProperty("sellOrderRangeHighPrice") private String sellOrderRangeHighPrice; - /** - * Buy order minimum price - */ - @JsonProperty("buyOrderRangeLowPrice") private String buyOrderRangeLowPrice; + /** Buy order minimum price */ + @JsonProperty("buyOrderRangeLowPrice") + private String buyOrderRangeLowPrice; - /** - * Buy ​​order maximum price - */ - @JsonProperty("buyOrderRangeHighPrice") private String buyOrderRangeHighPrice; + /** Buy ​​order maximum price */ + @JsonProperty("buyOrderRangeHighPrice") + private String buyOrderRangeHighPrice; - /** - * Timestamp (ms) - */ - @JsonProperty("time") private Long time; + /** Timestamp (ms) */ + @JsonProperty("time") + private Long time; - /** - * common response - */ + /** common response */ @JsonIgnore private RestResponse commonResponse; @Override diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionPartOrderBookReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionPartOrderBookReq.java index 1b772939..98ba0d5f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionPartOrderBookReq.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCallAuctionPartOrderBookReq.java @@ -18,13 +18,13 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetCallAuctionPartOrderBookReq implements Request { - /** - * symbol - */ - @JsonProperty("symbol") private String symbol; + /** symbol */ + @JsonProperty("symbol") + private String symbol; - /** - * Get the depth layer, optional value: 20, 100 - */ - @JsonIgnore @PathVar("size") @JsonProperty("size") private String size; + /** Get the depth layer, optional value: 20, 100 */ + @JsonIgnore + @PathVar("size") + @JsonProperty("size") + private String size; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetClientIPAddressResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetClientIPAddressResp.java index 7898cdc8..d1a5e1f4 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetClientIPAddressResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetClientIPAddressResp.java @@ -17,16 +17,12 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetClientIPAddressResp - implements Response> { - /** - * - */ - @JsonProperty("data") private String data; + implements Response> { + /** */ + @JsonProperty("data") + private String data; - /** - * common response - */ + /** common response */ @JsonIgnore private RestResponse commonResponse; @Override diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyChains.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyChains.java index 3b800fc9..d9c0720c 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyChains.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyChains.java @@ -13,79 +13,66 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetCurrencyChains { - /** - * Chain name of currency - */ - @JsonProperty("chainName") private String chainName; + /** Chain name of currency */ + @JsonProperty("chainName") + private String chainName; - /** - * Minimum withdrawal amount - */ - @JsonProperty("withdrawalMinSize") private String withdrawalMinSize; + /** Minimum withdrawal amount */ + @JsonProperty("withdrawalMinSize") + private String withdrawalMinSize; - /** - * Minimum deposit amount - */ - @JsonProperty("depositMinSize") private String depositMinSize; + /** Minimum deposit amount */ + @JsonProperty("depositMinSize") + private String depositMinSize; - /** - * Withdraw fee rate - */ - @JsonProperty("withdrawFeeRate") private String withdrawFeeRate; + /** Withdraw fee rate */ + @JsonProperty("withdrawFeeRate") + private String withdrawFeeRate; - /** - * Minimum fees charged for withdrawal - */ - @JsonProperty("withdrawalMinFee") private String withdrawalMinFee; + /** Minimum fees charged for withdrawal */ + @JsonProperty("withdrawalMinFee") + private String withdrawalMinFee; - /** - * Withdrawal support or not - */ - @JsonProperty("isWithdrawEnabled") private Boolean isWithdrawEnabled; + /** Withdrawal support or not */ + @JsonProperty("isWithdrawEnabled") + private Boolean isWithdrawEnabled; - /** - * Deposit support or not - */ - @JsonProperty("isDepositEnabled") private Boolean isDepositEnabled; + /** Deposit support or not */ + @JsonProperty("isDepositEnabled") + private Boolean isDepositEnabled; - /** - * Number of block confirmations - */ - @JsonProperty("confirms") private Integer confirms; + /** Number of block confirmations */ + @JsonProperty("confirms") + private Integer confirms; - /** - * The number of blocks (confirmations) for advance on-chain verification - */ - @JsonProperty("preConfirms") private Integer preConfirms; + /** The number of blocks (confirmations) for advance on-chain verification */ + @JsonProperty("preConfirms") + private Integer preConfirms; - /** - * Contract address - */ - @JsonProperty("contractAddress") private String contractAddress; + /** Contract address */ + @JsonProperty("contractAddress") + private String contractAddress; /** - * Withdrawal precision bit, indicating the maximum supported length after the - * decimal point of the withdrawal amount + * Withdrawal precision bit, indicating the maximum supported length after the decimal point of + * the withdrawal amount */ - @JsonProperty("withdrawPrecision") private Integer withdrawPrecision; + @JsonProperty("withdrawPrecision") + private Integer withdrawPrecision; - /** - * Maximum amount of single withdrawal - */ - @JsonProperty("maxWithdraw") private Double maxWithdraw; + /** Maximum amount of single withdrawal */ + @JsonProperty("maxWithdraw") + private Double maxWithdraw; - /** - * Maximum amount of single deposit (only applicable to Lightning Network) - */ - @JsonProperty("maxDeposit") private String maxDeposit; + /** Maximum amount of single deposit (only applicable to Lightning Network) */ + @JsonProperty("maxDeposit") + private String maxDeposit; - /** - * Need for memo/tag or not - */ - @JsonProperty("needTag") private Boolean needTag; + /** Need for memo/tag or not */ + @JsonProperty("needTag") + private Boolean needTag; - /** - * Chain id of currency - */ - @JsonProperty("chainId") private String chainId; + /** Chain id of currency */ + @JsonProperty("chainId") + private String chainId; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyResp.java index 99e7fd8a..4e980bb2 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetCurrencyResp.java @@ -17,57 +17,44 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class GetCurrencyResp - implements Response> { - /** - * A unique currency code that will never change - */ - @JsonProperty("currency") private String currency; +public class GetCurrencyResp implements Response> { + /** A unique currency code that will never change */ + @JsonProperty("currency") + private String currency; - /** - * Currency name; will change after renaming - */ - @JsonProperty("name") private String name; + /** Currency name; will change after renaming */ + @JsonProperty("name") + private String name; - /** - * Full currency name; will change after renaming - */ - @JsonProperty("fullName") private String fullName; + /** Full currency name; will change after renaming */ + @JsonProperty("fullName") + private String fullName; - /** - * Currency precision - */ - @JsonProperty("precision") private Integer precision; + /** Currency precision */ + @JsonProperty("precision") + private Integer precision; - /** - * Number of block confirmations - */ - @JsonProperty("confirms") private Integer confirms; + /** Number of block confirmations */ + @JsonProperty("confirms") + private Integer confirms; - /** - * Contract address - */ - @JsonProperty("contractAddress") private String contractAddress; + /** Contract address */ + @JsonProperty("contractAddress") + private String contractAddress; - /** - * Margin support or not - */ - @JsonProperty("isMarginEnabled") private Boolean isMarginEnabled; + /** Margin support or not */ + @JsonProperty("isMarginEnabled") + private Boolean isMarginEnabled; - /** - * Debit support or not - */ - @JsonProperty("isDebitEnabled") private Boolean isDebitEnabled; + /** Debit support or not */ + @JsonProperty("isDebitEnabled") + private Boolean isDebitEnabled; - /** - * Chain list - */ + /** Chain list */ @JsonProperty("chains") private List chains = new ArrayList<>(); - /** - * common response - */ + /** common response */ @JsonIgnore private RestResponse commonResponse; @Override diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceReq.java index 6e9164ff..90ec69c7 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceReq.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceReq.java @@ -16,14 +16,15 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetFiatPriceReq implements Request { - /** - * Ticker symbol of a base currency, e.g. USD, EUR. Default is USD - */ - @JsonProperty("base") @Builder.Default private String base = "USD"; + /** Ticker symbol of a base currency, e.g. USD, EUR. Default is USD */ + @JsonProperty("base") + @Builder.Default + private String base = "USD"; /** - * Comma-separated cryptocurrencies to be converted into fiat, e.g.: BTC,ETH, - * etc. Default to return the fiat price of all currencies. + * Comma-separated cryptocurrencies to be converted into fiat, e.g.: BTC,ETH, etc. Default to + * return the fiat price of all currencies. */ - @JsonProperty("currencies") private String currencies; + @JsonProperty("currencies") + private String currencies; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceResp.java index 2d2cab46..f22ef47e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceResp.java @@ -7,4499 +7,3600 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; -import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@AllArgsConstructor +// @AllArgsConstructor(access = AccessLevel.PRIVATE) @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetFiatPriceResp implements Response> { - /** - * - */ - @JsonProperty("AGLD") private String AGLD; - - /** - * - */ - @JsonProperty("DFI") private String DFI; - - /** - * - */ - @JsonProperty("PYTHUP") private String PYTHUP; - - /** - * - */ - @JsonProperty("ISLM") private String ISLM; - - /** - * - */ - @JsonProperty("NEAR") private String NEAR; - - /** - * - */ - @JsonProperty("AIOZ") private String AIOZ; - - /** - * - */ - @JsonProperty("AUDIO") private String AUDIO; - - /** - * - */ - @JsonProperty("BBL") private String BBL; - - /** - * - */ - @JsonProperty("WLD") private String WLD; - - /** - * - */ - @JsonProperty("HNT") private String HNT; - - /** - * - */ - @JsonProperty("ETHFI") private String ETHFI; - - /** - * - */ - @JsonProperty("DMAIL") private String DMAIL; - - /** - * - */ - @JsonProperty("OPUP") private String OPUP; - - /** - * - */ - @JsonProperty("VET3S") private String VET3S; - - /** - * - */ - @JsonProperty("MANA3S") private String MANA3S; - - /** - * - */ - @JsonProperty("TIDAL") private String TIDAL; - - /** - * - */ - @JsonProperty("HALO") private String HALO; - - /** - * - */ - @JsonProperty("OPUL") private String OPUL; - - /** - * - */ - @JsonProperty("MANA3L") private String MANA3L; - - /** - * - */ - @JsonProperty("DGB") private String DGB; - - /** - * - */ - @JsonProperty("AA") private String AA; - - /** - * - */ - @JsonProperty("BCH") private String BCH; - - /** - * - */ - @JsonProperty("GMEE") private String GMEE; - - /** - * - */ - @JsonProperty("JST") private String JST; - - /** - * - */ - @JsonProperty("PBUX") private String PBUX; - - /** - * - */ - @JsonProperty("AR") private String AR; - - /** - * - */ - @JsonProperty("SEI") private String SEI; - - /** - * - */ - @JsonProperty("PSTAKE") private String PSTAKE; - - /** - * - */ - @JsonProperty("LMWR") private String LMWR; - - /** - * - */ - @JsonProperty("UNFIDOWN") private String UNFIDOWN; - - /** - * - */ - @JsonProperty("BB") private String BB; - - /** - * - */ - @JsonProperty("JTO") private String JTO; - - /** - * - */ - @JsonProperty("WEMIX") private String WEMIX; - - /** - * - */ - @JsonProperty("G") private String G; - - /** - * - */ - @JsonProperty("MARSH") private String MARSH; - - /** - * - */ - @JsonProperty("BN") private String BN; - - /** - * - */ - @JsonProperty("FLIP") private String FLIP; - - /** - * - */ - @JsonProperty("FLR") private String FLR; - - /** - * - */ - @JsonProperty("BIGTIME") private String BIGTIME; - - /** - * - */ - @JsonProperty("FLY") private String FLY; - - /** - * - */ - @JsonProperty("T") private String T; - - /** - * - */ - @JsonProperty("W") private String W; - - /** - * - */ - @JsonProperty("BDX") private String BDX; - - /** - * - */ - @JsonProperty("BABYDOGE") private String BABYDOGE; - - /** - * - */ - @JsonProperty("SFP") private String SFP; - - /** - * - */ - @JsonProperty("DIA") private String DIA; - - /** - * - */ - @JsonProperty("ISME") private String ISME; - - /** - * - */ - @JsonProperty("LYM") private String LYM; - - /** - * - */ - @JsonProperty("VET3L") private String VET3L; - - /** - * - */ - @JsonProperty("JUP") private String JUP; - - /** - * - */ - @JsonProperty("LYX") private String LYX; - - /** - * - */ - @JsonProperty("AIEPK") private String AIEPK; - - /** - * - */ - @JsonProperty("SILLY") private String SILLY; - - /** - * - */ - @JsonProperty("SCPT") private String SCPT; - - /** - * - */ - @JsonProperty("WOO") private String WOO; - - /** - * - */ - @JsonProperty("BLUR") private String BLUR; - - /** - * - */ - @JsonProperty("STRK") private String STRK; - - /** - * - */ - @JsonProperty("BFC") private String BFC; - - /** - * - */ - @JsonProperty("DC") private String DC; - - /** - * - */ - @JsonProperty("KARATE") private String KARATE; - - /** - * - */ - @JsonProperty("SUSHI3L") private String SUSHI3L; - - /** - * - */ - @JsonProperty("NETVR") private String NETVR; - - /** - * - */ - @JsonProperty("WAVES") private String WAVES; - - /** - * - */ - @JsonProperty("LITH") private String LITH; - - /** - * - */ - @JsonProperty("HAPI") private String HAPI; - - /** - * - */ - @JsonProperty("SUSHI3S") private String SUSHI3S; - - /** - * - */ - @JsonProperty("CEEK") private String CEEK; - - /** - * - */ - @JsonProperty("FLOKI") private String FLOKI; - - /** - * - */ - @JsonProperty("SHR") private String SHR; - - /** - * - */ - @JsonProperty("SAND") private String SAND; - - /** - * - */ - @JsonProperty("TURT") private String TURT; - - /** - * - */ - @JsonProperty("UMA") private String UMA; - - /** - * - */ - @JsonProperty("BEPRO") private String BEPRO; - - /** - * - */ - @JsonProperty("SCRT") private String SCRT; - - /** - * - */ - @JsonProperty("TUSD") private String TUSD; - - /** - * - */ - @JsonProperty("COOKIE") private String COOKIE; - - /** - * - */ - @JsonProperty("LRDS") private String LRDS; - - /** - * - */ - @JsonProperty("SIN") private String SIN; - - /** - * - */ - @JsonProperty("OAS") private String OAS; - - /** - * - */ - @JsonProperty("ROOT") private String ROOT; - - /** - * - */ - @JsonProperty("ADA3L") private String ADA3L; - - /** - * - */ - @JsonProperty("TIAUP") private String TIAUP; - - /** - * - */ - @JsonProperty("HTR") private String HTR; - - /** - * - */ - @JsonProperty("UNB") private String UNB; - - /** - * - */ - @JsonProperty("UNA") private String UNA; - - /** - * - */ - @JsonProperty("HARD") private String HARD; - - /** - * - */ - @JsonProperty("G3") private String G3; - - /** - * - */ - @JsonProperty("ADA3S") private String ADA3S; - - /** - * - */ - @JsonProperty("MYRO") private String MYRO; - - /** - * - */ - @JsonProperty("HTX") private String HTX; - - /** - * - */ - @JsonProperty("FT") private String FT; - - /** - * - */ - @JsonProperty("BTCDOWN") private String BTCDOWN; - - /** - * - */ - @JsonProperty("UNI") private String UNI; - - /** - * - */ - @JsonProperty("FX") private String FX; - - /** - * - */ - @JsonProperty("OBI") private String OBI; - - /** - * - */ - @JsonProperty("UNO") private String UNO; - - /** - * - */ - @JsonProperty("WRX") private String WRX; - - /** - * - */ - @JsonProperty("TIADOWN") private String TIADOWN; - - /** - * - */ - @JsonProperty("ETHDOWN") private String ETHDOWN; - - /** - * - */ - @JsonProperty("WELL") private String WELL; - - /** - * - */ - @JsonProperty("SWFTC") private String SWFTC; - - /** - * - */ - @JsonProperty("SKL") private String SKL; - - /** - * - */ - @JsonProperty("UOS") private String UOS; - - /** - * - */ - @JsonProperty("AIPAD") private String AIPAD; - - /** - * - */ - @JsonProperty("BRETT") private String BRETT; - - /** - * - */ - @JsonProperty("SKY") private String SKY; - - /** - * - */ - @JsonProperty("FRM") private String FRM; - - /** - * - */ - @JsonProperty("VISION") private String VISION; - - /** - * - */ - @JsonProperty("LENDS") private String LENDS; - - /** - * - */ - @JsonProperty("SLF") private String SLF; - - /** - * - */ - @JsonProperty("BULL") private String BULL; - - /** - * - */ - @JsonProperty("FLOW") private String FLOW; - - /** - * - */ - @JsonProperty("ODDZ") private String ODDZ; - - /** - * - */ - @JsonProperty("SLN") private String SLN; - - /** - * - */ - @JsonProperty("UPO") private String UPO; - - /** - * - */ - @JsonProperty("SLP") private String SLP; - - /** - * - */ - @JsonProperty("ID") private String ID; - - /** - * - */ - @JsonProperty("SLIM") private String SLIM; - - /** - * - */ - @JsonProperty("SPOT") private String SPOT; - - /** - * - */ - @JsonProperty("DOP") private String DOP; - - /** - * - */ - @JsonProperty("ISSP") private String ISSP; - - /** - * - */ - @JsonProperty("UQC") private String UQC; - - /** - * - */ - @JsonProperty("IO") private String IO; - - /** - * - */ - @JsonProperty("DOT") private String DOT; - - /** - * - */ - @JsonProperty("1INCH") private String _1INCH; - - /** - * - */ - @JsonProperty("SMH") private String SMH; - - /** - * - */ - @JsonProperty("MAK") private String MAK; - - /** - * - */ - @JsonProperty("TOKO") private String TOKO; - - /** - * - */ - @JsonProperty("TURBO") private String TURBO; - - /** - * - */ - @JsonProperty("UNFI") private String UNFI; - - /** - * - */ - @JsonProperty("MAN") private String MAN; - - /** - * - */ - @JsonProperty("EVER") private String EVER; - - /** - * - */ - @JsonProperty("FTM") private String FTM; - - /** - * - */ - @JsonProperty("SHRAP") private String SHRAP; - - /** - * - */ - @JsonProperty("MAV") private String MAV; - - /** - * - */ - @JsonProperty("MAX") private String MAX; - - /** - * - */ - @JsonProperty("DPR") private String DPR; - - /** - * - */ - @JsonProperty("FTT") private String FTT; - - /** - * - */ - @JsonProperty("ARKM") private String ARKM; - - /** - * - */ - @JsonProperty("ATOM") private String ATOM; - - /** - * - */ - @JsonProperty("PENDLE") private String PENDLE; - - /** - * - */ - @JsonProperty("QUICK") private String QUICK; - - /** - * - */ - @JsonProperty("BLZ") private String BLZ; - - /** - * - */ - @JsonProperty("BOBA") private String BOBA; - - /** - * - */ - @JsonProperty("MBL") private String MBL; - - /** - * - */ - @JsonProperty("OFN") private String OFN; - - /** - * - */ - @JsonProperty("UNIO") private String UNIO; - - /** - * - */ - @JsonProperty("SNS") private String SNS; - - /** - * - */ - @JsonProperty("SNX") private String SNX; - - /** - * - */ - @JsonProperty("NXRA") private String NXRA; - - /** - * - */ - @JsonProperty("TAIKO") private String TAIKO; - - /** - * - */ - @JsonProperty("AVAX3L") private String AVAX3L; - - /** - * - */ - @JsonProperty("L3") private String L3; - - /** - * - */ - @JsonProperty("API3") private String API3; - - /** - * - */ - @JsonProperty("XRP3S") private String XRP3S; - - /** - * - */ - @JsonProperty("QKC") private String QKC; - - /** - * - */ - @JsonProperty("AVAX3S") private String AVAX3S; - - /** - * - */ - @JsonProperty("ROSE") private String ROSE; - - /** - * - */ - @JsonProperty("SATS") private String SATS; - - /** - * - */ - @JsonProperty("BMX") private String BMX; - - /** - * - */ - @JsonProperty("PORTAL") private String PORTAL; - - /** - * - */ - @JsonProperty("TOMI") private String TOMI; - - /** - * - */ - @JsonProperty("XRP3L") private String XRP3L; - - /** - * - */ - @JsonProperty("SOL") private String SOL; - - /** - * - */ - @JsonProperty("SON") private String SON; - - /** - * - */ - @JsonProperty("BNC") private String BNC; - - /** - * - */ - @JsonProperty("SOCIAL") private String SOCIAL; - - /** - * - */ - @JsonProperty("CGPT") private String CGPT; - - /** - * - */ - @JsonProperty("CELR") private String CELR; - - /** - * - */ - @JsonProperty("BNB") private String BNB; - - /** - * - */ - @JsonProperty("OGN") private String OGN; - - /** - * - */ - @JsonProperty("CELO") private String CELO; - - /** - * - */ - @JsonProperty("AUCTION") private String AUCTION; - - /** - * - */ - @JsonProperty("MANTA") private String MANTA; - - /** - * - */ - @JsonProperty("LAYER") private String LAYER; - - /** - * - */ - @JsonProperty("AERO") private String AERO; - - /** - * - */ - @JsonProperty("CETUS") private String CETUS; - - /** - * - */ - @JsonProperty("LL") private String LL; - - /** - * - */ - @JsonProperty("SPA") private String SPA; - - /** - * - */ - @JsonProperty("PYTHDOWN") private String PYTHDOWN; - - /** - * - */ - @JsonProperty("NEIROCTO") private String NEIROCTO; - - /** - * - */ - @JsonProperty("UTK") private String UTK; - - /** - * - */ - @JsonProperty("GMRX") private String GMRX; - - /** - * - */ - @JsonProperty("BOB") private String BOB; - - /** - * - */ - @JsonProperty("HOTCROSS") private String HOTCROSS; - - /** - * - */ - @JsonProperty("AERGO") private String AERGO; - - /** - * - */ - @JsonProperty("MOCA") private String MOCA; - - /** - * - */ - @JsonProperty("SQD") private String SQD; - - /** - * - */ - @JsonProperty("MV") private String MV; - - /** - * - */ - @JsonProperty("BNB3L") private String BNB3L; - - /** - * - */ - @JsonProperty("BNB3S") private String BNB3S; - - /** - * - */ - @JsonProperty("GALAX3L") private String GALAX3L; - - /** - * - */ - @JsonProperty("KAI") private String KAI; - - /** - * - */ - @JsonProperty("SQR") private String SQR; - - /** - * - */ - @JsonProperty("GALAX3S") private String GALAX3S; - - /** - * - */ - @JsonProperty("EGLD") private String EGLD; - - /** - * - */ - @JsonProperty("ZBCN") private String ZBCN; - - /** - * - */ - @JsonProperty("KAS") private String KAS; - - /** - * - */ - @JsonProperty("MEW") private String MEW; - - /** - * - */ - @JsonProperty("PUNDIX") private String PUNDIX; - - /** - * - */ - @JsonProperty("LOOKS") private String LOOKS; - - /** - * - */ - @JsonProperty("FXS") private String FXS; - - /** - * - */ - @JsonProperty("BOSON") private String BOSON; - - /** - * - */ - @JsonProperty("BRISE") private String BRISE; - - /** - * - */ - @JsonProperty("AEVO") private String AEVO; - - /** - * - */ - @JsonProperty("FLUX") private String FLUX; - - /** - * - */ - @JsonProperty("PRCL") private String PRCL; - - /** - * - */ - @JsonProperty("UNFIUP") private String UNFIUP; - - /** - * - */ - @JsonProperty("SEIDOWN") private String SEIDOWN; - - /** - * - */ - @JsonProperty("DOAI") private String DOAI; - - /** - * - */ - @JsonProperty("QNT") private String QNT; - - /** - * - */ - @JsonProperty("REDO") private String REDO; - - /** - * - */ - @JsonProperty("STRIKE") private String STRIKE; - - /** - * - */ - @JsonProperty("ETHW") private String ETHW; - - /** - * - */ - @JsonProperty("OM") private String OM; - - /** - * - */ - @JsonProperty("OP") private String OP; - - /** - * - */ - @JsonProperty("WHALE") private String WHALE; - - /** - * - */ - @JsonProperty("1CAT") private String _1CAT; - - /** - * - */ - @JsonProperty("NEON") private String NEON; - - /** - * - */ - @JsonProperty("GTAI") private String GTAI; - - /** - * - */ - @JsonProperty("SSV") private String SSV; - - /** - * - */ - @JsonProperty("ETH2") private String ETH2; - - /** - * - */ - @JsonProperty("KCS") private String KCS; - - /** - * - */ - @JsonProperty("ARPA") private String ARPA; - - /** - * - */ - @JsonProperty("ARTFI") private String ARTFI; - - /** - * - */ - @JsonProperty("BRL") private String BRL; - - /** - * - */ - @JsonProperty("ALEX") private String ALEX; - - /** - * - */ - @JsonProperty("STG") private String STG; - - /** - * - */ - @JsonProperty("SHIB") private String SHIB; - - /** - * - */ - @JsonProperty("IOTX") private String IOTX; - - /** - * - */ - @JsonProperty("OLE") private String OLE; - - /** - * - */ - @JsonProperty("KDA") private String KDA; - - /** - * - */ - @JsonProperty("CERE") private String CERE; - - /** - * - */ - @JsonProperty("DOCK") private String DOCK; - - /** - * - */ - @JsonProperty("STX") private String STX; - - /** - * - */ - @JsonProperty("OLT") private String OLT; - - /** - * - */ - @JsonProperty("QI") private String QI; - - /** - * - */ - @JsonProperty("SDAO") private String SDAO; - - /** - * - */ - @JsonProperty("BLAST") private String BLAST; - - /** - * - */ - @JsonProperty("LINK3S") private String LINK3S; - - /** - * - */ - @JsonProperty("IOST") private String IOST; - - /** - * - */ - @JsonProperty("SUI") private String SUI; - - /** - * - */ - @JsonProperty("CAKE") private String CAKE; - - /** - * - */ - @JsonProperty("BSW") private String BSW; - - /** - * - */ - @JsonProperty("OMG") private String OMG; - - /** - * - */ - @JsonProperty("VOLT") private String VOLT; - - /** - * - */ - @JsonProperty("LINK3L") private String LINK3L; - - /** - * - */ - @JsonProperty("GEEQ") private String GEEQ; - - /** - * - */ - @JsonProperty("PYUSD") private String PYUSD; - - /** - * - */ - @JsonProperty("SUN") private String SUN; - - /** - * - */ - @JsonProperty("TOWER") private String TOWER; - - /** - * - */ - @JsonProperty("BTC") private String BTC; - - /** - * - */ - @JsonProperty("IOTA") private String IOTA; - - /** - * - */ - @JsonProperty("REEF") private String REEF; - - /** - * - */ - @JsonProperty("TRIAS") private String TRIAS; - - /** - * - */ - @JsonProperty("KEY") private String KEY; - - /** - * - */ - @JsonProperty("ETH3L") private String ETH3L; - - /** - * - */ - @JsonProperty("BTT") private String BTT; - - /** - * - */ - @JsonProperty("ONE") private String ONE; - - /** - * - */ - @JsonProperty("RENDER") private String RENDER; - - /** - * - */ - @JsonProperty("ETH3S") private String ETH3S; - - /** - * - */ - @JsonProperty("ANKR") private String ANKR; - - /** - * - */ - @JsonProperty("ALGO") private String ALGO; - - /** - * - */ - @JsonProperty("SYLO") private String SYLO; - - /** - * - */ - @JsonProperty("ZCX") private String ZCX; - - /** - * - */ - @JsonProperty("SD") private String SD; - - /** - * - */ - @JsonProperty("ONT") private String ONT; - - /** - * - */ - @JsonProperty("MJT") private String MJT; - - /** - * - */ - @JsonProperty("DYM") private String DYM; - - /** - * - */ - @JsonProperty("DYP") private String DYP; - - /** - * - */ - @JsonProperty("BAKEUP") private String BAKEUP; - - /** - * - */ - @JsonProperty("OOE") private String OOE; - - /** - * - */ - @JsonProperty("ZELIX") private String ZELIX; - - /** - * - */ - @JsonProperty("DOGE3L") private String DOGE3L; - - /** - * - */ - @JsonProperty("ARTY") private String ARTY; - - /** - * - */ - @JsonProperty("QORPO") private String QORPO; - - /** - * - */ - @JsonProperty("ICE") private String ICE; - - /** - * - */ - @JsonProperty("NOTAI") private String NOTAI; - - /** - * - */ - @JsonProperty("DOGE3S") private String DOGE3S; - - /** - * - */ - @JsonProperty("NAKA") private String NAKA; - - /** - * - */ - @JsonProperty("GALAX") private String GALAX; - - /** - * - */ - @JsonProperty("MKR") private String MKR; - - /** - * - */ - @JsonProperty("DODO") private String DODO; - - /** - * - */ - @JsonProperty("ICP") private String ICP; - - /** - * - */ - @JsonProperty("ZEC") private String ZEC; - - /** - * - */ - @JsonProperty("ZEE") private String ZEE; - - /** - * - */ - @JsonProperty("ICX") private String ICX; - - /** - * - */ - @JsonProperty("KMNO") private String KMNO; - - /** - * - */ - @JsonProperty("TT") private String TT; - - /** - * - */ - @JsonProperty("DOT3L") private String DOT3L; - - /** - * - */ - @JsonProperty("XAI") private String XAI; - - /** - * - */ - @JsonProperty("ZEN") private String ZEN; - - /** - * - */ - @JsonProperty("DOGE") private String DOGE; - - /** - * - */ - @JsonProperty("ALPHA") private String ALPHA; - - /** - * - */ - @JsonProperty("DUSK") private String DUSK; - - /** - * - */ - @JsonProperty("DOT3S") private String DOT3S; - - /** - * - */ - @JsonProperty("SXP") private String SXP; - - /** - * - */ - @JsonProperty("HBAR") private String HBAR; - - /** - * - */ - @JsonProperty("SYNT") private String SYNT; - - /** - * - */ - @JsonProperty("ZEX") private String ZEX; - - /** - * - */ - @JsonProperty("BONDLY") private String BONDLY; - - /** - * - */ - @JsonProperty("MLK") private String MLK; - - /** - * - */ - @JsonProperty("KICKS") private String KICKS; - - /** - * - */ - @JsonProperty("PEPE") private String PEPE; - - /** - * - */ - @JsonProperty("OUSD") private String OUSD; - - /** - * - */ - @JsonProperty("LUNCDOWN") private String LUNCDOWN; - - /** - * - */ - @JsonProperty("DOGS") private String DOGS; - - /** - * - */ - @JsonProperty("REV3L") private String REV3L; - - /** - * - */ - @JsonProperty("CTSI") private String CTSI; - - /** - * - */ - @JsonProperty("C98") private String C98; - - /** - * - */ - @JsonProperty("OSMO") private String OSMO; - - /** - * - */ - @JsonProperty("NTRN") private String NTRN; - - /** - * - */ - @JsonProperty("CFX2S") private String CFX2S; - - /** - * - */ - @JsonProperty("SYN") private String SYN; - - /** - * - */ - @JsonProperty("VIDT") private String VIDT; - - /** - * - */ - @JsonProperty("SYS") private String SYS; - - /** - * - */ - @JsonProperty("GAS") private String GAS; - - /** - * - */ - @JsonProperty("BOME") private String BOME; - - /** - * - */ - @JsonProperty("COMBO") private String COMBO; - - /** - * - */ - @JsonProperty("XCH") private String XCH; - - /** - * - */ - @JsonProperty("VR") private String VR; - - /** - * - */ - @JsonProperty("CFX2L") private String CFX2L; - - /** - * - */ - @JsonProperty("VSYS") private String VSYS; - - /** - * - */ - @JsonProperty("PANDORA") private String PANDORA; - - /** - * - */ - @JsonProperty("THETA") private String THETA; - - /** - * - */ - @JsonProperty("XCN") private String XCN; - - /** - * - */ - @JsonProperty("NEXG") private String NEXG; - - /** - * - */ - @JsonProperty("MELOS") private String MELOS; - - /** - * - */ - @JsonProperty("XCV") private String XCV; - - /** - * - */ - @JsonProperty("ORN") private String ORN; - - /** - * - */ - @JsonProperty("WLKN") private String WLKN; - - /** - * - */ - @JsonProperty("AAVE") private String AAVE; - - /** - * - */ - @JsonProperty("MNT") private String MNT; - - /** - * - */ - @JsonProperty("BONK") private String BONK; - - /** - * - */ - @JsonProperty("PERP") private String PERP; - - /** - * - */ - @JsonProperty("XDC") private String XDC; - - /** - * - */ - @JsonProperty("MNW") private String MNW; - - /** - * - */ - @JsonProperty("XDB") private String XDB; - - /** - * - */ - @JsonProperty("BOND") private String BOND; - - /** - * - */ - @JsonProperty("SUIA") private String SUIA; - - /** - * - */ - @JsonProperty("MOG") private String MOG; - - /** - * - */ - @JsonProperty("SUTER") private String SUTER; - - /** - * - */ - @JsonProperty("TIME") private String TIME; - - /** - * - */ - @JsonProperty("RACA") private String RACA; - - /** - * - */ - @JsonProperty("BICO") private String BICO; - - /** - * - */ - @JsonProperty("MON") private String MON; - - /** - * - */ - @JsonProperty("SWEAT") private String SWEAT; - - /** - * - */ - @JsonProperty("MOXIE") private String MOXIE; - - /** - * - */ - @JsonProperty("BABYBNB") private String BABYBNB; - - /** - * - */ - @JsonProperty("IGU") private String IGU; - - /** - * - */ - @JsonProperty("HMSTR") private String HMSTR; - - /** - * - */ - @JsonProperty("XEC") private String XEC; - - /** - * - */ - @JsonProperty("MONI") private String MONI; - - /** - * - */ - @JsonProperty("XR") private String XR; - - /** - * - */ - @JsonProperty("PEOPLE") private String PEOPLE; - - /** - * - */ - @JsonProperty("PUMLX") private String PUMLX; - - /** - * - */ - @JsonProperty("ZIL") private String ZIL; - - /** - * - */ - @JsonProperty("WLDDOWN") private String WLDDOWN; - - /** - * - */ - @JsonProperty("VAI") private String VAI; - - /** - * - */ - @JsonProperty("XEN") private String XEN; - - /** - * - */ - @JsonProperty("MPC") private String MPC; - - /** - * - */ - @JsonProperty("XEM") private String XEM; - - /** - * - */ - @JsonProperty("JASMY3S") private String JASMY3S; - - /** - * - */ - @JsonProperty("OTK") private String OTK; - - /** - * - */ - @JsonProperty("TRAC") private String TRAC; - - /** - * - */ - @JsonProperty("DFYN") private String DFYN; - - /** - * - */ - @JsonProperty("BIDP") private String BIDP; - - /** - * - */ - @JsonProperty("JASMY3L") private String JASMY3L; - - /** - * - */ - @JsonProperty("INJDOWN") private String INJDOWN; - - /** - * - */ - @JsonProperty("KLV") private String KLV; - - /** - * - */ - @JsonProperty("WAXL") private String WAXL; - - /** - * - */ - @JsonProperty("TRBDOWN") private String TRBDOWN; - - /** - * - */ - @JsonProperty("BCH3L") private String BCH3L; - - /** - * - */ - @JsonProperty("GMT3S") private String GMT3S; - - /** - * - */ - @JsonProperty("KMD") private String KMD; - - /** - * - */ - @JsonProperty("BCH3S") private String BCH3S; - - /** - * - */ - @JsonProperty("ECOX") private String ECOX; - - /** - * - */ - @JsonProperty("AAVE3S") private String AAVE3S; - - /** - * - */ - @JsonProperty("GMT3L") private String GMT3L; - - /** - * - */ - @JsonProperty("EPIK") private String EPIK; - - /** - * - */ - @JsonProperty("SUIP") private String SUIP; - - /** - * - */ - @JsonProperty("AAVE3L") private String AAVE3L; - - /** - * - */ - @JsonProperty("ZK") private String ZK; - - /** - * - */ - @JsonProperty("ZKF") private String ZKF; - - /** - * - */ - @JsonProperty("OMNIA") private String OMNIA; - - /** - * - */ - @JsonProperty("ZKJ") private String ZKJ; - - /** - * - */ - @JsonProperty("ZKL") private String ZKL; - - /** - * - */ - @JsonProperty("GAFI") private String GAFI; - - /** - * - */ - @JsonProperty("CARV") private String CARV; - - /** - * - */ - @JsonProperty("KNC") private String KNC; - - /** - * - */ - @JsonProperty("CATS") private String CATS; - - /** - * - */ - @JsonProperty("PROM") private String PROM; - - /** - * - */ - @JsonProperty("ALEPH") private String ALEPH; - - /** - * - */ - @JsonProperty("PONKE") private String PONKE; - - /** - * - */ - @JsonProperty("OVR") private String OVR; - - /** - * - */ - @JsonProperty("CATI") private String CATI; - - /** - * - */ - @JsonProperty("ORDER") private String ORDER; - - /** - * - */ - @JsonProperty("GFT") private String GFT; - - /** - * - */ - @JsonProperty("BIFI") private String BIFI; - - /** - * - */ - @JsonProperty("GGC") private String GGC; - - /** - * - */ - @JsonProperty("GGG") private String GGG; - - /** - * - */ - @JsonProperty("DAPPX") private String DAPPX; - - /** - * - */ - @JsonProperty("SUKU") private String SUKU; - - /** - * - */ - @JsonProperty("ULTI") private String ULTI; - - /** - * - */ - @JsonProperty("CREDI") private String CREDI; - - /** - * - */ - @JsonProperty("ERTHA") private String ERTHA; - - /** - * - */ - @JsonProperty("FURY") private String FURY; - - /** - * - */ - @JsonProperty("KARRAT") private String KARRAT; - - /** - * - */ - @JsonProperty("MOBILE") private String MOBILE; - - /** - * - */ - @JsonProperty("SIDUS") private String SIDUS; - - /** - * - */ - @JsonProperty("NAVI") private String NAVI; - - /** - * - */ - @JsonProperty("TAO") private String TAO; - - /** - * - */ - @JsonProperty("USDJ") private String USDJ; - - /** - * - */ - @JsonProperty("MTL") private String MTL; - - /** - * - */ - @JsonProperty("VET") private String VET; - - /** - * - */ - @JsonProperty("FITFI") private String FITFI; - - /** - * - */ - @JsonProperty("USDT") private String USDT; - - /** - * - */ - @JsonProperty("OXT") private String OXT; - - /** - * - */ - @JsonProperty("CANDY") private String CANDY; - - /** - * - */ - @JsonProperty("USDP") private String USDP; - - /** - * - */ - @JsonProperty("MTS") private String MTS; - - /** - * - */ - @JsonProperty("TADA") private String TADA; - - /** - * - */ - @JsonProperty("MTV") private String MTV; - - /** - * - */ - @JsonProperty("NAVX") private String NAVX; - - /** - * - */ - @JsonProperty("ILV") private String ILV; - - /** - * - */ - @JsonProperty("VINU") private String VINU; - - /** - * - */ - @JsonProperty("GHX") private String GHX; - - /** - * - */ - @JsonProperty("EDU") private String EDU; - - /** - * - */ - @JsonProperty("HYVE") private String HYVE; - - /** - * - */ - @JsonProperty("BTC3L") private String BTC3L; - - /** - * - */ - @JsonProperty("ANYONE") private String ANYONE; - - /** - * - */ - @JsonProperty("BEAT") private String BEAT; - - /** - * - */ - @JsonProperty("KING") private String KING; - - /** - * - */ - @JsonProperty("CREAM") private String CREAM; - - /** - * - */ - @JsonProperty("CAS") private String CAS; - - /** - * - */ - @JsonProperty("IMX") private String IMX; - - /** - * - */ - @JsonProperty("CAT") private String CAT; - - /** - * - */ - @JsonProperty("BTC3S") private String BTC3S; - - /** - * - */ - @JsonProperty("USDE") private String USDE; - - /** - * - */ - @JsonProperty("USDD") private String USDD; - - /** - * - */ - @JsonProperty("CWAR") private String CWAR; - - /** - * - */ - @JsonProperty("USDC") private String USDC; - - /** - * - */ - @JsonProperty("KRL") private String KRL; - - /** - * - */ - @JsonProperty("INJ") private String INJ; - - /** - * - */ - @JsonProperty("GAME") private String GAME; - - /** - * - */ - @JsonProperty("TRIBL") private String TRIBL; - - /** - * - */ - @JsonProperty("XLM") private String XLM; - - /** - * - */ - @JsonProperty("TRBUP") private String TRBUP; - - /** - * - */ - @JsonProperty("VRADOWN") private String VRADOWN; - - /** - * - */ - @JsonProperty("SUPER") private String SUPER; - - /** - * - */ - @JsonProperty("EIGEN") private String EIGEN; - - /** - * - */ - @JsonProperty("IOI") private String IOI; - - /** - * - */ - @JsonProperty("KSM") private String KSM; - - /** - * - */ - @JsonProperty("CCD") private String CCD; - - /** - * - */ - @JsonProperty("EGO") private String EGO; - - /** - * - */ - @JsonProperty("EGP") private String EGP; - - /** - * - */ - @JsonProperty("MXC") private String MXC; - - /** - * - */ - @JsonProperty("TEL") private String TEL; - - /** - * - */ - @JsonProperty("MOVR") private String MOVR; - - /** - * - */ - @JsonProperty("XMR") private String XMR; - - /** - * - */ - @JsonProperty("MXM") private String MXM; - - /** - * - */ - @JsonProperty("OORT") private String OORT; - - /** - * - */ - @JsonProperty("GLM") private String GLM; - - /** - * - */ - @JsonProperty("RAY") private String RAY; - - /** - * - */ - @JsonProperty("XTAG") private String XTAG; - - /** - * - */ - @JsonProperty("GLQ") private String GLQ; - - /** - * - */ - @JsonProperty("CWEB") private String CWEB; - - /** - * - */ - @JsonProperty("REVU") private String REVU; - - /** - * - */ - @JsonProperty("REVV") private String REVV; - - /** - * - */ - @JsonProperty("ZRO") private String ZRO; - - /** - * - */ - @JsonProperty("XNL") private String XNL; - - /** - * - */ - @JsonProperty("XNO") private String XNO; - - /** - * - */ - @JsonProperty("SAROS") private String SAROS; - - /** - * - */ - @JsonProperty("KACE") private String KACE; - - /** - * - */ - @JsonProperty("ZRX") private String ZRX; - - /** - * - */ - @JsonProperty("WLTH") private String WLTH; - - /** - * - */ - @JsonProperty("ATOM3L") private String ATOM3L; - - /** - * - */ - @JsonProperty("GMM") private String GMM; - - /** - * - */ - @JsonProperty("BEER") private String BEER; - - /** - * - */ - @JsonProperty("GMT") private String GMT; - - /** - * - */ - @JsonProperty("HEART") private String HEART; - - /** - * - */ - @JsonProperty("GMX") private String GMX; - - /** - * - */ - @JsonProperty("ABBC") private String ABBC; - - /** - * - */ - @JsonProperty("OMNI") private String OMNI; - - /** - * - */ - @JsonProperty("ATOM3S") private String ATOM3S; - - /** - * - */ - @JsonProperty("IRL") private String IRL; - - /** - * - */ - @JsonProperty("CFG") private String CFG; - - /** - * - */ - @JsonProperty("WSDM") private String WSDM; - - /** - * - */ - @JsonProperty("GNS") private String GNS; - - /** - * - */ - @JsonProperty("VANRY") private String VANRY; - - /** - * - */ - @JsonProperty("CFX") private String CFX; - - /** - * - */ - @JsonProperty("GRAIL") private String GRAIL; - - /** - * - */ - @JsonProperty("BEFI") private String BEFI; - - /** - * - */ - @JsonProperty("VELO") private String VELO; - - /** - * - */ - @JsonProperty("XPR") private String XPR; - - /** - * - */ - @JsonProperty("DOVI") private String DOVI; - - /** - * - */ - @JsonProperty("ACE") private String ACE; - - /** - * - */ - @JsonProperty("ACH") private String ACH; - - /** - * - */ - @JsonProperty("ISP") private String ISP; - - /** - * - */ - @JsonProperty("XCAD") private String XCAD; - - /** - * - */ - @JsonProperty("MINA") private String MINA; - - /** - * - */ - @JsonProperty("TIA") private String TIA; - - /** - * - */ - @JsonProperty("DRIFT") private String DRIFT; - - /** - * - */ - @JsonProperty("ACQ") private String ACQ; - - /** - * - */ - @JsonProperty("ACS") private String ACS; - - /** - * - */ - @JsonProperty("MIND") private String MIND; - - /** - * - */ - @JsonProperty("STORE") private String STORE; - - /** - * - */ - @JsonProperty("REN") private String REN; - - /** - * - */ - @JsonProperty("ELA") private String ELA; - - /** - * - */ - @JsonProperty("DREAMS") private String DREAMS; - - /** - * - */ - @JsonProperty("ADA") private String ADA; - - /** - * - */ - @JsonProperty("ELF") private String ELF; - - /** - * - */ - @JsonProperty("REQ") private String REQ; - - /** - * - */ - @JsonProperty("STORJ") private String STORJ; - - /** - * - */ - @JsonProperty("LADYS") private String LADYS; - - /** - * - */ - @JsonProperty("PAXG") private String PAXG; - - /** - * - */ - @JsonProperty("REZ") private String REZ; - - /** - * - */ - @JsonProperty("XRD") private String XRD; - - /** - * - */ - @JsonProperty("CHO") private String CHO; - - /** - * - */ - @JsonProperty("CHR") private String CHR; - - /** - * - */ - @JsonProperty("ADS") private String ADS; - - /** - * - */ - @JsonProperty("CHZ") private String CHZ; - - /** - * - */ - @JsonProperty("ADX") private String ADX; - - /** - * - */ - @JsonProperty("XRP") private String XRP; - - /** - * - */ - @JsonProperty("JASMY") private String JASMY; - - /** - * - */ - @JsonProperty("KAGI") private String KAGI; - - /** - * - */ - @JsonProperty("FIDA") private String FIDA; - - /** - * - */ - @JsonProperty("PBR") private String PBR; - - /** - * - */ - @JsonProperty("AEG") private String AEG; - - /** - * - */ - @JsonProperty("H2O") private String H2O; - - /** - * - */ - @JsonProperty("CHMB") private String CHMB; - - /** - * - */ - @JsonProperty("SAND3L") private String SAND3L; - - /** - * - */ - @JsonProperty("PBX") private String PBX; - - /** - * - */ - @JsonProperty("SOLVE") private String SOLVE; - - /** - * - */ - @JsonProperty("DECHAT") private String DECHAT; - - /** - * - */ - @JsonProperty("GARI") private String GARI; - - /** - * - */ - @JsonProperty("SHIB2L") private String SHIB2L; - - /** - * - */ - @JsonProperty("SHIB2S") private String SHIB2S; - - /** - * - */ - @JsonProperty("ENA") private String ENA; - - /** - * - */ - @JsonProperty("VEMP") private String VEMP; - - /** - * - */ - @JsonProperty("ENJ") private String ENJ; - - /** - * - */ - @JsonProperty("AFG") private String AFG; - - /** - * - */ - @JsonProperty("RATS") private String RATS; - - /** - * - */ - @JsonProperty("GRT") private String GRT; - - /** - * - */ - @JsonProperty("FORWARD") private String FORWARD; - - /** - * - */ - @JsonProperty("TFUEL") private String TFUEL; - - /** - * - */ - @JsonProperty("ENS") private String ENS; - - /** - * - */ - @JsonProperty("KASDOWN") private String KASDOWN; - - /** - * - */ - @JsonProperty("XTM") private String XTM; - - /** - * - */ - @JsonProperty("DEGEN") private String DEGEN; - - /** - * - */ - @JsonProperty("TLM") private String TLM; - - /** - * - */ - @JsonProperty("DYDXDOWN") private String DYDXDOWN; - - /** - * - */ - @JsonProperty("CKB") private String CKB; - - /** - * - */ - @JsonProperty("LUNC") private String LUNC; - - /** - * - */ - @JsonProperty("AURORA") private String AURORA; - - /** - * - */ - @JsonProperty("LUNA") private String LUNA; - - /** - * - */ - @JsonProperty("XTZ") private String XTZ; - - /** - * - */ - @JsonProperty("ELON") private String ELON; - - /** - * - */ - @JsonProperty("DMTR") private String DMTR; - - /** - * - */ - @JsonProperty("EOS") private String EOS; - - /** - * - */ - @JsonProperty("GST") private String GST; - - /** - * - */ - @JsonProperty("FORT") private String FORT; - - /** - * - */ - @JsonProperty("FLAME") private String FLAME; - - /** - * - */ - @JsonProperty("PATEX") private String PATEX; - - /** - * - */ - @JsonProperty("DEEP") private String DEEP; - - /** - * - */ - @JsonProperty("ID3L") private String ID3L; - - /** - * - */ - @JsonProperty("GTC") private String GTC; - - /** - * - */ - @JsonProperty("ID3S") private String ID3S; - - /** - * - */ - @JsonProperty("RIO") private String RIO; - - /** - * - */ - @JsonProperty("CLH") private String CLH; - - /** - * - */ - @JsonProperty("BURGER") private String BURGER; - - /** - * - */ - @JsonProperty("VRA") private String VRA; - - /** - * - */ - @JsonProperty("SUNDOG") private String SUNDOG; - - /** - * - */ - @JsonProperty("GTT") private String GTT; - - /** - * - */ - @JsonProperty("INJUP") private String INJUP; - - /** - * - */ - @JsonProperty("CPOOL") private String CPOOL; - - /** - * - */ - @JsonProperty("EPX") private String EPX; - - /** - * - */ - @JsonProperty("CLV") private String CLV; - - /** - * - */ - @JsonProperty("FEAR") private String FEAR; - - /** - * - */ - @JsonProperty("MEME") private String MEME; - - /** - * - */ - @JsonProperty("ROOBEE") private String ROOBEE; - - /** - * - */ - @JsonProperty("DEFI") private String DEFI; - - /** - * - */ - @JsonProperty("TOKEN") private String TOKEN; - - /** - * - */ - @JsonProperty("GRAPE") private String GRAPE; - - /** - * - */ - @JsonProperty("KASUP") private String KASUP; - - /** - * - */ - @JsonProperty("XWG") private String XWG; - - /** - * - */ - @JsonProperty("SKEY") private String SKEY; - - /** - * - */ - @JsonProperty("SFUND") private String SFUND; - - /** - * - */ - @JsonProperty("EQX") private String EQX; - - /** - * - */ - @JsonProperty("ORDIUP") private String ORDIUP; - - /** - * - */ - @JsonProperty("TON") private String TON; - - /** - * - */ - @JsonProperty("DEGO") private String DEGO; - - /** - * - */ - @JsonProperty("IZI") private String IZI; - - /** - * - */ - @JsonProperty("ERG") private String ERG; - - /** - * - */ - @JsonProperty("ERN") private String ERN; - - /** - * - */ - @JsonProperty("VENOM") private String VENOM; - - /** - * - */ - @JsonProperty("VOXEL") private String VOXEL; - - /** - * - */ - @JsonProperty("RLC") private String RLC; - - /** - * - */ - @JsonProperty("PHA") private String PHA; - - /** - * - */ - @JsonProperty("DYDXUP") private String DYDXUP; - - /** - * - */ - @JsonProperty("APE3S") private String APE3S; - - /** - * - */ - @JsonProperty("ORBS") private String ORBS; - - /** - * - */ - @JsonProperty("OPDOWN") private String OPDOWN; - - /** - * - */ - @JsonProperty("ESE") private String ESE; - - /** - * - */ - @JsonProperty("APE3L") private String APE3L; - - /** - * - */ - @JsonProperty("HMND") private String HMND; - - /** - * - */ - @JsonProperty("COQ") private String COQ; - - /** - * - */ - @JsonProperty("AURY") private String AURY; - - /** - * - */ - @JsonProperty("CULT") private String CULT; - - /** - * - */ - @JsonProperty("AKT") private String AKT; - - /** - * - */ - @JsonProperty("GLMR") private String GLMR; - - /** - * - */ - @JsonProperty("XYM") private String XYM; - - /** - * - */ - @JsonProperty("ORAI") private String ORAI; - - /** - * - */ - @JsonProperty("XYO") private String XYO; - - /** - * - */ - @JsonProperty("ETC") private String ETC; - - /** - * - */ - @JsonProperty("LAI") private String LAI; - - /** - * - */ - @JsonProperty("PIP") private String PIP; - - /** - * - */ - @JsonProperty("ETH") private String ETH; - - /** - * - */ - @JsonProperty("NEO") private String NEO; - - /** - * - */ - @JsonProperty("RMV") private String RMV; - - /** - * - */ - @JsonProperty("KLAY") private String KLAY; - - /** - * - */ - @JsonProperty("PIT") private String PIT; - - /** - * - */ - @JsonProperty("TARA") private String TARA; - - /** - * - */ - @JsonProperty("KALT") private String KALT; - - /** - * - */ - @JsonProperty("PIX") private String PIX; - - /** - * - */ - @JsonProperty("ETN") private String ETN; - - /** - * - */ - @JsonProperty("CSIX") private String CSIX; - - /** - * - */ - @JsonProperty("TRADE") private String TRADE; - - /** - * - */ - @JsonProperty("MAVIA") private String MAVIA; - - /** - * - */ - @JsonProperty("HIGH") private String HIGH; - - /** - * - */ - @JsonProperty("TRB") private String TRB; - - /** - * - */ - @JsonProperty("ORDI") private String ORDI; - - /** - * - */ - @JsonProperty("TRVL") private String TRVL; - - /** - * - */ - @JsonProperty("AMB") private String AMB; - - /** - * - */ - @JsonProperty("TRU") private String TRU; - - /** - * - */ - @JsonProperty("LOGX") private String LOGX; - - /** - * - */ - @JsonProperty("FINC") private String FINC; - - /** - * - */ - @JsonProperty("INFRA") private String INFRA; - - /** - * - */ - @JsonProperty("NATIX") private String NATIX; - - /** - * - */ - @JsonProperty("NFP") private String NFP; - - /** - * - */ - @JsonProperty("TRY") private String TRY; - - /** - * - */ - @JsonProperty("TRX") private String TRX; - - /** - * - */ - @JsonProperty("LBP") private String LBP; - - /** - * - */ - @JsonProperty("LBR") private String LBR; - - /** - * - */ - @JsonProperty("EUL") private String EUL; - - /** - * - */ - @JsonProperty("NFT") private String NFT; - - /** - * - */ - @JsonProperty("SEIUP") private String SEIUP; - - /** - * - */ - @JsonProperty("PUFFER") private String PUFFER; - - /** - * - */ - @JsonProperty("EUR") private String EUR; - - /** - * - */ - @JsonProperty("ORCA") private String ORCA; - - /** - * - */ - @JsonProperty("NEAR3L") private String NEAR3L; - - /** - * - */ - @JsonProperty("AMP") private String AMP; - - /** - * - */ - @JsonProperty("XDEFI") private String XDEFI; - - /** - * - */ - @JsonProperty("HIFI") private String HIFI; - - /** - * - */ - @JsonProperty("TRUF") private String TRUF; - - /** - * - */ - @JsonProperty("AITECH") private String AITECH; - - /** - * - */ - @JsonProperty("AMU") private String AMU; - - /** - * - */ - @JsonProperty("USTC") private String USTC; - - /** - * - */ - @JsonProperty("KNGL") private String KNGL; - - /** - * - */ - @JsonProperty("FOXY") private String FOXY; - - /** - * - */ - @JsonProperty("NGC") private String NGC; - - /** - * - */ - @JsonProperty("TENET") private String TENET; - - /** - * - */ - @JsonProperty("NEAR3S") private String NEAR3S; - - /** - * - */ - @JsonProperty("MAHA") private String MAHA; - - /** - * - */ - @JsonProperty("NGL") private String NGL; - - /** - * - */ - @JsonProperty("TST") private String TST; - - /** - * - */ - @JsonProperty("HIPPO") private String HIPPO; - - /** - * - */ - @JsonProperty("AXS3S") private String AXS3S; - - /** - * - */ - @JsonProperty("CRO") private String CRO; - - /** - * - */ - @JsonProperty("ZPAY") private String ZPAY; - - /** - * - */ - @JsonProperty("MNDE") private String MNDE; - - /** - * - */ - @JsonProperty("CRV") private String CRV; - - /** - * - */ - @JsonProperty("SWASH") private String SWASH; - - /** - * - */ - @JsonProperty("AXS3L") private String AXS3L; - - /** - * - */ - @JsonProperty("VERSE") private String VERSE; - - /** - * - */ - @JsonProperty("RPK") private String RPK; - - /** - * - */ - @JsonProperty("RPL") private String RPL; - - /** - * - */ - @JsonProperty("AZERO") private String AZERO; - - /** - * - */ - @JsonProperty("SOUL") private String SOUL; - - /** - * - */ - @JsonProperty("VXV") private String VXV; - - /** - * - */ - @JsonProperty("LDO") private String LDO; - - /** - * - */ - @JsonProperty("MAGIC") private String MAGIC; - - /** - * - */ - @JsonProperty("ALICE") private String ALICE; - - /** - * - */ - @JsonProperty("SEAM") private String SEAM; - - /** - * - */ - @JsonProperty("PLU") private String PLU; - - /** - * - */ - @JsonProperty("AOG") private String AOG; - - /** - * - */ - @JsonProperty("SMOLE") private String SMOLE; - - /** - * - */ - @JsonProperty("EWT") private String EWT; - - /** - * - */ - @JsonProperty("TSUGT") private String TSUGT; - - /** - * - */ - @JsonProperty("PMG") private String PMG; - - /** - * - */ - @JsonProperty("OPAI") private String OPAI; - - /** - * - */ - @JsonProperty("LOCUS") private String LOCUS; - - /** - * - */ - @JsonProperty("CTA") private String CTA; - - /** - * - */ - @JsonProperty("NIM") private String NIM; - - /** - * - */ - @JsonProperty("CTC") private String CTC; - - /** - * - */ - @JsonProperty("APE") private String APE; - - /** - * - */ - @JsonProperty("MERL") private String MERL; - - /** - * - */ - @JsonProperty("JAM") private String JAM; - - /** - * - */ - @JsonProperty("CTI") private String CTI; - - /** - * - */ - @JsonProperty("APP") private String APP; - - /** - * - */ - @JsonProperty("APT") private String APT; - - /** - * - */ - @JsonProperty("WLDUP") private String WLDUP; - - /** - * - */ - @JsonProperty("ZEND") private String ZEND; - - /** - * - */ - @JsonProperty("FIRE") private String FIRE; - - /** - * - */ - @JsonProperty("DENT") private String DENT; - - /** - * - */ - @JsonProperty("PYTH") private String PYTH; - - /** - * - */ - @JsonProperty("LFT") private String LFT; - - /** - * - */ - @JsonProperty("DPET") private String DPET; - - /** - * - */ - @JsonProperty("ORDIDOWN") private String ORDIDOWN; - - /** - * - */ - @JsonProperty("KPOL") private String KPOL; - - /** - * - */ - @JsonProperty("ETHUP") private String ETHUP; - - /** - * - */ - @JsonProperty("BAND") private String BAND; - - /** - * - */ - @JsonProperty("POL") private String POL; - - /** - * - */ - @JsonProperty("ASTR") private String ASTR; - - /** - * - */ - @JsonProperty("NKN") private String NKN; - - /** - * - */ - @JsonProperty("RSR") private String RSR; - - /** - * - */ - @JsonProperty("DVPN") private String DVPN; - - /** - * - */ - @JsonProperty("TWT") private String TWT; - - /** - * - */ - @JsonProperty("ARB") private String ARB; - - /** - * - */ - @JsonProperty("CVC") private String CVC; - - /** - * - */ - @JsonProperty("ARC") private String ARC; - - /** - * - */ - @JsonProperty("XETA") private String XETA; - - /** - * - */ - @JsonProperty("MTRG") private String MTRG; - - /** - * - */ - @JsonProperty("LOKA") private String LOKA; - - /** - * - */ - @JsonProperty("LPOOL") private String LPOOL; - - /** - * - */ - @JsonProperty("TURBOS") private String TURBOS; - - /** - * - */ - @JsonProperty("CVX") private String CVX; - - /** - * - */ - @JsonProperty("ARX") private String ARX; - - /** - * - */ - @JsonProperty("MPLX") private String MPLX; - - /** - * - */ - @JsonProperty("SUSHI") private String SUSHI; - - /** - * - */ - @JsonProperty("NLK") private String NLK; - - /** - * - */ - @JsonProperty("PEPE2") private String PEPE2; - - /** - * - */ - @JsonProperty("WBTC") private String WBTC; - - /** - * - */ - @JsonProperty("SUI3L") private String SUI3L; - - /** - * - */ - @JsonProperty("CWS") private String CWS; - - /** - * - */ - @JsonProperty("SUI3S") private String SUI3S; - - /** - * - */ - @JsonProperty("INSP") private String INSP; - - /** - * - */ - @JsonProperty("MANA") private String MANA; - - /** - * - */ - @JsonProperty("VRTX") private String VRTX; - - /** - * - */ - @JsonProperty("CSPR") private String CSPR; - - /** - * - */ - @JsonProperty("ATA") private String ATA; - - /** - * - */ - @JsonProperty("OPEN") private String OPEN; - - /** - * - */ - @JsonProperty("HAI") private String HAI; - - /** - * - */ - @JsonProperty("NMR") private String NMR; - - /** - * - */ - @JsonProperty("ATH") private String ATH; - - /** - * - */ - @JsonProperty("LIT") private String LIT; - - /** - * - */ - @JsonProperty("TLOS") private String TLOS; - - /** - * - */ - @JsonProperty("TNSR") private String TNSR; - - /** - * - */ - @JsonProperty("CXT") private String CXT; - - /** - * - */ - @JsonProperty("POLYX") private String POLYX; - - /** - * - */ - @JsonProperty("ZERO") private String ZERO; - - /** - * - */ - @JsonProperty("ROUTE") private String ROUTE; - - /** - * - */ - @JsonProperty("LOOM") private String LOOM; - - /** - * - */ - @JsonProperty("PRE") private String PRE; - - /** - * - */ - @JsonProperty("VRAUP") private String VRAUP; - - /** - * - */ - @JsonProperty("HBB") private String HBB; - - /** - * - */ - @JsonProperty("RVN") private String RVN; - - /** - * - */ - @JsonProperty("PRQ") private String PRQ; - - /** - * - */ - @JsonProperty("ONDO") private String ONDO; - - /** - * - */ - @JsonProperty("PEPEDOWN") private String PEPEDOWN; - - /** - * - */ - @JsonProperty("WOOP") private String WOOP; - - /** - * - */ - @JsonProperty("LUNCUP") private String LUNCUP; - - /** - * - */ - @JsonProperty("KAVA") private String KAVA; - - /** - * - */ - @JsonProperty("LKI") private String LKI; - - /** - * - */ - @JsonProperty("AVA") private String AVA; - - /** - * - */ - @JsonProperty("NOM") private String NOM; - - /** - * - */ - @JsonProperty("MAPO") private String MAPO; - - /** - * - */ - @JsonProperty("PEPEUP") private String PEPEUP; - - /** - * - */ - @JsonProperty("STRAX") private String STRAX; - - /** - * - */ - @JsonProperty("NOT") private String NOT; - - /** - * - */ - @JsonProperty("ZERC") private String ZERC; - - /** - * - */ - @JsonProperty("BCUT") private String BCUT; - - /** - * - */ - @JsonProperty("MASA") private String MASA; - - /** - * - */ - @JsonProperty("WAN") private String WAN; - - /** - * - */ - @JsonProperty("WAT") private String WAT; - - /** - * - */ - @JsonProperty("WAX") private String WAX; - - /** - * - */ - @JsonProperty("MASK") private String MASK; - - /** - * - */ - @JsonProperty("EOS3L") private String EOS3L; - - /** - * - */ - @JsonProperty("IDEA") private String IDEA; - - /** - * - */ - @JsonProperty("EOS3S") private String EOS3S; - - /** - * - */ - @JsonProperty("YFI") private String YFI; - - /** - * - */ - @JsonProperty("MOODENG") private String MOODENG; - - /** - * - */ - @JsonProperty("XCUR") private String XCUR; - - /** - * - */ - @JsonProperty("HYDRA") private String HYDRA; - - /** - * - */ - @JsonProperty("POPCAT") private String POPCAT; - - /** - * - */ - @JsonProperty("LQTY") private String LQTY; - - /** - * - */ - @JsonProperty("PIXEL") private String PIXEL; - - /** - * - */ - @JsonProperty("LMR") private String LMR; - - /** - * - */ - @JsonProperty("ZETA") private String ZETA; - - /** - * - */ - @JsonProperty("YGG") private String YGG; - - /** - * - */ - @JsonProperty("AXS") private String AXS; - - /** - * - */ - @JsonProperty("BCHSV") private String BCHSV; - - /** - * - */ - @JsonProperty("NRN") private String NRN; - - /** - * - */ - @JsonProperty("FTON") private String FTON; - - /** - * - */ - @JsonProperty("COMP") private String COMP; - - /** - * - */ - @JsonProperty("XPRT") private String XPRT; - - /** - * - */ - @JsonProperty("HFT") private String HFT; - - /** - * - */ - @JsonProperty("UXLINK") private String UXLINK; - - /** - * - */ - @JsonProperty("STAMP") private String STAMP; - - /** - * - */ - @JsonProperty("RUNE") private String RUNE; - - /** - * - */ - @JsonProperty("ZEUS") private String ZEUS; - - /** - * - */ - @JsonProperty("LTC3L") private String LTC3L; - - /** - * - */ - @JsonProperty("DAPP") private String DAPP; - - /** - * - */ - @JsonProperty("FORTH") private String FORTH; - - /** - * - */ - @JsonProperty("ALPINE") private String ALPINE; - - /** - * - */ - @JsonProperty("SENSO") private String SENSO; - - /** - * - */ - @JsonProperty("LTC3S") private String LTC3S; - - /** - * - */ - @JsonProperty("DEXE") private String DEXE; - - /** - * - */ - @JsonProperty("GOAL") private String GOAL; - - /** - * - */ - @JsonProperty("AVAX") private String AVAX; - - /** - * - */ - @JsonProperty("LISTA") private String LISTA; - - /** - * - */ - @JsonProperty("AMPL") private String AMPL; - - /** - * - */ - @JsonProperty("WORK") private String WORK; - - /** - * - */ - @JsonProperty("BRWL") private String BRWL; - - /** - * - */ - @JsonProperty("BANANA") private String BANANA; - - /** - * - */ - @JsonProperty("PUSH") private String PUSH; - - /** - * - */ - @JsonProperty("WEN") private String WEN; - - /** - * - */ - @JsonProperty("NEIRO") private String NEIRO; - - /** - * - */ - @JsonProperty("BTCUP") private String BTCUP; - - /** - * - */ - @JsonProperty("SOL3S") private String SOL3S; - - /** - * - */ - @JsonProperty("BRAWL") private String BRAWL; - - /** - * - */ - @JsonProperty("LAY3R") private String LAY3R; - - /** - * - */ - @JsonProperty("LPT") private String LPT; - - /** - * - */ - @JsonProperty("GODS") private String GODS; - - /** - * - */ - @JsonProperty("SAND3S") private String SAND3S; - - /** - * - */ - @JsonProperty("RDNT") private String RDNT; - - /** - * - */ - @JsonProperty("SOL3L") private String SOL3L; - - /** - * - */ - @JsonProperty("NIBI") private String NIBI; - - /** - * - */ - @JsonProperty("NUM") private String NUM; - - /** - * - */ - @JsonProperty("PYR") private String PYR; - - /** - * - */ - @JsonProperty("DAG") private String DAG; - - /** - * - */ - @JsonProperty("DAI") private String DAI; - - /** - * - */ - @JsonProperty("HIP") private String HIP; - - /** - * - */ - @JsonProperty("DAO") private String DAO; - - /** - * - */ - @JsonProperty("AVAIL") private String AVAIL; - - /** - * - */ - @JsonProperty("DAR") private String DAR; - - /** - * - */ - @JsonProperty("FET") private String FET; - - /** - * - */ - @JsonProperty("FCON") private String FCON; - - /** - * - */ - @JsonProperty("XAVA") private String XAVA; - - /** - * - */ - @JsonProperty("LRC") private String LRC; - - /** - * - */ - @JsonProperty("UNI3S") private String UNI3S; - - /** - * - */ - @JsonProperty("POKT") private String POKT; - - /** - * - */ - @JsonProperty("DASH") private String DASH; - - /** - * - */ - @JsonProperty("BAKEDOWN") private String BAKEDOWN; - - /** - * - */ - @JsonProperty("POLC") private String POLC; - - /** - * - */ - @JsonProperty("CIRUS") private String CIRUS; - - /** - * - */ - @JsonProperty("UNI3L") private String UNI3L; - - /** - * - */ - @JsonProperty("NWC") private String NWC; - - /** - * - */ - @JsonProperty("POLK") private String POLK; - - /** - * - */ - @JsonProperty("LSD") private String LSD; - - /** - * - */ - @JsonProperty("MARS4") private String MARS4; - - /** - * - */ - @JsonProperty("LSK") private String LSK; - - /** - * - */ - @JsonProperty("BLOCK") private String BLOCK; - - /** - * - */ - @JsonProperty("ANALOS") private String ANALOS; - - /** - * - */ - @JsonProperty("SAFE") private String SAFE; - - /** - * - */ - @JsonProperty("DCK") private String DCK; - - /** - * - */ - @JsonProperty("LSS") private String LSS; - - /** - * - */ - @JsonProperty("DCR") private String DCR; - - /** - * - */ - @JsonProperty("LIKE") private String LIKE; - - /** - * - */ - @JsonProperty("DATA") private String DATA; - - /** - * - */ - @JsonProperty("WIF") private String WIF; - - /** - * - */ - @JsonProperty("BLOK") private String BLOK; - - /** - * - */ - @JsonProperty("LTC") private String LTC; - - /** - * - */ - @JsonProperty("METIS") private String METIS; - - /** - * - */ - @JsonProperty("WIN") private String WIN; - - /** - * - */ - @JsonProperty("HLG") private String HLG; - - /** - * - */ - @JsonProperty("LTO") private String LTO; - - /** - * - */ - @JsonProperty("DYDX") private String DYDX; - - /** - * - */ - @JsonProperty("ARB3S") private String ARB3S; - - /** - * - */ - @JsonProperty("MUBI") private String MUBI; - - /** - * - */ - @JsonProperty("ARB3L") private String ARB3L; - - /** - * - */ - @JsonProperty("RBTC1") private String RBTC1; - - /** - * - */ - @JsonProperty("POND") private String POND; - - /** - * - */ - @JsonProperty("LINA") private String LINA; - - /** - * - */ - @JsonProperty("MYRIA") private String MYRIA; - - /** - * - */ - @JsonProperty("LINK") private String LINK; - - /** - * - */ - @JsonProperty("QTUM") private String QTUM; - - /** - * - */ - @JsonProperty("TUNE") private String TUNE; - - /** - * - */ - @JsonProperty("UFO") private String UFO; - - /** - * - */ - @JsonProperty("CYBER") private String CYBER; - - /** - * - */ - @JsonProperty("WILD") private String WILD; - - /** - * - */ - @JsonProperty("POLS") private String POLS; - - /** - * - */ - @JsonProperty("NYM") private String NYM; - - /** - * - */ - @JsonProperty("FIL") private String FIL; - - /** - * - */ - @JsonProperty("BAL") private String BAL; - - /** - * - */ - @JsonProperty("SCA") private String SCA; - - /** - * - */ - @JsonProperty("STND") private String STND; - - /** - * - */ - @JsonProperty("WMTX") private String WMTX; - - /** - * - */ - @JsonProperty("SCLP") private String SCLP; - - /** - * - */ - @JsonProperty("MANEKI") private String MANEKI; - - /** - * - */ - @JsonProperty("BAT") private String BAT; - - /** - * - */ - @JsonProperty("AKRO") private String AKRO; - - /** - * - */ - @JsonProperty("FTM3L") private String FTM3L; - - /** - * - */ - @JsonProperty("BAX") private String BAX; - - /** - * - */ - @JsonProperty("FTM3S") private String FTM3S; - - /** - * - */ - @JsonProperty("COTI") private String COTI; - - /** - * common response - */ + /** */ + @JsonProperty("AGLD") + private String AGLD; + + /** */ + @JsonProperty("DFI") + private String DFI; + + /** */ + @JsonProperty("PYTHUP") + private String PYTHUP; + + /** */ + @JsonProperty("ISLM") + private String ISLM; + + /** */ + @JsonProperty("NEAR") + private String NEAR; + + /** */ + @JsonProperty("AIOZ") + private String AIOZ; + + /** */ + @JsonProperty("AUDIO") + private String AUDIO; + + /** */ + @JsonProperty("BBL") + private String BBL; + + /** */ + @JsonProperty("WLD") + private String WLD; + + /** */ + @JsonProperty("HNT") + private String HNT; + + /** */ + @JsonProperty("ETHFI") + private String ETHFI; + + /** */ + @JsonProperty("DMAIL") + private String DMAIL; + + /** */ + @JsonProperty("OPUP") + private String OPUP; + + /** */ + @JsonProperty("VET3S") + private String VET3S; + + /** */ + @JsonProperty("MANA3S") + private String MANA3S; + + /** */ + @JsonProperty("TIDAL") + private String TIDAL; + + /** */ + @JsonProperty("HALO") + private String HALO; + + /** */ + @JsonProperty("OPUL") + private String OPUL; + + /** */ + @JsonProperty("MANA3L") + private String MANA3L; + + /** */ + @JsonProperty("DGB") + private String DGB; + + /** */ + @JsonProperty("AA") + private String AA; + + /** */ + @JsonProperty("BCH") + private String BCH; + + /** */ + @JsonProperty("GMEE") + private String GMEE; + + /** */ + @JsonProperty("JST") + private String JST; + + /** */ + @JsonProperty("PBUX") + private String PBUX; + + /** */ + @JsonProperty("AR") + private String AR; + + /** */ + @JsonProperty("SEI") + private String SEI; + + /** */ + @JsonProperty("PSTAKE") + private String PSTAKE; + + /** */ + @JsonProperty("LMWR") + private String LMWR; + + /** */ + @JsonProperty("UNFIDOWN") + private String UNFIDOWN; + + /** */ + @JsonProperty("BB") + private String BB; + + /** */ + @JsonProperty("JTO") + private String JTO; + + /** */ + @JsonProperty("WEMIX") + private String WEMIX; + + /** */ + @JsonProperty("G") + private String G; + + /** */ + @JsonProperty("MARSH") + private String MARSH; + + /** */ + @JsonProperty("BN") + private String BN; + + /** */ + @JsonProperty("FLIP") + private String FLIP; + + /** */ + @JsonProperty("FLR") + private String FLR; + + /** */ + @JsonProperty("BIGTIME") + private String BIGTIME; + + /** */ + @JsonProperty("FLY") + private String FLY; + + /** */ + @JsonProperty("T") + private String T; + + /** */ + @JsonProperty("W") + private String W; + + /** */ + @JsonProperty("BDX") + private String BDX; + + /** */ + @JsonProperty("BABYDOGE") + private String BABYDOGE; + + /** */ + @JsonProperty("SFP") + private String SFP; + + /** */ + @JsonProperty("DIA") + private String DIA; + + /** */ + @JsonProperty("ISME") + private String ISME; + + /** */ + @JsonProperty("LYM") + private String LYM; + + /** */ + @JsonProperty("VET3L") + private String VET3L; + + /** */ + @JsonProperty("JUP") + private String JUP; + + /** */ + @JsonProperty("LYX") + private String LYX; + + /** */ + @JsonProperty("AIEPK") + private String AIEPK; + + /** */ + @JsonProperty("SILLY") + private String SILLY; + + /** */ + @JsonProperty("SCPT") + private String SCPT; + + /** */ + @JsonProperty("WOO") + private String WOO; + + /** */ + @JsonProperty("BLUR") + private String BLUR; + + /** */ + @JsonProperty("STRK") + private String STRK; + + /** */ + @JsonProperty("BFC") + private String BFC; + + /** */ + @JsonProperty("DC") + private String DC; + + /** */ + @JsonProperty("KARATE") + private String KARATE; + + /** */ + @JsonProperty("SUSHI3L") + private String SUSHI3L; + + /** */ + @JsonProperty("NETVR") + private String NETVR; + + /** */ + @JsonProperty("WAVES") + private String WAVES; + + /** */ + @JsonProperty("LITH") + private String LITH; + + /** */ + @JsonProperty("HAPI") + private String HAPI; + + /** */ + @JsonProperty("SUSHI3S") + private String SUSHI3S; + + /** */ + @JsonProperty("CEEK") + private String CEEK; + + /** */ + @JsonProperty("FLOKI") + private String FLOKI; + + /** */ + @JsonProperty("SHR") + private String SHR; + + /** */ + @JsonProperty("SAND") + private String SAND; + + /** */ + @JsonProperty("TURT") + private String TURT; + + /** */ + @JsonProperty("UMA") + private String UMA; + + /** */ + @JsonProperty("BEPRO") + private String BEPRO; + + /** */ + @JsonProperty("SCRT") + private String SCRT; + + /** */ + @JsonProperty("TUSD") + private String TUSD; + + /** */ + @JsonProperty("COOKIE") + private String COOKIE; + + /** */ + @JsonProperty("LRDS") + private String LRDS; + + /** */ + @JsonProperty("SIN") + private String SIN; + + /** */ + @JsonProperty("OAS") + private String OAS; + + /** */ + @JsonProperty("ROOT") + private String ROOT; + + /** */ + @JsonProperty("ADA3L") + private String ADA3L; + + /** */ + @JsonProperty("TIAUP") + private String TIAUP; + + /** */ + @JsonProperty("HTR") + private String HTR; + + /** */ + @JsonProperty("UNB") + private String UNB; + + /** */ + @JsonProperty("UNA") + private String UNA; + + /** */ + @JsonProperty("HARD") + private String HARD; + + /** */ + @JsonProperty("G3") + private String G3; + + /** */ + @JsonProperty("ADA3S") + private String ADA3S; + + /** */ + @JsonProperty("MYRO") + private String MYRO; + + /** */ + @JsonProperty("HTX") + private String HTX; + + /** */ + @JsonProperty("FT") + private String FT; + + /** */ + @JsonProperty("BTCDOWN") + private String BTCDOWN; + + /** */ + @JsonProperty("UNI") + private String UNI; + + /** */ + @JsonProperty("FX") + private String FX; + + /** */ + @JsonProperty("OBI") + private String OBI; + + /** */ + @JsonProperty("UNO") + private String UNO; + + /** */ + @JsonProperty("WRX") + private String WRX; + + /** */ + @JsonProperty("TIADOWN") + private String TIADOWN; + + /** */ + @JsonProperty("ETHDOWN") + private String ETHDOWN; + + /** */ + @JsonProperty("WELL") + private String WELL; + + /** */ + @JsonProperty("SWFTC") + private String SWFTC; + + /** */ + @JsonProperty("SKL") + private String SKL; + + /** */ + @JsonProperty("UOS") + private String UOS; + + /** */ + @JsonProperty("AIPAD") + private String AIPAD; + + /** */ + @JsonProperty("BRETT") + private String BRETT; + + /** */ + @JsonProperty("SKY") + private String SKY; + + /** */ + @JsonProperty("FRM") + private String FRM; + + /** */ + @JsonProperty("VISION") + private String VISION; + + /** */ + @JsonProperty("LENDS") + private String LENDS; + + /** */ + @JsonProperty("SLF") + private String SLF; + + /** */ + @JsonProperty("BULL") + private String BULL; + + /** */ + @JsonProperty("FLOW") + private String FLOW; + + /** */ + @JsonProperty("ODDZ") + private String ODDZ; + + /** */ + @JsonProperty("SLN") + private String SLN; + + /** */ + @JsonProperty("UPO") + private String UPO; + + /** */ + @JsonProperty("SLP") + private String SLP; + + /** */ + @JsonProperty("ID") + private String ID; + + /** */ + @JsonProperty("SLIM") + private String SLIM; + + /** */ + @JsonProperty("SPOT") + private String SPOT; + + /** */ + @JsonProperty("DOP") + private String DOP; + + /** */ + @JsonProperty("ISSP") + private String ISSP; + + /** */ + @JsonProperty("UQC") + private String UQC; + + /** */ + @JsonProperty("IO") + private String IO; + + /** */ + @JsonProperty("DOT") + private String DOT; + + /** */ + @JsonProperty("1INCH") + private String _1INCH; + + /** */ + @JsonProperty("SMH") + private String SMH; + + /** */ + @JsonProperty("MAK") + private String MAK; + + /** */ + @JsonProperty("TOKO") + private String TOKO; + + /** */ + @JsonProperty("TURBO") + private String TURBO; + + /** */ + @JsonProperty("UNFI") + private String UNFI; + + /** */ + @JsonProperty("MAN") + private String MAN; + + /** */ + @JsonProperty("EVER") + private String EVER; + + /** */ + @JsonProperty("FTM") + private String FTM; + + /** */ + @JsonProperty("SHRAP") + private String SHRAP; + + /** */ + @JsonProperty("MAV") + private String MAV; + + /** */ + @JsonProperty("MAX") + private String MAX; + + /** */ + @JsonProperty("DPR") + private String DPR; + + /** */ + @JsonProperty("FTT") + private String FTT; + + /** */ + @JsonProperty("ARKM") + private String ARKM; + + /** */ + @JsonProperty("ATOM") + private String ATOM; + + /** */ + @JsonProperty("PENDLE") + private String PENDLE; + + /** */ + @JsonProperty("QUICK") + private String QUICK; + + /** */ + @JsonProperty("BLZ") + private String BLZ; + + /** */ + @JsonProperty("BOBA") + private String BOBA; + + /** */ + @JsonProperty("MBL") + private String MBL; + + /** */ + @JsonProperty("OFN") + private String OFN; + + /** */ + @JsonProperty("UNIO") + private String UNIO; + + /** */ + @JsonProperty("SNS") + private String SNS; + + /** */ + @JsonProperty("SNX") + private String SNX; + + /** */ + @JsonProperty("NXRA") + private String NXRA; + + /** */ + @JsonProperty("TAIKO") + private String TAIKO; + + /** */ + @JsonProperty("AVAX3L") + private String AVAX3L; + + /** */ + @JsonProperty("L3") + private String L3; + + /** */ + @JsonProperty("API3") + private String API3; + + /** */ + @JsonProperty("XRP3S") + private String XRP3S; + + /** */ + @JsonProperty("QKC") + private String QKC; + + /** */ + @JsonProperty("AVAX3S") + private String AVAX3S; + + /** */ + @JsonProperty("ROSE") + private String ROSE; + + /** */ + @JsonProperty("SATS") + private String SATS; + + /** */ + @JsonProperty("BMX") + private String BMX; + + /** */ + @JsonProperty("PORTAL") + private String PORTAL; + + /** */ + @JsonProperty("TOMI") + private String TOMI; + + /** */ + @JsonProperty("XRP3L") + private String XRP3L; + + /** */ + @JsonProperty("SOL") + private String SOL; + + /** */ + @JsonProperty("SON") + private String SON; + + /** */ + @JsonProperty("BNC") + private String BNC; + + /** */ + @JsonProperty("SOCIAL") + private String SOCIAL; + + /** */ + @JsonProperty("CGPT") + private String CGPT; + + /** */ + @JsonProperty("CELR") + private String CELR; + + /** */ + @JsonProperty("BNB") + private String BNB; + + /** */ + @JsonProperty("OGN") + private String OGN; + + /** */ + @JsonProperty("CELO") + private String CELO; + + /** */ + @JsonProperty("AUCTION") + private String AUCTION; + + /** */ + @JsonProperty("MANTA") + private String MANTA; + + /** */ + @JsonProperty("LAYER") + private String LAYER; + + /** */ + @JsonProperty("AERO") + private String AERO; + + /** */ + @JsonProperty("CETUS") + private String CETUS; + + /** */ + @JsonProperty("LL") + private String LL; + + /** */ + @JsonProperty("SPA") + private String SPA; + + /** */ + @JsonProperty("PYTHDOWN") + private String PYTHDOWN; + + /** */ + @JsonProperty("NEIROCTO") + private String NEIROCTO; + + /** */ + @JsonProperty("UTK") + private String UTK; + + /** */ + @JsonProperty("GMRX") + private String GMRX; + + /** */ + @JsonProperty("BOB") + private String BOB; + + /** */ + @JsonProperty("HOTCROSS") + private String HOTCROSS; + + /** */ + @JsonProperty("AERGO") + private String AERGO; + + /** */ + @JsonProperty("MOCA") + private String MOCA; + + /** */ + @JsonProperty("SQD") + private String SQD; + + /** */ + @JsonProperty("MV") + private String MV; + + /** */ + @JsonProperty("BNB3L") + private String BNB3L; + + /** */ + @JsonProperty("BNB3S") + private String BNB3S; + + /** */ + @JsonProperty("GALAX3L") + private String GALAX3L; + + /** */ + @JsonProperty("KAI") + private String KAI; + + /** */ + @JsonProperty("SQR") + private String SQR; + + /** */ + @JsonProperty("GALAX3S") + private String GALAX3S; + + /** */ + @JsonProperty("EGLD") + private String EGLD; + + /** */ + @JsonProperty("ZBCN") + private String ZBCN; + + /** */ + @JsonProperty("KAS") + private String KAS; + + /** */ + @JsonProperty("MEW") + private String MEW; + + /** */ + @JsonProperty("PUNDIX") + private String PUNDIX; + + /** */ + @JsonProperty("LOOKS") + private String LOOKS; + + /** */ + @JsonProperty("FXS") + private String FXS; + + /** */ + @JsonProperty("BOSON") + private String BOSON; + + /** */ + @JsonProperty("BRISE") + private String BRISE; + + /** */ + @JsonProperty("AEVO") + private String AEVO; + + /** */ + @JsonProperty("FLUX") + private String FLUX; + + /** */ + @JsonProperty("PRCL") + private String PRCL; + + /** */ + @JsonProperty("UNFIUP") + private String UNFIUP; + + /** */ + @JsonProperty("SEIDOWN") + private String SEIDOWN; + + /** */ + @JsonProperty("DOAI") + private String DOAI; + + /** */ + @JsonProperty("QNT") + private String QNT; + + /** */ + @JsonProperty("REDO") + private String REDO; + + /** */ + @JsonProperty("STRIKE") + private String STRIKE; + + /** */ + @JsonProperty("ETHW") + private String ETHW; + + /** */ + @JsonProperty("OM") + private String OM; + + /** */ + @JsonProperty("OP") + private String OP; + + /** */ + @JsonProperty("WHALE") + private String WHALE; + + /** */ + @JsonProperty("1CAT") + private String _1CAT; + + /** */ + @JsonProperty("NEON") + private String NEON; + + /** */ + @JsonProperty("GTAI") + private String GTAI; + + /** */ + @JsonProperty("SSV") + private String SSV; + + /** */ + @JsonProperty("ETH2") + private String ETH2; + + /** */ + @JsonProperty("KCS") + private String KCS; + + /** */ + @JsonProperty("ARPA") + private String ARPA; + + /** */ + @JsonProperty("ARTFI") + private String ARTFI; + + /** */ + @JsonProperty("BRL") + private String BRL; + + /** */ + @JsonProperty("ALEX") + private String ALEX; + + /** */ + @JsonProperty("STG") + private String STG; + + /** */ + @JsonProperty("SHIB") + private String SHIB; + + /** */ + @JsonProperty("IOTX") + private String IOTX; + + /** */ + @JsonProperty("OLE") + private String OLE; + + /** */ + @JsonProperty("KDA") + private String KDA; + + /** */ + @JsonProperty("CERE") + private String CERE; + + /** */ + @JsonProperty("DOCK") + private String DOCK; + + /** */ + @JsonProperty("STX") + private String STX; + + /** */ + @JsonProperty("OLT") + private String OLT; + + /** */ + @JsonProperty("QI") + private String QI; + + /** */ + @JsonProperty("SDAO") + private String SDAO; + + /** */ + @JsonProperty("BLAST") + private String BLAST; + + /** */ + @JsonProperty("LINK3S") + private String LINK3S; + + /** */ + @JsonProperty("IOST") + private String IOST; + + /** */ + @JsonProperty("SUI") + private String SUI; + + /** */ + @JsonProperty("CAKE") + private String CAKE; + + /** */ + @JsonProperty("BSW") + private String BSW; + + /** */ + @JsonProperty("OMG") + private String OMG; + + /** */ + @JsonProperty("VOLT") + private String VOLT; + + /** */ + @JsonProperty("LINK3L") + private String LINK3L; + + /** */ + @JsonProperty("GEEQ") + private String GEEQ; + + /** */ + @JsonProperty("PYUSD") + private String PYUSD; + + /** */ + @JsonProperty("SUN") + private String SUN; + + /** */ + @JsonProperty("TOWER") + private String TOWER; + + /** */ + @JsonProperty("BTC") + private String BTC; + + /** */ + @JsonProperty("IOTA") + private String IOTA; + + /** */ + @JsonProperty("REEF") + private String REEF; + + /** */ + @JsonProperty("TRIAS") + private String TRIAS; + + /** */ + @JsonProperty("KEY") + private String KEY; + + /** */ + @JsonProperty("ETH3L") + private String ETH3L; + + /** */ + @JsonProperty("BTT") + private String BTT; + + /** */ + @JsonProperty("ONE") + private String ONE; + + /** */ + @JsonProperty("RENDER") + private String RENDER; + + /** */ + @JsonProperty("ETH3S") + private String ETH3S; + + /** */ + @JsonProperty("ANKR") + private String ANKR; + + /** */ + @JsonProperty("ALGO") + private String ALGO; + + /** */ + @JsonProperty("SYLO") + private String SYLO; + + /** */ + @JsonProperty("ZCX") + private String ZCX; + + /** */ + @JsonProperty("SD") + private String SD; + + /** */ + @JsonProperty("ONT") + private String ONT; + + /** */ + @JsonProperty("MJT") + private String MJT; + + /** */ + @JsonProperty("DYM") + private String DYM; + + /** */ + @JsonProperty("DYP") + private String DYP; + + /** */ + @JsonProperty("BAKEUP") + private String BAKEUP; + + /** */ + @JsonProperty("OOE") + private String OOE; + + /** */ + @JsonProperty("ZELIX") + private String ZELIX; + + /** */ + @JsonProperty("DOGE3L") + private String DOGE3L; + + /** */ + @JsonProperty("ARTY") + private String ARTY; + + /** */ + @JsonProperty("QORPO") + private String QORPO; + + /** */ + @JsonProperty("ICE") + private String ICE; + + /** */ + @JsonProperty("NOTAI") + private String NOTAI; + + /** */ + @JsonProperty("DOGE3S") + private String DOGE3S; + + /** */ + @JsonProperty("NAKA") + private String NAKA; + + /** */ + @JsonProperty("GALAX") + private String GALAX; + + /** */ + @JsonProperty("MKR") + private String MKR; + + /** */ + @JsonProperty("DODO") + private String DODO; + + /** */ + @JsonProperty("ICP") + private String ICP; + + /** */ + @JsonProperty("ZEC") + private String ZEC; + + /** */ + @JsonProperty("ZEE") + private String ZEE; + + /** */ + @JsonProperty("ICX") + private String ICX; + + /** */ + @JsonProperty("KMNO") + private String KMNO; + + /** */ + @JsonProperty("TT") + private String TT; + + /** */ + @JsonProperty("DOT3L") + private String DOT3L; + + /** */ + @JsonProperty("XAI") + private String XAI; + + /** */ + @JsonProperty("ZEN") + private String ZEN; + + /** */ + @JsonProperty("DOGE") + private String DOGE; + + /** */ + @JsonProperty("ALPHA") + private String ALPHA; + + /** */ + @JsonProperty("DUSK") + private String DUSK; + + /** */ + @JsonProperty("DOT3S") + private String DOT3S; + + /** */ + @JsonProperty("SXP") + private String SXP; + + /** */ + @JsonProperty("HBAR") + private String HBAR; + + /** */ + @JsonProperty("SYNT") + private String SYNT; + + /** */ + @JsonProperty("ZEX") + private String ZEX; + + /** */ + @JsonProperty("BONDLY") + private String BONDLY; + + /** */ + @JsonProperty("MLK") + private String MLK; + + /** */ + @JsonProperty("KICKS") + private String KICKS; + + /** */ + @JsonProperty("PEPE") + private String PEPE; + + /** */ + @JsonProperty("OUSD") + private String OUSD; + + /** */ + @JsonProperty("LUNCDOWN") + private String LUNCDOWN; + + /** */ + @JsonProperty("DOGS") + private String DOGS; + + /** */ + @JsonProperty("REV3L") + private String REV3L; + + /** */ + @JsonProperty("CTSI") + private String CTSI; + + /** */ + @JsonProperty("C98") + private String C98; + + /** */ + @JsonProperty("OSMO") + private String OSMO; + + /** */ + @JsonProperty("NTRN") + private String NTRN; + + /** */ + @JsonProperty("CFX2S") + private String CFX2S; + + /** */ + @JsonProperty("SYN") + private String SYN; + + /** */ + @JsonProperty("VIDT") + private String VIDT; + + /** */ + @JsonProperty("SYS") + private String SYS; + + /** */ + @JsonProperty("GAS") + private String GAS; + + /** */ + @JsonProperty("BOME") + private String BOME; + + /** */ + @JsonProperty("COMBO") + private String COMBO; + + /** */ + @JsonProperty("XCH") + private String XCH; + + /** */ + @JsonProperty("VR") + private String VR; + + /** */ + @JsonProperty("CFX2L") + private String CFX2L; + + /** */ + @JsonProperty("VSYS") + private String VSYS; + + /** */ + @JsonProperty("PANDORA") + private String PANDORA; + + /** */ + @JsonProperty("THETA") + private String THETA; + + /** */ + @JsonProperty("XCN") + private String XCN; + + /** */ + @JsonProperty("NEXG") + private String NEXG; + + /** */ + @JsonProperty("MELOS") + private String MELOS; + + /** */ + @JsonProperty("XCV") + private String XCV; + + /** */ + @JsonProperty("ORN") + private String ORN; + + /** */ + @JsonProperty("WLKN") + private String WLKN; + + /** */ + @JsonProperty("AAVE") + private String AAVE; + + /** */ + @JsonProperty("MNT") + private String MNT; + + /** */ + @JsonProperty("BONK") + private String BONK; + + /** */ + @JsonProperty("PERP") + private String PERP; + + /** */ + @JsonProperty("XDC") + private String XDC; + + /** */ + @JsonProperty("MNW") + private String MNW; + + /** */ + @JsonProperty("XDB") + private String XDB; + + /** */ + @JsonProperty("BOND") + private String BOND; + + /** */ + @JsonProperty("SUIA") + private String SUIA; + + /** */ + @JsonProperty("MOG") + private String MOG; + + /** */ + @JsonProperty("SUTER") + private String SUTER; + + /** */ + @JsonProperty("TIME") + private String TIME; + + /** */ + @JsonProperty("RACA") + private String RACA; + + /** */ + @JsonProperty("BICO") + private String BICO; + + /** */ + @JsonProperty("MON") + private String MON; + + /** */ + @JsonProperty("SWEAT") + private String SWEAT; + + /** */ + @JsonProperty("MOXIE") + private String MOXIE; + + /** */ + @JsonProperty("BABYBNB") + private String BABYBNB; + + /** */ + @JsonProperty("IGU") + private String IGU; + + /** */ + @JsonProperty("HMSTR") + private String HMSTR; + + /** */ + @JsonProperty("XEC") + private String XEC; + + /** */ + @JsonProperty("MONI") + private String MONI; + + /** */ + @JsonProperty("XR") + private String XR; + + /** */ + @JsonProperty("PEOPLE") + private String PEOPLE; + + /** */ + @JsonProperty("PUMLX") + private String PUMLX; + + /** */ + @JsonProperty("ZIL") + private String ZIL; + + /** */ + @JsonProperty("WLDDOWN") + private String WLDDOWN; + + /** */ + @JsonProperty("VAI") + private String VAI; + + /** */ + @JsonProperty("XEN") + private String XEN; + + /** */ + @JsonProperty("MPC") + private String MPC; + + /** */ + @JsonProperty("XEM") + private String XEM; + + /** */ + @JsonProperty("JASMY3S") + private String JASMY3S; + + /** */ + @JsonProperty("OTK") + private String OTK; + + /** */ + @JsonProperty("TRAC") + private String TRAC; + + /** */ + @JsonProperty("DFYN") + private String DFYN; + + /** */ + @JsonProperty("BIDP") + private String BIDP; + + /** */ + @JsonProperty("JASMY3L") + private String JASMY3L; + + /** */ + @JsonProperty("INJDOWN") + private String INJDOWN; + + /** */ + @JsonProperty("KLV") + private String KLV; + + /** */ + @JsonProperty("WAXL") + private String WAXL; + + /** */ + @JsonProperty("TRBDOWN") + private String TRBDOWN; + + /** */ + @JsonProperty("BCH3L") + private String BCH3L; + + /** */ + @JsonProperty("GMT3S") + private String GMT3S; + + /** */ + @JsonProperty("KMD") + private String KMD; + + /** */ + @JsonProperty("BCH3S") + private String BCH3S; + + /** */ + @JsonProperty("ECOX") + private String ECOX; + + /** */ + @JsonProperty("AAVE3S") + private String AAVE3S; + + /** */ + @JsonProperty("GMT3L") + private String GMT3L; + + /** */ + @JsonProperty("EPIK") + private String EPIK; + + /** */ + @JsonProperty("SUIP") + private String SUIP; + + /** */ + @JsonProperty("AAVE3L") + private String AAVE3L; + + /** */ + @JsonProperty("ZK") + private String ZK; + + /** */ + @JsonProperty("ZKF") + private String ZKF; + + /** */ + @JsonProperty("OMNIA") + private String OMNIA; + + /** */ + @JsonProperty("ZKJ") + private String ZKJ; + + /** */ + @JsonProperty("ZKL") + private String ZKL; + + /** */ + @JsonProperty("GAFI") + private String GAFI; + + /** */ + @JsonProperty("CARV") + private String CARV; + + /** */ + @JsonProperty("KNC") + private String KNC; + + /** */ + @JsonProperty("CATS") + private String CATS; + + /** */ + @JsonProperty("PROM") + private String PROM; + + /** */ + @JsonProperty("ALEPH") + private String ALEPH; + + /** */ + @JsonProperty("PONKE") + private String PONKE; + + /** */ + @JsonProperty("OVR") + private String OVR; + + /** */ + @JsonProperty("CATI") + private String CATI; + + /** */ + @JsonProperty("ORDER") + private String ORDER; + + /** */ + @JsonProperty("GFT") + private String GFT; + + /** */ + @JsonProperty("BIFI") + private String BIFI; + + /** */ + @JsonProperty("GGC") + private String GGC; + + /** */ + @JsonProperty("GGG") + private String GGG; + + /** */ + @JsonProperty("DAPPX") + private String DAPPX; + + /** */ + @JsonProperty("SUKU") + private String SUKU; + + /** */ + @JsonProperty("ULTI") + private String ULTI; + + /** */ + @JsonProperty("CREDI") + private String CREDI; + + /** */ + @JsonProperty("ERTHA") + private String ERTHA; + + /** */ + @JsonProperty("FURY") + private String FURY; + + /** */ + @JsonProperty("KARRAT") + private String KARRAT; + + /** */ + @JsonProperty("MOBILE") + private String MOBILE; + + /** */ + @JsonProperty("SIDUS") + private String SIDUS; + + /** */ + @JsonProperty("NAVI") + private String NAVI; + + /** */ + @JsonProperty("TAO") + private String TAO; + + /** */ + @JsonProperty("USDJ") + private String USDJ; + + /** */ + @JsonProperty("MTL") + private String MTL; + + /** */ + @JsonProperty("VET") + private String VET; + + /** */ + @JsonProperty("FITFI") + private String FITFI; + + /** */ + @JsonProperty("USDT") + private String USDT; + + /** */ + @JsonProperty("OXT") + private String OXT; + + /** */ + @JsonProperty("CANDY") + private String CANDY; + + /** */ + @JsonProperty("USDP") + private String USDP; + + /** */ + @JsonProperty("MTS") + private String MTS; + + /** */ + @JsonProperty("TADA") + private String TADA; + + /** */ + @JsonProperty("MTV") + private String MTV; + + /** */ + @JsonProperty("NAVX") + private String NAVX; + + /** */ + @JsonProperty("ILV") + private String ILV; + + /** */ + @JsonProperty("VINU") + private String VINU; + + /** */ + @JsonProperty("GHX") + private String GHX; + + /** */ + @JsonProperty("EDU") + private String EDU; + + /** */ + @JsonProperty("HYVE") + private String HYVE; + + /** */ + @JsonProperty("BTC3L") + private String BTC3L; + + /** */ + @JsonProperty("ANYONE") + private String ANYONE; + + /** */ + @JsonProperty("BEAT") + private String BEAT; + + /** */ + @JsonProperty("KING") + private String KING; + + /** */ + @JsonProperty("CREAM") + private String CREAM; + + /** */ + @JsonProperty("CAS") + private String CAS; + + /** */ + @JsonProperty("IMX") + private String IMX; + + /** */ + @JsonProperty("CAT") + private String CAT; + + /** */ + @JsonProperty("BTC3S") + private String BTC3S; + + /** */ + @JsonProperty("USDE") + private String USDE; + + /** */ + @JsonProperty("USDD") + private String USDD; + + /** */ + @JsonProperty("CWAR") + private String CWAR; + + /** */ + @JsonProperty("USDC") + private String USDC; + + /** */ + @JsonProperty("KRL") + private String KRL; + + /** */ + @JsonProperty("INJ") + private String INJ; + + /** */ + @JsonProperty("GAME") + private String GAME; + + /** */ + @JsonProperty("TRIBL") + private String TRIBL; + + /** */ + @JsonProperty("XLM") + private String XLM; + + /** */ + @JsonProperty("TRBUP") + private String TRBUP; + + /** */ + @JsonProperty("VRADOWN") + private String VRADOWN; + + /** */ + @JsonProperty("SUPER") + private String SUPER; + + /** */ + @JsonProperty("EIGEN") + private String EIGEN; + + /** */ + @JsonProperty("IOI") + private String IOI; + + /** */ + @JsonProperty("KSM") + private String KSM; + + /** */ + @JsonProperty("CCD") + private String CCD; + + /** */ + @JsonProperty("EGO") + private String EGO; + + /** */ + @JsonProperty("EGP") + private String EGP; + + /** */ + @JsonProperty("MXC") + private String MXC; + + /** */ + @JsonProperty("TEL") + private String TEL; + + /** */ + @JsonProperty("MOVR") + private String MOVR; + + /** */ + @JsonProperty("XMR") + private String XMR; + + /** */ + @JsonProperty("MXM") + private String MXM; + + /** */ + @JsonProperty("OORT") + private String OORT; + + /** */ + @JsonProperty("GLM") + private String GLM; + + /** */ + @JsonProperty("RAY") + private String RAY; + + /** */ + @JsonProperty("XTAG") + private String XTAG; + + /** */ + @JsonProperty("GLQ") + private String GLQ; + + /** */ + @JsonProperty("CWEB") + private String CWEB; + + /** */ + @JsonProperty("REVU") + private String REVU; + + /** */ + @JsonProperty("REVV") + private String REVV; + + /** */ + @JsonProperty("ZRO") + private String ZRO; + + /** */ + @JsonProperty("XNL") + private String XNL; + + /** */ + @JsonProperty("XNO") + private String XNO; + + /** */ + @JsonProperty("SAROS") + private String SAROS; + + /** */ + @JsonProperty("KACE") + private String KACE; + + /** */ + @JsonProperty("ZRX") + private String ZRX; + + /** */ + @JsonProperty("WLTH") + private String WLTH; + + /** */ + @JsonProperty("ATOM3L") + private String ATOM3L; + + /** */ + @JsonProperty("GMM") + private String GMM; + + /** */ + @JsonProperty("BEER") + private String BEER; + + /** */ + @JsonProperty("GMT") + private String GMT; + + /** */ + @JsonProperty("HEART") + private String HEART; + + /** */ + @JsonProperty("GMX") + private String GMX; + + /** */ + @JsonProperty("ABBC") + private String ABBC; + + /** */ + @JsonProperty("OMNI") + private String OMNI; + + /** */ + @JsonProperty("ATOM3S") + private String ATOM3S; + + /** */ + @JsonProperty("IRL") + private String IRL; + + /** */ + @JsonProperty("CFG") + private String CFG; + + /** */ + @JsonProperty("WSDM") + private String WSDM; + + /** */ + @JsonProperty("GNS") + private String GNS; + + /** */ + @JsonProperty("VANRY") + private String VANRY; + + /** */ + @JsonProperty("CFX") + private String CFX; + + /** */ + @JsonProperty("GRAIL") + private String GRAIL; + + /** */ + @JsonProperty("BEFI") + private String BEFI; + + /** */ + @JsonProperty("VELO") + private String VELO; + + /** */ + @JsonProperty("XPR") + private String XPR; + + /** */ + @JsonProperty("DOVI") + private String DOVI; + + /** */ + @JsonProperty("ACE") + private String ACE; + + /** */ + @JsonProperty("ACH") + private String ACH; + + /** */ + @JsonProperty("ISP") + private String ISP; + + /** */ + @JsonProperty("XCAD") + private String XCAD; + + /** */ + @JsonProperty("MINA") + private String MINA; + + /** */ + @JsonProperty("TIA") + private String TIA; + + /** */ + @JsonProperty("DRIFT") + private String DRIFT; + + /** */ + @JsonProperty("ACQ") + private String ACQ; + + /** */ + @JsonProperty("ACS") + private String ACS; + + /** */ + @JsonProperty("MIND") + private String MIND; + + /** */ + @JsonProperty("STORE") + private String STORE; + + /** */ + @JsonProperty("REN") + private String REN; + + /** */ + @JsonProperty("ELA") + private String ELA; + + /** */ + @JsonProperty("DREAMS") + private String DREAMS; + + /** */ + @JsonProperty("ADA") + private String ADA; + + /** */ + @JsonProperty("ELF") + private String ELF; + + /** */ + @JsonProperty("REQ") + private String REQ; + + /** */ + @JsonProperty("STORJ") + private String STORJ; + + /** */ + @JsonProperty("LADYS") + private String LADYS; + + /** */ + @JsonProperty("PAXG") + private String PAXG; + + /** */ + @JsonProperty("REZ") + private String REZ; + + /** */ + @JsonProperty("XRD") + private String XRD; + + /** */ + @JsonProperty("CHO") + private String CHO; + + /** */ + @JsonProperty("CHR") + private String CHR; + + /** */ + @JsonProperty("ADS") + private String ADS; + + /** */ + @JsonProperty("CHZ") + private String CHZ; + + /** */ + @JsonProperty("ADX") + private String ADX; + + /** */ + @JsonProperty("XRP") + private String XRP; + + /** */ + @JsonProperty("JASMY") + private String JASMY; + + /** */ + @JsonProperty("KAGI") + private String KAGI; + + /** */ + @JsonProperty("FIDA") + private String FIDA; + + /** */ + @JsonProperty("PBR") + private String PBR; + + /** */ + @JsonProperty("AEG") + private String AEG; + + /** */ + @JsonProperty("H2O") + private String H2O; + + /** */ + @JsonProperty("CHMB") + private String CHMB; + + /** */ + @JsonProperty("SAND3L") + private String SAND3L; + + /** */ + @JsonProperty("PBX") + private String PBX; + + /** */ + @JsonProperty("SOLVE") + private String SOLVE; + + /** */ + @JsonProperty("DECHAT") + private String DECHAT; + + /** */ + @JsonProperty("GARI") + private String GARI; + + /** */ + @JsonProperty("SHIB2L") + private String SHIB2L; + + /** */ + @JsonProperty("SHIB2S") + private String SHIB2S; + + /** */ + @JsonProperty("ENA") + private String ENA; + + /** */ + @JsonProperty("VEMP") + private String VEMP; + + /** */ + @JsonProperty("ENJ") + private String ENJ; + + /** */ + @JsonProperty("AFG") + private String AFG; + + /** */ + @JsonProperty("RATS") + private String RATS; + + /** */ + @JsonProperty("GRT") + private String GRT; + + /** */ + @JsonProperty("FORWARD") + private String FORWARD; + + /** */ + @JsonProperty("TFUEL") + private String TFUEL; + + /** */ + @JsonProperty("ENS") + private String ENS; + + /** */ + @JsonProperty("KASDOWN") + private String KASDOWN; + + /** */ + @JsonProperty("XTM") + private String XTM; + + /** */ + @JsonProperty("DEGEN") + private String DEGEN; + + /** */ + @JsonProperty("TLM") + private String TLM; + + /** */ + @JsonProperty("DYDXDOWN") + private String DYDXDOWN; + + /** */ + @JsonProperty("CKB") + private String CKB; + + /** */ + @JsonProperty("LUNC") + private String LUNC; + + /** */ + @JsonProperty("AURORA") + private String AURORA; + + /** */ + @JsonProperty("LUNA") + private String LUNA; + + /** */ + @JsonProperty("XTZ") + private String XTZ; + + /** */ + @JsonProperty("ELON") + private String ELON; + + /** */ + @JsonProperty("DMTR") + private String DMTR; + + /** */ + @JsonProperty("EOS") + private String EOS; + + /** */ + @JsonProperty("GST") + private String GST; + + /** */ + @JsonProperty("FORT") + private String FORT; + + /** */ + @JsonProperty("FLAME") + private String FLAME; + + /** */ + @JsonProperty("PATEX") + private String PATEX; + + /** */ + @JsonProperty("DEEP") + private String DEEP; + + /** */ + @JsonProperty("ID3L") + private String ID3L; + + /** */ + @JsonProperty("GTC") + private String GTC; + + /** */ + @JsonProperty("ID3S") + private String ID3S; + + /** */ + @JsonProperty("RIO") + private String RIO; + + /** */ + @JsonProperty("CLH") + private String CLH; + + /** */ + @JsonProperty("BURGER") + private String BURGER; + + /** */ + @JsonProperty("VRA") + private String VRA; + + /** */ + @JsonProperty("SUNDOG") + private String SUNDOG; + + /** */ + @JsonProperty("GTT") + private String GTT; + + /** */ + @JsonProperty("INJUP") + private String INJUP; + + /** */ + @JsonProperty("CPOOL") + private String CPOOL; + + /** */ + @JsonProperty("EPX") + private String EPX; + + /** */ + @JsonProperty("CLV") + private String CLV; + + /** */ + @JsonProperty("FEAR") + private String FEAR; + + /** */ + @JsonProperty("MEME") + private String MEME; + + /** */ + @JsonProperty("ROOBEE") + private String ROOBEE; + + /** */ + @JsonProperty("DEFI") + private String DEFI; + + /** */ + @JsonProperty("TOKEN") + private String TOKEN; + + /** */ + @JsonProperty("GRAPE") + private String GRAPE; + + /** */ + @JsonProperty("KASUP") + private String KASUP; + + /** */ + @JsonProperty("XWG") + private String XWG; + + /** */ + @JsonProperty("SKEY") + private String SKEY; + + /** */ + @JsonProperty("SFUND") + private String SFUND; + + /** */ + @JsonProperty("EQX") + private String EQX; + + /** */ + @JsonProperty("ORDIUP") + private String ORDIUP; + + /** */ + @JsonProperty("TON") + private String TON; + + /** */ + @JsonProperty("DEGO") + private String DEGO; + + /** */ + @JsonProperty("IZI") + private String IZI; + + /** */ + @JsonProperty("ERG") + private String ERG; + + /** */ + @JsonProperty("ERN") + private String ERN; + + /** */ + @JsonProperty("VENOM") + private String VENOM; + + /** */ + @JsonProperty("VOXEL") + private String VOXEL; + + /** */ + @JsonProperty("RLC") + private String RLC; + + /** */ + @JsonProperty("PHA") + private String PHA; + + /** */ + @JsonProperty("DYDXUP") + private String DYDXUP; + + /** */ + @JsonProperty("APE3S") + private String APE3S; + + /** */ + @JsonProperty("ORBS") + private String ORBS; + + /** */ + @JsonProperty("OPDOWN") + private String OPDOWN; + + /** */ + @JsonProperty("ESE") + private String ESE; + + /** */ + @JsonProperty("APE3L") + private String APE3L; + + /** */ + @JsonProperty("HMND") + private String HMND; + + /** */ + @JsonProperty("COQ") + private String COQ; + + /** */ + @JsonProperty("AURY") + private String AURY; + + /** */ + @JsonProperty("CULT") + private String CULT; + + /** */ + @JsonProperty("AKT") + private String AKT; + + /** */ + @JsonProperty("GLMR") + private String GLMR; + + /** */ + @JsonProperty("XYM") + private String XYM; + + /** */ + @JsonProperty("ORAI") + private String ORAI; + + /** */ + @JsonProperty("XYO") + private String XYO; + + /** */ + @JsonProperty("ETC") + private String ETC; + + /** */ + @JsonProperty("LAI") + private String LAI; + + /** */ + @JsonProperty("PIP") + private String PIP; + + /** */ + @JsonProperty("ETH") + private String ETH; + + /** */ + @JsonProperty("NEO") + private String NEO; + + /** */ + @JsonProperty("RMV") + private String RMV; + + /** */ + @JsonProperty("KLAY") + private String KLAY; + + /** */ + @JsonProperty("PIT") + private String PIT; + + /** */ + @JsonProperty("TARA") + private String TARA; + + /** */ + @JsonProperty("KALT") + private String KALT; + + /** */ + @JsonProperty("PIX") + private String PIX; + + /** */ + @JsonProperty("ETN") + private String ETN; + + /** */ + @JsonProperty("CSIX") + private String CSIX; + + /** */ + @JsonProperty("TRADE") + private String TRADE; + + /** */ + @JsonProperty("MAVIA") + private String MAVIA; + + /** */ + @JsonProperty("HIGH") + private String HIGH; + + /** */ + @JsonProperty("TRB") + private String TRB; + + /** */ + @JsonProperty("ORDI") + private String ORDI; + + /** */ + @JsonProperty("TRVL") + private String TRVL; + + /** */ + @JsonProperty("AMB") + private String AMB; + + /** */ + @JsonProperty("TRU") + private String TRU; + + /** */ + @JsonProperty("LOGX") + private String LOGX; + + /** */ + @JsonProperty("FINC") + private String FINC; + + /** */ + @JsonProperty("INFRA") + private String INFRA; + + /** */ + @JsonProperty("NATIX") + private String NATIX; + + /** */ + @JsonProperty("NFP") + private String NFP; + + /** */ + @JsonProperty("TRY") + private String TRY; + + /** */ + @JsonProperty("TRX") + private String TRX; + + /** */ + @JsonProperty("LBP") + private String LBP; + + /** */ + @JsonProperty("LBR") + private String LBR; + + /** */ + @JsonProperty("EUL") + private String EUL; + + /** */ + @JsonProperty("NFT") + private String NFT; + + /** */ + @JsonProperty("SEIUP") + private String SEIUP; + + /** */ + @JsonProperty("PUFFER") + private String PUFFER; + + /** */ + @JsonProperty("EUR") + private String EUR; + + /** */ + @JsonProperty("ORCA") + private String ORCA; + + /** */ + @JsonProperty("NEAR3L") + private String NEAR3L; + + /** */ + @JsonProperty("AMP") + private String AMP; + + /** */ + @JsonProperty("XDEFI") + private String XDEFI; + + /** */ + @JsonProperty("HIFI") + private String HIFI; + + /** */ + @JsonProperty("TRUF") + private String TRUF; + + /** */ + @JsonProperty("AITECH") + private String AITECH; + + /** */ + @JsonProperty("AMU") + private String AMU; + + /** */ + @JsonProperty("USTC") + private String USTC; + + /** */ + @JsonProperty("KNGL") + private String KNGL; + + /** */ + @JsonProperty("FOXY") + private String FOXY; + + /** */ + @JsonProperty("NGC") + private String NGC; + + /** */ + @JsonProperty("TENET") + private String TENET; + + /** */ + @JsonProperty("NEAR3S") + private String NEAR3S; + + /** */ + @JsonProperty("MAHA") + private String MAHA; + + /** */ + @JsonProperty("NGL") + private String NGL; + + /** */ + @JsonProperty("TST") + private String TST; + + /** */ + @JsonProperty("HIPPO") + private String HIPPO; + + /** */ + @JsonProperty("AXS3S") + private String AXS3S; + + /** */ + @JsonProperty("CRO") + private String CRO; + + /** */ + @JsonProperty("ZPAY") + private String ZPAY; + + /** */ + @JsonProperty("MNDE") + private String MNDE; + + /** */ + @JsonProperty("CRV") + private String CRV; + + /** */ + @JsonProperty("SWASH") + private String SWASH; + + /** */ + @JsonProperty("AXS3L") + private String AXS3L; + + /** */ + @JsonProperty("VERSE") + private String VERSE; + + /** */ + @JsonProperty("RPK") + private String RPK; + + /** */ + @JsonProperty("RPL") + private String RPL; + + /** */ + @JsonProperty("AZERO") + private String AZERO; + + /** */ + @JsonProperty("SOUL") + private String SOUL; + + /** */ + @JsonProperty("VXV") + private String VXV; + + /** */ + @JsonProperty("LDO") + private String LDO; + + /** */ + @JsonProperty("MAGIC") + private String MAGIC; + + /** */ + @JsonProperty("ALICE") + private String ALICE; + + /** */ + @JsonProperty("SEAM") + private String SEAM; + + /** */ + @JsonProperty("PLU") + private String PLU; + + /** */ + @JsonProperty("AOG") + private String AOG; + + /** */ + @JsonProperty("SMOLE") + private String SMOLE; + + /** */ + @JsonProperty("EWT") + private String EWT; + + /** */ + @JsonProperty("TSUGT") + private String TSUGT; + + /** */ + @JsonProperty("PMG") + private String PMG; + + /** */ + @JsonProperty("OPAI") + private String OPAI; + + /** */ + @JsonProperty("LOCUS") + private String LOCUS; + + /** */ + @JsonProperty("CTA") + private String CTA; + + /** */ + @JsonProperty("NIM") + private String NIM; + + /** */ + @JsonProperty("CTC") + private String CTC; + + /** */ + @JsonProperty("APE") + private String APE; + + /** */ + @JsonProperty("MERL") + private String MERL; + + /** */ + @JsonProperty("JAM") + private String JAM; + + /** */ + @JsonProperty("CTI") + private String CTI; + + /** */ + @JsonProperty("APP") + private String APP; + + /** */ + @JsonProperty("APT") + private String APT; + + /** */ + @JsonProperty("WLDUP") + private String WLDUP; + + /** */ + @JsonProperty("ZEND") + private String ZEND; + + /** */ + @JsonProperty("FIRE") + private String FIRE; + + /** */ + @JsonProperty("DENT") + private String DENT; + + /** */ + @JsonProperty("PYTH") + private String PYTH; + + /** */ + @JsonProperty("LFT") + private String LFT; + + /** */ + @JsonProperty("DPET") + private String DPET; + + /** */ + @JsonProperty("ORDIDOWN") + private String ORDIDOWN; + + /** */ + @JsonProperty("KPOL") + private String KPOL; + + /** */ + @JsonProperty("ETHUP") + private String ETHUP; + + /** */ + @JsonProperty("BAND") + private String BAND; + + /** */ + @JsonProperty("POL") + private String POL; + + /** */ + @JsonProperty("ASTR") + private String ASTR; + + /** */ + @JsonProperty("NKN") + private String NKN; + + /** */ + @JsonProperty("RSR") + private String RSR; + + /** */ + @JsonProperty("DVPN") + private String DVPN; + + /** */ + @JsonProperty("TWT") + private String TWT; + + /** */ + @JsonProperty("ARB") + private String ARB; + + /** */ + @JsonProperty("CVC") + private String CVC; + + /** */ + @JsonProperty("ARC") + private String ARC; + + /** */ + @JsonProperty("XETA") + private String XETA; + + /** */ + @JsonProperty("MTRG") + private String MTRG; + + /** */ + @JsonProperty("LOKA") + private String LOKA; + + /** */ + @JsonProperty("LPOOL") + private String LPOOL; + + /** */ + @JsonProperty("TURBOS") + private String TURBOS; + + /** */ + @JsonProperty("CVX") + private String CVX; + + /** */ + @JsonProperty("ARX") + private String ARX; + + /** */ + @JsonProperty("MPLX") + private String MPLX; + + /** */ + @JsonProperty("SUSHI") + private String SUSHI; + + /** */ + @JsonProperty("NLK") + private String NLK; + + /** */ + @JsonProperty("PEPE2") + private String PEPE2; + + /** */ + @JsonProperty("WBTC") + private String WBTC; + + /** */ + @JsonProperty("SUI3L") + private String SUI3L; + + /** */ + @JsonProperty("CWS") + private String CWS; + + /** */ + @JsonProperty("SUI3S") + private String SUI3S; + + /** */ + @JsonProperty("INSP") + private String INSP; + + /** */ + @JsonProperty("MANA") + private String MANA; + + /** */ + @JsonProperty("VRTX") + private String VRTX; + + /** */ + @JsonProperty("CSPR") + private String CSPR; + + /** */ + @JsonProperty("ATA") + private String ATA; + + /** */ + @JsonProperty("OPEN") + private String OPEN; + + /** */ + @JsonProperty("HAI") + private String HAI; + + /** */ + @JsonProperty("NMR") + private String NMR; + + /** */ + @JsonProperty("ATH") + private String ATH; + + /** */ + @JsonProperty("LIT") + private String LIT; + + /** */ + @JsonProperty("TLOS") + private String TLOS; + + /** */ + @JsonProperty("TNSR") + private String TNSR; + + /** */ + @JsonProperty("CXT") + private String CXT; + + /** */ + @JsonProperty("POLYX") + private String POLYX; + + /** */ + @JsonProperty("ZERO") + private String ZERO; + + /** */ + @JsonProperty("ROUTE") + private String ROUTE; + + /** */ + @JsonProperty("LOOM") + private String LOOM; + + /** */ + @JsonProperty("PRE") + private String PRE; + + /** */ + @JsonProperty("VRAUP") + private String VRAUP; + + /** */ + @JsonProperty("HBB") + private String HBB; + + /** */ + @JsonProperty("RVN") + private String RVN; + + /** */ + @JsonProperty("PRQ") + private String PRQ; + + /** */ + @JsonProperty("ONDO") + private String ONDO; + + /** */ + @JsonProperty("PEPEDOWN") + private String PEPEDOWN; + + /** */ + @JsonProperty("WOOP") + private String WOOP; + + /** */ + @JsonProperty("LUNCUP") + private String LUNCUP; + + /** */ + @JsonProperty("KAVA") + private String KAVA; + + /** */ + @JsonProperty("LKI") + private String LKI; + + /** */ + @JsonProperty("AVA") + private String AVA; + + /** */ + @JsonProperty("NOM") + private String NOM; + + /** */ + @JsonProperty("MAPO") + private String MAPO; + + /** */ + @JsonProperty("PEPEUP") + private String PEPEUP; + + /** */ + @JsonProperty("STRAX") + private String STRAX; + + /** */ + @JsonProperty("NOT") + private String NOT; + + /** */ + @JsonProperty("ZERC") + private String ZERC; + + /** */ + @JsonProperty("BCUT") + private String BCUT; + + /** */ + @JsonProperty("MASA") + private String MASA; + + /** */ + @JsonProperty("WAN") + private String WAN; + + /** */ + @JsonProperty("WAT") + private String WAT; + + /** */ + @JsonProperty("WAX") + private String WAX; + + /** */ + @JsonProperty("MASK") + private String MASK; + + /** */ + @JsonProperty("EOS3L") + private String EOS3L; + + /** */ + @JsonProperty("IDEA") + private String IDEA; + + /** */ + @JsonProperty("EOS3S") + private String EOS3S; + + /** */ + @JsonProperty("YFI") + private String YFI; + + /** */ + @JsonProperty("MOODENG") + private String MOODENG; + + /** */ + @JsonProperty("XCUR") + private String XCUR; + + /** */ + @JsonProperty("HYDRA") + private String HYDRA; + + /** */ + @JsonProperty("POPCAT") + private String POPCAT; + + /** */ + @JsonProperty("LQTY") + private String LQTY; + + /** */ + @JsonProperty("PIXEL") + private String PIXEL; + + /** */ + @JsonProperty("LMR") + private String LMR; + + /** */ + @JsonProperty("ZETA") + private String ZETA; + + /** */ + @JsonProperty("YGG") + private String YGG; + + /** */ + @JsonProperty("AXS") + private String AXS; + + /** */ + @JsonProperty("BCHSV") + private String BCHSV; + + /** */ + @JsonProperty("NRN") + private String NRN; + + /** */ + @JsonProperty("FTON") + private String FTON; + + /** */ + @JsonProperty("COMP") + private String COMP; + + /** */ + @JsonProperty("XPRT") + private String XPRT; + + /** */ + @JsonProperty("HFT") + private String HFT; + + /** */ + @JsonProperty("UXLINK") + private String UXLINK; + + /** */ + @JsonProperty("STAMP") + private String STAMP; + + /** */ + @JsonProperty("RUNE") + private String RUNE; + + /** */ + @JsonProperty("ZEUS") + private String ZEUS; + + /** */ + @JsonProperty("LTC3L") + private String LTC3L; + + /** */ + @JsonProperty("DAPP") + private String DAPP; + + /** */ + @JsonProperty("FORTH") + private String FORTH; + + /** */ + @JsonProperty("ALPINE") + private String ALPINE; + + /** */ + @JsonProperty("SENSO") + private String SENSO; + + /** */ + @JsonProperty("LTC3S") + private String LTC3S; + + /** */ + @JsonProperty("DEXE") + private String DEXE; + + /** */ + @JsonProperty("GOAL") + private String GOAL; + + /** */ + @JsonProperty("AVAX") + private String AVAX; + + /** */ + @JsonProperty("LISTA") + private String LISTA; + + /** */ + @JsonProperty("AMPL") + private String AMPL; + + /** */ + @JsonProperty("WORK") + private String WORK; + + /** */ + @JsonProperty("BRWL") + private String BRWL; + + /** */ + @JsonProperty("BANANA") + private String BANANA; + + /** */ + @JsonProperty("PUSH") + private String PUSH; + + /** */ + @JsonProperty("WEN") + private String WEN; + + /** */ + @JsonProperty("NEIRO") + private String NEIRO; + + /** */ + @JsonProperty("BTCUP") + private String BTCUP; + + /** */ + @JsonProperty("SOL3S") + private String SOL3S; + + /** */ + @JsonProperty("BRAWL") + private String BRAWL; + + /** */ + @JsonProperty("LAY3R") + private String LAY3R; + + /** */ + @JsonProperty("LPT") + private String LPT; + + /** */ + @JsonProperty("GODS") + private String GODS; + + /** */ + @JsonProperty("SAND3S") + private String SAND3S; + + /** */ + @JsonProperty("RDNT") + private String RDNT; + + /** */ + @JsonProperty("SOL3L") + private String SOL3L; + + /** */ + @JsonProperty("NIBI") + private String NIBI; + + /** */ + @JsonProperty("NUM") + private String NUM; + + /** */ + @JsonProperty("PYR") + private String PYR; + + /** */ + @JsonProperty("DAG") + private String DAG; + + /** */ + @JsonProperty("DAI") + private String DAI; + + /** */ + @JsonProperty("HIP") + private String HIP; + + /** */ + @JsonProperty("DAO") + private String DAO; + + /** */ + @JsonProperty("AVAIL") + private String AVAIL; + + /** */ + @JsonProperty("DAR") + private String DAR; + + /** */ + @JsonProperty("FET") + private String FET; + + /** */ + @JsonProperty("FCON") + private String FCON; + + /** */ + @JsonProperty("XAVA") + private String XAVA; + + /** */ + @JsonProperty("LRC") + private String LRC; + + /** */ + @JsonProperty("UNI3S") + private String UNI3S; + + /** */ + @JsonProperty("POKT") + private String POKT; + + /** */ + @JsonProperty("DASH") + private String DASH; + + /** */ + @JsonProperty("BAKEDOWN") + private String BAKEDOWN; + + /** */ + @JsonProperty("POLC") + private String POLC; + + /** */ + @JsonProperty("CIRUS") + private String CIRUS; + + /** */ + @JsonProperty("UNI3L") + private String UNI3L; + + /** */ + @JsonProperty("NWC") + private String NWC; + + /** */ + @JsonProperty("POLK") + private String POLK; + + /** */ + @JsonProperty("LSD") + private String LSD; + + /** */ + @JsonProperty("MARS4") + private String MARS4; + + /** */ + @JsonProperty("LSK") + private String LSK; + + /** */ + @JsonProperty("BLOCK") + private String BLOCK; + + /** */ + @JsonProperty("ANALOS") + private String ANALOS; + + /** */ + @JsonProperty("SAFE") + private String SAFE; + + /** */ + @JsonProperty("DCK") + private String DCK; + + /** */ + @JsonProperty("LSS") + private String LSS; + + /** */ + @JsonProperty("DCR") + private String DCR; + + /** */ + @JsonProperty("LIKE") + private String LIKE; + + /** */ + @JsonProperty("DATA") + private String DATA; + + /** */ + @JsonProperty("WIF") + private String WIF; + + /** */ + @JsonProperty("BLOK") + private String BLOK; + + /** */ + @JsonProperty("LTC") + private String LTC; + + /** */ + @JsonProperty("METIS") + private String METIS; + + /** */ + @JsonProperty("WIN") + private String WIN; + + /** */ + @JsonProperty("HLG") + private String HLG; + + /** */ + @JsonProperty("LTO") + private String LTO; + + /** */ + @JsonProperty("DYDX") + private String DYDX; + + /** */ + @JsonProperty("ARB3S") + private String ARB3S; + + /** */ + @JsonProperty("MUBI") + private String MUBI; + + /** */ + @JsonProperty("ARB3L") + private String ARB3L; + + /** */ + @JsonProperty("RBTC1") + private String RBTC1; + + /** */ + @JsonProperty("POND") + private String POND; + + /** */ + @JsonProperty("LINA") + private String LINA; + + /** */ + @JsonProperty("MYRIA") + private String MYRIA; + + /** */ + @JsonProperty("LINK") + private String LINK; + + /** */ + @JsonProperty("QTUM") + private String QTUM; + + /** */ + @JsonProperty("TUNE") + private String TUNE; + + /** */ + @JsonProperty("UFO") + private String UFO; + + /** */ + @JsonProperty("CYBER") + private String CYBER; + + /** */ + @JsonProperty("WILD") + private String WILD; + + /** */ + @JsonProperty("POLS") + private String POLS; + + /** */ + @JsonProperty("NYM") + private String NYM; + + /** */ + @JsonProperty("FIL") + private String FIL; + + /** */ + @JsonProperty("BAL") + private String BAL; + + /** */ + @JsonProperty("SCA") + private String SCA; + + /** */ + @JsonProperty("STND") + private String STND; + + /** */ + @JsonProperty("WMTX") + private String WMTX; + + /** */ + @JsonProperty("SCLP") + private String SCLP; + + /** */ + @JsonProperty("MANEKI") + private String MANEKI; + + /** */ + @JsonProperty("BAT") + private String BAT; + + /** */ + @JsonProperty("AKRO") + private String AKRO; + + /** */ + @JsonProperty("FTM3L") + private String FTM3L; + + /** */ + @JsonProperty("BAX") + private String BAX; + + /** */ + @JsonProperty("FTM3S") + private String FTM3S; + + /** */ + @JsonProperty("COTI") + private String COTI; + + /** common response */ @JsonIgnore private RestResponse commonResponse; @Override diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFullOrderBookReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFullOrderBookReq.java index 3f8529d3..66308aa0 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFullOrderBookReq.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFullOrderBookReq.java @@ -16,8 +16,7 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetFullOrderBookReq implements Request { - /** - * symbol - */ - @JsonProperty("symbol") private String symbol; + /** symbol */ + @JsonProperty("symbol") + private String symbol; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesReq.java index 108e406d..8a673c3e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesReq.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesReq.java @@ -18,88 +18,62 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetKlinesReq implements Request { - /** - * symbol - */ - @JsonProperty("symbol") private String symbol; + /** symbol */ + @JsonProperty("symbol") + private String symbol; /** - * Type of candlestick patterns: 1min, 3min, 5min, 15min, 30min, 1hour, 2hour, - * 4hour, 6hour, 8hour, 12hour, 1day, 1week, 1month + * Type of candlestick patterns: 1min, 3min, 5min, 15min, 30min, 1hour, 2hour, 4hour, 6hour, + * 8hour, 12hour, 1day, 1week, 1month */ - @JsonProperty("type") private TypeEnum type; + @JsonProperty("type") + private TypeEnum type; - /** - * Start time (second), default is 0 - */ - @JsonProperty("startAt") @Builder.Default private Long startAt = 0l; + /** Start time (second), default is 0 */ + @JsonProperty("startAt") + @Builder.Default + private Long startAt = 0l; - /** - * End time (second), default is 0 - */ - @JsonProperty("endAt") @Builder.Default private Long endAt = 0l; + /** End time (second), default is 0 */ + @JsonProperty("endAt") + @Builder.Default + private Long endAt = 0l; public enum TypeEnum { - /** - * 1min - */ + /** 1min */ _1MIN("1min"), - /** - * 3min - */ + /** 3min */ _3MIN("3min"), - /** - * 5min - */ + /** 5min */ _5MIN("5min"), - /** - * 15min - */ + /** 15min */ _15MIN("15min"), - /** - * 30min - */ + /** 30min */ _30MIN("30min"), - /** - * 1hour - */ + /** 1hour */ _1HOUR("1hour"), - /** - * 2hour - */ + /** 2hour */ _2HOUR("2hour"), - /** - * 4hour - */ + /** 4hour */ _4HOUR("4hour"), - /** - * 6hour - */ + /** 6hour */ _6HOUR("6hour"), - /** - * 8hour - */ + /** 8hour */ _8HOUR("8hour"), - /** - * 12hour - */ + /** 12hour */ _12HOUR("12hour"), - /** - * 1day - */ + /** 1day */ _1DAY("1day"), - /** - * 1week - */ + /** 1week */ _1WEEK("1week"), - /** - * 1month - */ + /** 1month */ _1MONTH("1month"); private final String value; - TypeEnum(String value) { this.value = value; } + TypeEnum(String value) { + this.value = value; + } @JsonValue public String getValue() { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesResp.java index c3bf69a2..cc29fba7 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesResp.java @@ -18,16 +18,12 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class GetKlinesResp - implements Response> { - /** - * - */ - @JsonProperty("data") private List> data = new ArrayList<>(); +public class GetKlinesResp implements Response> { + /** */ + @JsonProperty("data") + private List> data = new ArrayList<>(); - /** - * common response - */ + /** common response */ @JsonIgnore private RestResponse commonResponse; @Override diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetMarketListResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetMarketListResp.java index 666f032f..9c9a701f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetMarketListResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetMarketListResp.java @@ -20,14 +20,11 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class GetMarketListResp implements Response> { - /** - * - */ - @JsonProperty("data") private List data = new ArrayList<>(); + /** */ + @JsonProperty("data") + private List data = new ArrayList<>(); - /** - * common response - */ + /** common response */ @JsonIgnore private RestResponse commonResponse; @Override diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPartOrderBookReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPartOrderBookReq.java index 7972b711..6f3ac89c 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPartOrderBookReq.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPartOrderBookReq.java @@ -18,13 +18,13 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetPartOrderBookReq implements Request { - /** - * symbol - */ - @JsonProperty("symbol") private String symbol; + /** symbol */ + @JsonProperty("symbol") + private String symbol; - /** - * Get the depth layer, optional value: 20, 100 - */ - @JsonIgnore @PathVar("size") @JsonProperty("size") private String size; + /** Get the depth layer, optional value: 20, 100 */ + @JsonIgnore + @PathVar("size") + @JsonProperty("size") + private String size; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPartOrderBookResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPartOrderBookResp.java index 88f65625..0798e1d9 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPartOrderBookResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPartOrderBookResp.java @@ -18,31 +18,24 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetPartOrderBookResp - implements Response> { - /** - * Timestamp(millisecond) - */ - @JsonProperty("time") private Long time; - - /** - * Sequence number - */ - @JsonProperty("sequence") private String sequence; - - /** - * bids, from high to low - */ - @JsonProperty("bids") private List> bids = new ArrayList<>(); - - /** - * asks, from low to high - */ - @JsonProperty("asks") private List> asks = new ArrayList<>(); - - /** - * common response - */ + implements Response> { + /** Timestamp(millisecond) */ + @JsonProperty("time") + private Long time; + + /** Sequence number */ + @JsonProperty("sequence") + private String sequence; + + /** bids, from high to low */ + @JsonProperty("bids") + private List> bids = new ArrayList<>(); + + /** asks, from low to high */ + @JsonProperty("asks") + private List> asks = new ArrayList<>(); + + /** common response */ @JsonIgnore private RestResponse commonResponse; @Override diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPrivateTokenInstanceServers.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPrivateTokenInstanceServers.java index 563ab814..3dad5d1a 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPrivateTokenInstanceServers.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPrivateTokenInstanceServers.java @@ -15,41 +15,35 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetPrivateTokenInstanceServers { - /** - * Websocket domain URL. It is recommended to use a dynamic URL, as the URL - * may change. - */ - @JsonProperty("endpoint") private String endpoint; + /** Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change. */ + @JsonProperty("endpoint") + private String endpoint; - /** - * Whether to encrypt. Currently only supports wss, not ws - */ - @JsonProperty("encrypt") private Boolean encrypt; + /** Whether to encrypt. Currently only supports wss, not ws */ + @JsonProperty("encrypt") + private Boolean encrypt; - /** - * Network Protocol - */ - @JsonProperty("protocol") private ProtocolEnum protocol; + /** Network Protocol */ + @JsonProperty("protocol") + private ProtocolEnum protocol; - /** - * Recommended ping interval (milliseconds) - */ - @JsonProperty("pingInterval") private Integer pingInterval; + /** Recommended ping interval (milliseconds) */ + @JsonProperty("pingInterval") + private Integer pingInterval; - /** - * Heartbeat timeout (milliseconds) - */ - @JsonProperty("pingTimeout") private Integer pingTimeout; + /** Heartbeat timeout (milliseconds) */ + @JsonProperty("pingTimeout") + private Integer pingTimeout; public enum ProtocolEnum { - /** - * Websocket - */ + /** Websocket */ WEBSOCKET("websocket"); private final String value; - ProtocolEnum(String value) { this.value = value; } + ProtocolEnum(String value) { + this.value = value; + } @JsonValue public String getValue() { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPrivateTokenResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPrivateTokenResp.java index 3f8d1273..332ed59d 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPrivateTokenResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPrivateTokenResp.java @@ -18,23 +18,16 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetPrivateTokenResp - implements Response> { - /** - * The token required to establish a Websocket connection - */ - @JsonProperty("token") private String token; + implements Response> { + /** The token required to establish a Websocket connection */ + @JsonProperty("token") + private String token; - /** - * - */ + /** */ @JsonProperty("instanceServers") - private List instanceServers = - new ArrayList<>(); + private List instanceServers = new ArrayList<>(); - /** - * common response - */ + /** common response */ @JsonIgnore private RestResponse commonResponse; @Override diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPublicTokenInstanceServers.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPublicTokenInstanceServers.java index dcdb609f..a42685f1 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPublicTokenInstanceServers.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPublicTokenInstanceServers.java @@ -15,41 +15,35 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetPublicTokenInstanceServers { - /** - * Websocket domain URL. It is recommended to use a dynamic URL, as the URL - * may change. - */ - @JsonProperty("endpoint") private String endpoint; + /** Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change. */ + @JsonProperty("endpoint") + private String endpoint; - /** - * Whether to encrypt. Currently only supports wss, not ws - */ - @JsonProperty("encrypt") private Boolean encrypt; + /** Whether to encrypt. Currently only supports wss, not ws */ + @JsonProperty("encrypt") + private Boolean encrypt; - /** - * Network Protocol - */ - @JsonProperty("protocol") private ProtocolEnum protocol; + /** Network Protocol */ + @JsonProperty("protocol") + private ProtocolEnum protocol; - /** - * Recommended ping interval (milliseconds) - */ - @JsonProperty("pingInterval") private Integer pingInterval; + /** Recommended ping interval (milliseconds) */ + @JsonProperty("pingInterval") + private Integer pingInterval; - /** - * Heartbeat timeout (milliseconds) - */ - @JsonProperty("pingTimeout") private Integer pingTimeout; + /** Heartbeat timeout (milliseconds) */ + @JsonProperty("pingTimeout") + private Integer pingTimeout; public enum ProtocolEnum { - /** - * Websocket - */ + /** Websocket */ WEBSOCKET("websocket"); private final String value; - ProtocolEnum(String value) { this.value = value; } + ProtocolEnum(String value) { + this.value = value; + } @JsonValue public String getValue() { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPublicTokenResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPublicTokenResp.java index c40a7dab..58fea958 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPublicTokenResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetPublicTokenResp.java @@ -19,21 +19,15 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class GetPublicTokenResp implements Response> { - /** - * The token required to establish a Websocket connection - */ - @JsonProperty("token") private String token; + /** The token required to establish a Websocket connection */ + @JsonProperty("token") + private String token; - /** - * - */ + /** */ @JsonProperty("instanceServers") - private List instanceServers = - new ArrayList<>(); + private List instanceServers = new ArrayList<>(); - /** - * common response - */ + /** common response */ @JsonIgnore private RestResponse commonResponse; @Override diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServerTimeResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServerTimeResp.java index 4be1fbf5..4e824164 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServerTimeResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServerTimeResp.java @@ -18,14 +18,11 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class GetServerTimeResp implements Response> { - /** - * ServerTime (milliseconds) - */ - @JsonProperty("data") private Long data; + /** ServerTime (milliseconds) */ + @JsonProperty("data") + private Long data; - /** - * common response - */ + /** common response */ @JsonIgnore private RestResponse commonResponse; @Override diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServiceStatusResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServiceStatusResp.java index 97f3c31c..39a612d8 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServiceStatusResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServiceStatusResp.java @@ -18,23 +18,19 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetServiceStatusResp - implements Response> { + 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 */ - @JsonProperty("status") private StatusEnum status; + @JsonProperty("status") + private StatusEnum status; - /** - * Remark for operation - */ - @JsonProperty("msg") private String msg; + /** Remark for operation */ + @JsonProperty("msg") + private String msg; - /** - * common response - */ + /** common response */ @JsonIgnore private RestResponse commonResponse; @Override @@ -43,22 +39,18 @@ public void setCommonResponse(RestResponse response) { } public enum StatusEnum { - /** - * normal transaction - */ + /** normal transaction */ OPEN("open"), - /** - * Stop Trading/Maintenance - */ + /** Stop Trading/Maintenance */ CLOSE("close"), - /** - * can only cancel the order but not place order - */ + /** can only cancel the order but not place order */ CANCELONLY("cancelonly"); private final String value; - StatusEnum(String value) { this.value = value; } + StatusEnum(String value) { + this.value = value; + } @JsonValue public String getValue() { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetSymbolReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetSymbolReq.java index ad169a0d..e065b2c5 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetSymbolReq.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetSymbolReq.java @@ -18,8 +18,9 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetSymbolReq implements Request { - /** - * Path parameter, Symbol - */ - @JsonIgnore @PathVar("symbol") @JsonProperty("symbol") private String symbol; + /** Path parameter, Symbol */ + @JsonIgnore + @PathVar("symbol") + @JsonProperty("symbol") + private String symbol; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTickerResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTickerResp.java index 93fc0a00..62fafe12 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTickerResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTickerResp.java @@ -15,51 +15,40 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class GetTickerResp - implements Response> { - /** - * timestamp - */ - @JsonProperty("time") private Long time; +public class GetTickerResp implements Response> { + /** timestamp */ + @JsonProperty("time") + private Long time; - /** - * Sequence - */ - @JsonProperty("sequence") private String sequence; + /** Sequence */ + @JsonProperty("sequence") + private String sequence; - /** - * Last traded price - */ - @JsonProperty("price") private String price; + /** Last traded price */ + @JsonProperty("price") + private String price; - /** - * Last traded size - */ - @JsonProperty("size") private String size; + /** Last traded size */ + @JsonProperty("size") + private String size; - /** - * Best bid price - */ - @JsonProperty("bestBid") private String bestBid; + /** Best bid price */ + @JsonProperty("bestBid") + private String bestBid; - /** - * Best bid size - */ - @JsonProperty("bestBidSize") private String bestBidSize; + /** Best bid size */ + @JsonProperty("bestBidSize") + private String bestBidSize; - /** - * Best ask price - */ - @JsonProperty("bestAsk") private String bestAsk; + /** Best ask price */ + @JsonProperty("bestAsk") + private String bestAsk; - /** - * Best ask size - */ - @JsonProperty("bestAskSize") private String bestAskSize; + /** Best ask size */ + @JsonProperty("bestAskSize") + private String bestAskSize; - /** - * common response - */ + /** common response */ @JsonIgnore private RestResponse commonResponse; @Override diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryReq.java index f942b79c..42b52b50 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryReq.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryReq.java @@ -16,8 +16,7 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetTradeHistoryReq implements Request { - /** - * symbol - */ - @JsonProperty("symbol") private String symbol; + /** symbol */ + @JsonProperty("symbol") + private String symbol; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryResp.java index 62421fad..0536d7b2 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryResp.java @@ -19,17 +19,12 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetTradeHistoryResp - implements Response> { - /** - * - */ + implements Response> { + /** */ @JsonProperty("data") private List data = new ArrayList<>(); - /** - * common response - */ + /** common response */ @JsonIgnore private RestResponse commonResponse; @Override diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.java index db43e9a0..cd6a531b 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.java @@ -4,370 +4,219 @@ public interface MarketApi { /** - * Get Announcements - * This interface can obtain the latest news announcements, and the default - * page search is for announcements within a month. docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 20 | - * +-----------------------+--------+ + * Get Announcements This interface can obtain the latest news announcements, and the default page + * search is for announcements within a month. docs +-----------------------+--------+ + * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 20 | +-----------------------+--------+ */ GetAnnouncementsResp getAnnouncements(GetAnnouncementsReq req); /** - * Get Currency - * Request the currency details of a specified currency via this endpoint. - * docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+--------+ + * Get Currency Request the currency details of a specified currency via this endpoint. docs +-----------------------+--------+ + * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+--------+ */ GetCurrencyResp getCurrency(GetCurrencyReq req); /** - * Get All Currencies - * Request a currency list via this endpoint. Not all currencies can currently - * be used for trading. docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 3 | + * Get All Currencies Request a currency list via this endpoint. Not all currencies can currently + * be used for trading. docs + * +-----------------------+--------+ | Extra API Info | Value | + * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 3 | * +-----------------------+--------+ */ GetAllCurrenciesResp getAllCurrencies(); /** - * Get Symbol - * 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. docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 4 | - * +-----------------------+--------+ + * Get Symbol 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. docs +-----------------------+--------+ + * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 4 | +-----------------------+--------+ */ GetSymbolResp getSymbol(GetSymbolReq req); /** - * Get All Symbols - * 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. docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 4 | - * +-----------------------+--------+ + * Get All Symbols 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. docs +-----------------------+--------+ + * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 4 | +-----------------------+--------+ */ GetAllSymbolsResp getAllSymbols(GetAllSymbolsReq req); /** - * Get Ticker - * 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. docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 2 | + * Get Ticker 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. docs + * +-----------------------+--------+ | Extra API Info | Value | + * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 2 | * +-----------------------+--------+ */ GetTickerResp getTicker(GetTickerReq req); /** - * Get All Tickers - * 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. docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 15 | - * +-----------------------+--------+ + * Get All Tickers 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. docs +-----------------------+--------+ + * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 15 | +-----------------------+--------+ */ GetAllTickersResp getAllTickers(); /** - * Get Trade History - * Request via this endpoint to get the trade history of the specified symbol, + * Get Trade History Request via this endpoint to get the trade history of the specified symbol, * the returned quantity is the last 100 transaction records. docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+--------+ + * href="https://www.kucoin.com/docs-new/api-3470162">docs +-----------------------+--------+ + * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+--------+ */ GetTradeHistoryResp getTradeHistory(GetTradeHistoryReq req); /** - * Get Klines - * 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. docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 3 | + * Get Klines 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. docs + * +-----------------------+--------+ | Extra API Info | Value | + * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 3 | * +-----------------------+--------+ */ GetKlinesResp getKlines(GetKlinesReq req); /** - * Get Part OrderBook - * 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. docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 2 | + * Get Part OrderBook 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. docs + * +-----------------------+--------+ | Extra API Info | Value | + * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 2 | * +-----------------------+--------+ */ GetPartOrderBookResp getPartOrderBook(GetPartOrderBookReq req); /** - * Get Full OrderBook - * 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. docs - * +-----------------------+---------+ - * | Extra API Info | Value | - * +-----------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+---------+ + * Get Full OrderBook 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. docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ */ GetFullOrderBookResp getFullOrderBook(GetFullOrderBookReq req); /** - * Get Call Auction Part OrderBook - * 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. docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 2 | + * Get Call Auction Part OrderBook 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. docs + * +-----------------------+--------+ | Extra API Info | Value | + * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 2 | * +-----------------------+--------+ */ - GetCallAuctionPartOrderBookResp - getCallAuctionPartOrderBook(GetCallAuctionPartOrderBookReq req); + GetCallAuctionPartOrderBookResp getCallAuctionPartOrderBook(GetCallAuctionPartOrderBookReq req); /** - * Get Call Auction Info - * 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. docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+--------+ + * Get Call Auction Info 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. docs +-----------------------+--------+ + * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+--------+ */ GetCallAuctionInfoResp getCallAuctionInfo(GetCallAuctionInfoReq req); /** - * Get Fiat Price - * Request the fiat price of the currencies for the available trading pairs - * via this endpoint. docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 3 | + * Get Fiat Price Request the fiat price of the currencies for the available trading pairs via + * this endpoint. docs + * +-----------------------+--------+ | Extra API Info | Value | + * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 3 | * +-----------------------+--------+ */ GetFiatPriceResp getFiatPrice(GetFiatPriceReq req); /** - * Get 24hr Stats - * Request via this endpoint to get the statistics of the specified ticker in - * the last 24 hours. docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 15 | + * Get 24hr Stats Request via this endpoint to get the statistics of the specified ticker in the + * last 24 hours. docs + * +-----------------------+--------+ | Extra API Info | Value | + * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 15 | * +-----------------------+--------+ */ Get24hrStatsResp get24hrStats(Get24hrStatsReq req); /** - * Get Market List - * Request via this endpoint the transaction currency for the entire trading + * Get Market List Request via this endpoint the transaction currency for the entire trading * market. docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ | Extra API Info | Value | + * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | + * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 3 | * +-----------------------+--------+ */ GetMarketListResp getMarketList(); /** - * Get Client IP Address - * Get the server time. - * docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 0 | - * +-----------------------+--------+ + * Get Client IP Address Get the server time. docs +-----------------------+--------+ + * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 0 | +-----------------------+--------+ */ GetClientIPAddressResp getClientIPAddress(); /** - * Get Server Time - * Get the server time. - * docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+--------+ + * Get Server Time Get the server time. docs +-----------------------+--------+ + * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+--------+ */ GetServerTimeResp getServerTime(); /** - * Get Service Status - * Get the service status. - * docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+--------+ + * Get Service Status Get the service status. docs +-----------------------+--------+ + * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+--------+ */ GetServiceStatusResp getServiceStatus(); /** - * Get Public Token - Spot/Margin - * 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 docs - * +-----------------------+--------+ - * | Extra API Info | Value | - * +-----------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT-WEIGHT | 10 | - * +-----------------------+--------+ + * Get Public Token - Spot/Margin 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 docs +-----------------------+--------+ + * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | + * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+--------+ */ GetPublicTokenResp getPublicToken(); /** - * Get Private Token - Spot/Margin - * 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 docs - * +-----------------------+---------+ - * | Extra API Info | Value | - * +-----------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT-WEIGHT | 10 | - * +-----------------------+---------+ + * Get Private Token - Spot/Margin 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 docs +-----------------------+---------+ + * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | + * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | + * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+---------+ */ GetPrivateTokenResp getPrivateToken(); -} \ No newline at end of file +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java index bb227131..01e9711f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java @@ -1,4 +1,5 @@ package com.kucoin.universal.sdk.generate.spot.market; + import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.model.RestResponse; @@ -10,530 +11,795 @@ class MarketApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); - /** - * getAnnouncements Request - * Get Announcements - * /api/v3/announcements - */ + /** getAnnouncements Request Get Announcements /api/v3/announcements */ public static void testGetAnnouncementsRequest() throws Exception { String data = - "{\"currentPage\": 1, \"pageSize\": 50, \"annType\": \"latest-announcements\", \"lang\": \"en_US\", \"startTime\": 1729594043000, \"endTime\": 1729697729000}"; + "{\\\"currentPage\\\": 1, \\\"pageSize\\\": 50, \\\"annType\\\":" + + " \\\"latest-announcements\\\", \\\"lang\\\": \\\"en_US\\\", \\\"startTime\\\":" + + " 1729594043000, \\\"endTime\\\": 1729697729000}"; GetAnnouncementsReq obj = mapper.readValue(data, GetAnnouncementsReq.class); } - /** - * getAnnouncements Response - * Get Announcements - * /api/v3/announcements - */ + /** getAnnouncements Response Get Announcements /api/v3/announcements */ public static void testGetAnnouncementsResponse() throws Exception { String data = - "{\n \"code\": \"200000\",\n \"data\": {\n \"totalNum\": 195,\n \"totalPage\": 13,\n \"currentPage\": 1,\n \"pageSize\": 15,\n \"items\": [\n {\n \"annId\": 129045,\n \"annTitle\": \"KuCoin Isolated Margin Adds the Scroll (SCR) Trading Pair\",\n \"annType\": [\n \"latest-announcements\"\n ],\n \"annDesc\": \"To enrich the variety of assets available,\xa0KuCoin\u2019s Isolated Margin Trading platform has added the Scroll (SCR)\xa0asset and trading pair.\",\n \"cTime\": 1729594043000,\n \"language\": \"en_US\",\n \"annUrl\": \"https://www.kucoin.com/announcement/kucoin-isolated-margin-adds-scr?lang=en_US\"\n },\n {\n \"annId\": 129001,\n \"annTitle\": \"DAPP-30D Fixed Promotion, Enjoy an APR of 200%!\u200b\",\n \"annType\": [\n \"latest-announcements\",\n \"activities\"\n ],\n \"annDesc\": \"KuCoin Earn will be launching the DAPP Fixed Promotion at 10:00:00 on October 22, 2024 (UTC). The available product is \u201cDAPP-30D'' with an APR of 200%.\",\n \"cTime\": 1729588460000,\n \"language\": \"en_US\",\n \"annUrl\": \"https://www.kucoin.com/announcement/dapp-30d-fixed-promotion-enjoy?lang=en_US\"\n },\n {\n \"annId\": 128581,\n \"annTitle\": \"NAYM (NAYM) Gets Listed on KuCoin! World Premiere!\",\n \"annType\": [\n \"latest-announcements\",\n \"new-listings\"\n ],\n \"annDesc\": \"Trading:\xa011:00 on October 22, 2024 (UTC)\",\n \"cTime\": 1729497729000,\n \"language\": \"en_US\",\n \"annUrl\": \"https://www.kucoin.com/announcement/en-naym-naym-gets-listed-on-kucoin-world-premiere?lang=en_US\"\n }\n ]\n }\n}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"totalNum\\\": 195,\\n" + + " \\\"totalPage\\\": 13,\\n" + + " \\\"currentPage\\\": 1,\\n" + + " \\\"pageSize\\\": 15,\\n" + + " \\\"items\\\": [\\n" + + " {\\n" + + " \\\"annId\\\": 129045,\\n" + + " \\\"annTitle\\\": \\\"KuCoin Isolated Margin Adds the Scroll (SCR)" + + " Trading Pair\\\",\\n" + + " \\\"annType\\\": [\\n" + + " \\\"latest-announcements\\\"\\n" + + " ],\\n" + + " \\\"annDesc\\\": \\\"To enrich the variety of assets" + + " available,KuCoins Isolated Margin Trading platform has added the Scroll (SCR)asset" + + " and trading pair.\\\",\\n" + + " \\\"cTime\\\": 1729594043000,\\n" + + " \\\"language\\\": \\\"en_US\\\",\\n" + + " \\\"annUrl\\\":" + + " \\\"https://www.kucoin.com/announcement/kucoin-isolated-margin-adds-scr?lang=en_US\\\"\\n" + + " },\\n" + + " {\\n" + + " \\\"annId\\\": 129001,\\n" + + " \\\"annTitle\\\": \\\"DAPP-30D Fixed Promotion, Enjoy an APR of" + + " 200%!\\u200b\\\",\\n" + + " \\\"annType\\\": [\\n" + + " \\\"latest-announcements\\\",\\n" + + " \\\"activities\\\"\\n" + + " ],\\n" + + " \\\"annDesc\\\": \\\"KuCoin Earn will be launching the DAPP Fixed" + + " Promotion at 10:00:00 on October 22, 2024 (UTC). The available product is" + + " \\u201cDAPP-30D'' with an APR of 200%.\\\",\\n" + + " \\\"cTime\\\": 1729588460000,\\n" + + " \\\"language\\\": \\\"en_US\\\",\\n" + + " \\\"annUrl\\\":" + + " \\\"https://www.kucoin.com/announcement/dapp-30d-fixed-promotion-enjoy?lang=en_US\\\"\\n" + + " },\\n" + + " {\\n" + + " \\\"annId\\\": 128581,\\n" + + " \\\"annTitle\\\": \\\"NAYM (NAYM) Gets Listed on KuCoin! World" + + " Premiere!\\\",\\n" + + " \\\"annType\\\": [\\n" + + " \\\"latest-announcements\\\",\\n" + + " \\\"new-listings\\\"\\n" + + " ],\\n" + + " \\\"annDesc\\\": \\\"Trading:11:00 on October 22, 2024 (UTC)\\\",\\n" + + " \\\"cTime\\\": 1729497729000,\\n" + + " \\\"language\\\": \\\"en_US\\\",\\n" + + " \\\"annUrl\\\":" + + " \\\"https://www.kucoin.com/announcement/en-naym-naym-gets-listed-on-kucoin-world-premiere?lang=en_US\\\"\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * getCurrency Request - * Get Currency - * /api/v3/currencies/{currency} - */ + + /** getCurrency Request Get Currency /api/v3/currencies/{currency} */ public static void testGetCurrencyRequest() throws Exception { - String data = "{\"chain\": \"eth\", \"currency\": \"BTC\"}"; + String data = "{\\\"chain\\\": \\\"eth\\\", \\\"currency\\\": \\\"BTC\\\"}"; GetCurrencyReq obj = mapper.readValue(data, GetCurrencyReq.class); } - /** - * getCurrency Response - * Get Currency - * /api/v3/currencies/{currency} - */ + /** getCurrency Response Get Currency /api/v3/currencies/{currency} */ public static void testGetCurrencyResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"currency\":\"BTC\",\"name\":\"BTC\",\"fullName\":\"Bitcoin\",\"precision\":8,\"confirms\":null,\"contractAddress\":null,\"isMarginEnabled\":true,\"isDebitEnabled\":true,\"chains\":[{\"chainName\":\"BTC\",\"withdrawalMinSize\":\"0.001\",\"depositMinSize\":\"0.0002\",\"withdrawFeeRate\":\"0\",\"withdrawalMinFee\":\"0.0005\",\"isWithdrawEnabled\":true,\"isDepositEnabled\":true,\"confirms\":3,\"preConfirms\":1,\"contractAddress\":\"\",\"withdrawPrecision\":8,\"maxWithdraw\":null,\"maxDeposit\":null,\"needTag\":false,\"chainId\":\"btc\"},{\"chainName\":\"Lightning Network\",\"withdrawalMinSize\":\"0.00001\",\"depositMinSize\":\"0.00001\",\"withdrawFeeRate\":\"0\",\"withdrawalMinFee\":\"0.000015\",\"isWithdrawEnabled\":true,\"isDepositEnabled\":true,\"confirms\":1,\"preConfirms\":1,\"contractAddress\":\"\",\"withdrawPrecision\":8,\"maxWithdraw\":null,\"maxDeposit\":\"0.03\",\"needTag\":false,\"chainId\":\"btcln\"},{\"chainName\":\"KCC\",\"withdrawalMinSize\":\"0.0008\",\"depositMinSize\":null,\"withdrawFeeRate\":\"0\",\"withdrawalMinFee\":\"0.00002\",\"isWithdrawEnabled\":true,\"isDepositEnabled\":true,\"confirms\":20,\"preConfirms\":20,\"contractAddress\":\"0xfa93c12cd345c658bc4644d1d4e1b9615952258c\",\"withdrawPrecision\":8,\"maxWithdraw\":null,\"maxDeposit\":null,\"needTag\":false,\"chainId\":\"kcc\"},{\"chainName\":\"BTC-Segwit\",\"withdrawalMinSize\":\"0.0008\",\"depositMinSize\":\"0.0002\",\"withdrawFeeRate\":\"0\",\"withdrawalMinFee\":\"0.0005\",\"isWithdrawEnabled\":false,\"isDepositEnabled\":true,\"confirms\":2,\"preConfirms\":2,\"contractAddress\":\"\",\"withdrawPrecision\":8,\"maxWithdraw\":null,\"maxDeposit\":null,\"needTag\":false,\"chainId\":\"bech32\"}]}}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"currency\\\":\\\"BTC\\\",\\\"name\\\":\\\"BTC\\\",\\\"fullName\\\":\\\"Bitcoin\\\",\\\"precision\\\":8,\\\"confirms\\\":null,\\\"contractAddress\\\":null,\\\"isMarginEnabled\\\":true,\\\"isDebitEnabled\\\":true,\\\"chains\\\":[{\\\"chainName\\\":\\\"BTC\\\",\\\"withdrawalMinSize\\\":\\\"0.001\\\",\\\"depositMinSize\\\":\\\"0.0002\\\",\\\"withdrawFeeRate\\\":\\\"0\\\",\\\"withdrawalMinFee\\\":\\\"0.0005\\\",\\\"isWithdrawEnabled\\\":true,\\\"isDepositEnabled\\\":true,\\\"confirms\\\":3,\\\"preConfirms\\\":1,\\\"contractAddress\\\":\\\"\\\",\\\"withdrawPrecision\\\":8,\\\"maxWithdraw\\\":null,\\\"maxDeposit\\\":null,\\\"needTag\\\":false,\\\"chainId\\\":\\\"btc\\\"},{\\\"chainName\\\":\\\"Lightning" + + " Network\\\",\\\"withdrawalMinSize\\\":\\\"0.00001\\\",\\\"depositMinSize\\\":\\\"0.00001\\\",\\\"withdrawFeeRate\\\":\\\"0\\\",\\\"withdrawalMinFee\\\":\\\"0.000015\\\",\\\"isWithdrawEnabled\\\":true,\\\"isDepositEnabled\\\":true,\\\"confirms\\\":1,\\\"preConfirms\\\":1,\\\"contractAddress\\\":\\\"\\\",\\\"withdrawPrecision\\\":8,\\\"maxWithdraw\\\":null,\\\"maxDeposit\\\":\\\"0.03\\\",\\\"needTag\\\":false,\\\"chainId\\\":\\\"btcln\\\"},{\\\"chainName\\\":\\\"KCC\\\",\\\"withdrawalMinSize\\\":\\\"0.0008\\\",\\\"depositMinSize\\\":null,\\\"withdrawFeeRate\\\":\\\"0\\\",\\\"withdrawalMinFee\\\":\\\"0.00002\\\",\\\"isWithdrawEnabled\\\":true,\\\"isDepositEnabled\\\":true,\\\"confirms\\\":20,\\\"preConfirms\\\":20,\\\"contractAddress\\\":\\\"0xfa93c12cd345c658bc4644d1d4e1b9615952258c\\\",\\\"withdrawPrecision\\\":8,\\\"maxWithdraw\\\":null,\\\"maxDeposit\\\":null,\\\"needTag\\\":false,\\\"chainId\\\":\\\"kcc\\\"},{\\\"chainName\\\":\\\"BTC-Segwit\\\",\\\"withdrawalMinSize\\\":\\\"0.0008\\\",\\\"depositMinSize\\\":\\\"0.0002\\\",\\\"withdrawFeeRate\\\":\\\"0\\\",\\\"withdrawalMinFee\\\":\\\"0.0005\\\",\\\"isWithdrawEnabled\\\":false,\\\"isDepositEnabled\\\":true,\\\"confirms\\\":2,\\\"preConfirms\\\":2,\\\"contractAddress\\\":\\\"\\\",\\\"withdrawPrecision\\\":8,\\\"maxWithdraw\\\":null,\\\"maxDeposit\\\":null,\\\"needTag\\\":false,\\\"chainId\\\":\\\"bech32\\\"}]}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * getAllCurrencies Request - * Get All Currencies - * /api/v3/currencies - */ + + /** getAllCurrencies Request Get All Currencies /api/v3/currencies */ public static void testGetAllCurrenciesRequest() throws Exception { // $this->assertTrue(true); } - /** - * getAllCurrencies Response - * Get All Currencies - * /api/v3/currencies - */ + /** getAllCurrencies Response Get All Currencies /api/v3/currencies */ public static void testGetAllCurrenciesResponse() throws Exception { String data = - "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"currency\": \"BTC\",\n \"name\": \"BTC\",\n \"fullName\": \"Bitcoin\",\n \"precision\": 8,\n \"confirms\": null,\n \"contractAddress\": null,\n \"isMarginEnabled\": true,\n \"isDebitEnabled\": true,\n \"chains\": [\n {\n \"chainName\": \"BTC\",\n \"withdrawalMinSize\": \"0.001\",\n \"depositMinSize\": \"0.0002\",\n \"withdrawFeeRate\": \"0\",\n \"withdrawalMinFee\": \"0.0005\",\n \"isWithdrawEnabled\": true,\n \"isDepositEnabled\": true,\n \"confirms\": 3,\n \"preConfirms\": 1,\n \"contractAddress\": \"\",\n \"withdrawPrecision\": 8,\n \"maxWithdraw\": null,\n \"maxDeposit\": null,\n \"needTag\": false,\n \"chainId\": \"btc\"\n },\n {\n \"chainName\": \"Lightning Network\",\n \"withdrawalMinSize\": \"0.00001\",\n \"depositMinSize\": \"0.00001\",\n \"withdrawFeeRate\": \"0\",\n \"withdrawalMinFee\": \"0.000015\",\n \"isWithdrawEnabled\": true,\n \"isDepositEnabled\": true,\n \"confirms\": 1,\n \"preConfirms\": 1,\n \"contractAddress\": \"\",\n \"withdrawPrecision\": 8,\n \"maxWithdraw\": null,\n \"maxDeposit\": \"0.03\",\n \"needTag\": false,\n \"chainId\": \"btcln\"\n },\n {\n \"chainName\": \"KCC\",\n \"withdrawalMinSize\": \"0.0008\",\n \"depositMinSize\": null,\n \"withdrawFeeRate\": \"0\",\n \"withdrawalMinFee\": \"0.00002\",\n \"isWithdrawEnabled\": true,\n \"isDepositEnabled\": true,\n \"confirms\": 20,\n \"preConfirms\": 20,\n \"contractAddress\": \"0xfa93c12cd345c658bc4644d1d4e1b9615952258c\",\n \"withdrawPrecision\": 8,\n \"maxWithdraw\": null,\n \"maxDeposit\": null,\n \"needTag\": false,\n \"chainId\": \"kcc\"\n },\n {\n \"chainName\": \"BTC-Segwit\",\n \"withdrawalMinSize\": \"0.0008\",\n \"depositMinSize\": \"0.0002\",\n \"withdrawFeeRate\": \"0\",\n \"withdrawalMinFee\": \"0.0005\",\n \"isWithdrawEnabled\": false,\n \"isDepositEnabled\": true,\n \"confirms\": 2,\n \"preConfirms\": 2,\n \"contractAddress\": \"\",\n \"withdrawPrecision\": 8,\n \"maxWithdraw\": null,\n \"maxDeposit\": null,\n \"needTag\": false,\n \"chainId\": \"bech32\"\n }\n ]\n },\n {\n \"currency\": \"BTCP\",\n \"name\": \"BTCP\",\n \"fullName\": \"Bitcoin Private\",\n \"precision\": 8,\n \"confirms\": null,\n \"contractAddress\": null,\n \"isMarginEnabled\": false,\n \"isDebitEnabled\": false,\n \"chains\": [\n {\n \"chainName\": \"BTCP\",\n \"withdrawalMinSize\": \"0.100000\",\n \"depositMinSize\": null,\n \"withdrawFeeRate\": \"0\",\n \"withdrawalMinFee\": \"0.010000\",\n \"isWithdrawEnabled\": false,\n \"isDepositEnabled\": false,\n \"confirms\": 6,\n \"preConfirms\": 6,\n \"contractAddress\": \"\",\n \"withdrawPrecision\": 8,\n \"maxWithdraw\": null,\n \"maxDeposit\": null,\n \"needTag\": false,\n \"chainId\": \"btcp\"\n }\n ]\n }\n ]\n}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"currency\\\": \\\"BTC\\\",\\n" + + " \\\"name\\\": \\\"BTC\\\",\\n" + + " \\\"fullName\\\": \\\"Bitcoin\\\",\\n" + + " \\\"precision\\\": 8,\\n" + + " \\\"confirms\\\": null,\\n" + + " \\\"contractAddress\\\": null,\\n" + + " \\\"isMarginEnabled\\\": true,\\n" + + " \\\"isDebitEnabled\\\": true,\\n" + + " \\\"chains\\\": [\\n" + + " {\\n" + + " \\\"chainName\\\": \\\"BTC\\\",\\n" + + " \\\"withdrawalMinSize\\\": \\\"0.001\\\",\\n" + + " \\\"depositMinSize\\\": \\\"0.0002\\\",\\n" + + " \\\"withdrawFeeRate\\\": \\\"0\\\",\\n" + + " \\\"withdrawalMinFee\\\": \\\"0.0005\\\",\\n" + + " \\\"isWithdrawEnabled\\\": true,\\n" + + " \\\"isDepositEnabled\\\": true,\\n" + + " \\\"confirms\\\": 3,\\n" + + " \\\"preConfirms\\\": 1,\\n" + + " \\\"contractAddress\\\": \\\"\\\",\\n" + + " \\\"withdrawPrecision\\\": 8,\\n" + + " \\\"maxWithdraw\\\": null,\\n" + + " \\\"maxDeposit\\\": null,\\n" + + " \\\"needTag\\\": false,\\n" + + " \\\"chainId\\\": \\\"btc\\\"\\n" + + " },\\n" + + " {\\n" + + " \\\"chainName\\\": \\\"Lightning Network\\\",\\n" + + " \\\"withdrawalMinSize\\\": \\\"0.00001\\\",\\n" + + " \\\"depositMinSize\\\": \\\"0.00001\\\",\\n" + + " \\\"withdrawFeeRate\\\": \\\"0\\\",\\n" + + " \\\"withdrawalMinFee\\\": \\\"0.000015\\\",\\n" + + " \\\"isWithdrawEnabled\\\": true,\\n" + + " \\\"isDepositEnabled\\\": true,\\n" + + " \\\"confirms\\\": 1,\\n" + + " \\\"preConfirms\\\": 1,\\n" + + " \\\"contractAddress\\\": \\\"\\\",\\n" + + " \\\"withdrawPrecision\\\": 8,\\n" + + " \\\"maxWithdraw\\\": null,\\n" + + " \\\"maxDeposit\\\": \\\"0.03\\\",\\n" + + " \\\"needTag\\\": false,\\n" + + " \\\"chainId\\\": \\\"btcln\\\"\\n" + + " },\\n" + + " {\\n" + + " \\\"chainName\\\": \\\"KCC\\\",\\n" + + " \\\"withdrawalMinSize\\\": \\\"0.0008\\\",\\n" + + " \\\"depositMinSize\\\": null,\\n" + + " \\\"withdrawFeeRate\\\": \\\"0\\\",\\n" + + " \\\"withdrawalMinFee\\\": \\\"0.00002\\\",\\n" + + " \\\"isWithdrawEnabled\\\": true,\\n" + + " \\\"isDepositEnabled\\\": true,\\n" + + " \\\"confirms\\\": 20,\\n" + + " \\\"preConfirms\\\": 20,\\n" + + " \\\"contractAddress\\\":" + + " \\\"0xfa93c12cd345c658bc4644d1d4e1b9615952258c\\\",\\n" + + " \\\"withdrawPrecision\\\": 8,\\n" + + " \\\"maxWithdraw\\\": null,\\n" + + " \\\"maxDeposit\\\": null,\\n" + + " \\\"needTag\\\": false,\\n" + + " \\\"chainId\\\": \\\"kcc\\\"\\n" + + " },\\n" + + " {\\n" + + " \\\"chainName\\\": \\\"BTC-Segwit\\\",\\n" + + " \\\"withdrawalMinSize\\\": \\\"0.0008\\\",\\n" + + " \\\"depositMinSize\\\": \\\"0.0002\\\",\\n" + + " \\\"withdrawFeeRate\\\": \\\"0\\\",\\n" + + " \\\"withdrawalMinFee\\\": \\\"0.0005\\\",\\n" + + " \\\"isWithdrawEnabled\\\": false,\\n" + + " \\\"isDepositEnabled\\\": true,\\n" + + " \\\"confirms\\\": 2,\\n" + + " \\\"preConfirms\\\": 2,\\n" + + " \\\"contractAddress\\\": \\\"\\\",\\n" + + " \\\"withdrawPrecision\\\": 8,\\n" + + " \\\"maxWithdraw\\\": null,\\n" + + " \\\"maxDeposit\\\": null,\\n" + + " \\\"needTag\\\": false,\\n" + + " \\\"chainId\\\": \\\"bech32\\\"\\n" + + " }\\n" + + " ]\\n" + + " },\\n" + + " {\\n" + + " \\\"currency\\\": \\\"BTCP\\\",\\n" + + " \\\"name\\\": \\\"BTCP\\\",\\n" + + " \\\"fullName\\\": \\\"Bitcoin Private\\\",\\n" + + " \\\"precision\\\": 8,\\n" + + " \\\"confirms\\\": null,\\n" + + " \\\"contractAddress\\\": null,\\n" + + " \\\"isMarginEnabled\\\": false,\\n" + + " \\\"isDebitEnabled\\\": false,\\n" + + " \\\"chains\\\": [\\n" + + " {\\n" + + " \\\"chainName\\\": \\\"BTCP\\\",\\n" + + " \\\"withdrawalMinSize\\\": \\\"0.100000\\\",\\n" + + " \\\"depositMinSize\\\": null,\\n" + + " \\\"withdrawFeeRate\\\": \\\"0\\\",\\n" + + " \\\"withdrawalMinFee\\\": \\\"0.010000\\\",\\n" + + " \\\"isWithdrawEnabled\\\": false,\\n" + + " \\\"isDepositEnabled\\\": false,\\n" + + " \\\"confirms\\\": 6,\\n" + + " \\\"preConfirms\\\": 6,\\n" + + " \\\"contractAddress\\\": \\\"\\\",\\n" + + " \\\"withdrawPrecision\\\": 8,\\n" + + " \\\"maxWithdraw\\\": null,\\n" + + " \\\"maxDeposit\\\": null,\\n" + + " \\\"needTag\\\": false,\\n" + + " \\\"chainId\\\": \\\"btcp\\\"\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + + " ]\\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * getSymbol Request - * Get Symbol - * /api/v2/symbols/{symbol} - */ + + /** getSymbol Request Get Symbol /api/v2/symbols/{symbol} */ public static void testGetSymbolRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\"}"; + String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; GetSymbolReq obj = mapper.readValue(data, GetSymbolReq.class); } - /** - * getSymbol Response - * Get Symbol - * /api/v2/symbols/{symbol} - */ + /** getSymbol Response Get Symbol /api/v2/symbols/{symbol} */ public static void testGetSymbolResponse() throws Exception { String 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}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * getAllSymbols Request - * Get All Symbols - * /api/v2/symbols - */ + + /** getAllSymbols Request Get All Symbols /api/v2/symbols */ public static void testGetAllSymbolsRequest() throws Exception { - String data = "{\"market\": \"ALTS\"}"; + String data = "{\\\"market\\\": \\\"ALTS\\\"}"; GetAllSymbolsReq obj = mapper.readValue(data, GetAllSymbolsReq.class); } - /** - * getAllSymbols Response - * Get All Symbols - * /api/v2/symbols - */ + /** getAllSymbols Response Get All Symbols /api/v2/symbols */ public static void testGetAllSymbolsResponse() throws Exception { String 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}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * getTicker Request - * Get Ticker - * /api/v1/market/orderbook/level1 - */ + + /** getTicker Request Get Ticker /api/v1/market/orderbook/level1 */ public static void testGetTickerRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\"}"; + String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; GetTickerReq obj = mapper.readValue(data, GetTickerReq.class); } - /** - * getTicker Response - * Get Ticker - * /api/v1/market/orderbook/level1 - */ + /** getTicker Response Get Ticker /api/v1/market/orderbook/level1 */ public static void testGetTickerResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"time\":1729172965609,\"sequence\":\"14609309753\",\"price\":\"67269\",\"size\":\"0.000025\",\"bestBid\":\"67267.5\",\"bestBidSize\":\"0.000025\",\"bestAsk\":\"67267.6\",\"bestAskSize\":\"1.24808993\"}}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"time\\\":1729172965609,\\\"sequence\\\":\\\"14609309753\\\",\\\"price\\\":\\\"67269\\\",\\\"size\\\":\\\"0.000025\\\",\\\"bestBid\\\":\\\"67267.5\\\",\\\"bestBidSize\\\":\\\"0.000025\\\",\\\"bestAsk\\\":\\\"67267.6\\\",\\\"bestAskSize\\\":\\\"1.24808993\\\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * getAllTickers Request - * Get All Tickers - * /api/v1/market/allTickers - */ + + /** getAllTickers Request Get All Tickers /api/v1/market/allTickers */ public static void testGetAllTickersRequest() throws Exception { // $this->assertTrue(true); } - /** - * getAllTickers Response - * Get All Tickers - * /api/v1/market/allTickers - */ + /** getAllTickers Response Get All Tickers /api/v1/market/allTickers */ public static void testGetAllTickersResponse() throws Exception { String data = - "{\n \"code\": \"200000\",\n \"data\": {\n \"time\": 1729173207043,\n \"ticker\": [\n {\n \"symbol\": \"BTC-USDT\",\n \"symbolName\": \"BTC-USDT\",\n \"buy\": \"67192.5\",\n \"bestBidSize\": \"0.000025\",\n \"sell\": \"67192.6\",\n \"bestAskSize\": \"1.24949204\",\n \"changeRate\": \"-0.0014\",\n \"changePrice\": \"-98.5\",\n \"high\": \"68321.4\",\n \"low\": \"66683.3\",\n \"vol\": \"1836.03034612\",\n \"volValue\": \"124068431.06726933\",\n \"last\": \"67193\",\n \"averagePrice\": \"67281.21437289\",\n \"takerFeeRate\": \"0.001\",\n \"makerFeeRate\": \"0.001\",\n \"takerCoefficient\": \"1\",\n \"makerCoefficient\": \"1\"\n }\n ]\n }\n}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"time\\\": 1729173207043,\\n" + + " \\\"ticker\\\": [\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"symbolName\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"buy\\\": \\\"67192.5\\\",\\n" + + " \\\"bestBidSize\\\": \\\"0.000025\\\",\\n" + + " \\\"sell\\\": \\\"67192.6\\\",\\n" + + " \\\"bestAskSize\\\": \\\"1.24949204\\\",\\n" + + " \\\"changeRate\\\": \\\"-0.0014\\\",\\n" + + " \\\"changePrice\\\": \\\"-98.5\\\",\\n" + + " \\\"high\\\": \\\"68321.4\\\",\\n" + + " \\\"low\\\": \\\"66683.3\\\",\\n" + + " \\\"vol\\\": \\\"1836.03034612\\\",\\n" + + " \\\"volValue\\\": \\\"124068431.06726933\\\",\\n" + + " \\\"last\\\": \\\"67193\\\",\\n" + + " \\\"averagePrice\\\": \\\"67281.21437289\\\",\\n" + + " \\\"takerFeeRate\\\": \\\"0.001\\\",\\n" + + " \\\"makerFeeRate\\\": \\\"0.001\\\",\\n" + + " \\\"takerCoefficient\\\": \\\"1\\\",\\n" + + " \\\"makerCoefficient\\\": \\\"1\\\"\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * getTradeHistory Request - * Get Trade History - * /api/v1/market/histories - */ + + /** getTradeHistory Request Get Trade History /api/v1/market/histories */ public static void testGetTradeHistoryRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\"}"; + String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; GetTradeHistoryReq obj = mapper.readValue(data, GetTradeHistoryReq.class); } - /** - * getTradeHistory Response - * Get Trade History - * /api/v1/market/histories - */ + /** getTradeHistory Response Get Trade History /api/v1/market/histories */ public static void testGetTradeHistoryResponse() throws Exception { String data = - "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"sequence\": \"10976028003549185\",\n \"price\": \"67122\",\n \"size\": \"0.000025\",\n \"side\": \"buy\",\n \"time\": 1729177117877000000\n },\n {\n \"sequence\": \"10976028003549188\",\n \"price\": \"67122\",\n \"size\": \"0.01792257\",\n \"side\": \"buy\",\n \"time\": 1729177117877000000\n },\n {\n \"sequence\": \"10976028003549191\",\n \"price\": \"67122.9\",\n \"size\": \"0.05654289\",\n \"side\": \"buy\",\n \"time\": 1729177117877000000\n }\n ]\n}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"sequence\\\": \\\"10976028003549185\\\",\\n" + + " \\\"price\\\": \\\"67122\\\",\\n" + + " \\\"size\\\": \\\"0.000025\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"time\\\": 1729177117877000000\\n" + + " },\\n" + + " {\\n" + + " \\\"sequence\\\": \\\"10976028003549188\\\",\\n" + + " \\\"price\\\": \\\"67122\\\",\\n" + + " \\\"size\\\": \\\"0.01792257\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"time\\\": 1729177117877000000\\n" + + " },\\n" + + " {\\n" + + " \\\"sequence\\\": \\\"10976028003549191\\\",\\n" + + " \\\"price\\\": \\\"67122.9\\\",\\n" + + " \\\"size\\\": \\\"0.05654289\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"time\\\": 1729177117877000000\\n" + + " }\\n" + + " ]\\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * getKlines Request - * Get Klines - * /api/v1/market/candles - */ + + /** getKlines Request Get Klines /api/v1/market/candles */ public static void testGetKlinesRequest() throws Exception { String data = - "{\"symbol\": \"BTC-USDT\", \"type\": \"1min\", \"startAt\": 1566703297, \"endAt\": 1566789757}"; + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"type\\\": \\\"1min\\\", \\\"startAt\\\":" + + " 1566703297, \\\"endAt\\\": 1566789757}"; GetKlinesReq obj = mapper.readValue(data, GetKlinesReq.class); } - /** - * getKlines Response - * Get Klines - * /api/v1/market/candles - */ + /** getKlines Response Get Klines /api/v1/market/candles */ public static void testGetKlinesResponse() throws Exception { String data = - "{\n \"code\": \"200000\",\n \"data\": [\n [\n \"1566789720\",\n \"10411.5\",\n \"10401.9\",\n \"10411.5\",\n \"10396.3\",\n \"29.11357276\",\n \"302889.301529914\"\n ],\n [\n \"1566789660\",\n \"10416\",\n \"10411.5\",\n \"10422.3\",\n \"10411.5\",\n \"15.61781842\",\n \"162703.708997029\"\n ],\n [\n \"1566789600\",\n \"10408.6\",\n \"10416\",\n \"10416\",\n \"10405.4\",\n \"12.45584973\",\n \"129666.51508559\"\n ]\n ]\n}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " [\\n" + + " \\\"1566789720\\\",\\n" + + " \\\"10411.5\\\",\\n" + + " \\\"10401.9\\\",\\n" + + " \\\"10411.5\\\",\\n" + + " \\\"10396.3\\\",\\n" + + " \\\"29.11357276\\\",\\n" + + " \\\"302889.301529914\\\"\\n" + + " ],\\n" + + " [\\n" + + " \\\"1566789660\\\",\\n" + + " \\\"10416\\\",\\n" + + " \\\"10411.5\\\",\\n" + + " \\\"10422.3\\\",\\n" + + " \\\"10411.5\\\",\\n" + + " \\\"15.61781842\\\",\\n" + + " \\\"162703.708997029\\\"\\n" + + " ],\\n" + + " [\\n" + + " \\\"1566789600\\\",\\n" + + " \\\"10408.6\\\",\\n" + + " \\\"10416\\\",\\n" + + " \\\"10416\\\",\\n" + + " \\\"10405.4\\\",\\n" + + " \\\"12.45584973\\\",\\n" + + " \\\"129666.51508559\\\"\\n" + + " ]\\n" + + " ]\\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * getPartOrderBook Request - * Get Part OrderBook - * /api/v1/market/orderbook/level2_{size} - */ + + /** getPartOrderBook Request Get Part OrderBook /api/v1/market/orderbook/level2_{size} */ public static void testGetPartOrderBookRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\", \"size\": \"20\"}"; + String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"size\\\": \\\"20\\\"}"; GetPartOrderBookReq obj = mapper.readValue(data, GetPartOrderBookReq.class); } - /** - * getPartOrderBook Response - * Get Part OrderBook - * /api/v1/market/orderbook/level2_{size} - */ + /** getPartOrderBook Response Get Part OrderBook /api/v1/market/orderbook/level2_{size} */ public static void testGetPartOrderBookResponse() throws Exception { String 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}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * getFullOrderBook Request - * Get Full OrderBook - * /api/v3/market/orderbook/level2 - */ + + /** getFullOrderBook Request Get Full OrderBook /api/v3/market/orderbook/level2 */ public static void testGetFullOrderBookRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\"}"; + String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; GetFullOrderBookReq obj = mapper.readValue(data, GetFullOrderBookReq.class); } - /** - * getFullOrderBook Response - * Get Full OrderBook - * /api/v3/market/orderbook/level2 - */ + /** getFullOrderBook Response Get Full OrderBook /api/v3/market/orderbook/level2 */ public static void testGetFullOrderBookResponse() throws Exception { String 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}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } + /** - * getCallAuctionPartOrderBook Request - * Get Call Auction Part OrderBook + * getCallAuctionPartOrderBook Request Get Call Auction Part OrderBook * /api/v1/market/orderbook/callauction/level2_{size} */ public static void testGetCallAuctionPartOrderBookRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\", \"size\": \"20\"}"; + String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"size\\\": \\\"20\\\"}"; GetCallAuctionPartOrderBookReq obj = mapper.readValue(data, GetCallAuctionPartOrderBookReq.class); } /** - * getCallAuctionPartOrderBook Response - * Get Call Auction Part OrderBook + * getCallAuctionPartOrderBook Response Get Call Auction Part OrderBook * /api/v1/market/orderbook/callauction/level2_{size} */ - public static void testGetCallAuctionPartOrderBookResponse() - throws Exception { + public static void testGetCallAuctionPartOrderBookResponse() throws Exception { String 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}"; - RestResponse resp = mapper.readValue( - data, - new TypeReference>() {}); + "{\\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" + + "}"; + RestResponse resp = + mapper.readValue( + data, new TypeReference>() {}); } - /** - * getCallAuctionInfo Request - * Get Call Auction Info - * /api/v1/market/callauctionData - */ + + /** getCallAuctionInfo Request Get Call Auction Info /api/v1/market/callauctionData */ public static void testGetCallAuctionInfoRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\"}"; - GetCallAuctionInfoReq obj = - mapper.readValue(data, GetCallAuctionInfoReq.class); + String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; + GetCallAuctionInfoReq obj = mapper.readValue(data, GetCallAuctionInfoReq.class); } - /** - * getCallAuctionInfo Response - * Get Call Auction Info - * /api/v1/market/callauctionData - */ + /** getCallAuctionInfo Response Get Call Auction Info /api/v1/market/callauctionData */ public static void testGetCallAuctionInfoResponse() throws Exception { String 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}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\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" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * getFiatPrice Request - * Get Fiat Price - * /api/v1/prices - */ + + /** getFiatPrice Request Get Fiat Price /api/v1/prices */ public static void testGetFiatPriceRequest() throws Exception { String data = - "{\"base\": \"USD\", \"currencies\": \"example_string_default_value\"}"; + "{\\\"base\\\": \\\"USD\\\", \\\"currencies\\\": \\\"example_string_default_value\\\"}"; GetFiatPriceReq obj = mapper.readValue(data, GetFiatPriceReq.class); } - /** - * getFiatPrice Response - * Get Fiat Price - * /api/v1/prices - */ + /** getFiatPrice Response Get Fiat Price /api/v1/prices */ public static void testGetFiatPriceResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"AGLD\":\"1.1174410000000001\",\"DFI\":\"0.0168915500000000\",\"PYTHUP\":\"0.0397880960000000\",\"ISLM\":\"0.0606196750000000\",\"NEAR\":\"4.7185395500000000\",\"AIOZ\":\"0.4862867350000000\",\"AUDIO\":\"0.1219390000000000\",\"BBL\":\"0.0067766100000000\",\"WLD\":\"2.2893547500000000\",\"HNT\":\"5.8990489999999984\",\"ETHFI\":\"1.5892050000000000\",\"DMAIL\":\"0.2726636000000000\",\"OPUP\":\"0.0986506500000000\",\"VET3S\":\"0.0003700448850000\",\"MANA3S\":\"0.0006056970000000\",\"TIDAL\":\"0.0001154422500000\",\"HALO\":\"0.0058270850000000\",\"OPUL\":\"0.0839480050000000\",\"MANA3L\":\"0.0029569407900000\",\"DGB\":\"0.0066556705000000\",\"AA\":\"0.2406796000000000\",\"BCH\":\"366.2167999999996484\",\"GMEE\":\"0.0113333305000000\",\"JST\":\"0.0302348750000000\",\"PBUX\":\"0.0208795550000000\",\"AR\":\"18.5457224999999909\",\"SEI\":\"0.4332832500000000\",\"PSTAKE\":\"0.0493153300000000\",\"LMWR\":\"0.1618190500000000\",\"UNFIDOWN\":\"0.0062058955000000\",\"BB\":\"0.3245376500000000\",\"JTO\":\"2.1239375000000002\",\"WEMIX\":\"0.7916040000000000\",\"G\":\"0.0324037900000000\",\"MARSH\":\"0.0617591050000000\",\"BN\":\"0.0036961510000000\",\"FLIP\":\"1.0976509000000000\",\"FLR\":\"0.0144827550000000\",\"BIGTIME\":\"0.1238780300000000\",\"FLY\":\"0.0005157420000000\",\"T\":\"0.0233483200000000\",\"W\":\"0.2865566500000000\",\"BDX\":\"0.0774012800000000\",\"BABYDOGE\":\"0.0000000029375305\",\"SFP\":\"0.7256370000000000\",\"DIA\":\"0.9179408000000000\",\"ISME\":\"0.0022388800000000\",\"LYM\":\"0.0010155919500000\",\"VET3L\":\"0.0000289755050000\",\"JUP\":\"0.8230882500000000\",\"LYX\":\"1.4501745500000001\",\"AIEPK\":\"0.0050094940000000\",\"SILLY\":\"0.0159420250000000\",\"SCPT\":\"0.0122038950000000\",\"WOO\":\"0.1796601250000000\",\"BLUR\":\"0.2462768000000000\",\"STRK\":\"0.3963117450000000\",\"BFC\":\"0.0383608100000000\",\"DC\":\"0.0003097450500000\",\"KARATE\":\"0.0007296350000000\",\"SUSHI3L\":\"0.5115441000000000\",\"NETVR\":\"0.0976111700000000\",\"WAVES\":\"1.0806594000000000\",\"LITH\":\"0.0001520239500000\",\"HAPI\":\"8.6533711499999987\",\"SUSHI3S\":\"1.2752620500000000\",\"CEEK\":\"0.0294852500000000\",\"FLOKI\":\"0.0001414292500000\",\"SHR\":\"0.0012463765000000\",\"SAND\":\"0.2566616050000000\",\"TURT\":\"0.0020889550000000\",\"UMA\":\"2.5207390000000000\",\"BEPRO\":\"0.0003955021500000\",\"SCRT\":\"0.1995002000000000\",\"TUSD\":\"0.9945025000000000\",\"COOKIE\":\"0.0220089900000000\",\"LRDS\":\"0.6218889000000000\",\"SIN\":\"0.0033633175000000\",\"OAS\":\"0.0331933950000000\",\"ROOT\":\"0.0183108400000000\",\"ADA3L\":\"0.0046396790000000\",\"TIAUP\":\"0.1228385500000000\",\"HTR\":\"0.0353023400000000\",\"UNB\":\"0.0003837080500000\",\"UNA\":\"0.0164917500000000\",\"HARD\":\"0.1087056200000000\",\"G3\":\"0.0502648550000000\",\"ADA3S\":\"0.0006191202850000\",\"MYRO\":\"0.1071863800000000\",\"HTX\":\"0.0000013693150000\",\"FT\":\"0.3585206500000000\",\"BTCDOWN\":\"0.1065467000000000\",\"UNI\":\"7.3571195999999993\",\"FX\":\"0.1379310000000000\",\"OBI\":\"0.0079030465000000\",\"UNO\":\"0.0137131400000000\",\"WRX\":\"0.1221389000000000\",\"TIADOWN\":\"0.0000914642450000\",\"ETHDOWN\":\"0.1306346500000000\",\"WELL\":\"0.0471244260000000\",\"SWFTC\":\"0.0028966509500000\",\"SKL\":\"0.0362418700000000\",\"UOS\":\"0.0867765900000000\",\"AIPAD\":\"0.0478660550000000\",\"BRETT\":\"0.1037481000000000\",\"SKY\":\"0.0520139800000000\",\"FRM\":\"0.0153123400000000\",\"VISION\":\"0.0014451770500000\",\"LENDS\":\"0.0047276350000000\",\"SLF\":\"0.3318340000000000\",\"BULL\":\"0.0023988000000000\",\"FLOW\":\"0.5372312500000000\",\"ODDZ\":\"0.0063368300000000\",\"SLN\":\"0.2804597000000000\",\"UPO\":\"0.0440779500000000\",\"SLP\":\"0.0023997995000000\",\"ID\":\"0.3718140000000000\",\"SLIM\":\"0.0906446550000000\",\"SPOT\":\"0.0021289350000000\",\"DOP\":\"0.0023028480000000\",\"ISSP\":\"0.0000874562500000\",\"UQC\":\"3.2339822000000003\",\"IO\":\"1.8185902499999999\",\"DOT\":\"4.2022978000000005\",\"1INCH\":\"0.2645676500000000\",\"SMH\":\"0.3448275000000000\",\"MAK\":\"0.0396701550000000\",\"TOKO\":\"0.0005923037000000\",\"TURBO\":\"0.0108085930000000\",\"UNFI\":\"2.8555714999999996\",\"MAN\":\"0.0210764565000000\",\"EVER\":\"0.0332733550000000\",\"FTM\":\"0.7259068650000000\",\"SHRAP\":\"0.0476361700000000\",\"MAV\":\"0.1738130500000000\",\"MAX\":\"0.2864966800000000\",\"DPR\":\"0.0018240875000000\",\"FTT\":\"2.0559715000000002\",\"ARKM\":\"1.7444273499999999\",\"ATOM\":\"4.2954512000000002\",\"PENDLE\":\"4.1554212500000007\",\"QUICK\":\"0.0365317250000000\",\"BLZ\":\"0.1217191100000000\",\"BOBA\":\"0.2014092450000000\",\"MBL\":\"0.0027856065000000\",\"OFN\":\"0.1252373500000000\",\"UNIO\":\"0.0025487250000000\",\"SNS\":\"0.0200899500000000\",\"SNX\":\"1.4282854999999999\",\"NXRA\":\"0.0272763550000000\",\"TAIKO\":\"1.4392800000000001\",\"AVAX3L\":\"0.1410875109550000\",\"L3\":\"0.0608395650000000\",\"API3\":\"1.3728132500000001\",\"XRP3S\":\"0.0028095945000000\",\"QKC\":\"0.0085157400000000\",\"AVAX3S\":\"0.5148424500000000\",\"ROSE\":\"0.0693453100000000\",\"SATS\":\"0.0000002701648500\",\"BMX\":\"0.3100449000000000\",\"PORTAL\":\"0.2811593500000000\",\"TOMI\":\"0.0309045400000000\",\"XRP3L\":\"2.1586201500000002\",\"SOL\":\"151.7250995000003583\",\"SON\":\"0.0002421788500000\",\"BNC\":\"0.1882058500000000\",\"SOCIAL\":\"0.0026486750000000\",\"CGPT\":\"0.1305147100000000\",\"CELR\":\"0.0127736100000000\",\"BNB\":\"591.0973035000118935\",\"OGN\":\"0.0852573500000000\",\"CELO\":\"0.7711142500000000\",\"AUCTION\":\"13.1634150000000014\",\"MANTA\":\"0.7564216000000000\",\"LAYER\":\"0.0372713550000000\",\"AERO\":\"1.3783104999999999\",\"CETUS\":\"0.1808295400000000\",\"LL\":\"0.0201199350000000\",\"SPA\":\"0.0067426270000000\",\"PYTHDOWN\":\"0.0011834080000000\",\"NEIROCTO\":\"0.0019964013000000\",\"UTK\":\"0.0365217300000000\",\"GMRX\":\"0.0007386305000000\",\"BOB\":\"0.0000380619595000\",\"HOTCROSS\":\"0.0056491740000000\",\"AERGO\":\"0.1007595950000000\",\"MOCA\":\"0.0783608000000000\",\"SQD\":\"0.0380809500000000\",\"MV\":\"0.0081359300000000\",\"BNB3L\":\"0.2761618500000000\",\"BNB3S\":\"0.0008545725000000\",\"GALAX3L\":\"0.0057571999600000\",\"KAI\":\"0.0020080954500000\",\"SQR\":\"0.0470764500000000\",\"GALAX3S\":\"0.1933033000000000\",\"EGLD\":\"25.5272299999999713\",\"ZBCN\":\"0.0010404795000000\",\"KAS\":\"0.1216691350000000\",\"MEW\":\"0.0086176890000000\",\"PUNDIX\":\"0.4130933500000000\",\"LOOKS\":\"0.0392803500000000\",\"FXS\":\"1.9060465000000000\",\"BOSON\":\"0.2732633000000000\",\"BRISE\":\"0.0000000860569500\",\"AEVO\":\"0.3388305000000000\",\"FLUX\":\"0.5276360500000000\",\"PRCL\":\"0.1969015000000000\",\"UNFIUP\":\"0.0011654170000000\",\"SEIDOWN\":\"0.0442778500000000\",\"DOAI\":\"0.0052363805000000\",\"QNT\":\"65.4312679999998206\",\"REDO\":\"0.2837580500000000\",\"STRIKE\":\"6.8225869999999997\",\"ETHW\":\"3.2418782499999998\",\"OM\":\"1.5396797750000000\",\"OP\":\"1.6911539999999999\",\"WHALE\":\"0.8134930500000000\",\"1CAT\":\"0.0018460765000000\",\"NEON\":\"0.4446775500000000\",\"GTAI\":\"0.7786105000000000\",\"SSV\":\"21.2393749999999841\",\"ETH2\":\"2601.6678843156403923\",\"KCS\":\"8.7646155000000020\",\"ARPA\":\"0.0393882960000000\",\"ARTFI\":\"0.0141029450000000\",\"BRL\":\"0.1742807323452485\",\"ALEX\":\"0.0924537500000000\",\"STG\":\"0.2943527500000000\",\"SHIB\":\"0.0000178060925000\",\"IOTX\":\"0.0394202800000000\",\"OLE\":\"0.0171414250000000\",\"KDA\":\"0.5653172000000000\",\"CERE\":\"0.0022548720000000\",\"DOCK\":\"0.0018990500000000\",\"STX\":\"1.8157916500000000\",\"OLT\":\"0.0007596200000000\",\"QI\":\"0.0131754090000000\",\"SDAO\":\"0.2748625000000000\",\"BLAST\":\"0.0087636160000000\",\"LINK3S\":\"0.0000702948350000\",\"IOST\":\"0.0049745115000000\",\"SUI\":\"2.0589700000000000\",\"CAKE\":\"1.7941024999999999\",\"BSW\":\"0.0586706500000000\",\"OMG\":\"0.2597700500000000\",\"VOLT\":\"0.0000002716641000\",\"LINK3L\":\"1.3408292499999999\",\"GEEQ\":\"0.0385607100000000\",\"PYUSD\":\"0.9988003500000000\",\"SUN\":\"0.0186106900000000\",\"TOWER\":\"0.0014812590000000\",\"BTC\":\"67133.4165000832051564\",\"IOTA\":\"0.1189405000000000\",\"REEF\":\"0.0019960015000000\",\"TRIAS\":\"3.3683149999999998\",\"KEY\":\"0.0037594713240047\",\"ETH3L\":\"0.0003305946200000\",\"BTT\":\"0.0000009117439000\",\"ONE\":\"0.0132003965000000\",\"RENDER\":\"5.2263854999999995\",\"ETH3S\":\"0.5517240000000000\",\"ANKR\":\"0.0264867500000000\",\"ALGO\":\"0.1188405500000000\",\"SYLO\":\"0.0007600198000000\",\"ZCX\":\"0.0784707450000000\",\"SD\":\"0.3851073500000000\",\"ONT\":\"0.1877960550000000\",\"MJT\":\"0.0132433750000000\",\"DYM\":\"1.6659666000000001\",\"DYP\":\"0.0205397250000000\",\"BAKEUP\":\"0.0389894955000000\",\"OOE\":\"0.0079360300000000\",\"ZELIX\":\"0.0000649675000000\",\"DOGE3L\":\"0.3837080500000000\",\"ARTY\":\"0.3980009000000000\",\"QORPO\":\"0.1204297550000000\",\"ICE\":\"0.0051504235000000\",\"NOTAI\":\"0.0000892753400000\",\"DOGE3S\":\"0.2291853500000000\",\"NAKA\":\"1.0695649500000000\",\"GALAX\":\"0.0212893500000000\",\"MKR\":\"1245.8767500000163833\",\"DODO\":\"0.1152423500000000\",\"ICP\":\"7.6731615000000027\",\"ZEC\":\"35.9400209999999543\",\"ZEE\":\"0.0065767100000000\",\"ICX\":\"0.1383308000000000\",\"KMNO\":\"0.0921499020000000\",\"TT\":\"0.0033883050000000\",\"DOT3L\":\"0.1454272500000000\",\"XAI\":\"0.2038980000000000\",\"ZEN\":\"8.0149905000000007\",\"DOGE\":\"0.1213093150000000\",\"ALPHA\":\"0.0567416150000000\",\"DUSK\":\"0.1964517250000000\",\"DOT3S\":\"0.0053613180000000\",\"SXP\":\"0.2538730000000000\",\"HBAR\":\"0.0510044850000000\",\"SYNT\":\"0.0467166300000000\",\"ZEX\":\"0.0571714000000000\",\"BONDLY\":\"0.0022208890000000\",\"MLK\":\"0.2080859050000000\",\"KICKS\":\"0.0001301249050000\",\"PEPE\":\"0.0000100249850000\",\"OUSD\":\"0.9982006500000000\",\"LUNCDOWN\":\"0.0000733333150000\",\"DOGS\":\"0.0007086455000000\",\"REV3L\":\"0.0094672640000000\",\"CTSI\":\"0.1257371000000000\",\"C98\":\"0.1219390000000000\",\"OSMO\":\"0.5370313500000000\",\"NTRN\":\"0.3869064500000000\",\"CFX2S\":\"0.0084757600000000\",\"SYN\":\"0.5636180500000000\",\"VIDT\":\"0.0308745550000000\",\"SYS\":\"0.0997501000000000\",\"GAS\":\"4.3029474500000008\",\"BOME\":\"0.0087336310000000\",\"COMBO\":\"0.4068964500000000\",\"XCH\":\"14.9825050000000010\",\"VR\":\"0.0063538215000000\",\"CFX2L\":\"0.0499660045000000\",\"VSYS\":\"0.0005201398000000\",\"PANDORA\":\"1629.2949450001102772\",\"THETA\":\"1.2461766000000000\",\"XCN\":\"0.0012699647000000\",\"NEXG\":\"0.0039180400000000\",\"MELOS\":\"0.0021244372500000\",\"XCV\":\"0.0013253370000000\",\"ORN\":\"0.8797599000000000\",\"WLKN\":\"0.0010624685000000\",\"AAVE\":\"154.2708259999996162\",\"MNT\":\"0.6168914000000000\",\"BONK\":\"0.0000227296295000\",\"PERP\":\"0.6037979500000000\",\"XDC\":\"0.0276361750000000\",\"MNW\":\"0.3681158500000000\",\"XDB\":\"0.0002578710000000\",\"BOND\":\"1.5662165000000000\",\"SUIA\":\"0.0809595000000000\",\"MOG\":\"0.0000019330330000\",\"SUTER\":\"0.0001840079500000\",\"TIME\":\"16.2648634999999969\",\"RACA\":\"0.0001949025000000\",\"BICO\":\"0.2021988500000000\",\"MON\":\"0.1066466500000000\",\"SWEAT\":\"0.0063718125000000\",\"MOXIE\":\"0.0022088950000000\",\"BABYBNB\":\"0.0289755050000000\",\"IGU\":\"0.0050674650000000\",\"HMSTR\":\"0.0037990995000000\",\"XEC\":\"0.0000354722550000\",\"MONI\":\"0.0058470750000000\",\"XR\":\"0.2374812000000000\",\"PEOPLE\":\"0.0796601500000000\",\"PUMLX\":\"0.0054572700000000\",\"ZIL\":\"0.0145927000000000\",\"WLDDOWN\":\"0.2089954500000000\",\"VAI\":\"0.0799999800000000\",\"XEN\":\"0.0000000839580000\",\"MPC\":\"0.1001499000000000\",\"XEM\":\"0.0176951480000000\",\"JASMY3S\":\"0.0019670160000000\",\"OTK\":\"0.0290464695000000\",\"TRAC\":\"0.4521738000000000\",\"DFYN\":\"0.0070664650000000\",\"BIDP\":\"0.0001939030000000\",\"JASMY3L\":\"0.0001653772700000\",\"INJDOWN\":\"0.0000194902500000\",\"KLV\":\"0.0019310340000000\",\"WAXL\":\"0.7858069000000000\",\"TRBDOWN\":\"0.0023138425000000\",\"BCH3L\":\"4.6390663064999996\",\"GMT3S\":\"0.0000457771000000\",\"KMD\":\"0.2493752500000000\",\"BCH3S\":\"0.9634180500000000\",\"ECOX\":\"0.0987506000000000\",\"AAVE3S\":\"0.0560719500000000\",\"GMT3L\":\"0.0053983694650000\",\"EPIK\":\"0.0045857060000000\",\"SUIP\":\"0.1067565950000000\",\"AAVE3L\":\"0.3638687346200000\",\"ZK\":\"0.1262368500000000\",\"ZKF\":\"0.0008595700000000\",\"OMNIA\":\"0.7624186000000000\",\"ZKJ\":\"1.1124435000000000\",\"ZKL\":\"0.1255372000000000\",\"GAFI\":\"3.0634675000000001\",\"CARV\":\"0.8703646000000000\",\"KNC\":\"0.4433782000000000\",\"CATS\":\"0.0000599700000000\",\"PROM\":\"5.2833570000000006\",\"ALEPH\":\"0.1756121500000000\",\"PONKE\":\"0.3958020000000000\",\"OVR\":\"0.1553223000000000\",\"CATI\":\"0.4105146400000000\",\"ORDER\":\"0.1183008200000000\",\"GFT\":\"0.0166616650000000\",\"BIFI\":\"0.0020489750000000\",\"GGC\":\"6.9965029985000000\",\"GGG\":\"0.0403798000000000\",\"DAPPX\":\"0.0043788095000000\",\"SUKU\":\"0.0618790450000000\",\"ULTI\":\"0.0168015950000000\",\"CREDI\":\"0.0192903500000000\",\"ERTHA\":\"0.0010014990000000\",\"FURY\":\"0.1405297000000000\",\"KARRAT\":\"0.5577210000000000\",\"MOBILE\":\"0.0009005495000000\",\"SIDUS\":\"0.0037671155000000\",\"NAVI\":\"0.1254672350000000\",\"TAO\":\"583.4081500000051807\",\"USDJ\":\"1.1386304000000001\",\"MTL\":\"0.9563216000000000\",\"VET\":\"0.0225387250000000\",\"FITFI\":\"0.0036421780000000\",\"USDT\":\"0.9995000000000000\",\"OXT\":\"0.0695652000000000\",\"CANDY\":\"0.0005597200000000\",\"USDP\":\"0.9932031500000000\",\"MTS\":\"0.0027516235000000\",\"TADA\":\"0.0283858000000000\",\"MTV\":\"0.0006559718500000\",\"NAVX\":\"0.1342228550000000\",\"ILV\":\"35.6771524999999671\",\"VINU\":\"0.0000000109045450\",\"GHX\":\"0.0903548000000000\",\"EDU\":\"0.5167415000000000\",\"HYVE\":\"0.0137331300000000\",\"BTC3L\":\"0.0058620675000000\",\"ANYONE\":\"0.9015490000000000\",\"BEAT\":\"0.0012593700000000\",\"KING\":\"0.0004821588000000\",\"CREAM\":\"15.6541689999999973\",\"CAS\":\"0.0038590695000000\",\"IMX\":\"1.4944524000000000\",\"CAT\":\"0.0000256981445000\",\"BTC3S\":\"0.0014142925000000\",\"USDE\":\"0.9985005000000000\",\"USDD\":\"1.0000997000000000\",\"CWAR\":\"0.0037981000000000\",\"USDC\":\"0.9997998500000000\",\"KRL\":\"0.3543127550000000\",\"INJ\":\"21.7691100000000194\",\"GAME\":\"0.0139630150000000\",\"TRIBL\":\"1.0994500000000000\",\"XLM\":\"0.0948525500000000\",\"TRBUP\":\"0.0012293850000000\",\"VRADOWN\":\"0.0013433280000000\",\"SUPER\":\"1.2853570000000000\",\"EIGEN\":\"3.1536223999999999\",\"IOI\":\"0.0146926500000000\",\"KSM\":\"17.5212350000000129\",\"CCD\":\"0.0034832575000000\",\"EGO\":\"0.0093553200000000\",\"EGP\":\"2.7946019999999998\",\"MXC\":\"0.0066866550000000\",\"TEL\":\"0.0014432780000000\",\"MOVR\":\"9.1340307000000027\",\"XMR\":\"155.5421899999990755\",\"MXM\":\"0.0092853550000000\",\"OORT\":\"0.1099949750000000\",\"GLM\":\"0.3231383500000000\",\"RAY\":\"2.0228880499999998\",\"XTAG\":\"0.0218190850000000\",\"GLQ\":\"0.0854572500000000\",\"CWEB\":\"0.0038480750000000\",\"REVU\":\"0.0105047450000000\",\"REVV\":\"0.0039760110000000\",\"ZRO\":\"3.7952014499999994\",\"XNL\":\"0.0093853050000000\",\"XNO\":\"0.8496749500000000\",\"SAROS\":\"0.0019290350000000\",\"KACE\":\"2.1165411999999998\",\"ZRX\":\"0.3186406000000000\",\"WLTH\":\"0.0374312750000000\",\"ATOM3L\":\"0.0321719060000000\",\"GMM\":\"0.0001497251000000\",\"BEER\":\"0.0000138670630000\",\"GMT\":\"0.1275362000000000\",\"HEART\":\"0.0159920000000000\",\"GMX\":\"22.7186349999999882\",\"ABBC\":\"0.0061769100000000\",\"OMNI\":\"8.9235359999999970\",\"ATOM3S\":\"0.0007945225400000\",\"IRL\":\"0.0099650150000000\",\"CFG\":\"0.3248375000000000\",\"WSDM\":\"0.0139830050000000\",\"GNS\":\"1.8390800000000001\",\"VANRY\":\"0.0809295150000000\",\"CFX\":\"0.1595202000000000\",\"GRAIL\":\"817.1212349999937891\",\"BEFI\":\"0.0175712100000000\",\"VELO\":\"0.0132043945000000\",\"XPR\":\"0.0008077959000000\",\"DOVI\":\"0.0584707500000000\",\"ACE\":\"0.0021349320000000\",\"ACH\":\"0.0190534685000000\",\"ISP\":\"0.0012161916000000\",\"XCAD\":\"0.2834582000000000\",\"MINA\":\"0.5630183500000000\",\"TIA\":\"5.9318325999999999\",\"DRIFT\":\"0.4350823500000000\",\"ACQ\":\"0.0056981495000000\",\"ACS\":\"0.0014917537500000\",\"MIND\":\"0.0018920535000000\",\"STORE\":\"0.0062358805000000\",\"REN\":\"0.0351224300000000\",\"ELA\":\"1.7282354500000000\",\"DREAMS\":\"0.0002498750000000\",\"ADA\":\"0.3463267500000000\",\"ELF\":\"0.3777110500000000\",\"REQ\":\"0.0959919800000000\",\"STORJ\":\"0.5662167500000000\",\"LADYS\":\"0.0000000837581000\",\"PAXG\":\"2697.9303600003123340\",\"REZ\":\"0.0409795000000000\",\"XRD\":\"0.0157821050000000\",\"CHO\":\"0.0205097400000000\",\"CHR\":\"0.1769115000000000\",\"ADS\":\"0.1889055000000000\",\"CHZ\":\"0.0738030800000000\",\"ADX\":\"0.1575212000000000\",\"XRP\":\"0.5525036100000000\",\"JASMY\":\"0.0188615645000000\",\"KAGI\":\"0.1834582250000000\",\"FIDA\":\"0.2282858000000000\",\"PBR\":\"0.0291953950000000\",\"AEG\":\"0.0093453250000000\",\"H2O\":\"0.1610194500000000\",\"CHMB\":\"0.0001715641750000\",\"SAND3L\":\"0.0015447972150000\",\"PBX\":\"0.0006879558500000\",\"SOLVE\":\"0.0084557700000000\",\"DECHAT\":\"0.1512243500000000\",\"GARI\":\"0.0076861550000000\",\"SHIB2L\":\"1.1996998499999999\",\"SHIB2S\":\"0.0240879500000000\",\"ENA\":\"0.3942028000000000\",\"VEMP\":\"0.0029335325000000\",\"ENJ\":\"0.1467266000000000\",\"AFG\":\"0.0072163900000000\",\"RATS\":\"0.0001211593900000\",\"GRT\":\"0.1646076550000000\",\"FORWARD\":\"0.0012873560000000\",\"TFUEL\":\"0.0598800450000000\",\"ENS\":\"17.0634640000000052\",\"KASDOWN\":\"0.0258770550000000\",\"XTM\":\"0.0251074400000000\",\"DEGEN\":\"0.0084857550000000\",\"TLM\":\"0.0100449750000000\",\"DYDXDOWN\":\"0.1042598440000000\",\"CKB\":\"0.0146026950000000\",\"LUNC\":\"0.0000889255150000\",\"AURORA\":\"0.1204397500000000\",\"LUNA\":\"0.3624187000000000\",\"XTZ\":\"0.6776610000000000\",\"ELON\":\"0.0000001410294500\",\"DMTR\":\"0.0891554000000000\",\"EOS\":\"0.4759619000000000\",\"GST\":\"0.0118940500000000\",\"FORT\":\"0.1155422000000000\",\"FLAME\":\"0.0247076400000000\",\"PATEX\":\"0.9605195000000000\",\"DEEP\":\"0.0328885475000000\",\"ID3L\":\"0.0016201895000000\",\"GTC\":\"0.6625685500000000\",\"ID3S\":\"0.0071674145000000\",\"RIO\":\"0.7616190000000000\",\"CLH\":\"0.0008555720000000\",\"BURGER\":\"0.4016990500000000\",\"VRA\":\"0.0029765110000000\",\"SUNDOG\":\"0.2173912500000000\",\"GTT\":\"0.0002038980000000\",\"INJUP\":\"0.2327835500000000\",\"CPOOL\":\"0.1557720750000000\",\"EPX\":\"0.0000740629500000\",\"CLV\":\"0.0329835000000000\",\"FEAR\":\"0.0560519600000000\",\"MEME\":\"0.0124847545000000\",\"ROOBEE\":\"0.0004520738500000\",\"DEFI\":\"0.0192903500000000\",\"TOKEN\":\"0.0477361200000000\",\"GRAPE\":\"0.0020599695000000\",\"KASUP\":\"0.3996001000000000\",\"XWG\":\"0.0003843077500000\",\"SKEY\":\"0.0621289200000000\",\"SFUND\":\"1.3243375000000000\",\"EQX\":\"0.0032823580000000\",\"ORDIUP\":\"0.0548315705000000\",\"TON\":\"5.1857058499999995\",\"DEGO\":\"2.2667660500000001\",\"IZI\":\"0.0088455750000000\",\"ERG\":\"0.6605695500000000\",\"ERN\":\"1.9255367500000001\",\"VENOM\":\"0.0817591000000000\",\"VOXEL\":\"0.1497251000000000\",\"RLC\":\"1.4649671500000000\",\"PHA\":\"0.1093453000000000\",\"DYDXUP\":\"0.0112573685000000\",\"APE3S\":\"0.0008475760000000\",\"ORBS\":\"0.0288955450000000\",\"OPDOWN\":\"0.6758619000000000\",\"ESE\":\"0.0139130400000000\",\"APE3L\":\"0.1339330000000000\",\"HMND\":\"0.0982208650000000\",\"COQ\":\"0.0000014432780000\",\"AURY\":\"0.3340329000000000\",\"CULT\":\"0.0000028025980000\",\"AKT\":\"2.4642672500000001\",\"GLMR\":\"0.1606196500000000\",\"XYM\":\"0.0142528700000000\",\"ORAI\":\"6.1769100000000012\",\"XYO\":\"0.0058680645000000\",\"ETC\":\"18.8458723500000169\",\"LAI\":\"0.0142828550000000\",\"PIP\":\"0.0178310800000000\",\"ETH\":\"2607.6655149998362673\",\"NEO\":\"10.3575186499999991\",\"RMV\":\"0.0081659150000000\",\"KLAY\":\"0.1251374000000000\",\"PIT\":\"0.0000000003268365\",\"TARA\":\"0.0043978000000000\",\"KALT\":\"0.1128735350000000\",\"PIX\":\"0.0001023687900000\",\"ETN\":\"0.0021579205000000\",\"CSIX\":\"0.0141729100000000\",\"TRADE\":\"0.4708644500000000\",\"MAVIA\":\"1.3592200500000001\",\"HIGH\":\"1.3043474999999999\",\"TRB\":\"62.5387150000000006\",\"ORDI\":\"35.7421200000000126\",\"TRVL\":\"0.0373643085000000\",\"AMB\":\"0.0059670150000000\",\"TRU\":\"0.0762018800000000\",\"LOGX\":\"0.0271963950000000\",\"FINC\":\"0.0362018900000000\",\"INFRA\":\"0.1978010500000000\",\"NATIX\":\"0.0008729633000000\",\"NFP\":\"0.2152923000000000\",\"TRY\":\"0.0292166033323590\",\"TRX\":\"0.1597201000000000\",\"LBP\":\"0.0001243378000000\",\"LBR\":\"0.0595702000000000\",\"EUL\":\"2.9735125000000000\",\"NFT\":\"0.0000004077960000\",\"SEIUP\":\"0.0478110825000000\",\"PUFFER\":\"0.3676161000000000\",\"EUR\":\"1.0811249323958897\",\"ORCA\":\"2.0664662499999999\",\"NEAR3L\":\"0.0117010765350000\",\"AMP\":\"0.0038330825000000\",\"XDEFI\":\"0.0472563600000000\",\"HIFI\":\"0.4947525000000000\",\"TRUF\":\"0.0459570100000000\",\"AITECH\":\"0.1045477000000000\",\"AMU\":\"0.0043978000000000\",\"USTC\":\"0.0214692600000000\",\"KNGL\":\"0.0499750000000000\",\"FOXY\":\"0.0102686631000000\",\"NGC\":\"0.0147935995000000\",\"TENET\":\"0.0043278350000000\",\"NEAR3S\":\"0.0072553705000000\",\"MAHA\":\"1.1904045000000000\",\"NGL\":\"0.0701748950000000\",\"TST\":\"0.0080359800000000\",\"HIPPO\":\"0.0104447750000000\",\"AXS3S\":\"0.0308705570000000\",\"CRO\":\"0.0781409100000000\",\"ZPAY\":\"0.0050574700000000\",\"MNDE\":\"0.1026786350000000\",\"CRV\":\"0.2534732000000000\",\"SWASH\":\"0.0056271850000000\",\"AXS3L\":\"0.0106388779000000\",\"VERSE\":\"0.0001803098000000\",\"RPK\":\"0.0049975000000000\",\"RPL\":\"10.9745099999999958\",\"AZERO\":\"0.3789104500000000\",\"SOUL\":\"0.0534332700000000\",\"VXV\":\"0.2619689500000000\",\"LDO\":\"1.0885554500000000\",\"MAGIC\":\"0.3390304000000000\",\"ALICE\":\"1.0324835000000000\",\"SEAM\":\"1.1933030499999999\",\"PLU\":\"1.9300345000000001\",\"AOG\":\"0.0031224380000000\",\"SMOLE\":\"0.0000387806000000\",\"EWT\":\"1.1094450000000000\",\"TSUGT\":\"0.0029185400000000\",\"PMG\":\"0.0800599500000000\",\"OPAI\":\"0.0006826585000000\",\"LOCUS\":\"0.0216591650000000\",\"CTA\":\"0.0825087250000000\",\"NIM\":\"0.0013673160000000\",\"CTC\":\"0.4033982000000000\",\"APE\":\"0.7035480500000000\",\"MERL\":\"0.2720639000000000\",\"JAM\":\"0.0004770613500000\",\"CTI\":\"0.0130314810000000\",\"APP\":\"0.0021989000000000\",\"APT\":\"9.9947001500000000\",\"WLDUP\":\"0.0093043455000000\",\"ZEND\":\"0.1280759300000000\",\"FIRE\":\"0.9113441000000000\",\"DENT\":\"0.0008630682500000\",\"PYTH\":\"0.3390603850000000\",\"LFT\":\"0.0155322300000000\",\"DPET\":\"0.0319040400000000\",\"ORDIDOWN\":\"0.3788105000000000\",\"KPOL\":\"0.0029175405000000\",\"ETHUP\":\"8.4971493000000032\",\"BAND\":\"1.0939527500000001\",\"POL\":\"0.3656171000000000\",\"ASTR\":\"0.0582608550000000\",\"NKN\":\"0.0691654000000000\",\"RSR\":\"0.0068055955000000\",\"DVPN\":\"0.0005979009000000\",\"TWT\":\"1.1119437500000000\",\"ARB\":\"0.5510243500000000\",\"CVC\":\"0.1409801746501747\",\"ARC\":\"0.0300849500000000\",\"XETA\":\"0.0022888550000000\",\"MTRG\":\"0.4007995000000000\",\"LOKA\":\"0.1867066000000000\",\"LPOOL\":\"0.0660069800000000\",\"TURBOS\":\"0.0034812585000000\",\"CVX\":\"1.7816087499999999\",\"ARX\":\"0.0007556220000000\",\"MPLX\":\"0.4355221300000000\",\"SUSHI\":\"0.7011492500000000\",\"NLK\":\"0.0114442750000000\",\"PEPE2\":\"0.0000000313843000\",\"WBTC\":\"66881.4425499645548419\",\"SUI3L\":\"0.0211204345000000\",\"CWS\":\"0.1927036000000000\",\"SUI3S\":\"0.0000579110300000\",\"INSP\":\"0.0264167850000000\",\"MANA\":\"0.2945026750000000\",\"VRTX\":\"0.0641679000000000\",\"CSPR\":\"0.0116441750000000\",\"ATA\":\"0.0785007300000000\",\"OPEN\":\"0.0080049955000000\",\"HAI\":\"0.0448275750000000\",\"NMR\":\"14.7436245000000072\",\"ATH\":\"0.0540929400000000\",\"LIT\":\"0.6282857000000000\",\"TLOS\":\"0.3263467450000000\",\"TNSR\":\"0.3662168000000000\",\"CXT\":\"0.0871364100000000\",\"POLYX\":\"0.2346826000000000\",\"ZERO\":\"0.0002507745500000\",\"ROUTE\":\"0.0610694500000000\",\"LOOM\":\"0.0580009850000000\",\"PRE\":\"0.0078680640000000\",\"VRAUP\":\"0.0134652640000000\",\"HBB\":\"0.0714742450000000\",\"RVN\":\"0.0165017450000000\",\"PRQ\":\"0.0715741950000000\",\"ONDO\":\"0.7134930750000000\",\"PEPEDOWN\":\"0.0000155022450000\",\"WOOP\":\"0.0020179905000000\",\"LUNCUP\":\"0.0168355780000000\",\"KAVA\":\"0.3522238000000000\",\"LKI\":\"0.0104187880000000\",\"AVA\":\"0.4857570000000000\",\"NOM\":\"0.0233883000000000\",\"MAPO\":\"0.0089015470000000\",\"PEPEUP\":\"0.0114252845000000\",\"STRAX\":\"0.0487156300000000\",\"NOT\":\"0.0078670645000000\",\"ZERC\":\"0.1108245600000000\",\"BCUT\":\"0.0255672100000000\",\"MASA\":\"0.0691354150000000\",\"WAN\":\"0.1785077544737212\",\"WAT\":\"0.0003273762300000\",\"WAX\":\"0.0327636100000000\",\"MASK\":\"2.2259864500000002\",\"EOS3L\":\"0.0002122138400000\",\"IDEA\":\"0.0005887055000000\",\"EOS3S\":\"0.0034472755000000\",\"YFI\":\"4919.4290549999908843\",\"MOODENG\":\"0.0774612500000000\",\"XCUR\":\"0.0048845565000000\",\"HYDRA\":\"0.2225886500000000\",\"POPCAT\":\"1.3382305500000000\",\"LQTY\":\"0.7848074000000000\",\"PIXEL\":\"0.1406596350000000\",\"LMR\":\"0.0145437245000000\",\"ZETA\":\"0.5997999500000000\",\"YGG\":\"0.4717640000000000\",\"AXS\":\"4.6006985000000006\",\"BCHSV\":\"49.8250749999999370\",\"NRN\":\"0.0395802000000000\",\"FTON\":\"0.0091954000000000\",\"COMP\":\"43.6581599999999881\",\"XPRT\":\"0.1819090000000000\",\"HFT\":\"0.1443278000000000\",\"UXLINK\":\"0.5085456000000000\",\"STAMP\":\"0.0335032400000000\",\"RUNE\":\"4.9233370999999996\",\"ZEUS\":\"0.2587705500000000\",\"LTC3L\":\"1.8294848000000001\",\"DAPP\":\"0.1763118000000000\",\"FORTH\":\"2.9508238500000004\",\"ALPINE\":\"1.5322335000000000\",\"SENSO\":\"0.0328835500000000\",\"LTC3S\":\"0.0006986505000000\",\"DEXE\":\"8.3795081500000028\",\"GOAL\":\"0.0175912000000000\",\"AVAX\":\"27.5602130000000058\",\"LISTA\":\"0.3782108000000000\",\"AMPL\":\"1.3743124999999999\",\"WORK\":\"0.1384307500000000\",\"BRWL\":\"0.0017391300000000\",\"BANANA\":\"57.1314200000001362\",\"PUSH\":\"0.0750624500000000\",\"WEN\":\"0.0001015492000000\",\"NEIRO\":\"0.0879560000000000\",\"BTCUP\":\"34.7711057499999789\",\"SOL3S\":\"0.0007816090000000\",\"BRAWL\":\"0.0004776610500000\",\"LAY3R\":\"0.2161918500000000\",\"LPT\":\"11.9304317999999945\",\"GODS\":\"0.1807096000000000\",\"SAND3S\":\"4.6152911999999992\",\"RDNT\":\"0.0640679500000000\",\"SOL3L\":\"1.8351913752850000\",\"NIBI\":\"0.0653772950000000\",\"NUM\":\"0.0436181800000000\",\"PYR\":\"2.5590198499999997\",\"DAG\":\"0.0226176855000000\",\"DAI\":\"0.9989006596042375\",\"HIP\":\"0.0034982500000000\",\"DAO\":\"0.2848575000000000\",\"AVAIL\":\"0.1300929210000000\",\"DAR\":\"0.1512243500000000\",\"FET\":\"1.3760116500000000\",\"FCON\":\"0.0001197600900000\",\"XAVA\":\"0.3789104500000000\",\"LRC\":\"0.1208395500000000\",\"UNI3S\":\"0.0000653573050000\",\"PZP\":\"0.0599600050000000\",\"POKT\":\"0.0424787500000000\",\"DASH\":\"23.6881500000000109\",\"BAKEDOWN\":\"0.0003324636850000\",\"POLC\":\"0.0061389290000000\",\"DBR\":\"0.0377671070000000\",\"CIRUS\":\"0.0055772100000000\",\"UNI3L\":\"0.0993921490650000\",\"NWC\":\"0.0681659000000000\",\"POLK\":\"0.0142628650000000\",\"LSD\":\"0.9420287500000000\",\"MARS4\":\"0.0005878059500000\",\"LSK\":\"0.8080957500000000\",\"BLOCK\":\"0.0261869000000000\",\"ANALOS\":\"0.0000446776500000\",\"SAFE\":\"0.8779608000000000\",\"DCK\":\"0.0234082900000000\",\"LSS\":\"0.0562718500000000\",\"DCR\":\"12.4337799999999929\",\"LIKE\":\"0.0559720000000000\",\"DATA\":\"0.0361819000000000\",\"WIF\":\"2.5696145499999999\",\"BLOK\":\"0.0006546725000000\",\"LTC\":\"71.6261690000000611\",\"METIS\":\"42.0289750000000612\",\"WIN\":\"0.0000868365600000\",\"HLG\":\"0.0018790600000000\",\"LTO\":\"0.1166116650000000\",\"DYDX\":\"0.9341327000000000\",\"ARB3S\":\"0.0509025360000000\",\"MUBI\":\"0.0303848000000000\",\"ARB3L\":\"0.0025917035000000\",\"RBTC1\":\"0.0000039480250000\",\"POND\":\"0.0118640650000000\",\"LINA\":\"0.0037771105000000\",\"MYRIA\":\"0.0025337325000000\",\"LINK\":\"11.0244849999999944\",\"QTUM\":\"2.4262016723130069\",\"TUNE\":\"0.0148025950000000\",\"UFO\":\"0.0000006479758500\",\"CYBER\":\"2.8755615000000001\",\"WILD\":\"0.2433782500000000\",\"POLS\":\"0.2809594500000000\",\"NYM\":\"0.0719640000000000\",\"FIL\":\"3.6786597500000005\",\"BAL\":\"2.0099945000000000\",\"SCA\":\"0.3999999000000000\",\"STND\":\"0.0133123405000000\",\"WMTX\":\"0.2138930000000000\",\"SCLP\":\"0.1545227000000000\",\"MANEKI\":\"0.0073963000000000\",\"BAT\":\"0.1721139000000000\",\"AKRO\":\"0.0042302838000000\",\"FTM3L\":\"8.2574692000000024\",\"BAX\":\"0.0000709645000000\",\"FTM3S\":\"0.0000255072400000\",\"COTI\":\"0.0951524000000000\"}}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"AGLD\\\":\\\"1.1174410000000001\\\",\\\"DFI\\\":\\\"0.0168915500000000\\\",\\\"PYTHUP\\\":\\\"0.0397880960000000\\\",\\\"ISLM\\\":\\\"0.0606196750000000\\\",\\\"NEAR\\\":\\\"4.7185395500000000\\\",\\\"AIOZ\\\":\\\"0.4862867350000000\\\",\\\"AUDIO\\\":\\\"0.1219390000000000\\\",\\\"BBL\\\":\\\"0.0067766100000000\\\",\\\"WLD\\\":\\\"2.2893547500000000\\\",\\\"HNT\\\":\\\"5.8990489999999984\\\",\\\"ETHFI\\\":\\\"1.5892050000000000\\\",\\\"DMAIL\\\":\\\"0.2726636000000000\\\",\\\"OPUP\\\":\\\"0.0986506500000000\\\",\\\"VET3S\\\":\\\"0.0003700448850000\\\",\\\"MANA3S\\\":\\\"0.0006056970000000\\\",\\\"TIDAL\\\":\\\"0.0001154422500000\\\",\\\"HALO\\\":\\\"0.0058270850000000\\\",\\\"OPUL\\\":\\\"0.0839480050000000\\\",\\\"MANA3L\\\":\\\"0.0029569407900000\\\",\\\"DGB\\\":\\\"0.0066556705000000\\\",\\\"AA\\\":\\\"0.2406796000000000\\\",\\\"BCH\\\":\\\"366.2167999999996484\\\",\\\"GMEE\\\":\\\"0.0113333305000000\\\",\\\"JST\\\":\\\"0.0302348750000000\\\",\\\"PBUX\\\":\\\"0.0208795550000000\\\",\\\"AR\\\":\\\"18.5457224999999909\\\",\\\"SEI\\\":\\\"0.4332832500000000\\\",\\\"PSTAKE\\\":\\\"0.0493153300000000\\\",\\\"LMWR\\\":\\\"0.1618190500000000\\\",\\\"UNFIDOWN\\\":\\\"0.0062058955000000\\\",\\\"BB\\\":\\\"0.3245376500000000\\\",\\\"JTO\\\":\\\"2.1239375000000002\\\",\\\"WEMIX\\\":\\\"0.7916040000000000\\\",\\\"G\\\":\\\"0.0324037900000000\\\",\\\"MARSH\\\":\\\"0.0617591050000000\\\",\\\"BN\\\":\\\"0.0036961510000000\\\",\\\"FLIP\\\":\\\"1.0976509000000000\\\",\\\"FLR\\\":\\\"0.0144827550000000\\\",\\\"BIGTIME\\\":\\\"0.1238780300000000\\\",\\\"FLY\\\":\\\"0.0005157420000000\\\",\\\"T\\\":\\\"0.0233483200000000\\\",\\\"W\\\":\\\"0.2865566500000000\\\",\\\"BDX\\\":\\\"0.0774012800000000\\\",\\\"BABYDOGE\\\":\\\"0.0000000029375305\\\",\\\"SFP\\\":\\\"0.7256370000000000\\\",\\\"DIA\\\":\\\"0.9179408000000000\\\",\\\"ISME\\\":\\\"0.0022388800000000\\\",\\\"LYM\\\":\\\"0.0010155919500000\\\",\\\"VET3L\\\":\\\"0.0000289755050000\\\",\\\"JUP\\\":\\\"0.8230882500000000\\\",\\\"LYX\\\":\\\"1.4501745500000001\\\",\\\"AIEPK\\\":\\\"0.0050094940000000\\\",\\\"SILLY\\\":\\\"0.0159420250000000\\\",\\\"SCPT\\\":\\\"0.0122038950000000\\\",\\\"WOO\\\":\\\"0.1796601250000000\\\",\\\"BLUR\\\":\\\"0.2462768000000000\\\",\\\"STRK\\\":\\\"0.3963117450000000\\\",\\\"BFC\\\":\\\"0.0383608100000000\\\",\\\"DC\\\":\\\"0.0003097450500000\\\",\\\"KARATE\\\":\\\"0.0007296350000000\\\",\\\"SUSHI3L\\\":\\\"0.5115441000000000\\\",\\\"NETVR\\\":\\\"0.0976111700000000\\\",\\\"WAVES\\\":\\\"1.0806594000000000\\\",\\\"LITH\\\":\\\"0.0001520239500000\\\",\\\"HAPI\\\":\\\"8.6533711499999987\\\",\\\"SUSHI3S\\\":\\\"1.2752620500000000\\\",\\\"CEEK\\\":\\\"0.0294852500000000\\\",\\\"FLOKI\\\":\\\"0.0001414292500000\\\",\\\"SHR\\\":\\\"0.0012463765000000\\\",\\\"SAND\\\":\\\"0.2566616050000000\\\",\\\"TURT\\\":\\\"0.0020889550000000\\\",\\\"UMA\\\":\\\"2.5207390000000000\\\",\\\"BEPRO\\\":\\\"0.0003955021500000\\\",\\\"SCRT\\\":\\\"0.1995002000000000\\\",\\\"TUSD\\\":\\\"0.9945025000000000\\\",\\\"COOKIE\\\":\\\"0.0220089900000000\\\",\\\"LRDS\\\":\\\"0.6218889000000000\\\",\\\"SIN\\\":\\\"0.0033633175000000\\\",\\\"OAS\\\":\\\"0.0331933950000000\\\",\\\"ROOT\\\":\\\"0.0183108400000000\\\",\\\"ADA3L\\\":\\\"0.0046396790000000\\\",\\\"TIAUP\\\":\\\"0.1228385500000000\\\",\\\"HTR\\\":\\\"0.0353023400000000\\\",\\\"UNB\\\":\\\"0.0003837080500000\\\",\\\"UNA\\\":\\\"0.0164917500000000\\\",\\\"HARD\\\":\\\"0.1087056200000000\\\",\\\"G3\\\":\\\"0.0502648550000000\\\",\\\"ADA3S\\\":\\\"0.0006191202850000\\\",\\\"MYRO\\\":\\\"0.1071863800000000\\\",\\\"HTX\\\":\\\"0.0000013693150000\\\",\\\"FT\\\":\\\"0.3585206500000000\\\",\\\"BTCDOWN\\\":\\\"0.1065467000000000\\\",\\\"UNI\\\":\\\"7.3571195999999993\\\",\\\"FX\\\":\\\"0.1379310000000000\\\",\\\"OBI\\\":\\\"0.0079030465000000\\\",\\\"UNO\\\":\\\"0.0137131400000000\\\",\\\"WRX\\\":\\\"0.1221389000000000\\\",\\\"TIADOWN\\\":\\\"0.0000914642450000\\\",\\\"ETHDOWN\\\":\\\"0.1306346500000000\\\",\\\"WELL\\\":\\\"0.0471244260000000\\\",\\\"SWFTC\\\":\\\"0.0028966509500000\\\",\\\"SKL\\\":\\\"0.0362418700000000\\\",\\\"UOS\\\":\\\"0.0867765900000000\\\",\\\"AIPAD\\\":\\\"0.0478660550000000\\\",\\\"BRETT\\\":\\\"0.1037481000000000\\\",\\\"SKY\\\":\\\"0.0520139800000000\\\",\\\"FRM\\\":\\\"0.0153123400000000\\\",\\\"VISION\\\":\\\"0.0014451770500000\\\",\\\"LENDS\\\":\\\"0.0047276350000000\\\",\\\"SLF\\\":\\\"0.3318340000000000\\\",\\\"BULL\\\":\\\"0.0023988000000000\\\",\\\"FLOW\\\":\\\"0.5372312500000000\\\",\\\"ODDZ\\\":\\\"0.0063368300000000\\\",\\\"SLN\\\":\\\"0.2804597000000000\\\",\\\"UPO\\\":\\\"0.0440779500000000\\\",\\\"SLP\\\":\\\"0.0023997995000000\\\",\\\"ID\\\":\\\"0.3718140000000000\\\",\\\"SLIM\\\":\\\"0.0906446550000000\\\",\\\"SPOT\\\":\\\"0.0021289350000000\\\",\\\"DOP\\\":\\\"0.0023028480000000\\\",\\\"ISSP\\\":\\\"0.0000874562500000\\\",\\\"UQC\\\":\\\"3.2339822000000003\\\",\\\"IO\\\":\\\"1.8185902499999999\\\",\\\"DOT\\\":\\\"4.2022978000000005\\\",\\\"1INCH\\\":\\\"0.2645676500000000\\\",\\\"SMH\\\":\\\"0.3448275000000000\\\",\\\"MAK\\\":\\\"0.0396701550000000\\\",\\\"TOKO\\\":\\\"0.0005923037000000\\\",\\\"TURBO\\\":\\\"0.0108085930000000\\\",\\\"UNFI\\\":\\\"2.8555714999999996\\\",\\\"MAN\\\":\\\"0.0210764565000000\\\",\\\"EVER\\\":\\\"0.0332733550000000\\\",\\\"FTM\\\":\\\"0.7259068650000000\\\",\\\"SHRAP\\\":\\\"0.0476361700000000\\\",\\\"MAV\\\":\\\"0.1738130500000000\\\",\\\"MAX\\\":\\\"0.2864966800000000\\\",\\\"DPR\\\":\\\"0.0018240875000000\\\",\\\"FTT\\\":\\\"2.0559715000000002\\\",\\\"ARKM\\\":\\\"1.7444273499999999\\\",\\\"ATOM\\\":\\\"4.2954512000000002\\\",\\\"PENDLE\\\":\\\"4.1554212500000007\\\",\\\"QUICK\\\":\\\"0.0365317250000000\\\",\\\"BLZ\\\":\\\"0.1217191100000000\\\",\\\"BOBA\\\":\\\"0.2014092450000000\\\",\\\"MBL\\\":\\\"0.0027856065000000\\\",\\\"OFN\\\":\\\"0.1252373500000000\\\",\\\"UNIO\\\":\\\"0.0025487250000000\\\",\\\"SNS\\\":\\\"0.0200899500000000\\\",\\\"SNX\\\":\\\"1.4282854999999999\\\",\\\"NXRA\\\":\\\"0.0272763550000000\\\",\\\"TAIKO\\\":\\\"1.4392800000000001\\\",\\\"AVAX3L\\\":\\\"0.1410875109550000\\\",\\\"L3\\\":\\\"0.0608395650000000\\\",\\\"API3\\\":\\\"1.3728132500000001\\\",\\\"XRP3S\\\":\\\"0.0028095945000000\\\",\\\"QKC\\\":\\\"0.0085157400000000\\\",\\\"AVAX3S\\\":\\\"0.5148424500000000\\\",\\\"ROSE\\\":\\\"0.0693453100000000\\\",\\\"SATS\\\":\\\"0.0000002701648500\\\",\\\"BMX\\\":\\\"0.3100449000000000\\\",\\\"PORTAL\\\":\\\"0.2811593500000000\\\",\\\"TOMI\\\":\\\"0.0309045400000000\\\",\\\"XRP3L\\\":\\\"2.1586201500000002\\\",\\\"SOL\\\":\\\"151.7250995000003583\\\",\\\"SON\\\":\\\"0.0002421788500000\\\",\\\"BNC\\\":\\\"0.1882058500000000\\\",\\\"SOCIAL\\\":\\\"0.0026486750000000\\\",\\\"CGPT\\\":\\\"0.1305147100000000\\\",\\\"CELR\\\":\\\"0.0127736100000000\\\",\\\"BNB\\\":\\\"591.0973035000118935\\\",\\\"OGN\\\":\\\"0.0852573500000000\\\",\\\"CELO\\\":\\\"0.7711142500000000\\\",\\\"AUCTION\\\":\\\"13.1634150000000014\\\",\\\"MANTA\\\":\\\"0.7564216000000000\\\",\\\"LAYER\\\":\\\"0.0372713550000000\\\",\\\"AERO\\\":\\\"1.3783104999999999\\\",\\\"CETUS\\\":\\\"0.1808295400000000\\\",\\\"LL\\\":\\\"0.0201199350000000\\\",\\\"SPA\\\":\\\"0.0067426270000000\\\",\\\"PYTHDOWN\\\":\\\"0.0011834080000000\\\",\\\"NEIROCTO\\\":\\\"0.0019964013000000\\\",\\\"UTK\\\":\\\"0.0365217300000000\\\",\\\"GMRX\\\":\\\"0.0007386305000000\\\",\\\"BOB\\\":\\\"0.0000380619595000\\\",\\\"HOTCROSS\\\":\\\"0.0056491740000000\\\",\\\"AERGO\\\":\\\"0.1007595950000000\\\",\\\"MOCA\\\":\\\"0.0783608000000000\\\",\\\"SQD\\\":\\\"0.0380809500000000\\\",\\\"MV\\\":\\\"0.0081359300000000\\\",\\\"BNB3L\\\":\\\"0.2761618500000000\\\",\\\"BNB3S\\\":\\\"0.0008545725000000\\\",\\\"GALAX3L\\\":\\\"0.0057571999600000\\\",\\\"KAI\\\":\\\"0.0020080954500000\\\",\\\"SQR\\\":\\\"0.0470764500000000\\\",\\\"GALAX3S\\\":\\\"0.1933033000000000\\\",\\\"EGLD\\\":\\\"25.5272299999999713\\\",\\\"ZBCN\\\":\\\"0.0010404795000000\\\",\\\"KAS\\\":\\\"0.1216691350000000\\\",\\\"MEW\\\":\\\"0.0086176890000000\\\",\\\"PUNDIX\\\":\\\"0.4130933500000000\\\",\\\"LOOKS\\\":\\\"0.0392803500000000\\\",\\\"FXS\\\":\\\"1.9060465000000000\\\",\\\"BOSON\\\":\\\"0.2732633000000000\\\",\\\"BRISE\\\":\\\"0.0000000860569500\\\",\\\"AEVO\\\":\\\"0.3388305000000000\\\",\\\"FLUX\\\":\\\"0.5276360500000000\\\",\\\"PRCL\\\":\\\"0.1969015000000000\\\",\\\"UNFIUP\\\":\\\"0.0011654170000000\\\",\\\"SEIDOWN\\\":\\\"0.0442778500000000\\\",\\\"DOAI\\\":\\\"0.0052363805000000\\\",\\\"QNT\\\":\\\"65.4312679999998206\\\",\\\"REDO\\\":\\\"0.2837580500000000\\\",\\\"STRIKE\\\":\\\"6.8225869999999997\\\",\\\"ETHW\\\":\\\"3.2418782499999998\\\",\\\"OM\\\":\\\"1.5396797750000000\\\",\\\"OP\\\":\\\"1.6911539999999999\\\",\\\"WHALE\\\":\\\"0.8134930500000000\\\",\\\"1CAT\\\":\\\"0.0018460765000000\\\",\\\"NEON\\\":\\\"0.4446775500000000\\\",\\\"GTAI\\\":\\\"0.7786105000000000\\\",\\\"SSV\\\":\\\"21.2393749999999841\\\",\\\"ETH2\\\":\\\"2601.6678843156403923\\\",\\\"KCS\\\":\\\"8.7646155000000020\\\",\\\"ARPA\\\":\\\"0.0393882960000000\\\",\\\"ARTFI\\\":\\\"0.0141029450000000\\\",\\\"BRL\\\":\\\"0.1742807323452485\\\",\\\"ALEX\\\":\\\"0.0924537500000000\\\",\\\"STG\\\":\\\"0.2943527500000000\\\",\\\"SHIB\\\":\\\"0.0000178060925000\\\",\\\"IOTX\\\":\\\"0.0394202800000000\\\",\\\"OLE\\\":\\\"0.0171414250000000\\\",\\\"KDA\\\":\\\"0.5653172000000000\\\",\\\"CERE\\\":\\\"0.0022548720000000\\\",\\\"DOCK\\\":\\\"0.0018990500000000\\\",\\\"STX\\\":\\\"1.8157916500000000\\\",\\\"OLT\\\":\\\"0.0007596200000000\\\",\\\"QI\\\":\\\"0.0131754090000000\\\",\\\"SDAO\\\":\\\"0.2748625000000000\\\",\\\"BLAST\\\":\\\"0.0087636160000000\\\",\\\"LINK3S\\\":\\\"0.0000702948350000\\\",\\\"IOST\\\":\\\"0.0049745115000000\\\",\\\"SUI\\\":\\\"2.0589700000000000\\\",\\\"CAKE\\\":\\\"1.7941024999999999\\\",\\\"BSW\\\":\\\"0.0586706500000000\\\",\\\"OMG\\\":\\\"0.2597700500000000\\\",\\\"VOLT\\\":\\\"0.0000002716641000\\\",\\\"LINK3L\\\":\\\"1.3408292499999999\\\",\\\"GEEQ\\\":\\\"0.0385607100000000\\\",\\\"PYUSD\\\":\\\"0.9988003500000000\\\",\\\"SUN\\\":\\\"0.0186106900000000\\\",\\\"TOWER\\\":\\\"0.0014812590000000\\\",\\\"BTC\\\":\\\"67133.4165000832051564\\\",\\\"IOTA\\\":\\\"0.1189405000000000\\\",\\\"REEF\\\":\\\"0.0019960015000000\\\",\\\"TRIAS\\\":\\\"3.3683149999999998\\\",\\\"KEY\\\":\\\"0.0037594713240047\\\",\\\"ETH3L\\\":\\\"0.0003305946200000\\\",\\\"BTT\\\":\\\"0.0000009117439000\\\",\\\"ONE\\\":\\\"0.0132003965000000\\\",\\\"RENDER\\\":\\\"5.2263854999999995\\\",\\\"ETH3S\\\":\\\"0.5517240000000000\\\",\\\"ANKR\\\":\\\"0.0264867500000000\\\",\\\"ALGO\\\":\\\"0.1188405500000000\\\",\\\"SYLO\\\":\\\"0.0007600198000000\\\",\\\"ZCX\\\":\\\"0.0784707450000000\\\",\\\"SD\\\":\\\"0.3851073500000000\\\",\\\"ONT\\\":\\\"0.1877960550000000\\\",\\\"MJT\\\":\\\"0.0132433750000000\\\",\\\"DYM\\\":\\\"1.6659666000000001\\\",\\\"DYP\\\":\\\"0.0205397250000000\\\",\\\"BAKEUP\\\":\\\"0.0389894955000000\\\",\\\"OOE\\\":\\\"0.0079360300000000\\\",\\\"ZELIX\\\":\\\"0.0000649675000000\\\",\\\"DOGE3L\\\":\\\"0.3837080500000000\\\",\\\"ARTY\\\":\\\"0.3980009000000000\\\",\\\"QORPO\\\":\\\"0.1204297550000000\\\",\\\"ICE\\\":\\\"0.0051504235000000\\\",\\\"NOTAI\\\":\\\"0.0000892753400000\\\",\\\"DOGE3S\\\":\\\"0.2291853500000000\\\",\\\"NAKA\\\":\\\"1.0695649500000000\\\",\\\"GALAX\\\":\\\"0.0212893500000000\\\",\\\"MKR\\\":\\\"1245.8767500000163833\\\",\\\"DODO\\\":\\\"0.1152423500000000\\\",\\\"ICP\\\":\\\"7.6731615000000027\\\",\\\"ZEC\\\":\\\"35.9400209999999543\\\",\\\"ZEE\\\":\\\"0.0065767100000000\\\",\\\"ICX\\\":\\\"0.1383308000000000\\\",\\\"KMNO\\\":\\\"0.0921499020000000\\\",\\\"TT\\\":\\\"0.0033883050000000\\\",\\\"DOT3L\\\":\\\"0.1454272500000000\\\",\\\"XAI\\\":\\\"0.2038980000000000\\\",\\\"ZEN\\\":\\\"8.0149905000000007\\\",\\\"DOGE\\\":\\\"0.1213093150000000\\\",\\\"ALPHA\\\":\\\"0.0567416150000000\\\",\\\"DUSK\\\":\\\"0.1964517250000000\\\",\\\"DOT3S\\\":\\\"0.0053613180000000\\\",\\\"SXP\\\":\\\"0.2538730000000000\\\",\\\"HBAR\\\":\\\"0.0510044850000000\\\",\\\"SYNT\\\":\\\"0.0467166300000000\\\",\\\"ZEX\\\":\\\"0.0571714000000000\\\",\\\"BONDLY\\\":\\\"0.0022208890000000\\\",\\\"MLK\\\":\\\"0.2080859050000000\\\",\\\"KICKS\\\":\\\"0.0001301249050000\\\",\\\"PEPE\\\":\\\"0.0000100249850000\\\",\\\"OUSD\\\":\\\"0.9982006500000000\\\",\\\"LUNCDOWN\\\":\\\"0.0000733333150000\\\",\\\"DOGS\\\":\\\"0.0007086455000000\\\",\\\"REV3L\\\":\\\"0.0094672640000000\\\",\\\"CTSI\\\":\\\"0.1257371000000000\\\",\\\"C98\\\":\\\"0.1219390000000000\\\",\\\"OSMO\\\":\\\"0.5370313500000000\\\",\\\"NTRN\\\":\\\"0.3869064500000000\\\",\\\"CFX2S\\\":\\\"0.0084757600000000\\\",\\\"SYN\\\":\\\"0.5636180500000000\\\",\\\"VIDT\\\":\\\"0.0308745550000000\\\",\\\"SYS\\\":\\\"0.0997501000000000\\\",\\\"GAS\\\":\\\"4.3029474500000008\\\",\\\"BOME\\\":\\\"0.0087336310000000\\\",\\\"COMBO\\\":\\\"0.4068964500000000\\\",\\\"XCH\\\":\\\"14.9825050000000010\\\",\\\"VR\\\":\\\"0.0063538215000000\\\",\\\"CFX2L\\\":\\\"0.0499660045000000\\\",\\\"VSYS\\\":\\\"0.0005201398000000\\\",\\\"PANDORA\\\":\\\"1629.2949450001102772\\\",\\\"THETA\\\":\\\"1.2461766000000000\\\",\\\"XCN\\\":\\\"0.0012699647000000\\\",\\\"NEXG\\\":\\\"0.0039180400000000\\\",\\\"MELOS\\\":\\\"0.0021244372500000\\\",\\\"XCV\\\":\\\"0.0013253370000000\\\",\\\"ORN\\\":\\\"0.8797599000000000\\\",\\\"WLKN\\\":\\\"0.0010624685000000\\\",\\\"AAVE\\\":\\\"154.2708259999996162\\\",\\\"MNT\\\":\\\"0.6168914000000000\\\",\\\"BONK\\\":\\\"0.0000227296295000\\\",\\\"PERP\\\":\\\"0.6037979500000000\\\",\\\"XDC\\\":\\\"0.0276361750000000\\\",\\\"MNW\\\":\\\"0.3681158500000000\\\",\\\"XDB\\\":\\\"0.0002578710000000\\\",\\\"BOND\\\":\\\"1.5662165000000000\\\",\\\"SUIA\\\":\\\"0.0809595000000000\\\",\\\"MOG\\\":\\\"0.0000019330330000\\\",\\\"SUTER\\\":\\\"0.0001840079500000\\\",\\\"TIME\\\":\\\"16.2648634999999969\\\",\\\"RACA\\\":\\\"0.0001949025000000\\\",\\\"BICO\\\":\\\"0.2021988500000000\\\",\\\"MON\\\":\\\"0.1066466500000000\\\",\\\"SWEAT\\\":\\\"0.0063718125000000\\\",\\\"MOXIE\\\":\\\"0.0022088950000000\\\",\\\"BABYBNB\\\":\\\"0.0289755050000000\\\",\\\"IGU\\\":\\\"0.0050674650000000\\\",\\\"HMSTR\\\":\\\"0.0037990995000000\\\",\\\"XEC\\\":\\\"0.0000354722550000\\\",\\\"MONI\\\":\\\"0.0058470750000000\\\",\\\"XR\\\":\\\"0.2374812000000000\\\",\\\"PEOPLE\\\":\\\"0.0796601500000000\\\",\\\"PUMLX\\\":\\\"0.0054572700000000\\\",\\\"ZIL\\\":\\\"0.0145927000000000\\\",\\\"WLDDOWN\\\":\\\"0.2089954500000000\\\",\\\"VAI\\\":\\\"0.0799999800000000\\\",\\\"XEN\\\":\\\"0.0000000839580000\\\",\\\"MPC\\\":\\\"0.1001499000000000\\\",\\\"XEM\\\":\\\"0.0176951480000000\\\",\\\"JASMY3S\\\":\\\"0.0019670160000000\\\",\\\"OTK\\\":\\\"0.0290464695000000\\\",\\\"TRAC\\\":\\\"0.4521738000000000\\\",\\\"DFYN\\\":\\\"0.0070664650000000\\\",\\\"BIDP\\\":\\\"0.0001939030000000\\\",\\\"JASMY3L\\\":\\\"0.0001653772700000\\\",\\\"INJDOWN\\\":\\\"0.0000194902500000\\\",\\\"KLV\\\":\\\"0.0019310340000000\\\",\\\"WAXL\\\":\\\"0.7858069000000000\\\",\\\"TRBDOWN\\\":\\\"0.0023138425000000\\\",\\\"BCH3L\\\":\\\"4.6390663064999996\\\",\\\"GMT3S\\\":\\\"0.0000457771000000\\\",\\\"KMD\\\":\\\"0.2493752500000000\\\",\\\"BCH3S\\\":\\\"0.9634180500000000\\\",\\\"ECOX\\\":\\\"0.0987506000000000\\\",\\\"AAVE3S\\\":\\\"0.0560719500000000\\\",\\\"GMT3L\\\":\\\"0.0053983694650000\\\",\\\"EPIK\\\":\\\"0.0045857060000000\\\",\\\"SUIP\\\":\\\"0.1067565950000000\\\",\\\"AAVE3L\\\":\\\"0.3638687346200000\\\",\\\"ZK\\\":\\\"0.1262368500000000\\\",\\\"ZKF\\\":\\\"0.0008595700000000\\\",\\\"OMNIA\\\":\\\"0.7624186000000000\\\",\\\"ZKJ\\\":\\\"1.1124435000000000\\\",\\\"ZKL\\\":\\\"0.1255372000000000\\\",\\\"GAFI\\\":\\\"3.0634675000000001\\\",\\\"CARV\\\":\\\"0.8703646000000000\\\",\\\"KNC\\\":\\\"0.4433782000000000\\\",\\\"CATS\\\":\\\"0.0000599700000000\\\",\\\"PROM\\\":\\\"5.2833570000000006\\\",\\\"ALEPH\\\":\\\"0.1756121500000000\\\",\\\"PONKE\\\":\\\"0.3958020000000000\\\",\\\"OVR\\\":\\\"0.1553223000000000\\\",\\\"CATI\\\":\\\"0.4105146400000000\\\",\\\"ORDER\\\":\\\"0.1183008200000000\\\",\\\"GFT\\\":\\\"0.0166616650000000\\\",\\\"BIFI\\\":\\\"0.0020489750000000\\\",\\\"GGC\\\":\\\"6.9965029985000000\\\",\\\"GGG\\\":\\\"0.0403798000000000\\\",\\\"DAPPX\\\":\\\"0.0043788095000000\\\",\\\"SUKU\\\":\\\"0.0618790450000000\\\",\\\"ULTI\\\":\\\"0.0168015950000000\\\",\\\"CREDI\\\":\\\"0.0192903500000000\\\",\\\"ERTHA\\\":\\\"0.0010014990000000\\\",\\\"FURY\\\":\\\"0.1405297000000000\\\",\\\"KARRAT\\\":\\\"0.5577210000000000\\\",\\\"MOBILE\\\":\\\"0.0009005495000000\\\",\\\"SIDUS\\\":\\\"0.0037671155000000\\\",\\\"NAVI\\\":\\\"0.1254672350000000\\\",\\\"TAO\\\":\\\"583.4081500000051807\\\",\\\"USDJ\\\":\\\"1.1386304000000001\\\",\\\"MTL\\\":\\\"0.9563216000000000\\\",\\\"VET\\\":\\\"0.0225387250000000\\\",\\\"FITFI\\\":\\\"0.0036421780000000\\\",\\\"USDT\\\":\\\"0.9995000000000000\\\",\\\"OXT\\\":\\\"0.0695652000000000\\\",\\\"CANDY\\\":\\\"0.0005597200000000\\\",\\\"USDP\\\":\\\"0.9932031500000000\\\",\\\"MTS\\\":\\\"0.0027516235000000\\\",\\\"TADA\\\":\\\"0.0283858000000000\\\",\\\"MTV\\\":\\\"0.0006559718500000\\\",\\\"NAVX\\\":\\\"0.1342228550000000\\\",\\\"ILV\\\":\\\"35.6771524999999671\\\",\\\"VINU\\\":\\\"0.0000000109045450\\\",\\\"GHX\\\":\\\"0.0903548000000000\\\",\\\"EDU\\\":\\\"0.5167415000000000\\\",\\\"HYVE\\\":\\\"0.0137331300000000\\\",\\\"BTC3L\\\":\\\"0.0058620675000000\\\",\\\"ANYONE\\\":\\\"0.9015490000000000\\\",\\\"BEAT\\\":\\\"0.0012593700000000\\\",\\\"KING\\\":\\\"0.0004821588000000\\\",\\\"CREAM\\\":\\\"15.6541689999999973\\\",\\\"CAS\\\":\\\"0.0038590695000000\\\",\\\"IMX\\\":\\\"1.4944524000000000\\\",\\\"CAT\\\":\\\"0.0000256981445000\\\",\\\"BTC3S\\\":\\\"0.0014142925000000\\\",\\\"USDE\\\":\\\"0.9985005000000000\\\",\\\"USDD\\\":\\\"1.0000997000000000\\\",\\\"CWAR\\\":\\\"0.0037981000000000\\\",\\\"USDC\\\":\\\"0.9997998500000000\\\",\\\"KRL\\\":\\\"0.3543127550000000\\\",\\\"INJ\\\":\\\"21.7691100000000194\\\",\\\"GAME\\\":\\\"0.0139630150000000\\\",\\\"TRIBL\\\":\\\"1.0994500000000000\\\",\\\"XLM\\\":\\\"0.0948525500000000\\\",\\\"TRBUP\\\":\\\"0.0012293850000000\\\",\\\"VRADOWN\\\":\\\"0.0013433280000000\\\",\\\"SUPER\\\":\\\"1.2853570000000000\\\",\\\"EIGEN\\\":\\\"3.1536223999999999\\\",\\\"IOI\\\":\\\"0.0146926500000000\\\",\\\"KSM\\\":\\\"17.5212350000000129\\\",\\\"CCD\\\":\\\"0.0034832575000000\\\",\\\"EGO\\\":\\\"0.0093553200000000\\\",\\\"EGP\\\":\\\"2.7946019999999998\\\",\\\"MXC\\\":\\\"0.0066866550000000\\\",\\\"TEL\\\":\\\"0.0014432780000000\\\",\\\"MOVR\\\":\\\"9.1340307000000027\\\",\\\"XMR\\\":\\\"155.5421899999990755\\\",\\\"MXM\\\":\\\"0.0092853550000000\\\",\\\"OORT\\\":\\\"0.1099949750000000\\\",\\\"GLM\\\":\\\"0.3231383500000000\\\",\\\"RAY\\\":\\\"2.0228880499999998\\\",\\\"XTAG\\\":\\\"0.0218190850000000\\\",\\\"GLQ\\\":\\\"0.0854572500000000\\\",\\\"CWEB\\\":\\\"0.0038480750000000\\\",\\\"REVU\\\":\\\"0.0105047450000000\\\",\\\"REVV\\\":\\\"0.0039760110000000\\\",\\\"ZRO\\\":\\\"3.7952014499999994\\\",\\\"XNL\\\":\\\"0.0093853050000000\\\",\\\"XNO\\\":\\\"0.8496749500000000\\\",\\\"SAROS\\\":\\\"0.0019290350000000\\\",\\\"KACE\\\":\\\"2.1165411999999998\\\",\\\"ZRX\\\":\\\"0.3186406000000000\\\",\\\"WLTH\\\":\\\"0.0374312750000000\\\",\\\"ATOM3L\\\":\\\"0.0321719060000000\\\",\\\"GMM\\\":\\\"0.0001497251000000\\\",\\\"BEER\\\":\\\"0.0000138670630000\\\",\\\"GMT\\\":\\\"0.1275362000000000\\\",\\\"HEART\\\":\\\"0.0159920000000000\\\",\\\"GMX\\\":\\\"22.7186349999999882\\\",\\\"ABBC\\\":\\\"0.0061769100000000\\\",\\\"OMNI\\\":\\\"8.9235359999999970\\\",\\\"ATOM3S\\\":\\\"0.0007945225400000\\\",\\\"IRL\\\":\\\"0.0099650150000000\\\",\\\"CFG\\\":\\\"0.3248375000000000\\\",\\\"WSDM\\\":\\\"0.0139830050000000\\\",\\\"GNS\\\":\\\"1.8390800000000001\\\",\\\"VANRY\\\":\\\"0.0809295150000000\\\",\\\"CFX\\\":\\\"0.1595202000000000\\\",\\\"GRAIL\\\":\\\"817.1212349999937891\\\",\\\"BEFI\\\":\\\"0.0175712100000000\\\",\\\"VELO\\\":\\\"0.0132043945000000\\\",\\\"XPR\\\":\\\"0.0008077959000000\\\",\\\"DOVI\\\":\\\"0.0584707500000000\\\",\\\"ACE\\\":\\\"0.0021349320000000\\\",\\\"ACH\\\":\\\"0.0190534685000000\\\",\\\"ISP\\\":\\\"0.0012161916000000\\\",\\\"XCAD\\\":\\\"0.2834582000000000\\\",\\\"MINA\\\":\\\"0.5630183500000000\\\",\\\"TIA\\\":\\\"5.9318325999999999\\\",\\\"DRIFT\\\":\\\"0.4350823500000000\\\",\\\"ACQ\\\":\\\"0.0056981495000000\\\",\\\"ACS\\\":\\\"0.0014917537500000\\\",\\\"MIND\\\":\\\"0.0018920535000000\\\",\\\"STORE\\\":\\\"0.0062358805000000\\\",\\\"REN\\\":\\\"0.0351224300000000\\\",\\\"ELA\\\":\\\"1.7282354500000000\\\",\\\"DREAMS\\\":\\\"0.0002498750000000\\\",\\\"ADA\\\":\\\"0.3463267500000000\\\",\\\"ELF\\\":\\\"0.3777110500000000\\\",\\\"REQ\\\":\\\"0.0959919800000000\\\",\\\"STORJ\\\":\\\"0.5662167500000000\\\",\\\"LADYS\\\":\\\"0.0000000837581000\\\",\\\"PAXG\\\":\\\"2697.9303600003123340\\\",\\\"REZ\\\":\\\"0.0409795000000000\\\",\\\"XRD\\\":\\\"0.0157821050000000\\\",\\\"CHO\\\":\\\"0.0205097400000000\\\",\\\"CHR\\\":\\\"0.1769115000000000\\\",\\\"ADS\\\":\\\"0.1889055000000000\\\",\\\"CHZ\\\":\\\"0.0738030800000000\\\",\\\"ADX\\\":\\\"0.1575212000000000\\\",\\\"XRP\\\":\\\"0.5525036100000000\\\",\\\"JASMY\\\":\\\"0.0188615645000000\\\",\\\"KAGI\\\":\\\"0.1834582250000000\\\",\\\"FIDA\\\":\\\"0.2282858000000000\\\",\\\"PBR\\\":\\\"0.0291953950000000\\\",\\\"AEG\\\":\\\"0.0093453250000000\\\",\\\"H2O\\\":\\\"0.1610194500000000\\\",\\\"CHMB\\\":\\\"0.0001715641750000\\\",\\\"SAND3L\\\":\\\"0.0015447972150000\\\",\\\"PBX\\\":\\\"0.0006879558500000\\\",\\\"SOLVE\\\":\\\"0.0084557700000000\\\",\\\"DECHAT\\\":\\\"0.1512243500000000\\\",\\\"GARI\\\":\\\"0.0076861550000000\\\",\\\"SHIB2L\\\":\\\"1.1996998499999999\\\",\\\"SHIB2S\\\":\\\"0.0240879500000000\\\",\\\"ENA\\\":\\\"0.3942028000000000\\\",\\\"VEMP\\\":\\\"0.0029335325000000\\\",\\\"ENJ\\\":\\\"0.1467266000000000\\\",\\\"AFG\\\":\\\"0.0072163900000000\\\",\\\"RATS\\\":\\\"0.0001211593900000\\\",\\\"GRT\\\":\\\"0.1646076550000000\\\",\\\"FORWARD\\\":\\\"0.0012873560000000\\\",\\\"TFUEL\\\":\\\"0.0598800450000000\\\",\\\"ENS\\\":\\\"17.0634640000000052\\\",\\\"KASDOWN\\\":\\\"0.0258770550000000\\\",\\\"XTM\\\":\\\"0.0251074400000000\\\",\\\"DEGEN\\\":\\\"0.0084857550000000\\\",\\\"TLM\\\":\\\"0.0100449750000000\\\",\\\"DYDXDOWN\\\":\\\"0.1042598440000000\\\",\\\"CKB\\\":\\\"0.0146026950000000\\\",\\\"LUNC\\\":\\\"0.0000889255150000\\\",\\\"AURORA\\\":\\\"0.1204397500000000\\\",\\\"LUNA\\\":\\\"0.3624187000000000\\\",\\\"XTZ\\\":\\\"0.6776610000000000\\\",\\\"ELON\\\":\\\"0.0000001410294500\\\",\\\"DMTR\\\":\\\"0.0891554000000000\\\",\\\"EOS\\\":\\\"0.4759619000000000\\\",\\\"GST\\\":\\\"0.0118940500000000\\\",\\\"FORT\\\":\\\"0.1155422000000000\\\",\\\"FLAME\\\":\\\"0.0247076400000000\\\",\\\"PATEX\\\":\\\"0.9605195000000000\\\",\\\"DEEP\\\":\\\"0.0328885475000000\\\",\\\"ID3L\\\":\\\"0.0016201895000000\\\",\\\"GTC\\\":\\\"0.6625685500000000\\\",\\\"ID3S\\\":\\\"0.0071674145000000\\\",\\\"RIO\\\":\\\"0.7616190000000000\\\",\\\"CLH\\\":\\\"0.0008555720000000\\\",\\\"BURGER\\\":\\\"0.4016990500000000\\\",\\\"VRA\\\":\\\"0.0029765110000000\\\",\\\"SUNDOG\\\":\\\"0.2173912500000000\\\",\\\"GTT\\\":\\\"0.0002038980000000\\\",\\\"INJUP\\\":\\\"0.2327835500000000\\\",\\\"CPOOL\\\":\\\"0.1557720750000000\\\",\\\"EPX\\\":\\\"0.0000740629500000\\\",\\\"CLV\\\":\\\"0.0329835000000000\\\",\\\"FEAR\\\":\\\"0.0560519600000000\\\",\\\"MEME\\\":\\\"0.0124847545000000\\\",\\\"ROOBEE\\\":\\\"0.0004520738500000\\\",\\\"DEFI\\\":\\\"0.0192903500000000\\\",\\\"TOKEN\\\":\\\"0.0477361200000000\\\",\\\"GRAPE\\\":\\\"0.0020599695000000\\\",\\\"KASUP\\\":\\\"0.3996001000000000\\\",\\\"XWG\\\":\\\"0.0003843077500000\\\",\\\"SKEY\\\":\\\"0.0621289200000000\\\",\\\"SFUND\\\":\\\"1.3243375000000000\\\",\\\"EQX\\\":\\\"0.0032823580000000\\\",\\\"ORDIUP\\\":\\\"0.0548315705000000\\\",\\\"TON\\\":\\\"5.1857058499999995\\\",\\\"DEGO\\\":\\\"2.2667660500000001\\\",\\\"IZI\\\":\\\"0.0088455750000000\\\",\\\"ERG\\\":\\\"0.6605695500000000\\\",\\\"ERN\\\":\\\"1.9255367500000001\\\",\\\"VENOM\\\":\\\"0.0817591000000000\\\",\\\"VOXEL\\\":\\\"0.1497251000000000\\\",\\\"RLC\\\":\\\"1.4649671500000000\\\",\\\"PHA\\\":\\\"0.1093453000000000\\\",\\\"DYDXUP\\\":\\\"0.0112573685000000\\\",\\\"APE3S\\\":\\\"0.0008475760000000\\\",\\\"ORBS\\\":\\\"0.0288955450000000\\\",\\\"OPDOWN\\\":\\\"0.6758619000000000\\\",\\\"ESE\\\":\\\"0.0139130400000000\\\",\\\"APE3L\\\":\\\"0.1339330000000000\\\",\\\"HMND\\\":\\\"0.0982208650000000\\\",\\\"COQ\\\":\\\"0.0000014432780000\\\",\\\"AURY\\\":\\\"0.3340329000000000\\\",\\\"CULT\\\":\\\"0.0000028025980000\\\",\\\"AKT\\\":\\\"2.4642672500000001\\\",\\\"GLMR\\\":\\\"0.1606196500000000\\\",\\\"XYM\\\":\\\"0.0142528700000000\\\",\\\"ORAI\\\":\\\"6.1769100000000012\\\",\\\"XYO\\\":\\\"0.0058680645000000\\\",\\\"ETC\\\":\\\"18.8458723500000169\\\",\\\"LAI\\\":\\\"0.0142828550000000\\\",\\\"PIP\\\":\\\"0.0178310800000000\\\",\\\"ETH\\\":\\\"2607.6655149998362673\\\",\\\"NEO\\\":\\\"10.3575186499999991\\\",\\\"RMV\\\":\\\"0.0081659150000000\\\",\\\"KLAY\\\":\\\"0.1251374000000000\\\",\\\"PIT\\\":\\\"0.0000000003268365\\\",\\\"TARA\\\":\\\"0.0043978000000000\\\",\\\"KALT\\\":\\\"0.1128735350000000\\\",\\\"PIX\\\":\\\"0.0001023687900000\\\",\\\"ETN\\\":\\\"0.0021579205000000\\\",\\\"CSIX\\\":\\\"0.0141729100000000\\\",\\\"TRADE\\\":\\\"0.4708644500000000\\\",\\\"MAVIA\\\":\\\"1.3592200500000001\\\",\\\"HIGH\\\":\\\"1.3043474999999999\\\",\\\"TRB\\\":\\\"62.5387150000000006\\\",\\\"ORDI\\\":\\\"35.7421200000000126\\\",\\\"TRVL\\\":\\\"0.0373643085000000\\\",\\\"AMB\\\":\\\"0.0059670150000000\\\",\\\"TRU\\\":\\\"0.0762018800000000\\\",\\\"LOGX\\\":\\\"0.0271963950000000\\\",\\\"FINC\\\":\\\"0.0362018900000000\\\",\\\"INFRA\\\":\\\"0.1978010500000000\\\",\\\"NATIX\\\":\\\"0.0008729633000000\\\",\\\"NFP\\\":\\\"0.2152923000000000\\\",\\\"TRY\\\":\\\"0.0292166033323590\\\",\\\"TRX\\\":\\\"0.1597201000000000\\\",\\\"LBP\\\":\\\"0.0001243378000000\\\",\\\"LBR\\\":\\\"0.0595702000000000\\\",\\\"EUL\\\":\\\"2.9735125000000000\\\",\\\"NFT\\\":\\\"0.0000004077960000\\\",\\\"SEIUP\\\":\\\"0.0478110825000000\\\",\\\"PUFFER\\\":\\\"0.3676161000000000\\\",\\\"EUR\\\":\\\"1.0811249323958897\\\",\\\"ORCA\\\":\\\"2.0664662499999999\\\",\\\"NEAR3L\\\":\\\"0.0117010765350000\\\",\\\"AMP\\\":\\\"0.0038330825000000\\\",\\\"XDEFI\\\":\\\"0.0472563600000000\\\",\\\"HIFI\\\":\\\"0.4947525000000000\\\",\\\"TRUF\\\":\\\"0.0459570100000000\\\",\\\"AITECH\\\":\\\"0.1045477000000000\\\",\\\"AMU\\\":\\\"0.0043978000000000\\\",\\\"USTC\\\":\\\"0.0214692600000000\\\",\\\"KNGL\\\":\\\"0.0499750000000000\\\",\\\"FOXY\\\":\\\"0.0102686631000000\\\",\\\"NGC\\\":\\\"0.0147935995000000\\\",\\\"TENET\\\":\\\"0.0043278350000000\\\",\\\"NEAR3S\\\":\\\"0.0072553705000000\\\",\\\"MAHA\\\":\\\"1.1904045000000000\\\",\\\"NGL\\\":\\\"0.0701748950000000\\\",\\\"TST\\\":\\\"0.0080359800000000\\\",\\\"HIPPO\\\":\\\"0.0104447750000000\\\",\\\"AXS3S\\\":\\\"0.0308705570000000\\\",\\\"CRO\\\":\\\"0.0781409100000000\\\",\\\"ZPAY\\\":\\\"0.0050574700000000\\\",\\\"MNDE\\\":\\\"0.1026786350000000\\\",\\\"CRV\\\":\\\"0.2534732000000000\\\",\\\"SWASH\\\":\\\"0.0056271850000000\\\",\\\"AXS3L\\\":\\\"0.0106388779000000\\\",\\\"VERSE\\\":\\\"0.0001803098000000\\\",\\\"RPK\\\":\\\"0.0049975000000000\\\",\\\"RPL\\\":\\\"10.9745099999999958\\\",\\\"AZERO\\\":\\\"0.3789104500000000\\\",\\\"SOUL\\\":\\\"0.0534332700000000\\\",\\\"VXV\\\":\\\"0.2619689500000000\\\",\\\"LDO\\\":\\\"1.0885554500000000\\\",\\\"MAGIC\\\":\\\"0.3390304000000000\\\",\\\"ALICE\\\":\\\"1.0324835000000000\\\",\\\"SEAM\\\":\\\"1.1933030499999999\\\",\\\"PLU\\\":\\\"1.9300345000000001\\\",\\\"AOG\\\":\\\"0.0031224380000000\\\",\\\"SMOLE\\\":\\\"0.0000387806000000\\\",\\\"EWT\\\":\\\"1.1094450000000000\\\",\\\"TSUGT\\\":\\\"0.0029185400000000\\\",\\\"PMG\\\":\\\"0.0800599500000000\\\",\\\"OPAI\\\":\\\"0.0006826585000000\\\",\\\"LOCUS\\\":\\\"0.0216591650000000\\\",\\\"CTA\\\":\\\"0.0825087250000000\\\",\\\"NIM\\\":\\\"0.0013673160000000\\\",\\\"CTC\\\":\\\"0.4033982000000000\\\",\\\"APE\\\":\\\"0.7035480500000000\\\",\\\"MERL\\\":\\\"0.2720639000000000\\\",\\\"JAM\\\":\\\"0.0004770613500000\\\",\\\"CTI\\\":\\\"0.0130314810000000\\\",\\\"APP\\\":\\\"0.0021989000000000\\\",\\\"APT\\\":\\\"9.9947001500000000\\\",\\\"WLDUP\\\":\\\"0.0093043455000000\\\",\\\"ZEND\\\":\\\"0.1280759300000000\\\",\\\"FIRE\\\":\\\"0.9113441000000000\\\",\\\"DENT\\\":\\\"0.0008630682500000\\\",\\\"PYTH\\\":\\\"0.3390603850000000\\\",\\\"LFT\\\":\\\"0.0155322300000000\\\",\\\"DPET\\\":\\\"0.0319040400000000\\\",\\\"ORDIDOWN\\\":\\\"0.3788105000000000\\\",\\\"KPOL\\\":\\\"0.0029175405000000\\\",\\\"ETHUP\\\":\\\"8.4971493000000032\\\",\\\"BAND\\\":\\\"1.0939527500000001\\\",\\\"POL\\\":\\\"0.3656171000000000\\\",\\\"ASTR\\\":\\\"0.0582608550000000\\\",\\\"NKN\\\":\\\"0.0691654000000000\\\",\\\"RSR\\\":\\\"0.0068055955000000\\\",\\\"DVPN\\\":\\\"0.0005979009000000\\\",\\\"TWT\\\":\\\"1.1119437500000000\\\",\\\"ARB\\\":\\\"0.5510243500000000\\\",\\\"CVC\\\":\\\"0.1409801746501747\\\",\\\"ARC\\\":\\\"0.0300849500000000\\\",\\\"XETA\\\":\\\"0.0022888550000000\\\",\\\"MTRG\\\":\\\"0.4007995000000000\\\",\\\"LOKA\\\":\\\"0.1867066000000000\\\",\\\"LPOOL\\\":\\\"0.0660069800000000\\\",\\\"TURBOS\\\":\\\"0.0034812585000000\\\",\\\"CVX\\\":\\\"1.7816087499999999\\\",\\\"ARX\\\":\\\"0.0007556220000000\\\",\\\"MPLX\\\":\\\"0.4355221300000000\\\",\\\"SUSHI\\\":\\\"0.7011492500000000\\\",\\\"NLK\\\":\\\"0.0114442750000000\\\",\\\"PEPE2\\\":\\\"0.0000000313843000\\\",\\\"WBTC\\\":\\\"66881.4425499645548419\\\",\\\"SUI3L\\\":\\\"0.0211204345000000\\\",\\\"CWS\\\":\\\"0.1927036000000000\\\",\\\"SUI3S\\\":\\\"0.0000579110300000\\\",\\\"INSP\\\":\\\"0.0264167850000000\\\",\\\"MANA\\\":\\\"0.2945026750000000\\\",\\\"VRTX\\\":\\\"0.0641679000000000\\\",\\\"CSPR\\\":\\\"0.0116441750000000\\\",\\\"ATA\\\":\\\"0.0785007300000000\\\",\\\"OPEN\\\":\\\"0.0080049955000000\\\",\\\"HAI\\\":\\\"0.0448275750000000\\\",\\\"NMR\\\":\\\"14.7436245000000072\\\",\\\"ATH\\\":\\\"0.0540929400000000\\\",\\\"LIT\\\":\\\"0.6282857000000000\\\",\\\"TLOS\\\":\\\"0.3263467450000000\\\",\\\"TNSR\\\":\\\"0.3662168000000000\\\",\\\"CXT\\\":\\\"0.0871364100000000\\\",\\\"POLYX\\\":\\\"0.2346826000000000\\\",\\\"ZERO\\\":\\\"0.0002507745500000\\\",\\\"ROUTE\\\":\\\"0.0610694500000000\\\",\\\"LOOM\\\":\\\"0.0580009850000000\\\",\\\"PRE\\\":\\\"0.0078680640000000\\\",\\\"VRAUP\\\":\\\"0.0134652640000000\\\",\\\"HBB\\\":\\\"0.0714742450000000\\\",\\\"RVN\\\":\\\"0.0165017450000000\\\",\\\"PRQ\\\":\\\"0.0715741950000000\\\",\\\"ONDO\\\":\\\"0.7134930750000000\\\",\\\"PEPEDOWN\\\":\\\"0.0000155022450000\\\",\\\"WOOP\\\":\\\"0.0020179905000000\\\",\\\"LUNCUP\\\":\\\"0.0168355780000000\\\",\\\"KAVA\\\":\\\"0.3522238000000000\\\",\\\"LKI\\\":\\\"0.0104187880000000\\\",\\\"AVA\\\":\\\"0.4857570000000000\\\",\\\"NOM\\\":\\\"0.0233883000000000\\\",\\\"MAPO\\\":\\\"0.0089015470000000\\\",\\\"PEPEUP\\\":\\\"0.0114252845000000\\\",\\\"STRAX\\\":\\\"0.0487156300000000\\\",\\\"NOT\\\":\\\"0.0078670645000000\\\",\\\"ZERC\\\":\\\"0.1108245600000000\\\",\\\"BCUT\\\":\\\"0.0255672100000000\\\",\\\"MASA\\\":\\\"0.0691354150000000\\\",\\\"WAN\\\":\\\"0.1785077544737212\\\",\\\"WAT\\\":\\\"0.0003273762300000\\\",\\\"WAX\\\":\\\"0.0327636100000000\\\",\\\"MASK\\\":\\\"2.2259864500000002\\\",\\\"EOS3L\\\":\\\"0.0002122138400000\\\",\\\"IDEA\\\":\\\"0.0005887055000000\\\",\\\"EOS3S\\\":\\\"0.0034472755000000\\\",\\\"YFI\\\":\\\"4919.4290549999908843\\\",\\\"MOODENG\\\":\\\"0.0774612500000000\\\",\\\"XCUR\\\":\\\"0.0048845565000000\\\",\\\"HYDRA\\\":\\\"0.2225886500000000\\\",\\\"POPCAT\\\":\\\"1.3382305500000000\\\",\\\"LQTY\\\":\\\"0.7848074000000000\\\",\\\"PIXEL\\\":\\\"0.1406596350000000\\\",\\\"LMR\\\":\\\"0.0145437245000000\\\",\\\"ZETA\\\":\\\"0.5997999500000000\\\",\\\"YGG\\\":\\\"0.4717640000000000\\\",\\\"AXS\\\":\\\"4.6006985000000006\\\",\\\"BCHSV\\\":\\\"49.8250749999999370\\\",\\\"NRN\\\":\\\"0.0395802000000000\\\",\\\"FTON\\\":\\\"0.0091954000000000\\\",\\\"COMP\\\":\\\"43.6581599999999881\\\",\\\"XPRT\\\":\\\"0.1819090000000000\\\",\\\"HFT\\\":\\\"0.1443278000000000\\\",\\\"UXLINK\\\":\\\"0.5085456000000000\\\",\\\"STAMP\\\":\\\"0.0335032400000000\\\",\\\"RUNE\\\":\\\"4.9233370999999996\\\",\\\"ZEUS\\\":\\\"0.2587705500000000\\\",\\\"LTC3L\\\":\\\"1.8294848000000001\\\",\\\"DAPP\\\":\\\"0.1763118000000000\\\",\\\"FORTH\\\":\\\"2.9508238500000004\\\",\\\"ALPINE\\\":\\\"1.5322335000000000\\\",\\\"SENSO\\\":\\\"0.0328835500000000\\\",\\\"LTC3S\\\":\\\"0.0006986505000000\\\",\\\"DEXE\\\":\\\"8.3795081500000028\\\",\\\"GOAL\\\":\\\"0.0175912000000000\\\",\\\"AVAX\\\":\\\"27.5602130000000058\\\",\\\"LISTA\\\":\\\"0.3782108000000000\\\",\\\"AMPL\\\":\\\"1.3743124999999999\\\",\\\"WORK\\\":\\\"0.1384307500000000\\\",\\\"BRWL\\\":\\\"0.0017391300000000\\\",\\\"BANANA\\\":\\\"57.1314200000001362\\\",\\\"PUSH\\\":\\\"0.0750624500000000\\\",\\\"WEN\\\":\\\"0.0001015492000000\\\",\\\"NEIRO\\\":\\\"0.0879560000000000\\\",\\\"BTCUP\\\":\\\"34.7711057499999789\\\",\\\"SOL3S\\\":\\\"0.0007816090000000\\\",\\\"BRAWL\\\":\\\"0.0004776610500000\\\",\\\"LAY3R\\\":\\\"0.2161918500000000\\\",\\\"LPT\\\":\\\"11.9304317999999945\\\",\\\"GODS\\\":\\\"0.1807096000000000\\\",\\\"SAND3S\\\":\\\"4.6152911999999992\\\",\\\"RDNT\\\":\\\"0.0640679500000000\\\",\\\"SOL3L\\\":\\\"1.8351913752850000\\\",\\\"NIBI\\\":\\\"0.0653772950000000\\\",\\\"NUM\\\":\\\"0.0436181800000000\\\",\\\"PYR\\\":\\\"2.5590198499999997\\\",\\\"DAG\\\":\\\"0.0226176855000000\\\",\\\"DAI\\\":\\\"0.9989006596042375\\\",\\\"HIP\\\":\\\"0.0034982500000000\\\",\\\"DAO\\\":\\\"0.2848575000000000\\\",\\\"AVAIL\\\":\\\"0.1300929210000000\\\",\\\"DAR\\\":\\\"0.1512243500000000\\\",\\\"FET\\\":\\\"1.3760116500000000\\\",\\\"FCON\\\":\\\"0.0001197600900000\\\",\\\"XAVA\\\":\\\"0.3789104500000000\\\",\\\"LRC\\\":\\\"0.1208395500000000\\\",\\\"UNI3S\\\":\\\"0.0000653573050000\\\",\\\"PZP\\\":\\\"0.0599600050000000\\\",\\\"POKT\\\":\\\"0.0424787500000000\\\",\\\"DASH\\\":\\\"23.6881500000000109\\\",\\\"BAKEDOWN\\\":\\\"0.0003324636850000\\\",\\\"POLC\\\":\\\"0.0061389290000000\\\",\\\"DBR\\\":\\\"0.0377671070000000\\\",\\\"CIRUS\\\":\\\"0.0055772100000000\\\",\\\"UNI3L\\\":\\\"0.0993921490650000\\\",\\\"NWC\\\":\\\"0.0681659000000000\\\",\\\"POLK\\\":\\\"0.0142628650000000\\\",\\\"LSD\\\":\\\"0.9420287500000000\\\",\\\"MARS4\\\":\\\"0.0005878059500000\\\",\\\"LSK\\\":\\\"0.8080957500000000\\\",\\\"BLOCK\\\":\\\"0.0261869000000000\\\",\\\"ANALOS\\\":\\\"0.0000446776500000\\\",\\\"SAFE\\\":\\\"0.8779608000000000\\\",\\\"DCK\\\":\\\"0.0234082900000000\\\",\\\"LSS\\\":\\\"0.0562718500000000\\\",\\\"DCR\\\":\\\"12.4337799999999929\\\",\\\"LIKE\\\":\\\"0.0559720000000000\\\",\\\"DATA\\\":\\\"0.0361819000000000\\\",\\\"WIF\\\":\\\"2.5696145499999999\\\",\\\"BLOK\\\":\\\"0.0006546725000000\\\",\\\"LTC\\\":\\\"71.6261690000000611\\\",\\\"METIS\\\":\\\"42.0289750000000612\\\",\\\"WIN\\\":\\\"0.0000868365600000\\\",\\\"HLG\\\":\\\"0.0018790600000000\\\",\\\"LTO\\\":\\\"0.1166116650000000\\\",\\\"DYDX\\\":\\\"0.9341327000000000\\\",\\\"ARB3S\\\":\\\"0.0509025360000000\\\",\\\"MUBI\\\":\\\"0.0303848000000000\\\",\\\"ARB3L\\\":\\\"0.0025917035000000\\\",\\\"RBTC1\\\":\\\"0.0000039480250000\\\",\\\"POND\\\":\\\"0.0118640650000000\\\",\\\"LINA\\\":\\\"0.0037771105000000\\\",\\\"MYRIA\\\":\\\"0.0025337325000000\\\",\\\"LINK\\\":\\\"11.0244849999999944\\\",\\\"QTUM\\\":\\\"2.4262016723130069\\\",\\\"TUNE\\\":\\\"0.0148025950000000\\\",\\\"UFO\\\":\\\"0.0000006479758500\\\",\\\"CYBER\\\":\\\"2.8755615000000001\\\",\\\"WILD\\\":\\\"0.2433782500000000\\\",\\\"POLS\\\":\\\"0.2809594500000000\\\",\\\"NYM\\\":\\\"0.0719640000000000\\\",\\\"FIL\\\":\\\"3.6786597500000005\\\",\\\"BAL\\\":\\\"2.0099945000000000\\\",\\\"SCA\\\":\\\"0.3999999000000000\\\",\\\"STND\\\":\\\"0.0133123405000000\\\",\\\"WMTX\\\":\\\"0.2138930000000000\\\",\\\"SCLP\\\":\\\"0.1545227000000000\\\",\\\"MANEKI\\\":\\\"0.0073963000000000\\\",\\\"BAT\\\":\\\"0.1721139000000000\\\",\\\"AKRO\\\":\\\"0.0042302838000000\\\",\\\"FTM3L\\\":\\\"8.2574692000000024\\\",\\\"BAX\\\":\\\"0.0000709645000000\\\",\\\"FTM3S\\\":\\\"0.0000255072400000\\\",\\\"COTI\\\":\\\"0.0951524000000000\\\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * get24hrStats Request - * Get 24hr Stats - * /api/v1/market/stats - */ + + /** get24hrStats Request Get 24hr Stats /api/v1/market/stats */ public static void testGet24hrStatsRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\"}"; + String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; Get24hrStatsReq obj = mapper.readValue(data, Get24hrStatsReq.class); } - /** - * get24hrStats Response - * Get 24hr Stats - * /api/v1/market/stats - */ + /** get24hrStats Response Get 24hr Stats /api/v1/market/stats */ public static void testGet24hrStatsResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"time\":1729175612158,\"symbol\":\"BTC-USDT\",\"buy\":\"66982.4\",\"sell\":\"66982.5\",\"changeRate\":\"-0.0114\",\"changePrice\":\"-778.1\",\"high\":\"68107.7\",\"low\":\"66683.3\",\"vol\":\"1738.02898182\",\"volValue\":\"117321982.415978333\",\"last\":\"66981.5\",\"averagePrice\":\"67281.21437289\",\"takerFeeRate\":\"0.001\",\"makerFeeRate\":\"0.001\",\"takerCoefficient\":\"1\",\"makerCoefficient\":\"1\"}}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"time\\\":1729175612158,\\\"symbol\\\":\\\"BTC-USDT\\\",\\\"buy\\\":\\\"66982.4\\\",\\\"sell\\\":\\\"66982.5\\\",\\\"changeRate\\\":\\\"-0.0114\\\",\\\"changePrice\\\":\\\"-778.1\\\",\\\"high\\\":\\\"68107.7\\\",\\\"low\\\":\\\"66683.3\\\",\\\"vol\\\":\\\"1738.02898182\\\",\\\"volValue\\\":\\\"117321982.415978333\\\",\\\"last\\\":\\\"66981.5\\\",\\\"averagePrice\\\":\\\"67281.21437289\\\",\\\"takerFeeRate\\\":\\\"0.001\\\",\\\"makerFeeRate\\\":\\\"0.001\\\",\\\"takerCoefficient\\\":\\\"1\\\",\\\"makerCoefficient\\\":\\\"1\\\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * getMarketList Request - * Get Market List - * /api/v1/markets - */ + + /** getMarketList Request Get Market List /api/v1/markets */ public static void testGetMarketListRequest() throws Exception { // $this->assertTrue(true); } - /** - * getMarketList Response - * Get Market List - * /api/v1/markets - */ + /** getMarketList Response Get Market List /api/v1/markets */ public static void testGetMarketListResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":[\"USDS\",\"TON\",\"AI\",\"DePIN\",\"PoW\",\"BRC-20\",\"ETF\",\"KCS\",\"Meme\",\"Solana\",\"FIAT\",\"VR&AR\",\"DeFi\",\"Polkadot\",\"BTC\",\"ALTS\",\"Layer 1\"]}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":[\\\"USDS\\\",\\\"TON\\\",\\\"AI\\\",\\\"DePIN\\\",\\\"PoW\\\",\\\"BRC-20\\\",\\\"ETF\\\",\\\"KCS\\\",\\\"Meme\\\",\\\"Solana\\\",\\\"FIAT\\\",\\\"VR&AR\\\",\\\"DeFi\\\",\\\"Polkadot\\\",\\\"BTC\\\",\\\"ALTS\\\",\\\"Layer" + + " 1\\\"]}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * getClientIPAddress Request - * Get Client IP Address - * /api/v1/my-ip - */ + + /** getClientIPAddress Request Get Client IP Address /api/v1/my-ip */ public static void testGetClientIPAddressRequest() throws Exception { // $this->assertTrue(true); } - /** - * getClientIPAddress Response - * Get Client IP Address - * /api/v1/my-ip - */ + /** getClientIPAddress Response Get Client IP Address /api/v1/my-ip */ public static void testGetClientIPAddressResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":\"20.***.***.128\"}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":\\\"20.***.***.128\\\"}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * getServerTime Request - * Get Server Time - * /api/v1/timestamp - */ + + /** getServerTime Request Get Server Time /api/v1/timestamp */ public static void testGetServerTimeRequest() throws Exception { // $this->assertTrue(true); } - /** - * getServerTime Response - * Get Server Time - * /api/v1/timestamp - */ + /** getServerTime Response Get Server Time /api/v1/timestamp */ public static void testGetServerTimeResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":1729100692873}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":1729100692873}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * getServiceStatus Request - * Get Service Status - * /api/v1/status - */ + + /** getServiceStatus Request Get Service Status /api/v1/status */ public static void testGetServiceStatusRequest() throws Exception { // $this->assertTrue(true); } - /** - * getServiceStatus Response - * Get Service Status - * /api/v1/status - */ + /** getServiceStatus Response Get Service Status /api/v1/status */ public static void testGetServiceStatusResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"status\":\"open\",\"msg\":\"\"}}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"status\\\":\\\"open\\\",\\\"msg\\\":\\\"\\\"}}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * getPublicToken Request - * Get Public Token - Spot/Margin - * /api/v1/bullet-public - */ + + /** getPublicToken Request Get Public Token - Spot/Margin /api/v1/bullet-public */ public static void testGetPublicTokenRequest() throws Exception { // $this->assertTrue(true); } - /** - * getPublicToken Response - * Get Public Token - Spot/Margin - * /api/v1/bullet-public - */ + /** getPublicToken Response Get Public Token - Spot/Margin /api/v1/bullet-public */ public static void testGetPublicTokenResponse() throws Exception { String data = - "{\n \"code\": \"200000\",\n \"data\": {\n \"token\": \"2neAiuYvAU61ZDXANAGAsiL4-iAExhsBXZxftpOeh_55i3Ysy2q2LEsEWU64mdzUOPusi34M_wGoSf7iNyEWJ93g2WHl-j4M7tCZ_S21PuIByWXUJFDywtiYB9J6i9GjsxUuhPw3Blq6rhZlGykT3Vp1phUafnulOOpts-MEmEF-3bpfetLOAq79RbGaLlE4JBvJHl5Vs9Y=.ymP9jIr6v-vucrZr8761yA==\",\n \"instanceServers\": [\n {\n \"endpoint\": \"wss://ws-api-spot.kucoin.com/\",\n \"encrypt\": true,\n \"protocol\": \"websocket\",\n \"pingInterval\": 18000,\n \"pingTimeout\": 10000\n }\n ]\n }\n}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"token\\\":" + + " \\\"2neAiuYvAU61ZDXANAGAsiL4-iAExhsBXZxftpOeh_55i3Ysy2q2LEsEWU64mdzUOPusi34M_wGoSf7iNyEWJ93g2WHl-j4M7tCZ_S21PuIByWXUJFDywtiYB9J6i9GjsxUuhPw3Blq6rhZlGykT3Vp1phUafnulOOpts-MEmEF-3bpfetLOAq79RbGaLlE4JBvJHl5Vs9Y=.ymP9jIr6v-vucrZr8761yA==\\\",\\n" + + " \\\"instanceServers\\\": [\\n" + + " {\\n" + + " \\\"endpoint\\\": \\\"wss://ws-api-spot.kucoin.com/\\\",\\n" + + " \\\"encrypt\\\": true,\\n" + + " \\\"protocol\\\": \\\"websocket\\\",\\n" + + " \\\"pingInterval\\\": 18000,\\n" + + " \\\"pingTimeout\\\": 10000\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * getPrivateToken Request - * Get Private Token - Spot/Margin - * /api/v1/bullet-private - */ + + /** getPrivateToken Request Get Private Token - Spot/Margin /api/v1/bullet-private */ public static void testGetPrivateTokenRequest() throws Exception { // $this->assertTrue(true); } - /** - * getPrivateToken Response - * Get Private Token - Spot/Margin - * /api/v1/bullet-private - */ + /** getPrivateToken Response Get Private Token - Spot/Margin /api/v1/bullet-private */ public static void testGetPrivateTokenResponse() throws Exception { String data = - "{\n \"code\": \"200000\",\n \"data\": {\n \"token\": \"2neAiuYvAU737TOajb2U3uT8AEZqSWYe0fBD4LoHuXJDSC7gIzJiH4kNTWhCPISWo6nDpAe7aUaaHJ4fG8oRjFgMfUI2sM4IySWHrBceFocY8pKy2REU1HwZIngtMdMrjqPnP-biofFWbNaP1cl0X1pZc2SQ-33hDH1LgNP-yg80ZJv_Ctaj8sAFhTOZ8m1L.jut4vBQxXAseWKxODdGVGg==\",\n \"instanceServers\": [\n {\n \"endpoint\": \"wss://ws-api-spot.kucoin.com/\",\n \"encrypt\": true,\n \"protocol\": \"websocket\",\n \"pingInterval\": 18000,\n \"pingTimeout\": 10000\n }\n ]\n }\n}"; - RestResponse resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"token\\\":" + + " \\\"2neAiuYvAU737TOajb2U3uT8AEZqSWYe0fBD4LoHuXJDSC7gIzJiH4kNTWhCPISWo6nDpAe7aUaaHJ4fG8oRjFgMfUI2sM4IySWHrBceFocY8pKy2REU1HwZIngtMdMrjqPnP-biofFWbNaP1cl0X1pZc2SQ-33hDH1LgNP-yg80ZJv_Ctaj8sAFhTOZ8m1L.jut4vBQxXAseWKxODdGVGg==\\\",\\n" + + " \\\"instanceServers\\\": [\\n" + + " {\\n" + + " \\\"endpoint\\\": \\\"wss://ws-api-spot.kucoin.com/\\\",\\n" + + " \\\"encrypt\\\": true,\\n" + + " \\\"protocol\\\": \\\"websocket\\\",\\n" + + " \\\"pingInterval\\\": 18000,\\n" + + " \\\"pingTimeout\\\": 10000\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + + "}"; + RestResponse resp = + mapper.readValue(data, new TypeReference>() {}); } public static void runAllTests() { - run(MarketApiAutoGeneratedTest::testGetAnnouncementsRequest, - "testGetAnnouncementsRequest"); - run(MarketApiAutoGeneratedTest::testGetAnnouncementsResponse, - "testGetAnnouncementsResponse"); - run(MarketApiAutoGeneratedTest::testGetCurrencyRequest, - "testGetCurrencyRequest"); - run(MarketApiAutoGeneratedTest::testGetCurrencyResponse, - "testGetCurrencyResponse"); - run(MarketApiAutoGeneratedTest::testGetAllCurrenciesRequest, - "testGetAllCurrenciesRequest"); - run(MarketApiAutoGeneratedTest::testGetAllCurrenciesResponse, - "testGetAllCurrenciesResponse"); - run(MarketApiAutoGeneratedTest::testGetSymbolRequest, - "testGetSymbolRequest"); - run(MarketApiAutoGeneratedTest::testGetSymbolResponse, - "testGetSymbolResponse"); - run(MarketApiAutoGeneratedTest::testGetAllSymbolsRequest, - "testGetAllSymbolsRequest"); - run(MarketApiAutoGeneratedTest::testGetAllSymbolsResponse, - "testGetAllSymbolsResponse"); - run(MarketApiAutoGeneratedTest::testGetTickerRequest, - "testGetTickerRequest"); - run(MarketApiAutoGeneratedTest::testGetTickerResponse, - "testGetTickerResponse"); - run(MarketApiAutoGeneratedTest::testGetAllTickersRequest, - "testGetAllTickersRequest"); - run(MarketApiAutoGeneratedTest::testGetAllTickersResponse, - "testGetAllTickersResponse"); - run(MarketApiAutoGeneratedTest::testGetTradeHistoryRequest, - "testGetTradeHistoryRequest"); - run(MarketApiAutoGeneratedTest::testGetTradeHistoryResponse, - "testGetTradeHistoryResponse"); - run(MarketApiAutoGeneratedTest::testGetKlinesRequest, - "testGetKlinesRequest"); - run(MarketApiAutoGeneratedTest::testGetKlinesResponse, - "testGetKlinesResponse"); - run(MarketApiAutoGeneratedTest::testGetPartOrderBookRequest, - "testGetPartOrderBookRequest"); - run(MarketApiAutoGeneratedTest::testGetPartOrderBookResponse, - "testGetPartOrderBookResponse"); - run(MarketApiAutoGeneratedTest::testGetFullOrderBookRequest, - "testGetFullOrderBookRequest"); - run(MarketApiAutoGeneratedTest::testGetFullOrderBookResponse, - "testGetFullOrderBookResponse"); - run(MarketApiAutoGeneratedTest::testGetCallAuctionPartOrderBookRequest, + run(MarketApiAutoGeneratedTest::testGetAnnouncementsRequest, "testGetAnnouncementsRequest"); + run(MarketApiAutoGeneratedTest::testGetAnnouncementsResponse, "testGetAnnouncementsResponse"); + run(MarketApiAutoGeneratedTest::testGetCurrencyRequest, "testGetCurrencyRequest"); + run(MarketApiAutoGeneratedTest::testGetCurrencyResponse, "testGetCurrencyResponse"); + run(MarketApiAutoGeneratedTest::testGetAllCurrenciesRequest, "testGetAllCurrenciesRequest"); + run(MarketApiAutoGeneratedTest::testGetAllCurrenciesResponse, "testGetAllCurrenciesResponse"); + run(MarketApiAutoGeneratedTest::testGetSymbolRequest, "testGetSymbolRequest"); + run(MarketApiAutoGeneratedTest::testGetSymbolResponse, "testGetSymbolResponse"); + run(MarketApiAutoGeneratedTest::testGetAllSymbolsRequest, "testGetAllSymbolsRequest"); + run(MarketApiAutoGeneratedTest::testGetAllSymbolsResponse, "testGetAllSymbolsResponse"); + run(MarketApiAutoGeneratedTest::testGetTickerRequest, "testGetTickerRequest"); + run(MarketApiAutoGeneratedTest::testGetTickerResponse, "testGetTickerResponse"); + run(MarketApiAutoGeneratedTest::testGetAllTickersRequest, "testGetAllTickersRequest"); + run(MarketApiAutoGeneratedTest::testGetAllTickersResponse, "testGetAllTickersResponse"); + run(MarketApiAutoGeneratedTest::testGetTradeHistoryRequest, "testGetTradeHistoryRequest"); + run(MarketApiAutoGeneratedTest::testGetTradeHistoryResponse, "testGetTradeHistoryResponse"); + run(MarketApiAutoGeneratedTest::testGetKlinesRequest, "testGetKlinesRequest"); + run(MarketApiAutoGeneratedTest::testGetKlinesResponse, "testGetKlinesResponse"); + run(MarketApiAutoGeneratedTest::testGetPartOrderBookRequest, "testGetPartOrderBookRequest"); + run(MarketApiAutoGeneratedTest::testGetPartOrderBookResponse, "testGetPartOrderBookResponse"); + run(MarketApiAutoGeneratedTest::testGetFullOrderBookRequest, "testGetFullOrderBookRequest"); + run(MarketApiAutoGeneratedTest::testGetFullOrderBookResponse, "testGetFullOrderBookResponse"); + run( + MarketApiAutoGeneratedTest::testGetCallAuctionPartOrderBookRequest, "testGetCallAuctionPartOrderBookRequest"); - run(MarketApiAutoGeneratedTest::testGetCallAuctionPartOrderBookResponse, + run( + MarketApiAutoGeneratedTest::testGetCallAuctionPartOrderBookResponse, "testGetCallAuctionPartOrderBookResponse"); - run(MarketApiAutoGeneratedTest::testGetCallAuctionInfoRequest, - "testGetCallAuctionInfoRequest"); - run(MarketApiAutoGeneratedTest::testGetCallAuctionInfoResponse, + run(MarketApiAutoGeneratedTest::testGetCallAuctionInfoRequest, "testGetCallAuctionInfoRequest"); + run( + MarketApiAutoGeneratedTest::testGetCallAuctionInfoResponse, "testGetCallAuctionInfoResponse"); - run(MarketApiAutoGeneratedTest::testGetFiatPriceRequest, - "testGetFiatPriceRequest"); - run(MarketApiAutoGeneratedTest::testGetFiatPriceResponse, - "testGetFiatPriceResponse"); - run(MarketApiAutoGeneratedTest::testGet24hrStatsRequest, - "testGet24hrStatsRequest"); - run(MarketApiAutoGeneratedTest::testGet24hrStatsResponse, - "testGet24hrStatsResponse"); - run(MarketApiAutoGeneratedTest::testGetMarketListRequest, - "testGetMarketListRequest"); - run(MarketApiAutoGeneratedTest::testGetMarketListResponse, - "testGetMarketListResponse"); - run(MarketApiAutoGeneratedTest::testGetClientIPAddressRequest, - "testGetClientIPAddressRequest"); - run(MarketApiAutoGeneratedTest::testGetClientIPAddressResponse, + run(MarketApiAutoGeneratedTest::testGetFiatPriceRequest, "testGetFiatPriceRequest"); + run(MarketApiAutoGeneratedTest::testGetFiatPriceResponse, "testGetFiatPriceResponse"); + run(MarketApiAutoGeneratedTest::testGet24hrStatsRequest, "testGet24hrStatsRequest"); + run(MarketApiAutoGeneratedTest::testGet24hrStatsResponse, "testGet24hrStatsResponse"); + run(MarketApiAutoGeneratedTest::testGetMarketListRequest, "testGetMarketListRequest"); + run(MarketApiAutoGeneratedTest::testGetMarketListResponse, "testGetMarketListResponse"); + run(MarketApiAutoGeneratedTest::testGetClientIPAddressRequest, "testGetClientIPAddressRequest"); + run( + MarketApiAutoGeneratedTest::testGetClientIPAddressResponse, "testGetClientIPAddressResponse"); - run(MarketApiAutoGeneratedTest::testGetServerTimeRequest, - "testGetServerTimeRequest"); - run(MarketApiAutoGeneratedTest::testGetServerTimeResponse, - "testGetServerTimeResponse"); - run(MarketApiAutoGeneratedTest::testGetServiceStatusRequest, - "testGetServiceStatusRequest"); - run(MarketApiAutoGeneratedTest::testGetServiceStatusResponse, - "testGetServiceStatusResponse"); - run(MarketApiAutoGeneratedTest::testGetPublicTokenRequest, - "testGetPublicTokenRequest"); - run(MarketApiAutoGeneratedTest::testGetPublicTokenResponse, - "testGetPublicTokenResponse"); - run(MarketApiAutoGeneratedTest::testGetPrivateTokenRequest, - "testGetPrivateTokenRequest"); - run(MarketApiAutoGeneratedTest::testGetPrivateTokenResponse, - "testGetPrivateTokenResponse"); + run(MarketApiAutoGeneratedTest::testGetServerTimeRequest, "testGetServerTimeRequest"); + run(MarketApiAutoGeneratedTest::testGetServerTimeResponse, "testGetServerTimeResponse"); + run(MarketApiAutoGeneratedTest::testGetServiceStatusRequest, "testGetServiceStatusRequest"); + run(MarketApiAutoGeneratedTest::testGetServiceStatusResponse, "testGetServiceStatusResponse"); + run(MarketApiAutoGeneratedTest::testGetPublicTokenRequest, "testGetPublicTokenRequest"); + run(MarketApiAutoGeneratedTest::testGetPublicTokenResponse, "testGetPublicTokenResponse"); + run(MarketApiAutoGeneratedTest::testGetPrivateTokenRequest, "testGetPrivateTokenRequest"); + run(MarketApiAutoGeneratedTest::testGetPrivateTokenResponse, "testGetPrivateTokenResponse"); } private static void run(TestCase test, String name) { @@ -570,4 +836,4 @@ public static void finish() { System.out.println("\nAll tests passed."); } } -} \ No newline at end of file +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiImpl.java index e4c1c5b9..4b5bce88 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiImpl.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiImpl.java @@ -1,124 +1,143 @@ // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. package com.kucoin.universal.sdk.generate.spot.market; + import com.kucoin.universal.sdk.internal.interfaces.Transport; public class MarketApiImpl implements MarketApi { private final Transport transport; - public MarketApiImpl(Transport transport) { this.transport = transport; } + public MarketApiImpl(Transport transport) { + this.transport = transport; + } public GetAnnouncementsResp getAnnouncements(GetAnnouncementsReq req) { - return this.transport.call("spot", false, "GET", "/api/v3/announcements", - req, GetAnnouncementsResp.class, false); + return this.transport.call( + "spot", false, "GET", "/api/v3/announcements", req, GetAnnouncementsResp.class, false); } public GetCurrencyResp getCurrency(GetCurrencyReq req) { - return this.transport.call("spot", false, "GET", - "/api/v3/currencies/{currency}", req, - GetCurrencyResp.class, false); + return this.transport.call( + "spot", false, "GET", "/api/v3/currencies/{currency}", req, GetCurrencyResp.class, false); } public GetAllCurrenciesResp getAllCurrencies() { - return this.transport.call("spot", false, "GET", "/api/v3/currencies", null, - GetAllCurrenciesResp.class, false); + return this.transport.call( + "spot", false, "GET", "/api/v3/currencies", null, GetAllCurrenciesResp.class, false); } public GetSymbolResp getSymbol(GetSymbolReq req) { - return this.transport.call("spot", false, "GET", "/api/v2/symbols/{symbol}", - req, GetSymbolResp.class, false); + return this.transport.call( + "spot", false, "GET", "/api/v2/symbols/{symbol}", req, GetSymbolResp.class, false); } public GetAllSymbolsResp getAllSymbols(GetAllSymbolsReq req) { - return this.transport.call("spot", false, "GET", "/api/v2/symbols", req, - GetAllSymbolsResp.class, false); + return this.transport.call( + "spot", false, "GET", "/api/v2/symbols", req, GetAllSymbolsResp.class, false); } public GetTickerResp getTicker(GetTickerReq req) { - return this.transport.call("spot", false, "GET", - "/api/v1/market/orderbook/level1", req, - GetTickerResp.class, false); + return this.transport.call( + "spot", false, "GET", "/api/v1/market/orderbook/level1", req, GetTickerResp.class, false); } public GetAllTickersResp getAllTickers() { - return this.transport.call("spot", false, "GET", - "/api/v1/market/allTickers", null, - GetAllTickersResp.class, false); + return this.transport.call( + "spot", false, "GET", "/api/v1/market/allTickers", null, GetAllTickersResp.class, false); } public GetTradeHistoryResp getTradeHistory(GetTradeHistoryReq req) { - return this.transport.call("spot", false, "GET", "/api/v1/market/histories", - req, GetTradeHistoryResp.class, false); + return this.transport.call( + "spot", false, "GET", "/api/v1/market/histories", req, GetTradeHistoryResp.class, false); } public GetKlinesResp getKlines(GetKlinesReq req) { - return this.transport.call("spot", false, "GET", "/api/v1/market/candles", - req, GetKlinesResp.class, false); + return this.transport.call( + "spot", false, "GET", "/api/v1/market/candles", req, GetKlinesResp.class, false); } public GetPartOrderBookResp getPartOrderBook(GetPartOrderBookReq req) { - return this.transport.call("spot", false, "GET", - "/api/v1/market/orderbook/level2_{size}", req, - GetPartOrderBookResp.class, false); + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/market/orderbook/level2_{size}", + req, + GetPartOrderBookResp.class, + false); } public GetFullOrderBookResp getFullOrderBook(GetFullOrderBookReq req) { - return this.transport.call("spot", false, "GET", - "/api/v3/market/orderbook/level2", req, - GetFullOrderBookResp.class, false); + return this.transport.call( + "spot", + false, + "GET", + "/api/v3/market/orderbook/level2", + req, + GetFullOrderBookResp.class, + false); } - public GetCallAuctionPartOrderBookResp - getCallAuctionPartOrderBook(GetCallAuctionPartOrderBookReq req) { + public GetCallAuctionPartOrderBookResp getCallAuctionPartOrderBook( + GetCallAuctionPartOrderBookReq req) { return this.transport.call( - "spot", false, "GET", - "/api/v1/market/orderbook/callauction/level2_{size}", req, - GetCallAuctionPartOrderBookResp.class, false); + "spot", + false, + "GET", + "/api/v1/market/orderbook/callauction/level2_{size}", + req, + GetCallAuctionPartOrderBookResp.class, + false); } public GetCallAuctionInfoResp getCallAuctionInfo(GetCallAuctionInfoReq req) { - return this.transport.call("spot", false, "GET", - "/api/v1/market/callauctionData", req, - GetCallAuctionInfoResp.class, false); + return this.transport.call( + "spot", + false, + "GET", + "/api/v1/market/callauctionData", + req, + GetCallAuctionInfoResp.class, + false); } public GetFiatPriceResp getFiatPrice(GetFiatPriceReq req) { - return this.transport.call("spot", false, "GET", "/api/v1/prices", req, - GetFiatPriceResp.class, false); + return this.transport.call( + "spot", false, "GET", "/api/v1/prices", req, GetFiatPriceResp.class, false); } public Get24hrStatsResp get24hrStats(Get24hrStatsReq req) { - return this.transport.call("spot", false, "GET", "/api/v1/market/stats", - req, Get24hrStatsResp.class, false); + return this.transport.call( + "spot", false, "GET", "/api/v1/market/stats", req, Get24hrStatsResp.class, false); } public GetMarketListResp getMarketList() { - return this.transport.call("spot", false, "GET", "/api/v1/markets", null, - GetMarketListResp.class, false); + return this.transport.call( + "spot", false, "GET", "/api/v1/markets", null, GetMarketListResp.class, false); } public GetClientIPAddressResp getClientIPAddress() { - return this.transport.call("spot", false, "GET", "/api/v1/my-ip", null, - GetClientIPAddressResp.class, false); + return this.transport.call( + "spot", false, "GET", "/api/v1/my-ip", null, GetClientIPAddressResp.class, false); } public GetServerTimeResp getServerTime() { - return this.transport.call("spot", false, "GET", "/api/v1/timestamp", null, - GetServerTimeResp.class, false); + return this.transport.call( + "spot", false, "GET", "/api/v1/timestamp", null, GetServerTimeResp.class, false); } public GetServiceStatusResp getServiceStatus() { - return this.transport.call("spot", false, "GET", "/api/v1/status", null, - GetServiceStatusResp.class, false); + return this.transport.call( + "spot", false, "GET", "/api/v1/status", null, GetServiceStatusResp.class, false); } public GetPublicTokenResp getPublicToken() { - return this.transport.call("spot", false, "POST", "/api/v1/bullet-public", - null, GetPublicTokenResp.class, false); + return this.transport.call( + "spot", false, "POST", "/api/v1/bullet-public", null, GetPublicTokenResp.class, false); } public GetPrivateTokenResp getPrivateToken() { - return this.transport.call("spot", false, "POST", "/api/v1/bullet-private", - null, GetPrivateTokenResp.class, false); + return this.transport.call( + "spot", false, "POST", "/api/v1/bullet-private", null, GetPrivateTokenResp.class, false); } -} \ No newline at end of file +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiAutoGeneratedTest.java index 04aa6fa5..85b616aa 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiAutoGeneratedTest.java @@ -14,16 +14,16 @@ class OrderApiAutoGeneratedTest { /** addOrder Request Add Order /api/v1/hf/orders */ public static void testAddOrderRequest() throws Exception { String 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\\\", \\\"size\\\": \\\"0.00001\\\", \\\"clientOid\\\":" + + " \\\"5c52e11203aa677f33e493fb\\\", \\\"remark\\\": \\\"order remarks\\\"}"; AddOrderReq obj = mapper.readValue(data, AddOrderReq.class); } /** addOrder Response Add Order /api/v1/hf/orders */ public static void testAddOrderResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"orderId\":\"670fd33bf9406e0007ab3945\",\"clientOid\":\"5c52e11203aa677f33e493fb\"}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"orderId\\\":\\\"670fd33bf9406e0007ab3945\\\",\\\"clientOid\\\":\\\"5c52e11203aa677f33e493fb\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -31,16 +31,16 @@ public static void testAddOrderResponse() throws Exception { /** addOrderSync Request Add Order Sync /api/v1/hf/orders/sync */ public static void testAddOrderSyncRequest() throws Exception { String data = - "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," - + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493f\", \"remark\":" - + " \"order remarks\"}"; + "{\\\"type\\\": \\\"limit\\\", \\\"symbol\\\": \\\"BTC-USDT\\\", \\\"side\\\": \\\"buy\\\"," + + " \\\"price\\\": \\\"50000\\\", \\\"size\\\": \\\"0.00001\\\", \\\"clientOid\\\":" + + " \\\"5c52e11203aa677f33e493f\\\", \\\"remark\\\": \\\"order remarks\\\"}"; AddOrderSyncReq obj = mapper.readValue(data, AddOrderSyncReq.class); } /** addOrderSync Response Add Order Sync /api/v1/hf/orders/sync */ public static void testAddOrderSyncResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"orderId\":\"67111a7cb7cbdf000703e1f6\",\"clientOid\":\"5c52e11203aa677f33e493f\",\"orderTime\":1729174140586,\"originSize\":\"0.00001\",\"dealSize\":\"0\",\"remainSize\":\"0.00001\",\"canceledSize\":\"0\",\"status\":\"open\",\"matchTime\":1729174140588}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"orderId\\\":\\\"67111a7cb7cbdf000703e1f6\\\",\\\"clientOid\\\":\\\"5c52e11203aa677f33e493f\\\",\\\"orderTime\\\":1729174140586,\\\"originSize\\\":\\\"0.00001\\\",\\\"dealSize\\\":\\\"0\\\",\\\"remainSize\\\":\\\"0.00001\\\",\\\"canceledSize\\\":\\\"0\\\",\\\"status\\\":\\\"open\\\",\\\"matchTime\\\":1729174140588}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -48,16 +48,16 @@ public static void testAddOrderSyncResponse() throws Exception { /** addOrderTest Request Add Order Test /api/v1/hf/orders/test */ public static void testAddOrderTestRequest() throws Exception { String data = - "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," - + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493f\", \"remark\":" - + " \"order remarks\"}"; + "{\\\"type\\\": \\\"limit\\\", \\\"symbol\\\": \\\"BTC-USDT\\\", \\\"side\\\": \\\"buy\\\"," + + " \\\"price\\\": \\\"50000\\\", \\\"size\\\": \\\"0.00001\\\", \\\"clientOid\\\":" + + " \\\"5c52e11203aa677f33e493f\\\", \\\"remark\\\": \\\"order remarks\\\"}"; AddOrderTestReq obj = mapper.readValue(data, AddOrderTestReq.class); } /** addOrderTest Response Add Order Test /api/v1/hf/orders/test */ public static void testAddOrderTestResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"orderId\":\"670fd33bf9406e0007ab3945\",\"clientOid\":\"5c52e11203aa677f33e493fb\"}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"orderId\\\":\\\"670fd33bf9406e0007ab3945\\\",\\\"clientOid\\\":\\\"5c52e11203aa677f33e493fb\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -65,30 +65,31 @@ public static void testAddOrderTestResponse() throws Exception { /** batchAddOrders Request Batch Add Orders /api/v1/hf/orders/multi */ public static void testBatchAddOrdersRequest() throws Exception { String data = - "{\"orderList\": [{\"clientOid\": \"client order id 12\", \"symbol\": \"BTC-USDT\"," - + " \"type\": \"limit\", \"side\": \"buy\", \"price\": \"30000\", \"size\":" - + " \"0.00001\"}, {\"clientOid\": \"client order id 13\", \"symbol\": \"ETH-USDT\"," - + " \"type\": \"limit\", \"side\": \"sell\", \"price\": \"2000\", \"size\":" - + " \"0.00001\"}]}"; + "{\\\"orderList\\\": [{\\\"clientOid\\\": \\\"client order id 12\\\", \\\"symbol\\\":" + + " \\\"BTC-USDT\\\", \\\"type\\\": \\\"limit\\\", \\\"side\\\": \\\"buy\\\"," + + " \\\"price\\\": \\\"30000\\\", \\\"size\\\": \\\"0.00001\\\"}, {\\\"clientOid\\\":" + + " \\\"client order id 13\\\", \\\"symbol\\\": \\\"ETH-USDT\\\", \\\"type\\\":" + + " \\\"limit\\\", \\\"side\\\": \\\"sell\\\", \\\"price\\\": \\\"2000\\\"," + + " \\\"size\\\": \\\"0.00001\\\"}]}"; BatchAddOrdersReq obj = mapper.readValue(data, BatchAddOrdersReq.class); } /** batchAddOrders Response Batch Add Orders /api/v1/hf/orders/multi */ public static void testBatchAddOrdersResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"orderId\": \"6710d8336afcdb0007319c27\",\n" - + " \"clientOid\": \"client order id 12\",\n" - + " \"success\": true\n" - + " },\n" - + " {\n" - + " \"success\": false,\n" - + " \"failMsg\": \"The order funds should more then 0.1 USDT.\"\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"orderId\\\": \\\"6710d8336afcdb0007319c27\\\",\\n" + + " \\\"clientOid\\\": \\\"client order id 12\\\",\\n" + + " \\\"success\\\": true\\n" + + " },\\n" + + " {\\n" + + " \\\"success\\\": false,\\n" + + " \\\"failMsg\\\": \\\"The order funds should more then 0.1 USDT.\\\"\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -97,39 +98,41 @@ public static void testBatchAddOrdersResponse() throws Exception { /** batchAddOrdersSync Request Batch Add Orders Sync /api/v1/hf/orders/multi/sync */ public static void testBatchAddOrdersSyncRequest() throws Exception { String data = - "{\"orderList\": [{\"clientOid\": \"client order id 13\", \"symbol\": \"BTC-USDT\"," - + " \"type\": \"limit\", \"side\": \"buy\", \"price\": \"30000\", \"size\":" - + " \"0.00001\"}, {\"clientOid\": \"client order id 14\", \"symbol\": \"ETH-USDT\"," - + " \"type\": \"limit\", \"side\": \"sell\", \"price\": \"2000\", \"size\":" - + " \"0.00001\"}]}"; + "{\\\"orderList\\\": [{\\\"clientOid\\\": \\\"client order id 13\\\", \\\"symbol\\\":" + + " \\\"BTC-USDT\\\", \\\"type\\\": \\\"limit\\\", \\\"side\\\": \\\"buy\\\"," + + " \\\"price\\\": \\\"30000\\\", \\\"size\\\": \\\"0.00001\\\"}, {\\\"clientOid\\\":" + + " \\\"client order id 14\\\", \\\"symbol\\\": \\\"ETH-USDT\\\", \\\"type\\\":" + + " \\\"limit\\\", \\\"side\\\": \\\"sell\\\", \\\"price\\\": \\\"2000\\\"," + + " \\\"size\\\": \\\"0.00001\\\"}]}"; BatchAddOrdersSyncReq obj = mapper.readValue(data, BatchAddOrdersSyncReq.class); } /** batchAddOrdersSync Response Batch Add Orders Sync /api/v1/hf/orders/multi/sync */ public static void testBatchAddOrdersSyncResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":[{\"orderId\":\"6711195e5584bc0007bd5aef\",\"clientOid\":\"client" + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":[{\\\"orderId\\\":\\\"6711195e5584bc0007bd5aef\\\",\\\"clientOid\\\":\\\"client" + " order id" - + " 13\",\"orderTime\":1729173854299,\"originSize\":\"0.00001\",\"dealSize\":\"0\",\"remainSize\":\"0.00001\",\"canceledSize\":\"0\",\"status\":\"open\",\"matchTime\":1729173854326,\"success\":true},{\"success\":false,\"failMsg\":\"The" - + " order funds should more then 0.1 USDT.\"}]}"; + + " 13\\\",\\\"orderTime\\\":1729173854299,\\\"originSize\\\":\\\"0.00001\\\",\\\"dealSize\\\":\\\"0\\\",\\\"remainSize\\\":\\\"0.00001\\\",\\\"canceledSize\\\":\\\"0\\\",\\\"status\\\":\\\"open\\\",\\\"matchTime\\\":1729173854326,\\\"success\\\":true},{\\\"success\\\":false,\\\"failMsg\\\":\\\"The" + + " order funds should more then 0.1 USDT.\\\"}]}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** cancelOrderByOrderId Request Cancel Order By OrderId /api/v1/hf/orders/{orderId} */ public static void testCancelOrderByOrderIdRequest() throws Exception { - String data = "{\"orderId\": \"671124f9365ccb00073debd4\", \"symbol\": \"BTC-USDT\"}"; + String data = + "{\\\"orderId\\\": \\\"671124f9365ccb00073debd4\\\", \\\"symbol\\\": \\\"BTC-USDT\\\"}"; CancelOrderByOrderIdReq obj = mapper.readValue(data, CancelOrderByOrderIdReq.class); } /** cancelOrderByOrderId Response Cancel Order By OrderId /api/v1/hf/orders/{orderId} */ public static void testCancelOrderByOrderIdResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"671124f9365ccb00073debd4\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"671124f9365ccb00073debd4\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -139,7 +142,8 @@ public static void testCancelOrderByOrderIdResponse() throws Exception { * cancelOrderByOrderIdSync Request Cancel Order By OrderId Sync /api/v1/hf/orders/sync/{orderId} */ public static void testCancelOrderByOrderIdSyncRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\", \"orderId\": \"671128ee365ccb0007534d45\"}"; + String data = + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"orderId\\\": \\\"671128ee365ccb0007534d45\\\"}"; CancelOrderByOrderIdSyncReq obj = mapper.readValue(data, CancelOrderByOrderIdSyncReq.class); } @@ -148,16 +152,16 @@ public static void testCancelOrderByOrderIdSyncRequest() throws Exception { */ public static void testCancelOrderByOrderIdSyncResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -168,7 +172,8 @@ public static void testCancelOrderByOrderIdSyncResponse() throws Exception { * /api/v1/hf/orders/client-order/{clientOid} */ public static void testCancelOrderByClientOidRequest() throws Exception { - String data = "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"symbol\": \"BTC-USDT\"}"; + String data = + "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"symbol\\\": \\\"BTC-USDT\\\"}"; CancelOrderByClientOidReq obj = mapper.readValue(data, CancelOrderByClientOidReq.class); } @@ -177,7 +182,8 @@ public static void testCancelOrderByClientOidRequest() throws Exception { * /api/v1/hf/orders/client-order/{clientOid} */ public static void testCancelOrderByClientOidResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":{\"clientOid\":\"5c52e11203aa677f33e493fb\"}}"; + String data = + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"clientOid\\\":\\\"5c52e11203aa677f33e493fb\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -187,7 +193,8 @@ public static void testCancelOrderByClientOidResponse() throws Exception { * /api/v1/hf/orders/sync/client-order/{clientOid} */ public static void testCancelOrderByClientOidSyncRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e493fb\"}"; + String data = + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"}"; CancelOrderByClientOidSyncReq obj = mapper.readValue(data, CancelOrderByClientOidSyncReq.class); } @@ -197,16 +204,16 @@ public static void testCancelOrderByClientOidSyncRequest() throws Exception { */ public static void testCancelOrderByClientOidSyncResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" - + " \"originSize\": \"0.00001\",\n" - + " \"dealSize\": \"0\",\n" - + " \"remainSize\": \"0\",\n" - + " \"canceledSize\": \"0.00001\",\n" - + " \"status\": \"done\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" + + " \\\"originSize\\\": \\\"0.00001\\\",\\n" + + " \\\"dealSize\\\": \\\"0\\\",\\n" + + " \\\"remainSize\\\": \\\"0\\\",\\n" + + " \\\"canceledSize\\\": \\\"0.00001\\\",\\n" + + " \\\"status\\\": \\\"done\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue( @@ -216,20 +223,20 @@ public static void testCancelOrderByClientOidSyncResponse() throws Exception { /** cancelPartialOrder Request Cancel Partial Order /api/v1/hf/orders/cancel/{orderId} */ public static void testCancelPartialOrderRequest() throws Exception { String data = - "{\"orderId\": \"6711f73c1ef16c000717bb31\", \"symbol\": \"BTC-USDT\", \"cancelSize\":" - + " \"0.00001\"}"; + "{\\\"orderId\\\": \\\"6711f73c1ef16c000717bb31\\\", \\\"symbol\\\": \\\"BTC-USDT\\\"," + + " \\\"cancelSize\\\": \\\"0.00001\\\"}"; CancelPartialOrderReq obj = mapper.readValue(data, CancelPartialOrderReq.class); } /** cancelPartialOrder Response Cancel Partial Order /api/v1/hf/orders/cancel/{orderId} */ public static void testCancelPartialOrderResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"6711f73c1ef16c000717bb31\",\n" - + " \"cancelSize\": \"0.00001\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"6711f73c1ef16c000717bb31\\\",\\n" + + " \\\"cancelSize\\\": \\\"0.00001\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -237,13 +244,13 @@ public static void testCancelPartialOrderResponse() throws Exception { /** cancelAllOrdersBySymbol Request Cancel All Orders By Symbol /api/v1/hf/orders */ public static void testCancelAllOrdersBySymbolRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\"}"; + String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; CancelAllOrdersBySymbolReq obj = mapper.readValue(data, CancelAllOrdersBySymbolReq.class); } /** cancelAllOrdersBySymbol Response Cancel All Orders By Symbol /api/v1/hf/orders */ public static void testCancelAllOrdersBySymbolResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":\"success\"}"; + String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":\\\"success\\\"}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -256,15 +263,15 @@ public static void testCancelAllOrdersRequest() throws Exception { /** cancelAllOrders Response Cancel All Orders /api/v1/hf/orders/cancelAll */ public static void testCancelAllOrdersResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"succeedSymbols\": [\n" - + " \"ETH-USDT\",\n" - + " \"BTC-USDT\"\n" - + " ],\n" - + " \"failedSymbols\": []\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"succeedSymbols\\\": [\\n" + + " \\\"ETH-USDT\\\",\\n" + + " \\\"BTC-USDT\\\"\\n" + + " ],\\n" + + " \\\"failedSymbols\\\": []\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -273,67 +280,68 @@ public static void testCancelAllOrdersResponse() throws Exception { /** modifyOrder Request Modify Order /api/v1/hf/orders/alter */ public static void testModifyOrderRequest() throws Exception { String data = - "{\"symbol\": \"BTC-USDT\", \"orderId\": \"670fd33bf9406e0007ab3945\", \"newPrice\":" - + " \"30000\", \"newSize\": \"0.0001\"}"; + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"orderId\\\": \\\"670fd33bf9406e0007ab3945\\\"," + + " \\\"newPrice\\\": \\\"30000\\\", \\\"newSize\\\": \\\"0.0001\\\"}"; ModifyOrderReq obj = mapper.readValue(data, ModifyOrderReq.class); } /** modifyOrder Response Modify Order /api/v1/hf/orders/alter */ public static void testModifyOrderResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"newOrderId\":\"67112258f9406e0007408827\",\"clientOid\":\"client" - + " order id 12\"}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"newOrderId\\\":\\\"67112258f9406e0007408827\\\",\\\"clientOid\\\":\\\"client" + + " order id 12\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** getOrderByOrderId Request Get Order By OrderId /api/v1/hf/orders/{orderId} */ public static void testGetOrderByOrderIdRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\", \"orderId\": \"6717422bd51c29000775ea03\"}"; + String data = + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"orderId\\\": \\\"6717422bd51c29000775ea03\\\"}"; GetOrderByOrderIdReq obj = mapper.readValue(data, GetOrderByOrderIdReq.class); } /** getOrderByOrderId Response Get Order By OrderId /api/v1/hf/orders/{orderId} */ public static void testGetOrderByOrderIdResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"id\": \"6717422bd51c29000775ea03\",\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"opType\": \"DEAL\",\n" - + " \"type\": \"limit\",\n" - + " \"side\": \"buy\",\n" - + " \"price\": \"70000\",\n" - + " \"size\": \"0.00001\",\n" - + " \"funds\": \"0.7\",\n" - + " \"dealSize\": \"0.00001\",\n" - + " \"dealFunds\": \"0.677176\",\n" - + " \"remainSize\": \"0\",\n" - + " \"remainFunds\": \"0.022824\",\n" - + " \"cancelledSize\": \"0\",\n" - + " \"cancelledFunds\": \"0\",\n" - + " \"fee\": \"0.000677176\",\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" - + " \"remark\": \"order remarks\",\n" - + " \"tags\": null,\n" - + " \"cancelExist\": false,\n" - + " \"tradeType\": \"TRADE\",\n" - + " \"inOrderBook\": false,\n" - + " \"active\": false,\n" - + " \"tax\": \"0\",\n" - + " \"createdAt\": 1729577515444,\n" - + " \"lastUpdatedAt\": 1729577515481\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"id\\\": \\\"6717422bd51c29000775ea03\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"opType\\\": \\\"DEAL\\\",\\n" + + " \\\"type\\\": \\\"limit\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"price\\\": \\\"70000\\\",\\n" + + " \\\"size\\\": \\\"0.00001\\\",\\n" + + " \\\"funds\\\": \\\"0.7\\\",\\n" + + " \\\"dealSize\\\": \\\"0.00001\\\",\\n" + + " \\\"dealFunds\\\": \\\"0.677176\\\",\\n" + + " \\\"remainSize\\\": \\\"0\\\",\\n" + + " \\\"remainFunds\\\": \\\"0.022824\\\",\\n" + + " \\\"cancelledSize\\\": \\\"0\\\",\\n" + + " \\\"cancelledFunds\\\": \\\"0\\\",\\n" + + " \\\"fee\\\": \\\"0.000677176\\\",\\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" + + " \\\"remark\\\": \\\"order remarks\\\",\\n" + + " \\\"tags\\\": null,\\n" + + " \\\"cancelExist\\\": false,\\n" + + " \\\"tradeType\\\": \\\"TRADE\\\",\\n" + + " \\\"inOrderBook\\\": false,\\n" + + " \\\"active\\\": false,\\n" + + " \\\"tax\\\": \\\"0\\\",\\n" + + " \\\"createdAt\\\": 1729577515444,\\n" + + " \\\"lastUpdatedAt\\\": 1729577515481\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -343,7 +351,8 @@ public static void testGetOrderByOrderIdResponse() throws Exception { * getOrderByClientOid Request Get Order By ClientOid /api/v1/hf/orders/client-order/{clientOid} */ public static void testGetOrderByClientOidRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e493fb\"}"; + String data = + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"}"; GetOrderByClientOidReq obj = mapper.readValue(data, GetOrderByClientOidReq.class); } @@ -352,44 +361,44 @@ public static void testGetOrderByClientOidRequest() throws Exception { */ public static void testGetOrderByClientOidResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"id\": \"6717422bd51c29000775ea03\",\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"opType\": \"DEAL\",\n" - + " \"type\": \"limit\",\n" - + " \"side\": \"buy\",\n" - + " \"price\": \"70000\",\n" - + " \"size\": \"0.00001\",\n" - + " \"funds\": \"0.7\",\n" - + " \"dealSize\": \"0.00001\",\n" - + " \"dealFunds\": \"0.677176\",\n" - + " \"remainSize\": \"0\",\n" - + " \"remainFunds\": \"0.022824\",\n" - + " \"cancelledSize\": \"0\",\n" - + " \"cancelledFunds\": \"0\",\n" - + " \"fee\": \"0.000677176\",\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" - + " \"remark\": \"order remarks\",\n" - + " \"tags\": null,\n" - + " \"cancelExist\": false,\n" - + " \"tradeType\": \"TRADE\",\n" - + " \"inOrderBook\": false,\n" - + " \"active\": false,\n" - + " \"tax\": \"0\",\n" - + " \"createdAt\": 1729577515444,\n" - + " \"lastUpdatedAt\": 1729577515481\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"id\\\": \\\"6717422bd51c29000775ea03\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"opType\\\": \\\"DEAL\\\",\\n" + + " \\\"type\\\": \\\"limit\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"price\\\": \\\"70000\\\",\\n" + + " \\\"size\\\": \\\"0.00001\\\",\\n" + + " \\\"funds\\\": \\\"0.7\\\",\\n" + + " \\\"dealSize\\\": \\\"0.00001\\\",\\n" + + " \\\"dealFunds\\\": \\\"0.677176\\\",\\n" + + " \\\"remainSize\\\": \\\"0\\\",\\n" + + " \\\"remainFunds\\\": \\\"0.022824\\\",\\n" + + " \\\"cancelledSize\\\": \\\"0\\\",\\n" + + " \\\"cancelledFunds\\\": \\\"0\\\",\\n" + + " \\\"fee\\\": \\\"0.000677176\\\",\\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" + + " \\\"remark\\\": \\\"order remarks\\\",\\n" + + " \\\"tags\\\": null,\\n" + + " \\\"cancelExist\\\": false,\\n" + + " \\\"tradeType\\\": \\\"TRADE\\\",\\n" + + " \\\"inOrderBook\\\": false,\\n" + + " \\\"active\\\": false,\\n" + + " \\\"tax\\\": \\\"0\\\",\\n" + + " \\\"createdAt\\\": 1729577515444,\\n" + + " \\\"lastUpdatedAt\\\": 1729577515481\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -407,14 +416,14 @@ public static void testGetSymbolsWithOpenOrderRequest() throws Exception { */ public static void testGetSymbolsWithOpenOrderResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"symbols\": [\n" - + " \"ETH-USDT\",\n" - + " \"BTC-USDT\"\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"symbols\\\": [\\n" + + " \\\"ETH-USDT\\\",\\n" + + " \\\"BTC-USDT\\\"\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -422,53 +431,53 @@ public static void testGetSymbolsWithOpenOrderResponse() throws Exception { /** getOpenOrders Request Get Open Orders /api/v1/hf/orders/active */ public static void testGetOpenOrdersRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\"}"; + String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; GetOpenOrdersReq obj = mapper.readValue(data, GetOpenOrdersReq.class); } /** getOpenOrders Response Get Open Orders /api/v1/hf/orders/active */ public static void testGetOpenOrdersResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"id\": \"67120bbef094e200070976f6\",\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\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" - + " \"remark\": \"order remarks\",\n" - + " \"tags\": \"order tags\",\n" - + " \"cancelExist\": false,\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" - + " \"createdAt\": 1729235902748,\n" - + " \"lastUpdatedAt\": 1729235909862\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"id\\\": \\\"67120bbef094e200070976f6\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\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" + + " \\\"remark\\\": \\\"order remarks\\\",\\n" + + " \\\"tags\\\": \\\"order tags\\\",\\n" + + " \\\"cancelExist\\\": false,\\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" + + " \\\"createdAt\\\": 1729235902748,\\n" + + " \\\"lastUpdatedAt\\\": 1729235909862\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -476,59 +485,59 @@ public static void testGetOpenOrdersResponse() throws Exception { /** getOpenOrdersByPage Request Get Open Orders By Page /api/v1/hf/orders/active/page */ public static void testGetOpenOrdersByPageRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\", \"pageNum\": 1, \"pageSize\": 20}"; + String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"pageNum\\\": 1, \\\"pageSize\\\": 20}"; GetOpenOrdersByPageReq obj = mapper.readValue(data, GetOpenOrdersByPageReq.class); } /** getOpenOrdersByPage Response Get Open Orders By Page /api/v1/hf/orders/active/page */ public static void testGetOpenOrdersByPageResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -537,58 +546,58 @@ public static void testGetOpenOrdersByPageResponse() throws Exception { /** getClosedOrders Request Get Closed Orders /api/v1/hf/orders/done */ public static void testGetClosedOrdersRequest() throws Exception { String data = - "{\"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"type\": \"limit\", \"lastId\":" - + " 254062248624417, \"limit\": 20, \"startAt\": 1728663338000, \"endAt\":" - + " 1728692138000}"; + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"side\\\": \\\"buy\\\", \\\"type\\\": \\\"limit\\\"," + + " \\\"lastId\\\": 254062248624417, \\\"limit\\\": 20, \\\"startAt\\\": 1728663338000," + + " \\\"endAt\\\": 1728692138000}"; GetClosedOrdersReq obj = mapper.readValue(data, GetClosedOrdersReq.class); } /** getClosedOrders Response Get Closed Orders /api/v1/hf/orders/done */ public static void testGetClosedOrdersResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"lastId\": 19814995255305,\n" - + " \"items\": [\n" - + " {\n" - + " \"id\": \"6717422bd51c29000775ea03\",\n" - + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"opType\": \"DEAL\",\n" - + " \"type\": \"limit\",\n" - + " \"side\": \"buy\",\n" - + " \"price\": \"70000\",\n" - + " \"size\": \"0.00001\",\n" - + " \"funds\": \"0.7\",\n" - + " \"dealSize\": \"0.00001\",\n" - + " \"dealFunds\": \"0.677176\",\n" - + " \"remainSize\": \"0\",\n" - + " \"remainFunds\": \"0.022824\",\n" - + " \"cancelledSize\": \"0\",\n" - + " \"cancelledFunds\": \"0\",\n" - + " \"fee\": \"0.000677176\",\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" - + " \"remark\": \"order remarks\",\n" - + " \"tags\": null,\n" - + " \"cancelExist\": false,\n" - + " \"tradeType\": \"TRADE\",\n" - + " \"inOrderBook\": false,\n" - + " \"active\": false,\n" - + " \"tax\": \"0\",\n" - + " \"createdAt\": 1729577515444,\n" - + " \"lastUpdatedAt\": 1729577515481\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"lastId\\\": 19814995255305,\\n" + + " \\\"items\\\": [\\n" + + " {\\n" + + " \\\"id\\\": \\\"6717422bd51c29000775ea03\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"opType\\\": \\\"DEAL\\\",\\n" + + " \\\"type\\\": \\\"limit\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"price\\\": \\\"70000\\\",\\n" + + " \\\"size\\\": \\\"0.00001\\\",\\n" + + " \\\"funds\\\": \\\"0.7\\\",\\n" + + " \\\"dealSize\\\": \\\"0.00001\\\",\\n" + + " \\\"dealFunds\\\": \\\"0.677176\\\",\\n" + + " \\\"remainSize\\\": \\\"0\\\",\\n" + + " \\\"remainFunds\\\": \\\"0.022824\\\",\\n" + + " \\\"cancelledSize\\\": \\\"0\\\",\\n" + + " \\\"cancelledFunds\\\": \\\"0\\\",\\n" + + " \\\"fee\\\": \\\"0.000677176\\\",\\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" + + " \\\"remark\\\": \\\"order remarks\\\",\\n" + + " \\\"tags\\\": null,\\n" + + " \\\"cancelExist\\\": false,\\n" + + " \\\"tradeType\\\": \\\"TRADE\\\",\\n" + + " \\\"inOrderBook\\\": false,\\n" + + " \\\"active\\\": false,\\n" + + " \\\"tax\\\": \\\"0\\\",\\n" + + " \\\"createdAt\\\": 1729577515444,\\n" + + " \\\"lastUpdatedAt\\\": 1729577515481\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -597,44 +606,45 @@ public static void testGetClosedOrdersResponse() throws Exception { /** getTradeHistory Request Get Trade History /api/v1/hf/fills */ public static void testGetTradeHistoryRequest() throws Exception { String data = - "{\"symbol\": \"BTC-USDT\", \"orderId\": \"example_string_default_value\", \"side\":" - + " \"buy\", \"type\": \"limit\", \"lastId\": 254062248624417, \"limit\": 100," - + " \"startAt\": 1728663338000, \"endAt\": 1728692138000}"; + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"orderId\\\": \\\"example_string_default_value\\\"," + + " \\\"side\\\": \\\"buy\\\", \\\"type\\\": \\\"limit\\\", \\\"lastId\\\":" + + " 254062248624417, \\\"limit\\\": 100, \\\"startAt\\\": 1728663338000, \\\"endAt\\\":" + + " 1728692138000}"; GetTradeHistoryReq obj = mapper.readValue(data, GetTradeHistoryReq.class); } /** getTradeHistory Response Get Trade History /api/v1/hf/fills */ public static void testGetTradeHistoryResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"items\": [\n" - + " {\n" - + " \"id\": 19814995255305,\n" - + " \"orderId\": \"6717422bd51c29000775ea03\",\n" - + " \"counterOrderId\": \"67174228135f9e000709da8c\",\n" - + " \"tradeId\": 11029373945659392,\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"side\": \"buy\",\n" - + " \"liquidity\": \"taker\",\n" - + " \"type\": \"limit\",\n" - + " \"forceTaker\": false,\n" - + " \"price\": \"67717.6\",\n" - + " \"size\": \"0.00001\",\n" - + " \"funds\": \"0.677176\",\n" - + " \"fee\": \"0.000677176\",\n" - + " \"feeRate\": \"0.001\",\n" - + " \"feeCurrency\": \"USDT\",\n" - + " \"stop\": \"\",\n" - + " \"tradeType\": \"TRADE\",\n" - + " \"taxRate\": \"0\",\n" - + " \"tax\": \"0\",\n" - + " \"createdAt\": 1729577515473\n" - + " }\n" - + " ],\n" - + " \"lastId\": 19814995255305\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"items\\\": [\\n" + + " {\\n" + + " \\\"id\\\": 19814995255305,\\n" + + " \\\"orderId\\\": \\\"6717422bd51c29000775ea03\\\",\\n" + + " \\\"counterOrderId\\\": \\\"67174228135f9e000709da8c\\\",\\n" + + " \\\"tradeId\\\": 11029373945659392,\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"liquidity\\\": \\\"taker\\\",\\n" + + " \\\"type\\\": \\\"limit\\\",\\n" + + " \\\"forceTaker\\\": false,\\n" + + " \\\"price\\\": \\\"67717.6\\\",\\n" + + " \\\"size\\\": \\\"0.00001\\\",\\n" + + " \\\"funds\\\": \\\"0.677176\\\",\\n" + + " \\\"fee\\\": \\\"0.000677176\\\",\\n" + + " \\\"feeRate\\\": \\\"0.001\\\",\\n" + + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"stop\\\": \\\"\\\",\\n" + + " \\\"tradeType\\\": \\\"TRADE\\\",\\n" + + " \\\"taxRate\\\": \\\"0\\\",\\n" + + " \\\"tax\\\": \\\"0\\\",\\n" + + " \\\"createdAt\\\": 1729577515473\\n" + + " }\\n" + + " ],\\n" + + " \\\"lastId\\\": 19814995255305\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -648,14 +658,14 @@ public static void testGetDCPRequest() throws Exception { /** getDCP Response Get DCP /api/v1/hf/orders/dead-cancel-all/query */ public static void testGetDCPResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"timeout\": 5,\n" - + " \"symbols\": \"BTC-USDT,ETH-USDT\",\n" - + " \"currentTime\": 1729241305,\n" - + " \"triggerTime\": 1729241308\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"timeout\\\": 5,\\n" + + " \\\"symbols\\\": \\\"BTC-USDT,ETH-USDT\\\",\\n" + + " \\\"currentTime\\\": 1729241305,\\n" + + " \\\"triggerTime\\\": 1729241308\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -663,14 +673,14 @@ public static void testGetDCPResponse() throws Exception { /** setDCP Request Set DCP /api/v1/hf/orders/dead-cancel-all */ public static void testSetDCPRequest() throws Exception { - String data = "{\"timeout\": 5, \"symbols\": \"BTC-USDT,ETH-USDT\"}"; + String data = "{\\\"timeout\\\": 5, \\\"symbols\\\": \\\"BTC-USDT,ETH-USDT\\\"}"; SetDCPReq obj = mapper.readValue(data, SetDCPReq.class); } /** setDCP Response Set DCP /api/v1/hf/orders/dead-cancel-all */ public static void testSetDCPResponse() throws Exception { String data = - "{\"code\":\"200000\",\"data\":{\"currentTime\":1729656588,\"triggerTime\":1729656593}}"; + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"currentTime\\\":1729656588,\\\"triggerTime\\\":1729656593}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -678,20 +688,21 @@ public static void testSetDCPResponse() throws Exception { /** addStopOrder Request Add Stop Order /api/v1/stop-order */ public static void testAddStopOrderRequest() throws Exception { String data = - "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," - + " \"stopPrice\": \"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\\\"}"; AddStopOrderReq obj = mapper.readValue(data, AddStopOrderReq.class); } /** addStopOrder Response Add Stop Order /api/v1/stop-order */ public static void testAddStopOrderResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"670fd33bf9406e0007ab3945\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"670fd33bf9406e0007ab3945\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -702,7 +713,9 @@ public static void testAddStopOrderResponse() throws Exception { * /api/v1/stop-order/cancelOrderByClientOid */ public static void testCancelStopOrderByClientOidRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"689ff597f4414061aa819cc414836abd\"}"; + String data = + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"clientOid\\\":" + + " \\\"689ff597f4414061aa819cc414836abd\\\"}"; CancelStopOrderByClientOidReq obj = mapper.readValue(data, CancelStopOrderByClientOidReq.class); } @@ -712,12 +725,12 @@ public static void testCancelStopOrderByClientOidRequest() throws Exception { */ public static void testCancelStopOrderByClientOidResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"cancelledOrderId\": \"vs8hoo8ksc8mario0035a74n\",\n" - + " \"clientOid\": \"689ff597f4414061aa819cc414836abd\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"cancelledOrderId\\\": \\\"vs8hoo8ksc8mario0035a74n\\\",\\n" + + " \\\"clientOid\\\": \\\"689ff597f4414061aa819cc414836abd\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue( @@ -726,20 +739,20 @@ public static void testCancelStopOrderByClientOidResponse() throws Exception { /** cancelStopOrderByOrderId Request Cancel Stop Order By OrderId /api/v1/stop-order/{orderId} */ public static void testCancelStopOrderByOrderIdRequest() throws Exception { - String data = "{\"orderId\": \"671124f9365ccb00073debd4\"}"; + String data = "{\\\"orderId\\\": \\\"671124f9365ccb00073debd4\\\"}"; CancelStopOrderByOrderIdReq obj = mapper.readValue(data, CancelStopOrderByOrderIdReq.class); } /** cancelStopOrderByOrderId Response Cancel Stop Order By OrderId /api/v1/stop-order/{orderId} */ public static void testCancelStopOrderByOrderIdResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"cancelledOrderIds\": [\n" - + " \"671124f9365ccb00073debd4\"\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"cancelledOrderIds\\\": [\\n" + + " \\\"671124f9365ccb00073debd4\\\"\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -748,21 +761,22 @@ public static void testCancelStopOrderByOrderIdResponse() throws Exception { /** batchCancelStopOrder Request Batch Cancel Stop Orders /api/v1/stop-order/cancel */ public static void testBatchCancelStopOrderRequest() throws Exception { String data = - "{\"symbol\": \"example_string_default_value\", \"tradeType\":" - + " \"example_string_default_value\", \"orderIds\": \"example_string_default_value\"}"; + "{\\\"symbol\\\": \\\"example_string_default_value\\\", \\\"tradeType\\\":" + + " \\\"example_string_default_value\\\", \\\"orderIds\\\":" + + " \\\"example_string_default_value\\\"}"; BatchCancelStopOrderReq obj = mapper.readValue(data, BatchCancelStopOrderReq.class); } /** batchCancelStopOrder Response Batch Cancel Stop Orders /api/v1/stop-order/cancel */ public static void testBatchCancelStopOrderResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"cancelledOrderIds\": [\n" - + " \"671124f9365ccb00073debd4\"\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"cancelledOrderIds\\\": [\\n" + + " \\\"671124f9365ccb00073debd4\\\"\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -771,64 +785,65 @@ public static void testBatchCancelStopOrderResponse() throws Exception { /** getStopOrdersList Request Get Stop Orders List /api/v1/stop-order */ public static void testGetStopOrdersListRequest() throws Exception { String 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\"}"; + "{\\\"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\\\"}"; GetStopOrdersListReq obj = mapper.readValue(data, GetStopOrdersListReq.class); } /** getStopOrdersList Response Get Stop Orders List /api/v1/stop-order */ public static void testGetStopOrdersListResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -836,48 +851,48 @@ public static void testGetStopOrdersListResponse() throws Exception { /** getStopOrderByOrderId Request Get Stop Order By OrderId /api/v1/stop-order/{orderId} */ public static void testGetStopOrderByOrderIdRequest() throws Exception { - String data = "{\"orderId\": \"example_string_default_value\"}"; + String data = "{\\\"orderId\\\": \\\"example_string_default_value\\\"}"; GetStopOrderByOrderIdReq obj = mapper.readValue(data, GetStopOrderByOrderIdReq.class); } /** getStopOrderByOrderId Response Get Stop Order By OrderId /api/v1/stop-order/{orderId} */ public static void testGetStopOrderByOrderIdResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\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\": 1629098781127530200,\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" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\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\\\": 1629098781127530200,\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -889,8 +904,8 @@ public static void testGetStopOrderByOrderIdResponse() throws Exception { */ public static void testGetStopOrderByClientOidRequest() throws Exception { String data = - "{\"clientOid\": \"example_string_default_value\", \"symbol\":" - + " \"example_string_default_value\"}"; + "{\\\"clientOid\\\": \\\"example_string_default_value\\\", \\\"symbol\\\":" + + " \\\"example_string_default_value\\\"}"; GetStopOrderByClientOidReq obj = mapper.readValue(data, GetStopOrderByClientOidReq.class); } @@ -900,43 +915,43 @@ public static void testGetStopOrderByClientOidRequest() throws Exception { */ public static void testGetStopOrderByClientOidResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [\n" - + " {\n" - + " \"id\": \"vs8hoo8os561f5np0032vngj\",\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\": \"2b700942b5db41cebe578cff48960e09\",\n" - + " \"remark\": null,\n" - + " \"tags\": null,\n" - + " \"orderTime\": 1629020492834532600,\n" - + " \"domainId\": \"kucoin\",\n" - + " \"tradeSource\": \"USER\",\n" - + " \"tradeType\": \"TRADE\",\n" - + " \"feeCurrency\": \"USDT\",\n" - + " \"takerFeeRate\": \"0.00200000000000000000\",\n" - + " \"makerFeeRate\": \"0.00200000000000000000\",\n" - + " \"createdAt\": 1629020492837,\n" - + " \"stop\": \"loss\",\n" - + " \"stopTriggerTime\": null,\n" - + " \"stopPrice\": \"1.00000000000000000000\"\n" - + " }\n" - + " ]\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"id\\\": \\\"vs8hoo8os561f5np0032vngj\\\",\\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\\\": \\\"2b700942b5db41cebe578cff48960e09\\\",\\n" + + " \\\"remark\\\": null,\\n" + + " \\\"tags\\\": null,\\n" + + " \\\"orderTime\\\": 1629020492834532600,\\n" + + " \\\"domainId\\\": \\\"kucoin\\\",\\n" + + " \\\"tradeSource\\\": \\\"USER\\\",\\n" + + " \\\"tradeType\\\": \\\"TRADE\\\",\\n" + + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"takerFeeRate\\\": \\\"0.00200000000000000000\\\",\\n" + + " \\\"makerFeeRate\\\": \\\"0.00200000000000000000\\\",\\n" + + " \\\"createdAt\\\": 1629020492837,\\n" + + " \\\"stop\\\": \\\"loss\\\",\\n" + + " \\\"stopTriggerTime\\\": null,\\n" + + " \\\"stopPrice\\\": \\\"1.00000000000000000000\\\"\\n" + + " }\\n" + + " ]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -945,37 +960,39 @@ public static void testGetStopOrderByClientOidResponse() throws Exception { /** addOcoOrder Request Add OCO Order /api/v3/oco/order */ public static void testAddOcoOrderRequest() throws Exception { String data = - "{\"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"94000\", \"size\": \"0.1\"," - + " \"clientOid\": \"5c52e11203aa67f1e493fb\", \"stopPrice\": \"98000\"," - + " \"limitPrice\": \"96000\", \"remark\": \"this is remark\", \"tradeType\":" - + " \"TRADE\"}"; + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"side\\\": \\\"buy\\\", \\\"price\\\":" + + " \\\"94000\\\", \\\"size\\\": \\\"0.1\\\", \\\"clientOid\\\":" + + " \\\"5c52e11203aa67f1e493fb\\\", \\\"stopPrice\\\": \\\"98000\\\"," + + " \\\"limitPrice\\\": \\\"96000\\\", \\\"remark\\\": \\\"this is remark\\\"," + + " \\\"tradeType\\\": \\\"TRADE\\\"}"; AddOcoOrderReq obj = mapper.readValue(data, AddOcoOrderReq.class); } /** addOcoOrder Response Add OCO Order /api/v3/oco/order */ public static void testAddOcoOrderResponse() throws Exception { - String data = "{\"code\":\"200000\",\"data\":{\"orderId\":\"674c316e688dea0007c7b986\"}}"; + String data = + "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"orderId\\\":\\\"674c316e688dea0007c7b986\\\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** cancelOcoOrderByOrderId Request Cancel OCO Order By OrderId /api/v3/oco/order/{orderId} */ public static void testCancelOcoOrderByOrderIdRequest() throws Exception { - String data = "{\"orderId\": \"674c316e688dea0007c7b986\"}"; + String data = "{\\\"orderId\\\": \\\"674c316e688dea0007c7b986\\\"}"; CancelOcoOrderByOrderIdReq obj = mapper.readValue(data, CancelOcoOrderByOrderIdReq.class); } /** cancelOcoOrderByOrderId Response Cancel OCO Order By OrderId /api/v3/oco/order/{orderId} */ public static void testCancelOcoOrderByOrderIdResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"cancelledOrderIds\": [\n" - + " \"vs93gpqc6kkmkk57003gok16\",\n" - + " \"vs93gpqc6kkmkk57003gok17\"\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"cancelledOrderIds\\\": [\\n" + + " \\\"vs93gpqc6kkmkk57003gok16\\\",\\n" + + " \\\"vs93gpqc6kkmkk57003gok17\\\"\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -986,7 +1003,7 @@ public static void testCancelOcoOrderByOrderIdResponse() throws Exception { * /api/v3/oco/client-order/{clientOid} */ public static void testCancelOcoOrderByClientOidRequest() throws Exception { - String data = "{\"clientOid\": \"5c52e11203aa67f1e493fb\"}"; + String data = "{\\\"clientOid\\\": \\\"5c52e11203aa67f1e493fb\\\"}"; CancelOcoOrderByClientOidReq obj = mapper.readValue(data, CancelOcoOrderByClientOidReq.class); } @@ -996,14 +1013,14 @@ public static void testCancelOcoOrderByClientOidRequest() throws Exception { */ public static void testCancelOcoOrderByClientOidResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"cancelledOrderIds\": [\n" - + " \"vs93gpqc6r0mkk57003gok3h\",\n" - + " \"vs93gpqc6r0mkk57003gok3i\"\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"cancelledOrderIds\\\": [\\n" + + " \\\"vs93gpqc6r0mkk57003gok3h\\\",\\n" + + " \\\"vs93gpqc6r0mkk57003gok3i\\\"\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1012,24 +1029,24 @@ public static void testCancelOcoOrderByClientOidResponse() throws Exception { /** batchCancelOcoOrders Request Batch Cancel OCO Order /api/v3/oco/orders */ public static void testBatchCancelOcoOrdersRequest() throws Exception { String data = - "{\"orderIds\": \"674c388172cf2800072ee746,674c38bdfd8300000795167e\", \"symbol\":" - + " \"BTC-USDT\"}"; + "{\\\"orderIds\\\": \\\"674c388172cf2800072ee746,674c38bdfd8300000795167e\\\"," + + " \\\"symbol\\\": \\\"BTC-USDT\\\"}"; BatchCancelOcoOrdersReq obj = mapper.readValue(data, BatchCancelOcoOrdersReq.class); } /** batchCancelOcoOrders Response Batch Cancel OCO Order /api/v3/oco/orders */ public static void testBatchCancelOcoOrdersResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"cancelledOrderIds\": [\n" - + " \"vs93gpqc750mkk57003gok6i\",\n" - + " \"vs93gpqc750mkk57003gok6j\",\n" - + " \"vs93gpqc75c39p83003tnriu\",\n" - + " \"vs93gpqc75c39p83003tnriv\"\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"cancelledOrderIds\\\": [\\n" + + " \\\"vs93gpqc750mkk57003gok6i\\\",\\n" + + " \\\"vs93gpqc750mkk57003gok6j\\\",\\n" + + " \\\"vs93gpqc75c39p83003tnriu\\\",\\n" + + " \\\"vs93gpqc75c39p83003tnriv\\\"\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1037,22 +1054,22 @@ public static void testBatchCancelOcoOrdersResponse() throws Exception { /** getOcoOrderByOrderId Request Get OCO Order By OrderId /api/v3/oco/order/{orderId} */ public static void testGetOcoOrderByOrderIdRequest() throws Exception { - String data = "{\"orderId\": \"674c3b6e688dea0007c7bab2\"}"; + String data = "{\\\"orderId\\\": \\\"674c3b6e688dea0007c7bab2\\\"}"; GetOcoOrderByOrderIdReq obj = mapper.readValue(data, GetOcoOrderByOrderIdReq.class); } /** getOcoOrderByOrderId Response Get OCO Order By OrderId /api/v3/oco/order/{orderId} */ public static void testGetOcoOrderByOrderIdResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"674c3b6e688dea0007c7bab2\",\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"clientOid\": \"5c52e1203aa6f37f1e493fb\",\n" - + " \"orderTime\": 1733049198863,\n" - + " \"status\": \"NEW\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"674c3b6e688dea0007c7bab2\\\",\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e1203aa6f37f1e493fb\\\",\\n" + + " \\\"orderTime\\\": 1733049198863,\\n" + + " \\\"status\\\": \\\"NEW\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1062,7 +1079,7 @@ public static void testGetOcoOrderByOrderIdResponse() throws Exception { * getOcoOrderByClientOid Request Get OCO Order By ClientOid /api/v3/oco/client-order/{clientOid} */ public static void testGetOcoOrderByClientOidRequest() throws Exception { - String data = "{\"clientOid\": \"5c52e1203aa6f3g7f1e493fb\"}"; + String data = "{\\\"clientOid\\\": \\\"5c52e1203aa6f3g7f1e493fb\\\"}"; GetOcoOrderByClientOidReq obj = mapper.readValue(data, GetOcoOrderByClientOidReq.class); } @@ -1071,15 +1088,15 @@ public static void testGetOcoOrderByClientOidRequest() throws Exception { */ public static void testGetOcoOrderByClientOidResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"674c3cfa72cf2800072ee7ce\",\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"clientOid\": \"5c52e1203aa6f3g7f1e493fb\",\n" - + " \"orderTime\": 1733049594803,\n" - + " \"status\": \"NEW\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"674c3cfa72cf2800072ee7ce\\\",\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e1203aa6f3g7f1e493fb\\\",\\n" + + " \\\"orderTime\\\": 1733049594803,\\n" + + " \\\"status\\\": \\\"NEW\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1090,7 +1107,7 @@ public static void testGetOcoOrderByClientOidResponse() throws Exception { * /api/v3/oco/order/details/{orderId} */ public static void testGetOcoOrderDetailByOrderIdRequest() throws Exception { - String data = "{\"orderId\": \"674c3b6e688dea0007c7bab2\"}"; + String data = "{\\\"orderId\\\": \\\"674c3b6e688dea0007c7bab2\\\"}"; GetOcoOrderDetailByOrderIdReq obj = mapper.readValue(data, GetOcoOrderDetailByOrderIdReq.class); } @@ -1100,35 +1117,35 @@ public static void testGetOcoOrderDetailByOrderIdRequest() throws Exception { */ public static void testGetOcoOrderDetailByOrderIdResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"674c3b6e688dea0007c7bab2\",\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"clientOid\": \"5c52e1203aa6f37f1e493fb\",\n" - + " \"orderTime\": 1733049198863,\n" - + " \"status\": \"NEW\",\n" - + " \"orders\": [\n" - + " {\n" - + " \"id\": \"vs93gpqc7dn6h3fa003sfelj\",\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"side\": \"buy\",\n" - + " \"price\": \"94000.00000000000000000000\",\n" - + " \"stopPrice\": \"94000.00000000000000000000\",\n" - + " \"size\": \"0.10000000000000000000\",\n" - + " \"status\": \"NEW\"\n" - + " },\n" - + " {\n" - + " \"id\": \"vs93gpqc7dn6h3fa003sfelk\",\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"side\": \"buy\",\n" - + " \"price\": \"96000.00000000000000000000\",\n" - + " \"stopPrice\": \"98000.00000000000000000000\",\n" - + " \"size\": \"0.10000000000000000000\",\n" - + " \"status\": \"NEW\"\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"674c3b6e688dea0007c7bab2\\\",\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e1203aa6f37f1e493fb\\\",\\n" + + " \\\"orderTime\\\": 1733049198863,\\n" + + " \\\"status\\\": \\\"NEW\\\",\\n" + + " \\\"orders\\\": [\\n" + + " {\\n" + + " \\\"id\\\": \\\"vs93gpqc7dn6h3fa003sfelj\\\",\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"price\\\": \\\"94000.00000000000000000000\\\",\\n" + + " \\\"stopPrice\\\": \\\"94000.00000000000000000000\\\",\\n" + + " \\\"size\\\": \\\"0.10000000000000000000\\\",\\n" + + " \\\"status\\\": \\\"NEW\\\"\\n" + + " },\\n" + + " {\\n" + + " \\\"id\\\": \\\"vs93gpqc7dn6h3fa003sfelk\\\",\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"price\\\": \\\"96000.00000000000000000000\\\",\\n" + + " \\\"stopPrice\\\": \\\"98000.00000000000000000000\\\",\\n" + + " \\\"size\\\": \\\"0.10000000000000000000\\\",\\n" + + " \\\"status\\\": \\\"NEW\\\"\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue( @@ -1138,31 +1155,32 @@ public static void testGetOcoOrderDetailByOrderIdResponse() throws Exception { /** getOcoOrderList Request Get OCO Order List /api/v3/oco/orders */ public static void testGetOcoOrderListRequest() throws Exception { String data = - "{\"symbol\": \"BTC-USDT\", \"startAt\": 123456, \"endAt\": 123456, \"orderIds\":" - + " \"example_string_default_value\", \"pageSize\": 50, \"currentPage\": 1}"; + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"startAt\\\": 123456, \\\"endAt\\\": 123456," + + " \\\"orderIds\\\": \\\"example_string_default_value\\\", \\\"pageSize\\\": 50," + + " \\\"currentPage\\\": 1}"; GetOcoOrderListReq obj = mapper.readValue(data, GetOcoOrderListReq.class); } /** getOcoOrderList Response Get OCO Order List /api/v3/oco/orders */ public static void testGetOcoOrderListResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"currentPage\": 1,\n" - + " \"pageSize\": 50,\n" - + " \"totalNum\": 1,\n" - + " \"totalPage\": 1,\n" - + " \"items\": [\n" - + " {\n" - + " \"orderId\": \"674c3cfa72cf2800072ee7ce\",\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"clientOid\": \"5c52e1203aa6f3g7f1e493fb\",\n" - + " \"orderTime\": 1733049594803,\n" - + " \"status\": \"NEW\"\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"currentPage\\\": 1,\\n" + + " \\\"pageSize\\\": 50,\\n" + + " \\\"totalNum\\\": 1,\\n" + + " \\\"totalPage\\\": 1,\\n" + + " \\\"items\\\": [\\n" + + " {\\n" + + " \\\"orderId\\\": \\\"674c3cfa72cf2800072ee7ce\\\",\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e1203aa6f3g7f1e493fb\\\",\\n" + + " \\\"orderTime\\\": 1733049594803,\\n" + + " \\\"status\\\": \\\"NEW\\\"\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1171,20 +1189,20 @@ public static void testGetOcoOrderListResponse() throws Exception { /** addOrderOld Request Add Order - Old /api/v1/orders */ public static void testAddOrderOldRequest() throws Exception { String 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\\\", \\\"size\\\": \\\"0.00001\\\", \\\"clientOid\\\":" + + " \\\"5c52e11203aa677f33e493fb\\\", \\\"remark\\\": \\\"order remarks\\\"}"; AddOrderOldReq obj = mapper.readValue(data, AddOrderOldReq.class); } /** addOrderOld Response Add Order - Old /api/v1/orders */ public static void testAddOrderOldResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"674a8635b38d120007709c0f\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"674a8635b38d120007709c0f\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1193,20 +1211,20 @@ public static void testAddOrderOldResponse() throws Exception { /** addOrderTestOld Request Add Order Test - Old /api/v1/orders/test */ public static void testAddOrderTestOldRequest() throws Exception { String 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\\\", \\\"size\\\": \\\"0.00001\\\", \\\"clientOid\\\":" + + " \\\"5c52e11203aa677f33e493fb\\\", \\\"remark\\\": \\\"order remarks\\\"}"; AddOrderTestOldReq obj = mapper.readValue(data, AddOrderTestOldReq.class); } /** addOrderTestOld Response Add Order Test - Old /api/v1/orders/test */ public static void testAddOrderTestOldResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"orderId\": \"674a8776291d9e00074f1edf\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"orderId\\\": \\\"674a8776291d9e00074f1edf\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1215,69 +1233,70 @@ public static void testAddOrderTestOldResponse() throws Exception { /** batchAddOrdersOld Request Batch Add Orders - Old /api/v1/orders/multi */ public static void testBatchAddOrdersOldRequest() throws Exception { String data = - "{\"symbol\": \"BTC-USDT\", \"orderList\": [{\"clientOid\":" - + " \"3d07008668054da6b3cb12e432c2b13a\", \"side\": \"buy\", \"type\": \"limit\"," - + " \"price\": \"50000\", \"size\": \"0.0001\"}, {\"clientOid\":" - + " \"37245dbe6e134b5c97732bfb36cd4a9d\", \"side\": \"buy\", \"type\": \"limit\"," - + " \"price\": \"49999\", \"size\": \"0.0001\"}]}"; + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"orderList\\\": [{\\\"clientOid\\\":" + + " \\\"3d07008668054da6b3cb12e432c2b13a\\\", \\\"side\\\": \\\"buy\\\", \\\"type\\\":" + + " \\\"limit\\\", \\\"price\\\": \\\"50000\\\", \\\"size\\\": \\\"0.0001\\\"}," + + " {\\\"clientOid\\\": \\\"37245dbe6e134b5c97732bfb36cd4a9d\\\", \\\"side\\\":" + + " \\\"buy\\\", \\\"type\\\": \\\"limit\\\", \\\"price\\\": \\\"49999\\\"," + + " \\\"size\\\": \\\"0.0001\\\"}]}"; BatchAddOrdersOldReq obj = mapper.readValue(data, BatchAddOrdersOldReq.class); } /** batchAddOrdersOld Response Batch Add Orders - Old /api/v1/orders/multi */ public static void testBatchAddOrdersOldResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"data\": [\n" - + " {\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"type\": \"limit\",\n" - + " \"side\": \"buy\",\n" - + " \"price\": \"50000\",\n" - + " \"size\": \"0.0001\",\n" - + " \"funds\": null,\n" - + " \"stp\": \"\",\n" - + " \"stop\": \"\",\n" - + " \"stopPrice\": null,\n" - + " \"timeInForce\": \"GTC\",\n" - + " \"cancelAfter\": 0,\n" - + " \"postOnly\": false,\n" - + " \"hidden\": false,\n" - + " \"iceberge\": false,\n" - + " \"iceberg\": false,\n" - + " \"visibleSize\": null,\n" - + " \"channel\": \"API\",\n" - + " \"id\": \"674a97dfef434f0007efc431\",\n" - + " \"status\": \"success\",\n" - + " \"failMsg\": null,\n" - + " \"clientOid\": \"3d07008668054da6b3cb12e432c2b13a\"\n" - + " },\n" - + " {\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"type\": \"limit\",\n" - + " \"side\": \"buy\",\n" - + " \"price\": \"49999\",\n" - + " \"size\": \"0.0001\",\n" - + " \"funds\": null,\n" - + " \"stp\": \"\",\n" - + " \"stop\": \"\",\n" - + " \"stopPrice\": null,\n" - + " \"timeInForce\": \"GTC\",\n" - + " \"cancelAfter\": 0,\n" - + " \"postOnly\": false,\n" - + " \"hidden\": false,\n" - + " \"iceberge\": false,\n" - + " \"iceberg\": false,\n" - + " \"visibleSize\": null,\n" - + " \"channel\": \"API\",\n" - + " \"id\": \"674a97dffb378b00077b9c20\",\n" - + " \"status\": \"fail\",\n" - + " \"failMsg\": \"Balance insufficient!\",\n" - + " \"clientOid\": \"37245dbe6e134b5c97732bfb36cd4a9d\"\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"data\\\": [\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"type\\\": \\\"limit\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"price\\\": \\\"50000\\\",\\n" + + " \\\"size\\\": \\\"0.0001\\\",\\n" + + " \\\"funds\\\": null,\\n" + + " \\\"stp\\\": \\\"\\\",\\n" + + " \\\"stop\\\": \\\"\\\",\\n" + + " \\\"stopPrice\\\": null,\\n" + + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" + + " \\\"cancelAfter\\\": 0,\\n" + + " \\\"postOnly\\\": false,\\n" + + " \\\"hidden\\\": false,\\n" + + " \\\"iceberge\\\": false,\\n" + + " \\\"iceberg\\\": false,\\n" + + " \\\"visibleSize\\\": null,\\n" + + " \\\"channel\\\": \\\"API\\\",\\n" + + " \\\"id\\\": \\\"674a97dfef434f0007efc431\\\",\\n" + + " \\\"status\\\": \\\"success\\\",\\n" + + " \\\"failMsg\\\": null,\\n" + + " \\\"clientOid\\\": \\\"3d07008668054da6b3cb12e432c2b13a\\\"\\n" + + " },\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"type\\\": \\\"limit\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"price\\\": \\\"49999\\\",\\n" + + " \\\"size\\\": \\\"0.0001\\\",\\n" + + " \\\"funds\\\": null,\\n" + + " \\\"stp\\\": \\\"\\\",\\n" + + " \\\"stop\\\": \\\"\\\",\\n" + + " \\\"stopPrice\\\": null,\\n" + + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" + + " \\\"cancelAfter\\\": 0,\\n" + + " \\\"postOnly\\\": false,\\n" + + " \\\"hidden\\\": false,\\n" + + " \\\"iceberge\\\": false,\\n" + + " \\\"iceberg\\\": false,\\n" + + " \\\"visibleSize\\\": null,\\n" + + " \\\"channel\\\": \\\"API\\\",\\n" + + " \\\"id\\\": \\\"674a97dffb378b00077b9c20\\\",\\n" + + " \\\"status\\\": \\\"fail\\\",\\n" + + " \\\"failMsg\\\": \\\"Balance insufficient!\\\",\\n" + + " \\\"clientOid\\\": \\\"37245dbe6e134b5c97732bfb36cd4a9d\\\"\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1285,20 +1304,20 @@ public static void testBatchAddOrdersOldResponse() throws Exception { /** cancelOrderByOrderIdOld Request Cancel Order By OrderId - Old /api/v1/orders/{orderId} */ public static void testCancelOrderByOrderIdOldRequest() throws Exception { - String data = "{\"orderId\": \"674a97dfef434f0007efc431\"}"; + String data = "{\\\"orderId\\\": \\\"674a97dfef434f0007efc431\\\"}"; CancelOrderByOrderIdOldReq obj = mapper.readValue(data, CancelOrderByOrderIdOldReq.class); } /** cancelOrderByOrderIdOld Response Cancel Order By OrderId - Old /api/v1/orders/{orderId} */ public static void testCancelOrderByOrderIdOldResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"cancelledOrderIds\": [\n" - + " \"674a97dfef434f0007efc431\"\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"cancelledOrderIds\\\": [\\n" + + " \\\"674a97dfef434f0007efc431\\\"\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1309,7 +1328,7 @@ public static void testCancelOrderByOrderIdOldResponse() throws Exception { * /api/v1/order/client-order/{clientOid} */ public static void testCancelOrderByClientOidOldRequest() throws Exception { - String data = "{\"clientOid\": \"5c52e11203aa677f331e493fb\"}"; + String data = "{\\\"clientOid\\\": \\\"5c52e11203aa677f331e493fb\\\"}"; CancelOrderByClientOidOldReq obj = mapper.readValue(data, CancelOrderByClientOidOldReq.class); } @@ -1319,13 +1338,13 @@ public static void testCancelOrderByClientOidOldRequest() throws Exception { */ public static void testCancelOrderByClientOidOldResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"cancelledOrderId\": \"67c3252a63d25e0007f91de9\",\n" - + " \"clientOid\": \"5c52e11203aa677f331e493fb\",\n" - + " \"cancelledOcoOrderIds\": null\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"cancelledOrderId\\\": \\\"67c3252a63d25e0007f91de9\\\",\\n" + + " \\\"clientOid\\\": \\\"5c52e11203aa677f331e493fb\\\",\\n" + + " \\\"cancelledOcoOrderIds\\\": null\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1333,21 +1352,21 @@ public static void testCancelOrderByClientOidOldResponse() throws Exception { /** batchCancelOrderOld Request Batch Cancel Order - Old /api/v1/orders */ public static void testBatchCancelOrderOldRequest() throws Exception { - String data = "{\"symbol\": \"BTC-USDT\", \"tradeType\": \"TRADE\"}"; + String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"tradeType\\\": \\\"TRADE\\\"}"; BatchCancelOrderOldReq obj = mapper.readValue(data, BatchCancelOrderOldReq.class); } /** batchCancelOrderOld Response Batch Cancel Order - Old /api/v1/orders */ public static void testBatchCancelOrderOldResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"cancelledOrderIds\": [\n" - + " \"674a8635b38d120007709c0f\",\n" - + " \"674a8630439c100007d3bce1\"\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"cancelledOrderIds\\\": [\\n" + + " \\\"674a8635b38d120007709c0f\\\",\\n" + + " \\\"674a8630439c100007d3bce1\\\"\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1356,57 +1375,58 @@ public static void testBatchCancelOrderOldResponse() throws Exception { /** getOrdersListOld Request Get Orders List - Old /api/v1/orders */ public static void testGetOrdersListOldRequest() throws Exception { String data = - "{\"symbol\": \"BTC-USDT\", \"status\": \"active\", \"side\": \"buy\", \"type\": \"limit\"," - + " \"tradeType\": \"TRADE\", \"startAt\": 123456, \"endAt\": 123456, \"currentPage\":" - + " 1, \"pageSize\": 50}"; + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"status\\\": \\\"active\\\", \\\"side\\\":" + + " \\\"buy\\\", \\\"type\\\": \\\"limit\\\", \\\"tradeType\\\": \\\"TRADE\\\"," + + " \\\"startAt\\\": 123456, \\\"endAt\\\": 123456, \\\"currentPage\\\": 1," + + " \\\"pageSize\\\": 50}"; GetOrdersListOldReq obj = mapper.readValue(data, GetOrdersListOldReq.class); } /** getOrdersListOld Response Get Orders List - Old /api/v1/orders */ public static void testGetOrdersListOldResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"currentPage\": 1,\n" - + " \"pageSize\": 50,\n" - + " \"totalNum\": 1,\n" - + " \"totalPage\": 1,\n" - + " \"items\": [\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" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"currentPage\\\": 1,\\n" + + " \\\"pageSize\\\": 50,\\n" + + " \\\"totalNum\\\": 1,\\n" + + " \\\"totalPage\\\": 1,\\n" + + " \\\"items\\\": [\\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" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1420,42 +1440,42 @@ public static void testGetRecentOrdersListOldRequest() throws Exception { /** getRecentOrdersListOld Response Get Recent Orders List - Old /api/v1/limit/orders */ public static void testGetRecentOrdersListOldResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1463,47 +1483,47 @@ public static void testGetRecentOrdersListOldResponse() throws Exception { /** getOrderByOrderIdOld Request Get Order By OrderId - Old /api/v1/orders/{orderId} */ public static void testGetOrderByOrderIdOldRequest() throws Exception { - String data = "{\"orderId\": \"674a97dfef434f0007efc431\"}"; + String data = "{\\\"orderId\\\": \\\"674a97dfef434f0007efc431\\\"}"; GetOrderByOrderIdOldReq obj = mapper.readValue(data, GetOrderByOrderIdOldReq.class); } /** getOrderByOrderIdOld Response Get Order By OrderId - Old /api/v1/orders/{orderId} */ public static void testGetOrderByOrderIdOldResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"id\": \"674a97dfef434f0007efc431\",\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"opType\": \"DEAL\",\n" - + " \"type\": \"limit\",\n" - + " \"side\": \"buy\",\n" - + " \"price\": \"50000\",\n" - + " \"size\": \"0.0001\",\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\": \"3d07008668054da6b3cb12e432c2b13a\",\n" - + " \"remark\": null,\n" - + " \"tags\": null,\n" - + " \"isActive\": false,\n" - + " \"cancelExist\": true,\n" - + " \"createdAt\": 1732941791518,\n" - + " \"tradeType\": \"TRADE\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"id\\\": \\\"674a97dfef434f0007efc431\\\",\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"opType\\\": \\\"DEAL\\\",\\n" + + " \\\"type\\\": \\\"limit\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"price\\\": \\\"50000\\\",\\n" + + " \\\"size\\\": \\\"0.0001\\\",\\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\\\": \\\"3d07008668054da6b3cb12e432c2b13a\\\",\\n" + + " \\\"remark\\\": null,\\n" + + " \\\"tags\\\": null,\\n" + + " \\\"isActive\\\": false,\\n" + + " \\\"cancelExist\\\": true,\\n" + + " \\\"createdAt\\\": 1732941791518,\\n" + + " \\\"tradeType\\\": \\\"TRADE\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1514,7 +1534,7 @@ public static void testGetOrderByOrderIdOldResponse() throws Exception { * /api/v1/order/client-order/{clientOid} */ public static void testGetOrderByClientOidOldRequest() throws Exception { - String data = "{\"clientOid\": \"3d07008668054da6b3cb12e432c2b13a\"}"; + String data = "{\\\"clientOid\\\": \\\"3d07008668054da6b3cb12e432c2b13a\\\"}"; GetOrderByClientOidOldReq obj = mapper.readValue(data, GetOrderByClientOidOldReq.class); } @@ -1524,40 +1544,40 @@ public static void testGetOrderByClientOidOldRequest() throws Exception { */ public static void testGetOrderByClientOidOldResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"id\": \"674a97dfef434f0007efc431\",\n" - + " \"symbol\": \"BTC-USDT\",\n" - + " \"opType\": \"DEAL\",\n" - + " \"type\": \"limit\",\n" - + " \"side\": \"buy\",\n" - + " \"price\": \"50000\",\n" - + " \"size\": \"0.0001\",\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\": \"3d07008668054da6b3cb12e432c2b13a\",\n" - + " \"remark\": null,\n" - + " \"tags\": null,\n" - + " \"isActive\": false,\n" - + " \"cancelExist\": true,\n" - + " \"createdAt\": 1732941791518,\n" - + " \"tradeType\": \"TRADE\"\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"id\\\": \\\"674a97dfef434f0007efc431\\\",\\n" + + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" + + " \\\"opType\\\": \\\"DEAL\\\",\\n" + + " \\\"type\\\": \\\"limit\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"price\\\": \\\"50000\\\",\\n" + + " \\\"size\\\": \\\"0.0001\\\",\\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\\\": \\\"3d07008668054da6b3cb12e432c2b13a\\\",\\n" + + " \\\"remark\\\": null,\\n" + + " \\\"tags\\\": null,\\n" + + " \\\"isActive\\\": false,\\n" + + " \\\"cancelExist\\\": true,\\n" + + " \\\"createdAt\\\": 1732941791518,\\n" + + " \\\"tradeType\\\": \\\"TRADE\\\"\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1566,44 +1586,45 @@ public static void testGetOrderByClientOidOldResponse() throws Exception { /** getTradeHistoryOld Request Get Trade History - Old /api/v1/fills */ public static void testGetTradeHistoryOldRequest() throws Exception { String data = - "{\"symbol\": \"BTC-USDT\", \"orderId\": \"example_string_default_value\", \"side\":" - + " \"buy\", \"type\": \"limit\", \"tradeType\": \"TRADE\", \"startAt\": 1728663338000," - + " \"endAt\": 1728692138000, \"currentPage\": 1, \"pageSize\": 50}"; + "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"orderId\\\": \\\"example_string_default_value\\\"," + + " \\\"side\\\": \\\"buy\\\", \\\"type\\\": \\\"limit\\\", \\\"tradeType\\\":" + + " \\\"TRADE\\\", \\\"startAt\\\": 1728663338000, \\\"endAt\\\": 1728692138000," + + " \\\"currentPage\\\": 1, \\\"pageSize\\\": 50}"; GetTradeHistoryOldReq obj = mapper.readValue(data, GetTradeHistoryOldReq.class); } /** getTradeHistoryOld Response Get Trade History - Old /api/v1/fills */ public static void testGetTradeHistoryOldResponse() throws Exception { String data = - "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": {\n" - + " \"currentPage\": 1,\n" - + " \"pageSize\": 50,\n" - + " \"totalNum\": 1,\n" - + " \"totalPage\": 1,\n" - + " \"items\": [\n" - + " {\n" - + " \"symbol\": \"DOGE-USDT\",\n" - + " \"tradeId\": \"10862827223795713\",\n" - + " \"orderId\": \"6745698ef4f1200007c561a8\",\n" - + " \"counterOrderId\": \"6745695ef15b270007ac5076\",\n" - + " \"side\": \"buy\",\n" - + " \"liquidity\": \"taker\",\n" - + " \"forceTaker\": false,\n" - + " \"price\": \"0.40739\",\n" - + " \"size\": \"10\",\n" - + " \"funds\": \"4.0739\",\n" - + " \"fee\": \"0.0040739\",\n" - + " \"feeRate\": \"0.001\",\n" - + " \"feeCurrency\": \"USDT\",\n" - + " \"stop\": \"\",\n" - + " \"tradeType\": \"TRADE\",\n" - + " \"type\": \"market\",\n" - + " \"createdAt\": 1732602254928\n" - + " }\n" - + " ]\n" - + " }\n" + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": {\\n" + + " \\\"currentPage\\\": 1,\\n" + + " \\\"pageSize\\\": 50,\\n" + + " \\\"totalNum\\\": 1,\\n" + + " \\\"totalPage\\\": 1,\\n" + + " \\\"items\\\": [\\n" + + " {\\n" + + " \\\"symbol\\\": \\\"DOGE-USDT\\\",\\n" + + " \\\"tradeId\\\": \\\"10862827223795713\\\",\\n" + + " \\\"orderId\\\": \\\"6745698ef4f1200007c561a8\\\",\\n" + + " \\\"counterOrderId\\\": \\\"6745695ef15b270007ac5076\\\",\\n" + + " \\\"side\\\": \\\"buy\\\",\\n" + + " \\\"liquidity\\\": \\\"taker\\\",\\n" + + " \\\"forceTaker\\\": false,\\n" + + " \\\"price\\\": \\\"0.40739\\\",\\n" + + " \\\"size\\\": \\\"10\\\",\\n" + + " \\\"funds\\\": \\\"4.0739\\\",\\n" + + " \\\"fee\\\": \\\"0.0040739\\\",\\n" + + " \\\"feeRate\\\": \\\"0.001\\\",\\n" + + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" + + " \\\"stop\\\": \\\"\\\",\\n" + + " \\\"tradeType\\\": \\\"TRADE\\\",\\n" + + " \\\"type\\\": \\\"market\\\",\\n" + + " \\\"createdAt\\\": 1732602254928\\n" + + " }\\n" + + " ]\\n" + + " }\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1617,29 +1638,29 @@ public static void testGetRecentTradeHistoryOldRequest() throws Exception { /** getRecentTradeHistoryOld Response Get Recent Trade History - Old /api/v1/limit/fills */ public static void testGetRecentTradeHistoryOldResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsAutoGeneratedTest.java index c9f4d610..6320f81f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsAutoGeneratedTest.java @@ -14,7 +14,7 @@ class SpotPrivateWsAutoGeneratedTest { /** account Get Account Balance /account/account/balance */ public static void testAccountResponse() throws Exception { String data = - "{\"topic\":\"/account/balance\",\"type\":\"message\",\"subject\":\"account.balance\",\"id\":\"354689988084000\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"accountId\":\"548674591753\",\"currency\":\"USDT\",\"total\":\"21.133773386762\",\"available\":\"20.132773386762\",\"hold\":\"1.001\",\"availableChange\":\"-0.5005\",\"holdChange\":\"0.5005\",\"relationContext\":{\"symbol\":\"BTC-USDT\",\"orderId\":\"6721d0632db25b0007071fdc\"},\"relationEvent\":\"trade.hold\",\"relationEventId\":\"354689988084000\",\"time\":\"1730269283892\"}}"; + "{\\\"topic\\\":\\\"/account/balance\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"account.balance\\\",\\\"id\\\":\\\"354689988084000\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\",\\\"data\\\":{\\\"accountId\\\":\\\"548674591753\\\",\\\"currency\\\":\\\"USDT\\\",\\\"total\\\":\\\"21.133773386762\\\",\\\"available\\\":\\\"20.132773386762\\\",\\\"hold\\\":\\\"1.001\\\",\\\"availableChange\\\":\\\"-0.5005\\\",\\\"holdChange\\\":\\\"0.5005\\\",\\\"relationContext\\\":{\\\"symbol\\\":\\\"BTC-USDT\\\",\\\"orderId\\\":\\\"6721d0632db25b0007071fdc\\\"},\\\"relationEvent\\\":\\\"trade.hold\\\",\\\"relationEventId\\\":\\\"354689988084000\\\",\\\"time\\\":\\\"1730269283892\\\"}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -22,7 +22,7 @@ public static void testAccountResponse() throws Exception { /** orderV1 Get Order(V1) /orderV1/spotMarket/tradeOrders */ public static void testOrderV1Response() throws Exception { String data = - "{\"topic\":\"/spotMarket/tradeOrdersV2\",\"type\":\"message\",\"subject\":\"orderChange\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"canceledSize\":\"0\",\"clientOid\":\"5c52e11203aa677f33e493fb\",\"filledSize\":\"0\",\"orderId\":\"6720ecd9ec71f4000747731a\",\"orderTime\":1730211033305,\"orderType\":\"limit\",\"originSize\":\"0.00001\",\"price\":\"50000\",\"remainSize\":\"0.00001\",\"side\":\"buy\",\"size\":\"0.00001\",\"status\":\"open\",\"symbol\":\"BTC-USDT\",\"ts\":1730211033335000000,\"type\":\"open\"}}"; + "{\\\"topic\\\":\\\"/spotMarket/tradeOrdersV2\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"orderChange\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\",\\\"data\\\":{\\\"canceledSize\\\":\\\"0\\\",\\\"clientOid\\\":\\\"5c52e11203aa677f33e493fb\\\",\\\"filledSize\\\":\\\"0\\\",\\\"orderId\\\":\\\"6720ecd9ec71f4000747731a\\\",\\\"orderTime\\\":1730211033305,\\\"orderType\\\":\\\"limit\\\",\\\"originSize\\\":\\\"0.00001\\\",\\\"price\\\":\\\"50000\\\",\\\"remainSize\\\":\\\"0.00001\\\",\\\"side\\\":\\\"buy\\\",\\\"size\\\":\\\"0.00001\\\",\\\"status\\\":\\\"open\\\",\\\"symbol\\\":\\\"BTC-USDT\\\",\\\"ts\\\":1730211033335000000,\\\"type\\\":\\\"open\\\"}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -30,7 +30,7 @@ public static void testOrderV1Response() throws Exception { /** orderV2 Get Order(V2) /orderV2/spotMarket/tradeOrdersV2 */ public static void testOrderV2Response() throws Exception { String 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\"}}"; + "{\\\"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\\\"}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -38,7 +38,7 @@ public static void testOrderV2Response() throws Exception { /** stopOrder Get Stop Order /stopOrder/spotMarket/advancedOrders */ public static void testStopOrderResponse() throws Exception { String 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}}"; + "{\\\"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}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java index 092155be..6f95bd76 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java @@ -16,43 +16,40 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class AllTickersEvent - implements Response> { - /** - * - */ - @JsonProperty("bestAsk") private String bestAsk; - /** - * - */ - @JsonProperty("bestAskSize") private String bestAskSize; - /** - * - */ - @JsonProperty("bestBid") private String bestBid; - /** - * - */ - @JsonProperty("bestBidSize") private String bestBidSize; - /** - * - */ - @JsonProperty("price") private String price; - /** - * - */ - @JsonProperty("sequence") private String sequence; - /** - * - */ - @JsonProperty("size") private String size; - /** - * The matching time of the latest transaction - */ - @JsonProperty("time") private Long time; - /** - * common response - */ +public class AllTickersEvent implements Response> { + /** */ + @JsonProperty("bestAsk") + private String bestAsk; + + /** */ + @JsonProperty("bestAskSize") + private String bestAskSize; + + /** */ + @JsonProperty("bestBid") + private String bestBid; + + /** */ + @JsonProperty("bestBidSize") + private String bestBidSize; + + /** */ + @JsonProperty("price") + private String price; + + /** */ + @JsonProperty("sequence") + private String sequence; + + /** */ + @JsonProperty("size") + private String size; + + /** The matching time of the latest transaction */ + @JsonProperty("time") + private Long time; + + /** common response */ @JsonIgnore private WsMessage commonResponse; @Override @@ -66,10 +63,8 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback - of(Callback callback) { - return msg - -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java index 0f31680a..29158972 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java @@ -18,42 +18,39 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class CallAuctionInfoEvent implements Response> { - /** - * Symbol - */ - @JsonProperty("symbol") private String symbol; - /** - * Estimated price - */ - @JsonProperty("estimatedPrice") private String estimatedPrice; - /** - * Estimated size - */ - @JsonProperty("estimatedSize") private String estimatedSize; - /** - * Sell ​​order minimum price - */ - @JsonProperty("sellOrderRangeLowPrice") private String sellOrderRangeLowPrice; - /** - * Sell ​​order maximum price - */ + /** Symbol */ + @JsonProperty("symbol") + private String symbol; + + /** Estimated price */ + @JsonProperty("estimatedPrice") + private String estimatedPrice; + + /** Estimated size */ + @JsonProperty("estimatedSize") + private String estimatedSize; + + /** Sell ​​order minimum price */ + @JsonProperty("sellOrderRangeLowPrice") + private String sellOrderRangeLowPrice; + + /** Sell ​​order maximum price */ @JsonProperty("sellOrderRangeHighPrice") private String sellOrderRangeHighPrice; - /** - * Buy ​​order minimum price - */ - @JsonProperty("buyOrderRangeLowPrice") private String buyOrderRangeLowPrice; - /** - * Buy ​​order maximum price - */ - @JsonProperty("buyOrderRangeHighPrice") private String buyOrderRangeHighPrice; - /** - * Timestamp (ms) - */ - @JsonProperty("time") private Long time; - /** - * common response - */ + + /** Buy ​​order minimum price */ + @JsonProperty("buyOrderRangeLowPrice") + private String buyOrderRangeLowPrice; + + /** Buy ​​order maximum price */ + @JsonProperty("buyOrderRangeHighPrice") + private String buyOrderRangeHighPrice; + + /** Timestamp (ms) */ + @JsonProperty("time") + private Long time; + + /** common response */ @JsonIgnore private WsMessage commonResponse; @Override @@ -67,10 +64,8 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback - of(Callback callback) { - return msg - -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java index c3731323..f408a421 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java @@ -19,43 +19,36 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class CallAuctionOrderbookLevel50Event - implements Response> { - /** - * price, size - */ - @JsonProperty("asks") private List> asks = new ArrayList<>(); - /** - * - */ - @JsonProperty("bids") private List> bids = new ArrayList<>(); - /** - * - */ - @JsonProperty("timestamp") private Long timestamp; - /** - * common response - */ - @JsonIgnore - private WsMessage commonResponse; + implements Response< + CallAuctionOrderbookLevel50Event, WsMessage> { + /** price, size */ + @JsonProperty("asks") + private List> asks = new ArrayList<>(); + + /** */ + @JsonProperty("bids") + private List> bids = new ArrayList<>(); + + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** common response */ + @JsonIgnore private WsMessage commonResponse; @Override - public void - setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @FunctionalInterface public interface Callback { - void onEvent(String topic, String subject, - CallAuctionOrderbookLevel50Event data); + void onEvent(String topic, String subject, CallAuctionOrderbookLevel50Event data); } public static class CallbackAdapters { - public static WebSocketMessageCallback - of(Callback callback) { - return msg - -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java index 8e7ad6cb..f779c359 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java @@ -18,24 +18,23 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class KlinesEvent - implements Response> { - /** - * symbol - */ - @JsonProperty("symbol") private String symbol; - /** - * Start time of the candle cycle,open price,close price, high price,low - * price,Transaction volume,Transaction amount - */ - @JsonProperty("candles") private List candles = new ArrayList<>(); - /** - * now(us) - */ - @JsonProperty("time") private Long time; +public class KlinesEvent implements Response> { + /** symbol */ + @JsonProperty("symbol") + private String symbol; + /** - * common response + * Start time of the candle cycle,open price,close price, high price,low price,Transaction + * volume,Transaction amount */ + @JsonProperty("candles") + private List candles = new ArrayList<>(); + + /** now(us) */ + @JsonProperty("time") + private Long time; + + /** common response */ @JsonIgnore private WsMessage commonResponse; @Override @@ -50,8 +49,7 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg - -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotData.java index 5b67c3ed..0b201c04 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotData.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotData.java @@ -17,159 +17,153 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) class MarketSnapshotData { - /** - * - */ - @JsonProperty("askSize") private Double askSize; - /** - * - */ - @JsonProperty("averagePrice") private Double averagePrice; - /** - * - */ - @JsonProperty("baseCurrency") private String baseCurrency; - /** - * - */ - @JsonProperty("bidSize") private Double bidSize; - /** - * Trading pair partition: 0. Primary partition 1.KuCoin Plus\", example = - * \"1\" - */ - @JsonProperty("board") private BoardEnum board; - /** - * - */ - @JsonProperty("buy") private Double buy; - /** - * - */ - @JsonProperty("changePrice") private Double changePrice; - /** - * - */ - @JsonProperty("changeRate") private Double changeRate; - /** - * - */ - @JsonProperty("close") private Double close; - /** - * - */ - @JsonProperty("datetime") private Long datetime; - /** - * - */ - @JsonProperty("high") private Double high; - /** - * - */ - @JsonProperty("lastTradedPrice") private Double lastTradedPrice; - /** - * - */ - @JsonProperty("low") private Double low; - /** - * - */ - @JsonProperty("makerCoefficient") private Double makerCoefficient; - /** - * - */ - @JsonProperty("makerFeeRate") private Double makerFeeRate; - /** - * - */ - @JsonProperty("marginTrade") private Boolean marginTrade; - /** - * Trading Pair Mark: 0. Default 1.ST. 2.NEW\", example = \"1\" - */ - @JsonProperty("mark") private MarkEnum mark; - /** - * - */ - @JsonProperty("market") private String market; - /** - * - */ + /** */ + @JsonProperty("askSize") + private Double askSize; + + /** */ + @JsonProperty("averagePrice") + private Double averagePrice; + + /** */ + @JsonProperty("baseCurrency") + private String baseCurrency; + + /** */ + @JsonProperty("bidSize") + private Double bidSize; + + /** Trading pair partition: 0. Primary partition 1.KuCoin Plus\", example = \"1\" */ + @JsonProperty("board") + private BoardEnum board; + + /** */ + @JsonProperty("buy") + private Double buy; + + /** */ + @JsonProperty("changePrice") + private Double changePrice; + + /** */ + @JsonProperty("changeRate") + private Double changeRate; + + /** */ + @JsonProperty("close") + private Double close; + + /** */ + @JsonProperty("datetime") + private Long datetime; + + /** */ + @JsonProperty("high") + private Double high; + + /** */ + @JsonProperty("lastTradedPrice") + private Double lastTradedPrice; + + /** */ + @JsonProperty("low") + private Double low; + + /** */ + @JsonProperty("makerCoefficient") + private Double makerCoefficient; + + /** */ + @JsonProperty("makerFeeRate") + private Double makerFeeRate; + + /** */ + @JsonProperty("marginTrade") + private Boolean marginTrade; + + /** Trading Pair Mark: 0. Default 1.ST. 2.NEW\", example = \"1\" */ + @JsonProperty("mark") + private MarkEnum mark; + + /** */ + @JsonProperty("market") + private String market; + + /** */ @JsonProperty("marketChange1h") private MarketSnapshotDataMarketChange1h marketChange1h; - /** - * - */ + + /** */ @JsonProperty("marketChange24h") private MarketSnapshotDataMarketChange24h marketChange24h; - /** - * - */ + + /** */ @JsonProperty("marketChange4h") private MarketSnapshotDataMarketChange4h marketChange4h; - /** - * - */ - @JsonProperty("markets") private List markets = new ArrayList<>(); - /** - * - */ - @JsonProperty("open") private Double open; - /** - * - */ - @JsonProperty("quoteCurrency") private String quoteCurrency; - /** - * - */ - @JsonProperty("sell") private Double sell; - /** - * - */ - @JsonProperty("siteTypes") private List siteTypes = new ArrayList<>(); - /** - * sorting number - */ - @JsonProperty("sort") private Integer sort; - /** - * - */ - @JsonProperty("symbol") private String symbol; - /** - * - */ - @JsonProperty("symbolCode") private String symbolCode; - /** - * - */ - @JsonProperty("takerCoefficient") private Double takerCoefficient; - /** - * - */ - @JsonProperty("takerFeeRate") private Double takerFeeRate; - /** - * - */ - @JsonProperty("trading") private Boolean trading; - /** - * - */ - @JsonProperty("vol") private Double vol; - /** - * - */ - @JsonProperty("volValue") private Double volValue; + + /** */ + @JsonProperty("markets") + private List markets = new ArrayList<>(); + + /** */ + @JsonProperty("open") + private Double open; + + /** */ + @JsonProperty("quoteCurrency") + private String quoteCurrency; + + /** */ + @JsonProperty("sell") + private Double sell; + + /** */ + @JsonProperty("siteTypes") + private List siteTypes = new ArrayList<>(); + + /** sorting number */ + @JsonProperty("sort") + private Integer sort; + + /** */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("symbolCode") + private String symbolCode; + + /** */ + @JsonProperty("takerCoefficient") + private Double takerCoefficient; + + /** */ + @JsonProperty("takerFeeRate") + private Double takerFeeRate; + + /** */ + @JsonProperty("trading") + private Boolean trading; + + /** */ + @JsonProperty("vol") + private Double vol; + + /** */ + @JsonProperty("volValue") + private Double volValue; + public enum BoardEnum { - /** - * primary partition - */ + /** primary partition */ _0(0), - /** - * KuCoin Plus - */ + /** KuCoin Plus */ _1(1); private final Integer value; - BoardEnum(Integer value) { this.value = value; } + BoardEnum(Integer value) { + this.value = value; + } @JsonValue public Integer getValue() { @@ -191,23 +185,20 @@ public static BoardEnum fromValue(Integer value) { throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } + public enum MarkEnum { - /** - * default - */ + /** default */ _0(0), - /** - * ST - */ + /** ST */ _1(1), - /** - * NEW - */ + /** NEW */ _2(2); private final Integer value; - MarkEnum(Integer value) { this.value = value; } + MarkEnum(Integer value) { + this.value = value; + } @JsonValue public Integer getValue() { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange1h.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange1h.java index c1fbeb3f..01c228c2 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange1h.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange1h.java @@ -13,32 +13,31 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) class MarketSnapshotDataMarketChange1h { - /** - * - */ - @JsonProperty("changePrice") private Double changePrice; - /** - * - */ - @JsonProperty("changeRate") private Double changeRate; - /** - * - */ - @JsonProperty("high") private Double high; - /** - * - */ - @JsonProperty("low") private Double low; - /** - * - */ - @JsonProperty("open") private Double open; - /** - * - */ - @JsonProperty("vol") private Double vol; - /** - * - */ - @JsonProperty("volValue") private Double volValue; + /** */ + @JsonProperty("changePrice") + private Double changePrice; + + /** */ + @JsonProperty("changeRate") + private Double changeRate; + + /** */ + @JsonProperty("high") + private Double high; + + /** */ + @JsonProperty("low") + private Double low; + + /** */ + @JsonProperty("open") + private Double open; + + /** */ + @JsonProperty("vol") + private Double vol; + + /** */ + @JsonProperty("volValue") + private Double volValue; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange24h.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange24h.java index d4fb53e9..b8e5d445 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange24h.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange24h.java @@ -13,32 +13,31 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) class MarketSnapshotDataMarketChange24h { - /** - * - */ - @JsonProperty("changePrice") private Double changePrice; - /** - * - */ - @JsonProperty("changeRate") private Double changeRate; - /** - * - */ - @JsonProperty("high") private Double high; - /** - * - */ - @JsonProperty("low") private Double low; - /** - * - */ - @JsonProperty("open") private Double open; - /** - * - */ - @JsonProperty("vol") private Double vol; - /** - * - */ - @JsonProperty("volValue") private Double volValue; + /** */ + @JsonProperty("changePrice") + private Double changePrice; + + /** */ + @JsonProperty("changeRate") + private Double changeRate; + + /** */ + @JsonProperty("high") + private Double high; + + /** */ + @JsonProperty("low") + private Double low; + + /** */ + @JsonProperty("open") + private Double open; + + /** */ + @JsonProperty("vol") + private Double vol; + + /** */ + @JsonProperty("volValue") + private Double volValue; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange4h.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange4h.java index 9f18459b..eaa20b50 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange4h.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotDataMarketChange4h.java @@ -13,32 +13,31 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) class MarketSnapshotDataMarketChange4h { - /** - * - */ - @JsonProperty("changePrice") private Double changePrice; - /** - * - */ - @JsonProperty("changeRate") private Double changeRate; - /** - * - */ - @JsonProperty("high") private Double high; - /** - * - */ - @JsonProperty("low") private Double low; - /** - * - */ - @JsonProperty("open") private Double open; - /** - * - */ - @JsonProperty("vol") private Double vol; - /** - * - */ - @JsonProperty("volValue") private Double volValue; + /** */ + @JsonProperty("changePrice") + private Double changePrice; + + /** */ + @JsonProperty("changeRate") + private Double changeRate; + + /** */ + @JsonProperty("high") + private Double high; + + /** */ + @JsonProperty("low") + private Double low; + + /** */ + @JsonProperty("open") + private Double open; + + /** */ + @JsonProperty("vol") + private Double vol; + + /** */ + @JsonProperty("volValue") + private Double volValue; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java index 82a2cd5b..06afae2d 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java @@ -18,17 +18,15 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class MarketSnapshotEvent implements Response> { - /** - * - */ - @JsonProperty("sequence") private String sequence; - /** - * - */ - @JsonProperty("data") private MarketSnapshotData data; - /** - * common response - */ + /** */ + @JsonProperty("sequence") + private String sequence; + + /** */ + @JsonProperty("data") + private MarketSnapshotData data; + + /** common response */ @JsonIgnore private WsMessage commonResponse; @Override @@ -42,10 +40,8 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback - of(Callback callback) { - return msg - -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementChanges.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementChanges.java index 042f14a3..7571818b 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementChanges.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementChanges.java @@ -15,12 +15,11 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) class OrderbookIncrementChanges { - /** - * price,size,sequence - */ - @JsonProperty("asks") private List> asks = new ArrayList<>(); - /** - * - */ - @JsonProperty("bids") private List> bids = new ArrayList<>(); + /** price,size,sequence */ + @JsonProperty("asks") + private List> asks = new ArrayList<>(); + + /** */ + @JsonProperty("bids") + private List> bids = new ArrayList<>(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java index 10c3ec68..c796a583 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java @@ -17,31 +17,28 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class OrderbookIncrementEvent - implements Response> { - /** - * - */ - @JsonProperty("changes") private OrderbookIncrementChanges changes; - /** - * - */ - @JsonProperty("sequenceEnd") private Long sequenceEnd; - /** - * - */ - @JsonProperty("sequenceStart") private Long sequenceStart; - /** - * - */ - @JsonProperty("symbol") private String symbol; - /** - * milliseconds - */ - @JsonProperty("time") private Long time; - /** - * common response - */ + implements Response> { + /** */ + @JsonProperty("changes") + private OrderbookIncrementChanges changes; + + /** */ + @JsonProperty("sequenceEnd") + private Long sequenceEnd; + + /** */ + @JsonProperty("sequenceStart") + private Long sequenceStart; + + /** */ + @JsonProperty("symbol") + private String symbol; + + /** milliseconds */ + @JsonProperty("time") + private Long time; + + /** common response */ @JsonIgnore private WsMessage commonResponse; @Override @@ -55,10 +52,8 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback - of(Callback callback) { - return msg - -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java index 2b0463fb..0e0dcb9b 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java @@ -20,21 +20,19 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class OrderbookLevel1Event implements Response> { - /** - * price, size - */ - @JsonProperty("asks") private List asks = new ArrayList<>(); - /** - * - */ - @JsonProperty("bids") private List bids = new ArrayList<>(); - /** - * - */ - @JsonProperty("timestamp") private Long timestamp; - /** - * common response - */ + /** price, size */ + @JsonProperty("asks") + private List asks = new ArrayList<>(); + + /** */ + @JsonProperty("bids") + private List bids = new ArrayList<>(); + + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** common response */ @JsonIgnore private WsMessage commonResponse; @Override @@ -48,10 +46,8 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback - of(Callback callback) { - return msg - -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java index 7d6da0e2..6d900d70 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java @@ -19,23 +19,20 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class OrderbookLevel50Event - implements Response> { - /** - * price, size - */ - @JsonProperty("asks") private List> asks = new ArrayList<>(); - /** - * - */ - @JsonProperty("bids") private List> bids = new ArrayList<>(); - /** - * - */ - @JsonProperty("timestamp") private Long timestamp; - /** - * common response - */ + implements Response> { + /** price, size */ + @JsonProperty("asks") + private List> asks = new ArrayList<>(); + + /** */ + @JsonProperty("bids") + private List> bids = new ArrayList<>(); + + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** common response */ @JsonIgnore private WsMessage commonResponse; @Override @@ -49,10 +46,8 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback - of(Callback callback) { - return msg - -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java index 8a94e68e..7d971282 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java @@ -20,21 +20,19 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class OrderbookLevel5Event implements Response> { - /** - * price, size - */ - @JsonProperty("asks") private List> asks = new ArrayList<>(); - /** - * - */ - @JsonProperty("bids") private List> bids = new ArrayList<>(); - /** - * - */ - @JsonProperty("timestamp") private Long timestamp; - /** - * common response - */ + /** price, size */ + @JsonProperty("asks") + private List> asks = new ArrayList<>(); + + /** */ + @JsonProperty("bids") + private List> bids = new ArrayList<>(); + + /** */ + @JsonProperty("timestamp") + private Long timestamp; + + /** common response */ @JsonIgnore private WsMessage commonResponse; @Override @@ -48,10 +46,8 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback - of(Callback callback) { - return msg - -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWs.java index 80770a59..4c170e82 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWs.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWs.java @@ -5,115 +5,86 @@ public interface SpotPublicWs { /** - * Get All Tickers - * Subscribe to this topic to get pushes on all market symbol BBO changes. - * push frequency: once every 100ms + * Get All Tickers Subscribe to this topic to get pushes on all market symbol BBO changes. push + * frequency: once every 100ms */ public String allTickers(AllTickersEvent.Callback callback); /** - * Get Call Auction Info - * Subscribe to this topic to get the specified symbol call auction info. + * Get Call Auction Info Subscribe to this topic to get the specified symbol call auction info. * push frequency: once every 100ms */ - public String callAuctionInfo(String symbol, - CallAuctionInfoEvent.Callback callback); + public String callAuctionInfo(String symbol, CallAuctionInfoEvent.Callback callback); /** - * 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 + * 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 */ public String callAuctionOrderbookLevel50( String symbol, CallAuctionOrderbookLevel50Event.Callback callback); - /** - * Klines - * Subscribe to this topic to get K-Line data. - * push frequency: real-time - */ - public String klines(String symbol, String type, - KlinesEvent.Callback callback); + /** Klines Subscribe to this topic to get K-Line data. push frequency: real-time */ + public String klines(String symbol, String type, KlinesEvent.Callback callback); /** - * Market Snapshot - * Subscribe to this topic to get snapshot data for the entire market. - * push frequency: once every 2s + * Market Snapshot Subscribe to this topic to get snapshot data for the entire market. push + * frequency: once every 2s */ - public String marketSnapshot(String market, - MarketSnapshotEvent.Callback callback); + public String marketSnapshot(String market, MarketSnapshotEvent.Callback callback); /** - * Orderbook - Increment - * 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 + * Orderbook - Increment 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 */ - public String orderbookIncrement(String[] symbol, - OrderbookIncrementEvent.Callback callback); + public String orderbookIncrement(String[] symbol, OrderbookIncrementEvent.Callback callback); /** - * 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 push frequency: once every 10ms + * 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 push frequency: + * once every 10ms */ - public String orderbookLevel1(String[] symbol, - OrderbookLevel1Event.Callback callback); + public String orderbookLevel1(String[] symbol, OrderbookLevel1Event.Callback callback); /** - * Orderbook - Level50 - * 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 + * Orderbook - Level50 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 */ - public String orderbookLevel50(String[] symbol, - OrderbookLevel50Event.Callback callback); + public String orderbookLevel50(String[] symbol, OrderbookLevel50Event.Callback callback); /** - * 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 push frequency: once every 100ms + * 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 push frequency: + * once every 100ms */ - public String orderbookLevel5(String[] symbol, - OrderbookLevel5Event.Callback callback); + public String orderbookLevel5(String[] symbol, OrderbookLevel5Event.Callback callback); /** - * Symbol Snapshot - * Subscribe to get snapshot data for a single symbol. - * push frequency: once every 2s + * Symbol Snapshot Subscribe to get snapshot data for a single symbol. push frequency: once every + * 2s */ - public String symbolSnapshot(String symbol, - SymbolSnapshotEvent.Callback callback); + public String symbolSnapshot(String symbol, SymbolSnapshotEvent.Callback callback); /** - * Get Ticker - * Subscribe to this topic to get specified symbol pushes on BBO changes. - * push frequency: once every 100ms + * Get Ticker Subscribe to this topic to get specified symbol pushes on BBO changes. push + * frequency: once every 100ms */ public String ticker(String[] symbol, TickerEvent.Callback callback); /** - * Trade - * Subscribe to this topic to get Level 3 matching event data flows. A topic - * supports up to 100 symbols. push frequency: real-time + * Trade Subscribe to this topic to get Level 3 matching event data flows. A topic supports up to + * 100 symbols. push frequency: real-time */ public String trade(String[] symbol, TradeEvent.Callback callback); - /** - * Unsubscribe from topics - */ + /** Unsubscribe from topics */ public void unSubscribe(String id); - /** - * Start websocket - */ + /** Start websocket */ public void start(); - /** - * Stop websocket - */ + /** Stop websocket */ public void stop(); -} \ No newline at end of file +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsAutoGeneratedTest.java index 3a063011..bea60879 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsAutoGeneratedTest.java @@ -1,4 +1,5 @@ package com.kucoin.universal.sdk.generate.spot.spotpublic; + import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.model.WsMessage; @@ -10,164 +11,131 @@ class SpotPublicWsAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); - /** - * allTickers - * Get All Tickers - * /allTickers/market/ticker:all - */ + /** allTickers Get All Tickers /allTickers/market/ticker:all */ public static void testAllTickersResponse() throws Exception { String data = - "{\"topic\":\"/market/ticker:all\",\"type\":\"message\",\"subject\":\"BTC-USDT\",\"data\":{\"bestAsk\":\"67218.7\",\"bestAskSize\":\"1.92318539\",\"bestBid\":\"67218.6\",\"bestBidSize\":\"0.01045638\",\"price\":\"67220\",\"sequence\":\"14691455768\",\"size\":\"0.00004316\",\"time\":1729757723612}}"; - WsMessage resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\\"topic\\\":\\\"/market/ticker:all\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"BTC-USDT\\\",\\\"data\\\":{\\\"bestAsk\\\":\\\"67218.7\\\",\\\"bestAskSize\\\":\\\"1.92318539\\\",\\\"bestBid\\\":\\\"67218.6\\\",\\\"bestBidSize\\\":\\\"0.01045638\\\",\\\"price\\\":\\\"67220\\\",\\\"sequence\\\":\\\"14691455768\\\",\\\"size\\\":\\\"0.00004316\\\",\\\"time\\\":1729757723612}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * callAuctionInfo - * Get Call Auction Info - * /callAuctionInfo/callauction/callauctionData:_symbol_ - */ + + /** callAuctionInfo Get Call Auction Info /callAuctionInfo/callauction/callauctionData:_symbol_ */ public static void testCallAuctionInfoResponse() throws Exception { String 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}}"; - WsMessage resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\\"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}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); } + /** - * callAuctionOrderbookLevel50 - * CallAuctionOrderbook - Level50 + * callAuctionOrderbookLevel50 CallAuctionOrderbook - Level50 * /callAuctionOrderbookLevel50/callauction/level2Depth50:_symbol_ */ - public static void testCallAuctionOrderbookLevel50Response() - throws Exception { + public static void testCallAuctionOrderbookLevel50Response() throws Exception { String 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}}"; - WsMessage resp = mapper.readValue( - data, - new TypeReference>() {}); + "{\\\"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}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * klines - * Klines - * /klines/market/candles:_symbol___type_ - */ + + /** klines Klines /klines/market/candles:_symbol___type_ */ public static void testKlinesResponse() throws Exception { String data = - "{\"topic\":\"/market/candles:BTC-USDT_1hour\",\"type\":\"message\",\"subject\":\"trade.candles.update\",\"data\":{\"symbol\":\"BTC-USDT\",\"candles\":[\"1729839600\",\"67644.9\",\"67437.6\",\"67724.8\",\"67243.8\",\"44.88321441\",\"3027558.991928447\"],\"time\":1729842192785164840}}"; + "{\\\"topic\\\":\\\"/market/candles:BTC-USDT_1hour\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"trade.candles.update\\\",\\\"data\\\":{\\\"symbol\\\":\\\"BTC-USDT\\\",\\\"candles\\\":[\\\"1729839600\\\",\\\"67644.9\\\",\\\"67437.6\\\",\\\"67724.8\\\",\\\"67243.8\\\",\\\"44.88321441\\\",\\\"3027558.991928447\\\"],\\\"time\\\":1729842192785164840}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } - /** - * marketSnapshot - * Market Snapshot - * /marketSnapshot/market/snapshot:_market_ - */ + + /** marketSnapshot Market Snapshot /marketSnapshot/market/snapshot:_market_ */ public static void testMarketSnapshotResponse() throws Exception { String data = - "{\"topic\":\"/market/snapshot:BTC\",\"type\":\"message\",\"subject\":\"trade.snapshot\",\"data\":{\"sequence\":\"1729785948015\",\"data\":{\"askSize\":1375.1096,\"averagePrice\":0.00000262,\"baseCurrency\":\"CHR\",\"bidSize\":152.0912,\"board\":0,\"buy\":0.00000263,\"changePrice\":0.00000005300000000000,\"changeRate\":0.0200,\"close\":0.000002698,\"datetime\":1729785948008,\"high\":0.00000274600000000000,\"lastTradedPrice\":0.000002698,\"low\":0.00000255800000000000,\"makerCoefficient\":1.000000,\"makerFeeRate\":0.001,\"marginTrade\":false,\"mark\":0,\"market\":\"BTC\",\"marketChange1h\":{\"changePrice\":-0.00000000900000000000,\"changeRate\":-0.0033,\"high\":0.00000270700000000000,\"low\":0.00000264200000000000,\"open\":0.00000270700000000000,\"vol\":27.10350000000000000000,\"volValue\":0.00007185015660000000},\"marketChange24h\":{\"changePrice\":0.00000005300000000000,\"changeRate\":0.0200,\"high\":0.00000274600000000000,\"low\":0.00000255800000000000,\"open\":0.00000264500000000000,\"vol\":6824.94800000000000000000,\"volValue\":0.01789509649520000000},\"marketChange4h\":{\"changePrice\":0.00000000600000000000,\"changeRate\":0.0022,\"high\":0.00000270700000000000,\"low\":0.00000264200000000000,\"open\":0.00000269200000000000,\"vol\":92.69020000000000000000,\"volValue\":0.00024903875740000000},\"markets\":[\"BTC\",\"DePIN\",\"Layer 1\"],\"open\":0.00000264500000000000,\"quoteCurrency\":\"BTC\",\"sell\":0.000002695,\"siteTypes\":[\"global\"],\"sort\":100,\"symbol\":\"CHR-BTC\",\"symbolCode\":\"CHR-BTC\",\"takerCoefficient\":1.000000,\"takerFeeRate\":0.001,\"trading\":true,\"vol\":6824.94800000000000000000,\"volValue\":0.01789509649520000000}}}"; - WsMessage resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\\"topic\\\":\\\"/market/snapshot:BTC\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"trade.snapshot\\\",\\\"data\\\":{\\\"sequence\\\":\\\"1729785948015\\\",\\\"data\\\":{\\\"askSize\\\":1375.1096,\\\"averagePrice\\\":0.00000262,\\\"baseCurrency\\\":\\\"CHR\\\",\\\"bidSize\\\":152.0912,\\\"board\\\":0,\\\"buy\\\":0.00000263,\\\"changePrice\\\":0.00000005300000000000,\\\"changeRate\\\":0.0200,\\\"close\\\":0.000002698,\\\"datetime\\\":1729785948008,\\\"high\\\":0.00000274600000000000,\\\"lastTradedPrice\\\":0.000002698,\\\"low\\\":0.00000255800000000000,\\\"makerCoefficient\\\":1.000000,\\\"makerFeeRate\\\":0.001,\\\"marginTrade\\\":false,\\\"mark\\\":0,\\\"market\\\":\\\"BTC\\\",\\\"marketChange1h\\\":{\\\"changePrice\\\":-0.00000000900000000000,\\\"changeRate\\\":-0.0033,\\\"high\\\":0.00000270700000000000,\\\"low\\\":0.00000264200000000000,\\\"open\\\":0.00000270700000000000,\\\"vol\\\":27.10350000000000000000,\\\"volValue\\\":0.00007185015660000000},\\\"marketChange24h\\\":{\\\"changePrice\\\":0.00000005300000000000,\\\"changeRate\\\":0.0200,\\\"high\\\":0.00000274600000000000,\\\"low\\\":0.00000255800000000000,\\\"open\\\":0.00000264500000000000,\\\"vol\\\":6824.94800000000000000000,\\\"volValue\\\":0.01789509649520000000},\\\"marketChange4h\\\":{\\\"changePrice\\\":0.00000000600000000000,\\\"changeRate\\\":0.0022,\\\"high\\\":0.00000270700000000000,\\\"low\\\":0.00000264200000000000,\\\"open\\\":0.00000269200000000000,\\\"vol\\\":92.69020000000000000000,\\\"volValue\\\":0.00024903875740000000},\\\"markets\\\":[\\\"BTC\\\",\\\"DePIN\\\",\\\"Layer" + + " 1\\\"],\\\"open\\\":0.00000264500000000000,\\\"quoteCurrency\\\":\\\"BTC\\\",\\\"sell\\\":0.000002695,\\\"siteTypes\\\":[\\\"global\\\"],\\\"sort\\\":100,\\\"symbol\\\":\\\"CHR-BTC\\\",\\\"symbolCode\\\":\\\"CHR-BTC\\\",\\\"takerCoefficient\\\":1.000000,\\\"takerFeeRate\\\":0.001,\\\"trading\\\":true,\\\"vol\\\":6824.94800000000000000000,\\\"volValue\\\":0.01789509649520000000}}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); } + /** - * orderbookIncrement - * Orderbook - Increment - * /orderbookIncrement/market/level2:_symbol_,_symbol_ + * orderbookIncrement Orderbook - Increment /orderbookIncrement/market/level2:_symbol_,_symbol_ */ public static void testOrderbookIncrementResponse() throws Exception { String data = - "{\"topic\":\"/market/level2:BTC-USDT\",\"type\":\"message\",\"subject\":\"trade.l2update\",\"data\":{\"changes\":{\"asks\":[[\"67993.3\",\"1.21427407\",\"14701689783\"]],\"bids\":[]},\"sequenceEnd\":14701689783,\"sequenceStart\":14701689783,\"symbol\":\"BTC-USDT\",\"time\":1729816425625}}"; - WsMessage resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\\"topic\\\":\\\"/market/level2:BTC-USDT\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"trade.l2update\\\",\\\"data\\\":{\\\"changes\\\":{\\\"asks\\\":[[\\\"67993.3\\\",\\\"1.21427407\\\",\\\"14701689783\\\"]],\\\"bids\\\":[]},\\\"sequenceEnd\\\":14701689783,\\\"sequenceStart\\\":14701689783,\\\"symbol\\\":\\\"BTC-USDT\\\",\\\"time\\\":1729816425625}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * orderbookLevel1 - * Orderbook - Level1 - * /orderbookLevel1/spotMarket/level1:_symbol_,_symbol_ - */ + + /** orderbookLevel1 Orderbook - Level1 /orderbookLevel1/spotMarket/level1:_symbol_,_symbol_ */ public static void testOrderbookLevel1Response() throws Exception { String data = - "{\"topic\":\"/spotMarket/level1:BTC-USDT\",\"type\":\"message\",\"subject\":\"level1\",\"data\":{\"asks\":[\"68145.8\",\"0.51987471\"],\"bids\":[\"68145.7\",\"1.29267802\"],\"timestamp\":1729816058766}}"; - WsMessage resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\\"topic\\\":\\\"/spotMarket/level1:BTC-USDT\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"level1\\\",\\\"data\\\":{\\\"asks\\\":[\\\"68145.8\\\",\\\"0.51987471\\\"],\\\"bids\\\":[\\\"68145.7\\\",\\\"1.29267802\\\"],\\\"timestamp\\\":1729816058766}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); } + /** - * orderbookLevel50 - * Orderbook - Level50 + * orderbookLevel50 Orderbook - Level50 * /orderbookLevel50/spotMarket/level2Depth50:_symbol_,_symbol_ */ public static void testOrderbookLevel50Response() throws Exception { String 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}}"; - WsMessage resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\\"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}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); } + /** - * orderbookLevel5 - * Orderbook - Level5 - * /orderbookLevel5/spotMarket/level2Depth5:_symbol_,_symbol_ + * orderbookLevel5 Orderbook - Level5 /orderbookLevel5/spotMarket/level2Depth5:_symbol_,_symbol_ */ public static void testOrderbookLevel5Response() throws Exception { String data = - "{\"topic\":\"/spotMarket/level2Depth5:BTC-USDT\",\"type\":\"message\",\"subject\":\"level2\",\"data\":{\"asks\":[[\"67996.7\",\"1.14213262\"],[\"67996.8\",\"0.21748212\"],[\"67996.9\",\"0.1503747\"],[\"67997\",\"0.11446863\"],[\"67997.1\",\"0.14842782\"]],\"bids\":[[\"67996.6\",\"0.37969491\"],[\"67995.3\",\"0.20779746\"],[\"67994.5\",\"0.00047785\"],[\"67993.4\",\"0.405\"],[\"67993.3\",\"0.13528566\"]],\"timestamp\":1729822226746}}"; - WsMessage resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\\"topic\\\":\\\"/spotMarket/level2Depth5:BTC-USDT\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"level2\\\",\\\"data\\\":{\\\"asks\\\":[[\\\"67996.7\\\",\\\"1.14213262\\\"],[\\\"67996.8\\\",\\\"0.21748212\\\"],[\\\"67996.9\\\",\\\"0.1503747\\\"],[\\\"67997\\\",\\\"0.11446863\\\"],[\\\"67997.1\\\",\\\"0.14842782\\\"]],\\\"bids\\\":[[\\\"67996.6\\\",\\\"0.37969491\\\"],[\\\"67995.3\\\",\\\"0.20779746\\\"],[\\\"67994.5\\\",\\\"0.00047785\\\"],[\\\"67993.4\\\",\\\"0.405\\\"],[\\\"67993.3\\\",\\\"0.13528566\\\"]],\\\"timestamp\\\":1729822226746}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * symbolSnapshot - * Symbol Snapshot - * /symbolSnapshot/market/snapshot:_symbol_ - */ + + /** symbolSnapshot Symbol Snapshot /symbolSnapshot/market/snapshot:_symbol_ */ public static void testSymbolSnapshotResponse() throws Exception { String data = - "{\"topic\":\"/market/snapshot:BTC-USDT\",\"type\":\"message\",\"subject\":\"trade.snapshot\",\"data\":{\"sequence\":\"14691517895\",\"data\":{\"askSize\":1.15955795,\"averagePrice\":66867.89967612,\"baseCurrency\":\"BTC\",\"bidSize\":0.81772627,\"board\":1,\"buy\":67158.1,\"changePrice\":315.20000000000000000000,\"changeRate\":0.0047,\"close\":67158.1,\"datetime\":1729758286011,\"high\":67611.80000000000000000000,\"lastTradedPrice\":67158.1,\"low\":65257.10000000000000000000,\"makerCoefficient\":1.000000,\"makerFeeRate\":0.001,\"marginTrade\":true,\"mark\":0,\"market\":\"USDS\",\"marketChange1h\":{\"changePrice\":-102.10000000000000000000,\"changeRate\":-0.0015,\"high\":67310.60000000000000000000,\"low\":67051.80000000000000000000,\"open\":67260.20000000000000000000,\"vol\":53.73698081000000000000,\"volValue\":3609965.13819127700000000000},\"marketChange24h\":{\"changePrice\":315.20000000000000000000,\"changeRate\":0.0047,\"high\":67611.80000000000000000000,\"low\":65257.10000000000000000000,\"open\":66842.90000000000000000000,\"vol\":2227.69895852000000000000,\"volValue\":147972941.07857507300000000000},\"marketChange4h\":{\"changePrice\":-166.30000000000000000000,\"changeRate\":-0.0024,\"high\":67476.60000000000000000000,\"low\":67051.80000000000000000000,\"open\":67324.40000000000000000000,\"vol\":173.76971188000000000000,\"volValue\":11695949.43841656500000000000},\"markets\":[\"USDS\",\"PoW\"],\"open\":66842.90000000000000000000,\"quoteCurrency\":\"USDT\",\"sell\":67158.2,\"siteTypes\":[\"turkey\",\"thailand\",\"global\"],\"sort\":100,\"symbol\":\"BTC-USDT\",\"symbolCode\":\"BTC-USDT\",\"takerCoefficient\":1.000000,\"takerFeeRate\":0.001,\"trading\":true,\"vol\":2227.69895852000000000000,\"volValue\":147972941.07857507300000000000}}}"; - WsMessage resp = mapper.readValue( - data, new TypeReference>() {}); + "{\\\"topic\\\":\\\"/market/snapshot:BTC-USDT\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"trade.snapshot\\\",\\\"data\\\":{\\\"sequence\\\":\\\"14691517895\\\",\\\"data\\\":{\\\"askSize\\\":1.15955795,\\\"averagePrice\\\":66867.89967612,\\\"baseCurrency\\\":\\\"BTC\\\",\\\"bidSize\\\":0.81772627,\\\"board\\\":1,\\\"buy\\\":67158.1,\\\"changePrice\\\":315.20000000000000000000,\\\"changeRate\\\":0.0047,\\\"close\\\":67158.1,\\\"datetime\\\":1729758286011,\\\"high\\\":67611.80000000000000000000,\\\"lastTradedPrice\\\":67158.1,\\\"low\\\":65257.10000000000000000000,\\\"makerCoefficient\\\":1.000000,\\\"makerFeeRate\\\":0.001,\\\"marginTrade\\\":true,\\\"mark\\\":0,\\\"market\\\":\\\"USDS\\\",\\\"marketChange1h\\\":{\\\"changePrice\\\":-102.10000000000000000000,\\\"changeRate\\\":-0.0015,\\\"high\\\":67310.60000000000000000000,\\\"low\\\":67051.80000000000000000000,\\\"open\\\":67260.20000000000000000000,\\\"vol\\\":53.73698081000000000000,\\\"volValue\\\":3609965.13819127700000000000},\\\"marketChange24h\\\":{\\\"changePrice\\\":315.20000000000000000000,\\\"changeRate\\\":0.0047,\\\"high\\\":67611.80000000000000000000,\\\"low\\\":65257.10000000000000000000,\\\"open\\\":66842.90000000000000000000,\\\"vol\\\":2227.69895852000000000000,\\\"volValue\\\":147972941.07857507300000000000},\\\"marketChange4h\\\":{\\\"changePrice\\\":-166.30000000000000000000,\\\"changeRate\\\":-0.0024,\\\"high\\\":67476.60000000000000000000,\\\"low\\\":67051.80000000000000000000,\\\"open\\\":67324.40000000000000000000,\\\"vol\\\":173.76971188000000000000,\\\"volValue\\\":11695949.43841656500000000000},\\\"markets\\\":[\\\"USDS\\\",\\\"PoW\\\"],\\\"open\\\":66842.90000000000000000000,\\\"quoteCurrency\\\":\\\"USDT\\\",\\\"sell\\\":67158.2,\\\"siteTypes\\\":[\\\"turkey\\\",\\\"thailand\\\",\\\"global\\\"],\\\"sort\\\":100,\\\"symbol\\\":\\\"BTC-USDT\\\",\\\"symbolCode\\\":\\\"BTC-USDT\\\",\\\"takerCoefficient\\\":1.000000,\\\"takerFeeRate\\\":0.001,\\\"trading\\\":true,\\\"vol\\\":2227.69895852000000000000,\\\"volValue\\\":147972941.07857507300000000000}}}"; + WsMessage resp = + mapper.readValue(data, new TypeReference>() {}); } - /** - * ticker - * Get Ticker - * /ticker/market/ticker:_symbol_,_symbol_ - */ + + /** ticker Get Ticker /ticker/market/ticker:_symbol_,_symbol_ */ public static void testTickerResponse() throws Exception { String data = - "{\"type\":\"message\",\"topic\":\"/market/ticker:BTC-USDT\",\"subject\":\"trade.ticker\",\"data\":{\"sequence\":\"1545896668986\",\"price\":\"0.08\",\"size\":\"0.011\",\"bestAsk\":\"0.08\",\"bestAskSize\":\"0.18\",\"bestBid\":\"0.049\",\"bestBidSize\":\"0.036\",\"Time\":1704873323416}}"; + "{\\\"type\\\":\\\"message\\\",\\\"topic\\\":\\\"/market/ticker:BTC-USDT\\\",\\\"subject\\\":\\\"trade.ticker\\\",\\\"data\\\":{\\\"sequence\\\":\\\"1545896668986\\\",\\\"price\\\":\\\"0.08\\\",\\\"size\\\":\\\"0.011\\\",\\\"bestAsk\\\":\\\"0.08\\\",\\\"bestAskSize\\\":\\\"0.18\\\",\\\"bestBid\\\":\\\"0.049\\\",\\\"bestBidSize\\\":\\\"0.036\\\",\\\"Time\\\":1704873323416}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } - /** - * trade - * Trade - * /trade/market/match:_symbol_,_symbol_ - */ + + /** trade Trade /trade/market/match:_symbol_,_symbol_ */ public static void testTradeResponse() throws Exception { String data = - "{\"topic\":\"/market/match:BTC-USDT\",\"type\":\"message\",\"subject\":\"trade.l3match\",\"data\":{\"makerOrderId\":\"671b5007389355000701b1d3\",\"price\":\"67523\",\"sequence\":\"11067996711960577\",\"side\":\"buy\",\"size\":\"0.003\",\"symbol\":\"BTC-USDT\",\"takerOrderId\":\"671b50161777ff00074c168d\",\"time\":\"1729843222921000000\",\"tradeId\":\"11067996711960577\",\"type\":\"match\"}}"; + "{\\\"topic\\\":\\\"/market/match:BTC-USDT\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"trade.l3match\\\",\\\"data\\\":{\\\"makerOrderId\\\":\\\"671b5007389355000701b1d3\\\",\\\"price\\\":\\\"67523\\\",\\\"sequence\\\":\\\"11067996711960577\\\",\\\"side\\\":\\\"buy\\\",\\\"size\\\":\\\"0.003\\\",\\\"symbol\\\":\\\"BTC-USDT\\\",\\\"takerOrderId\\\":\\\"671b50161777ff00074c168d\\\",\\\"time\\\":\\\"1729843222921000000\\\",\\\"tradeId\\\":\\\"11067996711960577\\\",\\\"type\\\":\\\"match\\\"}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } public static void runAllTests() { - run(SpotPublicWsAutoGeneratedTest::testAllTickersResponse, - "testAllTickersResponse"); - run(SpotPublicWsAutoGeneratedTest::testCallAuctionInfoResponse, - "testCallAuctionInfoResponse"); - run(SpotPublicWsAutoGeneratedTest::testCallAuctionOrderbookLevel50Response, + run(SpotPublicWsAutoGeneratedTest::testAllTickersResponse, "testAllTickersResponse"); + run(SpotPublicWsAutoGeneratedTest::testCallAuctionInfoResponse, "testCallAuctionInfoResponse"); + run( + SpotPublicWsAutoGeneratedTest::testCallAuctionOrderbookLevel50Response, "testCallAuctionOrderbookLevel50Response"); - run(SpotPublicWsAutoGeneratedTest::testKlinesResponse, - "testKlinesResponse"); - run(SpotPublicWsAutoGeneratedTest::testMarketSnapshotResponse, - "testMarketSnapshotResponse"); - run(SpotPublicWsAutoGeneratedTest::testOrderbookIncrementResponse, + run(SpotPublicWsAutoGeneratedTest::testKlinesResponse, "testKlinesResponse"); + run(SpotPublicWsAutoGeneratedTest::testMarketSnapshotResponse, "testMarketSnapshotResponse"); + run( + SpotPublicWsAutoGeneratedTest::testOrderbookIncrementResponse, "testOrderbookIncrementResponse"); - run(SpotPublicWsAutoGeneratedTest::testOrderbookLevel1Response, - "testOrderbookLevel1Response"); - run(SpotPublicWsAutoGeneratedTest::testOrderbookLevel50Response, + run(SpotPublicWsAutoGeneratedTest::testOrderbookLevel1Response, "testOrderbookLevel1Response"); + run( + SpotPublicWsAutoGeneratedTest::testOrderbookLevel50Response, "testOrderbookLevel50Response"); - run(SpotPublicWsAutoGeneratedTest::testOrderbookLevel5Response, - "testOrderbookLevel5Response"); - run(SpotPublicWsAutoGeneratedTest::testSymbolSnapshotResponse, - "testSymbolSnapshotResponse"); - run(SpotPublicWsAutoGeneratedTest::testTickerResponse, - "testTickerResponse"); + run(SpotPublicWsAutoGeneratedTest::testOrderbookLevel5Response, "testOrderbookLevel5Response"); + run(SpotPublicWsAutoGeneratedTest::testSymbolSnapshotResponse, "testSymbolSnapshotResponse"); + run(SpotPublicWsAutoGeneratedTest::testTickerResponse, "testTickerResponse"); run(SpotPublicWsAutoGeneratedTest::testTradeResponse, "testTradeResponse"); } @@ -205,4 +173,4 @@ public static void finish() { System.out.println("\nAll tests passed."); } } -} \ No newline at end of file +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsImpl.java index 68428077..5e8cc4f3 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsImpl.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsImpl.java @@ -1,6 +1,7 @@ // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. package com.kucoin.universal.sdk.generate.spot.spotpublic; + import com.kucoin.universal.sdk.internal.interfaces.WebSocketService; public class SpotPublicWsImpl implements SpotPublicWs { @@ -20,8 +21,7 @@ public String allTickers(AllTickersEvent.Callback callback) { topicPrefix, args, AllTickersEvent.CallbackAdapters.of(callback)); } - public String callAuctionInfo(String symbol, - CallAuctionInfoEvent.Callback callback) { + public String callAuctionInfo(String symbol, CallAuctionInfoEvent.Callback callback) { String topicPrefix = "/callauction/callauctionData"; String[] args = {symbol}; @@ -37,22 +37,18 @@ public String callAuctionOrderbookLevel50( String[] args = {symbol}; return this.wsService.subscribe( - topicPrefix, args, - CallAuctionOrderbookLevel50Event.CallbackAdapters.of(callback)); + topicPrefix, args, CallAuctionOrderbookLevel50Event.CallbackAdapters.of(callback)); } - public String klines(String symbol, String type, - KlinesEvent.Callback callback) { + public String klines(String symbol, String type, KlinesEvent.Callback callback) { String topicPrefix = "/market/candles"; String[] args = {String.join("_", symbol, type)}; - return this.wsService.subscribe(topicPrefix, args, - KlinesEvent.CallbackAdapters.of(callback)); + return this.wsService.subscribe(topicPrefix, args, KlinesEvent.CallbackAdapters.of(callback)); } - public String marketSnapshot(String market, - MarketSnapshotEvent.Callback callback) { + public String marketSnapshot(String market, MarketSnapshotEvent.Callback callback) { String topicPrefix = "/market/snapshot"; String[] args = {market}; @@ -61,19 +57,16 @@ public String marketSnapshot(String market, topicPrefix, args, MarketSnapshotEvent.CallbackAdapters.of(callback)); } - public String orderbookIncrement(String[] symbol, - OrderbookIncrementEvent.Callback callback) { + public String orderbookIncrement(String[] symbol, OrderbookIncrementEvent.Callback callback) { String topicPrefix = "/market/level2"; String[] args = symbol; return this.wsService.subscribe( - topicPrefix, args, - OrderbookIncrementEvent.CallbackAdapters.of(callback)); + topicPrefix, args, OrderbookIncrementEvent.CallbackAdapters.of(callback)); } - public String orderbookLevel1(String[] symbol, - OrderbookLevel1Event.Callback callback) { + public String orderbookLevel1(String[] symbol, OrderbookLevel1Event.Callback callback) { String topicPrefix = "/spotMarket/level1"; String[] args = symbol; @@ -82,8 +75,7 @@ public String orderbookLevel1(String[] symbol, topicPrefix, args, OrderbookLevel1Event.CallbackAdapters.of(callback)); } - public String orderbookLevel50(String[] symbol, - OrderbookLevel50Event.Callback callback) { + public String orderbookLevel50(String[] symbol, OrderbookLevel50Event.Callback callback) { String topicPrefix = "/spotMarket/level2Depth50"; String[] args = symbol; @@ -92,8 +84,7 @@ public String orderbookLevel50(String[] symbol, topicPrefix, args, OrderbookLevel50Event.CallbackAdapters.of(callback)); } - public String orderbookLevel5(String[] symbol, - OrderbookLevel5Event.Callback callback) { + public String orderbookLevel5(String[] symbol, OrderbookLevel5Event.Callback callback) { String topicPrefix = "/spotMarket/level2Depth5"; String[] args = symbol; @@ -102,8 +93,7 @@ public String orderbookLevel5(String[] symbol, topicPrefix, args, OrderbookLevel5Event.CallbackAdapters.of(callback)); } - public String symbolSnapshot(String symbol, - SymbolSnapshotEvent.Callback callback) { + public String symbolSnapshot(String symbol, SymbolSnapshotEvent.Callback callback) { String topicPrefix = "/market/snapshot"; String[] args = {symbol}; @@ -117,8 +107,7 @@ public String ticker(String[] symbol, TickerEvent.Callback callback) { String[] args = symbol; - return this.wsService.subscribe(topicPrefix, args, - TickerEvent.CallbackAdapters.of(callback)); + return this.wsService.subscribe(topicPrefix, args, TickerEvent.CallbackAdapters.of(callback)); } public String trade(String[] symbol, TradeEvent.Callback callback) { @@ -126,13 +115,18 @@ public String trade(String[] symbol, TradeEvent.Callback callback) { String[] args = symbol; - return this.wsService.subscribe(topicPrefix, args, - TradeEvent.CallbackAdapters.of(callback)); + return this.wsService.subscribe(topicPrefix, args, TradeEvent.CallbackAdapters.of(callback)); } - public void unSubscribe(String id) { this.wsService.unsubscribe(id); } + public void unSubscribe(String id) { + this.wsService.unsubscribe(id); + } - public void start() { this.wsService.start(); } + public void start() { + this.wsService.start(); + } - public void stop() { this.wsService.stop(); } -} \ No newline at end of file + public void stop() { + this.wsService.stop(); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotData.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotData.java index b7c7d609..8311ffc6 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotData.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotData.java @@ -17,159 +17,153 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) class SymbolSnapshotData { - /** - * - */ - @JsonProperty("askSize") private Double askSize; - /** - * - */ - @JsonProperty("averagePrice") private Double averagePrice; - /** - * - */ - @JsonProperty("baseCurrency") private String baseCurrency; - /** - * - */ - @JsonProperty("bidSize") private Double bidSize; - /** - * Trading pair partition: 0. Primary partition 1.KuCoin Plus\", example = - * \"1\" - */ - @JsonProperty("board") private BoardEnum board; - /** - * - */ - @JsonProperty("buy") private Double buy; - /** - * - */ - @JsonProperty("changePrice") private Double changePrice; - /** - * - */ - @JsonProperty("changeRate") private Double changeRate; - /** - * - */ - @JsonProperty("close") private Double close; - /** - * - */ - @JsonProperty("datetime") private Long datetime; - /** - * - */ - @JsonProperty("high") private Double high; - /** - * - */ - @JsonProperty("lastTradedPrice") private Double lastTradedPrice; - /** - * - */ - @JsonProperty("low") private Double low; - /** - * - */ - @JsonProperty("makerCoefficient") private Double makerCoefficient; - /** - * - */ - @JsonProperty("makerFeeRate") private Double makerFeeRate; - /** - * - */ - @JsonProperty("marginTrade") private Boolean marginTrade; - /** - * Trading Pair Mark: 0. Default 1.ST. 2.NEW\", example = \"1\" - */ - @JsonProperty("mark") private MarkEnum mark; - /** - * - */ - @JsonProperty("market") private String market; - /** - * - */ + /** */ + @JsonProperty("askSize") + private Double askSize; + + /** */ + @JsonProperty("averagePrice") + private Double averagePrice; + + /** */ + @JsonProperty("baseCurrency") + private String baseCurrency; + + /** */ + @JsonProperty("bidSize") + private Double bidSize; + + /** Trading pair partition: 0. Primary partition 1.KuCoin Plus\", example = \"1\" */ + @JsonProperty("board") + private BoardEnum board; + + /** */ + @JsonProperty("buy") + private Double buy; + + /** */ + @JsonProperty("changePrice") + private Double changePrice; + + /** */ + @JsonProperty("changeRate") + private Double changeRate; + + /** */ + @JsonProperty("close") + private Double close; + + /** */ + @JsonProperty("datetime") + private Long datetime; + + /** */ + @JsonProperty("high") + private Double high; + + /** */ + @JsonProperty("lastTradedPrice") + private Double lastTradedPrice; + + /** */ + @JsonProperty("low") + private Double low; + + /** */ + @JsonProperty("makerCoefficient") + private Double makerCoefficient; + + /** */ + @JsonProperty("makerFeeRate") + private Double makerFeeRate; + + /** */ + @JsonProperty("marginTrade") + private Boolean marginTrade; + + /** Trading Pair Mark: 0. Default 1.ST. 2.NEW\", example = \"1\" */ + @JsonProperty("mark") + private MarkEnum mark; + + /** */ + @JsonProperty("market") + private String market; + + /** */ @JsonProperty("marketChange1h") private SymbolSnapshotDataMarketChange1h marketChange1h; - /** - * - */ + + /** */ @JsonProperty("marketChange24h") private SymbolSnapshotDataMarketChange24h marketChange24h; - /** - * - */ + + /** */ @JsonProperty("marketChange4h") private SymbolSnapshotDataMarketChange4h marketChange4h; - /** - * - */ - @JsonProperty("markets") private List markets = new ArrayList<>(); - /** - * - */ - @JsonProperty("open") private Double open; - /** - * - */ - @JsonProperty("quoteCurrency") private String quoteCurrency; - /** - * - */ - @JsonProperty("sell") private Double sell; - /** - * - */ - @JsonProperty("siteTypes") private List siteTypes = new ArrayList<>(); - /** - * sorting number(Pointless) - */ - @JsonProperty("sort") private Integer sort; - /** - * - */ - @JsonProperty("symbol") private String symbol; - /** - * - */ - @JsonProperty("symbolCode") private String symbolCode; - /** - * - */ - @JsonProperty("takerCoefficient") private Double takerCoefficient; - /** - * - */ - @JsonProperty("takerFeeRate") private Double takerFeeRate; - /** - * - */ - @JsonProperty("trading") private Boolean trading; - /** - * - */ - @JsonProperty("vol") private Double vol; - /** - * 24-hour rolling transaction volume, refreshed every 2s - */ - @JsonProperty("volValue") private Double volValue; + + /** */ + @JsonProperty("markets") + private List markets = new ArrayList<>(); + + /** */ + @JsonProperty("open") + private Double open; + + /** */ + @JsonProperty("quoteCurrency") + private String quoteCurrency; + + /** */ + @JsonProperty("sell") + private Double sell; + + /** */ + @JsonProperty("siteTypes") + private List siteTypes = new ArrayList<>(); + + /** sorting number(Pointless) */ + @JsonProperty("sort") + private Integer sort; + + /** */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("symbolCode") + private String symbolCode; + + /** */ + @JsonProperty("takerCoefficient") + private Double takerCoefficient; + + /** */ + @JsonProperty("takerFeeRate") + private Double takerFeeRate; + + /** */ + @JsonProperty("trading") + private Boolean trading; + + /** */ + @JsonProperty("vol") + private Double vol; + + /** 24-hour rolling transaction volume, refreshed every 2s */ + @JsonProperty("volValue") + private Double volValue; + public enum BoardEnum { - /** - * primary partition - */ + /** primary partition */ _0(0), - /** - * KuCoin Plus - */ + /** KuCoin Plus */ _1(1); private final Integer value; - BoardEnum(Integer value) { this.value = value; } + BoardEnum(Integer value) { + this.value = value; + } @JsonValue public Integer getValue() { @@ -191,23 +185,20 @@ public static BoardEnum fromValue(Integer value) { throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } + public enum MarkEnum { - /** - * default - */ + /** default */ _0(0), - /** - * ST - */ + /** ST */ _1(1), - /** - * NEW - */ + /** NEW */ _2(2); private final Integer value; - MarkEnum(Integer value) { this.value = value; } + MarkEnum(Integer value) { + this.value = value; + } @JsonValue public Integer getValue() { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange1h.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange1h.java index 9a02c2a9..5f3b1ef0 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange1h.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange1h.java @@ -13,32 +13,31 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) class SymbolSnapshotDataMarketChange1h { - /** - * - */ - @JsonProperty("changePrice") private Double changePrice; - /** - * - */ - @JsonProperty("changeRate") private Double changeRate; - /** - * - */ - @JsonProperty("high") private Double high; - /** - * - */ - @JsonProperty("low") private Double low; - /** - * - */ - @JsonProperty("open") private Double open; - /** - * - */ - @JsonProperty("vol") private Double vol; - /** - * - */ - @JsonProperty("volValue") private Double volValue; + /** */ + @JsonProperty("changePrice") + private Double changePrice; + + /** */ + @JsonProperty("changeRate") + private Double changeRate; + + /** */ + @JsonProperty("high") + private Double high; + + /** */ + @JsonProperty("low") + private Double low; + + /** */ + @JsonProperty("open") + private Double open; + + /** */ + @JsonProperty("vol") + private Double vol; + + /** */ + @JsonProperty("volValue") + private Double volValue; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange24h.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange24h.java index ba52d025..0da197c6 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange24h.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange24h.java @@ -13,32 +13,31 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) class SymbolSnapshotDataMarketChange24h { - /** - * - */ - @JsonProperty("changePrice") private Double changePrice; - /** - * - */ - @JsonProperty("changeRate") private Double changeRate; - /** - * - */ - @JsonProperty("high") private Double high; - /** - * - */ - @JsonProperty("low") private Double low; - /** - * - */ - @JsonProperty("open") private Double open; - /** - * - */ - @JsonProperty("vol") private Double vol; - /** - * - */ - @JsonProperty("volValue") private Double volValue; + /** */ + @JsonProperty("changePrice") + private Double changePrice; + + /** */ + @JsonProperty("changeRate") + private Double changeRate; + + /** */ + @JsonProperty("high") + private Double high; + + /** */ + @JsonProperty("low") + private Double low; + + /** */ + @JsonProperty("open") + private Double open; + + /** */ + @JsonProperty("vol") + private Double vol; + + /** */ + @JsonProperty("volValue") + private Double volValue; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange4h.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange4h.java index 99d4f52b..6d379507 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange4h.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotDataMarketChange4h.java @@ -13,32 +13,31 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) class SymbolSnapshotDataMarketChange4h { - /** - * - */ - @JsonProperty("changePrice") private Double changePrice; - /** - * - */ - @JsonProperty("changeRate") private Double changeRate; - /** - * - */ - @JsonProperty("high") private Double high; - /** - * - */ - @JsonProperty("low") private Double low; - /** - * - */ - @JsonProperty("open") private Double open; - /** - * - */ - @JsonProperty("vol") private Double vol; - /** - * - */ - @JsonProperty("volValue") private Double volValue; + /** */ + @JsonProperty("changePrice") + private Double changePrice; + + /** */ + @JsonProperty("changeRate") + private Double changeRate; + + /** */ + @JsonProperty("high") + private Double high; + + /** */ + @JsonProperty("low") + private Double low; + + /** */ + @JsonProperty("open") + private Double open; + + /** */ + @JsonProperty("vol") + private Double vol; + + /** */ + @JsonProperty("volValue") + private Double volValue; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java index 8614de70..18e75a9e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java @@ -18,17 +18,15 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SymbolSnapshotEvent implements Response> { - /** - * - */ - @JsonProperty("sequence") private String sequence; - /** - * - */ - @JsonProperty("data") private SymbolSnapshotData data; - /** - * common response - */ + /** */ + @JsonProperty("sequence") + private String sequence; + + /** */ + @JsonProperty("data") + private SymbolSnapshotData data; + + /** common response */ @JsonIgnore private WsMessage commonResponse; @Override @@ -42,10 +40,8 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback - of(Callback callback) { - return msg - -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + public static WebSocketMessageCallback of(Callback callback) { + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java index 6ceddf13..47264ea5 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java @@ -16,43 +16,40 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class TickerEvent - implements Response> { - /** - * Sequence number - */ - @JsonProperty("sequence") private String sequence; - /** - * Last traded price - */ - @JsonProperty("price") private String price; - /** - * Last traded amount - */ - @JsonProperty("size") private String size; - /** - * Best ask price - */ - @JsonProperty("bestAsk") private String bestAsk; - /** - * Best ask size - */ - @JsonProperty("bestAskSize") private String bestAskSize; - /** - * Best bid price - */ - @JsonProperty("bestBid") private String bestBid; - /** - * Best bid size - */ - @JsonProperty("bestBidSize") private String bestBidSize; - /** - * The matching time of the latest transaction - */ - @JsonProperty("time") private Long time; - /** - * common response - */ +public class TickerEvent implements Response> { + /** Sequence number */ + @JsonProperty("sequence") + private String sequence; + + /** Last traded price */ + @JsonProperty("price") + private String price; + + /** Last traded amount */ + @JsonProperty("size") + private String size; + + /** Best ask price */ + @JsonProperty("bestAsk") + private String bestAsk; + + /** Best ask size */ + @JsonProperty("bestAskSize") + private String bestAskSize; + + /** Best bid price */ + @JsonProperty("bestBid") + private String bestBid; + + /** Best bid size */ + @JsonProperty("bestBidSize") + private String bestBidSize; + + /** The matching time of the latest transaction */ + @JsonProperty("time") + private Long time; + + /** common response */ @JsonIgnore private WsMessage commonResponse; @Override @@ -67,8 +64,7 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg - -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java index f170ba31..0248d926 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java @@ -17,49 +17,47 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class TradeEvent implements Response> { - /** - * - */ - @JsonProperty("makerOrderId") private String makerOrderId; - /** - * - */ - @JsonProperty("price") private String price; - /** - * - */ - @JsonProperty("sequence") private String sequence; - /** - * - */ - @JsonProperty("side") private String side; - /** - * - */ - @JsonProperty("size") private String size; - /** - * - */ - @JsonProperty("symbol") private String symbol; - /** - * - */ - @JsonProperty("takerOrderId") private String takerOrderId; - /** - * - */ - @JsonProperty("time") private String time; - /** - * - */ - @JsonProperty("tradeId") private String tradeId; - /** - * - */ - @JsonProperty("type") private String type; - /** - * common response - */ + /** */ + @JsonProperty("makerOrderId") + private String makerOrderId; + + /** */ + @JsonProperty("price") + private String price; + + /** */ + @JsonProperty("sequence") + private String sequence; + + /** */ + @JsonProperty("side") + private String side; + + /** */ + @JsonProperty("size") + private String size; + + /** */ + @JsonProperty("symbol") + private String symbol; + + /** */ + @JsonProperty("takerOrderId") + private String takerOrderId; + + /** */ + @JsonProperty("time") + private String time; + + /** */ + @JsonProperty("tradeId") + private String tradeId; + + /** */ + @JsonProperty("type") + private String type; + + /** common response */ @JsonIgnore private WsMessage commonResponse; @Override @@ -74,8 +72,7 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg - -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.java index 18c2215d..abc68bf1 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.java @@ -2,7 +2,7 @@ package com.kucoin.universal.sdk.generate.viplending.viplending; -public interface VipLendingApi { +public interface VIPLendingApi { /** * Get Discount Rate Configs Get the gradient discount rate of each currency docs +-----------------------+---------+ diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiAutoGeneratedTest.java index 244f9931..e4cb07ed 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiAutoGeneratedTest.java @@ -6,7 +6,7 @@ import java.util.ArrayList; import java.util.List; -class VipLendingApiAutoGeneratedTest { +class VIPLendingApiAutoGeneratedTest { public static ObjectMapper mapper = new ObjectMapper(); private static final List failedTests = new ArrayList<>(); @@ -24,40 +24,40 @@ public static void testGetDiscountRateConfigsRequest() throws Exception { */ public static void testGetDiscountRateConfigsResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -71,31 +71,31 @@ public static void testGetLoanInfoRequest() throws Exception { /** getLoanInfo Response Get Loan Info /api/v1/otc-loan/loan */ public static void testGetLoanInfoResponse() throws Exception { String 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" + "{\\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -109,17 +109,17 @@ public static void testGetAccountsRequest() throws Exception { /** getAccounts Response Get Accounts /api/v1/otc-loan/accounts */ public static void testGetAccountsResponse() throws Exception { String data = - "\n" - + "{\n" - + " \"code\": \"200000\",\n" - + " \"data\": [{\n" - + " \"uid\": \"1260004199\",\n" - + " \"marginCcy\": \"USDT\",\n" - + " \"marginQty\": \"900\",\n" - + " \"marginFactor\": \"0.9000000000\",\n" - + " \"accountType\": \"TRADE\",\n" - + " \"isParent\": true\n" - + " }]\n" + "\\n" + + "{\\n" + + " \\\"code\\\": \\\"200000\\\",\\n" + + " \\\"data\\\": [{\\n" + + " \\\"uid\\\": \\\"1260004199\\\",\\n" + + " \\\"marginCcy\\\": \\\"USDT\\\",\\n" + + " \\\"marginQty\\\": \\\"900\\\",\\n" + + " \\\"marginFactor\\\": \\\"0.9000000000\\\",\\n" + + " \\\"accountType\\\": \\\"TRADE\\\",\\n" + + " \\\"isParent\\\": true\\n" + + " }]\\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -127,15 +127,15 @@ public static void testGetAccountsResponse() throws Exception { public static void runAllTests() { run( - VipLendingApiAutoGeneratedTest::testGetDiscountRateConfigsRequest, + VIPLendingApiAutoGeneratedTest::testGetDiscountRateConfigsRequest, "testGetDiscountRateConfigsRequest"); run( - VipLendingApiAutoGeneratedTest::testGetDiscountRateConfigsResponse, + VIPLendingApiAutoGeneratedTest::testGetDiscountRateConfigsResponse, "testGetDiscountRateConfigsResponse"); - run(VipLendingApiAutoGeneratedTest::testGetLoanInfoRequest, "testGetLoanInfoRequest"); - run(VipLendingApiAutoGeneratedTest::testGetLoanInfoResponse, "testGetLoanInfoResponse"); - run(VipLendingApiAutoGeneratedTest::testGetAccountsRequest, "testGetAccountsRequest"); - run(VipLendingApiAutoGeneratedTest::testGetAccountsResponse, "testGetAccountsResponse"); + run(VIPLendingApiAutoGeneratedTest::testGetLoanInfoRequest, "testGetLoanInfoRequest"); + run(VIPLendingApiAutoGeneratedTest::testGetLoanInfoResponse, "testGetLoanInfoResponse"); + run(VIPLendingApiAutoGeneratedTest::testGetAccountsRequest, "testGetAccountsRequest"); + run(VIPLendingApiAutoGeneratedTest::testGetAccountsResponse, "testGetAccountsResponse"); } private static void run(TestCase test, String name) { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiImpl.java index 5b0220d4..b9fa9f92 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiImpl.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiImpl.java @@ -4,10 +4,10 @@ import com.kucoin.universal.sdk.internal.interfaces.Transport; -public class VipLendingApiImpl implements VipLendingApi { +public class VIPLendingApiImpl implements VIPLendingApi { private final Transport transport; - public VipLendingApiImpl(Transport transport) { + public VIPLendingApiImpl(Transport transport) { this.transport = transport; } From 12e39d5183d3f6c6b891f23c8700596e4fe461d0 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Fri, 4 Jul 2025 09:54:44 +0800 Subject: [PATCH 09/39] feat(api): fix models --- Makefile | 5 +- .../sdk/plugin/SdkGeneratorTest.java | 2 +- sdk/java/Makefile | 2 +- .../spot/market/GetFiatPriceResp.java | 3598 +---------------- .../generate/spot/market/MarketApi.template | 897 +--- .../market/MarketApiAutoGeneratedTest.java | 7 +- spec/original/meta.json | 3592 +--------------- spec/rest/api/openapi-spot-market.json | 3592 +--------------- spec/rest/entry/openapi-spot.json | 3592 +--------------- 9 files changed, 37 insertions(+), 15250 deletions(-) diff --git a/Makefile b/Makefile index 69b5bd28..8f978372 100644 --- a/Makefile +++ b/Makefile @@ -68,14 +68,15 @@ define generate-code @echo "$(GREEN)lang: ${lang}, copy changelog...$(NC)" docker run --rm -v "${PWD}:/local" $(IMAGE_NAME):$(IMAGE_TAG) cp /local/CHANGELOG.md /local/sdk/$(lang) - @make -f generate.mk generate lang=$(1) subdir=$(2) USER_VERSION=$(3) + @$(MAKE) -f generate.mk generate lang=$(1) subdir=$(2) USER_VERSION=$(3) @echo "$(GREEN)lang: $(lang), clean...$(NC)" docker run --rm -v "${PWD}:/local" $(IMAGE_NAME):$(IMAGE_TAG) rm -rf $(outdir)/.openapi-generator docker run --rm -v "${PWD}:/local" $(IMAGE_NAME):$(IMAGE_TAG) rm -rf $(outdir)/.openapi-generator-ignore @echo "$(GREEN)lang: $(lang), format project...$(NC)" - sh -c "cd sdk/$(lang) && make format" + @sleep 5 + @$(MAKE) -C sdk/$(lang) format @echo "$(GREEN)lang: $(lang), done!$(NC)" endef diff --git a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java index 572876c7..2107567b 100644 --- a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java +++ b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java @@ -8,7 +8,7 @@ public class SdkGeneratorTest { private static final String SDK_NAME = "java-sdk"; - private static final String SPEC_NAME = "../../spec/rest/api/openapi-futures-market.json"; + private static final String SPEC_NAME = "../../spec/rest/api/openapi-spot-market.json"; private static final String SPEC_ENTRY_NAME = "../../spec/rest/entry/openapi-broker.json"; private static final String WS_SPEC_NAME = "../../spec/ws/openapi-spot-public.json"; private static final String OUTPUT_DIR = "../../sdk/java/src/main/java/com/kucoin/universal/sdk/generate"; diff --git a/sdk/java/Makefile b/sdk/java/Makefile index 4848be77..cb035b7a 100644 --- a/sdk/java/Makefile +++ b/sdk/java/Makefile @@ -6,7 +6,7 @@ build: .PHONY: format format: - docker run --rm -v "${PWD}:/local" -v m2-cache:/root/.m2 maven:3.9.10-amazoncorretto-17-debian-bookworm sh -c "cd /local && mvn spotless:apply" + docker run --rm -v ".:/local" -v m2-cache:/root/.m2 maven:3.9.10-amazoncorretto-17-debian-bookworm sh -c "cd /local && mvn spotless:apply -Dspotless.drop=true" .PHONY: auto-test auto-test: build diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceResp.java index f22ef47e..1b10a095 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceResp.java @@ -2,3603 +2,27 @@ package com.kucoin.universal.sdk.generate.spot.market; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; +import java.util.HashMap; +import java.util.Map; +import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -// @AllArgsConstructor(access = AccessLevel.PRIVATE) +@AllArgsConstructor @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class GetFiatPriceResp implements Response> { /** */ - @JsonProperty("AGLD") - private String AGLD; - - /** */ - @JsonProperty("DFI") - private String DFI; - - /** */ - @JsonProperty("PYTHUP") - private String PYTHUP; - - /** */ - @JsonProperty("ISLM") - private String ISLM; - - /** */ - @JsonProperty("NEAR") - private String NEAR; - - /** */ - @JsonProperty("AIOZ") - private String AIOZ; - - /** */ - @JsonProperty("AUDIO") - private String AUDIO; - - /** */ - @JsonProperty("BBL") - private String BBL; - - /** */ - @JsonProperty("WLD") - private String WLD; - - /** */ - @JsonProperty("HNT") - private String HNT; - - /** */ - @JsonProperty("ETHFI") - private String ETHFI; - - /** */ - @JsonProperty("DMAIL") - private String DMAIL; - - /** */ - @JsonProperty("OPUP") - private String OPUP; - - /** */ - @JsonProperty("VET3S") - private String VET3S; - - /** */ - @JsonProperty("MANA3S") - private String MANA3S; - - /** */ - @JsonProperty("TIDAL") - private String TIDAL; - - /** */ - @JsonProperty("HALO") - private String HALO; - - /** */ - @JsonProperty("OPUL") - private String OPUL; - - /** */ - @JsonProperty("MANA3L") - private String MANA3L; - - /** */ - @JsonProperty("DGB") - private String DGB; - - /** */ - @JsonProperty("AA") - private String AA; - - /** */ - @JsonProperty("BCH") - private String BCH; - - /** */ - @JsonProperty("GMEE") - private String GMEE; - - /** */ - @JsonProperty("JST") - private String JST; - - /** */ - @JsonProperty("PBUX") - private String PBUX; - - /** */ - @JsonProperty("AR") - private String AR; - - /** */ - @JsonProperty("SEI") - private String SEI; - - /** */ - @JsonProperty("PSTAKE") - private String PSTAKE; - - /** */ - @JsonProperty("LMWR") - private String LMWR; - - /** */ - @JsonProperty("UNFIDOWN") - private String UNFIDOWN; - - /** */ - @JsonProperty("BB") - private String BB; - - /** */ - @JsonProperty("JTO") - private String JTO; - - /** */ - @JsonProperty("WEMIX") - private String WEMIX; - - /** */ - @JsonProperty("G") - private String G; - - /** */ - @JsonProperty("MARSH") - private String MARSH; - - /** */ - @JsonProperty("BN") - private String BN; - - /** */ - @JsonProperty("FLIP") - private String FLIP; - - /** */ - @JsonProperty("FLR") - private String FLR; - - /** */ - @JsonProperty("BIGTIME") - private String BIGTIME; - - /** */ - @JsonProperty("FLY") - private String FLY; - - /** */ - @JsonProperty("T") - private String T; - - /** */ - @JsonProperty("W") - private String W; - - /** */ - @JsonProperty("BDX") - private String BDX; - - /** */ - @JsonProperty("BABYDOGE") - private String BABYDOGE; - - /** */ - @JsonProperty("SFP") - private String SFP; - - /** */ - @JsonProperty("DIA") - private String DIA; - - /** */ - @JsonProperty("ISME") - private String ISME; - - /** */ - @JsonProperty("LYM") - private String LYM; - - /** */ - @JsonProperty("VET3L") - private String VET3L; - - /** */ - @JsonProperty("JUP") - private String JUP; - - /** */ - @JsonProperty("LYX") - private String LYX; - - /** */ - @JsonProperty("AIEPK") - private String AIEPK; - - /** */ - @JsonProperty("SILLY") - private String SILLY; - - /** */ - @JsonProperty("SCPT") - private String SCPT; - - /** */ - @JsonProperty("WOO") - private String WOO; - - /** */ - @JsonProperty("BLUR") - private String BLUR; - - /** */ - @JsonProperty("STRK") - private String STRK; - - /** */ - @JsonProperty("BFC") - private String BFC; - - /** */ - @JsonProperty("DC") - private String DC; - - /** */ - @JsonProperty("KARATE") - private String KARATE; - - /** */ - @JsonProperty("SUSHI3L") - private String SUSHI3L; - - /** */ - @JsonProperty("NETVR") - private String NETVR; - - /** */ - @JsonProperty("WAVES") - private String WAVES; - - /** */ - @JsonProperty("LITH") - private String LITH; - - /** */ - @JsonProperty("HAPI") - private String HAPI; - - /** */ - @JsonProperty("SUSHI3S") - private String SUSHI3S; - - /** */ - @JsonProperty("CEEK") - private String CEEK; - - /** */ - @JsonProperty("FLOKI") - private String FLOKI; - - /** */ - @JsonProperty("SHR") - private String SHR; - - /** */ - @JsonProperty("SAND") - private String SAND; - - /** */ - @JsonProperty("TURT") - private String TURT; - - /** */ - @JsonProperty("UMA") - private String UMA; - - /** */ - @JsonProperty("BEPRO") - private String BEPRO; - - /** */ - @JsonProperty("SCRT") - private String SCRT; - - /** */ - @JsonProperty("TUSD") - private String TUSD; - - /** */ - @JsonProperty("COOKIE") - private String COOKIE; - - /** */ - @JsonProperty("LRDS") - private String LRDS; - - /** */ - @JsonProperty("SIN") - private String SIN; - - /** */ - @JsonProperty("OAS") - private String OAS; - - /** */ - @JsonProperty("ROOT") - private String ROOT; - - /** */ - @JsonProperty("ADA3L") - private String ADA3L; - - /** */ - @JsonProperty("TIAUP") - private String TIAUP; - - /** */ - @JsonProperty("HTR") - private String HTR; - - /** */ - @JsonProperty("UNB") - private String UNB; - - /** */ - @JsonProperty("UNA") - private String UNA; - - /** */ - @JsonProperty("HARD") - private String HARD; - - /** */ - @JsonProperty("G3") - private String G3; - - /** */ - @JsonProperty("ADA3S") - private String ADA3S; - - /** */ - @JsonProperty("MYRO") - private String MYRO; - - /** */ - @JsonProperty("HTX") - private String HTX; - - /** */ - @JsonProperty("FT") - private String FT; - - /** */ - @JsonProperty("BTCDOWN") - private String BTCDOWN; - - /** */ - @JsonProperty("UNI") - private String UNI; - - /** */ - @JsonProperty("FX") - private String FX; - - /** */ - @JsonProperty("OBI") - private String OBI; - - /** */ - @JsonProperty("UNO") - private String UNO; - - /** */ - @JsonProperty("WRX") - private String WRX; - - /** */ - @JsonProperty("TIADOWN") - private String TIADOWN; - - /** */ - @JsonProperty("ETHDOWN") - private String ETHDOWN; - - /** */ - @JsonProperty("WELL") - private String WELL; - - /** */ - @JsonProperty("SWFTC") - private String SWFTC; - - /** */ - @JsonProperty("SKL") - private String SKL; - - /** */ - @JsonProperty("UOS") - private String UOS; - - /** */ - @JsonProperty("AIPAD") - private String AIPAD; - - /** */ - @JsonProperty("BRETT") - private String BRETT; - - /** */ - @JsonProperty("SKY") - private String SKY; - - /** */ - @JsonProperty("FRM") - private String FRM; - - /** */ - @JsonProperty("VISION") - private String VISION; - - /** */ - @JsonProperty("LENDS") - private String LENDS; - - /** */ - @JsonProperty("SLF") - private String SLF; - - /** */ - @JsonProperty("BULL") - private String BULL; - - /** */ - @JsonProperty("FLOW") - private String FLOW; - - /** */ - @JsonProperty("ODDZ") - private String ODDZ; - - /** */ - @JsonProperty("SLN") - private String SLN; - - /** */ - @JsonProperty("UPO") - private String UPO; - - /** */ - @JsonProperty("SLP") - private String SLP; - - /** */ - @JsonProperty("ID") - private String ID; - - /** */ - @JsonProperty("SLIM") - private String SLIM; - - /** */ - @JsonProperty("SPOT") - private String SPOT; - - /** */ - @JsonProperty("DOP") - private String DOP; - - /** */ - @JsonProperty("ISSP") - private String ISSP; - - /** */ - @JsonProperty("UQC") - private String UQC; - - /** */ - @JsonProperty("IO") - private String IO; - - /** */ - @JsonProperty("DOT") - private String DOT; - - /** */ - @JsonProperty("1INCH") - private String _1INCH; - - /** */ - @JsonProperty("SMH") - private String SMH; - - /** */ - @JsonProperty("MAK") - private String MAK; - - /** */ - @JsonProperty("TOKO") - private String TOKO; - - /** */ - @JsonProperty("TURBO") - private String TURBO; - - /** */ - @JsonProperty("UNFI") - private String UNFI; - - /** */ - @JsonProperty("MAN") - private String MAN; - - /** */ - @JsonProperty("EVER") - private String EVER; - - /** */ - @JsonProperty("FTM") - private String FTM; - - /** */ - @JsonProperty("SHRAP") - private String SHRAP; - - /** */ - @JsonProperty("MAV") - private String MAV; - - /** */ - @JsonProperty("MAX") - private String MAX; - - /** */ - @JsonProperty("DPR") - private String DPR; - - /** */ - @JsonProperty("FTT") - private String FTT; - - /** */ - @JsonProperty("ARKM") - private String ARKM; - - /** */ - @JsonProperty("ATOM") - private String ATOM; - - /** */ - @JsonProperty("PENDLE") - private String PENDLE; - - /** */ - @JsonProperty("QUICK") - private String QUICK; - - /** */ - @JsonProperty("BLZ") - private String BLZ; - - /** */ - @JsonProperty("BOBA") - private String BOBA; - - /** */ - @JsonProperty("MBL") - private String MBL; - - /** */ - @JsonProperty("OFN") - private String OFN; - - /** */ - @JsonProperty("UNIO") - private String UNIO; - - /** */ - @JsonProperty("SNS") - private String SNS; - - /** */ - @JsonProperty("SNX") - private String SNX; - - /** */ - @JsonProperty("NXRA") - private String NXRA; - - /** */ - @JsonProperty("TAIKO") - private String TAIKO; - - /** */ - @JsonProperty("AVAX3L") - private String AVAX3L; - - /** */ - @JsonProperty("L3") - private String L3; - - /** */ - @JsonProperty("API3") - private String API3; - - /** */ - @JsonProperty("XRP3S") - private String XRP3S; - - /** */ - @JsonProperty("QKC") - private String QKC; - - /** */ - @JsonProperty("AVAX3S") - private String AVAX3S; - - /** */ - @JsonProperty("ROSE") - private String ROSE; - - /** */ - @JsonProperty("SATS") - private String SATS; - - /** */ - @JsonProperty("BMX") - private String BMX; - - /** */ - @JsonProperty("PORTAL") - private String PORTAL; - - /** */ - @JsonProperty("TOMI") - private String TOMI; - - /** */ - @JsonProperty("XRP3L") - private String XRP3L; - - /** */ - @JsonProperty("SOL") - private String SOL; - - /** */ - @JsonProperty("SON") - private String SON; - - /** */ - @JsonProperty("BNC") - private String BNC; - - /** */ - @JsonProperty("SOCIAL") - private String SOCIAL; - - /** */ - @JsonProperty("CGPT") - private String CGPT; - - /** */ - @JsonProperty("CELR") - private String CELR; - - /** */ - @JsonProperty("BNB") - private String BNB; - - /** */ - @JsonProperty("OGN") - private String OGN; - - /** */ - @JsonProperty("CELO") - private String CELO; - - /** */ - @JsonProperty("AUCTION") - private String AUCTION; - - /** */ - @JsonProperty("MANTA") - private String MANTA; - - /** */ - @JsonProperty("LAYER") - private String LAYER; - - /** */ - @JsonProperty("AERO") - private String AERO; - - /** */ - @JsonProperty("CETUS") - private String CETUS; - - /** */ - @JsonProperty("LL") - private String LL; - - /** */ - @JsonProperty("SPA") - private String SPA; - - /** */ - @JsonProperty("PYTHDOWN") - private String PYTHDOWN; - - /** */ - @JsonProperty("NEIROCTO") - private String NEIROCTO; - - /** */ - @JsonProperty("UTK") - private String UTK; - - /** */ - @JsonProperty("GMRX") - private String GMRX; - - /** */ - @JsonProperty("BOB") - private String BOB; - - /** */ - @JsonProperty("HOTCROSS") - private String HOTCROSS; - - /** */ - @JsonProperty("AERGO") - private String AERGO; - - /** */ - @JsonProperty("MOCA") - private String MOCA; - - /** */ - @JsonProperty("SQD") - private String SQD; - - /** */ - @JsonProperty("MV") - private String MV; - - /** */ - @JsonProperty("BNB3L") - private String BNB3L; - - /** */ - @JsonProperty("BNB3S") - private String BNB3S; - - /** */ - @JsonProperty("GALAX3L") - private String GALAX3L; - - /** */ - @JsonProperty("KAI") - private String KAI; - - /** */ - @JsonProperty("SQR") - private String SQR; - - /** */ - @JsonProperty("GALAX3S") - private String GALAX3S; - - /** */ - @JsonProperty("EGLD") - private String EGLD; - - /** */ - @JsonProperty("ZBCN") - private String ZBCN; - - /** */ - @JsonProperty("KAS") - private String KAS; - - /** */ - @JsonProperty("MEW") - private String MEW; - - /** */ - @JsonProperty("PUNDIX") - private String PUNDIX; - - /** */ - @JsonProperty("LOOKS") - private String LOOKS; - - /** */ - @JsonProperty("FXS") - private String FXS; - - /** */ - @JsonProperty("BOSON") - private String BOSON; - - /** */ - @JsonProperty("BRISE") - private String BRISE; - - /** */ - @JsonProperty("AEVO") - private String AEVO; - - /** */ - @JsonProperty("FLUX") - private String FLUX; - - /** */ - @JsonProperty("PRCL") - private String PRCL; - - /** */ - @JsonProperty("UNFIUP") - private String UNFIUP; - - /** */ - @JsonProperty("SEIDOWN") - private String SEIDOWN; - - /** */ - @JsonProperty("DOAI") - private String DOAI; - - /** */ - @JsonProperty("QNT") - private String QNT; - - /** */ - @JsonProperty("REDO") - private String REDO; - - /** */ - @JsonProperty("STRIKE") - private String STRIKE; - - /** */ - @JsonProperty("ETHW") - private String ETHW; - - /** */ - @JsonProperty("OM") - private String OM; - - /** */ - @JsonProperty("OP") - private String OP; - - /** */ - @JsonProperty("WHALE") - private String WHALE; - - /** */ - @JsonProperty("1CAT") - private String _1CAT; - - /** */ - @JsonProperty("NEON") - private String NEON; - - /** */ - @JsonProperty("GTAI") - private String GTAI; - - /** */ - @JsonProperty("SSV") - private String SSV; - - /** */ - @JsonProperty("ETH2") - private String ETH2; - - /** */ - @JsonProperty("KCS") - private String KCS; - - /** */ - @JsonProperty("ARPA") - private String ARPA; - - /** */ - @JsonProperty("ARTFI") - private String ARTFI; - - /** */ - @JsonProperty("BRL") - private String BRL; - - /** */ - @JsonProperty("ALEX") - private String ALEX; - - /** */ - @JsonProperty("STG") - private String STG; - - /** */ - @JsonProperty("SHIB") - private String SHIB; - - /** */ - @JsonProperty("IOTX") - private String IOTX; - - /** */ - @JsonProperty("OLE") - private String OLE; - - /** */ - @JsonProperty("KDA") - private String KDA; - - /** */ - @JsonProperty("CERE") - private String CERE; - - /** */ - @JsonProperty("DOCK") - private String DOCK; - - /** */ - @JsonProperty("STX") - private String STX; - - /** */ - @JsonProperty("OLT") - private String OLT; - - /** */ - @JsonProperty("QI") - private String QI; - - /** */ - @JsonProperty("SDAO") - private String SDAO; - - /** */ - @JsonProperty("BLAST") - private String BLAST; - - /** */ - @JsonProperty("LINK3S") - private String LINK3S; - - /** */ - @JsonProperty("IOST") - private String IOST; - - /** */ - @JsonProperty("SUI") - private String SUI; - - /** */ - @JsonProperty("CAKE") - private String CAKE; - - /** */ - @JsonProperty("BSW") - private String BSW; - - /** */ - @JsonProperty("OMG") - private String OMG; - - /** */ - @JsonProperty("VOLT") - private String VOLT; - - /** */ - @JsonProperty("LINK3L") - private String LINK3L; - - /** */ - @JsonProperty("GEEQ") - private String GEEQ; - - /** */ - @JsonProperty("PYUSD") - private String PYUSD; - - /** */ - @JsonProperty("SUN") - private String SUN; - - /** */ - @JsonProperty("TOWER") - private String TOWER; - - /** */ - @JsonProperty("BTC") - private String BTC; - - /** */ - @JsonProperty("IOTA") - private String IOTA; - - /** */ - @JsonProperty("REEF") - private String REEF; - - /** */ - @JsonProperty("TRIAS") - private String TRIAS; - - /** */ - @JsonProperty("KEY") - private String KEY; - - /** */ - @JsonProperty("ETH3L") - private String ETH3L; - - /** */ - @JsonProperty("BTT") - private String BTT; - - /** */ - @JsonProperty("ONE") - private String ONE; - - /** */ - @JsonProperty("RENDER") - private String RENDER; - - /** */ - @JsonProperty("ETH3S") - private String ETH3S; - - /** */ - @JsonProperty("ANKR") - private String ANKR; - - /** */ - @JsonProperty("ALGO") - private String ALGO; - - /** */ - @JsonProperty("SYLO") - private String SYLO; - - /** */ - @JsonProperty("ZCX") - private String ZCX; - - /** */ - @JsonProperty("SD") - private String SD; - - /** */ - @JsonProperty("ONT") - private String ONT; - - /** */ - @JsonProperty("MJT") - private String MJT; - - /** */ - @JsonProperty("DYM") - private String DYM; - - /** */ - @JsonProperty("DYP") - private String DYP; - - /** */ - @JsonProperty("BAKEUP") - private String BAKEUP; - - /** */ - @JsonProperty("OOE") - private String OOE; - - /** */ - @JsonProperty("ZELIX") - private String ZELIX; - - /** */ - @JsonProperty("DOGE3L") - private String DOGE3L; - - /** */ - @JsonProperty("ARTY") - private String ARTY; - - /** */ - @JsonProperty("QORPO") - private String QORPO; - - /** */ - @JsonProperty("ICE") - private String ICE; - - /** */ - @JsonProperty("NOTAI") - private String NOTAI; - - /** */ - @JsonProperty("DOGE3S") - private String DOGE3S; - - /** */ - @JsonProperty("NAKA") - private String NAKA; - - /** */ - @JsonProperty("GALAX") - private String GALAX; - - /** */ - @JsonProperty("MKR") - private String MKR; - - /** */ - @JsonProperty("DODO") - private String DODO; - - /** */ - @JsonProperty("ICP") - private String ICP; - - /** */ - @JsonProperty("ZEC") - private String ZEC; - - /** */ - @JsonProperty("ZEE") - private String ZEE; - - /** */ - @JsonProperty("ICX") - private String ICX; - - /** */ - @JsonProperty("KMNO") - private String KMNO; - - /** */ - @JsonProperty("TT") - private String TT; - - /** */ - @JsonProperty("DOT3L") - private String DOT3L; - - /** */ - @JsonProperty("XAI") - private String XAI; - - /** */ - @JsonProperty("ZEN") - private String ZEN; - - /** */ - @JsonProperty("DOGE") - private String DOGE; - - /** */ - @JsonProperty("ALPHA") - private String ALPHA; - - /** */ - @JsonProperty("DUSK") - private String DUSK; - - /** */ - @JsonProperty("DOT3S") - private String DOT3S; - - /** */ - @JsonProperty("SXP") - private String SXP; - - /** */ - @JsonProperty("HBAR") - private String HBAR; - - /** */ - @JsonProperty("SYNT") - private String SYNT; - - /** */ - @JsonProperty("ZEX") - private String ZEX; - - /** */ - @JsonProperty("BONDLY") - private String BONDLY; - - /** */ - @JsonProperty("MLK") - private String MLK; - - /** */ - @JsonProperty("KICKS") - private String KICKS; - - /** */ - @JsonProperty("PEPE") - private String PEPE; - - /** */ - @JsonProperty("OUSD") - private String OUSD; - - /** */ - @JsonProperty("LUNCDOWN") - private String LUNCDOWN; - - /** */ - @JsonProperty("DOGS") - private String DOGS; - - /** */ - @JsonProperty("REV3L") - private String REV3L; - - /** */ - @JsonProperty("CTSI") - private String CTSI; - - /** */ - @JsonProperty("C98") - private String C98; - - /** */ - @JsonProperty("OSMO") - private String OSMO; - - /** */ - @JsonProperty("NTRN") - private String NTRN; - - /** */ - @JsonProperty("CFX2S") - private String CFX2S; - - /** */ - @JsonProperty("SYN") - private String SYN; - - /** */ - @JsonProperty("VIDT") - private String VIDT; - - /** */ - @JsonProperty("SYS") - private String SYS; - - /** */ - @JsonProperty("GAS") - private String GAS; - - /** */ - @JsonProperty("BOME") - private String BOME; - - /** */ - @JsonProperty("COMBO") - private String COMBO; - - /** */ - @JsonProperty("XCH") - private String XCH; - - /** */ - @JsonProperty("VR") - private String VR; - - /** */ - @JsonProperty("CFX2L") - private String CFX2L; - - /** */ - @JsonProperty("VSYS") - private String VSYS; - - /** */ - @JsonProperty("PANDORA") - private String PANDORA; - - /** */ - @JsonProperty("THETA") - private String THETA; - - /** */ - @JsonProperty("XCN") - private String XCN; - - /** */ - @JsonProperty("NEXG") - private String NEXG; - - /** */ - @JsonProperty("MELOS") - private String MELOS; - - /** */ - @JsonProperty("XCV") - private String XCV; - - /** */ - @JsonProperty("ORN") - private String ORN; - - /** */ - @JsonProperty("WLKN") - private String WLKN; - - /** */ - @JsonProperty("AAVE") - private String AAVE; - - /** */ - @JsonProperty("MNT") - private String MNT; - - /** */ - @JsonProperty("BONK") - private String BONK; - - /** */ - @JsonProperty("PERP") - private String PERP; - - /** */ - @JsonProperty("XDC") - private String XDC; - - /** */ - @JsonProperty("MNW") - private String MNW; - - /** */ - @JsonProperty("XDB") - private String XDB; - - /** */ - @JsonProperty("BOND") - private String BOND; - - /** */ - @JsonProperty("SUIA") - private String SUIA; - - /** */ - @JsonProperty("MOG") - private String MOG; - - /** */ - @JsonProperty("SUTER") - private String SUTER; - - /** */ - @JsonProperty("TIME") - private String TIME; - - /** */ - @JsonProperty("RACA") - private String RACA; - - /** */ - @JsonProperty("BICO") - private String BICO; - - /** */ - @JsonProperty("MON") - private String MON; - - /** */ - @JsonProperty("SWEAT") - private String SWEAT; - - /** */ - @JsonProperty("MOXIE") - private String MOXIE; - - /** */ - @JsonProperty("BABYBNB") - private String BABYBNB; - - /** */ - @JsonProperty("IGU") - private String IGU; - - /** */ - @JsonProperty("HMSTR") - private String HMSTR; - - /** */ - @JsonProperty("XEC") - private String XEC; - - /** */ - @JsonProperty("MONI") - private String MONI; - - /** */ - @JsonProperty("XR") - private String XR; - - /** */ - @JsonProperty("PEOPLE") - private String PEOPLE; - - /** */ - @JsonProperty("PUMLX") - private String PUMLX; - - /** */ - @JsonProperty("ZIL") - private String ZIL; - - /** */ - @JsonProperty("WLDDOWN") - private String WLDDOWN; - - /** */ - @JsonProperty("VAI") - private String VAI; - - /** */ - @JsonProperty("XEN") - private String XEN; - - /** */ - @JsonProperty("MPC") - private String MPC; - - /** */ - @JsonProperty("XEM") - private String XEM; - - /** */ - @JsonProperty("JASMY3S") - private String JASMY3S; - - /** */ - @JsonProperty("OTK") - private String OTK; - - /** */ - @JsonProperty("TRAC") - private String TRAC; - - /** */ - @JsonProperty("DFYN") - private String DFYN; - - /** */ - @JsonProperty("BIDP") - private String BIDP; - - /** */ - @JsonProperty("JASMY3L") - private String JASMY3L; - - /** */ - @JsonProperty("INJDOWN") - private String INJDOWN; - - /** */ - @JsonProperty("KLV") - private String KLV; - - /** */ - @JsonProperty("WAXL") - private String WAXL; - - /** */ - @JsonProperty("TRBDOWN") - private String TRBDOWN; - - /** */ - @JsonProperty("BCH3L") - private String BCH3L; - - /** */ - @JsonProperty("GMT3S") - private String GMT3S; - - /** */ - @JsonProperty("KMD") - private String KMD; - - /** */ - @JsonProperty("BCH3S") - private String BCH3S; - - /** */ - @JsonProperty("ECOX") - private String ECOX; - - /** */ - @JsonProperty("AAVE3S") - private String AAVE3S; - - /** */ - @JsonProperty("GMT3L") - private String GMT3L; - - /** */ - @JsonProperty("EPIK") - private String EPIK; - - /** */ - @JsonProperty("SUIP") - private String SUIP; - - /** */ - @JsonProperty("AAVE3L") - private String AAVE3L; - - /** */ - @JsonProperty("ZK") - private String ZK; - - /** */ - @JsonProperty("ZKF") - private String ZKF; - - /** */ - @JsonProperty("OMNIA") - private String OMNIA; - - /** */ - @JsonProperty("ZKJ") - private String ZKJ; - - /** */ - @JsonProperty("ZKL") - private String ZKL; - - /** */ - @JsonProperty("GAFI") - private String GAFI; - - /** */ - @JsonProperty("CARV") - private String CARV; - - /** */ - @JsonProperty("KNC") - private String KNC; - - /** */ - @JsonProperty("CATS") - private String CATS; - - /** */ - @JsonProperty("PROM") - private String PROM; - - /** */ - @JsonProperty("ALEPH") - private String ALEPH; - - /** */ - @JsonProperty("PONKE") - private String PONKE; - - /** */ - @JsonProperty("OVR") - private String OVR; - - /** */ - @JsonProperty("CATI") - private String CATI; - - /** */ - @JsonProperty("ORDER") - private String ORDER; - - /** */ - @JsonProperty("GFT") - private String GFT; - - /** */ - @JsonProperty("BIFI") - private String BIFI; - - /** */ - @JsonProperty("GGC") - private String GGC; - - /** */ - @JsonProperty("GGG") - private String GGG; - - /** */ - @JsonProperty("DAPPX") - private String DAPPX; - - /** */ - @JsonProperty("SUKU") - private String SUKU; - - /** */ - @JsonProperty("ULTI") - private String ULTI; - - /** */ - @JsonProperty("CREDI") - private String CREDI; - - /** */ - @JsonProperty("ERTHA") - private String ERTHA; - - /** */ - @JsonProperty("FURY") - private String FURY; - - /** */ - @JsonProperty("KARRAT") - private String KARRAT; - - /** */ - @JsonProperty("MOBILE") - private String MOBILE; - - /** */ - @JsonProperty("SIDUS") - private String SIDUS; - - /** */ - @JsonProperty("NAVI") - private String NAVI; - - /** */ - @JsonProperty("TAO") - private String TAO; - - /** */ - @JsonProperty("USDJ") - private String USDJ; - - /** */ - @JsonProperty("MTL") - private String MTL; - - /** */ - @JsonProperty("VET") - private String VET; - - /** */ - @JsonProperty("FITFI") - private String FITFI; - - /** */ - @JsonProperty("USDT") - private String USDT; - - /** */ - @JsonProperty("OXT") - private String OXT; - - /** */ - @JsonProperty("CANDY") - private String CANDY; - - /** */ - @JsonProperty("USDP") - private String USDP; - - /** */ - @JsonProperty("MTS") - private String MTS; - - /** */ - @JsonProperty("TADA") - private String TADA; - - /** */ - @JsonProperty("MTV") - private String MTV; - - /** */ - @JsonProperty("NAVX") - private String NAVX; - - /** */ - @JsonProperty("ILV") - private String ILV; - - /** */ - @JsonProperty("VINU") - private String VINU; - - /** */ - @JsonProperty("GHX") - private String GHX; - - /** */ - @JsonProperty("EDU") - private String EDU; - - /** */ - @JsonProperty("HYVE") - private String HYVE; - - /** */ - @JsonProperty("BTC3L") - private String BTC3L; - - /** */ - @JsonProperty("ANYONE") - private String ANYONE; - - /** */ - @JsonProperty("BEAT") - private String BEAT; - - /** */ - @JsonProperty("KING") - private String KING; - - /** */ - @JsonProperty("CREAM") - private String CREAM; - - /** */ - @JsonProperty("CAS") - private String CAS; - - /** */ - @JsonProperty("IMX") - private String IMX; - - /** */ - @JsonProperty("CAT") - private String CAT; - - /** */ - @JsonProperty("BTC3S") - private String BTC3S; - - /** */ - @JsonProperty("USDE") - private String USDE; - - /** */ - @JsonProperty("USDD") - private String USDD; - - /** */ - @JsonProperty("CWAR") - private String CWAR; - - /** */ - @JsonProperty("USDC") - private String USDC; - - /** */ - @JsonProperty("KRL") - private String KRL; - - /** */ - @JsonProperty("INJ") - private String INJ; - - /** */ - @JsonProperty("GAME") - private String GAME; - - /** */ - @JsonProperty("TRIBL") - private String TRIBL; - - /** */ - @JsonProperty("XLM") - private String XLM; - - /** */ - @JsonProperty("TRBUP") - private String TRBUP; - - /** */ - @JsonProperty("VRADOWN") - private String VRADOWN; - - /** */ - @JsonProperty("SUPER") - private String SUPER; - - /** */ - @JsonProperty("EIGEN") - private String EIGEN; - - /** */ - @JsonProperty("IOI") - private String IOI; - - /** */ - @JsonProperty("KSM") - private String KSM; - - /** */ - @JsonProperty("CCD") - private String CCD; - - /** */ - @JsonProperty("EGO") - private String EGO; - - /** */ - @JsonProperty("EGP") - private String EGP; - - /** */ - @JsonProperty("MXC") - private String MXC; - - /** */ - @JsonProperty("TEL") - private String TEL; - - /** */ - @JsonProperty("MOVR") - private String MOVR; - - /** */ - @JsonProperty("XMR") - private String XMR; - - /** */ - @JsonProperty("MXM") - private String MXM; - - /** */ - @JsonProperty("OORT") - private String OORT; - - /** */ - @JsonProperty("GLM") - private String GLM; - - /** */ - @JsonProperty("RAY") - private String RAY; - - /** */ - @JsonProperty("XTAG") - private String XTAG; - - /** */ - @JsonProperty("GLQ") - private String GLQ; - - /** */ - @JsonProperty("CWEB") - private String CWEB; - - /** */ - @JsonProperty("REVU") - private String REVU; - - /** */ - @JsonProperty("REVV") - private String REVV; - - /** */ - @JsonProperty("ZRO") - private String ZRO; - - /** */ - @JsonProperty("XNL") - private String XNL; - - /** */ - @JsonProperty("XNO") - private String XNO; - - /** */ - @JsonProperty("SAROS") - private String SAROS; - - /** */ - @JsonProperty("KACE") - private String KACE; - - /** */ - @JsonProperty("ZRX") - private String ZRX; - - /** */ - @JsonProperty("WLTH") - private String WLTH; - - /** */ - @JsonProperty("ATOM3L") - private String ATOM3L; - - /** */ - @JsonProperty("GMM") - private String GMM; - - /** */ - @JsonProperty("BEER") - private String BEER; - - /** */ - @JsonProperty("GMT") - private String GMT; - - /** */ - @JsonProperty("HEART") - private String HEART; - - /** */ - @JsonProperty("GMX") - private String GMX; - - /** */ - @JsonProperty("ABBC") - private String ABBC; - - /** */ - @JsonProperty("OMNI") - private String OMNI; - - /** */ - @JsonProperty("ATOM3S") - private String ATOM3S; - - /** */ - @JsonProperty("IRL") - private String IRL; - - /** */ - @JsonProperty("CFG") - private String CFG; - - /** */ - @JsonProperty("WSDM") - private String WSDM; - - /** */ - @JsonProperty("GNS") - private String GNS; - - /** */ - @JsonProperty("VANRY") - private String VANRY; - - /** */ - @JsonProperty("CFX") - private String CFX; - - /** */ - @JsonProperty("GRAIL") - private String GRAIL; - - /** */ - @JsonProperty("BEFI") - private String BEFI; - - /** */ - @JsonProperty("VELO") - private String VELO; - - /** */ - @JsonProperty("XPR") - private String XPR; - - /** */ - @JsonProperty("DOVI") - private String DOVI; - - /** */ - @JsonProperty("ACE") - private String ACE; - - /** */ - @JsonProperty("ACH") - private String ACH; - - /** */ - @JsonProperty("ISP") - private String ISP; - - /** */ - @JsonProperty("XCAD") - private String XCAD; - - /** */ - @JsonProperty("MINA") - private String MINA; - - /** */ - @JsonProperty("TIA") - private String TIA; - - /** */ - @JsonProperty("DRIFT") - private String DRIFT; - - /** */ - @JsonProperty("ACQ") - private String ACQ; - - /** */ - @JsonProperty("ACS") - private String ACS; - - /** */ - @JsonProperty("MIND") - private String MIND; - - /** */ - @JsonProperty("STORE") - private String STORE; - - /** */ - @JsonProperty("REN") - private String REN; - - /** */ - @JsonProperty("ELA") - private String ELA; - - /** */ - @JsonProperty("DREAMS") - private String DREAMS; - - /** */ - @JsonProperty("ADA") - private String ADA; - - /** */ - @JsonProperty("ELF") - private String ELF; - - /** */ - @JsonProperty("REQ") - private String REQ; - - /** */ - @JsonProperty("STORJ") - private String STORJ; - - /** */ - @JsonProperty("LADYS") - private String LADYS; - - /** */ - @JsonProperty("PAXG") - private String PAXG; - - /** */ - @JsonProperty("REZ") - private String REZ; - - /** */ - @JsonProperty("XRD") - private String XRD; - - /** */ - @JsonProperty("CHO") - private String CHO; - - /** */ - @JsonProperty("CHR") - private String CHR; - - /** */ - @JsonProperty("ADS") - private String ADS; - - /** */ - @JsonProperty("CHZ") - private String CHZ; - - /** */ - @JsonProperty("ADX") - private String ADX; - - /** */ - @JsonProperty("XRP") - private String XRP; - - /** */ - @JsonProperty("JASMY") - private String JASMY; - - /** */ - @JsonProperty("KAGI") - private String KAGI; - - /** */ - @JsonProperty("FIDA") - private String FIDA; - - /** */ - @JsonProperty("PBR") - private String PBR; - - /** */ - @JsonProperty("AEG") - private String AEG; - - /** */ - @JsonProperty("H2O") - private String H2O; - - /** */ - @JsonProperty("CHMB") - private String CHMB; - - /** */ - @JsonProperty("SAND3L") - private String SAND3L; - - /** */ - @JsonProperty("PBX") - private String PBX; - - /** */ - @JsonProperty("SOLVE") - private String SOLVE; - - /** */ - @JsonProperty("DECHAT") - private String DECHAT; - - /** */ - @JsonProperty("GARI") - private String GARI; - - /** */ - @JsonProperty("SHIB2L") - private String SHIB2L; - - /** */ - @JsonProperty("SHIB2S") - private String SHIB2S; - - /** */ - @JsonProperty("ENA") - private String ENA; - - /** */ - @JsonProperty("VEMP") - private String VEMP; - - /** */ - @JsonProperty("ENJ") - private String ENJ; - - /** */ - @JsonProperty("AFG") - private String AFG; - - /** */ - @JsonProperty("RATS") - private String RATS; - - /** */ - @JsonProperty("GRT") - private String GRT; - - /** */ - @JsonProperty("FORWARD") - private String FORWARD; - - /** */ - @JsonProperty("TFUEL") - private String TFUEL; - - /** */ - @JsonProperty("ENS") - private String ENS; - - /** */ - @JsonProperty("KASDOWN") - private String KASDOWN; - - /** */ - @JsonProperty("XTM") - private String XTM; - - /** */ - @JsonProperty("DEGEN") - private String DEGEN; - - /** */ - @JsonProperty("TLM") - private String TLM; - - /** */ - @JsonProperty("DYDXDOWN") - private String DYDXDOWN; - - /** */ - @JsonProperty("CKB") - private String CKB; - - /** */ - @JsonProperty("LUNC") - private String LUNC; - - /** */ - @JsonProperty("AURORA") - private String AURORA; - - /** */ - @JsonProperty("LUNA") - private String LUNA; - - /** */ - @JsonProperty("XTZ") - private String XTZ; - - /** */ - @JsonProperty("ELON") - private String ELON; - - /** */ - @JsonProperty("DMTR") - private String DMTR; - - /** */ - @JsonProperty("EOS") - private String EOS; - - /** */ - @JsonProperty("GST") - private String GST; - - /** */ - @JsonProperty("FORT") - private String FORT; - - /** */ - @JsonProperty("FLAME") - private String FLAME; - - /** */ - @JsonProperty("PATEX") - private String PATEX; - - /** */ - @JsonProperty("DEEP") - private String DEEP; - - /** */ - @JsonProperty("ID3L") - private String ID3L; - - /** */ - @JsonProperty("GTC") - private String GTC; - - /** */ - @JsonProperty("ID3S") - private String ID3S; - - /** */ - @JsonProperty("RIO") - private String RIO; - - /** */ - @JsonProperty("CLH") - private String CLH; - - /** */ - @JsonProperty("BURGER") - private String BURGER; - - /** */ - @JsonProperty("VRA") - private String VRA; - - /** */ - @JsonProperty("SUNDOG") - private String SUNDOG; - - /** */ - @JsonProperty("GTT") - private String GTT; - - /** */ - @JsonProperty("INJUP") - private String INJUP; - - /** */ - @JsonProperty("CPOOL") - private String CPOOL; - - /** */ - @JsonProperty("EPX") - private String EPX; - - /** */ - @JsonProperty("CLV") - private String CLV; - - /** */ - @JsonProperty("FEAR") - private String FEAR; - - /** */ - @JsonProperty("MEME") - private String MEME; - - /** */ - @JsonProperty("ROOBEE") - private String ROOBEE; - - /** */ - @JsonProperty("DEFI") - private String DEFI; - - /** */ - @JsonProperty("TOKEN") - private String TOKEN; - - /** */ - @JsonProperty("GRAPE") - private String GRAPE; - - /** */ - @JsonProperty("KASUP") - private String KASUP; - - /** */ - @JsonProperty("XWG") - private String XWG; - - /** */ - @JsonProperty("SKEY") - private String SKEY; - - /** */ - @JsonProperty("SFUND") - private String SFUND; - - /** */ - @JsonProperty("EQX") - private String EQX; - - /** */ - @JsonProperty("ORDIUP") - private String ORDIUP; - - /** */ - @JsonProperty("TON") - private String TON; - - /** */ - @JsonProperty("DEGO") - private String DEGO; - - /** */ - @JsonProperty("IZI") - private String IZI; - - /** */ - @JsonProperty("ERG") - private String ERG; - - /** */ - @JsonProperty("ERN") - private String ERN; - - /** */ - @JsonProperty("VENOM") - private String VENOM; - - /** */ - @JsonProperty("VOXEL") - private String VOXEL; - - /** */ - @JsonProperty("RLC") - private String RLC; - - /** */ - @JsonProperty("PHA") - private String PHA; - - /** */ - @JsonProperty("DYDXUP") - private String DYDXUP; - - /** */ - @JsonProperty("APE3S") - private String APE3S; - - /** */ - @JsonProperty("ORBS") - private String ORBS; - - /** */ - @JsonProperty("OPDOWN") - private String OPDOWN; - - /** */ - @JsonProperty("ESE") - private String ESE; - - /** */ - @JsonProperty("APE3L") - private String APE3L; - - /** */ - @JsonProperty("HMND") - private String HMND; - - /** */ - @JsonProperty("COQ") - private String COQ; - - /** */ - @JsonProperty("AURY") - private String AURY; - - /** */ - @JsonProperty("CULT") - private String CULT; - - /** */ - @JsonProperty("AKT") - private String AKT; - - /** */ - @JsonProperty("GLMR") - private String GLMR; - - /** */ - @JsonProperty("XYM") - private String XYM; - - /** */ - @JsonProperty("ORAI") - private String ORAI; - - /** */ - @JsonProperty("XYO") - private String XYO; - - /** */ - @JsonProperty("ETC") - private String ETC; - - /** */ - @JsonProperty("LAI") - private String LAI; - - /** */ - @JsonProperty("PIP") - private String PIP; - - /** */ - @JsonProperty("ETH") - private String ETH; - - /** */ - @JsonProperty("NEO") - private String NEO; - - /** */ - @JsonProperty("RMV") - private String RMV; - - /** */ - @JsonProperty("KLAY") - private String KLAY; - - /** */ - @JsonProperty("PIT") - private String PIT; - - /** */ - @JsonProperty("TARA") - private String TARA; - - /** */ - @JsonProperty("KALT") - private String KALT; - - /** */ - @JsonProperty("PIX") - private String PIX; - - /** */ - @JsonProperty("ETN") - private String ETN; - - /** */ - @JsonProperty("CSIX") - private String CSIX; - - /** */ - @JsonProperty("TRADE") - private String TRADE; - - /** */ - @JsonProperty("MAVIA") - private String MAVIA; - - /** */ - @JsonProperty("HIGH") - private String HIGH; - - /** */ - @JsonProperty("TRB") - private String TRB; - - /** */ - @JsonProperty("ORDI") - private String ORDI; - - /** */ - @JsonProperty("TRVL") - private String TRVL; - - /** */ - @JsonProperty("AMB") - private String AMB; - - /** */ - @JsonProperty("TRU") - private String TRU; - - /** */ - @JsonProperty("LOGX") - private String LOGX; - - /** */ - @JsonProperty("FINC") - private String FINC; - - /** */ - @JsonProperty("INFRA") - private String INFRA; - - /** */ - @JsonProperty("NATIX") - private String NATIX; - - /** */ - @JsonProperty("NFP") - private String NFP; - - /** */ - @JsonProperty("TRY") - private String TRY; - - /** */ - @JsonProperty("TRX") - private String TRX; - - /** */ - @JsonProperty("LBP") - private String LBP; - - /** */ - @JsonProperty("LBR") - private String LBR; - - /** */ - @JsonProperty("EUL") - private String EUL; - - /** */ - @JsonProperty("NFT") - private String NFT; - - /** */ - @JsonProperty("SEIUP") - private String SEIUP; - - /** */ - @JsonProperty("PUFFER") - private String PUFFER; - - /** */ - @JsonProperty("EUR") - private String EUR; - - /** */ - @JsonProperty("ORCA") - private String ORCA; - - /** */ - @JsonProperty("NEAR3L") - private String NEAR3L; - - /** */ - @JsonProperty("AMP") - private String AMP; - - /** */ - @JsonProperty("XDEFI") - private String XDEFI; - - /** */ - @JsonProperty("HIFI") - private String HIFI; - - /** */ - @JsonProperty("TRUF") - private String TRUF; - - /** */ - @JsonProperty("AITECH") - private String AITECH; - - /** */ - @JsonProperty("AMU") - private String AMU; - - /** */ - @JsonProperty("USTC") - private String USTC; - - /** */ - @JsonProperty("KNGL") - private String KNGL; - - /** */ - @JsonProperty("FOXY") - private String FOXY; - - /** */ - @JsonProperty("NGC") - private String NGC; - - /** */ - @JsonProperty("TENET") - private String TENET; - - /** */ - @JsonProperty("NEAR3S") - private String NEAR3S; - - /** */ - @JsonProperty("MAHA") - private String MAHA; - - /** */ - @JsonProperty("NGL") - private String NGL; - - /** */ - @JsonProperty("TST") - private String TST; - - /** */ - @JsonProperty("HIPPO") - private String HIPPO; - - /** */ - @JsonProperty("AXS3S") - private String AXS3S; - - /** */ - @JsonProperty("CRO") - private String CRO; - - /** */ - @JsonProperty("ZPAY") - private String ZPAY; - - /** */ - @JsonProperty("MNDE") - private String MNDE; - - /** */ - @JsonProperty("CRV") - private String CRV; - - /** */ - @JsonProperty("SWASH") - private String SWASH; - - /** */ - @JsonProperty("AXS3L") - private String AXS3L; - - /** */ - @JsonProperty("VERSE") - private String VERSE; - - /** */ - @JsonProperty("RPK") - private String RPK; - - /** */ - @JsonProperty("RPL") - private String RPL; - - /** */ - @JsonProperty("AZERO") - private String AZERO; - - /** */ - @JsonProperty("SOUL") - private String SOUL; - - /** */ - @JsonProperty("VXV") - private String VXV; - - /** */ - @JsonProperty("LDO") - private String LDO; - - /** */ - @JsonProperty("MAGIC") - private String MAGIC; - - /** */ - @JsonProperty("ALICE") - private String ALICE; - - /** */ - @JsonProperty("SEAM") - private String SEAM; - - /** */ - @JsonProperty("PLU") - private String PLU; - - /** */ - @JsonProperty("AOG") - private String AOG; - - /** */ - @JsonProperty("SMOLE") - private String SMOLE; - - /** */ - @JsonProperty("EWT") - private String EWT; - - /** */ - @JsonProperty("TSUGT") - private String TSUGT; - - /** */ - @JsonProperty("PMG") - private String PMG; - - /** */ - @JsonProperty("OPAI") - private String OPAI; - - /** */ - @JsonProperty("LOCUS") - private String LOCUS; - - /** */ - @JsonProperty("CTA") - private String CTA; - - /** */ - @JsonProperty("NIM") - private String NIM; - - /** */ - @JsonProperty("CTC") - private String CTC; - - /** */ - @JsonProperty("APE") - private String APE; - - /** */ - @JsonProperty("MERL") - private String MERL; - - /** */ - @JsonProperty("JAM") - private String JAM; - - /** */ - @JsonProperty("CTI") - private String CTI; - - /** */ - @JsonProperty("APP") - private String APP; - - /** */ - @JsonProperty("APT") - private String APT; - - /** */ - @JsonProperty("WLDUP") - private String WLDUP; - - /** */ - @JsonProperty("ZEND") - private String ZEND; - - /** */ - @JsonProperty("FIRE") - private String FIRE; - - /** */ - @JsonProperty("DENT") - private String DENT; - - /** */ - @JsonProperty("PYTH") - private String PYTH; - - /** */ - @JsonProperty("LFT") - private String LFT; - - /** */ - @JsonProperty("DPET") - private String DPET; - - /** */ - @JsonProperty("ORDIDOWN") - private String ORDIDOWN; - - /** */ - @JsonProperty("KPOL") - private String KPOL; - - /** */ - @JsonProperty("ETHUP") - private String ETHUP; - - /** */ - @JsonProperty("BAND") - private String BAND; - - /** */ - @JsonProperty("POL") - private String POL; - - /** */ - @JsonProperty("ASTR") - private String ASTR; - - /** */ - @JsonProperty("NKN") - private String NKN; - - /** */ - @JsonProperty("RSR") - private String RSR; - - /** */ - @JsonProperty("DVPN") - private String DVPN; - - /** */ - @JsonProperty("TWT") - private String TWT; - - /** */ - @JsonProperty("ARB") - private String ARB; - - /** */ - @JsonProperty("CVC") - private String CVC; - - /** */ - @JsonProperty("ARC") - private String ARC; - - /** */ - @JsonProperty("XETA") - private String XETA; - - /** */ - @JsonProperty("MTRG") - private String MTRG; - - /** */ - @JsonProperty("LOKA") - private String LOKA; - - /** */ - @JsonProperty("LPOOL") - private String LPOOL; - - /** */ - @JsonProperty("TURBOS") - private String TURBOS; - - /** */ - @JsonProperty("CVX") - private String CVX; - - /** */ - @JsonProperty("ARX") - private String ARX; - - /** */ - @JsonProperty("MPLX") - private String MPLX; - - /** */ - @JsonProperty("SUSHI") - private String SUSHI; - - /** */ - @JsonProperty("NLK") - private String NLK; - - /** */ - @JsonProperty("PEPE2") - private String PEPE2; - - /** */ - @JsonProperty("WBTC") - private String WBTC; - - /** */ - @JsonProperty("SUI3L") - private String SUI3L; - - /** */ - @JsonProperty("CWS") - private String CWS; - - /** */ - @JsonProperty("SUI3S") - private String SUI3S; - - /** */ - @JsonProperty("INSP") - private String INSP; - - /** */ - @JsonProperty("MANA") - private String MANA; - - /** */ - @JsonProperty("VRTX") - private String VRTX; - - /** */ - @JsonProperty("CSPR") - private String CSPR; - - /** */ - @JsonProperty("ATA") - private String ATA; - - /** */ - @JsonProperty("OPEN") - private String OPEN; - - /** */ - @JsonProperty("HAI") - private String HAI; - - /** */ - @JsonProperty("NMR") - private String NMR; - - /** */ - @JsonProperty("ATH") - private String ATH; - - /** */ - @JsonProperty("LIT") - private String LIT; - - /** */ - @JsonProperty("TLOS") - private String TLOS; - - /** */ - @JsonProperty("TNSR") - private String TNSR; - - /** */ - @JsonProperty("CXT") - private String CXT; - - /** */ - @JsonProperty("POLYX") - private String POLYX; - - /** */ - @JsonProperty("ZERO") - private String ZERO; - - /** */ - @JsonProperty("ROUTE") - private String ROUTE; - - /** */ - @JsonProperty("LOOM") - private String LOOM; - - /** */ - @JsonProperty("PRE") - private String PRE; - - /** */ - @JsonProperty("VRAUP") - private String VRAUP; - - /** */ - @JsonProperty("HBB") - private String HBB; - - /** */ - @JsonProperty("RVN") - private String RVN; - - /** */ - @JsonProperty("PRQ") - private String PRQ; - - /** */ - @JsonProperty("ONDO") - private String ONDO; - - /** */ - @JsonProperty("PEPEDOWN") - private String PEPEDOWN; - - /** */ - @JsonProperty("WOOP") - private String WOOP; - - /** */ - @JsonProperty("LUNCUP") - private String LUNCUP; - - /** */ - @JsonProperty("KAVA") - private String KAVA; - - /** */ - @JsonProperty("LKI") - private String LKI; - - /** */ - @JsonProperty("AVA") - private String AVA; - - /** */ - @JsonProperty("NOM") - private String NOM; - - /** */ - @JsonProperty("MAPO") - private String MAPO; - - /** */ - @JsonProperty("PEPEUP") - private String PEPEUP; - - /** */ - @JsonProperty("STRAX") - private String STRAX; - - /** */ - @JsonProperty("NOT") - private String NOT; - - /** */ - @JsonProperty("ZERC") - private String ZERC; - - /** */ - @JsonProperty("BCUT") - private String BCUT; - - /** */ - @JsonProperty("MASA") - private String MASA; - - /** */ - @JsonProperty("WAN") - private String WAN; - - /** */ - @JsonProperty("WAT") - private String WAT; - - /** */ - @JsonProperty("WAX") - private String WAX; - - /** */ - @JsonProperty("MASK") - private String MASK; - - /** */ - @JsonProperty("EOS3L") - private String EOS3L; - - /** */ - @JsonProperty("IDEA") - private String IDEA; - - /** */ - @JsonProperty("EOS3S") - private String EOS3S; - - /** */ - @JsonProperty("YFI") - private String YFI; - - /** */ - @JsonProperty("MOODENG") - private String MOODENG; - - /** */ - @JsonProperty("XCUR") - private String XCUR; - - /** */ - @JsonProperty("HYDRA") - private String HYDRA; - - /** */ - @JsonProperty("POPCAT") - private String POPCAT; - - /** */ - @JsonProperty("LQTY") - private String LQTY; - - /** */ - @JsonProperty("PIXEL") - private String PIXEL; - - /** */ - @JsonProperty("LMR") - private String LMR; - - /** */ - @JsonProperty("ZETA") - private String ZETA; - - /** */ - @JsonProperty("YGG") - private String YGG; - - /** */ - @JsonProperty("AXS") - private String AXS; - - /** */ - @JsonProperty("BCHSV") - private String BCHSV; - - /** */ - @JsonProperty("NRN") - private String NRN; - - /** */ - @JsonProperty("FTON") - private String FTON; - - /** */ - @JsonProperty("COMP") - private String COMP; - - /** */ - @JsonProperty("XPRT") - private String XPRT; - - /** */ - @JsonProperty("HFT") - private String HFT; - - /** */ - @JsonProperty("UXLINK") - private String UXLINK; - - /** */ - @JsonProperty("STAMP") - private String STAMP; - - /** */ - @JsonProperty("RUNE") - private String RUNE; - - /** */ - @JsonProperty("ZEUS") - private String ZEUS; - - /** */ - @JsonProperty("LTC3L") - private String LTC3L; - - /** */ - @JsonProperty("DAPP") - private String DAPP; - - /** */ - @JsonProperty("FORTH") - private String FORTH; - - /** */ - @JsonProperty("ALPINE") - private String ALPINE; - - /** */ - @JsonProperty("SENSO") - private String SENSO; - - /** */ - @JsonProperty("LTC3S") - private String LTC3S; - - /** */ - @JsonProperty("DEXE") - private String DEXE; - - /** */ - @JsonProperty("GOAL") - private String GOAL; - - /** */ - @JsonProperty("AVAX") - private String AVAX; - - /** */ - @JsonProperty("LISTA") - private String LISTA; - - /** */ - @JsonProperty("AMPL") - private String AMPL; - - /** */ - @JsonProperty("WORK") - private String WORK; - - /** */ - @JsonProperty("BRWL") - private String BRWL; - - /** */ - @JsonProperty("BANANA") - private String BANANA; - - /** */ - @JsonProperty("PUSH") - private String PUSH; - - /** */ - @JsonProperty("WEN") - private String WEN; - - /** */ - @JsonProperty("NEIRO") - private String NEIRO; - - /** */ - @JsonProperty("BTCUP") - private String BTCUP; - - /** */ - @JsonProperty("SOL3S") - private String SOL3S; - - /** */ - @JsonProperty("BRAWL") - private String BRAWL; - - /** */ - @JsonProperty("LAY3R") - private String LAY3R; - - /** */ - @JsonProperty("LPT") - private String LPT; - - /** */ - @JsonProperty("GODS") - private String GODS; - - /** */ - @JsonProperty("SAND3S") - private String SAND3S; - - /** */ - @JsonProperty("RDNT") - private String RDNT; - - /** */ - @JsonProperty("SOL3L") - private String SOL3L; - - /** */ - @JsonProperty("NIBI") - private String NIBI; - - /** */ - @JsonProperty("NUM") - private String NUM; - - /** */ - @JsonProperty("PYR") - private String PYR; - - /** */ - @JsonProperty("DAG") - private String DAG; - - /** */ - @JsonProperty("DAI") - private String DAI; - - /** */ - @JsonProperty("HIP") - private String HIP; - - /** */ - @JsonProperty("DAO") - private String DAO; - - /** */ - @JsonProperty("AVAIL") - private String AVAIL; - - /** */ - @JsonProperty("DAR") - private String DAR; - - /** */ - @JsonProperty("FET") - private String FET; - - /** */ - @JsonProperty("FCON") - private String FCON; - - /** */ - @JsonProperty("XAVA") - private String XAVA; - - /** */ - @JsonProperty("LRC") - private String LRC; - - /** */ - @JsonProperty("UNI3S") - private String UNI3S; - - /** */ - @JsonProperty("POKT") - private String POKT; - - /** */ - @JsonProperty("DASH") - private String DASH; - - /** */ - @JsonProperty("BAKEDOWN") - private String BAKEDOWN; - - /** */ - @JsonProperty("POLC") - private String POLC; - - /** */ - @JsonProperty("CIRUS") - private String CIRUS; - - /** */ - @JsonProperty("UNI3L") - private String UNI3L; - - /** */ - @JsonProperty("NWC") - private String NWC; - - /** */ - @JsonProperty("POLK") - private String POLK; - - /** */ - @JsonProperty("LSD") - private String LSD; - - /** */ - @JsonProperty("MARS4") - private String MARS4; - - /** */ - @JsonProperty("LSK") - private String LSK; - - /** */ - @JsonProperty("BLOCK") - private String BLOCK; - - /** */ - @JsonProperty("ANALOS") - private String ANALOS; - - /** */ - @JsonProperty("SAFE") - private String SAFE; - - /** */ - @JsonProperty("DCK") - private String DCK; - - /** */ - @JsonProperty("LSS") - private String LSS; - - /** */ - @JsonProperty("DCR") - private String DCR; - - /** */ - @JsonProperty("LIKE") - private String LIKE; - - /** */ - @JsonProperty("DATA") - private String DATA; - - /** */ - @JsonProperty("WIF") - private String WIF; - - /** */ - @JsonProperty("BLOK") - private String BLOK; - - /** */ - @JsonProperty("LTC") - private String LTC; - - /** */ - @JsonProperty("METIS") - private String METIS; - - /** */ - @JsonProperty("WIN") - private String WIN; - - /** */ - @JsonProperty("HLG") - private String HLG; - - /** */ - @JsonProperty("LTO") - private String LTO; - - /** */ - @JsonProperty("DYDX") - private String DYDX; - - /** */ - @JsonProperty("ARB3S") - private String ARB3S; - - /** */ - @JsonProperty("MUBI") - private String MUBI; - - /** */ - @JsonProperty("ARB3L") - private String ARB3L; - - /** */ - @JsonProperty("RBTC1") - private String RBTC1; - - /** */ - @JsonProperty("POND") - private String POND; - - /** */ - @JsonProperty("LINA") - private String LINA; - - /** */ - @JsonProperty("MYRIA") - private String MYRIA; - - /** */ - @JsonProperty("LINK") - private String LINK; - - /** */ - @JsonProperty("QTUM") - private String QTUM; - - /** */ - @JsonProperty("TUNE") - private String TUNE; - - /** */ - @JsonProperty("UFO") - private String UFO; - - /** */ - @JsonProperty("CYBER") - private String CYBER; - - /** */ - @JsonProperty("WILD") - private String WILD; - - /** */ - @JsonProperty("POLS") - private String POLS; - - /** */ - @JsonProperty("NYM") - private String NYM; - - /** */ - @JsonProperty("FIL") - private String FIL; - - /** */ - @JsonProperty("BAL") - private String BAL; - - /** */ - @JsonProperty("SCA") - private String SCA; - - /** */ - @JsonProperty("STND") - private String STND; - - /** */ - @JsonProperty("WMTX") - private String WMTX; - - /** */ - @JsonProperty("SCLP") - private String SCLP; - - /** */ - @JsonProperty("MANEKI") - private String MANEKI; - - /** */ - @JsonProperty("BAT") - private String BAT; - - /** */ - @JsonProperty("AKRO") - private String AKRO; - - /** */ - @JsonProperty("FTM3L") - private String FTM3L; - - /** */ - @JsonProperty("BAX") - private String BAX; - - /** */ - @JsonProperty("FTM3S") - private String FTM3S; - - /** */ - @JsonProperty("COTI") - private String COTI; + @JsonProperty("data") + private Map data = new HashMap<>(); /** common response */ @JsonIgnore private RestResponse commonResponse; @@ -3607,4 +31,12 @@ public class GetFiatPriceResp public void setCommonResponse(RestResponse response) { this.commonResponse = response; } + + @JsonCreator + public static GetFiatPriceResp fromJson(Map data) { + // original response + GetFiatPriceResp obj = new GetFiatPriceResp(); + obj.data = data; + return obj; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.template index c296c373..259c8d6a 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.template @@ -356,902 +356,7 @@ builder.base(?).currencies(?); GetFiatPriceReq req = builder.build(); GetFiatPriceResp resp = this.api.getFiatPrice(req); - self::assertNotNull($resp->AGLD); - self::assertNotNull($resp->DFI); - self::assertNotNull($resp->PYTHUP); - self::assertNotNull($resp->ISLM); - self::assertNotNull($resp->NEAR); - self::assertNotNull($resp->AIOZ); - self::assertNotNull($resp->AUDIO); - self::assertNotNull($resp->BBL); - self::assertNotNull($resp->WLD); - self::assertNotNull($resp->HNT); - self::assertNotNull($resp->ETHFI); - self::assertNotNull($resp->DMAIL); - self::assertNotNull($resp->OPUP); - self::assertNotNull($resp->VET3S); - self::assertNotNull($resp->MANA3S); - self::assertNotNull($resp->TIDAL); - self::assertNotNull($resp->HALO); - self::assertNotNull($resp->OPUL); - self::assertNotNull($resp->MANA3L); - self::assertNotNull($resp->DGB); - self::assertNotNull($resp->AA); - self::assertNotNull($resp->BCH); - self::assertNotNull($resp->GMEE); - self::assertNotNull($resp->JST); - self::assertNotNull($resp->PBUX); - self::assertNotNull($resp->AR); - self::assertNotNull($resp->SEI); - self::assertNotNull($resp->PSTAKE); - self::assertNotNull($resp->LMWR); - self::assertNotNull($resp->UNFIDOWN); - self::assertNotNull($resp->BB); - self::assertNotNull($resp->JTO); - self::assertNotNull($resp->WEMIX); - self::assertNotNull($resp->G); - self::assertNotNull($resp->MARSH); - self::assertNotNull($resp->BN); - self::assertNotNull($resp->FLIP); - self::assertNotNull($resp->FLR); - self::assertNotNull($resp->BIGTIME); - self::assertNotNull($resp->FLY); - self::assertNotNull($resp->T); - self::assertNotNull($resp->W); - self::assertNotNull($resp->BDX); - self::assertNotNull($resp->BABYDOGE); - self::assertNotNull($resp->SFP); - self::assertNotNull($resp->DIA); - self::assertNotNull($resp->ISME); - self::assertNotNull($resp->LYM); - self::assertNotNull($resp->VET3L); - self::assertNotNull($resp->JUP); - self::assertNotNull($resp->LYX); - self::assertNotNull($resp->AIEPK); - self::assertNotNull($resp->SILLY); - self::assertNotNull($resp->SCPT); - self::assertNotNull($resp->WOO); - self::assertNotNull($resp->BLUR); - self::assertNotNull($resp->STRK); - self::assertNotNull($resp->BFC); - self::assertNotNull($resp->DC); - self::assertNotNull($resp->KARATE); - self::assertNotNull($resp->SUSHI3L); - self::assertNotNull($resp->NETVR); - self::assertNotNull($resp->WAVES); - self::assertNotNull($resp->LITH); - self::assertNotNull($resp->HAPI); - self::assertNotNull($resp->SUSHI3S); - self::assertNotNull($resp->CEEK); - self::assertNotNull($resp->FLOKI); - self::assertNotNull($resp->SHR); - self::assertNotNull($resp->SAND); - self::assertNotNull($resp->TURT); - self::assertNotNull($resp->UMA); - self::assertNotNull($resp->BEPRO); - self::assertNotNull($resp->SCRT); - self::assertNotNull($resp->TUSD); - self::assertNotNull($resp->COOKIE); - self::assertNotNull($resp->LRDS); - self::assertNotNull($resp->SIN); - self::assertNotNull($resp->OAS); - self::assertNotNull($resp->ROOT); - self::assertNotNull($resp->ADA3L); - self::assertNotNull($resp->TIAUP); - self::assertNotNull($resp->HTR); - self::assertNotNull($resp->UNB); - self::assertNotNull($resp->UNA); - self::assertNotNull($resp->HARD); - self::assertNotNull($resp->G3); - self::assertNotNull($resp->ADA3S); - self::assertNotNull($resp->MYRO); - self::assertNotNull($resp->HTX); - self::assertNotNull($resp->FT); - self::assertNotNull($resp->BTCDOWN); - self::assertNotNull($resp->UNI); - self::assertNotNull($resp->FX); - self::assertNotNull($resp->OBI); - self::assertNotNull($resp->UNO); - self::assertNotNull($resp->WRX); - self::assertNotNull($resp->TIADOWN); - self::assertNotNull($resp->ETHDOWN); - self::assertNotNull($resp->WELL); - self::assertNotNull($resp->SWFTC); - self::assertNotNull($resp->SKL); - self::assertNotNull($resp->UOS); - self::assertNotNull($resp->AIPAD); - self::assertNotNull($resp->BRETT); - self::assertNotNull($resp->SKY); - self::assertNotNull($resp->FRM); - self::assertNotNull($resp->VISION); - self::assertNotNull($resp->LENDS); - self::assertNotNull($resp->SLF); - self::assertNotNull($resp->BULL); - self::assertNotNull($resp->FLOW); - self::assertNotNull($resp->ODDZ); - self::assertNotNull($resp->SLN); - self::assertNotNull($resp->UPO); - self::assertNotNull($resp->SLP); - self::assertNotNull($resp->ID); - self::assertNotNull($resp->SLIM); - self::assertNotNull($resp->SPOT); - self::assertNotNull($resp->DOP); - self::assertNotNull($resp->ISSP); - self::assertNotNull($resp->UQC); - self::assertNotNull($resp->IO); - self::assertNotNull($resp->DOT); - self::assertNotNull($resp->_1INCH); - self::assertNotNull($resp->SMH); - self::assertNotNull($resp->MAK); - self::assertNotNull($resp->TOKO); - self::assertNotNull($resp->TURBO); - self::assertNotNull($resp->UNFI); - self::assertNotNull($resp->MAN); - self::assertNotNull($resp->EVER); - self::assertNotNull($resp->FTM); - self::assertNotNull($resp->SHRAP); - self::assertNotNull($resp->MAV); - self::assertNotNull($resp->MAX); - self::assertNotNull($resp->DPR); - self::assertNotNull($resp->FTT); - self::assertNotNull($resp->ARKM); - self::assertNotNull($resp->ATOM); - self::assertNotNull($resp->PENDLE); - self::assertNotNull($resp->QUICK); - self::assertNotNull($resp->BLZ); - self::assertNotNull($resp->BOBA); - self::assertNotNull($resp->MBL); - self::assertNotNull($resp->OFN); - self::assertNotNull($resp->UNIO); - self::assertNotNull($resp->SNS); - self::assertNotNull($resp->SNX); - self::assertNotNull($resp->NXRA); - self::assertNotNull($resp->TAIKO); - self::assertNotNull($resp->AVAX3L); - self::assertNotNull($resp->L3); - self::assertNotNull($resp->API3); - self::assertNotNull($resp->XRP3S); - self::assertNotNull($resp->QKC); - self::assertNotNull($resp->AVAX3S); - self::assertNotNull($resp->ROSE); - self::assertNotNull($resp->SATS); - self::assertNotNull($resp->BMX); - self::assertNotNull($resp->PORTAL); - self::assertNotNull($resp->TOMI); - self::assertNotNull($resp->XRP3L); - self::assertNotNull($resp->SOL); - self::assertNotNull($resp->SON); - self::assertNotNull($resp->BNC); - self::assertNotNull($resp->SOCIAL); - self::assertNotNull($resp->CGPT); - self::assertNotNull($resp->CELR); - self::assertNotNull($resp->BNB); - self::assertNotNull($resp->OGN); - self::assertNotNull($resp->CELO); - self::assertNotNull($resp->AUCTION); - self::assertNotNull($resp->MANTA); - self::assertNotNull($resp->LAYER); - self::assertNotNull($resp->AERO); - self::assertNotNull($resp->CETUS); - self::assertNotNull($resp->LL); - self::assertNotNull($resp->SPA); - self::assertNotNull($resp->PYTHDOWN); - self::assertNotNull($resp->NEIROCTO); - self::assertNotNull($resp->UTK); - self::assertNotNull($resp->GMRX); - self::assertNotNull($resp->BOB); - self::assertNotNull($resp->HOTCROSS); - self::assertNotNull($resp->AERGO); - self::assertNotNull($resp->MOCA); - self::assertNotNull($resp->SQD); - self::assertNotNull($resp->MV); - self::assertNotNull($resp->BNB3L); - self::assertNotNull($resp->BNB3S); - self::assertNotNull($resp->GALAX3L); - self::assertNotNull($resp->KAI); - self::assertNotNull($resp->SQR); - self::assertNotNull($resp->GALAX3S); - self::assertNotNull($resp->EGLD); - self::assertNotNull($resp->ZBCN); - self::assertNotNull($resp->KAS); - self::assertNotNull($resp->MEW); - self::assertNotNull($resp->PUNDIX); - self::assertNotNull($resp->LOOKS); - self::assertNotNull($resp->FXS); - self::assertNotNull($resp->BOSON); - self::assertNotNull($resp->BRISE); - self::assertNotNull($resp->AEVO); - self::assertNotNull($resp->FLUX); - self::assertNotNull($resp->PRCL); - self::assertNotNull($resp->UNFIUP); - self::assertNotNull($resp->SEIDOWN); - self::assertNotNull($resp->DOAI); - self::assertNotNull($resp->QNT); - self::assertNotNull($resp->REDO); - self::assertNotNull($resp->STRIKE); - self::assertNotNull($resp->ETHW); - self::assertNotNull($resp->OM); - self::assertNotNull($resp->OP); - self::assertNotNull($resp->WHALE); - self::assertNotNull($resp->_1CAT); - self::assertNotNull($resp->NEON); - self::assertNotNull($resp->GTAI); - self::assertNotNull($resp->SSV); - self::assertNotNull($resp->ETH2); - self::assertNotNull($resp->KCS); - self::assertNotNull($resp->ARPA); - self::assertNotNull($resp->ARTFI); - self::assertNotNull($resp->BRL); - self::assertNotNull($resp->ALEX); - self::assertNotNull($resp->STG); - self::assertNotNull($resp->SHIB); - self::assertNotNull($resp->IOTX); - self::assertNotNull($resp->OLE); - self::assertNotNull($resp->KDA); - self::assertNotNull($resp->CERE); - self::assertNotNull($resp->DOCK); - self::assertNotNull($resp->STX); - self::assertNotNull($resp->OLT); - self::assertNotNull($resp->QI); - self::assertNotNull($resp->SDAO); - self::assertNotNull($resp->BLAST); - self::assertNotNull($resp->LINK3S); - self::assertNotNull($resp->IOST); - self::assertNotNull($resp->SUI); - self::assertNotNull($resp->CAKE); - self::assertNotNull($resp->BSW); - self::assertNotNull($resp->OMG); - self::assertNotNull($resp->VOLT); - self::assertNotNull($resp->LINK3L); - self::assertNotNull($resp->GEEQ); - self::assertNotNull($resp->PYUSD); - self::assertNotNull($resp->SUN); - self::assertNotNull($resp->TOWER); - self::assertNotNull($resp->BTC); - self::assertNotNull($resp->IOTA); - self::assertNotNull($resp->REEF); - self::assertNotNull($resp->TRIAS); - self::assertNotNull($resp->KEY); - self::assertNotNull($resp->ETH3L); - self::assertNotNull($resp->BTT); - self::assertNotNull($resp->ONE); - self::assertNotNull($resp->RENDER); - self::assertNotNull($resp->ETH3S); - self::assertNotNull($resp->ANKR); - self::assertNotNull($resp->ALGO); - self::assertNotNull($resp->SYLO); - self::assertNotNull($resp->ZCX); - self::assertNotNull($resp->SD); - self::assertNotNull($resp->ONT); - self::assertNotNull($resp->MJT); - self::assertNotNull($resp->DYM); - self::assertNotNull($resp->DYP); - self::assertNotNull($resp->BAKEUP); - self::assertNotNull($resp->OOE); - self::assertNotNull($resp->ZELIX); - self::assertNotNull($resp->DOGE3L); - self::assertNotNull($resp->ARTY); - self::assertNotNull($resp->QORPO); - self::assertNotNull($resp->ICE); - self::assertNotNull($resp->NOTAI); - self::assertNotNull($resp->DOGE3S); - self::assertNotNull($resp->NAKA); - self::assertNotNull($resp->GALAX); - self::assertNotNull($resp->MKR); - self::assertNotNull($resp->DODO); - self::assertNotNull($resp->ICP); - self::assertNotNull($resp->ZEC); - self::assertNotNull($resp->ZEE); - self::assertNotNull($resp->ICX); - self::assertNotNull($resp->KMNO); - self::assertNotNull($resp->TT); - self::assertNotNull($resp->DOT3L); - self::assertNotNull($resp->XAI); - self::assertNotNull($resp->ZEN); - self::assertNotNull($resp->DOGE); - self::assertNotNull($resp->ALPHA); - self::assertNotNull($resp->DUSK); - self::assertNotNull($resp->DOT3S); - self::assertNotNull($resp->SXP); - self::assertNotNull($resp->HBAR); - self::assertNotNull($resp->SYNT); - self::assertNotNull($resp->ZEX); - self::assertNotNull($resp->BONDLY); - self::assertNotNull($resp->MLK); - self::assertNotNull($resp->KICKS); - self::assertNotNull($resp->PEPE); - self::assertNotNull($resp->OUSD); - self::assertNotNull($resp->LUNCDOWN); - self::assertNotNull($resp->DOGS); - self::assertNotNull($resp->REV3L); - self::assertNotNull($resp->CTSI); - self::assertNotNull($resp->C98); - self::assertNotNull($resp->OSMO); - self::assertNotNull($resp->NTRN); - self::assertNotNull($resp->CFX2S); - self::assertNotNull($resp->SYN); - self::assertNotNull($resp->VIDT); - self::assertNotNull($resp->SYS); - self::assertNotNull($resp->GAS); - self::assertNotNull($resp->BOME); - self::assertNotNull($resp->COMBO); - self::assertNotNull($resp->XCH); - self::assertNotNull($resp->VR); - self::assertNotNull($resp->CFX2L); - self::assertNotNull($resp->VSYS); - self::assertNotNull($resp->PANDORA); - self::assertNotNull($resp->THETA); - self::assertNotNull($resp->XCN); - self::assertNotNull($resp->NEXG); - self::assertNotNull($resp->MELOS); - self::assertNotNull($resp->XCV); - self::assertNotNull($resp->ORN); - self::assertNotNull($resp->WLKN); - self::assertNotNull($resp->AAVE); - self::assertNotNull($resp->MNT); - self::assertNotNull($resp->BONK); - self::assertNotNull($resp->PERP); - self::assertNotNull($resp->XDC); - self::assertNotNull($resp->MNW); - self::assertNotNull($resp->XDB); - self::assertNotNull($resp->BOND); - self::assertNotNull($resp->SUIA); - self::assertNotNull($resp->MOG); - self::assertNotNull($resp->SUTER); - self::assertNotNull($resp->TIME); - self::assertNotNull($resp->RACA); - self::assertNotNull($resp->BICO); - self::assertNotNull($resp->MON); - self::assertNotNull($resp->SWEAT); - self::assertNotNull($resp->MOXIE); - self::assertNotNull($resp->BABYBNB); - self::assertNotNull($resp->IGU); - self::assertNotNull($resp->HMSTR); - self::assertNotNull($resp->XEC); - self::assertNotNull($resp->MONI); - self::assertNotNull($resp->XR); - self::assertNotNull($resp->PEOPLE); - self::assertNotNull($resp->PUMLX); - self::assertNotNull($resp->ZIL); - self::assertNotNull($resp->WLDDOWN); - self::assertNotNull($resp->VAI); - self::assertNotNull($resp->XEN); - self::assertNotNull($resp->MPC); - self::assertNotNull($resp->XEM); - self::assertNotNull($resp->JASMY3S); - self::assertNotNull($resp->OTK); - self::assertNotNull($resp->TRAC); - self::assertNotNull($resp->DFYN); - self::assertNotNull($resp->BIDP); - self::assertNotNull($resp->JASMY3L); - self::assertNotNull($resp->INJDOWN); - self::assertNotNull($resp->KLV); - self::assertNotNull($resp->WAXL); - self::assertNotNull($resp->TRBDOWN); - self::assertNotNull($resp->BCH3L); - self::assertNotNull($resp->GMT3S); - self::assertNotNull($resp->KMD); - self::assertNotNull($resp->BCH3S); - self::assertNotNull($resp->ECOX); - self::assertNotNull($resp->AAVE3S); - self::assertNotNull($resp->GMT3L); - self::assertNotNull($resp->EPIK); - self::assertNotNull($resp->SUIP); - self::assertNotNull($resp->AAVE3L); - self::assertNotNull($resp->ZK); - self::assertNotNull($resp->ZKF); - self::assertNotNull($resp->OMNIA); - self::assertNotNull($resp->ZKJ); - self::assertNotNull($resp->ZKL); - self::assertNotNull($resp->GAFI); - self::assertNotNull($resp->CARV); - self::assertNotNull($resp->KNC); - self::assertNotNull($resp->CATS); - self::assertNotNull($resp->PROM); - self::assertNotNull($resp->ALEPH); - self::assertNotNull($resp->PONKE); - self::assertNotNull($resp->OVR); - self::assertNotNull($resp->CATI); - self::assertNotNull($resp->ORDER); - self::assertNotNull($resp->GFT); - self::assertNotNull($resp->BIFI); - self::assertNotNull($resp->GGC); - self::assertNotNull($resp->GGG); - self::assertNotNull($resp->DAPPX); - self::assertNotNull($resp->SUKU); - self::assertNotNull($resp->ULTI); - self::assertNotNull($resp->CREDI); - self::assertNotNull($resp->ERTHA); - self::assertNotNull($resp->FURY); - self::assertNotNull($resp->KARRAT); - self::assertNotNull($resp->MOBILE); - self::assertNotNull($resp->SIDUS); - self::assertNotNull($resp->NAVI); - self::assertNotNull($resp->TAO); - self::assertNotNull($resp->USDJ); - self::assertNotNull($resp->MTL); - self::assertNotNull($resp->VET); - self::assertNotNull($resp->FITFI); - self::assertNotNull($resp->USDT); - self::assertNotNull($resp->OXT); - self::assertNotNull($resp->CANDY); - self::assertNotNull($resp->USDP); - self::assertNotNull($resp->MTS); - self::assertNotNull($resp->TADA); - self::assertNotNull($resp->MTV); - self::assertNotNull($resp->NAVX); - self::assertNotNull($resp->ILV); - self::assertNotNull($resp->VINU); - self::assertNotNull($resp->GHX); - self::assertNotNull($resp->EDU); - self::assertNotNull($resp->HYVE); - self::assertNotNull($resp->BTC3L); - self::assertNotNull($resp->ANYONE); - self::assertNotNull($resp->BEAT); - self::assertNotNull($resp->KING); - self::assertNotNull($resp->CREAM); - self::assertNotNull($resp->CAS); - self::assertNotNull($resp->IMX); - self::assertNotNull($resp->CAT); - self::assertNotNull($resp->BTC3S); - self::assertNotNull($resp->USDE); - self::assertNotNull($resp->USDD); - self::assertNotNull($resp->CWAR); - self::assertNotNull($resp->USDC); - self::assertNotNull($resp->KRL); - self::assertNotNull($resp->INJ); - self::assertNotNull($resp->GAME); - self::assertNotNull($resp->TRIBL); - self::assertNotNull($resp->XLM); - self::assertNotNull($resp->TRBUP); - self::assertNotNull($resp->VRADOWN); - self::assertNotNull($resp->SUPER); - self::assertNotNull($resp->EIGEN); - self::assertNotNull($resp->IOI); - self::assertNotNull($resp->KSM); - self::assertNotNull($resp->CCD); - self::assertNotNull($resp->EGO); - self::assertNotNull($resp->EGP); - self::assertNotNull($resp->MXC); - self::assertNotNull($resp->TEL); - self::assertNotNull($resp->MOVR); - self::assertNotNull($resp->XMR); - self::assertNotNull($resp->MXM); - self::assertNotNull($resp->OORT); - self::assertNotNull($resp->GLM); - self::assertNotNull($resp->RAY); - self::assertNotNull($resp->XTAG); - self::assertNotNull($resp->GLQ); - self::assertNotNull($resp->CWEB); - self::assertNotNull($resp->REVU); - self::assertNotNull($resp->REVV); - self::assertNotNull($resp->ZRO); - self::assertNotNull($resp->XNL); - self::assertNotNull($resp->XNO); - self::assertNotNull($resp->SAROS); - self::assertNotNull($resp->KACE); - self::assertNotNull($resp->ZRX); - self::assertNotNull($resp->WLTH); - self::assertNotNull($resp->ATOM3L); - self::assertNotNull($resp->GMM); - self::assertNotNull($resp->BEER); - self::assertNotNull($resp->GMT); - self::assertNotNull($resp->HEART); - self::assertNotNull($resp->GMX); - self::assertNotNull($resp->ABBC); - self::assertNotNull($resp->OMNI); - self::assertNotNull($resp->ATOM3S); - self::assertNotNull($resp->IRL); - self::assertNotNull($resp->CFG); - self::assertNotNull($resp->WSDM); - self::assertNotNull($resp->GNS); - self::assertNotNull($resp->VANRY); - self::assertNotNull($resp->CFX); - self::assertNotNull($resp->GRAIL); - self::assertNotNull($resp->BEFI); - self::assertNotNull($resp->VELO); - self::assertNotNull($resp->XPR); - self::assertNotNull($resp->DOVI); - self::assertNotNull($resp->ACE); - self::assertNotNull($resp->ACH); - self::assertNotNull($resp->ISP); - self::assertNotNull($resp->XCAD); - self::assertNotNull($resp->MINA); - self::assertNotNull($resp->TIA); - self::assertNotNull($resp->DRIFT); - self::assertNotNull($resp->ACQ); - self::assertNotNull($resp->ACS); - self::assertNotNull($resp->MIND); - self::assertNotNull($resp->STORE); - self::assertNotNull($resp->REN); - self::assertNotNull($resp->ELA); - self::assertNotNull($resp->DREAMS); - self::assertNotNull($resp->ADA); - self::assertNotNull($resp->ELF); - self::assertNotNull($resp->REQ); - self::assertNotNull($resp->STORJ); - self::assertNotNull($resp->LADYS); - self::assertNotNull($resp->PAXG); - self::assertNotNull($resp->REZ); - self::assertNotNull($resp->XRD); - self::assertNotNull($resp->CHO); - self::assertNotNull($resp->CHR); - self::assertNotNull($resp->ADS); - self::assertNotNull($resp->CHZ); - self::assertNotNull($resp->ADX); - self::assertNotNull($resp->XRP); - self::assertNotNull($resp->JASMY); - self::assertNotNull($resp->KAGI); - self::assertNotNull($resp->FIDA); - self::assertNotNull($resp->PBR); - self::assertNotNull($resp->AEG); - self::assertNotNull($resp->H2O); - self::assertNotNull($resp->CHMB); - self::assertNotNull($resp->SAND3L); - self::assertNotNull($resp->PBX); - self::assertNotNull($resp->SOLVE); - self::assertNotNull($resp->DECHAT); - self::assertNotNull($resp->GARI); - self::assertNotNull($resp->SHIB2L); - self::assertNotNull($resp->SHIB2S); - self::assertNotNull($resp->ENA); - self::assertNotNull($resp->VEMP); - self::assertNotNull($resp->ENJ); - self::assertNotNull($resp->AFG); - self::assertNotNull($resp->RATS); - self::assertNotNull($resp->GRT); - self::assertNotNull($resp->FORWARD); - self::assertNotNull($resp->TFUEL); - self::assertNotNull($resp->ENS); - self::assertNotNull($resp->KASDOWN); - self::assertNotNull($resp->XTM); - self::assertNotNull($resp->DEGEN); - self::assertNotNull($resp->TLM); - self::assertNotNull($resp->DYDXDOWN); - self::assertNotNull($resp->CKB); - self::assertNotNull($resp->LUNC); - self::assertNotNull($resp->AURORA); - self::assertNotNull($resp->LUNA); - self::assertNotNull($resp->XTZ); - self::assertNotNull($resp->ELON); - self::assertNotNull($resp->DMTR); - self::assertNotNull($resp->EOS); - self::assertNotNull($resp->GST); - self::assertNotNull($resp->FORT); - self::assertNotNull($resp->FLAME); - self::assertNotNull($resp->PATEX); - self::assertNotNull($resp->DEEP); - self::assertNotNull($resp->ID3L); - self::assertNotNull($resp->GTC); - self::assertNotNull($resp->ID3S); - self::assertNotNull($resp->RIO); - self::assertNotNull($resp->CLH); - self::assertNotNull($resp->BURGER); - self::assertNotNull($resp->VRA); - self::assertNotNull($resp->SUNDOG); - self::assertNotNull($resp->GTT); - self::assertNotNull($resp->INJUP); - self::assertNotNull($resp->CPOOL); - self::assertNotNull($resp->EPX); - self::assertNotNull($resp->CLV); - self::assertNotNull($resp->FEAR); - self::assertNotNull($resp->MEME); - self::assertNotNull($resp->ROOBEE); - self::assertNotNull($resp->DEFI); - self::assertNotNull($resp->TOKEN); - self::assertNotNull($resp->GRAPE); - self::assertNotNull($resp->KASUP); - self::assertNotNull($resp->XWG); - self::assertNotNull($resp->SKEY); - self::assertNotNull($resp->SFUND); - self::assertNotNull($resp->EQX); - self::assertNotNull($resp->ORDIUP); - self::assertNotNull($resp->TON); - self::assertNotNull($resp->DEGO); - self::assertNotNull($resp->IZI); - self::assertNotNull($resp->ERG); - self::assertNotNull($resp->ERN); - self::assertNotNull($resp->VENOM); - self::assertNotNull($resp->VOXEL); - self::assertNotNull($resp->RLC); - self::assertNotNull($resp->PHA); - self::assertNotNull($resp->DYDXUP); - self::assertNotNull($resp->APE3S); - self::assertNotNull($resp->ORBS); - self::assertNotNull($resp->OPDOWN); - self::assertNotNull($resp->ESE); - self::assertNotNull($resp->APE3L); - self::assertNotNull($resp->HMND); - self::assertNotNull($resp->COQ); - self::assertNotNull($resp->AURY); - self::assertNotNull($resp->CULT); - self::assertNotNull($resp->AKT); - self::assertNotNull($resp->GLMR); - self::assertNotNull($resp->XYM); - self::assertNotNull($resp->ORAI); - self::assertNotNull($resp->XYO); - self::assertNotNull($resp->ETC); - self::assertNotNull($resp->LAI); - self::assertNotNull($resp->PIP); - self::assertNotNull($resp->ETH); - self::assertNotNull($resp->NEO); - self::assertNotNull($resp->RMV); - self::assertNotNull($resp->KLAY); - self::assertNotNull($resp->PIT); - self::assertNotNull($resp->TARA); - self::assertNotNull($resp->KALT); - self::assertNotNull($resp->PIX); - self::assertNotNull($resp->ETN); - self::assertNotNull($resp->CSIX); - self::assertNotNull($resp->TRADE); - self::assertNotNull($resp->MAVIA); - self::assertNotNull($resp->HIGH); - self::assertNotNull($resp->TRB); - self::assertNotNull($resp->ORDI); - self::assertNotNull($resp->TRVL); - self::assertNotNull($resp->AMB); - self::assertNotNull($resp->TRU); - self::assertNotNull($resp->LOGX); - self::assertNotNull($resp->FINC); - self::assertNotNull($resp->INFRA); - self::assertNotNull($resp->NATIX); - self::assertNotNull($resp->NFP); - self::assertNotNull($resp->TRY); - self::assertNotNull($resp->TRX); - self::assertNotNull($resp->LBP); - self::assertNotNull($resp->LBR); - self::assertNotNull($resp->EUL); - self::assertNotNull($resp->NFT); - self::assertNotNull($resp->SEIUP); - self::assertNotNull($resp->PUFFER); - self::assertNotNull($resp->EUR); - self::assertNotNull($resp->ORCA); - self::assertNotNull($resp->NEAR3L); - self::assertNotNull($resp->AMP); - self::assertNotNull($resp->XDEFI); - self::assertNotNull($resp->HIFI); - self::assertNotNull($resp->TRUF); - self::assertNotNull($resp->AITECH); - self::assertNotNull($resp->AMU); - self::assertNotNull($resp->USTC); - self::assertNotNull($resp->KNGL); - self::assertNotNull($resp->FOXY); - self::assertNotNull($resp->NGC); - self::assertNotNull($resp->TENET); - self::assertNotNull($resp->NEAR3S); - self::assertNotNull($resp->MAHA); - self::assertNotNull($resp->NGL); - self::assertNotNull($resp->TST); - self::assertNotNull($resp->HIPPO); - self::assertNotNull($resp->AXS3S); - self::assertNotNull($resp->CRO); - self::assertNotNull($resp->ZPAY); - self::assertNotNull($resp->MNDE); - self::assertNotNull($resp->CRV); - self::assertNotNull($resp->SWASH); - self::assertNotNull($resp->AXS3L); - self::assertNotNull($resp->VERSE); - self::assertNotNull($resp->RPK); - self::assertNotNull($resp->RPL); - self::assertNotNull($resp->AZERO); - self::assertNotNull($resp->SOUL); - self::assertNotNull($resp->VXV); - self::assertNotNull($resp->LDO); - self::assertNotNull($resp->MAGIC); - self::assertNotNull($resp->ALICE); - self::assertNotNull($resp->SEAM); - self::assertNotNull($resp->PLU); - self::assertNotNull($resp->AOG); - self::assertNotNull($resp->SMOLE); - self::assertNotNull($resp->EWT); - self::assertNotNull($resp->TSUGT); - self::assertNotNull($resp->PMG); - self::assertNotNull($resp->OPAI); - self::assertNotNull($resp->LOCUS); - self::assertNotNull($resp->CTA); - self::assertNotNull($resp->NIM); - self::assertNotNull($resp->CTC); - self::assertNotNull($resp->APE); - self::assertNotNull($resp->MERL); - self::assertNotNull($resp->JAM); - self::assertNotNull($resp->CTI); - self::assertNotNull($resp->APP); - self::assertNotNull($resp->APT); - self::assertNotNull($resp->WLDUP); - self::assertNotNull($resp->ZEND); - self::assertNotNull($resp->FIRE); - self::assertNotNull($resp->DENT); - self::assertNotNull($resp->PYTH); - self::assertNotNull($resp->LFT); - self::assertNotNull($resp->DPET); - self::assertNotNull($resp->ORDIDOWN); - self::assertNotNull($resp->KPOL); - self::assertNotNull($resp->ETHUP); - self::assertNotNull($resp->BAND); - self::assertNotNull($resp->POL); - self::assertNotNull($resp->ASTR); - self::assertNotNull($resp->NKN); - self::assertNotNull($resp->RSR); - self::assertNotNull($resp->DVPN); - self::assertNotNull($resp->TWT); - self::assertNotNull($resp->ARB); - self::assertNotNull($resp->CVC); - self::assertNotNull($resp->ARC); - self::assertNotNull($resp->XETA); - self::assertNotNull($resp->MTRG); - self::assertNotNull($resp->LOKA); - self::assertNotNull($resp->LPOOL); - self::assertNotNull($resp->TURBOS); - self::assertNotNull($resp->CVX); - self::assertNotNull($resp->ARX); - self::assertNotNull($resp->MPLX); - self::assertNotNull($resp->SUSHI); - self::assertNotNull($resp->NLK); - self::assertNotNull($resp->PEPE2); - self::assertNotNull($resp->WBTC); - self::assertNotNull($resp->SUI3L); - self::assertNotNull($resp->CWS); - self::assertNotNull($resp->SUI3S); - self::assertNotNull($resp->INSP); - self::assertNotNull($resp->MANA); - self::assertNotNull($resp->VRTX); - self::assertNotNull($resp->CSPR); - self::assertNotNull($resp->ATA); - self::assertNotNull($resp->OPEN); - self::assertNotNull($resp->HAI); - self::assertNotNull($resp->NMR); - self::assertNotNull($resp->ATH); - self::assertNotNull($resp->LIT); - self::assertNotNull($resp->TLOS); - self::assertNotNull($resp->TNSR); - self::assertNotNull($resp->CXT); - self::assertNotNull($resp->POLYX); - self::assertNotNull($resp->ZERO); - self::assertNotNull($resp->ROUTE); - self::assertNotNull($resp->LOOM); - self::assertNotNull($resp->PRE); - self::assertNotNull($resp->VRAUP); - self::assertNotNull($resp->HBB); - self::assertNotNull($resp->RVN); - self::assertNotNull($resp->PRQ); - self::assertNotNull($resp->ONDO); - self::assertNotNull($resp->PEPEDOWN); - self::assertNotNull($resp->WOOP); - self::assertNotNull($resp->LUNCUP); - self::assertNotNull($resp->KAVA); - self::assertNotNull($resp->LKI); - self::assertNotNull($resp->AVA); - self::assertNotNull($resp->NOM); - self::assertNotNull($resp->MAPO); - self::assertNotNull($resp->PEPEUP); - self::assertNotNull($resp->STRAX); - self::assertNotNull($resp->NOT); - self::assertNotNull($resp->ZERC); - self::assertNotNull($resp->BCUT); - self::assertNotNull($resp->MASA); - self::assertNotNull($resp->WAN); - self::assertNotNull($resp->WAT); - self::assertNotNull($resp->WAX); - self::assertNotNull($resp->MASK); - self::assertNotNull($resp->EOS3L); - self::assertNotNull($resp->IDEA); - self::assertNotNull($resp->EOS3S); - self::assertNotNull($resp->YFI); - self::assertNotNull($resp->MOODENG); - self::assertNotNull($resp->XCUR); - self::assertNotNull($resp->HYDRA); - self::assertNotNull($resp->POPCAT); - self::assertNotNull($resp->LQTY); - self::assertNotNull($resp->PIXEL); - self::assertNotNull($resp->LMR); - self::assertNotNull($resp->ZETA); - self::assertNotNull($resp->YGG); - self::assertNotNull($resp->AXS); - self::assertNotNull($resp->BCHSV); - self::assertNotNull($resp->NRN); - self::assertNotNull($resp->FTON); - self::assertNotNull($resp->COMP); - self::assertNotNull($resp->XPRT); - self::assertNotNull($resp->HFT); - self::assertNotNull($resp->UXLINK); - self::assertNotNull($resp->STAMP); - self::assertNotNull($resp->RUNE); - self::assertNotNull($resp->ZEUS); - self::assertNotNull($resp->LTC3L); - self::assertNotNull($resp->DAPP); - self::assertNotNull($resp->FORTH); - self::assertNotNull($resp->ALPINE); - self::assertNotNull($resp->SENSO); - self::assertNotNull($resp->LTC3S); - self::assertNotNull($resp->DEXE); - self::assertNotNull($resp->GOAL); - self::assertNotNull($resp->AVAX); - self::assertNotNull($resp->LISTA); - self::assertNotNull($resp->AMPL); - self::assertNotNull($resp->WORK); - self::assertNotNull($resp->BRWL); - self::assertNotNull($resp->BANANA); - self::assertNotNull($resp->PUSH); - self::assertNotNull($resp->WEN); - self::assertNotNull($resp->NEIRO); - self::assertNotNull($resp->BTCUP); - self::assertNotNull($resp->SOL3S); - self::assertNotNull($resp->BRAWL); - self::assertNotNull($resp->LAY3R); - self::assertNotNull($resp->LPT); - self::assertNotNull($resp->GODS); - self::assertNotNull($resp->SAND3S); - self::assertNotNull($resp->RDNT); - self::assertNotNull($resp->SOL3L); - self::assertNotNull($resp->NIBI); - self::assertNotNull($resp->NUM); - self::assertNotNull($resp->PYR); - self::assertNotNull($resp->DAG); - self::assertNotNull($resp->DAI); - self::assertNotNull($resp->HIP); - self::assertNotNull($resp->DAO); - self::assertNotNull($resp->AVAIL); - self::assertNotNull($resp->DAR); - self::assertNotNull($resp->FET); - self::assertNotNull($resp->FCON); - self::assertNotNull($resp->XAVA); - self::assertNotNull($resp->LRC); - self::assertNotNull($resp->UNI3S); - self::assertNotNull($resp->POKT); - self::assertNotNull($resp->DASH); - self::assertNotNull($resp->BAKEDOWN); - self::assertNotNull($resp->POLC); - self::assertNotNull($resp->CIRUS); - self::assertNotNull($resp->UNI3L); - self::assertNotNull($resp->NWC); - self::assertNotNull($resp->POLK); - self::assertNotNull($resp->LSD); - self::assertNotNull($resp->MARS4); - self::assertNotNull($resp->LSK); - self::assertNotNull($resp->BLOCK); - self::assertNotNull($resp->ANALOS); - self::assertNotNull($resp->SAFE); - self::assertNotNull($resp->DCK); - self::assertNotNull($resp->LSS); - self::assertNotNull($resp->DCR); - self::assertNotNull($resp->LIKE); - self::assertNotNull($resp->DATA); - self::assertNotNull($resp->WIF); - self::assertNotNull($resp->BLOK); - self::assertNotNull($resp->LTC); - self::assertNotNull($resp->METIS); - self::assertNotNull($resp->WIN); - self::assertNotNull($resp->HLG); - self::assertNotNull($resp->LTO); - self::assertNotNull($resp->DYDX); - self::assertNotNull($resp->ARB3S); - self::assertNotNull($resp->MUBI); - self::assertNotNull($resp->ARB3L); - self::assertNotNull($resp->RBTC1); - self::assertNotNull($resp->POND); - self::assertNotNull($resp->LINA); - self::assertNotNull($resp->MYRIA); - self::assertNotNull($resp->LINK); - self::assertNotNull($resp->QTUM); - self::assertNotNull($resp->TUNE); - self::assertNotNull($resp->UFO); - self::assertNotNull($resp->CYBER); - self::assertNotNull($resp->WILD); - self::assertNotNull($resp->POLS); - self::assertNotNull($resp->NYM); - self::assertNotNull($resp->FIL); - self::assertNotNull($resp->BAL); - self::assertNotNull($resp->SCA); - self::assertNotNull($resp->STND); - self::assertNotNull($resp->WMTX); - self::assertNotNull($resp->SCLP); - self::assertNotNull($resp->MANEKI); - self::assertNotNull($resp->BAT); - self::assertNotNull($resp->AKRO); - self::assertNotNull($resp->FTM3L); - self::assertNotNull($resp->BAX); - self::assertNotNull($resp->FTM3S); - self::assertNotNull($resp->COTI); + self::assertNotNull($resp->data); Logger::info($resp->jsonSerialize($this->serializer)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java index 01e9711f..2e4371a2 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java @@ -39,8 +39,8 @@ public static void testGetAnnouncementsResponse() throws Exception { + " \\\"latest-announcements\\\"\\n" + " ],\\n" + " \\\"annDesc\\\": \\\"To enrich the variety of assets" - + " available,KuCoins Isolated Margin Trading platform has added the Scroll (SCR)asset" - + " and trading pair.\\\",\\n" + + " available,\\xa0KuCoin\\u2019s Isolated Margin Trading platform has added the Scroll" + + " (SCR)\\xa0asset and trading pair.\\\",\\n" + " \\\"cTime\\\": 1729594043000,\\n" + " \\\"language\\\": \\\"en_US\\\",\\n" + " \\\"annUrl\\\":" @@ -70,7 +70,8 @@ public static void testGetAnnouncementsResponse() throws Exception { + " \\\"latest-announcements\\\",\\n" + " \\\"new-listings\\\"\\n" + " ],\\n" - + " \\\"annDesc\\\": \\\"Trading:11:00 on October 22, 2024 (UTC)\\\",\\n" + + " \\\"annDesc\\\": \\\"Trading:\\xa011:00 on October 22, 2024" + + " (UTC)\\\",\\n" + " \\\"cTime\\\": 1729497729000,\\n" + " \\\"language\\\": \\\"en_US\\\",\\n" + " \\\"annUrl\\\":" diff --git a/spec/original/meta.json b/spec/original/meta.json index 80ac43f0..324aac8b 100644 --- a/spec/original/meta.json +++ b/spec/original/meta.json @@ -9001,3594 +9001,10 @@ }, "data": { "type": "object", - "properties": { - "AGLD": { - "type": "string" - }, - "DFI": { - "type": "string" - }, - "PYTHUP": { - "type": "string" - }, - "ISLM": { - "type": "string" - }, - "NEAR": { - "type": "string" - }, - "AIOZ": { - "type": "string" - }, - "AUDIO": { - "type": "string" - }, - "BBL": { - "type": "string" - }, - "WLD": { - "type": "string" - }, - "HNT": { - "type": "string" - }, - "ETHFI": { - "type": "string" - }, - "DMAIL": { - "type": "string" - }, - "OPUP": { - "type": "string" - }, - "VET3S": { - "type": "string" - }, - "MANA3S": { - "type": "string" - }, - "TIDAL": { - "type": "string" - }, - "HALO": { - "type": "string" - }, - "OPUL": { - "type": "string" - }, - "MANA3L": { - "type": "string" - }, - "DGB": { - "type": "string" - }, - "AA": { - "type": "string" - }, - "BCH": { - "type": "string" - }, - "GMEE": { - "type": "string" - }, - "JST": { - "type": "string" - }, - "PBUX": { - "type": "string" - }, - "AR": { - "type": "string" - }, - "SEI": { - "type": "string" - }, - "PSTAKE": { - "type": "string" - }, - "LMWR": { - "type": "string" - }, - "UNFIDOWN": { - "type": "string" - }, - "BB": { - "type": "string" - }, - "JTO": { - "type": "string" - }, - "WEMIX": { - "type": "string" - }, - "G": { - "type": "string" - }, - "MARSH": { - "type": "string" - }, - "BN": { - "type": "string" - }, - "FLIP": { - "type": "string" - }, - "FLR": { - "type": "string" - }, - "BIGTIME": { - "type": "string" - }, - "FLY": { - "type": "string" - }, - "T": { - "type": "string" - }, - "W": { - "type": "string" - }, - "BDX": { - "type": "string" - }, - "BABYDOGE": { - "type": "string" - }, - "SFP": { - "type": "string" - }, - "DIA": { - "type": "string" - }, - "ISME": { - "type": "string" - }, - "LYM": { - "type": "string" - }, - "VET3L": { - "type": "string" - }, - "JUP": { - "type": "string" - }, - "LYX": { - "type": "string" - }, - "AIEPK": { - "type": "string" - }, - "SILLY": { - "type": "string" - }, - "SCPT": { - "type": "string" - }, - "WOO": { - "type": "string" - }, - "BLUR": { - "type": "string" - }, - "STRK": { - "type": "string" - }, - "BFC": { - "type": "string" - }, - "DC": { - "type": "string" - }, - "KARATE": { - "type": "string" - }, - "SUSHI3L": { - "type": "string" - }, - "NETVR": { - "type": "string" - }, - "WAVES": { - "type": "string" - }, - "LITH": { - "type": "string" - }, - "HAPI": { - "type": "string" - }, - "SUSHI3S": { - "type": "string" - }, - "CEEK": { - "type": "string" - }, - "FLOKI": { - "type": "string" - }, - "SHR": { - "type": "string" - }, - "SAND": { - "type": "string" - }, - "TURT": { - "type": "string" - }, - "UMA": { - "type": "string" - }, - "BEPRO": { - "type": "string" - }, - "SCRT": { - "type": "string" - }, - "TUSD": { - "type": "string" - }, - "COOKIE": { - "type": "string" - }, - "LRDS": { - "type": "string" - }, - "SIN": { - "type": "string" - }, - "OAS": { - "type": "string" - }, - "ROOT": { - "type": "string" - }, - "ADA3L": { - "type": "string" - }, - "TIAUP": { - "type": "string" - }, - "HTR": { - "type": "string" - }, - "UNB": { - "type": "string" - }, - "UNA": { - "type": "string" - }, - "HARD": { - "type": "string" - }, - "G3": { - "type": "string" - }, - "ADA3S": { - "type": "string" - }, - "MYRO": { - "type": "string" - }, - "HTX": { - "type": "string" - }, - "FT": { - "type": "string" - }, - "BTCDOWN": { - "type": "string" - }, - "UNI": { - "type": "string" - }, - "FX": { - "type": "string" - }, - "OBI": { - "type": "string" - }, - "UNO": { - "type": "string" - }, - "WRX": { - "type": "string" - }, - "TIADOWN": { - "type": "string" - }, - "ETHDOWN": { - "type": "string" - }, - "WELL": { - "type": "string" - }, - "SWFTC": { - "type": "string" - }, - "SKL": { - "type": "string" - }, - "UOS": { - "type": "string" - }, - "AIPAD": { - "type": "string" - }, - "BRETT": { - "type": "string" - }, - "SKY": { - "type": "string" - }, - "FRM": { - "type": "string" - }, - "VISION": { - "type": "string" - }, - "LENDS": { - "type": "string" - }, - "SLF": { - "type": "string" - }, - "BULL": { - "type": "string" - }, - "FLOW": { - "type": "string" - }, - "ODDZ": { - "type": "string" - }, - "SLN": { - "type": "string" - }, - "UPO": { - "type": "string" - }, - "SLP": { - "type": "string" - }, - "ID": { - "type": "string" - }, - "SLIM": { - "type": "string" - }, - "SPOT": { - "type": "string" - }, - "DOP": { - "type": "string" - }, - "ISSP": { - "type": "string" - }, - "UQC": { - "type": "string" - }, - "IO": { - "type": "string" - }, - "DOT": { - "type": "string" - }, - "1INCH": { - "type": "string" - }, - "SMH": { - "type": "string" - }, - "MAK": { - "type": "string" - }, - "TOKO": { - "type": "string" - }, - "TURBO": { - "type": "string" - }, - "UNFI": { - "type": "string" - }, - "MAN": { - "type": "string" - }, - "EVER": { - "type": "string" - }, - "FTM": { - "type": "string" - }, - "SHRAP": { - "type": "string" - }, - "MAV": { - "type": "string" - }, - "MAX": { - "type": "string" - }, - "DPR": { - "type": "string" - }, - "FTT": { - "type": "string" - }, - "ARKM": { - "type": "string" - }, - "ATOM": { - "type": "string" - }, - "PENDLE": { - "type": "string" - }, - "QUICK": { - "type": "string" - }, - "BLZ": { - "type": "string" - }, - "BOBA": { - "type": "string" - }, - "MBL": { - "type": "string" - }, - "OFN": { - "type": "string" - }, - "UNIO": { - "type": "string" - }, - "SNS": { - "type": "string" - }, - "SNX": { - "type": "string" - }, - "NXRA": { - "type": "string" - }, - "TAIKO": { - "type": "string" - }, - "AVAX3L": { - "type": "string" - }, - "L3": { - "type": "string" - }, - "API3": { - "type": "string" - }, - "XRP3S": { - "type": "string" - }, - "QKC": { - "type": "string" - }, - "AVAX3S": { - "type": "string" - }, - "ROSE": { - "type": "string" - }, - "SATS": { - "type": "string" - }, - "BMX": { - "type": "string" - }, - "PORTAL": { - "type": "string" - }, - "TOMI": { - "type": "string" - }, - "XRP3L": { - "type": "string" - }, - "SOL": { - "type": "string" - }, - "SON": { - "type": "string" - }, - "BNC": { - "type": "string" - }, - "SOCIAL": { - "type": "string" - }, - "CGPT": { - "type": "string" - }, - "CELR": { - "type": "string" - }, - "BNB": { - "type": "string" - }, - "OGN": { - "type": "string" - }, - "CELO": { - "type": "string" - }, - "AUCTION": { - "type": "string" - }, - "MANTA": { - "type": "string" - }, - "LAYER": { - "type": "string" - }, - "AERO": { - "type": "string" - }, - "CETUS": { - "type": "string" - }, - "LL": { - "type": "string" - }, - "SPA": { - "type": "string" - }, - "PYTHDOWN": { - "type": "string" - }, - "NEIROCTO": { - "type": "string" - }, - "UTK": { - "type": "string" - }, - "GMRX": { - "type": "string" - }, - "BOB": { - "type": "string" - }, - "HOTCROSS": { - "type": "string" - }, - "AERGO": { - "type": "string" - }, - "MOCA": { - "type": "string" - }, - "SQD": { - "type": "string" - }, - "MV": { - "type": "string" - }, - "BNB3L": { - "type": "string" - }, - "BNB3S": { - "type": "string" - }, - "GALAX3L": { - "type": "string" - }, - "KAI": { - "type": "string" - }, - "SQR": { - "type": "string" - }, - "GALAX3S": { - "type": "string" - }, - "EGLD": { - "type": "string" - }, - "ZBCN": { - "type": "string" - }, - "KAS": { - "type": "string" - }, - "MEW": { - "type": "string" - }, - "PUNDIX": { - "type": "string" - }, - "LOOKS": { - "type": "string" - }, - "FXS": { - "type": "string" - }, - "BOSON": { - "type": "string" - }, - "BRISE": { - "type": "string" - }, - "AEVO": { - "type": "string" - }, - "FLUX": { - "type": "string" - }, - "PRCL": { - "type": "string" - }, - "UNFIUP": { - "type": "string" - }, - "SEIDOWN": { - "type": "string" - }, - "DOAI": { - "type": "string" - }, - "QNT": { - "type": "string" - }, - "REDO": { - "type": "string" - }, - "STRIKE": { - "type": "string" - }, - "ETHW": { - "type": "string" - }, - "OM": { - "type": "string" - }, - "OP": { - "type": "string" - }, - "WHALE": { - "type": "string" - }, - "1CAT": { - "type": "string" - }, - "NEON": { - "type": "string" - }, - "GTAI": { - "type": "string" - }, - "SSV": { - "type": "string" - }, - "ETH2": { - "type": "string" - }, - "KCS": { - "type": "string" - }, - "ARPA": { - "type": "string" - }, - "ARTFI": { - "type": "string" - }, - "BRL": { - "type": "string" - }, - "ALEX": { - "type": "string" - }, - "STG": { - "type": "string" - }, - "SHIB": { - "type": "string" - }, - "IOTX": { - "type": "string" - }, - "OLE": { - "type": "string" - }, - "KDA": { - "type": "string" - }, - "CERE": { - "type": "string" - }, - "DOCK": { - "type": "string" - }, - "STX": { - "type": "string" - }, - "OLT": { - "type": "string" - }, - "QI": { - "type": "string" - }, - "SDAO": { - "type": "string" - }, - "BLAST": { - "type": "string" - }, - "LINK3S": { - "type": "string" - }, - "IOST": { - "type": "string" - }, - "SUI": { - "type": "string" - }, - "CAKE": { - "type": "string" - }, - "BSW": { - "type": "string" - }, - "OMG": { - "type": "string" - }, - "VOLT": { - "type": "string" - }, - "LINK3L": { - "type": "string" - }, - "GEEQ": { - "type": "string" - }, - "PYUSD": { - "type": "string" - }, - "SUN": { - "type": "string" - }, - "TOWER": { - "type": "string" - }, - "BTC": { - "type": "string" - }, - "IOTA": { - "type": "string" - }, - "REEF": { - "type": "string" - }, - "TRIAS": { - "type": "string" - }, - "KEY": { - "type": "string" - }, - "ETH3L": { - "type": "string" - }, - "BTT": { - "type": "string" - }, - "ONE": { - "type": "string" - }, - "RENDER": { - "type": "string" - }, - "ETH3S": { - "type": "string" - }, - "ANKR": { - "type": "string" - }, - "ALGO": { - "type": "string" - }, - "SYLO": { - "type": "string" - }, - "ZCX": { - "type": "string" - }, - "SD": { - "type": "string" - }, - "ONT": { - "type": "string" - }, - "MJT": { - "type": "string" - }, - "DYM": { - "type": "string" - }, - "DYP": { - "type": "string" - }, - "BAKEUP": { - "type": "string" - }, - "OOE": { - "type": "string" - }, - "ZELIX": { - "type": "string" - }, - "DOGE3L": { - "type": "string" - }, - "ARTY": { - "type": "string" - }, - "QORPO": { - "type": "string" - }, - "ICE": { - "type": "string" - }, - "NOTAI": { - "type": "string" - }, - "DOGE3S": { - "type": "string" - }, - "NAKA": { - "type": "string" - }, - "GALAX": { - "type": "string" - }, - "MKR": { - "type": "string" - }, - "DODO": { - "type": "string" - }, - "ICP": { - "type": "string" - }, - "ZEC": { - "type": "string" - }, - "ZEE": { - "type": "string" - }, - "ICX": { - "type": "string" - }, - "KMNO": { - "type": "string" - }, - "TT": { - "type": "string" - }, - "DOT3L": { - "type": "string" - }, - "XAI": { - "type": "string" - }, - "ZEN": { - "type": "string" - }, - "DOGE": { - "type": "string" - }, - "ALPHA": { - "type": "string" - }, - "DUSK": { - "type": "string" - }, - "DOT3S": { - "type": "string" - }, - "SXP": { - "type": "string" - }, - "HBAR": { - "type": "string" - }, - "SYNT": { - "type": "string" - }, - "ZEX": { - "type": "string" - }, - "BONDLY": { - "type": "string" - }, - "MLK": { - "type": "string" - }, - "KICKS": { - "type": "string" - }, - "PEPE": { - "type": "string" - }, - "OUSD": { - "type": "string" - }, - "LUNCDOWN": { - "type": "string" - }, - "DOGS": { - "type": "string" - }, - "REV3L": { - "type": "string" - }, - "CTSI": { - "type": "string" - }, - "C98": { - "type": "string" - }, - "OSMO": { - "type": "string" - }, - "NTRN": { - "type": "string" - }, - "CFX2S": { - "type": "string" - }, - "SYN": { - "type": "string" - }, - "VIDT": { - "type": "string" - }, - "SYS": { - "type": "string" - }, - "GAS": { - "type": "string" - }, - "BOME": { - "type": "string" - }, - "COMBO": { - "type": "string" - }, - "XCH": { - "type": "string" - }, - "VR": { - "type": "string" - }, - "CFX2L": { - "type": "string" - }, - "VSYS": { - "type": "string" - }, - "PANDORA": { - "type": "string" - }, - "THETA": { - "type": "string" - }, - "XCN": { - "type": "string" - }, - "NEXG": { - "type": "string" - }, - "MELOS": { - "type": "string" - }, - "XCV": { - "type": "string" - }, - "ORN": { - "type": "string" - }, - "WLKN": { - "type": "string" - }, - "AAVE": { - "type": "string" - }, - "MNT": { - "type": "string" - }, - "BONK": { - "type": "string" - }, - "PERP": { - "type": "string" - }, - "XDC": { - "type": "string" - }, - "MNW": { - "type": "string" - }, - "XDB": { - "type": "string" - }, - "BOND": { - "type": "string" - }, - "SUIA": { - "type": "string" - }, - "MOG": { - "type": "string" - }, - "SUTER": { - "type": "string" - }, - "TIME": { - "type": "string" - }, - "RACA": { - "type": "string" - }, - "BICO": { - "type": "string" - }, - "MON": { - "type": "string" - }, - "SWEAT": { - "type": "string" - }, - "MOXIE": { - "type": "string" - }, - "BABYBNB": { - "type": "string" - }, - "IGU": { - "type": "string" - }, - "HMSTR": { - "type": "string" - }, - "XEC": { - "type": "string" - }, - "MONI": { - "type": "string" - }, - "XR": { - "type": "string" - }, - "PEOPLE": { - "type": "string" - }, - "PUMLX": { - "type": "string" - }, - "ZIL": { - "type": "string" - }, - "WLDDOWN": { - "type": "string" - }, - "VAI": { - "type": "string" - }, - "XEN": { - "type": "string" - }, - "MPC": { - "type": "string" - }, - "XEM": { - "type": "string" - }, - "JASMY3S": { - "type": "string" - }, - "OTK": { - "type": "string" - }, - "TRAC": { - "type": "string" - }, - "DFYN": { - "type": "string" - }, - "BIDP": { - "type": "string" - }, - "JASMY3L": { - "type": "string" - }, - "INJDOWN": { - "type": "string" - }, - "KLV": { - "type": "string" - }, - "WAXL": { - "type": "string" - }, - "TRBDOWN": { - "type": "string" - }, - "BCH3L": { - "type": "string" - }, - "GMT3S": { - "type": "string" - }, - "KMD": { - "type": "string" - }, - "BCH3S": { - "type": "string" - }, - "ECOX": { - "type": "string" - }, - "AAVE3S": { - "type": "string" - }, - "GMT3L": { - "type": "string" - }, - "EPIK": { - "type": "string" - }, - "SUIP": { - "type": "string" - }, - "AAVE3L": { - "type": "string" - }, - "ZK": { - "type": "string" - }, - "ZKF": { - "type": "string" - }, - "OMNIA": { - "type": "string" - }, - "ZKJ": { - "type": "string" - }, - "ZKL": { - "type": "string" - }, - "GAFI": { - "type": "string" - }, - "CARV": { - "type": "string" - }, - "KNC": { - "type": "string" - }, - "CATS": { - "type": "string" - }, - "PROM": { - "type": "string" - }, - "ALEPH": { - "type": "string" - }, - "PONKE": { - "type": "string" - }, - "OVR": { - "type": "string" - }, - "CATI": { - "type": "string" - }, - "ORDER": { - "type": "string" - }, - "GFT": { - "type": "string" - }, - "BIFI": { - "type": "string" - }, - "GGC": { - "type": "string" - }, - "GGG": { - "type": "string" - }, - "DAPPX": { - "type": "string" - }, - "SUKU": { - "type": "string" - }, - "ULTI": { - "type": "string" - }, - "CREDI": { - "type": "string" - }, - "ERTHA": { - "type": "string" - }, - "FURY": { - "type": "string" - }, - "KARRAT": { - "type": "string" - }, - "MOBILE": { - "type": "string" - }, - "SIDUS": { - "type": "string" - }, - "NAVI": { - "type": "string" - }, - "TAO": { - "type": "string" - }, - "USDJ": { - "type": "string" - }, - "MTL": { - "type": "string" - }, - "VET": { - "type": "string" - }, - "FITFI": { - "type": "string" - }, - "USDT": { - "type": "string" - }, - "OXT": { - "type": "string" - }, - "CANDY": { - "type": "string" - }, - "USDP": { - "type": "string" - }, - "MTS": { - "type": "string" - }, - "TADA": { - "type": "string" - }, - "MTV": { - "type": "string" - }, - "NAVX": { - "type": "string" - }, - "ILV": { - "type": "string" - }, - "VINU": { - "type": "string" - }, - "GHX": { - "type": "string" - }, - "EDU": { - "type": "string" - }, - "HYVE": { - "type": "string" - }, - "BTC3L": { - "type": "string" - }, - "ANYONE": { - "type": "string" - }, - "BEAT": { - "type": "string" - }, - "KING": { - "type": "string" - }, - "CREAM": { - "type": "string" - }, - "CAS": { - "type": "string" - }, - "IMX": { - "type": "string" - }, - "CAT": { - "type": "string" - }, - "BTC3S": { - "type": "string" - }, - "USDE": { - "type": "string" - }, - "USDD": { - "type": "string" - }, - "CWAR": { - "type": "string" - }, - "USDC": { - "type": "string" - }, - "KRL": { - "type": "string" - }, - "INJ": { - "type": "string" - }, - "GAME": { - "type": "string" - }, - "TRIBL": { - "type": "string" - }, - "XLM": { - "type": "string" - }, - "TRBUP": { - "type": "string" - }, - "VRADOWN": { - "type": "string" - }, - "SUPER": { - "type": "string" - }, - "EIGEN": { - "type": "string" - }, - "IOI": { - "type": "string" - }, - "KSM": { - "type": "string" - }, - "CCD": { - "type": "string" - }, - "EGO": { - "type": "string" - }, - "EGP": { - "type": "string" - }, - "MXC": { - "type": "string" - }, - "TEL": { - "type": "string" - }, - "MOVR": { - "type": "string" - }, - "XMR": { - "type": "string" - }, - "MXM": { - "type": "string" - }, - "OORT": { - "type": "string" - }, - "GLM": { - "type": "string" - }, - "RAY": { - "type": "string" - }, - "XTAG": { - "type": "string" - }, - "GLQ": { - "type": "string" - }, - "CWEB": { - "type": "string" - }, - "REVU": { - "type": "string" - }, - "REVV": { - "type": "string" - }, - "ZRO": { - "type": "string" - }, - "XNL": { - "type": "string" - }, - "XNO": { - "type": "string" - }, - "SAROS": { - "type": "string" - }, - "KACE": { - "type": "string" - }, - "ZRX": { - "type": "string" - }, - "WLTH": { - "type": "string" - }, - "ATOM3L": { - "type": "string" - }, - "GMM": { - "type": "string" - }, - "BEER": { - "type": "string" - }, - "GMT": { - "type": "string" - }, - "HEART": { - "type": "string" - }, - "GMX": { - "type": "string" - }, - "ABBC": { - "type": "string" - }, - "OMNI": { - "type": "string" - }, - "ATOM3S": { - "type": "string" - }, - "IRL": { - "type": "string" - }, - "CFG": { - "type": "string" - }, - "WSDM": { - "type": "string" - }, - "GNS": { - "type": "string" - }, - "VANRY": { - "type": "string" - }, - "CFX": { - "type": "string" - }, - "GRAIL": { - "type": "string" - }, - "BEFI": { - "type": "string" - }, - "VELO": { - "type": "string" - }, - "XPR": { - "type": "string" - }, - "DOVI": { - "type": "string" - }, - "ACE": { - "type": "string" - }, - "ACH": { - "type": "string" - }, - "ISP": { - "type": "string" - }, - "XCAD": { - "type": "string" - }, - "MINA": { - "type": "string" - }, - "TIA": { - "type": "string" - }, - "DRIFT": { - "type": "string" - }, - "ACQ": { - "type": "string" - }, - "ACS": { - "type": "string" - }, - "MIND": { - "type": "string" - }, - "STORE": { - "type": "string" - }, - "REN": { - "type": "string" - }, - "ELA": { - "type": "string" - }, - "DREAMS": { - "type": "string" - }, - "ADA": { - "type": "string" - }, - "ELF": { - "type": "string" - }, - "REQ": { - "type": "string" - }, - "STORJ": { - "type": "string" - }, - "LADYS": { - "type": "string" - }, - "PAXG": { - "type": "string" - }, - "REZ": { - "type": "string" - }, - "XRD": { - "type": "string" - }, - "CHO": { - "type": "string" - }, - "CHR": { - "type": "string" - }, - "ADS": { - "type": "string" - }, - "CHZ": { - "type": "string" - }, - "ADX": { - "type": "string" - }, - "XRP": { - "type": "string" - }, - "JASMY": { - "type": "string" - }, - "KAGI": { - "type": "string" - }, - "FIDA": { - "type": "string" - }, - "PBR": { - "type": "string" - }, - "AEG": { - "type": "string" - }, - "H2O": { - "type": "string" - }, - "CHMB": { - "type": "string" - }, - "SAND3L": { - "type": "string" - }, - "PBX": { - "type": "string" - }, - "SOLVE": { - "type": "string" - }, - "DECHAT": { - "type": "string" - }, - "GARI": { - "type": "string" - }, - "SHIB2L": { - "type": "string" - }, - "SHIB2S": { - "type": "string" - }, - "ENA": { - "type": "string" - }, - "VEMP": { - "type": "string" - }, - "ENJ": { - "type": "string" - }, - "AFG": { - "type": "string" - }, - "RATS": { - "type": "string" - }, - "GRT": { - "type": "string" - }, - "FORWARD": { - "type": "string" - }, - "TFUEL": { - "type": "string" - }, - "ENS": { - "type": "string" - }, - "KASDOWN": { - "type": "string" - }, - "XTM": { - "type": "string" - }, - "DEGEN": { - "type": "string" - }, - "TLM": { - "type": "string" - }, - "DYDXDOWN": { - "type": "string" - }, - "CKB": { - "type": "string" - }, - "LUNC": { - "type": "string" - }, - "AURORA": { - "type": "string" - }, - "LUNA": { - "type": "string" - }, - "XTZ": { - "type": "string" - }, - "ELON": { - "type": "string" - }, - "DMTR": { - "type": "string" - }, - "EOS": { - "type": "string" - }, - "GST": { - "type": "string" - }, - "FORT": { - "type": "string" - }, - "FLAME": { - "type": "string" - }, - "PATEX": { - "type": "string" - }, - "DEEP": { - "type": "string" - }, - "ID3L": { - "type": "string" - }, - "GTC": { - "type": "string" - }, - "ID3S": { - "type": "string" - }, - "RIO": { - "type": "string" - }, - "CLH": { - "type": "string" - }, - "BURGER": { - "type": "string" - }, - "VRA": { - "type": "string" - }, - "SUNDOG": { - "type": "string" - }, - "GTT": { - "type": "string" - }, - "INJUP": { - "type": "string" - }, - "CPOOL": { - "type": "string" - }, - "EPX": { - "type": "string" - }, - "CLV": { - "type": "string" - }, - "FEAR": { - "type": "string" - }, - "MEME": { - "type": "string" - }, - "ROOBEE": { - "type": "string" - }, - "DEFI": { - "type": "string" - }, - "TOKEN": { - "type": "string" - }, - "GRAPE": { - "type": "string" - }, - "KASUP": { - "type": "string" - }, - "XWG": { - "type": "string" - }, - "SKEY": { - "type": "string" - }, - "SFUND": { - "type": "string" - }, - "EQX": { - "type": "string" - }, - "ORDIUP": { - "type": "string" - }, - "TON": { - "type": "string" - }, - "DEGO": { - "type": "string" - }, - "IZI": { - "type": "string" - }, - "ERG": { - "type": "string" - }, - "ERN": { - "type": "string" - }, - "VENOM": { - "type": "string" - }, - "VOXEL": { - "type": "string" - }, - "RLC": { - "type": "string" - }, - "PHA": { - "type": "string" - }, - "DYDXUP": { - "type": "string" - }, - "APE3S": { - "type": "string" - }, - "ORBS": { - "type": "string" - }, - "OPDOWN": { - "type": "string" - }, - "ESE": { - "type": "string" - }, - "APE3L": { - "type": "string" - }, - "HMND": { - "type": "string" - }, - "COQ": { - "type": "string" - }, - "AURY": { - "type": "string" - }, - "CULT": { - "type": "string" - }, - "AKT": { - "type": "string" - }, - "GLMR": { - "type": "string" - }, - "XYM": { - "type": "string" - }, - "ORAI": { - "type": "string" - }, - "XYO": { - "type": "string" - }, - "ETC": { - "type": "string" - }, - "LAI": { - "type": "string" - }, - "PIP": { - "type": "string" - }, - "ETH": { - "type": "string" - }, - "NEO": { - "type": "string" - }, - "RMV": { - "type": "string" - }, - "KLAY": { - "type": "string" - }, - "PIT": { - "type": "string" - }, - "TARA": { - "type": "string" - }, - "KALT": { - "type": "string" - }, - "PIX": { - "type": "string" - }, - "ETN": { - "type": "string" - }, - "CSIX": { - "type": "string" - }, - "TRADE": { - "type": "string" - }, - "MAVIA": { - "type": "string" - }, - "HIGH": { - "type": "string" - }, - "TRB": { - "type": "string" - }, - "ORDI": { - "type": "string" - }, - "TRVL": { - "type": "string" - }, - "AMB": { - "type": "string" - }, - "TRU": { - "type": "string" - }, - "LOGX": { - "type": "string" - }, - "FINC": { - "type": "string" - }, - "INFRA": { - "type": "string" - }, - "NATIX": { - "type": "string" - }, - "NFP": { - "type": "string" - }, - "TRY": { - "type": "string" - }, - "TRX": { - "type": "string" - }, - "LBP": { - "type": "string" - }, - "LBR": { - "type": "string" - }, - "EUL": { - "type": "string" - }, - "NFT": { - "type": "string" - }, - "SEIUP": { - "type": "string" - }, - "PUFFER": { - "type": "string" - }, - "EUR": { - "type": "string" - }, - "ORCA": { - "type": "string" - }, - "NEAR3L": { - "type": "string" - }, - "AMP": { - "type": "string" - }, - "XDEFI": { - "type": "string" - }, - "HIFI": { - "type": "string" - }, - "TRUF": { - "type": "string" - }, - "AITECH": { - "type": "string" - }, - "AMU": { - "type": "string" - }, - "USTC": { - "type": "string" - }, - "KNGL": { - "type": "string" - }, - "FOXY": { - "type": "string" - }, - "NGC": { - "type": "string" - }, - "TENET": { - "type": "string" - }, - "NEAR3S": { - "type": "string" - }, - "MAHA": { - "type": "string" - }, - "NGL": { - "type": "string" - }, - "TST": { - "type": "string" - }, - "HIPPO": { - "type": "string" - }, - "AXS3S": { - "type": "string" - }, - "CRO": { - "type": "string" - }, - "ZPAY": { - "type": "string" - }, - "MNDE": { - "type": "string" - }, - "CRV": { - "type": "string" - }, - "SWASH": { - "type": "string" - }, - "AXS3L": { - "type": "string" - }, - "VERSE": { - "type": "string" - }, - "RPK": { - "type": "string" - }, - "RPL": { - "type": "string" - }, - "AZERO": { - "type": "string" - }, - "SOUL": { - "type": "string" - }, - "VXV": { - "type": "string" - }, - "LDO": { - "type": "string" - }, - "MAGIC": { - "type": "string" - }, - "ALICE": { - "type": "string" - }, - "SEAM": { - "type": "string" - }, - "PLU": { - "type": "string" - }, - "AOG": { - "type": "string" - }, - "SMOLE": { - "type": "string" - }, - "EWT": { - "type": "string" - }, - "TSUGT": { - "type": "string" - }, - "PMG": { - "type": "string" - }, - "OPAI": { - "type": "string" - }, - "LOCUS": { - "type": "string" - }, - "CTA": { - "type": "string" - }, - "NIM": { - "type": "string" - }, - "CTC": { - "type": "string" - }, - "APE": { - "type": "string" - }, - "MERL": { - "type": "string" - }, - "JAM": { - "type": "string" - }, - "CTI": { - "type": "string" - }, - "APP": { - "type": "string" - }, - "APT": { - "type": "string" - }, - "WLDUP": { - "type": "string" - }, - "ZEND": { - "type": "string" - }, - "FIRE": { - "type": "string" - }, - "DENT": { - "type": "string" - }, - "PYTH": { - "type": "string" - }, - "LFT": { - "type": "string" - }, - "DPET": { - "type": "string" - }, - "ORDIDOWN": { - "type": "string" - }, - "KPOL": { - "type": "string" - }, - "ETHUP": { - "type": "string" - }, - "BAND": { - "type": "string" - }, - "POL": { - "type": "string" - }, - "ASTR": { - "type": "string" - }, - "NKN": { - "type": "string" - }, - "RSR": { - "type": "string" - }, - "DVPN": { - "type": "string" - }, - "TWT": { - "type": "string" - }, - "ARB": { - "type": "string" - }, - "CVC": { - "type": "string" - }, - "ARC": { - "type": "string" - }, - "XETA": { - "type": "string" - }, - "MTRG": { - "type": "string" - }, - "LOKA": { - "type": "string" - }, - "LPOOL": { - "type": "string" - }, - "TURBOS": { - "type": "string" - }, - "CVX": { - "type": "string" - }, - "ARX": { - "type": "string" - }, - "MPLX": { - "type": "string" - }, - "SUSHI": { - "type": "string" - }, - "NLK": { - "type": "string" - }, - "PEPE2": { - "type": "string" - }, - "WBTC": { - "type": "string" - }, - "SUI3L": { - "type": "string" - }, - "CWS": { - "type": "string" - }, - "SUI3S": { - "type": "string" - }, - "INSP": { - "type": "string" - }, - "MANA": { - "type": "string" - }, - "VRTX": { - "type": "string" - }, - "CSPR": { - "type": "string" - }, - "ATA": { - "type": "string" - }, - "OPEN": { - "type": "string" - }, - "HAI": { - "type": "string" - }, - "NMR": { - "type": "string" - }, - "ATH": { - "type": "string" - }, - "LIT": { - "type": "string" - }, - "TLOS": { - "type": "string" - }, - "TNSR": { - "type": "string" - }, - "CXT": { - "type": "string" - }, - "POLYX": { - "type": "string" - }, - "ZERO": { - "type": "string" - }, - "ROUTE": { - "type": "string" - }, - "LOOM": { - "type": "string" - }, - "PRE": { - "type": "string" - }, - "VRAUP": { - "type": "string" - }, - "HBB": { - "type": "string" - }, - "RVN": { - "type": "string" - }, - "PRQ": { - "type": "string" - }, - "ONDO": { - "type": "string" - }, - "PEPEDOWN": { - "type": "string" - }, - "WOOP": { - "type": "string" - }, - "LUNCUP": { - "type": "string" - }, - "KAVA": { - "type": "string" - }, - "LKI": { - "type": "string" - }, - "AVA": { - "type": "string" - }, - "NOM": { - "type": "string" - }, - "MAPO": { - "type": "string" - }, - "PEPEUP": { - "type": "string" - }, - "STRAX": { - "type": "string" - }, - "NOT": { - "type": "string" - }, - "ZERC": { - "type": "string" - }, - "BCUT": { - "type": "string" - }, - "MASA": { - "type": "string" - }, - "WAN": { - "type": "string" - }, - "WAT": { - "type": "string" - }, - "WAX": { - "type": "string" - }, - "MASK": { - "type": "string" - }, - "EOS3L": { - "type": "string" - }, - "IDEA": { - "type": "string" - }, - "EOS3S": { - "type": "string" - }, - "YFI": { - "type": "string" - }, - "MOODENG": { - "type": "string" - }, - "XCUR": { - "type": "string" - }, - "HYDRA": { - "type": "string" - }, - "POPCAT": { - "type": "string" - }, - "LQTY": { - "type": "string" - }, - "PIXEL": { - "type": "string" - }, - "LMR": { - "type": "string" - }, - "ZETA": { - "type": "string" - }, - "YGG": { - "type": "string" - }, - "AXS": { - "type": "string" - }, - "BCHSV": { - "type": "string" - }, - "NRN": { - "type": "string" - }, - "FTON": { - "type": "string" - }, - "COMP": { - "type": "string" - }, - "XPRT": { - "type": "string" - }, - "HFT": { - "type": "string" - }, - "UXLINK": { - "type": "string" - }, - "STAMP": { - "type": "string" - }, - "RUNE": { - "type": "string" - }, - "ZEUS": { - "type": "string" - }, - "LTC3L": { - "type": "string" - }, - "DAPP": { - "type": "string" - }, - "FORTH": { - "type": "string" - }, - "ALPINE": { - "type": "string" - }, - "SENSO": { - "type": "string" - }, - "LTC3S": { - "type": "string" - }, - "DEXE": { - "type": "string" - }, - "GOAL": { - "type": "string" - }, - "AVAX": { - "type": "string" - }, - "LISTA": { - "type": "string" - }, - "AMPL": { - "type": "string" - }, - "WORK": { - "type": "string" - }, - "BRWL": { - "type": "string" - }, - "BANANA": { - "type": "string" - }, - "PUSH": { - "type": "string" - }, - "WEN": { - "type": "string" - }, - "NEIRO": { - "type": "string" - }, - "BTCUP": { - "type": "string" - }, - "SOL3S": { - "type": "string" - }, - "BRAWL": { - "type": "string" - }, - "LAY3R": { - "type": "string" - }, - "LPT": { - "type": "string" - }, - "GODS": { - "type": "string" - }, - "SAND3S": { - "type": "string" - }, - "RDNT": { - "type": "string" - }, - "SOL3L": { - "type": "string" - }, - "NIBI": { - "type": "string" - }, - "NUM": { - "type": "string" - }, - "PYR": { - "type": "string" - }, - "DAG": { - "type": "string" - }, - "DAI": { - "type": "string" - }, - "HIP": { - "type": "string" - }, - "DAO": { - "type": "string" - }, - "AVAIL": { - "type": "string" - }, - "DAR": { - "type": "string" - }, - "FET": { - "type": "string" - }, - "FCON": { - "type": "string" - }, - "XAVA": { - "type": "string" - }, - "LRC": { - "type": "string" - }, - "UNI3S": { - "type": "string" - }, - "POKT": { - "type": "string" - }, - "DASH": { - "type": "string" - }, - "BAKEDOWN": { - "type": "string" - }, - "POLC": { - "type": "string" - }, - "CIRUS": { - "type": "string" - }, - "UNI3L": { - "type": "string" - }, - "NWC": { - "type": "string" - }, - "POLK": { - "type": "string" - }, - "LSD": { - "type": "string" - }, - "MARS4": { - "type": "string" - }, - "LSK": { - "type": "string" - }, - "BLOCK": { - "type": "string" - }, - "ANALOS": { - "type": "string" - }, - "SAFE": { - "type": "string" - }, - "DCK": { - "type": "string" - }, - "LSS": { - "type": "string" - }, - "DCR": { - "type": "string" - }, - "LIKE": { - "type": "string" - }, - "DATA": { - "type": "string" - }, - "WIF": { - "type": "string" - }, - "BLOK": { - "type": "string" - }, - "LTC": { - "type": "string" - }, - "METIS": { - "type": "string" - }, - "WIN": { - "type": "string" - }, - "HLG": { - "type": "string" - }, - "LTO": { - "type": "string" - }, - "DYDX": { - "type": "string" - }, - "ARB3S": { - "type": "string" - }, - "MUBI": { - "type": "string" - }, - "ARB3L": { - "type": "string" - }, - "RBTC1": { - "type": "string" - }, - "POND": { - "type": "string" - }, - "LINA": { - "type": "string" - }, - "MYRIA": { - "type": "string" - }, - "LINK": { - "type": "string" - }, - "QTUM": { - "type": "string" - }, - "TUNE": { - "type": "string" - }, - "UFO": { - "type": "string" - }, - "CYBER": { - "type": "string" - }, - "WILD": { - "type": "string" - }, - "POLS": { - "type": "string" - }, - "NYM": { - "type": "string" - }, - "FIL": { - "type": "string" - }, - "BAL": { - "type": "string" - }, - "SCA": { - "type": "string" - }, - "STND": { - "type": "string" - }, - "WMTX": { - "type": "string" - }, - "SCLP": { - "type": "string" - }, - "MANEKI": { - "type": "string" - }, - "BAT": { - "type": "string" - }, - "AKRO": { - "type": "string" - }, - "FTM3L": { - "type": "string" - }, - "BAX": { - "type": "string" - }, - "FTM3S": { - "type": "string" - }, - "COTI": { - "type": "string" - } - }, - "required": [ - "AGLD", - "DFI", - "PYTHUP", - "ISLM", - "NEAR", - "AIOZ", - "AUDIO", - "BBL", - "WLD", - "HNT", - "ETHFI", - "DMAIL", - "OPUP", - "VET3S", - "MANA3S", - "TIDAL", - "HALO", - "OPUL", - "MANA3L", - "DGB", - "AA", - "BCH", - "GMEE", - "JST", - "PBUX", - "AR", - "SEI", - "PSTAKE", - "LMWR", - "UNFIDOWN", - "BB", - "JTO", - "WEMIX", - "G", - "MARSH", - "BN", - "FLIP", - "FLR", - "BIGTIME", - "FLY", - "T", - "W", - "BDX", - "BABYDOGE", - "SFP", - "DIA", - "ISME", - "LYM", - "VET3L", - "JUP", - "LYX", - "AIEPK", - "SILLY", - "SCPT", - "WOO", - "BLUR", - "STRK", - "BFC", - "DC", - "KARATE", - "SUSHI3L", - "NETVR", - "WAVES", - "LITH", - "HAPI", - "SUSHI3S", - "CEEK", - "FLOKI", - "SHR", - "SAND", - "TURT", - "UMA", - "BEPRO", - "SCRT", - "TUSD", - "COOKIE", - "LRDS", - "SIN", - "OAS", - "ROOT", - "ADA3L", - "TIAUP", - "HTR", - "UNB", - "UNA", - "HARD", - "G3", - "ADA3S", - "MYRO", - "HTX", - "FT", - "BTCDOWN", - "UNI", - "FX", - "OBI", - "UNO", - "WRX", - "TIADOWN", - "ETHDOWN", - "WELL", - "SWFTC", - "SKL", - "UOS", - "AIPAD", - "BRETT", - "SKY", - "FRM", - "VISION", - "LENDS", - "SLF", - "BULL", - "FLOW", - "ODDZ", - "SLN", - "UPO", - "SLP", - "ID", - "SLIM", - "SPOT", - "DOP", - "ISSP", - "UQC", - "IO", - "DOT", - "1INCH", - "SMH", - "MAK", - "TOKO", - "TURBO", - "UNFI", - "MAN", - "EVER", - "FTM", - "SHRAP", - "MAV", - "MAX", - "DPR", - "FTT", - "ARKM", - "ATOM", - "PENDLE", - "QUICK", - "BLZ", - "BOBA", - "MBL", - "OFN", - "UNIO", - "SNS", - "SNX", - "NXRA", - "TAIKO", - "AVAX3L", - "L3", - "API3", - "XRP3S", - "QKC", - "AVAX3S", - "ROSE", - "SATS", - "BMX", - "PORTAL", - "TOMI", - "XRP3L", - "SOL", - "SON", - "BNC", - "SOCIAL", - "CGPT", - "CELR", - "BNB", - "OGN", - "CELO", - "AUCTION", - "MANTA", - "LAYER", - "AERO", - "CETUS", - "LL", - "SPA", - "PYTHDOWN", - "NEIROCTO", - "UTK", - "GMRX", - "BOB", - "HOTCROSS", - "AERGO", - "MOCA", - "SQD", - "MV", - "BNB3L", - "BNB3S", - "GALAX3L", - "KAI", - "SQR", - "GALAX3S", - "EGLD", - "ZBCN", - "KAS", - "MEW", - "PUNDIX", - "LOOKS", - "FXS", - "BOSON", - "BRISE", - "AEVO", - "FLUX", - "PRCL", - "UNFIUP", - "SEIDOWN", - "DOAI", - "QNT", - "REDO", - "STRIKE", - "ETHW", - "OM", - "OP", - "WHALE", - "1CAT", - "NEON", - "GTAI", - "SSV", - "ETH2", - "KCS", - "ARPA", - "ARTFI", - "BRL", - "ALEX", - "STG", - "SHIB", - "IOTX", - "OLE", - "KDA", - "CERE", - "DOCK", - "STX", - "OLT", - "QI", - "SDAO", - "BLAST", - "LINK3S", - "IOST", - "SUI", - "CAKE", - "BSW", - "OMG", - "VOLT", - "LINK3L", - "GEEQ", - "PYUSD", - "SUN", - "TOWER", - "BTC", - "IOTA", - "REEF", - "TRIAS", - "KEY", - "ETH3L", - "BTT", - "ONE", - "RENDER", - "ETH3S", - "ANKR", - "ALGO", - "SYLO", - "ZCX", - "SD", - "ONT", - "MJT", - "DYM", - "DYP", - "BAKEUP", - "OOE", - "ZELIX", - "DOGE3L", - "ARTY", - "QORPO", - "ICE", - "NOTAI", - "DOGE3S", - "NAKA", - "GALAX", - "MKR", - "DODO", - "ICP", - "ZEC", - "ZEE", - "ICX", - "KMNO", - "TT", - "DOT3L", - "XAI", - "ZEN", - "DOGE", - "ALPHA", - "DUSK", - "DOT3S", - "SXP", - "HBAR", - "SYNT", - "ZEX", - "BONDLY", - "MLK", - "KICKS", - "PEPE", - "OUSD", - "LUNCDOWN", - "DOGS", - "REV3L", - "CTSI", - "C98", - "OSMO", - "NTRN", - "CFX2S", - "SYN", - "VIDT", - "SYS", - "GAS", - "BOME", - "COMBO", - "XCH", - "VR", - "CFX2L", - "VSYS", - "PANDORA", - "THETA", - "XCN", - "NEXG", - "MELOS", - "XCV", - "ORN", - "WLKN", - "AAVE", - "MNT", - "BONK", - "PERP", - "XDC", - "MNW", - "XDB", - "BOND", - "SUIA", - "MOG", - "SUTER", - "TIME", - "RACA", - "BICO", - "MON", - "SWEAT", - "MOXIE", - "BABYBNB", - "IGU", - "HMSTR", - "XEC", - "MONI", - "XR", - "PEOPLE", - "PUMLX", - "ZIL", - "WLDDOWN", - "VAI", - "XEN", - "MPC", - "XEM", - "JASMY3S", - "OTK", - "TRAC", - "DFYN", - "BIDP", - "JASMY3L", - "INJDOWN", - "KLV", - "WAXL", - "TRBDOWN", - "BCH3L", - "GMT3S", - "KMD", - "BCH3S", - "ECOX", - "AAVE3S", - "GMT3L", - "EPIK", - "SUIP", - "AAVE3L", - "ZK", - "ZKF", - "OMNIA", - "ZKJ", - "ZKL", - "GAFI", - "CARV", - "KNC", - "CATS", - "PROM", - "ALEPH", - "PONKE", - "OVR", - "CATI", - "ORDER", - "GFT", - "BIFI", - "GGC", - "GGG", - "DAPPX", - "SUKU", - "ULTI", - "CREDI", - "ERTHA", - "FURY", - "KARRAT", - "MOBILE", - "SIDUS", - "NAVI", - "TAO", - "USDJ", - "MTL", - "VET", - "FITFI", - "USDT", - "OXT", - "CANDY", - "USDP", - "MTS", - "TADA", - "MTV", - "NAVX", - "ILV", - "VINU", - "GHX", - "EDU", - "HYVE", - "BTC3L", - "ANYONE", - "BEAT", - "KING", - "CREAM", - "CAS", - "IMX", - "CAT", - "BTC3S", - "USDE", - "USDD", - "CWAR", - "USDC", - "KRL", - "INJ", - "GAME", - "TRIBL", - "XLM", - "TRBUP", - "VRADOWN", - "SUPER", - "EIGEN", - "IOI", - "KSM", - "CCD", - "EGO", - "EGP", - "MXC", - "TEL", - "MOVR", - "XMR", - "MXM", - "OORT", - "GLM", - "RAY", - "XTAG", - "GLQ", - "CWEB", - "REVU", - "REVV", - "ZRO", - "XNL", - "XNO", - "SAROS", - "KACE", - "ZRX", - "WLTH", - "ATOM3L", - "GMM", - "BEER", - "GMT", - "HEART", - "GMX", - "ABBC", - "OMNI", - "ATOM3S", - "IRL", - "CFG", - "WSDM", - "GNS", - "VANRY", - "CFX", - "GRAIL", - "BEFI", - "VELO", - "XPR", - "DOVI", - "ACE", - "ACH", - "ISP", - "XCAD", - "MINA", - "TIA", - "DRIFT", - "ACQ", - "ACS", - "MIND", - "STORE", - "REN", - "ELA", - "DREAMS", - "ADA", - "ELF", - "REQ", - "STORJ", - "LADYS", - "PAXG", - "REZ", - "XRD", - "CHO", - "CHR", - "ADS", - "CHZ", - "ADX", - "XRP", - "JASMY", - "KAGI", - "FIDA", - "PBR", - "AEG", - "H2O", - "CHMB", - "SAND3L", - "PBX", - "SOLVE", - "DECHAT", - "GARI", - "SHIB2L", - "SHIB2S", - "ENA", - "VEMP", - "ENJ", - "AFG", - "RATS", - "GRT", - "FORWARD", - "TFUEL", - "ENS", - "KASDOWN", - "XTM", - "DEGEN", - "TLM", - "DYDXDOWN", - "CKB", - "LUNC", - "AURORA", - "LUNA", - "XTZ", - "ELON", - "DMTR", - "EOS", - "GST", - "FORT", - "FLAME", - "PATEX", - "DEEP", - "ID3L", - "GTC", - "ID3S", - "RIO", - "CLH", - "BURGER", - "VRA", - "SUNDOG", - "GTT", - "INJUP", - "CPOOL", - "EPX", - "CLV", - "FEAR", - "MEME", - "ROOBEE", - "DEFI", - "TOKEN", - "GRAPE", - "KASUP", - "XWG", - "SKEY", - "SFUND", - "EQX", - "ORDIUP", - "TON", - "DEGO", - "IZI", - "ERG", - "ERN", - "VENOM", - "VOXEL", - "RLC", - "PHA", - "DYDXUP", - "APE3S", - "ORBS", - "OPDOWN", - "ESE", - "APE3L", - "HMND", - "COQ", - "AURY", - "CULT", - "AKT", - "GLMR", - "XYM", - "ORAI", - "XYO", - "ETC", - "LAI", - "PIP", - "ETH", - "NEO", - "RMV", - "KLAY", - "PIT", - "TARA", - "KALT", - "PIX", - "ETN", - "CSIX", - "TRADE", - "MAVIA", - "HIGH", - "TRB", - "ORDI", - "TRVL", - "AMB", - "TRU", - "LOGX", - "FINC", - "INFRA", - "NATIX", - "NFP", - "TRY", - "TRX", - "LBP", - "LBR", - "EUL", - "NFT", - "SEIUP", - "PUFFER", - "EUR", - "ORCA", - "NEAR3L", - "AMP", - "XDEFI", - "HIFI", - "TRUF", - "AITECH", - "AMU", - "USTC", - "KNGL", - "FOXY", - "NGC", - "TENET", - "NEAR3S", - "MAHA", - "NGL", - "TST", - "HIPPO", - "AXS3S", - "CRO", - "ZPAY", - "MNDE", - "CRV", - "SWASH", - "AXS3L", - "VERSE", - "RPK", - "RPL", - "AZERO", - "SOUL", - "VXV", - "LDO", - "MAGIC", - "ALICE", - "SEAM", - "PLU", - "AOG", - "SMOLE", - "EWT", - "TSUGT", - "PMG", - "OPAI", - "LOCUS", - "CTA", - "NIM", - "CTC", - "APE", - "MERL", - "JAM", - "CTI", - "APP", - "APT", - "WLDUP", - "ZEND", - "FIRE", - "DENT", - "PYTH", - "LFT", - "DPET", - "ORDIDOWN", - "KPOL", - "ETHUP", - "BAND", - "POL", - "ASTR", - "NKN", - "RSR", - "DVPN", - "TWT", - "ARB", - "CVC", - "ARC", - "XETA", - "MTRG", - "LOKA", - "LPOOL", - "TURBOS", - "CVX", - "ARX", - "MPLX", - "SUSHI", - "NLK", - "PEPE2", - "WBTC", - "SUI3L", - "CWS", - "SUI3S", - "INSP", - "MANA", - "VRTX", - "CSPR", - "ATA", - "OPEN", - "HAI", - "NMR", - "ATH", - "LIT", - "TLOS", - "TNSR", - "CXT", - "POLYX", - "ZERO", - "ROUTE", - "LOOM", - "PRE", - "VRAUP", - "HBB", - "RVN", - "PRQ", - "ONDO", - "PEPEDOWN", - "WOOP", - "LUNCUP", - "KAVA", - "LKI", - "AVA", - "NOM", - "MAPO", - "PEPEUP", - "STRAX", - "NOT", - "ZERC", - "BCUT", - "MASA", - "WAN", - "WAT", - "WAX", - "MASK", - "EOS3L", - "IDEA", - "EOS3S", - "YFI", - "MOODENG", - "XCUR", - "HYDRA", - "POPCAT", - "LQTY", - "PIXEL", - "LMR", - "ZETA", - "YGG", - "AXS", - "BCHSV", - "NRN", - "FTON", - "COMP", - "XPRT", - "HFT", - "UXLINK", - "STAMP", - "RUNE", - "ZEUS", - "LTC3L", - "DAPP", - "FORTH", - "ALPINE", - "SENSO", - "LTC3S", - "DEXE", - "GOAL", - "AVAX", - "LISTA", - "AMPL", - "WORK", - "BRWL", - "BANANA", - "PUSH", - "WEN", - "NEIRO", - "BTCUP", - "SOL3S", - "BRAWL", - "LAY3R", - "LPT", - "GODS", - "SAND3S", - "RDNT", - "SOL3L", - "NIBI", - "NUM", - "PYR", - "DAG", - "DAI", - "HIP", - "DAO", - "AVAIL", - "DAR", - "FET", - "FCON", - "XAVA", - "LRC", - "UNI3S", - "POKT", - "DASH", - "BAKEDOWN", - "POLC", - "CIRUS", - "UNI3L", - "NWC", - "POLK", - "LSD", - "MARS4", - "LSK", - "BLOCK", - "ANALOS", - "SAFE", - "DCK", - "LSS", - "DCR", - "LIKE", - "DATA", - "WIF", - "BLOK", - "LTC", - "METIS", - "WIN", - "HLG", - "LTO", - "DYDX", - "ARB3S", - "MUBI", - "ARB3L", - "RBTC1", - "POND", - "LINA", - "MYRIA", - "LINK", - "QTUM", - "TUNE", - "UFO", - "CYBER", - "WILD", - "POLS", - "NYM", - "FIL", - "BAL", - "SCA", - "STND", - "WMTX", - "SCLP", - "MANEKI", - "BAT", - "AKRO", - "FTM3L", - "BAX", - "FTM3S", - "COTI" - ] + "properties": {}, + "additionalProperties": { + "type": "string" + } } }, "required": [ diff --git a/spec/rest/api/openapi-spot-market.json b/spec/rest/api/openapi-spot-market.json index f329285a..e96b100b 100644 --- a/spec/rest/api/openapi-spot-market.json +++ b/spec/rest/api/openapi-spot-market.json @@ -2321,3594 +2321,10 @@ }, "data": { "type": "object", - "properties": { - "AGLD": { - "type": "string" - }, - "DFI": { - "type": "string" - }, - "PYTHUP": { - "type": "string" - }, - "ISLM": { - "type": "string" - }, - "NEAR": { - "type": "string" - }, - "AIOZ": { - "type": "string" - }, - "AUDIO": { - "type": "string" - }, - "BBL": { - "type": "string" - }, - "WLD": { - "type": "string" - }, - "HNT": { - "type": "string" - }, - "ETHFI": { - "type": "string" - }, - "DMAIL": { - "type": "string" - }, - "OPUP": { - "type": "string" - }, - "VET3S": { - "type": "string" - }, - "MANA3S": { - "type": "string" - }, - "TIDAL": { - "type": "string" - }, - "HALO": { - "type": "string" - }, - "OPUL": { - "type": "string" - }, - "MANA3L": { - "type": "string" - }, - "DGB": { - "type": "string" - }, - "AA": { - "type": "string" - }, - "BCH": { - "type": "string" - }, - "GMEE": { - "type": "string" - }, - "JST": { - "type": "string" - }, - "PBUX": { - "type": "string" - }, - "AR": { - "type": "string" - }, - "SEI": { - "type": "string" - }, - "PSTAKE": { - "type": "string" - }, - "LMWR": { - "type": "string" - }, - "UNFIDOWN": { - "type": "string" - }, - "BB": { - "type": "string" - }, - "JTO": { - "type": "string" - }, - "WEMIX": { - "type": "string" - }, - "G": { - "type": "string" - }, - "MARSH": { - "type": "string" - }, - "BN": { - "type": "string" - }, - "FLIP": { - "type": "string" - }, - "FLR": { - "type": "string" - }, - "BIGTIME": { - "type": "string" - }, - "FLY": { - "type": "string" - }, - "T": { - "type": "string" - }, - "W": { - "type": "string" - }, - "BDX": { - "type": "string" - }, - "BABYDOGE": { - "type": "string" - }, - "SFP": { - "type": "string" - }, - "DIA": { - "type": "string" - }, - "ISME": { - "type": "string" - }, - "LYM": { - "type": "string" - }, - "VET3L": { - "type": "string" - }, - "JUP": { - "type": "string" - }, - "LYX": { - "type": "string" - }, - "AIEPK": { - "type": "string" - }, - "SILLY": { - "type": "string" - }, - "SCPT": { - "type": "string" - }, - "WOO": { - "type": "string" - }, - "BLUR": { - "type": "string" - }, - "STRK": { - "type": "string" - }, - "BFC": { - "type": "string" - }, - "DC": { - "type": "string" - }, - "KARATE": { - "type": "string" - }, - "SUSHI3L": { - "type": "string" - }, - "NETVR": { - "type": "string" - }, - "WAVES": { - "type": "string" - }, - "LITH": { - "type": "string" - }, - "HAPI": { - "type": "string" - }, - "SUSHI3S": { - "type": "string" - }, - "CEEK": { - "type": "string" - }, - "FLOKI": { - "type": "string" - }, - "SHR": { - "type": "string" - }, - "SAND": { - "type": "string" - }, - "TURT": { - "type": "string" - }, - "UMA": { - "type": "string" - }, - "BEPRO": { - "type": "string" - }, - "SCRT": { - "type": "string" - }, - "TUSD": { - "type": "string" - }, - "COOKIE": { - "type": "string" - }, - "LRDS": { - "type": "string" - }, - "SIN": { - "type": "string" - }, - "OAS": { - "type": "string" - }, - "ROOT": { - "type": "string" - }, - "ADA3L": { - "type": "string" - }, - "TIAUP": { - "type": "string" - }, - "HTR": { - "type": "string" - }, - "UNB": { - "type": "string" - }, - "UNA": { - "type": "string" - }, - "HARD": { - "type": "string" - }, - "G3": { - "type": "string" - }, - "ADA3S": { - "type": "string" - }, - "MYRO": { - "type": "string" - }, - "HTX": { - "type": "string" - }, - "FT": { - "type": "string" - }, - "BTCDOWN": { - "type": "string" - }, - "UNI": { - "type": "string" - }, - "FX": { - "type": "string" - }, - "OBI": { - "type": "string" - }, - "UNO": { - "type": "string" - }, - "WRX": { - "type": "string" - }, - "TIADOWN": { - "type": "string" - }, - "ETHDOWN": { - "type": "string" - }, - "WELL": { - "type": "string" - }, - "SWFTC": { - "type": "string" - }, - "SKL": { - "type": "string" - }, - "UOS": { - "type": "string" - }, - "AIPAD": { - "type": "string" - }, - "BRETT": { - "type": "string" - }, - "SKY": { - "type": "string" - }, - "FRM": { - "type": "string" - }, - "VISION": { - "type": "string" - }, - "LENDS": { - "type": "string" - }, - "SLF": { - "type": "string" - }, - "BULL": { - "type": "string" - }, - "FLOW": { - "type": "string" - }, - "ODDZ": { - "type": "string" - }, - "SLN": { - "type": "string" - }, - "UPO": { - "type": "string" - }, - "SLP": { - "type": "string" - }, - "ID": { - "type": "string" - }, - "SLIM": { - "type": "string" - }, - "SPOT": { - "type": "string" - }, - "DOP": { - "type": "string" - }, - "ISSP": { - "type": "string" - }, - "UQC": { - "type": "string" - }, - "IO": { - "type": "string" - }, - "DOT": { - "type": "string" - }, - "1INCH": { - "type": "string" - }, - "SMH": { - "type": "string" - }, - "MAK": { - "type": "string" - }, - "TOKO": { - "type": "string" - }, - "TURBO": { - "type": "string" - }, - "UNFI": { - "type": "string" - }, - "MAN": { - "type": "string" - }, - "EVER": { - "type": "string" - }, - "FTM": { - "type": "string" - }, - "SHRAP": { - "type": "string" - }, - "MAV": { - "type": "string" - }, - "MAX": { - "type": "string" - }, - "DPR": { - "type": "string" - }, - "FTT": { - "type": "string" - }, - "ARKM": { - "type": "string" - }, - "ATOM": { - "type": "string" - }, - "PENDLE": { - "type": "string" - }, - "QUICK": { - "type": "string" - }, - "BLZ": { - "type": "string" - }, - "BOBA": { - "type": "string" - }, - "MBL": { - "type": "string" - }, - "OFN": { - "type": "string" - }, - "UNIO": { - "type": "string" - }, - "SNS": { - "type": "string" - }, - "SNX": { - "type": "string" - }, - "NXRA": { - "type": "string" - }, - "TAIKO": { - "type": "string" - }, - "AVAX3L": { - "type": "string" - }, - "L3": { - "type": "string" - }, - "API3": { - "type": "string" - }, - "XRP3S": { - "type": "string" - }, - "QKC": { - "type": "string" - }, - "AVAX3S": { - "type": "string" - }, - "ROSE": { - "type": "string" - }, - "SATS": { - "type": "string" - }, - "BMX": { - "type": "string" - }, - "PORTAL": { - "type": "string" - }, - "TOMI": { - "type": "string" - }, - "XRP3L": { - "type": "string" - }, - "SOL": { - "type": "string" - }, - "SON": { - "type": "string" - }, - "BNC": { - "type": "string" - }, - "SOCIAL": { - "type": "string" - }, - "CGPT": { - "type": "string" - }, - "CELR": { - "type": "string" - }, - "BNB": { - "type": "string" - }, - "OGN": { - "type": "string" - }, - "CELO": { - "type": "string" - }, - "AUCTION": { - "type": "string" - }, - "MANTA": { - "type": "string" - }, - "LAYER": { - "type": "string" - }, - "AERO": { - "type": "string" - }, - "CETUS": { - "type": "string" - }, - "LL": { - "type": "string" - }, - "SPA": { - "type": "string" - }, - "PYTHDOWN": { - "type": "string" - }, - "NEIROCTO": { - "type": "string" - }, - "UTK": { - "type": "string" - }, - "GMRX": { - "type": "string" - }, - "BOB": { - "type": "string" - }, - "HOTCROSS": { - "type": "string" - }, - "AERGO": { - "type": "string" - }, - "MOCA": { - "type": "string" - }, - "SQD": { - "type": "string" - }, - "MV": { - "type": "string" - }, - "BNB3L": { - "type": "string" - }, - "BNB3S": { - "type": "string" - }, - "GALAX3L": { - "type": "string" - }, - "KAI": { - "type": "string" - }, - "SQR": { - "type": "string" - }, - "GALAX3S": { - "type": "string" - }, - "EGLD": { - "type": "string" - }, - "ZBCN": { - "type": "string" - }, - "KAS": { - "type": "string" - }, - "MEW": { - "type": "string" - }, - "PUNDIX": { - "type": "string" - }, - "LOOKS": { - "type": "string" - }, - "FXS": { - "type": "string" - }, - "BOSON": { - "type": "string" - }, - "BRISE": { - "type": "string" - }, - "AEVO": { - "type": "string" - }, - "FLUX": { - "type": "string" - }, - "PRCL": { - "type": "string" - }, - "UNFIUP": { - "type": "string" - }, - "SEIDOWN": { - "type": "string" - }, - "DOAI": { - "type": "string" - }, - "QNT": { - "type": "string" - }, - "REDO": { - "type": "string" - }, - "STRIKE": { - "type": "string" - }, - "ETHW": { - "type": "string" - }, - "OM": { - "type": "string" - }, - "OP": { - "type": "string" - }, - "WHALE": { - "type": "string" - }, - "1CAT": { - "type": "string" - }, - "NEON": { - "type": "string" - }, - "GTAI": { - "type": "string" - }, - "SSV": { - "type": "string" - }, - "ETH2": { - "type": "string" - }, - "KCS": { - "type": "string" - }, - "ARPA": { - "type": "string" - }, - "ARTFI": { - "type": "string" - }, - "BRL": { - "type": "string" - }, - "ALEX": { - "type": "string" - }, - "STG": { - "type": "string" - }, - "SHIB": { - "type": "string" - }, - "IOTX": { - "type": "string" - }, - "OLE": { - "type": "string" - }, - "KDA": { - "type": "string" - }, - "CERE": { - "type": "string" - }, - "DOCK": { - "type": "string" - }, - "STX": { - "type": "string" - }, - "OLT": { - "type": "string" - }, - "QI": { - "type": "string" - }, - "SDAO": { - "type": "string" - }, - "BLAST": { - "type": "string" - }, - "LINK3S": { - "type": "string" - }, - "IOST": { - "type": "string" - }, - "SUI": { - "type": "string" - }, - "CAKE": { - "type": "string" - }, - "BSW": { - "type": "string" - }, - "OMG": { - "type": "string" - }, - "VOLT": { - "type": "string" - }, - "LINK3L": { - "type": "string" - }, - "GEEQ": { - "type": "string" - }, - "PYUSD": { - "type": "string" - }, - "SUN": { - "type": "string" - }, - "TOWER": { - "type": "string" - }, - "BTC": { - "type": "string" - }, - "IOTA": { - "type": "string" - }, - "REEF": { - "type": "string" - }, - "TRIAS": { - "type": "string" - }, - "KEY": { - "type": "string" - }, - "ETH3L": { - "type": "string" - }, - "BTT": { - "type": "string" - }, - "ONE": { - "type": "string" - }, - "RENDER": { - "type": "string" - }, - "ETH3S": { - "type": "string" - }, - "ANKR": { - "type": "string" - }, - "ALGO": { - "type": "string" - }, - "SYLO": { - "type": "string" - }, - "ZCX": { - "type": "string" - }, - "SD": { - "type": "string" - }, - "ONT": { - "type": "string" - }, - "MJT": { - "type": "string" - }, - "DYM": { - "type": "string" - }, - "DYP": { - "type": "string" - }, - "BAKEUP": { - "type": "string" - }, - "OOE": { - "type": "string" - }, - "ZELIX": { - "type": "string" - }, - "DOGE3L": { - "type": "string" - }, - "ARTY": { - "type": "string" - }, - "QORPO": { - "type": "string" - }, - "ICE": { - "type": "string" - }, - "NOTAI": { - "type": "string" - }, - "DOGE3S": { - "type": "string" - }, - "NAKA": { - "type": "string" - }, - "GALAX": { - "type": "string" - }, - "MKR": { - "type": "string" - }, - "DODO": { - "type": "string" - }, - "ICP": { - "type": "string" - }, - "ZEC": { - "type": "string" - }, - "ZEE": { - "type": "string" - }, - "ICX": { - "type": "string" - }, - "KMNO": { - "type": "string" - }, - "TT": { - "type": "string" - }, - "DOT3L": { - "type": "string" - }, - "XAI": { - "type": "string" - }, - "ZEN": { - "type": "string" - }, - "DOGE": { - "type": "string" - }, - "ALPHA": { - "type": "string" - }, - "DUSK": { - "type": "string" - }, - "DOT3S": { - "type": "string" - }, - "SXP": { - "type": "string" - }, - "HBAR": { - "type": "string" - }, - "SYNT": { - "type": "string" - }, - "ZEX": { - "type": "string" - }, - "BONDLY": { - "type": "string" - }, - "MLK": { - "type": "string" - }, - "KICKS": { - "type": "string" - }, - "PEPE": { - "type": "string" - }, - "OUSD": { - "type": "string" - }, - "LUNCDOWN": { - "type": "string" - }, - "DOGS": { - "type": "string" - }, - "REV3L": { - "type": "string" - }, - "CTSI": { - "type": "string" - }, - "C98": { - "type": "string" - }, - "OSMO": { - "type": "string" - }, - "NTRN": { - "type": "string" - }, - "CFX2S": { - "type": "string" - }, - "SYN": { - "type": "string" - }, - "VIDT": { - "type": "string" - }, - "SYS": { - "type": "string" - }, - "GAS": { - "type": "string" - }, - "BOME": { - "type": "string" - }, - "COMBO": { - "type": "string" - }, - "XCH": { - "type": "string" - }, - "VR": { - "type": "string" - }, - "CFX2L": { - "type": "string" - }, - "VSYS": { - "type": "string" - }, - "PANDORA": { - "type": "string" - }, - "THETA": { - "type": "string" - }, - "XCN": { - "type": "string" - }, - "NEXG": { - "type": "string" - }, - "MELOS": { - "type": "string" - }, - "XCV": { - "type": "string" - }, - "ORN": { - "type": "string" - }, - "WLKN": { - "type": "string" - }, - "AAVE": { - "type": "string" - }, - "MNT": { - "type": "string" - }, - "BONK": { - "type": "string" - }, - "PERP": { - "type": "string" - }, - "XDC": { - "type": "string" - }, - "MNW": { - "type": "string" - }, - "XDB": { - "type": "string" - }, - "BOND": { - "type": "string" - }, - "SUIA": { - "type": "string" - }, - "MOG": { - "type": "string" - }, - "SUTER": { - "type": "string" - }, - "TIME": { - "type": "string" - }, - "RACA": { - "type": "string" - }, - "BICO": { - "type": "string" - }, - "MON": { - "type": "string" - }, - "SWEAT": { - "type": "string" - }, - "MOXIE": { - "type": "string" - }, - "BABYBNB": { - "type": "string" - }, - "IGU": { - "type": "string" - }, - "HMSTR": { - "type": "string" - }, - "XEC": { - "type": "string" - }, - "MONI": { - "type": "string" - }, - "XR": { - "type": "string" - }, - "PEOPLE": { - "type": "string" - }, - "PUMLX": { - "type": "string" - }, - "ZIL": { - "type": "string" - }, - "WLDDOWN": { - "type": "string" - }, - "VAI": { - "type": "string" - }, - "XEN": { - "type": "string" - }, - "MPC": { - "type": "string" - }, - "XEM": { - "type": "string" - }, - "JASMY3S": { - "type": "string" - }, - "OTK": { - "type": "string" - }, - "TRAC": { - "type": "string" - }, - "DFYN": { - "type": "string" - }, - "BIDP": { - "type": "string" - }, - "JASMY3L": { - "type": "string" - }, - "INJDOWN": { - "type": "string" - }, - "KLV": { - "type": "string" - }, - "WAXL": { - "type": "string" - }, - "TRBDOWN": { - "type": "string" - }, - "BCH3L": { - "type": "string" - }, - "GMT3S": { - "type": "string" - }, - "KMD": { - "type": "string" - }, - "BCH3S": { - "type": "string" - }, - "ECOX": { - "type": "string" - }, - "AAVE3S": { - "type": "string" - }, - "GMT3L": { - "type": "string" - }, - "EPIK": { - "type": "string" - }, - "SUIP": { - "type": "string" - }, - "AAVE3L": { - "type": "string" - }, - "ZK": { - "type": "string" - }, - "ZKF": { - "type": "string" - }, - "OMNIA": { - "type": "string" - }, - "ZKJ": { - "type": "string" - }, - "ZKL": { - "type": "string" - }, - "GAFI": { - "type": "string" - }, - "CARV": { - "type": "string" - }, - "KNC": { - "type": "string" - }, - "CATS": { - "type": "string" - }, - "PROM": { - "type": "string" - }, - "ALEPH": { - "type": "string" - }, - "PONKE": { - "type": "string" - }, - "OVR": { - "type": "string" - }, - "CATI": { - "type": "string" - }, - "ORDER": { - "type": "string" - }, - "GFT": { - "type": "string" - }, - "BIFI": { - "type": "string" - }, - "GGC": { - "type": "string" - }, - "GGG": { - "type": "string" - }, - "DAPPX": { - "type": "string" - }, - "SUKU": { - "type": "string" - }, - "ULTI": { - "type": "string" - }, - "CREDI": { - "type": "string" - }, - "ERTHA": { - "type": "string" - }, - "FURY": { - "type": "string" - }, - "KARRAT": { - "type": "string" - }, - "MOBILE": { - "type": "string" - }, - "SIDUS": { - "type": "string" - }, - "NAVI": { - "type": "string" - }, - "TAO": { - "type": "string" - }, - "USDJ": { - "type": "string" - }, - "MTL": { - "type": "string" - }, - "VET": { - "type": "string" - }, - "FITFI": { - "type": "string" - }, - "USDT": { - "type": "string" - }, - "OXT": { - "type": "string" - }, - "CANDY": { - "type": "string" - }, - "USDP": { - "type": "string" - }, - "MTS": { - "type": "string" - }, - "TADA": { - "type": "string" - }, - "MTV": { - "type": "string" - }, - "NAVX": { - "type": "string" - }, - "ILV": { - "type": "string" - }, - "VINU": { - "type": "string" - }, - "GHX": { - "type": "string" - }, - "EDU": { - "type": "string" - }, - "HYVE": { - "type": "string" - }, - "BTC3L": { - "type": "string" - }, - "ANYONE": { - "type": "string" - }, - "BEAT": { - "type": "string" - }, - "KING": { - "type": "string" - }, - "CREAM": { - "type": "string" - }, - "CAS": { - "type": "string" - }, - "IMX": { - "type": "string" - }, - "CAT": { - "type": "string" - }, - "BTC3S": { - "type": "string" - }, - "USDE": { - "type": "string" - }, - "USDD": { - "type": "string" - }, - "CWAR": { - "type": "string" - }, - "USDC": { - "type": "string" - }, - "KRL": { - "type": "string" - }, - "INJ": { - "type": "string" - }, - "GAME": { - "type": "string" - }, - "TRIBL": { - "type": "string" - }, - "XLM": { - "type": "string" - }, - "TRBUP": { - "type": "string" - }, - "VRADOWN": { - "type": "string" - }, - "SUPER": { - "type": "string" - }, - "EIGEN": { - "type": "string" - }, - "IOI": { - "type": "string" - }, - "KSM": { - "type": "string" - }, - "CCD": { - "type": "string" - }, - "EGO": { - "type": "string" - }, - "EGP": { - "type": "string" - }, - "MXC": { - "type": "string" - }, - "TEL": { - "type": "string" - }, - "MOVR": { - "type": "string" - }, - "XMR": { - "type": "string" - }, - "MXM": { - "type": "string" - }, - "OORT": { - "type": "string" - }, - "GLM": { - "type": "string" - }, - "RAY": { - "type": "string" - }, - "XTAG": { - "type": "string" - }, - "GLQ": { - "type": "string" - }, - "CWEB": { - "type": "string" - }, - "REVU": { - "type": "string" - }, - "REVV": { - "type": "string" - }, - "ZRO": { - "type": "string" - }, - "XNL": { - "type": "string" - }, - "XNO": { - "type": "string" - }, - "SAROS": { - "type": "string" - }, - "KACE": { - "type": "string" - }, - "ZRX": { - "type": "string" - }, - "WLTH": { - "type": "string" - }, - "ATOM3L": { - "type": "string" - }, - "GMM": { - "type": "string" - }, - "BEER": { - "type": "string" - }, - "GMT": { - "type": "string" - }, - "HEART": { - "type": "string" - }, - "GMX": { - "type": "string" - }, - "ABBC": { - "type": "string" - }, - "OMNI": { - "type": "string" - }, - "ATOM3S": { - "type": "string" - }, - "IRL": { - "type": "string" - }, - "CFG": { - "type": "string" - }, - "WSDM": { - "type": "string" - }, - "GNS": { - "type": "string" - }, - "VANRY": { - "type": "string" - }, - "CFX": { - "type": "string" - }, - "GRAIL": { - "type": "string" - }, - "BEFI": { - "type": "string" - }, - "VELO": { - "type": "string" - }, - "XPR": { - "type": "string" - }, - "DOVI": { - "type": "string" - }, - "ACE": { - "type": "string" - }, - "ACH": { - "type": "string" - }, - "ISP": { - "type": "string" - }, - "XCAD": { - "type": "string" - }, - "MINA": { - "type": "string" - }, - "TIA": { - "type": "string" - }, - "DRIFT": { - "type": "string" - }, - "ACQ": { - "type": "string" - }, - "ACS": { - "type": "string" - }, - "MIND": { - "type": "string" - }, - "STORE": { - "type": "string" - }, - "REN": { - "type": "string" - }, - "ELA": { - "type": "string" - }, - "DREAMS": { - "type": "string" - }, - "ADA": { - "type": "string" - }, - "ELF": { - "type": "string" - }, - "REQ": { - "type": "string" - }, - "STORJ": { - "type": "string" - }, - "LADYS": { - "type": "string" - }, - "PAXG": { - "type": "string" - }, - "REZ": { - "type": "string" - }, - "XRD": { - "type": "string" - }, - "CHO": { - "type": "string" - }, - "CHR": { - "type": "string" - }, - "ADS": { - "type": "string" - }, - "CHZ": { - "type": "string" - }, - "ADX": { - "type": "string" - }, - "XRP": { - "type": "string" - }, - "JASMY": { - "type": "string" - }, - "KAGI": { - "type": "string" - }, - "FIDA": { - "type": "string" - }, - "PBR": { - "type": "string" - }, - "AEG": { - "type": "string" - }, - "H2O": { - "type": "string" - }, - "CHMB": { - "type": "string" - }, - "SAND3L": { - "type": "string" - }, - "PBX": { - "type": "string" - }, - "SOLVE": { - "type": "string" - }, - "DECHAT": { - "type": "string" - }, - "GARI": { - "type": "string" - }, - "SHIB2L": { - "type": "string" - }, - "SHIB2S": { - "type": "string" - }, - "ENA": { - "type": "string" - }, - "VEMP": { - "type": "string" - }, - "ENJ": { - "type": "string" - }, - "AFG": { - "type": "string" - }, - "RATS": { - "type": "string" - }, - "GRT": { - "type": "string" - }, - "FORWARD": { - "type": "string" - }, - "TFUEL": { - "type": "string" - }, - "ENS": { - "type": "string" - }, - "KASDOWN": { - "type": "string" - }, - "XTM": { - "type": "string" - }, - "DEGEN": { - "type": "string" - }, - "TLM": { - "type": "string" - }, - "DYDXDOWN": { - "type": "string" - }, - "CKB": { - "type": "string" - }, - "LUNC": { - "type": "string" - }, - "AURORA": { - "type": "string" - }, - "LUNA": { - "type": "string" - }, - "XTZ": { - "type": "string" - }, - "ELON": { - "type": "string" - }, - "DMTR": { - "type": "string" - }, - "EOS": { - "type": "string" - }, - "GST": { - "type": "string" - }, - "FORT": { - "type": "string" - }, - "FLAME": { - "type": "string" - }, - "PATEX": { - "type": "string" - }, - "DEEP": { - "type": "string" - }, - "ID3L": { - "type": "string" - }, - "GTC": { - "type": "string" - }, - "ID3S": { - "type": "string" - }, - "RIO": { - "type": "string" - }, - "CLH": { - "type": "string" - }, - "BURGER": { - "type": "string" - }, - "VRA": { - "type": "string" - }, - "SUNDOG": { - "type": "string" - }, - "GTT": { - "type": "string" - }, - "INJUP": { - "type": "string" - }, - "CPOOL": { - "type": "string" - }, - "EPX": { - "type": "string" - }, - "CLV": { - "type": "string" - }, - "FEAR": { - "type": "string" - }, - "MEME": { - "type": "string" - }, - "ROOBEE": { - "type": "string" - }, - "DEFI": { - "type": "string" - }, - "TOKEN": { - "type": "string" - }, - "GRAPE": { - "type": "string" - }, - "KASUP": { - "type": "string" - }, - "XWG": { - "type": "string" - }, - "SKEY": { - "type": "string" - }, - "SFUND": { - "type": "string" - }, - "EQX": { - "type": "string" - }, - "ORDIUP": { - "type": "string" - }, - "TON": { - "type": "string" - }, - "DEGO": { - "type": "string" - }, - "IZI": { - "type": "string" - }, - "ERG": { - "type": "string" - }, - "ERN": { - "type": "string" - }, - "VENOM": { - "type": "string" - }, - "VOXEL": { - "type": "string" - }, - "RLC": { - "type": "string" - }, - "PHA": { - "type": "string" - }, - "DYDXUP": { - "type": "string" - }, - "APE3S": { - "type": "string" - }, - "ORBS": { - "type": "string" - }, - "OPDOWN": { - "type": "string" - }, - "ESE": { - "type": "string" - }, - "APE3L": { - "type": "string" - }, - "HMND": { - "type": "string" - }, - "COQ": { - "type": "string" - }, - "AURY": { - "type": "string" - }, - "CULT": { - "type": "string" - }, - "AKT": { - "type": "string" - }, - "GLMR": { - "type": "string" - }, - "XYM": { - "type": "string" - }, - "ORAI": { - "type": "string" - }, - "XYO": { - "type": "string" - }, - "ETC": { - "type": "string" - }, - "LAI": { - "type": "string" - }, - "PIP": { - "type": "string" - }, - "ETH": { - "type": "string" - }, - "NEO": { - "type": "string" - }, - "RMV": { - "type": "string" - }, - "KLAY": { - "type": "string" - }, - "PIT": { - "type": "string" - }, - "TARA": { - "type": "string" - }, - "KALT": { - "type": "string" - }, - "PIX": { - "type": "string" - }, - "ETN": { - "type": "string" - }, - "CSIX": { - "type": "string" - }, - "TRADE": { - "type": "string" - }, - "MAVIA": { - "type": "string" - }, - "HIGH": { - "type": "string" - }, - "TRB": { - "type": "string" - }, - "ORDI": { - "type": "string" - }, - "TRVL": { - "type": "string" - }, - "AMB": { - "type": "string" - }, - "TRU": { - "type": "string" - }, - "LOGX": { - "type": "string" - }, - "FINC": { - "type": "string" - }, - "INFRA": { - "type": "string" - }, - "NATIX": { - "type": "string" - }, - "NFP": { - "type": "string" - }, - "TRY": { - "type": "string" - }, - "TRX": { - "type": "string" - }, - "LBP": { - "type": "string" - }, - "LBR": { - "type": "string" - }, - "EUL": { - "type": "string" - }, - "NFT": { - "type": "string" - }, - "SEIUP": { - "type": "string" - }, - "PUFFER": { - "type": "string" - }, - "EUR": { - "type": "string" - }, - "ORCA": { - "type": "string" - }, - "NEAR3L": { - "type": "string" - }, - "AMP": { - "type": "string" - }, - "XDEFI": { - "type": "string" - }, - "HIFI": { - "type": "string" - }, - "TRUF": { - "type": "string" - }, - "AITECH": { - "type": "string" - }, - "AMU": { - "type": "string" - }, - "USTC": { - "type": "string" - }, - "KNGL": { - "type": "string" - }, - "FOXY": { - "type": "string" - }, - "NGC": { - "type": "string" - }, - "TENET": { - "type": "string" - }, - "NEAR3S": { - "type": "string" - }, - "MAHA": { - "type": "string" - }, - "NGL": { - "type": "string" - }, - "TST": { - "type": "string" - }, - "HIPPO": { - "type": "string" - }, - "AXS3S": { - "type": "string" - }, - "CRO": { - "type": "string" - }, - "ZPAY": { - "type": "string" - }, - "MNDE": { - "type": "string" - }, - "CRV": { - "type": "string" - }, - "SWASH": { - "type": "string" - }, - "AXS3L": { - "type": "string" - }, - "VERSE": { - "type": "string" - }, - "RPK": { - "type": "string" - }, - "RPL": { - "type": "string" - }, - "AZERO": { - "type": "string" - }, - "SOUL": { - "type": "string" - }, - "VXV": { - "type": "string" - }, - "LDO": { - "type": "string" - }, - "MAGIC": { - "type": "string" - }, - "ALICE": { - "type": "string" - }, - "SEAM": { - "type": "string" - }, - "PLU": { - "type": "string" - }, - "AOG": { - "type": "string" - }, - "SMOLE": { - "type": "string" - }, - "EWT": { - "type": "string" - }, - "TSUGT": { - "type": "string" - }, - "PMG": { - "type": "string" - }, - "OPAI": { - "type": "string" - }, - "LOCUS": { - "type": "string" - }, - "CTA": { - "type": "string" - }, - "NIM": { - "type": "string" - }, - "CTC": { - "type": "string" - }, - "APE": { - "type": "string" - }, - "MERL": { - "type": "string" - }, - "JAM": { - "type": "string" - }, - "CTI": { - "type": "string" - }, - "APP": { - "type": "string" - }, - "APT": { - "type": "string" - }, - "WLDUP": { - "type": "string" - }, - "ZEND": { - "type": "string" - }, - "FIRE": { - "type": "string" - }, - "DENT": { - "type": "string" - }, - "PYTH": { - "type": "string" - }, - "LFT": { - "type": "string" - }, - "DPET": { - "type": "string" - }, - "ORDIDOWN": { - "type": "string" - }, - "KPOL": { - "type": "string" - }, - "ETHUP": { - "type": "string" - }, - "BAND": { - "type": "string" - }, - "POL": { - "type": "string" - }, - "ASTR": { - "type": "string" - }, - "NKN": { - "type": "string" - }, - "RSR": { - "type": "string" - }, - "DVPN": { - "type": "string" - }, - "TWT": { - "type": "string" - }, - "ARB": { - "type": "string" - }, - "CVC": { - "type": "string" - }, - "ARC": { - "type": "string" - }, - "XETA": { - "type": "string" - }, - "MTRG": { - "type": "string" - }, - "LOKA": { - "type": "string" - }, - "LPOOL": { - "type": "string" - }, - "TURBOS": { - "type": "string" - }, - "CVX": { - "type": "string" - }, - "ARX": { - "type": "string" - }, - "MPLX": { - "type": "string" - }, - "SUSHI": { - "type": "string" - }, - "NLK": { - "type": "string" - }, - "PEPE2": { - "type": "string" - }, - "WBTC": { - "type": "string" - }, - "SUI3L": { - "type": "string" - }, - "CWS": { - "type": "string" - }, - "SUI3S": { - "type": "string" - }, - "INSP": { - "type": "string" - }, - "MANA": { - "type": "string" - }, - "VRTX": { - "type": "string" - }, - "CSPR": { - "type": "string" - }, - "ATA": { - "type": "string" - }, - "OPEN": { - "type": "string" - }, - "HAI": { - "type": "string" - }, - "NMR": { - "type": "string" - }, - "ATH": { - "type": "string" - }, - "LIT": { - "type": "string" - }, - "TLOS": { - "type": "string" - }, - "TNSR": { - "type": "string" - }, - "CXT": { - "type": "string" - }, - "POLYX": { - "type": "string" - }, - "ZERO": { - "type": "string" - }, - "ROUTE": { - "type": "string" - }, - "LOOM": { - "type": "string" - }, - "PRE": { - "type": "string" - }, - "VRAUP": { - "type": "string" - }, - "HBB": { - "type": "string" - }, - "RVN": { - "type": "string" - }, - "PRQ": { - "type": "string" - }, - "ONDO": { - "type": "string" - }, - "PEPEDOWN": { - "type": "string" - }, - "WOOP": { - "type": "string" - }, - "LUNCUP": { - "type": "string" - }, - "KAVA": { - "type": "string" - }, - "LKI": { - "type": "string" - }, - "AVA": { - "type": "string" - }, - "NOM": { - "type": "string" - }, - "MAPO": { - "type": "string" - }, - "PEPEUP": { - "type": "string" - }, - "STRAX": { - "type": "string" - }, - "NOT": { - "type": "string" - }, - "ZERC": { - "type": "string" - }, - "BCUT": { - "type": "string" - }, - "MASA": { - "type": "string" - }, - "WAN": { - "type": "string" - }, - "WAT": { - "type": "string" - }, - "WAX": { - "type": "string" - }, - "MASK": { - "type": "string" - }, - "EOS3L": { - "type": "string" - }, - "IDEA": { - "type": "string" - }, - "EOS3S": { - "type": "string" - }, - "YFI": { - "type": "string" - }, - "MOODENG": { - "type": "string" - }, - "XCUR": { - "type": "string" - }, - "HYDRA": { - "type": "string" - }, - "POPCAT": { - "type": "string" - }, - "LQTY": { - "type": "string" - }, - "PIXEL": { - "type": "string" - }, - "LMR": { - "type": "string" - }, - "ZETA": { - "type": "string" - }, - "YGG": { - "type": "string" - }, - "AXS": { - "type": "string" - }, - "BCHSV": { - "type": "string" - }, - "NRN": { - "type": "string" - }, - "FTON": { - "type": "string" - }, - "COMP": { - "type": "string" - }, - "XPRT": { - "type": "string" - }, - "HFT": { - "type": "string" - }, - "UXLINK": { - "type": "string" - }, - "STAMP": { - "type": "string" - }, - "RUNE": { - "type": "string" - }, - "ZEUS": { - "type": "string" - }, - "LTC3L": { - "type": "string" - }, - "DAPP": { - "type": "string" - }, - "FORTH": { - "type": "string" - }, - "ALPINE": { - "type": "string" - }, - "SENSO": { - "type": "string" - }, - "LTC3S": { - "type": "string" - }, - "DEXE": { - "type": "string" - }, - "GOAL": { - "type": "string" - }, - "AVAX": { - "type": "string" - }, - "LISTA": { - "type": "string" - }, - "AMPL": { - "type": "string" - }, - "WORK": { - "type": "string" - }, - "BRWL": { - "type": "string" - }, - "BANANA": { - "type": "string" - }, - "PUSH": { - "type": "string" - }, - "WEN": { - "type": "string" - }, - "NEIRO": { - "type": "string" - }, - "BTCUP": { - "type": "string" - }, - "SOL3S": { - "type": "string" - }, - "BRAWL": { - "type": "string" - }, - "LAY3R": { - "type": "string" - }, - "LPT": { - "type": "string" - }, - "GODS": { - "type": "string" - }, - "SAND3S": { - "type": "string" - }, - "RDNT": { - "type": "string" - }, - "SOL3L": { - "type": "string" - }, - "NIBI": { - "type": "string" - }, - "NUM": { - "type": "string" - }, - "PYR": { - "type": "string" - }, - "DAG": { - "type": "string" - }, - "DAI": { - "type": "string" - }, - "HIP": { - "type": "string" - }, - "DAO": { - "type": "string" - }, - "AVAIL": { - "type": "string" - }, - "DAR": { - "type": "string" - }, - "FET": { - "type": "string" - }, - "FCON": { - "type": "string" - }, - "XAVA": { - "type": "string" - }, - "LRC": { - "type": "string" - }, - "UNI3S": { - "type": "string" - }, - "POKT": { - "type": "string" - }, - "DASH": { - "type": "string" - }, - "BAKEDOWN": { - "type": "string" - }, - "POLC": { - "type": "string" - }, - "CIRUS": { - "type": "string" - }, - "UNI3L": { - "type": "string" - }, - "NWC": { - "type": "string" - }, - "POLK": { - "type": "string" - }, - "LSD": { - "type": "string" - }, - "MARS4": { - "type": "string" - }, - "LSK": { - "type": "string" - }, - "BLOCK": { - "type": "string" - }, - "ANALOS": { - "type": "string" - }, - "SAFE": { - "type": "string" - }, - "DCK": { - "type": "string" - }, - "LSS": { - "type": "string" - }, - "DCR": { - "type": "string" - }, - "LIKE": { - "type": "string" - }, - "DATA": { - "type": "string" - }, - "WIF": { - "type": "string" - }, - "BLOK": { - "type": "string" - }, - "LTC": { - "type": "string" - }, - "METIS": { - "type": "string" - }, - "WIN": { - "type": "string" - }, - "HLG": { - "type": "string" - }, - "LTO": { - "type": "string" - }, - "DYDX": { - "type": "string" - }, - "ARB3S": { - "type": "string" - }, - "MUBI": { - "type": "string" - }, - "ARB3L": { - "type": "string" - }, - "RBTC1": { - "type": "string" - }, - "POND": { - "type": "string" - }, - "LINA": { - "type": "string" - }, - "MYRIA": { - "type": "string" - }, - "LINK": { - "type": "string" - }, - "QTUM": { - "type": "string" - }, - "TUNE": { - "type": "string" - }, - "UFO": { - "type": "string" - }, - "CYBER": { - "type": "string" - }, - "WILD": { - "type": "string" - }, - "POLS": { - "type": "string" - }, - "NYM": { - "type": "string" - }, - "FIL": { - "type": "string" - }, - "BAL": { - "type": "string" - }, - "SCA": { - "type": "string" - }, - "STND": { - "type": "string" - }, - "WMTX": { - "type": "string" - }, - "SCLP": { - "type": "string" - }, - "MANEKI": { - "type": "string" - }, - "BAT": { - "type": "string" - }, - "AKRO": { - "type": "string" - }, - "FTM3L": { - "type": "string" - }, - "BAX": { - "type": "string" - }, - "FTM3S": { - "type": "string" - }, - "COTI": { - "type": "string" - } - }, - "required": [ - "AGLD", - "DFI", - "PYTHUP", - "ISLM", - "NEAR", - "AIOZ", - "AUDIO", - "BBL", - "WLD", - "HNT", - "ETHFI", - "DMAIL", - "OPUP", - "VET3S", - "MANA3S", - "TIDAL", - "HALO", - "OPUL", - "MANA3L", - "DGB", - "AA", - "BCH", - "GMEE", - "JST", - "PBUX", - "AR", - "SEI", - "PSTAKE", - "LMWR", - "UNFIDOWN", - "BB", - "JTO", - "WEMIX", - "G", - "MARSH", - "BN", - "FLIP", - "FLR", - "BIGTIME", - "FLY", - "T", - "W", - "BDX", - "BABYDOGE", - "SFP", - "DIA", - "ISME", - "LYM", - "VET3L", - "JUP", - "LYX", - "AIEPK", - "SILLY", - "SCPT", - "WOO", - "BLUR", - "STRK", - "BFC", - "DC", - "KARATE", - "SUSHI3L", - "NETVR", - "WAVES", - "LITH", - "HAPI", - "SUSHI3S", - "CEEK", - "FLOKI", - "SHR", - "SAND", - "TURT", - "UMA", - "BEPRO", - "SCRT", - "TUSD", - "COOKIE", - "LRDS", - "SIN", - "OAS", - "ROOT", - "ADA3L", - "TIAUP", - "HTR", - "UNB", - "UNA", - "HARD", - "G3", - "ADA3S", - "MYRO", - "HTX", - "FT", - "BTCDOWN", - "UNI", - "FX", - "OBI", - "UNO", - "WRX", - "TIADOWN", - "ETHDOWN", - "WELL", - "SWFTC", - "SKL", - "UOS", - "AIPAD", - "BRETT", - "SKY", - "FRM", - "VISION", - "LENDS", - "SLF", - "BULL", - "FLOW", - "ODDZ", - "SLN", - "UPO", - "SLP", - "ID", - "SLIM", - "SPOT", - "DOP", - "ISSP", - "UQC", - "IO", - "DOT", - "1INCH", - "SMH", - "MAK", - "TOKO", - "TURBO", - "UNFI", - "MAN", - "EVER", - "FTM", - "SHRAP", - "MAV", - "MAX", - "DPR", - "FTT", - "ARKM", - "ATOM", - "PENDLE", - "QUICK", - "BLZ", - "BOBA", - "MBL", - "OFN", - "UNIO", - "SNS", - "SNX", - "NXRA", - "TAIKO", - "AVAX3L", - "L3", - "API3", - "XRP3S", - "QKC", - "AVAX3S", - "ROSE", - "SATS", - "BMX", - "PORTAL", - "TOMI", - "XRP3L", - "SOL", - "SON", - "BNC", - "SOCIAL", - "CGPT", - "CELR", - "BNB", - "OGN", - "CELO", - "AUCTION", - "MANTA", - "LAYER", - "AERO", - "CETUS", - "LL", - "SPA", - "PYTHDOWN", - "NEIROCTO", - "UTK", - "GMRX", - "BOB", - "HOTCROSS", - "AERGO", - "MOCA", - "SQD", - "MV", - "BNB3L", - "BNB3S", - "GALAX3L", - "KAI", - "SQR", - "GALAX3S", - "EGLD", - "ZBCN", - "KAS", - "MEW", - "PUNDIX", - "LOOKS", - "FXS", - "BOSON", - "BRISE", - "AEVO", - "FLUX", - "PRCL", - "UNFIUP", - "SEIDOWN", - "DOAI", - "QNT", - "REDO", - "STRIKE", - "ETHW", - "OM", - "OP", - "WHALE", - "1CAT", - "NEON", - "GTAI", - "SSV", - "ETH2", - "KCS", - "ARPA", - "ARTFI", - "BRL", - "ALEX", - "STG", - "SHIB", - "IOTX", - "OLE", - "KDA", - "CERE", - "DOCK", - "STX", - "OLT", - "QI", - "SDAO", - "BLAST", - "LINK3S", - "IOST", - "SUI", - "CAKE", - "BSW", - "OMG", - "VOLT", - "LINK3L", - "GEEQ", - "PYUSD", - "SUN", - "TOWER", - "BTC", - "IOTA", - "REEF", - "TRIAS", - "KEY", - "ETH3L", - "BTT", - "ONE", - "RENDER", - "ETH3S", - "ANKR", - "ALGO", - "SYLO", - "ZCX", - "SD", - "ONT", - "MJT", - "DYM", - "DYP", - "BAKEUP", - "OOE", - "ZELIX", - "DOGE3L", - "ARTY", - "QORPO", - "ICE", - "NOTAI", - "DOGE3S", - "NAKA", - "GALAX", - "MKR", - "DODO", - "ICP", - "ZEC", - "ZEE", - "ICX", - "KMNO", - "TT", - "DOT3L", - "XAI", - "ZEN", - "DOGE", - "ALPHA", - "DUSK", - "DOT3S", - "SXP", - "HBAR", - "SYNT", - "ZEX", - "BONDLY", - "MLK", - "KICKS", - "PEPE", - "OUSD", - "LUNCDOWN", - "DOGS", - "REV3L", - "CTSI", - "C98", - "OSMO", - "NTRN", - "CFX2S", - "SYN", - "VIDT", - "SYS", - "GAS", - "BOME", - "COMBO", - "XCH", - "VR", - "CFX2L", - "VSYS", - "PANDORA", - "THETA", - "XCN", - "NEXG", - "MELOS", - "XCV", - "ORN", - "WLKN", - "AAVE", - "MNT", - "BONK", - "PERP", - "XDC", - "MNW", - "XDB", - "BOND", - "SUIA", - "MOG", - "SUTER", - "TIME", - "RACA", - "BICO", - "MON", - "SWEAT", - "MOXIE", - "BABYBNB", - "IGU", - "HMSTR", - "XEC", - "MONI", - "XR", - "PEOPLE", - "PUMLX", - "ZIL", - "WLDDOWN", - "VAI", - "XEN", - "MPC", - "XEM", - "JASMY3S", - "OTK", - "TRAC", - "DFYN", - "BIDP", - "JASMY3L", - "INJDOWN", - "KLV", - "WAXL", - "TRBDOWN", - "BCH3L", - "GMT3S", - "KMD", - "BCH3S", - "ECOX", - "AAVE3S", - "GMT3L", - "EPIK", - "SUIP", - "AAVE3L", - "ZK", - "ZKF", - "OMNIA", - "ZKJ", - "ZKL", - "GAFI", - "CARV", - "KNC", - "CATS", - "PROM", - "ALEPH", - "PONKE", - "OVR", - "CATI", - "ORDER", - "GFT", - "BIFI", - "GGC", - "GGG", - "DAPPX", - "SUKU", - "ULTI", - "CREDI", - "ERTHA", - "FURY", - "KARRAT", - "MOBILE", - "SIDUS", - "NAVI", - "TAO", - "USDJ", - "MTL", - "VET", - "FITFI", - "USDT", - "OXT", - "CANDY", - "USDP", - "MTS", - "TADA", - "MTV", - "NAVX", - "ILV", - "VINU", - "GHX", - "EDU", - "HYVE", - "BTC3L", - "ANYONE", - "BEAT", - "KING", - "CREAM", - "CAS", - "IMX", - "CAT", - "BTC3S", - "USDE", - "USDD", - "CWAR", - "USDC", - "KRL", - "INJ", - "GAME", - "TRIBL", - "XLM", - "TRBUP", - "VRADOWN", - "SUPER", - "EIGEN", - "IOI", - "KSM", - "CCD", - "EGO", - "EGP", - "MXC", - "TEL", - "MOVR", - "XMR", - "MXM", - "OORT", - "GLM", - "RAY", - "XTAG", - "GLQ", - "CWEB", - "REVU", - "REVV", - "ZRO", - "XNL", - "XNO", - "SAROS", - "KACE", - "ZRX", - "WLTH", - "ATOM3L", - "GMM", - "BEER", - "GMT", - "HEART", - "GMX", - "ABBC", - "OMNI", - "ATOM3S", - "IRL", - "CFG", - "WSDM", - "GNS", - "VANRY", - "CFX", - "GRAIL", - "BEFI", - "VELO", - "XPR", - "DOVI", - "ACE", - "ACH", - "ISP", - "XCAD", - "MINA", - "TIA", - "DRIFT", - "ACQ", - "ACS", - "MIND", - "STORE", - "REN", - "ELA", - "DREAMS", - "ADA", - "ELF", - "REQ", - "STORJ", - "LADYS", - "PAXG", - "REZ", - "XRD", - "CHO", - "CHR", - "ADS", - "CHZ", - "ADX", - "XRP", - "JASMY", - "KAGI", - "FIDA", - "PBR", - "AEG", - "H2O", - "CHMB", - "SAND3L", - "PBX", - "SOLVE", - "DECHAT", - "GARI", - "SHIB2L", - "SHIB2S", - "ENA", - "VEMP", - "ENJ", - "AFG", - "RATS", - "GRT", - "FORWARD", - "TFUEL", - "ENS", - "KASDOWN", - "XTM", - "DEGEN", - "TLM", - "DYDXDOWN", - "CKB", - "LUNC", - "AURORA", - "LUNA", - "XTZ", - "ELON", - "DMTR", - "EOS", - "GST", - "FORT", - "FLAME", - "PATEX", - "DEEP", - "ID3L", - "GTC", - "ID3S", - "RIO", - "CLH", - "BURGER", - "VRA", - "SUNDOG", - "GTT", - "INJUP", - "CPOOL", - "EPX", - "CLV", - "FEAR", - "MEME", - "ROOBEE", - "DEFI", - "TOKEN", - "GRAPE", - "KASUP", - "XWG", - "SKEY", - "SFUND", - "EQX", - "ORDIUP", - "TON", - "DEGO", - "IZI", - "ERG", - "ERN", - "VENOM", - "VOXEL", - "RLC", - "PHA", - "DYDXUP", - "APE3S", - "ORBS", - "OPDOWN", - "ESE", - "APE3L", - "HMND", - "COQ", - "AURY", - "CULT", - "AKT", - "GLMR", - "XYM", - "ORAI", - "XYO", - "ETC", - "LAI", - "PIP", - "ETH", - "NEO", - "RMV", - "KLAY", - "PIT", - "TARA", - "KALT", - "PIX", - "ETN", - "CSIX", - "TRADE", - "MAVIA", - "HIGH", - "TRB", - "ORDI", - "TRVL", - "AMB", - "TRU", - "LOGX", - "FINC", - "INFRA", - "NATIX", - "NFP", - "TRY", - "TRX", - "LBP", - "LBR", - "EUL", - "NFT", - "SEIUP", - "PUFFER", - "EUR", - "ORCA", - "NEAR3L", - "AMP", - "XDEFI", - "HIFI", - "TRUF", - "AITECH", - "AMU", - "USTC", - "KNGL", - "FOXY", - "NGC", - "TENET", - "NEAR3S", - "MAHA", - "NGL", - "TST", - "HIPPO", - "AXS3S", - "CRO", - "ZPAY", - "MNDE", - "CRV", - "SWASH", - "AXS3L", - "VERSE", - "RPK", - "RPL", - "AZERO", - "SOUL", - "VXV", - "LDO", - "MAGIC", - "ALICE", - "SEAM", - "PLU", - "AOG", - "SMOLE", - "EWT", - "TSUGT", - "PMG", - "OPAI", - "LOCUS", - "CTA", - "NIM", - "CTC", - "APE", - "MERL", - "JAM", - "CTI", - "APP", - "APT", - "WLDUP", - "ZEND", - "FIRE", - "DENT", - "PYTH", - "LFT", - "DPET", - "ORDIDOWN", - "KPOL", - "ETHUP", - "BAND", - "POL", - "ASTR", - "NKN", - "RSR", - "DVPN", - "TWT", - "ARB", - "CVC", - "ARC", - "XETA", - "MTRG", - "LOKA", - "LPOOL", - "TURBOS", - "CVX", - "ARX", - "MPLX", - "SUSHI", - "NLK", - "PEPE2", - "WBTC", - "SUI3L", - "CWS", - "SUI3S", - "INSP", - "MANA", - "VRTX", - "CSPR", - "ATA", - "OPEN", - "HAI", - "NMR", - "ATH", - "LIT", - "TLOS", - "TNSR", - "CXT", - "POLYX", - "ZERO", - "ROUTE", - "LOOM", - "PRE", - "VRAUP", - "HBB", - "RVN", - "PRQ", - "ONDO", - "PEPEDOWN", - "WOOP", - "LUNCUP", - "KAVA", - "LKI", - "AVA", - "NOM", - "MAPO", - "PEPEUP", - "STRAX", - "NOT", - "ZERC", - "BCUT", - "MASA", - "WAN", - "WAT", - "WAX", - "MASK", - "EOS3L", - "IDEA", - "EOS3S", - "YFI", - "MOODENG", - "XCUR", - "HYDRA", - "POPCAT", - "LQTY", - "PIXEL", - "LMR", - "ZETA", - "YGG", - "AXS", - "BCHSV", - "NRN", - "FTON", - "COMP", - "XPRT", - "HFT", - "UXLINK", - "STAMP", - "RUNE", - "ZEUS", - "LTC3L", - "DAPP", - "FORTH", - "ALPINE", - "SENSO", - "LTC3S", - "DEXE", - "GOAL", - "AVAX", - "LISTA", - "AMPL", - "WORK", - "BRWL", - "BANANA", - "PUSH", - "WEN", - "NEIRO", - "BTCUP", - "SOL3S", - "BRAWL", - "LAY3R", - "LPT", - "GODS", - "SAND3S", - "RDNT", - "SOL3L", - "NIBI", - "NUM", - "PYR", - "DAG", - "DAI", - "HIP", - "DAO", - "AVAIL", - "DAR", - "FET", - "FCON", - "XAVA", - "LRC", - "UNI3S", - "POKT", - "DASH", - "BAKEDOWN", - "POLC", - "CIRUS", - "UNI3L", - "NWC", - "POLK", - "LSD", - "MARS4", - "LSK", - "BLOCK", - "ANALOS", - "SAFE", - "DCK", - "LSS", - "DCR", - "LIKE", - "DATA", - "WIF", - "BLOK", - "LTC", - "METIS", - "WIN", - "HLG", - "LTO", - "DYDX", - "ARB3S", - "MUBI", - "ARB3L", - "RBTC1", - "POND", - "LINA", - "MYRIA", - "LINK", - "QTUM", - "TUNE", - "UFO", - "CYBER", - "WILD", - "POLS", - "NYM", - "FIL", - "BAL", - "SCA", - "STND", - "WMTX", - "SCLP", - "MANEKI", - "BAT", - "AKRO", - "FTM3L", - "BAX", - "FTM3S", - "COTI" - ] + "properties": {}, + "additionalProperties": { + "type": "string" + } } }, "required": [ diff --git a/spec/rest/entry/openapi-spot.json b/spec/rest/entry/openapi-spot.json index a65a5829..bbdfad20 100644 --- a/spec/rest/entry/openapi-spot.json +++ b/spec/rest/entry/openapi-spot.json @@ -2321,3594 +2321,10 @@ }, "data": { "type": "object", - "properties": { - "AGLD": { - "type": "string" - }, - "DFI": { - "type": "string" - }, - "PYTHUP": { - "type": "string" - }, - "ISLM": { - "type": "string" - }, - "NEAR": { - "type": "string" - }, - "AIOZ": { - "type": "string" - }, - "AUDIO": { - "type": "string" - }, - "BBL": { - "type": "string" - }, - "WLD": { - "type": "string" - }, - "HNT": { - "type": "string" - }, - "ETHFI": { - "type": "string" - }, - "DMAIL": { - "type": "string" - }, - "OPUP": { - "type": "string" - }, - "VET3S": { - "type": "string" - }, - "MANA3S": { - "type": "string" - }, - "TIDAL": { - "type": "string" - }, - "HALO": { - "type": "string" - }, - "OPUL": { - "type": "string" - }, - "MANA3L": { - "type": "string" - }, - "DGB": { - "type": "string" - }, - "AA": { - "type": "string" - }, - "BCH": { - "type": "string" - }, - "GMEE": { - "type": "string" - }, - "JST": { - "type": "string" - }, - "PBUX": { - "type": "string" - }, - "AR": { - "type": "string" - }, - "SEI": { - "type": "string" - }, - "PSTAKE": { - "type": "string" - }, - "LMWR": { - "type": "string" - }, - "UNFIDOWN": { - "type": "string" - }, - "BB": { - "type": "string" - }, - "JTO": { - "type": "string" - }, - "WEMIX": { - "type": "string" - }, - "G": { - "type": "string" - }, - "MARSH": { - "type": "string" - }, - "BN": { - "type": "string" - }, - "FLIP": { - "type": "string" - }, - "FLR": { - "type": "string" - }, - "BIGTIME": { - "type": "string" - }, - "FLY": { - "type": "string" - }, - "T": { - "type": "string" - }, - "W": { - "type": "string" - }, - "BDX": { - "type": "string" - }, - "BABYDOGE": { - "type": "string" - }, - "SFP": { - "type": "string" - }, - "DIA": { - "type": "string" - }, - "ISME": { - "type": "string" - }, - "LYM": { - "type": "string" - }, - "VET3L": { - "type": "string" - }, - "JUP": { - "type": "string" - }, - "LYX": { - "type": "string" - }, - "AIEPK": { - "type": "string" - }, - "SILLY": { - "type": "string" - }, - "SCPT": { - "type": "string" - }, - "WOO": { - "type": "string" - }, - "BLUR": { - "type": "string" - }, - "STRK": { - "type": "string" - }, - "BFC": { - "type": "string" - }, - "DC": { - "type": "string" - }, - "KARATE": { - "type": "string" - }, - "SUSHI3L": { - "type": "string" - }, - "NETVR": { - "type": "string" - }, - "WAVES": { - "type": "string" - }, - "LITH": { - "type": "string" - }, - "HAPI": { - "type": "string" - }, - "SUSHI3S": { - "type": "string" - }, - "CEEK": { - "type": "string" - }, - "FLOKI": { - "type": "string" - }, - "SHR": { - "type": "string" - }, - "SAND": { - "type": "string" - }, - "TURT": { - "type": "string" - }, - "UMA": { - "type": "string" - }, - "BEPRO": { - "type": "string" - }, - "SCRT": { - "type": "string" - }, - "TUSD": { - "type": "string" - }, - "COOKIE": { - "type": "string" - }, - "LRDS": { - "type": "string" - }, - "SIN": { - "type": "string" - }, - "OAS": { - "type": "string" - }, - "ROOT": { - "type": "string" - }, - "ADA3L": { - "type": "string" - }, - "TIAUP": { - "type": "string" - }, - "HTR": { - "type": "string" - }, - "UNB": { - "type": "string" - }, - "UNA": { - "type": "string" - }, - "HARD": { - "type": "string" - }, - "G3": { - "type": "string" - }, - "ADA3S": { - "type": "string" - }, - "MYRO": { - "type": "string" - }, - "HTX": { - "type": "string" - }, - "FT": { - "type": "string" - }, - "BTCDOWN": { - "type": "string" - }, - "UNI": { - "type": "string" - }, - "FX": { - "type": "string" - }, - "OBI": { - "type": "string" - }, - "UNO": { - "type": "string" - }, - "WRX": { - "type": "string" - }, - "TIADOWN": { - "type": "string" - }, - "ETHDOWN": { - "type": "string" - }, - "WELL": { - "type": "string" - }, - "SWFTC": { - "type": "string" - }, - "SKL": { - "type": "string" - }, - "UOS": { - "type": "string" - }, - "AIPAD": { - "type": "string" - }, - "BRETT": { - "type": "string" - }, - "SKY": { - "type": "string" - }, - "FRM": { - "type": "string" - }, - "VISION": { - "type": "string" - }, - "LENDS": { - "type": "string" - }, - "SLF": { - "type": "string" - }, - "BULL": { - "type": "string" - }, - "FLOW": { - "type": "string" - }, - "ODDZ": { - "type": "string" - }, - "SLN": { - "type": "string" - }, - "UPO": { - "type": "string" - }, - "SLP": { - "type": "string" - }, - "ID": { - "type": "string" - }, - "SLIM": { - "type": "string" - }, - "SPOT": { - "type": "string" - }, - "DOP": { - "type": "string" - }, - "ISSP": { - "type": "string" - }, - "UQC": { - "type": "string" - }, - "IO": { - "type": "string" - }, - "DOT": { - "type": "string" - }, - "1INCH": { - "type": "string" - }, - "SMH": { - "type": "string" - }, - "MAK": { - "type": "string" - }, - "TOKO": { - "type": "string" - }, - "TURBO": { - "type": "string" - }, - "UNFI": { - "type": "string" - }, - "MAN": { - "type": "string" - }, - "EVER": { - "type": "string" - }, - "FTM": { - "type": "string" - }, - "SHRAP": { - "type": "string" - }, - "MAV": { - "type": "string" - }, - "MAX": { - "type": "string" - }, - "DPR": { - "type": "string" - }, - "FTT": { - "type": "string" - }, - "ARKM": { - "type": "string" - }, - "ATOM": { - "type": "string" - }, - "PENDLE": { - "type": "string" - }, - "QUICK": { - "type": "string" - }, - "BLZ": { - "type": "string" - }, - "BOBA": { - "type": "string" - }, - "MBL": { - "type": "string" - }, - "OFN": { - "type": "string" - }, - "UNIO": { - "type": "string" - }, - "SNS": { - "type": "string" - }, - "SNX": { - "type": "string" - }, - "NXRA": { - "type": "string" - }, - "TAIKO": { - "type": "string" - }, - "AVAX3L": { - "type": "string" - }, - "L3": { - "type": "string" - }, - "API3": { - "type": "string" - }, - "XRP3S": { - "type": "string" - }, - "QKC": { - "type": "string" - }, - "AVAX3S": { - "type": "string" - }, - "ROSE": { - "type": "string" - }, - "SATS": { - "type": "string" - }, - "BMX": { - "type": "string" - }, - "PORTAL": { - "type": "string" - }, - "TOMI": { - "type": "string" - }, - "XRP3L": { - "type": "string" - }, - "SOL": { - "type": "string" - }, - "SON": { - "type": "string" - }, - "BNC": { - "type": "string" - }, - "SOCIAL": { - "type": "string" - }, - "CGPT": { - "type": "string" - }, - "CELR": { - "type": "string" - }, - "BNB": { - "type": "string" - }, - "OGN": { - "type": "string" - }, - "CELO": { - "type": "string" - }, - "AUCTION": { - "type": "string" - }, - "MANTA": { - "type": "string" - }, - "LAYER": { - "type": "string" - }, - "AERO": { - "type": "string" - }, - "CETUS": { - "type": "string" - }, - "LL": { - "type": "string" - }, - "SPA": { - "type": "string" - }, - "PYTHDOWN": { - "type": "string" - }, - "NEIROCTO": { - "type": "string" - }, - "UTK": { - "type": "string" - }, - "GMRX": { - "type": "string" - }, - "BOB": { - "type": "string" - }, - "HOTCROSS": { - "type": "string" - }, - "AERGO": { - "type": "string" - }, - "MOCA": { - "type": "string" - }, - "SQD": { - "type": "string" - }, - "MV": { - "type": "string" - }, - "BNB3L": { - "type": "string" - }, - "BNB3S": { - "type": "string" - }, - "GALAX3L": { - "type": "string" - }, - "KAI": { - "type": "string" - }, - "SQR": { - "type": "string" - }, - "GALAX3S": { - "type": "string" - }, - "EGLD": { - "type": "string" - }, - "ZBCN": { - "type": "string" - }, - "KAS": { - "type": "string" - }, - "MEW": { - "type": "string" - }, - "PUNDIX": { - "type": "string" - }, - "LOOKS": { - "type": "string" - }, - "FXS": { - "type": "string" - }, - "BOSON": { - "type": "string" - }, - "BRISE": { - "type": "string" - }, - "AEVO": { - "type": "string" - }, - "FLUX": { - "type": "string" - }, - "PRCL": { - "type": "string" - }, - "UNFIUP": { - "type": "string" - }, - "SEIDOWN": { - "type": "string" - }, - "DOAI": { - "type": "string" - }, - "QNT": { - "type": "string" - }, - "REDO": { - "type": "string" - }, - "STRIKE": { - "type": "string" - }, - "ETHW": { - "type": "string" - }, - "OM": { - "type": "string" - }, - "OP": { - "type": "string" - }, - "WHALE": { - "type": "string" - }, - "1CAT": { - "type": "string" - }, - "NEON": { - "type": "string" - }, - "GTAI": { - "type": "string" - }, - "SSV": { - "type": "string" - }, - "ETH2": { - "type": "string" - }, - "KCS": { - "type": "string" - }, - "ARPA": { - "type": "string" - }, - "ARTFI": { - "type": "string" - }, - "BRL": { - "type": "string" - }, - "ALEX": { - "type": "string" - }, - "STG": { - "type": "string" - }, - "SHIB": { - "type": "string" - }, - "IOTX": { - "type": "string" - }, - "OLE": { - "type": "string" - }, - "KDA": { - "type": "string" - }, - "CERE": { - "type": "string" - }, - "DOCK": { - "type": "string" - }, - "STX": { - "type": "string" - }, - "OLT": { - "type": "string" - }, - "QI": { - "type": "string" - }, - "SDAO": { - "type": "string" - }, - "BLAST": { - "type": "string" - }, - "LINK3S": { - "type": "string" - }, - "IOST": { - "type": "string" - }, - "SUI": { - "type": "string" - }, - "CAKE": { - "type": "string" - }, - "BSW": { - "type": "string" - }, - "OMG": { - "type": "string" - }, - "VOLT": { - "type": "string" - }, - "LINK3L": { - "type": "string" - }, - "GEEQ": { - "type": "string" - }, - "PYUSD": { - "type": "string" - }, - "SUN": { - "type": "string" - }, - "TOWER": { - "type": "string" - }, - "BTC": { - "type": "string" - }, - "IOTA": { - "type": "string" - }, - "REEF": { - "type": "string" - }, - "TRIAS": { - "type": "string" - }, - "KEY": { - "type": "string" - }, - "ETH3L": { - "type": "string" - }, - "BTT": { - "type": "string" - }, - "ONE": { - "type": "string" - }, - "RENDER": { - "type": "string" - }, - "ETH3S": { - "type": "string" - }, - "ANKR": { - "type": "string" - }, - "ALGO": { - "type": "string" - }, - "SYLO": { - "type": "string" - }, - "ZCX": { - "type": "string" - }, - "SD": { - "type": "string" - }, - "ONT": { - "type": "string" - }, - "MJT": { - "type": "string" - }, - "DYM": { - "type": "string" - }, - "DYP": { - "type": "string" - }, - "BAKEUP": { - "type": "string" - }, - "OOE": { - "type": "string" - }, - "ZELIX": { - "type": "string" - }, - "DOGE3L": { - "type": "string" - }, - "ARTY": { - "type": "string" - }, - "QORPO": { - "type": "string" - }, - "ICE": { - "type": "string" - }, - "NOTAI": { - "type": "string" - }, - "DOGE3S": { - "type": "string" - }, - "NAKA": { - "type": "string" - }, - "GALAX": { - "type": "string" - }, - "MKR": { - "type": "string" - }, - "DODO": { - "type": "string" - }, - "ICP": { - "type": "string" - }, - "ZEC": { - "type": "string" - }, - "ZEE": { - "type": "string" - }, - "ICX": { - "type": "string" - }, - "KMNO": { - "type": "string" - }, - "TT": { - "type": "string" - }, - "DOT3L": { - "type": "string" - }, - "XAI": { - "type": "string" - }, - "ZEN": { - "type": "string" - }, - "DOGE": { - "type": "string" - }, - "ALPHA": { - "type": "string" - }, - "DUSK": { - "type": "string" - }, - "DOT3S": { - "type": "string" - }, - "SXP": { - "type": "string" - }, - "HBAR": { - "type": "string" - }, - "SYNT": { - "type": "string" - }, - "ZEX": { - "type": "string" - }, - "BONDLY": { - "type": "string" - }, - "MLK": { - "type": "string" - }, - "KICKS": { - "type": "string" - }, - "PEPE": { - "type": "string" - }, - "OUSD": { - "type": "string" - }, - "LUNCDOWN": { - "type": "string" - }, - "DOGS": { - "type": "string" - }, - "REV3L": { - "type": "string" - }, - "CTSI": { - "type": "string" - }, - "C98": { - "type": "string" - }, - "OSMO": { - "type": "string" - }, - "NTRN": { - "type": "string" - }, - "CFX2S": { - "type": "string" - }, - "SYN": { - "type": "string" - }, - "VIDT": { - "type": "string" - }, - "SYS": { - "type": "string" - }, - "GAS": { - "type": "string" - }, - "BOME": { - "type": "string" - }, - "COMBO": { - "type": "string" - }, - "XCH": { - "type": "string" - }, - "VR": { - "type": "string" - }, - "CFX2L": { - "type": "string" - }, - "VSYS": { - "type": "string" - }, - "PANDORA": { - "type": "string" - }, - "THETA": { - "type": "string" - }, - "XCN": { - "type": "string" - }, - "NEXG": { - "type": "string" - }, - "MELOS": { - "type": "string" - }, - "XCV": { - "type": "string" - }, - "ORN": { - "type": "string" - }, - "WLKN": { - "type": "string" - }, - "AAVE": { - "type": "string" - }, - "MNT": { - "type": "string" - }, - "BONK": { - "type": "string" - }, - "PERP": { - "type": "string" - }, - "XDC": { - "type": "string" - }, - "MNW": { - "type": "string" - }, - "XDB": { - "type": "string" - }, - "BOND": { - "type": "string" - }, - "SUIA": { - "type": "string" - }, - "MOG": { - "type": "string" - }, - "SUTER": { - "type": "string" - }, - "TIME": { - "type": "string" - }, - "RACA": { - "type": "string" - }, - "BICO": { - "type": "string" - }, - "MON": { - "type": "string" - }, - "SWEAT": { - "type": "string" - }, - "MOXIE": { - "type": "string" - }, - "BABYBNB": { - "type": "string" - }, - "IGU": { - "type": "string" - }, - "HMSTR": { - "type": "string" - }, - "XEC": { - "type": "string" - }, - "MONI": { - "type": "string" - }, - "XR": { - "type": "string" - }, - "PEOPLE": { - "type": "string" - }, - "PUMLX": { - "type": "string" - }, - "ZIL": { - "type": "string" - }, - "WLDDOWN": { - "type": "string" - }, - "VAI": { - "type": "string" - }, - "XEN": { - "type": "string" - }, - "MPC": { - "type": "string" - }, - "XEM": { - "type": "string" - }, - "JASMY3S": { - "type": "string" - }, - "OTK": { - "type": "string" - }, - "TRAC": { - "type": "string" - }, - "DFYN": { - "type": "string" - }, - "BIDP": { - "type": "string" - }, - "JASMY3L": { - "type": "string" - }, - "INJDOWN": { - "type": "string" - }, - "KLV": { - "type": "string" - }, - "WAXL": { - "type": "string" - }, - "TRBDOWN": { - "type": "string" - }, - "BCH3L": { - "type": "string" - }, - "GMT3S": { - "type": "string" - }, - "KMD": { - "type": "string" - }, - "BCH3S": { - "type": "string" - }, - "ECOX": { - "type": "string" - }, - "AAVE3S": { - "type": "string" - }, - "GMT3L": { - "type": "string" - }, - "EPIK": { - "type": "string" - }, - "SUIP": { - "type": "string" - }, - "AAVE3L": { - "type": "string" - }, - "ZK": { - "type": "string" - }, - "ZKF": { - "type": "string" - }, - "OMNIA": { - "type": "string" - }, - "ZKJ": { - "type": "string" - }, - "ZKL": { - "type": "string" - }, - "GAFI": { - "type": "string" - }, - "CARV": { - "type": "string" - }, - "KNC": { - "type": "string" - }, - "CATS": { - "type": "string" - }, - "PROM": { - "type": "string" - }, - "ALEPH": { - "type": "string" - }, - "PONKE": { - "type": "string" - }, - "OVR": { - "type": "string" - }, - "CATI": { - "type": "string" - }, - "ORDER": { - "type": "string" - }, - "GFT": { - "type": "string" - }, - "BIFI": { - "type": "string" - }, - "GGC": { - "type": "string" - }, - "GGG": { - "type": "string" - }, - "DAPPX": { - "type": "string" - }, - "SUKU": { - "type": "string" - }, - "ULTI": { - "type": "string" - }, - "CREDI": { - "type": "string" - }, - "ERTHA": { - "type": "string" - }, - "FURY": { - "type": "string" - }, - "KARRAT": { - "type": "string" - }, - "MOBILE": { - "type": "string" - }, - "SIDUS": { - "type": "string" - }, - "NAVI": { - "type": "string" - }, - "TAO": { - "type": "string" - }, - "USDJ": { - "type": "string" - }, - "MTL": { - "type": "string" - }, - "VET": { - "type": "string" - }, - "FITFI": { - "type": "string" - }, - "USDT": { - "type": "string" - }, - "OXT": { - "type": "string" - }, - "CANDY": { - "type": "string" - }, - "USDP": { - "type": "string" - }, - "MTS": { - "type": "string" - }, - "TADA": { - "type": "string" - }, - "MTV": { - "type": "string" - }, - "NAVX": { - "type": "string" - }, - "ILV": { - "type": "string" - }, - "VINU": { - "type": "string" - }, - "GHX": { - "type": "string" - }, - "EDU": { - "type": "string" - }, - "HYVE": { - "type": "string" - }, - "BTC3L": { - "type": "string" - }, - "ANYONE": { - "type": "string" - }, - "BEAT": { - "type": "string" - }, - "KING": { - "type": "string" - }, - "CREAM": { - "type": "string" - }, - "CAS": { - "type": "string" - }, - "IMX": { - "type": "string" - }, - "CAT": { - "type": "string" - }, - "BTC3S": { - "type": "string" - }, - "USDE": { - "type": "string" - }, - "USDD": { - "type": "string" - }, - "CWAR": { - "type": "string" - }, - "USDC": { - "type": "string" - }, - "KRL": { - "type": "string" - }, - "INJ": { - "type": "string" - }, - "GAME": { - "type": "string" - }, - "TRIBL": { - "type": "string" - }, - "XLM": { - "type": "string" - }, - "TRBUP": { - "type": "string" - }, - "VRADOWN": { - "type": "string" - }, - "SUPER": { - "type": "string" - }, - "EIGEN": { - "type": "string" - }, - "IOI": { - "type": "string" - }, - "KSM": { - "type": "string" - }, - "CCD": { - "type": "string" - }, - "EGO": { - "type": "string" - }, - "EGP": { - "type": "string" - }, - "MXC": { - "type": "string" - }, - "TEL": { - "type": "string" - }, - "MOVR": { - "type": "string" - }, - "XMR": { - "type": "string" - }, - "MXM": { - "type": "string" - }, - "OORT": { - "type": "string" - }, - "GLM": { - "type": "string" - }, - "RAY": { - "type": "string" - }, - "XTAG": { - "type": "string" - }, - "GLQ": { - "type": "string" - }, - "CWEB": { - "type": "string" - }, - "REVU": { - "type": "string" - }, - "REVV": { - "type": "string" - }, - "ZRO": { - "type": "string" - }, - "XNL": { - "type": "string" - }, - "XNO": { - "type": "string" - }, - "SAROS": { - "type": "string" - }, - "KACE": { - "type": "string" - }, - "ZRX": { - "type": "string" - }, - "WLTH": { - "type": "string" - }, - "ATOM3L": { - "type": "string" - }, - "GMM": { - "type": "string" - }, - "BEER": { - "type": "string" - }, - "GMT": { - "type": "string" - }, - "HEART": { - "type": "string" - }, - "GMX": { - "type": "string" - }, - "ABBC": { - "type": "string" - }, - "OMNI": { - "type": "string" - }, - "ATOM3S": { - "type": "string" - }, - "IRL": { - "type": "string" - }, - "CFG": { - "type": "string" - }, - "WSDM": { - "type": "string" - }, - "GNS": { - "type": "string" - }, - "VANRY": { - "type": "string" - }, - "CFX": { - "type": "string" - }, - "GRAIL": { - "type": "string" - }, - "BEFI": { - "type": "string" - }, - "VELO": { - "type": "string" - }, - "XPR": { - "type": "string" - }, - "DOVI": { - "type": "string" - }, - "ACE": { - "type": "string" - }, - "ACH": { - "type": "string" - }, - "ISP": { - "type": "string" - }, - "XCAD": { - "type": "string" - }, - "MINA": { - "type": "string" - }, - "TIA": { - "type": "string" - }, - "DRIFT": { - "type": "string" - }, - "ACQ": { - "type": "string" - }, - "ACS": { - "type": "string" - }, - "MIND": { - "type": "string" - }, - "STORE": { - "type": "string" - }, - "REN": { - "type": "string" - }, - "ELA": { - "type": "string" - }, - "DREAMS": { - "type": "string" - }, - "ADA": { - "type": "string" - }, - "ELF": { - "type": "string" - }, - "REQ": { - "type": "string" - }, - "STORJ": { - "type": "string" - }, - "LADYS": { - "type": "string" - }, - "PAXG": { - "type": "string" - }, - "REZ": { - "type": "string" - }, - "XRD": { - "type": "string" - }, - "CHO": { - "type": "string" - }, - "CHR": { - "type": "string" - }, - "ADS": { - "type": "string" - }, - "CHZ": { - "type": "string" - }, - "ADX": { - "type": "string" - }, - "XRP": { - "type": "string" - }, - "JASMY": { - "type": "string" - }, - "KAGI": { - "type": "string" - }, - "FIDA": { - "type": "string" - }, - "PBR": { - "type": "string" - }, - "AEG": { - "type": "string" - }, - "H2O": { - "type": "string" - }, - "CHMB": { - "type": "string" - }, - "SAND3L": { - "type": "string" - }, - "PBX": { - "type": "string" - }, - "SOLVE": { - "type": "string" - }, - "DECHAT": { - "type": "string" - }, - "GARI": { - "type": "string" - }, - "SHIB2L": { - "type": "string" - }, - "SHIB2S": { - "type": "string" - }, - "ENA": { - "type": "string" - }, - "VEMP": { - "type": "string" - }, - "ENJ": { - "type": "string" - }, - "AFG": { - "type": "string" - }, - "RATS": { - "type": "string" - }, - "GRT": { - "type": "string" - }, - "FORWARD": { - "type": "string" - }, - "TFUEL": { - "type": "string" - }, - "ENS": { - "type": "string" - }, - "KASDOWN": { - "type": "string" - }, - "XTM": { - "type": "string" - }, - "DEGEN": { - "type": "string" - }, - "TLM": { - "type": "string" - }, - "DYDXDOWN": { - "type": "string" - }, - "CKB": { - "type": "string" - }, - "LUNC": { - "type": "string" - }, - "AURORA": { - "type": "string" - }, - "LUNA": { - "type": "string" - }, - "XTZ": { - "type": "string" - }, - "ELON": { - "type": "string" - }, - "DMTR": { - "type": "string" - }, - "EOS": { - "type": "string" - }, - "GST": { - "type": "string" - }, - "FORT": { - "type": "string" - }, - "FLAME": { - "type": "string" - }, - "PATEX": { - "type": "string" - }, - "DEEP": { - "type": "string" - }, - "ID3L": { - "type": "string" - }, - "GTC": { - "type": "string" - }, - "ID3S": { - "type": "string" - }, - "RIO": { - "type": "string" - }, - "CLH": { - "type": "string" - }, - "BURGER": { - "type": "string" - }, - "VRA": { - "type": "string" - }, - "SUNDOG": { - "type": "string" - }, - "GTT": { - "type": "string" - }, - "INJUP": { - "type": "string" - }, - "CPOOL": { - "type": "string" - }, - "EPX": { - "type": "string" - }, - "CLV": { - "type": "string" - }, - "FEAR": { - "type": "string" - }, - "MEME": { - "type": "string" - }, - "ROOBEE": { - "type": "string" - }, - "DEFI": { - "type": "string" - }, - "TOKEN": { - "type": "string" - }, - "GRAPE": { - "type": "string" - }, - "KASUP": { - "type": "string" - }, - "XWG": { - "type": "string" - }, - "SKEY": { - "type": "string" - }, - "SFUND": { - "type": "string" - }, - "EQX": { - "type": "string" - }, - "ORDIUP": { - "type": "string" - }, - "TON": { - "type": "string" - }, - "DEGO": { - "type": "string" - }, - "IZI": { - "type": "string" - }, - "ERG": { - "type": "string" - }, - "ERN": { - "type": "string" - }, - "VENOM": { - "type": "string" - }, - "VOXEL": { - "type": "string" - }, - "RLC": { - "type": "string" - }, - "PHA": { - "type": "string" - }, - "DYDXUP": { - "type": "string" - }, - "APE3S": { - "type": "string" - }, - "ORBS": { - "type": "string" - }, - "OPDOWN": { - "type": "string" - }, - "ESE": { - "type": "string" - }, - "APE3L": { - "type": "string" - }, - "HMND": { - "type": "string" - }, - "COQ": { - "type": "string" - }, - "AURY": { - "type": "string" - }, - "CULT": { - "type": "string" - }, - "AKT": { - "type": "string" - }, - "GLMR": { - "type": "string" - }, - "XYM": { - "type": "string" - }, - "ORAI": { - "type": "string" - }, - "XYO": { - "type": "string" - }, - "ETC": { - "type": "string" - }, - "LAI": { - "type": "string" - }, - "PIP": { - "type": "string" - }, - "ETH": { - "type": "string" - }, - "NEO": { - "type": "string" - }, - "RMV": { - "type": "string" - }, - "KLAY": { - "type": "string" - }, - "PIT": { - "type": "string" - }, - "TARA": { - "type": "string" - }, - "KALT": { - "type": "string" - }, - "PIX": { - "type": "string" - }, - "ETN": { - "type": "string" - }, - "CSIX": { - "type": "string" - }, - "TRADE": { - "type": "string" - }, - "MAVIA": { - "type": "string" - }, - "HIGH": { - "type": "string" - }, - "TRB": { - "type": "string" - }, - "ORDI": { - "type": "string" - }, - "TRVL": { - "type": "string" - }, - "AMB": { - "type": "string" - }, - "TRU": { - "type": "string" - }, - "LOGX": { - "type": "string" - }, - "FINC": { - "type": "string" - }, - "INFRA": { - "type": "string" - }, - "NATIX": { - "type": "string" - }, - "NFP": { - "type": "string" - }, - "TRY": { - "type": "string" - }, - "TRX": { - "type": "string" - }, - "LBP": { - "type": "string" - }, - "LBR": { - "type": "string" - }, - "EUL": { - "type": "string" - }, - "NFT": { - "type": "string" - }, - "SEIUP": { - "type": "string" - }, - "PUFFER": { - "type": "string" - }, - "EUR": { - "type": "string" - }, - "ORCA": { - "type": "string" - }, - "NEAR3L": { - "type": "string" - }, - "AMP": { - "type": "string" - }, - "XDEFI": { - "type": "string" - }, - "HIFI": { - "type": "string" - }, - "TRUF": { - "type": "string" - }, - "AITECH": { - "type": "string" - }, - "AMU": { - "type": "string" - }, - "USTC": { - "type": "string" - }, - "KNGL": { - "type": "string" - }, - "FOXY": { - "type": "string" - }, - "NGC": { - "type": "string" - }, - "TENET": { - "type": "string" - }, - "NEAR3S": { - "type": "string" - }, - "MAHA": { - "type": "string" - }, - "NGL": { - "type": "string" - }, - "TST": { - "type": "string" - }, - "HIPPO": { - "type": "string" - }, - "AXS3S": { - "type": "string" - }, - "CRO": { - "type": "string" - }, - "ZPAY": { - "type": "string" - }, - "MNDE": { - "type": "string" - }, - "CRV": { - "type": "string" - }, - "SWASH": { - "type": "string" - }, - "AXS3L": { - "type": "string" - }, - "VERSE": { - "type": "string" - }, - "RPK": { - "type": "string" - }, - "RPL": { - "type": "string" - }, - "AZERO": { - "type": "string" - }, - "SOUL": { - "type": "string" - }, - "VXV": { - "type": "string" - }, - "LDO": { - "type": "string" - }, - "MAGIC": { - "type": "string" - }, - "ALICE": { - "type": "string" - }, - "SEAM": { - "type": "string" - }, - "PLU": { - "type": "string" - }, - "AOG": { - "type": "string" - }, - "SMOLE": { - "type": "string" - }, - "EWT": { - "type": "string" - }, - "TSUGT": { - "type": "string" - }, - "PMG": { - "type": "string" - }, - "OPAI": { - "type": "string" - }, - "LOCUS": { - "type": "string" - }, - "CTA": { - "type": "string" - }, - "NIM": { - "type": "string" - }, - "CTC": { - "type": "string" - }, - "APE": { - "type": "string" - }, - "MERL": { - "type": "string" - }, - "JAM": { - "type": "string" - }, - "CTI": { - "type": "string" - }, - "APP": { - "type": "string" - }, - "APT": { - "type": "string" - }, - "WLDUP": { - "type": "string" - }, - "ZEND": { - "type": "string" - }, - "FIRE": { - "type": "string" - }, - "DENT": { - "type": "string" - }, - "PYTH": { - "type": "string" - }, - "LFT": { - "type": "string" - }, - "DPET": { - "type": "string" - }, - "ORDIDOWN": { - "type": "string" - }, - "KPOL": { - "type": "string" - }, - "ETHUP": { - "type": "string" - }, - "BAND": { - "type": "string" - }, - "POL": { - "type": "string" - }, - "ASTR": { - "type": "string" - }, - "NKN": { - "type": "string" - }, - "RSR": { - "type": "string" - }, - "DVPN": { - "type": "string" - }, - "TWT": { - "type": "string" - }, - "ARB": { - "type": "string" - }, - "CVC": { - "type": "string" - }, - "ARC": { - "type": "string" - }, - "XETA": { - "type": "string" - }, - "MTRG": { - "type": "string" - }, - "LOKA": { - "type": "string" - }, - "LPOOL": { - "type": "string" - }, - "TURBOS": { - "type": "string" - }, - "CVX": { - "type": "string" - }, - "ARX": { - "type": "string" - }, - "MPLX": { - "type": "string" - }, - "SUSHI": { - "type": "string" - }, - "NLK": { - "type": "string" - }, - "PEPE2": { - "type": "string" - }, - "WBTC": { - "type": "string" - }, - "SUI3L": { - "type": "string" - }, - "CWS": { - "type": "string" - }, - "SUI3S": { - "type": "string" - }, - "INSP": { - "type": "string" - }, - "MANA": { - "type": "string" - }, - "VRTX": { - "type": "string" - }, - "CSPR": { - "type": "string" - }, - "ATA": { - "type": "string" - }, - "OPEN": { - "type": "string" - }, - "HAI": { - "type": "string" - }, - "NMR": { - "type": "string" - }, - "ATH": { - "type": "string" - }, - "LIT": { - "type": "string" - }, - "TLOS": { - "type": "string" - }, - "TNSR": { - "type": "string" - }, - "CXT": { - "type": "string" - }, - "POLYX": { - "type": "string" - }, - "ZERO": { - "type": "string" - }, - "ROUTE": { - "type": "string" - }, - "LOOM": { - "type": "string" - }, - "PRE": { - "type": "string" - }, - "VRAUP": { - "type": "string" - }, - "HBB": { - "type": "string" - }, - "RVN": { - "type": "string" - }, - "PRQ": { - "type": "string" - }, - "ONDO": { - "type": "string" - }, - "PEPEDOWN": { - "type": "string" - }, - "WOOP": { - "type": "string" - }, - "LUNCUP": { - "type": "string" - }, - "KAVA": { - "type": "string" - }, - "LKI": { - "type": "string" - }, - "AVA": { - "type": "string" - }, - "NOM": { - "type": "string" - }, - "MAPO": { - "type": "string" - }, - "PEPEUP": { - "type": "string" - }, - "STRAX": { - "type": "string" - }, - "NOT": { - "type": "string" - }, - "ZERC": { - "type": "string" - }, - "BCUT": { - "type": "string" - }, - "MASA": { - "type": "string" - }, - "WAN": { - "type": "string" - }, - "WAT": { - "type": "string" - }, - "WAX": { - "type": "string" - }, - "MASK": { - "type": "string" - }, - "EOS3L": { - "type": "string" - }, - "IDEA": { - "type": "string" - }, - "EOS3S": { - "type": "string" - }, - "YFI": { - "type": "string" - }, - "MOODENG": { - "type": "string" - }, - "XCUR": { - "type": "string" - }, - "HYDRA": { - "type": "string" - }, - "POPCAT": { - "type": "string" - }, - "LQTY": { - "type": "string" - }, - "PIXEL": { - "type": "string" - }, - "LMR": { - "type": "string" - }, - "ZETA": { - "type": "string" - }, - "YGG": { - "type": "string" - }, - "AXS": { - "type": "string" - }, - "BCHSV": { - "type": "string" - }, - "NRN": { - "type": "string" - }, - "FTON": { - "type": "string" - }, - "COMP": { - "type": "string" - }, - "XPRT": { - "type": "string" - }, - "HFT": { - "type": "string" - }, - "UXLINK": { - "type": "string" - }, - "STAMP": { - "type": "string" - }, - "RUNE": { - "type": "string" - }, - "ZEUS": { - "type": "string" - }, - "LTC3L": { - "type": "string" - }, - "DAPP": { - "type": "string" - }, - "FORTH": { - "type": "string" - }, - "ALPINE": { - "type": "string" - }, - "SENSO": { - "type": "string" - }, - "LTC3S": { - "type": "string" - }, - "DEXE": { - "type": "string" - }, - "GOAL": { - "type": "string" - }, - "AVAX": { - "type": "string" - }, - "LISTA": { - "type": "string" - }, - "AMPL": { - "type": "string" - }, - "WORK": { - "type": "string" - }, - "BRWL": { - "type": "string" - }, - "BANANA": { - "type": "string" - }, - "PUSH": { - "type": "string" - }, - "WEN": { - "type": "string" - }, - "NEIRO": { - "type": "string" - }, - "BTCUP": { - "type": "string" - }, - "SOL3S": { - "type": "string" - }, - "BRAWL": { - "type": "string" - }, - "LAY3R": { - "type": "string" - }, - "LPT": { - "type": "string" - }, - "GODS": { - "type": "string" - }, - "SAND3S": { - "type": "string" - }, - "RDNT": { - "type": "string" - }, - "SOL3L": { - "type": "string" - }, - "NIBI": { - "type": "string" - }, - "NUM": { - "type": "string" - }, - "PYR": { - "type": "string" - }, - "DAG": { - "type": "string" - }, - "DAI": { - "type": "string" - }, - "HIP": { - "type": "string" - }, - "DAO": { - "type": "string" - }, - "AVAIL": { - "type": "string" - }, - "DAR": { - "type": "string" - }, - "FET": { - "type": "string" - }, - "FCON": { - "type": "string" - }, - "XAVA": { - "type": "string" - }, - "LRC": { - "type": "string" - }, - "UNI3S": { - "type": "string" - }, - "POKT": { - "type": "string" - }, - "DASH": { - "type": "string" - }, - "BAKEDOWN": { - "type": "string" - }, - "POLC": { - "type": "string" - }, - "CIRUS": { - "type": "string" - }, - "UNI3L": { - "type": "string" - }, - "NWC": { - "type": "string" - }, - "POLK": { - "type": "string" - }, - "LSD": { - "type": "string" - }, - "MARS4": { - "type": "string" - }, - "LSK": { - "type": "string" - }, - "BLOCK": { - "type": "string" - }, - "ANALOS": { - "type": "string" - }, - "SAFE": { - "type": "string" - }, - "DCK": { - "type": "string" - }, - "LSS": { - "type": "string" - }, - "DCR": { - "type": "string" - }, - "LIKE": { - "type": "string" - }, - "DATA": { - "type": "string" - }, - "WIF": { - "type": "string" - }, - "BLOK": { - "type": "string" - }, - "LTC": { - "type": "string" - }, - "METIS": { - "type": "string" - }, - "WIN": { - "type": "string" - }, - "HLG": { - "type": "string" - }, - "LTO": { - "type": "string" - }, - "DYDX": { - "type": "string" - }, - "ARB3S": { - "type": "string" - }, - "MUBI": { - "type": "string" - }, - "ARB3L": { - "type": "string" - }, - "RBTC1": { - "type": "string" - }, - "POND": { - "type": "string" - }, - "LINA": { - "type": "string" - }, - "MYRIA": { - "type": "string" - }, - "LINK": { - "type": "string" - }, - "QTUM": { - "type": "string" - }, - "TUNE": { - "type": "string" - }, - "UFO": { - "type": "string" - }, - "CYBER": { - "type": "string" - }, - "WILD": { - "type": "string" - }, - "POLS": { - "type": "string" - }, - "NYM": { - "type": "string" - }, - "FIL": { - "type": "string" - }, - "BAL": { - "type": "string" - }, - "SCA": { - "type": "string" - }, - "STND": { - "type": "string" - }, - "WMTX": { - "type": "string" - }, - "SCLP": { - "type": "string" - }, - "MANEKI": { - "type": "string" - }, - "BAT": { - "type": "string" - }, - "AKRO": { - "type": "string" - }, - "FTM3L": { - "type": "string" - }, - "BAX": { - "type": "string" - }, - "FTM3S": { - "type": "string" - }, - "COTI": { - "type": "string" - } - }, - "required": [ - "AGLD", - "DFI", - "PYTHUP", - "ISLM", - "NEAR", - "AIOZ", - "AUDIO", - "BBL", - "WLD", - "HNT", - "ETHFI", - "DMAIL", - "OPUP", - "VET3S", - "MANA3S", - "TIDAL", - "HALO", - "OPUL", - "MANA3L", - "DGB", - "AA", - "BCH", - "GMEE", - "JST", - "PBUX", - "AR", - "SEI", - "PSTAKE", - "LMWR", - "UNFIDOWN", - "BB", - "JTO", - "WEMIX", - "G", - "MARSH", - "BN", - "FLIP", - "FLR", - "BIGTIME", - "FLY", - "T", - "W", - "BDX", - "BABYDOGE", - "SFP", - "DIA", - "ISME", - "LYM", - "VET3L", - "JUP", - "LYX", - "AIEPK", - "SILLY", - "SCPT", - "WOO", - "BLUR", - "STRK", - "BFC", - "DC", - "KARATE", - "SUSHI3L", - "NETVR", - "WAVES", - "LITH", - "HAPI", - "SUSHI3S", - "CEEK", - "FLOKI", - "SHR", - "SAND", - "TURT", - "UMA", - "BEPRO", - "SCRT", - "TUSD", - "COOKIE", - "LRDS", - "SIN", - "OAS", - "ROOT", - "ADA3L", - "TIAUP", - "HTR", - "UNB", - "UNA", - "HARD", - "G3", - "ADA3S", - "MYRO", - "HTX", - "FT", - "BTCDOWN", - "UNI", - "FX", - "OBI", - "UNO", - "WRX", - "TIADOWN", - "ETHDOWN", - "WELL", - "SWFTC", - "SKL", - "UOS", - "AIPAD", - "BRETT", - "SKY", - "FRM", - "VISION", - "LENDS", - "SLF", - "BULL", - "FLOW", - "ODDZ", - "SLN", - "UPO", - "SLP", - "ID", - "SLIM", - "SPOT", - "DOP", - "ISSP", - "UQC", - "IO", - "DOT", - "1INCH", - "SMH", - "MAK", - "TOKO", - "TURBO", - "UNFI", - "MAN", - "EVER", - "FTM", - "SHRAP", - "MAV", - "MAX", - "DPR", - "FTT", - "ARKM", - "ATOM", - "PENDLE", - "QUICK", - "BLZ", - "BOBA", - "MBL", - "OFN", - "UNIO", - "SNS", - "SNX", - "NXRA", - "TAIKO", - "AVAX3L", - "L3", - "API3", - "XRP3S", - "QKC", - "AVAX3S", - "ROSE", - "SATS", - "BMX", - "PORTAL", - "TOMI", - "XRP3L", - "SOL", - "SON", - "BNC", - "SOCIAL", - "CGPT", - "CELR", - "BNB", - "OGN", - "CELO", - "AUCTION", - "MANTA", - "LAYER", - "AERO", - "CETUS", - "LL", - "SPA", - "PYTHDOWN", - "NEIROCTO", - "UTK", - "GMRX", - "BOB", - "HOTCROSS", - "AERGO", - "MOCA", - "SQD", - "MV", - "BNB3L", - "BNB3S", - "GALAX3L", - "KAI", - "SQR", - "GALAX3S", - "EGLD", - "ZBCN", - "KAS", - "MEW", - "PUNDIX", - "LOOKS", - "FXS", - "BOSON", - "BRISE", - "AEVO", - "FLUX", - "PRCL", - "UNFIUP", - "SEIDOWN", - "DOAI", - "QNT", - "REDO", - "STRIKE", - "ETHW", - "OM", - "OP", - "WHALE", - "1CAT", - "NEON", - "GTAI", - "SSV", - "ETH2", - "KCS", - "ARPA", - "ARTFI", - "BRL", - "ALEX", - "STG", - "SHIB", - "IOTX", - "OLE", - "KDA", - "CERE", - "DOCK", - "STX", - "OLT", - "QI", - "SDAO", - "BLAST", - "LINK3S", - "IOST", - "SUI", - "CAKE", - "BSW", - "OMG", - "VOLT", - "LINK3L", - "GEEQ", - "PYUSD", - "SUN", - "TOWER", - "BTC", - "IOTA", - "REEF", - "TRIAS", - "KEY", - "ETH3L", - "BTT", - "ONE", - "RENDER", - "ETH3S", - "ANKR", - "ALGO", - "SYLO", - "ZCX", - "SD", - "ONT", - "MJT", - "DYM", - "DYP", - "BAKEUP", - "OOE", - "ZELIX", - "DOGE3L", - "ARTY", - "QORPO", - "ICE", - "NOTAI", - "DOGE3S", - "NAKA", - "GALAX", - "MKR", - "DODO", - "ICP", - "ZEC", - "ZEE", - "ICX", - "KMNO", - "TT", - "DOT3L", - "XAI", - "ZEN", - "DOGE", - "ALPHA", - "DUSK", - "DOT3S", - "SXP", - "HBAR", - "SYNT", - "ZEX", - "BONDLY", - "MLK", - "KICKS", - "PEPE", - "OUSD", - "LUNCDOWN", - "DOGS", - "REV3L", - "CTSI", - "C98", - "OSMO", - "NTRN", - "CFX2S", - "SYN", - "VIDT", - "SYS", - "GAS", - "BOME", - "COMBO", - "XCH", - "VR", - "CFX2L", - "VSYS", - "PANDORA", - "THETA", - "XCN", - "NEXG", - "MELOS", - "XCV", - "ORN", - "WLKN", - "AAVE", - "MNT", - "BONK", - "PERP", - "XDC", - "MNW", - "XDB", - "BOND", - "SUIA", - "MOG", - "SUTER", - "TIME", - "RACA", - "BICO", - "MON", - "SWEAT", - "MOXIE", - "BABYBNB", - "IGU", - "HMSTR", - "XEC", - "MONI", - "XR", - "PEOPLE", - "PUMLX", - "ZIL", - "WLDDOWN", - "VAI", - "XEN", - "MPC", - "XEM", - "JASMY3S", - "OTK", - "TRAC", - "DFYN", - "BIDP", - "JASMY3L", - "INJDOWN", - "KLV", - "WAXL", - "TRBDOWN", - "BCH3L", - "GMT3S", - "KMD", - "BCH3S", - "ECOX", - "AAVE3S", - "GMT3L", - "EPIK", - "SUIP", - "AAVE3L", - "ZK", - "ZKF", - "OMNIA", - "ZKJ", - "ZKL", - "GAFI", - "CARV", - "KNC", - "CATS", - "PROM", - "ALEPH", - "PONKE", - "OVR", - "CATI", - "ORDER", - "GFT", - "BIFI", - "GGC", - "GGG", - "DAPPX", - "SUKU", - "ULTI", - "CREDI", - "ERTHA", - "FURY", - "KARRAT", - "MOBILE", - "SIDUS", - "NAVI", - "TAO", - "USDJ", - "MTL", - "VET", - "FITFI", - "USDT", - "OXT", - "CANDY", - "USDP", - "MTS", - "TADA", - "MTV", - "NAVX", - "ILV", - "VINU", - "GHX", - "EDU", - "HYVE", - "BTC3L", - "ANYONE", - "BEAT", - "KING", - "CREAM", - "CAS", - "IMX", - "CAT", - "BTC3S", - "USDE", - "USDD", - "CWAR", - "USDC", - "KRL", - "INJ", - "GAME", - "TRIBL", - "XLM", - "TRBUP", - "VRADOWN", - "SUPER", - "EIGEN", - "IOI", - "KSM", - "CCD", - "EGO", - "EGP", - "MXC", - "TEL", - "MOVR", - "XMR", - "MXM", - "OORT", - "GLM", - "RAY", - "XTAG", - "GLQ", - "CWEB", - "REVU", - "REVV", - "ZRO", - "XNL", - "XNO", - "SAROS", - "KACE", - "ZRX", - "WLTH", - "ATOM3L", - "GMM", - "BEER", - "GMT", - "HEART", - "GMX", - "ABBC", - "OMNI", - "ATOM3S", - "IRL", - "CFG", - "WSDM", - "GNS", - "VANRY", - "CFX", - "GRAIL", - "BEFI", - "VELO", - "XPR", - "DOVI", - "ACE", - "ACH", - "ISP", - "XCAD", - "MINA", - "TIA", - "DRIFT", - "ACQ", - "ACS", - "MIND", - "STORE", - "REN", - "ELA", - "DREAMS", - "ADA", - "ELF", - "REQ", - "STORJ", - "LADYS", - "PAXG", - "REZ", - "XRD", - "CHO", - "CHR", - "ADS", - "CHZ", - "ADX", - "XRP", - "JASMY", - "KAGI", - "FIDA", - "PBR", - "AEG", - "H2O", - "CHMB", - "SAND3L", - "PBX", - "SOLVE", - "DECHAT", - "GARI", - "SHIB2L", - "SHIB2S", - "ENA", - "VEMP", - "ENJ", - "AFG", - "RATS", - "GRT", - "FORWARD", - "TFUEL", - "ENS", - "KASDOWN", - "XTM", - "DEGEN", - "TLM", - "DYDXDOWN", - "CKB", - "LUNC", - "AURORA", - "LUNA", - "XTZ", - "ELON", - "DMTR", - "EOS", - "GST", - "FORT", - "FLAME", - "PATEX", - "DEEP", - "ID3L", - "GTC", - "ID3S", - "RIO", - "CLH", - "BURGER", - "VRA", - "SUNDOG", - "GTT", - "INJUP", - "CPOOL", - "EPX", - "CLV", - "FEAR", - "MEME", - "ROOBEE", - "DEFI", - "TOKEN", - "GRAPE", - "KASUP", - "XWG", - "SKEY", - "SFUND", - "EQX", - "ORDIUP", - "TON", - "DEGO", - "IZI", - "ERG", - "ERN", - "VENOM", - "VOXEL", - "RLC", - "PHA", - "DYDXUP", - "APE3S", - "ORBS", - "OPDOWN", - "ESE", - "APE3L", - "HMND", - "COQ", - "AURY", - "CULT", - "AKT", - "GLMR", - "XYM", - "ORAI", - "XYO", - "ETC", - "LAI", - "PIP", - "ETH", - "NEO", - "RMV", - "KLAY", - "PIT", - "TARA", - "KALT", - "PIX", - "ETN", - "CSIX", - "TRADE", - "MAVIA", - "HIGH", - "TRB", - "ORDI", - "TRVL", - "AMB", - "TRU", - "LOGX", - "FINC", - "INFRA", - "NATIX", - "NFP", - "TRY", - "TRX", - "LBP", - "LBR", - "EUL", - "NFT", - "SEIUP", - "PUFFER", - "EUR", - "ORCA", - "NEAR3L", - "AMP", - "XDEFI", - "HIFI", - "TRUF", - "AITECH", - "AMU", - "USTC", - "KNGL", - "FOXY", - "NGC", - "TENET", - "NEAR3S", - "MAHA", - "NGL", - "TST", - "HIPPO", - "AXS3S", - "CRO", - "ZPAY", - "MNDE", - "CRV", - "SWASH", - "AXS3L", - "VERSE", - "RPK", - "RPL", - "AZERO", - "SOUL", - "VXV", - "LDO", - "MAGIC", - "ALICE", - "SEAM", - "PLU", - "AOG", - "SMOLE", - "EWT", - "TSUGT", - "PMG", - "OPAI", - "LOCUS", - "CTA", - "NIM", - "CTC", - "APE", - "MERL", - "JAM", - "CTI", - "APP", - "APT", - "WLDUP", - "ZEND", - "FIRE", - "DENT", - "PYTH", - "LFT", - "DPET", - "ORDIDOWN", - "KPOL", - "ETHUP", - "BAND", - "POL", - "ASTR", - "NKN", - "RSR", - "DVPN", - "TWT", - "ARB", - "CVC", - "ARC", - "XETA", - "MTRG", - "LOKA", - "LPOOL", - "TURBOS", - "CVX", - "ARX", - "MPLX", - "SUSHI", - "NLK", - "PEPE2", - "WBTC", - "SUI3L", - "CWS", - "SUI3S", - "INSP", - "MANA", - "VRTX", - "CSPR", - "ATA", - "OPEN", - "HAI", - "NMR", - "ATH", - "LIT", - "TLOS", - "TNSR", - "CXT", - "POLYX", - "ZERO", - "ROUTE", - "LOOM", - "PRE", - "VRAUP", - "HBB", - "RVN", - "PRQ", - "ONDO", - "PEPEDOWN", - "WOOP", - "LUNCUP", - "KAVA", - "LKI", - "AVA", - "NOM", - "MAPO", - "PEPEUP", - "STRAX", - "NOT", - "ZERC", - "BCUT", - "MASA", - "WAN", - "WAT", - "WAX", - "MASK", - "EOS3L", - "IDEA", - "EOS3S", - "YFI", - "MOODENG", - "XCUR", - "HYDRA", - "POPCAT", - "LQTY", - "PIXEL", - "LMR", - "ZETA", - "YGG", - "AXS", - "BCHSV", - "NRN", - "FTON", - "COMP", - "XPRT", - "HFT", - "UXLINK", - "STAMP", - "RUNE", - "ZEUS", - "LTC3L", - "DAPP", - "FORTH", - "ALPINE", - "SENSO", - "LTC3S", - "DEXE", - "GOAL", - "AVAX", - "LISTA", - "AMPL", - "WORK", - "BRWL", - "BANANA", - "PUSH", - "WEN", - "NEIRO", - "BTCUP", - "SOL3S", - "BRAWL", - "LAY3R", - "LPT", - "GODS", - "SAND3S", - "RDNT", - "SOL3L", - "NIBI", - "NUM", - "PYR", - "DAG", - "DAI", - "HIP", - "DAO", - "AVAIL", - "DAR", - "FET", - "FCON", - "XAVA", - "LRC", - "UNI3S", - "POKT", - "DASH", - "BAKEDOWN", - "POLC", - "CIRUS", - "UNI3L", - "NWC", - "POLK", - "LSD", - "MARS4", - "LSK", - "BLOCK", - "ANALOS", - "SAFE", - "DCK", - "LSS", - "DCR", - "LIKE", - "DATA", - "WIF", - "BLOK", - "LTC", - "METIS", - "WIN", - "HLG", - "LTO", - "DYDX", - "ARB3S", - "MUBI", - "ARB3L", - "RBTC1", - "POND", - "LINA", - "MYRIA", - "LINK", - "QTUM", - "TUNE", - "UFO", - "CYBER", - "WILD", - "POLS", - "NYM", - "FIL", - "BAL", - "SCA", - "STND", - "WMTX", - "SCLP", - "MANEKI", - "BAT", - "AKRO", - "FTM3L", - "BAX", - "FTM3S", - "COTI" - ] + "properties": {}, + "additionalProperties": { + "type": "string" + } } }, "required": [ From c2b138e227f81aa7f4978cb8c8891616b1b5b0e7 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Fri, 4 Jul 2025 14:06:18 +0800 Subject: [PATCH 10/39] feat(api): format api doc --- .../service/impl/OperationServiceImpl.java | 16 +- .../src/main/resources/java-sdk/api.mustache | 18 +- .../universal/sdk/generate/Version.java | 2 +- .../generate/account/account/AccountApi.java | 333 +++-- .../generate/account/deposit/DepositApi.java | 168 ++- .../sdk/generate/account/fee/FeeApi.java | 66 +- .../account/subaccount/SubAccountApi.java | 293 ++-- .../account/transfer/TransferApi.java | 174 ++- .../account/withdrawal/WithdrawalApi.java | 157 ++- .../affiliate/affiliate/AffiliateApi.java | 21 +- .../broker/apibroker/APIBrokerApi.java | 21 +- .../generate/broker/ndbroker/NDBrokerApi.java | 332 +++-- .../copytrading/futures/FuturesApi.java | 244 +++- .../sdk/generate/earn/earn/EarnApi.java | 196 ++- .../futures/fundingfees/FundingFeesApi.java | 62 +- .../generate/futures/market/MarketApi.java | 380 ++++-- .../sdk/generate/futures/order/OrderApi.java | 399 ++++-- .../futures/positions/PositionsApi.java | 331 +++-- .../sdk/generate/margin/credit/CreditApi.java | 147 +- .../sdk/generate/margin/debit/DebitApi.java | 128 +- .../sdk/generate/margin/market/MarketApi.java | 124 +- .../sdk/generate/margin/order/OrderApi.java | 334 +++-- .../margin/risklimit/RiskLimitApi.java | 20 +- .../sdk/generate/spot/market/MarketApi.java | 473 +++++-- .../sdk/generate/spot/order/OrderApi.java | 1179 ++++++++++++----- .../viplending/viplending/VIPLendingApi.java | 67 +- 26 files changed, 4043 insertions(+), 1642 deletions(-) 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 72553846..2c3d825a 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 @@ -15,9 +15,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; +import java.util.*; /** * @author isaac.tang @@ -31,6 +29,7 @@ public class OperationServiceImpl implements OperationService { public static String EXTENSION_WS_PRIVATE = "x-sdk-private"; public static String EXTENSION_WS_TOPIC = "x-topic"; public static String EXTENSION_EXTRA_COMMENT = "x-extra-comment"; + public static String EXTENSION_EXTRA_COMMENT_KV = "x-extra-comment-kv"; public static String EXTENSION_DEPRECATED = "x-deprecated"; public static String BROKER_KEY_NAME = "broker"; public static String EXTENSION_OVERRIDE_METHOD = "x-original-method"; @@ -146,12 +145,23 @@ private void checkUpdateExtension(String path, PathItem.HttpMethod httpMethod, O {"API-RATE-LIMIT-WEIGHT", operation.getExtensions().getOrDefault("x-api-rate-limit-weight", "NULL").toString().toUpperCase()}, }; + + int maxKeyLength = Arrays.stream(data) + .mapToInt(row -> row[0].length()) + .max().orElse(0); + + List kvData = new ArrayList<>(); + for (String[] info : data) { + kvData.add(String.format("%-" + (maxKeyLength + 2) + "s: %s", info[0], info[1])); + } + String[] extraComment = AsciiTable.getTable(AsciiTable.BASIC_ASCII_NO_DATA_SEPARATORS, new Column[]{ new Column().header("Extra API Info").headerAlign(HorizontalAlign.LEFT).dataAlign(HorizontalAlign.LEFT), new Column().header("Value").headerAlign(HorizontalAlign.LEFT).dataAlign(HorizontalAlign.LEFT), }, data).split("\n"); operation.getExtensions().put(EXTENSION_EXTRA_COMMENT, extraComment); + operation.getExtensions().put(EXTENSION_EXTRA_COMMENT_KV, kvData); operation.getExtensions().put(SpecificationUtil.EXTENSION_MODEL_META_KEY, meta); } diff --git a/generator/plugin/src/main/resources/java-sdk/api.mustache b/generator/plugin/src/main/resources/java-sdk/api.mustache index 02171b69..2dea6a82 100644 --- a/generator/plugin/src/main/resources/java-sdk/api.mustache +++ b/generator/plugin/src/main/resources/java-sdk/api.mustache @@ -6,12 +6,20 @@ public interface {{classname}} { {{#operation}} /** * {{summary}} - * {{notes}}{{#isDeprecated}} + * + *

{{notes}} + * + *

Extra API Info: + * + *

    + {{#vendorExtensions.x-extra-comment-kv}} + *
  • {{.}} + {{/vendorExtensions.x-extra-comment-kv}} + *
+ * + * @see docs + * {{#isDeprecated}} * @deprecated{{/isDeprecated}} - * docs - {{#vendorExtensions.x-extra-comment}} - * {{.}} - {{/vendorExtensions.x-extra-comment}} */ {{vendorExtensions.x-meta.methodServiceFmt}}Resp {{vendorExtensions.x-meta.method}}({{#hasParams}}{{vendorExtensions.x-meta.methodServiceFmt}}Req req{{/hasParams}}); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java index da9f9efa..40c6a313 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java @@ -2,5 +2,5 @@ public class Version { public final String SDK_VERSION = "0.1.0-alpha"; - public final String SDK_GENERATE_DATE = "2025-07-02"; + public final String SDK_GENERATE_DATE = "2025-07-04"; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.java index 848dd974..75edadef 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.java @@ -4,161 +4,300 @@ public interface AccountApi { /** - * Get Account Summary Info This endpoint can be used to obtain account summary information. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | - * +-----------------------+------------+ + * Get Account Summary Info + * + *

This endpoint can be used to obtain account summary information. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ GetAccountInfoResp getAccountInfo(); /** - * Get Apikey Info 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. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | - * +-----------------------+------------+ + * Get Apikey Info + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ GetApikeyInfoResp getApikeyInfo(); /** - * Get Account Type - Spot This interface determines whether the current user is a spot - * high-frequency user or a spot low-frequency user. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 30 | +-----------------------+---------+ + * Get Account Type - Spot + * + *

This interface determines whether the current user is a spot high-frequency user or a spot + * low-frequency user. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 30 + *
+ * + * @see docs */ GetSpotAccountTypeResp getSpotAccountType(); /** - * Get Account List - Spot 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. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 | - * +-----------------------+------------+ + * Get Account List - Spot + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetSpotAccountListResp getSpotAccountList(GetSpotAccountListReq req); /** - * Get Account Detail - Spot Get information for a single spot account. Use this endpoint when you - * know the accountId. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 | - * +-----------------------+------------+ + * Get Account Detail - Spot + * + *

Get information for a single spot account. Use this endpoint when you know the accountId. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetSpotAccountDetailResp getSpotAccountDetail(GetSpotAccountDetailReq req); /** - * Get Account - Cross Margin Request cross margin account info via this endpoint. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 15 | +-----------------------+---------+ + * Get Account - Cross Margin + * + *

Request cross margin account info via this endpoint. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 15 + *
+ * + * @see docs */ GetCrossMarginAccountResp getCrossMarginAccount(GetCrossMarginAccountReq req); /** - * Get Account - Isolated Margin Request isolated margin account info via this endpoint. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 15 | +-----------------------+---------+ + * Get Account - Isolated Margin + * + *

Request isolated margin account info via this endpoint. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 15 + *
+ * + * @see docs */ GetIsolatedMarginAccountResp getIsolatedMarginAccount(GetIsolatedMarginAccountReq req); /** - * Get Account - Futures Request futures account info via this endpoint. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Get Account - Futures + * + *

Request futures account info via this endpoint. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetFuturesAccountResp getFuturesAccount(GetFuturesAccountReq req); /** - * Get Account Ledgers - Spot/Margin 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. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+------------+ + * Get Account Ledgers - Spot/Margin + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetSpotLedgerResp getSpotLedger(GetSpotLedgerReq req); /** - * Get Account Ledgers - Trade_hf 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Account Ledgers - Trade_hf + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetSpotHFLedgerResp getSpotHFLedger(GetSpotHFLedgerReq req); /** - * Get Account Ledgers - Margin_hf 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Account Ledgers - Margin_hf + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetMarginHFLedgerResp getMarginHFLedger(GetMarginHFLedgerReq req); /** - * Get Account Ledgers - Futures This interface can query the ledger records of the futures - * business line. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + * Get Account Ledgers - Futures + * + *

This interface can query the ledger records of the futures business line. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetFuturesLedgerResp getFuturesLedger(GetFuturesLedgerReq req); /** - * Get Account Detail - Margin Request margin account info via this endpoint. + * Get Account Detail - Margin + * + *

Request margin account info via this endpoint. * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 40 | - * +-----------------------+---------+ + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 40 + *
+ * + * @see docs + * @deprecated */ GetMarginAccountDetailResp getMarginAccountDetail(); /** - * Get Account List - Isolated Margin - V1 Request the isolated margin account info list via this - * endpoint. - * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 50 | - * +-----------------------+---------+ + * Get Account List - Isolated Margin - V1 + * + *

Request the isolated margin account info list via this endpoint. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 50 + *
+ * + * @see docs + * @deprecated */ GetIsolatedMarginAccountListV1Resp getIsolatedMarginAccountListV1( GetIsolatedMarginAccountListV1Req req); /** - * Get Account Detail - Isolated Margin - V1 Request isolated margin account info via this - * endpoint. - * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 50 | - * +-----------------------+---------+ + * Get Account Detail - Isolated Margin - V1 + * + *

Request isolated margin account info via this endpoint. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 50 + *
+ * + * @see docs + * @deprecated */ GetIsolatedMarginAccountDetailV1Resp getIsolatedMarginAccountDetailV1( GetIsolatedMarginAccountDetailV1Req req); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.java index e6f0869b..30a22573 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.java @@ -4,82 +4,146 @@ public interface DepositApi { /** - * Add Deposit Address (V3) Request via this endpoint the creation of a deposit address for a - * currency you intend to deposit. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | - * +-----------------------+------------+ + * Add Deposit Address (V3) + * + *

Request via this endpoint the creation of a deposit address for a currency you intend to + * deposit. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ AddDepositAddressV3Resp addDepositAddressV3(AddDepositAddressV3Req req); /** - * Get Deposit Address (V3) 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. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 | - * +-----------------------+------------+ + * Get Deposit Address (V3) + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetDepositAddressV3Resp getDepositAddressV3(GetDepositAddressV3Req req); /** - * Get Deposit History 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. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 | - * +-----------------------+------------+ + * Get Deposit History + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetDepositHistoryResp getDepositHistory(GetDepositHistoryReq req); /** - * Get Deposit Addresses (V2) 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. - * - * @deprecated docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 - * | +-----------------------+------------+ + * Get Deposit Addresses (V2) + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs + * @deprecated */ GetDepositAddressV2Resp getDepositAddressV2(GetDepositAddressV2Req req); /** - * Get Deposit Addresses - V1 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. - * - * @deprecated docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 - * | +-----------------------+------------+ + * Get Deposit Addresses - V1 + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs + * @deprecated */ GetDepositAddressV1Resp getDepositAddressV1(GetDepositAddressV1Req req); /** - * Get Deposit History - Old 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. - * - * @deprecated docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 - * | +-----------------------+------------+ + * Get Deposit History - Old + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs + * @deprecated */ GetDepositHistoryOldResp getDepositHistoryOld(GetDepositHistoryOldReq req); /** - * Add Deposit Address - V1 Request via this endpoint the creation of a deposit address for a - * currency you intend to deposit. - * - * @deprecated docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | - * 20 | +-----------------------+------------+ + * Add Deposit Address - V1 + * + *

Request via this endpoint the creation of a deposit address for a currency you intend to + * deposit. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs + * @deprecated */ AddDepositAddressV1Resp addDepositAddressV1(AddDepositAddressV1Req req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApi.java index 6a1d2095..855cd306 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApi.java @@ -4,32 +4,62 @@ public interface FeeApi { /** - * Get Basic Fee - Spot/Margin This interface is for the user’s spot/margin basic fee rate. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + * Get Basic Fee - Spot/Margin + * + *

This interface is for the user’s spot/margin basic fee rate. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetBasicFeeResp getBasicFee(GetBasicFeeReq req); /** - * Get Actual Fee - Spot/Margin 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + * Get Actual Fee - Spot/Margin + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetSpotActualFeeResp getSpotActualFee(GetSpotActualFeeReq req); /** - * Get Actual Fee - Futures 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + * Get Actual Fee - Futures + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetFuturesActualFeeResp getFuturesActualFee(GetFuturesActualFeeReq req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.java index e6bc6ef6..43fdbed1 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.java @@ -4,145 +4,260 @@ public interface SubAccountApi { /** - * Add sub-account This endpoint can be used to create sub-accounts. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 15 | - * +-----------------------+------------+ + * Add sub-account + * + *

This endpoint can be used to create sub-accounts. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 15 + *
+ * + * @see docs */ AddSubAccountResp addSubAccount(AddSubAccountReq req); /** - * Add sub-account Margin Permission 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. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 15 | - * +-----------------------+------------+ + * Add sub-account Margin Permission + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 15 + *
+ * + * @see docs */ AddSubAccountMarginPermissionResp addSubAccountMarginPermission( AddSubAccountMarginPermissionReq req); /** - * Add sub-account Futures Permission 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. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 15 | - * +-----------------------+------------+ + * Add sub-account Futures Permission + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 15 + *
+ * + * @see docs */ AddSubAccountFuturesPermissionResp addSubAccountFuturesPermission( AddSubAccountFuturesPermissionReq req); /** - * Get sub-account List - Summary Info This endpoint can be used to get a paginated list of - * sub-accounts. Pagination is required. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | - * +-----------------------+------------+ + * Get sub-account List - Summary Info + * + *

This endpoint can be used to get a paginated list of sub-accounts. Pagination is required. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ GetSpotSubAccountsSummaryV2Resp getSpotSubAccountsSummaryV2(GetSpotSubAccountsSummaryV2Req req); /** - * Get sub-account Detail - Balance This endpoint returns the account info of a sub-user specified - * by the subUserId. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 15 | - * +-----------------------+------------+ + * Get sub-account Detail - Balance + * + *

This endpoint returns the account info of a sub-user specified by the subUserId. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 15 + *
+ * + * @see docs */ GetSpotSubAccountDetailResp getSpotSubAccountDetail(GetSpotSubAccountDetailReq req); /** - * Get sub-account List - Spot Balance (V2) This endpoint can be used to get paginated Spot - * sub-account information. Pagination is required. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | - * +-----------------------+------------+ + * Get sub-account List - Spot Balance (V2) + * + *

This endpoint can be used to get paginated Spot sub-account information. Pagination is + * required. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ GetSpotSubAccountListV2Resp getSpotSubAccountListV2(GetSpotSubAccountListV2Req req); /** - * Get sub-account List - Futures Balance (V2) This endpoint can be used to get Futures - * sub-account information. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 6 | - * +-----------------------+---------+ + * Get sub-account List - Futures Balance (V2) + * + *

This endpoint can be used to get Futures sub-account information. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 6 + *
+ * + * @see docs */ GetFuturesSubAccountListV2Resp getFuturesSubAccountListV2(GetFuturesSubAccountListV2Req req); /** - * Add sub-account API This endpoint can be used to create APIs for sub-accounts. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | - * +-----------------------+------------+ + * Add sub-account API + * + *

This endpoint can be used to create APIs for sub-accounts. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ AddSubAccountApiResp addSubAccountApi(AddSubAccountApiReq req); /** - * Modify sub-account API This endpoint can be used to modify sub-account APIs. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 30 | - * +-----------------------+------------+ + * Modify sub-account API + * + *

This endpoint can be used to modify sub-account APIs. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 30 + *
+ * + * @see docs */ ModifySubAccountApiResp modifySubAccountApi(ModifySubAccountApiReq req); /** - * Get sub-account API List This endpoint can be used to obtain a list of APIs pertaining to a - * sub-account (not including ND broker sub-accounts). docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | - * +-----------------------+------------+ + * Get sub-account API List + * + *

This endpoint can be used to obtain a list of APIs pertaining to a sub-account (not + * including ND broker sub-accounts). + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ GetSubAccountApiListResp getSubAccountApiList(GetSubAccountApiListReq req); /** - * Delete sub-account API This endpoint can be used to delete sub-account APIs. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 30 | - * +-----------------------+------------+ + * Delete sub-account API + * + *

This endpoint can be used to delete sub-account APIs. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 30 + *
+ * + * @see docs */ DeleteSubAccountApiResp deleteSubAccountApi(DeleteSubAccountApiReq req); /** - * Get sub-account List - Summary Info (V1) 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 - * - * @deprecated docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | - * 20 | +-----------------------+------------+ + * Get sub-account List - Summary Info (V1) + * + *

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 + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs + * @deprecated */ GetSpotSubAccountsSummaryV1Resp getSpotSubAccountsSummaryV1(); /** - * Get sub-account List - Spot Balance (V1) This endpoint returns the account info of all - * sub-users. - * - * @deprecated docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | - * 20 | +-----------------------+------------+ + * Get sub-account List - Spot Balance (V1) + * + *

This endpoint returns the account info of all sub-users. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs + * @deprecated */ GetSpotSubAccountListV1Resp getSpotSubAccountListV1(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.java index e7ef2d49..2d660263 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.java @@ -4,88 +4,148 @@ public interface TransferApi { /** - * Get Transfer Quotas This endpoint returns the transferable balance of a specified account. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | - * +-----------------------+------------+ + * Get Transfer Quotas + * + *

This endpoint returns the transferable balance of a specified account. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ GetTransferQuotasResp getTransferQuotas(GetTransferQuotasReq req); /** - * Flex Transfer This interface can be used for transfers between master- and sub-accounts and - * transfers docs - * +-----------------------+---------------+ | Extra API Info | Value | - * +-----------------------+---------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | FLEXTRANSFERS | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | - * 4 | +-----------------------+---------------+ + * Flex Transfer + * + *

This interface can be used for transfers between master- and sub-accounts and transfers + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FLEXTRANSFERS + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 4 + *
+ * + * @see docs */ FlexTransferResp flexTransfer(FlexTransferReq req); /** - * Sub-account Transfer 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. - * - * @deprecated docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 30 | - * +-----------------------+------------+ + * Sub-account Transfer + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 30 + *
+ * + * @see docs + * @deprecated */ SubAccountTransferResp subAccountTransfer(SubAccountTransferReq req); /** - * Internal Transfer This API endpoint can be used to transfer funds between accounts internally. - * Users can transfer funds between their accounts free of charge. - * - * @deprecated docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 10 | - * +-----------------------+------------+ + * Internal Transfer + * + *

This API endpoint can be used to transfer funds between accounts internally. Users can + * transfer funds between their accounts free of charge. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs + * @deprecated */ InnerTransferResp innerTransfer(InnerTransferReq req); /** - * Get Futures Account Transfer Out Ledger Futures account transfer out ledgers can be obtained at - * this endpoint. - * - * @deprecated docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | - * 20 | +-----------------------+------------+ + * Get Futures Account Transfer Out Ledger + * + *

Futures account transfer out ledgers can be obtained at this endpoint. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs + * @deprecated */ GetFuturesAccountTransferOutLedgerResp getFuturesAccountTransferOutLedger( GetFuturesAccountTransferOutLedgerReq req); /** - * Futures Account Transfer Out 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. - * - * @deprecated docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | - * 20 | +-----------------------+------------+ + * Futures Account Transfer Out + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs + * @deprecated */ FuturesAccountTransferOutResp futuresAccountTransferOut(FuturesAccountTransferOutReq req); /** - * Futures Account Transfer In 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. - * - * @deprecated docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | - * 20 | +-----------------------+------------+ + * Futures Account Transfer In + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs + * @deprecated */ FuturesAccountTransferInResp futuresAccountTransferIn(FuturesAccountTransferInReq req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.java index be9f7af8..2aa63c42 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.java @@ -4,78 +4,141 @@ public interface WithdrawalApi { /** - * Get Withdrawal Quotas This interface can obtain the withdrawal quota information of this - * currency. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | - * +-----------------------+------------+ + * Get Withdrawal Quotas + * + *

This interface can obtain the withdrawal quota information of this currency. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ GetWithdrawalQuotasResp getWithdrawalQuotas(GetWithdrawalQuotasReq req); /** - * Withdraw (V3) Use this interface to withdraw the specified currency. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | WITHDRAWAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 - * | +-----------------------+------------+ + * Withdraw (V3) + * + *

Use this interface to withdraw the specified currency. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : WITHDRAWAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ WithdrawalV3Resp withdrawalV3(WithdrawalV3Req req); /** - * Cancel Withdrawal This interface can cancel the withdrawal. Only withdrawal requests with - * PROCESSING status can be canceled. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | WITHDRAWAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 - * | +-----------------------+------------+ + * Cancel Withdrawal + * + *

This interface can cancel the withdrawal. Only withdrawal requests with PROCESSING status + * can be canceled. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : WITHDRAWAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ CancelWithdrawalResp cancelWithdrawal(CancelWithdrawalReq req); /** - * Get Withdrawal History 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. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | - * +-----------------------+------------+ + * Get Withdrawal History + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ GetWithdrawalHistoryResp getWithdrawalHistory(GetWithdrawalHistoryReq req); /** - * Get Withdrawal History By ID Request a withdrawal history by id via this endpoint. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | - * +-----------------------+------------+ + * Get Withdrawal History By ID + * + *

Request a withdrawal history by id via this endpoint. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ GetWithdrawalHistoryByIdResp getWithdrawalHistoryById(GetWithdrawalHistoryByIdReq req); /** - * Get Withdrawal History - Old 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. - * - * @deprecated docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | - * 20 | +-----------------------+------------+ + * Get Withdrawal History - Old + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs + * @deprecated */ GetWithdrawalHistoryOldResp getWithdrawalHistoryOld(GetWithdrawalHistoryOldReq req); /** - * Withdraw - V1 Use this interface to withdraw the specified currency. + * Withdraw - V1 + * + *

Use this interface to withdraw the specified currency. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : WITHDRAWAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
* - * @deprecated docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | WITHDRAWAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT - * | 5 | +-----------------------+------------+ + * @see docs + * @deprecated */ WithdrawalV1Resp withdrawalV1(WithdrawalV1Req req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApi.java index fdf6d92f..60192365 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApi.java @@ -4,12 +4,21 @@ public interface AffiliateApi { /** - * Get Account Affiliate user rebate information can be obtained at this endpoint. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 30 | - * +-----------------------+------------+ + * Get Account + * + *

Affiliate user rebate information can be obtained at this endpoint. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 30 + *
+ * + * @see docs */ GetAccountResp getAccount(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApi.java index 1309db7d..3bd99869 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApi.java @@ -4,12 +4,21 @@ public interface APIBrokerApi { /** - * Get Broker Rebate This interface supports the downloading of Broker rebate orders. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+------------+ + * Get Broker Rebate + * + *

This interface supports the downloading of Broker rebate orders. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetRebaseResp getRebase(GetRebaseReq req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApi.java index 22451a1c..f48b90f4 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApi.java @@ -4,152 +4,312 @@ public interface NDBrokerApi { /** - * Submit KYC This endpointcan submit kyc information for a sub-account of nd broker docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | - * API-RATE-LIMIT-WEIGHT | NULL | +-----------------------+---------+ + * Submit KYC + * + *

This endpointcan submit kyc information for a sub-account of nd broker + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : BROKER + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : BROKER + *
  • API-RATE-LIMIT-WEIGHT : NULL + *
+ * + * @see docs */ SubmitKYCResp submitKYC(SubmitKYCReq req); /** - * Get KYC Status This endpoint can query the specified Kyc status docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | - * API-RATE-LIMIT-WEIGHT | NULL | +-----------------------+---------+ + * Get KYC Status + * + *

This endpoint can query the specified Kyc status + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : BROKER + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : BROKER + *
  • API-RATE-LIMIT-WEIGHT : NULL + *
+ * + * @see docs */ GetKYCStatusResp getKYCStatus(GetKYCStatusReq req); /** - * Get KYC Status List This endpoint can query the specified Kyc status list docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | - * API-RATE-LIMIT-WEIGHT | NULL | +-----------------------+---------+ + * Get KYC Status List + * + *

This endpoint can query the specified Kyc status list + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : BROKER + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : BROKER + *
  • API-RATE-LIMIT-WEIGHT : NULL + *
+ * + * @see docs */ GetKYCStatusListResp getKYCStatusList(GetKYCStatusListReq req); /** - * Get Broker Info This endpoint supports querying the basic information of the current Broker. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Broker Info + * + *

This endpoint supports querying the basic information of the current Broker. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : BROKER + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : BROKER + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetBrokerInfoResp getBrokerInfo(GetBrokerInfoReq req); /** - * Add sub-account This endpoint supports Broker users creating sub-accounts. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + * Add sub-account + * + *

This endpoint supports Broker users creating sub-accounts. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : BROKER + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : BROKER + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ AddSubAccountResp addSubAccount(AddSubAccountReq req); /** - * Get sub-account This interface supports querying sub-accounts created by Broker. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get sub-account + * + *

This interface supports querying sub-accounts created by Broker. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : BROKER + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : BROKER + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetSubAccountResp getSubAccount(GetSubAccountReq req); /** - * Add sub-account API This interface supports the creation of Broker sub-account APIKEY. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + * Add sub-account API + * + *

This interface supports the creation of Broker sub-account APIKEY. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : BROKER + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : BROKER + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ AddSubAccountApiResp addSubAccountApi(AddSubAccountApiReq req); /** - * Get sub-account API This interface supports querying the Broker’s sub-account APIKEY. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get sub-account API + * + *

This interface supports querying the Broker’s sub-account APIKEY. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : BROKER + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : BROKER + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetSubAccountAPIResp getSubAccountAPI(GetSubAccountAPIReq req); /** - * Modify sub-account API This interface supports modifying the Broker’s sub-account APIKEY. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + * Modify sub-account API + * + *

This interface supports modifying the Broker’s sub-account APIKEY. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : BROKER + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : BROKER + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ ModifySubAccountApiResp modifySubAccountApi(ModifySubAccountApiReq req); /** - * Delete sub-account API This interface supports deleting Broker’s sub-account APIKEY. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + * Delete sub-account API + * + *

This interface supports deleting Broker’s sub-account APIKEY. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : BROKER + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : BROKER + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ DeleteSubAccountAPIResp deleteSubAccountAPI(DeleteSubAccountAPIReq req); /** - * Transfer 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | - * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + * Transfer + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : BROKER + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : BROKER + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ TransferResp transfer(TransferReq req); /** - * Get Transfer History This endpoint supports querying the transfer records of the broker itself - * and its created sub-accounts. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | BROKER | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | API-RATE-LIMIT-WEIGHT | 1 | - * +-----------------------+---------+ + * Get Transfer History + * + *

This endpoint supports querying the transfer records of the broker itself and its created + * sub-accounts. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : BROKER + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : BROKER + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ GetTransferHistoryResp getTransferHistory(GetTransferHistoryReq req); /** - * Get Deposit List The deposit records of each sub-account under the ND broker can be obtained at - * this endpoint. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | BROKER | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | API-RATE-LIMIT-WEIGHT | 10 | - * +-----------------------+---------+ + * Get Deposit List + * + *

The deposit records of each sub-account under the ND broker can be obtained at this + * endpoint. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : BROKER + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : BROKER + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ GetDepositListResp getDepositList(GetDepositListReq req); /** - * Get Deposit Detail This endpoint supports querying the deposit record of sub-accounts created - * by a Broker (excluding main account of ND broker). docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | - * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + * Get Deposit Detail + * + *

This endpoint supports querying the deposit record of sub-accounts created by a Broker + * (excluding main account of ND broker). + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : BROKER + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : BROKER + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ GetDepositDetailResp getDepositDetail(GetDepositDetailReq req); /** - * Get Withdraw Detail This endpoint supports querying the withdrawal records of sub-accounts - * created by a Broker (excluding main account of ND broker). docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | - * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + * Get Withdraw Detail + * + *

This endpoint supports querying the withdrawal records of sub-accounts created by a Broker + * (excluding main account of ND broker). + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : BROKER + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : BROKER + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ GetWithdrawDetailResp getWithdrawDetail(GetWithdrawDetailReq req); /** - * Get Broker Rebate This interface supports the downloading of Broker rebate orders. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | BROKER | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | BROKER | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + * Get Broker Rebate + * + *

This interface supports the downloading of Broker rebate orders. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : BROKER + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : BROKER + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetRebaseResp getRebase(GetRebaseReq req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApi.java index cc84a6b6..b7d714be 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApi.java @@ -4,119 +4,219 @@ public interface FuturesApi { /** - * Add Order 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. docs - * +-----------------------+------------------+ | Extra API Info | Value | - * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | - * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+------------------+ + * Add Order + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : LEADTRADEFUTURES + *
  • API-RATE-LIMIT-POOL : COPYTRADING + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ AddOrderResp addOrder(AddOrderReq req); /** - * Add Order Test Place order the futures trading system just for validation docs - * +-----------------------+------------------+ | Extra API Info | Value | - * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | - * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+------------------+ + * Add Order Test + * + *

Place order the futures trading system just for validation + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : LEADTRADEFUTURES + *
  • API-RATE-LIMIT-POOL : COPYTRADING + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ AddOrderTestResp addOrderTest(AddOrderTestReq req); /** - * Add Take Profit And Stop Loss Order 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. docs - * +-----------------------+------------------+ | Extra API Info | Value | - * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | - * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+------------------+ + * Add Take Profit And Stop Loss Order + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : LEADTRADEFUTURES + *
  • API-RATE-LIMIT-POOL : COPYTRADING + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ AddTPSLOrderResp addTPSLOrder(AddTPSLOrderReq req); /** - * Cancel Order By OrderId Cancel order by system-generated orderId. docs - * +-----------------------+------------------+ | Extra API Info | Value | - * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | - * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | - * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+------------------+ + * Cancel Order By OrderId + * + *

Cancel order by system-generated orderId. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : LEADTRADEFUTURES + *
  • API-RATE-LIMIT-POOL : COPYTRADING + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ CancelOrderByIdResp cancelOrderById(CancelOrderByIdReq req); /** - * Cancel Order By ClientOid Cancel order by client-defined orderId. docs - * +-----------------------+------------------+ | Extra API Info | Value | - * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | - * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | - * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+------------------+ + * Cancel Order By ClientOid + * + *

Cancel order by client-defined orderId. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : LEADTRADEFUTURES + *
  • API-RATE-LIMIT-POOL : COPYTRADING + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ CancelOrderByClientOidResp cancelOrderByClientOid(CancelOrderByClientOidReq req); /** - * Get Max Open Size Get Maximum Open Position Size. docs - * +-----------------------+------------------+ | Extra API Info | Value | - * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | - * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | - * API-RATE-LIMIT-WEIGHT | 4 | +-----------------------+------------------+ + * Get Max Open Size + * + *

Get Maximum Open Position Size. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : LEADTRADEFUTURES + *
  • API-RATE-LIMIT-POOL : COPYTRADING + *
  • API-RATE-LIMIT-WEIGHT : 4 + *
+ * + * @see docs */ GetMaxOpenSizeResp getMaxOpenSize(GetMaxOpenSizeReq req); /** - * Get Max Withdraw Margin This interface can query the maximum amount of margin that the current - * position supports withdrawal. docs - * +-----------------------+------------------+ | Extra API Info | Value | - * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | - * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | - * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+------------------+ + * Get Max Withdraw Margin + * + *

This interface can query the maximum amount of margin that the current position supports + * withdrawal. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : LEADTRADEFUTURES + *
  • API-RATE-LIMIT-POOL : COPYTRADING + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ GetMaxWithdrawMarginResp getMaxWithdrawMargin(GetMaxWithdrawMarginReq req); /** - * Add Isolated Margin Add Isolated Margin Manually. docs - * +-----------------------+------------------+ | Extra API Info | Value | - * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | - * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | - * API-RATE-LIMIT-WEIGHT | 4 | +-----------------------+------------------+ + * Add Isolated Margin + * + *

Add Isolated Margin Manually. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : LEADTRADEFUTURES + *
  • API-RATE-LIMIT-POOL : COPYTRADING + *
  • API-RATE-LIMIT-WEIGHT : 4 + *
+ * + * @see docs */ AddIsolatedMarginResp addIsolatedMargin(AddIsolatedMarginReq req); /** - * Remove Isolated Margin Remove Isolated Margin Manually. docs - * +-----------------------+------------------+ | Extra API Info | Value | - * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | - * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | - * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+------------------+ + * Remove Isolated Margin + * + *

Remove Isolated Margin Manually. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : LEADTRADEFUTURES + *
  • API-RATE-LIMIT-POOL : COPYTRADING + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ RemoveIsolatedMarginResp removeIsolatedMargin(RemoveIsolatedMarginReq req); /** - * Modify Isolated Margin Risk Limit This interface can be used to obtain information about risk - * limit level of a specific contract (only valid for Isolated Margin). docs - * +-----------------------+------------------+ | Extra API Info | Value | - * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | - * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+------------------+ + * Modify Isolated Margin Risk Limit + * + *

This interface can be used to obtain information about risk limit level of a specific + * contract (only valid for Isolated Margin). + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : LEADTRADEFUTURES + *
  • API-RATE-LIMIT-POOL : COPYTRADING + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ ModifyIsolatedMarginRiskLimtResp modifyIsolatedMarginRiskLimt( ModifyIsolatedMarginRiskLimtReq req); /** - * Modify Isolated Margin Auto-Deposit Status This endpoint is only applicable to isolated margin - * and is no longer recommended. It is recommended to use cross margin instead. docs - * +-----------------------+------------------+ | Extra API Info | Value | - * +-----------------------+------------------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | - * | API-PERMISSION | LEADTRADEFUTURES | | API-RATE-LIMIT-POOL | COPYTRADING | | - * API-RATE-LIMIT-WEIGHT | 4 | +-----------------------+------------------+ + * Modify Isolated Margin Auto-Deposit Status + * + *

This endpoint is only applicable to isolated margin and is no longer recommended. It is + * recommended to use cross margin instead. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : LEADTRADEFUTURES + *
  • API-RATE-LIMIT-POOL : COPYTRADING + *
  • API-RATE-LIMIT-WEIGHT : 4 + *
+ * + * @see docs */ ModifyAutoDepositStatusResp modifyAutoDepositStatus(ModifyAutoDepositStatusReq req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApi.java index f4253608..07e0b7e4 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApi.java @@ -4,91 +4,181 @@ public interface EarnApi { /** - * Purchase This endpoint allows you to subscribe Earn products. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | EARN | | API-RATE-LIMIT-POOL | EARN | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Purchase + * + *

This endpoint allows you to subscribe Earn products. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : EARN + *
  • API-RATE-LIMIT-POOL : EARN + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ PurchaseResp purchase(PurchaseReq req); /** - * Get Redeem Preview This endpoint allows you to subscribe Earn products. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | EARN | | API-RATE-LIMIT-POOL | EARN | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Get Redeem Preview + * + *

This endpoint allows you to subscribe Earn products. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : EARN + *
  • API-RATE-LIMIT-POOL : EARN + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetRedeemPreviewResp getRedeemPreview(GetRedeemPreviewReq req); /** - * Redeem 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. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | EARN | | API-RATE-LIMIT-POOL | EARN | | API-RATE-LIMIT-WEIGHT | 5 | - * +-----------------------+---------+ + * Redeem + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : EARN + *
  • API-RATE-LIMIT-POOL : EARN + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ RedeemResp redeem(RedeemReq req); /** - * Get Savings Products Available savings products can be obtained at this endpoint. If no - * products are available, an empty list is returned. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | EARN | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Get Savings Products + * + *

Available savings products can be obtained at this endpoint. If no products are available, + * an empty list is returned. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : EARN + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetSavingsProductsResp getSavingsProducts(GetSavingsProductsReq req); /** - * Get Promotion Products Available limited-duration products can be obtained at this endpoint. If - * no products are available, an empty list is returned. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | EARN | | - * API-RATE-LIMIT-WEIGHT | NULL | +-----------------------+---------+ + * Get Promotion Products + * + *

Available limited-duration products can be obtained at this endpoint. If no products are + * available, an empty list is returned. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : EARN + *
  • API-RATE-LIMIT-WEIGHT : NULL + *
+ * + * @see docs */ GetPromotionProductsResp getPromotionProducts(GetPromotionProductsReq req); /** - * Get Staking Products Available staking products can be obtained at this endpoint. If no - * products are available, an empty list is returned. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | EARN | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Get Staking Products + * + *

Available staking products can be obtained at this endpoint. If no products are available, + * an empty list is returned. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : EARN + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetStakingProductsResp getStakingProducts(GetStakingProductsReq req); /** - * Get KCS Staking Products Available KCS staking products can be obtained at this endpoint. If no - * products are available, an empty list is returned. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | EARN | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Get KCS Staking Products + * + *

Available KCS staking products can be obtained at this endpoint. If no products are + * available, an empty list is returned. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : EARN + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetKcsStakingProductsResp getKcsStakingProducts(GetKcsStakingProductsReq req); /** - * Get ETH Staking Products Available ETH staking products can be obtained at this endpoint. If no - * products are available, an empty list is returned. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | EARN | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Get ETH Staking Products + * + *

Available ETH staking products can be obtained at this endpoint. If no products are + * available, an empty list is returned. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : EARN + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetETHStakingProductsResp getETHStakingProducts(GetETHStakingProductsReq req); /** - * Get Account Holding Information on currently held assets can be obtained at this endpoint. If - * no assets are currently held, an empty list is returned. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | EARN | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Get Account Holding + * + *

Information on currently held assets can be obtained at this endpoint. If no assets are + * currently held, an empty list is returned. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : EARN + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetAccountHoldingResp getAccountHolding(GetAccountHoldingReq req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApi.java index d2dd6e9c..6bf1973f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApi.java @@ -4,30 +4,60 @@ public interface FundingFeesApi { /** - * Get Current Funding Rate Get Current Funding Rate. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Current Funding Rate + * + *

Get Current Funding Rate. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetCurrentFundingRateResp getCurrentFundingRate(GetCurrentFundingRateReq req); /** - * Get Public Funding History Query the funding rate at each settlement time point within a - * certain time range of the corresponding contract. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Get Public Funding History + * + *

Query the funding rate at each settlement time point within a certain time range of the + * corresponding contract. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetPublicFundingHistoryResp getPublicFundingHistory(GetPublicFundingHistoryReq req); /** - * Get Private Funding History Submit request to get the funding history. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Get Private Funding History + * + *

Submit request to get the funding history. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetPrivateFundingHistoryResp getPrivateFundingHistory(GetPrivateFundingHistoryReq req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApi.java index a24b6671..a8191e4c 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApi.java @@ -4,179 +4,345 @@ public interface MarketApi { /** - * Get Symbol 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + * Get Symbol + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetSymbolResp getSymbol(GetSymbolReq req); /** - * Get All Symbols 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + * Get All Symbols + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetAllSymbolsResp getAllSymbols(); /** - * Get Ticker This endpoint returns \"last traded price/size\", \"best bid/ask + * Get Ticker + * + *

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. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + * Websocket. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetTickerResp getTicker(GetTickerReq req); /** - * Get All Tickers This endpoint returns \"last traded price/size\", \"best bid/ask + * Get All Tickers + * + *

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. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 5 | - * +-----------------------+---------+ + * Websocket. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetAllTickersResp getAllTickers(); /** - * Get Full OrderBook 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + * Get Full OrderBook + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetFullOrderBookResp getFullOrderBook(GetFullOrderBookReq req); /** - * Get Part OrderBook 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. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 5 | - * +-----------------------+---------+ + * Get Part OrderBook + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetPartOrderBookResp getPartOrderBook(GetPartOrderBookReq req); /** - * Get Trade History Request the trade history of the specified symbol via this endpoint. The - * returned quantity is the last 100 transaction records. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Get Trade History + * + *

Request the trade history of the specified symbol via this endpoint. The returned quantity + * is the last 100 transaction records. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetTradeHistoryResp getTradeHistory(GetTradeHistoryReq req); /** - * Get Klines 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + * Get Klines + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetKlinesResp getKlines(GetKlinesReq req); /** - * Get Mark Price Get the current mark price (Update snapshots once per second, real-time query). - * docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+---------+ + * Get Mark Price + * + *

Get the current mark price (Update snapshots once per second, real-time query). + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetMarkPriceResp getMarkPrice(GetMarkPriceReq req); /** - * Get Spot Index Price Get Spot Index Price (Update snapshots once per second, and there is a 5s - * cache when querying). docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + * Get Spot Index Price + * + *

Get Spot Index Price (Update snapshots once per second, and there is a 5s cache when + * querying). + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetSpotIndexPriceResp getSpotIndexPrice(GetSpotIndexPriceReq req); /** - * Get Interest Rate Index Get interest rate Index (real-time query). docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Get Interest Rate Index + * + *

Get interest rate Index (real-time query). + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetInterestRateIndexResp getInterestRateIndex(GetInterestRateIndexReq req); /** - * Get Premium Index Submit request to get premium index (Update snapshots once per second, - * real-time query). docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+---------+ + * Get Premium Index + * + *

Submit request to get premium index (Update snapshots once per second, real-time query). + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetPremiumIndexResp getPremiumIndex(GetPremiumIndexReq req); /** - * Get 24hr stats Get the statistics of the platform futures trading volume in the last 24 hours. - * docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+---------+ + * Get 24hr stats + * + *

Get the statistics of the platform futures trading volume in the last 24 hours. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ Get24hrStatsResp get24hrStats(); /** - * Get Server Time Get the API server time. This is the Unix timestamp. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Server Time + * + *

Get the API server time. This is the Unix timestamp. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetServerTimeResp getServerTime(); /** - * Get Service Status Get the service status. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 4 | +-----------------------+---------+ + * Get Service Status + * + *

Get the service status. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 4 + *
+ * + * @see docs */ GetServiceStatusResp getServiceStatus(); /** - * Get Public Token - Futures 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 docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+---------+ + * Get Public Token - Futures + * + *

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 + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ GetPublicTokenResp getPublicToken(); /** - * Get Private Token - Futures 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 docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+---------+ + * Get Private Token - Futures + * + *

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 + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ GetPrivateTokenResp getPrivateToken(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.java index 98780fa7..e8580bb3 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.java @@ -4,187 +4,362 @@ public interface OrderApi { /** - * Add Order 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Add Order + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ AddOrderResp addOrder(AddOrderReq req); /** - * Add Order Test Place order to the futures trading system just for validation docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Add Order Test + * + *

Place order to the futures trading system just for validation + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ AddOrderTestResp addOrderTest(AddOrderTestReq req); /** - * Batch Add Orders 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 20 | +-----------------------+---------+ + * Batch Add Orders + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ BatchAddOrdersResp batchAddOrders(BatchAddOrdersReq req); /** - * Add Take Profit And Stop Loss Order 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. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + * Add Take Profit And Stop Loss Order + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ AddTPSLOrderResp addTPSLOrder(AddTPSLOrderReq req); /** - * Cancel Order By OrderId Cancel order by system generated orderId. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + * Cancel Order By OrderId + * + *

Cancel order by system generated orderId. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ CancelOrderByIdResp cancelOrderById(CancelOrderByIdReq req); /** - * Cancel Order By ClientOid Cancel order by client defined orderId. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + * Cancel Order By ClientOid + * + *

Cancel order by client defined orderId. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ CancelOrderByClientOidResp cancelOrderByClientOid(CancelOrderByClientOidReq req); /** - * Batch Cancel Orders Cancel a bach of orders by client defined orderId or system generated - * orderId docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 20 | - * +-----------------------+---------+ + * Batch Cancel Orders + * + *

Cancel a bach of orders by client defined orderId or system generated orderId + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ BatchCancelOrdersResp batchCancelOrders(BatchCancelOrdersReq req); /** - * Cancel All Orders Cancel all open orders (excluding stop orders). The response is a list of - * orderIDs of the canceled orders. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 10 | - * +-----------------------+---------+ + * Cancel All Orders + * + *

Cancel all open orders (excluding stop orders). The response is a list of orderIDs of the + * canceled orders. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ CancelAllOrdersV3Resp cancelAllOrdersV3(CancelAllOrdersV3Req req); /** - * Cancel All Stop orders 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'. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 15 | - * +-----------------------+---------+ + * Cancel All Stop orders + * + *

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'. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 15 + *
+ * + * @see docs */ CancelAllStopOrdersResp cancelAllStopOrders(CancelAllStopOrdersReq req); /** - * Get Order By OrderId Get a single order by order id (including a stop order). docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Get Order By OrderId + * + *

Get a single order by order id (including a stop order). + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetOrderByOrderIdResp getOrderByOrderId(GetOrderByOrderIdReq req); /** - * Get Order By ClientOid Get a single order by client order ID (including a stop order). docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Get Order By ClientOid + * + *

Get a single order by client order ID (including a stop order). + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetOrderByClientOidResp getOrderByClientOid(GetOrderByClientOidReq req); /** - * Get Order List List your current orders. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Order List + * + *

List your current orders. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetOrderListResp getOrderList(GetOrderListReq req); /** - * Get Recent Closed Orders 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Get Recent Closed Orders + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetRecentClosedOrdersResp getRecentClosedOrders(GetRecentClosedOrdersReq req); /** - * Get Stop Order List Get the un-triggered stop orders list. Stop orders that have been triggered - * can be queried through the general order interface docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 6 | +-----------------------+---------+ + * Get Stop Order List + * + *

Get the un-triggered stop orders list. Stop orders that have been triggered can be queried + * through the general order interface + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 6 + *
+ * + * @see docs */ GetStopOrderListResp getStopOrderList(GetStopOrderListReq req); /** - * Get Open Order Value You can query this endpoint to get the total number and value of all your - * active orders. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 10 | - * +-----------------------+---------+ + * Get Open Order Value + * + *

You can query this endpoint to get the total number and value of all your active orders. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ GetOpenOrderValueResp getOpenOrderValue(GetOpenOrderValueReq req); /** - * Get Recent Trade History 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | NULL | +-----------------------+---------+ + * Get Recent Trade History + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : NULL + *
+ * + * @see docs */ GetRecentTradeHistoryResp getRecentTradeHistory(GetRecentTradeHistoryReq req); /** - * Get Trade History 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. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 5 | - * +-----------------------+---------+ + * Get Trade History + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetTradeHistoryResp getTradeHistory(GetTradeHistoryReq req); /** - * Cancel All Orders - V1 Cancel all open orders (excluding stop orders). The response is a list - * of orderIDs of the canceled orders. + * Cancel All Orders - V1 + * + *

Cancel all open orders (excluding stop orders). The response is a list of orderIDs of the + * canceled orders. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 800 + *
* - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 800 - * | +-----------------------+---------+ + * @see docs + * @deprecated */ CancelAllOrdersV1Resp cancelAllOrdersV1(CancelAllOrdersV1Req req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.java index 9cf32b3f..5e7e424a 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.java @@ -4,155 +4,312 @@ public interface PositionsApi { /** - * Get Margin Mode This interface can query the margin mode of the current symbol. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Margin Mode + * + *

This interface can query the margin mode of the current symbol. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetMarginModeResp getMarginMode(GetMarginModeReq req); /** - * Switch Margin Mode This interface can modify the margin mode of the current symbol. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Switch Margin Mode + * + *

This interface can modify the margin mode of the current symbol. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ SwitchMarginModeResp switchMarginMode(SwitchMarginModeReq req); /** - * Batch Switch Margin Mode Batch modify the margin mode of the symbols. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Batch Switch Margin Mode + * + *

Batch modify the margin mode of the symbols. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ BatchSwitchMarginModeResp batchSwitchMarginMode(BatchSwitchMarginModeReq req); /** - * Get Max Open Size Get Maximum Open Position Size. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Max Open Size + * + *

Get Maximum Open Position Size. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetMaxOpenSizeResp getMaxOpenSize(GetMaxOpenSizeReq req); /** - * Get Position Details Get the position details of a specified position. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Position Details + * + *

Get the position details of a specified position. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetPositionDetailsResp getPositionDetails(GetPositionDetailsReq req); /** - * Get Position List Get the position details of a specified position. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Position List + * + *

Get the position details of a specified position. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetPositionListResp getPositionList(GetPositionListReq req); /** - * Get Positions History This interface can query position history information records. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Positions History + * + *

This interface can query position history information records. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetPositionsHistoryResp getPositionsHistory(GetPositionsHistoryReq req); /** - * Get Max Withdraw Margin This interface can query the maximum amount of margin that the current - * position supports withdrawal. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 10 | - * +-----------------------+---------+ + * Get Max Withdraw Margin + * + *

This interface can query the maximum amount of margin that the current position supports + * withdrawal. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ GetMaxWithdrawMarginResp getMaxWithdrawMargin(GetMaxWithdrawMarginReq req); /** - * Get Cross Margin Leverage This interface can query the current symbol’s cross-margin leverage - * multiple. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + * Get Cross Margin Leverage + * + *

This interface can query the current symbol’s cross-margin leverage multiple. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetCrossMarginLeverageResp getCrossMarginLeverage(GetCrossMarginLeverageReq req); /** - * Modify Cross Margin Leverage This interface can modify the current symbol’s cross-margin - * leverage multiple. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + * Modify Cross Margin Leverage + * + *

This interface can modify the current symbol’s cross-margin leverage multiple. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ ModifyMarginLeverageResp modifyMarginLeverage(ModifyMarginLeverageReq req); /** - * Add Isolated Margin Add Isolated Margin Manually. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 4 | +-----------------------+---------+ + * Add Isolated Margin + * + *

Add Isolated Margin Manually. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 4 + *
+ * + * @see docs */ AddIsolatedMarginResp addIsolatedMargin(AddIsolatedMarginReq req); /** - * Remove Isolated Margin Remove Isolated Margin Manually. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+---------+ + * Remove Isolated Margin + * + *

Remove Isolated Margin Manually. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ RemoveIsolatedMarginResp removeIsolatedMargin(RemoveIsolatedMarginReq req); /** - * Get Cross Margin Risk Limit Batch get cross margin risk limit. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Cross Margin Risk Limit + * + *

Batch get cross margin risk limit. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetCrossMarginRiskLimitResp getCrossMarginRiskLimit(GetCrossMarginRiskLimitReq req); /** - * Get Isolated Margin Risk Limit This interface can be used to obtain information about risk - * limit level of a specific contract (only valid for Isolated Margin). docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Get Isolated Margin Risk Limit + * + *

This interface can be used to obtain information about risk limit level of a specific + * contract (only valid for Isolated Margin). + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetIsolatedMarginRiskLimitResp getIsolatedMarginRiskLimit(GetIsolatedMarginRiskLimitReq req); /** - * Modify Isolated Margin Risk Limit This interface can be used to obtain information about risk - * limit level of a specific contract (only valid for Isolated Margin). docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | FUTURES | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Modify Isolated Margin Risk Limit + * + *

This interface can be used to obtain information about risk limit level of a specific + * contract (only valid for Isolated Margin). + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ ModifyIsolatedMarginRiskLimtResp modifyIsolatedMarginRiskLimt( ModifyIsolatedMarginRiskLimtReq req); /** - * Modify Isolated Margin Auto-Deposit Status This endpoint is only applicable to isolated margin - * and is no longer recommended. It is recommended to use cross margin instead. + * Modify Isolated Margin Auto-Deposit Status + * + *

This endpoint is only applicable to isolated margin and is no longer recommended. It is + * recommended to use cross margin instead. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : FUTURES + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : FUTURES + *
  • API-RATE-LIMIT-POOL : FUTURES + *
  • API-RATE-LIMIT-WEIGHT : 4 + *
* - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | FUTURES | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | FUTURES | | API-RATE-LIMIT-POOL | FUTURES | | API-RATE-LIMIT-WEIGHT | 4 | - * +-----------------------+---------+ + * @see docs + * @deprecated */ ModifyAutoDepositStatusResp modifyAutoDepositStatus(ModifyAutoDepositStatusReq req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApi.java index 385a069f..f973b854 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApi.java @@ -4,69 +4,138 @@ public interface CreditApi { /** - * Get Loan Market This API endpoint is used to get the information about the currencies available - * for lending. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 10 | - * +-----------------------+---------+ + * Get Loan Market + * + *

This API endpoint is used to get the information about the currencies available for lending. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ GetLoanMarketResp getLoanMarket(GetLoanMarketReq req); /** - * Get Loan Market Interest Rate This API endpoint is used to get the interest rates of the margin - * lending market over the past 7 days. docs +-----------------------+--------+ - * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+--------+ + * Get Loan Market Interest Rate + * + *

This API endpoint is used to get the interest rates of the margin lending market over the + * past 7 days. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetLoanMarketInterestRateResp getLoanMarketInterestRate(GetLoanMarketInterestRateReq req); /** - * Purchase Invest credit in the market and earn interest docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 15 | +-----------------------+---------+ + * Purchase + * + *

Invest credit in the market and earn interest + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 15 + *
+ * + * @see docs */ PurchaseResp purchase(PurchaseReq req); /** - * Modify Purchase 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. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 10 | - * +-----------------------+---------+ + * Modify Purchase + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ ModifyPurchaseResp modifyPurchase(ModifyPurchaseReq req); /** - * Get Purchase Orders This API endpoint provides a pagination query for the purchase orders. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+---------+ + * Get Purchase Orders + * + *

This API endpoint provides a pagination query for the purchase orders. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ GetPurchaseOrdersResp getPurchaseOrders(GetPurchaseOrdersReq req); /** - * Redeem Redeem your loan order. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 15 | - * +-----------------------+---------+ + * Redeem + * + *

Redeem your loan order. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 15 + *
+ * + * @see docs */ RedeemResp redeem(RedeemReq req); /** - * Get Redeem Orders This API endpoint provides pagination query for the redeem orders. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+---------+ + * Get Redeem Orders + * + *

This API endpoint provides pagination query for the redeem orders. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ GetRedeemOrdersResp getRedeemOrders(GetRedeemOrdersReq req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApi.java index e349323f..6442f666 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApi.java @@ -4,62 +4,118 @@ public interface DebitApi { /** - * Borrow This API endpoint is used to initiate an application for cross or isolated margin - * borrowing. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 15 | - * +-----------------------+---------+ + * Borrow + * + *

This API endpoint is used to initiate an application for cross or isolated margin borrowing. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 15 + *
+ * + * @see docs */ BorrowResp borrow(BorrowReq req); /** - * Get Borrow History This API endpoint is used to get the borrowing orders for cross and isolated - * margin accounts. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 15 | - * +-----------------------+---------+ + * Get Borrow History + * + *

This API endpoint is used to get the borrowing orders for cross and isolated margin + * accounts. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 15 + *
+ * + * @see docs */ GetBorrowHistoryResp getBorrowHistory(GetBorrowHistoryReq req); /** - * Repay This API endpoint is used to initiate an application for cross or isolated margin - * repayment. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 10 | - * +-----------------------+---------+ + * Repay + * + *

This API endpoint is used to initiate an application for cross or isolated margin repayment. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ RepayResp repay(RepayReq req); /** - * Get Repay History This API endpoint is used to get the borrowing orders for cross and isolated - * margin accounts. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 15 | - * +-----------------------+---------+ + * Get Repay History + * + *

This API endpoint is used to get the borrowing orders for cross and isolated margin + * accounts. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 15 + *
+ * + * @see docs */ GetRepayHistoryResp getRepayHistory(GetRepayHistoryReq req); /** - * Get Interest History. Request the interest records of the cross/isolated margin lending via - * this endpoint. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 20 | - * +-----------------------+---------+ + * Get Interest History. + * + *

Request the interest records of the cross/isolated margin lending via this endpoint. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ GetInterestHistoryResp getInterestHistory(GetInterestHistoryReq req); /** - * Modify Leverage This endpoint allows modifying the leverage multiplier for cross margin or - * isolated margin. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 8 | - * +-----------------------+---------+ + * Modify Leverage + * + *

This endpoint allows modifying the leverage multiplier for cross margin or isolated margin. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 8 + *
+ * + * @see docs */ ModifyLeverageResp modifyLeverage(ModifyLeverageReq req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApi.java index f398a924..dd045119 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApi.java @@ -4,60 +4,116 @@ public interface MarketApi { /** - * Get Symbols - Cross Margin This endpoint allows querying the configuration of cross margin - * symbol. docs - * +-----------------------+--------+ | Extra API Info | Value | - * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+--------+ + * Get Symbols - Cross Margin + * + *

This endpoint allows querying the configuration of cross margin symbol. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetCrossMarginSymbolsResp getCrossMarginSymbols(GetCrossMarginSymbolsReq req); /** - * Get ETF Info This interface returns leveraged token information. docs +-----------------------+--------+ - * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+--------+ + * Get ETF Info + * + *

This interface returns leveraged token information. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetETFInfoResp getETFInfo(GetETFInfoReq req); /** - * Get Mark Price Detail This endpoint returns the current Mark price for specified margin trading - * pairs. docs - * +-----------------------+--------+ | Extra API Info | Value | - * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+--------+ + * Get Mark Price Detail + * + *

This endpoint returns the current Mark price for specified margin trading pairs. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetMarkPriceDetailResp getMarkPriceDetail(GetMarkPriceDetailReq req); /** - * Get Margin Config Request the configure info of the cross margin via this endpoint. docs +-----------------------+--------+ - * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 25 | +-----------------------+--------+ + * Get Margin Config + * + *

Request the configure info of the cross margin via this endpoint. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 25 + *
+ * + * @see docs */ GetMarginConfigResp getMarginConfig(); /** - * Get Mark Price List This endpoint returns the current Mark price for all margin trading pairs. - * docs - * +-----------------------+--------+ | Extra API Info | Value | - * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 10 | - * +-----------------------+--------+ + * Get Mark Price List + * + *

This endpoint returns the current Mark price for all margin trading pairs. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ GetMarkPriceListResp getMarkPriceList(); /** - * Get Symbols - Isolated Margin This endpoint allows querying the configuration of isolated - * margin symbol. docs - * +-----------------------+--------+ | Extra API Info | Value | - * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+--------+ + * Get Symbols - Isolated Margin + * + *

This endpoint allows querying the configuration of isolated margin symbol. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetIsolatedMarginSymbolsResp getIsolatedMarginSymbols(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.java index 862252f2..7956a613 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.java @@ -4,160 +4,286 @@ public interface OrderApi { /** - * Add Order 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Add Order + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ AddOrderResp addOrder(AddOrderReq req); /** - * Add Order Test 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 + * Add Order Test + * + *

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. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + * cannot be queried. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ AddOrderTestResp addOrderTest(AddOrderTestReq req); /** - * Cancel Order By OrderId 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Cancel Order By OrderId + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ CancelOrderByOrderIdResp cancelOrderByOrderId(CancelOrderByOrderIdReq req); /** - * Cancel Order By ClientOid 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Cancel Order By ClientOid + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ CancelOrderByClientOidResp cancelOrderByClientOid(CancelOrderByClientOidReq req); /** - * Cancel All Orders By Symbol 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Cancel All Orders By Symbol + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ CancelAllOrdersBySymbolResp cancelAllOrdersBySymbol(CancelAllOrdersBySymbolReq req); /** - * Get Symbols With Open Order This interface can query all Margin symbols that have active - * orders. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 4 | - * +-----------------------+---------+ + * Get Symbols With Open Order + * + *

This interface can query all Margin symbols that have active orders. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 4 + *
+ * + * @see docs */ GetSymbolsWithOpenOrderResp getSymbolsWithOpenOrder(GetSymbolsWithOpenOrderReq req); /** - * Get Open Orders 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 + * Get Open Orders + * + *

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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 4 | +-----------------------+---------+ + * orders are marked as completed Done status. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 4 + *
+ * + * @see docs */ GetOpenOrdersResp getOpenOrders(GetOpenOrdersReq req); /** - * Get Closed Orders 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+---------+ + * Get Closed Orders + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ GetClosedOrdersResp getClosedOrders(GetClosedOrdersReq req); /** - * Get Trade History 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. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 5 | - * +-----------------------+---------+ + * Get Trade History + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetTradeHistoryResp getTradeHistory(GetTradeHistoryReq req); /** - * Get Order By OrderId 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Get Order By OrderId + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetOrderByOrderIdResp getOrderByOrderId(GetOrderByOrderIdReq req); /** - * Get Order By ClientOid 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 5 | +-----------------------+---------+ + * Get Order By ClientOid + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetOrderByClientOidResp getOrderByClientOid(GetOrderByClientOidReq req); /** - * Add Order - V1 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. - * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 5 | - * +-----------------------+---------+ + * Add Order - V1 + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs + * @deprecated */ AddOrderV1Resp addOrderV1(AddOrderV1Req req); /** - * Add Order Test - V1 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. - * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | MARGIN | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 5 | - * +-----------------------+---------+ + * Add Order Test - V1 + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : MARGIN + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs + * @deprecated */ AddOrderTestV1Resp addOrderTestV1(AddOrderTestV1Req req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApi.java index cc879184..9c4dbb8a 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApi.java @@ -4,11 +4,21 @@ public interface RiskLimitApi { /** - * Get Margin Risk Limit Request Configure and Risk limit info of the margin via this endpoint. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 20 | +-----------------------+---------+ + * Get Margin Risk Limit + * + *

Request Configure and Risk limit info of the margin via this endpoint. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ GetMarginRiskLimitResp getMarginRiskLimit(GetMarginRiskLimitReq req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.java index cd6a531b..a2724dd2 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.java @@ -4,219 +4,426 @@ public interface MarketApi { /** - * Get Announcements This interface can obtain the latest news announcements, and the default page - * search is for announcements within a month. docs +-----------------------+--------+ - * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 20 | +-----------------------+--------+ + * Get Announcements + * + *

This interface can obtain the latest news announcements, and the default page search is for + * announcements within a month. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ GetAnnouncementsResp getAnnouncements(GetAnnouncementsReq req); /** - * Get Currency Request the currency details of a specified currency via this endpoint. docs +-----------------------+--------+ - * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+--------+ + * Get Currency + * + *

Request the currency details of a specified currency via this endpoint. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetCurrencyResp getCurrency(GetCurrencyReq req); /** - * Get All Currencies Request a currency list via this endpoint. Not all currencies can currently - * be used for trading. docs - * +-----------------------+--------+ | Extra API Info | Value | - * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+--------+ + * Get All Currencies + * + *

Request a currency list via this endpoint. Not all currencies can currently be used for + * trading. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetAllCurrenciesResp getAllCurrencies(); /** - * Get Symbol 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. docs +-----------------------+--------+ - * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 4 | +-----------------------+--------+ + * Get Symbol + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 4 + *
+ * + * @see docs */ GetSymbolResp getSymbol(GetSymbolReq req); /** - * Get All Symbols 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. docs +-----------------------+--------+ - * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 4 | +-----------------------+--------+ + * Get All Symbols + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 4 + *
+ * + * @see docs */ GetAllSymbolsResp getAllSymbols(GetAllSymbolsReq req); /** - * Get Ticker 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. docs - * +-----------------------+--------+ | Extra API Info | Value | - * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+--------+ + * Get Ticker + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetTickerResp getTicker(GetTickerReq req); /** - * Get All Tickers 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. docs +-----------------------+--------+ - * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 15 | +-----------------------+--------+ + * Get All Tickers + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 15 + *
+ * + * @see docs */ GetAllTickersResp getAllTickers(); /** - * Get Trade History Request via this endpoint to get the trade history of the specified symbol, - * the returned quantity is the last 100 transaction records. docs +-----------------------+--------+ - * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+--------+ + * Get Trade History + * + *

Request via this endpoint to get the trade history of the specified symbol, the returned + * quantity is the last 100 transaction records. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetTradeHistoryResp getTradeHistory(GetTradeHistoryReq req); /** - * Get Klines 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. docs - * +-----------------------+--------+ | Extra API Info | Value | - * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+--------+ + * Get Klines + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetKlinesResp getKlines(GetKlinesReq req); /** - * Get Part OrderBook 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. docs - * +-----------------------+--------+ | Extra API Info | Value | - * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+--------+ + * Get Part OrderBook + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetPartOrderBookResp getPartOrderBook(GetPartOrderBookReq req); /** - * Get Full OrderBook 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + * Get Full OrderBook + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetFullOrderBookResp getFullOrderBook(GetFullOrderBookReq req); /** - * Get Call Auction Part OrderBook 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. docs - * +-----------------------+--------+ | Extra API Info | Value | - * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+--------+ + * Get Call Auction Part OrderBook + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetCallAuctionPartOrderBookResp getCallAuctionPartOrderBook(GetCallAuctionPartOrderBookReq req); /** - * Get Call Auction Info 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. docs +-----------------------+--------+ - * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+--------+ + * Get Call Auction Info + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetCallAuctionInfoResp getCallAuctionInfo(GetCallAuctionInfoReq req); /** - * Get Fiat Price Request the fiat price of the currencies for the available trading pairs via - * this endpoint. docs - * +-----------------------+--------+ | Extra API Info | Value | - * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+--------+ + * Get Fiat Price + * + *

Request the fiat price of the currencies for the available trading pairs via this endpoint. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetFiatPriceResp getFiatPrice(GetFiatPriceReq req); /** - * Get 24hr Stats Request via this endpoint to get the statistics of the specified ticker in the - * last 24 hours. docs - * +-----------------------+--------+ | Extra API Info | Value | - * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 15 | - * +-----------------------+--------+ + * Get 24hr Stats + * + *

Request via this endpoint to get the statistics of the specified ticker in the last 24 + * hours. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 15 + *
+ * + * @see docs */ Get24hrStatsResp get24hrStats(Get24hrStatsReq req); /** - * Get Market List Request via this endpoint the transaction currency for the entire trading - * market. docs - * +-----------------------+--------+ | Extra API Info | Value | - * +-----------------------+--------+ | API-DOMAIN | SPOT | | API-CHANNEL | PUBLIC | | - * API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+--------+ + * Get Market List + * + *

Request via this endpoint the transaction currency for the entire trading market. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetMarketListResp getMarketList(); /** - * Get Client IP Address Get the server time. docs +-----------------------+--------+ - * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 0 | +-----------------------+--------+ + * Get Client IP Address + * + *

Get the server time. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 0 + *
+ * + * @see docs */ GetClientIPAddressResp getClientIPAddress(); /** - * Get Server Time Get the server time. docs +-----------------------+--------+ - * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+--------+ + * Get Server Time + * + *

Get the server time. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetServerTimeResp getServerTime(); /** - * Get Service Status Get the service status. docs +-----------------------+--------+ - * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+--------+ + * Get Service Status + * + *

Get the service status. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetServiceStatusResp getServiceStatus(); /** - * Get Public Token - Spot/Margin 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 docs +-----------------------+--------+ - * | Extra API Info | Value | +-----------------------+--------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PUBLIC | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+--------+ + * Get Public Token - Spot/Margin + * + *

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 + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PUBLIC + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ GetPublicTokenResp getPublicToken(); /** - * Get Private Token - Spot/Margin 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 docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+---------+ + * Get Private Token - Spot/Margin + * + *

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 + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ GetPrivateTokenResp getPrivateToken(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.java index 91400e48..9f8d08a9 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.java @@ -4,579 +4,1042 @@ public interface OrderApi { /** - * Add Order 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + * Add Order + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ AddOrderResp addOrder(AddOrderReq req); /** - * Add Order Sync 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + * Add Order Sync + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ AddOrderSyncResp addOrderSync(AddOrderSyncReq req); /** - * Add Order Test 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + * Add Order Test + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ AddOrderTestResp addOrderTest(AddOrderTestReq req); /** - * Batch Add Orders 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 docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 1 | - * +-----------------------+---------+ + * Batch Add Orders + * + *

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 + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ BatchAddOrdersResp batchAddOrders(BatchAddOrdersReq req); /** - * Batch Add Orders Sync 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 docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 1 | - * +-----------------------+---------+ + * Batch Add Orders Sync + * + *

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 + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ BatchAddOrdersSyncResp batchAddOrdersSync(BatchAddOrdersSyncReq req); /** - * Cancel Order By OrderId 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + * Cancel Order By OrderId + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ CancelOrderByOrderIdResp cancelOrderByOrderId(CancelOrderByOrderIdReq req); /** - * Cancel Order By OrderId Sync This endpoint can be used to cancel a spot order by orderId. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + * Cancel Order By OrderId Sync + * + *

This endpoint can be used to cancel a spot order by orderId. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ CancelOrderByOrderIdSyncResp cancelOrderByOrderIdSync(CancelOrderByOrderIdSyncReq req); /** - * Cancel Order By ClientOid 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + * Cancel Order By ClientOid + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ CancelOrderByClientOidResp cancelOrderByClientOid(CancelOrderByClientOidReq req); /** - * Cancel Order By ClientOid Sync This endpoint can be used to cancel a spot order by orderId. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 1 | +-----------------------+---------+ + * Cancel Order By ClientOid Sync + * + *

This endpoint can be used to cancel a spot order by orderId. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ CancelOrderByClientOidSyncResp cancelOrderByClientOidSync(CancelOrderByClientOidSyncReq req); /** - * Cancel Partial Order 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 docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + * Cancel Partial Order + * + *

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 + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ CancelPartialOrderResp cancelPartialOrder(CancelPartialOrderReq req); /** - * Cancel All Orders By Symbol 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Cancel All Orders By Symbol + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ CancelAllOrdersBySymbolResp cancelAllOrdersBySymbol(CancelAllOrdersBySymbolReq req); /** - * Cancel All Orders 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 30 | +-----------------------+---------+ + * Cancel All Orders + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 30 + *
+ * + * @see docs */ CancelAllOrdersResp cancelAllOrders(); /** - * Modify Order 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. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 1 | - * +-----------------------+---------+ + * Modify Order + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
+ * + * @see docs */ ModifyOrderResp modifyOrder(ModifyOrderReq req); /** - * Get Order By OrderId 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Order By OrderId + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetOrderByOrderIdResp getOrderByOrderId(GetOrderByOrderIdReq req); /** - * Get Order By ClientOid 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Order By ClientOid + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetOrderByClientOidResp getOrderByClientOid(GetOrderByClientOidReq req); /** - * Get Symbols With Open Order This interface can query all spot symbol that has active orders docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Symbols With Open Order + * + *

This interface can query all spot symbol that has active orders + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetSymbolsWithOpenOrderResp getSymbolsWithOpenOrder(); /** - * Get Open Orders 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Open Orders + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetOpenOrdersResp getOpenOrders(GetOpenOrdersReq req); /** - * Get Open Orders By Page 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Open Orders By Page + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetOpenOrdersByPageResp getOpenOrdersByPage(GetOpenOrdersByPageReq req); /** - * Get Closed Orders 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get Closed Orders + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetClosedOrdersResp getClosedOrders(GetClosedOrdersReq req); /** - * Get Trade History 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. docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + * Get Trade History + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetTradeHistoryResp getTradeHistory(GetTradeHistoryReq req); /** - * Get DCP Get Disconnection Protect (Deadman Switch). Through this interface, you can query the - * settings of automatic order cancellation. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * Get DCP + * + *

Get Disconnection Protect (Deadman Switch). Through this interface, you can query the + * settings of automatic order cancellation. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ GetDCPResp getDCP(); /** - * Set DCP 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 + * Set DCP + * + *

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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 2 | +-----------------------+---------+ + * help the user to cancel the order of the corresponding trading pair. Otherwise it will not. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs */ SetDCPResp setDCP(SetDCPReq req); /** - * Add Stop Order 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. + * Add Stop Order + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 1 + *
* - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 1 | - * +-----------------------+---------+ + * @see docs + * @deprecated */ AddStopOrderResp addStopOrder(AddStopOrderReq req); /** - * Cancel Stop Order By ClientOid This endpoint can be used to cancel a spot stop order by - * clientOid. + * Cancel Stop Order By ClientOid * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 5 | - * +-----------------------+---------+ + *

This endpoint can be used to cancel a spot stop order by clientOid. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs + * @deprecated */ CancelStopOrderByClientOidResp cancelStopOrderByClientOid(CancelStopOrderByClientOidReq req); /** - * Cancel Stop Order By OrderId This endpoint can be used to cancel a spot stop order by orderId. + * Cancel Stop Order By OrderId + * + *

This endpoint can be used to cancel a spot stop order by orderId. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
* - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+---------+ + * @see docs + * @deprecated */ CancelStopOrderByOrderIdResp cancelStopOrderByOrderId(CancelStopOrderByOrderIdReq req); /** - * Batch Cancel Stop Orders This endpoint can be used to cancel a spot stop orders by batch. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + * Batch Cancel Stop Orders + * + *

This endpoint can be used to cancel a spot stop orders by batch. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ BatchCancelStopOrderResp batchCancelStopOrder(BatchCancelStopOrderReq req); /** - * Get Stop Orders List This interface is to obtain all Spot active stop order lists docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 8 | +-----------------------+---------+ + * Get Stop Orders List + * + *

This interface is to obtain all Spot active stop order lists + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 8 + *
+ * + * @see docs */ GetStopOrdersListResp getStopOrdersList(GetStopOrdersListReq req); /** - * Get Stop Order By OrderId This interface is to obtain Spot stop order details by orderId docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + * Get Stop Order By OrderId + * + *

This interface is to obtain Spot stop order details by orderId + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetStopOrderByOrderIdResp getStopOrderByOrderId(GetStopOrderByOrderIdReq req); /** - * Get Stop Order By ClientOid This interface is to obtain Spot stop order details by orderId docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + * Get Stop Order By ClientOid + * + *

This interface is to obtain Spot stop order details by orderId + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ GetStopOrderByClientOidResp getStopOrderByClientOid(GetStopOrderByClientOidReq req); /** - * Add OCO Order Place OCO order to the Spot trading system + * Add OCO Order + * + *

Place OCO order to the Spot trading system * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs + * @deprecated */ AddOcoOrderResp addOcoOrder(AddOcoOrderReq req); /** - * Cancel OCO Order By OrderId 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. + * Cancel OCO Order By OrderId + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
* - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+---------+ + * @see docs + * @deprecated */ CancelOcoOrderByOrderIdResp cancelOcoOrderByOrderId(CancelOcoOrderByOrderIdReq req); /** - * Cancel OCO Order By ClientOid 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. + * Cancel OCO Order By ClientOid * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+---------+ + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs + * @deprecated */ CancelOcoOrderByClientOidResp cancelOcoOrderByClientOid(CancelOcoOrderByClientOidReq req); /** - * Batch Cancel OCO Order 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. + * Batch Cancel OCO Order + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
* - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+---------+ + * @see docs + * @deprecated */ BatchCancelOcoOrdersResp batchCancelOcoOrders(BatchCancelOcoOrdersReq req); /** - * Get OCO Order By OrderId Request via this interface an OCO order information via the order ID. + * Get OCO Order By OrderId * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + *

Request via this interface an OCO order information via the order ID. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs + * @deprecated */ GetOcoOrderByOrderIdResp getOcoOrderByOrderId(GetOcoOrderByOrderIdReq req); /** - * Get OCO Order By ClientOid Request via this interface to get a oco order information via the - * client order ID. + * Get OCO Order By ClientOid + * + *

Request via this interface to get a oco order information via the client order ID. + * + *

Extra API Info: * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs + * @deprecated */ GetOcoOrderByClientOidResp getOcoOrderByClientOid(GetOcoOrderByClientOidReq req); /** - * Get OCO Order Detail By OrderId Request via this interface to get a oco order detail via the - * order ID. + * Get OCO Order Detail By OrderId + * + *

Request via this interface to get a oco order detail via the order ID. + * + *

Extra API Info: * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs + * @deprecated */ GetOcoOrderDetailByOrderIdResp getOcoOrderDetailByOrderId(GetOcoOrderDetailByOrderIdReq req); /** - * Get OCO Order List 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. + * Get OCO Order List + * + *

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. + * + *

Extra API Info: * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs + * @deprecated */ GetOcoOrderListResp getOcoOrderList(GetOcoOrderListReq req); /** - * Add Order - Old 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. + * Add Order - Old + * + *

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. + * + *

Extra API Info: * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs + * @deprecated */ AddOrderOldResp addOrderOld(AddOrderOldReq req); /** - * Add Order Test - Old 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. + * Add Order Test - Old + * + *

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. * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs + * @deprecated */ AddOrderTestOldResp addOrderTestOld(AddOrderTestOldReq req); /** - * Batch Add Orders - Old Request via this endpoint to place 5 orders at the same time. The order - * type must be a limit order of the same symbol. + * Batch Add Orders - Old + * + *

Request via this endpoint to place 5 orders at the same time. The order type must be a limit + * order of the same symbol. * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+---------+ + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs + * @deprecated */ BatchAddOrdersOldResp batchAddOrdersOld(BatchAddOrdersOldReq req); /** - * Cancel Order By OrderId - Old 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. + * Cancel Order By OrderId - Old + * + *

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. * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+---------+ + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs + * @deprecated */ CancelOrderByOrderIdOldResp cancelOrderByOrderIdOld(CancelOrderByOrderIdOldReq req); /** - * Cancel Order By ClientOid - Old 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. docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | - * API-RATE-LIMIT-WEIGHT | 3 | +-----------------------+---------+ + * Cancel Order By ClientOid - Old + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs */ CancelOrderByClientOidOldResp cancelOrderByClientOidOld(CancelOrderByClientOidOldReq req); /** - * Batch Cancel Order - Old Request via this endpoint to cancel all open orders. The response is a - * list of ids of the canceled orders. + * Batch Cancel Order - Old + * + *

Request via this endpoint to cancel all open orders. The response is a list of ids of the + * canceled orders. + * + *

Extra API Info: * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 20 | - * +-----------------------+---------+ + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs + * @deprecated */ BatchCancelOrderOldResp batchCancelOrderOld(BatchCancelOrderOldReq req); /** - * Get Orders List - Old Request your current order list via this endpoint. The return value is - * the data after Pagination, sorted in descending order according to time. + * Get Orders List - Old + * + *

Request your current order list via this endpoint. The return value is the data after + * Pagination, sorted in descending order according to time. + * + *

Extra API Info: * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs + * @deprecated */ GetOrdersListOldResp getOrdersListOld(GetOrdersListOldReq req); /** - * Get Recent Orders List - Old Request your current order list via this endpoint. The return - * value is the data after Pagination, sorted in descending order according to time. + * Get Recent Orders List - Old + * + *

Request your current order list via this endpoint. The return value is the data after + * Pagination, sorted in descending order according to time. + * + *

Extra API Info: * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+---------+ + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs + * @deprecated */ GetRecentOrdersListOldResp getRecentOrdersListOld(); /** - * Get Order By OrderId - Old Request a single order info by order ID via this endpoint. + * Get Order By OrderId - Old + * + *

Request a single order info by order ID via this endpoint. * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 2 | - * +-----------------------+---------+ + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 2 + *
+ * + * @see docs + * @deprecated */ GetOrderByOrderIdOldResp getOrderByOrderIdOld(GetOrderByOrderIdOldReq req); /** - * Get Order By ClientOid - Old 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. + * Get Order By ClientOid - Old + * + *

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. * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 3 | - * +-----------------------+---------+ + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 3 + *
+ * + * @see docs + * @deprecated */ GetOrderByClientOidOldResp getOrderByClientOidOld(GetOrderByClientOidOldReq req); /** - * Get Trade History - Old Request recent fills via this endpoint. The return value is the data - * after Pagination, sorted in descending order according to time. + * Get Trade History - Old + * + *

Request recent fills via this endpoint. The return value is the data after Pagination, + * sorted in descending order according to time. * - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 10 | - * +-----------------------+---------+ + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs + * @deprecated */ GetTradeHistoryOldResp getTradeHistoryOld(GetTradeHistoryOldReq req); /** - * Get Recent Trade History - Old 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. + * Get Recent Trade History - Old + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : GENERAL + *
  • API-RATE-LIMIT-POOL : SPOT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
* - * @deprecated docs - * +-----------------------+---------+ | Extra API Info | Value | - * +-----------------------+---------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | GENERAL | | API-RATE-LIMIT-POOL | SPOT | | API-RATE-LIMIT-WEIGHT | 20 | - * +-----------------------+---------+ + * @see docs + * @deprecated */ GetRecentTradeHistoryOldResp getRecentTradeHistoryOld(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.java index abc68bf1..0703b819 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.java @@ -4,33 +4,62 @@ public interface VIPLendingApi { /** - * Get Discount Rate Configs Get the gradient discount rate of each currency docs +-----------------------+---------+ - * | Extra API Info | Value | +-----------------------+---------+ | API-DOMAIN | SPOT | | - * API-CHANNEL | PRIVATE | | API-PERMISSION | NULL | | API-RATE-LIMIT-POOL | PUBLIC | | - * API-RATE-LIMIT-WEIGHT | 10 | +-----------------------+---------+ + * Get Discount Rate Configs + * + *

Get the gradient discount rate of each currency + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : NULL + *
  • API-RATE-LIMIT-POOL : PUBLIC + *
  • API-RATE-LIMIT-WEIGHT : 10 + *
+ * + * @see docs */ GetDiscountRateConfigsResp getDiscountRateConfigs(); /** - * Get Loan Info 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. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 5 | - * +-----------------------+------------+ + * Get Loan Info + * + *

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. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 5 + *
+ * + * @see docs */ GetLoanInfoResp getLoanInfo(); /** - * Get Accounts Accounts participating in OTC lending. This interface is only for querying - * accounts currently running OTC lending. docs - * +-----------------------+------------+ | Extra API Info | Value | - * +-----------------------+------------+ | API-DOMAIN | SPOT | | API-CHANNEL | PRIVATE | | - * API-PERMISSION | SPOT | | API-RATE-LIMIT-POOL | MANAGEMENT | | API-RATE-LIMIT-WEIGHT | 20 | - * +-----------------------+------------+ + * Get Accounts + * + *

Accounts participating in OTC lending. This interface is only for querying accounts + * currently running OTC lending. + * + *

Extra API Info: + * + *

    + *
  • API-DOMAIN : SPOT + *
  • API-CHANNEL : PRIVATE + *
  • API-PERMISSION : SPOT + *
  • API-RATE-LIMIT-POOL : MANAGEMENT + *
  • API-RATE-LIMIT-WEIGHT : 20 + *
+ * + * @see docs */ GetAccountsResp getAccounts(); } From 3f7185361e084dbf993bda3938df759656e413ed Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Fri, 4 Jul 2025 14:46:42 +0800 Subject: [PATCH 11/39] feat(api): add @Deprecated support --- .../src/main/resources/java-sdk/api.mustache | 4 +- .../sdk/plugin/SdkGeneratorTest.java | 2 +- .../generate/account/account/AccountApi.java | 6 +-- .../generate/account/deposit/DepositApi.java | 8 ++-- .../account/subaccount/SubAccountApi.java | 4 +- .../account/transfer/TransferApi.java | 10 ++--- .../account/withdrawal/WithdrawalApi.java | 4 +- .../sdk/generate/futures/order/OrderApi.java | 2 +- .../futures/positions/PositionsApi.java | 2 +- .../sdk/generate/margin/order/OrderApi.java | 4 +- .../sdk/generate/spot/order/OrderApi.java | 44 +++++++++---------- 11 files changed, 45 insertions(+), 45 deletions(-) diff --git a/generator/plugin/src/main/resources/java-sdk/api.mustache b/generator/plugin/src/main/resources/java-sdk/api.mustache index 2dea6a82..2442181d 100644 --- a/generator/plugin/src/main/resources/java-sdk/api.mustache +++ b/generator/plugin/src/main/resources/java-sdk/api.mustache @@ -18,9 +18,9 @@ public interface {{classname}} { * * * @see docs - * {{#isDeprecated}} - * @deprecated{{/isDeprecated}} */ + {{#isDeprecated}} + @Deprecated{{/isDeprecated}} {{vendorExtensions.x-meta.methodServiceFmt}}Resp {{vendorExtensions.x-meta.method}}({{#hasParams}}{{vendorExtensions.x-meta.methodServiceFmt}}Req req{{/hasParams}}); {{/operation}} diff --git a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java index 2107567b..4228e3bb 100644 --- a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java +++ b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java @@ -8,7 +8,7 @@ public class SdkGeneratorTest { private static final String SDK_NAME = "java-sdk"; - private static final String SPEC_NAME = "../../spec/rest/api/openapi-spot-market.json"; + private static final String SPEC_NAME = "../../spec/rest/api/openapi-spot-order.json"; private static final String SPEC_ENTRY_NAME = "../../spec/rest/entry/openapi-broker.json"; private static final String WS_SPEC_NAME = "../../spec/ws/openapi-spot-public.json"; private static final String OUTPUT_DIR = "../../sdk/java/src/main/java/com/kucoin/universal/sdk/generate"; diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.java index 75edadef..3a409c87 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.java @@ -256,8 +256,8 @@ public interface AccountApi { * * * @see docs - * @deprecated */ + @Deprecated GetMarginAccountDetailResp getMarginAccountDetail(); /** @@ -276,8 +276,8 @@ public interface AccountApi { * * * @see docs - * @deprecated */ + @Deprecated GetIsolatedMarginAccountListV1Resp getIsolatedMarginAccountListV1( GetIsolatedMarginAccountListV1Req req); @@ -297,8 +297,8 @@ GetIsolatedMarginAccountListV1Resp getIsolatedMarginAccountListV1( * * * @see docs - * @deprecated */ + @Deprecated GetIsolatedMarginAccountDetailV1Resp getIsolatedMarginAccountDetailV1( GetIsolatedMarginAccountDetailV1Req req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.java index 30a22573..fb8bebab 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.java @@ -80,8 +80,8 @@ public interface DepositApi { * * * @see docs - * @deprecated */ + @Deprecated GetDepositAddressV2Resp getDepositAddressV2(GetDepositAddressV2Req req); /** @@ -101,8 +101,8 @@ public interface DepositApi { * * * @see docs - * @deprecated */ + @Deprecated GetDepositAddressV1Resp getDepositAddressV1(GetDepositAddressV1Req req); /** @@ -122,8 +122,8 @@ public interface DepositApi { * * * @see docs - * @deprecated */ + @Deprecated GetDepositHistoryOldResp getDepositHistoryOld(GetDepositHistoryOldReq req); /** @@ -143,7 +143,7 @@ public interface DepositApi { * * * @see docs - * @deprecated */ + @Deprecated AddDepositAddressV1Resp addDepositAddressV1(AddDepositAddressV1Req req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.java index 43fdbed1..d9269364 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.java @@ -237,8 +237,8 @@ AddSubAccountFuturesPermissionResp addSubAccountFuturesPermission( * * * @see docs - * @deprecated */ + @Deprecated GetSpotSubAccountsSummaryV1Resp getSpotSubAccountsSummaryV1(); /** @@ -257,7 +257,7 @@ AddSubAccountFuturesPermissionResp addSubAccountFuturesPermission( * * * @see docs - * @deprecated */ + @Deprecated GetSpotSubAccountListV1Resp getSpotSubAccountListV1(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.java index 2d660263..bf81b1a7 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.java @@ -61,8 +61,8 @@ public interface TransferApi { * * * @see docs - * @deprecated */ + @Deprecated SubAccountTransferResp subAccountTransfer(SubAccountTransferReq req); /** @@ -82,8 +82,8 @@ public interface TransferApi { * * * @see docs - * @deprecated */ + @Deprecated InnerTransferResp innerTransfer(InnerTransferReq req); /** @@ -102,8 +102,8 @@ public interface TransferApi { * * * @see docs - * @deprecated */ + @Deprecated GetFuturesAccountTransferOutLedgerResp getFuturesAccountTransferOutLedger( GetFuturesAccountTransferOutLedgerReq req); @@ -124,8 +124,8 @@ GetFuturesAccountTransferOutLedgerResp getFuturesAccountTransferOutLedger( * * * @see docs - * @deprecated */ + @Deprecated FuturesAccountTransferOutResp futuresAccountTransferOut(FuturesAccountTransferOutReq req); /** @@ -145,7 +145,7 @@ GetFuturesAccountTransferOutLedgerResp getFuturesAccountTransferOutLedger( * * * @see docs - * @deprecated */ + @Deprecated FuturesAccountTransferInResp futuresAccountTransferIn(FuturesAccountTransferInReq req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.java index 2aa63c42..fda7c5e9 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.java @@ -118,8 +118,8 @@ public interface WithdrawalApi { * * * @see docs - * @deprecated */ + @Deprecated GetWithdrawalHistoryOldResp getWithdrawalHistoryOld(GetWithdrawalHistoryOldReq req); /** @@ -138,7 +138,7 @@ public interface WithdrawalApi { * * * @see docs - * @deprecated */ + @Deprecated WithdrawalV1Resp withdrawalV1(WithdrawalV1Req req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.java index e8580bb3..dab1e7c7 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.java @@ -359,7 +359,7 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated CancelAllOrdersV1Resp cancelAllOrdersV1(CancelAllOrdersV1Req req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.java index 5e7e424a..843d4685 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.java @@ -309,7 +309,7 @@ ModifyIsolatedMarginRiskLimtResp modifyIsolatedMarginRiskLimt( * * * @see docs - * @deprecated */ + @Deprecated ModifyAutoDepositStatusResp modifyAutoDepositStatus(ModifyAutoDepositStatusReq req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.java index 7956a613..5c1d2c89 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.java @@ -260,8 +260,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated AddOrderV1Resp addOrderV1(AddOrderV1Req req); /** @@ -283,7 +283,7 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated AddOrderTestV1Resp addOrderTestV1(AddOrderTestV1Req req); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.java index 9f8d08a9..2b64c5cf 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.java @@ -494,8 +494,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated AddStopOrderResp addStopOrder(AddStopOrderReq req); /** @@ -514,8 +514,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated CancelStopOrderByClientOidResp cancelStopOrderByClientOid(CancelStopOrderByClientOidReq req); /** @@ -534,8 +534,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated CancelStopOrderByOrderIdResp cancelStopOrderByOrderId(CancelStopOrderByOrderIdReq req); /** @@ -630,8 +630,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated AddOcoOrderResp addOcoOrder(AddOcoOrderReq req); /** @@ -652,8 +652,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated CancelOcoOrderByOrderIdResp cancelOcoOrderByOrderId(CancelOcoOrderByOrderIdReq req); /** @@ -676,8 +676,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated CancelOcoOrderByClientOidResp cancelOcoOrderByClientOid(CancelOcoOrderByClientOidReq req); /** @@ -700,8 +700,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated BatchCancelOcoOrdersResp batchCancelOcoOrders(BatchCancelOcoOrdersReq req); /** @@ -720,8 +720,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated GetOcoOrderByOrderIdResp getOcoOrderByOrderId(GetOcoOrderByOrderIdReq req); /** @@ -740,8 +740,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated GetOcoOrderByClientOidResp getOcoOrderByClientOid(GetOcoOrderByClientOidReq req); /** @@ -760,8 +760,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated GetOcoOrderDetailByOrderIdResp getOcoOrderDetailByOrderId(GetOcoOrderDetailByOrderIdReq req); /** @@ -782,8 +782,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated GetOcoOrderListResp getOcoOrderList(GetOcoOrderListReq req); /** @@ -805,8 +805,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated AddOrderOldResp addOrderOld(AddOrderOldReq req); /** @@ -828,8 +828,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated AddOrderTestOldResp addOrderTestOld(AddOrderTestOldReq req); /** @@ -849,8 +849,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated BatchAddOrdersOldResp batchAddOrdersOld(BatchAddOrdersOldReq req); /** @@ -871,8 +871,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated CancelOrderByOrderIdOldResp cancelOrderByOrderIdOld(CancelOrderByOrderIdOldReq req); /** @@ -913,8 +913,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated BatchCancelOrderOldResp batchCancelOrderOld(BatchCancelOrderOldReq req); /** @@ -934,8 +934,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated GetOrdersListOldResp getOrdersListOld(GetOrdersListOldReq req); /** @@ -955,8 +955,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated GetRecentOrdersListOldResp getRecentOrdersListOld(); /** @@ -975,8 +975,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated GetOrderByOrderIdOldResp getOrderByOrderIdOld(GetOrderByOrderIdOldReq req); /** @@ -997,8 +997,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated GetOrderByClientOidOldResp getOrderByClientOidOld(GetOrderByClientOidOldReq req); /** @@ -1018,8 +1018,8 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated GetTradeHistoryOldResp getTradeHistoryOld(GetTradeHistoryOldReq req); /** @@ -1039,7 +1039,7 @@ public interface OrderApi { * * * @see docs - * @deprecated */ + @Deprecated GetRecentTradeHistoryOldResp getRecentTradeHistoryOld(); } From 1af35acf31e833602d27699ef35ad8dbe20f93ef Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Fri, 4 Jul 2025 16:28:16 +0800 Subject: [PATCH 12/39] feat(java): add test support --- .../plugin/generator/JavaSdkGenerator.java | 14 +- .../main/resources/java-sdk/api_test.mustache | 4 + .../sdk/plugin/SdkGeneratorTest.java | 2 +- sdk/java/.gitignore | 3 +- sdk/java/Dockerfile | 10 + sdk/java/script/auto_test.sh | 56 + .../account/AccountApiAutoGeneratedTest.java | 575 ++--- .../deposit/DepositApiAutoGeneratedTest.java | 196 +- .../account/fee/FeeApiAutoGeneratedTest.java | 26 +- .../SubAccountApiAutoGeneratedTest.java | 712 +++---- .../TransferApiAutoGeneratedTest.java | 105 +- .../WithdrawalApiAutoGeneratedTest.java | 216 +- .../AffiliateApiAutoGeneratedTest.java | 62 +- .../APIBrokerApiAutoGeneratedTest.java | 20 +- .../NDBrokerApiAutoGeneratedTest.java | 478 +++-- .../futures/FuturesApiAutoGeneratedTest.java | 221 +- .../earn/earn/EarnApiAutoGeneratedTest.java | 425 ++-- .../FundingFeesApiAutoGeneratedTest.java | 782 +++---- .../FuturesPrivateWsAutoGeneratedTest.java | 16 +- .../FuturesPublicWsAutoGeneratedTest.java | 20 +- .../market/MarketApiAutoGeneratedTest.java | 925 ++++---- .../order/OrderApiAutoGeneratedTest.java | 1093 +++++----- .../PositionsApiAutoGeneratedTest.java | 826 ++++---- .../credit/CreditApiAutoGeneratedTest.java | 188 +- .../debit/DebitApiAutoGeneratedTest.java | 99 +- .../MarginPrivateWsAutoGeneratedTest.java | 4 +- .../MarginPublicWsAutoGeneratedTest.java | 4 +- .../market/MarketApiAutoGeneratedTest.java | 536 ++--- .../order/OrderApiAutoGeneratedTest.java | 552 +++-- .../RiskLimitApiAutoGeneratedTest.java | 44 +- .../market/MarketApiAutoGeneratedTest.java | 932 ++++---- .../spot/order/OrderApiAutoGeneratedTest.java | 1865 ++++++++--------- .../SpotPrivateWsAutoGeneratedTest.java | 8 +- .../SpotPublicWsAutoGeneratedTest.java | 26 +- .../VIPLendingApiAutoGeneratedTest.java | 144 +- .../universal/sdk/model/RestResponse.java | 2 + .../kucoin/universal/sdk/model/WsMessage.java | 4 +- 37 files changed, 5628 insertions(+), 5567 deletions(-) create mode 100644 sdk/java/Dockerfile create mode 100644 sdk/java/script/auto_test.sh diff --git a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java index 11099f9f..4cf43b9c 100644 --- a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java +++ b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java @@ -186,7 +186,7 @@ public CodegenProperty fromProperty(String name, Schema p, boolean required) { String enumDataType = "String"; if (realEnumProp.isString) { - enumDataType= "String"; + enumDataType = "String"; } else { enumDataType = "Integer"; } @@ -353,7 +353,7 @@ public ModelsMap postProcessModels(ModelsMap objs) { if (modeSwitch.isWs()) { imports.add("import com.kucoin.universal.sdk.model.WsMessage;"); imports.add("import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback;"); - } else { + } else { imports.add("import com.kucoin.universal.sdk.model.RestResponse;"); } @@ -401,7 +401,6 @@ public ModelsMap postProcessModels(ModelsMap objs) { } - @Override public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); @@ -415,14 +414,17 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List failedTests = new ArrayList<>(); + private static int totalTest = 0; + {{#operations}} {{#operation}} /** @@ -52,6 +54,7 @@ class {{classname}}AutoGeneratedTest{ private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -73,6 +76,7 @@ class {{classname}}AutoGeneratedTest{ } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java index 4228e3bb..2107567b 100644 --- a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java +++ b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java @@ -8,7 +8,7 @@ public class SdkGeneratorTest { private static final String SDK_NAME = "java-sdk"; - private static final String SPEC_NAME = "../../spec/rest/api/openapi-spot-order.json"; + private static final String SPEC_NAME = "../../spec/rest/api/openapi-spot-market.json"; private static final String SPEC_ENTRY_NAME = "../../spec/rest/entry/openapi-broker.json"; private static final String WS_SPEC_NAME = "../../spec/ws/openapi-spot-public.json"; private static final String OUTPUT_DIR = "../../sdk/java/src/main/java/com/kucoin/universal/sdk/generate"; diff --git a/sdk/java/.gitignore b/sdk/java/.gitignore index 5ff6309b..e6371154 100644 --- a/sdk/java/.gitignore +++ b/sdk/java/.gitignore @@ -35,4 +35,5 @@ build/ .vscode/ ### Mac OS ### -.DS_Store \ No newline at end of file +.DS_Store +/auto-tests.detail.log diff --git a/sdk/java/Dockerfile b/sdk/java/Dockerfile new file mode 100644 index 00000000..6490d473 --- /dev/null +++ b/sdk/java/Dockerfile @@ -0,0 +1,10 @@ +FROM maven:3.9.10-amazoncorretto-17-debian-bookworm AS builder +WORKDIR /src +COPY . . +RUN --mount=type=cache,target=/root/.m2,sharing=locked mvn clean install -DskipTests + +FROM maven:3.9.10-amazoncorretto-17-debian-bookworm +WORKDIR /app +COPY . /src +COPY script /app +COPY --from=builder /src/target/*.jar /tmp/ \ No newline at end of file diff --git a/sdk/java/script/auto_test.sh b/sdk/java/script/auto_test.sh new file mode 100644 index 00000000..4eb4e784 --- /dev/null +++ b/sdk/java/script/auto_test.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +set -euo pipefail + +cd .. + +LOG_FILE="auto-tests.detail.log" +: > "$LOG_FILE" + +mvn -q -DskipTests compile \ + dependency:build-classpath -Dmdep.outputFile=target/autotest.cp +runtime_cp="target/classes:$(cat target/autotest.cp)" + +printf "%-40s | %-10s | %-10s | %-10s\n" \ + "TestClass" "Total" "Success" "Fail" +printf "%-40s-+-%-10s-+-%-10s-+-%-10s\n" \ +"----------------------------------------" "----------" "----------" "----------" + + +overall_total=0 +overall_fail=0 + +for class_file in $(find target/classes/com/kucoin/universal/sdk/generate \ + -type f -name '*AutoGeneratedTest.class' | sort); do + fqcn=${class_file#target/classes/} + fqcn=${fqcn%.class} + fqcn=${fqcn//\//.} + simple=$(basename "$class_file" .class) + + out=$(java -cp "$runtime_cp" "$fqcn" 2>&1 | tee -a "$LOG_FILE" || true) + summary=$(grep -E 'Test total:' <<< "$out" || true) + + if [[ -n $summary ]]; then + total=$(grep -oE 'total:[[:space:]]*[0-9]+' <<< "$summary" | grep -oE '[0-9]+') + fail=$( grep -oE 'failed:[[:space:]]*[0-9]+' <<< "$summary" | grep -oE '[0-9]+') + fail=${fail:-0} + else + total=0 + fail=0 + fi + + success=$((total - fail)) + printf "%-40s | %-10d | %-10d | %-10d\n" \ + "$simple" "$total" "$success" "$fail" + + overall_total=$((overall_total + total)) + overall_fail=$((overall_fail + fail)) +done + +overall_success=$((overall_total - overall_fail)) + +printf "%-40s-+-%-10s-+-%-10s-+-%-10s\n" \ + "----------------------------------------" "----------" "----------" "----------" +printf "%-40s | %-10d | %-10d | %-10d\n" \ + "Overall Summary" "$overall_total" "$overall_success" "$overall_fail" + +exit "$overall_fail" diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiAutoGeneratedTest.java index 7e4e5975..f5489520 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiAutoGeneratedTest.java @@ -11,6 +11,8 @@ class AccountApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** getAccountInfo Request Get Account Summary Info /api/v2/user-info */ public static void testGetAccountInfoRequest() throws Exception { // $this->assertTrue(true); @@ -19,22 +21,22 @@ public static void testGetAccountInfoRequest() throws Exception { /** getAccountInfo Response Get Account Summary Info /api/v2/user-info */ public static void testGetAccountInfoResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"level\\\": 0,\\n" - + " \\\"subQuantity\\\": 3,\\n" - + " \\\"spotSubQuantity\\\": 3,\\n" - + " \\\"marginSubQuantity\\\": 2,\\n" - + " \\\"futuresSubQuantity\\\": 2,\\n" - + " \\\"optionSubQuantity\\\": 0,\\n" - + " \\\"maxSubQuantity\\\": 5,\\n" - + " \\\"maxDefaultSubQuantity\\\": 5,\\n" - + " \\\"maxSpotSubQuantity\\\": 0,\\n" - + " \\\"maxMarginSubQuantity\\\": 0,\\n" - + " \\\"maxFuturesSubQuantity\\\": 0,\\n" - + " \\\"maxOptionSubQuantity\\\": 0\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"level\": 0,\n" + + " \"subQuantity\": 3,\n" + + " \"spotSubQuantity\": 3,\n" + + " \"marginSubQuantity\": 2,\n" + + " \"futuresSubQuantity\": 2,\n" + + " \"optionSubQuantity\": 0,\n" + + " \"maxSubQuantity\": 5,\n" + + " \"maxDefaultSubQuantity\": 5,\n" + + " \"maxSpotSubQuantity\": 0,\n" + + " \"maxMarginSubQuantity\": 0,\n" + + " \"maxFuturesSubQuantity\": 0,\n" + + " \"maxOptionSubQuantity\": 0\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -48,19 +50,19 @@ public static void testGetApikeyInfoRequest() throws Exception { /** getApikeyInfo Response Get Apikey Info /api/v1/user/api-key */ public static void testGetApikeyInfoResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"remark\\\": \\\"account1\\\",\\n" - + " \\\"apiKey\\\": \\\"6705f5c311545b000157d3eb\\\",\\n" - + " \\\"apiVersion\\\": 3,\\n" - + " \\\"permission\\\":" - + " \\\"General,Futures,Spot,Earn,InnerTransfer,Transfer,Margin\\\",\\n" - + " \\\"ipWhitelist\\\": \\\"203.**.154,103.**.34\\\",\\n" - + " \\\"createdAt\\\": 1728443843000,\\n" - + " \\\"uid\\\": 165111215,\\n" - + " \\\"isMaster\\\": true\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"remark\": \"account1\",\n" + + " \"apiKey\": \"6705f5c311545b000157d3eb\",\n" + + " \"apiVersion\": 3,\n" + + " \"permission\":" + + " \"General,Futures,Spot,Earn,InnerTransfer,Transfer,Margin\",\n" + + " \"ipWhitelist\": \"203.**.154,103.**.34\",\n" + + " \"createdAt\": 1728443843000,\n" + + " \"uid\": 165111215,\n" + + " \"isMaster\": true\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -73,40 +75,40 @@ public static void testGetSpotAccountTypeRequest() throws Exception { /** getSpotAccountType Response Get Account Type - Spot /api/v1/hf/accounts/opened */ public static void testGetSpotAccountTypeResponse() throws Exception { - String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":false}"; + String data = "{\"code\":\"200000\",\"data\":false}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** getSpotAccountList Request Get Account List - Spot /api/v1/accounts */ public static void testGetSpotAccountListRequest() throws Exception { - String data = "{\\\"currency\\\": \\\"USDT\\\", \\\"type\\\": \\\"main\\\"}"; + String data = "{\"currency\": \"USDT\", \"type\": \"main\"}"; GetSpotAccountListReq obj = mapper.readValue(data, GetSpotAccountListReq.class); } /** getSpotAccountList Response Get Account List - Spot /api/v1/accounts */ public static void testGetSpotAccountListResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"548674591753\\\",\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"type\\\": \\\"trade\\\",\\n" - + " \\\"balance\\\": \\\"26.66759503\\\",\\n" - + " \\\"available\\\": \\\"26.66759503\\\",\\n" - + " \\\"holds\\\": \\\"0\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"id\\\": \\\"63355cd156298d0001b66e61\\\",\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"type\\\": \\\"main\\\",\\n" - + " \\\"balance\\\": \\\"0.01\\\",\\n" - + " \\\"available\\\": \\\"0.01\\\",\\n" - + " \\\"holds\\\": \\\"0\\\"\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"548674591753\",\n" + + " \"currency\": \"USDT\",\n" + + " \"type\": \"trade\",\n" + + " \"balance\": \"26.66759503\",\n" + + " \"available\": \"26.66759503\",\n" + + " \"holds\": \"0\"\n" + + " },\n" + + " {\n" + + " \"id\": \"63355cd156298d0001b66e61\",\n" + + " \"currency\": \"USDT\",\n" + + " \"type\": \"main\",\n" + + " \"balance\": \"0.01\",\n" + + " \"available\": \"0.01\",\n" + + " \"holds\": \"0\"\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -114,49 +116,49 @@ public static void testGetSpotAccountListResponse() throws Exception { /** getSpotAccountDetail Request Get Account Detail - Spot /api/v1/accounts/{accountId} */ public static void testGetSpotAccountDetailRequest() throws Exception { - String data = "{\\\"accountId\\\": \\\"548674591753\\\"}"; + String data = "{\"accountId\": \"548674591753\"}"; GetSpotAccountDetailReq obj = mapper.readValue(data, GetSpotAccountDetailReq.class); } /** getSpotAccountDetail Response Get Account Detail - Spot /api/v1/accounts/{accountId} */ public static void testGetSpotAccountDetailResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"currency\\\":\\\"USDT\\\",\\\"balance\\\":\\\"26.66759503\\\",\\\"available\\\":\\\"26.66759503\\\",\\\"holds\\\":\\\"0\\\"}}"; + "{\"code\":\"200000\",\"data\":{\"currency\":\"USDT\",\"balance\":\"26.66759503\",\"available\":\"26.66759503\",\"holds\":\"0\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** getCrossMarginAccount Request Get Account - Cross Margin /api/v3/margin/accounts */ public static void testGetCrossMarginAccountRequest() throws Exception { - String data = "{\\\"quoteCurrency\\\": \\\"USDT\\\", \\\"queryType\\\": \\\"MARGIN\\\"}"; + String data = "{\"quoteCurrency\": \"USDT\", \"queryType\": \"MARGIN\"}"; GetCrossMarginAccountReq obj = mapper.readValue(data, GetCrossMarginAccountReq.class); } /** getCrossMarginAccount Response Get Account - Cross Margin /api/v3/margin/accounts */ public static void testGetCrossMarginAccountResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"totalAssetOfQuoteCurrency\\\": \\\"40.8648372\\\",\\n" - + " \\\"totalLiabilityOfQuoteCurrency\\\": \\\"0\\\",\\n" - + " \\\"debtRatio\\\": \\\"0\\\",\\n" - + " \\\"status\\\": \\\"EFFECTIVE\\\",\\n" - + " \\\"accounts\\\": [\\n" - + " {\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"total\\\": \\\"38.68855864\\\",\\n" - + " \\\"available\\\": \\\"20.01916691\\\",\\n" - + " \\\"hold\\\": \\\"18.66939173\\\",\\n" - + " \\\"liability\\\": \\\"0\\\",\\n" - + " \\\"liabilityPrincipal\\\": \\\"0\\\",\\n" - + " \\\"liabilityInterest\\\": \\\"0\\\",\\n" - + " \\\"maxBorrowSize\\\": \\\"163\\\",\\n" - + " \\\"borrowEnabled\\\": true,\\n" - + " \\\"transferInEnabled\\\": true\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"totalAssetOfQuoteCurrency\": \"40.8648372\",\n" + + " \"totalLiabilityOfQuoteCurrency\": \"0\",\n" + + " \"debtRatio\": \"0\",\n" + + " \"status\": \"EFFECTIVE\",\n" + + " \"accounts\": [\n" + + " {\n" + + " \"currency\": \"USDT\",\n" + + " \"total\": \"38.68855864\",\n" + + " \"available\": \"20.01916691\",\n" + + " \"hold\": \"18.66939173\",\n" + + " \"liability\": \"0\",\n" + + " \"liabilityPrincipal\": \"0\",\n" + + " \"liabilityInterest\": \"0\",\n" + + " \"maxBorrowSize\": \"163\",\n" + + " \"borrowEnabled\": true,\n" + + " \"transferInEnabled\": true\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -165,52 +167,51 @@ public static void testGetCrossMarginAccountResponse() throws Exception { /** getIsolatedMarginAccount Request Get Account - Isolated Margin /api/v3/isolated/accounts */ public static void testGetIsolatedMarginAccountRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"quoteCurrency\\\": \\\"USDT\\\", \\\"queryType\\\":" - + " \\\"ISOLATED\\\"}"; + "{\"symbol\": \"BTC-USDT\", \"quoteCurrency\": \"USDT\", \"queryType\": \"ISOLATED\"}"; GetIsolatedMarginAccountReq obj = mapper.readValue(data, GetIsolatedMarginAccountReq.class); } /** getIsolatedMarginAccount Response Get Account - Isolated Margin /api/v3/isolated/accounts */ public static void testGetIsolatedMarginAccountResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"totalAssetOfQuoteCurrency\\\": \\\"4.97047372\\\",\\n" - + " \\\"totalLiabilityOfQuoteCurrency\\\": \\\"0.00038891\\\",\\n" - + " \\\"timestamp\\\": 1747303659773,\\n" - + " \\\"assets\\\": [\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"status\\\": \\\"EFFECTIVE\\\",\\n" - + " \\\"debtRatio\\\": \\\"0\\\",\\n" - + " \\\"baseAsset\\\": {\\n" - + " \\\"currency\\\": \\\"BTC\\\",\\n" - + " \\\"borrowEnabled\\\": true,\\n" - + " \\\"transferInEnabled\\\": true,\\n" - + " \\\"liability\\\": \\\"0\\\",\\n" - + " \\\"liabilityPrincipal\\\": \\\"0\\\",\\n" - + " \\\"liabilityInterest\\\": \\\"0\\\",\\n" - + " \\\"total\\\": \\\"0\\\",\\n" - + " \\\"available\\\": \\\"0\\\",\\n" - + " \\\"hold\\\": \\\"0\\\",\\n" - + " \\\"maxBorrowSize\\\": \\\"0\\\"\\n" - + " },\\n" - + " \\\"quoteAsset\\\": {\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"borrowEnabled\\\": true,\\n" - + " \\\"transferInEnabled\\\": true,\\n" - + " \\\"liability\\\": \\\"0.00038891\\\",\\n" - + " \\\"liabilityPrincipal\\\": \\\"0.00038888\\\",\\n" - + " \\\"liabilityInterest\\\": \\\"0.00000003\\\",\\n" - + " \\\"total\\\": \\\"4.97047372\\\",\\n" - + " \\\"available\\\": \\\"4.97047372\\\",\\n" - + " \\\"hold\\\": \\\"0\\\",\\n" - + " \\\"maxBorrowSize\\\": \\\"44\\\"\\n" - + " }\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"totalAssetOfQuoteCurrency\": \"4.97047372\",\n" + + " \"totalLiabilityOfQuoteCurrency\": \"0.00038891\",\n" + + " \"timestamp\": 1747303659773,\n" + + " \"assets\": [\n" + + " {\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"status\": \"EFFECTIVE\",\n" + + " \"debtRatio\": \"0\",\n" + + " \"baseAsset\": {\n" + + " \"currency\": \"BTC\",\n" + + " \"borrowEnabled\": true,\n" + + " \"transferInEnabled\": true,\n" + + " \"liability\": \"0\",\n" + + " \"liabilityPrincipal\": \"0\",\n" + + " \"liabilityInterest\": \"0\",\n" + + " \"total\": \"0\",\n" + + " \"available\": \"0\",\n" + + " \"hold\": \"0\",\n" + + " \"maxBorrowSize\": \"0\"\n" + + " },\n" + + " \"quoteAsset\": {\n" + + " \"currency\": \"USDT\",\n" + + " \"borrowEnabled\": true,\n" + + " \"transferInEnabled\": true,\n" + + " \"liability\": \"0.00038891\",\n" + + " \"liabilityPrincipal\": \"0.00038888\",\n" + + " \"liabilityInterest\": \"0.00000003\",\n" + + " \"total\": \"4.97047372\",\n" + + " \"available\": \"4.97047372\",\n" + + " \"hold\": \"0\",\n" + + " \"maxBorrowSize\": \"44\"\n" + + " }\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -218,27 +219,27 @@ public static void testGetIsolatedMarginAccountResponse() throws Exception { /** getFuturesAccount Request Get Account - Futures /api/v1/account-overview */ public static void testGetFuturesAccountRequest() throws Exception { - String data = "{\\\"currency\\\": \\\"USDT\\\"}"; + String data = "{\"currency\": \"USDT\"}"; GetFuturesAccountReq obj = mapper.readValue(data, GetFuturesAccountReq.class); } /** getFuturesAccount Response Get Account - Futures /api/v1/account-overview */ public static void testGetFuturesAccountResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -247,37 +248,36 @@ public static void testGetFuturesAccountResponse() throws Exception { /** getSpotLedger Request Get Account Ledgers - Spot/Margin /api/v1/accounts/ledgers */ public static void testGetSpotLedgerRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"BTC\\\", \\\"direction\\\": \\\"in\\\", \\\"bizType\\\":" - + " \\\"TRANSFER\\\", \\\"startAt\\\": 1728663338000, \\\"endAt\\\": 1728692138000," - + " \\\"currentPage\\\": 1, \\\"pageSize\\\": 50}"; + "{\"currency\": \"BTC\", \"direction\": \"in\", \"bizType\": \"TRANSFER\", \"startAt\":" + + " 1728663338000, \"endAt\": 1728692138000, \"currentPage\": 1, \"pageSize\": 50}"; GetSpotLedgerReq obj = mapper.readValue(data, GetSpotLedgerReq.class); } /** getSpotLedger Response Get Account Ledgers - Spot/Margin /api/v1/accounts/ledgers */ public static void testGetSpotLedgerResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"currentPage\\\": 1,\\n" - + " \\\"pageSize\\\": 50,\\n" - + " \\\"totalNum\\\": 1,\\n" - + " \\\"totalPage\\\": 1,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"265329987780896\\\",\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"amount\\\": \\\"0.01\\\",\\n" - + " \\\"fee\\\": \\\"0\\\",\\n" - + " \\\"balance\\\": \\\"0\\\",\\n" - + " \\\"accountType\\\": \\\"TRADE\\\",\\n" - + " \\\"bizType\\\": \\\"SUB_TRANSFER\\\",\\n" - + " \\\"direction\\\": \\\"out\\\",\\n" - + " \\\"createdAt\\\": 1728658481484,\\n" - + " \\\"context\\\": \\\"\\\"\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 1,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"id\": \"265329987780896\",\n" + + " \"currency\": \"USDT\",\n" + + " \"amount\": \"0.01\",\n" + + " \"fee\": \"0\",\n" + + " \"balance\": \"0\",\n" + + " \"accountType\": \"TRADE\",\n" + + " \"bizType\": \"SUB_TRANSFER\",\n" + + " \"direction\": \"out\",\n" + + " \"createdAt\": 1728658481484,\n" + + " \"context\": \"\"\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -286,33 +286,33 @@ public static void testGetSpotLedgerResponse() throws Exception { /** getSpotHFLedger Request Get Account Ledgers - Trade_hf /api/v1/hf/accounts/ledgers */ public static void testGetSpotHFLedgerRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"BTC\\\", \\\"direction\\\": \\\"in\\\", \\\"bizType\\\":" - + " \\\"TRANSFER\\\", \\\"lastId\\\": 254062248624417, \\\"limit\\\": 100," - + " \\\"startAt\\\": 1728663338000, \\\"endAt\\\": 1728692138000}"; + "{\"currency\": \"BTC\", \"direction\": \"in\", \"bizType\": \"TRANSFER\", \"lastId\":" + + " 254062248624417, \"limit\": 100, \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000}"; GetSpotHFLedgerReq obj = mapper.readValue(data, GetSpotHFLedgerReq.class); } /** getSpotHFLedger Response Get Account Ledgers - Trade_hf /api/v1/hf/accounts/ledgers */ public static void testGetSpotHFLedgerResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"254062248624417\\\",\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"amount\\\": \\\"1.59760080\\\",\\n" - + " \\\"fee\\\": \\\"0.00159920\\\",\\n" - + " \\\"tax\\\": \\\"0\\\",\\n" - + " \\\"balance\\\": \\\"26.73759503\\\",\\n" - + " \\\"accountType\\\": \\\"TRADE_HF\\\",\\n" - + " \\\"bizType\\\": \\\"TRADE_EXCHANGE\\\",\\n" - + " \\\"direction\\\": \\\"in\\\",\\n" - + " \\\"createdAt\\\": \\\"1728443957539\\\",\\n" - + " \\\"context\\\":" - + " \\\"{\\\\\\\"symbol\\\\\\\":\\\\\\\"KCS-USDT\\\\\\\",\\\\\\\"orderId\\\\\\\":\\\\\\\"6705f6350dc7210007d6a36d\\\\\\\",\\\\\\\"tradeId\\\\\\\":\\\\\\\"10046097631627265\\\\\\\"}\\\"\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"254062248624417\",\n" + + " \"currency\": \"USDT\",\n" + + " \"amount\": \"1.59760080\",\n" + + " \"fee\": \"0.00159920\",\n" + + " \"tax\": \"0\",\n" + + " \"balance\": \"26.73759503\",\n" + + " \"accountType\": \"TRADE_HF\",\n" + + " \"bizType\": \"TRADE_EXCHANGE\",\n" + + " \"direction\": \"in\",\n" + + " \"createdAt\": \"1728443957539\",\n" + + " \"context\":" + + " \"{\\\"symbol\\\":\\\"KCS-USDT\\\",\\\"orderId\\\":\\\"6705f6350dc7210007d6a36d\\\",\\\"tradeId\\\":\\\"10046097631627265\\\"}\"\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -321,9 +321,9 @@ public static void testGetSpotHFLedgerResponse() throws Exception { /** getMarginHFLedger Request Get Account Ledgers - Margin_hf /api/v3/hf/margin/account/ledgers */ public static void testGetMarginHFLedgerRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"BTC\\\", \\\"direction\\\": \\\"in\\\", \\\"bizType\\\":" - + " \\\"TRANSFER\\\", \\\"lastId\\\": 254062248624417, \\\"limit\\\": 100," - + " \\\"startAt\\\": 1728663338000, \\\"endAt\\\": 1728692138000}"; + "{\"currency\": \"BTC\", \"direction\": \"in\", \"bizType\": \"TRANSFER\", \"lastId\":" + + " 254062248624417, \"limit\": 100, \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000}"; GetMarginHFLedgerReq obj = mapper.readValue(data, GetMarginHFLedgerReq.class); } @@ -332,7 +332,7 @@ public static void testGetMarginHFLedgerRequest() throws Exception { */ public static void testGetMarginHFLedgerResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":[{\\\"id\\\":1949641706720,\\\"currency\\\":\\\"USDT\\\",\\\"amount\\\":\\\"0.01000000\\\",\\\"fee\\\":\\\"0.00000000\\\",\\\"balance\\\":\\\"0.01000000\\\",\\\"accountType\\\":\\\"MARGIN_V2\\\",\\\"bizType\\\":\\\"TRANSFER\\\",\\\"direction\\\":\\\"in\\\",\\\"createdAt\\\":1728664091208,\\\"context\\\":\\\"{}\\\",\\\"tax\\\":\\\"0.00000000\\\"}]}"; + "{\"code\":\"200000\",\"data\":[{\"id\":1949641706720,\"currency\":\"USDT\",\"amount\":\"0.01000000\",\"fee\":\"0.00000000\",\"balance\":\"0.01000000\",\"accountType\":\"MARGIN_V2\",\"bizType\":\"TRANSFER\",\"direction\":\"in\",\"createdAt\":1728664091208,\"context\":\"{}\",\"tax\":\"0.00000000\"}]}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -340,45 +340,44 @@ public static void testGetMarginHFLedgerResponse() throws Exception { /** getFuturesLedger Request Get Account Ledgers - Futures /api/v1/transaction-history */ public static void testGetFuturesLedgerRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"XBT\\\", \\\"type\\\": \\\"Transferin\\\", \\\"offset\\\":" - + " 254062248624417, \\\"forward\\\": true, \\\"maxCount\\\": 50, \\\"startAt\\\":" - + " 1728663338000, \\\"endAt\\\": 1728692138000}"; + "{\"currency\": \"XBT\", \"type\": \"Transferin\", \"offset\": 254062248624417," + + " \"forward\": true, \"maxCount\": 50, \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000}"; GetFuturesLedgerReq obj = mapper.readValue(data, GetFuturesLedgerReq.class); } /** getFuturesLedger Response Get Account Ledgers - Futures /api/v1/transaction-history */ public static void testGetFuturesLedgerResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"dataList\\\": [\\n" - + " {\\n" - + " \\\"time\\\": 1728665747000,\\n" - + " \\\"type\\\": \\\"TransferIn\\\",\\n" - + " \\\"amount\\\": 0.01,\\n" - + " \\\"fee\\\": 0.0,\\n" - + " \\\"accountEquity\\\": 14.02924938,\\n" - + " \\\"status\\\": \\\"Completed\\\",\\n" - + " \\\"remark\\\": \\\"Transferred from High-Frequency Trading" - + " Account\\\",\\n" - + " \\\"offset\\\": 51360793,\\n" - + " \\\"currency\\\": \\\"USDT\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"time\\\": 1728648000000,\\n" - + " \\\"type\\\": \\\"RealisedPNL\\\",\\n" - + " \\\"amount\\\": 0.00630042,\\n" - + " \\\"fee\\\": 0.0,\\n" - + " \\\"accountEquity\\\": 20.0,\\n" - + " \\\"status\\\": \\\"Completed\\\",\\n" - + " \\\"remark\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"offset\\\": 51352430,\\n" - + " \\\"currency\\\": \\\"USDT\\\"\\n" - + " }\\n" - + " ],\\n" - + " \\\"hasMore\\\": false\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"dataList\": [\n" + + " {\n" + + " \"time\": 1728665747000,\n" + + " \"type\": \"TransferIn\",\n" + + " \"amount\": 0.01,\n" + + " \"fee\": 0.0,\n" + + " \"accountEquity\": 14.02924938,\n" + + " \"status\": \"Completed\",\n" + + " \"remark\": \"Transferred from High-Frequency Trading Account\",\n" + + " \"offset\": 51360793,\n" + + " \"currency\": \"USDT\"\n" + + " },\n" + + " {\n" + + " \"time\": 1728648000000,\n" + + " \"type\": \"RealisedPNL\",\n" + + " \"amount\": 0.00630042,\n" + + " \"fee\": 0.0,\n" + + " \"accountEquity\": 20.0,\n" + + " \"status\": \"Completed\",\n" + + " \"remark\": \"XBTUSDTM\",\n" + + " \"offset\": 51352430,\n" + + " \"currency\": \"USDT\"\n" + + " }\n" + + " ],\n" + + " \"hasMore\": false\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -392,21 +391,21 @@ public static void testGetMarginAccountDetailRequest() throws Exception { /** getMarginAccountDetail Response Get Account Detail - Margin /api/v1/margin/account */ public static void testGetMarginAccountDetailResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"debtRatio\\\": \\\"0\\\",\\n" - + " \\\"accounts\\\": [\\n" - + " {\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"totalBalance\\\": \\\"0.03\\\",\\n" - + " \\\"availableBalance\\\": \\\"0.02\\\",\\n" - + " \\\"holdBalance\\\": \\\"0.01\\\",\\n" - + " \\\"liability\\\": \\\"0\\\",\\n" - + " \\\"maxBorrowSize\\\": \\\"0\\\"\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"debtRatio\": \"0\",\n" + + " \"accounts\": [\n" + + " {\n" + + " \"currency\": \"USDT\",\n" + + " \"totalBalance\": \"0.03\",\n" + + " \"availableBalance\": \"0.02\",\n" + + " \"holdBalance\": \"0.01\",\n" + + " \"liability\": \"0\",\n" + + " \"maxBorrowSize\": \"0\"\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -417,7 +416,7 @@ public static void testGetMarginAccountDetailResponse() throws Exception { * /api/v1/isolated/accounts */ public static void testGetIsolatedMarginAccountListV1Request() throws Exception { - String data = "{\\\"balanceCurrency\\\": \\\"USDT\\\"}"; + String data = "{\"balanceCurrency\": \"USDT\"}"; GetIsolatedMarginAccountListV1Req obj = mapper.readValue(data, GetIsolatedMarginAccountListV1Req.class); } @@ -428,37 +427,37 @@ public static void testGetIsolatedMarginAccountListV1Request() throws Exception */ public static void testGetIsolatedMarginAccountListV1Response() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"totalConversionBalance\\\": \\\"0.01\\\",\\n" - + " \\\"liabilityConversionBalance\\\": \\\"0\\\",\\n" - + " \\\"assets\\\": [\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"status\\\": \\\"CLEAR\\\",\\n" - + " \\\"debtRatio\\\": \\\"0\\\",\\n" - + " \\\"baseAsset\\\": {\\n" - + " \\\"currency\\\": \\\"BTC\\\",\\n" - + " \\\"totalBalance\\\": \\\"0\\\",\\n" - + " \\\"holdBalance\\\": \\\"0\\\",\\n" - + " \\\"availableBalance\\\": \\\"0\\\",\\n" - + " \\\"liability\\\": \\\"0\\\",\\n" - + " \\\"interest\\\": \\\"0\\\",\\n" - + " \\\"borrowableAmount\\\": \\\"0\\\"\\n" - + " },\\n" - + " \\\"quoteAsset\\\": {\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"totalBalance\\\": \\\"0.01\\\",\\n" - + " \\\"holdBalance\\\": \\\"0\\\",\\n" - + " \\\"availableBalance\\\": \\\"0.01\\\",\\n" - + " \\\"liability\\\": \\\"0\\\",\\n" - + " \\\"interest\\\": \\\"0\\\",\\n" - + " \\\"borrowableAmount\\\": \\\"0\\\"\\n" - + " }\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"totalConversionBalance\": \"0.01\",\n" + + " \"liabilityConversionBalance\": \"0\",\n" + + " \"assets\": [\n" + + " {\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"status\": \"CLEAR\",\n" + + " \"debtRatio\": \"0\",\n" + + " \"baseAsset\": {\n" + + " \"currency\": \"BTC\",\n" + + " \"totalBalance\": \"0\",\n" + + " \"holdBalance\": \"0\",\n" + + " \"availableBalance\": \"0\",\n" + + " \"liability\": \"0\",\n" + + " \"interest\": \"0\",\n" + + " \"borrowableAmount\": \"0\"\n" + + " },\n" + + " \"quoteAsset\": {\n" + + " \"currency\": \"USDT\",\n" + + " \"totalBalance\": \"0.01\",\n" + + " \"holdBalance\": \"0\",\n" + + " \"availableBalance\": \"0.01\",\n" + + " \"liability\": \"0\",\n" + + " \"interest\": \"0\",\n" + + " \"borrowableAmount\": \"0\"\n" + + " }\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue( @@ -470,7 +469,7 @@ public static void testGetIsolatedMarginAccountListV1Response() throws Exception * /api/v1/isolated/account/{symbol} */ public static void testGetIsolatedMarginAccountDetailV1Request() throws Exception { - String data = "{\\\"symbol\\\": \\\"example_string_default_value\\\"}"; + String data = "{\"symbol\": \"example_string_default_value\"}"; GetIsolatedMarginAccountDetailV1Req obj = mapper.readValue(data, GetIsolatedMarginAccountDetailV1Req.class); } @@ -481,31 +480,31 @@ public static void testGetIsolatedMarginAccountDetailV1Request() throws Exceptio */ public static void testGetIsolatedMarginAccountDetailV1Response() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"status\\\": \\\"CLEAR\\\",\\n" - + " \\\"debtRatio\\\": \\\"0\\\",\\n" - + " \\\"baseAsset\\\": {\\n" - + " \\\"currency\\\": \\\"BTC\\\",\\n" - + " \\\"totalBalance\\\": \\\"0\\\",\\n" - + " \\\"holdBalance\\\": \\\"0\\\",\\n" - + " \\\"availableBalance\\\": \\\"0\\\",\\n" - + " \\\"liability\\\": \\\"0\\\",\\n" - + " \\\"interest\\\": \\\"0\\\",\\n" - + " \\\"borrowableAmount\\\": \\\"0\\\"\\n" - + " },\\n" - + " \\\"quoteAsset\\\": {\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"totalBalance\\\": \\\"0.01\\\",\\n" - + " \\\"holdBalance\\\": \\\"0\\\",\\n" - + " \\\"availableBalance\\\": \\\"0.01\\\",\\n" - + " \\\"liability\\\": \\\"0\\\",\\n" - + " \\\"interest\\\": \\\"0\\\",\\n" - + " \\\"borrowableAmount\\\": \\\"0\\\"\\n" - + " }\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"status\": \"CLEAR\",\n" + + " \"debtRatio\": \"0\",\n" + + " \"baseAsset\": {\n" + + " \"currency\": \"BTC\",\n" + + " \"totalBalance\": \"0\",\n" + + " \"holdBalance\": \"0\",\n" + + " \"availableBalance\": \"0\",\n" + + " \"liability\": \"0\",\n" + + " \"interest\": \"0\",\n" + + " \"borrowableAmount\": \"0\"\n" + + " },\n" + + " \"quoteAsset\": {\n" + + " \"currency\": \"USDT\",\n" + + " \"totalBalance\": \"0.01\",\n" + + " \"holdBalance\": \"0\",\n" + + " \"availableBalance\": \"0.01\",\n" + + " \"liability\": \"0\",\n" + + " \"interest\": \"0\",\n" + + " \"borrowableAmount\": \"0\"\n" + + " }\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue( @@ -583,6 +582,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -604,6 +604,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApiAutoGeneratedTest.java index bb39e41f..8ea41f43 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApiAutoGeneratedTest.java @@ -11,17 +11,18 @@ class DepositApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** addDepositAddressV3 Request Add Deposit Address (V3) /api/v3/deposit-address/create */ public static void testAddDepositAddressV3Request() throws Exception { - String data = - "{\\\"currency\\\": \\\"TON\\\", \\\"chain\\\": \\\"ton\\\", \\\"to\\\": \\\"trade\\\"}"; + String data = "{\"currency\": \"TON\", \"chain\": \"ton\", \"to\": \"trade\"}"; AddDepositAddressV3Req obj = mapper.readValue(data, AddDepositAddressV3Req.class); } /** addDepositAddressV3 Response Add Deposit Address (V3) /api/v3/deposit-address/create */ public static void testAddDepositAddressV3Response() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"address\\\":\\\"EQCA1BI4QRZ8qYmskSRDzJmkucGodYRTZCf_b9hckjla6dZl\\\",\\\"memo\\\":\\\"2090821203\\\",\\\"chainId\\\":\\\"ton\\\",\\\"to\\\":\\\"TRADE\\\",\\\"expirationDate\\\":0,\\\"currency\\\":\\\"TON\\\",\\\"chainName\\\":\\\"TON\\\"}}"; + "{\"code\":\"200000\",\"data\":{\"address\":\"EQCA1BI4QRZ8qYmskSRDzJmkucGodYRTZCf_b9hckjla6dZl\",\"memo\":\"2090821203\",\"chainId\":\"ton\",\"to\":\"TRADE\",\"expirationDate\":0,\"currency\":\"TON\",\"chainName\":\"TON\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -29,15 +30,14 @@ public static void testAddDepositAddressV3Response() throws Exception { /** getDepositAddressV3 Request Get Deposit Address (V3) /api/v3/deposit-addresses */ public static void testGetDepositAddressV3Request() throws Exception { String data = - "{\\\"currency\\\": \\\"BTC\\\", \\\"amount\\\": \\\"example_string_default_value\\\"," - + " \\\"chain\\\": \\\"eth\\\"}"; + "{\"currency\": \"BTC\", \"amount\": \"example_string_default_value\", \"chain\": \"eth\"}"; GetDepositAddressV3Req obj = mapper.readValue(data, GetDepositAddressV3Req.class); } /** getDepositAddressV3 Response Get Deposit Address (V3) /api/v3/deposit-addresses */ public static void testGetDepositAddressV3Response() throws Exception { String 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\\\"}]}"; + "{\"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\"}]}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -45,55 +45,54 @@ public static void testGetDepositAddressV3Response() throws Exception { /** getDepositHistory Request Get Deposit History /api/v1/deposits */ public static void testGetDepositHistoryRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"BTC\\\", \\\"status\\\": \\\"SUCCESS\\\", \\\"startAt\\\":" - + " 1728663338000, \\\"endAt\\\": 1728692138000, \\\"currentPage\\\": 1," - + " \\\"pageSize\\\": 50}"; + "{\"currency\": \"BTC\", \"status\": \"SUCCESS\", \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000, \"currentPage\": 1, \"pageSize\": 50}"; GetDepositHistoryReq obj = mapper.readValue(data, GetDepositHistoryReq.class); } /** getDepositHistory Response Get Deposit History /api/v1/deposits */ public static void testGetDepositHistoryResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"currentPage\\\": 1,\\n" - + " \\\"pageSize\\\": 50,\\n" - + " \\\"totalNum\\\": 5,\\n" - + " \\\"totalPage\\\": 1,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"chain\\\": \\\"\\\",\\n" - + " \\\"status\\\": \\\"SUCCESS\\\",\\n" - + " \\\"address\\\": \\\"a435*****@gmail.com\\\",\\n" - + " \\\"memo\\\": \\\"\\\",\\n" - + " \\\"isInner\\\": true,\\n" - + " \\\"amount\\\": \\\"1.00000000\\\",\\n" - + " \\\"fee\\\": \\\"0.00000000\\\",\\n" - + " \\\"walletTxId\\\": null,\\n" - + " \\\"createdAt\\\": 1728555875000,\\n" - + " \\\"updatedAt\\\": 1728555875000,\\n" - + " \\\"remark\\\": \\\"\\\",\\n" - + " \\\"arrears\\\": false\\n" - + " },\\n" - + " {\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"chain\\\": \\\"trx\\\",\\n" - + " \\\"status\\\": \\\"SUCCESS\\\",\\n" - + " \\\"address\\\": \\\"TSv3L1fS7******X4nLP6rqNxYz\\\",\\n" - + " \\\"memo\\\": \\\"\\\",\\n" - + " \\\"isInner\\\": true,\\n" - + " \\\"amount\\\": \\\"6.00000000\\\",\\n" - + " \\\"fee\\\": \\\"0.00000000\\\",\\n" - + " \\\"walletTxId\\\": null,\\n" - + " \\\"createdAt\\\": 1721730920000,\\n" - + " \\\"updatedAt\\\": 1721730920000,\\n" - + " \\\"remark\\\": \\\"\\\",\\n" - + " \\\"arrears\\\": false\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 5,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"currency\": \"USDT\",\n" + + " \"chain\": \"\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"address\": \"a435*****@gmail.com\",\n" + + " \"memo\": \"\",\n" + + " \"isInner\": true,\n" + + " \"amount\": \"1.00000000\",\n" + + " \"fee\": \"0.00000000\",\n" + + " \"walletTxId\": null,\n" + + " \"createdAt\": 1728555875000,\n" + + " \"updatedAt\": 1728555875000,\n" + + " \"remark\": \"\",\n" + + " \"arrears\": false\n" + + " },\n" + + " {\n" + + " \"currency\": \"USDT\",\n" + + " \"chain\": \"trx\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"address\": \"TSv3L1fS7******X4nLP6rqNxYz\",\n" + + " \"memo\": \"\",\n" + + " \"isInner\": true,\n" + + " \"amount\": \"6.00000000\",\n" + + " \"fee\": \"0.00000000\",\n" + + " \"walletTxId\": null,\n" + + " \"createdAt\": 1721730920000,\n" + + " \"updatedAt\": 1721730920000,\n" + + " \"remark\": \"\",\n" + + " \"arrears\": false\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -101,26 +100,26 @@ public static void testGetDepositHistoryResponse() throws Exception { /** getDepositAddressV2 Request Get Deposit Addresses (V2) /api/v2/deposit-addresses */ public static void testGetDepositAddressV2Request() throws Exception { - String data = "{\\\"currency\\\": \\\"BTC\\\", \\\"chain\\\": \\\"eth\\\"}"; + String data = "{\"currency\": \"BTC\", \"chain\": \"eth\"}"; GetDepositAddressV2Req obj = mapper.readValue(data, GetDepositAddressV2Req.class); } /** getDepositAddressV2 Response Get Deposit Addresses (V2) /api/v2/deposit-addresses */ public static void testGetDepositAddressV2Response() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -128,23 +127,23 @@ public static void testGetDepositAddressV2Response() throws Exception { /** getDepositAddressV1 Request Get Deposit Addresses - V1 /api/v1/deposit-addresses */ public static void testGetDepositAddressV1Request() throws Exception { - String data = "{\\\"currency\\\": \\\"BTC\\\", \\\"chain\\\": \\\"eth\\\"}"; + String data = "{\"currency\": \"BTC\", \"chain\": \"eth\"}"; GetDepositAddressV1Req obj = mapper.readValue(data, GetDepositAddressV1Req.class); } /** getDepositAddressV1 Response Get Deposit Addresses - V1 /api/v1/deposit-addresses */ public static void testGetDepositAddressV1Response() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"address\\\": \\\"0xea220bf61c3c2b0adc2cfa29fec3d2677745a379\\\",\\n" - + " \\\"memo\\\": \\\"\\\",\\n" - + " \\\"chain\\\": \\\"ERC20\\\",\\n" - + " \\\"chainId\\\": \\\"eth\\\",\\n" - + " \\\"to\\\": \\\"MAIN\\\",\\n" - + " \\\"currency\\\": \\\"USDT\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"address\": \"0xea220bf61c3c2b0adc2cfa29fec3d2677745a379\",\n" + + " \"memo\": \"\",\n" + + " \"chain\": \"ERC20\",\n" + + " \"chainId\": \"eth\",\n" + + " \"to\": \"MAIN\",\n" + + " \"currency\": \"USDT\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -153,33 +152,33 @@ public static void testGetDepositAddressV1Response() throws Exception { /** getDepositHistoryOld Request Get Deposit History - Old /api/v1/hist-deposits */ public static void testGetDepositHistoryOldRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"BTC\\\", \\\"status\\\": \\\"SUCCESS\\\", \\\"startAt\\\":" - + " 1728663338000, \\\"endAt\\\": 1728692138000}"; + "{\"currency\": \"BTC\", \"status\": \"SUCCESS\", \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000}"; GetDepositHistoryOldReq obj = mapper.readValue(data, GetDepositHistoryOldReq.class); } /** getDepositHistoryOld Response Get Deposit History - Old /api/v1/hist-deposits */ public static void testGetDepositHistoryOldResponse() throws Exception { String data = - "{\\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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -187,15 +186,14 @@ public static void testGetDepositHistoryOldResponse() throws Exception { /** addDepositAddressV1 Request Add Deposit Address - V1 /api/v1/deposit-addresses */ public static void testAddDepositAddressV1Request() throws Exception { - String data = - "{\\\"currency\\\": \\\"ETH\\\", \\\"chain\\\": \\\"eth\\\", \\\"to\\\": \\\"MAIN\\\"}"; + String data = "{\"currency\": \"ETH\", \"chain\": \"eth\", \"to\": \"MAIN\"}"; AddDepositAddressV1Req obj = mapper.readValue(data, AddDepositAddressV1Req.class); } /** addDepositAddressV1 Response Add Deposit Address - V1 /api/v1/deposit-addresses */ public static void testAddDepositAddressV1Response() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"address\\\":\\\"0x02028456f38e78609904e8a002c787ede7a73d7c\\\",\\\"memo\\\":null,\\\"chain\\\":\\\"ERC20\\\",\\\"chainId\\\":\\\"eth\\\",\\\"to\\\":\\\"MAIN\\\",\\\"currency\\\":\\\"ETH\\\"}}"; + "{\"code\":\"200000\",\"data\":{\"address\":\"0x02028456f38e78609904e8a002c787ede7a73d7c\",\"memo\":null,\"chain\":\"ERC20\",\"chainId\":\"eth\",\"to\":\"MAIN\",\"currency\":\"ETH\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -245,6 +243,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -266,6 +265,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApiAutoGeneratedTest.java index e8947c0b..dbf6c3d6 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApiAutoGeneratedTest.java @@ -11,21 +11,23 @@ class FeeApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** getBasicFee Request Get Basic Fee - Spot/Margin /api/v1/base-fee */ public static void testGetBasicFeeRequest() throws Exception { - String data = "{\\\"currencyType\\\": 1}"; + String data = "{\"currencyType\": 1}"; GetBasicFeeReq obj = mapper.readValue(data, GetBasicFeeReq.class); } /** getBasicFee Response Get Basic Fee - Spot/Margin /api/v1/base-fee */ public static void testGetBasicFeeResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"takerFeeRate\\\": \\\"0.001\\\",\\n" - + " \\\"makerFeeRate\\\": \\\"0.001\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"takerFeeRate\": \"0.001\",\n" + + " \"makerFeeRate\": \"0.001\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -33,28 +35,28 @@ public static void testGetBasicFeeResponse() throws Exception { /** getSpotActualFee Request Get Actual Fee - Spot/Margin /api/v1/trade-fees */ public static void testGetSpotActualFeeRequest() throws Exception { - String data = "{\\\"symbols\\\": \\\"BTC-USDT,ETH-USDT\\\"}"; + String data = "{\"symbols\": \"BTC-USDT,ETH-USDT\"}"; GetSpotActualFeeReq obj = mapper.readValue(data, GetSpotActualFeeReq.class); } /** getSpotActualFee Response Get Actual Fee - Spot/Margin /api/v1/trade-fees */ public static void testGetSpotActualFeeResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":[{\\\"symbol\\\":\\\"BTC-USDT\\\",\\\"takerFeeRate\\\":\\\"0.001\\\",\\\"makerFeeRate\\\":\\\"0.001\\\"},{\\\"symbol\\\":\\\"ETH-USDT\\\",\\\"takerFeeRate\\\":\\\"0.001\\\",\\\"makerFeeRate\\\":\\\"0.001\\\"}]}"; + "{\"code\":\"200000\",\"data\":[{\"symbol\":\"BTC-USDT\",\"takerFeeRate\":\"0.001\",\"makerFeeRate\":\"0.001\"},{\"symbol\":\"ETH-USDT\",\"takerFeeRate\":\"0.001\",\"makerFeeRate\":\"0.001\"}]}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** getFuturesActualFee Request Get Actual Fee - Futures /api/v1/trade-fees */ public static void testGetFuturesActualFeeRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\"}"; GetFuturesActualFeeReq obj = mapper.readValue(data, GetFuturesActualFeeReq.class); } /** getFuturesActualFee Response Get Actual Fee - Futures /api/v1/trade-fees */ public static void testGetFuturesActualFeeResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"takerFeeRate\\\":\\\"0.0006\\\",\\\"makerFeeRate\\\":\\\"0.0002\\\"}}"; + "{\"code\":\"200000\",\"data\":{\"symbol\":\"XBTUSDTM\",\"takerFeeRate\":\"0.0006\",\"makerFeeRate\":\"0.0002\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -72,6 +74,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -93,6 +96,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiAutoGeneratedTest.java index 53e708ae..90743bf7 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiAutoGeneratedTest.java @@ -11,25 +11,27 @@ class SubAccountApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** addSubAccount Request Add sub-account /api/v2/sub/user/created */ public static void testAddSubAccountRequest() throws Exception { String data = - "{\\\"password\\\": \\\"q1234567\\\", \\\"access\\\": \\\"Spot\\\", \\\"subName\\\":" - + " \\\"subNameTest1\\\", \\\"remarks\\\": \\\"TheRemark\\\"}"; + "{\"password\": \"q1234567\", \"access\": \"Spot\", \"subName\": \"subNameTest1\"," + + " \"remarks\": \"TheRemark\"}"; AddSubAccountReq obj = mapper.readValue(data, AddSubAccountReq.class); } /** addSubAccount Response Add sub-account /api/v2/sub/user/created */ public static void testAddSubAccountResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"uid\\\": 245730746,\\n" - + " \\\"subName\\\": \\\"subNameTest1\\\",\\n" - + " \\\"remarks\\\": \\\"TheRemark\\\",\\n" - + " \\\"access\\\": \\\"Spot\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"uid\": 245730746,\n" + + " \"subName\": \"subNameTest1\",\n" + + " \"remarks\": \"TheRemark\",\n" + + " \"access\": \"Spot\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -40,7 +42,7 @@ public static void testAddSubAccountResponse() throws Exception { * /api/v3/sub/user/margin/enable */ public static void testAddSubAccountMarginPermissionRequest() throws Exception { - String data = "{\\\"uid\\\": \\\"169579801\\\"}"; + String data = "{\"uid\": \"169579801\"}"; AddSubAccountMarginPermissionReq obj = mapper.readValue(data, AddSubAccountMarginPermissionReq.class); } @@ -50,7 +52,7 @@ public static void testAddSubAccountMarginPermissionRequest() throws Exception { * /api/v3/sub/user/margin/enable */ public static void testAddSubAccountMarginPermissionResponse() throws Exception { - String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": null\\n}"; + String data = "{\n \"code\": \"200000\",\n \"data\": null\n}"; RestResponse resp = mapper.readValue( data, new TypeReference>() {}); @@ -61,7 +63,7 @@ public static void testAddSubAccountMarginPermissionResponse() throws Exception * /api/v3/sub/user/futures/enable */ public static void testAddSubAccountFuturesPermissionRequest() throws Exception { - String data = "{\\\"uid\\\": \\\"169579801\\\"}"; + String data = "{\"uid\": \"169579801\"}"; AddSubAccountFuturesPermissionReq obj = mapper.readValue(data, AddSubAccountFuturesPermissionReq.class); } @@ -71,7 +73,7 @@ public static void testAddSubAccountFuturesPermissionRequest() throws Exception * /api/v3/sub/user/futures/enable */ public static void testAddSubAccountFuturesPermissionResponse() throws Exception { - String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": null\\n}"; + String data = "{\n \"code\": \"200000\",\n \"data\": null\n}"; RestResponse resp = mapper.readValue( data, new TypeReference>() {}); @@ -79,7 +81,7 @@ public static void testAddSubAccountFuturesPermissionResponse() throws Exception /** getSpotSubAccountsSummaryV2 Request Get sub-account List - Summary Info /api/v2/sub/user */ public static void testGetSpotSubAccountsSummaryV2Request() throws Exception { - String data = "{\\\"currentPage\\\": 1, \\\"pageSize\\\": 10}"; + String data = "{\"currentPage\": 1, \"pageSize\": 10}"; GetSpotSubAccountsSummaryV2Req obj = mapper.readValue(data, GetSpotSubAccountsSummaryV2Req.class); } @@ -87,35 +89,35 @@ public static void testGetSpotSubAccountsSummaryV2Request() throws Exception { /** getSpotSubAccountsSummaryV2 Response Get sub-account List - Summary Info /api/v2/sub/user */ public static void testGetSpotSubAccountsSummaryV2Response() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue( @@ -128,9 +130,9 @@ public static void testGetSpotSubAccountsSummaryV2Response() throws Exception { */ public static void testGetSpotSubAccountDetailRequest() throws Exception { String data = - "{\\\"subUserId\\\": \\\"63743f07e0c5230001761d08\\\", \\\"includeBaseAmount\\\": true," - + " \\\"baseCurrency\\\": \\\"example_string_default_value\\\", \\\"baseAmount\\\":" - + " \\\"example_string_default_value\\\"}"; + "{\"subUserId\": \"63743f07e0c5230001761d08\", \"includeBaseAmount\": true," + + " \"baseCurrency\": \"example_string_default_value\", \"baseAmount\":" + + " \"example_string_default_value\"}"; GetSpotSubAccountDetailReq obj = mapper.readValue(data, GetSpotSubAccountDetailReq.class); } @@ -140,49 +142,49 @@ public static void testGetSpotSubAccountDetailRequest() throws Exception { */ public static void testGetSpotSubAccountDetailResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -192,7 +194,7 @@ public static void testGetSpotSubAccountDetailResponse() throws Exception { * getSpotSubAccountListV2 Request Get sub-account List - Spot Balance (V2) /api/v2/sub-accounts */ public static void testGetSpotSubAccountListV2Request() throws Exception { - String data = "{\\\"currentPage\\\": 1, \\\"pageSize\\\": 10}"; + String data = "{\"currentPage\": 1, \"pageSize\": 10}"; GetSpotSubAccountListV2Req obj = mapper.readValue(data, GetSpotSubAccountListV2Req.class); } @@ -201,73 +203,73 @@ public static void testGetSpotSubAccountListV2Request() throws Exception { */ public static void testGetSpotSubAccountListV2Response() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -278,7 +280,7 @@ public static void testGetSpotSubAccountListV2Response() throws Exception { * /api/v1/account-overview-all */ public static void testGetFuturesSubAccountListV2Request() throws Exception { - String data = "{\\\"currency\\\": \\\"USDT\\\"}"; + String data = "{\"currency\": \"USDT\"}"; GetFuturesSubAccountListV2Req obj = mapper.readValue(data, GetFuturesSubAccountListV2Req.class); } @@ -288,77 +290,77 @@ public static void testGetFuturesSubAccountListV2Request() throws Exception { */ public static void testGetFuturesSubAccountListV2Response() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue( @@ -368,26 +370,26 @@ public static void testGetFuturesSubAccountListV2Response() throws Exception { /** addSubAccountApi Request Add sub-account API /api/v1/sub/api-key */ public static void testAddSubAccountApiRequest() throws Exception { String data = - "{\\\"subName\\\": \\\"testapi6\\\", \\\"passphrase\\\": \\\"11223344\\\", \\\"remark\\\":" - + " \\\"TheRemark\\\", \\\"permission\\\": \\\"General,Spot,Futures\\\"}"; + "{\"subName\": \"testapi6\", \"passphrase\": \"11223344\", \"remark\": \"TheRemark\"," + + " \"permission\": \"General,Spot,Futures\"}"; AddSubAccountApiReq obj = mapper.readValue(data, AddSubAccountApiReq.class); } /** addSubAccountApi Response Add sub-account API /api/v1/sub/api-key */ public static void testAddSubAccountApiResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -396,22 +398,21 @@ public static void testAddSubAccountApiResponse() throws Exception { /** modifySubAccountApi Request Modify sub-account API /api/v1/sub/api-key/update */ public static void testModifySubAccountApiRequest() throws Exception { String data = - "{\\\"subName\\\": \\\"testapi6\\\", \\\"apiKey\\\": \\\"670621e3a25958000159c82f\\\"," - + " \\\"passphrase\\\": \\\"11223344\\\", \\\"permission\\\":" - + " \\\"General,Spot,Futures\\\"}"; + "{\"subName\": \"testapi6\", \"apiKey\": \"670621e3a25958000159c82f\", \"passphrase\":" + + " \"11223344\", \"permission\": \"General,Spot,Futures\"}"; ModifySubAccountApiReq obj = mapper.readValue(data, ModifySubAccountApiReq.class); } /** modifySubAccountApi Response Modify sub-account API /api/v1/sub/api-key/update */ public static void testModifySubAccountApiResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"subName\\\": \\\"testapi6\\\",\\n" - + " \\\"apiKey\\\": \\\"670621e3a25958000159c82f\\\",\\n" - + " \\\"permission\\\": \\\"General,Futures,Spot\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"subName\": \"testapi6\",\n" + + " \"apiKey\": \"670621e3a25958000159c82f\",\n" + + " \"permission\": \"General,Futures,Spot\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -419,29 +420,28 @@ public static void testModifySubAccountApiResponse() throws Exception { /** getSubAccountApiList Request Get sub-account API List /api/v1/sub/api-key */ public static void testGetSubAccountApiListRequest() throws Exception { - String data = - "{\\\"apiKey\\\": \\\"example_string_default_value\\\", \\\"subName\\\": \\\"testapi6\\\"}"; + String data = "{\"apiKey\": \"example_string_default_value\", \"subName\": \"testapi6\"}"; GetSubAccountApiListReq obj = mapper.readValue(data, GetSubAccountApiListReq.class); } /** getSubAccountApiList Response Get sub-account API List /api/v1/sub/api-key */ public static void testGetSubAccountApiListResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -450,15 +450,15 @@ public static void testGetSubAccountApiListResponse() throws Exception { /** deleteSubAccountApi Request Delete sub-account API /api/v1/sub/api-key */ public static void testDeleteSubAccountApiRequest() throws Exception { String data = - "{\\\"apiKey\\\": \\\"670621e3a25958000159c82f\\\", \\\"subName\\\": \\\"testapi6\\\"," - + " \\\"passphrase\\\": \\\"11223344\\\"}"; + "{\"apiKey\": \"670621e3a25958000159c82f\", \"subName\": \"testapi6\", \"passphrase\":" + + " \"11223344\"}"; DeleteSubAccountApiReq obj = mapper.readValue(data, DeleteSubAccountApiReq.class); } /** deleteSubAccountApi Response Delete sub-account API /api/v1/sub/api-key */ public static void testDeleteSubAccountApiResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"subName\\\":\\\"testapi6\\\",\\\"apiKey\\\":\\\"670621e3a25958000159c82f\\\"}}"; + "{\"code\":\"200000\",\"data\":{\"subName\":\"testapi6\",\"apiKey\":\"670621e3a25958000159c82f\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -475,26 +475,26 @@ public static void testGetSpotSubAccountsSummaryV1Request() throws Exception { */ public static void testGetSpotSubAccountsSummaryV1Response() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue( @@ -513,67 +513,67 @@ public static void testGetSpotSubAccountListV1Request() throws Exception { */ public static void testGetSpotSubAccountListV1Response() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -656,6 +656,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -677,6 +678,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApiAutoGeneratedTest.java index 4f81e461..2da81412 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApiAutoGeneratedTest.java @@ -11,18 +11,18 @@ class TransferApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** getTransferQuotas Request Get Transfer Quotas /api/v1/accounts/transferable */ public static void testGetTransferQuotasRequest() throws Exception { - String data = - "{\\\"currency\\\": \\\"BTC\\\", \\\"type\\\": \\\"MAIN\\\", \\\"tag\\\":" - + " \\\"ETH-USDT\\\"}"; + String data = "{\"currency\": \"BTC\", \"type\": \"MAIN\", \"tag\": \"ETH-USDT\"}"; GetTransferQuotasReq obj = mapper.readValue(data, GetTransferQuotasReq.class); } /** getTransferQuotas Response Get Transfer Quotas /api/v1/accounts/transferable */ public static void testGetTransferQuotasResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"currency\\\":\\\"USDT\\\",\\\"balance\\\":\\\"10.5\\\",\\\"available\\\":\\\"10.5\\\",\\\"holds\\\":\\\"0\\\",\\\"transferable\\\":\\\"10.5\\\"}}"; + "{\"code\":\"200000\",\"data\":{\"currency\":\"USDT\",\"balance\":\"10.5\",\"available\":\"10.5\",\"holds\":\"0\",\"transferable\":\"10.5\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -30,21 +30,20 @@ public static void testGetTransferQuotasResponse() throws Exception { /** flexTransfer Request Flex Transfer /api/v3/accounts/universal-transfer */ public static void testFlexTransferRequest() throws Exception { String data = - "{\\\"clientOid\\\": \\\"64ccc0f164781800010d8c09\\\", \\\"type\\\": \\\"PARENT_TO_SUB\\\"," - + " \\\"currency\\\": \\\"USDT\\\", \\\"amount\\\": \\\"0.01\\\"," - + " \\\"fromAccountType\\\": \\\"TRADE\\\", \\\"toUserId\\\":" - + " \\\"63743f07e0c5230001761d08\\\", \\\"toAccountType\\\": \\\"TRADE\\\"}"; + "{\"clientOid\": \"64ccc0f164781800010d8c09\", \"type\": \"PARENT_TO_SUB\", \"currency\":" + + " \"USDT\", \"amount\": \"0.01\", \"fromAccountType\": \"TRADE\", \"toUserId\":" + + " \"63743f07e0c5230001761d08\", \"toAccountType\": \"TRADE\"}"; FlexTransferReq obj = mapper.readValue(data, FlexTransferReq.class); } /** flexTransfer Response Flex Transfer /api/v3/accounts/universal-transfer */ public static void testFlexTransferResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"6705f7248c6954000733ecac\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"6705f7248c6954000733ecac\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -53,17 +52,15 @@ public static void testFlexTransferResponse() throws Exception { /** subAccountTransfer Request Sub-account Transfer /api/v2/accounts/sub-transfer */ public static void testSubAccountTransferRequest() throws Exception { String data = - "{\\\"clientOid\\\": \\\"64ccc0f164781800010d8c09\\\", \\\"currency\\\": \\\"USDT\\\"," - + " \\\"amount\\\": \\\"0.01\\\", \\\"direction\\\": \\\"OUT\\\", \\\"accountType\\\":" - + " \\\"MAIN\\\", \\\"subAccountType\\\": \\\"MAIN\\\", \\\"subUserId\\\":" - + " \\\"63743f07e0c5230001761d08\\\"}"; + "{\"clientOid\": \"64ccc0f164781800010d8c09\", \"currency\": \"USDT\", \"amount\":" + + " \"0.01\", \"direction\": \"OUT\", \"accountType\": \"MAIN\", \"subAccountType\":" + + " \"MAIN\", \"subUserId\": \"63743f07e0c5230001761d08\"}"; SubAccountTransferReq obj = mapper.readValue(data, SubAccountTransferReq.class); } /** subAccountTransfer Response Sub-account Transfer /api/v2/accounts/sub-transfer */ public static void testSubAccountTransferResponse() throws Exception { - String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"orderId\\\":\\\"670be6b0b1b9080007040a9b\\\"}}"; + String data = "{\"code\":\"200000\",\"data\":{\"orderId\":\"670be6b0b1b9080007040a9b\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -71,16 +68,14 @@ public static void testSubAccountTransferResponse() throws Exception { /** innerTransfer Request Internal Transfer /api/v2/accounts/inner-transfer */ public static void testInnerTransferRequest() throws Exception { String data = - "{\\\"clientOid\\\": \\\"64ccc0f164781800010d8c09\\\", \\\"currency\\\": \\\"USDT\\\"," - + " \\\"amount\\\": \\\"0.01\\\", \\\"from\\\": \\\"main\\\", \\\"to\\\":" - + " \\\"trade\\\"}"; + "{\"clientOid\": \"64ccc0f164781800010d8c09\", \"currency\": \"USDT\", \"amount\":" + + " \"0.01\", \"from\": \"main\", \"to\": \"trade\"}"; InnerTransferReq obj = mapper.readValue(data, InnerTransferReq.class); } /** innerTransfer Response Internal Transfer /api/v2/accounts/inner-transfer */ public static void testInnerTransferResponse() throws Exception { - String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"orderId\\\":\\\"670beb3482a1bb0007dec644\\\"}}"; + String data = "{\"code\":\"200000\",\"data\":{\"orderId\":\"670beb3482a1bb0007dec644\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -91,9 +86,9 @@ public static void testInnerTransferResponse() throws Exception { */ public static void testGetFuturesAccountTransferOutLedgerRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"XBT\\\", \\\"type\\\": \\\"MAIN\\\", \\\"tag\\\": [\\\"mock_a\\\"," - + " \\\"mock_b\\\"], \\\"startAt\\\": 1728663338000, \\\"endAt\\\": 1728692138000," - + " \\\"currentPage\\\": 1, \\\"pageSize\\\": 50}"; + "{\"currency\": \"XBT\", \"type\": \"MAIN\", \"tag\": [\"mock_a\", \"mock_b\"]," + + " \"startAt\": 1728663338000, \"endAt\": 1728692138000, \"currentPage\": 1," + + " \"pageSize\": 50}"; GetFuturesAccountTransferOutLedgerReq obj = mapper.readValue(data, GetFuturesAccountTransferOutLedgerReq.class); } @@ -104,7 +99,7 @@ public static void testGetFuturesAccountTransferOutLedgerRequest() throws Except */ public static void testGetFuturesAccountTransferOutLedgerResponse() throws Exception { String 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\\\":\\\"\\\"}]}}"; + "{\"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\":\"\"}]}}"; RestResponse resp = mapper.readValue( data, new TypeReference>() {}); @@ -112,36 +107,34 @@ public static void testGetFuturesAccountTransferOutLedgerResponse() throws Excep /** futuresAccountTransferOut Request Futures Account Transfer Out /api/v3/transfer-out */ public static void testFuturesAccountTransferOutRequest() throws Exception { - String data = - "{\\\"currency\\\": \\\"USDT\\\", \\\"amount\\\": 0.01, \\\"recAccountType\\\":" - + " \\\"MAIN\\\"}"; + String data = "{\"currency\": \"USDT\", \"amount\": 0.01, \"recAccountType\": \"MAIN\"}"; FuturesAccountTransferOutReq obj = mapper.readValue(data, FuturesAccountTransferOutReq.class); } /** futuresAccountTransferOut Response Futures Account Transfer Out /api/v3/transfer-out */ public static void testFuturesAccountTransferOutResponse() throws Exception { String data = - "{\\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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -149,15 +142,13 @@ public static void testFuturesAccountTransferOutResponse() throws Exception { /** futuresAccountTransferIn Request Futures Account Transfer In /api/v1/transfer-in */ public static void testFuturesAccountTransferInRequest() throws Exception { - String data = - "{\\\"currency\\\": \\\"USDT\\\", \\\"amount\\\": 0.01, \\\"payAccountType\\\":" - + " \\\"MAIN\\\"}"; + String data = "{\"currency\": \"USDT\", \"amount\": 0.01, \"payAccountType\": \"MAIN\"}"; FuturesAccountTransferInReq obj = mapper.readValue(data, FuturesAccountTransferInReq.class); } /** futuresAccountTransferIn Response Futures Account Transfer In /api/v1/transfer-in */ public static void testFuturesAccountTransferInResponse() throws Exception { - String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":null}"; + String data = "{\"code\":\"200000\",\"data\":null}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -199,6 +190,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -220,6 +212,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApiAutoGeneratedTest.java index 973a9167..3a37bd2d 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApiAutoGeneratedTest.java @@ -11,16 +11,18 @@ class WithdrawalApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** getWithdrawalQuotas Request Get Withdrawal Quotas /api/v1/withdrawals/quotas */ public static void testGetWithdrawalQuotasRequest() throws Exception { - String data = "{\\\"currency\\\": \\\"BTC\\\", \\\"chain\\\": \\\"eth\\\"}"; + String data = "{\"currency\": \"BTC\", \"chain\": \"eth\"}"; GetWithdrawalQuotasReq obj = mapper.readValue(data, GetWithdrawalQuotasReq.class); } /** getWithdrawalQuotas Response Get Withdrawal Quotas /api/v1/withdrawals/quotas */ public static void testGetWithdrawalQuotasResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"currency\\\":\\\"BTC\\\",\\\"limitBTCAmount\\\":\\\"15.79590095\\\",\\\"usedBTCAmount\\\":\\\"0.00000000\\\",\\\"quotaCurrency\\\":\\\"USDT\\\",\\\"limitQuotaCurrencyAmount\\\":\\\"999999.00000000\\\",\\\"usedQuotaCurrencyAmount\\\":\\\"0\\\",\\\"remainAmount\\\":\\\"15.79590095\\\",\\\"availableAmount\\\":\\\"0\\\",\\\"withdrawMinFee\\\":\\\"0.0005\\\",\\\"innerWithdrawMinFee\\\":\\\"0\\\",\\\"withdrawMinSize\\\":\\\"0.001\\\",\\\"isWithdrawEnabled\\\":true,\\\"precision\\\":8,\\\"chain\\\":\\\"BTC\\\",\\\"reason\\\":null,\\\"lockedAmount\\\":\\\"0\\\"}}"; + "{\"code\":\"200000\",\"data\":{\"currency\":\"BTC\",\"limitBTCAmount\":\"15.79590095\",\"usedBTCAmount\":\"0.00000000\",\"quotaCurrency\":\"USDT\",\"limitQuotaCurrencyAmount\":\"999999.00000000\",\"usedQuotaCurrencyAmount\":\"0\",\"remainAmount\":\"15.79590095\",\"availableAmount\":\"0\",\"withdrawMinFee\":\"0.0005\",\"innerWithdrawMinFee\":\"0\",\"withdrawMinSize\":\"0.001\",\"isWithdrawEnabled\":true,\"precision\":8,\"chain\":\"BTC\",\"reason\":null,\"lockedAmount\":\"0\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -28,29 +30,28 @@ public static void testGetWithdrawalQuotasResponse() throws Exception { /** withdrawalV3 Request Withdraw (V3) /api/v3/withdrawals */ public static void testWithdrawalV3Request() throws Exception { String data = - "{\\\"currency\\\": \\\"USDT\\\", \\\"toAddress\\\": \\\"TKFRQXSDcY****GmLrjJggwX8\\\"," - + " \\\"amount\\\": \\\"3\\\", \\\"withdrawType\\\": \\\"ADDRESS\\\", \\\"chain\\\":" - + " \\\"trx\\\", \\\"isInner\\\": true, \\\"remark\\\": \\\"this is Remark\\\"}"; + "{\"currency\": \"USDT\", \"toAddress\": \"TKFRQXSDcY****GmLrjJggwX8\", \"amount\": \"3\"," + + " \"withdrawType\": \"ADDRESS\", \"chain\": \"trx\", \"isInner\": true, \"remark\":" + + " \"this is Remark\"}"; WithdrawalV3Req obj = mapper.readValue(data, WithdrawalV3Req.class); } /** withdrawalV3 Response Withdraw (V3) /api/v3/withdrawals */ public static void testWithdrawalV3Response() throws Exception { - String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"withdrawalId\\\":\\\"670deec84d64da0007d7c946\\\"}}"; + String data = "{\"code\":\"200000\",\"data\":{\"withdrawalId\":\"670deec84d64da0007d7c946\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** cancelWithdrawal Request Cancel Withdrawal /api/v1/withdrawals/{withdrawalId} */ public static void testCancelWithdrawalRequest() throws Exception { - String data = "{\\\"withdrawalId\\\": \\\"670b891f7e0f440007730692\\\"}"; + String data = "{\"withdrawalId\": \"670b891f7e0f440007730692\"}"; CancelWithdrawalReq obj = mapper.readValue(data, CancelWithdrawalReq.class); } /** cancelWithdrawal Response Cancel Withdrawal /api/v1/withdrawals/{withdrawalId} */ public static void testCancelWithdrawalResponse() throws Exception { - String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":null}"; + String data = "{\"code\":\"200000\",\"data\":null}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -58,55 +59,54 @@ public static void testCancelWithdrawalResponse() throws Exception { /** getWithdrawalHistory Request Get Withdrawal History /api/v1/withdrawals */ public static void testGetWithdrawalHistoryRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"BTC\\\", \\\"status\\\": \\\"SUCCESS\\\", \\\"startAt\\\":" - + " 1728663338000, \\\"endAt\\\": 1728692138000, \\\"currentPage\\\": 1," - + " \\\"pageSize\\\": 50}"; + "{\"currency\": \"BTC\", \"status\": \"SUCCESS\", \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000, \"currentPage\": 1, \"pageSize\": 50}"; GetWithdrawalHistoryReq obj = mapper.readValue(data, GetWithdrawalHistoryReq.class); } /** getWithdrawalHistory Response Get Withdrawal History /api/v1/withdrawals */ public static void testGetWithdrawalHistoryResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"currentPage\\\": 1,\\n" - + " \\\"pageSize\\\": 50,\\n" - + " \\\"totalNum\\\": 5,\\n" - + " \\\"totalPage\\\": 1,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"chain\\\": \\\"\\\",\\n" - + " \\\"status\\\": \\\"SUCCESS\\\",\\n" - + " \\\"address\\\": \\\"a435*****@gmail.com\\\",\\n" - + " \\\"memo\\\": \\\"\\\",\\n" - + " \\\"isInner\\\": true,\\n" - + " \\\"amount\\\": \\\"1.00000000\\\",\\n" - + " \\\"fee\\\": \\\"0.00000000\\\",\\n" - + " \\\"walletTxId\\\": null,\\n" - + " \\\"createdAt\\\": 1728555875000,\\n" - + " \\\"updatedAt\\\": 1728555875000,\\n" - + " \\\"remark\\\": \\\"\\\",\\n" - + " \\\"arrears\\\": false\\n" - + " },\\n" - + " {\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"chain\\\": \\\"trx\\\",\\n" - + " \\\"status\\\": \\\"SUCCESS\\\",\\n" - + " \\\"address\\\": \\\"TSv3L1fS7******X4nLP6rqNxYz\\\",\\n" - + " \\\"memo\\\": \\\"\\\",\\n" - + " \\\"isInner\\\": true,\\n" - + " \\\"amount\\\": \\\"6.00000000\\\",\\n" - + " \\\"fee\\\": \\\"0.00000000\\\",\\n" - + " \\\"walletTxId\\\": null,\\n" - + " \\\"createdAt\\\": 1721730920000,\\n" - + " \\\"updatedAt\\\": 1721730920000,\\n" - + " \\\"remark\\\": \\\"\\\",\\n" - + " \\\"arrears\\\": false\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 5,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"currency\": \"USDT\",\n" + + " \"chain\": \"\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"address\": \"a435*****@gmail.com\",\n" + + " \"memo\": \"\",\n" + + " \"isInner\": true,\n" + + " \"amount\": \"1.00000000\",\n" + + " \"fee\": \"0.00000000\",\n" + + " \"walletTxId\": null,\n" + + " \"createdAt\": 1728555875000,\n" + + " \"updatedAt\": 1728555875000,\n" + + " \"remark\": \"\",\n" + + " \"arrears\": false\n" + + " },\n" + + " {\n" + + " \"currency\": \"USDT\",\n" + + " \"chain\": \"trx\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"address\": \"TSv3L1fS7******X4nLP6rqNxYz\",\n" + + " \"memo\": \"\",\n" + + " \"isInner\": true,\n" + + " \"amount\": \"6.00000000\",\n" + + " \"fee\": \"0.00000000\",\n" + + " \"walletTxId\": null,\n" + + " \"createdAt\": 1721730920000,\n" + + " \"updatedAt\": 1721730920000,\n" + + " \"remark\": \"\",\n" + + " \"arrears\": false\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -117,7 +117,7 @@ public static void testGetWithdrawalHistoryResponse() throws Exception { * /api/v1/withdrawals/{withdrawalId} */ public static void testGetWithdrawalHistoryByIdRequest() throws Exception { - String data = "{\\\"withdrawalId\\\": \\\"67e6515f7960ba0007b42025\\\"}"; + String data = "{\"withdrawalId\": \"67e6515f7960ba0007b42025\"}"; GetWithdrawalHistoryByIdReq obj = mapper.readValue(data, GetWithdrawalHistoryByIdReq.class); } @@ -127,34 +127,34 @@ public static void testGetWithdrawalHistoryByIdRequest() throws Exception { */ public static void testGetWithdrawalHistoryByIdResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"id\\\": \\\"67e6515f7960ba0007b42025\\\",\\n" - + " \\\"uid\\\": 165111215,\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"chainId\\\": \\\"trx\\\",\\n" - + " \\\"chainName\\\": \\\"TRC20\\\",\\n" - + " \\\"currencyName\\\": \\\"USDT\\\",\\n" - + " \\\"status\\\": \\\"SUCCESS\\\",\\n" - + " \\\"failureReason\\\": \\\"\\\",\\n" - + " \\\"failureReasonMsg\\\": null,\\n" - + " \\\"address\\\": \\\"TKFRQXSDcY4kd3QLzw7uK16GmLrjJggwX8\\\",\\n" - + " \\\"memo\\\": \\\"\\\",\\n" - + " \\\"isInner\\\": true,\\n" - + " \\\"amount\\\": \\\"3.00000000\\\",\\n" - + " \\\"fee\\\": \\\"0.00000000\\\",\\n" - + " \\\"walletTxId\\\": null,\\n" - + " \\\"addressRemark\\\": null,\\n" - + " \\\"remark\\\": \\\"this is Remark\\\",\\n" - + " \\\"createdAt\\\": 1743147359000,\\n" - + " \\\"cancelType\\\": \\\"NON_CANCELABLE\\\",\\n" - + " \\\"taxes\\\": null,\\n" - + " \\\"taxDescription\\\": null,\\n" - + " \\\"returnStatus\\\": \\\"NOT_RETURN\\\",\\n" - + " \\\"returnAmount\\\": null,\\n" - + " \\\"returnCurrency\\\": \\\"KCS\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"67e6515f7960ba0007b42025\",\n" + + " \"uid\": 165111215,\n" + + " \"currency\": \"USDT\",\n" + + " \"chainId\": \"trx\",\n" + + " \"chainName\": \"TRC20\",\n" + + " \"currencyName\": \"USDT\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"failureReason\": \"\",\n" + + " \"failureReasonMsg\": null,\n" + + " \"address\": \"TKFRQXSDcY4kd3QLzw7uK16GmLrjJggwX8\",\n" + + " \"memo\": \"\",\n" + + " \"isInner\": true,\n" + + " \"amount\": \"3.00000000\",\n" + + " \"fee\": \"0.00000000\",\n" + + " \"walletTxId\": null,\n" + + " \"addressRemark\": null,\n" + + " \"remark\": \"this is Remark\",\n" + + " \"createdAt\": 1743147359000,\n" + + " \"cancelType\": \"NON_CANCELABLE\",\n" + + " \"taxes\": null,\n" + + " \"taxDescription\": null,\n" + + " \"returnStatus\": \"NOT_RETURN\",\n" + + " \"returnAmount\": null,\n" + + " \"returnCurrency\": \"KCS\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -163,35 +163,34 @@ public static void testGetWithdrawalHistoryByIdResponse() throws Exception { /** getWithdrawalHistoryOld Request Get Withdrawal History - Old /api/v1/hist-withdrawals */ public static void testGetWithdrawalHistoryOldRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"BTC\\\", \\\"status\\\": \\\"SUCCESS\\\", \\\"startAt\\\":" - + " 1728663338000, \\\"endAt\\\": 1728692138000, \\\"currentPage\\\": 1," - + " \\\"pageSize\\\": 50}"; + "{\"currency\": \"BTC\", \"status\": \"SUCCESS\", \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000, \"currentPage\": 1, \"pageSize\": 50}"; GetWithdrawalHistoryOldReq obj = mapper.readValue(data, GetWithdrawalHistoryOldReq.class); } /** getWithdrawalHistoryOld Response Get Withdrawal History - Old /api/v1/hist-withdrawals */ public static void testGetWithdrawalHistoryOldResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"currentPage\\\": 1,\\n" - + " \\\"pageSize\\\": 50,\\n" - + " \\\"totalNum\\\": 1,\\n" - + " \\\"totalPage\\\": 1,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"currency\\\": \\\"BTC\\\",\\n" - + " \\\"createAt\\\": 1526723468,\\n" - + " \\\"amount\\\": \\\"0.534\\\",\\n" - + " \\\"address\\\": \\\"33xW37ZSW4tQvg443Pc7NLCAs167Yc2XUV\\\",\\n" - + " \\\"walletTxId\\\":" - + " \\\"aeacea864c020acf58e51606169240e96774838dcd4f7ce48acf38e3651323f4\\\",\\n" - + " \\\"isInner\\\": false,\\n" - + " \\\"status\\\": \\\"SUCCESS\\\"\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 1,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"currency\": \"BTC\",\n" + + " \"createAt\": 1526723468,\n" + + " \"amount\": \"0.534\",\n" + + " \"address\": \"33xW37ZSW4tQvg443Pc7NLCAs167Yc2XUV\",\n" + + " \"walletTxId\":" + + " \"aeacea864c020acf58e51606169240e96774838dcd4f7ce48acf38e3651323f4\",\n" + + " \"isInner\": false,\n" + + " \"status\": \"SUCCESS\"\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -200,15 +199,14 @@ public static void testGetWithdrawalHistoryOldResponse() throws Exception { /** withdrawalV1 Request Withdraw - V1 /api/v1/withdrawals */ public static void testWithdrawalV1Request() throws Exception { String data = - "{\\\"currency\\\": \\\"USDT\\\", \\\"address\\\": \\\"TKFRQXSDc****16GmLrjJggwX8\\\"," - + " \\\"amount\\\": 3, \\\"chain\\\": \\\"trx\\\", \\\"isInner\\\": true}"; + "{\"currency\": \"USDT\", \"address\": \"TKFRQXSDc****16GmLrjJggwX8\", \"amount\": 3," + + " \"chain\": \"trx\", \"isInner\": true}"; WithdrawalV1Req obj = mapper.readValue(data, WithdrawalV1Req.class); } /** withdrawalV1 Response Withdraw - V1 /api/v1/withdrawals */ public static void testWithdrawalV1Response() throws Exception { - String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"withdrawalId\\\":\\\"670a973cf07b3800070e216c\\\"}}"; + String data = "{\"code\":\"200000\",\"data\":{\"withdrawalId\":\"670a973cf07b3800070e216c\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -250,6 +248,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -271,6 +270,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiAutoGeneratedTest.java index f9a85608..7c91a179 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiAutoGeneratedTest.java @@ -11,6 +11,8 @@ class AffiliateApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** getAccount Request Get Account /api/v2/affiliate/inviter/statistics */ public static void testGetAccountRequest() throws Exception { // $this->assertTrue(true); @@ -19,35 +21,35 @@ public static void testGetAccountRequest() throws Exception { /** getAccount Response Get Account /api/v2/affiliate/inviter/statistics */ public static void testGetAccountResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"parentUid\\\": \\\"1000000\\\",\\n" - + " \\\"orders\\\": [\\n" - + " {\\n" - + " \\\"orderId\\\": \\\"1668458892612980737\\\",\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"principal\\\": \\\"100\\\",\\n" - + " \\\"interest\\\": \\\"0\\\"\\n" - + " }\\n" - + " ],\\n" - + " \\\"ltv\\\": {\\n" - + " \\\"transferLtv\\\": \\\"0.6000\\\",\\n" - + " \\\"onlyClosePosLtv\\\": \\\"0.7500\\\",\\n" - + " \\\"delayedLiquidationLtv\\\": \\\"0.9000\\\",\\n" - + " \\\"instantLiquidationLtv\\\": \\\"0.9500\\\",\\n" - + " \\\"currentLtv\\\": \\\"0.0854\\\"\\n" - + " },\\n" - + " \\\"totalMarginAmount\\\": \\\"1170.36181573\\\",\\n" - + " \\\"transferMarginAmount\\\": \\\"166.66666666\\\",\\n" - + " \\\"margins\\\": [\\n" - + " {\\n" - + " \\\"marginCcy\\\": \\\"USDT\\\",\\n" - + " \\\"marginQty\\\": \\\"1170.36181573\\\",\\n" - + " \\\"marginFactor\\\": \\\"1.000000000000000000\\\"\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"parentUid\": \"1000000\",\n" + + " \"orders\": [\n" + + " {\n" + + " \"orderId\": \"1668458892612980737\",\n" + + " \"currency\": \"USDT\",\n" + + " \"principal\": \"100\",\n" + + " \"interest\": \"0\"\n" + + " }\n" + + " ],\n" + + " \"ltv\": {\n" + + " \"transferLtv\": \"0.6000\",\n" + + " \"onlyClosePosLtv\": \"0.7500\",\n" + + " \"delayedLiquidationLtv\": \"0.9000\",\n" + + " \"instantLiquidationLtv\": \"0.9500\",\n" + + " \"currentLtv\": \"0.0854\"\n" + + " },\n" + + " \"totalMarginAmount\": \"1170.36181573\",\n" + + " \"transferMarginAmount\": \"166.66666666\",\n" + + " \"margins\": [\n" + + " {\n" + + " \"marginCcy\": \"USDT\",\n" + + " \"marginQty\": \"1170.36181573\",\n" + + " \"marginFactor\": \"1.000000000000000000\"\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -60,6 +62,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -81,6 +84,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApiAutoGeneratedTest.java index 7c00fed0..975b10de 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApiAutoGeneratedTest.java @@ -11,23 +11,23 @@ class APIBrokerApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** getRebase Request Get Broker Rebate /api/v1/broker/api/rebase/download */ public static void testGetRebaseRequest() throws Exception { - String data = - "{\\\"begin\\\": \\\"20240610\\\", \\\"end\\\": \\\"20241010\\\", \\\"tradeType\\\":" - + " \\\"1\\\"}"; + String data = "{\"begin\": \"20240610\", \"end\": \"20241010\", \"tradeType\": \"1\"}"; GetRebaseReq obj = mapper.readValue(data, GetRebaseReq.class); } /** getRebase Response Get Broker Rebate /api/v1/broker/api/rebase/download */ public static void testGetRebaseResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"url\\\":" - + " \\\"https://kc-v2-promotion.s3.ap-northeast-1.amazonaws.com/broker/671aec522593f600019766d0_file.csv?X-Amz-Security-Token=IQo*********2cd90f14efb\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"url\":" + + " \"https://kc-v2-promotion.s3.ap-northeast-1.amazonaws.com/broker/671aec522593f600019766d0_file.csv?X-Amz-Security-Token=IQo*********2cd90f14efb\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -40,6 +40,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -61,6 +62,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApiAutoGeneratedTest.java index 3af6aeba..f3c38285 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApiAutoGeneratedTest.java @@ -11,47 +11,48 @@ class NDBrokerApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** submitKYC Request Submit KYC /api/kyc/ndBroker/proxyClient/submit */ public static void testSubmitKYCRequest() throws Exception { String data = - "{\\\"clientUid\\\": \\\"226383154\\\", \\\"firstName\\\": \\\"Kaylah\\\"," - + " \\\"lastName\\\": \\\"Padberg\\\", \\\"issueCountry\\\": \\\"JP\\\"," - + " \\\"birthDate\\\": \\\"2000-01-01\\\", \\\"expireDate\\\": \\\"2030-01-01\\\"," - + " \\\"identityType\\\": \\\"passport\\\", \\\"identityNumber\\\": \\\"55\\\"," - + " \\\"facePhoto\\\":" - + " \\\"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wgARCAKyArIDASIAAhEBAxEB/8QAHAABAAICAwEAAAAAAAAAAAAAAAYHAQUCAwQI/8QAGgEBAAMBAQEAAAAAAAAAAAAAAAEDBAIFBv/aAAwDAQACEAMQAAABtQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwZaCOFhddTQMu+OVHgsXxwYTn112LckVBZPqHv8AmGal0o5IwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdZ007qYwDBnDIxstcYAAAzgZm0IyfSW3+X7lJ2xkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQecac+b8bbaxMUWtouZguTvmceT3SWm2n8ZxdUAAAAzgW1Z/yvcBZIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHi4UieW5qp8VVly+Op5rX3Ura+vRTM5N7sZNPzzjONmUAAAAB29Qv+V/OH0UdoAAAAAAAAAAAAAAAAAAAAAAAAAAAADrqQsyv4NPOOoBZUn7KLaslMThFvH0LU/rnHHfLc1rZlfWOPPFffzlx5cd+MJAAAAAZuCn9yfSDGQAAAAAAAAAAAAAAAAAAAAAAAAAABx5ViROQeayaLePIy3Ojv1XUUV1m/LIbrqa2s19OXJTVyxLjy81Pfz1x5c9+Tqe3yHFlLAAAAGcZPovfV3YgAAAAAAAAAAAAAAAAAAAAAAAAAABx+cr3pmJt3vPP1APP6Evnfru3r1U5kWM5rtdsSDw+4in7U9juMR+QuZoPWXhSGzPjB3yAAAzjJYtyUndgAAAAAAAAAAAAAAAAAAAAAAAAAABoanuz595m8hg1AOjv4uuns5cup8nrOYByAEAlmir0pu+uKYNVAAADOMlhXPW1kgAAAAAAAAAAAAAAAAAAAAAAAAAACgb+hJ3baprZxaAr7AAAAAMZAFEWdTWmniNFQAADONuXfJOPIAAAAAAAAAAAAAAAAAAAAAAAAAAHE5dUcp46bIjUep6vNGZNm0BzIAAAFPd2l027NbunrlE93ThZwAAABm26o3MLZjGnk+K7U7X1aSvqz/d86Xx6OfZiQAAAAAAAAAAAAAAAAAAAAADo0dMomteSaO984tvqgnn3TCIcJp2qKwJNGbIsbsoWd1XT95vTT0ESEgKN0c2hO/LjGcdQAAABkkXE9dqd/f8v6OGcebeCNFAp/Xn1fnT3t0Hn9rDYclojWV2fR6mLHr7kDGQAAAAAAAAAAAAAAAAABD+NRTCc9vp9LBofJ17jztfh9cNvvJfzqO3Pn6J9k51sYmywqnncMtq5bze6+nRud9Sux75u3u+e/VzF9qNzE27SOz8NtetcudnHVjvynz59XOJ8TbeuLI9sJFoolcMelfz2jA8fQA6+2utlekm2kkv3/z7JsyMZQ0sVsTFN2ntukMYN17Ortr7AAAAAAAAAAAAAAAAQvlUExiw+Pp9Lzwvphe60cs8T1IndNB33nu6qHuij5mfZjvuo1RryeiQbMm5jWs9lOj2+j3w7nZ3S3POu/Ar0YZGMgzgkDOCJeH3ceq/FZFOXH5fl4HkaBqLeddDPFYn3HjduT2vLAAARGXYr719sfOH0D5Xpe8R0AAAAAAAAAAAAAAi3royYzPsev0sGMl9AEJmEQlng+rpczuoc9tkQqO2Be3NaXrXdfe4zX+v7jhKI/mNXVvs7KnWFG0EgAAAADMxD7npa6cXjjq8PT0VL3Sn7LyvX7j6PxgmAABCK7JurXdU2+iReXSUX3mM14AAAAAAAAAAAADw+2izTzTx7z0MWRqygARPddEK8n0bAiXjtHBpg2izNe7Onbx3yc99GgmcXs4mbo78fvM4c9gAAAAAABPMQuem7kw+RisO/o20eyTH1fhh3wAABrI3J4l5Po23VlqQP5f1eUa3sa+s8r6QGe4AAAAAAAAAAAACC1tmZaKO/J6fnhAADjXNkYqthOd/q/P2eTfxbxZ9c5QLOe6eRbwdXXMi2sH9kbJYivPi6UI12R3IGj58zuWs5Oti8OYn2vET7Xi4I2LWdcxt+Oi8ndPn3cXmmzxNdNGfX8wLKwAAAEOmLiytvBa1deftn0Ik8E75+nHz3Z+XRNQAAAAAAAAAAAPL6o0UlZUCnvo4Q05gAAAAAMdfaifN1e/ET4OOxQ1PDck6HrkSJjPTLETD+EzRMJxN0TB04JhHOaEQ70yhMR737J1zxzlZWAAAAAAAhkz0dN0LuKBWZ5foeOorqqtN07GOyIAAAAAAAAAAAV7YVPGslei33q+aFtQAAAAAAAAAAAAAAAAAAAAAA8sT6kLxTdNXj9l1ITCv5rDcmqx9weft4UvM/RKy/WAAAAAAAAAADz86JPVD7ShRKtl5PX7HlB1yAAAAAAAAAAAAAAAAAAAAABxredxbzt0wSZ8P7lL2PFdt9v4m3Ov0cMOlle3V5Pp8/J660460P0NCp8kAAAAAAAAAAYKx1kSuU7KduKqiV+jU7b2PLDrgAAAAAAAAAAAAAAAAAAAAADhXFleDPfsu2uNf8563fYUdlP0Hl4jUhrfqJhPvJ3+bv0sD8t3y3WQAAAAAAAAAAeD39J8+3DSl0HZH5AKVn/orTRTZiKyffh5mgRuo/DPPj2SHq0Si6R7mBuubd7KnnezLvRozgAAAAAAAADBlq9dXZJUZ2JtXHl3WEgAAGs2fl47is0r/ALc2nt32ps/HpzXErgfPUws7hzAAAAAAAAAAAAK5r36Hi5rNtVHgLm6Kg4G9iOy29tes0eevjoY56zj1SAirbaoc+vJYW/qa0vRwd405wAAAAAABC67NjDvHjzt+cFVgHqmMEzZXb+YNOfSwBZWIxx3J+mu/Xl077S7reU3VbY0t7qLcY5V9CM3fC7SkAAAAAAAAAAAAAA4cxAq3+hYL1Gqj2p0+jP5uOeOXS93isQmPuDhUFxREqlnBmcQf32cWjmu+vXlshXvt65mqJ+vviQtJ6O+dm8vZMdzhymMgA0tc77QeZ6ODNNpv7VKP6/oCAFfYzg5TyA7C2u0mM+r5isLPh+XTZ3ZSWz8/bbSouRbaovAmxoR7bmPZ2AAAAAAAAAAAAAAAABilrqrEqTGcGbMrLdF1OHMQ2V04abGcGZ5A7ZLQ48h4NVJBBfBZKIqvV3QmaE8/0GR878PotL5vz9Hj5w6vpTxnzLwInGccy7tnx5DGRR2s3uiHLjklvZM9ldVXWLE5FW6u85DX3Et9tHM6338yQAAAAAAAAAAAAAAAAAGv2A+XfPb9QmM4G238KybLW4Aydv0bCLOAAAAAAAHHkPl/yz2BDOBdG8o2fkz1sfr88XVnA5Yk5enuAAAAAAAAAAAAAAAAAAAAAAABWllj5b6vpSuCssSbyGkSWTlcWnOdyYyAAAAAAAAGk+ePqKIFC49XmDAzgM4z2GL71FhAAAAAAAAAAAAAAAAAAAAAAAAAAGGQAAAAAAAAAAABqqvuUfMHm+ptYfNfd9F7QpO0t8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEgAgAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgEgAgAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/xAAxEAABBAEBBwMDBAIDAQAAAAAEAQIDBQAGEBESExQwQBUgUCExNRYiI2AyMyQ0oCX/2gAIAQEAAQUC/wDXq97Y2k31fBkurIkyTVRS4upz8TU5+R6qKRYtWR4PqCvmyKaOZv8ASjLcMTH6qERTNUyOwowgpewOTMO4LUxMSV9yIav9GJnjHiuNQSleBVagIEyvsBzo/wChvcjG3lm6wJ9sIzph+2PPIPLR3zC2/wBC1fO6Kr92k1/5+ow0FL7mnr3ixP6DagssBLIKQAkCkIKiH06OzL+qjEj2aTb/AMzU8fHW93S9vz0/oBZEYsDEktrT+OGNkjH5ZRc8DZpQfgHtI+bXd1j3Mdp6y9QE+eNLhDiubSSznjn9IjiCOsnSgn17qa5Ql1iM8UusrJjXwRNghITfB3qg1wBsT2yR/NmHDhtP1TkcZdnPWVLAowqeTqfWwGLHJHPHdgKERWzMPBRN2x3+Pf0cbxwfMyPbGy31HI9wwRdg8PT8ESxsbGzNSHLKRmliXNKuoOfW6SmVJdi/Zfv3qgrpLD5hyo1t7avsJ6ekajERETZO/lwPcr3Zp/8ALqm9KJyxXOx32X79+jI6mr+X1dYqxumq5HJ7LX8bs0tErrDKdFW82Erwj41jnK4Wdqd3Rc3ED8s5UakznWNpDGkMXsIZzYJo3RSNarlpAOhEyEIeGfYcx0gdbTTETjDRDR5Y1UBiHhyBzdvRT9x3y1u/l1mmo+O091jVjnKBUjBORd/augusC7ejPyvy18nFT6VX/wCj7ZncDYXK5kjeJsDVb27mLk2Xa0UzfY/LFR84aof09r7XJvRE3J3NTbvVe1oqHhF+X1IKottVk9UD4VvNz7DtaeH6ap+X1RX9WFpw9B5vBvrBBB+1Vi9Yc1ERPl5HtYy15CH0NihUHc1GS6SyAvph2N1EGqGaj3pLI6WTtaRESCArUQMCyark3/qsjBdVRucIXAXH8iq7stLkcKIgk21mHod7CIJ60qotGGs7dx+U7se5HzklWLxqGV6Q04bE9MDwyijeg8pNSbXmxHD/AB00rIWWWp8KKIJWvEeZOMPGNGZZDi4dbsKia5Wurb9UyN7ZG9m7Tda92sr3myCixCs9lsC0yCnsX1pX6rixuqhlwW+AIxkjJE+Jt7aGuYWWVakQV0UEaI44wYeIOCyt3zLXUpBiQ6dEYjqEBUN045rRySAZQ9RRuweeMhnv1QMsZvcqK9TZIomRM9twV0odWIhL1qxlxaiHJadyZuLr3h6nJjyvtxDl+Gu7mMBkcc9iQMNGOy5fwB6Zi4pdQm5p6pa9uXNsS4uG0OHdW6gZKuoa5hA0EfNkWIkZRr4uLIdRwOyO1CfjJY3ptsQ2mjFDyDTdkSKKTAxXGEjQMHh9sj2xxmkPsTBoWjw7VRFSeuglwkGYZanUb4shkZLH8HfXDQGDwzHEQRMhjy/d+3T26OuHYp1ixqMb9sR3OsZI2SIYDyk09arxyN5J+TDQOTg45Vr5ce18L2El7kOPTPUT89VPTCS5ytnC5c5b85T85Eq4gsy4gEy4ytXGAwohg3IdpxsXQ+6/P41qBOW33L9csK3flJbyV0kUjZY/gb+4aDGNBKdPDE2GPZf/AOwBN2ntM/l8Idwj1qbzNhsXIIV6vmje17LInflePwIaTyWjDuIexqMbs3Jm5M3J2TWcY2mZ+Gf23dh00dSLzpezcCZpCw4XfAagtkAhHilOJgiZDHtv/wDdTtR9QHKoNi1Uclu/l1gs3IkZZpv66DgKnUmQmp5FRGU+OAEbmOlekccaOJIY1GN7zk3tqV4LT2WRrA4YY5TiYo2xM7KpvwlrgjgSGlCedeWzK2OGOawKghbBH7L/AP3UP4zUAOUd107dSzN9I08C0siejDlbahdCVTV48Qmo5Wx1gjGPkcRDG0olxChD8lngQfS02lztGgmklsCxIGjQ9u9i3xaLn3xebb2UdeN/PZGDQNHi9t+n8mn131qpvS1ZAwt7ZmwaSc3l5qcJ73D3BcERpk5r+gl3Nr5VwcRkS+CP9bPZLI2KOxMecRXiIPH2TbN7nq4xjQbReI9vGHpKTguPMMJjEHNImszQhmixe6/b+zTbt4N1YdNHUAKXJqKVvNhcQG4fUjkz9RCcNhYxEZEu6XxK362eKqIlzZdU6rB5admyesYVAO0gxURUvgmiz1knPBo38q48tc1HZ9cTViciL320XNDFMmFwIWU8hyxhBwNcWXuRUkCgfnpkeRBwx5Yt4C4HccPhL9qr8mv0y7suctSFv7Z8fNEpCkFMzVEqcFG3cLX/AJby9VWHTCVAvNl7DkRzTg3DvEt5h0trJDGVixRxI5F9lwz99a/iG8J3+Nc9sdhbWqkZWAca9yxrl4ozSoGq50kkcaRQ0jeO48u+mcVcDxpDD2d2TV48mPp25JVkNxRCWZzCI86udM64jJipJmjkvgT1GXPUZM9SdiWWepJiWLMSwixDoM62DOrgzqoM6qDOqgzqoM6yDOtgxT4cdYtx9g9cjiklcDWtj76tRctG8B5hPJChhnkwa4PFdSXbbBfIKl5AwCc4/wABY2LiwRLnSwZ0Y+dENi142LWi56UNi1I+ejw46nbno2ejOz0d+ejyZ6PJno8mejyYlM7EpsSnjxKodMjCHjxE3eDexLzFfKU4EZogxAsJDToHV59fP1IXj6jk5dPRs3lfMXEqME00LzCNmp/yOnvw3j60k4QKFv7PmLibmlVI/TA45yMaQ99hYiQoMN4+siWSz0zeEL5AieMdktu/iit38QxEZDNpUqQQUo/V2GzUhnBFo8Dx55mQRW97OW+aJ8T69NwXx7lRrZXyGlC0w0TCqYaVrVlAMY5Ht2Xk2+TTo3KBwqZo440UlnYjxNgh8WR7Y2XVnLZk1FW0Vt/+UE+gvx5+/otO7vUtmp0Tq6r/AKOSPSNkTHnHMajGZqI7myaUrumG8bV1jwt09X7m5eflYP8AR8e9qPZ/IAYHZjkMJsBh2kSyWJsMaRRZdz8EOlxvplwb0Y1EAtieibvGVdyTuWxtWNRjM1LErbCslSUP5AsVhTJqqdqziTQMo2s5WSORjJXPNNFhQceR7Y2GSyWVjUgMrxPGsF4QKFN9psuQ+sEDJeHNBNHO32SSMjbNbRNx1tOueqE4y2nTIbaJ2Me2RPhrFnGFQv8A5MtzOYungFYmajO4n6RruFnjzs5kI6uAsY3tkZss6uMzJIiQZRLVrsa9r0ywsEgyaZ8zvbDM+F4Fg0jxvtkh47MdbwpiXEWRnjPxFRU7Rf8A1aZ7YyD7FZcp6p0792W5vRi0detkcxqNb5GpKbnpX2UwKgnwmM2TRMmZZ1UEKRyvjxbMhY3LvX3tXctWZ1DPDNsmwrORLMvshnlhUKzSRfe+RjEktoGqXaOmjhikmfW0rYVxzka2wJfYG04Da8PyrOkFOw6jNDclgfBjrU5cUs6bIq8mXErYx4nLvdtgglnclEYqFgECeyCRYpIZEli8GyseLs1Z6xr7LCy5T+YWVkdQbJkOnv2j0okWRRsibs1FYZpOs3J5rmNdmp6vqRq4/kZHIyRt5NwxbQx3FThixiQ49qPbcg9ERto5t8PgWpHIH9n3xzHN9iZTE8yPbEjVOja1jPba2jBWUwD7M1jUa3z7fT8Rbp6w8N075Xrt0tAm7bqZnEBtEGmKkcNYQ51JkeMtCW424kxty3G20C4loMuNPGdiEQrnNjzjaub09tzJxmbamucdIKLCMxzUclzUIjdoMvJK22Ve90kRJQi+uG4t0auNuzEx90a7FIMKWvoDCXBCxhj/AAWsm7rPbpZ6dNt1PJwhbdGpvtcVEXJQxpckpK9+S6ZBfjtKQY/SeSaWLTH6fsWqtHZJno9jnpVgmdEc3OnsM5VhiqY3HuVzttbAgwW2xiSA3YmR26tZ6znrOLc5NaSSNggnMmp6WEQda8NcYCIxUaifC61HV0e2pL6Mtjmvbk0jYY7UxTSduiYf4++bv6Ta3/JPttul4rPbVUYRFaum6/P01X4mm69Mho6+JY42Rp8QeO0sSeJ0Mu0M8gTP1ARuLNnKXbGxZH1QnRA99yb0JiWAjbTloUFssCmiDSOV79iYDFyQ/jtVVLpk7OlqlY08HVofIP2glyBzD347knvx24aXIZLt06IpVn8hf0HOdJG6N3tYx0jqPT/A9Pp4VuEh4U8T4Jewxqudp6t6AT5E0AY1CtKyIstHYxr6UfkVJYSYLpWVVCrRQvFvqhthGRDIPL7o2Okfpyl6X+nnADmxn6YnjyWCWFdkcT5FA04WQlbVDAN/qKtRyPrgn4lYCmMY1if+Ir//xAAqEQABAwIEBgMBAAMAAAAAAAABAAIDETEEEhMhECAwQEFRFCJQMmGAkP/aAAgBAwEBPwH/AIRAVRYeAbVv5LTRZvBVEBRv44aSmx0ui7LZVzBMsj+Mxnk8DwjsmfjC/JpFUpxDQEQCnNp+E2/FuxRO9U415ZLfhtNR0ZD4/DBLUDXmLt1nPO2BxRw7grdy14dZWV0KhB4PK6/M1uY0CihDOOKLWmq12JsjXW7Uml1JMXbBYYfVX4OiLd15RiIsmh5sFn8LN/hO3VCspWm70m4eR3hSYV8YqVh4wBXjJJkCxM2Y04snc1NeHDbsiabqWXOeEH8hNVitRpRvsg4y/UKQ6LREy6gw4jG91lCyhZQqDjIKtIWHO1ODnZRVYvEV5Y35DVA137AmillzbccP/IRTdynt9LNtQKEyxj6tUEBrnkv0DZQXPDF4lE1NTyRxl9k/DOaoD9adhNLXYcmGd9VdRx5t1pvTmFm5TDVvRdZQeVicTQUCe8vNTy4KinaMlVH/AEevM/KOWKXIm4hqZiQBRDEhSTNcFDjGNYAUMdGvmRe18qL2vkR+1rs9rWZ7Wuz2vkx+1JjI6XT8RkBUkheeaOQsOyZPqbKAHcnr4k/boVKzFZ3e1qO9rVf7Wu9a718hy+Q5fIetd6Mrj56MJo7sJj9+4ArstB6Ipfhhmeewf/XcYNgJWk2ixkdEN0xuUU7B4+3cQS6ZQxlQsTIXGigZU17GSEPTo3NumML7JmHAutNvpGJpUkGXcdQROKMTh4VKcsf9KSIvemtyinZF7bIAC3LPHlNR0Y4y8pkbW8Xxh91JGWcGML7IYb2UIWt7MioomwZXV5ntzCiOG9L47lovWm70spWUqhVFE3K3lkbmbww7gDv+HRU59Jq0WIAC3+4n/8QALhEAAgECBAQGAgEFAAAAAAAAAQIAAxEEEiExBRATIBQiMEBQUTJBQhUjYYCQ/9oACAECAQE/Af8AhETbeCoDpyLWf4lxmmS2ol9IWu1/hy4EasTtMufeDyNaVNDB8NUqW0HJdTyq/lK28G/wpNhCb8hpOsLRmuYTeCNULQMREfMPgm29Khv8HUXKfRor+/gyVqeURly9wUEQU1HfV4jQp6XlPilBzaA329wBeMmQXMYtXNl2i06dOZlfSNRI2luxdu53FNczTG8QasbLtz4QtR6VjPDPGpMu/tQLmwlKiE1mPaH+2uUSkP2YHR9ItxpBWDGxEKJOjOj/AJiKV05XmYQ1FEWqraTiuKZn6f6HPB4U4h7fqYSgKS83oK0emUOvsgMxsJRohByxxsZW+5THlM6TCDbWCmEOYxRnOYypUzS8vLy/NTYzjCWqBvvlRpNVbKs4dgRRW3bUQOLRhY29gBeUaOTnxD9yg+dcplsi6Sm+usyG9zHCtuZUqaZV9ATjP8YqljYThXDukNd4AALDsqVAm8TFK0xK+a/sKFHLqezHUsxtCRSGRd4z9OwmemYrhtBDv6InGNWUThXDbedt4iBBYdvEg2U5ZwypVFbKZV1Uevh0zNftq0hUjYIg5pUwjE3hwplOiUa8eiSbidBp0WnSadNpkaZGnTadJotFrxcGKrhyNpTQILDuqUw41j4YU/MJiDsPXwo8voZRMgmRfqdNfqdFfqdBPqeHSeGSeGSeHSdBIKSj0a4ukJv69EWT3BNp4lICDqOWKfS3sE/Ee4x9Uouk/qFfPmzTh1Y1EB+4TKrZmv7BNV9xXo9QQ8Fp580wlIIukxD5Rb2NKuUiVFfaM4XePiT/ABnVb7i13Ep4gPofUNVRBVQ/uA37X/GUqoRNY75jf2QpvvGYnftw9XMLH0alQILmPWZ+aVWSU6gccncILmNi/qNXZvZq2U3EbEZlt3U3yG8GKEGKSCuhnUX7mYS4l5eV3zN20nytyxKkjSEfAXl5czMe8V3E67xmJ3/3E//EAEUQAAIAAwMGCwYEBgEDBQAAAAECAAMREiExBCIyQVFhEBMgIzAzQEJScZFQYnKBobEUksHRJDRgc4KiQ1OgsgVjg+Hx/9oACAEBAAY/Av8Au9bTsFXaY67jDsQVjmsmdviakc3JlL51Mf8ACP8AGP8Ah/LHOSpLDdURzuTMPhasCs3izscRalOrrtU1/ouk2cLXhW8xmyZx9IIySSE957zH8ROd/M9DakTHQ+6YC5QqzhtwMWZcyy/he4/0OZk5wiDWYaVk1ZcjCutuwBJ3PSRtxEWpD12qcR/QhZrgMYNCeIXQH68qY8u8y72G7pFmSWKuNYhZWU0TKPo39B2UNOMeyfLlzBqMv9YDSxSXMvps6Vcmy1s7BJh1+f8AQRkuaa1OwwZM0qWxzYWZVUQ4Vjn3aYfSFnZPWxWjDZwzm2J+sW9aMD034XKW5waDHXu/oF5s1qKog1uMw1O4QqkhVAoKmMxg3kYny9ZW7hmTj3zQfKMoX3D0wZCQwvBEUc8/Luffv9v8ZlDhV+8KqgrKBzEgpLo2WPp+5ujjaFrXfYxxtCKd5DAk5RRZuo7YmI413bxAoLMrW8JKliiqKRMG1T06Tho4MNogOhtKbwR7crlE1U3a4K5FL/zf9o701zizYCGYm3lBGl4YaZ/6jmSlvJZtKLAY0GxbotIwdDAmyrpTm6ndMS5jqGOBrti7DgPYHyRsUzl8vbRdyFUXkmGlZBmy/wDqazFoBmrjMYwGnsZp2YCAqAKo1DgOToebTHeeBpHccV+cThSpUWhE6VW4i1wnsEmbWi1o3l7ZLMaARYS7J10Rt3ws7LBVjeE2ecUFw4Zj+FSYLNeTeeCR8/tFDCqNZK8J7Dk8w42bJ+XtgZHKOkKzP2j8VOWvgH68nKf7Z4TMpci8CfG3DNbYp4KKpJ3RVpMwDevTTZWtHr6+1yTgIYjSnPduhZaaKinJmS/EpENLcUZbjAC3kxR+se9t27gadLl0mNieGciaTIQI/iFaVLXGoxixJQKOAmlib4hHFzR5Hb0k5PFLr6H/AO/a+VN/7ZhT4AW5YZ6q47yxbFWfxNqi7omA6xc5ekf+0fuPa+VgeCG3oeVdF8EQa9HPQYWq9HNfUJdPr7Xmy/EpWJBa7Osn7cq+LulemwdHPna2az6f/vtiZ4ZmesSpmulD59jnuMK3dHIU4kWz8/bHGp1sm/zEGRMPNzMNx7EZaEcc4u3Db0cmTqY3+UADD2wWdgqjWYmHI3tSiajdAlTDzyD8w29K6VzZdwgS5q8ao1k3xeJoOyzBXJZdPeaC8xizHWejfLZxC27lrsghWaaw8Ajm8lUebR/LyvrFMqkFN6GsW8nmBx7SvioYTZhwVTFHLTNijARWfMIbYsChII0XGuLD0WeNW3y6TKfj6YFhUbIVL2A0ZaC4fKAZ7hN2Ji9C52sY/l1iuTGw2w4QDerDFfEIE2SfMbD7PLzXCqNZgpkKf/I37RanzXfzMBFuGs7ICShQfeKM1p9iwZZycU2kxVSQdsCXlt48Y/WAyMGU6x0WU/F03hljFosyVpybutXRMFqFpZuZY/ln/NGdImjypFOO4ttky6KoysNoPsrPzppGagjOJPhQYCDMyjPIFaaoVVABY0A2RZS4C8mCmTkpK26zAdjxUo6zjHOGZMO80jq2Hk0WskmW/daDxbMjA3rFMqQodq3iLclw67ugE7uzB9elq10pcTASWKKNXKamm9ywxmaA+8YMPnFzuI5qYD5xaRnlHapgLlKLOG3AxZkvR/A1x9jmXLo2U6hs84Z3JYk5zmKIPMwR4jSJs090UEfhpZ+OFyrKRUYovBNkyXMtEazm4mOumHc98CXlYEtvEMIOUSl51LzTvCLNaExVba71gcZSau/GOelunlfF2UJ87oqjqw3HkNKbHunYYaXNWjDomM6aEVRXe3lFiUKD7CFlyhRRymdzRRjAs4YKsBE+e/kXxcLB92LYvA7y6oEvLqumAcYjzhXlsGQ4EexOLlUbKTgPDvgsxJrezmAksUHBKXziZMPiJhV1zHvgKooouA4LXimWvrFHUNFuVeuvdC5JlJqhzUOzdDqO5Mp9eAllA34RZl6zdF1DFDc0Zk6dTcxjr53rHXzY694HHtbphdwXAxon0jRPpHVt6R1bRgB84znA8ovq0XXqYtJpk5/L/DSjmjT8446YM44bugMzJx5rHFzatk5xXZ5QroaqwqD7CMqUa5Qwu93fBJY+8xgJLFFHDK8om71eJfkftwTW2KTC7uE2bhiIttiTUwGU1Bjik+ccY4vOEUXT+0Wm0du2KKKDhwjCMOhbdfEySe8KjlcVKPOt/qI4xxza/XouPlj4oORzTcb5f7ewTLlGuUtgPDvgliTW9mMBJYoORL+GFU4NaH1hHN1h6H9YBU1BjKT7hEW6VjPS7dBNr5RWlNkLlDV47Fhugy1164tvo/eCxwEX68YAXDpyIk/FTk1PWHREEm8m9jARBQDor4rLNCptKYlTl74r2+gzp7DNEMzsSTezGAiYffky/hiV8/vH4mUPj/eBIyqvFd1vDGY1RMIAI9YczltSkH1jNUyjtUxxVu3dWsSZvFhprLatGHUnOe4RzrALGmKbooLl2RU6Z7Cn939eQ018BFTpNgNkBF+Z29IkwYqaGJ8gnRNoduttfMOgu2Czm07YnZARPXbypR3Qm4mKG8QVyatNfnC2rQlNeNkT1tC2TWm7gXKZYqAKNCy5biyuFRCtPapFwjFYvoIrpN2KX/cH34WdzRRiYurYwVYqesOPRFZBou3bFsmcBtvixlP5omj3awB41I7a86caKsW20jco2CLI0tZ5cptl0Mux44qUeeb6RbfqQb98SpCYSxCTpdUJFxj+IkA70MaE3ypBWRkkqV71L4Wu3ssj4xwEm4COKknmR9YE2aM/UNnRTCPKCZl6oK02xQi6FaUKS31bIo15GbGTH36dt4uUeYl4e8dsW3HOH6dA1O7nQ/EtS1jGunecwSBRJYwgs19TaaKEXRo08o02jRqdphvWEbaOySPji+OIkHm+8dsCdNF3dH69HMQY0jP0HFk8EqVrrahjtaMm/vL9+2CRLNJs3/xjjHGYuG89CQcDBoCZeowFKo6eVIRJdpV7wMGrqHbfFxB5CPtFIA2djMSXc0UNeYMuRdK+8CbOGbqG3pTMkCtcViwk11GyKzGJJ1mAiYARkw9+vbJ19QrcWsLLGodHoWTtWMyafmIzaN5GOqf5Re0wR1hjT+kWXp6QbNL9sYLGCxoLF6fWOr+sXqYwaMT6Rp/SOsjrBHWCOsEdYI040vpHeMZqGLlURmKT5QHnZz7NnT3gQ912MB+8wugvJR2s61ECk52A7sy+OLmgS5+zUe0zZp7iloS1jW0ew3qvpHVp6R1Mv0jqU9I6lY6r6x1f1jBvWLi4+cabxdNPpHXf6x1w9I61Y61Y61I61I61Ivmj0jrv9YvmNF9s/OM2Uvzvi67sKTdVKRKl4kZqiFlL8ztMETZatBVG0c5TEmdrdQT2jKTtFn1gtsX2yRdVroaewuTDz4V+AfrGS/D2iUnieJrfL2zZGCXRLQ6WJ4CzGii8mM3GY1lREuSuCLTtEiVLcMUqWpqgHxGvtG1MMc0gpvjnUBG6LUs15DOflAtiqrnNw/hpbZzaXlD5ZMHuy/17O0yawVBiTBl5OxlyMLsWizNUq2NDEny9oEnAQBiSaKI51eMfaY5scU26CGuZTQiAy4HhWSO7eY4w6U2/5cDzXwUQFrnTGzjshJUsUVRQdmLuQFF5JixLrxNaIm2BMmi1P/8AGJny+0SvhHtCdTwwtfCeGWdZS+Jdd/AXbAXwBrdoCrcouHB+HlGqrpecfiZnWThduHZxkcprzfM/aBlU3SOgP14J3y+0S/hHtAqcDdAIuZTdvgZ4R9atFWmgnYt8WqXtgNkKi4DgEpcXx8omZQdeavAbPWtcsZ9eKXOc/pF3ZqwxH/LMu8oVRgBTgt6nWE2rcfaNHxGBjMo43RamrQYQzgc5Wh4CzGgEZgznNFEJKXBRBdzRRiY5sXsbKLAlppYsdp7PlBH/AE2+0Sfn9uGidYt6xRgad5YtS2ryauwUb45oFj6CLrA+UaQ9IvCt8o5wFDFUYEbvY83cKxMTaK8HFSjmjGPxM0XkZg4Pw0s5o0/OPxk1c5rpflt7Q6HvCkKXGdLajCAyGqnA8NsZk7xbfOM4NLbbFnKM0+KKqQRu4LEuhmfaKzGJPKtS2oYsvRZn37NfF8wHyvi5XMXo4jrAPOKg1HRzfhMOzkBbMFJObL26zAm5QpEoXgHvRdBI6xrlEc7a4pb3MBVFALu0tlWTDnu8viizpS9aGKy2o2tTjw2Zihl3wWlZQie45iqOw8oKki/Xr6G6LD9Yv17IUlC0+3VFZjk8mstyICTs1turoM91XzMUUM0MiJZUxZlIzHdAmZTR31LqHASxoBFRrNlFhZY0ze52ntZYji5vjWKqhmJ4pcU46YPiEdefQRTjZzeUVs2figzcoa3ZvoIJpyLMlCx3RWksf5Rz0s02i8chXXEQrrgR2Iy5Bu1t0IlTTmajs5JlyaFhiYoOMmbhHVWfiMc9OodiiM5TMPvGLMtFVdgHD+Fkn+4f0j8bPH9sH79uzlBgTcnXnJXdGsRxc2+X9otIwIhZY7155CykxMCXKF334CriqnERmV4ptHkNLJvBu7DRdN7uTdGcpHmOTxTnOXDy5CjKNG3nQBLAC6qcorKIaedXhjOrxYNZjQFUUAuHsBpuTkSpx/KYvkv8SXwOOLEjbyJs846I5AbwPyLGTpbelaRfKyhfkYvaYPOLyG8xF8tYzpR+Ri8OPlGkR8oumj53RdNT1jTX1jSHKK6lFORjZlDFoCykA364owBENPyUUpeyftyEfVW/kGbJvriIzHdNxjSX8saa/ljSU+axphfJY050zcIBmrxMvWWx9IWTJFFH19hodssfc8icmsNXkInjbkMdko/pwXiOcyeU3msX5Mo8rozeNl+TRm5RMHmIzMr9Ujm5kpvpF0kN5OI/lm9RH8rMj+Vnekfy+UD/ABMdVlP5THV5V6NGdx486xVjU8iWgxpU+fInS10Q13IAMqtN8dT/ALR1P+0XSv8AaKWE9KxZkyy7+6I59EmzWvaorTdF+SyT/gIqmTSR5IIuAHsWRlA7ua3IWYb0NzQGQ1U4HgLzDRRFvBBco5GUT9pCDsE6mNg/bkCByJ9NtORImTpRMxlqTaMaD/njCZ+eNBz/AJxUZOpPvGsUlqqjYB7JmyGwcYw8uYKMpoeRzT5vhOEdVKrHPPUbNXIVFvZjQCJUjWovO/sFDhEyU2KMV5CHvrmsOFpjY6htMFmvJv5EiX4UA9n/AIzJxVwM8bRt6IZZlC5x6tTq39i48aE778i3KPmNsc8rI3qI5lXc+gi3NPkNnIlXZks229otlGRUtnSl7fKCsxSrDURTlBUBLHUISfl2IvEv9+xvJNzYqd8NLmiy6mhHQhVFScBHOU4972/b2lTKJQbYdYgnJp6kag90X5Mx+G+P5Sd+WLsmYfFdAOUzlUbEvj+HlAHxa+y25YC5QMG27oMuchRxqPLCS1LMbgBH4jKgOPOiPB/R9nKEB36xDNkjiavhNzRSbLdD7wpw0lozHcKxanUkL72PpHMrV9btj/SVCKiM7JZJ/wABF2SSPyCKIoUbv+yL/8QALhABAAIABAIKAwEBAAMAAAAAAQARITFBUWFxECAwgZGhscHR8EBQ4fFggJCg/9oACAEBAAE/If8A69LI8Hs1oIQ4R/1cvOeQAfKOYd9mZEZHIfzA525/3OVED3GIri6HqqEWU1J55Qq+bB/xSzGx+mrKUAveh7wwYTM8glu2EwDkZdhc5jKCeHjf7sIG+jg0e6Df/DZtWmmLdYvqo4fgC6cUsLg/Mo3RsOcf8IpgO06EajPWXhu4xeqSmD4jqcveV2aBVsSJlkRy5XGDf/BBsAu7K+nUrpU1YvwSmsUgwWp937QUcGo7tfgD5RYf8CopXV2MGCFxRV4TVT9nTepjGxjD8wPSrVvgem7gHxEFfkjD37UiBcHEYn3f8Cba85uxxj/nP0/kYSxDIKMICpxxJSJa6cTE8yJj0MO9K/p8oSJeIczH2jn2rPVsKRghgqjyd79+t0KvPgDWb2MQru8ZgogtmH37xOM+wR3fyAq/HjA5zYRHl8WPFCy+JgxcbXTDkbzCgMlH6Dy7fFN9yYKsegJ+84Fsm1yM4VaHWzyh+mcI8zSCEoRGC4TCmpEYue0S8rrw0AinMxGZzAeUfENPcEXQgCgAyAroPgRz7fW55mrM7n1/dDLPIAIylTXtdo5OLSvFzgw1LkByCg6Hjj4T64dDNcnNh/ISPcDTGIfAScTB9Tp8tM7t8rx3xgwbBP3BsBWq0BFyqKHzpnZc8vppDQgZAV0/5zJFMtqOr0Wwd/UhPlJTMg9Plj8dPkpiXbk+bEYPb9wIe7AzDSKdgNNuQdT6XbpzWM3xcPnoUgyTyenHyrXlGcPJC5xIYpKbxO1Nt9MH8f26l0FrBzqjbReHgQ7KEe7q2hl4yRWTqHSAUooDWNsHIqCK1ov+dPmvSVK7i06HgIGMfF5vQucHh75rE/FHkdztH0PyB+3VpmU+FS//AKh79cS9uLTjecRbape5AFoeXZATM1rXbvj/AMFoXcF8MYATmI8TrLbmcJcM9ziZKfl7MTlYAOOPZpqT8Q+P294/OEXIjGaXB1RqFkKoUHa+IPw7M0dG5D9wQQpvGz87gE5u4sH8MHVqvIYe3Zr/AE2HpX7jADASHeEYmJj0/r211n1MHmwgXsmFvQ9BiwWaBQfuM3FS0EDruCqtqHCV6Kjbj2osiwyHhaw3euATnLLwUPvEU7HHORH0FbqdkQDSLsNHNvi+kwpiaHi4RSouM+0NXxYKA/sk5AFzOZ+yMqgDNYD+dOLoS8mu8H3fuwLWDCnDnecY1C5B7UTTxfDtPOO2dWtt3G0SLhFRy4AKuk/hBZvge0VG/NiZe9WoZRcuy2IWtMtbaf1+bQ5aJia9VPp8pj1XK8MphhOOmINcM3XiZ5sLe+MRacWO5Cxk2BpI5tgLEjIpQlj2SkePxLj2lTworyOMorOrmvfK6ipNFe5wZWkLbq9mVZ+Gnmnl7yoxLQ9eXnOce0fqqNZ51HN0hzOfp/OZ5JNCUdhLIytAC3rhmzIphGHwwTnMY4E8KCHlHIJ3S4qtDaHuYO1obKzcgn1jK0g9U10czsCCbrgw9K7QiWxXO4EJzlx1hYsJq33gtteNOcZZyUsMS40wq+BmpTsnCM3kCf8AOXIU3T/B7oP6VjhKODx/CWURaH7tM5bVzYomj7vaGAxBuefpMYweaPSW85tZJukMCjKOHIL0hxlkOMK+cfwcDOvtDUBXCFITlL3iPCddPMlERNDXiI0C2rQQMqXv90N7uCwemrkzeaRkz/Hj2NRTDnKvhcUCXdtcyXqZC79atF7TK+InFZQ5ss27fqIACOjL14rgPCYmcd9GEayy/wBKesFutqsf0j1geAN3xFf6i0oHz6G2yqXVoscgIu7xXJdvlCvFoZBFpbMr53qSlI4xkR02sYctteZwm9EHdGc1S4iAY+lFoXNymXCq2coHJXAQeinmlfvQ9xgzOEzE2d9SnaGcXI6TOMp4uIUd4VM65yEeWLjoKOq1EsWiYRDjRPl3dfX1YjXZHwweF0dcURyg0AfrUrKxxHv8ISasGp+iJlhg07vaICW3jupRAsLjfOMzcevxANvDglUfzJ3pPl0ZlOJNZBwdI5e7d3zQTJl9fAzmvCNhAsGxAsseUMncWKgYYNOngJwE4TsauZ4Eu3h3wdbRxZ+ZM2y5OqHY3lPhDzi7u1vr7ofoDgB3qboq4UelA+fU+lxmWuJ3qY1runLyQSgrE1IKLWE5pU191VXH4k4kaqrNmMCUgwBFo2xZwHl35Ri0VfByjUeHK9UyBycV1rYgVUCu34gFTZ/v4dV2wi8djkLLOhKDDoOyAILHODlEeiigiDg0dTx/PInizmBxY7J4xU4NfV1frcZ5v1ppWsgQF7DJxeB3JeoPwwfohRcYFTFl7yufeqmYDooaVnHGJLEzxw2mKuQd8bZhwWi5wLijCscEniYbp32vDh+CsDhg6i/3g6u0zOJVmA2mLC57roOyo1mDgzP8AuDg+h4/nNkMLbivglI1VtkPYhQc9zrd9J5ylbPzgMAmCMfWnLmGwlCGMXM7kKyi7uDPofPX5ma3Kemqi0SlhKAoJhnuFiVIucNPmOn4TumrdIIx7TSV4gNP7nDYjntuB2K0W5Ssd4Vzgg65PAygQrSuXOUdjkd2MxLo939vza0C712IrC1o5bUM4jx33r2aJMb4N6EFAIZmnfnMXpiu/YjCwy5kLp5ecTi4DqbMIDcKHky9XbwfmAAC3cv8y5jALUz/AA3JhxurefQzIC1dI1i9T8QsTOZo359lnjp5moeJiXkuMpMUVTtKQhw3DSJcYh8Z9Wbw9/zFRbpGx49M7z4QQDn8m3YJqXoSpBkWLijHFvSf2ZShRLSMQcLigB2TdPfDMX4ZSJW4kwHgNCbgB+HmTyaICqgzYbKo4Ov4jqmGZ2ZM4LHMxhddXHbjBsExHJJVbdy4GR7xlMmrwJ91t/MZRwOGmrxy8ZxiNoZQ64h2FMXkH1YYMYVi+UM0GOodIpJGI5CFeCN9SjSQbgOvw/IQ0V0mkt267VP8zjCX83LtcLZiDTlNLCW08cpawWKWwOqw0v7/ACx9oP5eiwDYMPW5km1dkhKQYK2eQRV0O8iuX5EdVwNRcyXA1YTIH8IVVA3ABcbE/wAWGv4bCnHzIhkvKDUh7NxTifdFZlHEeKD6PB6C+iz6bH+UxL+GO98UMYeBBOI5tQdDPGUB/ghZzOvl25K1PKUkokHhKayx4YIPLFzT3QazRwvLHGLDLEDg8Pj8ksmeCFx1q1c45/gIOePOIWrmJmz92P8AMxTOJb2YvR4orUcnFI3ehPiOh5M0c5xyfrnHSj/zWf5LP8xn+Yze8BmgU7v274fO8gJnjmxjiHf5oZog2CvwaoHOu0N+GCawpTAvxhllcM0xO/OMCtGr4SywBo0dfyNzD8QImnN+dXVr8ZP2wwzEDw+f/PXppgcbxjUfdv5Chuu8gfkle9T9yvMq8es1PDv3oKEGw5EVow/AZEWVTFeH5BQJArs1g8cJxWPZ7fscEc0NWXFHv2H5i4UnMBGp1HMpDvOksOtrXbz6RAGdXTZ3zGFT/R7eP44QnvJEymWZOc+0DIQajGVzn/YKHRWvCHy+HEhXiaYeExZ6Ll7yCVzpEQCwsem+GA7xmFOJ8Xv0OoYjm6Ef6bwmXV7iHQGA2/GNy7kATAPNRr3eMHYh3cBx4xXww+SCjt6X7DjC040weddIiHzDEv1MXoyDG0Mot54GvgQt6NGx0EF14zXb3TlAf3zz8Px3obKNtPdCJZlmh0PP+hHaGXsfsAFs7ES4rJbPiLmGYivPWbMWa0Q5jWZSZCzXRagkUVf1L0ApaL790OYycX/UAAKDCvxidZGLMGd7pbDygB0IcjoBMwiPEwfaUC4FXL9iUvMhzJR+fKfOBLO6hi9UA7cOinALWYwH2ImnuubqwFZ7TQgq1Bw33GWzKxez6fjrmYQ8UC9pbzdLoF9/bkf4hpMH/YJEdtTmdXjLBQ5N3sHsHJj/AAsXwrjSV5uzMnHuyv8ATkR2PdKNseD/AGMALudNWCic8Bv0VWtaeAltpAdNXehl+OGVlfeRYQ/yDAOFsNem/p2RhADszQ9+TKQDYZQi9ZKvos9xTzJFHqnEcLWEGm6vyfjKBUAZr0Gkp6YRrhm5TMlZsUhoSZJ2ep+xAEp2vMi6nIYMJkwV/mFMMmkCpOctd+6MsTmfhfH5gIBADQ/IcoOGDEtPDjMG6XQ1y2lEXIbpSO2guUTgvOdzE+9KWhIrDQiIra9ggKRNZcrgZ7PxBgFuwRXwBp4R6hvgO8PCHiLkc0G8uvfhIM6HqFEAMGlW2CmPQXK9TiGPO3hASCtVylBVOQNJQE4F/KEuYhjoZ8zWJCJwvXwzJnk7WepM17sPaAYI7n2i1qnVVGmgWwh4SuAW5GnUNs+zLntL64BxTFAfcPUXmkua7y5fhVVjLucot9e5aSWCfeHVojgC5Dwiy3hKnlEjKdRIyHnr82Y9vbC8CcnJI6RRZYwVmJcCZfm6nmBFxQ/GsOf3kfPaO8glPUYibN3BHpzKXPY1ZRWGKua3egfhaTUhiXHadNzqEP4oLo/g2jaDgasvqAqgrwnp/nVW9zNb9LSWLDJpwvGHGuTLK6uH1wDfM/EOFvxLe7KHDA2D89LmOlJKxeO0fNE4PxIIAdGsj01awvK1fbqDrwPjh1HbhVSDRND/AFKvGHuW+vQhIqv8lI1wneTzYx8zOuecyk8j6pmz7s/w8MgvfOIeMvqNoiHr1Etr/DHGVtLZi5sSIGiXKfjAcq1fh1NslOSGWHSY+tr3wlU8GvBmB7KaIchB5gTDliZ1ju14ERyrg67kVSDV6rd4/oqI2j9TD7mFRwT+dStXHyT6dR9A9RFQSgTjPJr2eflfRFrfCu9RiHw5Z9B9420/FfZKZ9WZs9gm94h8ccx3TY4GCoJtOjL2tkTOXNekzhz13is+lBEcR0maQu5p0qmDMQq8N+U+3+J9v8RKwR+tpXZnH3JYotMj4ldxjDHAivjUrUfcE8vwlfpBDwbynE+8epThwEbMEiSw1OgbpbViiiCzodStRmDli+p+Ag+UpztHpoWZXPLdQ15A+ADqFNGQ784vI+S6LZ9zSnN7V5VnIdaP1Lk1R4HR8Y3RYnfqYNn7QtRwpxGPzLc5YhwHd1ChoAarACpwNqs38AHC1gkz/odz0mcsQV4jU17+lOzR4RF2tqd3pFtE0J8rP16BODeho5diSsAWAxH1h+CxhFot4HB9nqUTClJkILNfUQH4LuFMyhQZDqCmID8D+1+wSyKaGNkHFxcJmcMtOthEUAtY4LG1f3wgpR+E/XgYZRRtkNHsU5KoM1jPSzg41t+yXtZhk8hmjKSt4kQHFUehiTXn4tXF0eqa1LlbxhGT6Viu9/FX5rwy7pmnLLrr4OitWUxoOW+Yf8dw1U4chlCHy/wHyj/ZhfVK6OBgmUMMnQXWMzZuF8f8k0EmYlxS1t4O3agNBNBX/sZP/HL/2gAMAwEAAgADAAAAEPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPNCPHLAOMPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPBJGHPPPLGNPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPODHYAlPPPPPCPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPMPIPFPPPPPPLFPPPPPPPPPPPPPPPPPPPPPPPPPPPPPNOvR6EYnvPPPPPFPPPPPPPPPPPPPPPPPPPPPPPPPPPPKETiSBAGs+8PPPPONPPPPPPPPPPPPPPPPPPPPPPPPPPPDM/PPrrvTjSXPPPKPPPPPPPPPPPPPPPPPPPPPPPPPPPPEdPLhBvPPvCnPPPKPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP/PPPPPPPIvPPPOPPPPPPPPPPPPPPPPPPPPPPPPPPPPOCdPPPPLGWDPPPPC4Sk/PPPPPPPPPPPPPPPPPPPPPPPy7JHXN/vPIPPPPPGclPYwUOPPPPPPPPPPPPPPPPPPOAlcrX4jYCt9j6kpjOcPfYpLrzwdPPPPPPPPPPPPPPPPFm9ycCZQ3Po/b/rPXvy/eSp/vvm0fPPPPPPPPPPPPPPJdPvXqtV63d/8A777777pf6yF/77L/AE888888888888884U2++J8ak28u+++++++ryOv++++elO88888888888888Xl+++taYej+1I3w3+zINfDe++++MAcU888888888888oq++++++N9Uv999dBxZsmdd++++++uHU888888888888k5+++++++++++++++++++++++/wDffpYvHPPPPPPPPPPOMpfvvvvvvvvvvvvvvvvvvvvvvJ7Nfk2dPPPPPPPPPPODBuPvvvvPPvvvvvvvvvvvvvvvviyc+3pHPPPPPPPPPPKNEGOeybPWffvvvvvvvvvddf8A7776owaCTzzzzzzzzzzyzzS6WuZzArnT77777777ZCCPz76bgQpzzzzzzzzzzzzzzwxCMyIobTHnvvHLHb57hQRw/wDbzpUE88888888888888888sUYie0UcMPMPtdK4oIQUodWZN8M88888888888888888s4s4c8Y888888840skc8gU88888888888888888888888cgcwQ8888888884YMcUI888888888888888888888888888c888888888888I8Uc888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888++++888888888888888888888888888888888888888+6A8++88888888888888888888888888888888888888uAM+++8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888/8QAIxEBAAICAQUBAQADAAAAAAAAAQARITFBECBAUWEwUHGAkP/aAAgBAwEBPxD/AIRJpAFvTI/yeKZjfBL3Uwkf42kgQF1Ll+ohymjH+KCQutRYjMHNY6lZiJv+GbBDBXSrKmSFdQIlldNApJdx/CVDqixg4Jbt7Tt/My3D+HmKgCzuQcui32heCD3VQ64iqfIUMsRThAM5brLdkIzBHXYEV9yBAC3L2QcVzYPFAXDvBBAwyuJaBAqagCLglqF3ZUteGZf2nPU+UH4YLymkii89hvUnWM4egpqIUtkvy8IBaPQahDL0lgrA1MNp1lUcLcEuGS3H0T5w9c+Uo6G56mT6dAsRUh2oMUweAAtjumuhFcMGycuEFxXAzKFkeZf/AIbdHf8Ali0WwKocR+yF6gS7uX2ceBe4uwK/INri7qiOJRSAE/HfGGfuE2jugI1fuJgAE/fHnPaj+RBlhwVE7JQyWp2RPMEgaRoF4T54jwiPGBQWgEvcsD3WKFiD2P3sB3imp9oHpn2QGAoA5n2h099k+3Qirll97jUACj97l5CukuLqK66Mi/AVryLEzWqA7OILUShg/dBD5G01MQJ0Tz/R4OYMMZoRCo9nYBB1VFG0j+QLgmmJlmFYPakFTCNQqngrW5vGa12+on8aAQWg6hUIrTropXQjVh4Z3IGT3Dei8olzEuInuE+J8Z8oJahh97TYYlNR0cpd6/g0SnqU9d67aT4Q2h/uJ//EACoRAQACAQIGAgEDBQAAAAAAAAEAESExQRAgMEBRYVBxoWCAgZCRscHh/9oACAECAQE/EP6EQG4SpwwPxO+aJei3KFmLW+H1tmAgqGRmOGHEaTUQ0+Ggttw0kI8JoTME0Jd/B3DEVvB2shkbxLmLqipvhiljCu3+CNslVwIsdeVZHwf87z08HBXwS0WzPmYip5TWARIpYSq5VAtiNrvqWAp9wBas7hFRHg6BhEb1Y5yZjKKNTkYlOZ41BLNV4+Yt8NqN4jsTQnavINtrGyH1MfUhN5KmQFMoK4AxNcRPmVgmziWSnmeyagxCjERx+R4ldjVh2iq0+uCDrDcFMq3ZHgWJ14f3Ul7IZqi66ioGuJoWWiRVRpLeZbzLeZbzLeFSwTdn+OAsssOg+3yzG3I7URl2CuiAbdeJ/KYr0jZh2ihkmIj4IPgdDVNP84TO1mQ1tX/XLoHuF6lFG/XMwhvvIjDeE9RBK5hlaR+ZRD0dZChG0Wo5fj/vNAfvqxMxkzdyy3rnc2lUVyCZ1lRFstS4HeWxF8E4ntHwz1T1T1T0QXaJGJkIeW3OgoUJ+T1CAtuvW3zz1FNpbtwl8KxbHpnpnonqgW00IgBp0AS4yt69R3AC2ZKuG2cK6d+uawUHruGbsFiFC102iINFwAuW0HWNYqE7gpmSGvG0Co+phTlmvYYByQC1C7UW0Kircbjc2gemoZYlSxSoAWPKRVzI2Y1yV2ALpKlMTCq65BrJPIR0hDGWXwYw4lyOKANkOq432TQLxlPM9ebsiNZuEF0gTee6UiCI/rlYqmuSG2EMPwFpbzPdPbL5bglDFt/2yKZUr9P/AP/EAC4QAQABAwMCBAcAAwADAAAAAAERACExQVFhcYEQkaGxIDBAUMHR8GDh8YCQoP/aAAgBAQABPxD/AOvRCJc1jtSvWLYqA9YZPookr9h9LD3U74PJ8yj18h7qnbOF/wACh6eype9jyo8f6o0Hurix5L0D6qwEWKncqT/CYGlkfkwHUl5op2B4UntOo+HLIdxgO89KMxllKbhgdilkv8RUt63Y2yvWM96GSEmXmhLyKPEoMcy6XeYWgEn+DJ7QIIvYOXgplYKqxTeXWtZfd0pXdrPjFvkzQ3qR4UYnrsNuxKUD0bw/xctzUn+BvjK1ABKvFJ4rczwg3RN8DFSPwu/gJdbEXIZ4lpSjPypoOeoQnDucNmk15YFpiU2epjbYN2xv/gSakgMsM7wOlKxdqKjihRh8CghEgHFofeh6xxA2A4uPzBpRGEcUXB0Uu1s7rgFnW92W5/wEtD1AaINS6Js70bFMVLWFkEbTDSJv9CzMAYtq0RyY+mT6qnVukUkgssMJdzFN2tKJjMb+G3pT8CGOwpnopz8xwzQzbDsOLtwXnUNy46f4A4aylBituLAUrUya49ugDmKDl8kAEAS7FWMMKUPKmvUEw/iCkEOlFQXoyTeVOqFBEzCdiD5irV1+aTN8MJkR0RoYMCwOCGmrZnSPvyxQ19IVLxhXXSgm0BuliDK0Cxgmo/yYhouV75gwTF4orslEe+7SbQIoVLQeVrB1Iox02tn2jYl2YcYqyeV7IoO3rNEFi7GyOr03qAgA621ede9LmHm6KcvzgISeaJDqRJyFBPmtKiRPvbilNsT2Bt3Ypk3VQYluDfeV7U9TCg5JdhwdikAewCWvvnL/AMqGWfI4zKyll1xUpKRZAWsQMHB6VCC+QmS49m48lPxJuoQumMRlbHFW9BfI4YneR6JQ+3QIBwFRUxuFnpWb5ww0MAHT5PYHcn/X70rMKUFlXasb2MesUtd0m2lXM9yS4VvLgloSVTZc5Bl8+1HtmDugCx4C6UItHKvGEbjxSzehOqEaMudZT0Km4PamHcdQTvSTFhuEkOpJ0KGfDUbvahB8vz2cgazA53gGe1EwkSR+8PK8eAuquCmbbyyxyLoaaZqDUibB0hq42Gs6WAMBANgKCKvU3oZTFx/FNXRFKjKr1adqhGd5o2rPQXE7JTO3w3AvcVEeChnAn0pyHK/PUbUuKRKys7Xrd3+8HkGeyexMS6xG7UpxB7CX53IOi7UIKav4TkJmzHXT4JSSZGCidYfJT2pDaM8B4qiST/Rv4oXaAs2Gp7FcPOF5pSSEEsjaKRH5ZUgSDNiR6/dw2CjtAJWrCES6SEux5VFME8APx8IxoUqTFiab2EK6KLiQaVOAKkgLDMWW7LzytNH18t8SywLEnaKiLZrSryoXumB3bUhveMmYv63zgDpRuauxKbpd/tqCJjLnmpXhAWXSKw9eaD4ZBzbJt7U/KKP+s9QHu+7s7gJTF1j1aDFYvRYj6loxR4vgBgIIWiIn8uaFs+TB4gQ85qHF3U+E2o+GKiKgkpuCgZ3wLdYdKKKIiZPlFJhm2H7uhBKdnBehTMQEbsseQ0fDGaWg7VJuZAQiSoViQRO9FBBNiZ70Z+SWopZoywEgedPyShgXA7KT3fdwgkXrkPzTp8NZFPSawJ+FMZMjQgmAFGKj5SsWpwUKTd2P4j5RQkWfSD7+j7wA4xh3vZB7IpesT290Se9GPig+XMb1JWdtxD8oFmgRv+q4nZDt94NnpyS2/TJOnNFzNIzYhOxhO4aXqxjHzUIkEsE/AghrAtZW2oc9Gpr6/KLiNWN0+Q+lA0KBgAgPvBXgk83K2Kby0rCK2RIcO0UIYZkRG7LgfPX5jUGImwJh1EqdikBFBpSGQxpJxMUCja69QUdgoW5Nxk7r2psylJVWnyRLT/aMhZlYAA45U4fJEzesI5Jq+GbTqdhFSLg4D80qc2tU8oEOi0bnuGaJslzufcrlfkQB1qXtwazwJA83SgNghQHbAO5zTGQUaHy9AjrWMMPQYt5wj6jSiDQ7EJf8mR0vR8qYrFdBpLfNQyONiJllpOJ0qC4kEwQBWILSyxlq8I5hBtsc6tApZe5PRBRpc7IfOaOKJZzdhyetBbuY3kqiyJqY0p67BLjCluTnDp9vCVqml3abEBYZN+bfyUicOQSPTB2KlYuuf9LgKPzYQk25lf7owp4ovNB3Z4pphuztoCz3vUhUykaImKKC6RwOBnqX4aFM0lg4T5LWQBR6APesPllYTSmFaKyPyL0zUkqz3fOXbFF3jE0IBoQf6zps1EuE8WYNJHXZTWsZUan66nD+Ibim4nUV56gqxgDdy1Sb/aFigN8bhixMECdXN4mKNSJXQDBY91eogkNkkvX24oIiCYLNg2C73rcrdzLmoh8LmCL3yOM75ir5aoVlZtyO6m96DEZu+QAHzWnS7EW81PSlqLVnJw2XFkOulRAQbckI9uK2jwajyr9k0EkJkvwyDwx8bUoIs7BEfzrT8sTT0CorK0be13Q7UTfIJY35Vby7/E9Q1jCL9h6xScN8gUwT2ZoJCNLnuNPecIvYpQg6r0SaLcJCw9lLPRoUuoYB1JXkdahbs9n8Zg1k1J9lQDW+reylmPTJkwS1O1okk9P0PQoyeZYX+X8UgELcZjKkt9BaLWHMeqkMcDEM6fm9So0LYOa4vLgxZWZKAVgWA0DFTpfqYQqb3ZsVzJjk7TjtFQM18y03z5OSnVfwXLimULjfEa0lj4c4dBxRkNop5lIwiDKA0NblGmm6yh+z6U6Q7CM6wKbKMCHyaBiEZxFTeHO1TUkXvSUsdF4eFq8FRJYOA6jp4Q/BFFRUtqQTlzYEFESmJW0zDDWN6TZK6usY5aLKDOusnVfiJKm1EBRYcGSDqvOr+ijeWDqrlf2LUYoKc1bTshI1PKoxYHnDyilCJxdFGqF+qY5qBawAhmJ2TfZrQ5pRo8P2NY2q66Wsoxy7aulXtQ+X/bsewUIkOdVqu7RQAN6m6AHu04/KX82KalS2bjSHQPlQ04gwAgA7USFYFpGvShwpUcAMRlO+fKiKRlTyNygozoNU2G1WDMMGMFhff0R6UgEYRLkZqGHijZyx+acnvQxOWOL1LxfR96WqBLfe4qdCsYb1okIN196m37r/AFQUH9BkqaqOBobADHFc3yoyRuVqb9qr351GC0dT9FHgV3fdThEupfiainiF90VwOijpH+6HMzouMYf69KUcxAmB0M9V+KMVPz+EpseB83pWMgBXXXq+3XwMfCIgUQjea1EmNhtn9fLajm47X0k85wetDRA5IhI/YVgmmomICJY5dmsbZadzWu/LlYscUEHADV3eefF5eDuGH4o1WfJYUaMxeqX4WsqR8CMukN/FSXQP5v3RbrSCBIQjqUhiiNocdGad9yoWS+9AINI66PrV4FIdZH4a0/skbKZe9J5o4aN3mjoL8yVqHNDNOwP6aLYpByTX/Jr/AJJX/FK7FFsWqXdpvUG1aRp4qGkuhGfSaFQIQ8tjsvl8RMLPDdPc6edJEtQOM7WXtWH+qD4WtKQc0UJJa7JpHiIfPeoGssixOS64cjq0pB+wYc9QCvZtg1eKUPl6ct7xlwH4LEjvIyrdcr/Wo8XZ5e6iekh4C+9TSQzE5peZo/gHpEJEdqmS1Lonq0kIEyoZ1qA76mTsxSE0LNjaU5G8LHO7T5kZidiBE5T6u1RawhkpcXO+lC5ryP4RSYxIg30Kuoq5ManQMUYWKAU/OkjDLuRTyFnI7Afy+EDISz1mMB/ypt8eiRv+goCEIL911eaPkRQVhIEkTpR0D/oTPkSHpTfSh0PYkdvrzIItEpicwZtljuSJW5KC++gG2xUf++6lqnVaMUU4oxXqXuq6omwETLTNvwehzSPY1QdovlbXOmElM0ITcPR1lzz0TY3IF5VHHLjfJVI8qKZMwLhMCS3tQ0ujmIgBtAQtRxDK1QU7A35KlmUYi9um7UKgwXIdCodvALq0XmrBkE8WlDB9A+ijI6KHxUiEAZMwDq1OI5/NAnAXfNoxRcK+5040p+WHyxArep61Mmt6cNnunX64HpkIh6u0hL+Uog4GT2BgwHQoJJBMV9RaCoPBxRikI1nyH+1ZH/M380V8UCRG0JSbhQjdrrlDvcb7IEfSYMSDE3bm9DEXkwQgbSxWuKikLRRFETS6LpbSoIME6GDGCfKNqBlBrMt4C0u/BtVrSoKkT0onu8z9qTBDQt0FR9BNqj2oZ5WungjMekCocaqTrApqp/FFgwXB6zbfeij4yZABKuhvQYnoLvToVAL9SdYhbU2XNgg9Ayc/9oTUlQXlse1TnI00YA/W7/VkMrG4raKW8VhwqDglV5WiAMVX2Dg0+NiS5nlBPZq9U2vhQ9ZqDgJSZ57Nh36jjBSTOT9zpO9XYu7MJAOAUiKKCRNy14w0azLS31vcoSWnJZ4m2pTViPveAlvd5oj5fLaS1LJlWjwn6C3pVHoQh6qKdKRaAGVqEygqCO8mzQ70qaGTEIfxtQVFBHxsZBQ8AvRasz0yUsBwuvYKRyOQkYREbcU2xBDEaRxcTvVjty8iLT2Q7VIu1k7X6yJ0AEq6FRpuqyYOjpwl1qJWbnKgnDd/1Tdo+KGxOX7BH0WgQ02EWmEkskt+adRFHJJMsuqvBUsrVF3Ylyq53aiRFRfUT1g606LELJHtTChfUYdsVkWP5tTZWEqvLHpUrMmByfupSZSesX+js6DRk3SgSglRgArMHYEFocI79KUrcFhWbI2286n5T22BxMoA7xHepSMJxNkXcPNomIKUSPSlAoRHSudV8lAfHYgE+c0xixZ+spm7pFys50uBxwp1atILSW6xWBHyALFidRIT1pOMzFJGy0T1obU2QJw2eY1Ja8symQ3An+irMYtCGC/nUm6V+yraPg0gRcJ5GT3oNZb6Nz3+F+Xp4Zr1/wBqAKViwCZpgfwPJ87cPOmiIsDdmo9mvTIRQfJaSRq9YnOLcbccUnISDT2kvJRAix65aVaksOblhleXNGdkA+1nST6pw0YjiFhNp1k71i10oiXV7q03o+Q2GJCJM1Jw2ZJ+WPSgpHoF6hKcQ3wKO8UMG6hDuTTFC7IeTSVneYfelrt6/rqI+qwEe3WhXiJJMbUann/3RWVn8a0W5d6XbqwfinNzt/rScN5D+qhgG8H80T5+n2q/7n6qBkPhL8V/S/qv6v0r+j9KAZen6KYi/k/VQzPwfopFNNgnvUEF39sDT3kQqK96mDbeVioOEhm86ZaAAAgKPlNFaetciAQ1GBapBCPzPlRwBGndEvYfahY0wBb4NORCEKhqwdka792mpneSL3MXveBH6ie+fRln/CnrNsdEt8ytKj5mKBn/AFWEnQmp8XdD7UA3zd/xSmVHf/VQXoiUpcOhPzS8odB/NYDkfs1oV0/YoG+dSmSB5V+KUeXr7JU9PM0QesX7pNfXqlx3aHS/k4on/k8qJ/QUIjsyfzSSQRrFEVLmbh71HTGsBPkFPmwIv1NRenRD0qKigj50pZ7UhU85fKh2ZDUKYO+PKpX8haxc7+gVPmgCnSxdkqCpf2BMrqRHanxIgClh3n6g5aAnP4RaiLN85UD80Yv9bBqKjisYox4I8Iox9EOa8bMGVOm+i0SYOdLIZ7exQcRVtcUlIJChv+iKnnTu+oELEfKtHnRJmndhX3Kn7vjNQgTumX6dq9lColO2O3gpzMCAJVelTbyEYkD5Qves4InGAS9bvf6deaOamIIAhbJbON634X84elEt9w2C4SV2DWnmHYEqeSFGB9kHzijVlIMPZeSjxOeiDdLPP0mpTZ7KyGx3lFtYa08J6BBUucW0o7HNM3sWbszEPkH6dNfUMB++NaBVVBoVyVwdkZvNQ4ChABIpp0q1sSfOr+fuBPmnYASvlVjMcwjY7avDQvPBNBYwBLdZaQRgZSp0k06R3p0EAmRok5Ew9GhsnG1HXwVBTNNHGZZCx2L96gt4RcEh93eoouh8V4OosHer3oUjLBtgHYK0Db1AjzcvP0zHlmgRKroBRhj2QVgIylsOBtq1cxWW8vY0T1BaZc14/kOtcbv0fcNY7DaL+k0UoIpO/wDBNGPAvwBgRMEL5PlT8lSBOwR4NZD+gXqZclmb8rp7FGNDKQAQHlW9D5XcAJLu7u8VOzIFSLsmdbOjqoIx9K4aZuUdXLWbnLoaNJbYArfmNw4ml10KkTTDFQSSUw9n3CcfO6EhKIfSOJfcWTlpNJiDQ6wrD14pxAyhOxxY71JBFOwPSdgle9FRAzzz3zUzUGJpE3B+32aUzDILwI8V4OzQYqPqTlQ6vgM9YojFvSS+RO77xLpRtBAGAMH0zCwcmxq1Ju0Ty0JdIeVGiGewQehTek4mm1CDrZdyvLCkbD0jz+4OKGCac1/JxSYJNke8I92nuwKbxJ0bYp4yJVOAnA/XgKxRmgZoxCrWhgfvvQvAVp1O43pe0mYA1WhQfIw3WmcTKtp2KtXu5LEFNhEBocr9P6wHBRKcvMdUi9b9qCx4EJXdQFqTueoUC0oehHGgpS9JZRx5B+FUe6ArG9x/0PQpOkaDvutbY9P1UI3qIvRomWNwe3eiqVofZ9RNTU/MZ0o4xvmzd+/OpxlhdiUUcHFTN9JrC2B1DP8AyjfhTZcy+UiOJ3ovV6dZRnLs5eXioWkEm944HAdhdaEA+n9HjxB961ROjAUzey35oUpWZA+HWh2wrYCWBriJyc1GuZiw2mBIY870zGiLk3k07ViMGAfKijU48mSzWMvE0tx3LwcGlYHjNDDR45mVuCYabhjCaLc8uKPpJoyjSiAqdk5iCjzLU0IR1AfWojukg7SVHDvYPVSKyNKUj3KPlQNFf89PXWXAHv01ESCwxh2OKgmJJiyc6b6zFEQgFgEBV3F2YaumXnBrTQnoks1s1qp5iVD4WaACAOAPqM1ppFYcYsAXAY7anqRSdzC1llcY4oeQ5AdvU5KbeGRapR64eaxv+ObexXeiPWj62RZTzMNKZWD2hIJ7UuZUqsr1pprT4Cl6pIGEpwSFNhpz1Nf90Y+izz3ijNHCgv2y+1Gy3fB6YFJdalippXenLheMn1VmmSRCg6k4fSiAoRuJ8X4zS7fQCkolkRPNn0p4m51jtgKekIS4TvGDlpmlgKT1ZehzmgAABAFjFNfVHAGq6FQRkMyiY7lZetFvnihcxN4LAW9Wj6mFmKkVv7ZUdLqzzUn3RhbKbnmG9M2laMzszQtuc76CtHlQMaSgIl8+hv6VHiM0+LSyy9KIIWQYJODilqfBWPBCpLVYHLUyDH/OE9ailPEXQRYeGGkjwmmKnhGO3ck70UUCjOWp2ZO1T9C8uFEw7zYc69Mypc0tT8JClMPlpVofy1CLZHkZ+BpNIedkNU3bcUvm1m6GiCCpIQpAB6z6UNVMwB3CfKlFX4DpAec0JEsAm3goqKweYMNhA6m7xG9KA37lGt2+DiXUoII+sQ6V0IbfupNoEESXgawSGpJdgrjGMLi3k1ONNK3aeK+zzTfAYDgg830qFPgIloKxmToFO4uGnUJq0GmlPQBeBMlGhIPlWq7ltMJz4jagwxnBQvHRHzqIonDn58boDq2PYY78UpLs+ITR1AwCVpOEtk91R4qGadoHKss0R2x0TxZlETpNMbKi5M22su00WtbAIbkVZcAnYrG1RHhjNqL7iKHQ6nc0NYKdDCy9y99KPkCJYEB5fXwIoLAK9KuC7tknpNZqWJlN7sd4qAqCnBPN6XgZKUIQNsgT4DlC49YCjzTy8SrkQJwApKblMoFkCOwihVBHSj0NEANxT6RWCfmQfVqyf4/cFZdOQelFn+LaTTwKfwQKZjpX7qHw/wDG9FT0gtDFm7KA4R6XrNYzSxU6vXIl6sdvEJQMtSXORF18t9h2qFm7xK7wS+1Z2rGHk1FoEDZ/0nybUnijTHcCz6NMQqR18S8GcwDqd05jP4PizdfbelRC+llZmrlE4FNjsBT1o8csV9ZpIYTI16XpUjfEknmTjIHO8It0w3zhdOv2GKYsFK4iC6gP4pZ8CZIzRJHTIQfNVMk+IlMVTc193xFCYuK9SqFceSElKyhut5pU3KufzaoSzZD1nrTxE0k/Mir82Y/qKkQ/C+9pU+FGsX0Kk5eNPYqzJ1YD+aPmD/JFLwYaH4ysMJsfrptXgRfinZcGpi86Szl3KvM0+FwphgFHIBXnboFOfAmwUKwmtF9EM2d/QnjAJpRGosqwBMS5qW2uW2tfAip/CkzPrM8rPSiBslKAnLAAvltVhbrGHVMG+q9Kmi26PxXOAye1BoA5CKhQBj7HPaiIuXVdCROopPGJKF6F1uog9o1qVP6ZEwz4LL4lGNOrpUP/AJy+svK57VPgVlzcDQWP4t8MVFR4R4R4GPFD4bdhA+dZVp4NMyAo7TWmxCPg994inqeIxU28RKVhggWjBWLH+N5pRsRsL9UlJu34sUMOMQfmj0oyEaLygqKPs8qSDCYr9gD2oWjzRAY8tuPEYpQYKBu2cdkpcBhkMneKE0VDStwWnnNLbxXnnGIgDqtJpNMW+85joH0AXgqNRyVODKDqoT3ifHBTZiYpIEC1gEzvO3jCoC+uhYG27Si1zyjK+vipAqsAa1M5J02RH1+3k70XyCwZkZNo2ukZ+QGR0xNNGYsCC7N0Y4S6kBH0GFqdPlyWABPJ5j8FkUHrtk9ZIShs4uvXCX7RT+Pks3uVv6VbrBqbQH3b+ILim5NAwOIPWCNpoID7eCDhpySzoTq2Ba4Oba24tLB1G9RUfA8fJcjYChlBbcjEjY63hsS6UMBAYPoigtCTXSeG48LS0SZ4PfrrUfBPwCo+TKGADVWhY0qjCYHUC7yv3GKMhlgXWzc6YqVJ1XE2vD1gommWD75jQRSPQ84oLvYGeYfepV9FhzaQA8w1Nl5nN9LKTGCDigBx9Gg0cC5iAjKabLMdKaGkRSbPI6JZpEyfEen6tbABlqHxCt5BldJz2LatCPukXqL1H07SJPaNZbNzpjcam9FbYNjUOstqMNmPwQVKgvQFlsPHYFp1fXQu4GO6UissIVto4GbAd6CP8Qgoi/QME2RpS+3VM94osIGRW9ygylAcHYqDb/02Pif4nPwH+IuKTqU/Af4m+Ef+DH//2Q==\\\"," - + " \\\"frontPhoto\\\":" - + " \\\"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQ....\\\"," - + " \\\"backendPhoto\\\":" - + " \\\"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQ....\\\"}"; + "{\"clientUid\": \"226383154\", \"firstName\": \"Kaylah\", \"lastName\": \"Padberg\"," + + " \"issueCountry\": \"JP\", \"birthDate\": \"2000-01-01\", \"expireDate\":" + + " \"2030-01-01\", \"identityType\": \"passport\", \"identityNumber\": \"55\"," + + " \"facePhoto\":" + + " \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wgARCAKyArIDASIAAhEBAxEB/8QAHAABAAICAwEAAAAAAAAAAAAAAAYHAQUCAwQI/8QAGgEBAAMBAQEAAAAAAAAAAAAAAAEDBAIFBv/aAAwDAQACEAMQAAABtQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwZaCOFhddTQMu+OVHgsXxwYTn112LckVBZPqHv8AmGal0o5IwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdZ007qYwDBnDIxstcYAAAzgZm0IyfSW3+X7lJ2xkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQecac+b8bbaxMUWtouZguTvmceT3SWm2n8ZxdUAAAAzgW1Z/yvcBZIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHi4UieW5qp8VVly+Op5rX3Ura+vRTM5N7sZNPzzjONmUAAAAB29Qv+V/OH0UdoAAAAAAAAAAAAAAAAAAAAAAAAAAAADrqQsyv4NPOOoBZUn7KLaslMThFvH0LU/rnHHfLc1rZlfWOPPFffzlx5cd+MJAAAAAZuCn9yfSDGQAAAAAAAAAAAAAAAAAAAAAAAAAABx5ViROQeayaLePIy3Ojv1XUUV1m/LIbrqa2s19OXJTVyxLjy81Pfz1x5c9+Tqe3yHFlLAAAAGcZPovfV3YgAAAAAAAAAAAAAAAAAAAAAAAAAABx+cr3pmJt3vPP1APP6Evnfru3r1U5kWM5rtdsSDw+4in7U9juMR+QuZoPWXhSGzPjB3yAAAzjJYtyUndgAAAAAAAAAAAAAAAAAAAAAAAAAABoanuz595m8hg1AOjv4uuns5cup8nrOYByAEAlmir0pu+uKYNVAAADOMlhXPW1kgAAAAAAAAAAAAAAAAAAAAAAAAAACgb+hJ3baprZxaAr7AAAAAMZAFEWdTWmniNFQAADONuXfJOPIAAAAAAAAAAAAAAAAAAAAAAAAAAHE5dUcp46bIjUep6vNGZNm0BzIAAAFPd2l027NbunrlE93ThZwAAABm26o3MLZjGnk+K7U7X1aSvqz/d86Xx6OfZiQAAAAAAAAAAAAAAAAAAAAADo0dMomteSaO984tvqgnn3TCIcJp2qKwJNGbIsbsoWd1XT95vTT0ESEgKN0c2hO/LjGcdQAAABkkXE9dqd/f8v6OGcebeCNFAp/Xn1fnT3t0Hn9rDYclojWV2fR6mLHr7kDGQAAAAAAAAAAAAAAAAABD+NRTCc9vp9LBofJ17jztfh9cNvvJfzqO3Pn6J9k51sYmywqnncMtq5bze6+nRud9Sux75u3u+e/VzF9qNzE27SOz8NtetcudnHVjvynz59XOJ8TbeuLI9sJFoolcMelfz2jA8fQA6+2utlekm2kkv3/z7JsyMZQ0sVsTFN2ntukMYN17Ortr7AAAAAAAAAAAAAAAAQvlUExiw+Pp9Lzwvphe60cs8T1IndNB33nu6qHuij5mfZjvuo1RryeiQbMm5jWs9lOj2+j3w7nZ3S3POu/Ar0YZGMgzgkDOCJeH3ceq/FZFOXH5fl4HkaBqLeddDPFYn3HjduT2vLAAARGXYr719sfOH0D5Xpe8R0AAAAAAAAAAAAAAi3royYzPsev0sGMl9AEJmEQlng+rpczuoc9tkQqO2Be3NaXrXdfe4zX+v7jhKI/mNXVvs7KnWFG0EgAAAADMxD7npa6cXjjq8PT0VL3Sn7LyvX7j6PxgmAABCK7JurXdU2+iReXSUX3mM14AAAAAAAAAAAADw+2izTzTx7z0MWRqygARPddEK8n0bAiXjtHBpg2izNe7Onbx3yc99GgmcXs4mbo78fvM4c9gAAAAAABPMQuem7kw+RisO/o20eyTH1fhh3wAABrI3J4l5Po23VlqQP5f1eUa3sa+s8r6QGe4AAAAAAAAAAAACC1tmZaKO/J6fnhAADjXNkYqthOd/q/P2eTfxbxZ9c5QLOe6eRbwdXXMi2sH9kbJYivPi6UI12R3IGj58zuWs5Oti8OYn2vET7Xi4I2LWdcxt+Oi8ndPn3cXmmzxNdNGfX8wLKwAAAEOmLiytvBa1deftn0Ik8E75+nHz3Z+XRNQAAAAAAAAAAAPL6o0UlZUCnvo4Q05gAAAAAMdfaifN1e/ET4OOxQ1PDck6HrkSJjPTLETD+EzRMJxN0TB04JhHOaEQ70yhMR737J1zxzlZWAAAAAAAhkz0dN0LuKBWZ5foeOorqqtN07GOyIAAAAAAAAAAAV7YVPGslei33q+aFtQAAAAAAAAAAAAAAAAAAAAAA8sT6kLxTdNXj9l1ITCv5rDcmqx9weft4UvM/RKy/WAAAAAAAAAADz86JPVD7ShRKtl5PX7HlB1yAAAAAAAAAAAAAAAAAAAAABxredxbzt0wSZ8P7lL2PFdt9v4m3Ov0cMOlle3V5Pp8/J660460P0NCp8kAAAAAAAAAAYKx1kSuU7KduKqiV+jU7b2PLDrgAAAAAAAAAAAAAAAAAAAAADhXFleDPfsu2uNf8563fYUdlP0Hl4jUhrfqJhPvJ3+bv0sD8t3y3WQAAAAAAAAAAeD39J8+3DSl0HZH5AKVn/orTRTZiKyffh5mgRuo/DPPj2SHq0Si6R7mBuubd7KnnezLvRozgAAAAAAAADBlq9dXZJUZ2JtXHl3WEgAAGs2fl47is0r/ALc2nt32ps/HpzXErgfPUws7hzAAAAAAAAAAAAK5r36Hi5rNtVHgLm6Kg4G9iOy29tes0eevjoY56zj1SAirbaoc+vJYW/qa0vRwd405wAAAAAABC67NjDvHjzt+cFVgHqmMEzZXb+YNOfSwBZWIxx3J+mu/Xl077S7reU3VbY0t7qLcY5V9CM3fC7SkAAAAAAAAAAAAAA4cxAq3+hYL1Gqj2p0+jP5uOeOXS93isQmPuDhUFxREqlnBmcQf32cWjmu+vXlshXvt65mqJ+vviQtJ6O+dm8vZMdzhymMgA0tc77QeZ6ODNNpv7VKP6/oCAFfYzg5TyA7C2u0mM+r5isLPh+XTZ3ZSWz8/bbSouRbaovAmxoR7bmPZ2AAAAAAAAAAAAAAAABilrqrEqTGcGbMrLdF1OHMQ2V04abGcGZ5A7ZLQ48h4NVJBBfBZKIqvV3QmaE8/0GR878PotL5vz9Hj5w6vpTxnzLwInGccy7tnx5DGRR2s3uiHLjklvZM9ldVXWLE5FW6u85DX3Et9tHM6338yQAAAAAAAAAAAAAAAAAGv2A+XfPb9QmM4G238KybLW4Aydv0bCLOAAAAAAAHHkPl/yz2BDOBdG8o2fkz1sfr88XVnA5Yk5enuAAAAAAAAAAAAAAAAAAAAAAABWllj5b6vpSuCssSbyGkSWTlcWnOdyYyAAAAAAAAGk+ePqKIFC49XmDAzgM4z2GL71FhAAAAAAAAAAAAAAAAAAAAAAAAAAGGQAAAAAAAAAAABqqvuUfMHm+ptYfNfd9F7QpO0t8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEgAgAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgEgAgAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/xAAxEAABBAEBBwMDBAIDAQAAAAAEAQIDBQAGEBESExQwQBUgUCExNRYiI2AyMyQ0oCX/2gAIAQEAAQUC/wDXq97Y2k31fBkurIkyTVRS4upz8TU5+R6qKRYtWR4PqCvmyKaOZv8ASjLcMTH6qERTNUyOwowgpewOTMO4LUxMSV9yIav9GJnjHiuNQSleBVagIEyvsBzo/wChvcjG3lm6wJ9sIzph+2PPIPLR3zC2/wBC1fO6Kr92k1/5+ow0FL7mnr3ixP6DagssBLIKQAkCkIKiH06OzL+qjEj2aTb/AMzU8fHW93S9vz0/oBZEYsDEktrT+OGNkjH5ZRc8DZpQfgHtI+bXd1j3Mdp6y9QE+eNLhDiubSSznjn9IjiCOsnSgn17qa5Ql1iM8UusrJjXwRNghITfB3qg1wBsT2yR/NmHDhtP1TkcZdnPWVLAowqeTqfWwGLHJHPHdgKERWzMPBRN2x3+Pf0cbxwfMyPbGy31HI9wwRdg8PT8ESxsbGzNSHLKRmliXNKuoOfW6SmVJdi/Zfv3qgrpLD5hyo1t7avsJ6ekajERETZO/lwPcr3Zp/8ALqm9KJyxXOx32X79+jI6mr+X1dYqxumq5HJ7LX8bs0tErrDKdFW82Erwj41jnK4Wdqd3Rc3ED8s5UakznWNpDGkMXsIZzYJo3RSNarlpAOhEyEIeGfYcx0gdbTTETjDRDR5Y1UBiHhyBzdvRT9x3y1u/l1mmo+O091jVjnKBUjBORd/augusC7ejPyvy18nFT6VX/wCj7ZncDYXK5kjeJsDVb27mLk2Xa0UzfY/LFR84aof09r7XJvRE3J3NTbvVe1oqHhF+X1IKottVk9UD4VvNz7DtaeH6ap+X1RX9WFpw9B5vBvrBBB+1Vi9Yc1ERPl5HtYy15CH0NihUHc1GS6SyAvph2N1EGqGaj3pLI6WTtaRESCArUQMCyark3/qsjBdVRucIXAXH8iq7stLkcKIgk21mHod7CIJ60qotGGs7dx+U7se5HzklWLxqGV6Q04bE9MDwyijeg8pNSbXmxHD/AB00rIWWWp8KKIJWvEeZOMPGNGZZDi4dbsKia5Wurb9UyN7ZG9m7Tda92sr3myCixCs9lsC0yCnsX1pX6rixuqhlwW+AIxkjJE+Jt7aGuYWWVakQV0UEaI44wYeIOCyt3zLXUpBiQ6dEYjqEBUN045rRySAZQ9RRuweeMhnv1QMsZvcqK9TZIomRM9twV0odWIhL1qxlxaiHJadyZuLr3h6nJjyvtxDl+Gu7mMBkcc9iQMNGOy5fwB6Zi4pdQm5p6pa9uXNsS4uG0OHdW6gZKuoa5hA0EfNkWIkZRr4uLIdRwOyO1CfjJY3ptsQ2mjFDyDTdkSKKTAxXGEjQMHh9sj2xxmkPsTBoWjw7VRFSeuglwkGYZanUb4shkZLH8HfXDQGDwzHEQRMhjy/d+3T26OuHYp1ixqMb9sR3OsZI2SIYDyk09arxyN5J+TDQOTg45Vr5ce18L2El7kOPTPUT89VPTCS5ytnC5c5b85T85Eq4gsy4gEy4ytXGAwohg3IdpxsXQ+6/P41qBOW33L9csK3flJbyV0kUjZY/gb+4aDGNBKdPDE2GPZf/AOwBN2ntM/l8Idwj1qbzNhsXIIV6vmje17LInflePwIaTyWjDuIexqMbs3Jm5M3J2TWcY2mZ+Gf23dh00dSLzpezcCZpCw4XfAagtkAhHilOJgiZDHtv/wDdTtR9QHKoNi1Uclu/l1gs3IkZZpv66DgKnUmQmp5FRGU+OAEbmOlekccaOJIY1GN7zk3tqV4LT2WRrA4YY5TiYo2xM7KpvwlrgjgSGlCedeWzK2OGOawKghbBH7L/AP3UP4zUAOUd107dSzN9I08C0siejDlbahdCVTV48Qmo5Wx1gjGPkcRDG0olxChD8lngQfS02lztGgmklsCxIGjQ9u9i3xaLn3xebb2UdeN/PZGDQNHi9t+n8mn131qpvS1ZAwt7ZmwaSc3l5qcJ73D3BcERpk5r+gl3Nr5VwcRkS+CP9bPZLI2KOxMecRXiIPH2TbN7nq4xjQbReI9vGHpKTguPMMJjEHNImszQhmixe6/b+zTbt4N1YdNHUAKXJqKVvNhcQG4fUjkz9RCcNhYxEZEu6XxK362eKqIlzZdU6rB5admyesYVAO0gxURUvgmiz1knPBo38q48tc1HZ9cTViciL320XNDFMmFwIWU8hyxhBwNcWXuRUkCgfnpkeRBwx5Yt4C4HccPhL9qr8mv0y7suctSFv7Z8fNEpCkFMzVEqcFG3cLX/AJby9VWHTCVAvNl7DkRzTg3DvEt5h0trJDGVixRxI5F9lwz99a/iG8J3+Nc9sdhbWqkZWAca9yxrl4ozSoGq50kkcaRQ0jeO48u+mcVcDxpDD2d2TV48mPp25JVkNxRCWZzCI86udM64jJipJmjkvgT1GXPUZM9SdiWWepJiWLMSwixDoM62DOrgzqoM6qDOqgzqoM6yDOtgxT4cdYtx9g9cjiklcDWtj76tRctG8B5hPJChhnkwa4PFdSXbbBfIKl5AwCc4/wABY2LiwRLnSwZ0Y+dENi142LWi56UNi1I+ejw46nbno2ejOz0d+ejyZ6PJno8mejyYlM7EpsSnjxKodMjCHjxE3eDexLzFfKU4EZogxAsJDToHV59fP1IXj6jk5dPRs3lfMXEqME00LzCNmp/yOnvw3j60k4QKFv7PmLibmlVI/TA45yMaQ99hYiQoMN4+siWSz0zeEL5AieMdktu/iit38QxEZDNpUqQQUo/V2GzUhnBFo8Dx55mQRW97OW+aJ8T69NwXx7lRrZXyGlC0w0TCqYaVrVlAMY5Ht2Xk2+TTo3KBwqZo440UlnYjxNgh8WR7Y2XVnLZk1FW0Vt/+UE+gvx5+/otO7vUtmp0Tq6r/AKOSPSNkTHnHMajGZqI7myaUrumG8bV1jwt09X7m5eflYP8AR8e9qPZ/IAYHZjkMJsBh2kSyWJsMaRRZdz8EOlxvplwb0Y1EAtieibvGVdyTuWxtWNRjM1LErbCslSUP5AsVhTJqqdqziTQMo2s5WSORjJXPNNFhQceR7Y2GSyWVjUgMrxPGsF4QKFN9psuQ+sEDJeHNBNHO32SSMjbNbRNx1tOueqE4y2nTIbaJ2Me2RPhrFnGFQv8A5MtzOYungFYmajO4n6RruFnjzs5kI6uAsY3tkZss6uMzJIiQZRLVrsa9r0ywsEgyaZ8zvbDM+F4Fg0jxvtkh47MdbwpiXEWRnjPxFRU7Rf8A1aZ7YyD7FZcp6p0792W5vRi0detkcxqNb5GpKbnpX2UwKgnwmM2TRMmZZ1UEKRyvjxbMhY3LvX3tXctWZ1DPDNsmwrORLMvshnlhUKzSRfe+RjEktoGqXaOmjhikmfW0rYVxzka2wJfYG04Da8PyrOkFOw6jNDclgfBjrU5cUs6bIq8mXErYx4nLvdtgglnclEYqFgECeyCRYpIZEli8GyseLs1Z6xr7LCy5T+YWVkdQbJkOnv2j0okWRRsibs1FYZpOs3J5rmNdmp6vqRq4/kZHIyRt5NwxbQx3FThixiQ49qPbcg9ERto5t8PgWpHIH9n3xzHN9iZTE8yPbEjVOja1jPba2jBWUwD7M1jUa3z7fT8Rbp6w8N075Xrt0tAm7bqZnEBtEGmKkcNYQ51JkeMtCW424kxty3G20C4loMuNPGdiEQrnNjzjaub09tzJxmbamucdIKLCMxzUclzUIjdoMvJK22Ve90kRJQi+uG4t0auNuzEx90a7FIMKWvoDCXBCxhj/AAWsm7rPbpZ6dNt1PJwhbdGpvtcVEXJQxpckpK9+S6ZBfjtKQY/SeSaWLTH6fsWqtHZJno9jnpVgmdEc3OnsM5VhiqY3HuVzttbAgwW2xiSA3YmR26tZ6znrOLc5NaSSNggnMmp6WEQda8NcYCIxUaifC61HV0e2pL6Mtjmvbk0jYY7UxTSduiYf4++bv6Ta3/JPttul4rPbVUYRFaum6/P01X4mm69Mho6+JY42Rp8QeO0sSeJ0Mu0M8gTP1ARuLNnKXbGxZH1QnRA99yb0JiWAjbTloUFssCmiDSOV79iYDFyQ/jtVVLpk7OlqlY08HVofIP2glyBzD347knvx24aXIZLt06IpVn8hf0HOdJG6N3tYx0jqPT/A9Pp4VuEh4U8T4Jewxqudp6t6AT5E0AY1CtKyIstHYxr6UfkVJYSYLpWVVCrRQvFvqhthGRDIPL7o2Okfpyl6X+nnADmxn6YnjyWCWFdkcT5FA04WQlbVDAN/qKtRyPrgn4lYCmMY1if+Ir//xAAqEQABAwIEBgMBAAMAAAAAAAABAAIDETEEEhMhECAwQEFRFCJQMmGAkP/aAAgBAwEBPwH/AIRAVRYeAbVv5LTRZvBVEBRv44aSmx0ui7LZVzBMsj+Mxnk8DwjsmfjC/JpFUpxDQEQCnNp+E2/FuxRO9U415ZLfhtNR0ZD4/DBLUDXmLt1nPO2BxRw7grdy14dZWV0KhB4PK6/M1uY0CihDOOKLWmq12JsjXW7Uml1JMXbBYYfVX4OiLd15RiIsmh5sFn8LN/hO3VCspWm70m4eR3hSYV8YqVh4wBXjJJkCxM2Y04snc1NeHDbsiabqWXOeEH8hNVitRpRvsg4y/UKQ6LREy6gw4jG91lCyhZQqDjIKtIWHO1ODnZRVYvEV5Y35DVA137AmillzbccP/IRTdynt9LNtQKEyxj6tUEBrnkv0DZQXPDF4lE1NTyRxl9k/DOaoD9adhNLXYcmGd9VdRx5t1pvTmFm5TDVvRdZQeVicTQUCe8vNTy4KinaMlVH/AEevM/KOWKXIm4hqZiQBRDEhSTNcFDjGNYAUMdGvmRe18qL2vkR+1rs9rWZ7Wuz2vkx+1JjI6XT8RkBUkheeaOQsOyZPqbKAHcnr4k/boVKzFZ3e1qO9rVf7Wu9a718hy+Q5fIetd6Mrj56MJo7sJj9+4ArstB6Ipfhhmeewf/XcYNgJWk2ixkdEN0xuUU7B4+3cQS6ZQxlQsTIXGigZU17GSEPTo3NumML7JmHAutNvpGJpUkGXcdQROKMTh4VKcsf9KSIvemtyinZF7bIAC3LPHlNR0Y4y8pkbW8Xxh91JGWcGML7IYb2UIWt7MioomwZXV5ntzCiOG9L47lovWm70spWUqhVFE3K3lkbmbww7gDv+HRU59Jq0WIAC3+4n/8QALhEAAgECBAQGAgEFAAAAAAAAAQIAAxEEEiExBRATIBQiMEBQUTJBQhUjYYCQ/9oACAECAQE/Af8AhETbeCoDpyLWf4lxmmS2ol9IWu1/hy4EasTtMufeDyNaVNDB8NUqW0HJdTyq/lK28G/wpNhCb8hpOsLRmuYTeCNULQMREfMPgm29Khv8HUXKfRor+/gyVqeURly9wUEQU1HfV4jQp6XlPilBzaA329wBeMmQXMYtXNl2i06dOZlfSNRI2luxdu53FNczTG8QasbLtz4QtR6VjPDPGpMu/tQLmwlKiE1mPaH+2uUSkP2YHR9ItxpBWDGxEKJOjOj/AJiKV05XmYQ1FEWqraTiuKZn6f6HPB4U4h7fqYSgKS83oK0emUOvsgMxsJRohByxxsZW+5THlM6TCDbWCmEOYxRnOYypUzS8vLy/NTYzjCWqBvvlRpNVbKs4dgRRW3bUQOLRhY29gBeUaOTnxD9yg+dcplsi6Sm+usyG9zHCtuZUqaZV9ATjP8YqljYThXDukNd4AALDsqVAm8TFK0xK+a/sKFHLqezHUsxtCRSGRd4z9OwmemYrhtBDv6InGNWUThXDbedt4iBBYdvEg2U5ZwypVFbKZV1Uevh0zNftq0hUjYIg5pUwjE3hwplOiUa8eiSbidBp0WnSadNpkaZGnTadJotFrxcGKrhyNpTQILDuqUw41j4YU/MJiDsPXwo8voZRMgmRfqdNfqdFfqdBPqeHSeGSeGSeHSdBIKSj0a4ukJv69EWT3BNp4lICDqOWKfS3sE/Ee4x9Uouk/qFfPmzTh1Y1EB+4TKrZmv7BNV9xXo9QQ8Fp580wlIIukxD5Rb2NKuUiVFfaM4XePiT/ABnVb7i13Ep4gPofUNVRBVQ/uA37X/GUqoRNY75jf2QpvvGYnftw9XMLH0alQILmPWZ+aVWSU6gccncILmNi/qNXZvZq2U3EbEZlt3U3yG8GKEGKSCuhnUX7mYS4l5eV3zN20nytyxKkjSEfAXl5czMe8V3E67xmJ3/3E//EAEUQAAIAAwMGCwYEBgEDBQAAAAECAAMREiExBCIyQVFhEBMgIzAzQEJScZFQYnKBobEUksHRJDRgc4KiQ1OgsgVjg+Hx/9oACAEBAAY/Av8Au9bTsFXaY67jDsQVjmsmdviakc3JlL51Mf8ACP8AGP8Ah/LHOSpLDdURzuTMPhasCs3izscRalOrrtU1/ouk2cLXhW8xmyZx9IIySSE957zH8ROd/M9DakTHQ+6YC5QqzhtwMWZcyy/he4/0OZk5wiDWYaVk1ZcjCutuwBJ3PSRtxEWpD12qcR/QhZrgMYNCeIXQH68qY8u8y72G7pFmSWKuNYhZWU0TKPo39B2UNOMeyfLlzBqMv9YDSxSXMvps6Vcmy1s7BJh1+f8AQRkuaa1OwwZM0qWxzYWZVUQ4Vjn3aYfSFnZPWxWjDZwzm2J+sW9aMD034XKW5waDHXu/oF5s1qKog1uMw1O4QqkhVAoKmMxg3kYny9ZW7hmTj3zQfKMoX3D0wZCQwvBEUc8/Luffv9v8ZlDhV+8KqgrKBzEgpLo2WPp+5ujjaFrXfYxxtCKd5DAk5RRZuo7YmI413bxAoLMrW8JKliiqKRMG1T06Tho4MNogOhtKbwR7crlE1U3a4K5FL/zf9o701zizYCGYm3lBGl4YaZ/6jmSlvJZtKLAY0GxbotIwdDAmyrpTm6ndMS5jqGOBrti7DgPYHyRsUzl8vbRdyFUXkmGlZBmy/wDqazFoBmrjMYwGnsZp2YCAqAKo1DgOToebTHeeBpHccV+cThSpUWhE6VW4i1wnsEmbWi1o3l7ZLMaARYS7J10Rt3ws7LBVjeE2ecUFw4Zj+FSYLNeTeeCR8/tFDCqNZK8J7Dk8w42bJ+XtgZHKOkKzP2j8VOWvgH68nKf7Z4TMpci8CfG3DNbYp4KKpJ3RVpMwDevTTZWtHr6+1yTgIYjSnPduhZaaKinJmS/EpENLcUZbjAC3kxR+se9t27gadLl0mNieGciaTIQI/iFaVLXGoxixJQKOAmlib4hHFzR5Hb0k5PFLr6H/AO/a+VN/7ZhT4AW5YZ6q47yxbFWfxNqi7omA6xc5ekf+0fuPa+VgeCG3oeVdF8EQa9HPQYWq9HNfUJdPr7Xmy/EpWJBa7Osn7cq+LulemwdHPna2az6f/vtiZ4ZmesSpmulD59jnuMK3dHIU4kWz8/bHGp1sm/zEGRMPNzMNx7EZaEcc4u3Db0cmTqY3+UADD2wWdgqjWYmHI3tSiajdAlTDzyD8w29K6VzZdwgS5q8ao1k3xeJoOyzBXJZdPeaC8xizHWejfLZxC27lrsghWaaw8Ajm8lUebR/LyvrFMqkFN6GsW8nmBx7SvioYTZhwVTFHLTNijARWfMIbYsChII0XGuLD0WeNW3y6TKfj6YFhUbIVL2A0ZaC4fKAZ7hN2Ji9C52sY/l1iuTGw2w4QDerDFfEIE2SfMbD7PLzXCqNZgpkKf/I37RanzXfzMBFuGs7ICShQfeKM1p9iwZZycU2kxVSQdsCXlt48Y/WAyMGU6x0WU/F03hljFosyVpybutXRMFqFpZuZY/ln/NGdImjypFOO4ttky6KoysNoPsrPzppGagjOJPhQYCDMyjPIFaaoVVABY0A2RZS4C8mCmTkpK26zAdjxUo6zjHOGZMO80jq2Hk0WskmW/daDxbMjA3rFMqQodq3iLclw67ugE7uzB9elq10pcTASWKKNXKamm9ywxmaA+8YMPnFzuI5qYD5xaRnlHapgLlKLOG3AxZkvR/A1x9jmXLo2U6hs84Z3JYk5zmKIPMwR4jSJs090UEfhpZ+OFyrKRUYovBNkyXMtEazm4mOumHc98CXlYEtvEMIOUSl51LzTvCLNaExVba71gcZSau/GOelunlfF2UJ87oqjqw3HkNKbHunYYaXNWjDomM6aEVRXe3lFiUKD7CFlyhRRymdzRRjAs4YKsBE+e/kXxcLB92LYvA7y6oEvLqumAcYjzhXlsGQ4EexOLlUbKTgPDvgsxJrezmAksUHBKXziZMPiJhV1zHvgKooouA4LXimWvrFHUNFuVeuvdC5JlJqhzUOzdDqO5Mp9eAllA34RZl6zdF1DFDc0Zk6dTcxjr53rHXzY694HHtbphdwXAxon0jRPpHVt6R1bRgB84znA8ovq0XXqYtJpk5/L/DSjmjT8446YM44bugMzJx5rHFzatk5xXZ5QroaqwqD7CMqUa5Qwu93fBJY+8xgJLFFHDK8om71eJfkftwTW2KTC7uE2bhiIttiTUwGU1Bjik+ccY4vOEUXT+0Wm0du2KKKDhwjCMOhbdfEySe8KjlcVKPOt/qI4xxza/XouPlj4oORzTcb5f7ewTLlGuUtgPDvgliTW9mMBJYoORL+GFU4NaH1hHN1h6H9YBU1BjKT7hEW6VjPS7dBNr5RWlNkLlDV47Fhugy1164tvo/eCxwEX68YAXDpyIk/FTk1PWHREEm8m9jARBQDor4rLNCptKYlTl74r2+gzp7DNEMzsSTezGAiYffky/hiV8/vH4mUPj/eBIyqvFd1vDGY1RMIAI9YczltSkH1jNUyjtUxxVu3dWsSZvFhprLatGHUnOe4RzrALGmKbooLl2RU6Z7Cn939eQ018BFTpNgNkBF+Z29IkwYqaGJ8gnRNoduttfMOgu2Czm07YnZARPXbypR3Qm4mKG8QVyatNfnC2rQlNeNkT1tC2TWm7gXKZYqAKNCy5biyuFRCtPapFwjFYvoIrpN2KX/cH34WdzRRiYurYwVYqesOPRFZBou3bFsmcBtvixlP5omj3awB41I7a86caKsW20jco2CLI0tZ5cptl0Mux44qUeeb6RbfqQb98SpCYSxCTpdUJFxj+IkA70MaE3ypBWRkkqV71L4Wu3ssj4xwEm4COKknmR9YE2aM/UNnRTCPKCZl6oK02xQi6FaUKS31bIo15GbGTH36dt4uUeYl4e8dsW3HOH6dA1O7nQ/EtS1jGunecwSBRJYwgs19TaaKEXRo08o02jRqdphvWEbaOySPji+OIkHm+8dsCdNF3dH69HMQY0jP0HFk8EqVrrahjtaMm/vL9+2CRLNJs3/xjjHGYuG89CQcDBoCZeowFKo6eVIRJdpV7wMGrqHbfFxB5CPtFIA2djMSXc0UNeYMuRdK+8CbOGbqG3pTMkCtcViwk11GyKzGJJ1mAiYARkw9+vbJ19QrcWsLLGodHoWTtWMyafmIzaN5GOqf5Re0wR1hjT+kWXp6QbNL9sYLGCxoLF6fWOr+sXqYwaMT6Rp/SOsjrBHWCOsEdYI040vpHeMZqGLlURmKT5QHnZz7NnT3gQ912MB+8wugvJR2s61ECk52A7sy+OLmgS5+zUe0zZp7iloS1jW0ew3qvpHVp6R1Mv0jqU9I6lY6r6x1f1jBvWLi4+cabxdNPpHXf6x1w9I61Y61Y61I61I61Ivmj0jrv9YvmNF9s/OM2Uvzvi67sKTdVKRKl4kZqiFlL8ztMETZatBVG0c5TEmdrdQT2jKTtFn1gtsX2yRdVroaewuTDz4V+AfrGS/D2iUnieJrfL2zZGCXRLQ6WJ4CzGii8mM3GY1lREuSuCLTtEiVLcMUqWpqgHxGvtG1MMc0gpvjnUBG6LUs15DOflAtiqrnNw/hpbZzaXlD5ZMHuy/17O0yawVBiTBl5OxlyMLsWizNUq2NDEny9oEnAQBiSaKI51eMfaY5scU26CGuZTQiAy4HhWSO7eY4w6U2/5cDzXwUQFrnTGzjshJUsUVRQdmLuQFF5JixLrxNaIm2BMmi1P/8AGJny+0SvhHtCdTwwtfCeGWdZS+Jdd/AXbAXwBrdoCrcouHB+HlGqrpecfiZnWThduHZxkcprzfM/aBlU3SOgP14J3y+0S/hHtAqcDdAIuZTdvgZ4R9atFWmgnYt8WqXtgNkKi4DgEpcXx8omZQdeavAbPWtcsZ9eKXOc/pF3ZqwxH/LMu8oVRgBTgt6nWE2rcfaNHxGBjMo43RamrQYQzgc5Wh4CzGgEZgznNFEJKXBRBdzRRiY5sXsbKLAlppYsdp7PlBH/AE2+0Sfn9uGidYt6xRgad5YtS2ryauwUb45oFj6CLrA+UaQ9IvCt8o5wFDFUYEbvY83cKxMTaK8HFSjmjGPxM0XkZg4Pw0s5o0/OPxk1c5rpflt7Q6HvCkKXGdLajCAyGqnA8NsZk7xbfOM4NLbbFnKM0+KKqQRu4LEuhmfaKzGJPKtS2oYsvRZn37NfF8wHyvi5XMXo4jrAPOKg1HRzfhMOzkBbMFJObL26zAm5QpEoXgHvRdBI6xrlEc7a4pb3MBVFALu0tlWTDnu8viizpS9aGKy2o2tTjw2Zihl3wWlZQie45iqOw8oKki/Xr6G6LD9Yv17IUlC0+3VFZjk8mstyICTs1turoM91XzMUUM0MiJZUxZlIzHdAmZTR31LqHASxoBFRrNlFhZY0ze52ntZYji5vjWKqhmJ4pcU46YPiEdefQRTjZzeUVs2figzcoa3ZvoIJpyLMlCx3RWksf5Rz0s02i8chXXEQrrgR2Iy5Bu1t0IlTTmajs5JlyaFhiYoOMmbhHVWfiMc9OodiiM5TMPvGLMtFVdgHD+Fkn+4f0j8bPH9sH79uzlBgTcnXnJXdGsRxc2+X9otIwIhZY7155CykxMCXKF334CriqnERmV4ptHkNLJvBu7DRdN7uTdGcpHmOTxTnOXDy5CjKNG3nQBLAC6qcorKIaedXhjOrxYNZjQFUUAuHsBpuTkSpx/KYvkv8SXwOOLEjbyJs846I5AbwPyLGTpbelaRfKyhfkYvaYPOLyG8xF8tYzpR+Ri8OPlGkR8oumj53RdNT1jTX1jSHKK6lFORjZlDFoCykA364owBENPyUUpeyftyEfVW/kGbJvriIzHdNxjSX8saa/ljSU+axphfJY050zcIBmrxMvWWx9IWTJFFH19hodssfc8icmsNXkInjbkMdko/pwXiOcyeU3msX5Mo8rozeNl+TRm5RMHmIzMr9Ujm5kpvpF0kN5OI/lm9RH8rMj+Vnekfy+UD/ABMdVlP5THV5V6NGdx486xVjU8iWgxpU+fInS10Q13IAMqtN8dT/ALR1P+0XSv8AaKWE9KxZkyy7+6I59EmzWvaorTdF+SyT/gIqmTSR5IIuAHsWRlA7ua3IWYb0NzQGQ1U4HgLzDRRFvBBco5GUT9pCDsE6mNg/bkCByJ9NtORImTpRMxlqTaMaD/njCZ+eNBz/AJxUZOpPvGsUlqqjYB7JmyGwcYw8uYKMpoeRzT5vhOEdVKrHPPUbNXIVFvZjQCJUjWovO/sFDhEyU2KMV5CHvrmsOFpjY6htMFmvJv5EiX4UA9n/AIzJxVwM8bRt6IZZlC5x6tTq39i48aE778i3KPmNsc8rI3qI5lXc+gi3NPkNnIlXZks229otlGRUtnSl7fKCsxSrDURTlBUBLHUISfl2IvEv9+xvJNzYqd8NLmiy6mhHQhVFScBHOU4972/b2lTKJQbYdYgnJp6kag90X5Mx+G+P5Sd+WLsmYfFdAOUzlUbEvj+HlAHxa+y25YC5QMG27oMuchRxqPLCS1LMbgBH4jKgOPOiPB/R9nKEB36xDNkjiavhNzRSbLdD7wpw0lozHcKxanUkL72PpHMrV9btj/SVCKiM7JZJ/wABF2SSPyCKIoUbv+yL/8QALhABAAIABAIKAwEBAAMAAAAAAQARITFBUWFxECAwgZGhscHR8EBQ4fFggJCg/9oACAEBAAE/If8A69LI8Hs1oIQ4R/1cvOeQAfKOYd9mZEZHIfzA525/3OVED3GIri6HqqEWU1J55Qq+bB/xSzGx+mrKUAveh7wwYTM8glu2EwDkZdhc5jKCeHjf7sIG+jg0e6Df/DZtWmmLdYvqo4fgC6cUsLg/Mo3RsOcf8IpgO06EajPWXhu4xeqSmD4jqcveV2aBVsSJlkRy5XGDf/BBsAu7K+nUrpU1YvwSmsUgwWp937QUcGo7tfgD5RYf8CopXV2MGCFxRV4TVT9nTepjGxjD8wPSrVvgem7gHxEFfkjD37UiBcHEYn3f8Cba85uxxj/nP0/kYSxDIKMICpxxJSJa6cTE8yJj0MO9K/p8oSJeIczH2jn2rPVsKRghgqjyd79+t0KvPgDWb2MQru8ZgogtmH37xOM+wR3fyAq/HjA5zYRHl8WPFCy+JgxcbXTDkbzCgMlH6Dy7fFN9yYKsegJ+84Fsm1yM4VaHWzyh+mcI8zSCEoRGC4TCmpEYue0S8rrw0AinMxGZzAeUfENPcEXQgCgAyAroPgRz7fW55mrM7n1/dDLPIAIylTXtdo5OLSvFzgw1LkByCg6Hjj4T64dDNcnNh/ISPcDTGIfAScTB9Tp8tM7t8rx3xgwbBP3BsBWq0BFyqKHzpnZc8vppDQgZAV0/5zJFMtqOr0Wwd/UhPlJTMg9Plj8dPkpiXbk+bEYPb9wIe7AzDSKdgNNuQdT6XbpzWM3xcPnoUgyTyenHyrXlGcPJC5xIYpKbxO1Nt9MH8f26l0FrBzqjbReHgQ7KEe7q2hl4yRWTqHSAUooDWNsHIqCK1ov+dPmvSVK7i06HgIGMfF5vQucHh75rE/FHkdztH0PyB+3VpmU+FS//AKh79cS9uLTjecRbape5AFoeXZATM1rXbvj/AMFoXcF8MYATmI8TrLbmcJcM9ziZKfl7MTlYAOOPZpqT8Q+P294/OEXIjGaXB1RqFkKoUHa+IPw7M0dG5D9wQQpvGz87gE5u4sH8MHVqvIYe3Zr/AE2HpX7jADASHeEYmJj0/r211n1MHmwgXsmFvQ9BiwWaBQfuM3FS0EDruCqtqHCV6Kjbj2osiwyHhaw3euATnLLwUPvEU7HHORH0FbqdkQDSLsNHNvi+kwpiaHi4RSouM+0NXxYKA/sk5AFzOZ+yMqgDNYD+dOLoS8mu8H3fuwLWDCnDnecY1C5B7UTTxfDtPOO2dWtt3G0SLhFRy4AKuk/hBZvge0VG/NiZe9WoZRcuy2IWtMtbaf1+bQ5aJia9VPp8pj1XK8MphhOOmINcM3XiZ5sLe+MRacWO5Cxk2BpI5tgLEjIpQlj2SkePxLj2lTworyOMorOrmvfK6ipNFe5wZWkLbq9mVZ+Gnmnl7yoxLQ9eXnOce0fqqNZ51HN0hzOfp/OZ5JNCUdhLIytAC3rhmzIphGHwwTnMY4E8KCHlHIJ3S4qtDaHuYO1obKzcgn1jK0g9U10czsCCbrgw9K7QiWxXO4EJzlx1hYsJq33gtteNOcZZyUsMS40wq+BmpTsnCM3kCf8AOXIU3T/B7oP6VjhKODx/CWURaH7tM5bVzYomj7vaGAxBuefpMYweaPSW85tZJukMCjKOHIL0hxlkOMK+cfwcDOvtDUBXCFITlL3iPCddPMlERNDXiI0C2rQQMqXv90N7uCwemrkzeaRkz/Hj2NRTDnKvhcUCXdtcyXqZC79atF7TK+InFZQ5ss27fqIACOjL14rgPCYmcd9GEayy/wBKesFutqsf0j1geAN3xFf6i0oHz6G2yqXVoscgIu7xXJdvlCvFoZBFpbMr53qSlI4xkR02sYctteZwm9EHdGc1S4iAY+lFoXNymXCq2coHJXAQeinmlfvQ9xgzOEzE2d9SnaGcXI6TOMp4uIUd4VM65yEeWLjoKOq1EsWiYRDjRPl3dfX1YjXZHwweF0dcURyg0AfrUrKxxHv8ISasGp+iJlhg07vaICW3jupRAsLjfOMzcevxANvDglUfzJ3pPl0ZlOJNZBwdI5e7d3zQTJl9fAzmvCNhAsGxAsseUMncWKgYYNOngJwE4TsauZ4Eu3h3wdbRxZ+ZM2y5OqHY3lPhDzi7u1vr7ofoDgB3qboq4UelA+fU+lxmWuJ3qY1runLyQSgrE1IKLWE5pU191VXH4k4kaqrNmMCUgwBFo2xZwHl35Ri0VfByjUeHK9UyBycV1rYgVUCu34gFTZ/v4dV2wi8djkLLOhKDDoOyAILHODlEeiigiDg0dTx/PInizmBxY7J4xU4NfV1frcZ5v1ppWsgQF7DJxeB3JeoPwwfohRcYFTFl7yufeqmYDooaVnHGJLEzxw2mKuQd8bZhwWi5wLijCscEniYbp32vDh+CsDhg6i/3g6u0zOJVmA2mLC57roOyo1mDgzP8AuDg+h4/nNkMLbivglI1VtkPYhQc9zrd9J5ylbPzgMAmCMfWnLmGwlCGMXM7kKyi7uDPofPX5ma3Kemqi0SlhKAoJhnuFiVIucNPmOn4TumrdIIx7TSV4gNP7nDYjntuB2K0W5Ssd4Vzgg65PAygQrSuXOUdjkd2MxLo939vza0C712IrC1o5bUM4jx33r2aJMb4N6EFAIZmnfnMXpiu/YjCwy5kLp5ecTi4DqbMIDcKHky9XbwfmAAC3cv8y5jALUz/AA3JhxurefQzIC1dI1i9T8QsTOZo359lnjp5moeJiXkuMpMUVTtKQhw3DSJcYh8Z9Wbw9/zFRbpGx49M7z4QQDn8m3YJqXoSpBkWLijHFvSf2ZShRLSMQcLigB2TdPfDMX4ZSJW4kwHgNCbgB+HmTyaICqgzYbKo4Ov4jqmGZ2ZM4LHMxhddXHbjBsExHJJVbdy4GR7xlMmrwJ91t/MZRwOGmrxy8ZxiNoZQ64h2FMXkH1YYMYVi+UM0GOodIpJGI5CFeCN9SjSQbgOvw/IQ0V0mkt267VP8zjCX83LtcLZiDTlNLCW08cpawWKWwOqw0v7/ACx9oP5eiwDYMPW5km1dkhKQYK2eQRV0O8iuX5EdVwNRcyXA1YTIH8IVVA3ABcbE/wAWGv4bCnHzIhkvKDUh7NxTifdFZlHEeKD6PB6C+iz6bH+UxL+GO98UMYeBBOI5tQdDPGUB/ghZzOvl25K1PKUkokHhKayx4YIPLFzT3QazRwvLHGLDLEDg8Pj8ksmeCFx1q1c45/gIOePOIWrmJmz92P8AMxTOJb2YvR4orUcnFI3ehPiOh5M0c5xyfrnHSj/zWf5LP8xn+Yze8BmgU7v274fO8gJnjmxjiHf5oZog2CvwaoHOu0N+GCawpTAvxhllcM0xO/OMCtGr4SywBo0dfyNzD8QImnN+dXVr8ZP2wwzEDw+f/PXppgcbxjUfdv5Chuu8gfkle9T9yvMq8es1PDv3oKEGw5EVow/AZEWVTFeH5BQJArs1g8cJxWPZ7fscEc0NWXFHv2H5i4UnMBGp1HMpDvOksOtrXbz6RAGdXTZ3zGFT/R7eP44QnvJEymWZOc+0DIQajGVzn/YKHRWvCHy+HEhXiaYeExZ6Ll7yCVzpEQCwsem+GA7xmFOJ8Xv0OoYjm6Ef6bwmXV7iHQGA2/GNy7kATAPNRr3eMHYh3cBx4xXww+SCjt6X7DjC040weddIiHzDEv1MXoyDG0Mot54GvgQt6NGx0EF14zXb3TlAf3zz8Px3obKNtPdCJZlmh0PP+hHaGXsfsAFs7ES4rJbPiLmGYivPWbMWa0Q5jWZSZCzXRagkUVf1L0ApaL790OYycX/UAAKDCvxidZGLMGd7pbDygB0IcjoBMwiPEwfaUC4FXL9iUvMhzJR+fKfOBLO6hi9UA7cOinALWYwH2ImnuubqwFZ7TQgq1Bw33GWzKxez6fjrmYQ8UC9pbzdLoF9/bkf4hpMH/YJEdtTmdXjLBQ5N3sHsHJj/AAsXwrjSV5uzMnHuyv8ATkR2PdKNseD/AGMALudNWCic8Bv0VWtaeAltpAdNXehl+OGVlfeRYQ/yDAOFsNem/p2RhADszQ9+TKQDYZQi9ZKvos9xTzJFHqnEcLWEGm6vyfjKBUAZr0Gkp6YRrhm5TMlZsUhoSZJ2ep+xAEp2vMi6nIYMJkwV/mFMMmkCpOctd+6MsTmfhfH5gIBADQ/IcoOGDEtPDjMG6XQ1y2lEXIbpSO2guUTgvOdzE+9KWhIrDQiIra9ggKRNZcrgZ7PxBgFuwRXwBp4R6hvgO8PCHiLkc0G8uvfhIM6HqFEAMGlW2CmPQXK9TiGPO3hASCtVylBVOQNJQE4F/KEuYhjoZ8zWJCJwvXwzJnk7WepM17sPaAYI7n2i1qnVVGmgWwh4SuAW5GnUNs+zLntL64BxTFAfcPUXmkua7y5fhVVjLucot9e5aSWCfeHVojgC5Dwiy3hKnlEjKdRIyHnr82Y9vbC8CcnJI6RRZYwVmJcCZfm6nmBFxQ/GsOf3kfPaO8glPUYibN3BHpzKXPY1ZRWGKua3egfhaTUhiXHadNzqEP4oLo/g2jaDgasvqAqgrwnp/nVW9zNb9LSWLDJpwvGHGuTLK6uH1wDfM/EOFvxLe7KHDA2D89LmOlJKxeO0fNE4PxIIAdGsj01awvK1fbqDrwPjh1HbhVSDRND/AFKvGHuW+vQhIqv8lI1wneTzYx8zOuecyk8j6pmz7s/w8MgvfOIeMvqNoiHr1Etr/DHGVtLZi5sSIGiXKfjAcq1fh1NslOSGWHSY+tr3wlU8GvBmB7KaIchB5gTDliZ1ju14ERyrg67kVSDV6rd4/oqI2j9TD7mFRwT+dStXHyT6dR9A9RFQSgTjPJr2eflfRFrfCu9RiHw5Z9B9420/FfZKZ9WZs9gm94h8ccx3TY4GCoJtOjL2tkTOXNekzhz13is+lBEcR0maQu5p0qmDMQq8N+U+3+J9v8RKwR+tpXZnH3JYotMj4ldxjDHAivjUrUfcE8vwlfpBDwbynE+8epThwEbMEiSw1OgbpbViiiCzodStRmDli+p+Ag+UpztHpoWZXPLdQ15A+ADqFNGQ784vI+S6LZ9zSnN7V5VnIdaP1Lk1R4HR8Y3RYnfqYNn7QtRwpxGPzLc5YhwHd1ChoAarACpwNqs38AHC1gkz/odz0mcsQV4jU17+lOzR4RF2tqd3pFtE0J8rP16BODeho5diSsAWAxH1h+CxhFot4HB9nqUTClJkILNfUQH4LuFMyhQZDqCmID8D+1+wSyKaGNkHFxcJmcMtOthEUAtY4LG1f3wgpR+E/XgYZRRtkNHsU5KoM1jPSzg41t+yXtZhk8hmjKSt4kQHFUehiTXn4tXF0eqa1LlbxhGT6Viu9/FX5rwy7pmnLLrr4OitWUxoOW+Yf8dw1U4chlCHy/wHyj/ZhfVK6OBgmUMMnQXWMzZuF8f8k0EmYlxS1t4O3agNBNBX/sZP/HL/2gAMAwEAAgADAAAAEPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPNCPHLAOMPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPBJGHPPPLGNPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPODHYAlPPPPPCPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPMPIPFPPPPPPLFPPPPPPPPPPPPPPPPPPPPPPPPPPPPPNOvR6EYnvPPPPPFPPPPPPPPPPPPPPPPPPPPPPPPPPPPKETiSBAGs+8PPPPONPPPPPPPPPPPPPPPPPPPPPPPPPPPDM/PPrrvTjSXPPPKPPPPPPPPPPPPPPPPPPPPPPPPPPPPEdPLhBvPPvCnPPPKPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP/PPPPPPPIvPPPOPPPPPPPPPPPPPPPPPPPPPPPPPPPPOCdPPPPLGWDPPPPC4Sk/PPPPPPPPPPPPPPPPPPPPPPPy7JHXN/vPIPPPPPGclPYwUOPPPPPPPPPPPPPPPPPPOAlcrX4jYCt9j6kpjOcPfYpLrzwdPPPPPPPPPPPPPPPPFm9ycCZQ3Po/b/rPXvy/eSp/vvm0fPPPPPPPPPPPPPPJdPvXqtV63d/8A777777pf6yF/77L/AE888888888888884U2++J8ak28u+++++++ryOv++++elO88888888888888Xl+++taYej+1I3w3+zINfDe++++MAcU888888888888oq++++++N9Uv999dBxZsmdd++++++uHU888888888888k5+++++++++++++++++++++++/wDffpYvHPPPPPPPPPPOMpfvvvvvvvvvvvvvvvvvvvvvvJ7Nfk2dPPPPPPPPPPODBuPvvvvPPvvvvvvvvvvvvvvvviyc+3pHPPPPPPPPPPKNEGOeybPWffvvvvvvvvvddf8A7776owaCTzzzzzzzzzzyzzS6WuZzArnT77777777ZCCPz76bgQpzzzzzzzzzzzzzzwxCMyIobTHnvvHLHb57hQRw/wDbzpUE88888888888888888sUYie0UcMPMPtdK4oIQUodWZN8M88888888888888888s4s4c8Y888888840skc8gU88888888888888888888888cgcwQ8888888884YMcUI888888888888888888888888888c888888888888I8Uc888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888++++888888888888888888888888888888888888888+6A8++88888888888888888888888888888888888888uAM+++8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888/8QAIxEBAAICAQUBAQADAAAAAAAAAQARITFBECBAUWEwUHGAkP/aAAgBAwEBPxD/AIRJpAFvTI/yeKZjfBL3Uwkf42kgQF1Ll+ohymjH+KCQutRYjMHNY6lZiJv+GbBDBXSrKmSFdQIlldNApJdx/CVDqixg4Jbt7Tt/My3D+HmKgCzuQcui32heCD3VQ64iqfIUMsRThAM5brLdkIzBHXYEV9yBAC3L2QcVzYPFAXDvBBAwyuJaBAqagCLglqF3ZUteGZf2nPU+UH4YLymkii89hvUnWM4egpqIUtkvy8IBaPQahDL0lgrA1MNp1lUcLcEuGS3H0T5w9c+Uo6G56mT6dAsRUh2oMUweAAtjumuhFcMGycuEFxXAzKFkeZf/AIbdHf8Ali0WwKocR+yF6gS7uX2ceBe4uwK/INri7qiOJRSAE/HfGGfuE2jugI1fuJgAE/fHnPaj+RBlhwVE7JQyWp2RPMEgaRoF4T54jwiPGBQWgEvcsD3WKFiD2P3sB3imp9oHpn2QGAoA5n2h099k+3Qirll97jUACj97l5CukuLqK66Mi/AVryLEzWqA7OILUShg/dBD5G01MQJ0Tz/R4OYMMZoRCo9nYBB1VFG0j+QLgmmJlmFYPakFTCNQqngrW5vGa12+on8aAQWg6hUIrTropXQjVh4Z3IGT3Dei8olzEuInuE+J8Z8oJahh97TYYlNR0cpd6/g0SnqU9d67aT4Q2h/uJ//EACoRAQACAQIGAgEDBQAAAAAAAAEAESExQRAgMEBRYVBxoWCAgZCRscHh/9oACAECAQE/EP6EQG4SpwwPxO+aJei3KFmLW+H1tmAgqGRmOGHEaTUQ0+Ggttw0kI8JoTME0Jd/B3DEVvB2shkbxLmLqipvhiljCu3+CNslVwIsdeVZHwf87z08HBXwS0WzPmYip5TWARIpYSq5VAtiNrvqWAp9wBas7hFRHg6BhEb1Y5yZjKKNTkYlOZ41BLNV4+Yt8NqN4jsTQnavINtrGyH1MfUhN5KmQFMoK4AxNcRPmVgmziWSnmeyagxCjERx+R4ldjVh2iq0+uCDrDcFMq3ZHgWJ14f3Ul7IZqi66ioGuJoWWiRVRpLeZbzLeZbzLeFSwTdn+OAsssOg+3yzG3I7URl2CuiAbdeJ/KYr0jZh2ihkmIj4IPgdDVNP84TO1mQ1tX/XLoHuF6lFG/XMwhvvIjDeE9RBK5hlaR+ZRD0dZChG0Wo5fj/vNAfvqxMxkzdyy3rnc2lUVyCZ1lRFstS4HeWxF8E4ntHwz1T1T1T0QXaJGJkIeW3OgoUJ+T1CAtuvW3zz1FNpbtwl8KxbHpnpnonqgW00IgBp0AS4yt69R3AC2ZKuG2cK6d+uawUHruGbsFiFC102iINFwAuW0HWNYqE7gpmSGvG0Co+phTlmvYYByQC1C7UW0Kircbjc2gemoZYlSxSoAWPKRVzI2Y1yV2ALpKlMTCq65BrJPIR0hDGWXwYw4lyOKANkOq432TQLxlPM9ebsiNZuEF0gTee6UiCI/rlYqmuSG2EMPwFpbzPdPbL5bglDFt/2yKZUr9P/AP/EAC4QAQABAwMCBAcAAwADAAAAAAERACExQVFhcYEQkaGxIDBAUMHR8GDh8YCQoP/aAAgBAQABPxD/AOvRCJc1jtSvWLYqA9YZPookr9h9LD3U74PJ8yj18h7qnbOF/wACh6eype9jyo8f6o0Hurix5L0D6qwEWKncqT/CYGlkfkwHUl5op2B4UntOo+HLIdxgO89KMxllKbhgdilkv8RUt63Y2yvWM96GSEmXmhLyKPEoMcy6XeYWgEn+DJ7QIIvYOXgplYKqxTeXWtZfd0pXdrPjFvkzQ3qR4UYnrsNuxKUD0bw/xctzUn+BvjK1ABKvFJ4rczwg3RN8DFSPwu/gJdbEXIZ4lpSjPypoOeoQnDucNmk15YFpiU2epjbYN2xv/gSakgMsM7wOlKxdqKjihRh8CghEgHFofeh6xxA2A4uPzBpRGEcUXB0Uu1s7rgFnW92W5/wEtD1AaINS6Js70bFMVLWFkEbTDSJv9CzMAYtq0RyY+mT6qnVukUkgssMJdzFN2tKJjMb+G3pT8CGOwpnopz8xwzQzbDsOLtwXnUNy46f4A4aylBituLAUrUya49ugDmKDl8kAEAS7FWMMKUPKmvUEw/iCkEOlFQXoyTeVOqFBEzCdiD5irV1+aTN8MJkR0RoYMCwOCGmrZnSPvyxQ19IVLxhXXSgm0BuliDK0Cxgmo/yYhouV75gwTF4orslEe+7SbQIoVLQeVrB1Iox02tn2jYl2YcYqyeV7IoO3rNEFi7GyOr03qAgA621ede9LmHm6KcvzgISeaJDqRJyFBPmtKiRPvbilNsT2Bt3Ypk3VQYluDfeV7U9TCg5JdhwdikAewCWvvnL/AMqGWfI4zKyll1xUpKRZAWsQMHB6VCC+QmS49m48lPxJuoQumMRlbHFW9BfI4YneR6JQ+3QIBwFRUxuFnpWb5ww0MAHT5PYHcn/X70rMKUFlXasb2MesUtd0m2lXM9yS4VvLgloSVTZc5Bl8+1HtmDugCx4C6UItHKvGEbjxSzehOqEaMudZT0Km4PamHcdQTvSTFhuEkOpJ0KGfDUbvahB8vz2cgazA53gGe1EwkSR+8PK8eAuquCmbbyyxyLoaaZqDUibB0hq42Gs6WAMBANgKCKvU3oZTFx/FNXRFKjKr1adqhGd5o2rPQXE7JTO3w3AvcVEeChnAn0pyHK/PUbUuKRKys7Xrd3+8HkGeyexMS6xG7UpxB7CX53IOi7UIKav4TkJmzHXT4JSSZGCidYfJT2pDaM8B4qiST/Rv4oXaAs2Gp7FcPOF5pSSEEsjaKRH5ZUgSDNiR6/dw2CjtAJWrCES6SEux5VFME8APx8IxoUqTFiab2EK6KLiQaVOAKkgLDMWW7LzytNH18t8SywLEnaKiLZrSryoXumB3bUhveMmYv63zgDpRuauxKbpd/tqCJjLnmpXhAWXSKw9eaD4ZBzbJt7U/KKP+s9QHu+7s7gJTF1j1aDFYvRYj6loxR4vgBgIIWiIn8uaFs+TB4gQ85qHF3U+E2o+GKiKgkpuCgZ3wLdYdKKKIiZPlFJhm2H7uhBKdnBehTMQEbsseQ0fDGaWg7VJuZAQiSoViQRO9FBBNiZ70Z+SWopZoywEgedPyShgXA7KT3fdwgkXrkPzTp8NZFPSawJ+FMZMjQgmAFGKj5SsWpwUKTd2P4j5RQkWfSD7+j7wA4xh3vZB7IpesT290Se9GPig+XMb1JWdtxD8oFmgRv+q4nZDt94NnpyS2/TJOnNFzNIzYhOxhO4aXqxjHzUIkEsE/AghrAtZW2oc9Gpr6/KLiNWN0+Q+lA0KBgAgPvBXgk83K2Kby0rCK2RIcO0UIYZkRG7LgfPX5jUGImwJh1EqdikBFBpSGQxpJxMUCja69QUdgoW5Nxk7r2psylJVWnyRLT/aMhZlYAA45U4fJEzesI5Jq+GbTqdhFSLg4D80qc2tU8oEOi0bnuGaJslzufcrlfkQB1qXtwazwJA83SgNghQHbAO5zTGQUaHy9AjrWMMPQYt5wj6jSiDQ7EJf8mR0vR8qYrFdBpLfNQyONiJllpOJ0qC4kEwQBWILSyxlq8I5hBtsc6tApZe5PRBRpc7IfOaOKJZzdhyetBbuY3kqiyJqY0p67BLjCluTnDp9vCVqml3abEBYZN+bfyUicOQSPTB2KlYuuf9LgKPzYQk25lf7owp4ovNB3Z4pphuztoCz3vUhUykaImKKC6RwOBnqX4aFM0lg4T5LWQBR6APesPllYTSmFaKyPyL0zUkqz3fOXbFF3jE0IBoQf6zps1EuE8WYNJHXZTWsZUan66nD+Ibim4nUV56gqxgDdy1Sb/aFigN8bhixMECdXN4mKNSJXQDBY91eogkNkkvX24oIiCYLNg2C73rcrdzLmoh8LmCL3yOM75ir5aoVlZtyO6m96DEZu+QAHzWnS7EW81PSlqLVnJw2XFkOulRAQbckI9uK2jwajyr9k0EkJkvwyDwx8bUoIs7BEfzrT8sTT0CorK0be13Q7UTfIJY35Vby7/E9Q1jCL9h6xScN8gUwT2ZoJCNLnuNPecIvYpQg6r0SaLcJCw9lLPRoUuoYB1JXkdahbs9n8Zg1k1J9lQDW+reylmPTJkwS1O1okk9P0PQoyeZYX+X8UgELcZjKkt9BaLWHMeqkMcDEM6fm9So0LYOa4vLgxZWZKAVgWA0DFTpfqYQqb3ZsVzJjk7TjtFQM18y03z5OSnVfwXLimULjfEa0lj4c4dBxRkNop5lIwiDKA0NblGmm6yh+z6U6Q7CM6wKbKMCHyaBiEZxFTeHO1TUkXvSUsdF4eFq8FRJYOA6jp4Q/BFFRUtqQTlzYEFESmJW0zDDWN6TZK6usY5aLKDOusnVfiJKm1EBRYcGSDqvOr+ijeWDqrlf2LUYoKc1bTshI1PKoxYHnDyilCJxdFGqF+qY5qBawAhmJ2TfZrQ5pRo8P2NY2q66Wsoxy7aulXtQ+X/bsewUIkOdVqu7RQAN6m6AHu04/KX82KalS2bjSHQPlQ04gwAgA7USFYFpGvShwpUcAMRlO+fKiKRlTyNygozoNU2G1WDMMGMFhff0R6UgEYRLkZqGHijZyx+acnvQxOWOL1LxfR96WqBLfe4qdCsYb1okIN196m37r/AFQUH9BkqaqOBobADHFc3yoyRuVqb9qr351GC0dT9FHgV3fdThEupfiainiF90VwOijpH+6HMzouMYf69KUcxAmB0M9V+KMVPz+EpseB83pWMgBXXXq+3XwMfCIgUQjea1EmNhtn9fLajm47X0k85wetDRA5IhI/YVgmmomICJY5dmsbZadzWu/LlYscUEHADV3eefF5eDuGH4o1WfJYUaMxeqX4WsqR8CMukN/FSXQP5v3RbrSCBIQjqUhiiNocdGad9yoWS+9AINI66PrV4FIdZH4a0/skbKZe9J5o4aN3mjoL8yVqHNDNOwP6aLYpByTX/Jr/AJJX/FK7FFsWqXdpvUG1aRp4qGkuhGfSaFQIQ8tjsvl8RMLPDdPc6edJEtQOM7WXtWH+qD4WtKQc0UJJa7JpHiIfPeoGssixOS64cjq0pB+wYc9QCvZtg1eKUPl6ct7xlwH4LEjvIyrdcr/Wo8XZ5e6iekh4C+9TSQzE5peZo/gHpEJEdqmS1Lonq0kIEyoZ1qA76mTsxSE0LNjaU5G8LHO7T5kZidiBE5T6u1RawhkpcXO+lC5ryP4RSYxIg30Kuoq5ManQMUYWKAU/OkjDLuRTyFnI7Afy+EDISz1mMB/ypt8eiRv+goCEIL911eaPkRQVhIEkTpR0D/oTPkSHpTfSh0PYkdvrzIItEpicwZtljuSJW5KC++gG2xUf++6lqnVaMUU4oxXqXuq6omwETLTNvwehzSPY1QdovlbXOmElM0ITcPR1lzz0TY3IF5VHHLjfJVI8qKZMwLhMCS3tQ0ujmIgBtAQtRxDK1QU7A35KlmUYi9um7UKgwXIdCodvALq0XmrBkE8WlDB9A+ijI6KHxUiEAZMwDq1OI5/NAnAXfNoxRcK+5040p+WHyxArep61Mmt6cNnunX64HpkIh6u0hL+Uog4GT2BgwHQoJJBMV9RaCoPBxRikI1nyH+1ZH/M380V8UCRG0JSbhQjdrrlDvcb7IEfSYMSDE3bm9DEXkwQgbSxWuKikLRRFETS6LpbSoIME6GDGCfKNqBlBrMt4C0u/BtVrSoKkT0onu8z9qTBDQt0FR9BNqj2oZ5WungjMekCocaqTrApqp/FFgwXB6zbfeij4yZABKuhvQYnoLvToVAL9SdYhbU2XNgg9Ayc/9oTUlQXlse1TnI00YA/W7/VkMrG4raKW8VhwqDglV5WiAMVX2Dg0+NiS5nlBPZq9U2vhQ9ZqDgJSZ57Nh36jjBSTOT9zpO9XYu7MJAOAUiKKCRNy14w0azLS31vcoSWnJZ4m2pTViPveAlvd5oj5fLaS1LJlWjwn6C3pVHoQh6qKdKRaAGVqEygqCO8mzQ70qaGTEIfxtQVFBHxsZBQ8AvRasz0yUsBwuvYKRyOQkYREbcU2xBDEaRxcTvVjty8iLT2Q7VIu1k7X6yJ0AEq6FRpuqyYOjpwl1qJWbnKgnDd/1Tdo+KGxOX7BH0WgQ02EWmEkskt+adRFHJJMsuqvBUsrVF3Ylyq53aiRFRfUT1g606LELJHtTChfUYdsVkWP5tTZWEqvLHpUrMmByfupSZSesX+js6DRk3SgSglRgArMHYEFocI79KUrcFhWbI2286n5T22BxMoA7xHepSMJxNkXcPNomIKUSPSlAoRHSudV8lAfHYgE+c0xixZ+spm7pFys50uBxwp1atILSW6xWBHyALFidRIT1pOMzFJGy0T1obU2QJw2eY1Ja8symQ3An+irMYtCGC/nUm6V+yraPg0gRcJ5GT3oNZb6Nz3+F+Xp4Zr1/wBqAKViwCZpgfwPJ87cPOmiIsDdmo9mvTIRQfJaSRq9YnOLcbccUnISDT2kvJRAix65aVaksOblhleXNGdkA+1nST6pw0YjiFhNp1k71i10oiXV7q03o+Q2GJCJM1Jw2ZJ+WPSgpHoF6hKcQ3wKO8UMG6hDuTTFC7IeTSVneYfelrt6/rqI+qwEe3WhXiJJMbUann/3RWVn8a0W5d6XbqwfinNzt/rScN5D+qhgG8H80T5+n2q/7n6qBkPhL8V/S/qv6v0r+j9KAZen6KYi/k/VQzPwfopFNNgnvUEF39sDT3kQqK96mDbeVioOEhm86ZaAAAgKPlNFaetciAQ1GBapBCPzPlRwBGndEvYfahY0wBb4NORCEKhqwdka792mpneSL3MXveBH6ie+fRln/CnrNsdEt8ytKj5mKBn/AFWEnQmp8XdD7UA3zd/xSmVHf/VQXoiUpcOhPzS8odB/NYDkfs1oV0/YoG+dSmSB5V+KUeXr7JU9PM0QesX7pNfXqlx3aHS/k4on/k8qJ/QUIjsyfzSSQRrFEVLmbh71HTGsBPkFPmwIv1NRenRD0qKigj50pZ7UhU85fKh2ZDUKYO+PKpX8haxc7+gVPmgCnSxdkqCpf2BMrqRHanxIgClh3n6g5aAnP4RaiLN85UD80Yv9bBqKjisYox4I8Iox9EOa8bMGVOm+i0SYOdLIZ7exQcRVtcUlIJChv+iKnnTu+oELEfKtHnRJmndhX3Kn7vjNQgTumX6dq9lColO2O3gpzMCAJVelTbyEYkD5Qves4InGAS9bvf6deaOamIIAhbJbON634X84elEt9w2C4SV2DWnmHYEqeSFGB9kHzijVlIMPZeSjxOeiDdLPP0mpTZ7KyGx3lFtYa08J6BBUucW0o7HNM3sWbszEPkH6dNfUMB++NaBVVBoVyVwdkZvNQ4ChABIpp0q1sSfOr+fuBPmnYASvlVjMcwjY7avDQvPBNBYwBLdZaQRgZSp0k06R3p0EAmRok5Ew9GhsnG1HXwVBTNNHGZZCx2L96gt4RcEh93eoouh8V4OosHer3oUjLBtgHYK0Db1AjzcvP0zHlmgRKroBRhj2QVgIylsOBtq1cxWW8vY0T1BaZc14/kOtcbv0fcNY7DaL+k0UoIpO/wDBNGPAvwBgRMEL5PlT8lSBOwR4NZD+gXqZclmb8rp7FGNDKQAQHlW9D5XcAJLu7u8VOzIFSLsmdbOjqoIx9K4aZuUdXLWbnLoaNJbYArfmNw4ml10KkTTDFQSSUw9n3CcfO6EhKIfSOJfcWTlpNJiDQ6wrD14pxAyhOxxY71JBFOwPSdgle9FRAzzz3zUzUGJpE3B+32aUzDILwI8V4OzQYqPqTlQ6vgM9YojFvSS+RO77xLpRtBAGAMH0zCwcmxq1Ju0Ty0JdIeVGiGewQehTek4mm1CDrZdyvLCkbD0jz+4OKGCac1/JxSYJNke8I92nuwKbxJ0bYp4yJVOAnA/XgKxRmgZoxCrWhgfvvQvAVp1O43pe0mYA1WhQfIw3WmcTKtp2KtXu5LEFNhEBocr9P6wHBRKcvMdUi9b9qCx4EJXdQFqTueoUC0oehHGgpS9JZRx5B+FUe6ArG9x/0PQpOkaDvutbY9P1UI3qIvRomWNwe3eiqVofZ9RNTU/MZ0o4xvmzd+/OpxlhdiUUcHFTN9JrC2B1DP8AyjfhTZcy+UiOJ3ovV6dZRnLs5eXioWkEm944HAdhdaEA+n9HjxB961ROjAUzey35oUpWZA+HWh2wrYCWBriJyc1GuZiw2mBIY870zGiLk3k07ViMGAfKijU48mSzWMvE0tx3LwcGlYHjNDDR45mVuCYabhjCaLc8uKPpJoyjSiAqdk5iCjzLU0IR1AfWojukg7SVHDvYPVSKyNKUj3KPlQNFf89PXWXAHv01ESCwxh2OKgmJJiyc6b6zFEQgFgEBV3F2YaumXnBrTQnoks1s1qp5iVD4WaACAOAPqM1ppFYcYsAXAY7anqRSdzC1llcY4oeQ5AdvU5KbeGRapR64eaxv+ObexXeiPWj62RZTzMNKZWD2hIJ7UuZUqsr1pprT4Cl6pIGEpwSFNhpz1Nf90Y+izz3ijNHCgv2y+1Gy3fB6YFJdalippXenLheMn1VmmSRCg6k4fSiAoRuJ8X4zS7fQCkolkRPNn0p4m51jtgKekIS4TvGDlpmlgKT1ZehzmgAABAFjFNfVHAGq6FQRkMyiY7lZetFvnihcxN4LAW9Wj6mFmKkVv7ZUdLqzzUn3RhbKbnmG9M2laMzszQtuc76CtHlQMaSgIl8+hv6VHiM0+LSyy9KIIWQYJODilqfBWPBCpLVYHLUyDH/OE9ailPEXQRYeGGkjwmmKnhGO3ck70UUCjOWp2ZO1T9C8uFEw7zYc69Mypc0tT8JClMPlpVofy1CLZHkZ+BpNIedkNU3bcUvm1m6GiCCpIQpAB6z6UNVMwB3CfKlFX4DpAec0JEsAm3goqKweYMNhA6m7xG9KA37lGt2+DiXUoII+sQ6V0IbfupNoEESXgawSGpJdgrjGMLi3k1ONNK3aeK+zzTfAYDgg830qFPgIloKxmToFO4uGnUJq0GmlPQBeBMlGhIPlWq7ltMJz4jagwxnBQvHRHzqIonDn58boDq2PYY78UpLs+ITR1AwCVpOEtk91R4qGadoHKss0R2x0TxZlETpNMbKi5M22su00WtbAIbkVZcAnYrG1RHhjNqL7iKHQ6nc0NYKdDCy9y99KPkCJYEB5fXwIoLAK9KuC7tknpNZqWJlN7sd4qAqCnBPN6XgZKUIQNsgT4DlC49YCjzTy8SrkQJwApKblMoFkCOwihVBHSj0NEANxT6RWCfmQfVqyf4/cFZdOQelFn+LaTTwKfwQKZjpX7qHw/wDG9FT0gtDFm7KA4R6XrNYzSxU6vXIl6sdvEJQMtSXORF18t9h2qFm7xK7wS+1Z2rGHk1FoEDZ/0nybUnijTHcCz6NMQqR18S8GcwDqd05jP4PizdfbelRC+llZmrlE4FNjsBT1o8csV9ZpIYTI16XpUjfEknmTjIHO8It0w3zhdOv2GKYsFK4iC6gP4pZ8CZIzRJHTIQfNVMk+IlMVTc193xFCYuK9SqFceSElKyhut5pU3KufzaoSzZD1nrTxE0k/Mir82Y/qKkQ/C+9pU+FGsX0Kk5eNPYqzJ1YD+aPmD/JFLwYaH4ysMJsfrptXgRfinZcGpi86Szl3KvM0+FwphgFHIBXnboFOfAmwUKwmtF9EM2d/QnjAJpRGosqwBMS5qW2uW2tfAip/CkzPrM8rPSiBslKAnLAAvltVhbrGHVMG+q9Kmi26PxXOAye1BoA5CKhQBj7HPaiIuXVdCROopPGJKF6F1uog9o1qVP6ZEwz4LL4lGNOrpUP/AJy+svK57VPgVlzcDQWP4t8MVFR4R4R4GPFD4bdhA+dZVp4NMyAo7TWmxCPg994inqeIxU28RKVhggWjBWLH+N5pRsRsL9UlJu34sUMOMQfmj0oyEaLygqKPs8qSDCYr9gD2oWjzRAY8tuPEYpQYKBu2cdkpcBhkMneKE0VDStwWnnNLbxXnnGIgDqtJpNMW+85joH0AXgqNRyVODKDqoT3ifHBTZiYpIEC1gEzvO3jCoC+uhYG27Si1zyjK+vipAqsAa1M5J02RH1+3k70XyCwZkZNo2ukZ+QGR0xNNGYsCC7N0Y4S6kBH0GFqdPlyWABPJ5j8FkUHrtk9ZIShs4uvXCX7RT+Pks3uVv6VbrBqbQH3b+ILim5NAwOIPWCNpoID7eCDhpySzoTq2Ba4Oba24tLB1G9RUfA8fJcjYChlBbcjEjY63hsS6UMBAYPoigtCTXSeG48LS0SZ4PfrrUfBPwCo+TKGADVWhY0qjCYHUC7yv3GKMhlgXWzc6YqVJ1XE2vD1gommWD75jQRSPQ84oLvYGeYfepV9FhzaQA8w1Nl5nN9LKTGCDigBx9Gg0cC5iAjKabLMdKaGkRSbPI6JZpEyfEen6tbABlqHxCt5BldJz2LatCPukXqL1H07SJPaNZbNzpjcam9FbYNjUOstqMNmPwQVKgvQFlsPHYFp1fXQu4GO6UissIVto4GbAd6CP8Qgoi/QME2RpS+3VM94osIGRW9ygylAcHYqDb/02Pif4nPwH+IuKTqU/Af4m+Ef+DH//2Q==\"," + + " \"frontPhoto\":" + + " \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQ....\"," + + " \"backendPhoto\":" + + " \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQ....\"}"; SubmitKYCReq obj = mapper.readValue(data, SubmitKYCReq.class); } /** submitKYC Response Submit KYC /api/kyc/ndBroker/proxyClient/submit */ public static void testSubmitKYCResponse() throws Exception { - String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":null}"; + String data = "{\"code\":\"200000\",\"data\":null}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** getKYCStatus Request Get KYC Status /api/kyc/ndBroker/proxyClient/status/list */ public static void testGetKYCStatusRequest() throws Exception { - String data = "{\\\"clientUids\\\": \\\"226383154\\\"}"; + String data = "{\"clientUids\": \"226383154\"}"; GetKYCStatusReq obj = mapper.readValue(data, GetKYCStatusReq.class); } /** getKYCStatus Response Get KYC Status /api/kyc/ndBroker/proxyClient/status/list */ public static void testGetKYCStatusResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"clientUid\\\": 226383154,\\n" - + " \\\"status\\\": \\\"PROCESS\\\",\\n" - + " \\\"rejectReason\\\": null\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"clientUid\": 226383154,\n" + + " \"status\": \"PROCESS\",\n" + + " \"rejectReason\": null\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -59,34 +60,34 @@ public static void testGetKYCStatusResponse() throws Exception { /** getKYCStatusList Request Get KYC Status List /api/kyc/ndBroker/proxyClient/status/page */ public static void testGetKYCStatusListRequest() throws Exception { - String data = "{\\\"pageNumber\\\": 1, \\\"pageSize\\\": 100}"; + String data = "{\"pageNumber\": 1, \"pageSize\": 100}"; GetKYCStatusListReq obj = mapper.readValue(data, GetKYCStatusListReq.class); } /** getKYCStatusList Response Get KYC Status List /api/kyc/ndBroker/proxyClient/status/page */ public static void testGetKYCStatusListResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"currentPage\\\": 1,\\n" - + " \\\"pageSize\\\": 100,\\n" - + " \\\"totalNum\\\": 9,\\n" - + " \\\"totalPage\\\": 1,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"clientUid\\\": 226383154,\\n" - + " \\\"status\\\": \\\"PROCESS\\\",\\n" - + " \\\"rejectReason\\\": null\\n" - + " },\\n" - + " {\\n" - + " \\\"clientUid\\\": 232772137,\\n" - + " \\\"status\\\": \\\"REJECT\\\",\\n" - + " \\\"rejectReason\\\": \\\"frontPhoto:Picture is not" - + " clear/covered/incomplete\\\"\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 100,\n" + + " \"totalNum\": 9,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"clientUid\": 226383154,\n" + + " \"status\": \"PROCESS\",\n" + + " \"rejectReason\": null\n" + + " },\n" + + " {\n" + + " \"clientUid\": 232772137,\n" + + " \"status\": \"REJECT\",\n" + + " \"rejectReason\": \"frontPhoto:Picture is not" + + " clear/covered/incomplete\"\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -94,22 +95,20 @@ public static void testGetKYCStatusListResponse() throws Exception { /** getBrokerInfo Request Get Broker Info /api/v1/broker/nd/info */ public static void testGetBrokerInfoRequest() throws Exception { - String data = - "{\\\"begin\\\": \\\"20240510\\\", \\\"end\\\": \\\"20241010\\\", \\\"tradeType\\\":" - + " \\\"1\\\"}"; + String data = "{\"begin\": \"20240510\", \"end\": \"20241010\", \"tradeType\": \"1\"}"; GetBrokerInfoReq obj = mapper.readValue(data, GetBrokerInfoReq.class); } /** getBrokerInfo Response Get Broker Info /api/v1/broker/nd/info */ public static void testGetBrokerInfoResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"accountSize\\\": 0,\\n" - + " \\\"maxAccountSize\\\": null,\\n" - + " \\\"level\\\": 0\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"accountSize\": 0,\n" + + " \"maxAccountSize\": null,\n" + + " \"level\": 0\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -117,21 +116,21 @@ public static void testGetBrokerInfoResponse() throws Exception { /** addSubAccount Request Add sub-account /api/v1/broker/nd/account */ public static void testAddSubAccountRequest() throws Exception { - String data = "{\\\"accountName\\\": \\\"Account1\\\"}"; + String data = "{\"accountName\": \"Account1\"}"; AddSubAccountReq obj = mapper.readValue(data, AddSubAccountReq.class); } /** addSubAccount Response Add sub-account /api/v1/broker/nd/account */ public static void testAddSubAccountResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"accountName\\\": \\\"Account15\\\",\\n" - + " \\\"uid\\\": \\\"226383154\\\",\\n" - + " \\\"createdAt\\\": 1729819381908,\\n" - + " \\\"level\\\": 0\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"accountName\": \"Account15\",\n" + + " \"uid\": \"226383154\",\n" + + " \"createdAt\": 1729819381908,\n" + + " \"level\": 0\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -139,29 +138,29 @@ public static void testAddSubAccountResponse() throws Exception { /** getSubAccount Request Get sub-account /api/v1/broker/nd/account */ public static void testGetSubAccountRequest() throws Exception { - String data = "{\\\"uid\\\": \\\"226383154\\\", \\\"currentPage\\\": 1, \\\"pageSize\\\": 20}"; + String data = "{\"uid\": \"226383154\", \"currentPage\": 1, \"pageSize\": 20}"; GetSubAccountReq obj = mapper.readValue(data, GetSubAccountReq.class); } /** getSubAccount Response Get sub-account /api/v1/broker/nd/account */ public static void testGetSubAccountResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -170,34 +169,33 @@ public static void testGetSubAccountResponse() throws Exception { /** addSubAccountApi Request Add sub-account API /api/v1/broker/nd/account/apikey */ public static void testAddSubAccountApiRequest() throws Exception { String data = - "{\\\"uid\\\": \\\"226383154\\\", \\\"passphrase\\\": \\\"11223344\\\"," - + " \\\"ipWhitelist\\\": [\\\"127.0.0.1\\\", \\\"123.123.123.123\\\"]," - + " \\\"permissions\\\": [\\\"general\\\", \\\"spot\\\"], \\\"label\\\": \\\"This is" - + " remarks\\\"}"; + "{\"uid\": \"226383154\", \"passphrase\": \"11223344\", \"ipWhitelist\": [\"127.0.0.1\"," + + " \"123.123.123.123\"], \"permissions\": [\"general\", \"spot\"], \"label\": \"This" + + " is remarks\"}"; AddSubAccountApiReq obj = mapper.readValue(data, AddSubAccountApiReq.class); } /** addSubAccountApi Response Add sub-account API /api/v1/broker/nd/account/apikey */ public static void testAddSubAccountApiResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -205,33 +203,32 @@ public static void testAddSubAccountApiResponse() throws Exception { /** getSubAccountAPI Request Get sub-account API /api/v1/broker/nd/account/apikey */ public static void testGetSubAccountAPIRequest() throws Exception { - String data = - "{\\\"uid\\\": \\\"226383154\\\", \\\"apiKey\\\": \\\"671afb36cee20f00015cfaf1\\\"}"; + String data = "{\"uid\": \"226383154\", \"apiKey\": \"671afb36cee20f00015cfaf1\"}"; GetSubAccountAPIReq obj = mapper.readValue(data, GetSubAccountAPIReq.class); } /** getSubAccountAPI Response Get sub-account API /api/v1/broker/nd/account/apikey */ public static void testGetSubAccountAPIResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -240,33 +237,32 @@ public static void testGetSubAccountAPIResponse() throws Exception { /** modifySubAccountApi Request Modify sub-account API /api/v1/broker/nd/account/update-apikey */ public static void testModifySubAccountApiRequest() throws Exception { String data = - "{\\\"uid\\\": \\\"226383154\\\", \\\"apiKey\\\": \\\"671afb36cee20f00015cfaf1\\\"," - + " \\\"ipWhitelist\\\": [\\\"127.0.0.1\\\", \\\"123.123.123.123\\\"]," - + " \\\"permissions\\\": [\\\"general\\\", \\\"spot\\\"], \\\"label\\\": \\\"This is" - + " remarks\\\"}"; + "{\"uid\": \"226383154\", \"apiKey\": \"671afb36cee20f00015cfaf1\", \"ipWhitelist\":" + + " [\"127.0.0.1\", \"123.123.123.123\"], \"permissions\": [\"general\", \"spot\"]," + + " \"label\": \"This is remarks\"}"; ModifySubAccountApiReq obj = mapper.readValue(data, ModifySubAccountApiReq.class); } /** modifySubAccountApi Response Modify sub-account API /api/v1/broker/nd/account/update-apikey */ public static void testModifySubAccountApiResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -274,14 +270,13 @@ public static void testModifySubAccountApiResponse() throws Exception { /** deleteSubAccountAPI Request Delete sub-account API /api/v1/broker/nd/account/apikey */ public static void testDeleteSubAccountAPIRequest() throws Exception { - String data = - "{\\\"uid\\\": \\\"226383154\\\", \\\"apiKey\\\": \\\"671afb36cee20f00015cfaf1\\\"}"; + String data = "{\"uid\": \"226383154\", \"apiKey\": \"671afb36cee20f00015cfaf1\"}"; DeleteSubAccountAPIReq obj = mapper.readValue(data, DeleteSubAccountAPIReq.class); } /** deleteSubAccountAPI Response Delete sub-account API /api/v1/broker/nd/account/apikey */ public static void testDeleteSubAccountAPIResponse() throws Exception { - String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": true\\n}"; + String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -289,21 +284,20 @@ public static void testDeleteSubAccountAPIResponse() throws Exception { /** transfer Request Transfer /api/v1/broker/nd/transfer */ public static void testTransferRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"USDT\\\", \\\"amount\\\": \\\"1\\\", \\\"clientOid\\\":" - + " \\\"e6c24d23-6bc2-401b-bf9e-55e2daddfbc1\\\", \\\"direction\\\": \\\"OUT\\\"," - + " \\\"accountType\\\": \\\"MAIN\\\", \\\"specialUid\\\": \\\"226383154\\\"," - + " \\\"specialAccountType\\\": \\\"MAIN\\\"}"; + "{\"currency\": \"USDT\", \"amount\": \"1\", \"clientOid\":" + + " \"e6c24d23-6bc2-401b-bf9e-55e2daddfbc1\", \"direction\": \"OUT\", \"accountType\":" + + " \"MAIN\", \"specialUid\": \"226383154\", \"specialAccountType\": \"MAIN\"}"; TransferReq obj = mapper.readValue(data, TransferReq.class); } /** transfer Response Transfer /api/v1/broker/nd/transfer */ public static void testTransferResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"671b4600c1e3dd000726866d\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"671b4600c1e3dd000726866d\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -311,29 +305,29 @@ public static void testTransferResponse() throws Exception { /** getTransferHistory Request Get Transfer History /api/v3/broker/nd/transfer/detail */ public static void testGetTransferHistoryRequest() throws Exception { - String data = "{\\\"orderId\\\": \\\"671b4600c1e3dd000726866d\\\"}"; + String data = "{\"orderId\": \"671b4600c1e3dd000726866d\"}"; GetTransferHistoryReq obj = mapper.readValue(data, GetTransferHistoryReq.class); } /** getTransferHistory Response Get Transfer History /api/v3/broker/nd/transfer/detail */ public static void testGetTransferHistoryResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"671b4600c1e3dd000726866d\\\",\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"amount\\\": \\\"1\\\",\\n" - + " \\\"fromUid\\\": 165111215,\\n" - + " \\\"fromAccountType\\\": \\\"MAIN\\\",\\n" - + " \\\"fromAccountTag\\\": \\\"DEFAULT\\\",\\n" - + " \\\"toUid\\\": 226383154,\\n" - + " \\\"toAccountType\\\": \\\"MAIN\\\",\\n" - + " \\\"toAccountTag\\\": \\\"DEFAULT\\\",\\n" - + " \\\"status\\\": \\\"SUCCESS\\\",\\n" - + " \\\"reason\\\": null,\\n" - + " \\\"createdAt\\\": 1729840640000\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"671b4600c1e3dd000726866d\",\n" + + " \"currency\": \"USDT\",\n" + + " \"amount\": \"1\",\n" + + " \"fromUid\": 165111215,\n" + + " \"fromAccountType\": \"MAIN\",\n" + + " \"fromAccountTag\": \"DEFAULT\",\n" + + " \"toUid\": 226383154,\n" + + " \"toAccountType\": \"MAIN\",\n" + + " \"toAccountTag\": \"DEFAULT\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"reason\": null,\n" + + " \"createdAt\": 1729840640000\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -342,35 +336,35 @@ public static void testGetTransferHistoryResponse() throws Exception { /** getDepositList Request Get Deposit List /api/v1/asset/ndbroker/deposit/list */ public static void testGetDepositListRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"USDT\\\", \\\"status\\\": \\\"SUCCESS\\\", \\\"hash\\\":" - + " \\\"example_string_default_value\\\", \\\"startTimestamp\\\": 123456," - + " \\\"endTimestamp\\\": 123456, \\\"limit\\\": 100}"; + "{\"currency\": \"USDT\", \"status\": \"SUCCESS\", \"hash\":" + + " \"example_string_default_value\", \"startTimestamp\": 123456, \"endTimestamp\":" + + " 123456, \"limit\": 100}"; GetDepositListReq obj = mapper.readValue(data, GetDepositListReq.class); } /** getDepositList Response Get Deposit List /api/v1/asset/ndbroker/deposit/list */ public static void testGetDepositListResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"uid\\\": 165111215,\\n" - + " \\\"hash\\\": \\\"6724e363a492800007ec602b\\\",\\n" - + " \\\"address\\\": \\\"xxxxxxx@gmail.com\\\",\\n" - + " \\\"memo\\\": \\\"\\\",\\n" - + " \\\"amount\\\": \\\"3.0\\\",\\n" - + " \\\"fee\\\": \\\"0.0\\\",\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"isInner\\\": true,\\n" - + " \\\"walletTxId\\\": \\\"bbbbbbbbb\\\",\\n" - + " \\\"status\\\": \\\"SUCCESS\\\",\\n" - + " \\\"chain\\\": \\\"\\\",\\n" - + " \\\"remark\\\": \\\"\\\",\\n" - + " \\\"createdAt\\\": 1730470760000,\\n" - + " \\\"updatedAt\\\": 1730470760000\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"uid\": 165111215,\n" + + " \"hash\": \"6724e363a492800007ec602b\",\n" + + " \"address\": \"xxxxxxx@gmail.com\",\n" + + " \"memo\": \"\",\n" + + " \"amount\": \"3.0\",\n" + + " \"fee\": \"0.0\",\n" + + " \"currency\": \"USDT\",\n" + + " \"isInner\": true,\n" + + " \"walletTxId\": \"bbbbbbbbb\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"chain\": \"\",\n" + + " \"remark\": \"\",\n" + + " \"createdAt\": 1730470760000,\n" + + " \"updatedAt\": 1730470760000\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -378,31 +372,31 @@ public static void testGetDepositListResponse() throws Exception { /** getDepositDetail Request Get Deposit Detail /api/v3/broker/nd/deposit/detail */ public static void testGetDepositDetailRequest() throws Exception { - String data = "{\\\"currency\\\": \\\"USDT\\\", \\\"hash\\\": \\\"30bb0e0b***4156c5188\\\"}"; + String data = "{\"currency\": \"USDT\", \"hash\": \"30bb0e0b***4156c5188\"}"; GetDepositDetailReq obj = mapper.readValue(data, GetDepositDetailReq.class); } /** getDepositDetail Response Get Deposit Detail /api/v3/broker/nd/deposit/detail */ public static void testGetDepositDetailResponse() throws Exception { String data = - "{\\n" - + " \\\"data\\\" : {\\n" - + " \\\"chain\\\" : \\\"trx\\\",\\n" - + " \\\"hash\\\" : \\\"30bb0e0b***4156c5188\\\",\\n" - + " \\\"walletTxId\\\" : \\\"30bb0***610d1030f\\\",\\n" - + " \\\"uid\\\" : 201496341,\\n" - + " \\\"updatedAt\\\" : 1713429174000,\\n" - + " \\\"amount\\\" : \\\"8.5\\\",\\n" - + " \\\"memo\\\" : \\\"\\\",\\n" - + " \\\"fee\\\" : \\\"0.0\\\",\\n" - + " \\\"address\\\" : \\\"THLPzUrbd1o***vP7d\\\",\\n" - + " \\\"remark\\\" : \\\"Deposit\\\",\\n" - + " \\\"isInner\\\" : false,\\n" - + " \\\"currency\\\" : \\\"USDT\\\",\\n" - + " \\\"status\\\" : \\\"SUCCESS\\\",\\n" - + " \\\"createdAt\\\" : 1713429173000\\n" - + " },\\n" - + " \\\"code\\\" : \\\"200000\\\"\\n" + "{\n" + + " \"data\" : {\n" + + " \"chain\" : \"trx\",\n" + + " \"hash\" : \"30bb0e0b***4156c5188\",\n" + + " \"walletTxId\" : \"30bb0***610d1030f\",\n" + + " \"uid\" : 201496341,\n" + + " \"updatedAt\" : 1713429174000,\n" + + " \"amount\" : \"8.5\",\n" + + " \"memo\" : \"\",\n" + + " \"fee\" : \"0.0\",\n" + + " \"address\" : \"THLPzUrbd1o***vP7d\",\n" + + " \"remark\" : \"Deposit\",\n" + + " \"isInner\" : false,\n" + + " \"currency\" : \"USDT\",\n" + + " \"status\" : \"SUCCESS\",\n" + + " \"createdAt\" : 1713429173000\n" + + " },\n" + + " \"code\" : \"200000\"\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -410,31 +404,31 @@ public static void testGetDepositDetailResponse() throws Exception { /** getWithdrawDetail Request Get Withdraw Detail /api/v3/broker/nd/withdraw/detail */ public static void testGetWithdrawDetailRequest() throws Exception { - String data = "{\\\"withdrawalId\\\": \\\"66617a2***3c9a\\\"}"; + String data = "{\"withdrawalId\": \"66617a2***3c9a\"}"; GetWithdrawDetailReq obj = mapper.readValue(data, GetWithdrawDetailReq.class); } /** getWithdrawDetail Response Get Withdraw Detail /api/v3/broker/nd/withdraw/detail */ public static void testGetWithdrawDetailResponse() throws Exception { String data = - "{\\n" - + " \\\"data\\\": {\\n" - + " \\\"id\\\": \\\"66617a2***3c9a\\\",\\n" - + " \\\"chain\\\": \\\"ton\\\",\\n" - + " \\\"walletTxId\\\": \\\"AJ***eRI=\\\",\\n" - + " \\\"uid\\\": 157267400,\\n" - + " \\\"amount\\\": \\\"1.00000000\\\",\\n" - + " \\\"memo\\\": \\\"7025734\\\",\\n" - + " \\\"fee\\\": \\\"0.00000000\\\",\\n" - + " \\\"address\\\": \\\"EQDn***dKbGzr\\\",\\n" - + " \\\"remark\\\": \\\"\\\",\\n" - + " \\\"isInner\\\": false,\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"status\\\": \\\"SUCCESS\\\",\\n" - + " \\\"createdAt\\\": 1717664288000,\\n" - + " \\\"updatedAt\\\": 1717664375000\\n" - + " },\\n" - + " \\\"code\\\": \\\"200000\\\"\\n" + "{\n" + + " \"data\": {\n" + + " \"id\": \"66617a2***3c9a\",\n" + + " \"chain\": \"ton\",\n" + + " \"walletTxId\": \"AJ***eRI=\",\n" + + " \"uid\": 157267400,\n" + + " \"amount\": \"1.00000000\",\n" + + " \"memo\": \"7025734\",\n" + + " \"fee\": \"0.00000000\",\n" + + " \"address\": \"EQDn***dKbGzr\",\n" + + " \"remark\": \"\",\n" + + " \"isInner\": false,\n" + + " \"currency\": \"USDT\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"createdAt\": 1717664288000,\n" + + " \"updatedAt\": 1717664375000\n" + + " },\n" + + " \"code\": \"200000\"\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -442,21 +436,19 @@ public static void testGetWithdrawDetailResponse() throws Exception { /** getRebase Request Get Broker Rebate /api/v1/broker/nd/rebase/download */ public static void testGetRebaseRequest() throws Exception { - String data = - "{\\\"begin\\\": \\\"20240610\\\", \\\"end\\\": \\\"20241010\\\", \\\"tradeType\\\":" - + " \\\"1\\\"}"; + String data = "{\"begin\": \"20240610\", \"end\": \"20241010\", \"tradeType\": \"1\"}"; GetRebaseReq obj = mapper.readValue(data, GetRebaseReq.class); } /** getRebase Response Get Broker Rebate /api/v1/broker/nd/rebase/download */ public static void testGetRebaseResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"url\\\":" - + " \\\"https://kc-v2-promotion.s3.ap-northeast-1.amazonaws.com/broker/671aec522593f600019766d0_file.csv?X-Amz-Security-Token=IQo*********2cd90f14efb\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"url\":" + + " \"https://kc-v2-promotion.s3.ap-northeast-1.amazonaws.com/broker/671aec522593f600019766d0_file.csv?X-Amz-Security-Token=IQo*********2cd90f14efb\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -513,6 +505,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -534,6 +527,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApiAutoGeneratedTest.java index 51a6c8a8..fa608d14 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApiAutoGeneratedTest.java @@ -11,26 +11,27 @@ class FuturesApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** addOrder Request Add Order /api/v1/copy-trade/futures/orders */ public static void testAddOrderRequest() throws Exception { String data = - "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\"," - + " \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\"," - + " \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false," - + " \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.1\\\", \\\"size\\\": 1," - + " \\\"timeInForce\\\": \\\"GTC\\\"}"; + "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," + + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," + + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.1\", \"size\":" + + " 1, \"timeInForce\": \"GTC\"}"; AddOrderReq obj = mapper.readValue(data, AddOrderReq.class); } /** addOrder Response Add Order /api/v1/copy-trade/futures/orders */ public static void testAddOrderResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"263485113055133696\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f331e493fb\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"263485113055133696\",\n" + + " \"clientOid\": \"5c52e11203aa677f331e493fb\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -39,23 +40,22 @@ public static void testAddOrderResponse() throws Exception { /** addOrderTest Request Add Order Test /api/v1/copy-trade/futures/orders/test */ public static void testAddOrderTestRequest() throws Exception { String data = - "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\"," - + " \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\"," - + " \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false," - + " \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.1\\\", \\\"size\\\": 1," - + " \\\"timeInForce\\\": \\\"GTC\\\"}"; + "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," + + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," + + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.1\", \"size\":" + + " 1, \"timeInForce\": \"GTC\"}"; AddOrderTestReq obj = mapper.readValue(data, AddOrderTestReq.class); } /** addOrderTest Response Add Order Test /api/v1/copy-trade/futures/orders/test */ public static void testAddOrderTestResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"234125150956625920\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"234125150956625920\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -66,12 +66,11 @@ public static void testAddOrderTestResponse() throws Exception { */ public static void testAddTPSLOrderRequest() throws Exception { String data = - "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\"," - + " \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\"," - + " \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false," - + " \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.2\\\", \\\"size\\\": 1," - + " \\\"timeInForce\\\": \\\"GTC\\\", \\\"triggerStopUpPrice\\\": \\\"0.3\\\"," - + " \\\"triggerStopDownPrice\\\": \\\"0.1\\\", \\\"stopPriceType\\\": \\\"TP\\\"}"; + "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," + + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," + + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.2\", \"size\":" + + " 1, \"timeInForce\": \"GTC\", \"triggerStopUpPrice\": \"0.3\"," + + " \"triggerStopDownPrice\": \"0.1\", \"stopPriceType\": \"TP\"}"; AddTPSLOrderReq obj = mapper.readValue(data, AddTPSLOrderReq.class); } @@ -80,12 +79,12 @@ public static void testAddTPSLOrderRequest() throws Exception { */ public static void testAddTPSLOrderResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"234125150956625920\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"234125150956625920\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -93,20 +92,20 @@ public static void testAddTPSLOrderResponse() throws Exception { /** cancelOrderById Request Cancel Order By OrderId /api/v1/copy-trade/futures/orders */ public static void testCancelOrderByIdRequest() throws Exception { - String data = "{\\\"orderId\\\": \\\"263485113055133696\\\"}"; + String data = "{\"orderId\": \"263485113055133696\"}"; CancelOrderByIdReq obj = mapper.readValue(data, CancelOrderByIdReq.class); } /** cancelOrderById Response Cancel Order By OrderId /api/v1/copy-trade/futures/orders */ public static void testCancelOrderByIdResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"cancelledOrderIds\\\": [\\n" - + " \\\"263485113055133696\\\"\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"263485113055133696\"\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -117,8 +116,7 @@ public static void testCancelOrderByIdResponse() throws Exception { * /api/v1/copy-trade/futures/orders/client-order */ public static void testCancelOrderByClientOidRequest() throws Exception { - String data = - "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"clientOid\\\": \\\"5c52e11203aa677f331e493fb\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\", \"clientOid\": \"5c52e11203aa677f331e493fb\"}"; CancelOrderByClientOidReq obj = mapper.readValue(data, CancelOrderByClientOidReq.class); } @@ -128,11 +126,11 @@ public static void testCancelOrderByClientOidRequest() throws Exception { */ public static void testCancelOrderByClientOidResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f331e4913fb\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"clientOid\": \"5c52e11203aa677f331e4913fb\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -140,21 +138,20 @@ public static void testCancelOrderByClientOidResponse() throws Exception { /** getMaxOpenSize Request Get Max Open Size /api/v1/copy-trade/futures/get-max-open-size */ public static void testGetMaxOpenSizeRequest() throws Exception { - String data = - "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"price\\\": 123456.0, \\\"leverage\\\": 123456}"; + String data = "{\"symbol\": \"XBTUSDTM\", \"price\": 123456.0, \"leverage\": 123456}"; GetMaxOpenSizeReq obj = mapper.readValue(data, GetMaxOpenSizeReq.class); } /** getMaxOpenSize Response Get Max Open Size /api/v1/copy-trade/futures/get-max-open-size */ public static void testGetMaxOpenSizeResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"maxBuyOpenSize\\\": \\\"1000000\\\",\\n" - + " \\\"maxSellOpenSize\\\": \\\"51\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"maxBuyOpenSize\": \"1000000\",\n" + + " \"maxSellOpenSize\": \"51\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -165,7 +162,7 @@ public static void testGetMaxOpenSizeResponse() throws Exception { * /api/v1/copy-trade/futures/position/margin/max-withdraw-margin */ public static void testGetMaxWithdrawMarginRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"example_string_default_value\\\"}"; + String data = "{\"symbol\": \"example_string_default_value\"}"; GetMaxWithdrawMarginReq obj = mapper.readValue(data, GetMaxWithdrawMarginReq.class); } @@ -174,8 +171,7 @@ public static void testGetMaxWithdrawMarginRequest() throws Exception { * /api/v1/copy-trade/futures/position/margin/max-withdraw-margin */ public static void testGetMaxWithdrawMarginResponse() throws Exception { - String data = - "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": \\\"21.1135719252\\\"\\n}"; + String data = "{\n \"code\": \"200000\",\n \"data\": \"21.1135719252\"\n}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -185,8 +181,7 @@ public static void testGetMaxWithdrawMarginResponse() throws Exception { * /api/v1/copy-trade/futures/position/margin/deposit-margin */ public static void testAddIsolatedMarginRequest() throws Exception { - String data = - "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"margin\\\": 3, \\\"bizNo\\\": \\\"112233\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\", \"margin\": 3, \"bizNo\": \"112233\"}"; AddIsolatedMarginReq obj = mapper.readValue(data, AddIsolatedMarginReq.class); } @@ -196,49 +191,49 @@ public static void testAddIsolatedMarginRequest() throws Exception { */ public static void testAddIsolatedMarginResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"id\\\": \\\"400000000000974886\\\",\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"autoDeposit\\\": true,\\n" - + " \\\"maintMarginReq\\\": \\\"0.004\\\",\\n" - + " \\\"riskLimit\\\": 100000,\\n" - + " \\\"realLeverage\\\": \\\"1.83\\\",\\n" - + " \\\"crossMode\\\": false,\\n" - + " \\\"marginMode\\\": \\\"\\\",\\n" - + " \\\"positionSide\\\": \\\"\\\",\\n" - + " \\\"leverage\\\": \\\"1.83\\\",\\n" - + " \\\"delevPercentage\\\": 0.2,\\n" - + " \\\"openingTimestamp\\\": 1736932881164,\\n" - + " \\\"currentTimestamp\\\": 1736933530230,\\n" - + " \\\"currentQty\\\": 1,\\n" - + " \\\"currentCost\\\": \\\"97.302\\\",\\n" - + " \\\"currentComm\\\": \\\"0.0583812\\\",\\n" - + " \\\"unrealisedCost\\\": \\\"97.302\\\",\\n" - + " \\\"realisedGrossCost\\\": \\\"0.0000000000\\\",\\n" - + " \\\"realisedCost\\\": \\\"0.0583812000\\\",\\n" - + " \\\"isOpen\\\": true,\\n" - + " \\\"markPrice\\\": \\\"96939.98\\\",\\n" - + " \\\"markValue\\\": \\\"96.9399800000\\\",\\n" - + " \\\"posCost\\\": \\\"97.302\\\",\\n" - + " \\\"posCross\\\": \\\"20.9874\\\",\\n" - + " \\\"posInit\\\": \\\"32.4339999967\\\",\\n" - + " \\\"posComm\\\": \\\"0.0904415999\\\",\\n" - + " \\\"posLoss\\\": \\\"0\\\",\\n" - + " \\\"posMargin\\\": \\\"53.5118415966\\\",\\n" - + " \\\"posMaint\\\": \\\"0.4796495999\\\",\\n" - + " \\\"maintMargin\\\": \\\"53.1498215966\\\",\\n" - + " \\\"realisedGrossPnl\\\": \\\"0.0000000000\\\",\\n" - + " \\\"realisedPnl\\\": \\\"-0.0583812000\\\",\\n" - + " \\\"unrealisedPnl\\\": \\\"-0.3620200000\\\",\\n" - + " \\\"unrealisedPnlPcnt\\\": \\\"-0.0037\\\",\\n" - + " \\\"unrealisedRoePcnt\\\": \\\"-0.0112\\\",\\n" - + " \\\"avgEntryPrice\\\": \\\"97302.00\\\",\\n" - + " \\\"liquidationPrice\\\": \\\"44269.81\\\",\\n" - + " \\\"bankruptPrice\\\": \\\"43880.61\\\",\\n" - + " \\\"settleCurrency\\\": \\\"USDT\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"400000000000974886\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"autoDeposit\": true,\n" + + " \"maintMarginReq\": \"0.004\",\n" + + " \"riskLimit\": 100000,\n" + + " \"realLeverage\": \"1.83\",\n" + + " \"crossMode\": false,\n" + + " \"marginMode\": \"\",\n" + + " \"positionSide\": \"\",\n" + + " \"leverage\": \"1.83\",\n" + + " \"delevPercentage\": 0.2,\n" + + " \"openingTimestamp\": 1736932881164,\n" + + " \"currentTimestamp\": 1736933530230,\n" + + " \"currentQty\": 1,\n" + + " \"currentCost\": \"97.302\",\n" + + " \"currentComm\": \"0.0583812\",\n" + + " \"unrealisedCost\": \"97.302\",\n" + + " \"realisedGrossCost\": \"0.0000000000\",\n" + + " \"realisedCost\": \"0.0583812000\",\n" + + " \"isOpen\": true,\n" + + " \"markPrice\": \"96939.98\",\n" + + " \"markValue\": \"96.9399800000\",\n" + + " \"posCost\": \"97.302\",\n" + + " \"posCross\": \"20.9874\",\n" + + " \"posInit\": \"32.4339999967\",\n" + + " \"posComm\": \"0.0904415999\",\n" + + " \"posLoss\": \"0\",\n" + + " \"posMargin\": \"53.5118415966\",\n" + + " \"posMaint\": \"0.4796495999\",\n" + + " \"maintMargin\": \"53.1498215966\",\n" + + " \"realisedGrossPnl\": \"0.0000000000\",\n" + + " \"realisedPnl\": \"-0.0583812000\",\n" + + " \"unrealisedPnl\": \"-0.3620200000\",\n" + + " \"unrealisedPnlPcnt\": \"-0.0037\",\n" + + " \"unrealisedRoePcnt\": \"-0.0112\",\n" + + " \"avgEntryPrice\": \"97302.00\",\n" + + " \"liquidationPrice\": \"44269.81\",\n" + + " \"bankruptPrice\": \"43880.61\",\n" + + " \"settleCurrency\": \"USDT\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -249,7 +244,7 @@ public static void testAddIsolatedMarginResponse() throws Exception { * /api/v1/copy-trade/futures/position/margin/withdraw-margin */ public static void testRemoveIsolatedMarginRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"withdrawAmount\\\": 1e-07}"; + String data = "{\"symbol\": \"XBTUSDTM\", \"withdrawAmount\": 1e-07}"; RemoveIsolatedMarginReq obj = mapper.readValue(data, RemoveIsolatedMarginReq.class); } @@ -258,7 +253,7 @@ public static void testRemoveIsolatedMarginRequest() throws Exception { * /api/v1/copy-trade/futures/position/margin/withdraw-margin */ public static void testRemoveIsolatedMarginResponse() throws Exception { - String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": \\\"0.1\\\"\\n}"; + String data = "{\n \"code\": \"200000\",\n \"data\": \"0.1\"\n}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -268,7 +263,7 @@ public static void testRemoveIsolatedMarginResponse() throws Exception { * /api/v1/copy-trade/futures/position/risk-limit-level/change */ public static void testModifyIsolatedMarginRiskLimtRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"level\\\": 1}"; + String data = "{\"symbol\": \"XBTUSDTM\", \"level\": 1}"; ModifyIsolatedMarginRiskLimtReq obj = mapper.readValue(data, ModifyIsolatedMarginRiskLimtReq.class); } @@ -278,7 +273,7 @@ public static void testModifyIsolatedMarginRiskLimtRequest() throws Exception { * /api/v1/copy-trade/futures/position/risk-limit-level/change */ public static void testModifyIsolatedMarginRiskLimtResponse() throws Exception { - String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": true\\n}"; + String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; RestResponse resp = mapper.readValue( data, new TypeReference>() {}); @@ -289,7 +284,7 @@ public static void testModifyIsolatedMarginRiskLimtResponse() throws Exception { * /api/v1/copy-trade/futures/position/margin/auto-deposit-status */ public static void testModifyAutoDepositStatusRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"status\\\": true}"; + String data = "{\"symbol\": \"XBTUSDTM\", \"status\": true}"; ModifyAutoDepositStatusReq obj = mapper.readValue(data, ModifyAutoDepositStatusReq.class); } @@ -298,7 +293,7 @@ public static void testModifyAutoDepositStatusRequest() throws Exception { * /api/v1/copy-trade/futures/position/margin/auto-deposit-status */ public static void testModifyAutoDepositStatusResponse() throws Exception { - String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": true\\n}"; + String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -352,6 +347,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -373,6 +369,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApiAutoGeneratedTest.java index 562f0ed5..f41ab9de 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApiAutoGeneratedTest.java @@ -11,23 +11,23 @@ class EarnApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** purchase Request Purchase /api/v1/earn/orders */ public static void testPurchaseRequest() throws Exception { - String data = - "{\\\"productId\\\": \\\"2611\\\", \\\"amount\\\": \\\"1\\\", \\\"accountType\\\":" - + " \\\"TRADE\\\"}"; + String data = "{\"productId\": \"2611\", \"amount\": \"1\", \"accountType\": \"TRADE\"}"; PurchaseReq obj = mapper.readValue(data, PurchaseReq.class); } /** purchase Response Purchase /api/v1/earn/orders */ public static void testPurchaseResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"2767291\\\",\\n" - + " \\\"orderTxId\\\": \\\"6603694\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"2767291\",\n" + + " \"orderTxId\": \"6603694\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -35,24 +35,24 @@ public static void testPurchaseResponse() throws Exception { /** getRedeemPreview Request Get Redeem Preview /api/v1/earn/redeem-preview */ public static void testGetRedeemPreviewRequest() throws Exception { - String data = "{\\\"orderId\\\": \\\"2767291\\\", \\\"fromAccountType\\\": \\\"MAIN\\\"}"; + String data = "{\"orderId\": \"2767291\", \"fromAccountType\": \"MAIN\"}"; GetRedeemPreviewReq obj = mapper.readValue(data, GetRedeemPreviewReq.class); } /** getRedeemPreview Response Get Redeem Preview /api/v1/earn/redeem-preview */ public static void testGetRedeemPreviewResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"currency\\\": \\\"KCS\\\",\\n" - + " \\\"redeemAmount\\\": \\\"1\\\",\\n" - + " \\\"penaltyInterestAmount\\\": \\\"0\\\",\\n" - + " \\\"redeemPeriod\\\": 3,\\n" - + " \\\"deliverTime\\\": 1729518951000,\\n" - + " \\\"manualRedeemable\\\": true,\\n" - + " \\\"redeemAll\\\": false\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currency\": \"KCS\",\n" + + " \"redeemAmount\": \"1\",\n" + + " \"penaltyInterestAmount\": \"0\",\n" + + " \"redeemPeriod\": 3,\n" + + " \"deliverTime\": 1729518951000,\n" + + " \"manualRedeemable\": true,\n" + + " \"redeemAll\": false\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -61,22 +61,22 @@ public static void testGetRedeemPreviewResponse() throws Exception { /** redeem Request Redeem /api/v1/earn/orders */ public static void testRedeemRequest() throws Exception { String data = - "{\\\"orderId\\\": \\\"2767291\\\", \\\"amount\\\": \\\"example_string_default_value\\\"," - + " \\\"fromAccountType\\\": \\\"MAIN\\\", \\\"confirmPunishRedeem\\\": \\\"1\\\"}"; + "{\"orderId\": \"2767291\", \"amount\": \"example_string_default_value\"," + + " \"fromAccountType\": \"MAIN\", \"confirmPunishRedeem\": \"1\"}"; RedeemReq obj = mapper.readValue(data, RedeemReq.class); } /** redeem Response Redeem /api/v1/earn/orders */ public static void testRedeemResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderTxId\\\": \\\"6603700\\\",\\n" - + " \\\"deliverTime\\\": 1729517805000,\\n" - + " \\\"status\\\": \\\"PENDING\\\",\\n" - + " \\\"amount\\\": \\\"1\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderTxId\": \"6603700\",\n" + + " \"deliverTime\": 1729517805000,\n" + + " \"status\": \"PENDING\",\n" + + " \"amount\": \"1\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -84,42 +84,42 @@ public static void testRedeemResponse() throws Exception { /** getSavingsProducts Request Get Savings Products /api/v1/earn/saving/products */ public static void testGetSavingsProductsRequest() throws Exception { - String data = "{\\\"currency\\\": \\\"BTC\\\"}"; + String data = "{\"currency\": \"BTC\"}"; GetSavingsProductsReq obj = mapper.readValue(data, GetSavingsProductsReq.class); } /** getSavingsProducts Response Get Savings Products /api/v1/earn/saving/products */ public static void testGetSavingsProductsResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"2172\\\",\\n" - + " \\\"currency\\\": \\\"BTC\\\",\\n" - + " \\\"category\\\": \\\"DEMAND\\\",\\n" - + " \\\"type\\\": \\\"DEMAND\\\",\\n" - + " \\\"precision\\\": 8,\\n" - + " \\\"productUpperLimit\\\": \\\"480\\\",\\n" - + " \\\"productRemainAmount\\\": \\\"132.36153083\\\",\\n" - + " \\\"userUpperLimit\\\": \\\"20\\\",\\n" - + " \\\"userLowerLimit\\\": \\\"0.01\\\",\\n" - + " \\\"redeemPeriod\\\": 0,\\n" - + " \\\"lockStartTime\\\": 1644807600000,\\n" - + " \\\"lockEndTime\\\": null,\\n" - + " \\\"applyStartTime\\\": 1644807600000,\\n" - + " \\\"applyEndTime\\\": null,\\n" - + " \\\"returnRate\\\": \\\"0.00047208\\\",\\n" - + " \\\"incomeCurrency\\\": \\\"BTC\\\",\\n" - + " \\\"earlyRedeemSupported\\\": 0,\\n" - + " \\\"status\\\": \\\"ONGOING\\\",\\n" - + " \\\"redeemType\\\": \\\"MANUAL\\\",\\n" - + " \\\"incomeReleaseType\\\": \\\"DAILY\\\",\\n" - + " \\\"interestDate\\\": 1729267200000,\\n" - + " \\\"duration\\\": 0,\\n" - + " \\\"newUserOnly\\\": 0\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"2172\",\n" + + " \"currency\": \"BTC\",\n" + + " \"category\": \"DEMAND\",\n" + + " \"type\": \"DEMAND\",\n" + + " \"precision\": 8,\n" + + " \"productUpperLimit\": \"480\",\n" + + " \"productRemainAmount\": \"132.36153083\",\n" + + " \"userUpperLimit\": \"20\",\n" + + " \"userLowerLimit\": \"0.01\",\n" + + " \"redeemPeriod\": 0,\n" + + " \"lockStartTime\": 1644807600000,\n" + + " \"lockEndTime\": null,\n" + + " \"applyStartTime\": 1644807600000,\n" + + " \"applyEndTime\": null,\n" + + " \"returnRate\": \"0.00047208\",\n" + + " \"incomeCurrency\": \"BTC\",\n" + + " \"earlyRedeemSupported\": 0,\n" + + " \"status\": \"ONGOING\",\n" + + " \"redeemType\": \"MANUAL\",\n" + + " \"incomeReleaseType\": \"DAILY\",\n" + + " \"interestDate\": 1729267200000,\n" + + " \"duration\": 0,\n" + + " \"newUserOnly\": 0\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -127,42 +127,42 @@ public static void testGetSavingsProductsResponse() throws Exception { /** getPromotionProducts Request Get Promotion Products /api/v1/earn/promotion/products */ public static void testGetPromotionProductsRequest() throws Exception { - String data = "{\\\"currency\\\": \\\"BTC\\\"}"; + String data = "{\"currency\": \"BTC\"}"; GetPromotionProductsReq obj = mapper.readValue(data, GetPromotionProductsReq.class); } /** getPromotionProducts Response Get Promotion Products /api/v1/earn/promotion/products */ public static void testGetPromotionProductsResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"2685\\\",\\n" - + " \\\"currency\\\": \\\"BTC\\\",\\n" - + " \\\"category\\\": \\\"ACTIVITY\\\",\\n" - + " \\\"type\\\": \\\"TIME\\\",\\n" - + " \\\"precision\\\": 8,\\n" - + " \\\"productUpperLimit\\\": \\\"50\\\",\\n" - + " \\\"userUpperLimit\\\": \\\"1\\\",\\n" - + " \\\"userLowerLimit\\\": \\\"0.001\\\",\\n" - + " \\\"redeemPeriod\\\": 0,\\n" - + " \\\"lockStartTime\\\": 1702371601000,\\n" - + " \\\"lockEndTime\\\": 1729858405000,\\n" - + " \\\"applyStartTime\\\": 1702371600000,\\n" - + " \\\"applyEndTime\\\": null,\\n" - + " \\\"returnRate\\\": \\\"0.03\\\",\\n" - + " \\\"incomeCurrency\\\": \\\"BTC\\\",\\n" - + " \\\"earlyRedeemSupported\\\": 0,\\n" - + " \\\"productRemainAmount\\\": \\\"49.78203998\\\",\\n" - + " \\\"status\\\": \\\"ONGOING\\\",\\n" - + " \\\"redeemType\\\": \\\"TRANS_DEMAND\\\",\\n" - + " \\\"incomeReleaseType\\\": \\\"DAILY\\\",\\n" - + " \\\"interestDate\\\": 1729253605000,\\n" - + " \\\"duration\\\": 7,\\n" - + " \\\"newUserOnly\\\": 1\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"2685\",\n" + + " \"currency\": \"BTC\",\n" + + " \"category\": \"ACTIVITY\",\n" + + " \"type\": \"TIME\",\n" + + " \"precision\": 8,\n" + + " \"productUpperLimit\": \"50\",\n" + + " \"userUpperLimit\": \"1\",\n" + + " \"userLowerLimit\": \"0.001\",\n" + + " \"redeemPeriod\": 0,\n" + + " \"lockStartTime\": 1702371601000,\n" + + " \"lockEndTime\": 1729858405000,\n" + + " \"applyStartTime\": 1702371600000,\n" + + " \"applyEndTime\": null,\n" + + " \"returnRate\": \"0.03\",\n" + + " \"incomeCurrency\": \"BTC\",\n" + + " \"earlyRedeemSupported\": 0,\n" + + " \"productRemainAmount\": \"49.78203998\",\n" + + " \"status\": \"ONGOING\",\n" + + " \"redeemType\": \"TRANS_DEMAND\",\n" + + " \"incomeReleaseType\": \"DAILY\",\n" + + " \"interestDate\": 1729253605000,\n" + + " \"duration\": 7,\n" + + " \"newUserOnly\": 1\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -170,42 +170,42 @@ public static void testGetPromotionProductsResponse() throws Exception { /** getStakingProducts Request Get Staking Products /api/v1/earn/staking/products */ public static void testGetStakingProductsRequest() throws Exception { - String data = "{\\\"currency\\\": \\\"BTC\\\"}"; + String data = "{\"currency\": \"BTC\"}"; GetStakingProductsReq obj = mapper.readValue(data, GetStakingProductsReq.class); } /** getStakingProducts Response Get Staking Products /api/v1/earn/staking/products */ public static void testGetStakingProductsResponse() throws Exception { String data = - "{\\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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -213,42 +213,42 @@ public static void testGetStakingProductsResponse() throws Exception { /** getKcsStakingProducts Request Get KCS Staking Products /api/v1/earn/kcs-staking/products */ public static void testGetKcsStakingProductsRequest() throws Exception { - String data = "{\\\"currency\\\": \\\"BTC\\\"}"; + String data = "{\"currency\": \"BTC\"}"; GetKcsStakingProductsReq obj = mapper.readValue(data, GetKcsStakingProductsReq.class); } /** getKcsStakingProducts Response Get KCS Staking Products /api/v1/earn/kcs-staking/products */ public static void testGetKcsStakingProductsResponse() throws Exception { String data = - "{\\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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -256,42 +256,42 @@ public static void testGetKcsStakingProductsResponse() throws Exception { /** getETHStakingProducts Request Get ETH Staking Products /api/v1/earn/eth-staking/products */ public static void testGetETHStakingProductsRequest() throws Exception { - String data = "{\\\"currency\\\": \\\"BTC\\\"}"; + String data = "{\"currency\": \"BTC\"}"; GetETHStakingProductsReq obj = mapper.readValue(data, GetETHStakingProductsReq.class); } /** getETHStakingProducts Response Get ETH Staking Products /api/v1/earn/eth-staking/products */ public static void testGetETHStakingProductsResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -300,43 +300,42 @@ public static void testGetETHStakingProductsResponse() throws Exception { /** getAccountHolding Request Get Account Holding /api/v1/earn/hold-assets */ public static void testGetAccountHoldingRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"KCS\\\", \\\"productId\\\": \\\"example_string_default_value\\\"," - + " \\\"productCategory\\\": \\\"DEMAND\\\", \\\"currentPage\\\": 1, \\\"pageSize\\\":" - + " 10}"; + "{\"currency\": \"KCS\", \"productId\": \"example_string_default_value\"," + + " \"productCategory\": \"DEMAND\", \"currentPage\": 1, \"pageSize\": 10}"; GetAccountHoldingReq obj = mapper.readValue(data, GetAccountHoldingReq.class); } /** getAccountHolding Response Get Account Holding /api/v1/earn/hold-assets */ public static void testGetAccountHoldingResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -377,6 +376,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -398,6 +398,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApiAutoGeneratedTest.java index d28e30c0..fd7288c4 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApiAutoGeneratedTest.java @@ -11,11 +11,13 @@ class FundingFeesApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** * getCurrentFundingRate Request Get Current Funding Rate /api/v1/funding-rate/{symbol}/current */ public static void testGetCurrentFundingRateRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\"}"; GetCurrentFundingRateReq obj = mapper.readValue(data, GetCurrentFundingRateReq.class); } @@ -24,19 +26,19 @@ public static void testGetCurrentFundingRateRequest() throws Exception { */ public static void testGetCurrentFundingRateResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"symbol\\\": \\\".XBTUSDTMFPI8H\\\",\\n" - + " \\\"granularity\\\": 28800000,\\n" - + " \\\"timePoint\\\": 1748462400000,\\n" - + " \\\"value\\\": 6.1E-5,\\n" - + " \\\"predictedValue\\\": 1.09E-4,\\n" - + " \\\"fundingRateCap\\\": 0.003,\\n" - + " \\\"fundingRateFloor\\\": -0.003,\\n" - + " \\\"period\\\": 0,\\n" - + " \\\"fundingTime\\\": 1748491200000\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbol\": \".XBTUSDTMFPI8H\",\n" + + " \"granularity\": 28800000,\n" + + " \"timePoint\": 1748462400000,\n" + + " \"value\": 6.1E-5,\n" + + " \"predictedValue\": 1.09E-4,\n" + + " \"fundingRateCap\": 0.003,\n" + + " \"fundingRateFloor\": -0.003,\n" + + " \"period\": 0,\n" + + " \"fundingTime\": 1748491200000\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -44,364 +46,362 @@ public static void testGetCurrentFundingRateResponse() throws Exception { /** getPublicFundingHistory Request Get Public Funding History /api/v1/contract/funding-rates */ public static void testGetPublicFundingHistoryRequest() throws Exception { - String data = - "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"from\\\": 1700310700000, \\\"to\\\":" - + " 1702310700000}"; + String data = "{\"symbol\": \"XBTUSDTM\", \"from\": 1700310700000, \"to\": 1702310700000}"; GetPublicFundingHistoryReq obj = mapper.readValue(data, GetPublicFundingHistoryReq.class); } /** getPublicFundingHistory Response Get Public Funding History /api/v1/contract/funding-rates */ public static void testGetPublicFundingHistoryResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 2.1E-4,\\n" - + " \\\"timepoint\\\": 1702296000000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 3.47E-4,\\n" - + " \\\"timepoint\\\": 1702267200000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 4.52E-4,\\n" - + " \\\"timepoint\\\": 1702238400000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 5.13E-4,\\n" - + " \\\"timepoint\\\": 1702209600000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 4.21E-4,\\n" - + " \\\"timepoint\\\": 1702180800000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 5.06E-4,\\n" - + " \\\"timepoint\\\": 1702152000000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 7.68E-4,\\n" - + " \\\"timepoint\\\": 1702123200000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 4.82E-4,\\n" - + " \\\"timepoint\\\": 1702094400000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 4.0E-4,\\n" - + " \\\"timepoint\\\": 1702065600000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 5.46E-4,\\n" - + " \\\"timepoint\\\": 1702036800000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 7.97E-4,\\n" - + " \\\"timepoint\\\": 1702008000000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 5.76E-4,\\n" - + " \\\"timepoint\\\": 1701979200000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 4.22E-4,\\n" - + " \\\"timepoint\\\": 1701950400000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 3.92E-4,\\n" - + " \\\"timepoint\\\": 1701921600000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 4.1E-4,\\n" - + " \\\"timepoint\\\": 1701892800000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 4.48E-4,\\n" - + " \\\"timepoint\\\": 1701864000000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 3.68E-4,\\n" - + " \\\"timepoint\\\": 1701835200000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 3.51E-4,\\n" - + " \\\"timepoint\\\": 1701806400000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.44E-4,\\n" - + " \\\"timepoint\\\": 1701777600000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 4.25E-4,\\n" - + " \\\"timepoint\\\": 1701748800000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": -8.2E-5,\\n" - + " \\\"timepoint\\\": 1701720000000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 4.64E-4,\\n" - + " \\\"timepoint\\\": 1701691200000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 4.14E-4,\\n" - + " \\\"timepoint\\\": 1701662400000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 2.44E-4,\\n" - + " \\\"timepoint\\\": 1701633600000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.99E-4,\\n" - + " \\\"timepoint\\\": 1701604800000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.79E-4,\\n" - + " \\\"timepoint\\\": 1701576000000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 8.7E-5,\\n" - + " \\\"timepoint\\\": 1701547200000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.6E-5,\\n" - + " \\\"timepoint\\\": 1701518400000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": -3.7E-5,\\n" - + " \\\"timepoint\\\": 1701489600000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.5E-5,\\n" - + " \\\"timepoint\\\": 1701460800000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 6.8E-5,\\n" - + " \\\"timepoint\\\": 1701432000000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 7.2E-5,\\n" - + " \\\"timepoint\\\": 1701403200000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.45E-4,\\n" - + " \\\"timepoint\\\": 1701374400000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.41E-4,\\n" - + " \\\"timepoint\\\": 1701345600000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 9.4E-5,\\n" - + " \\\"timepoint\\\": 1701316800000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.08E-4,\\n" - + " \\\"timepoint\\\": 1701288000000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 7.6E-5,\\n" - + " \\\"timepoint\\\": 1701259200000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.0E-5,\\n" - + " \\\"timepoint\\\": 1701230400000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.0E-5,\\n" - + " \\\"timepoint\\\": 1701201600000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.16E-4,\\n" - + " \\\"timepoint\\\": 1701172800000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 2.04E-4,\\n" - + " \\\"timepoint\\\": 1701144000000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 2.3E-4,\\n" - + " \\\"timepoint\\\": 1701115200000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 6.2E-5,\\n" - + " \\\"timepoint\\\": 1701086400000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.33E-4,\\n" - + " \\\"timepoint\\\": 1701057600000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 8.0E-5,\\n" - + " \\\"timepoint\\\": 1701028800000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.11E-4,\\n" - + " \\\"timepoint\\\": 1701000000000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 7.4E-5,\\n" - + " \\\"timepoint\\\": 1700971200000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.01E-4,\\n" - + " \\\"timepoint\\\": 1700942400000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 3.9E-5,\\n" - + " \\\"timepoint\\\": 1700913600000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.1E-5,\\n" - + " \\\"timepoint\\\": 1700884800000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 3.0E-6,\\n" - + " \\\"timepoint\\\": 1700856000000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.03E-4,\\n" - + " \\\"timepoint\\\": 1700827200000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 3.0E-6,\\n" - + " \\\"timepoint\\\": 1700798400000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 6.7E-5,\\n" - + " \\\"timepoint\\\": 1700769600000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.47E-4,\\n" - + " \\\"timepoint\\\": 1700740800000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 7.8E-5,\\n" - + " \\\"timepoint\\\": 1700712000000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.39E-4,\\n" - + " \\\"timepoint\\\": 1700683200000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 7.5E-5,\\n" - + " \\\"timepoint\\\": 1700654400000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.11E-4,\\n" - + " \\\"timepoint\\\": 1700625600000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 9.8E-5,\\n" - + " \\\"timepoint\\\": 1700596800000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.18E-4,\\n" - + " \\\"timepoint\\\": 1700568000000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.16E-4,\\n" - + " \\\"timepoint\\\": 1700539200000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.6E-4,\\n" - + " \\\"timepoint\\\": 1700510400000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.92E-4,\\n" - + " \\\"timepoint\\\": 1700481600000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.13E-4,\\n" - + " \\\"timepoint\\\": 1700452800000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 2.47E-4,\\n" - + " \\\"timepoint\\\": 1700424000000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 2.3E-4,\\n" - + " \\\"timepoint\\\": 1700395200000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 2.63E-4,\\n" - + " \\\"timepoint\\\": 1700366400000\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"fundingRate\\\": 1.32E-4,\\n" - + " \\\"timepoint\\\": 1700337600000\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 2.1E-4,\n" + + " \"timepoint\": 1702296000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 3.47E-4,\n" + + " \"timepoint\": 1702267200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.52E-4,\n" + + " \"timepoint\": 1702238400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 5.13E-4,\n" + + " \"timepoint\": 1702209600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.21E-4,\n" + + " \"timepoint\": 1702180800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 5.06E-4,\n" + + " \"timepoint\": 1702152000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 7.68E-4,\n" + + " \"timepoint\": 1702123200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.82E-4,\n" + + " \"timepoint\": 1702094400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.0E-4,\n" + + " \"timepoint\": 1702065600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 5.46E-4,\n" + + " \"timepoint\": 1702036800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 7.97E-4,\n" + + " \"timepoint\": 1702008000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 5.76E-4,\n" + + " \"timepoint\": 1701979200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.22E-4,\n" + + " \"timepoint\": 1701950400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 3.92E-4,\n" + + " \"timepoint\": 1701921600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.1E-4,\n" + + " \"timepoint\": 1701892800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.48E-4,\n" + + " \"timepoint\": 1701864000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 3.68E-4,\n" + + " \"timepoint\": 1701835200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 3.51E-4,\n" + + " \"timepoint\": 1701806400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.44E-4,\n" + + " \"timepoint\": 1701777600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.25E-4,\n" + + " \"timepoint\": 1701748800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": -8.2E-5,\n" + + " \"timepoint\": 1701720000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.64E-4,\n" + + " \"timepoint\": 1701691200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 4.14E-4,\n" + + " \"timepoint\": 1701662400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 2.44E-4,\n" + + " \"timepoint\": 1701633600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.99E-4,\n" + + " \"timepoint\": 1701604800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.79E-4,\n" + + " \"timepoint\": 1701576000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 8.7E-5,\n" + + " \"timepoint\": 1701547200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.6E-5,\n" + + " \"timepoint\": 1701518400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": -3.7E-5,\n" + + " \"timepoint\": 1701489600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.5E-5,\n" + + " \"timepoint\": 1701460800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 6.8E-5,\n" + + " \"timepoint\": 1701432000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 7.2E-5,\n" + + " \"timepoint\": 1701403200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.45E-4,\n" + + " \"timepoint\": 1701374400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.41E-4,\n" + + " \"timepoint\": 1701345600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 9.4E-5,\n" + + " \"timepoint\": 1701316800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.08E-4,\n" + + " \"timepoint\": 1701288000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 7.6E-5,\n" + + " \"timepoint\": 1701259200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.0E-5,\n" + + " \"timepoint\": 1701230400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.0E-5,\n" + + " \"timepoint\": 1701201600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.16E-4,\n" + + " \"timepoint\": 1701172800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 2.04E-4,\n" + + " \"timepoint\": 1701144000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 2.3E-4,\n" + + " \"timepoint\": 1701115200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 6.2E-5,\n" + + " \"timepoint\": 1701086400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.33E-4,\n" + + " \"timepoint\": 1701057600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 8.0E-5,\n" + + " \"timepoint\": 1701028800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.11E-4,\n" + + " \"timepoint\": 1701000000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 7.4E-5,\n" + + " \"timepoint\": 1700971200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.01E-4,\n" + + " \"timepoint\": 1700942400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 3.9E-5,\n" + + " \"timepoint\": 1700913600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.1E-5,\n" + + " \"timepoint\": 1700884800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 3.0E-6,\n" + + " \"timepoint\": 1700856000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.03E-4,\n" + + " \"timepoint\": 1700827200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 3.0E-6,\n" + + " \"timepoint\": 1700798400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 6.7E-5,\n" + + " \"timepoint\": 1700769600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.47E-4,\n" + + " \"timepoint\": 1700740800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 7.8E-5,\n" + + " \"timepoint\": 1700712000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.39E-4,\n" + + " \"timepoint\": 1700683200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 7.5E-5,\n" + + " \"timepoint\": 1700654400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.11E-4,\n" + + " \"timepoint\": 1700625600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 9.8E-5,\n" + + " \"timepoint\": 1700596800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.18E-4,\n" + + " \"timepoint\": 1700568000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.16E-4,\n" + + " \"timepoint\": 1700539200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.6E-4,\n" + + " \"timepoint\": 1700510400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.92E-4,\n" + + " \"timepoint\": 1700481600000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.13E-4,\n" + + " \"timepoint\": 1700452800000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 2.47E-4,\n" + + " \"timepoint\": 1700424000000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 2.3E-4,\n" + + " \"timepoint\": 1700395200000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 2.63E-4,\n" + + " \"timepoint\": 1700366400000\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"fundingRate\": 1.32E-4,\n" + + " \"timepoint\": 1700337600000\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -410,37 +410,35 @@ public static void testGetPublicFundingHistoryResponse() throws Exception { /** getPrivateFundingHistory Request Get Private Funding History /api/v1/funding-history */ public static void testGetPrivateFundingHistoryRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"startAt\\\": 1700310700000, \\\"endAt\\\":" - + " 1702310700000, \\\"reverse\\\": true, \\\"offset\\\": 123456, \\\"forward\\\":" - + " true, \\\"maxCount\\\": 123456}"; + "{\"symbol\": \"XBTUSDTM\", \"startAt\": 1700310700000, \"endAt\": 1702310700000," + + " \"reverse\": true, \"offset\": 123456, \"forward\": true, \"maxCount\": 123456}"; GetPrivateFundingHistoryReq obj = mapper.readValue(data, GetPrivateFundingHistoryReq.class); } /** getPrivateFundingHistory Response Get Private Funding History /api/v1/funding-history */ public static void testGetPrivateFundingHistoryResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"dataList\\\": [\\n" - + " {\\n" - + " \\\"id\\\": 1472387374042586,\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"timePoint\\\": 1731470400000,\\n" - + " \\\"fundingRate\\\": 6.41E-4,\\n" - + " \\\"markPrice\\\": 87139.92,\\n" - + " \\\"positionQty\\\": 1,\\n" - + " \\\"positionCost\\\": 87.13992,\\n" - + " \\\"funding\\\": -0.05585669,\\n" - + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"context\\\": \\\"{\\\\\\\"marginMode\\\\\\\":" - + " \\\\\\\"ISOLATED\\\\\\\", \\\\\\\"positionSide\\\\\\\":" - + " \\\\\\\"BOTH\\\\\\\"}\\\",\\n" - + " \\\"marginMode\\\": \\\"ISOLATED\\\"\\n" - + " }\\n" - + " ],\\n" - + " \\\"hasMore\\\": true\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"dataList\": [\n" + + " {\n" + + " \"id\": 1472387374042586,\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"timePoint\": 1731470400000,\n" + + " \"fundingRate\": 6.41E-4,\n" + + " \"markPrice\": 87139.92,\n" + + " \"positionQty\": 1,\n" + + " \"positionCost\": 87.13992,\n" + + " \"funding\": -0.05585669,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"context\": \"{\\\"marginMode\\\": \\\"ISOLATED\\\"," + + " \\\"positionSide\\\": \\\"BOTH\\\"}\",\n" + + " \"marginMode\": \"ISOLATED\"\n" + + " }\n" + + " ],\n" + + " \"hasMore\": true\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -469,6 +467,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -490,6 +489,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsAutoGeneratedTest.java index ec31e6a0..6141e585 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsAutoGeneratedTest.java @@ -14,7 +14,7 @@ class FuturesPrivateWsAutoGeneratedTest { /** allOrder All Order change pushes. /allOrder/contractMarket/tradeOrders */ public static void testAllOrderResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/contractMarket/tradeOrders:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"symbolOrderChange\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\",\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"side\\\":\\\"buy\\\",\\\"canceledSize\\\":\\\"0\\\",\\\"orderId\\\":\\\"247899236673269761\\\",\\\"liquidity\\\":\\\"maker\\\",\\\"marginMode\\\":\\\"ISOLATED\\\",\\\"type\\\":\\\"open\\\",\\\"orderTime\\\":1731916985768138917,\\\"size\\\":\\\"1\\\",\\\"filledSize\\\":\\\"0\\\",\\\"price\\\":\\\"91670\\\",\\\"remainSize\\\":\\\"1\\\",\\\"status\\\":\\\"open\\\",\\\"ts\\\":1731916985789000000}}"; + "{\"topic\":\"/contractMarket/tradeOrders:XBTUSDTM\",\"type\":\"message\",\"subject\":\"symbolOrderChange\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"symbol\":\"XBTUSDTM\",\"side\":\"buy\",\"canceledSize\":\"0\",\"orderId\":\"247899236673269761\",\"liquidity\":\"maker\",\"marginMode\":\"ISOLATED\",\"type\":\"open\",\"orderTime\":1731916985768138917,\"size\":\"1\",\"filledSize\":\"0\",\"price\":\"91670\",\"remainSize\":\"1\",\"status\":\"open\",\"ts\":1731916985789000000}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -22,7 +22,7 @@ public static void testAllOrderResponse() throws Exception { /** allPosition All symbol position change events push /allPosition/contract/positionAll */ public static void testAllPositionResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/contract/position:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"maintMarginReq\\\":0.005,\\\"riskLimit\\\":500000,\\\"realLeverage\\\":4.9685590767,\\\"crossMode\\\":false,\\\"delevPercentage\\\":0.10,\\\"openingTimestamp\\\":1731916913097,\\\"autoDeposit\\\":true,\\\"currentTimestamp\\\":1731924561514,\\\"currentQty\\\":1,\\\"currentCost\\\":91.5306,\\\"currentComm\\\":0.09179284,\\\"unrealisedCost\\\":91.6945,\\\"realisedCost\\\":-0.07210716,\\\"isOpen\\\":true,\\\"markPrice\\\":91839.79,\\\"markValue\\\":91.83979,\\\"posCost\\\":91.6945,\\\"posCross\\\":0,\\\"posInit\\\":18.3389,\\\"posComm\\\":0.06602004,\\\"posLoss\\\":0,\\\"posMargin\\\":18.40492004,\\\"posFunding\\\":0,\\\"posMaint\\\":0.5634627025,\\\"maintMargin\\\":18.55021004,\\\"avgEntryPrice\\\":91694.5,\\\"liquidationPrice\\\":73853.0426625,\\\"bankruptPrice\\\":73355.6,\\\"settleCurrency\\\":\\\"USDT\\\",\\\"changeReason\\\":\\\"positionChange\\\",\\\"riskLimitLevel\\\":2,\\\"realisedGrossCost\\\":-0.1639,\\\"realisedGrossPnl\\\":0.1639,\\\"realisedPnl\\\":0.07210716,\\\"unrealisedPnl\\\":0.14529,\\\"unrealisedPnlPcnt\\\":0.0016,\\\"unrealisedRoePcnt\\\":0.0079,\\\"leverage\\\":4.9685590767,\\\"marginMode\\\":\\\"ISOLATED\\\",\\\"positionSide\\\":\\\"BOTH\\\"},\\\"subject\\\":\\\"position.change\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\"}"; + "{\"topic\":\"/contract/position:XBTUSDTM\",\"type\":\"message\",\"data\":{\"symbol\":\"XBTUSDTM\",\"maintMarginReq\":0.005,\"riskLimit\":500000,\"realLeverage\":4.9685590767,\"crossMode\":false,\"delevPercentage\":0.10,\"openingTimestamp\":1731916913097,\"autoDeposit\":true,\"currentTimestamp\":1731924561514,\"currentQty\":1,\"currentCost\":91.5306,\"currentComm\":0.09179284,\"unrealisedCost\":91.6945,\"realisedCost\":-0.07210716,\"isOpen\":true,\"markPrice\":91839.79,\"markValue\":91.83979,\"posCost\":91.6945,\"posCross\":0,\"posInit\":18.3389,\"posComm\":0.06602004,\"posLoss\":0,\"posMargin\":18.40492004,\"posFunding\":0,\"posMaint\":0.5634627025,\"maintMargin\":18.55021004,\"avgEntryPrice\":91694.5,\"liquidationPrice\":73853.0426625,\"bankruptPrice\":73355.6,\"settleCurrency\":\"USDT\",\"changeReason\":\"positionChange\",\"riskLimitLevel\":2,\"realisedGrossCost\":-0.1639,\"realisedGrossPnl\":0.1639,\"realisedPnl\":0.07210716,\"unrealisedPnl\":0.14529,\"unrealisedPnlPcnt\":0.0016,\"unrealisedRoePcnt\":0.0079,\"leverage\":4.9685590767,\"marginMode\":\"ISOLATED\",\"positionSide\":\"BOTH\"},\"subject\":\"position.change\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\"}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -30,7 +30,7 @@ public static void testAllPositionResponse() throws Exception { /** balance the balance change push /balance/contractAccount/wallet */ public static void testBalanceResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/contractAccount/wallet\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"walletBalance.change\\\",\\\"id\\\":\\\"673b0bb925b4bc0001fadfef\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\",\\\"data\\\":{\\\"crossPosMargin\\\":\\\"0\\\",\\\"isolatedOrderMargin\\\":\\\"18.1188\\\",\\\"holdBalance\\\":\\\"0\\\",\\\"equity\\\":\\\"81.273621258\\\",\\\"version\\\":\\\"1337\\\",\\\"availableBalance\\\":\\\"26.144281178\\\",\\\"isolatedPosMargin\\\":\\\"36.80984008\\\",\\\"walletBalance\\\":\\\"81.072921258\\\",\\\"isolatedFundingFeeMargin\\\":\\\"0\\\",\\\"crossUnPnl\\\":\\\"0\\\",\\\"totalCrossMargin\\\":\\\"26.144281178\\\",\\\"currency\\\":\\\"USDT\\\",\\\"isolatedUnPnl\\\":\\\"0.2007\\\",\\\"crossOrderMargin\\\":\\\"0\\\",\\\"timestamp\\\":\\\"1731916996764\\\"}}"; + "{\"topic\":\"/contractAccount/wallet\",\"type\":\"message\",\"subject\":\"walletBalance.change\",\"id\":\"673b0bb925b4bc0001fadfef\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"crossPosMargin\":\"0\",\"isolatedOrderMargin\":\"18.1188\",\"holdBalance\":\"0\",\"equity\":\"81.273621258\",\"version\":\"1337\",\"availableBalance\":\"26.144281178\",\"isolatedPosMargin\":\"36.80984008\",\"walletBalance\":\"81.072921258\",\"isolatedFundingFeeMargin\":\"0\",\"crossUnPnl\":\"0\",\"totalCrossMargin\":\"26.144281178\",\"currency\":\"USDT\",\"isolatedUnPnl\":\"0.2007\",\"crossOrderMargin\":\"0\",\"timestamp\":\"1731916996764\"}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -38,7 +38,7 @@ public static void testBalanceResponse() throws Exception { /** crossLeverage the leverage change push /crossLeverage/contract/crossLeverage */ public static void testCrossLeverageResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/contract/crossLeverage\\\",\\\"type\\\":\\\"message\\\",\\\"data\\\":{\\\"ETHUSDTM\\\":{\\\"leverage\\\":\\\"8\\\"}},\\\"subject\\\":\\\"user.config\\\",\\\"userId\\\":\\\"66f12e8befb04d0001882b49\\\",\\\"channelType\\\":\\\"private\\\"}"; + "{\"topic\":\"/contract/crossLeverage\",\"type\":\"message\",\"data\":{\"ETHUSDTM\":{\"leverage\":\"8\"}},\"subject\":\"user.config\",\"userId\":\"66f12e8befb04d0001882b49\",\"channelType\":\"private\"}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -46,7 +46,7 @@ public static void testCrossLeverageResponse() throws Exception { /** marginMode the margin mode change /marginMode/contract/marginMode */ public static void testMarginModeResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/contract/marginMode\\\",\\\"type\\\":\\\"message\\\",\\\"data\\\":{\\\"ETHUSDTM\\\":\\\"ISOLATED\\\"},\\\"subject\\\":\\\"user.config\\\",\\\"userId\\\":\\\"66f12e8befb04d0001882b49\\\",\\\"channelType\\\":\\\"private\\\"}"; + "{\"topic\":\"/contract/marginMode\",\"type\":\"message\",\"data\":{\"ETHUSDTM\":\"ISOLATED\"},\"subject\":\"user.config\",\"userId\":\"66f12e8befb04d0001882b49\",\"channelType\":\"private\"}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -54,7 +54,7 @@ public static void testMarginModeResponse() throws Exception { /** order Order change pushes. /order/contractMarket/tradeOrders:_symbol_ */ public static void testOrderResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/contractMarket/tradeOrders:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"symbolOrderChange\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\",\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"side\\\":\\\"buy\\\",\\\"canceledSize\\\":\\\"0\\\",\\\"orderId\\\":\\\"247899236673269761\\\",\\\"liquidity\\\":\\\"maker\\\",\\\"marginMode\\\":\\\"ISOLATED\\\",\\\"type\\\":\\\"open\\\",\\\"orderTime\\\":1731916985768138917,\\\"size\\\":\\\"1\\\",\\\"filledSize\\\":\\\"0\\\",\\\"price\\\":\\\"91670\\\",\\\"remainSize\\\":\\\"1\\\",\\\"status\\\":\\\"open\\\",\\\"ts\\\":1731916985789000000}}"; + "{\"topic\":\"/contractMarket/tradeOrders:XBTUSDTM\",\"type\":\"message\",\"subject\":\"symbolOrderChange\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"symbol\":\"XBTUSDTM\",\"side\":\"buy\",\"canceledSize\":\"0\",\"orderId\":\"247899236673269761\",\"liquidity\":\"maker\",\"marginMode\":\"ISOLATED\",\"type\":\"open\",\"orderTime\":1731916985768138917,\"size\":\"1\",\"filledSize\":\"0\",\"price\":\"91670\",\"remainSize\":\"1\",\"status\":\"open\",\"ts\":1731916985789000000}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -62,7 +62,7 @@ public static void testOrderResponse() throws Exception { /** position the position change events push /position/contract/position:_symbol_ */ public static void testPositionResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/contract/position:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"maintMarginReq\\\":0.005,\\\"riskLimit\\\":500000,\\\"realLeverage\\\":4.9685590767,\\\"crossMode\\\":false,\\\"delevPercentage\\\":0.10,\\\"openingTimestamp\\\":1731916913097,\\\"autoDeposit\\\":true,\\\"currentTimestamp\\\":1731924561514,\\\"currentQty\\\":1,\\\"currentCost\\\":91.5306,\\\"currentComm\\\":0.09179284,\\\"unrealisedCost\\\":91.6945,\\\"realisedCost\\\":-0.07210716,\\\"isOpen\\\":true,\\\"markPrice\\\":91839.79,\\\"markValue\\\":91.83979,\\\"posCost\\\":91.6945,\\\"posCross\\\":0,\\\"posInit\\\":18.3389,\\\"posComm\\\":0.06602004,\\\"posLoss\\\":0,\\\"posMargin\\\":18.40492004,\\\"posFunding\\\":0,\\\"posMaint\\\":0.5634627025,\\\"maintMargin\\\":18.55021004,\\\"avgEntryPrice\\\":91694.5,\\\"liquidationPrice\\\":73853.0426625,\\\"bankruptPrice\\\":73355.6,\\\"settleCurrency\\\":\\\"USDT\\\",\\\"changeReason\\\":\\\"positionChange\\\",\\\"riskLimitLevel\\\":2,\\\"realisedGrossCost\\\":-0.1639,\\\"realisedGrossPnl\\\":0.1639,\\\"realisedPnl\\\":0.07210716,\\\"unrealisedPnl\\\":0.14529,\\\"unrealisedPnlPcnt\\\":0.0016,\\\"unrealisedRoePcnt\\\":0.0079,\\\"leverage\\\":4.9685590767,\\\"marginMode\\\":\\\"ISOLATED\\\",\\\"positionSide\\\":\\\"BOTH\\\"},\\\"subject\\\":\\\"position.change\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\"}"; + "{\"topic\":\"/contract/position:XBTUSDTM\",\"type\":\"message\",\"data\":{\"symbol\":\"XBTUSDTM\",\"maintMarginReq\":0.005,\"riskLimit\":500000,\"realLeverage\":4.9685590767,\"crossMode\":false,\"delevPercentage\":0.10,\"openingTimestamp\":1731916913097,\"autoDeposit\":true,\"currentTimestamp\":1731924561514,\"currentQty\":1,\"currentCost\":91.5306,\"currentComm\":0.09179284,\"unrealisedCost\":91.6945,\"realisedCost\":-0.07210716,\"isOpen\":true,\"markPrice\":91839.79,\"markValue\":91.83979,\"posCost\":91.6945,\"posCross\":0,\"posInit\":18.3389,\"posComm\":0.06602004,\"posLoss\":0,\"posMargin\":18.40492004,\"posFunding\":0,\"posMaint\":0.5634627025,\"maintMargin\":18.55021004,\"avgEntryPrice\":91694.5,\"liquidationPrice\":73853.0426625,\"bankruptPrice\":73355.6,\"settleCurrency\":\"USDT\",\"changeReason\":\"positionChange\",\"riskLimitLevel\":2,\"realisedGrossCost\":-0.1639,\"realisedGrossPnl\":0.1639,\"realisedPnl\":0.07210716,\"unrealisedPnl\":0.14529,\"unrealisedPnlPcnt\":0.0016,\"unrealisedRoePcnt\":0.0079,\"leverage\":4.9685590767,\"marginMode\":\"ISOLATED\",\"positionSide\":\"BOTH\"},\"subject\":\"position.change\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\"}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -70,7 +70,7 @@ public static void testPositionResponse() throws Exception { /** stopOrders stop order change pushes. /stopOrders/contractMarket/advancedOrders */ public static void testStopOrdersResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/contractMarket/advancedOrders\\\",\\\"type\\\":\\\"message\\\",\\\"data\\\":{\\\"createdAt\\\":1730194206837,\\\"marginMode\\\":\\\"ISOLATED\\\",\\\"orderId\\\":\\\"240673378116083712\\\",\\\"orderPrice\\\":\\\"0.1\\\",\\\"orderType\\\":\\\"stop\\\",\\\"side\\\":\\\"buy\\\",\\\"size\\\":1,\\\"stop\\\":\\\"down\\\",\\\"stopPrice\\\":\\\"1000\\\",\\\"stopPriceType\\\":\\\"TP\\\",\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"ts\\\":1730194206843133000,\\\"type\\\":\\\"open\\\"},\\\"subject\\\":\\\"stopOrder\\\",\\\"id\\\":\\\"6720ab1ea52a9b0001734392\\\",\\\"userId\\\":\\\"66f12e8befb04d0001882b49\\\",\\\"channelType\\\":\\\"private\\\"}"; + "{\"topic\":\"/contractMarket/advancedOrders\",\"type\":\"message\",\"data\":{\"createdAt\":1730194206837,\"marginMode\":\"ISOLATED\",\"orderId\":\"240673378116083712\",\"orderPrice\":\"0.1\",\"orderType\":\"stop\",\"side\":\"buy\",\"size\":1,\"stop\":\"down\",\"stopPrice\":\"1000\",\"stopPriceType\":\"TP\",\"symbol\":\"XBTUSDTM\",\"ts\":1730194206843133000,\"type\":\"open\"},\"subject\":\"stopOrder\",\"id\":\"6720ab1ea52a9b0001734392\",\"userId\":\"66f12e8befb04d0001882b49\",\"channelType\":\"private\"}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsAutoGeneratedTest.java index 169c66e2..09ba5af8 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsAutoGeneratedTest.java @@ -14,7 +14,7 @@ class FuturesPublicWsAutoGeneratedTest { /** announcement announcement /announcement/contract/announcement:_symbol_ */ public static void testAnnouncementResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/contract/announcement\\\",\\\"subject\\\":\\\"funding.begin\\\",\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"fundingTime\\\":1551770400000,\\\"fundingRate\\\":-0.002966,\\\"timestamp\\\":1551770400000}}"; + "{\"topic\":\"/contract/announcement\",\"subject\":\"funding.begin\",\"data\":{\"symbol\":\"XBTUSDTM\",\"fundingTime\":1551770400000,\"fundingRate\":-0.002966,\"timestamp\":1551770400000}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -22,7 +22,7 @@ public static void testAnnouncementResponse() throws Exception { /** execution Match execution data. /execution/contractMarket/execution:_symbol_ */ public static void testExecutionResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/contractMarket/execution:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"match\\\",\\\"sn\\\":1794100537695,\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"sequence\\\":1794100537695,\\\"side\\\":\\\"buy\\\",\\\"size\\\":2,\\\"price\\\":\\\"90503.9\\\",\\\"takerOrderId\\\":\\\"247822202957807616\\\",\\\"makerOrderId\\\":\\\"247822167163555840\\\",\\\"tradeId\\\":\\\"1794100537695\\\",\\\"ts\\\":1731898619520000000}}"; + "{\"topic\":\"/contractMarket/execution:XBTUSDTM\",\"type\":\"message\",\"subject\":\"match\",\"sn\":1794100537695,\"data\":{\"symbol\":\"XBTUSDTM\",\"sequence\":1794100537695,\"side\":\"buy\",\"size\":2,\"price\":\"90503.9\",\"takerOrderId\":\"247822202957807616\",\"makerOrderId\":\"247822167163555840\",\"tradeId\":\"1794100537695\",\"ts\":1731898619520000000}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -30,7 +30,7 @@ public static void testExecutionResponse() throws Exception { /** instrument instrument /instrument/contract/instrument:_symbol_ */ public static void testInstrumentResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/contract/instrument:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"mark.index.price\\\",\\\"data\\\":{\\\"markPrice\\\":90445.02,\\\"indexPrice\\\":90445.02,\\\"granularity\\\":1000,\\\"timestamp\\\":1731899129000}}"; + "{\"topic\":\"/contract/instrument:XBTUSDTM\",\"type\":\"message\",\"subject\":\"mark.index.price\",\"data\":{\"markPrice\":90445.02,\"indexPrice\":90445.02,\"granularity\":1000,\"timestamp\":1731899129000}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -38,7 +38,7 @@ public static void testInstrumentResponse() throws Exception { /** klines Klines /klines/contractMarket/limitCandle:_symbol___type_ */ public static void testKlinesResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/contractMarket/limitCandle:XBTUSDTM_1min\\\",\\\"type\\\":\\\"message\\\",\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"candles\\\":[\\\"1731898200\\\",\\\"90638.6\\\",\\\"90638.6\\\",\\\"90638.6\\\",\\\"90638.6\\\",\\\"21.0\\\",\\\"21\\\"],\\\"time\\\":1731898208357},\\\"subject\\\":\\\"candle.stick\\\"}"; + "{\"topic\":\"/contractMarket/limitCandle:XBTUSDTM_1min\",\"type\":\"message\",\"data\":{\"symbol\":\"XBTUSDTM\",\"candles\":[\"1731898200\",\"90638.6\",\"90638.6\",\"90638.6\",\"90638.6\",\"21.0\",\"21\"],\"time\":1731898208357},\"subject\":\"candle.stick\"}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -46,7 +46,7 @@ public static void testKlinesResponse() throws Exception { /** orderbookIncrement Orderbook - Increment /orderbookIncrement/contractMarket/level2:_symbol_ */ public static void testOrderbookIncrementResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/contractMarket/level2:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"level2\\\",\\\"sn\\\":1709400450243,\\\"data\\\":{\\\"sequence\\\":1709400450243,\\\"change\\\":\\\"90631.2,sell,2\\\",\\\"timestamp\\\":1731897467182}}"; + "{\"topic\":\"/contractMarket/level2:XBTUSDTM\",\"type\":\"message\",\"subject\":\"level2\",\"sn\":1709400450243,\"data\":{\"sequence\":1709400450243,\"change\":\"90631.2,sell,2\",\"timestamp\":1731897467182}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -56,7 +56,7 @@ public static void testOrderbookIncrementResponse() throws Exception { */ public static void testOrderbookLevel50Response() throws Exception { String data = - "{\\\"topic\\\":\\\"/contractMarket/level2Depth50:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"level2\\\",\\\"sn\\\":1731680249700,\\\"data\\\":{\\\"bids\\\":[[\\\"89778.6\\\",1534],[\\\"89778.2\\\",54]],\\\"sequence\\\":1709294490099,\\\"timestamp\\\":1731680249700,\\\"ts\\\":1731680249700,\\\"asks\\\":[[\\\"89778.7\\\",854],[\\\"89779.2\\\",4]]}}"; + "{\"topic\":\"/contractMarket/level2Depth50:XBTUSDTM\",\"type\":\"message\",\"subject\":\"level2\",\"sn\":1731680249700,\"data\":{\"bids\":[[\"89778.6\",1534],[\"89778.2\",54]],\"sequence\":1709294490099,\"timestamp\":1731680249700,\"ts\":1731680249700,\"asks\":[[\"89778.7\",854],[\"89779.2\",4]]}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -64,7 +64,7 @@ public static void testOrderbookLevel50Response() throws Exception { /** orderbookLevel5 Orderbook - Level5 /orderbookLevel5/contractMarket/level2Depth5:_symbol_ */ public static void testOrderbookLevel5Response() throws Exception { String data = - "{\\\"topic\\\":\\\"/contractMarket/level2Depth5:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"level2\\\",\\\"sn\\\":1731680019100,\\\"data\\\":{\\\"bids\\\":[[\\\"89720.9\\\",513],[\\\"89720.8\\\",12],[\\\"89718.6\\\",113],[\\\"89718.4\\\",19],[\\\"89718.3\\\",7]],\\\"sequence\\\":1709294294670,\\\"timestamp\\\":1731680019100,\\\"ts\\\":1731680019100,\\\"asks\\\":[[\\\"89721\\\",906],[\\\"89721.1\\\",203],[\\\"89721.4\\\",113],[\\\"89723.2\\\",113],[\\\"89725.4\\\",113]]}}"; + "{\"topic\":\"/contractMarket/level2Depth5:XBTUSDTM\",\"type\":\"message\",\"subject\":\"level2\",\"sn\":1731680019100,\"data\":{\"bids\":[[\"89720.9\",513],[\"89720.8\",12],[\"89718.6\",113],[\"89718.4\",19],[\"89718.3\",7]],\"sequence\":1709294294670,\"timestamp\":1731680019100,\"ts\":1731680019100,\"asks\":[[\"89721\",906],[\"89721.1\",203],[\"89721.4\",113],[\"89723.2\",113],[\"89725.4\",113]]}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -72,7 +72,7 @@ public static void testOrderbookLevel5Response() throws Exception { /** symbolSnapshot Symbol Snapshot /symbolSnapshot/contractMarket/snapshot:_symbol_ */ public static void testSymbolSnapshotResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/contractMarket/snapshot:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"snapshot.24h\\\",\\\"id\\\":\\\"673ab3fff4088b0001664f41\\\",\\\"data\\\":{\\\"highPrice\\\":91512.8,\\\"lastPrice\\\":90326.7,\\\"lowPrice\\\":88747.8,\\\"price24HoursBefore\\\":89880.4,\\\"priceChg\\\":446.3,\\\"priceChgPct\\\":0.0049,\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"ts\\\":1731900415023929239,\\\"turnover\\\":526928331.0482177734,\\\"volume\\\":5834.46}}"; + "{\"topic\":\"/contractMarket/snapshot:XBTUSDTM\",\"type\":\"message\",\"subject\":\"snapshot.24h\",\"id\":\"673ab3fff4088b0001664f41\",\"data\":{\"highPrice\":91512.8,\"lastPrice\":90326.7,\"lowPrice\":88747.8,\"price24HoursBefore\":89880.4,\"priceChg\":446.3,\"priceChgPct\":0.0049,\"symbol\":\"XBTUSDTM\",\"ts\":1731900415023929239,\"turnover\":526928331.0482177734,\"volume\":5834.46}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -80,7 +80,7 @@ public static void testSymbolSnapshotResponse() throws Exception { /** tickerV1 Get Ticker(not recommended) /tickerV1/contractMarket/ticker:_symbol_ */ public static void testTickerV1Response() throws Exception { String data = - "{\\\"topic\\\":\\\"/contractMarket/ticker:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"ticker\\\",\\\"sn\\\":1793133570931,\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"sequence\\\":1793133570931,\\\"side\\\":\\\"sell\\\",\\\"size\\\":1,\\\"price\\\":\\\"90147.7\\\",\\\"bestBidSize\\\":2186,\\\"bestBidPrice\\\":\\\"90147.7\\\",\\\"bestAskPrice\\\":\\\"90147.8\\\",\\\"tradeId\\\":\\\"1793133570931\\\",\\\"bestAskSize\\\":275,\\\"ts\\\":1731679215637000000}}"; + "{\"topic\":\"/contractMarket/ticker:XBTUSDTM\",\"type\":\"message\",\"subject\":\"ticker\",\"sn\":1793133570931,\"data\":{\"symbol\":\"XBTUSDTM\",\"sequence\":1793133570931,\"side\":\"sell\",\"size\":1,\"price\":\"90147.7\",\"bestBidSize\":2186,\"bestBidPrice\":\"90147.7\",\"bestAskPrice\":\"90147.8\",\"tradeId\":\"1793133570931\",\"bestAskSize\":275,\"ts\":1731679215637000000}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -88,7 +88,7 @@ public static void testTickerV1Response() throws Exception { /** tickerV2 Get Ticker V2 /tickerV2/contractMarket/tickerV2:_symbol_ */ public static void testTickerV2Response() throws Exception { String data = - "{\\\"topic\\\":\\\"/contractMarket/tickerV2:XBTUSDTM\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"tickerV2\\\",\\\"sn\\\":1709284589209,\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"sequence\\\":1709284589209,\\\"bestBidSize\\\":713,\\\"bestBidPrice\\\":\\\"88987.4\\\",\\\"bestAskPrice\\\":\\\"88987.5\\\",\\\"bestAskSize\\\":1037,\\\"ts\\\":1731665526461000000}}"; + "{\"topic\":\"/contractMarket/tickerV2:XBTUSDTM\",\"type\":\"message\",\"subject\":\"tickerV2\",\"sn\":1709284589209,\"data\":{\"symbol\":\"XBTUSDTM\",\"sequence\":1709284589209,\"bestBidSize\":713,\"bestBidPrice\":\"88987.4\",\"bestAskPrice\":\"88987.5\",\"bestAskSize\":1037,\"ts\":1731665526461000000}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiAutoGeneratedTest.java index 297edd1e..170ec166 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiAutoGeneratedTest.java @@ -11,90 +11,92 @@ class MarketApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** getSymbol Request Get Symbol /api/v1/contracts/{symbol} */ public static void testGetSymbolRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\"}"; GetSymbolReq obj = mapper.readValue(data, GetSymbolReq.class); } /** getSymbol Response Get Symbol /api/v1/contracts/{symbol} */ public static void testGetSymbolResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -108,83 +110,83 @@ public static void testGetAllSymbolsRequest() throws Exception { /** getAllSymbols Response Get All Symbols /api/v1/contracts/active */ public static void testGetAllSymbolsResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -192,14 +194,14 @@ public static void testGetAllSymbolsResponse() throws Exception { /** getTicker Request Get Ticker /api/v1/ticker */ public static void testGetTickerRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\"}"; GetTickerReq obj = mapper.readValue(data, GetTickerReq.class); } /** getTicker Response Get Ticker /api/v1/ticker */ public static void testGetTickerResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"sequence\\\":1697895100310,\\\"symbol\\\":\\\"XBTUSDM\\\",\\\"side\\\":\\\"sell\\\",\\\"size\\\":2936,\\\"tradeId\\\":\\\"1697901180000\\\",\\\"price\\\":\\\"67158.4\\\",\\\"bestBidPrice\\\":\\\"67169.6\\\",\\\"bestBidSize\\\":32345,\\\"bestAskPrice\\\":\\\"67169.7\\\",\\\"bestAskSize\\\":7251,\\\"ts\\\":1729163001780000000}}"; + "{\"code\":\"200000\",\"data\":{\"sequence\":1697895100310,\"symbol\":\"XBTUSDM\",\"side\":\"sell\",\"size\":2936,\"tradeId\":\"1697901180000\",\"price\":\"67158.4\",\"bestBidPrice\":\"67169.6\",\"bestBidSize\":32345,\"bestAskPrice\":\"67169.7\",\"bestAskSize\":7251,\"ts\":1729163001780000000}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -212,36 +214,36 @@ public static void testGetAllTickersRequest() throws Exception { /** getAllTickers Response Get All Tickers /api/v1/allTickers */ public static void testGetAllTickersResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"sequence\\\": 1707992727046,\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"side\\\": \\\"sell\\\",\\n" - + " \\\"size\\\": 21,\\n" - + " \\\"tradeId\\\": \\\"1784299761369\\\",\\n" - + " \\\"price\\\": \\\"67153\\\",\\n" - + " \\\"bestBidPrice\\\": \\\"67153\\\",\\n" - + " \\\"bestBidSize\\\": 2767,\\n" - + " \\\"bestAskPrice\\\": \\\"67153.1\\\",\\n" - + " \\\"bestAskSize\\\": 5368,\\n" - + " \\\"ts\\\": 1729163466659000000\\n" - + " },\\n" - + " {\\n" - + " \\\"sequence\\\": 1697895166299,\\n" - + " \\\"symbol\\\": \\\"XBTUSDM\\\",\\n" - + " \\\"side\\\": \\\"sell\\\",\\n" - + " \\\"size\\\": 1956,\\n" - + " \\\"tradeId\\\": \\\"1697901245065\\\",\\n" - + " \\\"price\\\": \\\"67145.2\\\",\\n" - + " \\\"bestBidPrice\\\": \\\"67135.3\\\",\\n" - + " \\\"bestBidSize\\\": 1,\\n" - + " \\\"bestAskPrice\\\": \\\"67135.8\\\",\\n" - + " \\\"bestAskSize\\\": 3,\\n" - + " \\\"ts\\\": 1729163445340000000\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"sequence\": 1707992727046,\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"side\": \"sell\",\n" + + " \"size\": 21,\n" + + " \"tradeId\": \"1784299761369\",\n" + + " \"price\": \"67153\",\n" + + " \"bestBidPrice\": \"67153\",\n" + + " \"bestBidSize\": 2767,\n" + + " \"bestAskPrice\": \"67153.1\",\n" + + " \"bestAskSize\": 5368,\n" + + " \"ts\": 1729163466659000000\n" + + " },\n" + + " {\n" + + " \"sequence\": 1697895166299,\n" + + " \"symbol\": \"XBTUSDM\",\n" + + " \"side\": \"sell\",\n" + + " \"size\": 1956,\n" + + " \"tradeId\": \"1697901245065\",\n" + + " \"price\": \"67145.2\",\n" + + " \"bestBidPrice\": \"67135.3\",\n" + + " \"bestBidSize\": 1,\n" + + " \"bestAskPrice\": \"67135.8\",\n" + + " \"bestAskSize\": 3,\n" + + " \"ts\": 1729163445340000000\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -249,40 +251,40 @@ public static void testGetAllTickersResponse() throws Exception { /** getFullOrderBook Request Get Full OrderBook /api/v1/level2/snapshot */ public static void testGetFullOrderBookRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDM\\\"}"; + String data = "{\"symbol\": \"XBTUSDM\"}"; GetFullOrderBookReq obj = mapper.readValue(data, GetFullOrderBookReq.class); } /** getFullOrderBook Response Get Full OrderBook /api/v1/level2/snapshot */ public static void testGetFullOrderBookResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"sequence\\\": 1697895963339,\\n" - + " \\\"symbol\\\": \\\"XBTUSDM\\\",\\n" - + " \\\"bids\\\": [\\n" - + " [\\n" - + " 66968,\\n" - + " 2\\n" - + " ],\\n" - + " [\\n" - + " 66964.8,\\n" - + " 25596\\n" - + " ]\\n" - + " ],\\n" - + " \\\"asks\\\": [\\n" - + " [\\n" - + " 66968.1,\\n" - + " 13501\\n" - + " ],\\n" - + " [\\n" - + " 66968.7,\\n" - + " 2032\\n" - + " ]\\n" - + " ],\\n" - + " \\\"ts\\\": 1729168101216000000\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"sequence\": 1697895963339,\n" + + " \"symbol\": \"XBTUSDM\",\n" + + " \"bids\": [\n" + + " [\n" + + " 66968,\n" + + " 2\n" + + " ],\n" + + " [\n" + + " 66964.8,\n" + + " 25596\n" + + " ]\n" + + " ],\n" + + " \"asks\": [\n" + + " [\n" + + " 66968.1,\n" + + " 13501\n" + + " ],\n" + + " [\n" + + " 66968.7,\n" + + " 2032\n" + + " ]\n" + + " ],\n" + + " \"ts\": 1729168101216000000\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -290,40 +292,40 @@ public static void testGetFullOrderBookResponse() throws Exception { /** getPartOrderBook Request Get Part OrderBook /api/v1/level2/depth{size} */ public static void testGetPartOrderBookRequest() throws Exception { - String data = "{\\\"size\\\": \\\"20\\\", \\\"symbol\\\": \\\"XBTUSDM\\\"}"; + String data = "{\"size\": \"20\", \"symbol\": \"XBTUSDM\"}"; GetPartOrderBookReq obj = mapper.readValue(data, GetPartOrderBookReq.class); } /** getPartOrderBook Response Get Part OrderBook /api/v1/level2/depth{size} */ public static void testGetPartOrderBookResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"sequence\\\": 1697895963339,\\n" - + " \\\"symbol\\\": \\\"XBTUSDM\\\",\\n" - + " \\\"bids\\\": [\\n" - + " [\\n" - + " 66968,\\n" - + " 2\\n" - + " ],\\n" - + " [\\n" - + " 66964.8,\\n" - + " 25596\\n" - + " ]\\n" - + " ],\\n" - + " \\\"asks\\\": [\\n" - + " [\\n" - + " 66968.1,\\n" - + " 13501\\n" - + " ],\\n" - + " [\\n" - + " 66968.7,\\n" - + " 2032\\n" - + " ]\\n" - + " ],\\n" - + " \\\"ts\\\": 1729168101216000000\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"sequence\": 1697895963339,\n" + + " \"symbol\": \"XBTUSDM\",\n" + + " \"bids\": [\n" + + " [\n" + + " 66968,\n" + + " 2\n" + + " ],\n" + + " [\n" + + " 66964.8,\n" + + " 25596\n" + + " ]\n" + + " ],\n" + + " \"asks\": [\n" + + " [\n" + + " 66968.1,\n" + + " 13501\n" + + " ],\n" + + " [\n" + + " 66968.7,\n" + + " 2032\n" + + " ]\n" + + " ],\n" + + " \"ts\": 1729168101216000000\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -331,50 +333,50 @@ public static void testGetPartOrderBookResponse() throws Exception { /** getTradeHistory Request Get Trade History /api/v1/trade/history */ public static void testGetTradeHistoryRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDM\\\"}"; + String data = "{\"symbol\": \"XBTUSDM\"}"; GetTradeHistoryReq obj = mapper.readValue(data, GetTradeHistoryReq.class); } /** getTradeHistory Response Get Trade History /api/v1/trade/history */ public static void testGetTradeHistoryResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"sequence\\\": 1697915257909,\\n" - + " \\\"contractId\\\": 1,\\n" - + " \\\"tradeId\\\": \\\"1697915257909\\\",\\n" - + " \\\"makerOrderId\\\": \\\"236679665752801280\\\",\\n" - + " \\\"takerOrderId\\\": \\\"236679667975745536\\\",\\n" - + " \\\"ts\\\": 1729242032152000000,\\n" - + " \\\"size\\\": 1,\\n" - + " \\\"price\\\": \\\"67878\\\",\\n" - + " \\\"side\\\": \\\"sell\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"sequence\\\": 1697915257749,\\n" - + " \\\"contractId\\\": 1,\\n" - + " \\\"tradeId\\\": \\\"1697915257749\\\",\\n" - + " \\\"makerOrderId\\\": \\\"236679660971245570\\\",\\n" - + " \\\"takerOrderId\\\": \\\"236679665400492032\\\",\\n" - + " \\\"ts\\\": 1729242031535000000,\\n" - + " \\\"size\\\": 1,\\n" - + " \\\"price\\\": \\\"67867.8\\\",\\n" - + " \\\"side\\\": \\\"sell\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"sequence\\\": 1697915257701,\\n" - + " \\\"contractId\\\": 1,\\n" - + " \\\"tradeId\\\": \\\"1697915257701\\\",\\n" - + " \\\"makerOrderId\\\": \\\"236679660971245570\\\",\\n" - + " \\\"takerOrderId\\\": \\\"236679661919211521\\\",\\n" - + " \\\"ts\\\": 1729242030932000000,\\n" - + " \\\"size\\\": 1,\\n" - + " \\\"price\\\": \\\"67867.8\\\",\\n" - + " \\\"side\\\": \\\"sell\\\"\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"sequence\": 1697915257909,\n" + + " \"contractId\": 1,\n" + + " \"tradeId\": \"1697915257909\",\n" + + " \"makerOrderId\": \"236679665752801280\",\n" + + " \"takerOrderId\": \"236679667975745536\",\n" + + " \"ts\": 1729242032152000000,\n" + + " \"size\": 1,\n" + + " \"price\": \"67878\",\n" + + " \"side\": \"sell\"\n" + + " },\n" + + " {\n" + + " \"sequence\": 1697915257749,\n" + + " \"contractId\": 1,\n" + + " \"tradeId\": \"1697915257749\",\n" + + " \"makerOrderId\": \"236679660971245570\",\n" + + " \"takerOrderId\": \"236679665400492032\",\n" + + " \"ts\": 1729242031535000000,\n" + + " \"size\": 1,\n" + + " \"price\": \"67867.8\",\n" + + " \"side\": \"sell\"\n" + + " },\n" + + " {\n" + + " \"sequence\": 1697915257701,\n" + + " \"contractId\": 1,\n" + + " \"tradeId\": \"1697915257701\",\n" + + " \"makerOrderId\": \"236679660971245570\",\n" + + " \"takerOrderId\": \"236679661919211521\",\n" + + " \"ts\": 1729242030932000000,\n" + + " \"size\": 1,\n" + + " \"price\": \"67867.8\",\n" + + " \"side\": \"sell\"\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -383,42 +385,42 @@ public static void testGetTradeHistoryResponse() throws Exception { /** getKlines Request Get Klines /api/v1/kline/query */ public static void testGetKlinesRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"granularity\\\": 1, \\\"from\\\": 1728552342000," - + " \\\"to\\\": 1729243542000}"; + "{\"symbol\": \"XBTUSDTM\", \"granularity\": 1, \"from\": 1728552342000, \"to\":" + + " 1729243542000}"; GetKlinesReq obj = mapper.readValue(data, GetKlinesReq.class); } /** getKlines Response Get Klines /api/v1/kline/query */ public static void testGetKlinesResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " [\\n" - + " 1728576000000,\\n" - + " 60791.1,\\n" - + " 61035,\\n" - + " 58940,\\n" - + " 60300,\\n" - + " 5501167\\n" - + " ],\\n" - + " [\\n" - + " 1728604800000,\\n" - + " 60299.9,\\n" - + " 60924.1,\\n" - + " 60077.4,\\n" - + " 60666.1,\\n" - + " 1220980\\n" - + " ],\\n" - + " [\\n" - + " 1728633600000,\\n" - + " 60665.7,\\n" - + " 62436.8,\\n" - + " 60650.1,\\n" - + " 62255.1,\\n" - + " 3386359\\n" - + " ]\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " [\n" + + " 1728576000000,\n" + + " 60791.1,\n" + + " 61035,\n" + + " 58940,\n" + + " 60300,\n" + + " 5501167\n" + + " ],\n" + + " [\n" + + " 1728604800000,\n" + + " 60299.9,\n" + + " 60924.1,\n" + + " 60077.4,\n" + + " 60666.1,\n" + + " 1220980\n" + + " ],\n" + + " [\n" + + " 1728633600000,\n" + + " 60665.7,\n" + + " 62436.8,\n" + + " 60650.1,\n" + + " 62255.1,\n" + + " 3386359\n" + + " ]\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -426,14 +428,14 @@ public static void testGetKlinesResponse() throws Exception { /** getMarkPrice Request Get Mark Price /api/v1/mark-price/{symbol}/current */ public static void testGetMarkPriceRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\"}"; GetMarkPriceReq obj = mapper.readValue(data, GetMarkPriceReq.class); } /** getMarkPrice Response Get Mark Price /api/v1/mark-price/{symbol}/current */ public static void testGetMarkPriceResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"granularity\\\":1000,\\\"timePoint\\\":1729254307000,\\\"value\\\":67687.08,\\\"indexPrice\\\":67683.58}}"; + "{\"code\":\"200000\",\"data\":{\"symbol\":\"XBTUSDTM\",\"granularity\":1000,\"timePoint\":1729254307000,\"value\":67687.08,\"indexPrice\":67683.58}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -441,98 +443,97 @@ public static void testGetMarkPriceResponse() throws Exception { /** getSpotIndexPrice Request Get Spot Index Price /api/v1/index/query */ public static void testGetSpotIndexPriceRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\".KXBTUSDT\\\", \\\"startAt\\\": 123456, \\\"endAt\\\": 123456," - + " \\\"reverse\\\": true, \\\"offset\\\": 123456, \\\"forward\\\": true," - + " \\\"maxCount\\\": 10}"; + "{\"symbol\": \".KXBTUSDT\", \"startAt\": 123456, \"endAt\": 123456, \"reverse\": true," + + " \"offset\": 123456, \"forward\": true, \"maxCount\": 10}"; GetSpotIndexPriceReq obj = mapper.readValue(data, GetSpotIndexPriceReq.class); } /** getSpotIndexPrice Response Get Spot Index Price /api/v1/index/query */ public static void testGetSpotIndexPriceResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"hasMore\\\": true,\\n" - + " \\\"dataList\\\": [\\n" - + " {\\n" - + " \\\"symbol\\\": \\\".KXBTUSDT\\\",\\n" - + " \\\"granularity\\\": 1000,\\n" - + " \\\"timePoint\\\": 1730557515000,\\n" - + " \\\"value\\\": 69202.94,\\n" - + " \\\"decomposionList\\\": [\\n" - + " {\\n" - + " \\\"exchange\\\": \\\"gateio\\\",\\n" - + " \\\"price\\\": 69209.27,\\n" - + " \\\"weight\\\": 0.0533\\n" - + " },\\n" - + " {\\n" - + " \\\"exchange\\\": \\\"bitmart\\\",\\n" - + " \\\"price\\\": 69230.77,\\n" - + " \\\"weight\\\": 0.0128\\n" - + " },\\n" - + " {\\n" - + " \\\"exchange\\\": \\\"okex\\\",\\n" - + " \\\"price\\\": 69195.34,\\n" - + " \\\"weight\\\": 0.11\\n" - + " },\\n" - + " {\\n" - + " \\\"exchange\\\": \\\"bybit\\\",\\n" - + " \\\"price\\\": 69190.33,\\n" - + " \\\"weight\\\": 0.0676\\n" - + " },\\n" - + " {\\n" - + " \\\"exchange\\\": \\\"binance\\\",\\n" - + " \\\"price\\\": 69204.55,\\n" - + " \\\"weight\\\": 0.6195\\n" - + " },\\n" - + " {\\n" - + " \\\"exchange\\\": \\\"kucoin\\\",\\n" - + " \\\"price\\\": 69202.91,\\n" - + " \\\"weight\\\": 0.1368\\n" - + " }\\n" - + " ]\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\".KXBTUSDT\\\",\\n" - + " \\\"granularity\\\": 1000,\\n" - + " \\\"timePoint\\\": 1730557514000,\\n" - + " \\\"value\\\": 69204.98,\\n" - + " \\\"decomposionList\\\": [\\n" - + " {\\n" - + " \\\"exchange\\\": \\\"gateio\\\",\\n" - + " \\\"price\\\": 69212.71,\\n" - + " \\\"weight\\\": 0.0808\\n" - + " },\\n" - + " {\\n" - + " \\\"exchange\\\": \\\"bitmart\\\",\\n" - + " \\\"price\\\": 69230.77,\\n" - + " \\\"weight\\\": 0.0134\\n" - + " },\\n" - + " {\\n" - + " \\\"exchange\\\": \\\"okex\\\",\\n" - + " \\\"price\\\": 69195.49,\\n" - + " \\\"weight\\\": 0.0536\\n" - + " },\\n" - + " {\\n" - + " \\\"exchange\\\": \\\"bybit\\\",\\n" - + " \\\"price\\\": 69195.97,\\n" - + " \\\"weight\\\": 0.0921\\n" - + " },\\n" - + " {\\n" - + " \\\"exchange\\\": \\\"binance\\\",\\n" - + " \\\"price\\\": 69204.56,\\n" - + " \\\"weight\\\": 0.5476\\n" - + " },\\n" - + " {\\n" - + " \\\"exchange\\\": \\\"kucoin\\\",\\n" - + " \\\"price\\\": 69207.8,\\n" - + " \\\"weight\\\": 0.2125\\n" - + " }\\n" - + " ]\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"hasMore\": true,\n" + + " \"dataList\": [\n" + + " {\n" + + " \"symbol\": \".KXBTUSDT\",\n" + + " \"granularity\": 1000,\n" + + " \"timePoint\": 1730557515000,\n" + + " \"value\": 69202.94,\n" + + " \"decomposionList\": [\n" + + " {\n" + + " \"exchange\": \"gateio\",\n" + + " \"price\": 69209.27,\n" + + " \"weight\": 0.0533\n" + + " },\n" + + " {\n" + + " \"exchange\": \"bitmart\",\n" + + " \"price\": 69230.77,\n" + + " \"weight\": 0.0128\n" + + " },\n" + + " {\n" + + " \"exchange\": \"okex\",\n" + + " \"price\": 69195.34,\n" + + " \"weight\": 0.11\n" + + " },\n" + + " {\n" + + " \"exchange\": \"bybit\",\n" + + " \"price\": 69190.33,\n" + + " \"weight\": 0.0676\n" + + " },\n" + + " {\n" + + " \"exchange\": \"binance\",\n" + + " \"price\": 69204.55,\n" + + " \"weight\": 0.6195\n" + + " },\n" + + " {\n" + + " \"exchange\": \"kucoin\",\n" + + " \"price\": 69202.91,\n" + + " \"weight\": 0.1368\n" + + " }\n" + + " ]\n" + + " },\n" + + " {\n" + + " \"symbol\": \".KXBTUSDT\",\n" + + " \"granularity\": 1000,\n" + + " \"timePoint\": 1730557514000,\n" + + " \"value\": 69204.98,\n" + + " \"decomposionList\": [\n" + + " {\n" + + " \"exchange\": \"gateio\",\n" + + " \"price\": 69212.71,\n" + + " \"weight\": 0.0808\n" + + " },\n" + + " {\n" + + " \"exchange\": \"bitmart\",\n" + + " \"price\": 69230.77,\n" + + " \"weight\": 0.0134\n" + + " },\n" + + " {\n" + + " \"exchange\": \"okex\",\n" + + " \"price\": 69195.49,\n" + + " \"weight\": 0.0536\n" + + " },\n" + + " {\n" + + " \"exchange\": \"bybit\",\n" + + " \"price\": 69195.97,\n" + + " \"weight\": 0.0921\n" + + " },\n" + + " {\n" + + " \"exchange\": \"binance\",\n" + + " \"price\": 69204.56,\n" + + " \"weight\": 0.5476\n" + + " },\n" + + " {\n" + + " \"exchange\": \"kucoin\",\n" + + " \"price\": 69207.8,\n" + + " \"weight\": 0.2125\n" + + " }\n" + + " ]\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -541,34 +542,34 @@ public static void testGetSpotIndexPriceResponse() throws Exception { /** getInterestRateIndex Request Get Interest Rate Index /api/v1/interest/query */ public static void testGetInterestRateIndexRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\".XBTINT8H\\\", \\\"startAt\\\": 1728663338000, \\\"endAt\\\":" - + " 1728692138000, \\\"reverse\\\": true, \\\"offset\\\": 254062248624417," - + " \\\"forward\\\": true, \\\"maxCount\\\": 10}"; + "{\"symbol\": \".XBTINT8H\", \"startAt\": 1728663338000, \"endAt\": 1728692138000," + + " \"reverse\": true, \"offset\": 254062248624417, \"forward\": true, \"maxCount\":" + + " 10}"; GetInterestRateIndexReq obj = mapper.readValue(data, GetInterestRateIndexReq.class); } /** getInterestRateIndex Response Get Interest Rate Index /api/v1/interest/query */ public static void testGetInterestRateIndexResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"dataList\\\": [\\n" - + " {\\n" - + " \\\"symbol\\\": \\\".XBTINT\\\",\\n" - + " \\\"granularity\\\": 60000,\\n" - + " \\\"timePoint\\\": 1728692100000,\\n" - + " \\\"value\\\": 3.0E-4\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\".XBTINT\\\",\\n" - + " \\\"granularity\\\": 60000,\\n" - + " \\\"timePoint\\\": 1728692040000,\\n" - + " \\\"value\\\": 3.0E-4\\n" - + " }\\n" - + " ],\\n" - + " \\\"hasMore\\\": true\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"dataList\": [\n" + + " {\n" + + " \"symbol\": \".XBTINT\",\n" + + " \"granularity\": 60000,\n" + + " \"timePoint\": 1728692100000,\n" + + " \"value\": 3.0E-4\n" + + " },\n" + + " {\n" + + " \"symbol\": \".XBTINT\",\n" + + " \"granularity\": 60000,\n" + + " \"timePoint\": 1728692040000,\n" + + " \"value\": 3.0E-4\n" + + " }\n" + + " ],\n" + + " \"hasMore\": true\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -577,34 +578,34 @@ public static void testGetInterestRateIndexResponse() throws Exception { /** getPremiumIndex Request Get Premium Index /api/v1/premium/query */ public static void testGetPremiumIndexRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\".XBTUSDTMPI\\\", \\\"startAt\\\": 1728663338000, \\\"endAt\\\":" - + " 1728692138000, \\\"reverse\\\": true, \\\"offset\\\": 254062248624417," - + " \\\"forward\\\": true, \\\"maxCount\\\": 10}"; + "{\"symbol\": \".XBTUSDTMPI\", \"startAt\": 1728663338000, \"endAt\": 1728692138000," + + " \"reverse\": true, \"offset\": 254062248624417, \"forward\": true, \"maxCount\":" + + " 10}"; GetPremiumIndexReq obj = mapper.readValue(data, GetPremiumIndexReq.class); } /** getPremiumIndex Response Get Premium Index /api/v1/premium/query */ public static void testGetPremiumIndexResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"hasMore\\\": true,\\n" - + " \\\"dataList\\\": [\\n" - + " {\\n" - + " \\\"symbol\\\": \\\".XBTUSDTMPI\\\",\\n" - + " \\\"granularity\\\": 60000,\\n" - + " \\\"timePoint\\\": 1730558040000,\\n" - + " \\\"value\\\": 0.00006\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\".XBTUSDTMPI\\\",\\n" - + " \\\"granularity\\\": 60000,\\n" - + " \\\"timePoint\\\": 1730557980000,\\n" - + " \\\"value\\\": -0.000025\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"hasMore\": true,\n" + + " \"dataList\": [\n" + + " {\n" + + " \"symbol\": \".XBTUSDTMPI\",\n" + + " \"granularity\": 60000,\n" + + " \"timePoint\": 1730558040000,\n" + + " \"value\": 0.00006\n" + + " },\n" + + " {\n" + + " \"symbol\": \".XBTUSDTMPI\",\n" + + " \"granularity\": 60000,\n" + + " \"timePoint\": 1730557980000,\n" + + " \"value\": -0.000025\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -617,8 +618,7 @@ public static void testGet24hrStatsRequest() throws Exception { /** get24hrStats Response Get 24hr stats /api/v1/trade-statistics */ public static void testGet24hrStatsResponse() throws Exception { - String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"turnoverOf24h\\\":1.1155733413273683E9}}"; + String data = "{\"code\":\"200000\",\"data\":{\"turnoverOf24h\":1.1155733413273683E9}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -630,7 +630,7 @@ public static void testGetServerTimeRequest() throws Exception { /** getServerTime Response Get Server Time /api/v1/timestamp */ public static void testGetServerTimeResponse() throws Exception { - String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":1729260030774}"; + String data = "{\"code\":\"200000\",\"data\":1729260030774}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -642,8 +642,7 @@ public static void testGetServiceStatusRequest() throws Exception { /** getServiceStatus Response Get Service Status /api/v1/status */ public static void testGetServiceStatusResponse() throws Exception { - String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"msg\\\":\\\"\\\",\\\"status\\\":\\\"open\\\"}}"; + String data = "{\"code\":\"200000\",\"data\":{\"msg\":\"\",\"status\":\"open\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -656,7 +655,7 @@ public static void testGetPublicTokenRequest() throws Exception { /** getPublicToken Response Get Public Token - Futures /api/v1/bullet-public */ public static void testGetPublicTokenResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"token\\\":\\\"2neAiuYvAU61ZDXANAGAsiL4-iAExhsBXZxftpOeh_55i3Ysy2q2LEsEWU64mdzUOPusi34M_wGoSf7iNyEWJ6dACm4ny9vJtLTRq_YsRUlG5ADnAawegdiYB9J6i9GjsxUuhPw3Blq6rhZlGykT3Vp1phUafnulOOpts-MEmEF-3bpfetLOAjsMMBS5qwTWJBvJHl5Vs9Y=.gJEIAywPXFr_4L-WG10eug==\\\",\\\"instanceServers\\\":[{\\\"endpoint\\\":\\\"wss://ws-api-futures.kucoin.com/\\\",\\\"encrypt\\\":true,\\\"protocol\\\":\\\"websocket\\\",\\\"pingInterval\\\":18000,\\\"pingTimeout\\\":10000}]}}"; + "{\"code\":\"200000\",\"data\":{\"token\":\"2neAiuYvAU61ZDXANAGAsiL4-iAExhsBXZxftpOeh_55i3Ysy2q2LEsEWU64mdzUOPusi34M_wGoSf7iNyEWJ6dACm4ny9vJtLTRq_YsRUlG5ADnAawegdiYB9J6i9GjsxUuhPw3Blq6rhZlGykT3Vp1phUafnulOOpts-MEmEF-3bpfetLOAjsMMBS5qwTWJBvJHl5Vs9Y=.gJEIAywPXFr_4L-WG10eug==\",\"instanceServers\":[{\"endpoint\":\"wss://ws-api-futures.kucoin.com/\",\"encrypt\":true,\"protocol\":\"websocket\",\"pingInterval\":18000,\"pingTimeout\":10000}]}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -669,21 +668,21 @@ public static void testGetPrivateTokenRequest() throws Exception { /** getPrivateToken Response Get Private Token - Futures /api/v1/bullet-private */ public static void testGetPrivateTokenResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"token\\\":" - + " \\\"2neAiuYvAU737TOajb2U3uT8AEZqSWYe0fBD4LoHuXJDSC7gIzJiH4kNTWhCPISWo6nDpAe7aUaaHJ4fG8oRjFgMfUI2sM4IySWHrBceFocY8pKy2REU1HwZIngtMdMrjqPnP-biofFWbNaP1cl0X1pZc2SQ-33hDH1LgNP-yg8bktVoIG0dIxSN4m3uzO8u.ueCCihQ5_4GPpXKxWTDiFQ==\\\",\\n" - + " \\\"instanceServers\\\": [\\n" - + " {\\n" - + " \\\"endpoint\\\": \\\"wss://ws-api-futures.kucoin.com/\\\",\\n" - + " \\\"encrypt\\\": true,\\n" - + " \\\"protocol\\\": \\\"websocket\\\",\\n" - + " \\\"pingInterval\\\": 18000,\\n" - + " \\\"pingTimeout\\\": 10000\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"token\":" + + " \"2neAiuYvAU737TOajb2U3uT8AEZqSWYe0fBD4LoHuXJDSC7gIzJiH4kNTWhCPISWo6nDpAe7aUaaHJ4fG8oRjFgMfUI2sM4IySWHrBceFocY8pKy2REU1HwZIngtMdMrjqPnP-biofFWbNaP1cl0X1pZc2SQ-33hDH1LgNP-yg8bktVoIG0dIxSN4m3uzO8u.ueCCihQ5_4GPpXKxWTDiFQ==\",\n" + + " \"instanceServers\": [\n" + + " {\n" + + " \"endpoint\": \"wss://ws-api-futures.kucoin.com/\",\n" + + " \"encrypt\": true,\n" + + " \"protocol\": \"websocket\",\n" + + " \"pingInterval\": 18000,\n" + + " \"pingTimeout\": 10000\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -732,6 +731,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -753,6 +753,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApiAutoGeneratedTest.java index 9ea9fb5d..855b9322 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApiAutoGeneratedTest.java @@ -11,26 +11,27 @@ class OrderApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** addOrder Request Add Order /api/v1/orders */ public static void testAddOrderRequest() throws Exception { String data = - "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\"," - + " \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\"," - + " \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false," - + " \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.1\\\", \\\"size\\\": 1," - + " \\\"timeInForce\\\": \\\"GTC\\\"}"; + "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," + + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," + + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.1\", \"size\":" + + " 1, \"timeInForce\": \"GTC\"}"; AddOrderReq obj = mapper.readValue(data, AddOrderReq.class); } /** addOrder Response Add Order /api/v1/orders */ public static void testAddOrderResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"234125150956625920\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"234125150956625920\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -39,23 +40,22 @@ public static void testAddOrderResponse() throws Exception { /** addOrderTest Request Add Order Test /api/v1/orders/test */ public static void testAddOrderTestRequest() throws Exception { String data = - "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\"," - + " \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\"," - + " \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false," - + " \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.1\\\", \\\"size\\\": 1," - + " \\\"timeInForce\\\": \\\"GTC\\\"}"; + "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," + + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," + + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.1\", \"size\":" + + " 1, \"timeInForce\": \"GTC\"}"; AddOrderTestReq obj = mapper.readValue(data, AddOrderTestReq.class); } /** addOrderTest Response Add Order Test /api/v1/orders/test */ public static void testAddOrderTestResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"234125150956625920\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"234125150956625920\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -64,40 +64,37 @@ public static void testAddOrderTestResponse() throws Exception { /** batchAddOrders Request Batch Add Orders /api/v1/orders/multi */ public static void testBatchAddOrdersRequest() throws Exception { String data = - "[{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\"," - + " \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\"," - + " \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false," - + " \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.1\\\", \\\"size\\\": 1," - + " \\\"timeInForce\\\": \\\"GTC\\\"}, {\\\"clientOid\\\":" - + " \\\"5c52e11203aa677f33e493fc\\\", \\\"side\\\": \\\"buy\\\", \\\"symbol\\\":" - + " \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\", \\\"remark\\\":" - + " \\\"order remarks\\\", \\\"reduceOnly\\\": false, \\\"marginMode\\\":" - + " \\\"ISOLATED\\\", \\\"price\\\": \\\"0.1\\\", \\\"size\\\": 1, \\\"timeInForce\\\":" - + " \\\"GTC\\\"}]"; + "[{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\":" + + " \"XBTUSDTM\", \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," + + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.1\", \"size\":" + + " 1, \"timeInForce\": \"GTC\"}, {\"clientOid\": \"5c52e11203aa677f33e493fc\"," + + " \"side\": \"buy\", \"symbol\": \"XBTUSDTM\", \"leverage\": 3, \"type\": \"limit\"," + + " \"remark\": \"order remarks\", \"reduceOnly\": false, \"marginMode\": \"ISOLATED\"," + + " \"price\": \"0.1\", \"size\": 1, \"timeInForce\": \"GTC\"}]"; BatchAddOrdersReq obj = mapper.readValue(data, BatchAddOrdersReq.class); } /** batchAddOrders Response Batch Add Orders /api/v1/orders/multi */ public static void testBatchAddOrdersResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"orderId\\\": \\\"235919387779985408\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"msg\\\": \\\"success\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"orderId\\\": \\\"235919387855482880\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fc\\\",\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"msg\\\": \\\"success\\\"\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"orderId\": \"235919387779985408\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"code\": \"200000\",\n" + + " \"msg\": \"success\"\n" + + " },\n" + + " {\n" + + " \"orderId\": \"235919387855482880\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fc\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"code\": \"200000\",\n" + + " \"msg\": \"success\"\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -106,24 +103,23 @@ public static void testBatchAddOrdersResponse() throws Exception { /** addTPSLOrder Request Add Take Profit And Stop Loss Order /api/v1/st-orders */ public static void testAddTPSLOrderRequest() throws Exception { String data = - "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\"," - + " \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\"," - + " \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false," - + " \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.2\\\", \\\"size\\\": 1," - + " \\\"timeInForce\\\": \\\"GTC\\\", \\\"triggerStopUpPrice\\\": \\\"0.3\\\"," - + " \\\"triggerStopDownPrice\\\": \\\"0.1\\\", \\\"stopPriceType\\\": \\\"TP\\\"}"; + "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"side\": \"buy\", \"symbol\": \"XBTUSDTM\"," + + " \"leverage\": 3, \"type\": \"limit\", \"remark\": \"order remarks\"," + + " \"reduceOnly\": false, \"marginMode\": \"ISOLATED\", \"price\": \"0.2\", \"size\":" + + " 1, \"timeInForce\": \"GTC\", \"triggerStopUpPrice\": \"0.3\"," + + " \"triggerStopDownPrice\": \"0.1\", \"stopPriceType\": \"TP\"}"; AddTPSLOrderReq obj = mapper.readValue(data, AddTPSLOrderReq.class); } /** addTPSLOrder Response Add Take Profit And Stop Loss Order /api/v1/st-orders */ public static void testAddTPSLOrderResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"234125150956625920\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"234125150956625920\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -131,20 +127,20 @@ public static void testAddTPSLOrderResponse() throws Exception { /** cancelOrderById Request Cancel Order By OrderId /api/v1/orders/{orderId} */ public static void testCancelOrderByIdRequest() throws Exception { - String data = "{\\\"orderId\\\": \\\"example_string_default_value\\\"}"; + String data = "{\"orderId\": \"example_string_default_value\"}"; CancelOrderByIdReq obj = mapper.readValue(data, CancelOrderByIdReq.class); } /** cancelOrderById Response Cancel Order By OrderId /api/v1/orders/{orderId} */ public static void testCancelOrderByIdResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"cancelledOrderIds\\\": [\\n" - + " \\\"235303670076489728\\\"\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"235303670076489728\"\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -155,9 +151,7 @@ public static void testCancelOrderByIdResponse() throws Exception { * /api/v1/orders/client-order/{clientOid} */ public static void testCancelOrderByClientOidRequest() throws Exception { - String data = - "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"clientOid\\\":" - + " \\\"example_string_default_value\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\", \"clientOid\": \"example_string_default_value\"}"; CancelOrderByClientOidReq obj = mapper.readValue(data, CancelOrderByClientOidReq.class); } @@ -167,11 +161,11 @@ public static void testCancelOrderByClientOidRequest() throws Exception { */ public static void testCancelOrderByClientOidResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"clientOid\\\": \\\"017485b0-2957-4681-8a14-5d46b35aee0d\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"clientOid\": \"017485b0-2957-4681-8a14-5d46b35aee0d\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -179,52 +173,51 @@ public static void testCancelOrderByClientOidResponse() throws Exception { /** batchCancelOrders Request Batch Cancel Orders /api/v1/orders/multi-cancel */ public static void testBatchCancelOrdersRequest() throws Exception { - String data = - "{\\\"orderIdsList\\\": [\\\"250445104152670209\\\", \\\"250445181751463936\\\"]}"; + String data = "{\"orderIdsList\": [\"250445104152670209\", \"250445181751463936\"]}"; BatchCancelOrdersReq obj = mapper.readValue(data, BatchCancelOrdersReq.class); } /** batchCancelOrders Response Batch Cancel Orders /api/v1/orders/multi-cancel */ public static void testBatchCancelOrdersResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"orderId\\\": \\\"250445104152670209\\\",\\n" - + " \\\"clientOid\\\": null,\\n" - + " \\\"code\\\": \\\"200\\\",\\n" - + " \\\"msg\\\": \\\"success\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"orderId\\\": \\\"250445181751463936\\\",\\n" - + " \\\"clientOid\\\": null,\\n" - + " \\\"code\\\": \\\"200\\\",\\n" - + " \\\"msg\\\": \\\"success\\\"\\n" - + " }\\n" - + " ]\\n" - + "}\\n"; + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"orderId\": \"250445104152670209\",\n" + + " \"clientOid\": null,\n" + + " \"code\": \"200\",\n" + + " \"msg\": \"success\"\n" + + " },\n" + + " {\n" + + " \"orderId\": \"250445181751463936\",\n" + + " \"clientOid\": null,\n" + + " \"code\": \"200\",\n" + + " \"msg\": \"success\"\n" + + " }\n" + + " ]\n" + + "}\n"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** cancelAllOrdersV3 Request Cancel All Orders /api/v3/orders */ public static void testCancelAllOrdersV3Request() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\"}"; CancelAllOrdersV3Req obj = mapper.readValue(data, CancelAllOrdersV3Req.class); } /** cancelAllOrdersV3 Response Cancel All Orders /api/v3/orders */ public static void testCancelAllOrdersV3Response() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"cancelledOrderIds\\\": [\\n" - + " \\\"235919172150824960\\\",\\n" - + " \\\"235919172150824961\\\"\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"235919172150824960\",\n" + + " \"235919172150824961\"\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -232,21 +225,21 @@ public static void testCancelAllOrdersV3Response() throws Exception { /** cancelAllStopOrders Request Cancel All Stop orders /api/v1/stopOrders */ public static void testCancelAllStopOrdersRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\"}"; CancelAllStopOrdersReq obj = mapper.readValue(data, CancelAllStopOrdersReq.class); } /** cancelAllStopOrders Response Cancel All Stop orders /api/v1/stopOrders */ public static void testCancelAllStopOrdersResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"cancelledOrderIds\\\": [\\n" - + " \\\"235919172150824960\\\",\\n" - + " \\\"235919172150824961\\\"\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"235919172150824960\",\n" + + " \"235919172150824961\"\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -254,55 +247,55 @@ public static void testCancelAllStopOrdersResponse() throws Exception { /** getOrderByOrderId Request Get Order By OrderId /api/v1/orders/{order-id} */ public static void testGetOrderByOrderIdRequest() throws Exception { - String data = "{\\\"order-id\\\": \\\"236655147005071361\\\"}"; + String data = "{\"order-id\": \"236655147005071361\"}"; GetOrderByOrderIdReq obj = mapper.readValue(data, GetOrderByOrderIdReq.class); } /** getOrderByOrderId Response Get Order By OrderId /api/v1/orders/{order-id} */ public static void testGetOrderByOrderIdResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"id\\\": \\\"236655147005071361\\\",\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"type\\\": \\\"limit\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"price\\\": \\\"0.1\\\",\\n" - + " \\\"size\\\": 1,\\n" - + " \\\"value\\\": \\\"0.0001\\\",\\n" - + " \\\"dealValue\\\": \\\"0\\\",\\n" - + " \\\"dealSize\\\": 0,\\n" - + " \\\"stp\\\": \\\"\\\",\\n" - + " \\\"stop\\\": \\\"\\\",\\n" - + " \\\"stopPriceType\\\": \\\"\\\",\\n" - + " \\\"stopTriggered\\\": false,\\n" - + " \\\"stopPrice\\\": null,\\n" - + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" - + " \\\"postOnly\\\": false,\\n" - + " \\\"hidden\\\": false,\\n" - + " \\\"iceberg\\\": false,\\n" - + " \\\"leverage\\\": \\\"3\\\",\\n" - + " \\\"forceHold\\\": false,\\n" - + " \\\"closeOrder\\\": false,\\n" - + " \\\"visibleSize\\\": 0,\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" - + " \\\"remark\\\": null,\\n" - + " \\\"tags\\\": \\\"\\\",\\n" - + " \\\"isActive\\\": true,\\n" - + " \\\"cancelExist\\\": false,\\n" - + " \\\"createdAt\\\": 1729236185949,\\n" - + " \\\"updatedAt\\\": 1729236185949,\\n" - + " \\\"endAt\\\": null,\\n" - + " \\\"orderTime\\\": 1729236185885647952,\\n" - + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" - + " \\\"avgDealPrice\\\": \\\"0\\\",\\n" - + " \\\"filledSize\\\": 0,\\n" - + " \\\"filledValue\\\": \\\"0\\\",\\n" - + " \\\"status\\\": \\\"open\\\",\\n" - + " \\\"reduceOnly\\\": false\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"236655147005071361\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"0.1\",\n" + + " \"size\": 1,\n" + + " \"value\": \"0.0001\",\n" + + " \"dealValue\": \"0\",\n" + + " \"dealSize\": 0,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPriceType\": \"\",\n" + + " \"stopTriggered\": false,\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberg\": false,\n" + + " \"leverage\": \"3\",\n" + + " \"forceHold\": false,\n" + + " \"closeOrder\": false,\n" + + " \"visibleSize\": 0,\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"remark\": null,\n" + + " \"tags\": \"\",\n" + + " \"isActive\": true,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1729236185949,\n" + + " \"updatedAt\": 1729236185949,\n" + + " \"endAt\": null,\n" + + " \"orderTime\": 1729236185885647952,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"avgDealPrice\": \"0\",\n" + + " \"filledSize\": 0,\n" + + " \"filledValue\": \"0\",\n" + + " \"status\": \"open\",\n" + + " \"reduceOnly\": false\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -310,55 +303,55 @@ public static void testGetOrderByOrderIdResponse() throws Exception { /** getOrderByClientOid Request Get Order By ClientOid /api/v1/orders/byClientOid */ public static void testGetOrderByClientOidRequest() throws Exception { - String data = "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"}"; + String data = "{\"clientOid\": \"5c52e11203aa677f33e493fb\"}"; GetOrderByClientOidReq obj = mapper.readValue(data, GetOrderByClientOidReq.class); } /** getOrderByClientOid Response Get Order By ClientOid /api/v1/orders/byClientOid */ public static void testGetOrderByClientOidResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"id\\\": \\\"250444645610336256\\\",\\n" - + " \\\"symbol\\\": \\\"XRPUSDTM\\\",\\n" - + " \\\"type\\\": \\\"limit\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"price\\\": \\\"0.1\\\",\\n" - + " \\\"size\\\": 1,\\n" - + " \\\"value\\\": \\\"1\\\",\\n" - + " \\\"dealValue\\\": \\\"0\\\",\\n" - + " \\\"dealSize\\\": 0,\\n" - + " \\\"stp\\\": \\\"\\\",\\n" - + " \\\"stop\\\": \\\"\\\",\\n" - + " \\\"stopPriceType\\\": \\\"\\\",\\n" - + " \\\"stopTriggered\\\": false,\\n" - + " \\\"stopPrice\\\": null,\\n" - + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" - + " \\\"postOnly\\\": false,\\n" - + " \\\"hidden\\\": false,\\n" - + " \\\"iceberg\\\": false,\\n" - + " \\\"leverage\\\": \\\"3\\\",\\n" - + " \\\"forceHold\\\": false,\\n" - + " \\\"closeOrder\\\": false,\\n" - + " \\\"visibleSize\\\": 0,\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" - + " \\\"remark\\\": null,\\n" - + " \\\"tags\\\": \\\"\\\",\\n" - + " \\\"isActive\\\": true,\\n" - + " \\\"cancelExist\\\": false,\\n" - + " \\\"createdAt\\\": 1732523858568,\\n" - + " \\\"updatedAt\\\": 1732523858568,\\n" - + " \\\"endAt\\\": null,\\n" - + " \\\"orderTime\\\": 1732523858550892322,\\n" - + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" - + " \\\"avgDealPrice\\\": \\\"0\\\",\\n" - + " \\\"filledSize\\\": 0,\\n" - + " \\\"filledValue\\\": \\\"0\\\",\\n" - + " \\\"status\\\": \\\"open\\\",\\n" - + " \\\"reduceOnly\\\": false\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"250444645610336256\",\n" + + " \"symbol\": \"XRPUSDTM\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"0.1\",\n" + + " \"size\": 1,\n" + + " \"value\": \"1\",\n" + + " \"dealValue\": \"0\",\n" + + " \"dealSize\": 0,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPriceType\": \"\",\n" + + " \"stopTriggered\": false,\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberg\": false,\n" + + " \"leverage\": \"3\",\n" + + " \"forceHold\": false,\n" + + " \"closeOrder\": false,\n" + + " \"visibleSize\": 0,\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"remark\": null,\n" + + " \"tags\": \"\",\n" + + " \"isActive\": true,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1732523858568,\n" + + " \"updatedAt\": 1732523858568,\n" + + " \"endAt\": null,\n" + + " \"orderTime\": 1732523858550892322,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"avgDealPrice\": \"0\",\n" + + " \"filledSize\": 0,\n" + + " \"filledValue\": \"0\",\n" + + " \"status\": \"open\",\n" + + " \"reduceOnly\": false\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -367,65 +360,65 @@ public static void testGetOrderByClientOidResponse() throws Exception { /** getOrderList Request Get Order List /api/v1/orders */ public static void testGetOrderListRequest() throws Exception { String data = - "{\\\"status\\\": \\\"done\\\", \\\"symbol\\\": \\\"example_string_default_value\\\"," - + " \\\"side\\\": \\\"buy\\\", \\\"type\\\": \\\"limit\\\", \\\"startAt\\\": 123456," - + " \\\"endAt\\\": 123456, \\\"currentPage\\\": 1, \\\"pageSize\\\": 50}"; + "{\"status\": \"done\", \"symbol\": \"example_string_default_value\", \"side\": \"buy\"," + + " \"type\": \"limit\", \"startAt\": 123456, \"endAt\": 123456, \"currentPage\": 1," + + " \"pageSize\": 50}"; GetOrderListReq obj = mapper.readValue(data, GetOrderListReq.class); } /** getOrderList Response Get Order List /api/v1/orders */ public static void testGetOrderListResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"currentPage\\\": 1,\\n" - + " \\\"pageSize\\\": 50,\\n" - + " \\\"totalNum\\\": 1,\\n" - + " \\\"totalPage\\\": 1,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"230181737576050688\\\",\\n" - + " \\\"symbol\\\": \\\"PEOPLEUSDTM\\\",\\n" - + " \\\"type\\\": \\\"limit\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"price\\\": \\\"0.05\\\",\\n" - + " \\\"size\\\": 10,\\n" - + " \\\"value\\\": \\\"5\\\",\\n" - + " \\\"dealValue\\\": \\\"0\\\",\\n" - + " \\\"dealSize\\\": 0,\\n" - + " \\\"stp\\\": \\\"\\\",\\n" - + " \\\"stop\\\": \\\"\\\",\\n" - + " \\\"stopPriceType\\\": \\\"\\\",\\n" - + " \\\"stopTriggered\\\": false,\\n" - + " \\\"stopPrice\\\": null,\\n" - + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" - + " \\\"postOnly\\\": false,\\n" - + " \\\"hidden\\\": false,\\n" - + " \\\"iceberg\\\": false,\\n" - + " \\\"leverage\\\": \\\"1\\\",\\n" - + " \\\"forceHold\\\": false,\\n" - + " \\\"closeOrder\\\": false,\\n" - + " \\\"visibleSize\\\": 0,\\n" - + " \\\"clientOid\\\": \\\"5a80bd847f1811ef8a7faa665a37b3d7\\\",\\n" - + " \\\"remark\\\": null,\\n" - + " \\\"tags\\\": \\\"\\\",\\n" - + " \\\"isActive\\\": true,\\n" - + " \\\"cancelExist\\\": false,\\n" - + " \\\"createdAt\\\": 1727692804813,\\n" - + " \\\"updatedAt\\\": 1727692804813,\\n" - + " \\\"endAt\\\": null,\\n" - + " \\\"orderTime\\\": 1727692804808418000,\\n" - + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" - + " \\\"avgDealPrice\\\": \\\"0\\\",\\n" - + " \\\"filledSize\\\": 0,\\n" - + " \\\"filledValue\\\": \\\"0\\\",\\n" - + " \\\"status\\\": \\\"open\\\",\\n" - + " \\\"reduceOnly\\\": false\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 1,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"id\": \"230181737576050688\",\n" + + " \"symbol\": \"PEOPLEUSDTM\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"0.05\",\n" + + " \"size\": 10,\n" + + " \"value\": \"5\",\n" + + " \"dealValue\": \"0\",\n" + + " \"dealSize\": 0,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPriceType\": \"\",\n" + + " \"stopTriggered\": false,\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberg\": false,\n" + + " \"leverage\": \"1\",\n" + + " \"forceHold\": false,\n" + + " \"closeOrder\": false,\n" + + " \"visibleSize\": 0,\n" + + " \"clientOid\": \"5a80bd847f1811ef8a7faa665a37b3d7\",\n" + + " \"remark\": null,\n" + + " \"tags\": \"\",\n" + + " \"isActive\": true,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1727692804813,\n" + + " \"updatedAt\": 1727692804813,\n" + + " \"endAt\": null,\n" + + " \"orderTime\": 1727692804808418000,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"avgDealPrice\": \"0\",\n" + + " \"filledSize\": 0,\n" + + " \"filledValue\": \"0\",\n" + + " \"status\": \"open\",\n" + + " \"reduceOnly\": false\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -433,137 +426,137 @@ public static void testGetOrderListResponse() throws Exception { /** getRecentClosedOrders Request Get Recent Closed Orders /api/v1/recentDoneOrders */ public static void testGetRecentClosedOrdersRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\"}"; GetRecentClosedOrdersReq obj = mapper.readValue(data, GetRecentClosedOrdersReq.class); } /** getRecentClosedOrders Response Get Recent Closed Orders /api/v1/recentDoneOrders */ public static void testGetRecentClosedOrdersResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"236387137732231168\\\",\\n" - + " \\\"symbol\\\": \\\"XRPUSDTM\\\",\\n" - + " \\\"type\\\": \\\"market\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"price\\\": \\\"0\\\",\\n" - + " \\\"size\\\": 1,\\n" - + " \\\"value\\\": \\\"5.51\\\",\\n" - + " \\\"dealValue\\\": \\\"5.511\\\",\\n" - + " \\\"dealSize\\\": 1,\\n" - + " \\\"stp\\\": \\\"\\\",\\n" - + " \\\"stop\\\": \\\"\\\",\\n" - + " \\\"stopPriceType\\\": \\\"\\\",\\n" - + " \\\"stopTriggered\\\": false,\\n" - + " \\\"stopPrice\\\": null,\\n" - + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" - + " \\\"postOnly\\\": false,\\n" - + " \\\"hidden\\\": false,\\n" - + " \\\"iceberg\\\": false,\\n" - + " \\\"leverage\\\": \\\"10.0\\\",\\n" - + " \\\"forceHold\\\": false,\\n" - + " \\\"closeOrder\\\": false,\\n" - + " \\\"visibleSize\\\": 0,\\n" - + " \\\"clientOid\\\": \\\"16698fe6-2746-4aeb-a7fa-61f633ab6090\\\",\\n" - + " \\\"remark\\\": null,\\n" - + " \\\"tags\\\": \\\"\\\",\\n" - + " \\\"isActive\\\": false,\\n" - + " \\\"cancelExist\\\": false,\\n" - + " \\\"createdAt\\\": 1729172287496,\\n" - + " \\\"updatedAt\\\": 1729172287568,\\n" - + " \\\"endAt\\\": 1729172287568,\\n" - + " \\\"orderTime\\\": 1729172287496950800,\\n" - + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" - + " \\\"avgDealPrice\\\": \\\"0.5511\\\",\\n" - + " \\\"filledSize\\\": 1,\\n" - + " \\\"filledValue\\\": \\\"5.511\\\",\\n" - + " \\\"status\\\": \\\"done\\\",\\n" - + " \\\"reduceOnly\\\": false\\n" - + " },\\n" - + " {\\n" - + " \\\"id\\\": \\\"236317213710184449\\\",\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"type\\\": \\\"market\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"price\\\": \\\"0\\\",\\n" - + " \\\"size\\\": 1,\\n" - + " \\\"value\\\": \\\"67.4309\\\",\\n" - + " \\\"dealValue\\\": \\\"67.4309\\\",\\n" - + " \\\"dealSize\\\": 1,\\n" - + " \\\"stp\\\": \\\"\\\",\\n" - + " \\\"stop\\\": \\\"\\\",\\n" - + " \\\"stopPriceType\\\": \\\"\\\",\\n" - + " \\\"stopTriggered\\\": false,\\n" - + " \\\"stopPrice\\\": null,\\n" - + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" - + " \\\"postOnly\\\": false,\\n" - + " \\\"hidden\\\": false,\\n" - + " \\\"iceberg\\\": false,\\n" - + " \\\"leverage\\\": \\\"3\\\",\\n" - + " \\\"forceHold\\\": false,\\n" - + " \\\"closeOrder\\\": false,\\n" - + " \\\"visibleSize\\\": 0,\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" - + " \\\"remark\\\": null,\\n" - + " \\\"tags\\\": \\\"\\\",\\n" - + " \\\"isActive\\\": false,\\n" - + " \\\"cancelExist\\\": false,\\n" - + " \\\"createdAt\\\": 1729155616310,\\n" - + " \\\"updatedAt\\\": 1729155616324,\\n" - + " \\\"endAt\\\": 1729155616324,\\n" - + " \\\"orderTime\\\": 1729155616310180400,\\n" - + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" - + " \\\"avgDealPrice\\\": \\\"67430.9\\\",\\n" - + " \\\"filledSize\\\": 1,\\n" - + " \\\"filledValue\\\": \\\"67.4309\\\",\\n" - + " \\\"status\\\": \\\"done\\\",\\n" - + " \\\"reduceOnly\\\": false\\n" - + " },\\n" - + " {\\n" - + " \\\"id\\\": \\\"236317094436728832\\\",\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"type\\\": \\\"market\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"price\\\": \\\"0\\\",\\n" - + " \\\"size\\\": 1,\\n" - + " \\\"value\\\": \\\"67.445\\\",\\n" - + " \\\"dealValue\\\": \\\"67.445\\\",\\n" - + " \\\"dealSize\\\": 1,\\n" - + " \\\"stp\\\": \\\"\\\",\\n" - + " \\\"stop\\\": \\\"\\\",\\n" - + " \\\"stopPriceType\\\": \\\"\\\",\\n" - + " \\\"stopTriggered\\\": false,\\n" - + " \\\"stopPrice\\\": null,\\n" - + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" - + " \\\"postOnly\\\": false,\\n" - + " \\\"hidden\\\": false,\\n" - + " \\\"iceberg\\\": false,\\n" - + " \\\"leverage\\\": \\\"3\\\",\\n" - + " \\\"forceHold\\\": false,\\n" - + " \\\"closeOrder\\\": false,\\n" - + " \\\"visibleSize\\\": 0,\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" - + " \\\"remark\\\": null,\\n" - + " \\\"tags\\\": \\\"\\\",\\n" - + " \\\"isActive\\\": false,\\n" - + " \\\"cancelExist\\\": false,\\n" - + " \\\"createdAt\\\": 1729155587873,\\n" - + " \\\"updatedAt\\\": 1729155587946,\\n" - + " \\\"endAt\\\": 1729155587946,\\n" - + " \\\"orderTime\\\": 1729155587873332000,\\n" - + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" - + " \\\"avgDealPrice\\\": \\\"67445.0\\\",\\n" - + " \\\"filledSize\\\": 1,\\n" - + " \\\"filledValue\\\": \\\"67.445\\\",\\n" - + " \\\"status\\\": \\\"done\\\",\\n" - + " \\\"reduceOnly\\\": false\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"236387137732231168\",\n" + + " \"symbol\": \"XRPUSDTM\",\n" + + " \"type\": \"market\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"0\",\n" + + " \"size\": 1,\n" + + " \"value\": \"5.51\",\n" + + " \"dealValue\": \"5.511\",\n" + + " \"dealSize\": 1,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPriceType\": \"\",\n" + + " \"stopTriggered\": false,\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberg\": false,\n" + + " \"leverage\": \"10.0\",\n" + + " \"forceHold\": false,\n" + + " \"closeOrder\": false,\n" + + " \"visibleSize\": 0,\n" + + " \"clientOid\": \"16698fe6-2746-4aeb-a7fa-61f633ab6090\",\n" + + " \"remark\": null,\n" + + " \"tags\": \"\",\n" + + " \"isActive\": false,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1729172287496,\n" + + " \"updatedAt\": 1729172287568,\n" + + " \"endAt\": 1729172287568,\n" + + " \"orderTime\": 1729172287496950800,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"avgDealPrice\": \"0.5511\",\n" + + " \"filledSize\": 1,\n" + + " \"filledValue\": \"5.511\",\n" + + " \"status\": \"done\",\n" + + " \"reduceOnly\": false\n" + + " },\n" + + " {\n" + + " \"id\": \"236317213710184449\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"type\": \"market\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"0\",\n" + + " \"size\": 1,\n" + + " \"value\": \"67.4309\",\n" + + " \"dealValue\": \"67.4309\",\n" + + " \"dealSize\": 1,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPriceType\": \"\",\n" + + " \"stopTriggered\": false,\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberg\": false,\n" + + " \"leverage\": \"3\",\n" + + " \"forceHold\": false,\n" + + " \"closeOrder\": false,\n" + + " \"visibleSize\": 0,\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"remark\": null,\n" + + " \"tags\": \"\",\n" + + " \"isActive\": false,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1729155616310,\n" + + " \"updatedAt\": 1729155616324,\n" + + " \"endAt\": 1729155616324,\n" + + " \"orderTime\": 1729155616310180400,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"avgDealPrice\": \"67430.9\",\n" + + " \"filledSize\": 1,\n" + + " \"filledValue\": \"67.4309\",\n" + + " \"status\": \"done\",\n" + + " \"reduceOnly\": false\n" + + " },\n" + + " {\n" + + " \"id\": \"236317094436728832\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"type\": \"market\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"0\",\n" + + " \"size\": 1,\n" + + " \"value\": \"67.445\",\n" + + " \"dealValue\": \"67.445\",\n" + + " \"dealSize\": 1,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPriceType\": \"\",\n" + + " \"stopTriggered\": false,\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberg\": false,\n" + + " \"leverage\": \"3\",\n" + + " \"forceHold\": false,\n" + + " \"closeOrder\": false,\n" + + " \"visibleSize\": 0,\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"remark\": null,\n" + + " \"tags\": \"\",\n" + + " \"isActive\": false,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1729155587873,\n" + + " \"updatedAt\": 1729155587946,\n" + + " \"endAt\": 1729155587946,\n" + + " \"orderTime\": 1729155587873332000,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"avgDealPrice\": \"67445.0\",\n" + + " \"filledSize\": 1,\n" + + " \"filledValue\": \"67.445\",\n" + + " \"status\": \"done\",\n" + + " \"reduceOnly\": false\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -572,65 +565,64 @@ public static void testGetRecentClosedOrdersResponse() throws Exception { /** getStopOrderList Request Get Stop Order List /api/v1/stopOrders */ public static void testGetStopOrderListRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"side\\\": \\\"buy\\\", \\\"type\\\": \\\"limit\\\"," - + " \\\"startAt\\\": 123456, \\\"endAt\\\": 123456, \\\"currentPage\\\": 123456," - + " \\\"pageSize\\\": 50}"; + "{\"symbol\": \"XBTUSDTM\", \"side\": \"buy\", \"type\": \"limit\", \"startAt\": 123456," + + " \"endAt\": 123456, \"currentPage\": 123456, \"pageSize\": 50}"; GetStopOrderListReq obj = mapper.readValue(data, GetStopOrderListReq.class); } /** getStopOrderList Response Get Stop Order List /api/v1/stopOrders */ public static void testGetStopOrderListResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"currentPage\\\": 1,\\n" - + " \\\"pageSize\\\": 50,\\n" - + " \\\"totalNum\\\": 1,\\n" - + " \\\"totalPage\\\": 1,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"230181737576050688\\\",\\n" - + " \\\"symbol\\\": \\\"PEOPLEUSDTM\\\",\\n" - + " \\\"type\\\": \\\"limit\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"price\\\": \\\"0.05\\\",\\n" - + " \\\"size\\\": 10,\\n" - + " \\\"value\\\": \\\"5\\\",\\n" - + " \\\"dealValue\\\": \\\"0\\\",\\n" - + " \\\"dealSize\\\": 0,\\n" - + " \\\"stp\\\": \\\"\\\",\\n" - + " \\\"stop\\\": \\\"\\\",\\n" - + " \\\"stopPriceType\\\": \\\"\\\",\\n" - + " \\\"stopTriggered\\\": false,\\n" - + " \\\"stopPrice\\\": null,\\n" - + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" - + " \\\"postOnly\\\": false,\\n" - + " \\\"hidden\\\": false,\\n" - + " \\\"iceberg\\\": false,\\n" - + " \\\"leverage\\\": \\\"1\\\",\\n" - + " \\\"forceHold\\\": false,\\n" - + " \\\"closeOrder\\\": false,\\n" - + " \\\"visibleSize\\\": 0,\\n" - + " \\\"clientOid\\\": \\\"5a80bd847f1811ef8a7faa665a37b3d7\\\",\\n" - + " \\\"remark\\\": null,\\n" - + " \\\"tags\\\": \\\"\\\",\\n" - + " \\\"isActive\\\": true,\\n" - + " \\\"cancelExist\\\": false,\\n" - + " \\\"createdAt\\\": 1727692804813,\\n" - + " \\\"updatedAt\\\": 1727692804813,\\n" - + " \\\"endAt\\\": null,\\n" - + " \\\"orderTime\\\": 1727692804808418000,\\n" - + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" - + " \\\"avgDealPrice\\\": \\\"0\\\",\\n" - + " \\\"filledSize\\\": 0,\\n" - + " \\\"filledValue\\\": \\\"0\\\",\\n" - + " \\\"status\\\": \\\"open\\\",\\n" - + " \\\"reduceOnly\\\": false\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 1,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"id\": \"230181737576050688\",\n" + + " \"symbol\": \"PEOPLEUSDTM\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"0.05\",\n" + + " \"size\": 10,\n" + + " \"value\": \"5\",\n" + + " \"dealValue\": \"0\",\n" + + " \"dealSize\": 0,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPriceType\": \"\",\n" + + " \"stopTriggered\": false,\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberg\": false,\n" + + " \"leverage\": \"1\",\n" + + " \"forceHold\": false,\n" + + " \"closeOrder\": false,\n" + + " \"visibleSize\": 0,\n" + + " \"clientOid\": \"5a80bd847f1811ef8a7faa665a37b3d7\",\n" + + " \"remark\": null,\n" + + " \"tags\": \"\",\n" + + " \"isActive\": true,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1727692804813,\n" + + " \"updatedAt\": 1727692804813,\n" + + " \"endAt\": null,\n" + + " \"orderTime\": 1727692804808418000,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"avgDealPrice\": \"0\",\n" + + " \"filledSize\": 0,\n" + + " \"filledValue\": \"0\",\n" + + " \"status\": \"open\",\n" + + " \"reduceOnly\": false\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -638,22 +630,22 @@ public static void testGetStopOrderListResponse() throws Exception { /** getOpenOrderValue Request Get Open Order Value /api/v1/openOrderStatistics */ public static void testGetOpenOrderValueRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\"}"; GetOpenOrderValueReq obj = mapper.readValue(data, GetOpenOrderValueReq.class); } /** getOpenOrderValue Response Get Open Order Value /api/v1/openOrderStatistics */ public static void testGetOpenOrderValueResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"openOrderBuySize\\\": 1,\\n" - + " \\\"openOrderSellSize\\\": 0,\\n" - + " \\\"openOrderBuyCost\\\": \\\"0.0001\\\",\\n" - + " \\\"openOrderSellCost\\\": \\\"0\\\",\\n" - + " \\\"settleCurrency\\\": \\\"USDT\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"openOrderBuySize\": 1,\n" + + " \"openOrderSellSize\": 0,\n" + + " \"openOrderBuyCost\": \"0.0001\",\n" + + " \"openOrderSellCost\": \"0\",\n" + + " \"settleCurrency\": \"USDT\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -661,69 +653,69 @@ public static void testGetOpenOrderValueResponse() throws Exception { /** getRecentTradeHistory Request Get Recent Trade History /api/v1/recentFills */ public static void testGetRecentTradeHistoryRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\"}"; GetRecentTradeHistoryReq obj = mapper.readValue(data, GetRecentTradeHistoryReq.class); } /** getRecentTradeHistory Response Get Recent Trade History /api/v1/recentFills */ public static void testGetRecentTradeHistoryResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"tradeId\\\": \\\"1784277229880\\\",\\n" - + " \\\"orderId\\\": \\\"236317213710184449\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"liquidity\\\": \\\"taker\\\",\\n" - + " \\\"forceTaker\\\": false,\\n" - + " \\\"price\\\": \\\"67430.9\\\",\\n" - + " \\\"size\\\": 1,\\n" - + " \\\"value\\\": \\\"67.4309\\\",\\n" - + " \\\"openFeePay\\\": \\\"0.04045854\\\",\\n" - + " \\\"closeFeePay\\\": \\\"0\\\",\\n" - + " \\\"stop\\\": \\\"\\\",\\n" - + " \\\"feeRate\\\": \\\"0.00060\\\",\\n" - + " \\\"fixFee\\\": \\\"0\\\",\\n" - + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" - + " \\\"fee\\\": \\\"0.04045854\\\",\\n" - + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"orderType\\\": \\\"market\\\",\\n" - + " \\\"displayType\\\": \\\"market\\\",\\n" - + " \\\"tradeType\\\": \\\"trade\\\",\\n" - + " \\\"subTradeType\\\": null,\\n" - + " \\\"tradeTime\\\": 1729155616320000000,\\n" - + " \\\"createdAt\\\": 1729155616493\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"tradeId\\\": \\\"1784277132002\\\",\\n" - + " \\\"orderId\\\": \\\"236317094436728832\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"liquidity\\\": \\\"taker\\\",\\n" - + " \\\"forceTaker\\\": false,\\n" - + " \\\"price\\\": \\\"67445\\\",\\n" - + " \\\"size\\\": 1,\\n" - + " \\\"value\\\": \\\"67.445\\\",\\n" - + " \\\"openFeePay\\\": \\\"0\\\",\\n" - + " \\\"closeFeePay\\\": \\\"0.040467\\\",\\n" - + " \\\"stop\\\": \\\"\\\",\\n" - + " \\\"feeRate\\\": \\\"0.00060\\\",\\n" - + " \\\"fixFee\\\": \\\"0\\\",\\n" - + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" - + " \\\"fee\\\": \\\"0.040467\\\",\\n" - + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"orderType\\\": \\\"market\\\",\\n" - + " \\\"displayType\\\": \\\"market\\\",\\n" - + " \\\"tradeType\\\": \\\"trade\\\",\\n" - + " \\\"subTradeType\\\": null,\\n" - + " \\\"tradeTime\\\": 1729155587944000000,\\n" - + " \\\"createdAt\\\": 1729155588104\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"tradeId\": \"1784277229880\",\n" + + " \"orderId\": \"236317213710184449\",\n" + + " \"side\": \"buy\",\n" + + " \"liquidity\": \"taker\",\n" + + " \"forceTaker\": false,\n" + + " \"price\": \"67430.9\",\n" + + " \"size\": 1,\n" + + " \"value\": \"67.4309\",\n" + + " \"openFeePay\": \"0.04045854\",\n" + + " \"closeFeePay\": \"0\",\n" + + " \"stop\": \"\",\n" + + " \"feeRate\": \"0.00060\",\n" + + " \"fixFee\": \"0\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"fee\": \"0.04045854\",\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"orderType\": \"market\",\n" + + " \"displayType\": \"market\",\n" + + " \"tradeType\": \"trade\",\n" + + " \"subTradeType\": null,\n" + + " \"tradeTime\": 1729155616320000000,\n" + + " \"createdAt\": 1729155616493\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"tradeId\": \"1784277132002\",\n" + + " \"orderId\": \"236317094436728832\",\n" + + " \"side\": \"buy\",\n" + + " \"liquidity\": \"taker\",\n" + + " \"forceTaker\": false,\n" + + " \"price\": \"67445\",\n" + + " \"size\": 1,\n" + + " \"value\": \"67.445\",\n" + + " \"openFeePay\": \"0\",\n" + + " \"closeFeePay\": \"0.040467\",\n" + + " \"stop\": \"\",\n" + + " \"feeRate\": \"0.00060\",\n" + + " \"fixFee\": \"0\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"fee\": \"0.040467\",\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"orderType\": \"market\",\n" + + " \"displayType\": \"market\",\n" + + " \"tradeType\": \"trade\",\n" + + " \"subTradeType\": null,\n" + + " \"tradeTime\": 1729155587944000000,\n" + + " \"createdAt\": 1729155588104\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -732,54 +724,53 @@ public static void testGetRecentTradeHistoryResponse() throws Exception { /** getTradeHistory Request Get Trade History /api/v1/fills */ public static void testGetTradeHistoryRequest() throws Exception { String data = - "{\\\"orderId\\\": \\\"236655147005071361\\\", \\\"symbol\\\":" - + " \\\"example_string_default_value\\\", \\\"side\\\": \\\"buy\\\", \\\"type\\\":" - + " \\\"limit\\\", \\\"tradeTypes\\\": \\\"trade\\\", \\\"startAt\\\": 123456," - + " \\\"endAt\\\": 123456, \\\"currentPage\\\": 1, \\\"pageSize\\\": 50}"; + "{\"orderId\": \"236655147005071361\", \"symbol\": \"example_string_default_value\"," + + " \"side\": \"buy\", \"type\": \"limit\", \"tradeTypes\": \"trade\", \"startAt\":" + + " 123456, \"endAt\": 123456, \"currentPage\": 1, \"pageSize\": 50}"; GetTradeHistoryReq obj = mapper.readValue(data, GetTradeHistoryReq.class); } /** getTradeHistory Response Get Trade History /api/v1/fills */ public static void testGetTradeHistoryResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -787,21 +778,21 @@ public static void testGetTradeHistoryResponse() throws Exception { /** cancelAllOrdersV1 Request Cancel All Orders - V1 /api/v1/orders */ public static void testCancelAllOrdersV1Request() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\"}"; CancelAllOrdersV1Req obj = mapper.readValue(data, CancelAllOrdersV1Req.class); } /** cancelAllOrdersV1 Response Cancel All Orders - V1 /api/v1/orders */ public static void testCancelAllOrdersV1Response() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"cancelledOrderIds\\\": [\\n" - + " \\\"235919172150824960\\\",\\n" - + " \\\"235919172150824961\\\"\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"235919172150824960\",\n" + + " \"235919172150824961\"\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -868,6 +859,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -889,6 +881,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApiAutoGeneratedTest.java index 8dc7d238..be276e43 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApiAutoGeneratedTest.java @@ -11,21 +11,23 @@ class PositionsApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** getMarginMode Request Get Margin Mode /api/v2/position/getMarginMode */ public static void testGetMarginModeRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\"}"; GetMarginModeReq obj = mapper.readValue(data, GetMarginModeReq.class); } /** getMarginMode Response Get Margin Mode /api/v2/position/getMarginMode */ public static void testGetMarginModeResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"marginMode\\\": \\\"ISOLATED\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"marginMode\": \"ISOLATED\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -33,19 +35,19 @@ public static void testGetMarginModeResponse() throws Exception { /** switchMarginMode Request Switch Margin Mode /api/v2/position/changeMarginMode */ public static void testSwitchMarginModeRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"marginMode\\\": \\\"ISOLATED\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\", \"marginMode\": \"ISOLATED\"}"; SwitchMarginModeReq obj = mapper.readValue(data, SwitchMarginModeReq.class); } /** switchMarginMode Response Switch Margin Mode /api/v2/position/changeMarginMode */ public static void testSwitchMarginModeResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"marginMode\\\": \\\"ISOLATED\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"marginMode\": \"ISOLATED\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -55,9 +57,7 @@ public static void testSwitchMarginModeResponse() throws Exception { * batchSwitchMarginMode Request Batch Switch Margin Mode /api/v2/position/batchChangeMarginMode */ public static void testBatchSwitchMarginModeRequest() throws Exception { - String data = - "{\\\"marginMode\\\": \\\"ISOLATED\\\", \\\"symbols\\\": [\\\"XBTUSDTM\\\"," - + " \\\"ETHUSDTM\\\"]}"; + String data = "{\"marginMode\": \"ISOLATED\", \"symbols\": [\"XBTUSDTM\", \"ETHUSDTM\"]}"; BatchSwitchMarginModeReq obj = mapper.readValue(data, BatchSwitchMarginModeReq.class); } @@ -66,21 +66,21 @@ public static void testBatchSwitchMarginModeRequest() throws Exception { */ public static void testBatchSwitchMarginModeResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"marginMode\\\": {\\n" - + " \\\"ETHUSDTM\\\": \\\"ISOLATED\\\",\\n" - + " \\\"XBTUSDTM\\\": \\\"CROSS\\\"\\n" - + " },\\n" - + " \\\"errors\\\": [\\n" - + " {\\n" - + " \\\"code\\\": \\\"50002\\\",\\n" - + " \\\"msg\\\": \\\"exist.order.or.position\\\",\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\"\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"marginMode\": {\n" + + " \"ETHUSDTM\": \"ISOLATED\",\n" + + " \"XBTUSDTM\": \"CROSS\"\n" + + " },\n" + + " \"errors\": [\n" + + " {\n" + + " \"code\": \"50002\",\n" + + " \"msg\": \"exist.order.or.position\",\n" + + " \"symbol\": \"XBTUSDTM\"\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -89,21 +89,21 @@ public static void testBatchSwitchMarginModeResponse() throws Exception { /** getMaxOpenSize Request Get Max Open Size /api/v2/getMaxOpenSize */ public static void testGetMaxOpenSizeRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"price\\\": \\\"example_string_default_value\\\"," - + " \\\"leverage\\\": 123456}"; + "{\"symbol\": \"XBTUSDTM\", \"price\": \"example_string_default_value\", \"leverage\":" + + " 123456}"; GetMaxOpenSizeReq obj = mapper.readValue(data, GetMaxOpenSizeReq.class); } /** getMaxOpenSize Response Get Max Open Size /api/v2/getMaxOpenSize */ public static void testGetMaxOpenSizeResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"maxBuyOpenSize\\\": 0,\\n" - + " \\\"maxSellOpenSize\\\": 0\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"maxBuyOpenSize\": 0,\n" + + " \"maxSellOpenSize\": 0\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -111,158 +111,158 @@ public static void testGetMaxOpenSizeResponse() throws Exception { /** getPositionDetails Request Get Position Details /api/v1/position */ public static void testGetPositionDetailsRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"example_string_default_value\\\"}"; + String data = "{\"symbol\": \"example_string_default_value\"}"; GetPositionDetailsReq obj = mapper.readValue(data, GetPositionDetailsReq.class); } /** getPositionDetails Response Get Position Details /api/v1/position */ public static void testGetPositionDetailsResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"id\\\": \\\"500000000000988255\\\",\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"autoDeposit\\\": false,\\n" - + " \\\"crossMode\\\": false,\\n" - + " \\\"maintMarginReq\\\": 0.005,\\n" - + " \\\"riskLimit\\\": 500000,\\n" - + " \\\"realLeverage\\\": 2.88,\\n" - + " \\\"delevPercentage\\\": 0.18,\\n" - + " \\\"openingTimestamp\\\": 1729155616322,\\n" - + " \\\"currentTimestamp\\\": 1729482542135,\\n" - + " \\\"currentQty\\\": 1,\\n" - + " \\\"currentCost\\\": 67.4309,\\n" - + " \\\"currentComm\\\": 0.01925174,\\n" - + " \\\"unrealisedCost\\\": 67.4309,\\n" - + " \\\"realisedGrossCost\\\": 0.0,\\n" - + " \\\"realisedCost\\\": 0.01925174,\\n" - + " \\\"isOpen\\\": true,\\n" - + " \\\"markPrice\\\": 68900.7,\\n" - + " \\\"markValue\\\": 68.9007,\\n" - + " \\\"posCost\\\": 67.4309,\\n" - + " \\\"posCross\\\": 0.01645214,\\n" - + " \\\"posCrossMargin\\\": 0,\\n" - + " \\\"posInit\\\": 22.4769666644,\\n" - + " \\\"posComm\\\": 0.0539546299,\\n" - + " \\\"posCommCommon\\\": 0.0539447199,\\n" - + " \\\"posLoss\\\": 0.03766885,\\n" - + " \\\"posMargin\\\": 22.5097045843,\\n" - + " \\\"posFunding\\\": -0.0212068,\\n" - + " \\\"posMaint\\\": 0.3931320569,\\n" - + " \\\"maintMargin\\\": 23.9795045843,\\n" - + " \\\"realisedGrossPnl\\\": 0.0,\\n" - + " \\\"realisedPnl\\\": -0.06166534,\\n" - + " \\\"unrealisedPnl\\\": 1.4698,\\n" - + " \\\"unrealisedPnlPcnt\\\": 0.0218,\\n" - + " \\\"unrealisedRoePcnt\\\": 0.0654,\\n" - + " \\\"avgEntryPrice\\\": 67430.9,\\n" - + " \\\"liquidationPrice\\\": 45314.33,\\n" - + " \\\"bankruptPrice\\\": 44975.16,\\n" - + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"maintainMargin\\\": 0.005,\\n" - + " \\\"riskLimitLevel\\\": 2,\\n" - + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" - + " \\\"positionSide\\\": \\\"BOTH\\\",\\n" - + " \\\"leverage\\\": 2.88\\n" - + " }\\n" - + "}\\n"; + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"500000000000988255\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"autoDeposit\": false,\n" + + " \"crossMode\": false,\n" + + " \"maintMarginReq\": 0.005,\n" + + " \"riskLimit\": 500000,\n" + + " \"realLeverage\": 2.88,\n" + + " \"delevPercentage\": 0.18,\n" + + " \"openingTimestamp\": 1729155616322,\n" + + " \"currentTimestamp\": 1729482542135,\n" + + " \"currentQty\": 1,\n" + + " \"currentCost\": 67.4309,\n" + + " \"currentComm\": 0.01925174,\n" + + " \"unrealisedCost\": 67.4309,\n" + + " \"realisedGrossCost\": 0.0,\n" + + " \"realisedCost\": 0.01925174,\n" + + " \"isOpen\": true,\n" + + " \"markPrice\": 68900.7,\n" + + " \"markValue\": 68.9007,\n" + + " \"posCost\": 67.4309,\n" + + " \"posCross\": 0.01645214,\n" + + " \"posCrossMargin\": 0,\n" + + " \"posInit\": 22.4769666644,\n" + + " \"posComm\": 0.0539546299,\n" + + " \"posCommCommon\": 0.0539447199,\n" + + " \"posLoss\": 0.03766885,\n" + + " \"posMargin\": 22.5097045843,\n" + + " \"posFunding\": -0.0212068,\n" + + " \"posMaint\": 0.3931320569,\n" + + " \"maintMargin\": 23.9795045843,\n" + + " \"realisedGrossPnl\": 0.0,\n" + + " \"realisedPnl\": -0.06166534,\n" + + " \"unrealisedPnl\": 1.4698,\n" + + " \"unrealisedPnlPcnt\": 0.0218,\n" + + " \"unrealisedRoePcnt\": 0.0654,\n" + + " \"avgEntryPrice\": 67430.9,\n" + + " \"liquidationPrice\": 45314.33,\n" + + " \"bankruptPrice\": 44975.16,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"maintainMargin\": 0.005,\n" + + " \"riskLimitLevel\": 2,\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"positionSide\": \"BOTH\",\n" + + " \"leverage\": 2.88\n" + + " }\n" + + "}\n"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** getPositionList Request Get Position List /api/v1/positions */ public static void testGetPositionListRequest() throws Exception { - String data = "{\\\"currency\\\": \\\"USDT\\\"}"; + String data = "{\"currency\": \"USDT\"}"; GetPositionListReq obj = mapper.readValue(data, GetPositionListReq.class); } /** getPositionList Response Get Position List /api/v1/positions */ public static void testGetPositionListResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"500000000001046430\\\",\\n" - + " \\\"symbol\\\": \\\"ETHUSDM\\\",\\n" - + " \\\"crossMode\\\": true,\\n" - + " \\\"delevPercentage\\\": 0.71,\\n" - + " \\\"openingTimestamp\\\": 1730635780702,\\n" - + " \\\"currentTimestamp\\\": 1730636040926,\\n" - + " \\\"currentQty\\\": 1,\\n" - + " \\\"currentCost\\\": -4.069805E-4,\\n" - + " \\\"currentComm\\\": 2.441E-7,\\n" - + " \\\"unrealisedCost\\\": -4.069805E-4,\\n" - + " \\\"realisedGrossCost\\\": 0.0,\\n" - + " \\\"realisedCost\\\": 2.441E-7,\\n" - + " \\\"isOpen\\\": true,\\n" - + " \\\"markPrice\\\": 2454.12,\\n" - + " \\\"markValue\\\": -4.07478E-4,\\n" - + " \\\"posCost\\\": -4.069805E-4,\\n" - + " \\\"posInit\\\": 4.06981E-5,\\n" - + " \\\"posMargin\\\": 4.07478E-5,\\n" - + " \\\"realisedGrossPnl\\\": 0.0,\\n" - + " \\\"realisedPnl\\\": -2.441E-7,\\n" - + " \\\"unrealisedPnl\\\": -4.975E-7,\\n" - + " \\\"unrealisedPnlPcnt\\\": -0.0012,\\n" - + " \\\"unrealisedRoePcnt\\\": -0.0122,\\n" - + " \\\"avgEntryPrice\\\": 2457.12,\\n" - + " \\\"liquidationPrice\\\": 1429.96,\\n" - + " \\\"bankruptPrice\\\": 1414.96,\\n" - + " \\\"settleCurrency\\\": \\\"ETH\\\",\\n" - + " \\\"isInverse\\\": true,\\n" - + " \\\"marginMode\\\": \\\"CROSS\\\",\\n" - + " \\\"positionSide\\\": \\\"BOTH\\\",\\n" - + " \\\"leverage\\\": 10\\n" - + " },\\n" - + " {\\n" - + " \\\"id\\\": \\\"500000000000988255\\\",\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"autoDeposit\\\": true,\\n" - + " \\\"crossMode\\\": false,\\n" - + " \\\"maintMarginReq\\\": 0.005,\\n" - + " \\\"riskLimit\\\": 500000,\\n" - + " \\\"realLeverage\\\": 2.97,\\n" - + " \\\"delevPercentage\\\": 0.5,\\n" - + " \\\"openingTimestamp\\\": 1729155616322,\\n" - + " \\\"currentTimestamp\\\": 1730636040926,\\n" - + " \\\"currentQty\\\": 1,\\n" - + " \\\"currentCost\\\": 67.4309,\\n" - + " \\\"currentComm\\\": -0.15936162,\\n" - + " \\\"unrealisedCost\\\": 67.4309,\\n" - + " \\\"realisedGrossCost\\\": 0.0,\\n" - + " \\\"realisedCost\\\": -0.15936162,\\n" - + " \\\"isOpen\\\": true,\\n" - + " \\\"markPrice\\\": 68323.06,\\n" - + " \\\"markValue\\\": 68.32306,\\n" - + " \\\"posCost\\\": 67.4309,\\n" - + " \\\"posCross\\\": 0.06225152,\\n" - + " \\\"posCrossMargin\\\": 0,\\n" - + " \\\"posInit\\\": 22.2769666644,\\n" - + " \\\"posComm\\\": 0.0539821899,\\n" - + " \\\"posCommCommon\\\": 0.0539447199,\\n" - + " \\\"posLoss\\\": 0.26210915,\\n" - + " \\\"posMargin\\\": 22.1310912243,\\n" - + " \\\"posFunding\\\": -0.19982016,\\n" - + " \\\"posMaint\\\": 0.4046228699,\\n" - + " \\\"maintMargin\\\": 23.0232512243,\\n" - + " \\\"realisedGrossPnl\\\": 0.0,\\n" - + " \\\"realisedPnl\\\": -0.2402787,\\n" - + " \\\"unrealisedPnl\\\": 0.89216,\\n" - + " \\\"unrealisedPnlPcnt\\\": 0.0132,\\n" - + " \\\"unrealisedRoePcnt\\\": 0.04,\\n" - + " \\\"avgEntryPrice\\\": 67430.9,\\n" - + " \\\"liquidationPrice\\\": 45704.44,\\n" - + " \\\"bankruptPrice\\\": 45353.8,\\n" - + " \\\"settleCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"isInverse\\\": false,\\n" - + " \\\"maintainMargin\\\": 0.005,\\n" - + " \\\"marginMode\\\": \\\"ISOLATED\\\",\\n" - + " \\\"positionSide\\\": \\\"BOTH\\\",\\n" - + " \\\"leverage\\\": 2.97\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"500000000001046430\",\n" + + " \"symbol\": \"ETHUSDM\",\n" + + " \"crossMode\": true,\n" + + " \"delevPercentage\": 0.71,\n" + + " \"openingTimestamp\": 1730635780702,\n" + + " \"currentTimestamp\": 1730636040926,\n" + + " \"currentQty\": 1,\n" + + " \"currentCost\": -4.069805E-4,\n" + + " \"currentComm\": 2.441E-7,\n" + + " \"unrealisedCost\": -4.069805E-4,\n" + + " \"realisedGrossCost\": 0.0,\n" + + " \"realisedCost\": 2.441E-7,\n" + + " \"isOpen\": true,\n" + + " \"markPrice\": 2454.12,\n" + + " \"markValue\": -4.07478E-4,\n" + + " \"posCost\": -4.069805E-4,\n" + + " \"posInit\": 4.06981E-5,\n" + + " \"posMargin\": 4.07478E-5,\n" + + " \"realisedGrossPnl\": 0.0,\n" + + " \"realisedPnl\": -2.441E-7,\n" + + " \"unrealisedPnl\": -4.975E-7,\n" + + " \"unrealisedPnlPcnt\": -0.0012,\n" + + " \"unrealisedRoePcnt\": -0.0122,\n" + + " \"avgEntryPrice\": 2457.12,\n" + + " \"liquidationPrice\": 1429.96,\n" + + " \"bankruptPrice\": 1414.96,\n" + + " \"settleCurrency\": \"ETH\",\n" + + " \"isInverse\": true,\n" + + " \"marginMode\": \"CROSS\",\n" + + " \"positionSide\": \"BOTH\",\n" + + " \"leverage\": 10\n" + + " },\n" + + " {\n" + + " \"id\": \"500000000000988255\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"autoDeposit\": true,\n" + + " \"crossMode\": false,\n" + + " \"maintMarginReq\": 0.005,\n" + + " \"riskLimit\": 500000,\n" + + " \"realLeverage\": 2.97,\n" + + " \"delevPercentage\": 0.5,\n" + + " \"openingTimestamp\": 1729155616322,\n" + + " \"currentTimestamp\": 1730636040926,\n" + + " \"currentQty\": 1,\n" + + " \"currentCost\": 67.4309,\n" + + " \"currentComm\": -0.15936162,\n" + + " \"unrealisedCost\": 67.4309,\n" + + " \"realisedGrossCost\": 0.0,\n" + + " \"realisedCost\": -0.15936162,\n" + + " \"isOpen\": true,\n" + + " \"markPrice\": 68323.06,\n" + + " \"markValue\": 68.32306,\n" + + " \"posCost\": 67.4309,\n" + + " \"posCross\": 0.06225152,\n" + + " \"posCrossMargin\": 0,\n" + + " \"posInit\": 22.2769666644,\n" + + " \"posComm\": 0.0539821899,\n" + + " \"posCommCommon\": 0.0539447199,\n" + + " \"posLoss\": 0.26210915,\n" + + " \"posMargin\": 22.1310912243,\n" + + " \"posFunding\": -0.19982016,\n" + + " \"posMaint\": 0.4046228699,\n" + + " \"maintMargin\": 23.0232512243,\n" + + " \"realisedGrossPnl\": 0.0,\n" + + " \"realisedPnl\": -0.2402787,\n" + + " \"unrealisedPnl\": 0.89216,\n" + + " \"unrealisedPnlPcnt\": 0.0132,\n" + + " \"unrealisedRoePcnt\": 0.04,\n" + + " \"avgEntryPrice\": 67430.9,\n" + + " \"liquidationPrice\": 45704.44,\n" + + " \"bankruptPrice\": 45353.8,\n" + + " \"settleCurrency\": \"USDT\",\n" + + " \"isInverse\": false,\n" + + " \"maintainMargin\": 0.005,\n" + + " \"marginMode\": \"ISOLATED\",\n" + + " \"positionSide\": \"BOTH\",\n" + + " \"leverage\": 2.97\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -271,48 +271,48 @@ public static void testGetPositionListResponse() throws Exception { /** getPositionsHistory Request Get Positions History /api/v1/history-positions */ public static void testGetPositionsHistoryRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"example_string_default_value\\\", \\\"from\\\": 123456, \\\"to\\\":" - + " 123456, \\\"limit\\\": 10, \\\"pageId\\\": 1}"; + "{\"symbol\": \"example_string_default_value\", \"from\": 123456, \"to\": 123456," + + " \"limit\": 10, \"pageId\": 1}"; GetPositionsHistoryReq obj = mapper.readValue(data, GetPositionsHistoryReq.class); } /** getPositionsHistory Response Get Positions History /api/v1/history-positions */ public static void testGetPositionsHistoryResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -320,33 +320,32 @@ public static void testGetPositionsHistoryResponse() throws Exception { /** getMaxWithdrawMargin Request Get Max Withdraw Margin /api/v1/margin/maxWithdrawMargin */ public static void testGetMaxWithdrawMarginRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"example_string_default_value\\\"}"; + String data = "{\"symbol\": \"example_string_default_value\"}"; GetMaxWithdrawMarginReq obj = mapper.readValue(data, GetMaxWithdrawMarginReq.class); } /** getMaxWithdrawMargin Response Get Max Withdraw Margin /api/v1/margin/maxWithdrawMargin */ public static void testGetMaxWithdrawMarginResponse() throws Exception { - String data = - "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": \\\"21.1135719252\\\"\\n}"; + String data = "{\n \"code\": \"200000\",\n \"data\": \"21.1135719252\"\n}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** getCrossMarginLeverage Request Get Cross Margin Leverage /api/v2/getCrossUserLeverage */ public static void testGetCrossMarginLeverageRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\"}"; GetCrossMarginLeverageReq obj = mapper.readValue(data, GetCrossMarginLeverageReq.class); } /** getCrossMarginLeverage Response Get Cross Margin Leverage /api/v2/getCrossUserLeverage */ public static void testGetCrossMarginLeverageResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"leverage\\\": \\\"3\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"leverage\": \"3\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -354,68 +353,67 @@ public static void testGetCrossMarginLeverageResponse() throws Exception { /** modifyMarginLeverage Request Modify Cross Margin Leverage /api/v2/changeCrossUserLeverage */ public static void testModifyMarginLeverageRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": \\\"10\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\", \"leverage\": \"10\"}"; ModifyMarginLeverageReq obj = mapper.readValue(data, ModifyMarginLeverageReq.class); } /** modifyMarginLeverage Response Modify Cross Margin Leverage /api/v2/changeCrossUserLeverage */ public static void testModifyMarginLeverageResponse() throws Exception { - String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": true\\n}"; + String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** addIsolatedMargin Request Add Isolated Margin /api/v1/position/margin/deposit-margin */ public static void testAddIsolatedMarginRequest() throws Exception { - String data = - "{\\\"symbol\\\": \\\"string\\\", \\\"margin\\\": 0, \\\"bizNo\\\": \\\"string\\\"}"; + String data = "{\"symbol\": \"string\", \"margin\": 0, \"bizNo\": \"string\"}"; AddIsolatedMarginReq obj = mapper.readValue(data, AddIsolatedMarginReq.class); } /** addIsolatedMargin Response Add Isolated Margin /api/v1/position/margin/deposit-margin */ public static void testAddIsolatedMarginResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"id\\\": \\\"6200c9b83aecfb000152ddcd\\\",\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"autoDeposit\\\": false,\\n" - + " \\\"maintMarginReq\\\": 0.005,\\n" - + " \\\"riskLimit\\\": 500000,\\n" - + " \\\"realLeverage\\\": 18.72,\\n" - + " \\\"crossMode\\\": false,\\n" - + " \\\"delevPercentage\\\": 0.66,\\n" - + " \\\"openingTimestamp\\\": 1646287090131,\\n" - + " \\\"currentTimestamp\\\": 1646295055021,\\n" - + " \\\"currentQty\\\": 1,\\n" - + " \\\"currentCost\\\": 43.388,\\n" - + " \\\"currentComm\\\": 0.0260328,\\n" - + " \\\"unrealisedCost\\\": 43.388,\\n" - + " \\\"realisedGrossCost\\\": 0,\\n" - + " \\\"realisedCost\\\": 0.0260328,\\n" - + " \\\"isOpen\\\": true,\\n" - + " \\\"markPrice\\\": 43536.65,\\n" - + " \\\"markValue\\\": 43.53665,\\n" - + " \\\"posCost\\\": 43.388,\\n" - + " \\\"posCross\\\": 0.000024985,\\n" - + " \\\"posInit\\\": 2.1694,\\n" - + " \\\"posComm\\\": 0.02733446,\\n" - + " \\\"posLoss\\\": 0,\\n" - + " \\\"posMargin\\\": 2.19675944,\\n" - + " \\\"posMaint\\\": 0.24861326,\\n" - + " \\\"maintMargin\\\": 2.34540944,\\n" - + " \\\"realisedGrossPnl\\\": 0,\\n" - + " \\\"realisedPnl\\\": -0.0260328,\\n" - + " \\\"unrealisedPnl\\\": 0.14865,\\n" - + " \\\"unrealisedPnlPcnt\\\": 0.0034,\\n" - + " \\\"unrealisedRoePcnt\\\": 0.0685,\\n" - + " \\\"avgEntryPrice\\\": 43388,\\n" - + " \\\"liquidationPrice\\\": 41440,\\n" - + " \\\"bankruptPrice\\\": 41218,\\n" - + " \\\"userId\\\": 1234321123,\\n" - + " \\\"settleCurrency\\\": \\\"USDT\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"6200c9b83aecfb000152ddcd\",\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"autoDeposit\": false,\n" + + " \"maintMarginReq\": 0.005,\n" + + " \"riskLimit\": 500000,\n" + + " \"realLeverage\": 18.72,\n" + + " \"crossMode\": false,\n" + + " \"delevPercentage\": 0.66,\n" + + " \"openingTimestamp\": 1646287090131,\n" + + " \"currentTimestamp\": 1646295055021,\n" + + " \"currentQty\": 1,\n" + + " \"currentCost\": 43.388,\n" + + " \"currentComm\": 0.0260328,\n" + + " \"unrealisedCost\": 43.388,\n" + + " \"realisedGrossCost\": 0,\n" + + " \"realisedCost\": 0.0260328,\n" + + " \"isOpen\": true,\n" + + " \"markPrice\": 43536.65,\n" + + " \"markValue\": 43.53665,\n" + + " \"posCost\": 43.388,\n" + + " \"posCross\": 0.000024985,\n" + + " \"posInit\": 2.1694,\n" + + " \"posComm\": 0.02733446,\n" + + " \"posLoss\": 0,\n" + + " \"posMargin\": 2.19675944,\n" + + " \"posMaint\": 0.24861326,\n" + + " \"maintMargin\": 2.34540944,\n" + + " \"realisedGrossPnl\": 0,\n" + + " \"realisedPnl\": -0.0260328,\n" + + " \"unrealisedPnl\": 0.14865,\n" + + " \"unrealisedPnlPcnt\": 0.0034,\n" + + " \"unrealisedRoePcnt\": 0.0685,\n" + + " \"avgEntryPrice\": 43388,\n" + + " \"liquidationPrice\": 41440,\n" + + " \"bankruptPrice\": 41218,\n" + + " \"userId\": 1234321123,\n" + + " \"settleCurrency\": \"USDT\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -423,13 +421,13 @@ public static void testAddIsolatedMarginResponse() throws Exception { /** removeIsolatedMargin Request Remove Isolated Margin /api/v1/margin/withdrawMargin */ public static void testRemoveIsolatedMarginRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"withdrawAmount\\\": \\\"0.0000001\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\", \"withdrawAmount\": \"0.0000001\"}"; RemoveIsolatedMarginReq obj = mapper.readValue(data, RemoveIsolatedMarginReq.class); } /** removeIsolatedMargin Response Remove Isolated Margin /api/v1/margin/withdrawMargin */ public static void testRemoveIsolatedMarginResponse() throws Exception { - String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": \\\"0.1\\\"\\n}"; + String data = "{\n \"code\": \"200000\",\n \"data\": \"0.1\"\n}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -437,8 +435,8 @@ public static void testRemoveIsolatedMarginResponse() throws Exception { /** getCrossMarginRiskLimit Request Get Cross Margin Risk Limit /api/v2/batchGetCrossOrderLimit */ public static void testGetCrossMarginRiskLimitRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"totalMargin\\\":" - + " \\\"example_string_default_value\\\", \\\"leverage\\\": 123456}"; + "{\"symbol\": \"XBTUSDTM\", \"totalMargin\": \"example_string_default_value\"," + + " \"leverage\": 123456}"; GetCrossMarginRiskLimitReq obj = mapper.readValue(data, GetCrossMarginRiskLimitReq.class); } @@ -447,32 +445,32 @@ public static void testGetCrossMarginRiskLimitRequest() throws Exception { */ public static void testGetCrossMarginRiskLimitResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"maxOpenSize\\\": 12102,\\n" - + " \\\"maxOpenValue\\\": \\\"1234549.2240000000\\\",\\n" - + " \\\"totalMargin\\\": \\\"10000\\\",\\n" - + " \\\"price\\\": \\\"102012\\\",\\n" - + " \\\"leverage\\\": \\\"125.00\\\",\\n" - + " \\\"mmr\\\": \\\"0.00416136\\\",\\n" - + " \\\"imr\\\": \\\"0.008\\\",\\n" - + " \\\"currency\\\": \\\"USDT\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"ETHUSDTM\\\",\\n" - + " \\\"maxOpenSize\\\": 38003,\\n" - + " \\\"maxOpenValue\\\": \\\"971508.6920000000\\\",\\n" - + " \\\"totalMargin\\\": \\\"10000\\\",\\n" - + " \\\"price\\\": \\\"2556.4\\\",\\n" - + " \\\"leverage\\\": \\\"100.00\\\",\\n" - + " \\\"mmr\\\": \\\"0.0054623236\\\",\\n" - + " \\\"imr\\\": \\\"0.01\\\",\\n" - + " \\\"currency\\\": \\\"USDT\\\"\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"maxOpenSize\": 12102,\n" + + " \"maxOpenValue\": \"1234549.2240000000\",\n" + + " \"totalMargin\": \"10000\",\n" + + " \"price\": \"102012\",\n" + + " \"leverage\": \"125.00\",\n" + + " \"mmr\": \"0.00416136\",\n" + + " \"imr\": \"0.008\",\n" + + " \"currency\": \"USDT\"\n" + + " },\n" + + " {\n" + + " \"symbol\": \"ETHUSDTM\",\n" + + " \"maxOpenSize\": 38003,\n" + + " \"maxOpenValue\": \"971508.6920000000\",\n" + + " \"totalMargin\": \"10000\",\n" + + " \"price\": \"2556.4\",\n" + + " \"leverage\": \"100.00\",\n" + + " \"mmr\": \"0.0054623236\",\n" + + " \"imr\": \"0.01\",\n" + + " \"currency\": \"USDT\"\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -483,7 +481,7 @@ public static void testGetCrossMarginRiskLimitResponse() throws Exception { * /api/v1/contracts/risk-limit/{symbol} */ public static void testGetIsolatedMarginRiskLimitRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}"; + String data = "{\"symbol\": \"XBTUSDTM\"}"; GetIsolatedMarginRiskLimitReq obj = mapper.readValue(data, GetIsolatedMarginRiskLimitReq.class); } @@ -493,118 +491,118 @@ public static void testGetIsolatedMarginRiskLimitRequest() throws Exception { */ public static void testGetIsolatedMarginRiskLimitResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"level\\\": 1,\\n" - + " \\\"maxRiskLimit\\\": 100000,\\n" - + " \\\"minRiskLimit\\\": 0,\\n" - + " \\\"maxLeverage\\\": 125,\\n" - + " \\\"initialMargin\\\": 0.008,\\n" - + " \\\"maintainMargin\\\": 0.004\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"level\\\": 2,\\n" - + " \\\"maxRiskLimit\\\": 500000,\\n" - + " \\\"minRiskLimit\\\": 100000,\\n" - + " \\\"maxLeverage\\\": 100,\\n" - + " \\\"initialMargin\\\": 0.01,\\n" - + " \\\"maintainMargin\\\": 0.005\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"level\\\": 3,\\n" - + " \\\"maxRiskLimit\\\": 1000000,\\n" - + " \\\"minRiskLimit\\\": 500000,\\n" - + " \\\"maxLeverage\\\": 75,\\n" - + " \\\"initialMargin\\\": 0.014,\\n" - + " \\\"maintainMargin\\\": 0.007\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"level\\\": 4,\\n" - + " \\\"maxRiskLimit\\\": 2000000,\\n" - + " \\\"minRiskLimit\\\": 1000000,\\n" - + " \\\"maxLeverage\\\": 50,\\n" - + " \\\"initialMargin\\\": 0.02,\\n" - + " \\\"maintainMargin\\\": 0.01\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"level\\\": 5,\\n" - + " \\\"maxRiskLimit\\\": 3000000,\\n" - + " \\\"minRiskLimit\\\": 2000000,\\n" - + " \\\"maxLeverage\\\": 30,\\n" - + " \\\"initialMargin\\\": 0.034,\\n" - + " \\\"maintainMargin\\\": 0.017\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"level\\\": 6,\\n" - + " \\\"maxRiskLimit\\\": 5000000,\\n" - + " \\\"minRiskLimit\\\": 3000000,\\n" - + " \\\"maxLeverage\\\": 20,\\n" - + " \\\"initialMargin\\\": 0.05,\\n" - + " \\\"maintainMargin\\\": 0.025\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"level\\\": 7,\\n" - + " \\\"maxRiskLimit\\\": 8000000,\\n" - + " \\\"minRiskLimit\\\": 5000000,\\n" - + " \\\"maxLeverage\\\": 10,\\n" - + " \\\"initialMargin\\\": 0.1,\\n" - + " \\\"maintainMargin\\\": 0.05\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"level\\\": 8,\\n" - + " \\\"maxRiskLimit\\\": 12000000,\\n" - + " \\\"minRiskLimit\\\": 8000000,\\n" - + " \\\"maxLeverage\\\": 5,\\n" - + " \\\"initialMargin\\\": 0.2,\\n" - + " \\\"maintainMargin\\\": 0.1\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"level\\\": 9,\\n" - + " \\\"maxRiskLimit\\\": 20000000,\\n" - + " \\\"minRiskLimit\\\": 12000000,\\n" - + " \\\"maxLeverage\\\": 4,\\n" - + " \\\"initialMargin\\\": 0.25,\\n" - + " \\\"maintainMargin\\\": 0.125\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"level\\\": 10,\\n" - + " \\\"maxRiskLimit\\\": 30000000,\\n" - + " \\\"minRiskLimit\\\": 20000000,\\n" - + " \\\"maxLeverage\\\": 3,\\n" - + " \\\"initialMargin\\\": 0.334,\\n" - + " \\\"maintainMargin\\\": 0.167\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"level\\\": 11,\\n" - + " \\\"maxRiskLimit\\\": 40000000,\\n" - + " \\\"minRiskLimit\\\": 30000000,\\n" - + " \\\"maxLeverage\\\": 2,\\n" - + " \\\"initialMargin\\\": 0.5,\\n" - + " \\\"maintainMargin\\\": 0.25\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n" - + " \\\"level\\\": 12,\\n" - + " \\\"maxRiskLimit\\\": 50000000,\\n" - + " \\\"minRiskLimit\\\": 40000000,\\n" - + " \\\"maxLeverage\\\": 1,\\n" - + " \\\"initialMargin\\\": 1.0,\\n" - + " \\\"maintainMargin\\\": 0.5\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 1,\n" + + " \"maxRiskLimit\": 100000,\n" + + " \"minRiskLimit\": 0,\n" + + " \"maxLeverage\": 125,\n" + + " \"initialMargin\": 0.008,\n" + + " \"maintainMargin\": 0.004\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 2,\n" + + " \"maxRiskLimit\": 500000,\n" + + " \"minRiskLimit\": 100000,\n" + + " \"maxLeverage\": 100,\n" + + " \"initialMargin\": 0.01,\n" + + " \"maintainMargin\": 0.005\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 3,\n" + + " \"maxRiskLimit\": 1000000,\n" + + " \"minRiskLimit\": 500000,\n" + + " \"maxLeverage\": 75,\n" + + " \"initialMargin\": 0.014,\n" + + " \"maintainMargin\": 0.007\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 4,\n" + + " \"maxRiskLimit\": 2000000,\n" + + " \"minRiskLimit\": 1000000,\n" + + " \"maxLeverage\": 50,\n" + + " \"initialMargin\": 0.02,\n" + + " \"maintainMargin\": 0.01\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 5,\n" + + " \"maxRiskLimit\": 3000000,\n" + + " \"minRiskLimit\": 2000000,\n" + + " \"maxLeverage\": 30,\n" + + " \"initialMargin\": 0.034,\n" + + " \"maintainMargin\": 0.017\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 6,\n" + + " \"maxRiskLimit\": 5000000,\n" + + " \"minRiskLimit\": 3000000,\n" + + " \"maxLeverage\": 20,\n" + + " \"initialMargin\": 0.05,\n" + + " \"maintainMargin\": 0.025\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 7,\n" + + " \"maxRiskLimit\": 8000000,\n" + + " \"minRiskLimit\": 5000000,\n" + + " \"maxLeverage\": 10,\n" + + " \"initialMargin\": 0.1,\n" + + " \"maintainMargin\": 0.05\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 8,\n" + + " \"maxRiskLimit\": 12000000,\n" + + " \"minRiskLimit\": 8000000,\n" + + " \"maxLeverage\": 5,\n" + + " \"initialMargin\": 0.2,\n" + + " \"maintainMargin\": 0.1\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 9,\n" + + " \"maxRiskLimit\": 20000000,\n" + + " \"minRiskLimit\": 12000000,\n" + + " \"maxLeverage\": 4,\n" + + " \"initialMargin\": 0.25,\n" + + " \"maintainMargin\": 0.125\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 10,\n" + + " \"maxRiskLimit\": 30000000,\n" + + " \"minRiskLimit\": 20000000,\n" + + " \"maxLeverage\": 3,\n" + + " \"initialMargin\": 0.334,\n" + + " \"maintainMargin\": 0.167\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 11,\n" + + " \"maxRiskLimit\": 40000000,\n" + + " \"minRiskLimit\": 30000000,\n" + + " \"maxLeverage\": 2,\n" + + " \"initialMargin\": 0.5,\n" + + " \"maintainMargin\": 0.25\n" + + " },\n" + + " {\n" + + " \"symbol\": \"XBTUSDTM\",\n" + + " \"level\": 12,\n" + + " \"maxRiskLimit\": 50000000,\n" + + " \"minRiskLimit\": 40000000,\n" + + " \"maxLeverage\": 1,\n" + + " \"initialMargin\": 1.0,\n" + + " \"maintainMargin\": 0.5\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue( @@ -616,7 +614,7 @@ public static void testGetIsolatedMarginRiskLimitResponse() throws Exception { * /api/v1/position/risk-limit-level/change */ public static void testModifyIsolatedMarginRiskLimtRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"level\\\": 2}"; + String data = "{\"symbol\": \"XBTUSDTM\", \"level\": 2}"; ModifyIsolatedMarginRiskLimtReq obj = mapper.readValue(data, ModifyIsolatedMarginRiskLimtReq.class); } @@ -626,7 +624,7 @@ public static void testModifyIsolatedMarginRiskLimtRequest() throws Exception { * /api/v1/position/risk-limit-level/change */ public static void testModifyIsolatedMarginRiskLimtResponse() throws Exception { - String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": true\\n}"; + String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; RestResponse resp = mapper.readValue( data, new TypeReference>() {}); @@ -637,7 +635,7 @@ public static void testModifyIsolatedMarginRiskLimtResponse() throws Exception { * /api/v1/position/margin/auto-deposit-status */ public static void testModifyAutoDepositStatusRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"status\\\": true}"; + String data = "{\"symbol\": \"XBTUSDTM\", \"status\": true}"; ModifyAutoDepositStatusReq obj = mapper.readValue(data, ModifyAutoDepositStatusReq.class); } @@ -646,7 +644,7 @@ public static void testModifyAutoDepositStatusRequest() throws Exception { * /api/v1/position/margin/auto-deposit-status */ public static void testModifyAutoDepositStatusResponse() throws Exception { - String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": true\\n}"; + String data = "{\n \"code\": \"200000\",\n \"data\": true\n}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -738,6 +736,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -759,6 +758,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApiAutoGeneratedTest.java index 7a80b602..3072410e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApiAutoGeneratedTest.java @@ -11,32 +11,34 @@ class CreditApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** getLoanMarket Request Get Loan Market /api/v3/project/list */ public static void testGetLoanMarketRequest() throws Exception { - String data = "{\\\"currency\\\": \\\"BTC\\\"}"; + String data = "{\"currency\": \"BTC\"}"; GetLoanMarketReq obj = mapper.readValue(data, GetLoanMarketReq.class); } /** getLoanMarket Response Get Loan Market /api/v3/project/list */ public static void testGetLoanMarketResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"currency\\\": \\\"BTC\\\",\\n" - + " \\\"purchaseEnable\\\": true,\\n" - + " \\\"redeemEnable\\\": true,\\n" - + " \\\"increment\\\": \\\"0.00000001\\\",\\n" - + " \\\"minPurchaseSize\\\": \\\"0.001\\\",\\n" - + " \\\"maxPurchaseSize\\\": \\\"40\\\",\\n" - + " \\\"interestIncrement\\\": \\\"0.0001\\\",\\n" - + " \\\"minInterestRate\\\": \\\"0.005\\\",\\n" - + " \\\"marketInterestRate\\\": \\\"0.005\\\",\\n" - + " \\\"maxInterestRate\\\": \\\"0.32\\\",\\n" - + " \\\"autoPurchaseEnable\\\": false\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"currency\": \"BTC\",\n" + + " \"purchaseEnable\": true,\n" + + " \"redeemEnable\": true,\n" + + " \"increment\": \"0.00000001\",\n" + + " \"minPurchaseSize\": \"0.001\",\n" + + " \"maxPurchaseSize\": \"40\",\n" + + " \"interestIncrement\": \"0.0001\",\n" + + " \"minInterestRate\": \"0.005\",\n" + + " \"marketInterestRate\": \"0.005\",\n" + + " \"maxInterestRate\": \"0.32\",\n" + + " \"autoPurchaseEnable\": false\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -47,7 +49,7 @@ public static void testGetLoanMarketResponse() throws Exception { * /api/v3/project/marketInterestRate */ public static void testGetLoanMarketInterestRateRequest() throws Exception { - String data = "{\\\"currency\\\": \\\"BTC\\\"}"; + String data = "{\"currency\": \"BTC\"}"; GetLoanMarketInterestRateReq obj = mapper.readValue(data, GetLoanMarketInterestRateReq.class); } @@ -57,18 +59,18 @@ public static void testGetLoanMarketInterestRateRequest() throws Exception { */ public static void testGetLoanMarketInterestRateResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"time\\\": \\\"202410170000\\\",\\n" - + " \\\"marketInterestRate\\\": \\\"0.005\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"time\\\": \\\"202410170100\\\",\\n" - + " \\\"marketInterestRate\\\": \\\"0.005\\\"\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"time\": \"202410170000\",\n" + + " \"marketInterestRate\": \"0.005\"\n" + + " },\n" + + " {\n" + + " \"time\": \"202410170100\",\n" + + " \"marketInterestRate\": \"0.005\"\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -76,20 +78,18 @@ public static void testGetLoanMarketInterestRateResponse() throws Exception { /** purchase Request Purchase /api/v3/purchase */ public static void testPurchaseRequest() throws Exception { - String data = - "{\\\"currency\\\": \\\"BTC\\\", \\\"size\\\": \\\"0.001\\\", \\\"interestRate\\\":" - + " \\\"0.1\\\"}"; + String data = "{\"currency\": \"BTC\", \"size\": \"0.001\", \"interestRate\": \"0.1\"}"; PurchaseReq obj = mapper.readValue(data, PurchaseReq.class); } /** purchase Response Purchase /api/v3/purchase */ public static void testPurchaseResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderNo\\\": \\\"671bafa804c26d000773c533\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderNo\": \"671bafa804c26d000773c533\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -98,14 +98,14 @@ public static void testPurchaseResponse() throws Exception { /** modifyPurchase Request Modify Purchase /api/v3/lend/purchase/update */ public static void testModifyPurchaseRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"BTC\\\", \\\"purchaseOrderNo\\\": \\\"671bafa804c26d000773c533\\\"," - + " \\\"interestRate\\\": \\\"0.09\\\"}"; + "{\"currency\": \"BTC\", \"purchaseOrderNo\": \"671bafa804c26d000773c533\"," + + " \"interestRate\": \"0.09\"}"; ModifyPurchaseReq obj = mapper.readValue(data, ModifyPurchaseReq.class); } /** modifyPurchase Response Modify Purchase /api/v3/lend/purchase/update */ public static void testModifyPurchaseResponse() throws Exception { - String data = "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": null\\n}"; + String data = "{\n \"code\": \"200000\",\n \"data\": null\n}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -113,35 +113,34 @@ public static void testModifyPurchaseResponse() throws Exception { /** getPurchaseOrders Request Get Purchase Orders /api/v3/purchase/orders */ public static void testGetPurchaseOrdersRequest() throws Exception { String data = - "{\\\"status\\\": \\\"DONE\\\", \\\"currency\\\": \\\"BTC\\\", \\\"purchaseOrderNo\\\":" - + " \\\"example_string_default_value\\\", \\\"currentPage\\\": 1, \\\"pageSize\\\":" - + " 50}"; + "{\"status\": \"DONE\", \"currency\": \"BTC\", \"purchaseOrderNo\":" + + " \"example_string_default_value\", \"currentPage\": 1, \"pageSize\": 50}"; GetPurchaseOrdersReq obj = mapper.readValue(data, GetPurchaseOrdersReq.class); } /** getPurchaseOrders Response Get Purchase Orders /api/v3/purchase/orders */ public static void testGetPurchaseOrdersResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"currentPage\\\": 1,\\n" - + " \\\"pageSize\\\": 10,\\n" - + " \\\"totalNum\\\": 1,\\n" - + " \\\"totalPage\\\": 1,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"currency\\\": \\\"BTC\\\",\\n" - + " \\\"purchaseOrderNo\\\": \\\"671bb15a3b3f930007880bae\\\",\\n" - + " \\\"purchaseSize\\\": \\\"0.001\\\",\\n" - + " \\\"matchSize\\\": \\\"0\\\",\\n" - + " \\\"interestRate\\\": \\\"0.1\\\",\\n" - + " \\\"incomeSize\\\": \\\"0\\\",\\n" - + " \\\"applyTime\\\": 1729868122172,\\n" - + " \\\"status\\\": \\\"PENDING\\\"\\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" + + " \"currency\": \"BTC\",\n" + + " \"purchaseOrderNo\": \"671bb15a3b3f930007880bae\",\n" + + " \"purchaseSize\": \"0.001\",\n" + + " \"matchSize\": \"0\",\n" + + " \"interestRate\": \"0.1\",\n" + + " \"incomeSize\": \"0\",\n" + + " \"applyTime\": 1729868122172,\n" + + " \"status\": \"PENDING\"\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -150,19 +149,19 @@ public static void testGetPurchaseOrdersResponse() throws Exception { /** redeem Request Redeem /api/v3/redeem */ public static void testRedeemRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"BTC\\\", \\\"size\\\": \\\"0.001\\\", \\\"purchaseOrderNo\\\":" - + " \\\"671bafa804c26d000773c533\\\"}"; + "{\"currency\": \"BTC\", \"size\": \"0.001\", \"purchaseOrderNo\":" + + " \"671bafa804c26d000773c533\"}"; RedeemReq obj = mapper.readValue(data, RedeemReq.class); } /** redeem Response Redeem /api/v3/redeem */ public static void testRedeemResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderNo\\\": \\\"671bafa804c26d000773c533\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderNo\": \"671bafa804c26d000773c533\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -171,34 +170,33 @@ public static void testRedeemResponse() throws Exception { /** getRedeemOrders Request Get Redeem Orders /api/v3/redeem/orders */ public static void testGetRedeemOrdersRequest() throws Exception { String data = - "{\\\"status\\\": \\\"DONE\\\", \\\"currency\\\": \\\"BTC\\\", \\\"redeemOrderNo\\\":" - + " \\\"example_string_default_value\\\", \\\"currentPage\\\": 1, \\\"pageSize\\\":" - + " 50}"; + "{\"status\": \"DONE\", \"currency\": \"BTC\", \"redeemOrderNo\":" + + " \"example_string_default_value\", \"currentPage\": 1, \"pageSize\": 50}"; GetRedeemOrdersReq obj = mapper.readValue(data, GetRedeemOrdersReq.class); } /** getRedeemOrders Response Get Redeem Orders /api/v3/redeem/orders */ public static void testGetRedeemOrdersResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"currentPage\\\": 1,\\n" - + " \\\"pageSize\\\": 10,\\n" - + " \\\"totalNum\\\": 1,\\n" - + " \\\"totalPage\\\": 1,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"currency\\\": \\\"BTC\\\",\\n" - + " \\\"purchaseOrderNo\\\": \\\"671bafa804c26d000773c533\\\",\\n" - + " \\\"redeemOrderNo\\\": \\\"671bb01004c26d000773c55c\\\",\\n" - + " \\\"redeemSize\\\": \\\"0.001\\\",\\n" - + " \\\"receiptSize\\\": \\\"0.001\\\",\\n" - + " \\\"applyTime\\\": null,\\n" - + " \\\"status\\\": \\\"DONE\\\"\\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" + + " \"currency\": \"BTC\",\n" + + " \"purchaseOrderNo\": \"671bafa804c26d000773c533\",\n" + + " \"redeemOrderNo\": \"671bb01004c26d000773c55c\",\n" + + " \"redeemSize\": \"0.001\",\n" + + " \"receiptSize\": \"0.001\",\n" + + " \"applyTime\": null,\n" + + " \"status\": \"DONE\"\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -227,6 +225,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -248,6 +247,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApiAutoGeneratedTest.java index 6228526b..85a30e35 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApiAutoGeneratedTest.java @@ -11,18 +11,20 @@ class DebitApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** borrow Request Borrow /api/v3/margin/borrow */ public static void testBorrowRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"USDT\\\", \\\"size\\\": 10, \\\"timeInForce\\\": \\\"FOK\\\"," - + " \\\"isIsolated\\\": false, \\\"isHf\\\": false}"; + "{\"currency\": \"USDT\", \"size\": 10, \"timeInForce\": \"FOK\", \"isIsolated\": false," + + " \"isHf\": false}"; BorrowReq obj = mapper.readValue(data, BorrowReq.class); } /** borrow Response Borrow /api/v3/margin/borrow */ public static void testBorrowResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"orderNo\\\":\\\"67187162c0d6990007717b15\\\",\\\"actualSize\\\":\\\"10\\\"}}"; + "{\"code\":\"200000\",\"data\":{\"orderNo\":\"67187162c0d6990007717b15\",\"actualSize\":\"10\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -30,45 +32,44 @@ public static void testBorrowResponse() throws Exception { /** getBorrowHistory Request Get Borrow History /api/v3/margin/borrow */ public static void testGetBorrowHistoryRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"BTC\\\", \\\"isIsolated\\\": true, \\\"symbol\\\":" - + " \\\"BTC-USDT\\\", \\\"orderNo\\\": \\\"example_string_default_value\\\"," - + " \\\"startTime\\\": 123456, \\\"endTime\\\": 123456, \\\"currentPage\\\": 1," - + " \\\"pageSize\\\": 50}"; + "{\"currency\": \"BTC\", \"isIsolated\": true, \"symbol\": \"BTC-USDT\", \"orderNo\":" + + " \"example_string_default_value\", \"startTime\": 123456, \"endTime\": 123456," + + " \"currentPage\": 1, \"pageSize\": 50}"; GetBorrowHistoryReq obj = mapper.readValue(data, GetBorrowHistoryReq.class); } /** getBorrowHistory Response Get Borrow History /api/v3/margin/borrow */ public static void testGetBorrowHistoryResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"timestamp\\\": 1729657580449,\\n" - + " \\\"currentPage\\\": 1,\\n" - + " \\\"pageSize\\\": 50,\\n" - + " \\\"totalNum\\\": 2,\\n" - + " \\\"totalPage\\\": 1,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"orderNo\\\": \\\"67187162c0d6990007717b15\\\",\\n" - + " \\\"symbol\\\": null,\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"size\\\": \\\"10\\\",\\n" - + " \\\"actualSize\\\": \\\"10\\\",\\n" - + " \\\"status\\\": \\\"SUCCESS\\\",\\n" - + " \\\"createdTime\\\": 1729655138000\\n" - + " },\\n" - + " {\\n" - + " \\\"orderNo\\\": \\\"67187155b088e70007149585\\\",\\n" - + " \\\"symbol\\\": null,\\n" - + " \\\"currency\\\": \\\"USDT\\\",\\n" - + " \\\"size\\\": \\\"0.1\\\",\\n" - + " \\\"actualSize\\\": \\\"0\\\",\\n" - + " \\\"status\\\": \\\"FAILED\\\",\\n" - + " \\\"createdTime\\\": 1729655125000\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"timestamp\": 1729657580449,\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 2,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"orderNo\": \"67187162c0d6990007717b15\",\n" + + " \"symbol\": null,\n" + + " \"currency\": \"USDT\",\n" + + " \"size\": \"10\",\n" + + " \"actualSize\": \"10\",\n" + + " \"status\": \"SUCCESS\",\n" + + " \"createdTime\": 1729655138000\n" + + " },\n" + + " {\n" + + " \"orderNo\": \"67187155b088e70007149585\",\n" + + " \"symbol\": null,\n" + + " \"currency\": \"USDT\",\n" + + " \"size\": \"0.1\",\n" + + " \"actualSize\": \"0\",\n" + + " \"status\": \"FAILED\",\n" + + " \"createdTime\": 1729655125000\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -76,14 +77,14 @@ public static void testGetBorrowHistoryResponse() throws Exception { /** repay Request Repay /api/v3/margin/repay */ public static void testRepayRequest() throws Exception { - String data = "{\\\"currency\\\": \\\"USDT\\\", \\\"size\\\": 10}"; + String data = "{\"currency\": \"USDT\", \"size\": 10}"; RepayReq obj = mapper.readValue(data, RepayReq.class); } /** repay Response Repay /api/v3/margin/repay */ public static void testRepayResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"timestamp\\\":1729655606816,\\\"orderNo\\\":\\\"671873361d5bd400075096ad\\\",\\\"actualSize\\\":\\\"10\\\"}}"; + "{\"code\":\"200000\",\"data\":{\"timestamp\":1729655606816,\"orderNo\":\"671873361d5bd400075096ad\",\"actualSize\":\"10\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -91,17 +92,16 @@ public static void testRepayResponse() throws Exception { /** getRepayHistory Request Get Repay History /api/v3/margin/repay */ public static void testGetRepayHistoryRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"BTC\\\", \\\"isIsolated\\\": true, \\\"symbol\\\":" - + " \\\"BTC-USDT\\\", \\\"orderNo\\\": \\\"example_string_default_value\\\"," - + " \\\"startTime\\\": 123456, \\\"endTime\\\": 123456, \\\"currentPage\\\": 1," - + " \\\"pageSize\\\": 50}"; + "{\"currency\": \"BTC\", \"isIsolated\": true, \"symbol\": \"BTC-USDT\", \"orderNo\":" + + " \"example_string_default_value\", \"startTime\": 123456, \"endTime\": 123456," + + " \"currentPage\": 1, \"pageSize\": 50}"; GetRepayHistoryReq obj = mapper.readValue(data, GetRepayHistoryReq.class); } /** getRepayHistory Response Get Repay History /api/v3/margin/repay */ public static void testGetRepayHistoryResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"timestamp\\\":1729663471891,\\\"currentPage\\\":1,\\\"pageSize\\\":50,\\\"totalNum\\\":1,\\\"totalPage\\\":1,\\\"items\\\":[{\\\"orderNo\\\":\\\"671873361d5bd400075096ad\\\",\\\"symbol\\\":null,\\\"currency\\\":\\\"USDT\\\",\\\"size\\\":\\\"10\\\",\\\"principal\\\":\\\"9.99986518\\\",\\\"interest\\\":\\\"0.00013482\\\",\\\"status\\\":\\\"SUCCESS\\\",\\\"createdTime\\\":1729655606000}]}}"; + "{\"code\":\"200000\",\"data\":{\"timestamp\":1729663471891,\"currentPage\":1,\"pageSize\":50,\"totalNum\":1,\"totalPage\":1,\"items\":[{\"orderNo\":\"671873361d5bd400075096ad\",\"symbol\":null,\"currency\":\"USDT\",\"size\":\"10\",\"principal\":\"9.99986518\",\"interest\":\"0.00013482\",\"status\":\"SUCCESS\",\"createdTime\":1729655606000}]}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -109,29 +109,28 @@ public static void testGetRepayHistoryResponse() throws Exception { /** getInterestHistory Request Get Interest History. /api/v3/margin/interest */ public static void testGetInterestHistoryRequest() throws Exception { String data = - "{\\\"currency\\\": \\\"BTC\\\", \\\"isIsolated\\\": true, \\\"symbol\\\":" - + " \\\"BTC-USDT\\\", \\\"startTime\\\": 123456, \\\"endTime\\\": 123456," - + " \\\"currentPage\\\": 1, \\\"pageSize\\\": 50}"; + "{\"currency\": \"BTC\", \"isIsolated\": true, \"symbol\": \"BTC-USDT\", \"startTime\":" + + " 123456, \"endTime\": 123456, \"currentPage\": 1, \"pageSize\": 50}"; GetInterestHistoryReq obj = mapper.readValue(data, GetInterestHistoryReq.class); } /** getInterestHistory Response Get Interest History. /api/v3/margin/interest */ public static void testGetInterestHistoryResponse() throws Exception { String 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}]}}"; + "{\"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}]}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** modifyLeverage Request Modify Leverage /api/v3/position/update-user-leverage */ public static void testModifyLeverageRequest() throws Exception { - String data = "{\\\"leverage\\\": \\\"5\\\"}"; + String data = "{\"leverage\": \"5\"}"; ModifyLeverageReq obj = mapper.readValue(data, ModifyLeverageReq.class); } /** modifyLeverage Response Modify Leverage /api/v3/position/update-user-leverage */ public static void testModifyLeverageResponse() throws Exception { - String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":null}"; + String data = "{\"code\":\"200000\",\"data\":null}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -155,6 +154,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -176,6 +176,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsAutoGeneratedTest.java index da67318d..7463472e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsAutoGeneratedTest.java @@ -14,7 +14,7 @@ class MarginPrivateWsAutoGeneratedTest { /** crossMarginPosition Get Cross Margin Position change /crossMarginPosition/margin/position */ public static void testCrossMarginPositionResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/margin/position\\\",\\\"subject\\\":\\\"debt.ratio\\\",\\\"type\\\":\\\"message\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\",\\\"data\\\":{\\\"debtRatio\\\":0,\\\"totalAsset\\\":0.00052431772284080000000,\\\"marginCoefficientTotalAsset\\\":\\\"0.0005243177228408\\\",\\\"totalDebt\\\":\\\"0\\\",\\\"assetList\\\":{\\\"BTC\\\":{\\\"total\\\":\\\"0.00002\\\",\\\"available\\\":\\\"0\\\",\\\"hold\\\":\\\"0.00002\\\"},\\\"USDT\\\":{\\\"total\\\":\\\"33.68855864\\\",\\\"available\\\":\\\"15.01916691\\\",\\\"hold\\\":\\\"18.66939173\\\"}},\\\"debtList\\\":{\\\"BTC\\\":\\\"0\\\",\\\"USDT\\\":\\\"0\\\"},\\\"timestamp\\\":1729912435657}}"; + "{\"topic\":\"/margin/position\",\"subject\":\"debt.ratio\",\"type\":\"message\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"debtRatio\":0,\"totalAsset\":0.00052431772284080000000,\"marginCoefficientTotalAsset\":\"0.0005243177228408\",\"totalDebt\":\"0\",\"assetList\":{\"BTC\":{\"total\":\"0.00002\",\"available\":\"0\",\"hold\":\"0.00002\"},\"USDT\":{\"total\":\"33.68855864\",\"available\":\"15.01916691\",\"hold\":\"18.66939173\"}},\"debtList\":{\"BTC\":\"0\",\"USDT\":\"0\"},\"timestamp\":1729912435657}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -25,7 +25,7 @@ public static void testCrossMarginPositionResponse() throws Exception { */ public static void testIsolatedMarginPositionResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/margin/isolatedPosition:BTC-USDT\\\",\\\"subject\\\":\\\"positionChange\\\",\\\"type\\\":\\\"message\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\",\\\"data\\\":{\\\"tag\\\":\\\"BTC-USDT\\\",\\\"status\\\":\\\"DEBT\\\",\\\"statusBizType\\\":\\\"DEFAULT_DEBT\\\",\\\"accumulatedPrincipal\\\":\\\"5.01\\\",\\\"changeAssets\\\":{\\\"BTC\\\":{\\\"total\\\":\\\"0.00043478\\\",\\\"hold\\\":\\\"0\\\",\\\"liabilityPrincipal\\\":\\\"0\\\",\\\"liabilityInterest\\\":\\\"0\\\"},\\\"USDT\\\":{\\\"total\\\":\\\"0.98092004\\\",\\\"hold\\\":\\\"0\\\",\\\"liabilityPrincipal\\\":\\\"26\\\",\\\"liabilityInterest\\\":\\\"0.00025644\\\"}},\\\"timestamp\\\":1730121097742}}"; + "{\"topic\":\"/margin/isolatedPosition:BTC-USDT\",\"subject\":\"positionChange\",\"type\":\"message\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"tag\":\"BTC-USDT\",\"status\":\"DEBT\",\"statusBizType\":\"DEFAULT_DEBT\",\"accumulatedPrincipal\":\"5.01\",\"changeAssets\":{\"BTC\":{\"total\":\"0.00043478\",\"hold\":\"0\",\"liabilityPrincipal\":\"0\",\"liabilityInterest\":\"0\"},\"USDT\":{\"total\":\"0.98092004\",\"hold\":\"0\",\"liabilityPrincipal\":\"26\",\"liabilityInterest\":\"0.00025644\"}},\"timestamp\":1730121097742}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsAutoGeneratedTest.java index 2e9eeaab..3f00bcc0 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsAutoGeneratedTest.java @@ -14,7 +14,7 @@ class MarginPublicWsAutoGeneratedTest { /** indexPrice Index Price /indexPrice/indicator/index:_symbol_,_symbol_ */ public static void testIndexPriceResponse() throws Exception { String data = - "{\\\"id\\\":\\\"5c24c5da03aa673885cd67a0\\\",\\\"type\\\":\\\"message\\\",\\\"topic\\\":\\\"/indicator/index:USDT-BTC\\\",\\\"subject\\\":\\\"tick\\\",\\\"data\\\":{\\\"symbol\\\":\\\"USDT-BTC\\\",\\\"granularity\\\":5000,\\\"timestamp\\\":1551770400000,\\\"value\\\":0.0001092}}"; + "{\"id\":\"5c24c5da03aa673885cd67a0\",\"type\":\"message\",\"topic\":\"/indicator/index:USDT-BTC\",\"subject\":\"tick\",\"data\":{\"symbol\":\"USDT-BTC\",\"granularity\":5000,\"timestamp\":1551770400000,\"value\":0.0001092}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -22,7 +22,7 @@ public static void testIndexPriceResponse() throws Exception { /** markPrice Mark Price /markPrice/indicator/markPrice:_symbol_,_symbol_ */ public static void testMarkPriceResponse() throws Exception { String data = - "{\\\"id\\\":\\\"5c24c5da03aa673885cd67aa\\\",\\\"type\\\":\\\"message\\\",\\\"topic\\\":\\\"/indicator/markPrice:USDT-BTC\\\",\\\"subject\\\":\\\"tick\\\",\\\"data\\\":{\\\"symbol\\\":\\\"USDT-BTC\\\",\\\"granularity\\\":5000,\\\"timestamp\\\":1551770400000,\\\"value\\\":0.0001093}}"; + "{\"id\":\"5c24c5da03aa673885cd67aa\",\"type\":\"message\",\"topic\":\"/indicator/markPrice:USDT-BTC\",\"subject\":\"tick\",\"data\":{\"symbol\":\"USDT-BTC\",\"granularity\":5000,\"timestamp\":1551770400000,\"value\":0.0001093}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiAutoGeneratedTest.java index 87ba433a..bb8d39f8 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiAutoGeneratedTest.java @@ -11,40 +11,42 @@ class MarketApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** getCrossMarginSymbols Request Get Symbols - Cross Margin /api/v3/margin/symbols */ public static void testGetCrossMarginSymbolsRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\"}"; GetCrossMarginSymbolsReq obj = mapper.readValue(data, GetCrossMarginSymbolsReq.class); } /** getCrossMarginSymbols Response Get Symbols - Cross Margin /api/v3/margin/symbols */ public static void testGetCrossMarginSymbolsResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"timestamp\\\": 1729665839353,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"name\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"enableTrading\\\": true,\\n" - + " \\\"market\\\": \\\"USDS\\\",\\n" - + " \\\"baseCurrency\\\": \\\"BTC\\\",\\n" - + " \\\"quoteCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"baseIncrement\\\": \\\"0.00000001\\\",\\n" - + " \\\"baseMinSize\\\": \\\"0.00001\\\",\\n" - + " \\\"baseMaxSize\\\": \\\"10000000000\\\",\\n" - + " \\\"quoteIncrement\\\": \\\"0.000001\\\",\\n" - + " \\\"quoteMinSize\\\": \\\"0.1\\\",\\n" - + " \\\"quoteMaxSize\\\": \\\"99999999\\\",\\n" - + " \\\"priceIncrement\\\": \\\"0.1\\\",\\n" - + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"priceLimitRate\\\": \\\"0.1\\\",\\n" - + " \\\"minFunds\\\": \\\"0.1\\\"\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"timestamp\": 1729665839353,\n" + + " \"items\": [\n" + + " {\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"name\": \"BTC-USDT\",\n" + + " \"enableTrading\": true,\n" + + " \"market\": \"USDS\",\n" + + " \"baseCurrency\": \"BTC\",\n" + + " \"quoteCurrency\": \"USDT\",\n" + + " \"baseIncrement\": \"0.00000001\",\n" + + " \"baseMinSize\": \"0.00001\",\n" + + " \"baseMaxSize\": \"10000000000\",\n" + + " \"quoteIncrement\": \"0.000001\",\n" + + " \"quoteMinSize\": \"0.1\",\n" + + " \"quoteMaxSize\": \"99999999\",\n" + + " \"priceIncrement\": \"0.1\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"priceLimitRate\": \"0.1\",\n" + + " \"minFunds\": \"0.1\"\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -52,25 +54,25 @@ public static void testGetCrossMarginSymbolsResponse() throws Exception { /** getETFInfo Request Get ETF Info /api/v3/etf/info */ public static void testGetETFInfoRequest() throws Exception { - String data = "{\\\"currency\\\": \\\"BTCUP\\\"}"; + String data = "{\"currency\": \"BTCUP\"}"; GetETFInfoReq obj = mapper.readValue(data, GetETFInfoReq.class); } /** getETFInfo Response Get ETF Info /api/v3/etf/info */ public static void testGetETFInfoResponse() throws Exception { String data = - "{\\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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -78,20 +80,20 @@ public static void testGetETFInfoResponse() throws Exception { /** getMarkPriceDetail Request Get Mark Price Detail /api/v1/mark-price/{symbol}/current */ public static void testGetMarkPriceDetailRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"USDT-BTC\\\"}"; + String data = "{\"symbol\": \"USDT-BTC\"}"; GetMarkPriceDetailReq obj = mapper.readValue(data, GetMarkPriceDetailReq.class); } /** getMarkPriceDetail Response Get Mark Price Detail /api/v1/mark-price/{symbol}/current */ public static void testGetMarkPriceDetailResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"symbol\\\": \\\"USDT-BTC\\\",\\n" - + " \\\"timePoint\\\": 1729676888000,\\n" - + " \\\"value\\\": 1.5045E-5\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbol\": \"USDT-BTC\",\n" + + " \"timePoint\": 1729676888000,\n" + + " \"value\": 1.5045E-5\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -105,191 +107,191 @@ public static void testGetMarginConfigRequest() throws Exception { /** getMarginConfig Response Get Margin Config /api/v1/margin/config */ public static void testGetMarginConfigResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -303,20 +305,20 @@ public static void testGetMarkPriceListRequest() throws Exception { /** getMarkPriceList Response Get Mark Price List /api/v3/mark-price/all-symbols */ public static void testGetMarkPriceListResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -330,26 +332,26 @@ public static void testGetIsolatedMarginSymbolsRequest() throws Exception { /** getIsolatedMarginSymbols Response Get Symbols - Isolated Margin /api/v1/isolated/symbols */ public static void testGetIsolatedMarginSymbolsResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"symbolName\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"baseCurrency\\\": \\\"BTC\\\",\\n" - + " \\\"quoteCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"maxLeverage\\\": 10,\\n" - + " \\\"flDebtRatio\\\": \\\"0.97\\\",\\n" - + " \\\"tradeEnable\\\": true,\\n" - + " \\\"autoRenewMaxDebtRatio\\\": \\\"0.96\\\",\\n" - + " \\\"baseBorrowEnable\\\": true,\\n" - + " \\\"quoteBorrowEnable\\\": true,\\n" - + " \\\"baseTransferInEnable\\\": true,\\n" - + " \\\"quoteTransferInEnable\\\": true,\\n" - + " \\\"baseBorrowCoefficient\\\": \\\"1\\\",\\n" - + " \\\"quoteBorrowCoefficient\\\": \\\"1\\\"\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"symbolName\": \"BTC-USDT\",\n" + + " \"baseCurrency\": \"BTC\",\n" + + " \"quoteCurrency\": \"USDT\",\n" + + " \"maxLeverage\": 10,\n" + + " \"flDebtRatio\": \"0.97\",\n" + + " \"tradeEnable\": true,\n" + + " \"autoRenewMaxDebtRatio\": \"0.96\",\n" + + " \"baseBorrowEnable\": true,\n" + + " \"quoteBorrowEnable\": true,\n" + + " \"baseTransferInEnable\": true,\n" + + " \"quoteTransferInEnable\": true,\n" + + " \"baseBorrowCoefficient\": \"1\",\n" + + " \"quoteBorrowCoefficient\": \"1\"\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -382,6 +384,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -403,6 +406,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApiAutoGeneratedTest.java index 8db19b65..b9e9f382 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApiAutoGeneratedTest.java @@ -11,27 +11,29 @@ class OrderApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** addOrder Request Add Order /api/v3/hf/margin/order */ public static void testAddOrderRequest() throws Exception { String 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\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493fb\", \"remark\":" + + " \"order remarks\"}"; AddOrderReq obj = mapper.readValue(data, AddOrderReq.class); } /** addOrder Response Add Order /api/v3/hf/margin/order */ public static void testAddOrderResponse() throws Exception { String data = - "{\\n" - + " \\\"success\\\": true,\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"671663e02188630007e21c9c\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e1493fb\\\",\\n" - + " \\\"borrowSize\\\": \\\"10.2\\\",\\n" - + " \\\"loanApplyId\\\": \\\"600656d9a33ac90009de4f6f\\\"\\n" - + " }\\n" + "{\n" + + " \"success\": true,\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"671663e02188630007e21c9c\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e1493fb\",\n" + + " \"borrowSize\": \"10.2\",\n" + + " \"loanApplyId\": \"600656d9a33ac90009de4f6f\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -40,24 +42,24 @@ public static void testAddOrderResponse() throws Exception { /** addOrderTest Request Add Order Test /api/v3/hf/margin/order/test */ public static void testAddOrderTestRequest() throws Exception { String 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\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493fb\", \"remark\":" + + " \"order remarks\"}"; AddOrderTestReq obj = mapper.readValue(data, AddOrderTestReq.class); } /** addOrderTest Response Add Order Test /api/v3/hf/margin/order/test */ public static void testAddOrderTestResponse() throws Exception { String data = - "{\\n" - + " \\\"success\\\": true,\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"5bd6e9286d99522a52e458de\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" - + " \\\"borrowSize\\\": 10.2,\\n" - + " \\\"loanApplyId\\\": \\\"600656d9a33ac90009de4f6f\\\"\\n" - + " }\\n" + "{\n" + + " \"success\": true,\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"5bd6e9286d99522a52e458de\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"borrowSize\": 10.2,\n" + + " \"loanApplyId\": \"600656d9a33ac90009de4f6f\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -65,15 +67,13 @@ public static void testAddOrderTestResponse() throws Exception { /** cancelOrderByOrderId Request Cancel Order By OrderId /api/v3/hf/margin/orders/{orderId} */ public static void testCancelOrderByOrderIdRequest() throws Exception { - String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"orderId\\\": \\\"671663e02188630007e21c9c\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\", \"orderId\": \"671663e02188630007e21c9c\"}"; CancelOrderByOrderIdReq obj = mapper.readValue(data, CancelOrderByOrderIdReq.class); } /** cancelOrderByOrderId Response Cancel Order By OrderId /api/v3/hf/margin/orders/{orderId} */ public static void testCancelOrderByOrderIdResponse() throws Exception { - String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"orderId\\\":\\\"671663e02188630007e21c9c\\\"}}"; + String data = "{\"code\":\"200000\",\"data\":{\"orderId\":\"671663e02188630007e21c9c\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -83,8 +83,7 @@ public static void testCancelOrderByOrderIdResponse() throws Exception { * /api/v3/hf/margin/orders/client-order/{clientOid} */ public static void testCancelOrderByClientOidRequest() throws Exception { - String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"clientOid\\\": \\\"5c52e11203aa677f33e1493fb\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e1493fb\"}"; CancelOrderByClientOidReq obj = mapper.readValue(data, CancelOrderByClientOidReq.class); } @@ -93,21 +92,20 @@ public static void testCancelOrderByClientOidRequest() throws Exception { * /api/v3/hf/margin/orders/client-order/{clientOid} */ public static void testCancelOrderByClientOidResponse() throws Exception { - String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"clientOid\\\":\\\"5c52e11203aa677f33e1493fb\\\"}}"; + String data = "{\"code\":\"200000\",\"data\":{\"clientOid\":\"5c52e11203aa677f33e1493fb\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** cancelAllOrdersBySymbol Request Cancel All Orders By Symbol /api/v3/hf/margin/orders */ public static void testCancelAllOrdersBySymbolRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"tradeType\\\": \\\"MARGIN_TRADE\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\", \"tradeType\": \"MARGIN_TRADE\"}"; CancelAllOrdersBySymbolReq obj = mapper.readValue(data, CancelAllOrdersBySymbolReq.class); } /** cancelAllOrdersBySymbol Response Cancel All Orders By Symbol /api/v3/hf/margin/orders */ public static void testCancelAllOrdersBySymbolResponse() throws Exception { - String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":\\\"success\\\"}"; + String data = "{\"code\":\"200000\",\"data\":\"success\"}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -117,7 +115,7 @@ public static void testCancelAllOrdersBySymbolResponse() throws Exception { * /api/v3/hf/margin/order/active/symbols */ public static void testGetSymbolsWithOpenOrderRequest() throws Exception { - String data = "{\\\"tradeType\\\": \\\"MARGIN_TRADE\\\"}"; + String data = "{\"tradeType\": \"MARGIN_TRADE\"}"; GetSymbolsWithOpenOrderReq obj = mapper.readValue(data, GetSymbolsWithOpenOrderReq.class); } @@ -127,14 +125,14 @@ public static void testGetSymbolsWithOpenOrderRequest() throws Exception { */ public static void testGetSymbolsWithOpenOrderResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"symbolSize\\\": 1,\\n" - + " \\\"symbols\\\": [\\n" - + " \\\"BTC-USDT\\\"\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbolSize\": 1,\n" + + " \"symbols\": [\n" + + " \"BTC-USDT\"\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -142,56 +140,56 @@ public static void testGetSymbolsWithOpenOrderResponse() throws Exception { /** getOpenOrders Request Get Open Orders /api/v3/hf/margin/orders/active */ public static void testGetOpenOrdersRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"tradeType\\\": \\\"MARGIN_TRADE\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\", \"tradeType\": \"MARGIN_TRADE\"}"; GetOpenOrdersReq obj = mapper.readValue(data, GetOpenOrdersReq.class); } /** getOpenOrders Response Get Open Orders /api/v3/hf/margin/orders/active */ public static void testGetOpenOrdersResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"671667306afcdb000723107f\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\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" - + " \\\"remainSize\\\": \\\"0.00001\\\",\\n" - + " \\\"remainFunds\\\": \\\"0.5\\\",\\n" - + " \\\"cancelledSize\\\": \\\"0\\\",\\n" - + " \\\"cancelledFunds\\\": \\\"0\\\",\\n" - + " \\\"fee\\\": \\\"0\\\",\\n" - + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"stp\\\": null,\\n" - + " \\\"stop\\\": null,\\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" - + " \\\"remark\\\": null,\\n" - + " \\\"tags\\\": null,\\n" - + " \\\"cancelExist\\\": false,\\n" - + " \\\"tradeType\\\": \\\"MARGIN_TRADE\\\",\\n" - + " \\\"inOrderBook\\\": true,\\n" - + " \\\"active\\\": true,\\n" - + " \\\"tax\\\": \\\"0\\\",\\n" - + " \\\"createdAt\\\": 1729521456248,\\n" - + " \\\"lastUpdatedAt\\\": 1729521460940\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"671667306afcdb000723107f\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\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" + + " \"remainSize\": \"0.00001\",\n" + + " \"remainFunds\": \"0.5\",\n" + + " \"cancelledSize\": \"0\",\n" + + " \"cancelledFunds\": \"0\",\n" + + " \"fee\": \"0\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"stp\": null,\n" + + " \"stop\": null,\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" + + " \"remark\": null,\n" + + " \"tags\": null,\n" + + " \"cancelExist\": false,\n" + + " \"tradeType\": \"MARGIN_TRADE\",\n" + + " \"inOrderBook\": true,\n" + + " \"active\": true,\n" + + " \"tax\": \"0\",\n" + + " \"createdAt\": 1729521456248,\n" + + " \"lastUpdatedAt\": 1729521460940\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -200,61 +198,61 @@ public static void testGetOpenOrdersResponse() throws Exception { /** getClosedOrders Request Get Closed Orders /api/v3/hf/margin/orders/done */ public static void testGetClosedOrdersRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"tradeType\\\": \\\"MARGIN_TRADE\\\", \\\"side\\\":" - + " \\\"buy\\\", \\\"type\\\": \\\"limit\\\", \\\"lastId\\\": 254062248624417," - + " \\\"limit\\\": 20, \\\"startAt\\\": 1728663338000, \\\"endAt\\\": 1728692138000}"; + "{\"symbol\": \"BTC-USDT\", \"tradeType\": \"MARGIN_TRADE\", \"side\": \"buy\", \"type\":" + + " \"limit\", \"lastId\": 254062248624417, \"limit\": 20, \"startAt\": 1728663338000," + + " \"endAt\": 1728692138000}"; GetClosedOrdersReq obj = mapper.readValue(data, GetClosedOrdersReq.class); } /** getClosedOrders Response Get Closed Orders /api/v3/hf/margin/orders/done */ public static void testGetClosedOrdersResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"lastId\\\": 136112949351,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"6716491f6afcdb00078365c8\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\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" - + " \\\"remainSize\\\": \\\"0\\\",\\n" - + " \\\"remainFunds\\\": \\\"0\\\",\\n" - + " \\\"cancelledSize\\\": \\\"0.00001\\\",\\n" - + " \\\"cancelledFunds\\\": \\\"0.5\\\",\\n" - + " \\\"fee\\\": \\\"0\\\",\\n" - + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"stp\\\": null,\\n" - + " \\\"stop\\\": null,\\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" - + " \\\"remark\\\": null,\\n" - + " \\\"tags\\\": null,\\n" - + " \\\"cancelExist\\\": true,\\n" - + " \\\"tradeType\\\": \\\"MARGIN_TRADE\\\",\\n" - + " \\\"inOrderBook\\\": false,\\n" - + " \\\"active\\\": false,\\n" - + " \\\"tax\\\": \\\"0\\\",\\n" - + " \\\"createdAt\\\": 1729513759162,\\n" - + " \\\"lastUpdatedAt\\\": 1729521126597\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"lastId\": 136112949351,\n" + + " \"items\": [\n" + + " {\n" + + " \"id\": \"6716491f6afcdb00078365c8\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\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" + + " \"remainSize\": \"0\",\n" + + " \"remainFunds\": \"0\",\n" + + " \"cancelledSize\": \"0.00001\",\n" + + " \"cancelledFunds\": \"0.5\",\n" + + " \"fee\": \"0\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"stp\": null,\n" + + " \"stop\": null,\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" + + " \"remark\": null,\n" + + " \"tags\": null,\n" + + " \"cancelExist\": true,\n" + + " \"tradeType\": \"MARGIN_TRADE\",\n" + + " \"inOrderBook\": false,\n" + + " \"active\": false,\n" + + " \"tax\": \"0\",\n" + + " \"createdAt\": 1729513759162,\n" + + " \"lastUpdatedAt\": 1729521126597\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -263,45 +261,45 @@ public static void testGetClosedOrdersResponse() throws Exception { /** getTradeHistory Request Get Trade History /api/v3/hf/margin/fills */ public static void testGetTradeHistoryRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"tradeType\\\": \\\"MARGIN_TRADE\\\"," - + " \\\"orderId\\\": \\\"example_string_default_value\\\", \\\"side\\\": \\\"buy\\\"," - + " \\\"type\\\": \\\"limit\\\", \\\"lastId\\\": 254062248624417, \\\"limit\\\": 100," - + " \\\"startAt\\\": 1728663338000, \\\"endAt\\\": 1728692138000}"; + "{\"symbol\": \"BTC-USDT\", \"tradeType\": \"MARGIN_TRADE\", \"orderId\":" + + " \"example_string_default_value\", \"side\": \"buy\", \"type\": \"limit\"," + + " \"lastId\": 254062248624417, \"limit\": 100, \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000}"; GetTradeHistoryReq obj = mapper.readValue(data, GetTradeHistoryReq.class); } /** getTradeHistory Response Get Trade History /api/v3/hf/margin/fills */ public static void testGetTradeHistoryResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"id\\\": 137891621991,\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"tradeId\\\": 11040911994273793,\\n" - + " \\\"orderId\\\": \\\"671868085584bc0007d85f46\\\",\\n" - + " \\\"counterOrderId\\\": \\\"67186805b7cbdf00071621f9\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"liquidity\\\": \\\"taker\\\",\\n" - + " \\\"forceTaker\\\": false,\\n" - + " \\\"price\\\": \\\"67141.6\\\",\\n" - + " \\\"size\\\": \\\"0.00001\\\",\\n" - + " \\\"funds\\\": \\\"0.671416\\\",\\n" - + " \\\"fee\\\": \\\"0.000671416\\\",\\n" - + " \\\"feeRate\\\": \\\"0.001\\\",\\n" - + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"stop\\\": \\\"\\\",\\n" - + " \\\"tradeType\\\": \\\"MARGIN_TRADE\\\",\\n" - + " \\\"tax\\\": \\\"0\\\",\\n" - + " \\\"taxRate\\\": \\\"0\\\",\\n" - + " \\\"type\\\": \\\"limit\\\",\\n" - + " \\\"createdAt\\\": 1729652744998\\n" - + " }\\n" - + " ],\\n" - + " \\\"lastId\\\": 137891621991\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"items\": [\n" + + " {\n" + + " \"id\": 137891621991,\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"tradeId\": 11040911994273793,\n" + + " \"orderId\": \"671868085584bc0007d85f46\",\n" + + " \"counterOrderId\": \"67186805b7cbdf00071621f9\",\n" + + " \"side\": \"buy\",\n" + + " \"liquidity\": \"taker\",\n" + + " \"forceTaker\": false,\n" + + " \"price\": \"67141.6\",\n" + + " \"size\": \"0.00001\",\n" + + " \"funds\": \"0.671416\",\n" + + " \"fee\": \"0.000671416\",\n" + + " \"feeRate\": \"0.001\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"stop\": \"\",\n" + + " \"tradeType\": \"MARGIN_TRADE\",\n" + + " \"tax\": \"0\",\n" + + " \"taxRate\": \"0\",\n" + + " \"type\": \"limit\",\n" + + " \"createdAt\": 1729652744998\n" + + " }\n" + + " ],\n" + + " \"lastId\": 137891621991\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -309,55 +307,54 @@ public static void testGetTradeHistoryResponse() throws Exception { /** getOrderByOrderId Request Get Order By OrderId /api/v3/hf/margin/orders/{orderId} */ public static void testGetOrderByOrderIdRequest() throws Exception { - String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"orderId\\\": \\\"671667306afcdb000723107f\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\", \"orderId\": \"671667306afcdb000723107f\"}"; GetOrderByOrderIdReq obj = mapper.readValue(data, GetOrderByOrderIdReq.class); } /** getOrderByOrderId Response Get Order By OrderId /api/v3/hf/margin/orders/{orderId} */ public static void testGetOrderByOrderIdResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"id\\\": \\\"671667306afcdb000723107f\\\",\\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" - + " \\\"stop\\\": null,\\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\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" - + " \\\"remark\\\": null,\\n" - + " \\\"tags\\\": null,\\n" - + " \\\"cancelExist\\\": false,\\n" - + " \\\"createdAt\\\": 1729521456248,\\n" - + " \\\"lastUpdatedAt\\\": 1729651011877,\\n" - + " \\\"tradeType\\\": \\\"MARGIN_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" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"671667306afcdb000723107f\",\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" + + " \"stop\": null,\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\": \"5c52e11203aa677f33e493fb\",\n" + + " \"remark\": null,\n" + + " \"tags\": null,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1729521456248,\n" + + " \"lastUpdatedAt\": 1729651011877,\n" + + " \"tradeType\": \"MARGIN_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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -368,8 +365,7 @@ public static void testGetOrderByOrderIdResponse() throws Exception { * /api/v3/hf/margin/orders/client-order/{clientOid} */ public static void testGetOrderByClientOidRequest() throws Exception { - String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e493fb\"}"; GetOrderByClientOidReq obj = mapper.readValue(data, GetOrderByClientOidReq.class); } @@ -379,47 +375,47 @@ public static void testGetOrderByClientOidRequest() throws Exception { */ public static void testGetOrderByClientOidResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"id\\\": \\\"671667306afcdb000723107f\\\",\\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" - + " \\\"stop\\\": null,\\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\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" - + " \\\"remark\\\": null,\\n" - + " \\\"tags\\\": null,\\n" - + " \\\"cancelExist\\\": false,\\n" - + " \\\"createdAt\\\": 1729521456248,\\n" - + " \\\"lastUpdatedAt\\\": 1729651011877,\\n" - + " \\\"tradeType\\\": \\\"MARGIN_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" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"671667306afcdb000723107f\",\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" + + " \"stop\": null,\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\": \"5c52e11203aa677f33e493fb\",\n" + + " \"remark\": null,\n" + + " \"tags\": null,\n" + + " \"cancelExist\": false,\n" + + " \"createdAt\": 1729521456248,\n" + + " \"lastUpdatedAt\": 1729651011877,\n" + + " \"tradeType\": \"MARGIN_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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -428,23 +424,23 @@ public static void testGetOrderByClientOidResponse() throws Exception { /** addOrderV1 Request Add Order - V1 /api/v1/margin/order */ public static void testAddOrderV1Request() throws Exception { String data = - "{\\\"type\\\": \\\"limit\\\", \\\"symbol\\\": \\\"BTC-USDT\\\", \\\"side\\\": \\\"buy\\\"," - + " \\\"price\\\": \\\"50000\\\", \\\"size\\\": \\\"0.00001\\\", \\\"clientOid\\\":" - + " \\\"5c52e11203aa677f33e4193fb\\\", \\\"remark\\\": \\\"order remarks\\\"}"; + "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e4193fb\", \"remark\":" + + " \"order remarks\"}"; AddOrderV1Req obj = mapper.readValue(data, AddOrderV1Req.class); } /** addOrderV1 Response Add Order - V1 /api/v1/margin/order */ public static void testAddOrderV1Response() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"671bb90194422f00073ff4f0\\\",\\n" - + " \\\"loanApplyId\\\": null,\\n" - + " \\\"borrowSize\\\": null,\\n" - + " \\\"clientOid\\\": null\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"671bb90194422f00073ff4f0\",\n" + + " \"loanApplyId\": null,\n" + + " \"borrowSize\": null,\n" + + " \"clientOid\": null\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -453,23 +449,23 @@ public static void testAddOrderV1Response() throws Exception { /** addOrderTestV1 Request Add Order Test - V1 /api/v1/margin/order/test */ public static void testAddOrderTestV1Request() throws Exception { String data = - "{\\\"type\\\": \\\"limit\\\", \\\"symbol\\\": \\\"BTC-USDT\\\", \\\"side\\\": \\\"buy\\\"," - + " \\\"price\\\": \\\"50000\\\", \\\"size\\\": \\\"0.00001\\\", \\\"clientOid\\\":" - + " \\\"5c52e11203aa677f33e4193fb\\\", \\\"remark\\\": \\\"order remarks\\\"}"; + "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e4193fb\", \"remark\":" + + " \"order remarks\"}"; AddOrderTestV1Req obj = mapper.readValue(data, AddOrderTestV1Req.class); } /** addOrderTestV1 Response Add Order Test - V1 /api/v1/margin/order/test */ public static void testAddOrderTestV1Response() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"671bb90194422f00073ff4f0\\\",\\n" - + " \\\"loanApplyId\\\": null,\\n" - + " \\\"borrowSize\\\": null,\\n" - + " \\\"clientOid\\\": null\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"671bb90194422f00073ff4f0\",\n" + + " \"loanApplyId\": null,\n" + + " \"borrowSize\": null,\n" + + " \"clientOid\": null\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -526,6 +522,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -547,6 +544,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApiAutoGeneratedTest.java index 64d4a3ec..92817e16 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApiAutoGeneratedTest.java @@ -11,35 +11,35 @@ class RiskLimitApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** getMarginRiskLimit Request Get Margin Risk Limit /api/v3/margin/currencies */ public static void testGetMarginRiskLimitRequest() throws Exception { - String data = - "{\\\"isIsolated\\\": true, \\\"currency\\\": \\\"BTC\\\", \\\"symbol\\\":" - + " \\\"BTC-USDT\\\"}"; + String data = "{\"isIsolated\": true, \"currency\": \"BTC\", \"symbol\": \"BTC-USDT\"}"; GetMarginRiskLimitReq obj = mapper.readValue(data, GetMarginRiskLimitReq.class); } /** getMarginRiskLimit Response Get Margin Risk Limit /api/v3/margin/currencies */ public static void testGetMarginRiskLimitResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"timestamp\\\": 1729678659275,\\n" - + " \\\"currency\\\": \\\"BTC\\\",\\n" - + " \\\"borrowMaxAmount\\\": \\\"75.15\\\",\\n" - + " \\\"buyMaxAmount\\\": \\\"217.12\\\",\\n" - + " \\\"holdMaxAmount\\\": \\\"217.12\\\",\\n" - + " \\\"borrowCoefficient\\\": \\\"1\\\",\\n" - + " \\\"marginCoefficient\\\": \\\"1\\\",\\n" - + " \\\"precision\\\": 8,\\n" - + " \\\"borrowMinAmount\\\": \\\"0.001\\\",\\n" - + " \\\"borrowMinUnit\\\": \\\"0.0001\\\",\\n" - + " \\\"borrowEnabled\\\": true\\n" - + " }\\n" - + " ]\\n" - + "}\\n"; + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"timestamp\": 1729678659275,\n" + + " \"currency\": \"BTC\",\n" + + " \"borrowMaxAmount\": \"75.15\",\n" + + " \"buyMaxAmount\": \"217.12\",\n" + + " \"holdMaxAmount\": \"217.12\",\n" + + " \"borrowCoefficient\": \"1\",\n" + + " \"marginCoefficient\": \"1\",\n" + + " \"precision\": 8,\n" + + " \"borrowMinAmount\": \"0.001\",\n" + + " \"borrowMinUnit\": \"0.0001\",\n" + + " \"borrowEnabled\": true\n" + + " }\n" + + " ]\n" + + "}\n"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -55,6 +55,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -76,6 +77,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java index 2e4371a2..3979e1b3 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java @@ -11,74 +11,74 @@ class MarketApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** getAnnouncements Request Get Announcements /api/v3/announcements */ public static void testGetAnnouncementsRequest() throws Exception { String data = - "{\\\"currentPage\\\": 1, \\\"pageSize\\\": 50, \\\"annType\\\":" - + " \\\"latest-announcements\\\", \\\"lang\\\": \\\"en_US\\\", \\\"startTime\\\":" - + " 1729594043000, \\\"endTime\\\": 1729697729000}"; + "{\"currentPage\": 1, \"pageSize\": 50, \"annType\": \"latest-announcements\", \"lang\":" + + " \"en_US\", \"startTime\": 1729594043000, \"endTime\": 1729697729000}"; GetAnnouncementsReq obj = mapper.readValue(data, GetAnnouncementsReq.class); } /** getAnnouncements Response Get Announcements /api/v3/announcements */ public static void testGetAnnouncementsResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"totalNum\\\": 195,\\n" - + " \\\"totalPage\\\": 13,\\n" - + " \\\"currentPage\\\": 1,\\n" - + " \\\"pageSize\\\": 15,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"annId\\\": 129045,\\n" - + " \\\"annTitle\\\": \\\"KuCoin Isolated Margin Adds the Scroll (SCR)" - + " Trading Pair\\\",\\n" - + " \\\"annType\\\": [\\n" - + " \\\"latest-announcements\\\"\\n" - + " ],\\n" - + " \\\"annDesc\\\": \\\"To enrich the variety of assets" - + " available,\\xa0KuCoin\\u2019s Isolated Margin Trading platform has added the Scroll" - + " (SCR)\\xa0asset and trading pair.\\\",\\n" - + " \\\"cTime\\\": 1729594043000,\\n" - + " \\\"language\\\": \\\"en_US\\\",\\n" - + " \\\"annUrl\\\":" - + " \\\"https://www.kucoin.com/announcement/kucoin-isolated-margin-adds-scr?lang=en_US\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"annId\\\": 129001,\\n" - + " \\\"annTitle\\\": \\\"DAPP-30D Fixed Promotion, Enjoy an APR of" - + " 200%!\\u200b\\\",\\n" - + " \\\"annType\\\": [\\n" - + " \\\"latest-announcements\\\",\\n" - + " \\\"activities\\\"\\n" - + " ],\\n" - + " \\\"annDesc\\\": \\\"KuCoin Earn will be launching the DAPP Fixed" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"totalNum\": 195,\n" + + " \"totalPage\": 13,\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 15,\n" + + " \"items\": [\n" + + " {\n" + + " \"annId\": 129045,\n" + + " \"annTitle\": \"KuCoin Isolated Margin Adds the Scroll (SCR) Trading" + + " Pair\",\n" + + " \"annType\": [\n" + + " \"latest-announcements\"\n" + + " ],\n" + + " \"annDesc\": \"To enrich the variety of assets" + + " available,xa0KuCoin\u2019s Isolated Margin Trading platform has added the Scroll" + + " (SCR)xa0asset and trading pair.\",\n" + + " \"cTime\": 1729594043000,\n" + + " \"language\": \"en_US\",\n" + + " \"annUrl\":" + + " \"https://www.kucoin.com/announcement/kucoin-isolated-margin-adds-scr?lang=en_US\"\n" + + " },\n" + + " {\n" + + " \"annId\": 129001,\n" + + " \"annTitle\": \"DAPP-30D Fixed Promotion, Enjoy an APR of" + + " 200%!\u200B\",\n" + + " \"annType\": [\n" + + " \"latest-announcements\",\n" + + " \"activities\"\n" + + " ],\n" + + " \"annDesc\": \"KuCoin Earn will be launching the DAPP Fixed" + " Promotion at 10:00:00 on October 22, 2024 (UTC). The available product is" - + " \\u201cDAPP-30D'' with an APR of 200%.\\\",\\n" - + " \\\"cTime\\\": 1729588460000,\\n" - + " \\\"language\\\": \\\"en_US\\\",\\n" - + " \\\"annUrl\\\":" - + " \\\"https://www.kucoin.com/announcement/dapp-30d-fixed-promotion-enjoy?lang=en_US\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"annId\\\": 128581,\\n" - + " \\\"annTitle\\\": \\\"NAYM (NAYM) Gets Listed on KuCoin! World" - + " Premiere!\\\",\\n" - + " \\\"annType\\\": [\\n" - + " \\\"latest-announcements\\\",\\n" - + " \\\"new-listings\\\"\\n" - + " ],\\n" - + " \\\"annDesc\\\": \\\"Trading:\\xa011:00 on October 22, 2024" - + " (UTC)\\\",\\n" - + " \\\"cTime\\\": 1729497729000,\\n" - + " \\\"language\\\": \\\"en_US\\\",\\n" - + " \\\"annUrl\\\":" - + " \\\"https://www.kucoin.com/announcement/en-naym-naym-gets-listed-on-kucoin-world-premiere?lang=en_US\\\"\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + + " \u201CDAPP-30D'' with an APR of 200%.\",\n" + + " \"cTime\": 1729588460000,\n" + + " \"language\": \"en_US\",\n" + + " \"annUrl\":" + + " \"https://www.kucoin.com/announcement/dapp-30d-fixed-promotion-enjoy?lang=en_US\"\n" + + " },\n" + + " {\n" + + " \"annId\": 128581,\n" + + " \"annTitle\": \"NAYM (NAYM) Gets Listed on KuCoin! World" + + " Premiere!\",\n" + + " \"annType\": [\n" + + " \"latest-announcements\",\n" + + " \"new-listings\"\n" + + " ],\n" + + " \"annDesc\": \"Trading:xa011:00 on October 22, 2024 (UTC)\",\n" + + " \"cTime\": 1729497729000,\n" + + " \"language\": \"en_US\",\n" + + " \"annUrl\":" + + " \"https://www.kucoin.com/announcement/en-naym-naym-gets-listed-on-kucoin-world-premiere?lang=en_US\"\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -86,15 +86,15 @@ public static void testGetAnnouncementsResponse() throws Exception { /** getCurrency Request Get Currency /api/v3/currencies/{currency} */ public static void testGetCurrencyRequest() throws Exception { - String data = "{\\\"chain\\\": \\\"eth\\\", \\\"currency\\\": \\\"BTC\\\"}"; + String data = "{\"chain\": \"eth\", \"currency\": \"BTC\"}"; GetCurrencyReq obj = mapper.readValue(data, GetCurrencyReq.class); } /** getCurrency Response Get Currency /api/v3/currencies/{currency} */ public static void testGetCurrencyResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"currency\\\":\\\"BTC\\\",\\\"name\\\":\\\"BTC\\\",\\\"fullName\\\":\\\"Bitcoin\\\",\\\"precision\\\":8,\\\"confirms\\\":null,\\\"contractAddress\\\":null,\\\"isMarginEnabled\\\":true,\\\"isDebitEnabled\\\":true,\\\"chains\\\":[{\\\"chainName\\\":\\\"BTC\\\",\\\"withdrawalMinSize\\\":\\\"0.001\\\",\\\"depositMinSize\\\":\\\"0.0002\\\",\\\"withdrawFeeRate\\\":\\\"0\\\",\\\"withdrawalMinFee\\\":\\\"0.0005\\\",\\\"isWithdrawEnabled\\\":true,\\\"isDepositEnabled\\\":true,\\\"confirms\\\":3,\\\"preConfirms\\\":1,\\\"contractAddress\\\":\\\"\\\",\\\"withdrawPrecision\\\":8,\\\"maxWithdraw\\\":null,\\\"maxDeposit\\\":null,\\\"needTag\\\":false,\\\"chainId\\\":\\\"btc\\\"},{\\\"chainName\\\":\\\"Lightning" - + " Network\\\",\\\"withdrawalMinSize\\\":\\\"0.00001\\\",\\\"depositMinSize\\\":\\\"0.00001\\\",\\\"withdrawFeeRate\\\":\\\"0\\\",\\\"withdrawalMinFee\\\":\\\"0.000015\\\",\\\"isWithdrawEnabled\\\":true,\\\"isDepositEnabled\\\":true,\\\"confirms\\\":1,\\\"preConfirms\\\":1,\\\"contractAddress\\\":\\\"\\\",\\\"withdrawPrecision\\\":8,\\\"maxWithdraw\\\":null,\\\"maxDeposit\\\":\\\"0.03\\\",\\\"needTag\\\":false,\\\"chainId\\\":\\\"btcln\\\"},{\\\"chainName\\\":\\\"KCC\\\",\\\"withdrawalMinSize\\\":\\\"0.0008\\\",\\\"depositMinSize\\\":null,\\\"withdrawFeeRate\\\":\\\"0\\\",\\\"withdrawalMinFee\\\":\\\"0.00002\\\",\\\"isWithdrawEnabled\\\":true,\\\"isDepositEnabled\\\":true,\\\"confirms\\\":20,\\\"preConfirms\\\":20,\\\"contractAddress\\\":\\\"0xfa93c12cd345c658bc4644d1d4e1b9615952258c\\\",\\\"withdrawPrecision\\\":8,\\\"maxWithdraw\\\":null,\\\"maxDeposit\\\":null,\\\"needTag\\\":false,\\\"chainId\\\":\\\"kcc\\\"},{\\\"chainName\\\":\\\"BTC-Segwit\\\",\\\"withdrawalMinSize\\\":\\\"0.0008\\\",\\\"depositMinSize\\\":\\\"0.0002\\\",\\\"withdrawFeeRate\\\":\\\"0\\\",\\\"withdrawalMinFee\\\":\\\"0.0005\\\",\\\"isWithdrawEnabled\\\":false,\\\"isDepositEnabled\\\":true,\\\"confirms\\\":2,\\\"preConfirms\\\":2,\\\"contractAddress\\\":\\\"\\\",\\\"withdrawPrecision\\\":8,\\\"maxWithdraw\\\":null,\\\"maxDeposit\\\":null,\\\"needTag\\\":false,\\\"chainId\\\":\\\"bech32\\\"}]}}"; + "{\"code\":\"200000\",\"data\":{\"currency\":\"BTC\",\"name\":\"BTC\",\"fullName\":\"Bitcoin\",\"precision\":8,\"confirms\":null,\"contractAddress\":null,\"isMarginEnabled\":true,\"isDebitEnabled\":true,\"chains\":[{\"chainName\":\"BTC\",\"withdrawalMinSize\":\"0.001\",\"depositMinSize\":\"0.0002\",\"withdrawFeeRate\":\"0\",\"withdrawalMinFee\":\"0.0005\",\"isWithdrawEnabled\":true,\"isDepositEnabled\":true,\"confirms\":3,\"preConfirms\":1,\"contractAddress\":\"\",\"withdrawPrecision\":8,\"maxWithdraw\":null,\"maxDeposit\":null,\"needTag\":false,\"chainId\":\"btc\"},{\"chainName\":\"Lightning" + + " Network\",\"withdrawalMinSize\":\"0.00001\",\"depositMinSize\":\"0.00001\",\"withdrawFeeRate\":\"0\",\"withdrawalMinFee\":\"0.000015\",\"isWithdrawEnabled\":true,\"isDepositEnabled\":true,\"confirms\":1,\"preConfirms\":1,\"contractAddress\":\"\",\"withdrawPrecision\":8,\"maxWithdraw\":null,\"maxDeposit\":\"0.03\",\"needTag\":false,\"chainId\":\"btcln\"},{\"chainName\":\"KCC\",\"withdrawalMinSize\":\"0.0008\",\"depositMinSize\":null,\"withdrawFeeRate\":\"0\",\"withdrawalMinFee\":\"0.00002\",\"isWithdrawEnabled\":true,\"isDepositEnabled\":true,\"confirms\":20,\"preConfirms\":20,\"contractAddress\":\"0xfa93c12cd345c658bc4644d1d4e1b9615952258c\",\"withdrawPrecision\":8,\"maxWithdraw\":null,\"maxDeposit\":null,\"needTag\":false,\"chainId\":\"kcc\"},{\"chainName\":\"BTC-Segwit\",\"withdrawalMinSize\":\"0.0008\",\"depositMinSize\":\"0.0002\",\"withdrawFeeRate\":\"0\",\"withdrawalMinFee\":\"0.0005\",\"isWithdrawEnabled\":false,\"isDepositEnabled\":true,\"confirms\":2,\"preConfirms\":2,\"contractAddress\":\"\",\"withdrawPrecision\":8,\"maxWithdraw\":null,\"maxDeposit\":null,\"needTag\":false,\"chainId\":\"bech32\"}]}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -107,120 +107,120 @@ public static void testGetAllCurrenciesRequest() throws Exception { /** getAllCurrencies Response Get All Currencies /api/v3/currencies */ public static void testGetAllCurrenciesResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"currency\\\": \\\"BTC\\\",\\n" - + " \\\"name\\\": \\\"BTC\\\",\\n" - + " \\\"fullName\\\": \\\"Bitcoin\\\",\\n" - + " \\\"precision\\\": 8,\\n" - + " \\\"confirms\\\": null,\\n" - + " \\\"contractAddress\\\": null,\\n" - + " \\\"isMarginEnabled\\\": true,\\n" - + " \\\"isDebitEnabled\\\": true,\\n" - + " \\\"chains\\\": [\\n" - + " {\\n" - + " \\\"chainName\\\": \\\"BTC\\\",\\n" - + " \\\"withdrawalMinSize\\\": \\\"0.001\\\",\\n" - + " \\\"depositMinSize\\\": \\\"0.0002\\\",\\n" - + " \\\"withdrawFeeRate\\\": \\\"0\\\",\\n" - + " \\\"withdrawalMinFee\\\": \\\"0.0005\\\",\\n" - + " \\\"isWithdrawEnabled\\\": true,\\n" - + " \\\"isDepositEnabled\\\": true,\\n" - + " \\\"confirms\\\": 3,\\n" - + " \\\"preConfirms\\\": 1,\\n" - + " \\\"contractAddress\\\": \\\"\\\",\\n" - + " \\\"withdrawPrecision\\\": 8,\\n" - + " \\\"maxWithdraw\\\": null,\\n" - + " \\\"maxDeposit\\\": null,\\n" - + " \\\"needTag\\\": false,\\n" - + " \\\"chainId\\\": \\\"btc\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"chainName\\\": \\\"Lightning Network\\\",\\n" - + " \\\"withdrawalMinSize\\\": \\\"0.00001\\\",\\n" - + " \\\"depositMinSize\\\": \\\"0.00001\\\",\\n" - + " \\\"withdrawFeeRate\\\": \\\"0\\\",\\n" - + " \\\"withdrawalMinFee\\\": \\\"0.000015\\\",\\n" - + " \\\"isWithdrawEnabled\\\": true,\\n" - + " \\\"isDepositEnabled\\\": true,\\n" - + " \\\"confirms\\\": 1,\\n" - + " \\\"preConfirms\\\": 1,\\n" - + " \\\"contractAddress\\\": \\\"\\\",\\n" - + " \\\"withdrawPrecision\\\": 8,\\n" - + " \\\"maxWithdraw\\\": null,\\n" - + " \\\"maxDeposit\\\": \\\"0.03\\\",\\n" - + " \\\"needTag\\\": false,\\n" - + " \\\"chainId\\\": \\\"btcln\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"chainName\\\": \\\"KCC\\\",\\n" - + " \\\"withdrawalMinSize\\\": \\\"0.0008\\\",\\n" - + " \\\"depositMinSize\\\": null,\\n" - + " \\\"withdrawFeeRate\\\": \\\"0\\\",\\n" - + " \\\"withdrawalMinFee\\\": \\\"0.00002\\\",\\n" - + " \\\"isWithdrawEnabled\\\": true,\\n" - + " \\\"isDepositEnabled\\\": true,\\n" - + " \\\"confirms\\\": 20,\\n" - + " \\\"preConfirms\\\": 20,\\n" - + " \\\"contractAddress\\\":" - + " \\\"0xfa93c12cd345c658bc4644d1d4e1b9615952258c\\\",\\n" - + " \\\"withdrawPrecision\\\": 8,\\n" - + " \\\"maxWithdraw\\\": null,\\n" - + " \\\"maxDeposit\\\": null,\\n" - + " \\\"needTag\\\": false,\\n" - + " \\\"chainId\\\": \\\"kcc\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"chainName\\\": \\\"BTC-Segwit\\\",\\n" - + " \\\"withdrawalMinSize\\\": \\\"0.0008\\\",\\n" - + " \\\"depositMinSize\\\": \\\"0.0002\\\",\\n" - + " \\\"withdrawFeeRate\\\": \\\"0\\\",\\n" - + " \\\"withdrawalMinFee\\\": \\\"0.0005\\\",\\n" - + " \\\"isWithdrawEnabled\\\": false,\\n" - + " \\\"isDepositEnabled\\\": true,\\n" - + " \\\"confirms\\\": 2,\\n" - + " \\\"preConfirms\\\": 2,\\n" - + " \\\"contractAddress\\\": \\\"\\\",\\n" - + " \\\"withdrawPrecision\\\": 8,\\n" - + " \\\"maxWithdraw\\\": null,\\n" - + " \\\"maxDeposit\\\": null,\\n" - + " \\\"needTag\\\": false,\\n" - + " \\\"chainId\\\": \\\"bech32\\\"\\n" - + " }\\n" - + " ]\\n" - + " },\\n" - + " {\\n" - + " \\\"currency\\\": \\\"BTCP\\\",\\n" - + " \\\"name\\\": \\\"BTCP\\\",\\n" - + " \\\"fullName\\\": \\\"Bitcoin Private\\\",\\n" - + " \\\"precision\\\": 8,\\n" - + " \\\"confirms\\\": null,\\n" - + " \\\"contractAddress\\\": null,\\n" - + " \\\"isMarginEnabled\\\": false,\\n" - + " \\\"isDebitEnabled\\\": false,\\n" - + " \\\"chains\\\": [\\n" - + " {\\n" - + " \\\"chainName\\\": \\\"BTCP\\\",\\n" - + " \\\"withdrawalMinSize\\\": \\\"0.100000\\\",\\n" - + " \\\"depositMinSize\\\": null,\\n" - + " \\\"withdrawFeeRate\\\": \\\"0\\\",\\n" - + " \\\"withdrawalMinFee\\\": \\\"0.010000\\\",\\n" - + " \\\"isWithdrawEnabled\\\": false,\\n" - + " \\\"isDepositEnabled\\\": false,\\n" - + " \\\"confirms\\\": 6,\\n" - + " \\\"preConfirms\\\": 6,\\n" - + " \\\"contractAddress\\\": \\\"\\\",\\n" - + " \\\"withdrawPrecision\\\": 8,\\n" - + " \\\"maxWithdraw\\\": null,\\n" - + " \\\"maxDeposit\\\": null,\\n" - + " \\\"needTag\\\": false,\\n" - + " \\\"chainId\\\": \\\"btcp\\\"\\n" - + " }\\n" - + " ]\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"currency\": \"BTC\",\n" + + " \"name\": \"BTC\",\n" + + " \"fullName\": \"Bitcoin\",\n" + + " \"precision\": 8,\n" + + " \"confirms\": null,\n" + + " \"contractAddress\": null,\n" + + " \"isMarginEnabled\": true,\n" + + " \"isDebitEnabled\": true,\n" + + " \"chains\": [\n" + + " {\n" + + " \"chainName\": \"BTC\",\n" + + " \"withdrawalMinSize\": \"0.001\",\n" + + " \"depositMinSize\": \"0.0002\",\n" + + " \"withdrawFeeRate\": \"0\",\n" + + " \"withdrawalMinFee\": \"0.0005\",\n" + + " \"isWithdrawEnabled\": true,\n" + + " \"isDepositEnabled\": true,\n" + + " \"confirms\": 3,\n" + + " \"preConfirms\": 1,\n" + + " \"contractAddress\": \"\",\n" + + " \"withdrawPrecision\": 8,\n" + + " \"maxWithdraw\": null,\n" + + " \"maxDeposit\": null,\n" + + " \"needTag\": false,\n" + + " \"chainId\": \"btc\"\n" + + " },\n" + + " {\n" + + " \"chainName\": \"Lightning Network\",\n" + + " \"withdrawalMinSize\": \"0.00001\",\n" + + " \"depositMinSize\": \"0.00001\",\n" + + " \"withdrawFeeRate\": \"0\",\n" + + " \"withdrawalMinFee\": \"0.000015\",\n" + + " \"isWithdrawEnabled\": true,\n" + + " \"isDepositEnabled\": true,\n" + + " \"confirms\": 1,\n" + + " \"preConfirms\": 1,\n" + + " \"contractAddress\": \"\",\n" + + " \"withdrawPrecision\": 8,\n" + + " \"maxWithdraw\": null,\n" + + " \"maxDeposit\": \"0.03\",\n" + + " \"needTag\": false,\n" + + " \"chainId\": \"btcln\"\n" + + " },\n" + + " {\n" + + " \"chainName\": \"KCC\",\n" + + " \"withdrawalMinSize\": \"0.0008\",\n" + + " \"depositMinSize\": null,\n" + + " \"withdrawFeeRate\": \"0\",\n" + + " \"withdrawalMinFee\": \"0.00002\",\n" + + " \"isWithdrawEnabled\": true,\n" + + " \"isDepositEnabled\": true,\n" + + " \"confirms\": 20,\n" + + " \"preConfirms\": 20,\n" + + " \"contractAddress\":" + + " \"0xfa93c12cd345c658bc4644d1d4e1b9615952258c\",\n" + + " \"withdrawPrecision\": 8,\n" + + " \"maxWithdraw\": null,\n" + + " \"maxDeposit\": null,\n" + + " \"needTag\": false,\n" + + " \"chainId\": \"kcc\"\n" + + " },\n" + + " {\n" + + " \"chainName\": \"BTC-Segwit\",\n" + + " \"withdrawalMinSize\": \"0.0008\",\n" + + " \"depositMinSize\": \"0.0002\",\n" + + " \"withdrawFeeRate\": \"0\",\n" + + " \"withdrawalMinFee\": \"0.0005\",\n" + + " \"isWithdrawEnabled\": false,\n" + + " \"isDepositEnabled\": true,\n" + + " \"confirms\": 2,\n" + + " \"preConfirms\": 2,\n" + + " \"contractAddress\": \"\",\n" + + " \"withdrawPrecision\": 8,\n" + + " \"maxWithdraw\": null,\n" + + " \"maxDeposit\": null,\n" + + " \"needTag\": false,\n" + + " \"chainId\": \"bech32\"\n" + + " }\n" + + " ]\n" + + " },\n" + + " {\n" + + " \"currency\": \"BTCP\",\n" + + " \"name\": \"BTCP\",\n" + + " \"fullName\": \"Bitcoin Private\",\n" + + " \"precision\": 8,\n" + + " \"confirms\": null,\n" + + " \"contractAddress\": null,\n" + + " \"isMarginEnabled\": false,\n" + + " \"isDebitEnabled\": false,\n" + + " \"chains\": [\n" + + " {\n" + + " \"chainName\": \"BTCP\",\n" + + " \"withdrawalMinSize\": \"0.100000\",\n" + + " \"depositMinSize\": null,\n" + + " \"withdrawFeeRate\": \"0\",\n" + + " \"withdrawalMinFee\": \"0.010000\",\n" + + " \"isWithdrawEnabled\": false,\n" + + " \"isDepositEnabled\": false,\n" + + " \"confirms\": 6,\n" + + " \"preConfirms\": 6,\n" + + " \"contractAddress\": \"\",\n" + + " \"withdrawPrecision\": 8,\n" + + " \"maxWithdraw\": null,\n" + + " \"maxDeposit\": null,\n" + + " \"needTag\": false,\n" + + " \"chainId\": \"btcp\"\n" + + " }\n" + + " ]\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -228,45 +228,45 @@ public static void testGetAllCurrenciesResponse() throws Exception { /** getSymbol Request Get Symbol /api/v2/symbols/{symbol} */ public static void testGetSymbolRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\"}"; GetSymbolReq obj = mapper.readValue(data, GetSymbolReq.class); } /** getSymbol Response Get Symbol /api/v2/symbols/{symbol} */ public static void testGetSymbolResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -274,47 +274,47 @@ public static void testGetSymbolResponse() throws Exception { /** getAllSymbols Request Get All Symbols /api/v2/symbols */ public static void testGetAllSymbolsRequest() throws Exception { - String data = "{\\\"market\\\": \\\"ALTS\\\"}"; + String data = "{\"market\": \"ALTS\"}"; GetAllSymbolsReq obj = mapper.readValue(data, GetAllSymbolsReq.class); } /** getAllSymbols Response Get All Symbols /api/v2/symbols */ public static void testGetAllSymbolsResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -322,14 +322,14 @@ public static void testGetAllSymbolsResponse() throws Exception { /** getTicker Request Get Ticker /api/v1/market/orderbook/level1 */ public static void testGetTickerRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\"}"; GetTickerReq obj = mapper.readValue(data, GetTickerReq.class); } /** getTicker Response Get Ticker /api/v1/market/orderbook/level1 */ public static void testGetTickerResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"time\\\":1729172965609,\\\"sequence\\\":\\\"14609309753\\\",\\\"price\\\":\\\"67269\\\",\\\"size\\\":\\\"0.000025\\\",\\\"bestBid\\\":\\\"67267.5\\\",\\\"bestBidSize\\\":\\\"0.000025\\\",\\\"bestAsk\\\":\\\"67267.6\\\",\\\"bestAskSize\\\":\\\"1.24808993\\\"}}"; + "{\"code\":\"200000\",\"data\":{\"time\":1729172965609,\"sequence\":\"14609309753\",\"price\":\"67269\",\"size\":\"0.000025\",\"bestBid\":\"67267.5\",\"bestBidSize\":\"0.000025\",\"bestAsk\":\"67267.6\",\"bestAskSize\":\"1.24808993\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -342,33 +342,33 @@ public static void testGetAllTickersRequest() throws Exception { /** getAllTickers Response Get All Tickers /api/v1/market/allTickers */ public static void testGetAllTickersResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"time\\\": 1729173207043,\\n" - + " \\\"ticker\\\": [\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"symbolName\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"buy\\\": \\\"67192.5\\\",\\n" - + " \\\"bestBidSize\\\": \\\"0.000025\\\",\\n" - + " \\\"sell\\\": \\\"67192.6\\\",\\n" - + " \\\"bestAskSize\\\": \\\"1.24949204\\\",\\n" - + " \\\"changeRate\\\": \\\"-0.0014\\\",\\n" - + " \\\"changePrice\\\": \\\"-98.5\\\",\\n" - + " \\\"high\\\": \\\"68321.4\\\",\\n" - + " \\\"low\\\": \\\"66683.3\\\",\\n" - + " \\\"vol\\\": \\\"1836.03034612\\\",\\n" - + " \\\"volValue\\\": \\\"124068431.06726933\\\",\\n" - + " \\\"last\\\": \\\"67193\\\",\\n" - + " \\\"averagePrice\\\": \\\"67281.21437289\\\",\\n" - + " \\\"takerFeeRate\\\": \\\"0.001\\\",\\n" - + " \\\"makerFeeRate\\\": \\\"0.001\\\",\\n" - + " \\\"takerCoefficient\\\": \\\"1\\\",\\n" - + " \\\"makerCoefficient\\\": \\\"1\\\"\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"time\": 1729173207043,\n" + + " \"ticker\": [\n" + + " {\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"symbolName\": \"BTC-USDT\",\n" + + " \"buy\": \"67192.5\",\n" + + " \"bestBidSize\": \"0.000025\",\n" + + " \"sell\": \"67192.6\",\n" + + " \"bestAskSize\": \"1.24949204\",\n" + + " \"changeRate\": \"-0.0014\",\n" + + " \"changePrice\": \"-98.5\",\n" + + " \"high\": \"68321.4\",\n" + + " \"low\": \"66683.3\",\n" + + " \"vol\": \"1836.03034612\",\n" + + " \"volValue\": \"124068431.06726933\",\n" + + " \"last\": \"67193\",\n" + + " \"averagePrice\": \"67281.21437289\",\n" + + " \"takerFeeRate\": \"0.001\",\n" + + " \"makerFeeRate\": \"0.001\",\n" + + " \"takerCoefficient\": \"1\",\n" + + " \"makerCoefficient\": \"1\"\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -376,38 +376,38 @@ public static void testGetAllTickersResponse() throws Exception { /** getTradeHistory Request Get Trade History /api/v1/market/histories */ public static void testGetTradeHistoryRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\"}"; GetTradeHistoryReq obj = mapper.readValue(data, GetTradeHistoryReq.class); } /** getTradeHistory Response Get Trade History /api/v1/market/histories */ public static void testGetTradeHistoryResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"sequence\\\": \\\"10976028003549185\\\",\\n" - + " \\\"price\\\": \\\"67122\\\",\\n" - + " \\\"size\\\": \\\"0.000025\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"time\\\": 1729177117877000000\\n" - + " },\\n" - + " {\\n" - + " \\\"sequence\\\": \\\"10976028003549188\\\",\\n" - + " \\\"price\\\": \\\"67122\\\",\\n" - + " \\\"size\\\": \\\"0.01792257\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"time\\\": 1729177117877000000\\n" - + " },\\n" - + " {\\n" - + " \\\"sequence\\\": \\\"10976028003549191\\\",\\n" - + " \\\"price\\\": \\\"67122.9\\\",\\n" - + " \\\"size\\\": \\\"0.05654289\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"time\\\": 1729177117877000000\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"sequence\": \"10976028003549185\",\n" + + " \"price\": \"67122\",\n" + + " \"size\": \"0.000025\",\n" + + " \"side\": \"buy\",\n" + + " \"time\": 1729177117877000000\n" + + " },\n" + + " {\n" + + " \"sequence\": \"10976028003549188\",\n" + + " \"price\": \"67122\",\n" + + " \"size\": \"0.01792257\",\n" + + " \"side\": \"buy\",\n" + + " \"time\": 1729177117877000000\n" + + " },\n" + + " {\n" + + " \"sequence\": \"10976028003549191\",\n" + + " \"price\": \"67122.9\",\n" + + " \"size\": \"0.05654289\",\n" + + " \"side\": \"buy\",\n" + + " \"time\": 1729177117877000000\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -416,45 +416,45 @@ public static void testGetTradeHistoryResponse() throws Exception { /** getKlines Request Get Klines /api/v1/market/candles */ public static void testGetKlinesRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"type\\\": \\\"1min\\\", \\\"startAt\\\":" - + " 1566703297, \\\"endAt\\\": 1566789757}"; + "{\"symbol\": \"BTC-USDT\", \"type\": \"1min\", \"startAt\": 1566703297, \"endAt\":" + + " 1566789757}"; GetKlinesReq obj = mapper.readValue(data, GetKlinesReq.class); } /** getKlines Response Get Klines /api/v1/market/candles */ public static void testGetKlinesResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " [\\n" - + " \\\"1566789720\\\",\\n" - + " \\\"10411.5\\\",\\n" - + " \\\"10401.9\\\",\\n" - + " \\\"10411.5\\\",\\n" - + " \\\"10396.3\\\",\\n" - + " \\\"29.11357276\\\",\\n" - + " \\\"302889.301529914\\\"\\n" - + " ],\\n" - + " [\\n" - + " \\\"1566789660\\\",\\n" - + " \\\"10416\\\",\\n" - + " \\\"10411.5\\\",\\n" - + " \\\"10422.3\\\",\\n" - + " \\\"10411.5\\\",\\n" - + " \\\"15.61781842\\\",\\n" - + " \\\"162703.708997029\\\"\\n" - + " ],\\n" - + " [\\n" - + " \\\"1566789600\\\",\\n" - + " \\\"10408.6\\\",\\n" - + " \\\"10416\\\",\\n" - + " \\\"10416\\\",\\n" - + " \\\"10405.4\\\",\\n" - + " \\\"12.45584973\\\",\\n" - + " \\\"129666.51508559\\\"\\n" - + " ]\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " [\n" + + " \"1566789720\",\n" + + " \"10411.5\",\n" + + " \"10401.9\",\n" + + " \"10411.5\",\n" + + " \"10396.3\",\n" + + " \"29.11357276\",\n" + + " \"302889.301529914\"\n" + + " ],\n" + + " [\n" + + " \"1566789660\",\n" + + " \"10416\",\n" + + " \"10411.5\",\n" + + " \"10422.3\",\n" + + " \"10411.5\",\n" + + " \"15.61781842\",\n" + + " \"162703.708997029\"\n" + + " ],\n" + + " [\n" + + " \"1566789600\",\n" + + " \"10408.6\",\n" + + " \"10416\",\n" + + " \"10416\",\n" + + " \"10405.4\",\n" + + " \"12.45584973\",\n" + + " \"129666.51508559\"\n" + + " ]\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -462,39 +462,39 @@ public static void testGetKlinesResponse() throws Exception { /** getPartOrderBook Request Get Part OrderBook /api/v1/market/orderbook/level2_{size} */ public static void testGetPartOrderBookRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"size\\\": \\\"20\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\", \"size\": \"20\"}"; GetPartOrderBookReq obj = mapper.readValue(data, GetPartOrderBookReq.class); } /** getPartOrderBook Response Get Part OrderBook /api/v1/market/orderbook/level2_{size} */ public static void testGetPartOrderBookResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -502,39 +502,39 @@ public static void testGetPartOrderBookResponse() throws Exception { /** getFullOrderBook Request Get Full OrderBook /api/v3/market/orderbook/level2 */ public static void testGetFullOrderBookRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\"}"; GetFullOrderBookReq obj = mapper.readValue(data, GetFullOrderBookReq.class); } /** getFullOrderBook Response Get Full OrderBook /api/v3/market/orderbook/level2 */ public static void testGetFullOrderBookResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -545,7 +545,7 @@ public static void testGetFullOrderBookResponse() throws Exception { * /api/v1/market/orderbook/callauction/level2_{size} */ public static void testGetCallAuctionPartOrderBookRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"size\\\": \\\"20\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\", \"size\": \"20\"}"; GetCallAuctionPartOrderBookReq obj = mapper.readValue(data, GetCallAuctionPartOrderBookReq.class); } @@ -556,32 +556,32 @@ public static void testGetCallAuctionPartOrderBookRequest() throws Exception { */ public static void testGetCallAuctionPartOrderBookResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue( @@ -590,25 +590,25 @@ public static void testGetCallAuctionPartOrderBookResponse() throws Exception { /** getCallAuctionInfo Request Get Call Auction Info /api/v1/market/callauctionData */ public static void testGetCallAuctionInfoRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\"}"; GetCallAuctionInfoReq obj = mapper.readValue(data, GetCallAuctionInfoReq.class); } /** getCallAuctionInfo Response Get Call Auction Info /api/v1/market/callauctionData */ public static void testGetCallAuctionInfoResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -616,29 +616,28 @@ public static void testGetCallAuctionInfoResponse() throws Exception { /** getFiatPrice Request Get Fiat Price /api/v1/prices */ public static void testGetFiatPriceRequest() throws Exception { - String data = - "{\\\"base\\\": \\\"USD\\\", \\\"currencies\\\": \\\"example_string_default_value\\\"}"; + String data = "{\"base\": \"USD\", \"currencies\": \"example_string_default_value\"}"; GetFiatPriceReq obj = mapper.readValue(data, GetFiatPriceReq.class); } /** getFiatPrice Response Get Fiat Price /api/v1/prices */ public static void testGetFiatPriceResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"AGLD\\\":\\\"1.1174410000000001\\\",\\\"DFI\\\":\\\"0.0168915500000000\\\",\\\"PYTHUP\\\":\\\"0.0397880960000000\\\",\\\"ISLM\\\":\\\"0.0606196750000000\\\",\\\"NEAR\\\":\\\"4.7185395500000000\\\",\\\"AIOZ\\\":\\\"0.4862867350000000\\\",\\\"AUDIO\\\":\\\"0.1219390000000000\\\",\\\"BBL\\\":\\\"0.0067766100000000\\\",\\\"WLD\\\":\\\"2.2893547500000000\\\",\\\"HNT\\\":\\\"5.8990489999999984\\\",\\\"ETHFI\\\":\\\"1.5892050000000000\\\",\\\"DMAIL\\\":\\\"0.2726636000000000\\\",\\\"OPUP\\\":\\\"0.0986506500000000\\\",\\\"VET3S\\\":\\\"0.0003700448850000\\\",\\\"MANA3S\\\":\\\"0.0006056970000000\\\",\\\"TIDAL\\\":\\\"0.0001154422500000\\\",\\\"HALO\\\":\\\"0.0058270850000000\\\",\\\"OPUL\\\":\\\"0.0839480050000000\\\",\\\"MANA3L\\\":\\\"0.0029569407900000\\\",\\\"DGB\\\":\\\"0.0066556705000000\\\",\\\"AA\\\":\\\"0.2406796000000000\\\",\\\"BCH\\\":\\\"366.2167999999996484\\\",\\\"GMEE\\\":\\\"0.0113333305000000\\\",\\\"JST\\\":\\\"0.0302348750000000\\\",\\\"PBUX\\\":\\\"0.0208795550000000\\\",\\\"AR\\\":\\\"18.5457224999999909\\\",\\\"SEI\\\":\\\"0.4332832500000000\\\",\\\"PSTAKE\\\":\\\"0.0493153300000000\\\",\\\"LMWR\\\":\\\"0.1618190500000000\\\",\\\"UNFIDOWN\\\":\\\"0.0062058955000000\\\",\\\"BB\\\":\\\"0.3245376500000000\\\",\\\"JTO\\\":\\\"2.1239375000000002\\\",\\\"WEMIX\\\":\\\"0.7916040000000000\\\",\\\"G\\\":\\\"0.0324037900000000\\\",\\\"MARSH\\\":\\\"0.0617591050000000\\\",\\\"BN\\\":\\\"0.0036961510000000\\\",\\\"FLIP\\\":\\\"1.0976509000000000\\\",\\\"FLR\\\":\\\"0.0144827550000000\\\",\\\"BIGTIME\\\":\\\"0.1238780300000000\\\",\\\"FLY\\\":\\\"0.0005157420000000\\\",\\\"T\\\":\\\"0.0233483200000000\\\",\\\"W\\\":\\\"0.2865566500000000\\\",\\\"BDX\\\":\\\"0.0774012800000000\\\",\\\"BABYDOGE\\\":\\\"0.0000000029375305\\\",\\\"SFP\\\":\\\"0.7256370000000000\\\",\\\"DIA\\\":\\\"0.9179408000000000\\\",\\\"ISME\\\":\\\"0.0022388800000000\\\",\\\"LYM\\\":\\\"0.0010155919500000\\\",\\\"VET3L\\\":\\\"0.0000289755050000\\\",\\\"JUP\\\":\\\"0.8230882500000000\\\",\\\"LYX\\\":\\\"1.4501745500000001\\\",\\\"AIEPK\\\":\\\"0.0050094940000000\\\",\\\"SILLY\\\":\\\"0.0159420250000000\\\",\\\"SCPT\\\":\\\"0.0122038950000000\\\",\\\"WOO\\\":\\\"0.1796601250000000\\\",\\\"BLUR\\\":\\\"0.2462768000000000\\\",\\\"STRK\\\":\\\"0.3963117450000000\\\",\\\"BFC\\\":\\\"0.0383608100000000\\\",\\\"DC\\\":\\\"0.0003097450500000\\\",\\\"KARATE\\\":\\\"0.0007296350000000\\\",\\\"SUSHI3L\\\":\\\"0.5115441000000000\\\",\\\"NETVR\\\":\\\"0.0976111700000000\\\",\\\"WAVES\\\":\\\"1.0806594000000000\\\",\\\"LITH\\\":\\\"0.0001520239500000\\\",\\\"HAPI\\\":\\\"8.6533711499999987\\\",\\\"SUSHI3S\\\":\\\"1.2752620500000000\\\",\\\"CEEK\\\":\\\"0.0294852500000000\\\",\\\"FLOKI\\\":\\\"0.0001414292500000\\\",\\\"SHR\\\":\\\"0.0012463765000000\\\",\\\"SAND\\\":\\\"0.2566616050000000\\\",\\\"TURT\\\":\\\"0.0020889550000000\\\",\\\"UMA\\\":\\\"2.5207390000000000\\\",\\\"BEPRO\\\":\\\"0.0003955021500000\\\",\\\"SCRT\\\":\\\"0.1995002000000000\\\",\\\"TUSD\\\":\\\"0.9945025000000000\\\",\\\"COOKIE\\\":\\\"0.0220089900000000\\\",\\\"LRDS\\\":\\\"0.6218889000000000\\\",\\\"SIN\\\":\\\"0.0033633175000000\\\",\\\"OAS\\\":\\\"0.0331933950000000\\\",\\\"ROOT\\\":\\\"0.0183108400000000\\\",\\\"ADA3L\\\":\\\"0.0046396790000000\\\",\\\"TIAUP\\\":\\\"0.1228385500000000\\\",\\\"HTR\\\":\\\"0.0353023400000000\\\",\\\"UNB\\\":\\\"0.0003837080500000\\\",\\\"UNA\\\":\\\"0.0164917500000000\\\",\\\"HARD\\\":\\\"0.1087056200000000\\\",\\\"G3\\\":\\\"0.0502648550000000\\\",\\\"ADA3S\\\":\\\"0.0006191202850000\\\",\\\"MYRO\\\":\\\"0.1071863800000000\\\",\\\"HTX\\\":\\\"0.0000013693150000\\\",\\\"FT\\\":\\\"0.3585206500000000\\\",\\\"BTCDOWN\\\":\\\"0.1065467000000000\\\",\\\"UNI\\\":\\\"7.3571195999999993\\\",\\\"FX\\\":\\\"0.1379310000000000\\\",\\\"OBI\\\":\\\"0.0079030465000000\\\",\\\"UNO\\\":\\\"0.0137131400000000\\\",\\\"WRX\\\":\\\"0.1221389000000000\\\",\\\"TIADOWN\\\":\\\"0.0000914642450000\\\",\\\"ETHDOWN\\\":\\\"0.1306346500000000\\\",\\\"WELL\\\":\\\"0.0471244260000000\\\",\\\"SWFTC\\\":\\\"0.0028966509500000\\\",\\\"SKL\\\":\\\"0.0362418700000000\\\",\\\"UOS\\\":\\\"0.0867765900000000\\\",\\\"AIPAD\\\":\\\"0.0478660550000000\\\",\\\"BRETT\\\":\\\"0.1037481000000000\\\",\\\"SKY\\\":\\\"0.0520139800000000\\\",\\\"FRM\\\":\\\"0.0153123400000000\\\",\\\"VISION\\\":\\\"0.0014451770500000\\\",\\\"LENDS\\\":\\\"0.0047276350000000\\\",\\\"SLF\\\":\\\"0.3318340000000000\\\",\\\"BULL\\\":\\\"0.0023988000000000\\\",\\\"FLOW\\\":\\\"0.5372312500000000\\\",\\\"ODDZ\\\":\\\"0.0063368300000000\\\",\\\"SLN\\\":\\\"0.2804597000000000\\\",\\\"UPO\\\":\\\"0.0440779500000000\\\",\\\"SLP\\\":\\\"0.0023997995000000\\\",\\\"ID\\\":\\\"0.3718140000000000\\\",\\\"SLIM\\\":\\\"0.0906446550000000\\\",\\\"SPOT\\\":\\\"0.0021289350000000\\\",\\\"DOP\\\":\\\"0.0023028480000000\\\",\\\"ISSP\\\":\\\"0.0000874562500000\\\",\\\"UQC\\\":\\\"3.2339822000000003\\\",\\\"IO\\\":\\\"1.8185902499999999\\\",\\\"DOT\\\":\\\"4.2022978000000005\\\",\\\"1INCH\\\":\\\"0.2645676500000000\\\",\\\"SMH\\\":\\\"0.3448275000000000\\\",\\\"MAK\\\":\\\"0.0396701550000000\\\",\\\"TOKO\\\":\\\"0.0005923037000000\\\",\\\"TURBO\\\":\\\"0.0108085930000000\\\",\\\"UNFI\\\":\\\"2.8555714999999996\\\",\\\"MAN\\\":\\\"0.0210764565000000\\\",\\\"EVER\\\":\\\"0.0332733550000000\\\",\\\"FTM\\\":\\\"0.7259068650000000\\\",\\\"SHRAP\\\":\\\"0.0476361700000000\\\",\\\"MAV\\\":\\\"0.1738130500000000\\\",\\\"MAX\\\":\\\"0.2864966800000000\\\",\\\"DPR\\\":\\\"0.0018240875000000\\\",\\\"FTT\\\":\\\"2.0559715000000002\\\",\\\"ARKM\\\":\\\"1.7444273499999999\\\",\\\"ATOM\\\":\\\"4.2954512000000002\\\",\\\"PENDLE\\\":\\\"4.1554212500000007\\\",\\\"QUICK\\\":\\\"0.0365317250000000\\\",\\\"BLZ\\\":\\\"0.1217191100000000\\\",\\\"BOBA\\\":\\\"0.2014092450000000\\\",\\\"MBL\\\":\\\"0.0027856065000000\\\",\\\"OFN\\\":\\\"0.1252373500000000\\\",\\\"UNIO\\\":\\\"0.0025487250000000\\\",\\\"SNS\\\":\\\"0.0200899500000000\\\",\\\"SNX\\\":\\\"1.4282854999999999\\\",\\\"NXRA\\\":\\\"0.0272763550000000\\\",\\\"TAIKO\\\":\\\"1.4392800000000001\\\",\\\"AVAX3L\\\":\\\"0.1410875109550000\\\",\\\"L3\\\":\\\"0.0608395650000000\\\",\\\"API3\\\":\\\"1.3728132500000001\\\",\\\"XRP3S\\\":\\\"0.0028095945000000\\\",\\\"QKC\\\":\\\"0.0085157400000000\\\",\\\"AVAX3S\\\":\\\"0.5148424500000000\\\",\\\"ROSE\\\":\\\"0.0693453100000000\\\",\\\"SATS\\\":\\\"0.0000002701648500\\\",\\\"BMX\\\":\\\"0.3100449000000000\\\",\\\"PORTAL\\\":\\\"0.2811593500000000\\\",\\\"TOMI\\\":\\\"0.0309045400000000\\\",\\\"XRP3L\\\":\\\"2.1586201500000002\\\",\\\"SOL\\\":\\\"151.7250995000003583\\\",\\\"SON\\\":\\\"0.0002421788500000\\\",\\\"BNC\\\":\\\"0.1882058500000000\\\",\\\"SOCIAL\\\":\\\"0.0026486750000000\\\",\\\"CGPT\\\":\\\"0.1305147100000000\\\",\\\"CELR\\\":\\\"0.0127736100000000\\\",\\\"BNB\\\":\\\"591.0973035000118935\\\",\\\"OGN\\\":\\\"0.0852573500000000\\\",\\\"CELO\\\":\\\"0.7711142500000000\\\",\\\"AUCTION\\\":\\\"13.1634150000000014\\\",\\\"MANTA\\\":\\\"0.7564216000000000\\\",\\\"LAYER\\\":\\\"0.0372713550000000\\\",\\\"AERO\\\":\\\"1.3783104999999999\\\",\\\"CETUS\\\":\\\"0.1808295400000000\\\",\\\"LL\\\":\\\"0.0201199350000000\\\",\\\"SPA\\\":\\\"0.0067426270000000\\\",\\\"PYTHDOWN\\\":\\\"0.0011834080000000\\\",\\\"NEIROCTO\\\":\\\"0.0019964013000000\\\",\\\"UTK\\\":\\\"0.0365217300000000\\\",\\\"GMRX\\\":\\\"0.0007386305000000\\\",\\\"BOB\\\":\\\"0.0000380619595000\\\",\\\"HOTCROSS\\\":\\\"0.0056491740000000\\\",\\\"AERGO\\\":\\\"0.1007595950000000\\\",\\\"MOCA\\\":\\\"0.0783608000000000\\\",\\\"SQD\\\":\\\"0.0380809500000000\\\",\\\"MV\\\":\\\"0.0081359300000000\\\",\\\"BNB3L\\\":\\\"0.2761618500000000\\\",\\\"BNB3S\\\":\\\"0.0008545725000000\\\",\\\"GALAX3L\\\":\\\"0.0057571999600000\\\",\\\"KAI\\\":\\\"0.0020080954500000\\\",\\\"SQR\\\":\\\"0.0470764500000000\\\",\\\"GALAX3S\\\":\\\"0.1933033000000000\\\",\\\"EGLD\\\":\\\"25.5272299999999713\\\",\\\"ZBCN\\\":\\\"0.0010404795000000\\\",\\\"KAS\\\":\\\"0.1216691350000000\\\",\\\"MEW\\\":\\\"0.0086176890000000\\\",\\\"PUNDIX\\\":\\\"0.4130933500000000\\\",\\\"LOOKS\\\":\\\"0.0392803500000000\\\",\\\"FXS\\\":\\\"1.9060465000000000\\\",\\\"BOSON\\\":\\\"0.2732633000000000\\\",\\\"BRISE\\\":\\\"0.0000000860569500\\\",\\\"AEVO\\\":\\\"0.3388305000000000\\\",\\\"FLUX\\\":\\\"0.5276360500000000\\\",\\\"PRCL\\\":\\\"0.1969015000000000\\\",\\\"UNFIUP\\\":\\\"0.0011654170000000\\\",\\\"SEIDOWN\\\":\\\"0.0442778500000000\\\",\\\"DOAI\\\":\\\"0.0052363805000000\\\",\\\"QNT\\\":\\\"65.4312679999998206\\\",\\\"REDO\\\":\\\"0.2837580500000000\\\",\\\"STRIKE\\\":\\\"6.8225869999999997\\\",\\\"ETHW\\\":\\\"3.2418782499999998\\\",\\\"OM\\\":\\\"1.5396797750000000\\\",\\\"OP\\\":\\\"1.6911539999999999\\\",\\\"WHALE\\\":\\\"0.8134930500000000\\\",\\\"1CAT\\\":\\\"0.0018460765000000\\\",\\\"NEON\\\":\\\"0.4446775500000000\\\",\\\"GTAI\\\":\\\"0.7786105000000000\\\",\\\"SSV\\\":\\\"21.2393749999999841\\\",\\\"ETH2\\\":\\\"2601.6678843156403923\\\",\\\"KCS\\\":\\\"8.7646155000000020\\\",\\\"ARPA\\\":\\\"0.0393882960000000\\\",\\\"ARTFI\\\":\\\"0.0141029450000000\\\",\\\"BRL\\\":\\\"0.1742807323452485\\\",\\\"ALEX\\\":\\\"0.0924537500000000\\\",\\\"STG\\\":\\\"0.2943527500000000\\\",\\\"SHIB\\\":\\\"0.0000178060925000\\\",\\\"IOTX\\\":\\\"0.0394202800000000\\\",\\\"OLE\\\":\\\"0.0171414250000000\\\",\\\"KDA\\\":\\\"0.5653172000000000\\\",\\\"CERE\\\":\\\"0.0022548720000000\\\",\\\"DOCK\\\":\\\"0.0018990500000000\\\",\\\"STX\\\":\\\"1.8157916500000000\\\",\\\"OLT\\\":\\\"0.0007596200000000\\\",\\\"QI\\\":\\\"0.0131754090000000\\\",\\\"SDAO\\\":\\\"0.2748625000000000\\\",\\\"BLAST\\\":\\\"0.0087636160000000\\\",\\\"LINK3S\\\":\\\"0.0000702948350000\\\",\\\"IOST\\\":\\\"0.0049745115000000\\\",\\\"SUI\\\":\\\"2.0589700000000000\\\",\\\"CAKE\\\":\\\"1.7941024999999999\\\",\\\"BSW\\\":\\\"0.0586706500000000\\\",\\\"OMG\\\":\\\"0.2597700500000000\\\",\\\"VOLT\\\":\\\"0.0000002716641000\\\",\\\"LINK3L\\\":\\\"1.3408292499999999\\\",\\\"GEEQ\\\":\\\"0.0385607100000000\\\",\\\"PYUSD\\\":\\\"0.9988003500000000\\\",\\\"SUN\\\":\\\"0.0186106900000000\\\",\\\"TOWER\\\":\\\"0.0014812590000000\\\",\\\"BTC\\\":\\\"67133.4165000832051564\\\",\\\"IOTA\\\":\\\"0.1189405000000000\\\",\\\"REEF\\\":\\\"0.0019960015000000\\\",\\\"TRIAS\\\":\\\"3.3683149999999998\\\",\\\"KEY\\\":\\\"0.0037594713240047\\\",\\\"ETH3L\\\":\\\"0.0003305946200000\\\",\\\"BTT\\\":\\\"0.0000009117439000\\\",\\\"ONE\\\":\\\"0.0132003965000000\\\",\\\"RENDER\\\":\\\"5.2263854999999995\\\",\\\"ETH3S\\\":\\\"0.5517240000000000\\\",\\\"ANKR\\\":\\\"0.0264867500000000\\\",\\\"ALGO\\\":\\\"0.1188405500000000\\\",\\\"SYLO\\\":\\\"0.0007600198000000\\\",\\\"ZCX\\\":\\\"0.0784707450000000\\\",\\\"SD\\\":\\\"0.3851073500000000\\\",\\\"ONT\\\":\\\"0.1877960550000000\\\",\\\"MJT\\\":\\\"0.0132433750000000\\\",\\\"DYM\\\":\\\"1.6659666000000001\\\",\\\"DYP\\\":\\\"0.0205397250000000\\\",\\\"BAKEUP\\\":\\\"0.0389894955000000\\\",\\\"OOE\\\":\\\"0.0079360300000000\\\",\\\"ZELIX\\\":\\\"0.0000649675000000\\\",\\\"DOGE3L\\\":\\\"0.3837080500000000\\\",\\\"ARTY\\\":\\\"0.3980009000000000\\\",\\\"QORPO\\\":\\\"0.1204297550000000\\\",\\\"ICE\\\":\\\"0.0051504235000000\\\",\\\"NOTAI\\\":\\\"0.0000892753400000\\\",\\\"DOGE3S\\\":\\\"0.2291853500000000\\\",\\\"NAKA\\\":\\\"1.0695649500000000\\\",\\\"GALAX\\\":\\\"0.0212893500000000\\\",\\\"MKR\\\":\\\"1245.8767500000163833\\\",\\\"DODO\\\":\\\"0.1152423500000000\\\",\\\"ICP\\\":\\\"7.6731615000000027\\\",\\\"ZEC\\\":\\\"35.9400209999999543\\\",\\\"ZEE\\\":\\\"0.0065767100000000\\\",\\\"ICX\\\":\\\"0.1383308000000000\\\",\\\"KMNO\\\":\\\"0.0921499020000000\\\",\\\"TT\\\":\\\"0.0033883050000000\\\",\\\"DOT3L\\\":\\\"0.1454272500000000\\\",\\\"XAI\\\":\\\"0.2038980000000000\\\",\\\"ZEN\\\":\\\"8.0149905000000007\\\",\\\"DOGE\\\":\\\"0.1213093150000000\\\",\\\"ALPHA\\\":\\\"0.0567416150000000\\\",\\\"DUSK\\\":\\\"0.1964517250000000\\\",\\\"DOT3S\\\":\\\"0.0053613180000000\\\",\\\"SXP\\\":\\\"0.2538730000000000\\\",\\\"HBAR\\\":\\\"0.0510044850000000\\\",\\\"SYNT\\\":\\\"0.0467166300000000\\\",\\\"ZEX\\\":\\\"0.0571714000000000\\\",\\\"BONDLY\\\":\\\"0.0022208890000000\\\",\\\"MLK\\\":\\\"0.2080859050000000\\\",\\\"KICKS\\\":\\\"0.0001301249050000\\\",\\\"PEPE\\\":\\\"0.0000100249850000\\\",\\\"OUSD\\\":\\\"0.9982006500000000\\\",\\\"LUNCDOWN\\\":\\\"0.0000733333150000\\\",\\\"DOGS\\\":\\\"0.0007086455000000\\\",\\\"REV3L\\\":\\\"0.0094672640000000\\\",\\\"CTSI\\\":\\\"0.1257371000000000\\\",\\\"C98\\\":\\\"0.1219390000000000\\\",\\\"OSMO\\\":\\\"0.5370313500000000\\\",\\\"NTRN\\\":\\\"0.3869064500000000\\\",\\\"CFX2S\\\":\\\"0.0084757600000000\\\",\\\"SYN\\\":\\\"0.5636180500000000\\\",\\\"VIDT\\\":\\\"0.0308745550000000\\\",\\\"SYS\\\":\\\"0.0997501000000000\\\",\\\"GAS\\\":\\\"4.3029474500000008\\\",\\\"BOME\\\":\\\"0.0087336310000000\\\",\\\"COMBO\\\":\\\"0.4068964500000000\\\",\\\"XCH\\\":\\\"14.9825050000000010\\\",\\\"VR\\\":\\\"0.0063538215000000\\\",\\\"CFX2L\\\":\\\"0.0499660045000000\\\",\\\"VSYS\\\":\\\"0.0005201398000000\\\",\\\"PANDORA\\\":\\\"1629.2949450001102772\\\",\\\"THETA\\\":\\\"1.2461766000000000\\\",\\\"XCN\\\":\\\"0.0012699647000000\\\",\\\"NEXG\\\":\\\"0.0039180400000000\\\",\\\"MELOS\\\":\\\"0.0021244372500000\\\",\\\"XCV\\\":\\\"0.0013253370000000\\\",\\\"ORN\\\":\\\"0.8797599000000000\\\",\\\"WLKN\\\":\\\"0.0010624685000000\\\",\\\"AAVE\\\":\\\"154.2708259999996162\\\",\\\"MNT\\\":\\\"0.6168914000000000\\\",\\\"BONK\\\":\\\"0.0000227296295000\\\",\\\"PERP\\\":\\\"0.6037979500000000\\\",\\\"XDC\\\":\\\"0.0276361750000000\\\",\\\"MNW\\\":\\\"0.3681158500000000\\\",\\\"XDB\\\":\\\"0.0002578710000000\\\",\\\"BOND\\\":\\\"1.5662165000000000\\\",\\\"SUIA\\\":\\\"0.0809595000000000\\\",\\\"MOG\\\":\\\"0.0000019330330000\\\",\\\"SUTER\\\":\\\"0.0001840079500000\\\",\\\"TIME\\\":\\\"16.2648634999999969\\\",\\\"RACA\\\":\\\"0.0001949025000000\\\",\\\"BICO\\\":\\\"0.2021988500000000\\\",\\\"MON\\\":\\\"0.1066466500000000\\\",\\\"SWEAT\\\":\\\"0.0063718125000000\\\",\\\"MOXIE\\\":\\\"0.0022088950000000\\\",\\\"BABYBNB\\\":\\\"0.0289755050000000\\\",\\\"IGU\\\":\\\"0.0050674650000000\\\",\\\"HMSTR\\\":\\\"0.0037990995000000\\\",\\\"XEC\\\":\\\"0.0000354722550000\\\",\\\"MONI\\\":\\\"0.0058470750000000\\\",\\\"XR\\\":\\\"0.2374812000000000\\\",\\\"PEOPLE\\\":\\\"0.0796601500000000\\\",\\\"PUMLX\\\":\\\"0.0054572700000000\\\",\\\"ZIL\\\":\\\"0.0145927000000000\\\",\\\"WLDDOWN\\\":\\\"0.2089954500000000\\\",\\\"VAI\\\":\\\"0.0799999800000000\\\",\\\"XEN\\\":\\\"0.0000000839580000\\\",\\\"MPC\\\":\\\"0.1001499000000000\\\",\\\"XEM\\\":\\\"0.0176951480000000\\\",\\\"JASMY3S\\\":\\\"0.0019670160000000\\\",\\\"OTK\\\":\\\"0.0290464695000000\\\",\\\"TRAC\\\":\\\"0.4521738000000000\\\",\\\"DFYN\\\":\\\"0.0070664650000000\\\",\\\"BIDP\\\":\\\"0.0001939030000000\\\",\\\"JASMY3L\\\":\\\"0.0001653772700000\\\",\\\"INJDOWN\\\":\\\"0.0000194902500000\\\",\\\"KLV\\\":\\\"0.0019310340000000\\\",\\\"WAXL\\\":\\\"0.7858069000000000\\\",\\\"TRBDOWN\\\":\\\"0.0023138425000000\\\",\\\"BCH3L\\\":\\\"4.6390663064999996\\\",\\\"GMT3S\\\":\\\"0.0000457771000000\\\",\\\"KMD\\\":\\\"0.2493752500000000\\\",\\\"BCH3S\\\":\\\"0.9634180500000000\\\",\\\"ECOX\\\":\\\"0.0987506000000000\\\",\\\"AAVE3S\\\":\\\"0.0560719500000000\\\",\\\"GMT3L\\\":\\\"0.0053983694650000\\\",\\\"EPIK\\\":\\\"0.0045857060000000\\\",\\\"SUIP\\\":\\\"0.1067565950000000\\\",\\\"AAVE3L\\\":\\\"0.3638687346200000\\\",\\\"ZK\\\":\\\"0.1262368500000000\\\",\\\"ZKF\\\":\\\"0.0008595700000000\\\",\\\"OMNIA\\\":\\\"0.7624186000000000\\\",\\\"ZKJ\\\":\\\"1.1124435000000000\\\",\\\"ZKL\\\":\\\"0.1255372000000000\\\",\\\"GAFI\\\":\\\"3.0634675000000001\\\",\\\"CARV\\\":\\\"0.8703646000000000\\\",\\\"KNC\\\":\\\"0.4433782000000000\\\",\\\"CATS\\\":\\\"0.0000599700000000\\\",\\\"PROM\\\":\\\"5.2833570000000006\\\",\\\"ALEPH\\\":\\\"0.1756121500000000\\\",\\\"PONKE\\\":\\\"0.3958020000000000\\\",\\\"OVR\\\":\\\"0.1553223000000000\\\",\\\"CATI\\\":\\\"0.4105146400000000\\\",\\\"ORDER\\\":\\\"0.1183008200000000\\\",\\\"GFT\\\":\\\"0.0166616650000000\\\",\\\"BIFI\\\":\\\"0.0020489750000000\\\",\\\"GGC\\\":\\\"6.9965029985000000\\\",\\\"GGG\\\":\\\"0.0403798000000000\\\",\\\"DAPPX\\\":\\\"0.0043788095000000\\\",\\\"SUKU\\\":\\\"0.0618790450000000\\\",\\\"ULTI\\\":\\\"0.0168015950000000\\\",\\\"CREDI\\\":\\\"0.0192903500000000\\\",\\\"ERTHA\\\":\\\"0.0010014990000000\\\",\\\"FURY\\\":\\\"0.1405297000000000\\\",\\\"KARRAT\\\":\\\"0.5577210000000000\\\",\\\"MOBILE\\\":\\\"0.0009005495000000\\\",\\\"SIDUS\\\":\\\"0.0037671155000000\\\",\\\"NAVI\\\":\\\"0.1254672350000000\\\",\\\"TAO\\\":\\\"583.4081500000051807\\\",\\\"USDJ\\\":\\\"1.1386304000000001\\\",\\\"MTL\\\":\\\"0.9563216000000000\\\",\\\"VET\\\":\\\"0.0225387250000000\\\",\\\"FITFI\\\":\\\"0.0036421780000000\\\",\\\"USDT\\\":\\\"0.9995000000000000\\\",\\\"OXT\\\":\\\"0.0695652000000000\\\",\\\"CANDY\\\":\\\"0.0005597200000000\\\",\\\"USDP\\\":\\\"0.9932031500000000\\\",\\\"MTS\\\":\\\"0.0027516235000000\\\",\\\"TADA\\\":\\\"0.0283858000000000\\\",\\\"MTV\\\":\\\"0.0006559718500000\\\",\\\"NAVX\\\":\\\"0.1342228550000000\\\",\\\"ILV\\\":\\\"35.6771524999999671\\\",\\\"VINU\\\":\\\"0.0000000109045450\\\",\\\"GHX\\\":\\\"0.0903548000000000\\\",\\\"EDU\\\":\\\"0.5167415000000000\\\",\\\"HYVE\\\":\\\"0.0137331300000000\\\",\\\"BTC3L\\\":\\\"0.0058620675000000\\\",\\\"ANYONE\\\":\\\"0.9015490000000000\\\",\\\"BEAT\\\":\\\"0.0012593700000000\\\",\\\"KING\\\":\\\"0.0004821588000000\\\",\\\"CREAM\\\":\\\"15.6541689999999973\\\",\\\"CAS\\\":\\\"0.0038590695000000\\\",\\\"IMX\\\":\\\"1.4944524000000000\\\",\\\"CAT\\\":\\\"0.0000256981445000\\\",\\\"BTC3S\\\":\\\"0.0014142925000000\\\",\\\"USDE\\\":\\\"0.9985005000000000\\\",\\\"USDD\\\":\\\"1.0000997000000000\\\",\\\"CWAR\\\":\\\"0.0037981000000000\\\",\\\"USDC\\\":\\\"0.9997998500000000\\\",\\\"KRL\\\":\\\"0.3543127550000000\\\",\\\"INJ\\\":\\\"21.7691100000000194\\\",\\\"GAME\\\":\\\"0.0139630150000000\\\",\\\"TRIBL\\\":\\\"1.0994500000000000\\\",\\\"XLM\\\":\\\"0.0948525500000000\\\",\\\"TRBUP\\\":\\\"0.0012293850000000\\\",\\\"VRADOWN\\\":\\\"0.0013433280000000\\\",\\\"SUPER\\\":\\\"1.2853570000000000\\\",\\\"EIGEN\\\":\\\"3.1536223999999999\\\",\\\"IOI\\\":\\\"0.0146926500000000\\\",\\\"KSM\\\":\\\"17.5212350000000129\\\",\\\"CCD\\\":\\\"0.0034832575000000\\\",\\\"EGO\\\":\\\"0.0093553200000000\\\",\\\"EGP\\\":\\\"2.7946019999999998\\\",\\\"MXC\\\":\\\"0.0066866550000000\\\",\\\"TEL\\\":\\\"0.0014432780000000\\\",\\\"MOVR\\\":\\\"9.1340307000000027\\\",\\\"XMR\\\":\\\"155.5421899999990755\\\",\\\"MXM\\\":\\\"0.0092853550000000\\\",\\\"OORT\\\":\\\"0.1099949750000000\\\",\\\"GLM\\\":\\\"0.3231383500000000\\\",\\\"RAY\\\":\\\"2.0228880499999998\\\",\\\"XTAG\\\":\\\"0.0218190850000000\\\",\\\"GLQ\\\":\\\"0.0854572500000000\\\",\\\"CWEB\\\":\\\"0.0038480750000000\\\",\\\"REVU\\\":\\\"0.0105047450000000\\\",\\\"REVV\\\":\\\"0.0039760110000000\\\",\\\"ZRO\\\":\\\"3.7952014499999994\\\",\\\"XNL\\\":\\\"0.0093853050000000\\\",\\\"XNO\\\":\\\"0.8496749500000000\\\",\\\"SAROS\\\":\\\"0.0019290350000000\\\",\\\"KACE\\\":\\\"2.1165411999999998\\\",\\\"ZRX\\\":\\\"0.3186406000000000\\\",\\\"WLTH\\\":\\\"0.0374312750000000\\\",\\\"ATOM3L\\\":\\\"0.0321719060000000\\\",\\\"GMM\\\":\\\"0.0001497251000000\\\",\\\"BEER\\\":\\\"0.0000138670630000\\\",\\\"GMT\\\":\\\"0.1275362000000000\\\",\\\"HEART\\\":\\\"0.0159920000000000\\\",\\\"GMX\\\":\\\"22.7186349999999882\\\",\\\"ABBC\\\":\\\"0.0061769100000000\\\",\\\"OMNI\\\":\\\"8.9235359999999970\\\",\\\"ATOM3S\\\":\\\"0.0007945225400000\\\",\\\"IRL\\\":\\\"0.0099650150000000\\\",\\\"CFG\\\":\\\"0.3248375000000000\\\",\\\"WSDM\\\":\\\"0.0139830050000000\\\",\\\"GNS\\\":\\\"1.8390800000000001\\\",\\\"VANRY\\\":\\\"0.0809295150000000\\\",\\\"CFX\\\":\\\"0.1595202000000000\\\",\\\"GRAIL\\\":\\\"817.1212349999937891\\\",\\\"BEFI\\\":\\\"0.0175712100000000\\\",\\\"VELO\\\":\\\"0.0132043945000000\\\",\\\"XPR\\\":\\\"0.0008077959000000\\\",\\\"DOVI\\\":\\\"0.0584707500000000\\\",\\\"ACE\\\":\\\"0.0021349320000000\\\",\\\"ACH\\\":\\\"0.0190534685000000\\\",\\\"ISP\\\":\\\"0.0012161916000000\\\",\\\"XCAD\\\":\\\"0.2834582000000000\\\",\\\"MINA\\\":\\\"0.5630183500000000\\\",\\\"TIA\\\":\\\"5.9318325999999999\\\",\\\"DRIFT\\\":\\\"0.4350823500000000\\\",\\\"ACQ\\\":\\\"0.0056981495000000\\\",\\\"ACS\\\":\\\"0.0014917537500000\\\",\\\"MIND\\\":\\\"0.0018920535000000\\\",\\\"STORE\\\":\\\"0.0062358805000000\\\",\\\"REN\\\":\\\"0.0351224300000000\\\",\\\"ELA\\\":\\\"1.7282354500000000\\\",\\\"DREAMS\\\":\\\"0.0002498750000000\\\",\\\"ADA\\\":\\\"0.3463267500000000\\\",\\\"ELF\\\":\\\"0.3777110500000000\\\",\\\"REQ\\\":\\\"0.0959919800000000\\\",\\\"STORJ\\\":\\\"0.5662167500000000\\\",\\\"LADYS\\\":\\\"0.0000000837581000\\\",\\\"PAXG\\\":\\\"2697.9303600003123340\\\",\\\"REZ\\\":\\\"0.0409795000000000\\\",\\\"XRD\\\":\\\"0.0157821050000000\\\",\\\"CHO\\\":\\\"0.0205097400000000\\\",\\\"CHR\\\":\\\"0.1769115000000000\\\",\\\"ADS\\\":\\\"0.1889055000000000\\\",\\\"CHZ\\\":\\\"0.0738030800000000\\\",\\\"ADX\\\":\\\"0.1575212000000000\\\",\\\"XRP\\\":\\\"0.5525036100000000\\\",\\\"JASMY\\\":\\\"0.0188615645000000\\\",\\\"KAGI\\\":\\\"0.1834582250000000\\\",\\\"FIDA\\\":\\\"0.2282858000000000\\\",\\\"PBR\\\":\\\"0.0291953950000000\\\",\\\"AEG\\\":\\\"0.0093453250000000\\\",\\\"H2O\\\":\\\"0.1610194500000000\\\",\\\"CHMB\\\":\\\"0.0001715641750000\\\",\\\"SAND3L\\\":\\\"0.0015447972150000\\\",\\\"PBX\\\":\\\"0.0006879558500000\\\",\\\"SOLVE\\\":\\\"0.0084557700000000\\\",\\\"DECHAT\\\":\\\"0.1512243500000000\\\",\\\"GARI\\\":\\\"0.0076861550000000\\\",\\\"SHIB2L\\\":\\\"1.1996998499999999\\\",\\\"SHIB2S\\\":\\\"0.0240879500000000\\\",\\\"ENA\\\":\\\"0.3942028000000000\\\",\\\"VEMP\\\":\\\"0.0029335325000000\\\",\\\"ENJ\\\":\\\"0.1467266000000000\\\",\\\"AFG\\\":\\\"0.0072163900000000\\\",\\\"RATS\\\":\\\"0.0001211593900000\\\",\\\"GRT\\\":\\\"0.1646076550000000\\\",\\\"FORWARD\\\":\\\"0.0012873560000000\\\",\\\"TFUEL\\\":\\\"0.0598800450000000\\\",\\\"ENS\\\":\\\"17.0634640000000052\\\",\\\"KASDOWN\\\":\\\"0.0258770550000000\\\",\\\"XTM\\\":\\\"0.0251074400000000\\\",\\\"DEGEN\\\":\\\"0.0084857550000000\\\",\\\"TLM\\\":\\\"0.0100449750000000\\\",\\\"DYDXDOWN\\\":\\\"0.1042598440000000\\\",\\\"CKB\\\":\\\"0.0146026950000000\\\",\\\"LUNC\\\":\\\"0.0000889255150000\\\",\\\"AURORA\\\":\\\"0.1204397500000000\\\",\\\"LUNA\\\":\\\"0.3624187000000000\\\",\\\"XTZ\\\":\\\"0.6776610000000000\\\",\\\"ELON\\\":\\\"0.0000001410294500\\\",\\\"DMTR\\\":\\\"0.0891554000000000\\\",\\\"EOS\\\":\\\"0.4759619000000000\\\",\\\"GST\\\":\\\"0.0118940500000000\\\",\\\"FORT\\\":\\\"0.1155422000000000\\\",\\\"FLAME\\\":\\\"0.0247076400000000\\\",\\\"PATEX\\\":\\\"0.9605195000000000\\\",\\\"DEEP\\\":\\\"0.0328885475000000\\\",\\\"ID3L\\\":\\\"0.0016201895000000\\\",\\\"GTC\\\":\\\"0.6625685500000000\\\",\\\"ID3S\\\":\\\"0.0071674145000000\\\",\\\"RIO\\\":\\\"0.7616190000000000\\\",\\\"CLH\\\":\\\"0.0008555720000000\\\",\\\"BURGER\\\":\\\"0.4016990500000000\\\",\\\"VRA\\\":\\\"0.0029765110000000\\\",\\\"SUNDOG\\\":\\\"0.2173912500000000\\\",\\\"GTT\\\":\\\"0.0002038980000000\\\",\\\"INJUP\\\":\\\"0.2327835500000000\\\",\\\"CPOOL\\\":\\\"0.1557720750000000\\\",\\\"EPX\\\":\\\"0.0000740629500000\\\",\\\"CLV\\\":\\\"0.0329835000000000\\\",\\\"FEAR\\\":\\\"0.0560519600000000\\\",\\\"MEME\\\":\\\"0.0124847545000000\\\",\\\"ROOBEE\\\":\\\"0.0004520738500000\\\",\\\"DEFI\\\":\\\"0.0192903500000000\\\",\\\"TOKEN\\\":\\\"0.0477361200000000\\\",\\\"GRAPE\\\":\\\"0.0020599695000000\\\",\\\"KASUP\\\":\\\"0.3996001000000000\\\",\\\"XWG\\\":\\\"0.0003843077500000\\\",\\\"SKEY\\\":\\\"0.0621289200000000\\\",\\\"SFUND\\\":\\\"1.3243375000000000\\\",\\\"EQX\\\":\\\"0.0032823580000000\\\",\\\"ORDIUP\\\":\\\"0.0548315705000000\\\",\\\"TON\\\":\\\"5.1857058499999995\\\",\\\"DEGO\\\":\\\"2.2667660500000001\\\",\\\"IZI\\\":\\\"0.0088455750000000\\\",\\\"ERG\\\":\\\"0.6605695500000000\\\",\\\"ERN\\\":\\\"1.9255367500000001\\\",\\\"VENOM\\\":\\\"0.0817591000000000\\\",\\\"VOXEL\\\":\\\"0.1497251000000000\\\",\\\"RLC\\\":\\\"1.4649671500000000\\\",\\\"PHA\\\":\\\"0.1093453000000000\\\",\\\"DYDXUP\\\":\\\"0.0112573685000000\\\",\\\"APE3S\\\":\\\"0.0008475760000000\\\",\\\"ORBS\\\":\\\"0.0288955450000000\\\",\\\"OPDOWN\\\":\\\"0.6758619000000000\\\",\\\"ESE\\\":\\\"0.0139130400000000\\\",\\\"APE3L\\\":\\\"0.1339330000000000\\\",\\\"HMND\\\":\\\"0.0982208650000000\\\",\\\"COQ\\\":\\\"0.0000014432780000\\\",\\\"AURY\\\":\\\"0.3340329000000000\\\",\\\"CULT\\\":\\\"0.0000028025980000\\\",\\\"AKT\\\":\\\"2.4642672500000001\\\",\\\"GLMR\\\":\\\"0.1606196500000000\\\",\\\"XYM\\\":\\\"0.0142528700000000\\\",\\\"ORAI\\\":\\\"6.1769100000000012\\\",\\\"XYO\\\":\\\"0.0058680645000000\\\",\\\"ETC\\\":\\\"18.8458723500000169\\\",\\\"LAI\\\":\\\"0.0142828550000000\\\",\\\"PIP\\\":\\\"0.0178310800000000\\\",\\\"ETH\\\":\\\"2607.6655149998362673\\\",\\\"NEO\\\":\\\"10.3575186499999991\\\",\\\"RMV\\\":\\\"0.0081659150000000\\\",\\\"KLAY\\\":\\\"0.1251374000000000\\\",\\\"PIT\\\":\\\"0.0000000003268365\\\",\\\"TARA\\\":\\\"0.0043978000000000\\\",\\\"KALT\\\":\\\"0.1128735350000000\\\",\\\"PIX\\\":\\\"0.0001023687900000\\\",\\\"ETN\\\":\\\"0.0021579205000000\\\",\\\"CSIX\\\":\\\"0.0141729100000000\\\",\\\"TRADE\\\":\\\"0.4708644500000000\\\",\\\"MAVIA\\\":\\\"1.3592200500000001\\\",\\\"HIGH\\\":\\\"1.3043474999999999\\\",\\\"TRB\\\":\\\"62.5387150000000006\\\",\\\"ORDI\\\":\\\"35.7421200000000126\\\",\\\"TRVL\\\":\\\"0.0373643085000000\\\",\\\"AMB\\\":\\\"0.0059670150000000\\\",\\\"TRU\\\":\\\"0.0762018800000000\\\",\\\"LOGX\\\":\\\"0.0271963950000000\\\",\\\"FINC\\\":\\\"0.0362018900000000\\\",\\\"INFRA\\\":\\\"0.1978010500000000\\\",\\\"NATIX\\\":\\\"0.0008729633000000\\\",\\\"NFP\\\":\\\"0.2152923000000000\\\",\\\"TRY\\\":\\\"0.0292166033323590\\\",\\\"TRX\\\":\\\"0.1597201000000000\\\",\\\"LBP\\\":\\\"0.0001243378000000\\\",\\\"LBR\\\":\\\"0.0595702000000000\\\",\\\"EUL\\\":\\\"2.9735125000000000\\\",\\\"NFT\\\":\\\"0.0000004077960000\\\",\\\"SEIUP\\\":\\\"0.0478110825000000\\\",\\\"PUFFER\\\":\\\"0.3676161000000000\\\",\\\"EUR\\\":\\\"1.0811249323958897\\\",\\\"ORCA\\\":\\\"2.0664662499999999\\\",\\\"NEAR3L\\\":\\\"0.0117010765350000\\\",\\\"AMP\\\":\\\"0.0038330825000000\\\",\\\"XDEFI\\\":\\\"0.0472563600000000\\\",\\\"HIFI\\\":\\\"0.4947525000000000\\\",\\\"TRUF\\\":\\\"0.0459570100000000\\\",\\\"AITECH\\\":\\\"0.1045477000000000\\\",\\\"AMU\\\":\\\"0.0043978000000000\\\",\\\"USTC\\\":\\\"0.0214692600000000\\\",\\\"KNGL\\\":\\\"0.0499750000000000\\\",\\\"FOXY\\\":\\\"0.0102686631000000\\\",\\\"NGC\\\":\\\"0.0147935995000000\\\",\\\"TENET\\\":\\\"0.0043278350000000\\\",\\\"NEAR3S\\\":\\\"0.0072553705000000\\\",\\\"MAHA\\\":\\\"1.1904045000000000\\\",\\\"NGL\\\":\\\"0.0701748950000000\\\",\\\"TST\\\":\\\"0.0080359800000000\\\",\\\"HIPPO\\\":\\\"0.0104447750000000\\\",\\\"AXS3S\\\":\\\"0.0308705570000000\\\",\\\"CRO\\\":\\\"0.0781409100000000\\\",\\\"ZPAY\\\":\\\"0.0050574700000000\\\",\\\"MNDE\\\":\\\"0.1026786350000000\\\",\\\"CRV\\\":\\\"0.2534732000000000\\\",\\\"SWASH\\\":\\\"0.0056271850000000\\\",\\\"AXS3L\\\":\\\"0.0106388779000000\\\",\\\"VERSE\\\":\\\"0.0001803098000000\\\",\\\"RPK\\\":\\\"0.0049975000000000\\\",\\\"RPL\\\":\\\"10.9745099999999958\\\",\\\"AZERO\\\":\\\"0.3789104500000000\\\",\\\"SOUL\\\":\\\"0.0534332700000000\\\",\\\"VXV\\\":\\\"0.2619689500000000\\\",\\\"LDO\\\":\\\"1.0885554500000000\\\",\\\"MAGIC\\\":\\\"0.3390304000000000\\\",\\\"ALICE\\\":\\\"1.0324835000000000\\\",\\\"SEAM\\\":\\\"1.1933030499999999\\\",\\\"PLU\\\":\\\"1.9300345000000001\\\",\\\"AOG\\\":\\\"0.0031224380000000\\\",\\\"SMOLE\\\":\\\"0.0000387806000000\\\",\\\"EWT\\\":\\\"1.1094450000000000\\\",\\\"TSUGT\\\":\\\"0.0029185400000000\\\",\\\"PMG\\\":\\\"0.0800599500000000\\\",\\\"OPAI\\\":\\\"0.0006826585000000\\\",\\\"LOCUS\\\":\\\"0.0216591650000000\\\",\\\"CTA\\\":\\\"0.0825087250000000\\\",\\\"NIM\\\":\\\"0.0013673160000000\\\",\\\"CTC\\\":\\\"0.4033982000000000\\\",\\\"APE\\\":\\\"0.7035480500000000\\\",\\\"MERL\\\":\\\"0.2720639000000000\\\",\\\"JAM\\\":\\\"0.0004770613500000\\\",\\\"CTI\\\":\\\"0.0130314810000000\\\",\\\"APP\\\":\\\"0.0021989000000000\\\",\\\"APT\\\":\\\"9.9947001500000000\\\",\\\"WLDUP\\\":\\\"0.0093043455000000\\\",\\\"ZEND\\\":\\\"0.1280759300000000\\\",\\\"FIRE\\\":\\\"0.9113441000000000\\\",\\\"DENT\\\":\\\"0.0008630682500000\\\",\\\"PYTH\\\":\\\"0.3390603850000000\\\",\\\"LFT\\\":\\\"0.0155322300000000\\\",\\\"DPET\\\":\\\"0.0319040400000000\\\",\\\"ORDIDOWN\\\":\\\"0.3788105000000000\\\",\\\"KPOL\\\":\\\"0.0029175405000000\\\",\\\"ETHUP\\\":\\\"8.4971493000000032\\\",\\\"BAND\\\":\\\"1.0939527500000001\\\",\\\"POL\\\":\\\"0.3656171000000000\\\",\\\"ASTR\\\":\\\"0.0582608550000000\\\",\\\"NKN\\\":\\\"0.0691654000000000\\\",\\\"RSR\\\":\\\"0.0068055955000000\\\",\\\"DVPN\\\":\\\"0.0005979009000000\\\",\\\"TWT\\\":\\\"1.1119437500000000\\\",\\\"ARB\\\":\\\"0.5510243500000000\\\",\\\"CVC\\\":\\\"0.1409801746501747\\\",\\\"ARC\\\":\\\"0.0300849500000000\\\",\\\"XETA\\\":\\\"0.0022888550000000\\\",\\\"MTRG\\\":\\\"0.4007995000000000\\\",\\\"LOKA\\\":\\\"0.1867066000000000\\\",\\\"LPOOL\\\":\\\"0.0660069800000000\\\",\\\"TURBOS\\\":\\\"0.0034812585000000\\\",\\\"CVX\\\":\\\"1.7816087499999999\\\",\\\"ARX\\\":\\\"0.0007556220000000\\\",\\\"MPLX\\\":\\\"0.4355221300000000\\\",\\\"SUSHI\\\":\\\"0.7011492500000000\\\",\\\"NLK\\\":\\\"0.0114442750000000\\\",\\\"PEPE2\\\":\\\"0.0000000313843000\\\",\\\"WBTC\\\":\\\"66881.4425499645548419\\\",\\\"SUI3L\\\":\\\"0.0211204345000000\\\",\\\"CWS\\\":\\\"0.1927036000000000\\\",\\\"SUI3S\\\":\\\"0.0000579110300000\\\",\\\"INSP\\\":\\\"0.0264167850000000\\\",\\\"MANA\\\":\\\"0.2945026750000000\\\",\\\"VRTX\\\":\\\"0.0641679000000000\\\",\\\"CSPR\\\":\\\"0.0116441750000000\\\",\\\"ATA\\\":\\\"0.0785007300000000\\\",\\\"OPEN\\\":\\\"0.0080049955000000\\\",\\\"HAI\\\":\\\"0.0448275750000000\\\",\\\"NMR\\\":\\\"14.7436245000000072\\\",\\\"ATH\\\":\\\"0.0540929400000000\\\",\\\"LIT\\\":\\\"0.6282857000000000\\\",\\\"TLOS\\\":\\\"0.3263467450000000\\\",\\\"TNSR\\\":\\\"0.3662168000000000\\\",\\\"CXT\\\":\\\"0.0871364100000000\\\",\\\"POLYX\\\":\\\"0.2346826000000000\\\",\\\"ZERO\\\":\\\"0.0002507745500000\\\",\\\"ROUTE\\\":\\\"0.0610694500000000\\\",\\\"LOOM\\\":\\\"0.0580009850000000\\\",\\\"PRE\\\":\\\"0.0078680640000000\\\",\\\"VRAUP\\\":\\\"0.0134652640000000\\\",\\\"HBB\\\":\\\"0.0714742450000000\\\",\\\"RVN\\\":\\\"0.0165017450000000\\\",\\\"PRQ\\\":\\\"0.0715741950000000\\\",\\\"ONDO\\\":\\\"0.7134930750000000\\\",\\\"PEPEDOWN\\\":\\\"0.0000155022450000\\\",\\\"WOOP\\\":\\\"0.0020179905000000\\\",\\\"LUNCUP\\\":\\\"0.0168355780000000\\\",\\\"KAVA\\\":\\\"0.3522238000000000\\\",\\\"LKI\\\":\\\"0.0104187880000000\\\",\\\"AVA\\\":\\\"0.4857570000000000\\\",\\\"NOM\\\":\\\"0.0233883000000000\\\",\\\"MAPO\\\":\\\"0.0089015470000000\\\",\\\"PEPEUP\\\":\\\"0.0114252845000000\\\",\\\"STRAX\\\":\\\"0.0487156300000000\\\",\\\"NOT\\\":\\\"0.0078670645000000\\\",\\\"ZERC\\\":\\\"0.1108245600000000\\\",\\\"BCUT\\\":\\\"0.0255672100000000\\\",\\\"MASA\\\":\\\"0.0691354150000000\\\",\\\"WAN\\\":\\\"0.1785077544737212\\\",\\\"WAT\\\":\\\"0.0003273762300000\\\",\\\"WAX\\\":\\\"0.0327636100000000\\\",\\\"MASK\\\":\\\"2.2259864500000002\\\",\\\"EOS3L\\\":\\\"0.0002122138400000\\\",\\\"IDEA\\\":\\\"0.0005887055000000\\\",\\\"EOS3S\\\":\\\"0.0034472755000000\\\",\\\"YFI\\\":\\\"4919.4290549999908843\\\",\\\"MOODENG\\\":\\\"0.0774612500000000\\\",\\\"XCUR\\\":\\\"0.0048845565000000\\\",\\\"HYDRA\\\":\\\"0.2225886500000000\\\",\\\"POPCAT\\\":\\\"1.3382305500000000\\\",\\\"LQTY\\\":\\\"0.7848074000000000\\\",\\\"PIXEL\\\":\\\"0.1406596350000000\\\",\\\"LMR\\\":\\\"0.0145437245000000\\\",\\\"ZETA\\\":\\\"0.5997999500000000\\\",\\\"YGG\\\":\\\"0.4717640000000000\\\",\\\"AXS\\\":\\\"4.6006985000000006\\\",\\\"BCHSV\\\":\\\"49.8250749999999370\\\",\\\"NRN\\\":\\\"0.0395802000000000\\\",\\\"FTON\\\":\\\"0.0091954000000000\\\",\\\"COMP\\\":\\\"43.6581599999999881\\\",\\\"XPRT\\\":\\\"0.1819090000000000\\\",\\\"HFT\\\":\\\"0.1443278000000000\\\",\\\"UXLINK\\\":\\\"0.5085456000000000\\\",\\\"STAMP\\\":\\\"0.0335032400000000\\\",\\\"RUNE\\\":\\\"4.9233370999999996\\\",\\\"ZEUS\\\":\\\"0.2587705500000000\\\",\\\"LTC3L\\\":\\\"1.8294848000000001\\\",\\\"DAPP\\\":\\\"0.1763118000000000\\\",\\\"FORTH\\\":\\\"2.9508238500000004\\\",\\\"ALPINE\\\":\\\"1.5322335000000000\\\",\\\"SENSO\\\":\\\"0.0328835500000000\\\",\\\"LTC3S\\\":\\\"0.0006986505000000\\\",\\\"DEXE\\\":\\\"8.3795081500000028\\\",\\\"GOAL\\\":\\\"0.0175912000000000\\\",\\\"AVAX\\\":\\\"27.5602130000000058\\\",\\\"LISTA\\\":\\\"0.3782108000000000\\\",\\\"AMPL\\\":\\\"1.3743124999999999\\\",\\\"WORK\\\":\\\"0.1384307500000000\\\",\\\"BRWL\\\":\\\"0.0017391300000000\\\",\\\"BANANA\\\":\\\"57.1314200000001362\\\",\\\"PUSH\\\":\\\"0.0750624500000000\\\",\\\"WEN\\\":\\\"0.0001015492000000\\\",\\\"NEIRO\\\":\\\"0.0879560000000000\\\",\\\"BTCUP\\\":\\\"34.7711057499999789\\\",\\\"SOL3S\\\":\\\"0.0007816090000000\\\",\\\"BRAWL\\\":\\\"0.0004776610500000\\\",\\\"LAY3R\\\":\\\"0.2161918500000000\\\",\\\"LPT\\\":\\\"11.9304317999999945\\\",\\\"GODS\\\":\\\"0.1807096000000000\\\",\\\"SAND3S\\\":\\\"4.6152911999999992\\\",\\\"RDNT\\\":\\\"0.0640679500000000\\\",\\\"SOL3L\\\":\\\"1.8351913752850000\\\",\\\"NIBI\\\":\\\"0.0653772950000000\\\",\\\"NUM\\\":\\\"0.0436181800000000\\\",\\\"PYR\\\":\\\"2.5590198499999997\\\",\\\"DAG\\\":\\\"0.0226176855000000\\\",\\\"DAI\\\":\\\"0.9989006596042375\\\",\\\"HIP\\\":\\\"0.0034982500000000\\\",\\\"DAO\\\":\\\"0.2848575000000000\\\",\\\"AVAIL\\\":\\\"0.1300929210000000\\\",\\\"DAR\\\":\\\"0.1512243500000000\\\",\\\"FET\\\":\\\"1.3760116500000000\\\",\\\"FCON\\\":\\\"0.0001197600900000\\\",\\\"XAVA\\\":\\\"0.3789104500000000\\\",\\\"LRC\\\":\\\"0.1208395500000000\\\",\\\"UNI3S\\\":\\\"0.0000653573050000\\\",\\\"PZP\\\":\\\"0.0599600050000000\\\",\\\"POKT\\\":\\\"0.0424787500000000\\\",\\\"DASH\\\":\\\"23.6881500000000109\\\",\\\"BAKEDOWN\\\":\\\"0.0003324636850000\\\",\\\"POLC\\\":\\\"0.0061389290000000\\\",\\\"DBR\\\":\\\"0.0377671070000000\\\",\\\"CIRUS\\\":\\\"0.0055772100000000\\\",\\\"UNI3L\\\":\\\"0.0993921490650000\\\",\\\"NWC\\\":\\\"0.0681659000000000\\\",\\\"POLK\\\":\\\"0.0142628650000000\\\",\\\"LSD\\\":\\\"0.9420287500000000\\\",\\\"MARS4\\\":\\\"0.0005878059500000\\\",\\\"LSK\\\":\\\"0.8080957500000000\\\",\\\"BLOCK\\\":\\\"0.0261869000000000\\\",\\\"ANALOS\\\":\\\"0.0000446776500000\\\",\\\"SAFE\\\":\\\"0.8779608000000000\\\",\\\"DCK\\\":\\\"0.0234082900000000\\\",\\\"LSS\\\":\\\"0.0562718500000000\\\",\\\"DCR\\\":\\\"12.4337799999999929\\\",\\\"LIKE\\\":\\\"0.0559720000000000\\\",\\\"DATA\\\":\\\"0.0361819000000000\\\",\\\"WIF\\\":\\\"2.5696145499999999\\\",\\\"BLOK\\\":\\\"0.0006546725000000\\\",\\\"LTC\\\":\\\"71.6261690000000611\\\",\\\"METIS\\\":\\\"42.0289750000000612\\\",\\\"WIN\\\":\\\"0.0000868365600000\\\",\\\"HLG\\\":\\\"0.0018790600000000\\\",\\\"LTO\\\":\\\"0.1166116650000000\\\",\\\"DYDX\\\":\\\"0.9341327000000000\\\",\\\"ARB3S\\\":\\\"0.0509025360000000\\\",\\\"MUBI\\\":\\\"0.0303848000000000\\\",\\\"ARB3L\\\":\\\"0.0025917035000000\\\",\\\"RBTC1\\\":\\\"0.0000039480250000\\\",\\\"POND\\\":\\\"0.0118640650000000\\\",\\\"LINA\\\":\\\"0.0037771105000000\\\",\\\"MYRIA\\\":\\\"0.0025337325000000\\\",\\\"LINK\\\":\\\"11.0244849999999944\\\",\\\"QTUM\\\":\\\"2.4262016723130069\\\",\\\"TUNE\\\":\\\"0.0148025950000000\\\",\\\"UFO\\\":\\\"0.0000006479758500\\\",\\\"CYBER\\\":\\\"2.8755615000000001\\\",\\\"WILD\\\":\\\"0.2433782500000000\\\",\\\"POLS\\\":\\\"0.2809594500000000\\\",\\\"NYM\\\":\\\"0.0719640000000000\\\",\\\"FIL\\\":\\\"3.6786597500000005\\\",\\\"BAL\\\":\\\"2.0099945000000000\\\",\\\"SCA\\\":\\\"0.3999999000000000\\\",\\\"STND\\\":\\\"0.0133123405000000\\\",\\\"WMTX\\\":\\\"0.2138930000000000\\\",\\\"SCLP\\\":\\\"0.1545227000000000\\\",\\\"MANEKI\\\":\\\"0.0073963000000000\\\",\\\"BAT\\\":\\\"0.1721139000000000\\\",\\\"AKRO\\\":\\\"0.0042302838000000\\\",\\\"FTM3L\\\":\\\"8.2574692000000024\\\",\\\"BAX\\\":\\\"0.0000709645000000\\\",\\\"FTM3S\\\":\\\"0.0000255072400000\\\",\\\"COTI\\\":\\\"0.0951524000000000\\\"}}"; + "{\"code\":\"200000\",\"data\":{\"AGLD\":\"1.1174410000000001\",\"DFI\":\"0.0168915500000000\",\"PYTHUP\":\"0.0397880960000000\",\"ISLM\":\"0.0606196750000000\",\"NEAR\":\"4.7185395500000000\",\"AIOZ\":\"0.4862867350000000\",\"AUDIO\":\"0.1219390000000000\",\"BBL\":\"0.0067766100000000\",\"WLD\":\"2.2893547500000000\",\"HNT\":\"5.8990489999999984\",\"ETHFI\":\"1.5892050000000000\",\"DMAIL\":\"0.2726636000000000\",\"OPUP\":\"0.0986506500000000\",\"VET3S\":\"0.0003700448850000\",\"MANA3S\":\"0.0006056970000000\",\"TIDAL\":\"0.0001154422500000\",\"HALO\":\"0.0058270850000000\",\"OPUL\":\"0.0839480050000000\",\"MANA3L\":\"0.0029569407900000\",\"DGB\":\"0.0066556705000000\",\"AA\":\"0.2406796000000000\",\"BCH\":\"366.2167999999996484\",\"GMEE\":\"0.0113333305000000\",\"JST\":\"0.0302348750000000\",\"PBUX\":\"0.0208795550000000\",\"AR\":\"18.5457224999999909\",\"SEI\":\"0.4332832500000000\",\"PSTAKE\":\"0.0493153300000000\",\"LMWR\":\"0.1618190500000000\",\"UNFIDOWN\":\"0.0062058955000000\",\"BB\":\"0.3245376500000000\",\"JTO\":\"2.1239375000000002\",\"WEMIX\":\"0.7916040000000000\",\"G\":\"0.0324037900000000\",\"MARSH\":\"0.0617591050000000\",\"BN\":\"0.0036961510000000\",\"FLIP\":\"1.0976509000000000\",\"FLR\":\"0.0144827550000000\",\"BIGTIME\":\"0.1238780300000000\",\"FLY\":\"0.0005157420000000\",\"T\":\"0.0233483200000000\",\"W\":\"0.2865566500000000\",\"BDX\":\"0.0774012800000000\",\"BABYDOGE\":\"0.0000000029375305\",\"SFP\":\"0.7256370000000000\",\"DIA\":\"0.9179408000000000\",\"ISME\":\"0.0022388800000000\",\"LYM\":\"0.0010155919500000\",\"VET3L\":\"0.0000289755050000\",\"JUP\":\"0.8230882500000000\",\"LYX\":\"1.4501745500000001\",\"AIEPK\":\"0.0050094940000000\",\"SILLY\":\"0.0159420250000000\",\"SCPT\":\"0.0122038950000000\",\"WOO\":\"0.1796601250000000\",\"BLUR\":\"0.2462768000000000\",\"STRK\":\"0.3963117450000000\",\"BFC\":\"0.0383608100000000\",\"DC\":\"0.0003097450500000\",\"KARATE\":\"0.0007296350000000\",\"SUSHI3L\":\"0.5115441000000000\",\"NETVR\":\"0.0976111700000000\",\"WAVES\":\"1.0806594000000000\",\"LITH\":\"0.0001520239500000\",\"HAPI\":\"8.6533711499999987\",\"SUSHI3S\":\"1.2752620500000000\",\"CEEK\":\"0.0294852500000000\",\"FLOKI\":\"0.0001414292500000\",\"SHR\":\"0.0012463765000000\",\"SAND\":\"0.2566616050000000\",\"TURT\":\"0.0020889550000000\",\"UMA\":\"2.5207390000000000\",\"BEPRO\":\"0.0003955021500000\",\"SCRT\":\"0.1995002000000000\",\"TUSD\":\"0.9945025000000000\",\"COOKIE\":\"0.0220089900000000\",\"LRDS\":\"0.6218889000000000\",\"SIN\":\"0.0033633175000000\",\"OAS\":\"0.0331933950000000\",\"ROOT\":\"0.0183108400000000\",\"ADA3L\":\"0.0046396790000000\",\"TIAUP\":\"0.1228385500000000\",\"HTR\":\"0.0353023400000000\",\"UNB\":\"0.0003837080500000\",\"UNA\":\"0.0164917500000000\",\"HARD\":\"0.1087056200000000\",\"G3\":\"0.0502648550000000\",\"ADA3S\":\"0.0006191202850000\",\"MYRO\":\"0.1071863800000000\",\"HTX\":\"0.0000013693150000\",\"FT\":\"0.3585206500000000\",\"BTCDOWN\":\"0.1065467000000000\",\"UNI\":\"7.3571195999999993\",\"FX\":\"0.1379310000000000\",\"OBI\":\"0.0079030465000000\",\"UNO\":\"0.0137131400000000\",\"WRX\":\"0.1221389000000000\",\"TIADOWN\":\"0.0000914642450000\",\"ETHDOWN\":\"0.1306346500000000\",\"WELL\":\"0.0471244260000000\",\"SWFTC\":\"0.0028966509500000\",\"SKL\":\"0.0362418700000000\",\"UOS\":\"0.0867765900000000\",\"AIPAD\":\"0.0478660550000000\",\"BRETT\":\"0.1037481000000000\",\"SKY\":\"0.0520139800000000\",\"FRM\":\"0.0153123400000000\",\"VISION\":\"0.0014451770500000\",\"LENDS\":\"0.0047276350000000\",\"SLF\":\"0.3318340000000000\",\"BULL\":\"0.0023988000000000\",\"FLOW\":\"0.5372312500000000\",\"ODDZ\":\"0.0063368300000000\",\"SLN\":\"0.2804597000000000\",\"UPO\":\"0.0440779500000000\",\"SLP\":\"0.0023997995000000\",\"ID\":\"0.3718140000000000\",\"SLIM\":\"0.0906446550000000\",\"SPOT\":\"0.0021289350000000\",\"DOP\":\"0.0023028480000000\",\"ISSP\":\"0.0000874562500000\",\"UQC\":\"3.2339822000000003\",\"IO\":\"1.8185902499999999\",\"DOT\":\"4.2022978000000005\",\"1INCH\":\"0.2645676500000000\",\"SMH\":\"0.3448275000000000\",\"MAK\":\"0.0396701550000000\",\"TOKO\":\"0.0005923037000000\",\"TURBO\":\"0.0108085930000000\",\"UNFI\":\"2.8555714999999996\",\"MAN\":\"0.0210764565000000\",\"EVER\":\"0.0332733550000000\",\"FTM\":\"0.7259068650000000\",\"SHRAP\":\"0.0476361700000000\",\"MAV\":\"0.1738130500000000\",\"MAX\":\"0.2864966800000000\",\"DPR\":\"0.0018240875000000\",\"FTT\":\"2.0559715000000002\",\"ARKM\":\"1.7444273499999999\",\"ATOM\":\"4.2954512000000002\",\"PENDLE\":\"4.1554212500000007\",\"QUICK\":\"0.0365317250000000\",\"BLZ\":\"0.1217191100000000\",\"BOBA\":\"0.2014092450000000\",\"MBL\":\"0.0027856065000000\",\"OFN\":\"0.1252373500000000\",\"UNIO\":\"0.0025487250000000\",\"SNS\":\"0.0200899500000000\",\"SNX\":\"1.4282854999999999\",\"NXRA\":\"0.0272763550000000\",\"TAIKO\":\"1.4392800000000001\",\"AVAX3L\":\"0.1410875109550000\",\"L3\":\"0.0608395650000000\",\"API3\":\"1.3728132500000001\",\"XRP3S\":\"0.0028095945000000\",\"QKC\":\"0.0085157400000000\",\"AVAX3S\":\"0.5148424500000000\",\"ROSE\":\"0.0693453100000000\",\"SATS\":\"0.0000002701648500\",\"BMX\":\"0.3100449000000000\",\"PORTAL\":\"0.2811593500000000\",\"TOMI\":\"0.0309045400000000\",\"XRP3L\":\"2.1586201500000002\",\"SOL\":\"151.7250995000003583\",\"SON\":\"0.0002421788500000\",\"BNC\":\"0.1882058500000000\",\"SOCIAL\":\"0.0026486750000000\",\"CGPT\":\"0.1305147100000000\",\"CELR\":\"0.0127736100000000\",\"BNB\":\"591.0973035000118935\",\"OGN\":\"0.0852573500000000\",\"CELO\":\"0.7711142500000000\",\"AUCTION\":\"13.1634150000000014\",\"MANTA\":\"0.7564216000000000\",\"LAYER\":\"0.0372713550000000\",\"AERO\":\"1.3783104999999999\",\"CETUS\":\"0.1808295400000000\",\"LL\":\"0.0201199350000000\",\"SPA\":\"0.0067426270000000\",\"PYTHDOWN\":\"0.0011834080000000\",\"NEIROCTO\":\"0.0019964013000000\",\"UTK\":\"0.0365217300000000\",\"GMRX\":\"0.0007386305000000\",\"BOB\":\"0.0000380619595000\",\"HOTCROSS\":\"0.0056491740000000\",\"AERGO\":\"0.1007595950000000\",\"MOCA\":\"0.0783608000000000\",\"SQD\":\"0.0380809500000000\",\"MV\":\"0.0081359300000000\",\"BNB3L\":\"0.2761618500000000\",\"BNB3S\":\"0.0008545725000000\",\"GALAX3L\":\"0.0057571999600000\",\"KAI\":\"0.0020080954500000\",\"SQR\":\"0.0470764500000000\",\"GALAX3S\":\"0.1933033000000000\",\"EGLD\":\"25.5272299999999713\",\"ZBCN\":\"0.0010404795000000\",\"KAS\":\"0.1216691350000000\",\"MEW\":\"0.0086176890000000\",\"PUNDIX\":\"0.4130933500000000\",\"LOOKS\":\"0.0392803500000000\",\"FXS\":\"1.9060465000000000\",\"BOSON\":\"0.2732633000000000\",\"BRISE\":\"0.0000000860569500\",\"AEVO\":\"0.3388305000000000\",\"FLUX\":\"0.5276360500000000\",\"PRCL\":\"0.1969015000000000\",\"UNFIUP\":\"0.0011654170000000\",\"SEIDOWN\":\"0.0442778500000000\",\"DOAI\":\"0.0052363805000000\",\"QNT\":\"65.4312679999998206\",\"REDO\":\"0.2837580500000000\",\"STRIKE\":\"6.8225869999999997\",\"ETHW\":\"3.2418782499999998\",\"OM\":\"1.5396797750000000\",\"OP\":\"1.6911539999999999\",\"WHALE\":\"0.8134930500000000\",\"1CAT\":\"0.0018460765000000\",\"NEON\":\"0.4446775500000000\",\"GTAI\":\"0.7786105000000000\",\"SSV\":\"21.2393749999999841\",\"ETH2\":\"2601.6678843156403923\",\"KCS\":\"8.7646155000000020\",\"ARPA\":\"0.0393882960000000\",\"ARTFI\":\"0.0141029450000000\",\"BRL\":\"0.1742807323452485\",\"ALEX\":\"0.0924537500000000\",\"STG\":\"0.2943527500000000\",\"SHIB\":\"0.0000178060925000\",\"IOTX\":\"0.0394202800000000\",\"OLE\":\"0.0171414250000000\",\"KDA\":\"0.5653172000000000\",\"CERE\":\"0.0022548720000000\",\"DOCK\":\"0.0018990500000000\",\"STX\":\"1.8157916500000000\",\"OLT\":\"0.0007596200000000\",\"QI\":\"0.0131754090000000\",\"SDAO\":\"0.2748625000000000\",\"BLAST\":\"0.0087636160000000\",\"LINK3S\":\"0.0000702948350000\",\"IOST\":\"0.0049745115000000\",\"SUI\":\"2.0589700000000000\",\"CAKE\":\"1.7941024999999999\",\"BSW\":\"0.0586706500000000\",\"OMG\":\"0.2597700500000000\",\"VOLT\":\"0.0000002716641000\",\"LINK3L\":\"1.3408292499999999\",\"GEEQ\":\"0.0385607100000000\",\"PYUSD\":\"0.9988003500000000\",\"SUN\":\"0.0186106900000000\",\"TOWER\":\"0.0014812590000000\",\"BTC\":\"67133.4165000832051564\",\"IOTA\":\"0.1189405000000000\",\"REEF\":\"0.0019960015000000\",\"TRIAS\":\"3.3683149999999998\",\"KEY\":\"0.0037594713240047\",\"ETH3L\":\"0.0003305946200000\",\"BTT\":\"0.0000009117439000\",\"ONE\":\"0.0132003965000000\",\"RENDER\":\"5.2263854999999995\",\"ETH3S\":\"0.5517240000000000\",\"ANKR\":\"0.0264867500000000\",\"ALGO\":\"0.1188405500000000\",\"SYLO\":\"0.0007600198000000\",\"ZCX\":\"0.0784707450000000\",\"SD\":\"0.3851073500000000\",\"ONT\":\"0.1877960550000000\",\"MJT\":\"0.0132433750000000\",\"DYM\":\"1.6659666000000001\",\"DYP\":\"0.0205397250000000\",\"BAKEUP\":\"0.0389894955000000\",\"OOE\":\"0.0079360300000000\",\"ZELIX\":\"0.0000649675000000\",\"DOGE3L\":\"0.3837080500000000\",\"ARTY\":\"0.3980009000000000\",\"QORPO\":\"0.1204297550000000\",\"ICE\":\"0.0051504235000000\",\"NOTAI\":\"0.0000892753400000\",\"DOGE3S\":\"0.2291853500000000\",\"NAKA\":\"1.0695649500000000\",\"GALAX\":\"0.0212893500000000\",\"MKR\":\"1245.8767500000163833\",\"DODO\":\"0.1152423500000000\",\"ICP\":\"7.6731615000000027\",\"ZEC\":\"35.9400209999999543\",\"ZEE\":\"0.0065767100000000\",\"ICX\":\"0.1383308000000000\",\"KMNO\":\"0.0921499020000000\",\"TT\":\"0.0033883050000000\",\"DOT3L\":\"0.1454272500000000\",\"XAI\":\"0.2038980000000000\",\"ZEN\":\"8.0149905000000007\",\"DOGE\":\"0.1213093150000000\",\"ALPHA\":\"0.0567416150000000\",\"DUSK\":\"0.1964517250000000\",\"DOT3S\":\"0.0053613180000000\",\"SXP\":\"0.2538730000000000\",\"HBAR\":\"0.0510044850000000\",\"SYNT\":\"0.0467166300000000\",\"ZEX\":\"0.0571714000000000\",\"BONDLY\":\"0.0022208890000000\",\"MLK\":\"0.2080859050000000\",\"KICKS\":\"0.0001301249050000\",\"PEPE\":\"0.0000100249850000\",\"OUSD\":\"0.9982006500000000\",\"LUNCDOWN\":\"0.0000733333150000\",\"DOGS\":\"0.0007086455000000\",\"REV3L\":\"0.0094672640000000\",\"CTSI\":\"0.1257371000000000\",\"C98\":\"0.1219390000000000\",\"OSMO\":\"0.5370313500000000\",\"NTRN\":\"0.3869064500000000\",\"CFX2S\":\"0.0084757600000000\",\"SYN\":\"0.5636180500000000\",\"VIDT\":\"0.0308745550000000\",\"SYS\":\"0.0997501000000000\",\"GAS\":\"4.3029474500000008\",\"BOME\":\"0.0087336310000000\",\"COMBO\":\"0.4068964500000000\",\"XCH\":\"14.9825050000000010\",\"VR\":\"0.0063538215000000\",\"CFX2L\":\"0.0499660045000000\",\"VSYS\":\"0.0005201398000000\",\"PANDORA\":\"1629.2949450001102772\",\"THETA\":\"1.2461766000000000\",\"XCN\":\"0.0012699647000000\",\"NEXG\":\"0.0039180400000000\",\"MELOS\":\"0.0021244372500000\",\"XCV\":\"0.0013253370000000\",\"ORN\":\"0.8797599000000000\",\"WLKN\":\"0.0010624685000000\",\"AAVE\":\"154.2708259999996162\",\"MNT\":\"0.6168914000000000\",\"BONK\":\"0.0000227296295000\",\"PERP\":\"0.6037979500000000\",\"XDC\":\"0.0276361750000000\",\"MNW\":\"0.3681158500000000\",\"XDB\":\"0.0002578710000000\",\"BOND\":\"1.5662165000000000\",\"SUIA\":\"0.0809595000000000\",\"MOG\":\"0.0000019330330000\",\"SUTER\":\"0.0001840079500000\",\"TIME\":\"16.2648634999999969\",\"RACA\":\"0.0001949025000000\",\"BICO\":\"0.2021988500000000\",\"MON\":\"0.1066466500000000\",\"SWEAT\":\"0.0063718125000000\",\"MOXIE\":\"0.0022088950000000\",\"BABYBNB\":\"0.0289755050000000\",\"IGU\":\"0.0050674650000000\",\"HMSTR\":\"0.0037990995000000\",\"XEC\":\"0.0000354722550000\",\"MONI\":\"0.0058470750000000\",\"XR\":\"0.2374812000000000\",\"PEOPLE\":\"0.0796601500000000\",\"PUMLX\":\"0.0054572700000000\",\"ZIL\":\"0.0145927000000000\",\"WLDDOWN\":\"0.2089954500000000\",\"VAI\":\"0.0799999800000000\",\"XEN\":\"0.0000000839580000\",\"MPC\":\"0.1001499000000000\",\"XEM\":\"0.0176951480000000\",\"JASMY3S\":\"0.0019670160000000\",\"OTK\":\"0.0290464695000000\",\"TRAC\":\"0.4521738000000000\",\"DFYN\":\"0.0070664650000000\",\"BIDP\":\"0.0001939030000000\",\"JASMY3L\":\"0.0001653772700000\",\"INJDOWN\":\"0.0000194902500000\",\"KLV\":\"0.0019310340000000\",\"WAXL\":\"0.7858069000000000\",\"TRBDOWN\":\"0.0023138425000000\",\"BCH3L\":\"4.6390663064999996\",\"GMT3S\":\"0.0000457771000000\",\"KMD\":\"0.2493752500000000\",\"BCH3S\":\"0.9634180500000000\",\"ECOX\":\"0.0987506000000000\",\"AAVE3S\":\"0.0560719500000000\",\"GMT3L\":\"0.0053983694650000\",\"EPIK\":\"0.0045857060000000\",\"SUIP\":\"0.1067565950000000\",\"AAVE3L\":\"0.3638687346200000\",\"ZK\":\"0.1262368500000000\",\"ZKF\":\"0.0008595700000000\",\"OMNIA\":\"0.7624186000000000\",\"ZKJ\":\"1.1124435000000000\",\"ZKL\":\"0.1255372000000000\",\"GAFI\":\"3.0634675000000001\",\"CARV\":\"0.8703646000000000\",\"KNC\":\"0.4433782000000000\",\"CATS\":\"0.0000599700000000\",\"PROM\":\"5.2833570000000006\",\"ALEPH\":\"0.1756121500000000\",\"PONKE\":\"0.3958020000000000\",\"OVR\":\"0.1553223000000000\",\"CATI\":\"0.4105146400000000\",\"ORDER\":\"0.1183008200000000\",\"GFT\":\"0.0166616650000000\",\"BIFI\":\"0.0020489750000000\",\"GGC\":\"6.9965029985000000\",\"GGG\":\"0.0403798000000000\",\"DAPPX\":\"0.0043788095000000\",\"SUKU\":\"0.0618790450000000\",\"ULTI\":\"0.0168015950000000\",\"CREDI\":\"0.0192903500000000\",\"ERTHA\":\"0.0010014990000000\",\"FURY\":\"0.1405297000000000\",\"KARRAT\":\"0.5577210000000000\",\"MOBILE\":\"0.0009005495000000\",\"SIDUS\":\"0.0037671155000000\",\"NAVI\":\"0.1254672350000000\",\"TAO\":\"583.4081500000051807\",\"USDJ\":\"1.1386304000000001\",\"MTL\":\"0.9563216000000000\",\"VET\":\"0.0225387250000000\",\"FITFI\":\"0.0036421780000000\",\"USDT\":\"0.9995000000000000\",\"OXT\":\"0.0695652000000000\",\"CANDY\":\"0.0005597200000000\",\"USDP\":\"0.9932031500000000\",\"MTS\":\"0.0027516235000000\",\"TADA\":\"0.0283858000000000\",\"MTV\":\"0.0006559718500000\",\"NAVX\":\"0.1342228550000000\",\"ILV\":\"35.6771524999999671\",\"VINU\":\"0.0000000109045450\",\"GHX\":\"0.0903548000000000\",\"EDU\":\"0.5167415000000000\",\"HYVE\":\"0.0137331300000000\",\"BTC3L\":\"0.0058620675000000\",\"ANYONE\":\"0.9015490000000000\",\"BEAT\":\"0.0012593700000000\",\"KING\":\"0.0004821588000000\",\"CREAM\":\"15.6541689999999973\",\"CAS\":\"0.0038590695000000\",\"IMX\":\"1.4944524000000000\",\"CAT\":\"0.0000256981445000\",\"BTC3S\":\"0.0014142925000000\",\"USDE\":\"0.9985005000000000\",\"USDD\":\"1.0000997000000000\",\"CWAR\":\"0.0037981000000000\",\"USDC\":\"0.9997998500000000\",\"KRL\":\"0.3543127550000000\",\"INJ\":\"21.7691100000000194\",\"GAME\":\"0.0139630150000000\",\"TRIBL\":\"1.0994500000000000\",\"XLM\":\"0.0948525500000000\",\"TRBUP\":\"0.0012293850000000\",\"VRADOWN\":\"0.0013433280000000\",\"SUPER\":\"1.2853570000000000\",\"EIGEN\":\"3.1536223999999999\",\"IOI\":\"0.0146926500000000\",\"KSM\":\"17.5212350000000129\",\"CCD\":\"0.0034832575000000\",\"EGO\":\"0.0093553200000000\",\"EGP\":\"2.7946019999999998\",\"MXC\":\"0.0066866550000000\",\"TEL\":\"0.0014432780000000\",\"MOVR\":\"9.1340307000000027\",\"XMR\":\"155.5421899999990755\",\"MXM\":\"0.0092853550000000\",\"OORT\":\"0.1099949750000000\",\"GLM\":\"0.3231383500000000\",\"RAY\":\"2.0228880499999998\",\"XTAG\":\"0.0218190850000000\",\"GLQ\":\"0.0854572500000000\",\"CWEB\":\"0.0038480750000000\",\"REVU\":\"0.0105047450000000\",\"REVV\":\"0.0039760110000000\",\"ZRO\":\"3.7952014499999994\",\"XNL\":\"0.0093853050000000\",\"XNO\":\"0.8496749500000000\",\"SAROS\":\"0.0019290350000000\",\"KACE\":\"2.1165411999999998\",\"ZRX\":\"0.3186406000000000\",\"WLTH\":\"0.0374312750000000\",\"ATOM3L\":\"0.0321719060000000\",\"GMM\":\"0.0001497251000000\",\"BEER\":\"0.0000138670630000\",\"GMT\":\"0.1275362000000000\",\"HEART\":\"0.0159920000000000\",\"GMX\":\"22.7186349999999882\",\"ABBC\":\"0.0061769100000000\",\"OMNI\":\"8.9235359999999970\",\"ATOM3S\":\"0.0007945225400000\",\"IRL\":\"0.0099650150000000\",\"CFG\":\"0.3248375000000000\",\"WSDM\":\"0.0139830050000000\",\"GNS\":\"1.8390800000000001\",\"VANRY\":\"0.0809295150000000\",\"CFX\":\"0.1595202000000000\",\"GRAIL\":\"817.1212349999937891\",\"BEFI\":\"0.0175712100000000\",\"VELO\":\"0.0132043945000000\",\"XPR\":\"0.0008077959000000\",\"DOVI\":\"0.0584707500000000\",\"ACE\":\"0.0021349320000000\",\"ACH\":\"0.0190534685000000\",\"ISP\":\"0.0012161916000000\",\"XCAD\":\"0.2834582000000000\",\"MINA\":\"0.5630183500000000\",\"TIA\":\"5.9318325999999999\",\"DRIFT\":\"0.4350823500000000\",\"ACQ\":\"0.0056981495000000\",\"ACS\":\"0.0014917537500000\",\"MIND\":\"0.0018920535000000\",\"STORE\":\"0.0062358805000000\",\"REN\":\"0.0351224300000000\",\"ELA\":\"1.7282354500000000\",\"DREAMS\":\"0.0002498750000000\",\"ADA\":\"0.3463267500000000\",\"ELF\":\"0.3777110500000000\",\"REQ\":\"0.0959919800000000\",\"STORJ\":\"0.5662167500000000\",\"LADYS\":\"0.0000000837581000\",\"PAXG\":\"2697.9303600003123340\",\"REZ\":\"0.0409795000000000\",\"XRD\":\"0.0157821050000000\",\"CHO\":\"0.0205097400000000\",\"CHR\":\"0.1769115000000000\",\"ADS\":\"0.1889055000000000\",\"CHZ\":\"0.0738030800000000\",\"ADX\":\"0.1575212000000000\",\"XRP\":\"0.5525036100000000\",\"JASMY\":\"0.0188615645000000\",\"KAGI\":\"0.1834582250000000\",\"FIDA\":\"0.2282858000000000\",\"PBR\":\"0.0291953950000000\",\"AEG\":\"0.0093453250000000\",\"H2O\":\"0.1610194500000000\",\"CHMB\":\"0.0001715641750000\",\"SAND3L\":\"0.0015447972150000\",\"PBX\":\"0.0006879558500000\",\"SOLVE\":\"0.0084557700000000\",\"DECHAT\":\"0.1512243500000000\",\"GARI\":\"0.0076861550000000\",\"SHIB2L\":\"1.1996998499999999\",\"SHIB2S\":\"0.0240879500000000\",\"ENA\":\"0.3942028000000000\",\"VEMP\":\"0.0029335325000000\",\"ENJ\":\"0.1467266000000000\",\"AFG\":\"0.0072163900000000\",\"RATS\":\"0.0001211593900000\",\"GRT\":\"0.1646076550000000\",\"FORWARD\":\"0.0012873560000000\",\"TFUEL\":\"0.0598800450000000\",\"ENS\":\"17.0634640000000052\",\"KASDOWN\":\"0.0258770550000000\",\"XTM\":\"0.0251074400000000\",\"DEGEN\":\"0.0084857550000000\",\"TLM\":\"0.0100449750000000\",\"DYDXDOWN\":\"0.1042598440000000\",\"CKB\":\"0.0146026950000000\",\"LUNC\":\"0.0000889255150000\",\"AURORA\":\"0.1204397500000000\",\"LUNA\":\"0.3624187000000000\",\"XTZ\":\"0.6776610000000000\",\"ELON\":\"0.0000001410294500\",\"DMTR\":\"0.0891554000000000\",\"EOS\":\"0.4759619000000000\",\"GST\":\"0.0118940500000000\",\"FORT\":\"0.1155422000000000\",\"FLAME\":\"0.0247076400000000\",\"PATEX\":\"0.9605195000000000\",\"DEEP\":\"0.0328885475000000\",\"ID3L\":\"0.0016201895000000\",\"GTC\":\"0.6625685500000000\",\"ID3S\":\"0.0071674145000000\",\"RIO\":\"0.7616190000000000\",\"CLH\":\"0.0008555720000000\",\"BURGER\":\"0.4016990500000000\",\"VRA\":\"0.0029765110000000\",\"SUNDOG\":\"0.2173912500000000\",\"GTT\":\"0.0002038980000000\",\"INJUP\":\"0.2327835500000000\",\"CPOOL\":\"0.1557720750000000\",\"EPX\":\"0.0000740629500000\",\"CLV\":\"0.0329835000000000\",\"FEAR\":\"0.0560519600000000\",\"MEME\":\"0.0124847545000000\",\"ROOBEE\":\"0.0004520738500000\",\"DEFI\":\"0.0192903500000000\",\"TOKEN\":\"0.0477361200000000\",\"GRAPE\":\"0.0020599695000000\",\"KASUP\":\"0.3996001000000000\",\"XWG\":\"0.0003843077500000\",\"SKEY\":\"0.0621289200000000\",\"SFUND\":\"1.3243375000000000\",\"EQX\":\"0.0032823580000000\",\"ORDIUP\":\"0.0548315705000000\",\"TON\":\"5.1857058499999995\",\"DEGO\":\"2.2667660500000001\",\"IZI\":\"0.0088455750000000\",\"ERG\":\"0.6605695500000000\",\"ERN\":\"1.9255367500000001\",\"VENOM\":\"0.0817591000000000\",\"VOXEL\":\"0.1497251000000000\",\"RLC\":\"1.4649671500000000\",\"PHA\":\"0.1093453000000000\",\"DYDXUP\":\"0.0112573685000000\",\"APE3S\":\"0.0008475760000000\",\"ORBS\":\"0.0288955450000000\",\"OPDOWN\":\"0.6758619000000000\",\"ESE\":\"0.0139130400000000\",\"APE3L\":\"0.1339330000000000\",\"HMND\":\"0.0982208650000000\",\"COQ\":\"0.0000014432780000\",\"AURY\":\"0.3340329000000000\",\"CULT\":\"0.0000028025980000\",\"AKT\":\"2.4642672500000001\",\"GLMR\":\"0.1606196500000000\",\"XYM\":\"0.0142528700000000\",\"ORAI\":\"6.1769100000000012\",\"XYO\":\"0.0058680645000000\",\"ETC\":\"18.8458723500000169\",\"LAI\":\"0.0142828550000000\",\"PIP\":\"0.0178310800000000\",\"ETH\":\"2607.6655149998362673\",\"NEO\":\"10.3575186499999991\",\"RMV\":\"0.0081659150000000\",\"KLAY\":\"0.1251374000000000\",\"PIT\":\"0.0000000003268365\",\"TARA\":\"0.0043978000000000\",\"KALT\":\"0.1128735350000000\",\"PIX\":\"0.0001023687900000\",\"ETN\":\"0.0021579205000000\",\"CSIX\":\"0.0141729100000000\",\"TRADE\":\"0.4708644500000000\",\"MAVIA\":\"1.3592200500000001\",\"HIGH\":\"1.3043474999999999\",\"TRB\":\"62.5387150000000006\",\"ORDI\":\"35.7421200000000126\",\"TRVL\":\"0.0373643085000000\",\"AMB\":\"0.0059670150000000\",\"TRU\":\"0.0762018800000000\",\"LOGX\":\"0.0271963950000000\",\"FINC\":\"0.0362018900000000\",\"INFRA\":\"0.1978010500000000\",\"NATIX\":\"0.0008729633000000\",\"NFP\":\"0.2152923000000000\",\"TRY\":\"0.0292166033323590\",\"TRX\":\"0.1597201000000000\",\"LBP\":\"0.0001243378000000\",\"LBR\":\"0.0595702000000000\",\"EUL\":\"2.9735125000000000\",\"NFT\":\"0.0000004077960000\",\"SEIUP\":\"0.0478110825000000\",\"PUFFER\":\"0.3676161000000000\",\"EUR\":\"1.0811249323958897\",\"ORCA\":\"2.0664662499999999\",\"NEAR3L\":\"0.0117010765350000\",\"AMP\":\"0.0038330825000000\",\"XDEFI\":\"0.0472563600000000\",\"HIFI\":\"0.4947525000000000\",\"TRUF\":\"0.0459570100000000\",\"AITECH\":\"0.1045477000000000\",\"AMU\":\"0.0043978000000000\",\"USTC\":\"0.0214692600000000\",\"KNGL\":\"0.0499750000000000\",\"FOXY\":\"0.0102686631000000\",\"NGC\":\"0.0147935995000000\",\"TENET\":\"0.0043278350000000\",\"NEAR3S\":\"0.0072553705000000\",\"MAHA\":\"1.1904045000000000\",\"NGL\":\"0.0701748950000000\",\"TST\":\"0.0080359800000000\",\"HIPPO\":\"0.0104447750000000\",\"AXS3S\":\"0.0308705570000000\",\"CRO\":\"0.0781409100000000\",\"ZPAY\":\"0.0050574700000000\",\"MNDE\":\"0.1026786350000000\",\"CRV\":\"0.2534732000000000\",\"SWASH\":\"0.0056271850000000\",\"AXS3L\":\"0.0106388779000000\",\"VERSE\":\"0.0001803098000000\",\"RPK\":\"0.0049975000000000\",\"RPL\":\"10.9745099999999958\",\"AZERO\":\"0.3789104500000000\",\"SOUL\":\"0.0534332700000000\",\"VXV\":\"0.2619689500000000\",\"LDO\":\"1.0885554500000000\",\"MAGIC\":\"0.3390304000000000\",\"ALICE\":\"1.0324835000000000\",\"SEAM\":\"1.1933030499999999\",\"PLU\":\"1.9300345000000001\",\"AOG\":\"0.0031224380000000\",\"SMOLE\":\"0.0000387806000000\",\"EWT\":\"1.1094450000000000\",\"TSUGT\":\"0.0029185400000000\",\"PMG\":\"0.0800599500000000\",\"OPAI\":\"0.0006826585000000\",\"LOCUS\":\"0.0216591650000000\",\"CTA\":\"0.0825087250000000\",\"NIM\":\"0.0013673160000000\",\"CTC\":\"0.4033982000000000\",\"APE\":\"0.7035480500000000\",\"MERL\":\"0.2720639000000000\",\"JAM\":\"0.0004770613500000\",\"CTI\":\"0.0130314810000000\",\"APP\":\"0.0021989000000000\",\"APT\":\"9.9947001500000000\",\"WLDUP\":\"0.0093043455000000\",\"ZEND\":\"0.1280759300000000\",\"FIRE\":\"0.9113441000000000\",\"DENT\":\"0.0008630682500000\",\"PYTH\":\"0.3390603850000000\",\"LFT\":\"0.0155322300000000\",\"DPET\":\"0.0319040400000000\",\"ORDIDOWN\":\"0.3788105000000000\",\"KPOL\":\"0.0029175405000000\",\"ETHUP\":\"8.4971493000000032\",\"BAND\":\"1.0939527500000001\",\"POL\":\"0.3656171000000000\",\"ASTR\":\"0.0582608550000000\",\"NKN\":\"0.0691654000000000\",\"RSR\":\"0.0068055955000000\",\"DVPN\":\"0.0005979009000000\",\"TWT\":\"1.1119437500000000\",\"ARB\":\"0.5510243500000000\",\"CVC\":\"0.1409801746501747\",\"ARC\":\"0.0300849500000000\",\"XETA\":\"0.0022888550000000\",\"MTRG\":\"0.4007995000000000\",\"LOKA\":\"0.1867066000000000\",\"LPOOL\":\"0.0660069800000000\",\"TURBOS\":\"0.0034812585000000\",\"CVX\":\"1.7816087499999999\",\"ARX\":\"0.0007556220000000\",\"MPLX\":\"0.4355221300000000\",\"SUSHI\":\"0.7011492500000000\",\"NLK\":\"0.0114442750000000\",\"PEPE2\":\"0.0000000313843000\",\"WBTC\":\"66881.4425499645548419\",\"SUI3L\":\"0.0211204345000000\",\"CWS\":\"0.1927036000000000\",\"SUI3S\":\"0.0000579110300000\",\"INSP\":\"0.0264167850000000\",\"MANA\":\"0.2945026750000000\",\"VRTX\":\"0.0641679000000000\",\"CSPR\":\"0.0116441750000000\",\"ATA\":\"0.0785007300000000\",\"OPEN\":\"0.0080049955000000\",\"HAI\":\"0.0448275750000000\",\"NMR\":\"14.7436245000000072\",\"ATH\":\"0.0540929400000000\",\"LIT\":\"0.6282857000000000\",\"TLOS\":\"0.3263467450000000\",\"TNSR\":\"0.3662168000000000\",\"CXT\":\"0.0871364100000000\",\"POLYX\":\"0.2346826000000000\",\"ZERO\":\"0.0002507745500000\",\"ROUTE\":\"0.0610694500000000\",\"LOOM\":\"0.0580009850000000\",\"PRE\":\"0.0078680640000000\",\"VRAUP\":\"0.0134652640000000\",\"HBB\":\"0.0714742450000000\",\"RVN\":\"0.0165017450000000\",\"PRQ\":\"0.0715741950000000\",\"ONDO\":\"0.7134930750000000\",\"PEPEDOWN\":\"0.0000155022450000\",\"WOOP\":\"0.0020179905000000\",\"LUNCUP\":\"0.0168355780000000\",\"KAVA\":\"0.3522238000000000\",\"LKI\":\"0.0104187880000000\",\"AVA\":\"0.4857570000000000\",\"NOM\":\"0.0233883000000000\",\"MAPO\":\"0.0089015470000000\",\"PEPEUP\":\"0.0114252845000000\",\"STRAX\":\"0.0487156300000000\",\"NOT\":\"0.0078670645000000\",\"ZERC\":\"0.1108245600000000\",\"BCUT\":\"0.0255672100000000\",\"MASA\":\"0.0691354150000000\",\"WAN\":\"0.1785077544737212\",\"WAT\":\"0.0003273762300000\",\"WAX\":\"0.0327636100000000\",\"MASK\":\"2.2259864500000002\",\"EOS3L\":\"0.0002122138400000\",\"IDEA\":\"0.0005887055000000\",\"EOS3S\":\"0.0034472755000000\",\"YFI\":\"4919.4290549999908843\",\"MOODENG\":\"0.0774612500000000\",\"XCUR\":\"0.0048845565000000\",\"HYDRA\":\"0.2225886500000000\",\"POPCAT\":\"1.3382305500000000\",\"LQTY\":\"0.7848074000000000\",\"PIXEL\":\"0.1406596350000000\",\"LMR\":\"0.0145437245000000\",\"ZETA\":\"0.5997999500000000\",\"YGG\":\"0.4717640000000000\",\"AXS\":\"4.6006985000000006\",\"BCHSV\":\"49.8250749999999370\",\"NRN\":\"0.0395802000000000\",\"FTON\":\"0.0091954000000000\",\"COMP\":\"43.6581599999999881\",\"XPRT\":\"0.1819090000000000\",\"HFT\":\"0.1443278000000000\",\"UXLINK\":\"0.5085456000000000\",\"STAMP\":\"0.0335032400000000\",\"RUNE\":\"4.9233370999999996\",\"ZEUS\":\"0.2587705500000000\",\"LTC3L\":\"1.8294848000000001\",\"DAPP\":\"0.1763118000000000\",\"FORTH\":\"2.9508238500000004\",\"ALPINE\":\"1.5322335000000000\",\"SENSO\":\"0.0328835500000000\",\"LTC3S\":\"0.0006986505000000\",\"DEXE\":\"8.3795081500000028\",\"GOAL\":\"0.0175912000000000\",\"AVAX\":\"27.5602130000000058\",\"LISTA\":\"0.3782108000000000\",\"AMPL\":\"1.3743124999999999\",\"WORK\":\"0.1384307500000000\",\"BRWL\":\"0.0017391300000000\",\"BANANA\":\"57.1314200000001362\",\"PUSH\":\"0.0750624500000000\",\"WEN\":\"0.0001015492000000\",\"NEIRO\":\"0.0879560000000000\",\"BTCUP\":\"34.7711057499999789\",\"SOL3S\":\"0.0007816090000000\",\"BRAWL\":\"0.0004776610500000\",\"LAY3R\":\"0.2161918500000000\",\"LPT\":\"11.9304317999999945\",\"GODS\":\"0.1807096000000000\",\"SAND3S\":\"4.6152911999999992\",\"RDNT\":\"0.0640679500000000\",\"SOL3L\":\"1.8351913752850000\",\"NIBI\":\"0.0653772950000000\",\"NUM\":\"0.0436181800000000\",\"PYR\":\"2.5590198499999997\",\"DAG\":\"0.0226176855000000\",\"DAI\":\"0.9989006596042375\",\"HIP\":\"0.0034982500000000\",\"DAO\":\"0.2848575000000000\",\"AVAIL\":\"0.1300929210000000\",\"DAR\":\"0.1512243500000000\",\"FET\":\"1.3760116500000000\",\"FCON\":\"0.0001197600900000\",\"XAVA\":\"0.3789104500000000\",\"LRC\":\"0.1208395500000000\",\"UNI3S\":\"0.0000653573050000\",\"PZP\":\"0.0599600050000000\",\"POKT\":\"0.0424787500000000\",\"DASH\":\"23.6881500000000109\",\"BAKEDOWN\":\"0.0003324636850000\",\"POLC\":\"0.0061389290000000\",\"DBR\":\"0.0377671070000000\",\"CIRUS\":\"0.0055772100000000\",\"UNI3L\":\"0.0993921490650000\",\"NWC\":\"0.0681659000000000\",\"POLK\":\"0.0142628650000000\",\"LSD\":\"0.9420287500000000\",\"MARS4\":\"0.0005878059500000\",\"LSK\":\"0.8080957500000000\",\"BLOCK\":\"0.0261869000000000\",\"ANALOS\":\"0.0000446776500000\",\"SAFE\":\"0.8779608000000000\",\"DCK\":\"0.0234082900000000\",\"LSS\":\"0.0562718500000000\",\"DCR\":\"12.4337799999999929\",\"LIKE\":\"0.0559720000000000\",\"DATA\":\"0.0361819000000000\",\"WIF\":\"2.5696145499999999\",\"BLOK\":\"0.0006546725000000\",\"LTC\":\"71.6261690000000611\",\"METIS\":\"42.0289750000000612\",\"WIN\":\"0.0000868365600000\",\"HLG\":\"0.0018790600000000\",\"LTO\":\"0.1166116650000000\",\"DYDX\":\"0.9341327000000000\",\"ARB3S\":\"0.0509025360000000\",\"MUBI\":\"0.0303848000000000\",\"ARB3L\":\"0.0025917035000000\",\"RBTC1\":\"0.0000039480250000\",\"POND\":\"0.0118640650000000\",\"LINA\":\"0.0037771105000000\",\"MYRIA\":\"0.0025337325000000\",\"LINK\":\"11.0244849999999944\",\"QTUM\":\"2.4262016723130069\",\"TUNE\":\"0.0148025950000000\",\"UFO\":\"0.0000006479758500\",\"CYBER\":\"2.8755615000000001\",\"WILD\":\"0.2433782500000000\",\"POLS\":\"0.2809594500000000\",\"NYM\":\"0.0719640000000000\",\"FIL\":\"3.6786597500000005\",\"BAL\":\"2.0099945000000000\",\"SCA\":\"0.3999999000000000\",\"STND\":\"0.0133123405000000\",\"WMTX\":\"0.2138930000000000\",\"SCLP\":\"0.1545227000000000\",\"MANEKI\":\"0.0073963000000000\",\"BAT\":\"0.1721139000000000\",\"AKRO\":\"0.0042302838000000\",\"FTM3L\":\"8.2574692000000024\",\"BAX\":\"0.0000709645000000\",\"FTM3S\":\"0.0000255072400000\",\"COTI\":\"0.0951524000000000\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** get24hrStats Request Get 24hr Stats /api/v1/market/stats */ public static void testGet24hrStatsRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\"}"; Get24hrStatsReq obj = mapper.readValue(data, Get24hrStatsReq.class); } /** get24hrStats Response Get 24hr Stats /api/v1/market/stats */ public static void testGet24hrStatsResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"time\\\":1729175612158,\\\"symbol\\\":\\\"BTC-USDT\\\",\\\"buy\\\":\\\"66982.4\\\",\\\"sell\\\":\\\"66982.5\\\",\\\"changeRate\\\":\\\"-0.0114\\\",\\\"changePrice\\\":\\\"-778.1\\\",\\\"high\\\":\\\"68107.7\\\",\\\"low\\\":\\\"66683.3\\\",\\\"vol\\\":\\\"1738.02898182\\\",\\\"volValue\\\":\\\"117321982.415978333\\\",\\\"last\\\":\\\"66981.5\\\",\\\"averagePrice\\\":\\\"67281.21437289\\\",\\\"takerFeeRate\\\":\\\"0.001\\\",\\\"makerFeeRate\\\":\\\"0.001\\\",\\\"takerCoefficient\\\":\\\"1\\\",\\\"makerCoefficient\\\":\\\"1\\\"}}"; + "{\"code\":\"200000\",\"data\":{\"time\":1729175612158,\"symbol\":\"BTC-USDT\",\"buy\":\"66982.4\",\"sell\":\"66982.5\",\"changeRate\":\"-0.0114\",\"changePrice\":\"-778.1\",\"high\":\"68107.7\",\"low\":\"66683.3\",\"vol\":\"1738.02898182\",\"volValue\":\"117321982.415978333\",\"last\":\"66981.5\",\"averagePrice\":\"67281.21437289\",\"takerFeeRate\":\"0.001\",\"makerFeeRate\":\"0.001\",\"takerCoefficient\":\"1\",\"makerCoefficient\":\"1\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -651,8 +650,8 @@ public static void testGetMarketListRequest() throws Exception { /** getMarketList Response Get Market List /api/v1/markets */ public static void testGetMarketListResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":[\\\"USDS\\\",\\\"TON\\\",\\\"AI\\\",\\\"DePIN\\\",\\\"PoW\\\",\\\"BRC-20\\\",\\\"ETF\\\",\\\"KCS\\\",\\\"Meme\\\",\\\"Solana\\\",\\\"FIAT\\\",\\\"VR&AR\\\",\\\"DeFi\\\",\\\"Polkadot\\\",\\\"BTC\\\",\\\"ALTS\\\",\\\"Layer" - + " 1\\\"]}"; + "{\"code\":\"200000\",\"data\":[\"USDS\",\"TON\",\"AI\",\"DePIN\",\"PoW\",\"BRC-20\",\"ETF\",\"KCS\",\"Meme\",\"Solana\",\"FIAT\",\"VR&AR\",\"DeFi\",\"Polkadot\",\"BTC\",\"ALTS\",\"Layer" + + " 1\"]}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -664,7 +663,7 @@ public static void testGetClientIPAddressRequest() throws Exception { /** getClientIPAddress Response Get Client IP Address /api/v1/my-ip */ public static void testGetClientIPAddressResponse() throws Exception { - String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":\\\"20.***.***.128\\\"}"; + String data = "{\"code\":\"200000\",\"data\":\"20.***.***.128\"}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -676,7 +675,7 @@ public static void testGetServerTimeRequest() throws Exception { /** getServerTime Response Get Server Time /api/v1/timestamp */ public static void testGetServerTimeResponse() throws Exception { - String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":1729100692873}"; + String data = "{\"code\":\"200000\",\"data\":1729100692873}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -688,8 +687,7 @@ public static void testGetServiceStatusRequest() throws Exception { /** getServiceStatus Response Get Service Status /api/v1/status */ public static void testGetServiceStatusResponse() throws Exception { - String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"status\\\":\\\"open\\\",\\\"msg\\\":\\\"\\\"}}"; + String data = "{\"code\":\"200000\",\"data\":{\"status\":\"open\",\"msg\":\"\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -702,21 +700,21 @@ public static void testGetPublicTokenRequest() throws Exception { /** getPublicToken Response Get Public Token - Spot/Margin /api/v1/bullet-public */ public static void testGetPublicTokenResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"token\\\":" - + " \\\"2neAiuYvAU61ZDXANAGAsiL4-iAExhsBXZxftpOeh_55i3Ysy2q2LEsEWU64mdzUOPusi34M_wGoSf7iNyEWJ93g2WHl-j4M7tCZ_S21PuIByWXUJFDywtiYB9J6i9GjsxUuhPw3Blq6rhZlGykT3Vp1phUafnulOOpts-MEmEF-3bpfetLOAq79RbGaLlE4JBvJHl5Vs9Y=.ymP9jIr6v-vucrZr8761yA==\\\",\\n" - + " \\\"instanceServers\\\": [\\n" - + " {\\n" - + " \\\"endpoint\\\": \\\"wss://ws-api-spot.kucoin.com/\\\",\\n" - + " \\\"encrypt\\\": true,\\n" - + " \\\"protocol\\\": \\\"websocket\\\",\\n" - + " \\\"pingInterval\\\": 18000,\\n" - + " \\\"pingTimeout\\\": 10000\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"token\":" + + " \"2neAiuYvAU61ZDXANAGAsiL4-iAExhsBXZxftpOeh_55i3Ysy2q2LEsEWU64mdzUOPusi34M_wGoSf7iNyEWJ93g2WHl-j4M7tCZ_S21PuIByWXUJFDywtiYB9J6i9GjsxUuhPw3Blq6rhZlGykT3Vp1phUafnulOOpts-MEmEF-3bpfetLOAq79RbGaLlE4JBvJHl5Vs9Y=.ymP9jIr6v-vucrZr8761yA==\",\n" + + " \"instanceServers\": [\n" + + " {\n" + + " \"endpoint\": \"wss://ws-api-spot.kucoin.com/\",\n" + + " \"encrypt\": true,\n" + + " \"protocol\": \"websocket\",\n" + + " \"pingInterval\": 18000,\n" + + " \"pingTimeout\": 10000\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -730,21 +728,21 @@ public static void testGetPrivateTokenRequest() throws Exception { /** getPrivateToken Response Get Private Token - Spot/Margin /api/v1/bullet-private */ public static void testGetPrivateTokenResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"token\\\":" - + " \\\"2neAiuYvAU737TOajb2U3uT8AEZqSWYe0fBD4LoHuXJDSC7gIzJiH4kNTWhCPISWo6nDpAe7aUaaHJ4fG8oRjFgMfUI2sM4IySWHrBceFocY8pKy2REU1HwZIngtMdMrjqPnP-biofFWbNaP1cl0X1pZc2SQ-33hDH1LgNP-yg80ZJv_Ctaj8sAFhTOZ8m1L.jut4vBQxXAseWKxODdGVGg==\\\",\\n" - + " \\\"instanceServers\\\": [\\n" - + " {\\n" - + " \\\"endpoint\\\": \\\"wss://ws-api-spot.kucoin.com/\\\",\\n" - + " \\\"encrypt\\\": true,\\n" - + " \\\"protocol\\\": \\\"websocket\\\",\\n" - + " \\\"pingInterval\\\": 18000,\\n" - + " \\\"pingTimeout\\\": 10000\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"token\":" + + " \"2neAiuYvAU737TOajb2U3uT8AEZqSWYe0fBD4LoHuXJDSC7gIzJiH4kNTWhCPISWo6nDpAe7aUaaHJ4fG8oRjFgMfUI2sM4IySWHrBceFocY8pKy2REU1HwZIngtMdMrjqPnP-biofFWbNaP1cl0X1pZc2SQ-33hDH1LgNP-yg80ZJv_Ctaj8sAFhTOZ8m1L.jut4vBQxXAseWKxODdGVGg==\",\n" + + " \"instanceServers\": [\n" + + " {\n" + + " \"endpoint\": \"wss://ws-api-spot.kucoin.com/\",\n" + + " \"encrypt\": true,\n" + + " \"protocol\": \"websocket\",\n" + + " \"pingInterval\": 18000,\n" + + " \"pingTimeout\": 10000\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -805,6 +803,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -826,6 +825,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiAutoGeneratedTest.java index 85b616aa..04b3d611 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiAutoGeneratedTest.java @@ -11,19 +11,21 @@ class OrderApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** addOrder Request Add Order /api/v1/hf/orders */ public static void testAddOrderRequest() throws Exception { String 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\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493fb\", \"remark\":" + + " \"order remarks\"}"; AddOrderReq obj = mapper.readValue(data, AddOrderReq.class); } /** addOrder Response Add Order /api/v1/hf/orders */ public static void testAddOrderResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"orderId\\\":\\\"670fd33bf9406e0007ab3945\\\",\\\"clientOid\\\":\\\"5c52e11203aa677f33e493fb\\\"}}"; + "{\"code\":\"200000\",\"data\":{\"orderId\":\"670fd33bf9406e0007ab3945\",\"clientOid\":\"5c52e11203aa677f33e493fb\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -31,16 +33,16 @@ public static void testAddOrderResponse() throws Exception { /** addOrderSync Request Add Order Sync /api/v1/hf/orders/sync */ public static void testAddOrderSyncRequest() throws Exception { String data = - "{\\\"type\\\": \\\"limit\\\", \\\"symbol\\\": \\\"BTC-USDT\\\", \\\"side\\\": \\\"buy\\\"," - + " \\\"price\\\": \\\"50000\\\", \\\"size\\\": \\\"0.00001\\\", \\\"clientOid\\\":" - + " \\\"5c52e11203aa677f33e493f\\\", \\\"remark\\\": \\\"order remarks\\\"}"; + "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493f\", \"remark\":" + + " \"order remarks\"}"; AddOrderSyncReq obj = mapper.readValue(data, AddOrderSyncReq.class); } /** addOrderSync Response Add Order Sync /api/v1/hf/orders/sync */ public static void testAddOrderSyncResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"orderId\\\":\\\"67111a7cb7cbdf000703e1f6\\\",\\\"clientOid\\\":\\\"5c52e11203aa677f33e493f\\\",\\\"orderTime\\\":1729174140586,\\\"originSize\\\":\\\"0.00001\\\",\\\"dealSize\\\":\\\"0\\\",\\\"remainSize\\\":\\\"0.00001\\\",\\\"canceledSize\\\":\\\"0\\\",\\\"status\\\":\\\"open\\\",\\\"matchTime\\\":1729174140588}}"; + "{\"code\":\"200000\",\"data\":{\"orderId\":\"67111a7cb7cbdf000703e1f6\",\"clientOid\":\"5c52e11203aa677f33e493f\",\"orderTime\":1729174140586,\"originSize\":\"0.00001\",\"dealSize\":\"0\",\"remainSize\":\"0.00001\",\"canceledSize\":\"0\",\"status\":\"open\",\"matchTime\":1729174140588}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -48,16 +50,16 @@ public static void testAddOrderSyncResponse() throws Exception { /** addOrderTest Request Add Order Test /api/v1/hf/orders/test */ public static void testAddOrderTestRequest() throws Exception { String data = - "{\\\"type\\\": \\\"limit\\\", \\\"symbol\\\": \\\"BTC-USDT\\\", \\\"side\\\": \\\"buy\\\"," - + " \\\"price\\\": \\\"50000\\\", \\\"size\\\": \\\"0.00001\\\", \\\"clientOid\\\":" - + " \\\"5c52e11203aa677f33e493f\\\", \\\"remark\\\": \\\"order remarks\\\"}"; + "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493f\", \"remark\":" + + " \"order remarks\"}"; AddOrderTestReq obj = mapper.readValue(data, AddOrderTestReq.class); } /** addOrderTest Response Add Order Test /api/v1/hf/orders/test */ public static void testAddOrderTestResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"orderId\\\":\\\"670fd33bf9406e0007ab3945\\\",\\\"clientOid\\\":\\\"5c52e11203aa677f33e493fb\\\"}}"; + "{\"code\":\"200000\",\"data\":{\"orderId\":\"670fd33bf9406e0007ab3945\",\"clientOid\":\"5c52e11203aa677f33e493fb\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -65,31 +67,30 @@ public static void testAddOrderTestResponse() throws Exception { /** batchAddOrders Request Batch Add Orders /api/v1/hf/orders/multi */ public static void testBatchAddOrdersRequest() throws Exception { String data = - "{\\\"orderList\\\": [{\\\"clientOid\\\": \\\"client order id 12\\\", \\\"symbol\\\":" - + " \\\"BTC-USDT\\\", \\\"type\\\": \\\"limit\\\", \\\"side\\\": \\\"buy\\\"," - + " \\\"price\\\": \\\"30000\\\", \\\"size\\\": \\\"0.00001\\\"}, {\\\"clientOid\\\":" - + " \\\"client order id 13\\\", \\\"symbol\\\": \\\"ETH-USDT\\\", \\\"type\\\":" - + " \\\"limit\\\", \\\"side\\\": \\\"sell\\\", \\\"price\\\": \\\"2000\\\"," - + " \\\"size\\\": \\\"0.00001\\\"}]}"; + "{\"orderList\": [{\"clientOid\": \"client order id 12\", \"symbol\": \"BTC-USDT\"," + + " \"type\": \"limit\", \"side\": \"buy\", \"price\": \"30000\", \"size\":" + + " \"0.00001\"}, {\"clientOid\": \"client order id 13\", \"symbol\": \"ETH-USDT\"," + + " \"type\": \"limit\", \"side\": \"sell\", \"price\": \"2000\", \"size\":" + + " \"0.00001\"}]}"; BatchAddOrdersReq obj = mapper.readValue(data, BatchAddOrdersReq.class); } /** batchAddOrders Response Batch Add Orders /api/v1/hf/orders/multi */ public static void testBatchAddOrdersResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"orderId\\\": \\\"6710d8336afcdb0007319c27\\\",\\n" - + " \\\"clientOid\\\": \\\"client order id 12\\\",\\n" - + " \\\"success\\\": true\\n" - + " },\\n" - + " {\\n" - + " \\\"success\\\": false,\\n" - + " \\\"failMsg\\\": \\\"The order funds should more then 0.1 USDT.\\\"\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"orderId\": \"6710d8336afcdb0007319c27\",\n" + + " \"clientOid\": \"client order id 12\",\n" + + " \"success\": true\n" + + " },\n" + + " {\n" + + " \"success\": false,\n" + + " \"failMsg\": \"The order funds should more then 0.1 USDT.\"\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -98,41 +99,39 @@ public static void testBatchAddOrdersResponse() throws Exception { /** batchAddOrdersSync Request Batch Add Orders Sync /api/v1/hf/orders/multi/sync */ public static void testBatchAddOrdersSyncRequest() throws Exception { String data = - "{\\\"orderList\\\": [{\\\"clientOid\\\": \\\"client order id 13\\\", \\\"symbol\\\":" - + " \\\"BTC-USDT\\\", \\\"type\\\": \\\"limit\\\", \\\"side\\\": \\\"buy\\\"," - + " \\\"price\\\": \\\"30000\\\", \\\"size\\\": \\\"0.00001\\\"}, {\\\"clientOid\\\":" - + " \\\"client order id 14\\\", \\\"symbol\\\": \\\"ETH-USDT\\\", \\\"type\\\":" - + " \\\"limit\\\", \\\"side\\\": \\\"sell\\\", \\\"price\\\": \\\"2000\\\"," - + " \\\"size\\\": \\\"0.00001\\\"}]}"; + "{\"orderList\": [{\"clientOid\": \"client order id 13\", \"symbol\": \"BTC-USDT\"," + + " \"type\": \"limit\", \"side\": \"buy\", \"price\": \"30000\", \"size\":" + + " \"0.00001\"}, {\"clientOid\": \"client order id 14\", \"symbol\": \"ETH-USDT\"," + + " \"type\": \"limit\", \"side\": \"sell\", \"price\": \"2000\", \"size\":" + + " \"0.00001\"}]}"; BatchAddOrdersSyncReq obj = mapper.readValue(data, BatchAddOrdersSyncReq.class); } /** batchAddOrdersSync Response Batch Add Orders Sync /api/v1/hf/orders/multi/sync */ public static void testBatchAddOrdersSyncResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":[{\\\"orderId\\\":\\\"6711195e5584bc0007bd5aef\\\",\\\"clientOid\\\":\\\"client" + "{\"code\":\"200000\",\"data\":[{\"orderId\":\"6711195e5584bc0007bd5aef\",\"clientOid\":\"client" + " order id" - + " 13\\\",\\\"orderTime\\\":1729173854299,\\\"originSize\\\":\\\"0.00001\\\",\\\"dealSize\\\":\\\"0\\\",\\\"remainSize\\\":\\\"0.00001\\\",\\\"canceledSize\\\":\\\"0\\\",\\\"status\\\":\\\"open\\\",\\\"matchTime\\\":1729173854326,\\\"success\\\":true},{\\\"success\\\":false,\\\"failMsg\\\":\\\"The" - + " order funds should more then 0.1 USDT.\\\"}]}"; + + " 13\",\"orderTime\":1729173854299,\"originSize\":\"0.00001\",\"dealSize\":\"0\",\"remainSize\":\"0.00001\",\"canceledSize\":\"0\",\"status\":\"open\",\"matchTime\":1729173854326,\"success\":true},{\"success\":false,\"failMsg\":\"The" + + " order funds should more then 0.1 USDT.\"}]}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** cancelOrderByOrderId Request Cancel Order By OrderId /api/v1/hf/orders/{orderId} */ public static void testCancelOrderByOrderIdRequest() throws Exception { - String data = - "{\\\"orderId\\\": \\\"671124f9365ccb00073debd4\\\", \\\"symbol\\\": \\\"BTC-USDT\\\"}"; + String data = "{\"orderId\": \"671124f9365ccb00073debd4\", \"symbol\": \"BTC-USDT\"}"; CancelOrderByOrderIdReq obj = mapper.readValue(data, CancelOrderByOrderIdReq.class); } /** cancelOrderByOrderId Response Cancel Order By OrderId /api/v1/hf/orders/{orderId} */ public static void testCancelOrderByOrderIdResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"671124f9365ccb00073debd4\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"671124f9365ccb00073debd4\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -142,8 +141,7 @@ public static void testCancelOrderByOrderIdResponse() throws Exception { * cancelOrderByOrderIdSync Request Cancel Order By OrderId Sync /api/v1/hf/orders/sync/{orderId} */ public static void testCancelOrderByOrderIdSyncRequest() throws Exception { - String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"orderId\\\": \\\"671128ee365ccb0007534d45\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\", \"orderId\": \"671128ee365ccb0007534d45\"}"; CancelOrderByOrderIdSyncReq obj = mapper.readValue(data, CancelOrderByOrderIdSyncReq.class); } @@ -152,16 +150,16 @@ public static void testCancelOrderByOrderIdSyncRequest() throws Exception { */ public static void testCancelOrderByOrderIdSyncResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -172,8 +170,7 @@ public static void testCancelOrderByOrderIdSyncResponse() throws Exception { * /api/v1/hf/orders/client-order/{clientOid} */ public static void testCancelOrderByClientOidRequest() throws Exception { - String data = - "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"symbol\\\": \\\"BTC-USDT\\\"}"; + String data = "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"symbol\": \"BTC-USDT\"}"; CancelOrderByClientOidReq obj = mapper.readValue(data, CancelOrderByClientOidReq.class); } @@ -182,8 +179,7 @@ public static void testCancelOrderByClientOidRequest() throws Exception { * /api/v1/hf/orders/client-order/{clientOid} */ public static void testCancelOrderByClientOidResponse() throws Exception { - String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"clientOid\\\":\\\"5c52e11203aa677f33e493fb\\\"}}"; + String data = "{\"code\":\"200000\",\"data\":{\"clientOid\":\"5c52e11203aa677f33e493fb\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -193,8 +189,7 @@ public static void testCancelOrderByClientOidResponse() throws Exception { * /api/v1/hf/orders/sync/client-order/{clientOid} */ public static void testCancelOrderByClientOidSyncRequest() throws Exception { - String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e493fb\"}"; CancelOrderByClientOidSyncReq obj = mapper.readValue(data, CancelOrderByClientOidSyncReq.class); } @@ -204,16 +199,16 @@ public static void testCancelOrderByClientOidSyncRequest() throws Exception { */ public static void testCancelOrderByClientOidSyncResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" - + " \\\"originSize\\\": \\\"0.00001\\\",\\n" - + " \\\"dealSize\\\": \\\"0\\\",\\n" - + " \\\"remainSize\\\": \\\"0\\\",\\n" - + " \\\"canceledSize\\\": \\\"0.00001\\\",\\n" - + " \\\"status\\\": \\\"done\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"originSize\": \"0.00001\",\n" + + " \"dealSize\": \"0\",\n" + + " \"remainSize\": \"0\",\n" + + " \"canceledSize\": \"0.00001\",\n" + + " \"status\": \"done\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue( @@ -223,20 +218,20 @@ public static void testCancelOrderByClientOidSyncResponse() throws Exception { /** cancelPartialOrder Request Cancel Partial Order /api/v1/hf/orders/cancel/{orderId} */ public static void testCancelPartialOrderRequest() throws Exception { String data = - "{\\\"orderId\\\": \\\"6711f73c1ef16c000717bb31\\\", \\\"symbol\\\": \\\"BTC-USDT\\\"," - + " \\\"cancelSize\\\": \\\"0.00001\\\"}"; + "{\"orderId\": \"6711f73c1ef16c000717bb31\", \"symbol\": \"BTC-USDT\", \"cancelSize\":" + + " \"0.00001\"}"; CancelPartialOrderReq obj = mapper.readValue(data, CancelPartialOrderReq.class); } /** cancelPartialOrder Response Cancel Partial Order /api/v1/hf/orders/cancel/{orderId} */ public static void testCancelPartialOrderResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"6711f73c1ef16c000717bb31\\\",\\n" - + " \\\"cancelSize\\\": \\\"0.00001\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"6711f73c1ef16c000717bb31\",\n" + + " \"cancelSize\": \"0.00001\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -244,13 +239,13 @@ public static void testCancelPartialOrderResponse() throws Exception { /** cancelAllOrdersBySymbol Request Cancel All Orders By Symbol /api/v1/hf/orders */ public static void testCancelAllOrdersBySymbolRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\"}"; CancelAllOrdersBySymbolReq obj = mapper.readValue(data, CancelAllOrdersBySymbolReq.class); } /** cancelAllOrdersBySymbol Response Cancel All Orders By Symbol /api/v1/hf/orders */ public static void testCancelAllOrdersBySymbolResponse() throws Exception { - String data = "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":\\\"success\\\"}"; + String data = "{\"code\":\"200000\",\"data\":\"success\"}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -263,15 +258,15 @@ public static void testCancelAllOrdersRequest() throws Exception { /** cancelAllOrders Response Cancel All Orders /api/v1/hf/orders/cancelAll */ public static void testCancelAllOrdersResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"succeedSymbols\\\": [\\n" - + " \\\"ETH-USDT\\\",\\n" - + " \\\"BTC-USDT\\\"\\n" - + " ],\\n" - + " \\\"failedSymbols\\\": []\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"succeedSymbols\": [\n" + + " \"ETH-USDT\",\n" + + " \"BTC-USDT\"\n" + + " ],\n" + + " \"failedSymbols\": []\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -280,68 +275,67 @@ public static void testCancelAllOrdersResponse() throws Exception { /** modifyOrder Request Modify Order /api/v1/hf/orders/alter */ public static void testModifyOrderRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"orderId\\\": \\\"670fd33bf9406e0007ab3945\\\"," - + " \\\"newPrice\\\": \\\"30000\\\", \\\"newSize\\\": \\\"0.0001\\\"}"; + "{\"symbol\": \"BTC-USDT\", \"orderId\": \"670fd33bf9406e0007ab3945\", \"newPrice\":" + + " \"30000\", \"newSize\": \"0.0001\"}"; ModifyOrderReq obj = mapper.readValue(data, ModifyOrderReq.class); } /** modifyOrder Response Modify Order /api/v1/hf/orders/alter */ public static void testModifyOrderResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"newOrderId\\\":\\\"67112258f9406e0007408827\\\",\\\"clientOid\\\":\\\"client" - + " order id 12\\\"}}"; + "{\"code\":\"200000\",\"data\":{\"newOrderId\":\"67112258f9406e0007408827\",\"clientOid\":\"client" + + " order id 12\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** getOrderByOrderId Request Get Order By OrderId /api/v1/hf/orders/{orderId} */ public static void testGetOrderByOrderIdRequest() throws Exception { - String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"orderId\\\": \\\"6717422bd51c29000775ea03\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\", \"orderId\": \"6717422bd51c29000775ea03\"}"; GetOrderByOrderIdReq obj = mapper.readValue(data, GetOrderByOrderIdReq.class); } /** getOrderByOrderId Response Get Order By OrderId /api/v1/hf/orders/{orderId} */ public static void testGetOrderByOrderIdResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"id\\\": \\\"6717422bd51c29000775ea03\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"opType\\\": \\\"DEAL\\\",\\n" - + " \\\"type\\\": \\\"limit\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"price\\\": \\\"70000\\\",\\n" - + " \\\"size\\\": \\\"0.00001\\\",\\n" - + " \\\"funds\\\": \\\"0.7\\\",\\n" - + " \\\"dealSize\\\": \\\"0.00001\\\",\\n" - + " \\\"dealFunds\\\": \\\"0.677176\\\",\\n" - + " \\\"remainSize\\\": \\\"0\\\",\\n" - + " \\\"remainFunds\\\": \\\"0.022824\\\",\\n" - + " \\\"cancelledSize\\\": \\\"0\\\",\\n" - + " \\\"cancelledFunds\\\": \\\"0\\\",\\n" - + " \\\"fee\\\": \\\"0.000677176\\\",\\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" - + " \\\"remark\\\": \\\"order remarks\\\",\\n" - + " \\\"tags\\\": null,\\n" - + " \\\"cancelExist\\\": false,\\n" - + " \\\"tradeType\\\": \\\"TRADE\\\",\\n" - + " \\\"inOrderBook\\\": false,\\n" - + " \\\"active\\\": false,\\n" - + " \\\"tax\\\": \\\"0\\\",\\n" - + " \\\"createdAt\\\": 1729577515444,\\n" - + " \\\"lastUpdatedAt\\\": 1729577515481\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"6717422bd51c29000775ea03\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"opType\": \"DEAL\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"70000\",\n" + + " \"size\": \"0.00001\",\n" + + " \"funds\": \"0.7\",\n" + + " \"dealSize\": \"0.00001\",\n" + + " \"dealFunds\": \"0.677176\",\n" + + " \"remainSize\": \"0\",\n" + + " \"remainFunds\": \"0.022824\",\n" + + " \"cancelledSize\": \"0\",\n" + + " \"cancelledFunds\": \"0\",\n" + + " \"fee\": \"0.000677176\",\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" + + " \"remark\": \"order remarks\",\n" + + " \"tags\": null,\n" + + " \"cancelExist\": false,\n" + + " \"tradeType\": \"TRADE\",\n" + + " \"inOrderBook\": false,\n" + + " \"active\": false,\n" + + " \"tax\": \"0\",\n" + + " \"createdAt\": 1729577515444,\n" + + " \"lastUpdatedAt\": 1729577515481\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -351,8 +345,7 @@ public static void testGetOrderByOrderIdResponse() throws Exception { * getOrderByClientOid Request Get Order By ClientOid /api/v1/hf/orders/client-order/{clientOid} */ public static void testGetOrderByClientOidRequest() throws Exception { - String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e493fb\"}"; GetOrderByClientOidReq obj = mapper.readValue(data, GetOrderByClientOidReq.class); } @@ -361,44 +354,44 @@ public static void testGetOrderByClientOidRequest() throws Exception { */ public static void testGetOrderByClientOidResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"id\\\": \\\"6717422bd51c29000775ea03\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"opType\\\": \\\"DEAL\\\",\\n" - + " \\\"type\\\": \\\"limit\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"price\\\": \\\"70000\\\",\\n" - + " \\\"size\\\": \\\"0.00001\\\",\\n" - + " \\\"funds\\\": \\\"0.7\\\",\\n" - + " \\\"dealSize\\\": \\\"0.00001\\\",\\n" - + " \\\"dealFunds\\\": \\\"0.677176\\\",\\n" - + " \\\"remainSize\\\": \\\"0\\\",\\n" - + " \\\"remainFunds\\\": \\\"0.022824\\\",\\n" - + " \\\"cancelledSize\\\": \\\"0\\\",\\n" - + " \\\"cancelledFunds\\\": \\\"0\\\",\\n" - + " \\\"fee\\\": \\\"0.000677176\\\",\\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" - + " \\\"remark\\\": \\\"order remarks\\\",\\n" - + " \\\"tags\\\": null,\\n" - + " \\\"cancelExist\\\": false,\\n" - + " \\\"tradeType\\\": \\\"TRADE\\\",\\n" - + " \\\"inOrderBook\\\": false,\\n" - + " \\\"active\\\": false,\\n" - + " \\\"tax\\\": \\\"0\\\",\\n" - + " \\\"createdAt\\\": 1729577515444,\\n" - + " \\\"lastUpdatedAt\\\": 1729577515481\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"6717422bd51c29000775ea03\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"opType\": \"DEAL\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"70000\",\n" + + " \"size\": \"0.00001\",\n" + + " \"funds\": \"0.7\",\n" + + " \"dealSize\": \"0.00001\",\n" + + " \"dealFunds\": \"0.677176\",\n" + + " \"remainSize\": \"0\",\n" + + " \"remainFunds\": \"0.022824\",\n" + + " \"cancelledSize\": \"0\",\n" + + " \"cancelledFunds\": \"0\",\n" + + " \"fee\": \"0.000677176\",\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" + + " \"remark\": \"order remarks\",\n" + + " \"tags\": null,\n" + + " \"cancelExist\": false,\n" + + " \"tradeType\": \"TRADE\",\n" + + " \"inOrderBook\": false,\n" + + " \"active\": false,\n" + + " \"tax\": \"0\",\n" + + " \"createdAt\": 1729577515444,\n" + + " \"lastUpdatedAt\": 1729577515481\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -416,14 +409,14 @@ public static void testGetSymbolsWithOpenOrderRequest() throws Exception { */ public static void testGetSymbolsWithOpenOrderResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"symbols\\\": [\\n" - + " \\\"ETH-USDT\\\",\\n" - + " \\\"BTC-USDT\\\"\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"symbols\": [\n" + + " \"ETH-USDT\",\n" + + " \"BTC-USDT\"\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -431,53 +424,53 @@ public static void testGetSymbolsWithOpenOrderResponse() throws Exception { /** getOpenOrders Request Get Open Orders /api/v1/hf/orders/active */ public static void testGetOpenOrdersRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\"}"; GetOpenOrdersReq obj = mapper.readValue(data, GetOpenOrdersReq.class); } /** getOpenOrders Response Get Open Orders /api/v1/hf/orders/active */ public static void testGetOpenOrdersResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"67120bbef094e200070976f6\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\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" - + " \\\"remark\\\": \\\"order remarks\\\",\\n" - + " \\\"tags\\\": \\\"order tags\\\",\\n" - + " \\\"cancelExist\\\": false,\\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" - + " \\\"createdAt\\\": 1729235902748,\\n" - + " \\\"lastUpdatedAt\\\": 1729235909862\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"67120bbef094e200070976f6\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\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" + + " \"remark\": \"order remarks\",\n" + + " \"tags\": \"order tags\",\n" + + " \"cancelExist\": false,\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" + + " \"createdAt\": 1729235902748,\n" + + " \"lastUpdatedAt\": 1729235909862\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -485,59 +478,59 @@ public static void testGetOpenOrdersResponse() throws Exception { /** getOpenOrdersByPage Request Get Open Orders By Page /api/v1/hf/orders/active/page */ public static void testGetOpenOrdersByPageRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"pageNum\\\": 1, \\\"pageSize\\\": 20}"; + String data = "{\"symbol\": \"BTC-USDT\", \"pageNum\": 1, \"pageSize\": 20}"; GetOpenOrdersByPageReq obj = mapper.readValue(data, GetOpenOrdersByPageReq.class); } /** getOpenOrdersByPage Response Get Open Orders By Page /api/v1/hf/orders/active/page */ public static void testGetOpenOrdersByPageResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -546,58 +539,58 @@ public static void testGetOpenOrdersByPageResponse() throws Exception { /** getClosedOrders Request Get Closed Orders /api/v1/hf/orders/done */ public static void testGetClosedOrdersRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"side\\\": \\\"buy\\\", \\\"type\\\": \\\"limit\\\"," - + " \\\"lastId\\\": 254062248624417, \\\"limit\\\": 20, \\\"startAt\\\": 1728663338000," - + " \\\"endAt\\\": 1728692138000}"; + "{\"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"type\": \"limit\", \"lastId\":" + + " 254062248624417, \"limit\": 20, \"startAt\": 1728663338000, \"endAt\":" + + " 1728692138000}"; GetClosedOrdersReq obj = mapper.readValue(data, GetClosedOrdersReq.class); } /** getClosedOrders Response Get Closed Orders /api/v1/hf/orders/done */ public static void testGetClosedOrdersResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"lastId\\\": 19814995255305,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"6717422bd51c29000775ea03\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"opType\\\": \\\"DEAL\\\",\\n" - + " \\\"type\\\": \\\"limit\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"price\\\": \\\"70000\\\",\\n" - + " \\\"size\\\": \\\"0.00001\\\",\\n" - + " \\\"funds\\\": \\\"0.7\\\",\\n" - + " \\\"dealSize\\\": \\\"0.00001\\\",\\n" - + " \\\"dealFunds\\\": \\\"0.677176\\\",\\n" - + " \\\"remainSize\\\": \\\"0\\\",\\n" - + " \\\"remainFunds\\\": \\\"0.022824\\\",\\n" - + " \\\"cancelledSize\\\": \\\"0\\\",\\n" - + " \\\"cancelledFunds\\\": \\\"0\\\",\\n" - + " \\\"fee\\\": \\\"0.000677176\\\",\\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" - + " \\\"remark\\\": \\\"order remarks\\\",\\n" - + " \\\"tags\\\": null,\\n" - + " \\\"cancelExist\\\": false,\\n" - + " \\\"tradeType\\\": \\\"TRADE\\\",\\n" - + " \\\"inOrderBook\\\": false,\\n" - + " \\\"active\\\": false,\\n" - + " \\\"tax\\\": \\\"0\\\",\\n" - + " \\\"createdAt\\\": 1729577515444,\\n" - + " \\\"lastUpdatedAt\\\": 1729577515481\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"lastId\": 19814995255305,\n" + + " \"items\": [\n" + + " {\n" + + " \"id\": \"6717422bd51c29000775ea03\",\n" + + " \"clientOid\": \"5c52e11203aa677f33e493fb\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"opType\": \"DEAL\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"70000\",\n" + + " \"size\": \"0.00001\",\n" + + " \"funds\": \"0.7\",\n" + + " \"dealSize\": \"0.00001\",\n" + + " \"dealFunds\": \"0.677176\",\n" + + " \"remainSize\": \"0\",\n" + + " \"remainFunds\": \"0.022824\",\n" + + " \"cancelledSize\": \"0\",\n" + + " \"cancelledFunds\": \"0\",\n" + + " \"fee\": \"0.000677176\",\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" + + " \"remark\": \"order remarks\",\n" + + " \"tags\": null,\n" + + " \"cancelExist\": false,\n" + + " \"tradeType\": \"TRADE\",\n" + + " \"inOrderBook\": false,\n" + + " \"active\": false,\n" + + " \"tax\": \"0\",\n" + + " \"createdAt\": 1729577515444,\n" + + " \"lastUpdatedAt\": 1729577515481\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -606,45 +599,44 @@ public static void testGetClosedOrdersResponse() throws Exception { /** getTradeHistory Request Get Trade History /api/v1/hf/fills */ public static void testGetTradeHistoryRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"orderId\\\": \\\"example_string_default_value\\\"," - + " \\\"side\\\": \\\"buy\\\", \\\"type\\\": \\\"limit\\\", \\\"lastId\\\":" - + " 254062248624417, \\\"limit\\\": 100, \\\"startAt\\\": 1728663338000, \\\"endAt\\\":" - + " 1728692138000}"; + "{\"symbol\": \"BTC-USDT\", \"orderId\": \"example_string_default_value\", \"side\":" + + " \"buy\", \"type\": \"limit\", \"lastId\": 254062248624417, \"limit\": 100," + + " \"startAt\": 1728663338000, \"endAt\": 1728692138000}"; GetTradeHistoryReq obj = mapper.readValue(data, GetTradeHistoryReq.class); } /** getTradeHistory Response Get Trade History /api/v1/hf/fills */ public static void testGetTradeHistoryResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"id\\\": 19814995255305,\\n" - + " \\\"orderId\\\": \\\"6717422bd51c29000775ea03\\\",\\n" - + " \\\"counterOrderId\\\": \\\"67174228135f9e000709da8c\\\",\\n" - + " \\\"tradeId\\\": 11029373945659392,\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"liquidity\\\": \\\"taker\\\",\\n" - + " \\\"type\\\": \\\"limit\\\",\\n" - + " \\\"forceTaker\\\": false,\\n" - + " \\\"price\\\": \\\"67717.6\\\",\\n" - + " \\\"size\\\": \\\"0.00001\\\",\\n" - + " \\\"funds\\\": \\\"0.677176\\\",\\n" - + " \\\"fee\\\": \\\"0.000677176\\\",\\n" - + " \\\"feeRate\\\": \\\"0.001\\\",\\n" - + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"stop\\\": \\\"\\\",\\n" - + " \\\"tradeType\\\": \\\"TRADE\\\",\\n" - + " \\\"taxRate\\\": \\\"0\\\",\\n" - + " \\\"tax\\\": \\\"0\\\",\\n" - + " \\\"createdAt\\\": 1729577515473\\n" - + " }\\n" - + " ],\\n" - + " \\\"lastId\\\": 19814995255305\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"items\": [\n" + + " {\n" + + " \"id\": 19814995255305,\n" + + " \"orderId\": \"6717422bd51c29000775ea03\",\n" + + " \"counterOrderId\": \"67174228135f9e000709da8c\",\n" + + " \"tradeId\": 11029373945659392,\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"side\": \"buy\",\n" + + " \"liquidity\": \"taker\",\n" + + " \"type\": \"limit\",\n" + + " \"forceTaker\": false,\n" + + " \"price\": \"67717.6\",\n" + + " \"size\": \"0.00001\",\n" + + " \"funds\": \"0.677176\",\n" + + " \"fee\": \"0.000677176\",\n" + + " \"feeRate\": \"0.001\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"stop\": \"\",\n" + + " \"tradeType\": \"TRADE\",\n" + + " \"taxRate\": \"0\",\n" + + " \"tax\": \"0\",\n" + + " \"createdAt\": 1729577515473\n" + + " }\n" + + " ],\n" + + " \"lastId\": 19814995255305\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -658,14 +650,14 @@ public static void testGetDCPRequest() throws Exception { /** getDCP Response Get DCP /api/v1/hf/orders/dead-cancel-all/query */ public static void testGetDCPResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"timeout\\\": 5,\\n" - + " \\\"symbols\\\": \\\"BTC-USDT,ETH-USDT\\\",\\n" - + " \\\"currentTime\\\": 1729241305,\\n" - + " \\\"triggerTime\\\": 1729241308\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"timeout\": 5,\n" + + " \"symbols\": \"BTC-USDT,ETH-USDT\",\n" + + " \"currentTime\": 1729241305,\n" + + " \"triggerTime\": 1729241308\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -673,14 +665,14 @@ public static void testGetDCPResponse() throws Exception { /** setDCP Request Set DCP /api/v1/hf/orders/dead-cancel-all */ public static void testSetDCPRequest() throws Exception { - String data = "{\\\"timeout\\\": 5, \\\"symbols\\\": \\\"BTC-USDT,ETH-USDT\\\"}"; + String data = "{\"timeout\": 5, \"symbols\": \"BTC-USDT,ETH-USDT\"}"; SetDCPReq obj = mapper.readValue(data, SetDCPReq.class); } /** setDCP Response Set DCP /api/v1/hf/orders/dead-cancel-all */ public static void testSetDCPResponse() throws Exception { String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"currentTime\\\":1729656588,\\\"triggerTime\\\":1729656593}}"; + "{\"code\":\"200000\",\"data\":{\"currentTime\":1729656588,\"triggerTime\":1729656593}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } @@ -688,21 +680,20 @@ public static void testSetDCPResponse() throws Exception { /** addStopOrder Request Add Stop Order /api/v1/stop-order */ public static void testAddStopOrderRequest() throws Exception { String data = - "{\\\"type\\\": \\\"limit\\\", \\\"symbol\\\": \\\"BTC-USDT\\\", \\\"side\\\": \\\"buy\\\"," - + " \\\"price\\\": \\\"50000\\\", \\\"stopPrice\\\": \\\"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\"}"; AddStopOrderReq obj = mapper.readValue(data, AddStopOrderReq.class); } /** addStopOrder Response Add Stop Order /api/v1/stop-order */ public static void testAddStopOrderResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"670fd33bf9406e0007ab3945\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"670fd33bf9406e0007ab3945\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -713,9 +704,7 @@ public static void testAddStopOrderResponse() throws Exception { * /api/v1/stop-order/cancelOrderByClientOid */ public static void testCancelStopOrderByClientOidRequest() throws Exception { - String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"clientOid\\\":" - + " \\\"689ff597f4414061aa819cc414836abd\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"689ff597f4414061aa819cc414836abd\"}"; CancelStopOrderByClientOidReq obj = mapper.readValue(data, CancelStopOrderByClientOidReq.class); } @@ -725,12 +714,12 @@ public static void testCancelStopOrderByClientOidRequest() throws Exception { */ public static void testCancelStopOrderByClientOidResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"cancelledOrderId\\\": \\\"vs8hoo8ksc8mario0035a74n\\\",\\n" - + " \\\"clientOid\\\": \\\"689ff597f4414061aa819cc414836abd\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderId\": \"vs8hoo8ksc8mario0035a74n\",\n" + + " \"clientOid\": \"689ff597f4414061aa819cc414836abd\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue( @@ -739,20 +728,20 @@ public static void testCancelStopOrderByClientOidResponse() throws Exception { /** cancelStopOrderByOrderId Request Cancel Stop Order By OrderId /api/v1/stop-order/{orderId} */ public static void testCancelStopOrderByOrderIdRequest() throws Exception { - String data = "{\\\"orderId\\\": \\\"671124f9365ccb00073debd4\\\"}"; + String data = "{\"orderId\": \"671124f9365ccb00073debd4\"}"; CancelStopOrderByOrderIdReq obj = mapper.readValue(data, CancelStopOrderByOrderIdReq.class); } /** cancelStopOrderByOrderId Response Cancel Stop Order By OrderId /api/v1/stop-order/{orderId} */ public static void testCancelStopOrderByOrderIdResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"cancelledOrderIds\\\": [\\n" - + " \\\"671124f9365ccb00073debd4\\\"\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"671124f9365ccb00073debd4\"\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -761,22 +750,21 @@ public static void testCancelStopOrderByOrderIdResponse() throws Exception { /** batchCancelStopOrder Request Batch Cancel Stop Orders /api/v1/stop-order/cancel */ public static void testBatchCancelStopOrderRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"example_string_default_value\\\", \\\"tradeType\\\":" - + " \\\"example_string_default_value\\\", \\\"orderIds\\\":" - + " \\\"example_string_default_value\\\"}"; + "{\"symbol\": \"example_string_default_value\", \"tradeType\":" + + " \"example_string_default_value\", \"orderIds\": \"example_string_default_value\"}"; BatchCancelStopOrderReq obj = mapper.readValue(data, BatchCancelStopOrderReq.class); } /** batchCancelStopOrder Response Batch Cancel Stop Orders /api/v1/stop-order/cancel */ public static void testBatchCancelStopOrderResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"cancelledOrderIds\\\": [\\n" - + " \\\"671124f9365ccb00073debd4\\\"\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"671124f9365ccb00073debd4\"\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -785,65 +773,64 @@ public static void testBatchCancelStopOrderResponse() throws Exception { /** getStopOrdersList Request Get Stop Orders List /api/v1/stop-order */ public static void testGetStopOrdersListRequest() throws Exception { String 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\\\"}"; + "{\"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\"}"; GetStopOrdersListReq obj = mapper.readValue(data, GetStopOrdersListReq.class); } /** getStopOrdersList Response Get Stop Orders List /api/v1/stop-order */ public static void testGetStopOrdersListResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -851,48 +838,48 @@ public static void testGetStopOrdersListResponse() throws Exception { /** getStopOrderByOrderId Request Get Stop Order By OrderId /api/v1/stop-order/{orderId} */ public static void testGetStopOrderByOrderIdRequest() throws Exception { - String data = "{\\\"orderId\\\": \\\"example_string_default_value\\\"}"; + String data = "{\"orderId\": \"example_string_default_value\"}"; GetStopOrderByOrderIdReq obj = mapper.readValue(data, GetStopOrderByOrderIdReq.class); } /** getStopOrderByOrderId Response Get Stop Order By OrderId /api/v1/stop-order/{orderId} */ public static void testGetStopOrderByOrderIdResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\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\\\": 1629098781127530200,\\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" + + " \"code\": \"200000\",\n" + + " \"data\": {\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\": 1629098781127530200,\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -904,8 +891,8 @@ public static void testGetStopOrderByOrderIdResponse() throws Exception { */ public static void testGetStopOrderByClientOidRequest() throws Exception { String data = - "{\\\"clientOid\\\": \\\"example_string_default_value\\\", \\\"symbol\\\":" - + " \\\"example_string_default_value\\\"}"; + "{\"clientOid\": \"example_string_default_value\", \"symbol\":" + + " \"example_string_default_value\"}"; GetStopOrderByClientOidReq obj = mapper.readValue(data, GetStopOrderByClientOidReq.class); } @@ -915,43 +902,43 @@ public static void testGetStopOrderByClientOidRequest() throws Exception { */ public static void testGetStopOrderByClientOidResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"vs8hoo8os561f5np0032vngj\\\",\\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\\\": \\\"2b700942b5db41cebe578cff48960e09\\\",\\n" - + " \\\"remark\\\": null,\\n" - + " \\\"tags\\\": null,\\n" - + " \\\"orderTime\\\": 1629020492834532600,\\n" - + " \\\"domainId\\\": \\\"kucoin\\\",\\n" - + " \\\"tradeSource\\\": \\\"USER\\\",\\n" - + " \\\"tradeType\\\": \\\"TRADE\\\",\\n" - + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"takerFeeRate\\\": \\\"0.00200000000000000000\\\",\\n" - + " \\\"makerFeeRate\\\": \\\"0.00200000000000000000\\\",\\n" - + " \\\"createdAt\\\": 1629020492837,\\n" - + " \\\"stop\\\": \\\"loss\\\",\\n" - + " \\\"stopTriggerTime\\\": null,\\n" - + " \\\"stopPrice\\\": \\\"1.00000000000000000000\\\"\\n" - + " }\\n" - + " ]\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": \"vs8hoo8os561f5np0032vngj\",\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\": \"2b700942b5db41cebe578cff48960e09\",\n" + + " \"remark\": null,\n" + + " \"tags\": null,\n" + + " \"orderTime\": 1629020492834532600,\n" + + " \"domainId\": \"kucoin\",\n" + + " \"tradeSource\": \"USER\",\n" + + " \"tradeType\": \"TRADE\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"takerFeeRate\": \"0.00200000000000000000\",\n" + + " \"makerFeeRate\": \"0.00200000000000000000\",\n" + + " \"createdAt\": 1629020492837,\n" + + " \"stop\": \"loss\",\n" + + " \"stopTriggerTime\": null,\n" + + " \"stopPrice\": \"1.00000000000000000000\"\n" + + " }\n" + + " ]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -960,39 +947,37 @@ public static void testGetStopOrderByClientOidResponse() throws Exception { /** addOcoOrder Request Add OCO Order /api/v3/oco/order */ public static void testAddOcoOrderRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"side\\\": \\\"buy\\\", \\\"price\\\":" - + " \\\"94000\\\", \\\"size\\\": \\\"0.1\\\", \\\"clientOid\\\":" - + " \\\"5c52e11203aa67f1e493fb\\\", \\\"stopPrice\\\": \\\"98000\\\"," - + " \\\"limitPrice\\\": \\\"96000\\\", \\\"remark\\\": \\\"this is remark\\\"," - + " \\\"tradeType\\\": \\\"TRADE\\\"}"; + "{\"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"94000\", \"size\": \"0.1\"," + + " \"clientOid\": \"5c52e11203aa67f1e493fb\", \"stopPrice\": \"98000\"," + + " \"limitPrice\": \"96000\", \"remark\": \"this is remark\", \"tradeType\":" + + " \"TRADE\"}"; AddOcoOrderReq obj = mapper.readValue(data, AddOcoOrderReq.class); } /** addOcoOrder Response Add OCO Order /api/v3/oco/order */ public static void testAddOcoOrderResponse() throws Exception { - String data = - "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"orderId\\\":\\\"674c316e688dea0007c7b986\\\"}}"; + String data = "{\"code\":\"200000\",\"data\":{\"orderId\":\"674c316e688dea0007c7b986\"}}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); } /** cancelOcoOrderByOrderId Request Cancel OCO Order By OrderId /api/v3/oco/order/{orderId} */ public static void testCancelOcoOrderByOrderIdRequest() throws Exception { - String data = "{\\\"orderId\\\": \\\"674c316e688dea0007c7b986\\\"}"; + String data = "{\"orderId\": \"674c316e688dea0007c7b986\"}"; CancelOcoOrderByOrderIdReq obj = mapper.readValue(data, CancelOcoOrderByOrderIdReq.class); } /** cancelOcoOrderByOrderId Response Cancel OCO Order By OrderId /api/v3/oco/order/{orderId} */ public static void testCancelOcoOrderByOrderIdResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"cancelledOrderIds\\\": [\\n" - + " \\\"vs93gpqc6kkmkk57003gok16\\\",\\n" - + " \\\"vs93gpqc6kkmkk57003gok17\\\"\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"vs93gpqc6kkmkk57003gok16\",\n" + + " \"vs93gpqc6kkmkk57003gok17\"\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1003,7 +988,7 @@ public static void testCancelOcoOrderByOrderIdResponse() throws Exception { * /api/v3/oco/client-order/{clientOid} */ public static void testCancelOcoOrderByClientOidRequest() throws Exception { - String data = "{\\\"clientOid\\\": \\\"5c52e11203aa67f1e493fb\\\"}"; + String data = "{\"clientOid\": \"5c52e11203aa67f1e493fb\"}"; CancelOcoOrderByClientOidReq obj = mapper.readValue(data, CancelOcoOrderByClientOidReq.class); } @@ -1013,14 +998,14 @@ public static void testCancelOcoOrderByClientOidRequest() throws Exception { */ public static void testCancelOcoOrderByClientOidResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"cancelledOrderIds\\\": [\\n" - + " \\\"vs93gpqc6r0mkk57003gok3h\\\",\\n" - + " \\\"vs93gpqc6r0mkk57003gok3i\\\"\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"vs93gpqc6r0mkk57003gok3h\",\n" + + " \"vs93gpqc6r0mkk57003gok3i\"\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1029,24 +1014,24 @@ public static void testCancelOcoOrderByClientOidResponse() throws Exception { /** batchCancelOcoOrders Request Batch Cancel OCO Order /api/v3/oco/orders */ public static void testBatchCancelOcoOrdersRequest() throws Exception { String data = - "{\\\"orderIds\\\": \\\"674c388172cf2800072ee746,674c38bdfd8300000795167e\\\"," - + " \\\"symbol\\\": \\\"BTC-USDT\\\"}"; + "{\"orderIds\": \"674c388172cf2800072ee746,674c38bdfd8300000795167e\", \"symbol\":" + + " \"BTC-USDT\"}"; BatchCancelOcoOrdersReq obj = mapper.readValue(data, BatchCancelOcoOrdersReq.class); } /** batchCancelOcoOrders Response Batch Cancel OCO Order /api/v3/oco/orders */ public static void testBatchCancelOcoOrdersResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"cancelledOrderIds\\\": [\\n" - + " \\\"vs93gpqc750mkk57003gok6i\\\",\\n" - + " \\\"vs93gpqc750mkk57003gok6j\\\",\\n" - + " \\\"vs93gpqc75c39p83003tnriu\\\",\\n" - + " \\\"vs93gpqc75c39p83003tnriv\\\"\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"vs93gpqc750mkk57003gok6i\",\n" + + " \"vs93gpqc750mkk57003gok6j\",\n" + + " \"vs93gpqc75c39p83003tnriu\",\n" + + " \"vs93gpqc75c39p83003tnriv\"\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1054,22 +1039,22 @@ public static void testBatchCancelOcoOrdersResponse() throws Exception { /** getOcoOrderByOrderId Request Get OCO Order By OrderId /api/v3/oco/order/{orderId} */ public static void testGetOcoOrderByOrderIdRequest() throws Exception { - String data = "{\\\"orderId\\\": \\\"674c3b6e688dea0007c7bab2\\\"}"; + String data = "{\"orderId\": \"674c3b6e688dea0007c7bab2\"}"; GetOcoOrderByOrderIdReq obj = mapper.readValue(data, GetOcoOrderByOrderIdReq.class); } /** getOcoOrderByOrderId Response Get OCO Order By OrderId /api/v3/oco/order/{orderId} */ public static void testGetOcoOrderByOrderIdResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"674c3b6e688dea0007c7bab2\\\",\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e1203aa6f37f1e493fb\\\",\\n" - + " \\\"orderTime\\\": 1733049198863,\\n" - + " \\\"status\\\": \\\"NEW\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"674c3b6e688dea0007c7bab2\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"clientOid\": \"5c52e1203aa6f37f1e493fb\",\n" + + " \"orderTime\": 1733049198863,\n" + + " \"status\": \"NEW\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1079,7 +1064,7 @@ public static void testGetOcoOrderByOrderIdResponse() throws Exception { * getOcoOrderByClientOid Request Get OCO Order By ClientOid /api/v3/oco/client-order/{clientOid} */ public static void testGetOcoOrderByClientOidRequest() throws Exception { - String data = "{\\\"clientOid\\\": \\\"5c52e1203aa6f3g7f1e493fb\\\"}"; + String data = "{\"clientOid\": \"5c52e1203aa6f3g7f1e493fb\"}"; GetOcoOrderByClientOidReq obj = mapper.readValue(data, GetOcoOrderByClientOidReq.class); } @@ -1088,15 +1073,15 @@ public static void testGetOcoOrderByClientOidRequest() throws Exception { */ public static void testGetOcoOrderByClientOidResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"674c3cfa72cf2800072ee7ce\\\",\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e1203aa6f3g7f1e493fb\\\",\\n" - + " \\\"orderTime\\\": 1733049594803,\\n" - + " \\\"status\\\": \\\"NEW\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"674c3cfa72cf2800072ee7ce\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"clientOid\": \"5c52e1203aa6f3g7f1e493fb\",\n" + + " \"orderTime\": 1733049594803,\n" + + " \"status\": \"NEW\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1107,7 +1092,7 @@ public static void testGetOcoOrderByClientOidResponse() throws Exception { * /api/v3/oco/order/details/{orderId} */ public static void testGetOcoOrderDetailByOrderIdRequest() throws Exception { - String data = "{\\\"orderId\\\": \\\"674c3b6e688dea0007c7bab2\\\"}"; + String data = "{\"orderId\": \"674c3b6e688dea0007c7bab2\"}"; GetOcoOrderDetailByOrderIdReq obj = mapper.readValue(data, GetOcoOrderDetailByOrderIdReq.class); } @@ -1117,35 +1102,35 @@ public static void testGetOcoOrderDetailByOrderIdRequest() throws Exception { */ public static void testGetOcoOrderDetailByOrderIdResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"674c3b6e688dea0007c7bab2\\\",\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e1203aa6f37f1e493fb\\\",\\n" - + " \\\"orderTime\\\": 1733049198863,\\n" - + " \\\"status\\\": \\\"NEW\\\",\\n" - + " \\\"orders\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"vs93gpqc7dn6h3fa003sfelj\\\",\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"price\\\": \\\"94000.00000000000000000000\\\",\\n" - + " \\\"stopPrice\\\": \\\"94000.00000000000000000000\\\",\\n" - + " \\\"size\\\": \\\"0.10000000000000000000\\\",\\n" - + " \\\"status\\\": \\\"NEW\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"id\\\": \\\"vs93gpqc7dn6h3fa003sfelk\\\",\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"price\\\": \\\"96000.00000000000000000000\\\",\\n" - + " \\\"stopPrice\\\": \\\"98000.00000000000000000000\\\",\\n" - + " \\\"size\\\": \\\"0.10000000000000000000\\\",\\n" - + " \\\"status\\\": \\\"NEW\\\"\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"674c3b6e688dea0007c7bab2\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"clientOid\": \"5c52e1203aa6f37f1e493fb\",\n" + + " \"orderTime\": 1733049198863,\n" + + " \"status\": \"NEW\",\n" + + " \"orders\": [\n" + + " {\n" + + " \"id\": \"vs93gpqc7dn6h3fa003sfelj\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"94000.00000000000000000000\",\n" + + " \"stopPrice\": \"94000.00000000000000000000\",\n" + + " \"size\": \"0.10000000000000000000\",\n" + + " \"status\": \"NEW\"\n" + + " },\n" + + " {\n" + + " \"id\": \"vs93gpqc7dn6h3fa003sfelk\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"96000.00000000000000000000\",\n" + + " \"stopPrice\": \"98000.00000000000000000000\",\n" + + " \"size\": \"0.10000000000000000000\",\n" + + " \"status\": \"NEW\"\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue( @@ -1155,32 +1140,31 @@ public static void testGetOcoOrderDetailByOrderIdResponse() throws Exception { /** getOcoOrderList Request Get OCO Order List /api/v3/oco/orders */ public static void testGetOcoOrderListRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"startAt\\\": 123456, \\\"endAt\\\": 123456," - + " \\\"orderIds\\\": \\\"example_string_default_value\\\", \\\"pageSize\\\": 50," - + " \\\"currentPage\\\": 1}"; + "{\"symbol\": \"BTC-USDT\", \"startAt\": 123456, \"endAt\": 123456, \"orderIds\":" + + " \"example_string_default_value\", \"pageSize\": 50, \"currentPage\": 1}"; GetOcoOrderListReq obj = mapper.readValue(data, GetOcoOrderListReq.class); } /** getOcoOrderList Response Get OCO Order List /api/v3/oco/orders */ public static void testGetOcoOrderListResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"currentPage\\\": 1,\\n" - + " \\\"pageSize\\\": 50,\\n" - + " \\\"totalNum\\\": 1,\\n" - + " \\\"totalPage\\\": 1,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"orderId\\\": \\\"674c3cfa72cf2800072ee7ce\\\",\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e1203aa6f3g7f1e493fb\\\",\\n" - + " \\\"orderTime\\\": 1733049594803,\\n" - + " \\\"status\\\": \\\"NEW\\\"\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 1,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"orderId\": \"674c3cfa72cf2800072ee7ce\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"clientOid\": \"5c52e1203aa6f3g7f1e493fb\",\n" + + " \"orderTime\": 1733049594803,\n" + + " \"status\": \"NEW\"\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1189,20 +1173,20 @@ public static void testGetOcoOrderListResponse() throws Exception { /** addOrderOld Request Add Order - Old /api/v1/orders */ public static void testAddOrderOldRequest() throws Exception { String 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\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493fb\", \"remark\":" + + " \"order remarks\"}"; AddOrderOldReq obj = mapper.readValue(data, AddOrderOldReq.class); } /** addOrderOld Response Add Order - Old /api/v1/orders */ public static void testAddOrderOldResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"674a8635b38d120007709c0f\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"674a8635b38d120007709c0f\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1211,20 +1195,20 @@ public static void testAddOrderOldResponse() throws Exception { /** addOrderTestOld Request Add Order Test - Old /api/v1/orders/test */ public static void testAddOrderTestOldRequest() throws Exception { String 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\"," + + " \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493fb\", \"remark\":" + + " \"order remarks\"}"; AddOrderTestOldReq obj = mapper.readValue(data, AddOrderTestOldReq.class); } /** addOrderTestOld Response Add Order Test - Old /api/v1/orders/test */ public static void testAddOrderTestOldResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"orderId\\\": \\\"674a8776291d9e00074f1edf\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"orderId\": \"674a8776291d9e00074f1edf\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1233,70 +1217,69 @@ public static void testAddOrderTestOldResponse() throws Exception { /** batchAddOrdersOld Request Batch Add Orders - Old /api/v1/orders/multi */ public static void testBatchAddOrdersOldRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"orderList\\\": [{\\\"clientOid\\\":" - + " \\\"3d07008668054da6b3cb12e432c2b13a\\\", \\\"side\\\": \\\"buy\\\", \\\"type\\\":" - + " \\\"limit\\\", \\\"price\\\": \\\"50000\\\", \\\"size\\\": \\\"0.0001\\\"}," - + " {\\\"clientOid\\\": \\\"37245dbe6e134b5c97732bfb36cd4a9d\\\", \\\"side\\\":" - + " \\\"buy\\\", \\\"type\\\": \\\"limit\\\", \\\"price\\\": \\\"49999\\\"," - + " \\\"size\\\": \\\"0.0001\\\"}]}"; + "{\"symbol\": \"BTC-USDT\", \"orderList\": [{\"clientOid\":" + + " \"3d07008668054da6b3cb12e432c2b13a\", \"side\": \"buy\", \"type\": \"limit\"," + + " \"price\": \"50000\", \"size\": \"0.0001\"}, {\"clientOid\":" + + " \"37245dbe6e134b5c97732bfb36cd4a9d\", \"side\": \"buy\", \"type\": \"limit\"," + + " \"price\": \"49999\", \"size\": \"0.0001\"}]}"; BatchAddOrdersOldReq obj = mapper.readValue(data, BatchAddOrdersOldReq.class); } /** batchAddOrdersOld Response Batch Add Orders - Old /api/v1/orders/multi */ public static void testBatchAddOrdersOldResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"data\\\": [\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"type\\\": \\\"limit\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"price\\\": \\\"50000\\\",\\n" - + " \\\"size\\\": \\\"0.0001\\\",\\n" - + " \\\"funds\\\": null,\\n" - + " \\\"stp\\\": \\\"\\\",\\n" - + " \\\"stop\\\": \\\"\\\",\\n" - + " \\\"stopPrice\\\": null,\\n" - + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" - + " \\\"cancelAfter\\\": 0,\\n" - + " \\\"postOnly\\\": false,\\n" - + " \\\"hidden\\\": false,\\n" - + " \\\"iceberge\\\": false,\\n" - + " \\\"iceberg\\\": false,\\n" - + " \\\"visibleSize\\\": null,\\n" - + " \\\"channel\\\": \\\"API\\\",\\n" - + " \\\"id\\\": \\\"674a97dfef434f0007efc431\\\",\\n" - + " \\\"status\\\": \\\"success\\\",\\n" - + " \\\"failMsg\\\": null,\\n" - + " \\\"clientOid\\\": \\\"3d07008668054da6b3cb12e432c2b13a\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"type\\\": \\\"limit\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"price\\\": \\\"49999\\\",\\n" - + " \\\"size\\\": \\\"0.0001\\\",\\n" - + " \\\"funds\\\": null,\\n" - + " \\\"stp\\\": \\\"\\\",\\n" - + " \\\"stop\\\": \\\"\\\",\\n" - + " \\\"stopPrice\\\": null,\\n" - + " \\\"timeInForce\\\": \\\"GTC\\\",\\n" - + " \\\"cancelAfter\\\": 0,\\n" - + " \\\"postOnly\\\": false,\\n" - + " \\\"hidden\\\": false,\\n" - + " \\\"iceberge\\\": false,\\n" - + " \\\"iceberg\\\": false,\\n" - + " \\\"visibleSize\\\": null,\\n" - + " \\\"channel\\\": \\\"API\\\",\\n" - + " \\\"id\\\": \\\"674a97dffb378b00077b9c20\\\",\\n" - + " \\\"status\\\": \\\"fail\\\",\\n" - + " \\\"failMsg\\\": \\\"Balance insufficient!\\\",\\n" - + " \\\"clientOid\\\": \\\"37245dbe6e134b5c97732bfb36cd4a9d\\\"\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"data\": [\n" + + " {\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"50000\",\n" + + " \"size\": \"0.0001\",\n" + + " \"funds\": null,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"cancelAfter\": 0,\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberge\": false,\n" + + " \"iceberg\": false,\n" + + " \"visibleSize\": null,\n" + + " \"channel\": \"API\",\n" + + " \"id\": \"674a97dfef434f0007efc431\",\n" + + " \"status\": \"success\",\n" + + " \"failMsg\": null,\n" + + " \"clientOid\": \"3d07008668054da6b3cb12e432c2b13a\"\n" + + " },\n" + + " {\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"49999\",\n" + + " \"size\": \"0.0001\",\n" + + " \"funds\": null,\n" + + " \"stp\": \"\",\n" + + " \"stop\": \"\",\n" + + " \"stopPrice\": null,\n" + + " \"timeInForce\": \"GTC\",\n" + + " \"cancelAfter\": 0,\n" + + " \"postOnly\": false,\n" + + " \"hidden\": false,\n" + + " \"iceberge\": false,\n" + + " \"iceberg\": false,\n" + + " \"visibleSize\": null,\n" + + " \"channel\": \"API\",\n" + + " \"id\": \"674a97dffb378b00077b9c20\",\n" + + " \"status\": \"fail\",\n" + + " \"failMsg\": \"Balance insufficient!\",\n" + + " \"clientOid\": \"37245dbe6e134b5c97732bfb36cd4a9d\"\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1304,20 +1287,20 @@ public static void testBatchAddOrdersOldResponse() throws Exception { /** cancelOrderByOrderIdOld Request Cancel Order By OrderId - Old /api/v1/orders/{orderId} */ public static void testCancelOrderByOrderIdOldRequest() throws Exception { - String data = "{\\\"orderId\\\": \\\"674a97dfef434f0007efc431\\\"}"; + String data = "{\"orderId\": \"674a97dfef434f0007efc431\"}"; CancelOrderByOrderIdOldReq obj = mapper.readValue(data, CancelOrderByOrderIdOldReq.class); } /** cancelOrderByOrderIdOld Response Cancel Order By OrderId - Old /api/v1/orders/{orderId} */ public static void testCancelOrderByOrderIdOldResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"cancelledOrderIds\\\": [\\n" - + " \\\"674a97dfef434f0007efc431\\\"\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"674a97dfef434f0007efc431\"\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1328,7 +1311,7 @@ public static void testCancelOrderByOrderIdOldResponse() throws Exception { * /api/v1/order/client-order/{clientOid} */ public static void testCancelOrderByClientOidOldRequest() throws Exception { - String data = "{\\\"clientOid\\\": \\\"5c52e11203aa677f331e493fb\\\"}"; + String data = "{\"clientOid\": \"5c52e11203aa677f331e493fb\"}"; CancelOrderByClientOidOldReq obj = mapper.readValue(data, CancelOrderByClientOidOldReq.class); } @@ -1338,13 +1321,13 @@ public static void testCancelOrderByClientOidOldRequest() throws Exception { */ public static void testCancelOrderByClientOidOldResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"cancelledOrderId\\\": \\\"67c3252a63d25e0007f91de9\\\",\\n" - + " \\\"clientOid\\\": \\\"5c52e11203aa677f331e493fb\\\",\\n" - + " \\\"cancelledOcoOrderIds\\\": null\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderId\": \"67c3252a63d25e0007f91de9\",\n" + + " \"clientOid\": \"5c52e11203aa677f331e493fb\",\n" + + " \"cancelledOcoOrderIds\": null\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1352,21 +1335,21 @@ public static void testCancelOrderByClientOidOldResponse() throws Exception { /** batchCancelOrderOld Request Batch Cancel Order - Old /api/v1/orders */ public static void testBatchCancelOrderOldRequest() throws Exception { - String data = "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"tradeType\\\": \\\"TRADE\\\"}"; + String data = "{\"symbol\": \"BTC-USDT\", \"tradeType\": \"TRADE\"}"; BatchCancelOrderOldReq obj = mapper.readValue(data, BatchCancelOrderOldReq.class); } /** batchCancelOrderOld Response Batch Cancel Order - Old /api/v1/orders */ public static void testBatchCancelOrderOldResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"cancelledOrderIds\\\": [\\n" - + " \\\"674a8635b38d120007709c0f\\\",\\n" - + " \\\"674a8630439c100007d3bce1\\\"\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"cancelledOrderIds\": [\n" + + " \"674a8635b38d120007709c0f\",\n" + + " \"674a8630439c100007d3bce1\"\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1375,58 +1358,57 @@ public static void testBatchCancelOrderOldResponse() throws Exception { /** getOrdersListOld Request Get Orders List - Old /api/v1/orders */ public static void testGetOrdersListOldRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"status\\\": \\\"active\\\", \\\"side\\\":" - + " \\\"buy\\\", \\\"type\\\": \\\"limit\\\", \\\"tradeType\\\": \\\"TRADE\\\"," - + " \\\"startAt\\\": 123456, \\\"endAt\\\": 123456, \\\"currentPage\\\": 1," - + " \\\"pageSize\\\": 50}"; + "{\"symbol\": \"BTC-USDT\", \"status\": \"active\", \"side\": \"buy\", \"type\": \"limit\"," + + " \"tradeType\": \"TRADE\", \"startAt\": 123456, \"endAt\": 123456, \"currentPage\":" + + " 1, \"pageSize\": 50}"; GetOrdersListOldReq obj = mapper.readValue(data, GetOrdersListOldReq.class); } /** getOrdersListOld Response Get Orders List - Old /api/v1/orders */ public static void testGetOrdersListOldResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"currentPage\\\": 1,\\n" - + " \\\"pageSize\\\": 50,\\n" - + " \\\"totalNum\\\": 1,\\n" - + " \\\"totalPage\\\": 1,\\n" - + " \\\"items\\\": [\\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" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 1,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\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" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1440,42 +1422,42 @@ public static void testGetRecentOrdersListOldRequest() throws Exception { /** getRecentOrdersListOld Response Get Recent Orders List - Old /api/v1/limit/orders */ public static void testGetRecentOrdersListOldResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1483,47 +1465,47 @@ public static void testGetRecentOrdersListOldResponse() throws Exception { /** getOrderByOrderIdOld Request Get Order By OrderId - Old /api/v1/orders/{orderId} */ public static void testGetOrderByOrderIdOldRequest() throws Exception { - String data = "{\\\"orderId\\\": \\\"674a97dfef434f0007efc431\\\"}"; + String data = "{\"orderId\": \"674a97dfef434f0007efc431\"}"; GetOrderByOrderIdOldReq obj = mapper.readValue(data, GetOrderByOrderIdOldReq.class); } /** getOrderByOrderIdOld Response Get Order By OrderId - Old /api/v1/orders/{orderId} */ public static void testGetOrderByOrderIdOldResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"id\\\": \\\"674a97dfef434f0007efc431\\\",\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"opType\\\": \\\"DEAL\\\",\\n" - + " \\\"type\\\": \\\"limit\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"price\\\": \\\"50000\\\",\\n" - + " \\\"size\\\": \\\"0.0001\\\",\\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\\\": \\\"3d07008668054da6b3cb12e432c2b13a\\\",\\n" - + " \\\"remark\\\": null,\\n" - + " \\\"tags\\\": null,\\n" - + " \\\"isActive\\\": false,\\n" - + " \\\"cancelExist\\\": true,\\n" - + " \\\"createdAt\\\": 1732941791518,\\n" - + " \\\"tradeType\\\": \\\"TRADE\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"674a97dfef434f0007efc431\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"opType\": \"DEAL\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"50000\",\n" + + " \"size\": \"0.0001\",\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\": \"3d07008668054da6b3cb12e432c2b13a\",\n" + + " \"remark\": null,\n" + + " \"tags\": null,\n" + + " \"isActive\": false,\n" + + " \"cancelExist\": true,\n" + + " \"createdAt\": 1732941791518,\n" + + " \"tradeType\": \"TRADE\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1534,7 +1516,7 @@ public static void testGetOrderByOrderIdOldResponse() throws Exception { * /api/v1/order/client-order/{clientOid} */ public static void testGetOrderByClientOidOldRequest() throws Exception { - String data = "{\\\"clientOid\\\": \\\"3d07008668054da6b3cb12e432c2b13a\\\"}"; + String data = "{\"clientOid\": \"3d07008668054da6b3cb12e432c2b13a\"}"; GetOrderByClientOidOldReq obj = mapper.readValue(data, GetOrderByClientOidOldReq.class); } @@ -1544,40 +1526,40 @@ public static void testGetOrderByClientOidOldRequest() throws Exception { */ public static void testGetOrderByClientOidOldResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"id\\\": \\\"674a97dfef434f0007efc431\\\",\\n" - + " \\\"symbol\\\": \\\"BTC-USDT\\\",\\n" - + " \\\"opType\\\": \\\"DEAL\\\",\\n" - + " \\\"type\\\": \\\"limit\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"price\\\": \\\"50000\\\",\\n" - + " \\\"size\\\": \\\"0.0001\\\",\\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\\\": \\\"3d07008668054da6b3cb12e432c2b13a\\\",\\n" - + " \\\"remark\\\": null,\\n" - + " \\\"tags\\\": null,\\n" - + " \\\"isActive\\\": false,\\n" - + " \\\"cancelExist\\\": true,\\n" - + " \\\"createdAt\\\": 1732941791518,\\n" - + " \\\"tradeType\\\": \\\"TRADE\\\"\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"id\": \"674a97dfef434f0007efc431\",\n" + + " \"symbol\": \"BTC-USDT\",\n" + + " \"opType\": \"DEAL\",\n" + + " \"type\": \"limit\",\n" + + " \"side\": \"buy\",\n" + + " \"price\": \"50000\",\n" + + " \"size\": \"0.0001\",\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\": \"3d07008668054da6b3cb12e432c2b13a\",\n" + + " \"remark\": null,\n" + + " \"tags\": null,\n" + + " \"isActive\": false,\n" + + " \"cancelExist\": true,\n" + + " \"createdAt\": 1732941791518,\n" + + " \"tradeType\": \"TRADE\"\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1586,45 +1568,44 @@ public static void testGetOrderByClientOidOldResponse() throws Exception { /** getTradeHistoryOld Request Get Trade History - Old /api/v1/fills */ public static void testGetTradeHistoryOldRequest() throws Exception { String data = - "{\\\"symbol\\\": \\\"BTC-USDT\\\", \\\"orderId\\\": \\\"example_string_default_value\\\"," - + " \\\"side\\\": \\\"buy\\\", \\\"type\\\": \\\"limit\\\", \\\"tradeType\\\":" - + " \\\"TRADE\\\", \\\"startAt\\\": 1728663338000, \\\"endAt\\\": 1728692138000," - + " \\\"currentPage\\\": 1, \\\"pageSize\\\": 50}"; + "{\"symbol\": \"BTC-USDT\", \"orderId\": \"example_string_default_value\", \"side\":" + + " \"buy\", \"type\": \"limit\", \"tradeType\": \"TRADE\", \"startAt\": 1728663338000," + + " \"endAt\": 1728692138000, \"currentPage\": 1, \"pageSize\": 50}"; GetTradeHistoryOldReq obj = mapper.readValue(data, GetTradeHistoryOldReq.class); } /** getTradeHistoryOld Response Get Trade History - Old /api/v1/fills */ public static void testGetTradeHistoryOldResponse() throws Exception { String data = - "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": {\\n" - + " \\\"currentPage\\\": 1,\\n" - + " \\\"pageSize\\\": 50,\\n" - + " \\\"totalNum\\\": 1,\\n" - + " \\\"totalPage\\\": 1,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"symbol\\\": \\\"DOGE-USDT\\\",\\n" - + " \\\"tradeId\\\": \\\"10862827223795713\\\",\\n" - + " \\\"orderId\\\": \\\"6745698ef4f1200007c561a8\\\",\\n" - + " \\\"counterOrderId\\\": \\\"6745695ef15b270007ac5076\\\",\\n" - + " \\\"side\\\": \\\"buy\\\",\\n" - + " \\\"liquidity\\\": \\\"taker\\\",\\n" - + " \\\"forceTaker\\\": false,\\n" - + " \\\"price\\\": \\\"0.40739\\\",\\n" - + " \\\"size\\\": \\\"10\\\",\\n" - + " \\\"funds\\\": \\\"4.0739\\\",\\n" - + " \\\"fee\\\": \\\"0.0040739\\\",\\n" - + " \\\"feeRate\\\": \\\"0.001\\\",\\n" - + " \\\"feeCurrency\\\": \\\"USDT\\\",\\n" - + " \\\"stop\\\": \\\"\\\",\\n" - + " \\\"tradeType\\\": \\\"TRADE\\\",\\n" - + " \\\"type\\\": \\\"market\\\",\\n" - + " \\\"createdAt\\\": 1732602254928\\n" - + " }\\n" - + " ]\\n" - + " }\\n" + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": {\n" + + " \"currentPage\": 1,\n" + + " \"pageSize\": 50,\n" + + " \"totalNum\": 1,\n" + + " \"totalPage\": 1,\n" + + " \"items\": [\n" + + " {\n" + + " \"symbol\": \"DOGE-USDT\",\n" + + " \"tradeId\": \"10862827223795713\",\n" + + " \"orderId\": \"6745698ef4f1200007c561a8\",\n" + + " \"counterOrderId\": \"6745695ef15b270007ac5076\",\n" + + " \"side\": \"buy\",\n" + + " \"liquidity\": \"taker\",\n" + + " \"forceTaker\": false,\n" + + " \"price\": \"0.40739\",\n" + + " \"size\": \"10\",\n" + + " \"funds\": \"4.0739\",\n" + + " \"fee\": \"0.0040739\",\n" + + " \"feeRate\": \"0.001\",\n" + + " \"feeCurrency\": \"USDT\",\n" + + " \"stop\": \"\",\n" + + " \"tradeType\": \"TRADE\",\n" + + " \"type\": \"market\",\n" + + " \"createdAt\": 1732602254928\n" + + " }\n" + + " ]\n" + + " }\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1638,29 +1619,29 @@ public static void testGetRecentTradeHistoryOldRequest() throws Exception { /** getRecentTradeHistoryOld Response Get Recent Trade History - Old /api/v1/limit/fills */ public static void testGetRecentTradeHistoryOldResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -1879,6 +1860,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -1900,6 +1882,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsAutoGeneratedTest.java index 6320f81f..c9f4d610 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsAutoGeneratedTest.java @@ -14,7 +14,7 @@ class SpotPrivateWsAutoGeneratedTest { /** account Get Account Balance /account/account/balance */ public static void testAccountResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/account/balance\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"account.balance\\\",\\\"id\\\":\\\"354689988084000\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\",\\\"data\\\":{\\\"accountId\\\":\\\"548674591753\\\",\\\"currency\\\":\\\"USDT\\\",\\\"total\\\":\\\"21.133773386762\\\",\\\"available\\\":\\\"20.132773386762\\\",\\\"hold\\\":\\\"1.001\\\",\\\"availableChange\\\":\\\"-0.5005\\\",\\\"holdChange\\\":\\\"0.5005\\\",\\\"relationContext\\\":{\\\"symbol\\\":\\\"BTC-USDT\\\",\\\"orderId\\\":\\\"6721d0632db25b0007071fdc\\\"},\\\"relationEvent\\\":\\\"trade.hold\\\",\\\"relationEventId\\\":\\\"354689988084000\\\",\\\"time\\\":\\\"1730269283892\\\"}}"; + "{\"topic\":\"/account/balance\",\"type\":\"message\",\"subject\":\"account.balance\",\"id\":\"354689988084000\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"accountId\":\"548674591753\",\"currency\":\"USDT\",\"total\":\"21.133773386762\",\"available\":\"20.132773386762\",\"hold\":\"1.001\",\"availableChange\":\"-0.5005\",\"holdChange\":\"0.5005\",\"relationContext\":{\"symbol\":\"BTC-USDT\",\"orderId\":\"6721d0632db25b0007071fdc\"},\"relationEvent\":\"trade.hold\",\"relationEventId\":\"354689988084000\",\"time\":\"1730269283892\"}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -22,7 +22,7 @@ public static void testAccountResponse() throws Exception { /** orderV1 Get Order(V1) /orderV1/spotMarket/tradeOrders */ public static void testOrderV1Response() throws Exception { String data = - "{\\\"topic\\\":\\\"/spotMarket/tradeOrdersV2\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"orderChange\\\",\\\"userId\\\":\\\"633559791e1cbc0001f319bc\\\",\\\"channelType\\\":\\\"private\\\",\\\"data\\\":{\\\"canceledSize\\\":\\\"0\\\",\\\"clientOid\\\":\\\"5c52e11203aa677f33e493fb\\\",\\\"filledSize\\\":\\\"0\\\",\\\"orderId\\\":\\\"6720ecd9ec71f4000747731a\\\",\\\"orderTime\\\":1730211033305,\\\"orderType\\\":\\\"limit\\\",\\\"originSize\\\":\\\"0.00001\\\",\\\"price\\\":\\\"50000\\\",\\\"remainSize\\\":\\\"0.00001\\\",\\\"side\\\":\\\"buy\\\",\\\"size\\\":\\\"0.00001\\\",\\\"status\\\":\\\"open\\\",\\\"symbol\\\":\\\"BTC-USDT\\\",\\\"ts\\\":1730211033335000000,\\\"type\\\":\\\"open\\\"}}"; + "{\"topic\":\"/spotMarket/tradeOrdersV2\",\"type\":\"message\",\"subject\":\"orderChange\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"canceledSize\":\"0\",\"clientOid\":\"5c52e11203aa677f33e493fb\",\"filledSize\":\"0\",\"orderId\":\"6720ecd9ec71f4000747731a\",\"orderTime\":1730211033305,\"orderType\":\"limit\",\"originSize\":\"0.00001\",\"price\":\"50000\",\"remainSize\":\"0.00001\",\"side\":\"buy\",\"size\":\"0.00001\",\"status\":\"open\",\"symbol\":\"BTC-USDT\",\"ts\":1730211033335000000,\"type\":\"open\"}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -30,7 +30,7 @@ public static void testOrderV1Response() throws Exception { /** orderV2 Get Order(V2) /orderV2/spotMarket/tradeOrdersV2 */ public static void testOrderV2Response() throws Exception { String 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\\\"}}"; + "{\"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\"}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -38,7 +38,7 @@ public static void testOrderV2Response() throws Exception { /** stopOrder Get Stop Order /stopOrder/spotMarket/advancedOrders */ public static void testStopOrderResponse() throws Exception { String 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}}"; + "{\"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}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsAutoGeneratedTest.java index bea60879..1ad76f91 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsAutoGeneratedTest.java @@ -14,7 +14,7 @@ class SpotPublicWsAutoGeneratedTest { /** allTickers Get All Tickers /allTickers/market/ticker:all */ public static void testAllTickersResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/market/ticker:all\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"BTC-USDT\\\",\\\"data\\\":{\\\"bestAsk\\\":\\\"67218.7\\\",\\\"bestAskSize\\\":\\\"1.92318539\\\",\\\"bestBid\\\":\\\"67218.6\\\",\\\"bestBidSize\\\":\\\"0.01045638\\\",\\\"price\\\":\\\"67220\\\",\\\"sequence\\\":\\\"14691455768\\\",\\\"size\\\":\\\"0.00004316\\\",\\\"time\\\":1729757723612}}"; + "{\"topic\":\"/market/ticker:all\",\"type\":\"message\",\"subject\":\"BTC-USDT\",\"data\":{\"bestAsk\":\"67218.7\",\"bestAskSize\":\"1.92318539\",\"bestBid\":\"67218.6\",\"bestBidSize\":\"0.01045638\",\"price\":\"67220\",\"sequence\":\"14691455768\",\"size\":\"0.00004316\",\"time\":1729757723612}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -22,7 +22,7 @@ public static void testAllTickersResponse() throws Exception { /** callAuctionInfo Get Call Auction Info /callAuctionInfo/callauction/callauctionData:_symbol_ */ public static void testCallAuctionInfoResponse() throws Exception { String 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}}"; + "{\"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}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -33,7 +33,7 @@ public static void testCallAuctionInfoResponse() throws Exception { */ public static void testCallAuctionOrderbookLevel50Response() throws Exception { String 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}}"; + "{\"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}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -41,7 +41,7 @@ public static void testCallAuctionOrderbookLevel50Response() throws Exception { /** klines Klines /klines/market/candles:_symbol___type_ */ public static void testKlinesResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/market/candles:BTC-USDT_1hour\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"trade.candles.update\\\",\\\"data\\\":{\\\"symbol\\\":\\\"BTC-USDT\\\",\\\"candles\\\":[\\\"1729839600\\\",\\\"67644.9\\\",\\\"67437.6\\\",\\\"67724.8\\\",\\\"67243.8\\\",\\\"44.88321441\\\",\\\"3027558.991928447\\\"],\\\"time\\\":1729842192785164840}}"; + "{\"topic\":\"/market/candles:BTC-USDT_1hour\",\"type\":\"message\",\"subject\":\"trade.candles.update\",\"data\":{\"symbol\":\"BTC-USDT\",\"candles\":[\"1729839600\",\"67644.9\",\"67437.6\",\"67724.8\",\"67243.8\",\"44.88321441\",\"3027558.991928447\"],\"time\":1729842192785164840}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -49,8 +49,8 @@ public static void testKlinesResponse() throws Exception { /** marketSnapshot Market Snapshot /marketSnapshot/market/snapshot:_market_ */ public static void testMarketSnapshotResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/market/snapshot:BTC\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"trade.snapshot\\\",\\\"data\\\":{\\\"sequence\\\":\\\"1729785948015\\\",\\\"data\\\":{\\\"askSize\\\":1375.1096,\\\"averagePrice\\\":0.00000262,\\\"baseCurrency\\\":\\\"CHR\\\",\\\"bidSize\\\":152.0912,\\\"board\\\":0,\\\"buy\\\":0.00000263,\\\"changePrice\\\":0.00000005300000000000,\\\"changeRate\\\":0.0200,\\\"close\\\":0.000002698,\\\"datetime\\\":1729785948008,\\\"high\\\":0.00000274600000000000,\\\"lastTradedPrice\\\":0.000002698,\\\"low\\\":0.00000255800000000000,\\\"makerCoefficient\\\":1.000000,\\\"makerFeeRate\\\":0.001,\\\"marginTrade\\\":false,\\\"mark\\\":0,\\\"market\\\":\\\"BTC\\\",\\\"marketChange1h\\\":{\\\"changePrice\\\":-0.00000000900000000000,\\\"changeRate\\\":-0.0033,\\\"high\\\":0.00000270700000000000,\\\"low\\\":0.00000264200000000000,\\\"open\\\":0.00000270700000000000,\\\"vol\\\":27.10350000000000000000,\\\"volValue\\\":0.00007185015660000000},\\\"marketChange24h\\\":{\\\"changePrice\\\":0.00000005300000000000,\\\"changeRate\\\":0.0200,\\\"high\\\":0.00000274600000000000,\\\"low\\\":0.00000255800000000000,\\\"open\\\":0.00000264500000000000,\\\"vol\\\":6824.94800000000000000000,\\\"volValue\\\":0.01789509649520000000},\\\"marketChange4h\\\":{\\\"changePrice\\\":0.00000000600000000000,\\\"changeRate\\\":0.0022,\\\"high\\\":0.00000270700000000000,\\\"low\\\":0.00000264200000000000,\\\"open\\\":0.00000269200000000000,\\\"vol\\\":92.69020000000000000000,\\\"volValue\\\":0.00024903875740000000},\\\"markets\\\":[\\\"BTC\\\",\\\"DePIN\\\",\\\"Layer" - + " 1\\\"],\\\"open\\\":0.00000264500000000000,\\\"quoteCurrency\\\":\\\"BTC\\\",\\\"sell\\\":0.000002695,\\\"siteTypes\\\":[\\\"global\\\"],\\\"sort\\\":100,\\\"symbol\\\":\\\"CHR-BTC\\\",\\\"symbolCode\\\":\\\"CHR-BTC\\\",\\\"takerCoefficient\\\":1.000000,\\\"takerFeeRate\\\":0.001,\\\"trading\\\":true,\\\"vol\\\":6824.94800000000000000000,\\\"volValue\\\":0.01789509649520000000}}}"; + "{\"topic\":\"/market/snapshot:BTC\",\"type\":\"message\",\"subject\":\"trade.snapshot\",\"data\":{\"sequence\":\"1729785948015\",\"data\":{\"askSize\":1375.1096,\"averagePrice\":0.00000262,\"baseCurrency\":\"CHR\",\"bidSize\":152.0912,\"board\":0,\"buy\":0.00000263,\"changePrice\":0.00000005300000000000,\"changeRate\":0.0200,\"close\":0.000002698,\"datetime\":1729785948008,\"high\":0.00000274600000000000,\"lastTradedPrice\":0.000002698,\"low\":0.00000255800000000000,\"makerCoefficient\":1.000000,\"makerFeeRate\":0.001,\"marginTrade\":false,\"mark\":0,\"market\":\"BTC\",\"marketChange1h\":{\"changePrice\":-0.00000000900000000000,\"changeRate\":-0.0033,\"high\":0.00000270700000000000,\"low\":0.00000264200000000000,\"open\":0.00000270700000000000,\"vol\":27.10350000000000000000,\"volValue\":0.00007185015660000000},\"marketChange24h\":{\"changePrice\":0.00000005300000000000,\"changeRate\":0.0200,\"high\":0.00000274600000000000,\"low\":0.00000255800000000000,\"open\":0.00000264500000000000,\"vol\":6824.94800000000000000000,\"volValue\":0.01789509649520000000},\"marketChange4h\":{\"changePrice\":0.00000000600000000000,\"changeRate\":0.0022,\"high\":0.00000270700000000000,\"low\":0.00000264200000000000,\"open\":0.00000269200000000000,\"vol\":92.69020000000000000000,\"volValue\":0.00024903875740000000},\"markets\":[\"BTC\",\"DePIN\",\"Layer" + + " 1\"],\"open\":0.00000264500000000000,\"quoteCurrency\":\"BTC\",\"sell\":0.000002695,\"siteTypes\":[\"global\"],\"sort\":100,\"symbol\":\"CHR-BTC\",\"symbolCode\":\"CHR-BTC\",\"takerCoefficient\":1.000000,\"takerFeeRate\":0.001,\"trading\":true,\"vol\":6824.94800000000000000000,\"volValue\":0.01789509649520000000}}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -60,7 +60,7 @@ public static void testMarketSnapshotResponse() throws Exception { */ public static void testOrderbookIncrementResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/market/level2:BTC-USDT\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"trade.l2update\\\",\\\"data\\\":{\\\"changes\\\":{\\\"asks\\\":[[\\\"67993.3\\\",\\\"1.21427407\\\",\\\"14701689783\\\"]],\\\"bids\\\":[]},\\\"sequenceEnd\\\":14701689783,\\\"sequenceStart\\\":14701689783,\\\"symbol\\\":\\\"BTC-USDT\\\",\\\"time\\\":1729816425625}}"; + "{\"topic\":\"/market/level2:BTC-USDT\",\"type\":\"message\",\"subject\":\"trade.l2update\",\"data\":{\"changes\":{\"asks\":[[\"67993.3\",\"1.21427407\",\"14701689783\"]],\"bids\":[]},\"sequenceEnd\":14701689783,\"sequenceStart\":14701689783,\"symbol\":\"BTC-USDT\",\"time\":1729816425625}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -68,7 +68,7 @@ public static void testOrderbookIncrementResponse() throws Exception { /** orderbookLevel1 Orderbook - Level1 /orderbookLevel1/spotMarket/level1:_symbol_,_symbol_ */ public static void testOrderbookLevel1Response() throws Exception { String data = - "{\\\"topic\\\":\\\"/spotMarket/level1:BTC-USDT\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"level1\\\",\\\"data\\\":{\\\"asks\\\":[\\\"68145.8\\\",\\\"0.51987471\\\"],\\\"bids\\\":[\\\"68145.7\\\",\\\"1.29267802\\\"],\\\"timestamp\\\":1729816058766}}"; + "{\"topic\":\"/spotMarket/level1:BTC-USDT\",\"type\":\"message\",\"subject\":\"level1\",\"data\":{\"asks\":[\"68145.8\",\"0.51987471\"],\"bids\":[\"68145.7\",\"1.29267802\"],\"timestamp\":1729816058766}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -79,7 +79,7 @@ public static void testOrderbookLevel1Response() throws Exception { */ public static void testOrderbookLevel50Response() throws Exception { String 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}}"; + "{\"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}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -89,7 +89,7 @@ public static void testOrderbookLevel50Response() throws Exception { */ public static void testOrderbookLevel5Response() throws Exception { String data = - "{\\\"topic\\\":\\\"/spotMarket/level2Depth5:BTC-USDT\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"level2\\\",\\\"data\\\":{\\\"asks\\\":[[\\\"67996.7\\\",\\\"1.14213262\\\"],[\\\"67996.8\\\",\\\"0.21748212\\\"],[\\\"67996.9\\\",\\\"0.1503747\\\"],[\\\"67997\\\",\\\"0.11446863\\\"],[\\\"67997.1\\\",\\\"0.14842782\\\"]],\\\"bids\\\":[[\\\"67996.6\\\",\\\"0.37969491\\\"],[\\\"67995.3\\\",\\\"0.20779746\\\"],[\\\"67994.5\\\",\\\"0.00047785\\\"],[\\\"67993.4\\\",\\\"0.405\\\"],[\\\"67993.3\\\",\\\"0.13528566\\\"]],\\\"timestamp\\\":1729822226746}}"; + "{\"topic\":\"/spotMarket/level2Depth5:BTC-USDT\",\"type\":\"message\",\"subject\":\"level2\",\"data\":{\"asks\":[[\"67996.7\",\"1.14213262\"],[\"67996.8\",\"0.21748212\"],[\"67996.9\",\"0.1503747\"],[\"67997\",\"0.11446863\"],[\"67997.1\",\"0.14842782\"]],\"bids\":[[\"67996.6\",\"0.37969491\"],[\"67995.3\",\"0.20779746\"],[\"67994.5\",\"0.00047785\"],[\"67993.4\",\"0.405\"],[\"67993.3\",\"0.13528566\"]],\"timestamp\":1729822226746}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -97,7 +97,7 @@ public static void testOrderbookLevel5Response() throws Exception { /** symbolSnapshot Symbol Snapshot /symbolSnapshot/market/snapshot:_symbol_ */ public static void testSymbolSnapshotResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/market/snapshot:BTC-USDT\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"trade.snapshot\\\",\\\"data\\\":{\\\"sequence\\\":\\\"14691517895\\\",\\\"data\\\":{\\\"askSize\\\":1.15955795,\\\"averagePrice\\\":66867.89967612,\\\"baseCurrency\\\":\\\"BTC\\\",\\\"bidSize\\\":0.81772627,\\\"board\\\":1,\\\"buy\\\":67158.1,\\\"changePrice\\\":315.20000000000000000000,\\\"changeRate\\\":0.0047,\\\"close\\\":67158.1,\\\"datetime\\\":1729758286011,\\\"high\\\":67611.80000000000000000000,\\\"lastTradedPrice\\\":67158.1,\\\"low\\\":65257.10000000000000000000,\\\"makerCoefficient\\\":1.000000,\\\"makerFeeRate\\\":0.001,\\\"marginTrade\\\":true,\\\"mark\\\":0,\\\"market\\\":\\\"USDS\\\",\\\"marketChange1h\\\":{\\\"changePrice\\\":-102.10000000000000000000,\\\"changeRate\\\":-0.0015,\\\"high\\\":67310.60000000000000000000,\\\"low\\\":67051.80000000000000000000,\\\"open\\\":67260.20000000000000000000,\\\"vol\\\":53.73698081000000000000,\\\"volValue\\\":3609965.13819127700000000000},\\\"marketChange24h\\\":{\\\"changePrice\\\":315.20000000000000000000,\\\"changeRate\\\":0.0047,\\\"high\\\":67611.80000000000000000000,\\\"low\\\":65257.10000000000000000000,\\\"open\\\":66842.90000000000000000000,\\\"vol\\\":2227.69895852000000000000,\\\"volValue\\\":147972941.07857507300000000000},\\\"marketChange4h\\\":{\\\"changePrice\\\":-166.30000000000000000000,\\\"changeRate\\\":-0.0024,\\\"high\\\":67476.60000000000000000000,\\\"low\\\":67051.80000000000000000000,\\\"open\\\":67324.40000000000000000000,\\\"vol\\\":173.76971188000000000000,\\\"volValue\\\":11695949.43841656500000000000},\\\"markets\\\":[\\\"USDS\\\",\\\"PoW\\\"],\\\"open\\\":66842.90000000000000000000,\\\"quoteCurrency\\\":\\\"USDT\\\",\\\"sell\\\":67158.2,\\\"siteTypes\\\":[\\\"turkey\\\",\\\"thailand\\\",\\\"global\\\"],\\\"sort\\\":100,\\\"symbol\\\":\\\"BTC-USDT\\\",\\\"symbolCode\\\":\\\"BTC-USDT\\\",\\\"takerCoefficient\\\":1.000000,\\\"takerFeeRate\\\":0.001,\\\"trading\\\":true,\\\"vol\\\":2227.69895852000000000000,\\\"volValue\\\":147972941.07857507300000000000}}}"; + "{\"topic\":\"/market/snapshot:BTC-USDT\",\"type\":\"message\",\"subject\":\"trade.snapshot\",\"data\":{\"sequence\":\"14691517895\",\"data\":{\"askSize\":1.15955795,\"averagePrice\":66867.89967612,\"baseCurrency\":\"BTC\",\"bidSize\":0.81772627,\"board\":1,\"buy\":67158.1,\"changePrice\":315.20000000000000000000,\"changeRate\":0.0047,\"close\":67158.1,\"datetime\":1729758286011,\"high\":67611.80000000000000000000,\"lastTradedPrice\":67158.1,\"low\":65257.10000000000000000000,\"makerCoefficient\":1.000000,\"makerFeeRate\":0.001,\"marginTrade\":true,\"mark\":0,\"market\":\"USDS\",\"marketChange1h\":{\"changePrice\":-102.10000000000000000000,\"changeRate\":-0.0015,\"high\":67310.60000000000000000000,\"low\":67051.80000000000000000000,\"open\":67260.20000000000000000000,\"vol\":53.73698081000000000000,\"volValue\":3609965.13819127700000000000},\"marketChange24h\":{\"changePrice\":315.20000000000000000000,\"changeRate\":0.0047,\"high\":67611.80000000000000000000,\"low\":65257.10000000000000000000,\"open\":66842.90000000000000000000,\"vol\":2227.69895852000000000000,\"volValue\":147972941.07857507300000000000},\"marketChange4h\":{\"changePrice\":-166.30000000000000000000,\"changeRate\":-0.0024,\"high\":67476.60000000000000000000,\"low\":67051.80000000000000000000,\"open\":67324.40000000000000000000,\"vol\":173.76971188000000000000,\"volValue\":11695949.43841656500000000000},\"markets\":[\"USDS\",\"PoW\"],\"open\":66842.90000000000000000000,\"quoteCurrency\":\"USDT\",\"sell\":67158.2,\"siteTypes\":[\"turkey\",\"thailand\",\"global\"],\"sort\":100,\"symbol\":\"BTC-USDT\",\"symbolCode\":\"BTC-USDT\",\"takerCoefficient\":1.000000,\"takerFeeRate\":0.001,\"trading\":true,\"vol\":2227.69895852000000000000,\"volValue\":147972941.07857507300000000000}}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -105,7 +105,7 @@ public static void testSymbolSnapshotResponse() throws Exception { /** ticker Get Ticker /ticker/market/ticker:_symbol_,_symbol_ */ public static void testTickerResponse() throws Exception { String data = - "{\\\"type\\\":\\\"message\\\",\\\"topic\\\":\\\"/market/ticker:BTC-USDT\\\",\\\"subject\\\":\\\"trade.ticker\\\",\\\"data\\\":{\\\"sequence\\\":\\\"1545896668986\\\",\\\"price\\\":\\\"0.08\\\",\\\"size\\\":\\\"0.011\\\",\\\"bestAsk\\\":\\\"0.08\\\",\\\"bestAskSize\\\":\\\"0.18\\\",\\\"bestBid\\\":\\\"0.049\\\",\\\"bestBidSize\\\":\\\"0.036\\\",\\\"Time\\\":1704873323416}}"; + "{\"type\":\"message\",\"topic\":\"/market/ticker:BTC-USDT\",\"subject\":\"trade.ticker\",\"data\":{\"sequence\":\"1545896668986\",\"price\":\"0.08\",\"size\":\"0.011\",\"bestAsk\":\"0.08\",\"bestAskSize\":\"0.18\",\"bestBid\":\"0.049\",\"bestBidSize\":\"0.036\",\"Time\":1704873323416}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } @@ -113,7 +113,7 @@ public static void testTickerResponse() throws Exception { /** trade Trade /trade/market/match:_symbol_,_symbol_ */ public static void testTradeResponse() throws Exception { String data = - "{\\\"topic\\\":\\\"/market/match:BTC-USDT\\\",\\\"type\\\":\\\"message\\\",\\\"subject\\\":\\\"trade.l3match\\\",\\\"data\\\":{\\\"makerOrderId\\\":\\\"671b5007389355000701b1d3\\\",\\\"price\\\":\\\"67523\\\",\\\"sequence\\\":\\\"11067996711960577\\\",\\\"side\\\":\\\"buy\\\",\\\"size\\\":\\\"0.003\\\",\\\"symbol\\\":\\\"BTC-USDT\\\",\\\"takerOrderId\\\":\\\"671b50161777ff00074c168d\\\",\\\"time\\\":\\\"1729843222921000000\\\",\\\"tradeId\\\":\\\"11067996711960577\\\",\\\"type\\\":\\\"match\\\"}}"; + "{\"topic\":\"/market/match:BTC-USDT\",\"type\":\"message\",\"subject\":\"trade.l3match\",\"data\":{\"makerOrderId\":\"671b5007389355000701b1d3\",\"price\":\"67523\",\"sequence\":\"11067996711960577\",\"side\":\"buy\",\"size\":\"0.003\",\"symbol\":\"BTC-USDT\",\"takerOrderId\":\"671b50161777ff00074c168d\",\"time\":\"1729843222921000000\",\"tradeId\":\"11067996711960577\",\"type\":\"match\"}}"; WsMessage resp = mapper.readValue(data, new TypeReference>() {}); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiAutoGeneratedTest.java index e4cb07ed..82a8adea 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiAutoGeneratedTest.java @@ -11,6 +11,8 @@ class VIPLendingApiAutoGeneratedTest { private static final List failedTests = new ArrayList<>(); + private static int totalTest = 0; + /** * getDiscountRateConfigs Request Get Discount Rate Configs /api/v1/otc-loan/discount-rate-configs */ @@ -24,40 +26,40 @@ public static void testGetDiscountRateConfigsRequest() throws Exception { */ public static void testGetDiscountRateConfigsResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -71,31 +73,31 @@ public static void testGetLoanInfoRequest() throws Exception { /** getLoanInfo Response Get Loan Info /api/v1/otc-loan/loan */ public static void testGetLoanInfoResponse() throws Exception { String 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" + "{\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" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -109,17 +111,17 @@ public static void testGetAccountsRequest() throws Exception { /** getAccounts Response Get Accounts /api/v1/otc-loan/accounts */ public static void testGetAccountsResponse() throws Exception { String data = - "\\n" - + "{\\n" - + " \\\"code\\\": \\\"200000\\\",\\n" - + " \\\"data\\\": [{\\n" - + " \\\"uid\\\": \\\"1260004199\\\",\\n" - + " \\\"marginCcy\\\": \\\"USDT\\\",\\n" - + " \\\"marginQty\\\": \\\"900\\\",\\n" - + " \\\"marginFactor\\\": \\\"0.9000000000\\\",\\n" - + " \\\"accountType\\\": \\\"TRADE\\\",\\n" - + " \\\"isParent\\\": true\\n" - + " }]\\n" + "\n" + + "{\n" + + " \"code\": \"200000\",\n" + + " \"data\": [{\n" + + " \"uid\": \"1260004199\",\n" + + " \"marginCcy\": \"USDT\",\n" + + " \"marginQty\": \"900\",\n" + + " \"marginFactor\": \"0.9000000000\",\n" + + " \"accountType\": \"TRADE\",\n" + + " \"isParent\": true\n" + + " }]\n" + "}"; RestResponse resp = mapper.readValue(data, new TypeReference>() {}); @@ -140,6 +142,7 @@ public static void runAllTests() { private static void run(TestCase test, String name) { System.out.println("Running test: " + name); + totalTest++; try { test.execute(); System.out.println("PASSED: " + name); @@ -161,6 +164,7 @@ public static void main(String[] args) { } public static void finish() { + System.out.printf("Test total: %d, failed: %d\n", totalTest, failedTests.size()); if (!failedTests.isEmpty()) { System.err.println("\n=== TEST SUMMARY ==="); System.err.println("Failed tests:"); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java index 112ddf00..328f9afb 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java @@ -1,11 +1,13 @@ package com.kucoin.universal.sdk.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; import lombok.ToString; @Data @ToString(exclude = "data") +@JsonIgnoreProperties(ignoreUnknown = true) public class RestResponse { @JsonProperty("code") diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WsMessage.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WsMessage.java index 13c65693..b1470fe5 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WsMessage.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WsMessage.java @@ -1,11 +1,13 @@ package com.kucoin.universal.sdk.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; import lombok.ToString; @Data @ToString(exclude = "data") +@JsonIgnoreProperties(ignoreUnknown = true) public class WsMessage { /** Unique message ID */ @@ -18,7 +20,7 @@ public class WsMessage { /** Sequence number */ @JsonProperty("sn") - private Integer sn; + private Long sn; /** The topic of the message */ @JsonProperty("topic") From 06ea7d01770150be234a273035d3211447e851ce Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Mon, 7 Jul 2025 15:04:31 +0800 Subject: [PATCH 13/39] feat(java): add transport support --- .../main/resources/java-sdk/api_test.mustache | 2 +- sdk/java/Makefile | 2 +- sdk/java/pom.xml | 14 + sdk/java/script/auto_test.sh | 2 +- .../sdk/internal/infra/DefaultTransport.java | 328 ++++++++++++++++++ .../sdk/internal/infra/KcSigner.java | 109 ++++++ .../universal/sdk/model/ClientOption.java | 34 ++ .../universal/sdk/model/TransportOption.java | 77 ++++ .../sdk/model/WebSocketClientOption.java | 60 ++++ .../universal/sdk/model/WebSocketEvent.java | 17 + 10 files changed, 642 insertions(+), 3 deletions(-) create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/KcSigner.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/model/ClientOption.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/model/TransportOption.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketClientOption.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketEvent.java diff --git a/generator/plugin/src/main/resources/java-sdk/api_test.mustache b/generator/plugin/src/main/resources/java-sdk/api_test.mustache index 4f74266e..d452bdfb 100644 --- a/generator/plugin/src/main/resources/java-sdk/api_test.mustache +++ b/generator/plugin/src/main/resources/java-sdk/api_test.mustache @@ -26,7 +26,7 @@ class {{classname}}AutoGeneratedTest{ {{vendorExtensions.x-meta.methodServiceFmt}}Req obj = mapper.readValue(data, {{vendorExtensions.x-meta.methodServiceFmt}}Req.class); {{/hasParams}} {{^hasParams}} - // $this->assertTrue(true); + // pass {{/hasParams}} } diff --git a/sdk/java/Makefile b/sdk/java/Makefile index cb035b7a..bdef1d2e 100644 --- a/sdk/java/Makefile +++ b/sdk/java/Makefile @@ -10,7 +10,7 @@ format: .PHONY: auto-test auto-test: build - docker run --rm java-sdk-image:latest bash /app/auto_test.sh + docker run --rm -v m2-cache:/root/.m2 java-sdk-image:latest bash /app/auto_test.sh .PHONY: before-release-test before-release-test: build diff --git a/sdk/java/pom.xml b/sdk/java/pom.xml index 52c549b9..5c01c9a3 100644 --- a/sdk/java/pom.xml +++ b/sdk/java/pom.xml @@ -34,6 +34,8 @@ 1.18.34 2.17.1 5.13.2 + 4.12.0 + 2.0.16 @@ -49,12 +51,24 @@ ${jackson.version} compile + + com.squareup.okhttp3 + okhttp + ${okhttp3.version} + compile + org.junit.jupiter junit-jupiter ${jupiter.version} test + + org.slf4j + slf4j-api + ${slf4j.version} + compile + diff --git a/sdk/java/script/auto_test.sh b/sdk/java/script/auto_test.sh index 4eb4e784..14ebb944 100644 --- a/sdk/java/script/auto_test.sh +++ b/sdk/java/script/auto_test.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -cd .. +cd /src LOG_FILE="auto-tests.detail.log" : > "$LOG_FILE" diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java new file mode 100644 index 00000000..071bc205 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java @@ -0,0 +1,328 @@ +package com.kucoin.universal.sdk.internal.infra; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JavaType; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.internal.interfaces.PathVar; +import com.kucoin.universal.sdk.internal.interfaces.Request; +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.Transport; +import com.kucoin.universal.sdk.model.*; +import kotlin.Pair; +import lombok.NonNull; +import okhttp3.*; + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.*; +import java.util.concurrent.TimeUnit; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; + +/** OkHttp-based implementation of {@link Transport}. */ +public final class DefaultTransport implements Transport { + + private static final MediaType JSON = MediaType.get("application/json; charset=utf-8"); + + private final ClientOption clientOpt; + private final TransportOption opt; + private final String version; + private final OkHttpClient http; + private final KcSigner signer; + private final ObjectMapper mapper = new ObjectMapper(); + + public DefaultTransport(@NonNull ClientOption clientOpt, String version) { + this.clientOpt = clientOpt; + this.opt = + Optional.ofNullable(clientOpt.getTransportOption()) + .orElseGet(() -> TransportOption.builder().build()); + this.version = version; + this.http = buildOkHttp(opt); + this.signer = + new KcSigner( + clientOpt.getKey(), + clientOpt.getSecret(), + clientOpt.getPassphrase(), + clientOpt.getBrokerName(), + clientOpt.getBrokerPartner(), + clientOpt.getBrokerKey()); + } + + private OkHttpClient buildOkHttp(TransportOption o) { + + // connection pool + ConnectionPool pool = + o.isKeepAlive() + ? new ConnectionPool( + o.getMaxIdleConnections(), + o.getKeepAliveDuration().toMillis(), + TimeUnit.MILLISECONDS) + : new ConnectionPool(0, 1, TimeUnit.SECONDS); // disable keep-alive + + OkHttpClient.Builder b = + new OkHttpClient.Builder() + .connectionPool(pool) + .connectTimeout(o.getConnectTimeout()) + .readTimeout(o.getReadTimeout()) + .writeTimeout(o.getWriteTimeout()) + .callTimeout(o.getCallTimeout()) + .pingInterval(o.getPingInterval()) + .retryOnConnectionFailure(o.isRetryOnConnectionFailure()); + + // proxy + o.proxy().ifPresent(b::proxy); + + // dispatcher limits + Dispatcher d = new Dispatcher(); + d.setMaxRequests(o.getMaxRequests()); + d.setMaxRequestsPerHost(o.getMaxRequestsPerHost()); + b.dispatcher(d); + + // interceptors + o.interceptors().forEach(b::addInterceptor); + + return b.build(); + } + + private static class PathRes { + String path; + Set used = new HashSet<>(); + } + + /** Replace {var} placeholders with field values annotated by {@link PathVar}. */ + private PathRes processPathVar(String path, Request req) { + PathRes pr = new PathRes(); + if (req == null) { + pr.path = path; + return pr; + } + + Pattern p = Pattern.compile("\\{(.*?)}"); + Matcher m = p.matcher(path); + StringBuffer sb = new StringBuffer(); + + while (m.find()) { + String token = m.group(1); + String replacement = null; + + // find matching field annotated with @PathVar("token") + for (Field f : req.getClass().getDeclaredFields()) { + PathVar pv = f.getAnnotation(PathVar.class); + if (pv == null || !pv.value().equals(token)) continue; + + f.setAccessible(true); + Object v; + try { + v = f.get(req); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + + if (v == null) throw new IllegalStateException("path var '" + token + "' is null"); + + pr.used.add(f.getName()); + replacement = String.valueOf(v); + break; + } + + if (replacement == null) + throw new IllegalArgumentException("no field bound for {" + token + '}'); + + m.appendReplacement(sb, Matcher.quoteReplacement(replacement)); + } + m.appendTail(sb); + + pr.path = sb.toString(); + return pr; + } + + private static class QueryRes { + HttpUrl url; // encoded url + String raw; // raw query for signing + } + + /** Build encoded URL and raw query string simultaneously. */ + private QueryRes buildUrl(String base, String path, Request req, Set skip) { + HttpUrl.Builder ub = + Objects.requireNonNull(HttpUrl.parse(base + path), "invalid base").newBuilder(); + List rawParts = new ArrayList<>(); + + if (req != null) { + for (Field f : req.getClass().getDeclaredFields()) { + if (Modifier.isStatic(f.getModifiers()) || skip.contains(f.getName())) continue; + f.setAccessible(true); + Object v; + try { + v = f.get(req); + } catch (IllegalAccessException e) { + continue; + } + if (v == null) continue; + + String key = + Optional.ofNullable(f.getAnnotation(JsonProperty.class)) + .map(JsonProperty::value) + .filter(s -> !s.isEmpty()) + .orElse(f.getName()); + + String val = v instanceof Boolean ? ((Boolean) v ? "true" : "false") : String.valueOf(v); + + ub.addQueryParameter(key, val); + rawParts.add(key + "=" + val); + } + } + QueryRes qr = new QueryRes(); + qr.url = ub.build(); + qr.raw = String.join("&", rawParts); + return qr; + } + + private String endpoint(String domain) { + switch (domain) { + case Constants.DOMAIN_TYPE_SPOT: + return clientOpt.getSpotEndpoint(); + case Constants.DOMAIN_TYPE_FUTURES: + return clientOpt.getFuturesEndpoint(); + case Constants.DOMAIN_TYPE_BROKER: + return clientOpt.getBrokerEndpoint(); + default: + throw new IllegalArgumentException("domain: " + domain); + } + } + + private static int headerInt(okhttp3.Response r, String k) { + String v = r.header(k); + return v != null ? Integer.parseInt(v) : -1; + } + + private okhttp3.Request processRequest( + Request reqObj, + String path, + Set excludeField, + String endpoint, + String method, + boolean broker, + boolean requestAsJson) + throws Exception { + + String rawUrl = path; + List> queryParam = new LinkedList<>(); + String body = ""; + + HttpUrl.Builder urlBuilder = + Objects.requireNonNull(HttpUrl.parse(endpoint + path)).newBuilder(); + + // build body + if (requestAsJson) { + if (reqObj != null) body = mapper.writeValueAsString(reqObj); + } else { + switch (method) { + case "GET": + case "DELETE": + if (reqObj != null) { + Map map = mapper.convertValue(reqObj, Map.class); + for (Map.Entry e : map.entrySet()) { + if (excludeField.contains(e.getKey()) || e.getValue() == null) continue; + String key = e.getKey(); + Object valObj = e.getValue(); + String val = + valObj instanceof Enum ? ((Enum) valObj).name() : String.valueOf(valObj); + urlBuilder.addQueryParameter(key, val); + queryParam.add(new Pair<>(key, val)); + } + } + break; + + case "POST": + if (reqObj != null) body = mapper.writeValueAsString(reqObj); + break; + + default: + throw new IllegalArgumentException("invalid method " + method); + } + } + + rawUrl = + rawUrl + + "?" + + queryParam.stream() + .map(p -> p.getFirst() + "=" + p.getSecond()) + .collect(Collectors.joining("&")); + + RequestBody rb = null; + if (!body.isEmpty()) { + rb = RequestBody.create(body, JSON); + } + + okhttp3.Request.Builder qb = + new okhttp3.Request.Builder().url(urlBuilder.build()).method(method, rb); + qb.header("Content-Type", "application/json"); + qb.header("User-Agent", "Kucoin-Universal-Java-SDK/" + version); + + // sign + String payload = method + rawUrl + body; + Map sig = broker ? signer.brokerHeaders(payload) : signer.headers(payload); + sig.forEach(qb::header); + + return qb.build(); + } + + private >> T doRequest( + okhttp3.Request request, Class respClazz) throws Exception { + okhttp3.Response resp = http.newCall(request).execute(); + + if (!resp.isSuccessful()) { + String msg = resp.body() != null ? resp.body().string() : ""; + throw new RuntimeException("HTTP " + resp.code() + " : " + msg); + } + + String json = resp.body() != null ? resp.body().string() : ""; + + JavaType type = mapper.getTypeFactory().constructParametricType(RestResponse.class, respClazz); + + RestResponse common = mapper.readValue(json, type); + common.setRateLimit( + new RestRateLimit( + headerInt(resp, "gw-ratelimit-limit"), + headerInt(resp, "gw-ratelimit-remaining"), + headerInt(resp, "gw-ratelimit-reset"))); + common.checkError(); + T response = common.getData(); + response.setCommonResponse(common); + return response; + } + + @Override + public >> T call( + String domain, + boolean broker, + String method, + String path, + Request reqObj, + Class respClazz, + boolean requestAsJson) { + + method = method.toUpperCase(); + domain = domain.toLowerCase(); + + try { + + String endpoint = endpoint(domain); + PathRes pr = processPathVar(path, reqObj); + + okhttp3.Request request = + processRequest(reqObj, pr.path, pr.used, endpoint, method, broker, requestAsJson); + + return doRequest(request, respClazz); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + @Override + public void close() { + http.connectionPool().evictAll(); + http.dispatcher().executorService().shutdown(); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/KcSigner.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/KcSigner.java new file mode 100644 index 00000000..48122c16 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/KcSigner.java @@ -0,0 +1,109 @@ +package com.kucoin.universal.sdk.internal.infra; + +import java.nio.charset.StandardCharsets; +import java.time.Instant; +import java.util.HashMap; +import java.util.Map; +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; +import lombok.extern.slf4j.Slf4j; + +/** Generates KuCoin authentication headers for both normal user mode and broker mode. */ +@Slf4j +public final class KcSigner { + + private static final String HMAC_SHA256 = "HmacSHA256"; + + private final String apiKey; + private final String apiSecret; + private final String apiPassphrase; + + private final String brokerName; + private final String brokerPartner; + private final String brokerKey; + + public KcSigner( + String apiKey, + String apiSecret, + String apiPassphrase, + String brokerName, + String brokerPartner, + String brokerKey) { + + this.apiKey = nullSafe(apiKey); + this.apiSecret = nullSafe(apiSecret); + + this.apiPassphrase = + (!this.apiSecret.isEmpty() && !nullSafe(apiPassphrase).isEmpty()) + ? sign(apiPassphrase, this.apiSecret) + : apiPassphrase; + + this.brokerName = nullSafe(brokerName); + this.brokerPartner = nullSafe(brokerPartner); + this.brokerKey = nullSafe(brokerKey); + + if (this.apiKey.isEmpty() || this.apiSecret.isEmpty() || this.apiPassphrase.isEmpty()) { + log.warn( + "[AUTH WARNING] API credentials incomplete. Access is restricted to public endpoints."); + } + } + + /** Base64-encoded HMAC-SHA256. */ + private static String sign(String plain, String key) { + try { + Mac mac = Mac.getInstance(HMAC_SHA256); + mac.init(new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), HMAC_SHA256)); + byte[] raw = mac.doFinal(plain.getBytes(StandardCharsets.UTF_8)); + return java.util.Base64.getEncoder().encodeToString(raw); + } catch (Exception e) { + throw new IllegalStateException("HMAC-SHA256 failure", e); + } + } + + /** Milliseconds since epoch as String. */ + private static String ts() { + return Long.toString(Instant.now().toEpochMilli()); + } + + /** Headers for normal signed request. */ + public Map headers(String plain) { + String timestamp = ts(); + String sig = sign(timestamp + plain, apiSecret); + + Map h = new HashMap<>(); + h.put("KC-API-KEY", apiKey); + h.put("KC-API-PASSPHRASE", apiPassphrase); + h.put("KC-API-TIMESTAMP", timestamp); + h.put("KC-API-SIGN", sig); + h.put("KC-API-KEY-VERSION", "3"); + return h; + } + + /** Headers for broker request (includes partner signature). */ + public Map brokerHeaders(String plain) { + if (brokerPartner.isEmpty() || brokerName.isEmpty()) { + System.err.println("[BROKER ERROR] Missing broker information"); + throw new IllegalStateException("Broker information cannot be empty"); + } + + String timestamp = ts(); + String sig = sign(timestamp + plain, apiSecret); + String partnerSig = sign(timestamp + brokerPartner + apiKey, brokerKey); + + Map h = new HashMap<>(); + h.put("KC-API-KEY", apiKey); + h.put("KC-API-PASSPHRASE", apiPassphrase); + h.put("KC-API-TIMESTAMP", timestamp); + h.put("KC-API-SIGN", sig); + h.put("KC-API-KEY-VERSION", "3"); + h.put("KC-API-PARTNER", brokerPartner); + h.put("KC-BROKER-NAME", brokerName); + h.put("KC-API-PARTNER-VERIFY", "true"); + h.put("KC-API-PARTNER-SIGN", partnerSig); + return h; + } + + private static String nullSafe(String s) { + return s == null ? "" : s.trim(); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/ClientOption.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/ClientOption.java new file mode 100644 index 00000000..910c55c7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/ClientOption.java @@ -0,0 +1,34 @@ +package com.kucoin.universal.sdk.model; + +import lombok.Builder; +import lombok.Getter; +import lombok.ToString; + +/** + * ClientOption holds the configuration details for a client, including authentication keys, API + * endpoints, and transport options. + */ +@ToString +@Getter +@Builder(builderClassName = "Builder") +public class ClientOption { + + /* ---------- required auth ---------- */ + private final String key; + private final String secret; + private final String passphrase; + + /* ---------- optional broker ---------- */ + private final String brokerName; + private final String brokerPartner; + private final String brokerKey; + + /* ---------- endpoints ---------- */ + private final String spotEndpoint; + private final String futuresEndpoint; + private final String brokerEndpoint; + + /* ---------- transport tuning ---------- */ + private final TransportOption transportOption; + private final WebSocketClientOption websocketClientOption; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/TransportOption.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/TransportOption.java new file mode 100644 index 00000000..22cca190 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/TransportOption.java @@ -0,0 +1,77 @@ +package com.kucoin.universal.sdk.model; + +import java.net.Proxy; +import java.time.Duration; +import java.util.Collections; +import java.util.List; +import java.util.Optional; +import lombok.*; +import okhttp3.Interceptor; + +/** TransportOption holds configurations for HTTP client behavior. */ +@Getter +@Builder(toBuilder = true) +@AllArgsConstructor(access = AccessLevel.PRIVATE) +public final class TransportOption { + + /* ---------- connection & pooling ---------- */ + + /** Enable connection pooling / HTTP keep-alive (OkHttp default: {@code true}). */ + @Builder.Default private final boolean keepAlive = true; + + /** Maximum idle connections kept in the pool (OkHttp default: {@code 5}). */ + @Builder.Default private final int maxIdleConnections = 5; + + /** Idle connection eviction threshold. */ + @Builder.Default private final Duration keepAliveDuration = Duration.ofSeconds(30); + + /** Global dispatcher limit (default 64). */ + @Builder.Default private final int maxRequests = 64; + + /** Per-host dispatcher limit (default 5). */ + @Builder.Default private final int maxRequestsPerHost = 5; + + /* ---------- timeout ---------- */ + + @Builder.Default private final Duration connectTimeout = Duration.ofSeconds(10); + @Builder.Default private final Duration readTimeout = Duration.ofSeconds(30); + @Builder.Default private final Duration writeTimeout = Duration.ofSeconds(30); + + /** Hard deadline for the entire call; {@code 0} disables it. */ + @Builder.Default private final Duration callTimeout = Duration.ZERO; + + /** HTTP/2 ping interval; {@code 0} disables pings. */ + @Builder.Default private final Duration pingInterval = Duration.ZERO; + + /* ----------- proxy ------------ */ + + /** Pre-configured proxy; {@code null} means “use JVM default”. */ + private final Proxy proxy; + + /* ---------- retry / redirect ---------- */ + @Builder.Default private final boolean retryOnConnectionFailure = true; + + /** SDK-level retry attempts for idempotent requests. */ + @Builder.Default private final int maxRetries = 3; + + /** Delay between retries. */ + @Builder.Default private final Duration retryDelay = Duration.ofSeconds(2); + + /* ---------- interceptors ---------- */ + + /** Application interceptors – executed before routing / retries. */ + @Singular("interceptor") + private final List interceptors; + + /* ---------- convenience getters ---------- */ + + public Optional proxy() { + return Optional.ofNullable(proxy); + } + + public List interceptors() { + return interceptors == null + ? Collections.emptyList() + : Collections.unmodifiableList(interceptors); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketClientOption.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketClientOption.java new file mode 100644 index 00000000..5a9ef4c2 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketClientOption.java @@ -0,0 +1,60 @@ +package com.kucoin.universal.sdk.model; + +import java.time.Duration; +import lombok.*; + +@Getter +@ToString +@Builder(toBuilder = true) +@AllArgsConstructor(access = AccessLevel.PRIVATE) +public final class WebSocketClientOption { + + @FunctionalInterface + public interface WebSocketCallback { + /** + * @param event event type + * @param data primary data (e.g. message payload) + * @param message additional description / error detail + */ + void onEvent(WebSocketEvent event, String data, String message); + } + + /** auto reconnect after disconnect */ + @Builder.Default private final boolean reconnect = true; + + /** max reconnect attempts; -1 = unlimited */ + @Builder.Default private final int reconnectAttempts = -1; + + /** interval between reconnect attempts */ + @Builder.Default private final Duration reconnectInterval = Duration.ofSeconds(5); + + /** dial (hand-shake) timeout */ + @Builder.Default private final Duration dialTimeout = Duration.ofSeconds(10); + + /** inbound queue size (frames) */ + @Builder.Default private final int readMessageBuffer = 1024; + + /** outbound queue size (frames) */ + @Builder.Default private final int writeMessageBuffer = 256; + + /** single send timeout */ + @Builder.Default private final Duration writeTimeout = Duration.ofSeconds(5); + + /** event dispatcher; may be {@code null} */ + private final WebSocketCallback eventCallback; + + /** max retry for automatic resubscribe (per item) */ + @Builder.Default private final int autoResubscribeMaxAttempts = 3; + + /* ---------------- helper ---------------- */ + + /** no-op option with all defaults */ + public static WebSocketClientOption defaults() { + return WebSocketClientOption.builder().build(); + } + + /** apply event callback without touching other fields */ + public WebSocketClientOption withCallback(WebSocketCallback cb) { + return toBuilder().eventCallback(cb).build(); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketEvent.java new file mode 100644 index 00000000..50aebfd9 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketEvent.java @@ -0,0 +1,17 @@ +package com.kucoin.universal.sdk.model; + +public enum WebSocketEvent { + CONNECTED, // connection established + DISCONNECTED, // closed by server or client + TRY_RECONNECT, // about to reconnect + MESSAGE_RECEIVED, // text / binary msg arrived + ERROR_RECEIVED, // I/O or protocol error + PONG_RECEIVED, // received pong + READ_BUFFER_FULL, // inbound queue is full + WRITE_BUFFER_FULL, // outbound queue is full + CALLBACK_ERROR, // user-callback threw exception + RE_SUBSCRIBE_OK, // resubscribe succeeded + RE_SUBSCRIBE_ERROR, // resubscribe failed + CLIENT_FAIL, // fatal failure, client unusable + CLIENT_SHUTDOWN; // client closed normally +} From ad6372ff09c56ddfbce7544c2f97a57128046b44 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Wed, 9 Jul 2025 11:37:09 +0800 Subject: [PATCH 14/39] feat(java): add ws transport support --- .../sdk/internal/infra/CallbackManager.java | 91 ++++++ .../sdk/internal/infra/DefaultTransport.java | 7 +- .../infra/DefaultWebsocketTransport.java | 298 ++++++++++++++++++ .../sdk/internal/infra/DefaultWsService.java | 156 +++++++++ .../infra/DefaultWsTokenProvider.java | 62 ++++ .../universal/sdk/internal/infra/SubInfo.java | 54 ++++ .../sdk/internal/infra/TopicManager.java | 28 ++ .../internal/interfaces/WebSocketService.java | 9 +- .../interfaces/WebsocketTransport.java | 17 + .../WebsocketTransportListener.java | 13 + .../sdk/internal/interfaces/WsToken.java | 39 +++ .../internal/interfaces/WsTokenProvider.java | 11 + .../sdk/model/WebSocketClientOption.java | 9 +- 13 files changed, 774 insertions(+), 20 deletions(-) create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/CallbackManager.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsService.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsTokenProvider.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/SubInfo.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/TopicManager.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebsocketTransport.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebsocketTransportListener.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WsToken.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WsTokenProvider.java diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/CallbackManager.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/CallbackManager.java new file mode 100644 index 00000000..acb38f83 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/CallbackManager.java @@ -0,0 +1,91 @@ +package com.kucoin.universal.sdk.internal.infra; + +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import lombok.Value; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +final class CallbackManager { + + /** id → topics set */ + private final ConcurrentMap> idTopics = new ConcurrentHashMap<>(); + + /** topic → callback */ + private final ConcurrentMap topicCbs = new ConcurrentHashMap<>(); + + private final String topicPrefix; + + CallbackManager(String prefix) { + this.topicPrefix = prefix; + } + + boolean empty() { + return idTopics.isEmpty() && topicCbs.isEmpty(); + } + + boolean add(SubInfo s) { + // if id already exists -> duplicated subscribe + Set topicSet = s.topics(); + Set existed = idTopics.putIfAbsent(s.toId(), topicSet); + if (existed != null) { + log.trace("callback exists id=[{}]", s.toId()); + return false; + } + // register every topic + for (String t : topicSet) { + topicCbs.putIfAbsent(t, new Callback(s.getCallback(), s.toId(), t)); + } + return true; + } + + void remove(String id) { + Set topics = idTopics.remove(id); + if (topics == null) return; + topics.forEach(topicCbs::remove); + } + + WebSocketMessageCallback get(String topic) { + Callback cb = topicCbs.get(topic); + return cb == null ? null : cb.callback; + } + + List getSubInfo() { + List list = new ArrayList<>(); + + // one SubInfo per id + idTopics.forEach( + (id, topics) -> { + List args = new ArrayList<>(); + WebSocketMessageCallback cb = null; + + for (String topic : topics) { + int idx = topic.indexOf(':'); + if (idx == -1) { // no arg => treat as "all" + continue; + } + String arg = topic.substring(idx + 1); + if (!"all".equals(arg)) { + args.add(arg); + } + // pick callback from any topic (they’re identical for this id) + if (cb == null) { + Callback holder = topicCbs.get(topic); + if (holder != null) cb = holder.callback; + } + } + + list.add(new SubInfo(topicPrefix, args, cb)); + }); + return list; + } + + @Value + private static class Callback { + WebSocketMessageCallback callback; + String id; + String topic; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java index 071bc205..fe199c32 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java @@ -8,10 +8,6 @@ import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.internal.interfaces.Transport; import com.kucoin.universal.sdk.model.*; -import kotlin.Pair; -import lombok.NonNull; -import okhttp3.*; - import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.*; @@ -19,6 +15,9 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; +import kotlin.Pair; +import lombok.NonNull; +import okhttp3.*; /** OkHttp-based implementation of {@link Transport}. */ public final class DefaultTransport implements Transport { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java new file mode 100644 index 00000000..a984f762 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java @@ -0,0 +1,298 @@ +package com.kucoin.universal.sdk.internal.infra; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.internal.interfaces.WebsocketTransport; +import com.kucoin.universal.sdk.internal.interfaces.WebsocketTransportListener; +import com.kucoin.universal.sdk.internal.interfaces.WsToken; +import com.kucoin.universal.sdk.internal.interfaces.WsTokenProvider; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.WebSocketClientOption; +import com.kucoin.universal.sdk.model.WebSocketEvent; +import com.kucoin.universal.sdk.model.WsMessage; +import java.net.URI; +import java.time.Duration; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.concurrent.*; +import java.util.concurrent.atomic.AtomicBoolean; +import lombok.extern.slf4j.Slf4j; +import okhttp3.*; + +/** OkHttp-based WebSocket transport with */ +@Slf4j +public final class DefaultWebsocketTransport implements WebsocketTransport { + + private final WsTokenProvider tokenProvider; + private final WebSocketClientOption opt; + private final WebsocketTransportListener listener; + + private final OkHttpClient http = new OkHttpClient(); + private final ObjectMapper mapper = new ObjectMapper(); + private final AtomicBoolean connected = new AtomicBoolean(false); + private final AtomicBoolean shutting = new AtomicBoolean(false); + private final AtomicBoolean reconnecting = new AtomicBoolean(false); + private final Map> ackMap = new ConcurrentHashMap<>(); + private final ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor(); + private volatile WebSocket socket; + private volatile WsToken token; + + public DefaultWebsocketTransport( + WsTokenProvider tokenProvider, + WebSocketClientOption option, + WebsocketTransportListener listener) { + + this.tokenProvider = tokenProvider; + this.opt = option; + this.listener = listener; + } + + private static WsToken pick(List list) { + if (list == null || list.isEmpty()) { + throw new IllegalArgumentException("empty token list"); + } + return list.get(ThreadLocalRandom.current().nextInt(list.size())); + } + + private static CompletableFuture failed(Throwable ex) { + CompletableFuture f = new CompletableFuture<>(); + f.completeExceptionally(ex); + return f; + } + + @Override + public void start() { + dial(); + schedulePing(); + } + + @Override + public void stop() { + shutting.set(true); + safeClose("shutdown"); + scheduler.shutdownNow(); + tokenProvider.close(); + } + + @Override + public CompletableFuture write(WsMessage m, Duration timeout) { + if (!connected.get()) { + return failed(new IllegalStateException("not connected")); + } + + CompletableFuture fut = new CompletableFuture<>(); + ackMap.put(m.getId(), fut); + + try { + boolean queued = socket.send(mapper.writeValueAsString(m)); + if (!queued) { + throw new IllegalStateException("OkHttp buffer full"); + } + } catch (Exception e) { + ackMap.remove(m.getId()); + return failed(e); + } + + scheduler.schedule( + () -> { + if (ackMap.remove(m.getId()) != null) { + fut.completeExceptionally(new TimeoutException("ack timeout")); + } + }, + timeout.toMillis(), + TimeUnit.MILLISECONDS); + + return fut; + } + + private void dial() { + try { + token = pick(tokenProvider.getToken()); + + URI uri = + URI.create( + token.getEndpoint() + + "?connectId=" + + System.nanoTime() + + "&token=" + + token.getToken()); + + Request req = new Request.Builder().url(uri.toString()).build(); + CountDownLatch welcome = new CountDownLatch(1); + + socket = + http.newWebSocket( + req, + new WebSocketListener() { + @Override + public void onMessage(WebSocket w, String txt) { + handle(txt, welcome); + } + + @Override + public void onClosed(WebSocket w, int c, String r) { + tryReconnect(r); + } + + @Override + public void onFailure(WebSocket w, Throwable t, Response r) { + log.error("websocket emits error events", t); + } + }); + + if (!welcome.await(5, TimeUnit.SECONDS)) { + throw new IllegalStateException("welcome not received"); + } + + connected.set(true); + listener.onEvent(WebSocketEvent.CONNECTED, ""); + } catch (Exception e) { + safeClose("dial-error"); + throw new RuntimeException(e); + } + } + + private void handle(String json, CountDownLatch welcome) { + try { + WsMessage m = mapper.readValue(json, WsMessage.class); + switch (m.getType()) { + case Constants.WS_MESSAGE_TYPE_WELCOME: + { + welcome.countDown(); + break; + } + case Constants.WS_MESSAGE_TYPE_MESSAGE: + { + listener.onMessage(m); + break; + } + + case Constants.WS_MESSAGE_TYPE_PONG: + case Constants.WS_MESSAGE_TYPE_ACK: + case Constants.WS_MESSAGE_TYPE_ERROR: + { + CompletableFuture f = ackMap.remove(m.getId()); + if (f == null) { + break; + } + if (m.getType().equalsIgnoreCase(Constants.WS_MESSAGE_TYPE_ERROR)) { + f.completeExceptionally(new RuntimeException(String.valueOf(m.getData()))); + } else { + f.complete(null); + } + break; + } + default: + { + log.warn("unknown ws type {}", m.getType()); + } + } + } catch (Exception e) { + log.error("decode err", e); + } + } + + private void schedulePing() { + long interval = token.getPingInterval(); + long timeout = token.getPingTimeout(); + scheduler.scheduleAtFixedRate( + () -> { + if (!connected.get()) { + return; + } + WsMessage ping = new WsMessage(); + ping.setId(String.valueOf(System.nanoTime())); + ping.setType(Constants.WS_MESSAGE_TYPE_PING); + write(ping, Duration.ofMillis(timeout)) + .exceptionally( + ex -> { + listener.onEvent(WebSocketEvent.ERROR_RECEIVED, ex.getMessage()); + return null; + }); + }, + interval, + interval, + TimeUnit.MILLISECONDS); + } + + private void tryReconnect(String reason) { + if (shutting.get()) { + return; + } + log.info("Websocket disconnected due to {}, Reconnection...", reason); + safeClose(reason); + + if (!opt.isReconnect()) { + log.warn("Reconnect failed: auto-reconnect is disabled"); + return; + } + + if (!reconnecting.compareAndSet(false, true)) { + log.warn("Another thread is reconnecting, skip current attempt"); + return; + } + + Thread reconnectThread = + new Thread( + () -> { + int attempt = 0; + + try { + while (true) { + if (shutting.get()) { + log.info("Reconnect failed: client is shutting down"); + return; + } + if (opt.getReconnectAttempts() != -1 && attempt >= opt.getReconnectAttempts()) { + log.info("Reconnect failed: maximum number of attempts exceeded"); + listener.onEvent(WebSocketEvent.CLIENT_FAIL, ""); + return; + } + + try { + listener.onEvent(WebSocketEvent.TRY_RECONNECT, "attempt " + attempt); + dial(); + listener.onEvent(WebSocketEvent.CONNECTED, ""); + listener.onReconnected(); + log.info("Reconnect successful"); + return; + } catch (Exception ex) { + attempt++; + log.info( + "Reconnect failed, retry:{}, max:{}, reason:{}", + attempt, + opt.getReconnectAttempts(), + ex.getMessage()); + try { + Thread.sleep(opt.getReconnectInterval().toMillis()); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + return; + } + } + } + } finally { + reconnecting.set(false); + } + }); + reconnectThread.setName(String.format("Reconnect-Thread-%s", new Date())); + reconnectThread.setDaemon(true); + reconnectThread.start(); + } + + private void safeClose(String reason) { + try { + listener.onEvent(WebSocketEvent.DISCONNECTED, ""); + ackMap + .values() + .forEach(f -> f.completeExceptionally(new RuntimeException("connection closed"))); + ackMap.clear(); + connected.set(false); + if (socket != null) { + socket.close(1000, reason); + } + } catch (Exception e) { + log.error("exception when safe close", e); + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsService.java new file mode 100644 index 00000000..f136daa1 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsService.java @@ -0,0 +1,156 @@ +package com.kucoin.universal.sdk.internal.infra; + +import com.kucoin.universal.sdk.internal.interfaces.*; +import com.kucoin.universal.sdk.model.*; +import java.util.Arrays; +import java.util.UUID; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public final class DefaultWsService implements WebSocketService, WebsocketTransportListener { + + private final WebsocketTransport client; + private final WebSocketClientOption option; + private final boolean privateChannel; + private TopicManager topicManager = new TopicManager(); + + public DefaultWsService( + ClientOption opt, String domain, boolean privateChannel, String sdkVersion) { + + this.privateChannel = privateChannel; + this.option = opt.getWebsocketClientOption(); + + Transport tokenTransport = new DefaultTransport(opt, sdkVersion); + + WsTokenProvider tokenProvider = + new DefaultWsTokenProvider(tokenTransport, domain, privateChannel); + + this.client = new DefaultWebsocketTransport(tokenProvider, option, this); + } + + @Override + public void start() { + client.start(); + } + + @Override + public void stop() { + client.stop(); + } + + @Override + public String subscribe(String prefix, String[] args, WebSocketMessageCallback callback) { + + SubInfo sub = new SubInfo(prefix, Arrays.asList(args), callback); + CallbackManager cm = topicManager.getCallbackManager(prefix); + String id = sub.toId(); + Exception exception = null; + + if (!cm.add(sub)) { + throw new IllegalStateException("already subscribed"); + } + + try { + WsMessage msg = new WsMessage(); + msg.setId(id); + msg.setType(Constants.WS_MESSAGE_TYPE_SUBSCRIBE); + msg.setTopic(sub.subTopic()); + msg.setPrivateChannel(privateChannel); + msg.setResponse(true); + + client.write(msg, option.getWriteTimeout()).join(); + return id; + } catch (Exception e) { + cm.remove(id); + exception = e; + throw new RuntimeException("subscribe failed", e); + } finally { + log.info( + "subscribe prefix:{}, args:{}, private:{}, id:{}", + prefix, + args, + privateChannel, + id, + exception); + } + } + + @Override + public void unsubscribe(String id) { + SubInfo sub = SubInfo.fromId(id); + CallbackManager cm = topicManager.getCallbackManager(sub.subTopic()); + Exception exception = null; + + try { + WsMessage msg = new WsMessage(); + msg.setId(UUID.randomUUID().toString()); + msg.setType(Constants.WS_MESSAGE_TYPE_UNSUBSCRIBE); + msg.setTopic(sub.subTopic()); + msg.setPrivateChannel(privateChannel); + msg.setResponse(true); + + client.write(msg, option.getWriteTimeout()).join(); + cm.remove(id); + } catch (Exception e) { + exception = e; + throw new RuntimeException("unsubscribe failed", e); + } finally { + log.info("unsubscribe private:{}, id:{}", privateChannel, id, exception); + } + } + + @Override + public void onEvent(WebSocketEvent event, String message) { + notifyEvent(event, message); + } + + @Override + public void onMessage(WsMessage wsMessage) { + CallbackManager cm = topicManager.getCallbackManager(wsMessage.getTopic()); + WebSocketMessageCallback cb = cm.get(wsMessage.getTopic()); + if (cb == null) { + log.warn("can not find callback manager, topic:{}", wsMessage.getTopic()); + return; + } + + try { + cb.onMessage(wsMessage); + } catch (Throwable t) { + notifyEvent(WebSocketEvent.CALLBACK_ERROR, t.getMessage()); + } + } + + @Override + public void onReconnected() { + TopicManager oldTopicManager = topicManager; + this.topicManager = new TopicManager(); + + oldTopicManager.forEach( + (key, value) -> { + value + .getSubInfo() + .forEach( + sub -> { + try { + subscribe( + sub.getPrefix(), + sub.getArgs().toArray(new String[] {}), + sub.getCallback()); + notifyEvent(WebSocketEvent.RE_SUBSCRIBE_OK, sub.toId()); + } catch (Exception e) { + notifyEvent(WebSocketEvent.RE_SUBSCRIBE_ERROR, sub.toId()); + } + }); + }); + } + + private void notifyEvent(WebSocketEvent ev, String msg) { + if (option.getEventCallback() != null) { + try { + option.getEventCallback().onEvent(ev, msg); + } catch (Exception e) { + log.error("exception when notify event", e); + } + } + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsTokenProvider.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsTokenProvider.java new file mode 100644 index 00000000..9c8412b0 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsTokenProvider.java @@ -0,0 +1,62 @@ +package com.kucoin.universal.sdk.internal.infra; + +import com.kucoin.universal.sdk.internal.interfaces.Response; +import com.kucoin.universal.sdk.internal.interfaces.Transport; +import com.kucoin.universal.sdk.internal.interfaces.WsToken; +import com.kucoin.universal.sdk.internal.interfaces.WsTokenProvider; +import com.kucoin.universal.sdk.model.RestResponse; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import lombok.Data; +import lombok.ToString; + +public class DefaultWsTokenProvider implements WsTokenProvider { + + private static final String PATH_PRIVATE = "/api/v1/bullet-private"; + private static final String PATH_PUBLIC = "/api/v1/bullet-public"; + + private final Transport transport; + private final String domainType; + private final boolean isPrivate; + + public DefaultWsTokenProvider(Transport transport, String domainType, boolean isPrivate) { + this.transport = Objects.requireNonNull(transport, "transport"); + this.domainType = Objects.requireNonNull(domainType, "domainType"); + this.isPrivate = isPrivate; + } + + @Override + public List getToken() { + String path = isPrivate ? PATH_PRIVATE : PATH_PUBLIC; + + TokenResponse result = + transport.call(domainType, false, "POST", path, null, TokenResponse.class, false); + + if (result == null + || result.getToken() == null + || result.getInstanceServers() == null + || result.getInstanceServers().isEmpty()) { + return Collections.emptyList(); + } + + result.getInstanceServers().forEach(s -> s.setToken(result.getToken())); + return result.getInstanceServers(); + } + + @Override + public void close() { + transport.close(); + } + + @Data + @ToString + private static class TokenResponse + implements Response> { + private String token; + private List instanceServers; + + @Override + public void setCommonResponse(RestResponse response) {} + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/SubInfo.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/SubInfo.java new file mode 100644 index 00000000..afaa570e --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/SubInfo.java @@ -0,0 +1,54 @@ +package com.kucoin.universal.sdk.internal.infra; + +import com.kucoin.universal.sdk.internal.interfaces.WebSocketMessageCallback; +import java.util.*; +import java.util.stream.Collectors; +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +@Getter +public final class SubInfo { + + private static final String SEP = "@@"; + private static final String EMPTY_ARGS_STR = "EMPTY_ARGS"; + + private final String prefix; + private final List args; + private final WebSocketMessageCallback callback; + + public String toId() { + if (args == null || args.isEmpty()) { + return prefix + SEP + EMPTY_ARGS_STR; + } + + List sorted = new ArrayList<>(args); + Collections.sort(sorted); + return prefix + SEP + String.join(",", sorted); + } + + public static SubInfo fromId(String id) { + String[] parts = id.split(SEP, -1); + if (parts.length != 2) throw new IllegalArgumentException("invalid id: " + id); + + String prefix = parts[0]; + List args; + if (parts[1].equals(EMPTY_ARGS_STR)) { + args = new LinkedList<>(); + } else { + args = Arrays.asList(parts[1].split(",")); + } + return new SubInfo(prefix, args, null); + } + + public String subTopic() { + return args == null || args.isEmpty() ? prefix : prefix + ":" + String.join(",", args); + } + + public Set topics() { + if (args == null || args.isEmpty()) { + return Collections.singleton(prefix); + } + return args.stream().map(a -> prefix + ":" + a).collect(Collectors.toSet()); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/TopicManager.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/TopicManager.java new file mode 100644 index 00000000..a055ea9d --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/TopicManager.java @@ -0,0 +1,28 @@ +package com.kucoin.universal.sdk.internal.infra; + +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.function.BiConsumer; + +final class TopicManager { + + private final ConcurrentMap map = new ConcurrentHashMap<>(); + + CallbackManager getCallbackManager(String topic) { + String[] parts = topic.split(":", 2); + String prefix = topic; + if (parts.length == 2 && !"all".equals(parts[1])) { + prefix = parts[0]; + } + + return map.computeIfAbsent(prefix, CallbackManager::new); + } + + void forEach(BiConsumer action) { + map.forEach(action); + } + + boolean isEmpty() { + return map.isEmpty(); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketService.java index e4b169c7..0e7086d4 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketService.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketService.java @@ -8,14 +8,7 @@ public interface WebSocketService { /** Stops the WebSocket service. */ void stop(); - /** - * Subscribes to a topic with a callback handler. - * - * @param prefix The topic prefix - * @param args The arguments to be included in the topic - * @param callback Callback to handle incoming messages - * @return CompletableFuture resolving to the subscription ID (string) - */ + /** Subscribes to a topic with a callback handler. */ String subscribe(String prefix, String[] args, WebSocketMessageCallback callback); /** Unsubscribes from a topic. */ diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebsocketTransport.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebsocketTransport.java new file mode 100644 index 00000000..91855ded --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebsocketTransport.java @@ -0,0 +1,17 @@ +package com.kucoin.universal.sdk.internal.interfaces; + +import com.kucoin.universal.sdk.model.WsMessage; +import java.time.Duration; +import java.util.concurrent.CompletableFuture; + +public interface WebsocketTransport { + + /** Establishes the connection and launches background loops. */ + void start(); + + /** Closes the connection and stops all loops. */ + void stop(); + + /** Enqueues a message for sending. */ + CompletableFuture write(WsMessage msg, Duration timeout); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebsocketTransportListener.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebsocketTransportListener.java new file mode 100644 index 00000000..40333d57 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebsocketTransportListener.java @@ -0,0 +1,13 @@ +package com.kucoin.universal.sdk.internal.interfaces; + +import com.kucoin.universal.sdk.model.WebSocketEvent; +import com.kucoin.universal.sdk.model.WsMessage; + +public interface WebsocketTransportListener { + + void onEvent(WebSocketEvent event, String message); + + void onMessage(WsMessage wsMessage); + + void onReconnected(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WsToken.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WsToken.java new file mode 100644 index 00000000..f6f75fff --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WsToken.java @@ -0,0 +1,39 @@ +package com.kucoin.universal.sdk.internal.interfaces; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** Web-socket token object returned by the “bullet” API. */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class WsToken { + + /** Token string used when establishing the socket. */ + @JsonProperty("$token") + private String token; + + /** WebSocket domain URL (may change, always use the latest one). */ + @JsonProperty("endpoint") + private String endpoint; + + /** Whether the endpoint is encrypted – currently only wss:// is supported. */ + @JsonProperty("encrypt") + private boolean encrypt; + + /** Network protocol, e.g. websocket. */ + @JsonProperty("protocol") + private String protocol; + + /** Recommended ping interval in milliseconds. */ + @JsonProperty("pingInterval") + private int pingInterval; + + /** Heart-beat timeout in milliseconds. */ + @JsonProperty("pingTimeout") + private int pingTimeout; +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WsTokenProvider.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WsTokenProvider.java new file mode 100644 index 00000000..5fd74e68 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WsTokenProvider.java @@ -0,0 +1,11 @@ +package com.kucoin.universal.sdk.internal.interfaces; + +import java.util.List; + +public interface WsTokenProvider { + /** Retrieves the WebSocket token. */ + List getToken(); + + /** Closes the token provider. */ + void close(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketClientOption.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketClientOption.java index 5a9ef4c2..08aaff3c 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketClientOption.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketClientOption.java @@ -13,10 +13,9 @@ public final class WebSocketClientOption { public interface WebSocketCallback { /** * @param event event type - * @param data primary data (e.g. message payload) * @param message additional description / error detail */ - void onEvent(WebSocketEvent event, String data, String message); + void onEvent(WebSocketEvent event, String message); } /** auto reconnect after disconnect */ @@ -31,12 +30,6 @@ public interface WebSocketCallback { /** dial (hand-shake) timeout */ @Builder.Default private final Duration dialTimeout = Duration.ofSeconds(10); - /** inbound queue size (frames) */ - @Builder.Default private final int readMessageBuffer = 1024; - - /** outbound queue size (frames) */ - @Builder.Default private final int writeMessageBuffer = 256; - /** single send timeout */ @Builder.Default private final Duration writeTimeout = Duration.ofSeconds(5); From b9f06f27492fe27c7bb620199d5ed1ad3285a020 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Wed, 9 Jul 2025 14:52:21 +0800 Subject: [PATCH 15/39] feat(java): update ws models --- .../resources/java-sdk/api_ws_test.mustache | 4 +- .../main/resources/java-sdk/model_ws.mustache | 10 ++-- .../sdk/plugin/SdkGeneratorTest.java | 2 +- .../universal/sdk/generate/Version.java | 2 +- .../account/AccountApiAutoGeneratedTest.java | 8 +-- .../SubAccountApiAutoGeneratedTest.java | 4 +- .../AffiliateApiAutoGeneratedTest.java | 2 +- .../futures/futuresprivate/AllOrderEvent.java | 12 +++-- .../futuresprivate/AllPositionEvent.java | 12 +++-- .../futures/futuresprivate/BalanceEvent.java | 12 +++-- .../futuresprivate/CrossLeverageEvent.java | 13 +++-- .../FuturesPrivateWsAutoGeneratedTest.java | 33 ++++++------ .../futuresprivate/MarginModeEvent.java | 12 +++-- .../futures/futuresprivate/OrderEvent.java | 12 +++-- .../futures/futuresprivate/PositionEvent.java | 12 +++-- .../futuresprivate/StopOrdersEvent.java | 12 +++-- .../futurespublic/AnnouncementEvent.java | 13 +++-- .../futures/futurespublic/ExecutionEvent.java | 12 +++-- .../FuturesPublicWsAutoGeneratedTest.java | 42 +++++++-------- .../futurespublic/InstrumentEvent.java | 12 +++-- .../futures/futurespublic/KlinesEvent.java | 12 +++-- .../OrderbookIncrementEvent.java | 13 +++-- .../futurespublic/OrderbookLevel50Event.java | 13 +++-- .../futurespublic/OrderbookLevel5Event.java | 13 +++-- .../futurespublic/SymbolSnapshotEvent.java | 13 +++-- .../futures/futurespublic/TickerV1Event.java | 12 +++-- .../futures/futurespublic/TickerV2Event.java | 12 +++-- .../market/MarketApiAutoGeneratedTest.java | 14 ++--- .../CrossMarginPositionEvent.java | 13 +++-- .../IsolatedMarginPositionEvent.java | 12 +++-- .../MarginPrivateWsAutoGeneratedTest.java | 11 ++-- .../margin/marginpublic/IndexPriceEvent.java | 12 +++-- .../MarginPublicWsAutoGeneratedTest.java | 9 ++-- .../margin/marginpublic/MarkPriceEvent.java | 12 +++-- .../market/MarketApiAutoGeneratedTest.java | 6 +-- .../market/MarketApiAutoGeneratedTest.java | 16 +++--- .../spot/order/OrderApiAutoGeneratedTest.java | 10 ++-- .../spot/spotprivate/AccountEvent.java | 12 +++-- .../spot/spotprivate/OrderV1Event.java | 12 +++-- .../spot/spotprivate/OrderV2Event.java | 12 +++-- .../SpotPrivateWsAutoGeneratedTest.java | 17 +++---- .../spot/spotprivate/StopOrderEvent.java | 12 +++-- .../spot/spotpublic/AllTickersEvent.java | 12 +++-- .../spot/spotpublic/CallAuctionInfoEvent.java | 13 +++-- .../CallAuctionOrderbookLevel50Event.java | 13 +++-- .../generate/spot/spotpublic/KlinesEvent.java | 12 +++-- .../spot/spotpublic/MarketSnapshotEvent.java | 13 +++-- .../spotpublic/OrderbookIncrementEvent.java | 13 +++-- .../spot/spotpublic/OrderbookLevel1Event.java | 13 +++-- .../spotpublic/OrderbookLevel50Event.java | 13 +++-- .../spot/spotpublic/OrderbookLevel5Event.java | 13 +++-- .../SpotPublicWsAutoGeneratedTest.java | 51 ++++++++++--------- .../spot/spotpublic/SymbolSnapshotEvent.java | 13 +++-- .../generate/spot/spotpublic/TickerEvent.java | 12 +++-- .../generate/spot/spotpublic/TradeEvent.java | 12 +++-- .../VIPLendingApiAutoGeneratedTest.java | 6 +-- .../sdk/internal/infra/DefaultWsService.java | 5 +- .../interfaces/WebSocketMessageCallback.java | 3 +- .../kucoin/universal/sdk/model/WsMessage.java | 5 +- 59 files changed, 435 insertions(+), 296 deletions(-) diff --git a/generator/plugin/src/main/resources/java-sdk/api_ws_test.mustache b/generator/plugin/src/main/resources/java-sdk/api_ws_test.mustache index f0102883..0ab7aef1 100644 --- a/generator/plugin/src/main/resources/java-sdk/api_ws_test.mustache +++ b/generator/plugin/src/main/resources/java-sdk/api_ws_test.mustache @@ -19,8 +19,8 @@ class {{classname}}AutoGeneratedTest{ */ public static void test{{vendorExtensions.x-meta.methodServiceFmt}}Response() throws Exception { String data = "{{{vendorExtensions.x-response-example}}}"; - WsMessage<{{vendorExtensions.x-meta.methodServiceFmt}}Event> resp = mapper.readValue(data, new TypeReference>(){}); - } + WsMessage resp = mapper.readValue(data, WsMessage.class); + {{vendorExtensions.x-meta.methodServiceFmt}}Event event = mapper.convertValue(resp.getData(), {{vendorExtensions.x-meta.methodServiceFmt}}Event.class);} {{/operation}} {{/operations}} diff --git a/generator/plugin/src/main/resources/java-sdk/model_ws.mustache b/generator/plugin/src/main/resources/java-sdk/model_ws.mustache index cbf34825..2c244a26 100644 --- a/generator/plugin/src/main/resources/java-sdk/model_ws.mustache +++ b/generator/plugin/src/main/resources/java-sdk/model_ws.mustache @@ -12,7 +12,7 @@ package {{package}}; {{/vendorExtensions.x-annotation}} @JsonIgnoreProperties(ignoreUnknown = true) {{#vendorExtensions.x-response-model}} -public class {{classname}} implements Response<{{classname}}, WsMessage<{{classname}}>> { +public class {{classname}} implements Response<{{classname}}, WsMessage> { {{/vendorExtensions.x-response-model}} {{^vendorExtensions.x-response-model}} class {{classname}} { @@ -36,10 +36,10 @@ class {{classname}} { * common response */ @JsonIgnore - private WsMessage<{{classname}}> commonResponse; + private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage<{{classname}}> response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -63,8 +63,8 @@ class {{classname}} { public static class CallbackAdapters { public static WebSocketMessageCallback<{{classname}}> of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); - } + return (msg, objectMapper) -> callback.onEvent(msg.getTopic(), msg.getSubject(), objectMapper.convertValue(msg.getData(), {{classname}}.class)); + } } {{/vendorExtensions.x-response-model}} {{#hasEnums}} diff --git a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java index 2107567b..186c6482 100644 --- a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java +++ b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java @@ -10,7 +10,7 @@ public class SdkGeneratorTest { private static final String SDK_NAME = "java-sdk"; private static final String SPEC_NAME = "../../spec/rest/api/openapi-spot-market.json"; private static final String SPEC_ENTRY_NAME = "../../spec/rest/entry/openapi-broker.json"; - private static final String WS_SPEC_NAME = "../../spec/ws/openapi-spot-public.json"; + private static final String WS_SPEC_NAME = "../../spec/ws/openapi-futures-private.json"; private static final String OUTPUT_DIR = "../../sdk/java/src/main/java/com/kucoin/universal/sdk/generate"; private static final String CSV_PATH = "../../spec"; diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java index 40c6a313..376f02b5 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java @@ -2,5 +2,5 @@ public class Version { public final String SDK_VERSION = "0.1.0-alpha"; - public final String SDK_GENERATE_DATE = "2025-07-04"; + public final String SDK_GENERATE_DATE = "2025-07-09"; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiAutoGeneratedTest.java index f5489520..6d2cbb36 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApiAutoGeneratedTest.java @@ -15,7 +15,7 @@ class AccountApiAutoGeneratedTest { /** getAccountInfo Request Get Account Summary Info /api/v2/user-info */ public static void testGetAccountInfoRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getAccountInfo Response Get Account Summary Info /api/v2/user-info */ @@ -44,7 +44,7 @@ public static void testGetAccountInfoResponse() throws Exception { /** getApikeyInfo Request Get Apikey Info /api/v1/user/api-key */ public static void testGetApikeyInfoRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getApikeyInfo Response Get Apikey Info /api/v1/user/api-key */ @@ -70,7 +70,7 @@ public static void testGetApikeyInfoResponse() throws Exception { /** getSpotAccountType Request Get Account Type - Spot /api/v1/hf/accounts/opened */ public static void testGetSpotAccountTypeRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getSpotAccountType Response Get Account Type - Spot /api/v1/hf/accounts/opened */ @@ -385,7 +385,7 @@ public static void testGetFuturesLedgerResponse() throws Exception { /** getMarginAccountDetail Request Get Account Detail - Margin /api/v1/margin/account */ public static void testGetMarginAccountDetailRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getMarginAccountDetail Response Get Account Detail - Margin /api/v1/margin/account */ diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiAutoGeneratedTest.java index 90743bf7..8b1d7ffe 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApiAutoGeneratedTest.java @@ -467,7 +467,7 @@ public static void testDeleteSubAccountApiResponse() throws Exception { * getSpotSubAccountsSummaryV1 Request Get sub-account List - Summary Info (V1) /api/v1/sub/user */ public static void testGetSpotSubAccountsSummaryV1Request() throws Exception { - // $this->assertTrue(true); + // pass } /** @@ -505,7 +505,7 @@ public static void testGetSpotSubAccountsSummaryV1Response() throws Exception { * getSpotSubAccountListV1 Request Get sub-account List - Spot Balance (V1) /api/v1/sub-accounts */ public static void testGetSpotSubAccountListV1Request() throws Exception { - // $this->assertTrue(true); + // pass } /** diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiAutoGeneratedTest.java index 7c91a179..2819c960 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApiAutoGeneratedTest.java @@ -15,7 +15,7 @@ class AffiliateApiAutoGeneratedTest { /** getAccount Request Get Account /api/v2/affiliate/inviter/statistics */ public static void testGetAccountRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getAccount Response Get Account /api/v2/affiliate/inviter/statistics */ diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllOrderEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllOrderEvent.java index 584313c0..8ab167ab 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllOrderEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllOrderEvent.java @@ -18,7 +18,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class AllOrderEvent implements Response> { +public class AllOrderEvent implements Response { /** * Symbol of the contract. Please refer to [Get Symbol endpoint: * symbol](https://www.kucoin.com/docs-new/api-221752070) @@ -115,10 +115,10 @@ public class AllOrderEvent implements Response commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -129,7 +129,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), AllOrderEvent.class)); } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllPositionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllPositionEvent.java index 75a4ebac..b7997610 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllPositionEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllPositionEvent.java @@ -18,7 +18,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class AllPositionEvent implements Response> { +public class AllPositionEvent implements Response { /** * Symbol of the contract. Please refer to [Get Symbol endpoint: * symbol](https://www.kucoin.com/docs-new/api-221752070) @@ -222,10 +222,10 @@ public class AllPositionEvent implements Response commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -236,7 +236,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), AllPositionEvent.class)); } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/BalanceEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/BalanceEvent.java index acad3755..6f56d223 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/BalanceEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/BalanceEvent.java @@ -16,7 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class BalanceEvent implements Response> { +public class BalanceEvent implements Response { /** Margin of the cross margin position */ @JsonProperty("crossPosMargin") private String crossPosMargin; @@ -82,10 +82,10 @@ public class BalanceEvent implements Response commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -96,7 +96,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), BalanceEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageEvent.java index 6e46885d..f0cc45c2 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageEvent.java @@ -19,17 +19,16 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class CrossLeverageEvent - implements Response> { +public class CrossLeverageEvent implements Response { /** */ @JsonProperty("data") private Map data = new HashMap<>(); /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -48,7 +47,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), CrossLeverageEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsAutoGeneratedTest.java index 6141e585..0c7ee302 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWsAutoGeneratedTest.java @@ -1,6 +1,5 @@ package com.kucoin.universal.sdk.generate.futures.futuresprivate; -import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.model.WsMessage; import java.util.ArrayList; @@ -15,64 +14,64 @@ class FuturesPrivateWsAutoGeneratedTest { public static void testAllOrderResponse() throws Exception { String data = "{\"topic\":\"/contractMarket/tradeOrders:XBTUSDTM\",\"type\":\"message\",\"subject\":\"symbolOrderChange\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"symbol\":\"XBTUSDTM\",\"side\":\"buy\",\"canceledSize\":\"0\",\"orderId\":\"247899236673269761\",\"liquidity\":\"maker\",\"marginMode\":\"ISOLATED\",\"type\":\"open\",\"orderTime\":1731916985768138917,\"size\":\"1\",\"filledSize\":\"0\",\"price\":\"91670\",\"remainSize\":\"1\",\"status\":\"open\",\"ts\":1731916985789000000}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + AllOrderEvent event = mapper.convertValue(resp.getData(), AllOrderEvent.class); } /** allPosition All symbol position change events push /allPosition/contract/positionAll */ public static void testAllPositionResponse() throws Exception { String data = "{\"topic\":\"/contract/position:XBTUSDTM\",\"type\":\"message\",\"data\":{\"symbol\":\"XBTUSDTM\",\"maintMarginReq\":0.005,\"riskLimit\":500000,\"realLeverage\":4.9685590767,\"crossMode\":false,\"delevPercentage\":0.10,\"openingTimestamp\":1731916913097,\"autoDeposit\":true,\"currentTimestamp\":1731924561514,\"currentQty\":1,\"currentCost\":91.5306,\"currentComm\":0.09179284,\"unrealisedCost\":91.6945,\"realisedCost\":-0.07210716,\"isOpen\":true,\"markPrice\":91839.79,\"markValue\":91.83979,\"posCost\":91.6945,\"posCross\":0,\"posInit\":18.3389,\"posComm\":0.06602004,\"posLoss\":0,\"posMargin\":18.40492004,\"posFunding\":0,\"posMaint\":0.5634627025,\"maintMargin\":18.55021004,\"avgEntryPrice\":91694.5,\"liquidationPrice\":73853.0426625,\"bankruptPrice\":73355.6,\"settleCurrency\":\"USDT\",\"changeReason\":\"positionChange\",\"riskLimitLevel\":2,\"realisedGrossCost\":-0.1639,\"realisedGrossPnl\":0.1639,\"realisedPnl\":0.07210716,\"unrealisedPnl\":0.14529,\"unrealisedPnlPcnt\":0.0016,\"unrealisedRoePcnt\":0.0079,\"leverage\":4.9685590767,\"marginMode\":\"ISOLATED\",\"positionSide\":\"BOTH\"},\"subject\":\"position.change\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\"}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + AllPositionEvent event = mapper.convertValue(resp.getData(), AllPositionEvent.class); } /** balance the balance change push /balance/contractAccount/wallet */ public static void testBalanceResponse() throws Exception { String data = "{\"topic\":\"/contractAccount/wallet\",\"type\":\"message\",\"subject\":\"walletBalance.change\",\"id\":\"673b0bb925b4bc0001fadfef\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"crossPosMargin\":\"0\",\"isolatedOrderMargin\":\"18.1188\",\"holdBalance\":\"0\",\"equity\":\"81.273621258\",\"version\":\"1337\",\"availableBalance\":\"26.144281178\",\"isolatedPosMargin\":\"36.80984008\",\"walletBalance\":\"81.072921258\",\"isolatedFundingFeeMargin\":\"0\",\"crossUnPnl\":\"0\",\"totalCrossMargin\":\"26.144281178\",\"currency\":\"USDT\",\"isolatedUnPnl\":\"0.2007\",\"crossOrderMargin\":\"0\",\"timestamp\":\"1731916996764\"}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + BalanceEvent event = mapper.convertValue(resp.getData(), BalanceEvent.class); } /** crossLeverage the leverage change push /crossLeverage/contract/crossLeverage */ public static void testCrossLeverageResponse() throws Exception { String data = "{\"topic\":\"/contract/crossLeverage\",\"type\":\"message\",\"data\":{\"ETHUSDTM\":{\"leverage\":\"8\"}},\"subject\":\"user.config\",\"userId\":\"66f12e8befb04d0001882b49\",\"channelType\":\"private\"}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + CrossLeverageEvent event = mapper.convertValue(resp.getData(), CrossLeverageEvent.class); } /** marginMode the margin mode change /marginMode/contract/marginMode */ public static void testMarginModeResponse() throws Exception { String data = "{\"topic\":\"/contract/marginMode\",\"type\":\"message\",\"data\":{\"ETHUSDTM\":\"ISOLATED\"},\"subject\":\"user.config\",\"userId\":\"66f12e8befb04d0001882b49\",\"channelType\":\"private\"}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + MarginModeEvent event = mapper.convertValue(resp.getData(), MarginModeEvent.class); } /** order Order change pushes. /order/contractMarket/tradeOrders:_symbol_ */ public static void testOrderResponse() throws Exception { String data = "{\"topic\":\"/contractMarket/tradeOrders:XBTUSDTM\",\"type\":\"message\",\"subject\":\"symbolOrderChange\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"symbol\":\"XBTUSDTM\",\"side\":\"buy\",\"canceledSize\":\"0\",\"orderId\":\"247899236673269761\",\"liquidity\":\"maker\",\"marginMode\":\"ISOLATED\",\"type\":\"open\",\"orderTime\":1731916985768138917,\"size\":\"1\",\"filledSize\":\"0\",\"price\":\"91670\",\"remainSize\":\"1\",\"status\":\"open\",\"ts\":1731916985789000000}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + OrderEvent event = mapper.convertValue(resp.getData(), OrderEvent.class); } /** position the position change events push /position/contract/position:_symbol_ */ public static void testPositionResponse() throws Exception { String data = "{\"topic\":\"/contract/position:XBTUSDTM\",\"type\":\"message\",\"data\":{\"symbol\":\"XBTUSDTM\",\"maintMarginReq\":0.005,\"riskLimit\":500000,\"realLeverage\":4.9685590767,\"crossMode\":false,\"delevPercentage\":0.10,\"openingTimestamp\":1731916913097,\"autoDeposit\":true,\"currentTimestamp\":1731924561514,\"currentQty\":1,\"currentCost\":91.5306,\"currentComm\":0.09179284,\"unrealisedCost\":91.6945,\"realisedCost\":-0.07210716,\"isOpen\":true,\"markPrice\":91839.79,\"markValue\":91.83979,\"posCost\":91.6945,\"posCross\":0,\"posInit\":18.3389,\"posComm\":0.06602004,\"posLoss\":0,\"posMargin\":18.40492004,\"posFunding\":0,\"posMaint\":0.5634627025,\"maintMargin\":18.55021004,\"avgEntryPrice\":91694.5,\"liquidationPrice\":73853.0426625,\"bankruptPrice\":73355.6,\"settleCurrency\":\"USDT\",\"changeReason\":\"positionChange\",\"riskLimitLevel\":2,\"realisedGrossCost\":-0.1639,\"realisedGrossPnl\":0.1639,\"realisedPnl\":0.07210716,\"unrealisedPnl\":0.14529,\"unrealisedPnlPcnt\":0.0016,\"unrealisedRoePcnt\":0.0079,\"leverage\":4.9685590767,\"marginMode\":\"ISOLATED\",\"positionSide\":\"BOTH\"},\"subject\":\"position.change\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\"}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + PositionEvent event = mapper.convertValue(resp.getData(), PositionEvent.class); } /** stopOrders stop order change pushes. /stopOrders/contractMarket/advancedOrders */ public static void testStopOrdersResponse() throws Exception { String data = "{\"topic\":\"/contractMarket/advancedOrders\",\"type\":\"message\",\"data\":{\"createdAt\":1730194206837,\"marginMode\":\"ISOLATED\",\"orderId\":\"240673378116083712\",\"orderPrice\":\"0.1\",\"orderType\":\"stop\",\"side\":\"buy\",\"size\":1,\"stop\":\"down\",\"stopPrice\":\"1000\",\"stopPriceType\":\"TP\",\"symbol\":\"XBTUSDTM\",\"ts\":1730194206843133000,\"type\":\"open\"},\"subject\":\"stopOrder\",\"id\":\"6720ab1ea52a9b0001734392\",\"userId\":\"66f12e8befb04d0001882b49\",\"channelType\":\"private\"}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + StopOrdersEvent event = mapper.convertValue(resp.getData(), StopOrdersEvent.class); } public static void runAllTests() { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/MarginModeEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/MarginModeEvent.java index 5fd531f1..a32138c3 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/MarginModeEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/MarginModeEvent.java @@ -19,16 +19,16 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class MarginModeEvent implements Response> { +public class MarginModeEvent implements Response { /** The SYMBOL is the key with value \"CROSS\" or \"ISOLATED\" */ @JsonProperty("data") private Map data = new HashMap<>(); /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -47,7 +47,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), MarginModeEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/OrderEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/OrderEvent.java index 814390ad..fbe35b36 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/OrderEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/OrderEvent.java @@ -18,7 +18,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class OrderEvent implements Response> { +public class OrderEvent implements Response { /** * Symbol of the contract. Please refer to [Get Symbol endpoint: * symbol](https://www.kucoin.com/docs-new/api-221752070) @@ -115,10 +115,10 @@ public class OrderEvent implements Response> { private TradeTypeEnum tradeType; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -129,7 +129,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), OrderEvent.class)); } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/PositionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/PositionEvent.java index 1d30d6f0..ad68785e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/PositionEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/PositionEvent.java @@ -18,7 +18,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class PositionEvent implements Response> { +public class PositionEvent implements Response { /** * Symbol of the contract. Please refer to [Get Symbol endpoint: * symbol](https://www.kucoin.com/docs-new/api-221752070) @@ -222,10 +222,10 @@ public class PositionEvent implements Response commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -236,7 +236,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), PositionEvent.class)); } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/StopOrdersEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/StopOrdersEvent.java index b7955909..1d884933 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/StopOrdersEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/StopOrdersEvent.java @@ -18,7 +18,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class StopOrdersEvent implements Response> { +public class StopOrdersEvent implements Response { /** */ @JsonProperty("createdAt") private Long createdAt; @@ -75,10 +75,10 @@ public class StopOrdersEvent implements Response commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -89,7 +89,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), StopOrdersEvent.class)); } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/AnnouncementEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/AnnouncementEvent.java index a5b6c927..14aee96a 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/AnnouncementEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/AnnouncementEvent.java @@ -16,8 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class AnnouncementEvent - implements Response> { +public class AnnouncementEvent implements Response { /** Symbol */ @JsonProperty("symbol") private String symbol; @@ -35,10 +34,10 @@ public class AnnouncementEvent private Long timestamp; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -49,7 +48,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), AnnouncementEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/ExecutionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/ExecutionEvent.java index c01c37c9..dbdf8c07 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/ExecutionEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/ExecutionEvent.java @@ -16,7 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class ExecutionEvent implements Response> { +public class ExecutionEvent implements Response { /** */ @JsonProperty("symbol") private String symbol; @@ -54,10 +54,10 @@ public class ExecutionEvent implements Response commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -68,7 +68,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), ExecutionEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsAutoGeneratedTest.java index 09ba5af8..c309f6af 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWsAutoGeneratedTest.java @@ -1,6 +1,5 @@ package com.kucoin.universal.sdk.generate.futures.futurespublic; -import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.model.WsMessage; import java.util.ArrayList; @@ -15,40 +14,41 @@ class FuturesPublicWsAutoGeneratedTest { public static void testAnnouncementResponse() throws Exception { String data = "{\"topic\":\"/contract/announcement\",\"subject\":\"funding.begin\",\"data\":{\"symbol\":\"XBTUSDTM\",\"fundingTime\":1551770400000,\"fundingRate\":-0.002966,\"timestamp\":1551770400000}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + AnnouncementEvent event = mapper.convertValue(resp.getData(), AnnouncementEvent.class); } /** execution Match execution data. /execution/contractMarket/execution:_symbol_ */ public static void testExecutionResponse() throws Exception { String data = "{\"topic\":\"/contractMarket/execution:XBTUSDTM\",\"type\":\"message\",\"subject\":\"match\",\"sn\":1794100537695,\"data\":{\"symbol\":\"XBTUSDTM\",\"sequence\":1794100537695,\"side\":\"buy\",\"size\":2,\"price\":\"90503.9\",\"takerOrderId\":\"247822202957807616\",\"makerOrderId\":\"247822167163555840\",\"tradeId\":\"1794100537695\",\"ts\":1731898619520000000}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + ExecutionEvent event = mapper.convertValue(resp.getData(), ExecutionEvent.class); } /** instrument instrument /instrument/contract/instrument:_symbol_ */ public static void testInstrumentResponse() throws Exception { String data = "{\"topic\":\"/contract/instrument:XBTUSDTM\",\"type\":\"message\",\"subject\":\"mark.index.price\",\"data\":{\"markPrice\":90445.02,\"indexPrice\":90445.02,\"granularity\":1000,\"timestamp\":1731899129000}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + InstrumentEvent event = mapper.convertValue(resp.getData(), InstrumentEvent.class); } /** klines Klines /klines/contractMarket/limitCandle:_symbol___type_ */ public static void testKlinesResponse() throws Exception { String data = "{\"topic\":\"/contractMarket/limitCandle:XBTUSDTM_1min\",\"type\":\"message\",\"data\":{\"symbol\":\"XBTUSDTM\",\"candles\":[\"1731898200\",\"90638.6\",\"90638.6\",\"90638.6\",\"90638.6\",\"21.0\",\"21\"],\"time\":1731898208357},\"subject\":\"candle.stick\"}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + KlinesEvent event = mapper.convertValue(resp.getData(), KlinesEvent.class); } /** orderbookIncrement Orderbook - Increment /orderbookIncrement/contractMarket/level2:_symbol_ */ public static void testOrderbookIncrementResponse() throws Exception { String data = "{\"topic\":\"/contractMarket/level2:XBTUSDTM\",\"type\":\"message\",\"subject\":\"level2\",\"sn\":1709400450243,\"data\":{\"sequence\":1709400450243,\"change\":\"90631.2,sell,2\",\"timestamp\":1731897467182}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + OrderbookIncrementEvent event = + mapper.convertValue(resp.getData(), OrderbookIncrementEvent.class); } /** @@ -57,40 +57,40 @@ public static void testOrderbookIncrementResponse() throws Exception { public static void testOrderbookLevel50Response() throws Exception { String data = "{\"topic\":\"/contractMarket/level2Depth50:XBTUSDTM\",\"type\":\"message\",\"subject\":\"level2\",\"sn\":1731680249700,\"data\":{\"bids\":[[\"89778.6\",1534],[\"89778.2\",54]],\"sequence\":1709294490099,\"timestamp\":1731680249700,\"ts\":1731680249700,\"asks\":[[\"89778.7\",854],[\"89779.2\",4]]}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + OrderbookLevel50Event event = mapper.convertValue(resp.getData(), OrderbookLevel50Event.class); } /** orderbookLevel5 Orderbook - Level5 /orderbookLevel5/contractMarket/level2Depth5:_symbol_ */ public static void testOrderbookLevel5Response() throws Exception { String data = "{\"topic\":\"/contractMarket/level2Depth5:XBTUSDTM\",\"type\":\"message\",\"subject\":\"level2\",\"sn\":1731680019100,\"data\":{\"bids\":[[\"89720.9\",513],[\"89720.8\",12],[\"89718.6\",113],[\"89718.4\",19],[\"89718.3\",7]],\"sequence\":1709294294670,\"timestamp\":1731680019100,\"ts\":1731680019100,\"asks\":[[\"89721\",906],[\"89721.1\",203],[\"89721.4\",113],[\"89723.2\",113],[\"89725.4\",113]]}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + OrderbookLevel5Event event = mapper.convertValue(resp.getData(), OrderbookLevel5Event.class); } /** symbolSnapshot Symbol Snapshot /symbolSnapshot/contractMarket/snapshot:_symbol_ */ public static void testSymbolSnapshotResponse() throws Exception { String data = "{\"topic\":\"/contractMarket/snapshot:XBTUSDTM\",\"type\":\"message\",\"subject\":\"snapshot.24h\",\"id\":\"673ab3fff4088b0001664f41\",\"data\":{\"highPrice\":91512.8,\"lastPrice\":90326.7,\"lowPrice\":88747.8,\"price24HoursBefore\":89880.4,\"priceChg\":446.3,\"priceChgPct\":0.0049,\"symbol\":\"XBTUSDTM\",\"ts\":1731900415023929239,\"turnover\":526928331.0482177734,\"volume\":5834.46}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + SymbolSnapshotEvent event = mapper.convertValue(resp.getData(), SymbolSnapshotEvent.class); } /** tickerV1 Get Ticker(not recommended) /tickerV1/contractMarket/ticker:_symbol_ */ public static void testTickerV1Response() throws Exception { String data = "{\"topic\":\"/contractMarket/ticker:XBTUSDTM\",\"type\":\"message\",\"subject\":\"ticker\",\"sn\":1793133570931,\"data\":{\"symbol\":\"XBTUSDTM\",\"sequence\":1793133570931,\"side\":\"sell\",\"size\":1,\"price\":\"90147.7\",\"bestBidSize\":2186,\"bestBidPrice\":\"90147.7\",\"bestAskPrice\":\"90147.8\",\"tradeId\":\"1793133570931\",\"bestAskSize\":275,\"ts\":1731679215637000000}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + TickerV1Event event = mapper.convertValue(resp.getData(), TickerV1Event.class); } /** tickerV2 Get Ticker V2 /tickerV2/contractMarket/tickerV2:_symbol_ */ public static void testTickerV2Response() throws Exception { String data = "{\"topic\":\"/contractMarket/tickerV2:XBTUSDTM\",\"type\":\"message\",\"subject\":\"tickerV2\",\"sn\":1709284589209,\"data\":{\"symbol\":\"XBTUSDTM\",\"sequence\":1709284589209,\"bestBidSize\":713,\"bestBidPrice\":\"88987.4\",\"bestAskPrice\":\"88987.5\",\"bestAskSize\":1037,\"ts\":1731665526461000000}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + TickerV2Event event = mapper.convertValue(resp.getData(), TickerV2Event.class); } public static void runAllTests() { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/InstrumentEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/InstrumentEvent.java index 311c41a2..a74ea4e3 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/InstrumentEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/InstrumentEvent.java @@ -16,7 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class InstrumentEvent implements Response> { +public class InstrumentEvent implements Response { /** * Granularity (predicted funding rate: 1-min granularity: 60000; Funding rate: 8-hours * granularity: 28800000.) @@ -41,10 +41,10 @@ public class InstrumentEvent implements Response commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -55,7 +55,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), InstrumentEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/KlinesEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/KlinesEvent.java index 6cd5e943..1d5da351 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/KlinesEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/KlinesEvent.java @@ -18,7 +18,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class KlinesEvent implements Response> { +public class KlinesEvent implements Response { /** * Symbol of the contract, Please refer to [Get Symbol endpoint: * symbol](https://www.kucoin.com/docs-new/api-3470220) @@ -38,10 +38,10 @@ public class KlinesEvent implements Response private Long time; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -52,7 +52,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), KlinesEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookIncrementEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookIncrementEvent.java index 6a459e10..a940c727 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookIncrementEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookIncrementEvent.java @@ -16,8 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class OrderbookIncrementEvent - implements Response> { +public class OrderbookIncrementEvent implements Response { /** */ @JsonProperty("sequence") private Long sequence; @@ -31,10 +30,10 @@ public class OrderbookIncrementEvent private Long timestamp; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -45,7 +44,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), OrderbookIncrementEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel50Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel50Event.java index e2f34d3b..3493d54f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel50Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel50Event.java @@ -18,8 +18,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class OrderbookLevel50Event - implements Response> { +public class OrderbookLevel50Event implements Response { /** */ @JsonProperty("bids") private List> bids = new ArrayList<>(); @@ -41,10 +40,10 @@ public class OrderbookLevel50Event private List> asks = new ArrayList<>(); /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -55,7 +54,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), OrderbookLevel50Event.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel5Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel5Event.java index 8e03bd0e..a5376752 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel5Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel5Event.java @@ -18,8 +18,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class OrderbookLevel5Event - implements Response> { +public class OrderbookLevel5Event implements Response { /** */ @JsonProperty("bids") private List> bids = new ArrayList<>(); @@ -41,10 +40,10 @@ public class OrderbookLevel5Event private List> asks = new ArrayList<>(); /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -55,7 +54,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), OrderbookLevel5Event.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/SymbolSnapshotEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/SymbolSnapshotEvent.java index 1c38f80a..8cfa778e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/SymbolSnapshotEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/SymbolSnapshotEvent.java @@ -16,8 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class SymbolSnapshotEvent - implements Response> { +public class SymbolSnapshotEvent implements Response { /** */ @JsonProperty("highPrice") private Double highPrice; @@ -59,10 +58,10 @@ public class SymbolSnapshotEvent private Double volume; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -73,7 +72,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), SymbolSnapshotEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV1Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV1Event.java index 52d5243b..a3c04066 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV1Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV1Event.java @@ -16,7 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class TickerV1Event implements Response> { +public class TickerV1Event implements Response { /** */ @JsonProperty("symbol") private String symbol; @@ -62,10 +62,10 @@ public class TickerV1Event implements Response commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -76,7 +76,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), TickerV1Event.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV2Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV2Event.java index 6a8eeac6..c4d722f5 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV2Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV2Event.java @@ -16,7 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class TickerV2Event implements Response> { +public class TickerV2Event implements Response { /** */ @JsonProperty("symbol") private String symbol; @@ -46,10 +46,10 @@ public class TickerV2Event implements Response commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -60,7 +60,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), TickerV2Event.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiAutoGeneratedTest.java index 170ec166..604491fd 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApiAutoGeneratedTest.java @@ -104,7 +104,7 @@ public static void testGetSymbolResponse() throws Exception { /** getAllSymbols Request Get All Symbols /api/v1/contracts/active */ public static void testGetAllSymbolsRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getAllSymbols Response Get All Symbols /api/v1/contracts/active */ @@ -208,7 +208,7 @@ public static void testGetTickerResponse() throws Exception { /** getAllTickers Request Get All Tickers /api/v1/allTickers */ public static void testGetAllTickersRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getAllTickers Response Get All Tickers /api/v1/allTickers */ @@ -613,7 +613,7 @@ public static void testGetPremiumIndexResponse() throws Exception { /** get24hrStats Request Get 24hr stats /api/v1/trade-statistics */ public static void testGet24hrStatsRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** get24hrStats Response Get 24hr stats /api/v1/trade-statistics */ @@ -625,7 +625,7 @@ public static void testGet24hrStatsResponse() throws Exception { /** getServerTime Request Get Server Time /api/v1/timestamp */ public static void testGetServerTimeRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getServerTime Response Get Server Time /api/v1/timestamp */ @@ -637,7 +637,7 @@ public static void testGetServerTimeResponse() throws Exception { /** getServiceStatus Request Get Service Status /api/v1/status */ public static void testGetServiceStatusRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getServiceStatus Response Get Service Status /api/v1/status */ @@ -649,7 +649,7 @@ public static void testGetServiceStatusResponse() throws Exception { /** getPublicToken Request Get Public Token - Futures /api/v1/bullet-public */ public static void testGetPublicTokenRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getPublicToken Response Get Public Token - Futures /api/v1/bullet-public */ @@ -662,7 +662,7 @@ public static void testGetPublicTokenResponse() throws Exception { /** getPrivateToken Request Get Private Token - Futures /api/v1/bullet-private */ public static void testGetPrivateTokenRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getPrivateToken Response Get Private Token - Futures /api/v1/bullet-private */ diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionEvent.java index 38d3d016..006dc484 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionEvent.java @@ -20,8 +20,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class CrossMarginPositionEvent - implements Response> { +public class CrossMarginPositionEvent implements Response { /** Debt ratio */ @JsonProperty("debtRatio") private Double debtRatio; @@ -55,10 +54,10 @@ public class CrossMarginPositionEvent private TypeEnum type; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -69,7 +68,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), CrossMarginPositionEvent.class)); } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionEvent.java index 942de73c..89f29dbe 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionEvent.java @@ -21,7 +21,7 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class IsolatedMarginPositionEvent - implements Response> { + implements Response { /** Isolated margin symbol */ @JsonProperty("tag") private String tag; @@ -47,10 +47,10 @@ public class IsolatedMarginPositionEvent private Long timestamp; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -61,7 +61,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), IsolatedMarginPositionEvent.class)); } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsAutoGeneratedTest.java index 7463472e..904c6078 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWsAutoGeneratedTest.java @@ -1,6 +1,5 @@ package com.kucoin.universal.sdk.generate.margin.marginprivate; -import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.model.WsMessage; import java.util.ArrayList; @@ -15,8 +14,9 @@ class MarginPrivateWsAutoGeneratedTest { public static void testCrossMarginPositionResponse() throws Exception { String data = "{\"topic\":\"/margin/position\",\"subject\":\"debt.ratio\",\"type\":\"message\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"debtRatio\":0,\"totalAsset\":0.00052431772284080000000,\"marginCoefficientTotalAsset\":\"0.0005243177228408\",\"totalDebt\":\"0\",\"assetList\":{\"BTC\":{\"total\":\"0.00002\",\"available\":\"0\",\"hold\":\"0.00002\"},\"USDT\":{\"total\":\"33.68855864\",\"available\":\"15.01916691\",\"hold\":\"18.66939173\"}},\"debtList\":{\"BTC\":\"0\",\"USDT\":\"0\"},\"timestamp\":1729912435657}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + CrossMarginPositionEvent event = + mapper.convertValue(resp.getData(), CrossMarginPositionEvent.class); } /** @@ -26,8 +26,9 @@ public static void testCrossMarginPositionResponse() throws Exception { public static void testIsolatedMarginPositionResponse() throws Exception { String data = "{\"topic\":\"/margin/isolatedPosition:BTC-USDT\",\"subject\":\"positionChange\",\"type\":\"message\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"tag\":\"BTC-USDT\",\"status\":\"DEBT\",\"statusBizType\":\"DEFAULT_DEBT\",\"accumulatedPrincipal\":\"5.01\",\"changeAssets\":{\"BTC\":{\"total\":\"0.00043478\",\"hold\":\"0\",\"liabilityPrincipal\":\"0\",\"liabilityInterest\":\"0\"},\"USDT\":{\"total\":\"0.98092004\",\"hold\":\"0\",\"liabilityPrincipal\":\"26\",\"liabilityInterest\":\"0.00025644\"}},\"timestamp\":1730121097742}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + IsolatedMarginPositionEvent event = + mapper.convertValue(resp.getData(), IsolatedMarginPositionEvent.class); } public static void runAllTests() { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/IndexPriceEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/IndexPriceEvent.java index 3f5de598..c5e1d25c 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/IndexPriceEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/IndexPriceEvent.java @@ -16,7 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class IndexPriceEvent implements Response> { +public class IndexPriceEvent implements Response { /** */ @JsonProperty("symbol") private String symbol; @@ -34,10 +34,10 @@ public class IndexPriceEvent implements Response commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -48,7 +48,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), IndexPriceEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsAutoGeneratedTest.java index 3f00bcc0..b6728fc4 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWsAutoGeneratedTest.java @@ -1,6 +1,5 @@ package com.kucoin.universal.sdk.generate.margin.marginpublic; -import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.model.WsMessage; import java.util.ArrayList; @@ -15,16 +14,16 @@ class MarginPublicWsAutoGeneratedTest { public static void testIndexPriceResponse() throws Exception { String data = "{\"id\":\"5c24c5da03aa673885cd67a0\",\"type\":\"message\",\"topic\":\"/indicator/index:USDT-BTC\",\"subject\":\"tick\",\"data\":{\"symbol\":\"USDT-BTC\",\"granularity\":5000,\"timestamp\":1551770400000,\"value\":0.0001092}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + IndexPriceEvent event = mapper.convertValue(resp.getData(), IndexPriceEvent.class); } /** markPrice Mark Price /markPrice/indicator/markPrice:_symbol_,_symbol_ */ public static void testMarkPriceResponse() throws Exception { String data = "{\"id\":\"5c24c5da03aa673885cd67aa\",\"type\":\"message\",\"topic\":\"/indicator/markPrice:USDT-BTC\",\"subject\":\"tick\",\"data\":{\"symbol\":\"USDT-BTC\",\"granularity\":5000,\"timestamp\":1551770400000,\"value\":0.0001093}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + MarkPriceEvent event = mapper.convertValue(resp.getData(), MarkPriceEvent.class); } public static void runAllTests() { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarkPriceEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarkPriceEvent.java index 89345b9c..dd33ad1f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarkPriceEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarkPriceEvent.java @@ -16,7 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class MarkPriceEvent implements Response> { +public class MarkPriceEvent implements Response { /** */ @JsonProperty("symbol") private String symbol; @@ -34,10 +34,10 @@ public class MarkPriceEvent implements Response commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -48,7 +48,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), MarkPriceEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiAutoGeneratedTest.java index bb8d39f8..d8e1463b 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApiAutoGeneratedTest.java @@ -101,7 +101,7 @@ public static void testGetMarkPriceDetailResponse() throws Exception { /** getMarginConfig Request Get Margin Config /api/v1/margin/config */ public static void testGetMarginConfigRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getMarginConfig Response Get Margin Config /api/v1/margin/config */ @@ -299,7 +299,7 @@ public static void testGetMarginConfigResponse() throws Exception { /** getMarkPriceList Request Get Mark Price List /api/v3/mark-price/all-symbols */ public static void testGetMarkPriceListRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getMarkPriceList Response Get Mark Price List /api/v3/mark-price/all-symbols */ @@ -326,7 +326,7 @@ public static void testGetMarkPriceListResponse() throws Exception { /** getIsolatedMarginSymbols Request Get Symbols - Isolated Margin /api/v1/isolated/symbols */ public static void testGetIsolatedMarginSymbolsRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getIsolatedMarginSymbols Response Get Symbols - Isolated Margin /api/v1/isolated/symbols */ diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java index 3979e1b3..b6819269 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApiAutoGeneratedTest.java @@ -101,7 +101,7 @@ public static void testGetCurrencyResponse() throws Exception { /** getAllCurrencies Request Get All Currencies /api/v3/currencies */ public static void testGetAllCurrenciesRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getAllCurrencies Response Get All Currencies /api/v3/currencies */ @@ -336,7 +336,7 @@ public static void testGetTickerResponse() throws Exception { /** getAllTickers Request Get All Tickers /api/v1/market/allTickers */ public static void testGetAllTickersRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getAllTickers Response Get All Tickers /api/v1/market/allTickers */ @@ -644,7 +644,7 @@ public static void testGet24hrStatsResponse() throws Exception { /** getMarketList Request Get Market List /api/v1/markets */ public static void testGetMarketListRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getMarketList Response Get Market List /api/v1/markets */ @@ -658,7 +658,7 @@ public static void testGetMarketListResponse() throws Exception { /** getClientIPAddress Request Get Client IP Address /api/v1/my-ip */ public static void testGetClientIPAddressRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getClientIPAddress Response Get Client IP Address /api/v1/my-ip */ @@ -670,7 +670,7 @@ public static void testGetClientIPAddressResponse() throws Exception { /** getServerTime Request Get Server Time /api/v1/timestamp */ public static void testGetServerTimeRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getServerTime Response Get Server Time /api/v1/timestamp */ @@ -682,7 +682,7 @@ public static void testGetServerTimeResponse() throws Exception { /** getServiceStatus Request Get Service Status /api/v1/status */ public static void testGetServiceStatusRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getServiceStatus Response Get Service Status /api/v1/status */ @@ -694,7 +694,7 @@ public static void testGetServiceStatusResponse() throws Exception { /** getPublicToken Request Get Public Token - Spot/Margin /api/v1/bullet-public */ public static void testGetPublicTokenRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getPublicToken Response Get Public Token - Spot/Margin /api/v1/bullet-public */ @@ -722,7 +722,7 @@ public static void testGetPublicTokenResponse() throws Exception { /** getPrivateToken Request Get Private Token - Spot/Margin /api/v1/bullet-private */ public static void testGetPrivateTokenRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getPrivateToken Response Get Private Token - Spot/Margin /api/v1/bullet-private */ diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiAutoGeneratedTest.java index 04b3d611..76b1621b 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApiAutoGeneratedTest.java @@ -252,7 +252,7 @@ public static void testCancelAllOrdersBySymbolResponse() throws Exception { /** cancelAllOrders Request Cancel All Orders /api/v1/hf/orders/cancelAll */ public static void testCancelAllOrdersRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** cancelAllOrders Response Cancel All Orders /api/v1/hf/orders/cancelAll */ @@ -401,7 +401,7 @@ public static void testGetOrderByClientOidResponse() throws Exception { * getSymbolsWithOpenOrder Request Get Symbols With Open Order /api/v1/hf/orders/active/symbols */ public static void testGetSymbolsWithOpenOrderRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** @@ -644,7 +644,7 @@ public static void testGetTradeHistoryResponse() throws Exception { /** getDCP Request Get DCP /api/v1/hf/orders/dead-cancel-all/query */ public static void testGetDCPRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getDCP Response Get DCP /api/v1/hf/orders/dead-cancel-all/query */ @@ -1416,7 +1416,7 @@ public static void testGetOrdersListOldResponse() throws Exception { /** getRecentOrdersListOld Request Get Recent Orders List - Old /api/v1/limit/orders */ public static void testGetRecentOrdersListOldRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getRecentOrdersListOld Response Get Recent Orders List - Old /api/v1/limit/orders */ @@ -1613,7 +1613,7 @@ public static void testGetTradeHistoryOldResponse() throws Exception { /** getRecentTradeHistoryOld Request Get Recent Trade History - Old /api/v1/limit/fills */ public static void testGetRecentTradeHistoryOldRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getRecentTradeHistoryOld Response Get Recent Trade History - Old /api/v1/limit/fills */ diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountEvent.java index c4518e6a..f089c6e3 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountEvent.java @@ -16,7 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class AccountEvent implements Response> { +public class AccountEvent implements Response { /** Account ID */ @JsonProperty("accountId") private String accountId; @@ -62,10 +62,10 @@ public class AccountEvent implements Response commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -76,7 +76,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), AccountEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV1Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV1Event.java index 1f705ee1..536ec33f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV1Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV1Event.java @@ -18,7 +18,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class OrderV1Event implements Response> { +public class OrderV1Event implements Response { /** Cumulative number of cancellations */ @JsonProperty("canceledSize") private String canceledSize; @@ -112,10 +112,10 @@ public class OrderV1Event implements Response commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -126,7 +126,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), OrderV1Event.class)); } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV2Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV2Event.java index afbc3cb4..f6252ebb 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV2Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV2Event.java @@ -18,7 +18,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class OrderV2Event implements Response> { +public class OrderV2Event implements Response { /** Cumulative number of cancellations */ @JsonProperty("canceledSize") private String canceledSize; @@ -112,10 +112,10 @@ public class OrderV2Event implements Response commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -126,7 +126,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), OrderV2Event.class)); } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsAutoGeneratedTest.java index c9f4d610..4891f273 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWsAutoGeneratedTest.java @@ -1,6 +1,5 @@ package com.kucoin.universal.sdk.generate.spot.spotprivate; -import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.model.WsMessage; import java.util.ArrayList; @@ -15,32 +14,32 @@ class SpotPrivateWsAutoGeneratedTest { public static void testAccountResponse() throws Exception { String data = "{\"topic\":\"/account/balance\",\"type\":\"message\",\"subject\":\"account.balance\",\"id\":\"354689988084000\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"accountId\":\"548674591753\",\"currency\":\"USDT\",\"total\":\"21.133773386762\",\"available\":\"20.132773386762\",\"hold\":\"1.001\",\"availableChange\":\"-0.5005\",\"holdChange\":\"0.5005\",\"relationContext\":{\"symbol\":\"BTC-USDT\",\"orderId\":\"6721d0632db25b0007071fdc\"},\"relationEvent\":\"trade.hold\",\"relationEventId\":\"354689988084000\",\"time\":\"1730269283892\"}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + AccountEvent event = mapper.convertValue(resp.getData(), AccountEvent.class); } /** orderV1 Get Order(V1) /orderV1/spotMarket/tradeOrders */ public static void testOrderV1Response() throws Exception { String data = "{\"topic\":\"/spotMarket/tradeOrdersV2\",\"type\":\"message\",\"subject\":\"orderChange\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"canceledSize\":\"0\",\"clientOid\":\"5c52e11203aa677f33e493fb\",\"filledSize\":\"0\",\"orderId\":\"6720ecd9ec71f4000747731a\",\"orderTime\":1730211033305,\"orderType\":\"limit\",\"originSize\":\"0.00001\",\"price\":\"50000\",\"remainSize\":\"0.00001\",\"side\":\"buy\",\"size\":\"0.00001\",\"status\":\"open\",\"symbol\":\"BTC-USDT\",\"ts\":1730211033335000000,\"type\":\"open\"}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + OrderV1Event event = mapper.convertValue(resp.getData(), OrderV1Event.class); } /** orderV2 Get Order(V2) /orderV2/spotMarket/tradeOrdersV2 */ public static void testOrderV2Response() throws Exception { String 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\"}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + OrderV2Event event = mapper.convertValue(resp.getData(), OrderV2Event.class); } /** stopOrder Get Stop Order /stopOrder/spotMarket/advancedOrders */ public static void testStopOrderResponse() throws Exception { String 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}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + StopOrderEvent event = mapper.convertValue(resp.getData(), StopOrderEvent.class); } public static void runAllTests() { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/StopOrderEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/StopOrderEvent.java index f39f5ed2..e6345c62 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/StopOrderEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/StopOrderEvent.java @@ -18,7 +18,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class StopOrderEvent implements Response> { +public class StopOrderEvent implements Response { /** Order created time (milliseconds) */ @JsonProperty("createdAt") private Long createdAt; @@ -71,10 +71,10 @@ public class StopOrderEvent implements Response commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -85,7 +85,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), StopOrderEvent.class)); } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java index 6f95bd76..15da23d5 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java @@ -16,7 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class AllTickersEvent implements Response> { +public class AllTickersEvent implements Response { /** */ @JsonProperty("bestAsk") private String bestAsk; @@ -50,10 +50,10 @@ public class AllTickersEvent implements Response commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -64,7 +64,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), AllTickersEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java index 29158972..083941e5 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java @@ -16,8 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class CallAuctionInfoEvent - implements Response> { +public class CallAuctionInfoEvent implements Response { /** Symbol */ @JsonProperty("symbol") private String symbol; @@ -51,10 +50,10 @@ public class CallAuctionInfoEvent private Long time; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -65,7 +64,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), CallAuctionInfoEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java index f408a421..4740f619 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java @@ -19,8 +19,7 @@ @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class CallAuctionOrderbookLevel50Event - implements Response< - CallAuctionOrderbookLevel50Event, WsMessage> { + implements Response { /** price, size */ @JsonProperty("asks") private List> asks = new ArrayList<>(); @@ -34,10 +33,10 @@ public class CallAuctionOrderbookLevel50Event private Long timestamp; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -48,7 +47,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), CallAuctionOrderbookLevel50Event.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java index f779c359..40c97b68 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java @@ -18,7 +18,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class KlinesEvent implements Response> { +public class KlinesEvent implements Response { /** symbol */ @JsonProperty("symbol") private String symbol; @@ -35,10 +35,10 @@ public class KlinesEvent implements Response private Long time; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -49,7 +49,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), KlinesEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java index 06afae2d..2c72b162 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java @@ -16,8 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class MarketSnapshotEvent - implements Response> { +public class MarketSnapshotEvent implements Response { /** */ @JsonProperty("sequence") private String sequence; @@ -27,10 +26,10 @@ public class MarketSnapshotEvent private MarketSnapshotData data; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -41,7 +40,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), MarketSnapshotEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java index c796a583..e3e0e6fa 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java @@ -16,8 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class OrderbookIncrementEvent - implements Response> { +public class OrderbookIncrementEvent implements Response { /** */ @JsonProperty("changes") private OrderbookIncrementChanges changes; @@ -39,10 +38,10 @@ public class OrderbookIncrementEvent private Long time; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -53,7 +52,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), OrderbookIncrementEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java index 0e0dcb9b..ff1fbe55 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java @@ -18,8 +18,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class OrderbookLevel1Event - implements Response> { +public class OrderbookLevel1Event implements Response { /** price, size */ @JsonProperty("asks") private List asks = new ArrayList<>(); @@ -33,10 +32,10 @@ public class OrderbookLevel1Event private Long timestamp; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -47,7 +46,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), OrderbookLevel1Event.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java index 6d900d70..9b586c6f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java @@ -18,8 +18,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class OrderbookLevel50Event - implements Response> { +public class OrderbookLevel50Event implements Response { /** price, size */ @JsonProperty("asks") private List> asks = new ArrayList<>(); @@ -33,10 +32,10 @@ public class OrderbookLevel50Event private Long timestamp; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -47,7 +46,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), OrderbookLevel50Event.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java index 7d971282..3dc31db2 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java @@ -18,8 +18,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class OrderbookLevel5Event - implements Response> { +public class OrderbookLevel5Event implements Response { /** price, size */ @JsonProperty("asks") private List> asks = new ArrayList<>(); @@ -33,10 +32,10 @@ public class OrderbookLevel5Event private Long timestamp; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -47,7 +46,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), OrderbookLevel5Event.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsAutoGeneratedTest.java index 1ad76f91..17edc76f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWsAutoGeneratedTest.java @@ -1,6 +1,5 @@ package com.kucoin.universal.sdk.generate.spot.spotpublic; -import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.model.WsMessage; import java.util.ArrayList; @@ -15,16 +14,16 @@ class SpotPublicWsAutoGeneratedTest { public static void testAllTickersResponse() throws Exception { String data = "{\"topic\":\"/market/ticker:all\",\"type\":\"message\",\"subject\":\"BTC-USDT\",\"data\":{\"bestAsk\":\"67218.7\",\"bestAskSize\":\"1.92318539\",\"bestBid\":\"67218.6\",\"bestBidSize\":\"0.01045638\",\"price\":\"67220\",\"sequence\":\"14691455768\",\"size\":\"0.00004316\",\"time\":1729757723612}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + AllTickersEvent event = mapper.convertValue(resp.getData(), AllTickersEvent.class); } /** callAuctionInfo Get Call Auction Info /callAuctionInfo/callauction/callauctionData:_symbol_ */ public static void testCallAuctionInfoResponse() throws Exception { String 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}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + CallAuctionInfoEvent event = mapper.convertValue(resp.getData(), CallAuctionInfoEvent.class); } /** @@ -34,16 +33,17 @@ public static void testCallAuctionInfoResponse() throws Exception { public static void testCallAuctionOrderbookLevel50Response() throws Exception { String 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}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + CallAuctionOrderbookLevel50Event event = + mapper.convertValue(resp.getData(), CallAuctionOrderbookLevel50Event.class); } /** klines Klines /klines/market/candles:_symbol___type_ */ public static void testKlinesResponse() throws Exception { String data = "{\"topic\":\"/market/candles:BTC-USDT_1hour\",\"type\":\"message\",\"subject\":\"trade.candles.update\",\"data\":{\"symbol\":\"BTC-USDT\",\"candles\":[\"1729839600\",\"67644.9\",\"67437.6\",\"67724.8\",\"67243.8\",\"44.88321441\",\"3027558.991928447\"],\"time\":1729842192785164840}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + KlinesEvent event = mapper.convertValue(resp.getData(), KlinesEvent.class); } /** marketSnapshot Market Snapshot /marketSnapshot/market/snapshot:_market_ */ @@ -51,8 +51,8 @@ public static void testMarketSnapshotResponse() throws Exception { String data = "{\"topic\":\"/market/snapshot:BTC\",\"type\":\"message\",\"subject\":\"trade.snapshot\",\"data\":{\"sequence\":\"1729785948015\",\"data\":{\"askSize\":1375.1096,\"averagePrice\":0.00000262,\"baseCurrency\":\"CHR\",\"bidSize\":152.0912,\"board\":0,\"buy\":0.00000263,\"changePrice\":0.00000005300000000000,\"changeRate\":0.0200,\"close\":0.000002698,\"datetime\":1729785948008,\"high\":0.00000274600000000000,\"lastTradedPrice\":0.000002698,\"low\":0.00000255800000000000,\"makerCoefficient\":1.000000,\"makerFeeRate\":0.001,\"marginTrade\":false,\"mark\":0,\"market\":\"BTC\",\"marketChange1h\":{\"changePrice\":-0.00000000900000000000,\"changeRate\":-0.0033,\"high\":0.00000270700000000000,\"low\":0.00000264200000000000,\"open\":0.00000270700000000000,\"vol\":27.10350000000000000000,\"volValue\":0.00007185015660000000},\"marketChange24h\":{\"changePrice\":0.00000005300000000000,\"changeRate\":0.0200,\"high\":0.00000274600000000000,\"low\":0.00000255800000000000,\"open\":0.00000264500000000000,\"vol\":6824.94800000000000000000,\"volValue\":0.01789509649520000000},\"marketChange4h\":{\"changePrice\":0.00000000600000000000,\"changeRate\":0.0022,\"high\":0.00000270700000000000,\"low\":0.00000264200000000000,\"open\":0.00000269200000000000,\"vol\":92.69020000000000000000,\"volValue\":0.00024903875740000000},\"markets\":[\"BTC\",\"DePIN\",\"Layer" + " 1\"],\"open\":0.00000264500000000000,\"quoteCurrency\":\"BTC\",\"sell\":0.000002695,\"siteTypes\":[\"global\"],\"sort\":100,\"symbol\":\"CHR-BTC\",\"symbolCode\":\"CHR-BTC\",\"takerCoefficient\":1.000000,\"takerFeeRate\":0.001,\"trading\":true,\"vol\":6824.94800000000000000000,\"volValue\":0.01789509649520000000}}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + MarketSnapshotEvent event = mapper.convertValue(resp.getData(), MarketSnapshotEvent.class); } /** @@ -61,16 +61,17 @@ public static void testMarketSnapshotResponse() throws Exception { public static void testOrderbookIncrementResponse() throws Exception { String data = "{\"topic\":\"/market/level2:BTC-USDT\",\"type\":\"message\",\"subject\":\"trade.l2update\",\"data\":{\"changes\":{\"asks\":[[\"67993.3\",\"1.21427407\",\"14701689783\"]],\"bids\":[]},\"sequenceEnd\":14701689783,\"sequenceStart\":14701689783,\"symbol\":\"BTC-USDT\",\"time\":1729816425625}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + OrderbookIncrementEvent event = + mapper.convertValue(resp.getData(), OrderbookIncrementEvent.class); } /** orderbookLevel1 Orderbook - Level1 /orderbookLevel1/spotMarket/level1:_symbol_,_symbol_ */ public static void testOrderbookLevel1Response() throws Exception { String data = "{\"topic\":\"/spotMarket/level1:BTC-USDT\",\"type\":\"message\",\"subject\":\"level1\",\"data\":{\"asks\":[\"68145.8\",\"0.51987471\"],\"bids\":[\"68145.7\",\"1.29267802\"],\"timestamp\":1729816058766}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + OrderbookLevel1Event event = mapper.convertValue(resp.getData(), OrderbookLevel1Event.class); } /** @@ -80,8 +81,8 @@ public static void testOrderbookLevel1Response() throws Exception { public static void testOrderbookLevel50Response() throws Exception { String 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}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + OrderbookLevel50Event event = mapper.convertValue(resp.getData(), OrderbookLevel50Event.class); } /** @@ -90,32 +91,32 @@ public static void testOrderbookLevel50Response() throws Exception { public static void testOrderbookLevel5Response() throws Exception { String data = "{\"topic\":\"/spotMarket/level2Depth5:BTC-USDT\",\"type\":\"message\",\"subject\":\"level2\",\"data\":{\"asks\":[[\"67996.7\",\"1.14213262\"],[\"67996.8\",\"0.21748212\"],[\"67996.9\",\"0.1503747\"],[\"67997\",\"0.11446863\"],[\"67997.1\",\"0.14842782\"]],\"bids\":[[\"67996.6\",\"0.37969491\"],[\"67995.3\",\"0.20779746\"],[\"67994.5\",\"0.00047785\"],[\"67993.4\",\"0.405\"],[\"67993.3\",\"0.13528566\"]],\"timestamp\":1729822226746}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + OrderbookLevel5Event event = mapper.convertValue(resp.getData(), OrderbookLevel5Event.class); } /** symbolSnapshot Symbol Snapshot /symbolSnapshot/market/snapshot:_symbol_ */ public static void testSymbolSnapshotResponse() throws Exception { String data = "{\"topic\":\"/market/snapshot:BTC-USDT\",\"type\":\"message\",\"subject\":\"trade.snapshot\",\"data\":{\"sequence\":\"14691517895\",\"data\":{\"askSize\":1.15955795,\"averagePrice\":66867.89967612,\"baseCurrency\":\"BTC\",\"bidSize\":0.81772627,\"board\":1,\"buy\":67158.1,\"changePrice\":315.20000000000000000000,\"changeRate\":0.0047,\"close\":67158.1,\"datetime\":1729758286011,\"high\":67611.80000000000000000000,\"lastTradedPrice\":67158.1,\"low\":65257.10000000000000000000,\"makerCoefficient\":1.000000,\"makerFeeRate\":0.001,\"marginTrade\":true,\"mark\":0,\"market\":\"USDS\",\"marketChange1h\":{\"changePrice\":-102.10000000000000000000,\"changeRate\":-0.0015,\"high\":67310.60000000000000000000,\"low\":67051.80000000000000000000,\"open\":67260.20000000000000000000,\"vol\":53.73698081000000000000,\"volValue\":3609965.13819127700000000000},\"marketChange24h\":{\"changePrice\":315.20000000000000000000,\"changeRate\":0.0047,\"high\":67611.80000000000000000000,\"low\":65257.10000000000000000000,\"open\":66842.90000000000000000000,\"vol\":2227.69895852000000000000,\"volValue\":147972941.07857507300000000000},\"marketChange4h\":{\"changePrice\":-166.30000000000000000000,\"changeRate\":-0.0024,\"high\":67476.60000000000000000000,\"low\":67051.80000000000000000000,\"open\":67324.40000000000000000000,\"vol\":173.76971188000000000000,\"volValue\":11695949.43841656500000000000},\"markets\":[\"USDS\",\"PoW\"],\"open\":66842.90000000000000000000,\"quoteCurrency\":\"USDT\",\"sell\":67158.2,\"siteTypes\":[\"turkey\",\"thailand\",\"global\"],\"sort\":100,\"symbol\":\"BTC-USDT\",\"symbolCode\":\"BTC-USDT\",\"takerCoefficient\":1.000000,\"takerFeeRate\":0.001,\"trading\":true,\"vol\":2227.69895852000000000000,\"volValue\":147972941.07857507300000000000}}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + SymbolSnapshotEvent event = mapper.convertValue(resp.getData(), SymbolSnapshotEvent.class); } /** ticker Get Ticker /ticker/market/ticker:_symbol_,_symbol_ */ public static void testTickerResponse() throws Exception { String data = "{\"type\":\"message\",\"topic\":\"/market/ticker:BTC-USDT\",\"subject\":\"trade.ticker\",\"data\":{\"sequence\":\"1545896668986\",\"price\":\"0.08\",\"size\":\"0.011\",\"bestAsk\":\"0.08\",\"bestAskSize\":\"0.18\",\"bestBid\":\"0.049\",\"bestBidSize\":\"0.036\",\"Time\":1704873323416}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + TickerEvent event = mapper.convertValue(resp.getData(), TickerEvent.class); } /** trade Trade /trade/market/match:_symbol_,_symbol_ */ public static void testTradeResponse() throws Exception { String data = "{\"topic\":\"/market/match:BTC-USDT\",\"type\":\"message\",\"subject\":\"trade.l3match\",\"data\":{\"makerOrderId\":\"671b5007389355000701b1d3\",\"price\":\"67523\",\"sequence\":\"11067996711960577\",\"side\":\"buy\",\"size\":\"0.003\",\"symbol\":\"BTC-USDT\",\"takerOrderId\":\"671b50161777ff00074c168d\",\"time\":\"1729843222921000000\",\"tradeId\":\"11067996711960577\",\"type\":\"match\"}}"; - WsMessage resp = - mapper.readValue(data, new TypeReference>() {}); + WsMessage resp = mapper.readValue(data, WsMessage.class); + TradeEvent event = mapper.convertValue(resp.getData(), TradeEvent.class); } public static void runAllTests() { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java index 18e75a9e..3e74f41a 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java @@ -16,8 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class SymbolSnapshotEvent - implements Response> { +public class SymbolSnapshotEvent implements Response { /** */ @JsonProperty("sequence") private String sequence; @@ -27,10 +26,10 @@ public class SymbolSnapshotEvent private SymbolSnapshotData data; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -41,7 +40,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), SymbolSnapshotEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java index 47264ea5..3c46bbeb 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java @@ -16,7 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class TickerEvent implements Response> { +public class TickerEvent implements Response { /** Sequence number */ @JsonProperty("sequence") private String sequence; @@ -50,10 +50,10 @@ public class TickerEvent implements Response private Long time; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -64,7 +64,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), TickerEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java index 0248d926..5496a00d 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java @@ -16,7 +16,7 @@ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class TradeEvent implements Response> { +public class TradeEvent implements Response { /** */ @JsonProperty("makerOrderId") private String makerOrderId; @@ -58,10 +58,10 @@ public class TradeEvent implements Response> { private String type; /** common response */ - @JsonIgnore private WsMessage commonResponse; + @JsonIgnore private WsMessage commonResponse; @Override - public void setCommonResponse(WsMessage response) { + public void setCommonResponse(WsMessage response) { this.commonResponse = response; } @@ -72,7 +72,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return msg -> callback.onEvent(msg.getTopic(), msg.getSubject(), msg.getData()); + return (msg, objectMapper) -> + callback.onEvent( + msg.getTopic(), + msg.getSubject(), + objectMapper.convertValue(msg.getData(), TradeEvent.class)); } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiAutoGeneratedTest.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiAutoGeneratedTest.java index 82a8adea..92b7be8d 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiAutoGeneratedTest.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApiAutoGeneratedTest.java @@ -17,7 +17,7 @@ class VIPLendingApiAutoGeneratedTest { * getDiscountRateConfigs Request Get Discount Rate Configs /api/v1/otc-loan/discount-rate-configs */ public static void testGetDiscountRateConfigsRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** @@ -67,7 +67,7 @@ public static void testGetDiscountRateConfigsResponse() throws Exception { /** getLoanInfo Request Get Loan Info /api/v1/otc-loan/loan */ public static void testGetLoanInfoRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getLoanInfo Response Get Loan Info /api/v1/otc-loan/loan */ @@ -105,7 +105,7 @@ public static void testGetLoanInfoResponse() throws Exception { /** getAccounts Request Get Accounts /api/v1/otc-loan/accounts */ public static void testGetAccountsRequest() throws Exception { - // $this->assertTrue(true); + // pass } /** getAccounts Response Get Accounts /api/v1/otc-loan/accounts */ diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsService.java index f136daa1..736e3c79 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsService.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsService.java @@ -1,5 +1,6 @@ package com.kucoin.universal.sdk.internal.infra; +import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.internal.interfaces.*; import com.kucoin.universal.sdk.model.*; import java.util.Arrays; @@ -8,7 +9,7 @@ @Slf4j public final class DefaultWsService implements WebSocketService, WebsocketTransportListener { - + private final ObjectMapper mapper = new ObjectMapper(); private final WebsocketTransport client; private final WebSocketClientOption option; private final boolean privateChannel; @@ -114,7 +115,7 @@ public void onMessage(WsMessage wsMessage) { } try { - cb.onMessage(wsMessage); + cb.onMessage(wsMessage, mapper); } catch (Throwable t) { notifyEvent(WebSocketEvent.CALLBACK_ERROR, t.getMessage()); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketMessageCallback.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketMessageCallback.java index c988987e..2c0f9545 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketMessageCallback.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketMessageCallback.java @@ -1,9 +1,10 @@ package com.kucoin.universal.sdk.internal.interfaces; +import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.model.WsMessage; public interface WebSocketMessageCallback { /** Handles incoming WebSocket messages. */ - void onMessage(WsMessage message); + void onMessage(WsMessage message, ObjectMapper objectMapper); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WsMessage.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WsMessage.java index b1470fe5..fd417541 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WsMessage.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WsMessage.java @@ -2,13 +2,14 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; import lombok.Data; import lombok.ToString; @Data @ToString(exclude = "data") @JsonIgnoreProperties(ignoreUnknown = true) -public class WsMessage { +public class WsMessage { /** Unique message ID */ @JsonProperty("id") @@ -40,5 +41,5 @@ public class WsMessage { /** Raw message data */ @JsonProperty("data") - private T data; + private JsonNode data; } From 0009f30107cc3537d79c70efef594373311f4a5f Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Wed, 9 Jul 2025 15:40:59 +0800 Subject: [PATCH 16/39] feat(java): add ws model support --- .../plugin/src/main/resources/java-sdk/model_ws.mustache | 2 +- sdk/java/pom.xml | 7 +++---- .../sdk/generate/futures/futuresprivate/AllOrderEvent.java | 2 +- .../generate/futures/futuresprivate/AllPositionEvent.java | 2 +- .../sdk/generate/futures/futuresprivate/BalanceEvent.java | 2 +- .../futures/futuresprivate/CrossLeverageEvent.java | 2 +- .../generate/futures/futuresprivate/MarginModeEvent.java | 2 +- .../sdk/generate/futures/futuresprivate/OrderEvent.java | 2 +- .../sdk/generate/futures/futuresprivate/PositionEvent.java | 2 +- .../generate/futures/futuresprivate/StopOrdersEvent.java | 2 +- .../generate/futures/futurespublic/AnnouncementEvent.java | 2 +- .../sdk/generate/futures/futurespublic/ExecutionEvent.java | 2 +- .../generate/futures/futurespublic/InstrumentEvent.java | 2 +- .../sdk/generate/futures/futurespublic/KlinesEvent.java | 2 +- .../futures/futurespublic/OrderbookIncrementEvent.java | 2 +- .../futures/futurespublic/OrderbookLevel50Event.java | 2 +- .../futures/futurespublic/OrderbookLevel5Event.java | 2 +- .../futures/futurespublic/SymbolSnapshotEvent.java | 2 +- .../sdk/generate/futures/futurespublic/TickerV1Event.java | 2 +- .../sdk/generate/futures/futurespublic/TickerV2Event.java | 2 +- .../margin/marginprivate/CrossMarginPositionEvent.java | 2 +- .../margin/marginprivate/IsolatedMarginPositionEvent.java | 2 +- .../sdk/generate/margin/marginpublic/IndexPriceEvent.java | 2 +- .../sdk/generate/margin/marginpublic/MarkPriceEvent.java | 2 +- .../sdk/generate/spot/spotprivate/AccountEvent.java | 2 +- .../sdk/generate/spot/spotprivate/OrderV1Event.java | 2 +- .../sdk/generate/spot/spotprivate/OrderV2Event.java | 2 +- .../sdk/generate/spot/spotprivate/StopOrderEvent.java | 2 +- .../sdk/generate/spot/spotpublic/AllTickersEvent.java | 2 +- .../sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java | 2 +- .../spot/spotpublic/CallAuctionOrderbookLevel50Event.java | 2 +- .../sdk/generate/spot/spotpublic/KlinesEvent.java | 2 +- .../sdk/generate/spot/spotpublic/MarketSnapshotEvent.java | 2 +- .../generate/spot/spotpublic/OrderbookIncrementEvent.java | 2 +- .../sdk/generate/spot/spotpublic/OrderbookLevel1Event.java | 2 +- .../generate/spot/spotpublic/OrderbookLevel50Event.java | 2 +- .../sdk/generate/spot/spotpublic/OrderbookLevel5Event.java | 2 +- .../sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java | 2 +- .../sdk/generate/spot/spotpublic/TickerEvent.java | 2 +- .../universal/sdk/generate/spot/spotpublic/TradeEvent.java | 2 +- .../universal/sdk/internal/infra/CallbackManager.java | 6 +++--- .../universal/sdk/internal/infra/DefaultWsService.java | 4 ++-- .../com/kucoin/universal/sdk/internal/infra/SubInfo.java | 2 +- .../sdk/internal/interfaces/WebSocketMessageCallback.java | 2 +- .../sdk/internal/interfaces/WebSocketService.java | 2 +- 45 files changed, 50 insertions(+), 51 deletions(-) diff --git a/generator/plugin/src/main/resources/java-sdk/model_ws.mustache b/generator/plugin/src/main/resources/java-sdk/model_ws.mustache index 2c244a26..8a6d2ef6 100644 --- a/generator/plugin/src/main/resources/java-sdk/model_ws.mustache +++ b/generator/plugin/src/main/resources/java-sdk/model_ws.mustache @@ -62,7 +62,7 @@ class {{classname}} { } public static class CallbackAdapters { - public static WebSocketMessageCallback<{{classname}}> of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent(msg.getTopic(), msg.getSubject(), objectMapper.convertValue(msg.getData(), {{classname}}.class)); } } diff --git a/sdk/java/pom.xml b/sdk/java/pom.xml index 5c01c9a3..c7d62658 100644 --- a/sdk/java/pom.xml +++ b/sdk/java/pom.xml @@ -28,8 +28,8 @@ - 8 - 8 + 11 + 11 UTF-8 1.18.34 2.17.1 @@ -87,8 +87,7 @@ maven-compiler-plugin 3.13.0 - ${maven.compiler.source} - ${maven.compiler.target} + 8 diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllOrderEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllOrderEvent.java index 8ab167ab..63a01939 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllOrderEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllOrderEvent.java @@ -128,7 +128,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllPositionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllPositionEvent.java index b7997610..eb962ee0 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllPositionEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllPositionEvent.java @@ -235,7 +235,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/BalanceEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/BalanceEvent.java index 6f56d223..0410318e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/BalanceEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/BalanceEvent.java @@ -95,7 +95,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageEvent.java index f0cc45c2..59e7d613 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageEvent.java @@ -46,7 +46,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/MarginModeEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/MarginModeEvent.java index a32138c3..0930e1b2 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/MarginModeEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/MarginModeEvent.java @@ -46,7 +46,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/OrderEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/OrderEvent.java index fbe35b36..e707b7a8 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/OrderEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/OrderEvent.java @@ -128,7 +128,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/PositionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/PositionEvent.java index ad68785e..c29769e5 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/PositionEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/PositionEvent.java @@ -235,7 +235,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/StopOrdersEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/StopOrdersEvent.java index 1d884933..8341b041 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/StopOrdersEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/StopOrdersEvent.java @@ -88,7 +88,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/AnnouncementEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/AnnouncementEvent.java index 14aee96a..a8263bf4 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/AnnouncementEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/AnnouncementEvent.java @@ -47,7 +47,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/ExecutionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/ExecutionEvent.java index dbdf8c07..d40d2f55 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/ExecutionEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/ExecutionEvent.java @@ -67,7 +67,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/InstrumentEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/InstrumentEvent.java index a74ea4e3..770fa1fa 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/InstrumentEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/InstrumentEvent.java @@ -54,7 +54,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/KlinesEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/KlinesEvent.java index 1d5da351..2648bb5c 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/KlinesEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/KlinesEvent.java @@ -51,7 +51,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookIncrementEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookIncrementEvent.java index a940c727..1ac715bc 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookIncrementEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookIncrementEvent.java @@ -43,7 +43,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel50Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel50Event.java index 3493d54f..b70afabd 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel50Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel50Event.java @@ -53,7 +53,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel5Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel5Event.java index a5376752..5caac73e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel5Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel5Event.java @@ -53,7 +53,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/SymbolSnapshotEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/SymbolSnapshotEvent.java index 8cfa778e..91fd76a4 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/SymbolSnapshotEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/SymbolSnapshotEvent.java @@ -71,7 +71,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV1Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV1Event.java index a3c04066..44e01971 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV1Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV1Event.java @@ -75,7 +75,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV2Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV2Event.java index c4d722f5..11be7f5b 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV2Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV2Event.java @@ -59,7 +59,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionEvent.java index 006dc484..394d73c5 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionEvent.java @@ -67,7 +67,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionEvent.java index 89f29dbe..ecac04ef 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionEvent.java @@ -60,7 +60,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/IndexPriceEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/IndexPriceEvent.java index c5e1d25c..cc5f20ae 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/IndexPriceEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/IndexPriceEvent.java @@ -47,7 +47,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarkPriceEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarkPriceEvent.java index dd33ad1f..6e193874 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarkPriceEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarkPriceEvent.java @@ -47,7 +47,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountEvent.java index f089c6e3..8d9cbfbe 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountEvent.java @@ -75,7 +75,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV1Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV1Event.java index 536ec33f..da6e8a7b 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV1Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV1Event.java @@ -125,7 +125,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV2Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV2Event.java index f6252ebb..af6d61f0 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV2Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV2Event.java @@ -125,7 +125,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/StopOrderEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/StopOrderEvent.java index e6345c62..c429b90a 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/StopOrderEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/StopOrderEvent.java @@ -84,7 +84,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java index 15da23d5..8da699e7 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java @@ -63,7 +63,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java index 083941e5..b69bb2e4 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java @@ -63,7 +63,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java index 4740f619..d51ef014 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java @@ -46,7 +46,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java index 40c97b68..6ce34328 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java @@ -48,7 +48,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java index 2c72b162..ff24a859 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java @@ -39,7 +39,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java index e3e0e6fa..ae2362e9 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java @@ -51,7 +51,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java index ff1fbe55..cd510276 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java @@ -45,7 +45,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java index 9b586c6f..4563b9e5 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java @@ -45,7 +45,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java index 3dc31db2..9dc8c7fd 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java @@ -45,7 +45,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java index 3e74f41a..28907e03 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java @@ -39,7 +39,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java index 3c46bbeb..61a1bcb0 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java @@ -63,7 +63,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java index 5496a00d..b4e85eb6 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java @@ -71,7 +71,7 @@ public interface Callback { } public static class CallbackAdapters { - public static WebSocketMessageCallback of(Callback callback) { + public static WebSocketMessageCallback of(Callback callback) { return (msg, objectMapper) -> callback.onEvent( msg.getTopic(), diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/CallbackManager.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/CallbackManager.java index acb38f83..2951ccaf 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/CallbackManager.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/CallbackManager.java @@ -47,7 +47,7 @@ void remove(String id) { topics.forEach(topicCbs::remove); } - WebSocketMessageCallback get(String topic) { + WebSocketMessageCallback get(String topic) { Callback cb = topicCbs.get(topic); return cb == null ? null : cb.callback; } @@ -59,7 +59,7 @@ List getSubInfo() { idTopics.forEach( (id, topics) -> { List args = new ArrayList<>(); - WebSocketMessageCallback cb = null; + WebSocketMessageCallback cb = null; for (String topic : topics) { int idx = topic.indexOf(':'); @@ -84,7 +84,7 @@ List getSubInfo() { @Value private static class Callback { - WebSocketMessageCallback callback; + WebSocketMessageCallback callback; String id; String topic; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsService.java index 736e3c79..be95e1fb 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsService.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsService.java @@ -40,7 +40,7 @@ public void stop() { } @Override - public String subscribe(String prefix, String[] args, WebSocketMessageCallback callback) { + public String subscribe(String prefix, String[] args, WebSocketMessageCallback callback) { SubInfo sub = new SubInfo(prefix, Arrays.asList(args), callback); CallbackManager cm = topicManager.getCallbackManager(prefix); @@ -108,7 +108,7 @@ public void onEvent(WebSocketEvent event, String message) { @Override public void onMessage(WsMessage wsMessage) { CallbackManager cm = topicManager.getCallbackManager(wsMessage.getTopic()); - WebSocketMessageCallback cb = cm.get(wsMessage.getTopic()); + WebSocketMessageCallback cb = cm.get(wsMessage.getTopic()); if (cb == null) { log.warn("can not find callback manager, topic:{}", wsMessage.getTopic()); return; diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/SubInfo.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/SubInfo.java index afaa570e..1d346adf 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/SubInfo.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/SubInfo.java @@ -15,7 +15,7 @@ public final class SubInfo { private final String prefix; private final List args; - private final WebSocketMessageCallback callback; + private final WebSocketMessageCallback callback; public String toId() { if (args == null || args.isEmpty()) { diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketMessageCallback.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketMessageCallback.java index 2c0f9545..1341a790 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketMessageCallback.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketMessageCallback.java @@ -3,7 +3,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.model.WsMessage; -public interface WebSocketMessageCallback { +public interface WebSocketMessageCallback { /** Handles incoming WebSocket messages. */ void onMessage(WsMessage message, ObjectMapper objectMapper); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketService.java index 0e7086d4..eae87a5d 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketService.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/interfaces/WebSocketService.java @@ -9,7 +9,7 @@ public interface WebSocketService { void stop(); /** Subscribes to a topic with a callback handler. */ - String subscribe(String prefix, String[] args, WebSocketMessageCallback callback); + String subscribe(String prefix, String[] args, WebSocketMessageCallback callback); /** Unsubscribes from a topic. */ void unsubscribe(String id); From 31d1fb82e16a5c7ffaba01f66f086f075bf340e1 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Mon, 14 Jul 2025 11:25:16 +0800 Subject: [PATCH 17/39] feat(java): add api --- .../main/resources/java-sdk/version.mustache | 4 +- .../com/kucoin/universal/sdk/api/Client.java | 19 +++ .../universal/sdk/api/DefaultClient.java | 35 ++++++ .../universal/sdk/api/KucoinRestService.java | 80 +++++++++++++ .../universal/sdk/api/KucoinWSService.java | 59 ++++++++++ .../universal/sdk/generate/Version.java | 4 +- .../sdk/internal/infra/DefaultTransport.java | 51 ++------ .../rest/DefaultKucoinRestAPIImpl.java | 107 +++++++++++++++++ .../sdk/internal/ws/DefaultKucoinWsImpl.java | 110 ++++++++++++++++++ .../kucoin/universal/sdk/model/RestError.java | 2 +- .../universal/sdk/model/RestResponse.java | 7 +- 11 files changed, 428 insertions(+), 50 deletions(-) create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/api/Client.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultClient.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/api/KucoinRestService.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/api/KucoinWSService.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/rest/DefaultKucoinRestAPIImpl.java create mode 100644 sdk/java/src/main/java/com/kucoin/universal/sdk/internal/ws/DefaultKucoinWsImpl.java diff --git a/generator/plugin/src/main/resources/java-sdk/version.mustache b/generator/plugin/src/main/resources/java-sdk/version.mustache index b3961383..b5795c01 100644 --- a/generator/plugin/src/main/resources/java-sdk/version.mustache +++ b/generator/plugin/src/main/resources/java-sdk/version.mustache @@ -1,6 +1,6 @@ package com.kucoin.universal.sdk.generate; public class Version { - public final String SDK_VERSION = "{{API_VERSION}}"; - public final String SDK_GENERATE_DATE = "{{API_DATE}}"; + public static final String SDK_VERSION = "{{API_VERSION}}"; + public static final String SDK_GENERATE_DATE = "{{API_DATE}}"; } \ No newline at end of file diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/api/Client.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/Client.java new file mode 100644 index 00000000..7b6b9c57 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/Client.java @@ -0,0 +1,19 @@ +package com.kucoin.universal.sdk.api; + +/** Client interface defines the methods to get REST and WebSocket services. */ +public interface Client { + + /** + * Get RESTful service. + * + * @return KucoinRestService + */ + KucoinRestService restService(); + + /** + * Get WebSocket service. + * + * @return KucoinWSService + */ + KucoinWSService wsService(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultClient.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultClient.java new file mode 100644 index 00000000..128410a6 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultClient.java @@ -0,0 +1,35 @@ +package com.kucoin.universal.sdk.api; + +import com.kucoin.universal.sdk.internal.rest.DefaultKucoinRestAPIImpl; +import com.kucoin.universal.sdk.internal.ws.DefaultKucoinWsImpl; +import com.kucoin.universal.sdk.model.ClientOption; + +/* +Client +TODO +*/ + +/** DefaultClient provides the default implementation of the {@link Client} interface. */ +public final class DefaultClient implements Client { + + /** REST-side facade. */ + private final KucoinRestService restImpl; + + /** WebSocket-side facade. */ + private final KucoinWSService wsImpl; + + public DefaultClient(ClientOption option) { + this.restImpl = new DefaultKucoinRestAPIImpl(option); + this.wsImpl = new DefaultKucoinWsImpl(option); + } + + @Override + public KucoinRestService restService() { + return restImpl; + } + + @Override + public KucoinWSService wsService() { + return wsImpl; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/api/KucoinRestService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/KucoinRestService.java new file mode 100644 index 00000000..8ba387d7 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/KucoinRestService.java @@ -0,0 +1,80 @@ +package com.kucoin.universal.sdk.api; + +import com.kucoin.universal.sdk.generate.service.AccountService; +import com.kucoin.universal.sdk.generate.service.AffiliateService; +import com.kucoin.universal.sdk.generate.service.BrokerService; +import com.kucoin.universal.sdk.generate.service.CopyTradingService; +import com.kucoin.universal.sdk.generate.service.EarnService; +import com.kucoin.universal.sdk.generate.service.FuturesService; +import com.kucoin.universal.sdk.generate.service.MarginService; +import com.kucoin.universal.sdk.generate.service.SpotService; +import com.kucoin.universal.sdk.generate.service.VIPLendingService; + +/** + * Interface KucoinRestService Defines the contract for accessing KuCoin REST API service groups. + */ +public interface KucoinRestService { + + /** + * Provides functions to access and manipulate account-related data. + * + * @return AccountService + */ + AccountService getAccountService(); + + /** + * Provides functions to access affiliate-related data. + * + * @return AffiliateService + */ + AffiliateService getAffiliateService(); + + /** + * Provides functions to access and manage broker-related data. + * + * @return BrokerService + */ + BrokerService getBrokerService(); + + /** + * Provides functions to access and manage copy trading-related data. + * + * @return CopyTradingService + */ + CopyTradingService getCopytradingService(); + + /** + * Provides functions to access and manage earn-related data. + * + * @return EarnService + */ + EarnService getEarnService(); + + /** + * Provides functions to perform actions in the futures market. + * + * @return FuturesService + */ + FuturesService getFuturesService(); + + /** + * Provides functions to access and manage margin-related data. + * + * @return MarginService + */ + MarginService getMarginService(); + + /** + * Provides functions to perform actions in the spot market. + * + * @return SpotService + */ + SpotService getSpotService(); + + /** + * Provides functions to access and manage VIP lending-related data. + * + * @return VIPLendingService + */ + VIPLendingService getVipLendingService(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/api/KucoinWSService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/KucoinWSService.java new file mode 100644 index 00000000..d0772e65 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/KucoinWSService.java @@ -0,0 +1,59 @@ +package com.kucoin.universal.sdk.api; + +import com.kucoin.universal.sdk.generate.futures.futuresprivate.FuturesPrivateWs; +import com.kucoin.universal.sdk.generate.futures.futurespublic.FuturesPublicWs; +import com.kucoin.universal.sdk.generate.margin.marginprivate.MarginPrivateWs; +import com.kucoin.universal.sdk.generate.margin.marginpublic.MarginPublicWs; +import com.kucoin.universal.sdk.generate.spot.spotprivate.SpotPrivateWs; +import com.kucoin.universal.sdk.generate.spot.spotpublic.SpotPublicWs; + +/** KucoinWSService provides WebSocket interfaces for Spot, Margin, and Futures trading. */ +public interface KucoinWSService { + /** + * Returns the interface to interact with the Spot Trading WebSocket (public channel) API of + * KuCoin. + * + * @return SpotPublicWs + */ + SpotPublicWs newSpotPublicWS(); + + /** + * Returns the interface to interact with the Spot Trading WebSocket (private channel) API of + * KuCoin. + * + * @return SpotPrivateWs + */ + SpotPrivateWs newSpotPrivateWS(); + + /** + * Returns the interface to interact with the Margin Trading WebSocket (public channel) API of + * KuCoin. + * + * @return MarginPublicWs + */ + MarginPublicWs newMarginPublicWS(); + + /** + * Returns the interface to interact with the Margin Trading WebSocket (private channel) API of + * KuCoin. + * + * @return MarginPrivateWs + */ + MarginPrivateWs newMarginPrivateWS(); + + /** + * Returns the interface to interact with the Futures Trading WebSocket (public channel) API of + * KuCoin. + * + * @return FuturesPublicWs + */ + FuturesPublicWs newFuturesPublicWS(); + + /** + * Returns the interface to interact with the Futures Trading WebSocket (private channel) API of + * KuCoin. + * + * @return FuturesPrivateWs + */ + FuturesPrivateWs newFuturesPrivateWS(); +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java index 376f02b5..79a23817 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java @@ -1,6 +1,6 @@ package com.kucoin.universal.sdk.generate; public class Version { - public final String SDK_VERSION = "0.1.0-alpha"; - public final String SDK_GENERATE_DATE = "2025-07-09"; + public static final String SDK_VERSION = "0.1.0-alpha"; + public static final String SDK_GENERATE_DATE = "2025-07-09"; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java index fe199c32..18941812 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java @@ -1,6 +1,5 @@ package com.kucoin.universal.sdk.internal.infra; -import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.internal.interfaces.PathVar; @@ -9,7 +8,6 @@ import com.kucoin.universal.sdk.internal.interfaces.Transport; import com.kucoin.universal.sdk.model.*; import java.lang.reflect.Field; -import java.lang.reflect.Modifier; import java.util.*; import java.util.concurrent.TimeUnit; import java.util.regex.Matcher; @@ -136,47 +134,6 @@ private PathRes processPathVar(String path, Request req) { return pr; } - private static class QueryRes { - HttpUrl url; // encoded url - String raw; // raw query for signing - } - - /** Build encoded URL and raw query string simultaneously. */ - private QueryRes buildUrl(String base, String path, Request req, Set skip) { - HttpUrl.Builder ub = - Objects.requireNonNull(HttpUrl.parse(base + path), "invalid base").newBuilder(); - List rawParts = new ArrayList<>(); - - if (req != null) { - for (Field f : req.getClass().getDeclaredFields()) { - if (Modifier.isStatic(f.getModifiers()) || skip.contains(f.getName())) continue; - f.setAccessible(true); - Object v; - try { - v = f.get(req); - } catch (IllegalAccessException e) { - continue; - } - if (v == null) continue; - - String key = - Optional.ofNullable(f.getAnnotation(JsonProperty.class)) - .map(JsonProperty::value) - .filter(s -> !s.isEmpty()) - .orElse(f.getName()); - - String val = v instanceof Boolean ? ((Boolean) v ? "true" : "false") : String.valueOf(v); - - ub.addQueryParameter(key, val); - rawParts.add(key + "=" + val); - } - } - QueryRes qr = new QueryRes(); - qr.url = ub.build(); - qr.raw = String.join("&", rawParts); - return qr; - } - private String endpoint(String domain) { switch (domain) { case Constants.DOMAIN_TYPE_SPOT: @@ -315,7 +272,13 @@ public >> T call( return doRequest(request, respClazz); } catch (Exception e) { - throw new RuntimeException(e); + RestError restError = null; + if (e instanceof RestError) { + restError = (RestError) e; + } else { + restError = new RestError(null, e); + } + throw restError; } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/rest/DefaultKucoinRestAPIImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/rest/DefaultKucoinRestAPIImpl.java new file mode 100644 index 00000000..f51a1b60 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/rest/DefaultKucoinRestAPIImpl.java @@ -0,0 +1,107 @@ +package com.kucoin.universal.sdk.internal.rest; + +import com.kucoin.universal.sdk.api.KucoinRestService; +import com.kucoin.universal.sdk.generate.Version; +import com.kucoin.universal.sdk.generate.service.AccountService; +import com.kucoin.universal.sdk.generate.service.AccountServiceImpl; +import com.kucoin.universal.sdk.generate.service.AffiliateService; +import com.kucoin.universal.sdk.generate.service.AffiliateServiceImpl; +import com.kucoin.universal.sdk.generate.service.BrokerService; +import com.kucoin.universal.sdk.generate.service.BrokerServiceImpl; +import com.kucoin.universal.sdk.generate.service.CopyTradingService; +import com.kucoin.universal.sdk.generate.service.CopyTradingServiceImpl; +import com.kucoin.universal.sdk.generate.service.EarnService; +import com.kucoin.universal.sdk.generate.service.EarnServiceImpl; +import com.kucoin.universal.sdk.generate.service.FuturesService; +import com.kucoin.universal.sdk.generate.service.FuturesServiceImpl; +import com.kucoin.universal.sdk.generate.service.MarginService; +import com.kucoin.universal.sdk.generate.service.MarginServiceImpl; +import com.kucoin.universal.sdk.generate.service.SpotService; +import com.kucoin.universal.sdk.generate.service.SpotServiceImpl; +import com.kucoin.universal.sdk.generate.service.VIPLendingService; +import com.kucoin.universal.sdk.generate.service.VIPLendingServiceImpl; +import com.kucoin.universal.sdk.internal.infra.DefaultTransport; +import com.kucoin.universal.sdk.model.ClientOption; +import lombok.extern.slf4j.Slf4j; + +/** + * DefaultKucoinRestAPIImpl is the default implementation of {@link KucoinRestService}. It wires + * every generated REST service implementation with a shared {@link DefaultTransport}. + */ +@Slf4j +public final class DefaultKucoinRestAPIImpl implements KucoinRestService { + + private final AccountService accountService; + private final AffiliateService affiliateService; + private final BrokerService brokerService; + private final CopyTradingService copyTradingService; + private final EarnService earnService; + private final FuturesService futuresService; + private final MarginService marginService; + private final SpotService spotService; + private final VIPLendingService vipLendingService; + + public DefaultKucoinRestAPIImpl(ClientOption option) { + if (option.getTransportOption() == null) { + throw new RuntimeException("no transport option provided"); + } + DefaultTransport transport = new DefaultTransport(option, Version.SDK_VERSION); + + this.accountService = new AccountServiceImpl(transport); + this.affiliateService = new AffiliateServiceImpl(transport); + this.brokerService = new BrokerServiceImpl(transport); + this.copyTradingService = new CopyTradingServiceImpl(transport); + this.earnService = new EarnServiceImpl(transport); + this.futuresService = new FuturesServiceImpl(transport); + this.marginService = new MarginServiceImpl(transport); + this.spotService = new SpotServiceImpl(transport); + this.vipLendingService = new VIPLendingServiceImpl(transport); + + log.info("SDK version: {}", Version.SDK_VERSION); + } + + @Override + public AccountService getAccountService() { + return accountService; + } + + @Override + public AffiliateService getAffiliateService() { + return affiliateService; + } + + @Override + public BrokerService getBrokerService() { + return brokerService; + } + + @Override + public CopyTradingService getCopytradingService() { + return copyTradingService; + } + + @Override + public EarnService getEarnService() { + return earnService; + } + + @Override + public FuturesService getFuturesService() { + return futuresService; + } + + @Override + public MarginService getMarginService() { + return marginService; + } + + @Override + public SpotService getSpotService() { + return spotService; + } + + @Override + public VIPLendingService getVipLendingService() { + return vipLendingService; + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/ws/DefaultKucoinWsImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/ws/DefaultKucoinWsImpl.java new file mode 100644 index 00000000..590a8e49 --- /dev/null +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/ws/DefaultKucoinWsImpl.java @@ -0,0 +1,110 @@ +package com.kucoin.universal.sdk.internal.ws; + +import com.kucoin.universal.sdk.api.KucoinWSService; +import com.kucoin.universal.sdk.generate.Version; +import com.kucoin.universal.sdk.generate.futures.futuresprivate.FuturesPrivateWs; +import com.kucoin.universal.sdk.generate.futures.futuresprivate.FuturesPrivateWsImpl; +import com.kucoin.universal.sdk.generate.futures.futurespublic.FuturesPublicWs; +import com.kucoin.universal.sdk.generate.futures.futurespublic.FuturesPublicWsImpl; +import com.kucoin.universal.sdk.generate.margin.marginprivate.MarginPrivateWs; +import com.kucoin.universal.sdk.generate.margin.marginprivate.MarginPrivateWsImpl; +import com.kucoin.universal.sdk.generate.margin.marginpublic.MarginPublicWs; +import com.kucoin.universal.sdk.generate.margin.marginpublic.MarginPublicWsImpl; +import com.kucoin.universal.sdk.generate.spot.spotprivate.SpotPrivateWs; +import com.kucoin.universal.sdk.generate.spot.spotprivate.SpotPrivateWsImpl; +import com.kucoin.universal.sdk.generate.spot.spotpublic.SpotPublicWs; +import com.kucoin.universal.sdk.generate.spot.spotpublic.SpotPublicWsImpl; +import com.kucoin.universal.sdk.internal.infra.DefaultWsService; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; + +/** DefaultKucoinWsImpl provides WebSocket interfaces for Spot, Margin, and Futures trading. */ +public final class DefaultKucoinWsImpl implements KucoinWSService { + + /** Client configuration options. */ + private final ClientOption clientOption; + + public DefaultKucoinWsImpl(ClientOption clientOption) { + this.clientOption = clientOption; + } + + /** + * Returns the interface to interact with the Spot Trading WebSocket (public channel) API of + * KuCoin. + * + * @return SpotPublicWs + */ + @Override + public SpotPublicWs newSpotPublicWS() { + DefaultWsService wsService = + new DefaultWsService(clientOption, Constants.DOMAIN_TYPE_SPOT, false, Version.SDK_VERSION); + return new SpotPublicWsImpl(wsService); + } + + /** + * Returns the interface to interact with the Spot Trading WebSocket (private channel) API of + * KuCoin. + * + * @return SpotPrivateWs + */ + @Override + public SpotPrivateWs newSpotPrivateWS() { + DefaultWsService wsService = + new DefaultWsService(clientOption, Constants.DOMAIN_TYPE_SPOT, true, Version.SDK_VERSION); + return new SpotPrivateWsImpl(wsService); + } + + /** + * Returns the interface to interact with the Margin Trading WebSocket (public channel) API of + * KuCoin. + * + * @return MarginPublicWs + */ + @Override + public MarginPublicWs newMarginPublicWS() { + DefaultWsService wsService = + new DefaultWsService(clientOption, Constants.DOMAIN_TYPE_SPOT, false, Version.SDK_VERSION); + return new MarginPublicWsImpl(wsService); + } + + /** + * Returns the interface to interact with the Margin Trading WebSocket (private channel) API of + * KuCoin. + * + * @return MarginPrivateWs + */ + @Override + public MarginPrivateWs newMarginPrivateWS() { + DefaultWsService wsService = + new DefaultWsService(clientOption, Constants.DOMAIN_TYPE_SPOT, true, Version.SDK_VERSION); + return new MarginPrivateWsImpl(wsService); + } + + /** + * Returns the interface to interact with the Futures Trading WebSocket (public channel) API of + * KuCoin. + * + * @return FuturesPublicWs + */ + @Override + public FuturesPublicWs newFuturesPublicWS() { + DefaultWsService wsService = + new DefaultWsService( + clientOption, Constants.DOMAIN_TYPE_FUTURES, false, Version.SDK_VERSION); + return new FuturesPublicWsImpl(wsService); + } + + /** + * Returns the interface to interact with the Futures Trading WebSocket (private channel) API of + * KuCoin. + * + * @return FuturesPrivateWs + */ + @Override + public FuturesPrivateWs newFuturesPrivateWS() { + DefaultWsService wsService = + new DefaultWsService( + clientOption, Constants.DOMAIN_TYPE_FUTURES, true, Version.SDK_VERSION); + return new FuturesPrivateWsImpl(wsService); + } +} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestError.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestError.java index c9a9af0d..05aaf6fb 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestError.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestError.java @@ -4,7 +4,7 @@ /** Exception representing a REST API error. */ @Getter -public class RestError extends Exception { +public class RestError extends RuntimeException { private final RestResponse response; private final Throwable cause; diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java index 328f9afb..4a5d363e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/RestResponse.java @@ -23,6 +23,11 @@ public class RestResponse { private RestRateLimit rateLimit; public void checkError() throws RestError { - // TODO + if (!code.equalsIgnoreCase(Constants.RESULT_CODE_SUCCESS)) { + throw new RestError( + this, + new Exception( + String.format("Server returned an error, code: %s, msg: %s", code, message))); + } } } From a4bdd5cd3134f7e06f791d5c8a3e7519899c3a8e Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Mon, 14 Jul 2025 14:49:29 +0800 Subject: [PATCH 18/39] feat(java): update test template --- .../java-sdk/api_test_template.mustache | 15 +- .../com/kucoin/universal/sdk/api/Client.java | 4 +- .../universal/sdk/api/DefaultClient.java | 4 +- .../universal/sdk/generate/Version.java | 2 +- .../account/account/AccountApi.template | 399 ++-- .../account/deposit/DepositApi.template | 189 +- .../sdk/generate/account/fee/FeeApi.template | 45 +- .../account/subaccount/SubAccountApi.template | 337 ++-- .../account/transfer/TransferApi.template | 133 +- .../account/withdrawal/WithdrawalApi.template | 201 +- .../affiliate/affiliate/AffiliateApi.template | 37 +- .../broker/apibroker/APIBrokerApi.template | 9 +- .../broker/ndbroker/NDBrokerApi.template | 350 ++-- .../copytrading/futures/FuturesApi.template | 181 +- .../sdk/generate/earn/earn/EarnApi.template | 383 ++-- .../fundingfees/FundingFeesApi.template | 77 +- .../futures/market/MarketApi.template | 595 +++--- .../generate/futures/order/OrderApi.template | 716 +++---- .../futures/positions/PositionsApi.template | 502 ++--- .../generate/margin/credit/CreditApi.template | 143 +- .../generate/margin/debit/DebitApi.template | 134 +- .../generate/margin/market/MarketApi.template | 154 +- .../generate/margin/order/OrderApi.template | 487 ++--- .../margin/risklimit/RiskLimitApi.template | 71 +- .../generate/spot/market/MarketApi.template | 583 +++--- .../sdk/generate/spot/order/OrderApi.template | 1659 +++++++++-------- .../viplending/VIPLendingApi.template | 83 +- .../sdk/e2e/rest/account/AccountApiTest.java | 43 + 28 files changed, 3915 insertions(+), 3621 deletions(-) create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/account/AccountApiTest.java diff --git a/generator/plugin/src/main/resources/java-sdk/api_test_template.mustache b/generator/plugin/src/main/resources/java-sdk/api_test_template.mustache index a172b98b..079769af 100644 --- a/generator/plugin/src/main/resources/java-sdk/api_test_template.mustache +++ b/generator/plugin/src/main/resources/java-sdk/api_test_template.mustache @@ -6,7 +6,8 @@ * {{summary}} * {{path}} */ - public void test{{vendorExtensions.x-meta.methodServiceFmt}}() { + @Test + public void test{{vendorExtensions.x-meta.methodServiceFmt}}() throws Exception { {{#hasParams}} {{vendorExtensions.x-meta.methodServiceFmt}}Req.{{vendorExtensions.x-meta.methodServiceFmt}}ReqBuilder builder = {{vendorExtensions.x-meta.methodServiceFmt}}Req.builder(); {{#vendorExtensions.x-request-model}} @@ -14,24 +15,24 @@ {{/vendorExtensions.x-request-model}} {{vendorExtensions.x-meta.methodServiceFmt}}Req req = builder.build(); {{/hasParams}} - {{vendorExtensions.x-meta.methodServiceFmt}}Resp resp = this.api.{{vendorExtensions.x-meta.method}}({{#hasParams}}req{{/hasParams}}); + {{vendorExtensions.x-meta.methodServiceFmt}}Resp resp = api.{{vendorExtensions.x-meta.method}}({{#hasParams}}req{{/hasParams}}); {{#vendorExtensions.x-response-model}} {{#vars}} {{#isArray}} - foreach($resp->{{name}} as $item) { + resp.{{getter}}().forEach( item -> { {{#vendorExtensions.x-response-inner-model}} {{#vars}} - self::assertNotNull($item->{{name}}); + Assertions.assertNotNull(item.{{getter}}()); {{/vars}} {{/vendorExtensions.x-response-inner-model}} - } + }); {{/isArray}} {{^isArray}} - self::assertNotNull($resp->{{name}}); + Assertions.assertNotNull(resp.{{getter}}()); {{/isArray}} {{/vars}} - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); {{/vendorExtensions.x-response-model}} } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/api/Client.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/Client.java index 7b6b9c57..6c200b06 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/api/Client.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/Client.java @@ -8,12 +8,12 @@ public interface Client { * * @return KucoinRestService */ - KucoinRestService restService(); + KucoinRestService getRestService(); /** * Get WebSocket service. * * @return KucoinWSService */ - KucoinWSService wsService(); + KucoinWSService getWsService(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultClient.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultClient.java index 128410a6..f1c82219 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultClient.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultClient.java @@ -24,12 +24,12 @@ public DefaultClient(ClientOption option) { } @Override - public KucoinRestService restService() { + public KucoinRestService getRestService() { return restImpl; } @Override - public KucoinWSService wsService() { + public KucoinWSService getWsService() { return wsImpl; } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java index 79a23817..e30d8442 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java @@ -2,5 +2,5 @@ public class Version { public static final String SDK_VERSION = "0.1.0-alpha"; - public static final String SDK_GENERATE_DATE = "2025-07-09"; + public static final String SDK_GENERATE_DATE = "2025-07-14"; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.template index 1352f9d2..75176626 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/AccountApi.template @@ -4,21 +4,22 @@ * Get Account Summary Info * /api/v2/user-info */ - public void testGetAccountInfo() { - GetAccountInfoResp resp = this.api.getAccountInfo(); - self::assertNotNull($resp->level); - self::assertNotNull($resp->subQuantity); - self::assertNotNull($resp->spotSubQuantity); - self::assertNotNull($resp->marginSubQuantity); - self::assertNotNull($resp->futuresSubQuantity); - self::assertNotNull($resp->optionSubQuantity); - self::assertNotNull($resp->maxSubQuantity); - self::assertNotNull($resp->maxDefaultSubQuantity); - self::assertNotNull($resp->maxSpotSubQuantity); - self::assertNotNull($resp->maxMarginSubQuantity); - self::assertNotNull($resp->maxFuturesSubQuantity); - self::assertNotNull($resp->maxOptionSubQuantity); - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetAccountInfo() throws Exception { + GetAccountInfoResp resp = api.getAccountInfo(); + Assertions.assertNotNull(resp.getLevel()); + Assertions.assertNotNull(resp.getSubQuantity()); + Assertions.assertNotNull(resp.getSpotSubQuantity()); + Assertions.assertNotNull(resp.getMarginSubQuantity()); + Assertions.assertNotNull(resp.getFuturesSubQuantity()); + Assertions.assertNotNull(resp.getOptionSubQuantity()); + Assertions.assertNotNull(resp.getMaxSubQuantity()); + Assertions.assertNotNull(resp.getMaxDefaultSubQuantity()); + Assertions.assertNotNull(resp.getMaxSpotSubQuantity()); + Assertions.assertNotNull(resp.getMaxMarginSubQuantity()); + Assertions.assertNotNull(resp.getMaxFuturesSubQuantity()); + Assertions.assertNotNull(resp.getMaxOptionSubQuantity()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -26,18 +27,19 @@ * Get Apikey Info * /api/v1/user/api-key */ - public void testGetApikeyInfo() { - GetApikeyInfoResp resp = this.api.getApikeyInfo(); - self::assertNotNull($resp->remark); - self::assertNotNull($resp->apiKey); - self::assertNotNull($resp->apiVersion); - self::assertNotNull($resp->permission); - self::assertNotNull($resp->ipWhitelist); - self::assertNotNull($resp->createdAt); - self::assertNotNull($resp->uid); - self::assertNotNull($resp->isMaster); - self::assertNotNull($resp->subName); - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetApikeyInfo() throws Exception { + GetApikeyInfoResp resp = api.getApikeyInfo(); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getApiKey()); + Assertions.assertNotNull(resp.getApiVersion()); + Assertions.assertNotNull(resp.getPermission()); + Assertions.assertNotNull(resp.getIpWhitelist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getUid()); + Assertions.assertNotNull(resp.getIsMaster()); + Assertions.assertNotNull(resp.getSubName()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -45,10 +47,11 @@ * Get Account Type - Spot * /api/v1/hf/accounts/opened */ - public void testGetSpotAccountType() { - GetSpotAccountTypeResp resp = this.api.getSpotAccountType(); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetSpotAccountType() throws Exception { + GetSpotAccountTypeResp resp = api.getSpotAccountType(); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -56,21 +59,22 @@ * Get Account List - Spot * /api/v1/accounts */ - public void testGetSpotAccountList() { + @Test + public void testGetSpotAccountList() throws Exception { GetSpotAccountListReq.GetSpotAccountListReqBuilder builder = GetSpotAccountListReq.builder(); builder.currency(?).type(?); GetSpotAccountListReq req = builder.build(); - GetSpotAccountListResp resp = this.api.getSpotAccountList(req); - foreach($resp->data as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->currency); - self::assertNotNull($item->type); - self::assertNotNull($item->balance); - self::assertNotNull($item->available); - self::assertNotNull($item->holds); - } + GetSpotAccountListResp resp = api.getSpotAccountList(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getBalance()); + Assertions.assertNotNull(item.getAvailable()); + Assertions.assertNotNull(item.getHolds()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -78,16 +82,17 @@ * Get Account Detail - Spot * /api/v1/accounts/{accountId} */ - public void testGetSpotAccountDetail() { + @Test + public void testGetSpotAccountDetail() throws Exception { GetSpotAccountDetailReq.GetSpotAccountDetailReqBuilder builder = GetSpotAccountDetailReq.builder(); builder.accountId(?); GetSpotAccountDetailReq req = builder.build(); - GetSpotAccountDetailResp resp = this.api.getSpotAccountDetail(req); - self::assertNotNull($resp->currency); - self::assertNotNull($resp->balance); - self::assertNotNull($resp->available); - self::assertNotNull($resp->holds); - Logger::info($resp->jsonSerialize($this->serializer)); + GetSpotAccountDetailResp resp = api.getSpotAccountDetail(req); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getBalance()); + Assertions.assertNotNull(resp.getAvailable()); + Assertions.assertNotNull(resp.getHolds()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -95,29 +100,30 @@ * Get Account - Cross Margin * /api/v3/margin/accounts */ - public void testGetCrossMarginAccount() { + @Test + public void testGetCrossMarginAccount() throws Exception { GetCrossMarginAccountReq.GetCrossMarginAccountReqBuilder builder = GetCrossMarginAccountReq.builder(); builder.quoteCurrency(?).queryType(?); GetCrossMarginAccountReq req = builder.build(); - GetCrossMarginAccountResp resp = this.api.getCrossMarginAccount(req); - self::assertNotNull($resp->totalAssetOfQuoteCurrency); - self::assertNotNull($resp->totalLiabilityOfQuoteCurrency); - self::assertNotNull($resp->debtRatio); - self::assertNotNull($resp->status); - foreach($resp->accounts as $item) { - self::assertNotNull($item->currency); - self::assertNotNull($item->total); - self::assertNotNull($item->available); - self::assertNotNull($item->hold); - self::assertNotNull($item->liability); - self::assertNotNull($item->maxBorrowSize); - self::assertNotNull($item->borrowEnabled); - self::assertNotNull($item->transferInEnabled); - self::assertNotNull($item->liabilityPrincipal); - self::assertNotNull($item->liabilityInterest); - } + GetCrossMarginAccountResp resp = api.getCrossMarginAccount(req); + Assertions.assertNotNull(resp.getTotalAssetOfQuoteCurrency()); + Assertions.assertNotNull(resp.getTotalLiabilityOfQuoteCurrency()); + Assertions.assertNotNull(resp.getDebtRatio()); + Assertions.assertNotNull(resp.getStatus()); + resp.getAccounts().forEach( item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getTotal()); + Assertions.assertNotNull(item.getAvailable()); + Assertions.assertNotNull(item.getHold()); + Assertions.assertNotNull(item.getLiability()); + Assertions.assertNotNull(item.getMaxBorrowSize()); + Assertions.assertNotNull(item.getBorrowEnabled()); + Assertions.assertNotNull(item.getTransferInEnabled()); + Assertions.assertNotNull(item.getLiabilityPrincipal()); + Assertions.assertNotNull(item.getLiabilityInterest()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -125,23 +131,24 @@ * Get Account - Isolated Margin * /api/v3/isolated/accounts */ - public void testGetIsolatedMarginAccount() { + @Test + public void testGetIsolatedMarginAccount() throws Exception { GetIsolatedMarginAccountReq.GetIsolatedMarginAccountReqBuilder builder = GetIsolatedMarginAccountReq.builder(); builder.symbol(?).quoteCurrency(?).queryType(?); GetIsolatedMarginAccountReq req = builder.build(); - GetIsolatedMarginAccountResp resp = this.api.getIsolatedMarginAccount(req); - self::assertNotNull($resp->totalAssetOfQuoteCurrency); - self::assertNotNull($resp->totalLiabilityOfQuoteCurrency); - self::assertNotNull($resp->timestamp); - foreach($resp->assets as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->status); - self::assertNotNull($item->debtRatio); - self::assertNotNull($item->baseAsset); - self::assertNotNull($item->quoteAsset); - } + GetIsolatedMarginAccountResp resp = api.getIsolatedMarginAccount(req); + Assertions.assertNotNull(resp.getTotalAssetOfQuoteCurrency()); + Assertions.assertNotNull(resp.getTotalLiabilityOfQuoteCurrency()); + Assertions.assertNotNull(resp.getTimestamp()); + resp.getAssets().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getDebtRatio()); + Assertions.assertNotNull(item.getBaseAsset()); + Assertions.assertNotNull(item.getQuoteAsset()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -149,22 +156,23 @@ * Get Account - Futures * /api/v1/account-overview */ - public void testGetFuturesAccount() { + @Test + public void testGetFuturesAccount() throws Exception { GetFuturesAccountReq.GetFuturesAccountReqBuilder builder = GetFuturesAccountReq.builder(); builder.currency(?); GetFuturesAccountReq req = builder.build(); - GetFuturesAccountResp resp = this.api.getFuturesAccount(req); - self::assertNotNull($resp->accountEquity); - self::assertNotNull($resp->unrealisedPNL); - self::assertNotNull($resp->marginBalance); - self::assertNotNull($resp->positionMargin); - self::assertNotNull($resp->orderMargin); - self::assertNotNull($resp->frozenFunds); - self::assertNotNull($resp->availableBalance); - self::assertNotNull($resp->currency); - self::assertNotNull($resp->riskRatio); - self::assertNotNull($resp->maxWithdrawAmount); - Logger::info($resp->jsonSerialize($this->serializer)); + GetFuturesAccountResp resp = api.getFuturesAccount(req); + Assertions.assertNotNull(resp.getAccountEquity()); + Assertions.assertNotNull(resp.getUnrealisedPNL()); + Assertions.assertNotNull(resp.getMarginBalance()); + Assertions.assertNotNull(resp.getPositionMargin()); + Assertions.assertNotNull(resp.getOrderMargin()); + Assertions.assertNotNull(resp.getFrozenFunds()); + Assertions.assertNotNull(resp.getAvailableBalance()); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getRiskRatio()); + Assertions.assertNotNull(resp.getMaxWithdrawAmount()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -172,29 +180,30 @@ * Get Account Ledgers - Spot/Margin * /api/v1/accounts/ledgers */ - public void testGetSpotLedger() { + @Test + public void testGetSpotLedger() throws Exception { GetSpotLedgerReq.GetSpotLedgerReqBuilder builder = GetSpotLedgerReq.builder(); builder.currency(?).direction(?).bizType(?).startAt(?).endAt(?).currentPage(?).pageSize(?); GetSpotLedgerReq req = builder.build(); - GetSpotLedgerResp resp = this.api.getSpotLedger(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->currency); - self::assertNotNull($item->amount); - self::assertNotNull($item->fee); - self::assertNotNull($item->balance); - self::assertNotNull($item->accountType); - self::assertNotNull($item->bizType); - self::assertNotNull($item->direction); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->context); - } + GetSpotLedgerResp resp = api.getSpotLedger(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getBalance()); + Assertions.assertNotNull(item.getAccountType()); + Assertions.assertNotNull(item.getBizType()); + Assertions.assertNotNull(item.getDirection()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getContext()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -202,26 +211,27 @@ * Get Account Ledgers - Trade_hf * /api/v1/hf/accounts/ledgers */ - public void testGetSpotHFLedger() { + @Test + public void testGetSpotHFLedger() throws Exception { GetSpotHFLedgerReq.GetSpotHFLedgerReqBuilder builder = GetSpotHFLedgerReq.builder(); builder.currency(?).direction(?).bizType(?).lastId(?).limit(?).startAt(?).endAt(?); GetSpotHFLedgerReq req = builder.build(); - GetSpotHFLedgerResp resp = this.api.getSpotHFLedger(req); - foreach($resp->data as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->currency); - self::assertNotNull($item->amount); - self::assertNotNull($item->fee); - self::assertNotNull($item->tax); - self::assertNotNull($item->balance); - self::assertNotNull($item->accountType); - self::assertNotNull($item->bizType); - self::assertNotNull($item->direction); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->context); - } + GetSpotHFLedgerResp resp = api.getSpotHFLedger(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getBalance()); + Assertions.assertNotNull(item.getAccountType()); + Assertions.assertNotNull(item.getBizType()); + Assertions.assertNotNull(item.getDirection()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getContext()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -229,26 +239,27 @@ * Get Account Ledgers - Margin_hf * /api/v3/hf/margin/account/ledgers */ - public void testGetMarginHFLedger() { + @Test + public void testGetMarginHFLedger() throws Exception { GetMarginHFLedgerReq.GetMarginHFLedgerReqBuilder builder = GetMarginHFLedgerReq.builder(); builder.currency(?).direction(?).bizType(?).lastId(?).limit(?).startAt(?).endAt(?); GetMarginHFLedgerReq req = builder.build(); - GetMarginHFLedgerResp resp = this.api.getMarginHFLedger(req); - foreach($resp->data as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->currency); - self::assertNotNull($item->amount); - self::assertNotNull($item->fee); - self::assertNotNull($item->balance); - self::assertNotNull($item->accountType); - self::assertNotNull($item->bizType); - self::assertNotNull($item->direction); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->context); - self::assertNotNull($item->tax); - } + GetMarginHFLedgerResp resp = api.getMarginHFLedger(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getBalance()); + Assertions.assertNotNull(item.getAccountType()); + Assertions.assertNotNull(item.getBizType()); + Assertions.assertNotNull(item.getDirection()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getContext()); + Assertions.assertNotNull(item.getTax()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -256,25 +267,26 @@ * Get Account Ledgers - Futures * /api/v1/transaction-history */ - public void testGetFuturesLedger() { + @Test + public void testGetFuturesLedger() throws Exception { GetFuturesLedgerReq.GetFuturesLedgerReqBuilder builder = GetFuturesLedgerReq.builder(); builder.currency(?).type(?).offset(?).forward(?).maxCount(?).startAt(?).endAt(?); GetFuturesLedgerReq req = builder.build(); - GetFuturesLedgerResp resp = this.api.getFuturesLedger(req); - foreach($resp->dataList as $item) { - self::assertNotNull($item->time); - self::assertNotNull($item->type); - self::assertNotNull($item->amount); - self::assertNotNull($item->fee); - self::assertNotNull($item->accountEquity); - self::assertNotNull($item->status); - self::assertNotNull($item->remark); - self::assertNotNull($item->offset); - self::assertNotNull($item->currency); - } + GetFuturesLedgerResp resp = api.getFuturesLedger(req); + resp.getDataList().forEach( item -> { + Assertions.assertNotNull(item.getTime()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getAccountEquity()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getOffset()); + Assertions.assertNotNull(item.getCurrency()); + }); - self::assertNotNull($resp->hasMore); - Logger::info($resp->jsonSerialize($this->serializer)); + Assertions.assertNotNull(resp.getHasMore()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -282,19 +294,20 @@ * Get Account Detail - Margin * /api/v1/margin/account */ - public void testGetMarginAccountDetail() { - GetMarginAccountDetailResp resp = this.api.getMarginAccountDetail(); - self::assertNotNull($resp->debtRatio); - foreach($resp->accounts as $item) { - self::assertNotNull($item->currency); - self::assertNotNull($item->totalBalance); - self::assertNotNull($item->availableBalance); - self::assertNotNull($item->holdBalance); - self::assertNotNull($item->liability); - self::assertNotNull($item->maxBorrowSize); - } + @Test + public void testGetMarginAccountDetail() throws Exception { + GetMarginAccountDetailResp resp = api.getMarginAccountDetail(); + Assertions.assertNotNull(resp.getDebtRatio()); + resp.getAccounts().forEach( item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getTotalBalance()); + Assertions.assertNotNull(item.getAvailableBalance()); + Assertions.assertNotNull(item.getHoldBalance()); + Assertions.assertNotNull(item.getLiability()); + Assertions.assertNotNull(item.getMaxBorrowSize()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -302,22 +315,23 @@ * Get Account List - Isolated Margin - V1 * /api/v1/isolated/accounts */ - public void testGetIsolatedMarginAccountListV1() { + @Test + public void testGetIsolatedMarginAccountListV1() throws Exception { GetIsolatedMarginAccountListV1Req.GetIsolatedMarginAccountListV1ReqBuilder builder = GetIsolatedMarginAccountListV1Req.builder(); builder.balanceCurrency(?); GetIsolatedMarginAccountListV1Req req = builder.build(); - GetIsolatedMarginAccountListV1Resp resp = this.api.getIsolatedMarginAccountListV1(req); - self::assertNotNull($resp->totalConversionBalance); - self::assertNotNull($resp->liabilityConversionBalance); - foreach($resp->assets as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->status); - self::assertNotNull($item->debtRatio); - self::assertNotNull($item->baseAsset); - self::assertNotNull($item->quoteAsset); - } + GetIsolatedMarginAccountListV1Resp resp = api.getIsolatedMarginAccountListV1(req); + Assertions.assertNotNull(resp.getTotalConversionBalance()); + Assertions.assertNotNull(resp.getLiabilityConversionBalance()); + resp.getAssets().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getDebtRatio()); + Assertions.assertNotNull(item.getBaseAsset()); + Assertions.assertNotNull(item.getQuoteAsset()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -325,16 +339,17 @@ * Get Account Detail - Isolated Margin - V1 * /api/v1/isolated/account/{symbol} */ - public void testGetIsolatedMarginAccountDetailV1() { + @Test + public void testGetIsolatedMarginAccountDetailV1() throws Exception { GetIsolatedMarginAccountDetailV1Req.GetIsolatedMarginAccountDetailV1ReqBuilder builder = GetIsolatedMarginAccountDetailV1Req.builder(); builder.symbol(?); GetIsolatedMarginAccountDetailV1Req req = builder.build(); - GetIsolatedMarginAccountDetailV1Resp resp = this.api.getIsolatedMarginAccountDetailV1(req); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->status); - self::assertNotNull($resp->debtRatio); - self::assertNotNull($resp->baseAsset); - self::assertNotNull($resp->quoteAsset); - Logger::info($resp->jsonSerialize($this->serializer)); + GetIsolatedMarginAccountDetailV1Resp resp = api.getIsolatedMarginAccountDetailV1(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getDebtRatio()); + Assertions.assertNotNull(resp.getBaseAsset()); + Assertions.assertNotNull(resp.getQuoteAsset()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.template index 937e5fea..1c1fe8f7 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/DepositApi.template @@ -4,19 +4,20 @@ * Add Deposit Address (V3) * /api/v3/deposit-address/create */ - public void testAddDepositAddressV3() { + @Test + public void testAddDepositAddressV3() throws Exception { AddDepositAddressV3Req.AddDepositAddressV3ReqBuilder builder = AddDepositAddressV3Req.builder(); builder.currency(?).chain(?).to(?).amount(?); AddDepositAddressV3Req req = builder.build(); - AddDepositAddressV3Resp resp = this.api.addDepositAddressV3(req); - self::assertNotNull($resp->address); - self::assertNotNull($resp->memo); - self::assertNotNull($resp->chainId); - self::assertNotNull($resp->to); - self::assertNotNull($resp->expirationDate); - self::assertNotNull($resp->currency); - self::assertNotNull($resp->chainName); - Logger::info($resp->jsonSerialize($this->serializer)); + AddDepositAddressV3Resp resp = api.addDepositAddressV3(req); + Assertions.assertNotNull(resp.getAddress()); + Assertions.assertNotNull(resp.getMemo()); + Assertions.assertNotNull(resp.getChainId()); + Assertions.assertNotNull(resp.getTo()); + Assertions.assertNotNull(resp.getExpirationDate()); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getChainName()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -24,23 +25,24 @@ * Get Deposit Address (V3) * /api/v3/deposit-addresses */ - public void testGetDepositAddressV3() { + @Test + public void testGetDepositAddressV3() throws Exception { GetDepositAddressV3Req.GetDepositAddressV3ReqBuilder builder = GetDepositAddressV3Req.builder(); builder.currency(?).amount(?).chain(?); GetDepositAddressV3Req req = builder.build(); - GetDepositAddressV3Resp resp = this.api.getDepositAddressV3(req); - foreach($resp->data as $item) { - self::assertNotNull($item->address); - self::assertNotNull($item->memo); - self::assertNotNull($item->chainId); - self::assertNotNull($item->to); - self::assertNotNull($item->expirationDate); - self::assertNotNull($item->currency); - self::assertNotNull($item->contractAddress); - self::assertNotNull($item->chainName); - } + GetDepositAddressV3Resp resp = api.getDepositAddressV3(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getAddress()); + Assertions.assertNotNull(item.getMemo()); + Assertions.assertNotNull(item.getChainId()); + Assertions.assertNotNull(item.getTo()); + Assertions.assertNotNull(item.getExpirationDate()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getContractAddress()); + Assertions.assertNotNull(item.getChainName()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -48,32 +50,33 @@ * Get Deposit History * /api/v1/deposits */ - public void testGetDepositHistory() { + @Test + public void testGetDepositHistory() throws Exception { GetDepositHistoryReq.GetDepositHistoryReqBuilder builder = GetDepositHistoryReq.builder(); builder.currency(?).status(?).startAt(?).endAt(?).currentPage(?).pageSize(?); GetDepositHistoryReq req = builder.build(); - GetDepositHistoryResp resp = this.api.getDepositHistory(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->currency); - self::assertNotNull($item->chain); - self::assertNotNull($item->status); - self::assertNotNull($item->address); - self::assertNotNull($item->memo); - self::assertNotNull($item->isInner); - self::assertNotNull($item->amount); - self::assertNotNull($item->fee); - self::assertNotNull($item->walletTxId); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->updatedAt); - self::assertNotNull($item->remark); - self::assertNotNull($item->arrears); - } + GetDepositHistoryResp resp = api.getDepositHistory(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getChain()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getAddress()); + Assertions.assertNotNull(item.getMemo()); + Assertions.assertNotNull(item.getIsInner()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getWalletTxId()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getUpdatedAt()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getArrears()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -81,22 +84,23 @@ * Get Deposit Addresses (V2) * /api/v2/deposit-addresses */ - public void testGetDepositAddressV2() { + @Test + public void testGetDepositAddressV2() throws Exception { GetDepositAddressV2Req.GetDepositAddressV2ReqBuilder builder = GetDepositAddressV2Req.builder(); builder.currency(?).chain(?); GetDepositAddressV2Req req = builder.build(); - GetDepositAddressV2Resp resp = this.api.getDepositAddressV2(req); - foreach($resp->data as $item) { - self::assertNotNull($item->address); - self::assertNotNull($item->memo); - self::assertNotNull($item->chain); - self::assertNotNull($item->chainId); - self::assertNotNull($item->to); - self::assertNotNull($item->currency); - self::assertNotNull($item->contractAddress); - } + GetDepositAddressV2Resp resp = api.getDepositAddressV2(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getAddress()); + Assertions.assertNotNull(item.getMemo()); + Assertions.assertNotNull(item.getChain()); + Assertions.assertNotNull(item.getChainId()); + Assertions.assertNotNull(item.getTo()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getContractAddress()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -104,19 +108,20 @@ * Get Deposit Addresses - V1 * /api/v1/deposit-addresses */ - public void testGetDepositAddressV1() { + @Test + public void testGetDepositAddressV1() throws Exception { GetDepositAddressV1Req.GetDepositAddressV1ReqBuilder builder = GetDepositAddressV1Req.builder(); builder.currency(?).chain(?); GetDepositAddressV1Req req = builder.build(); - GetDepositAddressV1Resp resp = this.api.getDepositAddressV1(req); - self::assertNotNull($resp->address); - self::assertNotNull($resp->memo); - self::assertNotNull($resp->chain); - self::assertNotNull($resp->chainId); - self::assertNotNull($resp->to); - self::assertNotNull($resp->currency); - self::assertNotNull($resp->contractAddress); - Logger::info($resp->jsonSerialize($this->serializer)); + GetDepositAddressV1Resp resp = api.getDepositAddressV1(req); + Assertions.assertNotNull(resp.getAddress()); + Assertions.assertNotNull(resp.getMemo()); + Assertions.assertNotNull(resp.getChain()); + Assertions.assertNotNull(resp.getChainId()); + Assertions.assertNotNull(resp.getTo()); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getContractAddress()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -124,25 +129,26 @@ * Get Deposit History - Old * /api/v1/hist-deposits */ - public void testGetDepositHistoryOld() { + @Test + public void testGetDepositHistoryOld() throws Exception { GetDepositHistoryOldReq.GetDepositHistoryOldReqBuilder builder = GetDepositHistoryOldReq.builder(); builder.currency(?).status(?).startAt(?).endAt(?); GetDepositHistoryOldReq req = builder.build(); - GetDepositHistoryOldResp resp = this.api.getDepositHistoryOld(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->currency); - self::assertNotNull($item->createAt); - self::assertNotNull($item->amount); - self::assertNotNull($item->walletTxId); - self::assertNotNull($item->isInner); - self::assertNotNull($item->status); - } + GetDepositHistoryOldResp resp = api.getDepositHistoryOld(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getCreateAt()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getWalletTxId()); + Assertions.assertNotNull(item.getIsInner()); + Assertions.assertNotNull(item.getStatus()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -150,17 +156,18 @@ * Add Deposit Address - V1 * /api/v1/deposit-addresses */ - public void testAddDepositAddressV1() { + @Test + public void testAddDepositAddressV1() throws Exception { AddDepositAddressV1Req.AddDepositAddressV1ReqBuilder builder = AddDepositAddressV1Req.builder(); builder.currency(?).chain(?).to(?); AddDepositAddressV1Req req = builder.build(); - AddDepositAddressV1Resp resp = this.api.addDepositAddressV1(req); - self::assertNotNull($resp->address); - self::assertNotNull($resp->memo); - self::assertNotNull($resp->chain); - self::assertNotNull($resp->chainId); - self::assertNotNull($resp->to); - self::assertNotNull($resp->currency); - Logger::info($resp->jsonSerialize($this->serializer)); + AddDepositAddressV1Resp resp = api.addDepositAddressV1(req); + Assertions.assertNotNull(resp.getAddress()); + Assertions.assertNotNull(resp.getMemo()); + Assertions.assertNotNull(resp.getChain()); + Assertions.assertNotNull(resp.getChainId()); + Assertions.assertNotNull(resp.getTo()); + Assertions.assertNotNull(resp.getCurrency()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApi.template index 7da22d02..e02930ad 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/FeeApi.template @@ -4,14 +4,15 @@ * Get Basic Fee - Spot/Margin * /api/v1/base-fee */ - public void testGetBasicFee() { + @Test + public void testGetBasicFee() throws Exception { GetBasicFeeReq.GetBasicFeeReqBuilder builder = GetBasicFeeReq.builder(); builder.currencyType(?); GetBasicFeeReq req = builder.build(); - GetBasicFeeResp resp = this.api.getBasicFee(req); - self::assertNotNull($resp->takerFeeRate); - self::assertNotNull($resp->makerFeeRate); - Logger::info($resp->jsonSerialize($this->serializer)); + GetBasicFeeResp resp = api.getBasicFee(req); + Assertions.assertNotNull(resp.getTakerFeeRate()); + Assertions.assertNotNull(resp.getMakerFeeRate()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -19,20 +20,21 @@ * Get Actual Fee - Spot/Margin * /api/v1/trade-fees */ - public void testGetSpotActualFee() { + @Test + public void testGetSpotActualFee() throws Exception { GetSpotActualFeeReq.GetSpotActualFeeReqBuilder builder = GetSpotActualFeeReq.builder(); builder.symbols(?); GetSpotActualFeeReq req = builder.build(); - GetSpotActualFeeResp resp = this.api.getSpotActualFee(req); - foreach($resp->data as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->takerFeeRate); - self::assertNotNull($item->makerFeeRate); - self::assertNotNull($item->sellTaxRate); - self::assertNotNull($item->buyTaxRate); - } + GetSpotActualFeeResp resp = api.getSpotActualFee(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTakerFeeRate()); + Assertions.assertNotNull(item.getMakerFeeRate()); + Assertions.assertNotNull(item.getSellTaxRate()); + Assertions.assertNotNull(item.getBuyTaxRate()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -40,14 +42,15 @@ * Get Actual Fee - Futures * /api/v1/trade-fees */ - public void testGetFuturesActualFee() { + @Test + public void testGetFuturesActualFee() throws Exception { GetFuturesActualFeeReq.GetFuturesActualFeeReqBuilder builder = GetFuturesActualFeeReq.builder(); builder.symbol(?); GetFuturesActualFeeReq req = builder.build(); - GetFuturesActualFeeResp resp = this.api.getFuturesActualFee(req); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->takerFeeRate); - self::assertNotNull($resp->makerFeeRate); - Logger::info($resp->jsonSerialize($this->serializer)); + GetFuturesActualFeeResp resp = api.getFuturesActualFee(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getTakerFeeRate()); + Assertions.assertNotNull(resp.getMakerFeeRate()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.template index 1a19f14d..4852a31c 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/SubAccountApi.template @@ -4,16 +4,17 @@ * Add sub-account * /api/v2/sub/user/created */ - public void testAddSubAccount() { + @Test + public void testAddSubAccount() throws Exception { AddSubAccountReq.AddSubAccountReqBuilder builder = AddSubAccountReq.builder(); builder.password(?).remarks(?).subName(?).access(?); AddSubAccountReq req = builder.build(); - AddSubAccountResp resp = this.api.addSubAccount(req); - self::assertNotNull($resp->uid); - self::assertNotNull($resp->subName); - self::assertNotNull($resp->remarks); - self::assertNotNull($resp->access); - Logger::info($resp->jsonSerialize($this->serializer)); + AddSubAccountResp resp = api.addSubAccount(req); + Assertions.assertNotNull(resp.getUid()); + Assertions.assertNotNull(resp.getSubName()); + Assertions.assertNotNull(resp.getRemarks()); + Assertions.assertNotNull(resp.getAccess()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -21,13 +22,14 @@ * Add sub-account Margin Permission * /api/v3/sub/user/margin/enable */ - public void testAddSubAccountMarginPermission() { + @Test + public void testAddSubAccountMarginPermission() throws Exception { AddSubAccountMarginPermissionReq.AddSubAccountMarginPermissionReqBuilder builder = AddSubAccountMarginPermissionReq.builder(); builder.uid(?); AddSubAccountMarginPermissionReq req = builder.build(); - AddSubAccountMarginPermissionResp resp = this.api.addSubAccountMarginPermission(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + AddSubAccountMarginPermissionResp resp = api.addSubAccountMarginPermission(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -35,13 +37,14 @@ * Add sub-account Futures Permission * /api/v3/sub/user/futures/enable */ - public void testAddSubAccountFuturesPermission() { + @Test + public void testAddSubAccountFuturesPermission() throws Exception { AddSubAccountFuturesPermissionReq.AddSubAccountFuturesPermissionReqBuilder builder = AddSubAccountFuturesPermissionReq.builder(); builder.uid(?); AddSubAccountFuturesPermissionReq req = builder.build(); - AddSubAccountFuturesPermissionResp resp = this.api.addSubAccountFuturesPermission(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + AddSubAccountFuturesPermissionResp resp = api.addSubAccountFuturesPermission(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -49,30 +52,31 @@ * Get sub-account List - Summary Info * /api/v2/sub/user */ - public void testGetSpotSubAccountsSummaryV2() { + @Test + public void testGetSpotSubAccountsSummaryV2() throws Exception { GetSpotSubAccountsSummaryV2Req.GetSpotSubAccountsSummaryV2ReqBuilder builder = GetSpotSubAccountsSummaryV2Req.builder(); builder.currentPage(?).pageSize(?); GetSpotSubAccountsSummaryV2Req req = builder.build(); - GetSpotSubAccountsSummaryV2Resp resp = this.api.getSpotSubAccountsSummaryV2(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->userId); - self::assertNotNull($item->uid); - self::assertNotNull($item->subName); - self::assertNotNull($item->status); - self::assertNotNull($item->type); - self::assertNotNull($item->access); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->remarks); - self::assertNotNull($item->tradeTypes); - self::assertNotNull($item->openedTradeTypes); - self::assertNotNull($item->hostedStatus); - } + GetSpotSubAccountsSummaryV2Resp resp = api.getSpotSubAccountsSummaryV2(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getUserId()); + Assertions.assertNotNull(item.getUid()); + Assertions.assertNotNull(item.getSubName()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getAccess()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getRemarks()); + Assertions.assertNotNull(item.getTradeTypes()); + Assertions.assertNotNull(item.getOpenedTradeTypes()); + Assertions.assertNotNull(item.getHostedStatus()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -80,50 +84,51 @@ * Get sub-account Detail - Balance * /api/v1/sub-accounts/{subUserId} */ - public void testGetSpotSubAccountDetail() { + @Test + public void testGetSpotSubAccountDetail() throws Exception { GetSpotSubAccountDetailReq.GetSpotSubAccountDetailReqBuilder builder = GetSpotSubAccountDetailReq.builder(); builder.subUserId(?).includeBaseAmount(?).baseCurrency(?).baseAmount(?); GetSpotSubAccountDetailReq req = builder.build(); - GetSpotSubAccountDetailResp resp = this.api.getSpotSubAccountDetail(req); - self::assertNotNull($resp->subUserId); - self::assertNotNull($resp->subName); - foreach($resp->mainAccounts as $item) { - self::assertNotNull($item->currency); - self::assertNotNull($item->balance); - self::assertNotNull($item->available); - self::assertNotNull($item->holds); - self::assertNotNull($item->baseCurrency); - self::assertNotNull($item->baseCurrencyPrice); - self::assertNotNull($item->baseAmount); - self::assertNotNull($item->tag); - } + GetSpotSubAccountDetailResp resp = api.getSpotSubAccountDetail(req); + Assertions.assertNotNull(resp.getSubUserId()); + Assertions.assertNotNull(resp.getSubName()); + resp.getMainAccounts().forEach( item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getBalance()); + Assertions.assertNotNull(item.getAvailable()); + Assertions.assertNotNull(item.getHolds()); + Assertions.assertNotNull(item.getBaseCurrency()); + Assertions.assertNotNull(item.getBaseCurrencyPrice()); + Assertions.assertNotNull(item.getBaseAmount()); + Assertions.assertNotNull(item.getTag()); + }); - foreach($resp->tradeAccounts as $item) { - self::assertNotNull($item->currency); - self::assertNotNull($item->balance); - self::assertNotNull($item->available); - self::assertNotNull($item->holds); - self::assertNotNull($item->baseCurrency); - self::assertNotNull($item->baseCurrencyPrice); - self::assertNotNull($item->baseAmount); - self::assertNotNull($item->tag); - } + resp.getTradeAccounts().forEach( item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getBalance()); + Assertions.assertNotNull(item.getAvailable()); + Assertions.assertNotNull(item.getHolds()); + Assertions.assertNotNull(item.getBaseCurrency()); + Assertions.assertNotNull(item.getBaseCurrencyPrice()); + Assertions.assertNotNull(item.getBaseAmount()); + Assertions.assertNotNull(item.getTag()); + }); - foreach($resp->marginAccounts as $item) { - self::assertNotNull($item->currency); - self::assertNotNull($item->balance); - self::assertNotNull($item->available); - self::assertNotNull($item->holds); - self::assertNotNull($item->baseCurrency); - self::assertNotNull($item->baseCurrencyPrice); - self::assertNotNull($item->baseAmount); - self::assertNotNull($item->tag); - } + resp.getMarginAccounts().forEach( item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getBalance()); + Assertions.assertNotNull(item.getAvailable()); + Assertions.assertNotNull(item.getHolds()); + Assertions.assertNotNull(item.getBaseCurrency()); + Assertions.assertNotNull(item.getBaseCurrencyPrice()); + Assertions.assertNotNull(item.getBaseAmount()); + Assertions.assertNotNull(item.getTag()); + }); - foreach($resp->tradeHFAccounts as $item) { - } + resp.getTradeHFAccounts().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -131,25 +136,26 @@ * Get sub-account List - Spot Balance (V2) * /api/v2/sub-accounts */ - public void testGetSpotSubAccountListV2() { + @Test + public void testGetSpotSubAccountListV2() throws Exception { GetSpotSubAccountListV2Req.GetSpotSubAccountListV2ReqBuilder builder = GetSpotSubAccountListV2Req.builder(); builder.currentPage(?).pageSize(?); GetSpotSubAccountListV2Req req = builder.build(); - GetSpotSubAccountListV2Resp resp = this.api.getSpotSubAccountListV2(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->subUserId); - self::assertNotNull($item->subName); - self::assertNotNull($item->mainAccounts); - self::assertNotNull($item->tradeAccounts); - self::assertNotNull($item->marginAccounts); - self::assertNotNull($item->tradeHFAccounts); - } + GetSpotSubAccountListV2Resp resp = api.getSpotSubAccountListV2(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getSubUserId()); + Assertions.assertNotNull(item.getSubName()); + Assertions.assertNotNull(item.getMainAccounts()); + Assertions.assertNotNull(item.getTradeAccounts()); + Assertions.assertNotNull(item.getMarginAccounts()); + Assertions.assertNotNull(item.getTradeHFAccounts()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -157,25 +163,26 @@ * Get sub-account List - Futures Balance (V2) * /api/v1/account-overview-all */ - public void testGetFuturesSubAccountListV2() { + @Test + public void testGetFuturesSubAccountListV2() throws Exception { GetFuturesSubAccountListV2Req.GetFuturesSubAccountListV2ReqBuilder builder = GetFuturesSubAccountListV2Req.builder(); builder.currency(?); GetFuturesSubAccountListV2Req req = builder.build(); - GetFuturesSubAccountListV2Resp resp = this.api.getFuturesSubAccountListV2(req); - self::assertNotNull($resp->summary); - foreach($resp->accounts as $item) { - self::assertNotNull($item->accountName); - self::assertNotNull($item->accountEquity); - self::assertNotNull($item->unrealisedPNL); - self::assertNotNull($item->marginBalance); - self::assertNotNull($item->positionMargin); - self::assertNotNull($item->orderMargin); - self::assertNotNull($item->frozenFunds); - self::assertNotNull($item->availableBalance); - self::assertNotNull($item->currency); - } + GetFuturesSubAccountListV2Resp resp = api.getFuturesSubAccountListV2(req); + Assertions.assertNotNull(resp.getSummary()); + resp.getAccounts().forEach( item -> { + Assertions.assertNotNull(item.getAccountName()); + Assertions.assertNotNull(item.getAccountEquity()); + Assertions.assertNotNull(item.getUnrealisedPNL()); + Assertions.assertNotNull(item.getMarginBalance()); + Assertions.assertNotNull(item.getPositionMargin()); + Assertions.assertNotNull(item.getOrderMargin()); + Assertions.assertNotNull(item.getFrozenFunds()); + Assertions.assertNotNull(item.getAvailableBalance()); + Assertions.assertNotNull(item.getCurrency()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -183,21 +190,22 @@ * Add sub-account API * /api/v1/sub/api-key */ - public void testAddSubAccountApi() { + @Test + public void testAddSubAccountApi() throws Exception { AddSubAccountApiReq.AddSubAccountApiReqBuilder builder = AddSubAccountApiReq.builder(); builder.passphrase(?).remark(?).permission(?).ipWhitelist(?).expire(?).subName(?); AddSubAccountApiReq req = builder.build(); - AddSubAccountApiResp resp = this.api.addSubAccountApi(req); - self::assertNotNull($resp->subName); - self::assertNotNull($resp->remark); - self::assertNotNull($resp->apiKey); - self::assertNotNull($resp->apiSecret); - self::assertNotNull($resp->apiVersion); - self::assertNotNull($resp->passphrase); - self::assertNotNull($resp->permission); - self::assertNotNull($resp->ipWhitelist); - self::assertNotNull($resp->createdAt); - Logger::info($resp->jsonSerialize($this->serializer)); + AddSubAccountApiResp resp = api.addSubAccountApi(req); + Assertions.assertNotNull(resp.getSubName()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getApiKey()); + Assertions.assertNotNull(resp.getApiSecret()); + Assertions.assertNotNull(resp.getApiVersion()); + Assertions.assertNotNull(resp.getPassphrase()); + Assertions.assertNotNull(resp.getPermission()); + Assertions.assertNotNull(resp.getIpWhitelist()); + Assertions.assertNotNull(resp.getCreatedAt()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -205,16 +213,17 @@ * Modify sub-account API * /api/v1/sub/api-key/update */ - public void testModifySubAccountApi() { + @Test + public void testModifySubAccountApi() throws Exception { ModifySubAccountApiReq.ModifySubAccountApiReqBuilder builder = ModifySubAccountApiReq.builder(); builder.passphrase(?).permission(?).ipWhitelist(?).expire(?).subName(?).apiKey(?); ModifySubAccountApiReq req = builder.build(); - ModifySubAccountApiResp resp = this.api.modifySubAccountApi(req); - self::assertNotNull($resp->subName); - self::assertNotNull($resp->apiKey); - self::assertNotNull($resp->permission); - self::assertNotNull($resp->ipWhitelist); - Logger::info($resp->jsonSerialize($this->serializer)); + ModifySubAccountApiResp resp = api.modifySubAccountApi(req); + Assertions.assertNotNull(resp.getSubName()); + Assertions.assertNotNull(resp.getApiKey()); + Assertions.assertNotNull(resp.getPermission()); + Assertions.assertNotNull(resp.getIpWhitelist()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -222,24 +231,25 @@ * Get sub-account API List * /api/v1/sub/api-key */ - public void testGetSubAccountApiList() { + @Test + public void testGetSubAccountApiList() throws Exception { GetSubAccountApiListReq.GetSubAccountApiListReqBuilder builder = GetSubAccountApiListReq.builder(); builder.apiKey(?).subName(?); GetSubAccountApiListReq req = builder.build(); - GetSubAccountApiListResp resp = this.api.getSubAccountApiList(req); - foreach($resp->data as $item) { - self::assertNotNull($item->subName); - self::assertNotNull($item->remark); - self::assertNotNull($item->apiKey); - self::assertNotNull($item->apiVersion); - self::assertNotNull($item->permission); - self::assertNotNull($item->ipWhitelist); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->uid); - self::assertNotNull($item->isMaster); - } + GetSubAccountApiListResp resp = api.getSubAccountApiList(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getSubName()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getApiKey()); + Assertions.assertNotNull(item.getApiVersion()); + Assertions.assertNotNull(item.getPermission()); + Assertions.assertNotNull(item.getIpWhitelist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getUid()); + Assertions.assertNotNull(item.getIsMaster()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -247,14 +257,15 @@ * Delete sub-account API * /api/v1/sub/api-key */ - public void testDeleteSubAccountApi() { + @Test + public void testDeleteSubAccountApi() throws Exception { DeleteSubAccountApiReq.DeleteSubAccountApiReqBuilder builder = DeleteSubAccountApiReq.builder(); builder.apiKey(?).subName(?).passphrase(?); DeleteSubAccountApiReq req = builder.build(); - DeleteSubAccountApiResp resp = this.api.deleteSubAccountApi(req); - self::assertNotNull($resp->subName); - self::assertNotNull($resp->apiKey); - Logger::info($resp->jsonSerialize($this->serializer)); + DeleteSubAccountApiResp resp = api.deleteSubAccountApi(req); + Assertions.assertNotNull(resp.getSubName()); + Assertions.assertNotNull(resp.getApiKey()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -262,18 +273,19 @@ * Get sub-account List - Summary Info (V1) * /api/v1/sub/user */ - public void testGetSpotSubAccountsSummaryV1() { - GetSpotSubAccountsSummaryV1Resp resp = this.api.getSpotSubAccountsSummaryV1(); - foreach($resp->data as $item) { - self::assertNotNull($item->userId); - self::assertNotNull($item->uid); - self::assertNotNull($item->subName); - self::assertNotNull($item->type); - self::assertNotNull($item->remarks); - self::assertNotNull($item->access); - } + @Test + public void testGetSpotSubAccountsSummaryV1() throws Exception { + GetSpotSubAccountsSummaryV1Resp resp = api.getSpotSubAccountsSummaryV1(); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getUserId()); + Assertions.assertNotNull(item.getUid()); + Assertions.assertNotNull(item.getSubName()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getRemarks()); + Assertions.assertNotNull(item.getAccess()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -281,17 +293,18 @@ * Get sub-account List - Spot Balance (V1) * /api/v1/sub-accounts */ - public void testGetSpotSubAccountListV1() { - GetSpotSubAccountListV1Resp resp = this.api.getSpotSubAccountListV1(); - foreach($resp->data as $item) { - self::assertNotNull($item->subUserId); - self::assertNotNull($item->subName); - self::assertNotNull($item->mainAccounts); - self::assertNotNull($item->tradeAccounts); - self::assertNotNull($item->marginAccounts); - self::assertNotNull($item->tradeHFAccounts); - } + @Test + public void testGetSpotSubAccountListV1() throws Exception { + GetSpotSubAccountListV1Resp resp = api.getSpotSubAccountListV1(); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getSubUserId()); + Assertions.assertNotNull(item.getSubName()); + Assertions.assertNotNull(item.getMainAccounts()); + Assertions.assertNotNull(item.getTradeAccounts()); + Assertions.assertNotNull(item.getMarginAccounts()); + Assertions.assertNotNull(item.getTradeHFAccounts()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.template index 70825b81..34292fb3 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/TransferApi.template @@ -4,17 +4,18 @@ * Get Transfer Quotas * /api/v1/accounts/transferable */ - public void testGetTransferQuotas() { + @Test + public void testGetTransferQuotas() throws Exception { GetTransferQuotasReq.GetTransferQuotasReqBuilder builder = GetTransferQuotasReq.builder(); builder.currency(?).type(?).tag(?); GetTransferQuotasReq req = builder.build(); - GetTransferQuotasResp resp = this.api.getTransferQuotas(req); - self::assertNotNull($resp->currency); - self::assertNotNull($resp->balance); - self::assertNotNull($resp->available); - self::assertNotNull($resp->holds); - self::assertNotNull($resp->transferable); - Logger::info($resp->jsonSerialize($this->serializer)); + GetTransferQuotasResp resp = api.getTransferQuotas(req); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getBalance()); + Assertions.assertNotNull(resp.getAvailable()); + Assertions.assertNotNull(resp.getHolds()); + Assertions.assertNotNull(resp.getTransferable()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -22,13 +23,14 @@ * Flex Transfer * /api/v3/accounts/universal-transfer */ - public void testFlexTransfer() { + @Test + public void testFlexTransfer() throws Exception { FlexTransferReq.FlexTransferReqBuilder builder = FlexTransferReq.builder(); builder.clientOid(?).currency(?).amount(?).fromUserId(?).fromAccountType(?).fromAccountTag(?).type(?).toUserId(?).toAccountType(?).toAccountTag(?); FlexTransferReq req = builder.build(); - FlexTransferResp resp = this.api.flexTransfer(req); - self::assertNotNull($resp->orderId); - Logger::info($resp->jsonSerialize($this->serializer)); + FlexTransferResp resp = api.flexTransfer(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -36,13 +38,14 @@ * Sub-account Transfer * /api/v2/accounts/sub-transfer */ - public void testSubAccountTransfer() { + @Test + public void testSubAccountTransfer() throws Exception { SubAccountTransferReq.SubAccountTransferReqBuilder builder = SubAccountTransferReq.builder(); builder.clientOid(?).currency(?).amount(?).direction(?).accountType(?).subAccountType(?).subUserId(?).tag(?).subTag(?); SubAccountTransferReq req = builder.build(); - SubAccountTransferResp resp = this.api.subAccountTransfer(req); - self::assertNotNull($resp->orderId); - Logger::info($resp->jsonSerialize($this->serializer)); + SubAccountTransferResp resp = api.subAccountTransfer(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -50,13 +53,14 @@ * Internal Transfer * /api/v2/accounts/inner-transfer */ - public void testInnerTransfer() { + @Test + public void testInnerTransfer() throws Exception { InnerTransferReq.InnerTransferReqBuilder builder = InnerTransferReq.builder(); builder.clientOid(?).currency(?).amount(?).to(?).fromTag(?).toTag(?).from(?); InnerTransferReq req = builder.build(); - InnerTransferResp resp = this.api.innerTransfer(req); - self::assertNotNull($resp->orderId); - Logger::info($resp->jsonSerialize($this->serializer)); + InnerTransferResp resp = api.innerTransfer(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -64,29 +68,30 @@ * Get Futures Account Transfer Out Ledger * /api/v1/transfer-list */ - public void testGetFuturesAccountTransferOutLedger() { + @Test + public void testGetFuturesAccountTransferOutLedger() throws Exception { GetFuturesAccountTransferOutLedgerReq.GetFuturesAccountTransferOutLedgerReqBuilder builder = GetFuturesAccountTransferOutLedgerReq.builder(); builder.currency(?).type(?).tag(?).startAt(?).endAt(?).currentPage(?).pageSize(?); GetFuturesAccountTransferOutLedgerReq req = builder.build(); - GetFuturesAccountTransferOutLedgerResp resp = this.api.getFuturesAccountTransferOutLedger(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->applyId); - self::assertNotNull($item->currency); - self::assertNotNull($item->recRemark); - self::assertNotNull($item->recSystem); - self::assertNotNull($item->status); - self::assertNotNull($item->amount); - self::assertNotNull($item->reason); - self::assertNotNull($item->offset); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->remark); - } + GetFuturesAccountTransferOutLedgerResp resp = api.getFuturesAccountTransferOutLedger(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getApplyId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getRecRemark()); + Assertions.assertNotNull(item.getRecSystem()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getReason()); + Assertions.assertNotNull(item.getOffset()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getRemark()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -94,29 +99,30 @@ * Futures Account Transfer Out * /api/v3/transfer-out */ - public void testFuturesAccountTransferOut() { + @Test + public void testFuturesAccountTransferOut() throws Exception { FuturesAccountTransferOutReq.FuturesAccountTransferOutReqBuilder builder = FuturesAccountTransferOutReq.builder(); builder.currency(?).amount(?).recAccountType(?); FuturesAccountTransferOutReq req = builder.build(); - FuturesAccountTransferOutResp resp = this.api.futuresAccountTransferOut(req); - self::assertNotNull($resp->applyId); - self::assertNotNull($resp->bizNo); - self::assertNotNull($resp->payAccountType); - self::assertNotNull($resp->payTag); - self::assertNotNull($resp->remark); - self::assertNotNull($resp->recAccountType); - self::assertNotNull($resp->recTag); - self::assertNotNull($resp->recRemark); - self::assertNotNull($resp->recSystem); - self::assertNotNull($resp->status); - self::assertNotNull($resp->currency); - self::assertNotNull($resp->amount); - self::assertNotNull($resp->fee); - self::assertNotNull($resp->sn); - self::assertNotNull($resp->reason); - self::assertNotNull($resp->createdAt); - self::assertNotNull($resp->updatedAt); - Logger::info($resp->jsonSerialize($this->serializer)); + FuturesAccountTransferOutResp resp = api.futuresAccountTransferOut(req); + Assertions.assertNotNull(resp.getApplyId()); + Assertions.assertNotNull(resp.getBizNo()); + Assertions.assertNotNull(resp.getPayAccountType()); + Assertions.assertNotNull(resp.getPayTag()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getRecAccountType()); + Assertions.assertNotNull(resp.getRecTag()); + Assertions.assertNotNull(resp.getRecRemark()); + Assertions.assertNotNull(resp.getRecSystem()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getAmount()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getSn()); + Assertions.assertNotNull(resp.getReason()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getUpdatedAt()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -124,12 +130,13 @@ * Futures Account Transfer In * /api/v1/transfer-in */ - public void testFuturesAccountTransferIn() { + @Test + public void testFuturesAccountTransferIn() throws Exception { FuturesAccountTransferInReq.FuturesAccountTransferInReqBuilder builder = FuturesAccountTransferInReq.builder(); builder.currency(?).amount(?).payAccountType(?); FuturesAccountTransferInReq req = builder.build(); - FuturesAccountTransferInResp resp = this.api.futuresAccountTransferIn(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + FuturesAccountTransferInResp resp = api.futuresAccountTransferIn(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.template index ceb421b6..9d9ab8b0 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/WithdrawalApi.template @@ -4,28 +4,29 @@ * Get Withdrawal Quotas * /api/v1/withdrawals/quotas */ - public void testGetWithdrawalQuotas() { + @Test + public void testGetWithdrawalQuotas() throws Exception { GetWithdrawalQuotasReq.GetWithdrawalQuotasReqBuilder builder = GetWithdrawalQuotasReq.builder(); builder.currency(?).chain(?); GetWithdrawalQuotasReq req = builder.build(); - GetWithdrawalQuotasResp resp = this.api.getWithdrawalQuotas(req); - self::assertNotNull($resp->currency); - self::assertNotNull($resp->limitBTCAmount); - self::assertNotNull($resp->usedBTCAmount); - self::assertNotNull($resp->quotaCurrency); - self::assertNotNull($resp->limitQuotaCurrencyAmount); - self::assertNotNull($resp->usedQuotaCurrencyAmount); - self::assertNotNull($resp->remainAmount); - self::assertNotNull($resp->availableAmount); - self::assertNotNull($resp->withdrawMinFee); - self::assertNotNull($resp->innerWithdrawMinFee); - self::assertNotNull($resp->withdrawMinSize); - self::assertNotNull($resp->isWithdrawEnabled); - self::assertNotNull($resp->precision); - self::assertNotNull($resp->chain); - self::assertNotNull($resp->reason); - self::assertNotNull($resp->lockedAmount); - Logger::info($resp->jsonSerialize($this->serializer)); + GetWithdrawalQuotasResp resp = api.getWithdrawalQuotas(req); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getLimitBTCAmount()); + Assertions.assertNotNull(resp.getUsedBTCAmount()); + Assertions.assertNotNull(resp.getQuotaCurrency()); + Assertions.assertNotNull(resp.getLimitQuotaCurrencyAmount()); + Assertions.assertNotNull(resp.getUsedQuotaCurrencyAmount()); + Assertions.assertNotNull(resp.getRemainAmount()); + Assertions.assertNotNull(resp.getAvailableAmount()); + Assertions.assertNotNull(resp.getWithdrawMinFee()); + Assertions.assertNotNull(resp.getInnerWithdrawMinFee()); + Assertions.assertNotNull(resp.getWithdrawMinSize()); + Assertions.assertNotNull(resp.getIsWithdrawEnabled()); + Assertions.assertNotNull(resp.getPrecision()); + Assertions.assertNotNull(resp.getChain()); + Assertions.assertNotNull(resp.getReason()); + Assertions.assertNotNull(resp.getLockedAmount()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -33,13 +34,14 @@ * Withdraw (V3) * /api/v3/withdrawals */ - public void testWithdrawalV3() { + @Test + public void testWithdrawalV3() throws Exception { WithdrawalV3Req.WithdrawalV3ReqBuilder builder = WithdrawalV3Req.builder(); builder.currency(?).chain(?).amount(?).memo(?).isInner(?).remark(?).feeDeductType(?).toAddress(?).withdrawType(?); WithdrawalV3Req req = builder.build(); - WithdrawalV3Resp resp = this.api.withdrawalV3(req); - self::assertNotNull($resp->withdrawalId); - Logger::info($resp->jsonSerialize($this->serializer)); + WithdrawalV3Resp resp = api.withdrawalV3(req); + Assertions.assertNotNull(resp.getWithdrawalId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -47,13 +49,14 @@ * Cancel Withdrawal * /api/v1/withdrawals/{withdrawalId} */ - public void testCancelWithdrawal() { + @Test + public void testCancelWithdrawal() throws Exception { CancelWithdrawalReq.CancelWithdrawalReqBuilder builder = CancelWithdrawalReq.builder(); builder.withdrawalId(?); CancelWithdrawalReq req = builder.build(); - CancelWithdrawalResp resp = this.api.cancelWithdrawal(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + CancelWithdrawalResp resp = api.cancelWithdrawal(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -61,32 +64,33 @@ * Get Withdrawal History * /api/v1/withdrawals */ - public void testGetWithdrawalHistory() { + @Test + public void testGetWithdrawalHistory() throws Exception { GetWithdrawalHistoryReq.GetWithdrawalHistoryReqBuilder builder = GetWithdrawalHistoryReq.builder(); builder.currency(?).status(?).startAt(?).endAt(?).currentPage(?).pageSize(?); GetWithdrawalHistoryReq req = builder.build(); - GetWithdrawalHistoryResp resp = this.api.getWithdrawalHistory(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->currency); - self::assertNotNull($item->chain); - self::assertNotNull($item->status); - self::assertNotNull($item->address); - self::assertNotNull($item->memo); - self::assertNotNull($item->isInner); - self::assertNotNull($item->amount); - self::assertNotNull($item->fee); - self::assertNotNull($item->walletTxId); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->updatedAt); - self::assertNotNull($item->remark); - } + GetWithdrawalHistoryResp resp = api.getWithdrawalHistory(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getChain()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getAddress()); + Assertions.assertNotNull(item.getMemo()); + Assertions.assertNotNull(item.getIsInner()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getWalletTxId()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getUpdatedAt()); + Assertions.assertNotNull(item.getRemark()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -94,38 +98,39 @@ * Get Withdrawal History By ID * /api/v1/withdrawals/{withdrawalId} */ - public void testGetWithdrawalHistoryById() { + @Test + public void testGetWithdrawalHistoryById() throws Exception { GetWithdrawalHistoryByIdReq.GetWithdrawalHistoryByIdReqBuilder builder = GetWithdrawalHistoryByIdReq.builder(); builder.withdrawalId(?); GetWithdrawalHistoryByIdReq req = builder.build(); - GetWithdrawalHistoryByIdResp resp = this.api.getWithdrawalHistoryById(req); - self::assertNotNull($resp->id); - self::assertNotNull($resp->uid); - self::assertNotNull($resp->currency); - self::assertNotNull($resp->chainId); - self::assertNotNull($resp->chainName); - self::assertNotNull($resp->currencyName); - self::assertNotNull($resp->status); - self::assertNotNull($resp->failureReason); - self::assertNotNull($resp->failureReasonMsg); - self::assertNotNull($resp->address); - self::assertNotNull($resp->memo); - self::assertNotNull($resp->isInner); - self::assertNotNull($resp->amount); - self::assertNotNull($resp->fee); - self::assertNotNull($resp->walletTxId); - self::assertNotNull($resp->addressRemark); - self::assertNotNull($resp->remark); - self::assertNotNull($resp->createdAt); - self::assertNotNull($resp->cancelType); - foreach($resp->taxes as $item) { - } + GetWithdrawalHistoryByIdResp resp = api.getWithdrawalHistoryById(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getUid()); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getChainId()); + Assertions.assertNotNull(resp.getChainName()); + Assertions.assertNotNull(resp.getCurrencyName()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getFailureReason()); + Assertions.assertNotNull(resp.getFailureReasonMsg()); + Assertions.assertNotNull(resp.getAddress()); + Assertions.assertNotNull(resp.getMemo()); + Assertions.assertNotNull(resp.getIsInner()); + Assertions.assertNotNull(resp.getAmount()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getWalletTxId()); + Assertions.assertNotNull(resp.getAddressRemark()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getCancelType()); + resp.getTaxes().forEach( item -> { + }); - self::assertNotNull($resp->taxDescription); - self::assertNotNull($resp->returnStatus); - self::assertNotNull($resp->returnAmount); - self::assertNotNull($resp->returnCurrency); - Logger::info($resp->jsonSerialize($this->serializer)); + Assertions.assertNotNull(resp.getTaxDescription()); + Assertions.assertNotNull(resp.getReturnStatus()); + Assertions.assertNotNull(resp.getReturnAmount()); + Assertions.assertNotNull(resp.getReturnCurrency()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -133,26 +138,27 @@ * Get Withdrawal History - Old * /api/v1/hist-withdrawals */ - public void testGetWithdrawalHistoryOld() { + @Test + public void testGetWithdrawalHistoryOld() throws Exception { GetWithdrawalHistoryOldReq.GetWithdrawalHistoryOldReqBuilder builder = GetWithdrawalHistoryOldReq.builder(); builder.currency(?).status(?).startAt(?).endAt(?).currentPage(?).pageSize(?); GetWithdrawalHistoryOldReq req = builder.build(); - GetWithdrawalHistoryOldResp resp = this.api.getWithdrawalHistoryOld(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->currency); - self::assertNotNull($item->createAt); - self::assertNotNull($item->amount); - self::assertNotNull($item->address); - self::assertNotNull($item->walletTxId); - self::assertNotNull($item->isInner); - self::assertNotNull($item->status); - } + GetWithdrawalHistoryOldResp resp = api.getWithdrawalHistoryOld(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getCreateAt()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getAddress()); + Assertions.assertNotNull(item.getWalletTxId()); + Assertions.assertNotNull(item.getIsInner()); + Assertions.assertNotNull(item.getStatus()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -160,12 +166,13 @@ * Withdraw - V1 * /api/v1/withdrawals */ - public void testWithdrawalV1() { + @Test + public void testWithdrawalV1() throws Exception { WithdrawalV1Req.WithdrawalV1ReqBuilder builder = WithdrawalV1Req.builder(); builder.currency(?).chain(?).address(?).amount(?).memo(?).isInner(?).remark(?).feeDeductType(?); WithdrawalV1Req req = builder.build(); - WithdrawalV1Resp resp = this.api.withdrawalV1(req); - self::assertNotNull($resp->withdrawalId); - Logger::info($resp->jsonSerialize($this->serializer)); + WithdrawalV1Resp resp = api.withdrawalV1(req); + Assertions.assertNotNull(resp.getWithdrawalId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApi.template index a704149b..5e93eb72 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/affiliate/affiliate/AffiliateApi.template @@ -4,25 +4,26 @@ * Get Account * /api/v2/affiliate/inviter/statistics */ - public void testGetAccount() { - GetAccountResp resp = this.api.getAccount(); - self::assertNotNull($resp->parentUid); - foreach($resp->orders as $item) { - self::assertNotNull($item->orderId); - self::assertNotNull($item->currency); - self::assertNotNull($item->principal); - self::assertNotNull($item->interest); - } + @Test + public void testGetAccount() throws Exception { + GetAccountResp resp = api.getAccount(); + Assertions.assertNotNull(resp.getParentUid()); + resp.getOrders().forEach( item -> { + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getPrincipal()); + Assertions.assertNotNull(item.getInterest()); + }); - self::assertNotNull($resp->ltv); - self::assertNotNull($resp->totalMarginAmount); - self::assertNotNull($resp->transferMarginAmount); - foreach($resp->margins as $item) { - self::assertNotNull($item->marginCcy); - self::assertNotNull($item->marginQty); - self::assertNotNull($item->marginFactor); - } + Assertions.assertNotNull(resp.getLtv()); + Assertions.assertNotNull(resp.getTotalMarginAmount()); + Assertions.assertNotNull(resp.getTransferMarginAmount()); + resp.getMargins().forEach( item -> { + Assertions.assertNotNull(item.getMarginCcy()); + Assertions.assertNotNull(item.getMarginQty()); + Assertions.assertNotNull(item.getMarginFactor()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApi.template index 29e674e2..e4390295 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/apibroker/APIBrokerApi.template @@ -4,12 +4,13 @@ * Get Broker Rebate * /api/v1/broker/api/rebase/download */ - public void testGetRebase() { + @Test + public void testGetRebase() throws Exception { GetRebaseReq.GetRebaseReqBuilder builder = GetRebaseReq.builder(); builder.begin(?).end(?).tradeType(?); GetRebaseReq req = builder.build(); - GetRebaseResp resp = this.api.getRebase(req); - self::assertNotNull($resp->url); - Logger::info($resp->jsonSerialize($this->serializer)); + GetRebaseResp resp = api.getRebase(req); + Assertions.assertNotNull(resp.getUrl()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApi.template index a6f48069..6cbf2c5c 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/NDBrokerApi.template @@ -4,13 +4,14 @@ * Submit KYC * /api/kyc/ndBroker/proxyClient/submit */ - public void testSubmitKYC() { + @Test + public void testSubmitKYC() throws Exception { SubmitKYCReq.SubmitKYCReqBuilder builder = SubmitKYCReq.builder(); builder.clientUid(?).firstName(?).lastName(?).issueCountry(?).birthDate(?).identityType(?).identityNumber(?).expireDate(?).frontPhoto(?).backendPhoto(?).facePhoto(?); SubmitKYCReq req = builder.build(); - SubmitKYCResp resp = this.api.submitKYC(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + SubmitKYCResp resp = api.submitKYC(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -18,18 +19,19 @@ * Get KYC Status * /api/kyc/ndBroker/proxyClient/status/list */ - public void testGetKYCStatus() { + @Test + public void testGetKYCStatus() throws Exception { GetKYCStatusReq.GetKYCStatusReqBuilder builder = GetKYCStatusReq.builder(); builder.clientUids(?); GetKYCStatusReq req = builder.build(); - GetKYCStatusResp resp = this.api.getKYCStatus(req); - foreach($resp->data as $item) { - self::assertNotNull($item->clientUid); - self::assertNotNull($item->status); - self::assertNotNull($item->rejectReason); - } + GetKYCStatusResp resp = api.getKYCStatus(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getClientUid()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getRejectReason()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -37,22 +39,23 @@ * Get KYC Status List * /api/kyc/ndBroker/proxyClient/status/page */ - public void testGetKYCStatusList() { + @Test + public void testGetKYCStatusList() throws Exception { GetKYCStatusListReq.GetKYCStatusListReqBuilder builder = GetKYCStatusListReq.builder(); builder.pageNumber(?).pageSize(?); GetKYCStatusListReq req = builder.build(); - GetKYCStatusListResp resp = this.api.getKYCStatusList(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->clientUid); - self::assertNotNull($item->status); - self::assertNotNull($item->rejectReason); - } + GetKYCStatusListResp resp = api.getKYCStatusList(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getClientUid()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getRejectReason()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -60,15 +63,16 @@ * Get Broker Info * /api/v1/broker/nd/info */ - public void testGetBrokerInfo() { + @Test + public void testGetBrokerInfo() throws Exception { GetBrokerInfoReq.GetBrokerInfoReqBuilder builder = GetBrokerInfoReq.builder(); builder.begin(?).end(?).tradeType(?); GetBrokerInfoReq req = builder.build(); - GetBrokerInfoResp resp = this.api.getBrokerInfo(req); - self::assertNotNull($resp->accountSize); - self::assertNotNull($resp->maxAccountSize); - self::assertNotNull($resp->level); - Logger::info($resp->jsonSerialize($this->serializer)); + GetBrokerInfoResp resp = api.getBrokerInfo(req); + Assertions.assertNotNull(resp.getAccountSize()); + Assertions.assertNotNull(resp.getMaxAccountSize()); + Assertions.assertNotNull(resp.getLevel()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -76,16 +80,17 @@ * Add sub-account * /api/v1/broker/nd/account */ - public void testAddSubAccount() { + @Test + public void testAddSubAccount() throws Exception { AddSubAccountReq.AddSubAccountReqBuilder builder = AddSubAccountReq.builder(); builder.accountName(?); AddSubAccountReq req = builder.build(); - AddSubAccountResp resp = this.api.addSubAccount(req); - self::assertNotNull($resp->accountName); - self::assertNotNull($resp->uid); - self::assertNotNull($resp->createdAt); - self::assertNotNull($resp->level); - Logger::info($resp->jsonSerialize($this->serializer)); + AddSubAccountResp resp = api.addSubAccount(req); + Assertions.assertNotNull(resp.getAccountName()); + Assertions.assertNotNull(resp.getUid()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getLevel()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -93,23 +98,24 @@ * Get sub-account * /api/v1/broker/nd/account */ - public void testGetSubAccount() { + @Test + public void testGetSubAccount() throws Exception { GetSubAccountReq.GetSubAccountReqBuilder builder = GetSubAccountReq.builder(); builder.uid(?).currentPage(?).pageSize(?); GetSubAccountReq req = builder.build(); - GetSubAccountResp resp = this.api.getSubAccount(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->accountName); - self::assertNotNull($item->uid); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->level); - } + GetSubAccountResp resp = api.getSubAccount(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getAccountName()); + Assertions.assertNotNull(item.getUid()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getLevel()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -117,24 +123,25 @@ * Add sub-account API * /api/v1/broker/nd/account/apikey */ - public void testAddSubAccountApi() { + @Test + public void testAddSubAccountApi() throws Exception { AddSubAccountApiReq.AddSubAccountApiReqBuilder builder = AddSubAccountApiReq.builder(); builder.uid(?).passphrase(?).ipWhitelist(?).permissions(?).label(?); AddSubAccountApiReq req = builder.build(); - AddSubAccountApiResp resp = this.api.addSubAccountApi(req); - self::assertNotNull($resp->uid); - self::assertNotNull($resp->label); - self::assertNotNull($resp->apiKey); - self::assertNotNull($resp->secretKey); - self::assertNotNull($resp->apiVersion); - foreach($resp->permissions as $item) { - } + AddSubAccountApiResp resp = api.addSubAccountApi(req); + Assertions.assertNotNull(resp.getUid()); + Assertions.assertNotNull(resp.getLabel()); + Assertions.assertNotNull(resp.getApiKey()); + Assertions.assertNotNull(resp.getSecretKey()); + Assertions.assertNotNull(resp.getApiVersion()); + resp.getPermissions().forEach( item -> { + }); - foreach($resp->ipWhitelist as $item) { - } + resp.getIpWhitelist().forEach( item -> { + }); - self::assertNotNull($resp->createdAt); - Logger::info($resp->jsonSerialize($this->serializer)); + Assertions.assertNotNull(resp.getCreatedAt()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -142,22 +149,23 @@ * Get sub-account API * /api/v1/broker/nd/account/apikey */ - public void testGetSubAccountAPI() { + @Test + public void testGetSubAccountAPI() throws Exception { GetSubAccountAPIReq.GetSubAccountAPIReqBuilder builder = GetSubAccountAPIReq.builder(); builder.uid(?).apiKey(?); GetSubAccountAPIReq req = builder.build(); - GetSubAccountAPIResp resp = this.api.getSubAccountAPI(req); - foreach($resp->data as $item) { - self::assertNotNull($item->uid); - self::assertNotNull($item->label); - self::assertNotNull($item->apiKey); - self::assertNotNull($item->apiVersion); - self::assertNotNull($item->permissions); - self::assertNotNull($item->ipWhitelist); - self::assertNotNull($item->createdAt); - } + GetSubAccountAPIResp resp = api.getSubAccountAPI(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getUid()); + Assertions.assertNotNull(item.getLabel()); + Assertions.assertNotNull(item.getApiKey()); + Assertions.assertNotNull(item.getApiVersion()); + Assertions.assertNotNull(item.getPermissions()); + Assertions.assertNotNull(item.getIpWhitelist()); + Assertions.assertNotNull(item.getCreatedAt()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -165,23 +173,24 @@ * Modify sub-account API * /api/v1/broker/nd/account/update-apikey */ - public void testModifySubAccountApi() { + @Test + public void testModifySubAccountApi() throws Exception { ModifySubAccountApiReq.ModifySubAccountApiReqBuilder builder = ModifySubAccountApiReq.builder(); builder.uid(?).ipWhitelist(?).permissions(?).label(?).apiKey(?); ModifySubAccountApiReq req = builder.build(); - ModifySubAccountApiResp resp = this.api.modifySubAccountApi(req); - self::assertNotNull($resp->uid); - self::assertNotNull($resp->label); - self::assertNotNull($resp->apiKey); - self::assertNotNull($resp->apiVersion); - foreach($resp->permissions as $item) { - } + ModifySubAccountApiResp resp = api.modifySubAccountApi(req); + Assertions.assertNotNull(resp.getUid()); + Assertions.assertNotNull(resp.getLabel()); + Assertions.assertNotNull(resp.getApiKey()); + Assertions.assertNotNull(resp.getApiVersion()); + resp.getPermissions().forEach( item -> { + }); - foreach($resp->ipWhitelist as $item) { - } + resp.getIpWhitelist().forEach( item -> { + }); - self::assertNotNull($resp->createdAt); - Logger::info($resp->jsonSerialize($this->serializer)); + Assertions.assertNotNull(resp.getCreatedAt()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -189,13 +198,14 @@ * Delete sub-account API * /api/v1/broker/nd/account/apikey */ - public void testDeleteSubAccountAPI() { + @Test + public void testDeleteSubAccountAPI() throws Exception { DeleteSubAccountAPIReq.DeleteSubAccountAPIReqBuilder builder = DeleteSubAccountAPIReq.builder(); builder.uid(?).apiKey(?); DeleteSubAccountAPIReq req = builder.build(); - DeleteSubAccountAPIResp resp = this.api.deleteSubAccountAPI(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + DeleteSubAccountAPIResp resp = api.deleteSubAccountAPI(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -203,13 +213,14 @@ * Transfer * /api/v1/broker/nd/transfer */ - public void testTransfer() { + @Test + public void testTransfer() throws Exception { TransferReq.TransferReqBuilder builder = TransferReq.builder(); builder.currency(?).amount(?).direction(?).accountType(?).specialUid(?).specialAccountType(?).clientOid(?); TransferReq req = builder.build(); - TransferResp resp = this.api.transfer(req); - self::assertNotNull($resp->orderId); - Logger::info($resp->jsonSerialize($this->serializer)); + TransferResp resp = api.transfer(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -217,24 +228,25 @@ * Get Transfer History * /api/v3/broker/nd/transfer/detail */ - public void testGetTransferHistory() { + @Test + public void testGetTransferHistory() throws Exception { GetTransferHistoryReq.GetTransferHistoryReqBuilder builder = GetTransferHistoryReq.builder(); builder.orderId(?); GetTransferHistoryReq req = builder.build(); - GetTransferHistoryResp resp = this.api.getTransferHistory(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->currency); - self::assertNotNull($resp->amount); - self::assertNotNull($resp->fromUid); - self::assertNotNull($resp->fromAccountType); - self::assertNotNull($resp->fromAccountTag); - self::assertNotNull($resp->toUid); - self::assertNotNull($resp->toAccountType); - self::assertNotNull($resp->toAccountTag); - self::assertNotNull($resp->status); - self::assertNotNull($resp->reason); - self::assertNotNull($resp->createdAt); - Logger::info($resp->jsonSerialize($this->serializer)); + GetTransferHistoryResp resp = api.getTransferHistory(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getAmount()); + Assertions.assertNotNull(resp.getFromUid()); + Assertions.assertNotNull(resp.getFromAccountType()); + Assertions.assertNotNull(resp.getFromAccountTag()); + Assertions.assertNotNull(resp.getToUid()); + Assertions.assertNotNull(resp.getToAccountType()); + Assertions.assertNotNull(resp.getToAccountTag()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getReason()); + Assertions.assertNotNull(resp.getCreatedAt()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -242,29 +254,30 @@ * Get Deposit List * /api/v1/asset/ndbroker/deposit/list */ - public void testGetDepositList() { + @Test + public void testGetDepositList() throws Exception { GetDepositListReq.GetDepositListReqBuilder builder = GetDepositListReq.builder(); builder.currency(?).status(?).hash(?).startTimestamp(?).endTimestamp(?).limit(?); GetDepositListReq req = builder.build(); - GetDepositListResp resp = this.api.getDepositList(req); - foreach($resp->data as $item) { - self::assertNotNull($item->uid); - self::assertNotNull($item->hash); - self::assertNotNull($item->address); - self::assertNotNull($item->memo); - self::assertNotNull($item->amount); - self::assertNotNull($item->fee); - self::assertNotNull($item->currency); - self::assertNotNull($item->isInner); - self::assertNotNull($item->walletTxId); - self::assertNotNull($item->status); - self::assertNotNull($item->remark); - self::assertNotNull($item->chain); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->updatedAt); - } + GetDepositListResp resp = api.getDepositList(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getUid()); + Assertions.assertNotNull(item.getHash()); + Assertions.assertNotNull(item.getAddress()); + Assertions.assertNotNull(item.getMemo()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getIsInner()); + Assertions.assertNotNull(item.getWalletTxId()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getChain()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getUpdatedAt()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -272,26 +285,27 @@ * Get Deposit Detail * /api/v3/broker/nd/deposit/detail */ - public void testGetDepositDetail() { + @Test + public void testGetDepositDetail() throws Exception { GetDepositDetailReq.GetDepositDetailReqBuilder builder = GetDepositDetailReq.builder(); builder.currency(?).hash(?); GetDepositDetailReq req = builder.build(); - GetDepositDetailResp resp = this.api.getDepositDetail(req); - self::assertNotNull($resp->chain); - self::assertNotNull($resp->hash); - self::assertNotNull($resp->walletTxId); - self::assertNotNull($resp->uid); - self::assertNotNull($resp->updatedAt); - self::assertNotNull($resp->amount); - self::assertNotNull($resp->memo); - self::assertNotNull($resp->fee); - self::assertNotNull($resp->address); - self::assertNotNull($resp->remark); - self::assertNotNull($resp->isInner); - self::assertNotNull($resp->currency); - self::assertNotNull($resp->status); - self::assertNotNull($resp->createdAt); - Logger::info($resp->jsonSerialize($this->serializer)); + GetDepositDetailResp resp = api.getDepositDetail(req); + Assertions.assertNotNull(resp.getChain()); + Assertions.assertNotNull(resp.getHash()); + Assertions.assertNotNull(resp.getWalletTxId()); + Assertions.assertNotNull(resp.getUid()); + Assertions.assertNotNull(resp.getUpdatedAt()); + Assertions.assertNotNull(resp.getAmount()); + Assertions.assertNotNull(resp.getMemo()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getAddress()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getIsInner()); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getCreatedAt()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -299,26 +313,27 @@ * Get Withdraw Detail * /api/v3/broker/nd/withdraw/detail */ - public void testGetWithdrawDetail() { + @Test + public void testGetWithdrawDetail() throws Exception { GetWithdrawDetailReq.GetWithdrawDetailReqBuilder builder = GetWithdrawDetailReq.builder(); builder.withdrawalId(?); GetWithdrawDetailReq req = builder.build(); - GetWithdrawDetailResp resp = this.api.getWithdrawDetail(req); - self::assertNotNull($resp->id); - self::assertNotNull($resp->chain); - self::assertNotNull($resp->walletTxId); - self::assertNotNull($resp->uid); - self::assertNotNull($resp->updatedAt); - self::assertNotNull($resp->amount); - self::assertNotNull($resp->memo); - self::assertNotNull($resp->fee); - self::assertNotNull($resp->address); - self::assertNotNull($resp->remark); - self::assertNotNull($resp->isInner); - self::assertNotNull($resp->currency); - self::assertNotNull($resp->status); - self::assertNotNull($resp->createdAt); - Logger::info($resp->jsonSerialize($this->serializer)); + GetWithdrawDetailResp resp = api.getWithdrawDetail(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getChain()); + Assertions.assertNotNull(resp.getWalletTxId()); + Assertions.assertNotNull(resp.getUid()); + Assertions.assertNotNull(resp.getUpdatedAt()); + Assertions.assertNotNull(resp.getAmount()); + Assertions.assertNotNull(resp.getMemo()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getAddress()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getIsInner()); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getCreatedAt()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -326,12 +341,13 @@ * Get Broker Rebate * /api/v1/broker/nd/rebase/download */ - public void testGetRebase() { + @Test + public void testGetRebase() throws Exception { GetRebaseReq.GetRebaseReqBuilder builder = GetRebaseReq.builder(); builder.begin(?).end(?).tradeType(?); GetRebaseReq req = builder.build(); - GetRebaseResp resp = this.api.getRebase(req); - self::assertNotNull($resp->url); - Logger::info($resp->jsonSerialize($this->serializer)); + GetRebaseResp resp = api.getRebase(req); + Assertions.assertNotNull(resp.getUrl()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApi.template index 826e4314..e6229934 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/FuturesApi.template @@ -4,14 +4,15 @@ * Add Order * /api/v1/copy-trade/futures/orders */ - public void testAddOrder() { + @Test + public void testAddOrder() throws Exception { AddOrderReq.AddOrderReqBuilder builder = AddOrderReq.builder(); builder.clientOid(?).side(?).symbol(?).leverage(?).type(?).stop(?).stopPriceType(?).stopPrice(?).reduceOnly(?).closeOrder(?).marginMode(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?); AddOrderReq req = builder.build(); - AddOrderResp resp = this.api.addOrder(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->clientOid); - Logger::info($resp->jsonSerialize($this->serializer)); + AddOrderResp resp = api.addOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -19,14 +20,15 @@ * Add Order Test * /api/v1/copy-trade/futures/orders/test */ - public void testAddOrderTest() { + @Test + public void testAddOrderTest() throws Exception { AddOrderTestReq.AddOrderTestReqBuilder builder = AddOrderTestReq.builder(); builder.clientOid(?).side(?).symbol(?).leverage(?).type(?).stop(?).stopPriceType(?).stopPrice(?).reduceOnly(?).closeOrder(?).marginMode(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?); AddOrderTestReq req = builder.build(); - AddOrderTestResp resp = this.api.addOrderTest(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->clientOid); - Logger::info($resp->jsonSerialize($this->serializer)); + AddOrderTestResp resp = api.addOrderTest(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -34,14 +36,15 @@ * Add Take Profit And Stop Loss Order * /api/v1/copy-trade/futures/st-orders */ - public void testAddTPSLOrder() { + @Test + public void testAddTPSLOrder() throws Exception { AddTPSLOrderReq.AddTPSLOrderReqBuilder builder = AddTPSLOrderReq.builder(); builder.clientOid(?).side(?).symbol(?).leverage(?).type(?).stopPriceType(?).reduceOnly(?).closeOrder(?).marginMode(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).triggerStopUpPrice(?).triggerStopDownPrice(?); AddTPSLOrderReq req = builder.build(); - AddTPSLOrderResp resp = this.api.addTPSLOrder(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->clientOid); - Logger::info($resp->jsonSerialize($this->serializer)); + AddTPSLOrderResp resp = api.addTPSLOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -49,15 +52,16 @@ * Cancel Order By OrderId * /api/v1/copy-trade/futures/orders */ - public void testCancelOrderById() { + @Test + public void testCancelOrderById() throws Exception { CancelOrderByIdReq.CancelOrderByIdReqBuilder builder = CancelOrderByIdReq.builder(); builder.orderId(?); CancelOrderByIdReq req = builder.build(); - CancelOrderByIdResp resp = this.api.cancelOrderById(req); - foreach($resp->cancelledOrderIds as $item) { - } + CancelOrderByIdResp resp = api.cancelOrderById(req); + resp.getCancelledOrderIds().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -65,13 +69,14 @@ * Cancel Order By ClientOid * /api/v1/copy-trade/futures/orders/client-order */ - public void testCancelOrderByClientOid() { + @Test + public void testCancelOrderByClientOid() throws Exception { CancelOrderByClientOidReq.CancelOrderByClientOidReqBuilder builder = CancelOrderByClientOidReq.builder(); builder.symbol(?).clientOid(?); CancelOrderByClientOidReq req = builder.build(); - CancelOrderByClientOidResp resp = this.api.cancelOrderByClientOid(req); - self::assertNotNull($resp->clientOid); - Logger::info($resp->jsonSerialize($this->serializer)); + CancelOrderByClientOidResp resp = api.cancelOrderByClientOid(req); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -79,15 +84,16 @@ * Get Max Open Size * /api/v1/copy-trade/futures/get-max-open-size */ - public void testGetMaxOpenSize() { + @Test + public void testGetMaxOpenSize() throws Exception { GetMaxOpenSizeReq.GetMaxOpenSizeReqBuilder builder = GetMaxOpenSizeReq.builder(); builder.symbol(?).price(?).leverage(?); GetMaxOpenSizeReq req = builder.build(); - GetMaxOpenSizeResp resp = this.api.getMaxOpenSize(req); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->maxBuyOpenSize); - self::assertNotNull($resp->maxSellOpenSize); - Logger::info($resp->jsonSerialize($this->serializer)); + GetMaxOpenSizeResp resp = api.getMaxOpenSize(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getMaxBuyOpenSize()); + Assertions.assertNotNull(resp.getMaxSellOpenSize()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -95,13 +101,14 @@ * Get Max Withdraw Margin * /api/v1/copy-trade/futures/position/margin/max-withdraw-margin */ - public void testGetMaxWithdrawMargin() { + @Test + public void testGetMaxWithdrawMargin() throws Exception { GetMaxWithdrawMarginReq.GetMaxWithdrawMarginReqBuilder builder = GetMaxWithdrawMarginReq.builder(); builder.symbol(?); GetMaxWithdrawMarginReq req = builder.build(); - GetMaxWithdrawMarginResp resp = this.api.getMaxWithdrawMargin(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + GetMaxWithdrawMarginResp resp = api.getMaxWithdrawMargin(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -109,48 +116,49 @@ * Add Isolated Margin * /api/v1/copy-trade/futures/position/margin/deposit-margin */ - public void testAddIsolatedMargin() { + @Test + public void testAddIsolatedMargin() throws Exception { AddIsolatedMarginReq.AddIsolatedMarginReqBuilder builder = AddIsolatedMarginReq.builder(); builder.symbol(?).margin(?).bizNo(?); AddIsolatedMarginReq req = builder.build(); - AddIsolatedMarginResp resp = this.api.addIsolatedMargin(req); - self::assertNotNull($resp->id); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->autoDeposit); - self::assertNotNull($resp->maintMarginReq); - self::assertNotNull($resp->riskLimit); - self::assertNotNull($resp->realLeverage); - self::assertNotNull($resp->crossMode); - self::assertNotNull($resp->delevPercentage); - self::assertNotNull($resp->openingTimestamp); - self::assertNotNull($resp->currentTimestamp); - self::assertNotNull($resp->currentQty); - self::assertNotNull($resp->currentCost); - self::assertNotNull($resp->currentComm); - self::assertNotNull($resp->unrealisedCost); - self::assertNotNull($resp->realisedGrossCost); - self::assertNotNull($resp->realisedCost); - self::assertNotNull($resp->isOpen); - self::assertNotNull($resp->markPrice); - self::assertNotNull($resp->markValue); - self::assertNotNull($resp->posCost); - self::assertNotNull($resp->posCross); - self::assertNotNull($resp->posInit); - self::assertNotNull($resp->posComm); - self::assertNotNull($resp->posLoss); - self::assertNotNull($resp->posMargin); - self::assertNotNull($resp->posMaint); - self::assertNotNull($resp->maintMargin); - self::assertNotNull($resp->realisedGrossPnl); - self::assertNotNull($resp->realisedPnl); - self::assertNotNull($resp->unrealisedPnl); - self::assertNotNull($resp->unrealisedPnlPcnt); - self::assertNotNull($resp->unrealisedRoePcnt); - self::assertNotNull($resp->avgEntryPrice); - self::assertNotNull($resp->liquidationPrice); - self::assertNotNull($resp->bankruptPrice); - self::assertNotNull($resp->settleCurrency); - Logger::info($resp->jsonSerialize($this->serializer)); + AddIsolatedMarginResp resp = api.addIsolatedMargin(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getAutoDeposit()); + Assertions.assertNotNull(resp.getMaintMarginReq()); + Assertions.assertNotNull(resp.getRiskLimit()); + Assertions.assertNotNull(resp.getRealLeverage()); + Assertions.assertNotNull(resp.getCrossMode()); + Assertions.assertNotNull(resp.getDelevPercentage()); + Assertions.assertNotNull(resp.getOpeningTimestamp()); + Assertions.assertNotNull(resp.getCurrentTimestamp()); + Assertions.assertNotNull(resp.getCurrentQty()); + Assertions.assertNotNull(resp.getCurrentCost()); + Assertions.assertNotNull(resp.getCurrentComm()); + Assertions.assertNotNull(resp.getUnrealisedCost()); + Assertions.assertNotNull(resp.getRealisedGrossCost()); + Assertions.assertNotNull(resp.getRealisedCost()); + Assertions.assertNotNull(resp.getIsOpen()); + Assertions.assertNotNull(resp.getMarkPrice()); + Assertions.assertNotNull(resp.getMarkValue()); + Assertions.assertNotNull(resp.getPosCost()); + Assertions.assertNotNull(resp.getPosCross()); + Assertions.assertNotNull(resp.getPosInit()); + Assertions.assertNotNull(resp.getPosComm()); + Assertions.assertNotNull(resp.getPosLoss()); + Assertions.assertNotNull(resp.getPosMargin()); + Assertions.assertNotNull(resp.getPosMaint()); + Assertions.assertNotNull(resp.getMaintMargin()); + Assertions.assertNotNull(resp.getRealisedGrossPnl()); + Assertions.assertNotNull(resp.getRealisedPnl()); + Assertions.assertNotNull(resp.getUnrealisedPnl()); + Assertions.assertNotNull(resp.getUnrealisedPnlPcnt()); + Assertions.assertNotNull(resp.getUnrealisedRoePcnt()); + Assertions.assertNotNull(resp.getAvgEntryPrice()); + Assertions.assertNotNull(resp.getLiquidationPrice()); + Assertions.assertNotNull(resp.getBankruptPrice()); + Assertions.assertNotNull(resp.getSettleCurrency()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -158,13 +166,14 @@ * Remove Isolated Margin * /api/v1/copy-trade/futures/position/margin/withdraw-margin */ - public void testRemoveIsolatedMargin() { + @Test + public void testRemoveIsolatedMargin() throws Exception { RemoveIsolatedMarginReq.RemoveIsolatedMarginReqBuilder builder = RemoveIsolatedMarginReq.builder(); builder.symbol(?).withdrawAmount(?); RemoveIsolatedMarginReq req = builder.build(); - RemoveIsolatedMarginResp resp = this.api.removeIsolatedMargin(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + RemoveIsolatedMarginResp resp = api.removeIsolatedMargin(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -172,13 +181,14 @@ * Modify Isolated Margin Risk Limit * /api/v1/copy-trade/futures/position/risk-limit-level/change */ - public void testModifyIsolatedMarginRiskLimt() { + @Test + public void testModifyIsolatedMarginRiskLimt() throws Exception { ModifyIsolatedMarginRiskLimtReq.ModifyIsolatedMarginRiskLimtReqBuilder builder = ModifyIsolatedMarginRiskLimtReq.builder(); builder.symbol(?).level(?); ModifyIsolatedMarginRiskLimtReq req = builder.build(); - ModifyIsolatedMarginRiskLimtResp resp = this.api.modifyIsolatedMarginRiskLimt(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + ModifyIsolatedMarginRiskLimtResp resp = api.modifyIsolatedMarginRiskLimt(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -186,12 +196,13 @@ * Modify Isolated Margin Auto-Deposit Status * /api/v1/copy-trade/futures/position/margin/auto-deposit-status */ - public void testModifyAutoDepositStatus() { + @Test + public void testModifyAutoDepositStatus() throws Exception { ModifyAutoDepositStatusReq.ModifyAutoDepositStatusReqBuilder builder = ModifyAutoDepositStatusReq.builder(); builder.symbol(?).status(?); ModifyAutoDepositStatusReq req = builder.build(); - ModifyAutoDepositStatusResp resp = this.api.modifyAutoDepositStatus(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + ModifyAutoDepositStatusResp resp = api.modifyAutoDepositStatus(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApi.template index d96a5284..7649191d 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/EarnApi.template @@ -4,14 +4,15 @@ * Purchase * /api/v1/earn/orders */ - public void testPurchase() { + @Test + public void testPurchase() throws Exception { PurchaseReq.PurchaseReqBuilder builder = PurchaseReq.builder(); builder.productId(?).amount(?).accountType(?); PurchaseReq req = builder.build(); - PurchaseResp resp = this.api.purchase(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->orderTxId); - Logger::info($resp->jsonSerialize($this->serializer)); + PurchaseResp resp = api.purchase(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getOrderTxId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -19,19 +20,20 @@ * Get Redeem Preview * /api/v1/earn/redeem-preview */ - public void testGetRedeemPreview() { + @Test + public void testGetRedeemPreview() throws Exception { GetRedeemPreviewReq.GetRedeemPreviewReqBuilder builder = GetRedeemPreviewReq.builder(); builder.orderId(?).fromAccountType(?); GetRedeemPreviewReq req = builder.build(); - GetRedeemPreviewResp resp = this.api.getRedeemPreview(req); - self::assertNotNull($resp->currency); - self::assertNotNull($resp->redeemAmount); - self::assertNotNull($resp->penaltyInterestAmount); - self::assertNotNull($resp->redeemPeriod); - self::assertNotNull($resp->deliverTime); - self::assertNotNull($resp->manualRedeemable); - self::assertNotNull($resp->redeemAll); - Logger::info($resp->jsonSerialize($this->serializer)); + GetRedeemPreviewResp resp = api.getRedeemPreview(req); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getRedeemAmount()); + Assertions.assertNotNull(resp.getPenaltyInterestAmount()); + Assertions.assertNotNull(resp.getRedeemPeriod()); + Assertions.assertNotNull(resp.getDeliverTime()); + Assertions.assertNotNull(resp.getManualRedeemable()); + Assertions.assertNotNull(resp.getRedeemAll()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -39,16 +41,17 @@ * Redeem * /api/v1/earn/orders */ - public void testRedeem() { + @Test + public void testRedeem() throws Exception { RedeemReq.RedeemReqBuilder builder = RedeemReq.builder(); builder.orderId(?).amount(?).fromAccountType(?).confirmPunishRedeem(?); RedeemReq req = builder.build(); - RedeemResp resp = this.api.redeem(req); - self::assertNotNull($resp->orderTxId); - self::assertNotNull($resp->deliverTime); - self::assertNotNull($resp->status); - self::assertNotNull($resp->amount); - Logger::info($resp->jsonSerialize($this->serializer)); + RedeemResp resp = api.redeem(req); + Assertions.assertNotNull(resp.getOrderTxId()); + Assertions.assertNotNull(resp.getDeliverTime()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getAmount()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -56,38 +59,39 @@ * Get Savings Products * /api/v1/earn/saving/products */ - public void testGetSavingsProducts() { + @Test + public void testGetSavingsProducts() throws Exception { GetSavingsProductsReq.GetSavingsProductsReqBuilder builder = GetSavingsProductsReq.builder(); builder.currency(?); GetSavingsProductsReq req = builder.build(); - GetSavingsProductsResp resp = this.api.getSavingsProducts(req); - foreach($resp->data as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->currency); - self::assertNotNull($item->category); - self::assertNotNull($item->type); - self::assertNotNull($item->precision); - self::assertNotNull($item->productUpperLimit); - self::assertNotNull($item->userUpperLimit); - self::assertNotNull($item->userLowerLimit); - self::assertNotNull($item->redeemPeriod); - self::assertNotNull($item->lockStartTime); - self::assertNotNull($item->lockEndTime); - self::assertNotNull($item->applyStartTime); - self::assertNotNull($item->applyEndTime); - self::assertNotNull($item->returnRate); - self::assertNotNull($item->incomeCurrency); - self::assertNotNull($item->earlyRedeemSupported); - self::assertNotNull($item->productRemainAmount); - self::assertNotNull($item->status); - self::assertNotNull($item->redeemType); - self::assertNotNull($item->incomeReleaseType); - self::assertNotNull($item->interestDate); - self::assertNotNull($item->duration); - self::assertNotNull($item->newUserOnly); - } + GetSavingsProductsResp resp = api.getSavingsProducts(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getCategory()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getPrecision()); + Assertions.assertNotNull(item.getProductUpperLimit()); + Assertions.assertNotNull(item.getUserUpperLimit()); + Assertions.assertNotNull(item.getUserLowerLimit()); + Assertions.assertNotNull(item.getRedeemPeriod()); + Assertions.assertNotNull(item.getLockStartTime()); + Assertions.assertNotNull(item.getLockEndTime()); + Assertions.assertNotNull(item.getApplyStartTime()); + Assertions.assertNotNull(item.getApplyEndTime()); + Assertions.assertNotNull(item.getReturnRate()); + Assertions.assertNotNull(item.getIncomeCurrency()); + Assertions.assertNotNull(item.getEarlyRedeemSupported()); + Assertions.assertNotNull(item.getProductRemainAmount()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getRedeemType()); + Assertions.assertNotNull(item.getIncomeReleaseType()); + Assertions.assertNotNull(item.getInterestDate()); + Assertions.assertNotNull(item.getDuration()); + Assertions.assertNotNull(item.getNewUserOnly()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -95,38 +99,39 @@ * Get Promotion Products * /api/v1/earn/promotion/products */ - public void testGetPromotionProducts() { + @Test + public void testGetPromotionProducts() throws Exception { GetPromotionProductsReq.GetPromotionProductsReqBuilder builder = GetPromotionProductsReq.builder(); builder.currency(?); GetPromotionProductsReq req = builder.build(); - GetPromotionProductsResp resp = this.api.getPromotionProducts(req); - foreach($resp->data as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->currency); - self::assertNotNull($item->category); - self::assertNotNull($item->type); - self::assertNotNull($item->precision); - self::assertNotNull($item->productUpperLimit); - self::assertNotNull($item->userUpperLimit); - self::assertNotNull($item->userLowerLimit); - self::assertNotNull($item->redeemPeriod); - self::assertNotNull($item->lockStartTime); - self::assertNotNull($item->lockEndTime); - self::assertNotNull($item->applyStartTime); - self::assertNotNull($item->applyEndTime); - self::assertNotNull($item->returnRate); - self::assertNotNull($item->incomeCurrency); - self::assertNotNull($item->earlyRedeemSupported); - self::assertNotNull($item->productRemainAmount); - self::assertNotNull($item->status); - self::assertNotNull($item->redeemType); - self::assertNotNull($item->incomeReleaseType); - self::assertNotNull($item->interestDate); - self::assertNotNull($item->duration); - self::assertNotNull($item->newUserOnly); - } + GetPromotionProductsResp resp = api.getPromotionProducts(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getCategory()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getPrecision()); + Assertions.assertNotNull(item.getProductUpperLimit()); + Assertions.assertNotNull(item.getUserUpperLimit()); + Assertions.assertNotNull(item.getUserLowerLimit()); + Assertions.assertNotNull(item.getRedeemPeriod()); + Assertions.assertNotNull(item.getLockStartTime()); + Assertions.assertNotNull(item.getLockEndTime()); + Assertions.assertNotNull(item.getApplyStartTime()); + Assertions.assertNotNull(item.getApplyEndTime()); + Assertions.assertNotNull(item.getReturnRate()); + Assertions.assertNotNull(item.getIncomeCurrency()); + Assertions.assertNotNull(item.getEarlyRedeemSupported()); + Assertions.assertNotNull(item.getProductRemainAmount()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getRedeemType()); + Assertions.assertNotNull(item.getIncomeReleaseType()); + Assertions.assertNotNull(item.getInterestDate()); + Assertions.assertNotNull(item.getDuration()); + Assertions.assertNotNull(item.getNewUserOnly()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -134,38 +139,39 @@ * Get Staking Products * /api/v1/earn/staking/products */ - public void testGetStakingProducts() { + @Test + public void testGetStakingProducts() throws Exception { GetStakingProductsReq.GetStakingProductsReqBuilder builder = GetStakingProductsReq.builder(); builder.currency(?); GetStakingProductsReq req = builder.build(); - GetStakingProductsResp resp = this.api.getStakingProducts(req); - foreach($resp->data as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->currency); - self::assertNotNull($item->category); - self::assertNotNull($item->type); - self::assertNotNull($item->precision); - self::assertNotNull($item->productUpperLimit); - self::assertNotNull($item->userUpperLimit); - self::assertNotNull($item->userLowerLimit); - self::assertNotNull($item->redeemPeriod); - self::assertNotNull($item->lockStartTime); - self::assertNotNull($item->lockEndTime); - self::assertNotNull($item->applyStartTime); - self::assertNotNull($item->applyEndTime); - self::assertNotNull($item->returnRate); - self::assertNotNull($item->incomeCurrency); - self::assertNotNull($item->earlyRedeemSupported); - self::assertNotNull($item->productRemainAmount); - self::assertNotNull($item->status); - self::assertNotNull($item->redeemType); - self::assertNotNull($item->incomeReleaseType); - self::assertNotNull($item->interestDate); - self::assertNotNull($item->duration); - self::assertNotNull($item->newUserOnly); - } + GetStakingProductsResp resp = api.getStakingProducts(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getCategory()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getPrecision()); + Assertions.assertNotNull(item.getProductUpperLimit()); + Assertions.assertNotNull(item.getUserUpperLimit()); + Assertions.assertNotNull(item.getUserLowerLimit()); + Assertions.assertNotNull(item.getRedeemPeriod()); + Assertions.assertNotNull(item.getLockStartTime()); + Assertions.assertNotNull(item.getLockEndTime()); + Assertions.assertNotNull(item.getApplyStartTime()); + Assertions.assertNotNull(item.getApplyEndTime()); + Assertions.assertNotNull(item.getReturnRate()); + Assertions.assertNotNull(item.getIncomeCurrency()); + Assertions.assertNotNull(item.getEarlyRedeemSupported()); + Assertions.assertNotNull(item.getProductRemainAmount()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getRedeemType()); + Assertions.assertNotNull(item.getIncomeReleaseType()); + Assertions.assertNotNull(item.getInterestDate()); + Assertions.assertNotNull(item.getDuration()); + Assertions.assertNotNull(item.getNewUserOnly()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -173,38 +179,39 @@ * Get KCS Staking Products * /api/v1/earn/kcs-staking/products */ - public void testGetKcsStakingProducts() { + @Test + public void testGetKcsStakingProducts() throws Exception { GetKcsStakingProductsReq.GetKcsStakingProductsReqBuilder builder = GetKcsStakingProductsReq.builder(); builder.currency(?); GetKcsStakingProductsReq req = builder.build(); - GetKcsStakingProductsResp resp = this.api.getKcsStakingProducts(req); - foreach($resp->data as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->currency); - self::assertNotNull($item->category); - self::assertNotNull($item->type); - self::assertNotNull($item->precision); - self::assertNotNull($item->productUpperLimit); - self::assertNotNull($item->userUpperLimit); - self::assertNotNull($item->userLowerLimit); - self::assertNotNull($item->redeemPeriod); - self::assertNotNull($item->lockStartTime); - self::assertNotNull($item->lockEndTime); - self::assertNotNull($item->applyStartTime); - self::assertNotNull($item->applyEndTime); - self::assertNotNull($item->returnRate); - self::assertNotNull($item->incomeCurrency); - self::assertNotNull($item->earlyRedeemSupported); - self::assertNotNull($item->productRemainAmount); - self::assertNotNull($item->status); - self::assertNotNull($item->redeemType); - self::assertNotNull($item->incomeReleaseType); - self::assertNotNull($item->interestDate); - self::assertNotNull($item->duration); - self::assertNotNull($item->newUserOnly); - } + GetKcsStakingProductsResp resp = api.getKcsStakingProducts(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getCategory()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getPrecision()); + Assertions.assertNotNull(item.getProductUpperLimit()); + Assertions.assertNotNull(item.getUserUpperLimit()); + Assertions.assertNotNull(item.getUserLowerLimit()); + Assertions.assertNotNull(item.getRedeemPeriod()); + Assertions.assertNotNull(item.getLockStartTime()); + Assertions.assertNotNull(item.getLockEndTime()); + Assertions.assertNotNull(item.getApplyStartTime()); + Assertions.assertNotNull(item.getApplyEndTime()); + Assertions.assertNotNull(item.getReturnRate()); + Assertions.assertNotNull(item.getIncomeCurrency()); + Assertions.assertNotNull(item.getEarlyRedeemSupported()); + Assertions.assertNotNull(item.getProductRemainAmount()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getRedeemType()); + Assertions.assertNotNull(item.getIncomeReleaseType()); + Assertions.assertNotNull(item.getInterestDate()); + Assertions.assertNotNull(item.getDuration()); + Assertions.assertNotNull(item.getNewUserOnly()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -212,38 +219,39 @@ * Get ETH Staking Products * /api/v1/earn/eth-staking/products */ - public void testGetETHStakingProducts() { + @Test + public void testGetETHStakingProducts() throws Exception { GetETHStakingProductsReq.GetETHStakingProductsReqBuilder builder = GetETHStakingProductsReq.builder(); builder.currency(?); GetETHStakingProductsReq req = builder.build(); - GetETHStakingProductsResp resp = this.api.getETHStakingProducts(req); - foreach($resp->data as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->category); - self::assertNotNull($item->type); - self::assertNotNull($item->precision); - self::assertNotNull($item->currency); - self::assertNotNull($item->incomeCurrency); - self::assertNotNull($item->returnRate); - self::assertNotNull($item->userLowerLimit); - self::assertNotNull($item->userUpperLimit); - self::assertNotNull($item->productUpperLimit); - self::assertNotNull($item->productRemainAmount); - self::assertNotNull($item->redeemPeriod); - self::assertNotNull($item->redeemType); - self::assertNotNull($item->incomeReleaseType); - self::assertNotNull($item->applyStartTime); - self::assertNotNull($item->applyEndTime); - self::assertNotNull($item->lockStartTime); - self::assertNotNull($item->lockEndTime); - self::assertNotNull($item->interestDate); - self::assertNotNull($item->newUserOnly); - self::assertNotNull($item->earlyRedeemSupported); - self::assertNotNull($item->duration); - self::assertNotNull($item->status); - } + GetETHStakingProductsResp resp = api.getETHStakingProducts(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCategory()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getPrecision()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getIncomeCurrency()); + Assertions.assertNotNull(item.getReturnRate()); + Assertions.assertNotNull(item.getUserLowerLimit()); + Assertions.assertNotNull(item.getUserUpperLimit()); + Assertions.assertNotNull(item.getProductUpperLimit()); + Assertions.assertNotNull(item.getProductRemainAmount()); + Assertions.assertNotNull(item.getRedeemPeriod()); + Assertions.assertNotNull(item.getRedeemType()); + Assertions.assertNotNull(item.getIncomeReleaseType()); + Assertions.assertNotNull(item.getApplyStartTime()); + Assertions.assertNotNull(item.getApplyEndTime()); + Assertions.assertNotNull(item.getLockStartTime()); + Assertions.assertNotNull(item.getLockEndTime()); + Assertions.assertNotNull(item.getInterestDate()); + Assertions.assertNotNull(item.getNewUserOnly()); + Assertions.assertNotNull(item.getEarlyRedeemSupported()); + Assertions.assertNotNull(item.getDuration()); + Assertions.assertNotNull(item.getStatus()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -251,34 +259,35 @@ * Get Account Holding * /api/v1/earn/hold-assets */ - public void testGetAccountHolding() { + @Test + public void testGetAccountHolding() throws Exception { GetAccountHoldingReq.GetAccountHoldingReqBuilder builder = GetAccountHoldingReq.builder(); builder.currency(?).productId(?).productCategory(?).currentPage(?).pageSize(?); GetAccountHoldingReq req = builder.build(); - GetAccountHoldingResp resp = this.api.getAccountHolding(req); - self::assertNotNull($resp->totalNum); - foreach($resp->items as $item) { - self::assertNotNull($item->orderId); - self::assertNotNull($item->productId); - self::assertNotNull($item->productCategory); - self::assertNotNull($item->productType); - self::assertNotNull($item->currency); - self::assertNotNull($item->incomeCurrency); - self::assertNotNull($item->returnRate); - self::assertNotNull($item->holdAmount); - self::assertNotNull($item->redeemedAmount); - self::assertNotNull($item->redeemingAmount); - self::assertNotNull($item->lockStartTime); - self::assertNotNull($item->lockEndTime); - self::assertNotNull($item->purchaseTime); - self::assertNotNull($item->redeemPeriod); - self::assertNotNull($item->status); - self::assertNotNull($item->earlyRedeemSupported); - } + GetAccountHoldingResp resp = api.getAccountHolding(req); + Assertions.assertNotNull(resp.getTotalNum()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getProductId()); + Assertions.assertNotNull(item.getProductCategory()); + Assertions.assertNotNull(item.getProductType()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getIncomeCurrency()); + Assertions.assertNotNull(item.getReturnRate()); + Assertions.assertNotNull(item.getHoldAmount()); + Assertions.assertNotNull(item.getRedeemedAmount()); + Assertions.assertNotNull(item.getRedeemingAmount()); + Assertions.assertNotNull(item.getLockStartTime()); + Assertions.assertNotNull(item.getLockEndTime()); + Assertions.assertNotNull(item.getPurchaseTime()); + Assertions.assertNotNull(item.getRedeemPeriod()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getEarlyRedeemSupported()); + }); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalPage); - Logger::info($resp->jsonSerialize($this->serializer)); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalPage()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApi.template index db51c248..3e29fb86 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/FundingFeesApi.template @@ -4,21 +4,22 @@ * Get Current Funding Rate * /api/v1/funding-rate/{symbol}/current */ - public void testGetCurrentFundingRate() { + @Test + public void testGetCurrentFundingRate() throws Exception { GetCurrentFundingRateReq.GetCurrentFundingRateReqBuilder builder = GetCurrentFundingRateReq.builder(); builder.symbol(?); GetCurrentFundingRateReq req = builder.build(); - GetCurrentFundingRateResp resp = this.api.getCurrentFundingRate(req); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->granularity); - self::assertNotNull($resp->timePoint); - self::assertNotNull($resp->value); - self::assertNotNull($resp->predictedValue); - self::assertNotNull($resp->fundingRateCap); - self::assertNotNull($resp->fundingRateFloor); - self::assertNotNull($resp->period); - self::assertNotNull($resp->fundingTime); - Logger::info($resp->jsonSerialize($this->serializer)); + GetCurrentFundingRateResp resp = api.getCurrentFundingRate(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getGranularity()); + Assertions.assertNotNull(resp.getTimePoint()); + Assertions.assertNotNull(resp.getValue()); + Assertions.assertNotNull(resp.getPredictedValue()); + Assertions.assertNotNull(resp.getFundingRateCap()); + Assertions.assertNotNull(resp.getFundingRateFloor()); + Assertions.assertNotNull(resp.getPeriod()); + Assertions.assertNotNull(resp.getFundingTime()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -26,18 +27,19 @@ * Get Public Funding History * /api/v1/contract/funding-rates */ - public void testGetPublicFundingHistory() { + @Test + public void testGetPublicFundingHistory() throws Exception { GetPublicFundingHistoryReq.GetPublicFundingHistoryReqBuilder builder = GetPublicFundingHistoryReq.builder(); builder.symbol(?).from(?).to(?); GetPublicFundingHistoryReq req = builder.build(); - GetPublicFundingHistoryResp resp = this.api.getPublicFundingHistory(req); - foreach($resp->data as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->fundingRate); - self::assertNotNull($item->timepoint); - } + GetPublicFundingHistoryResp resp = api.getPublicFundingHistory(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getFundingRate()); + Assertions.assertNotNull(item.getTimepoint()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -45,26 +47,27 @@ * Get Private Funding History * /api/v1/funding-history */ - public void testGetPrivateFundingHistory() { + @Test + public void testGetPrivateFundingHistory() throws Exception { GetPrivateFundingHistoryReq.GetPrivateFundingHistoryReqBuilder builder = GetPrivateFundingHistoryReq.builder(); builder.symbol(?).startAt(?).endAt(?).reverse(?).offset(?).forward(?).maxCount(?); GetPrivateFundingHistoryReq req = builder.build(); - GetPrivateFundingHistoryResp resp = this.api.getPrivateFundingHistory(req); - foreach($resp->dataList as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->symbol); - self::assertNotNull($item->timePoint); - self::assertNotNull($item->fundingRate); - self::assertNotNull($item->markPrice); - self::assertNotNull($item->positionQty); - self::assertNotNull($item->positionCost); - self::assertNotNull($item->funding); - self::assertNotNull($item->settleCurrency); - self::assertNotNull($item->context); - self::assertNotNull($item->marginMode); - } + GetPrivateFundingHistoryResp resp = api.getPrivateFundingHistory(req); + resp.getDataList().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTimePoint()); + Assertions.assertNotNull(item.getFundingRate()); + Assertions.assertNotNull(item.getMarkPrice()); + Assertions.assertNotNull(item.getPositionQty()); + Assertions.assertNotNull(item.getPositionCost()); + Assertions.assertNotNull(item.getFunding()); + Assertions.assertNotNull(item.getSettleCurrency()); + Assertions.assertNotNull(item.getContext()); + Assertions.assertNotNull(item.getMarginMode()); + }); - self::assertNotNull($resp->hasMore); - Logger::info($resp->jsonSerialize($this->serializer)); + Assertions.assertNotNull(resp.getHasMore()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApi.template index b6c038f0..d3e92954 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/MarketApi.template @@ -4,78 +4,79 @@ * Get Symbol * /api/v1/contracts/{symbol} */ - public void testGetSymbol() { + @Test + public void testGetSymbol() throws Exception { GetSymbolReq.GetSymbolReqBuilder builder = GetSymbolReq.builder(); builder.symbol(?); GetSymbolReq req = builder.build(); - GetSymbolResp resp = this.api.getSymbol(req); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->rootSymbol); - self::assertNotNull($resp->type); - self::assertNotNull($resp->firstOpenDate); - self::assertNotNull($resp->expireDate); - self::assertNotNull($resp->settleDate); - self::assertNotNull($resp->baseCurrency); - self::assertNotNull($resp->quoteCurrency); - self::assertNotNull($resp->settleCurrency); - self::assertNotNull($resp->maxOrderQty); - self::assertNotNull($resp->maxPrice); - self::assertNotNull($resp->lotSize); - self::assertNotNull($resp->tickSize); - self::assertNotNull($resp->indexPriceTickSize); - self::assertNotNull($resp->multiplier); - self::assertNotNull($resp->initialMargin); - self::assertNotNull($resp->maintainMargin); - self::assertNotNull($resp->maxRiskLimit); - self::assertNotNull($resp->minRiskLimit); - self::assertNotNull($resp->riskStep); - self::assertNotNull($resp->makerFeeRate); - self::assertNotNull($resp->takerFeeRate); - self::assertNotNull($resp->takerFixFee); - self::assertNotNull($resp->makerFixFee); - self::assertNotNull($resp->settlementFee); - self::assertNotNull($resp->isDeleverage); - self::assertNotNull($resp->isQuanto); - self::assertNotNull($resp->isInverse); - self::assertNotNull($resp->markMethod); - self::assertNotNull($resp->fairMethod); - self::assertNotNull($resp->fundingBaseSymbol); - self::assertNotNull($resp->fundingQuoteSymbol); - self::assertNotNull($resp->fundingRateSymbol); - self::assertNotNull($resp->indexSymbol); - self::assertNotNull($resp->settlementSymbol); - self::assertNotNull($resp->status); - self::assertNotNull($resp->fundingFeeRate); - self::assertNotNull($resp->predictedFundingFeeRate); - self::assertNotNull($resp->fundingRateGranularity); - self::assertNotNull($resp->openInterest); - self::assertNotNull($resp->turnoverOf24h); - self::assertNotNull($resp->volumeOf24h); - self::assertNotNull($resp->markPrice); - self::assertNotNull($resp->indexPrice); - self::assertNotNull($resp->lastTradePrice); - self::assertNotNull($resp->nextFundingRateTime); - self::assertNotNull($resp->maxLeverage); - foreach($resp->sourceExchanges as $item) { - } - - self::assertNotNull($resp->premiumsSymbol1M); - self::assertNotNull($resp->premiumsSymbol8H); - self::assertNotNull($resp->fundingBaseSymbol1M); - self::assertNotNull($resp->fundingQuoteSymbol1M); - self::assertNotNull($resp->lowPrice); - self::assertNotNull($resp->highPrice); - self::assertNotNull($resp->priceChgPct); - self::assertNotNull($resp->priceChg); - self::assertNotNull($resp->k); - self::assertNotNull($resp->m); - self::assertNotNull($resp->f); - self::assertNotNull($resp->mmrLimit); - self::assertNotNull($resp->mmrLevConstant); - self::assertNotNull($resp->supportCross); - self::assertNotNull($resp->buyLimit); - self::assertNotNull($resp->sellLimit); - Logger::info($resp->jsonSerialize($this->serializer)); + GetSymbolResp resp = api.getSymbol(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getRootSymbol()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getFirstOpenDate()); + Assertions.assertNotNull(resp.getExpireDate()); + Assertions.assertNotNull(resp.getSettleDate()); + Assertions.assertNotNull(resp.getBaseCurrency()); + Assertions.assertNotNull(resp.getQuoteCurrency()); + Assertions.assertNotNull(resp.getSettleCurrency()); + Assertions.assertNotNull(resp.getMaxOrderQty()); + Assertions.assertNotNull(resp.getMaxPrice()); + Assertions.assertNotNull(resp.getLotSize()); + Assertions.assertNotNull(resp.getTickSize()); + Assertions.assertNotNull(resp.getIndexPriceTickSize()); + Assertions.assertNotNull(resp.getMultiplier()); + Assertions.assertNotNull(resp.getInitialMargin()); + Assertions.assertNotNull(resp.getMaintainMargin()); + Assertions.assertNotNull(resp.getMaxRiskLimit()); + Assertions.assertNotNull(resp.getMinRiskLimit()); + Assertions.assertNotNull(resp.getRiskStep()); + Assertions.assertNotNull(resp.getMakerFeeRate()); + Assertions.assertNotNull(resp.getTakerFeeRate()); + Assertions.assertNotNull(resp.getTakerFixFee()); + Assertions.assertNotNull(resp.getMakerFixFee()); + Assertions.assertNotNull(resp.getSettlementFee()); + Assertions.assertNotNull(resp.getIsDeleverage()); + Assertions.assertNotNull(resp.getIsQuanto()); + Assertions.assertNotNull(resp.getIsInverse()); + Assertions.assertNotNull(resp.getMarkMethod()); + Assertions.assertNotNull(resp.getFairMethod()); + Assertions.assertNotNull(resp.getFundingBaseSymbol()); + Assertions.assertNotNull(resp.getFundingQuoteSymbol()); + Assertions.assertNotNull(resp.getFundingRateSymbol()); + Assertions.assertNotNull(resp.getIndexSymbol()); + Assertions.assertNotNull(resp.getSettlementSymbol()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getFundingFeeRate()); + Assertions.assertNotNull(resp.getPredictedFundingFeeRate()); + Assertions.assertNotNull(resp.getFundingRateGranularity()); + Assertions.assertNotNull(resp.getOpenInterest()); + Assertions.assertNotNull(resp.getTurnoverOf24h()); + Assertions.assertNotNull(resp.getVolumeOf24h()); + Assertions.assertNotNull(resp.getMarkPrice()); + Assertions.assertNotNull(resp.getIndexPrice()); + Assertions.assertNotNull(resp.getLastTradePrice()); + Assertions.assertNotNull(resp.getNextFundingRateTime()); + Assertions.assertNotNull(resp.getMaxLeverage()); + resp.getSourceExchanges().forEach( item -> { + }); + + Assertions.assertNotNull(resp.getPremiumsSymbol1M()); + Assertions.assertNotNull(resp.getPremiumsSymbol8H()); + Assertions.assertNotNull(resp.getFundingBaseSymbol1M()); + Assertions.assertNotNull(resp.getFundingQuoteSymbol1M()); + Assertions.assertNotNull(resp.getLowPrice()); + Assertions.assertNotNull(resp.getHighPrice()); + Assertions.assertNotNull(resp.getPriceChgPct()); + Assertions.assertNotNull(resp.getPriceChg()); + Assertions.assertNotNull(resp.getK()); + Assertions.assertNotNull(resp.getM()); + Assertions.assertNotNull(resp.getF()); + Assertions.assertNotNull(resp.getMmrLimit()); + Assertions.assertNotNull(resp.getMmrLevConstant()); + Assertions.assertNotNull(resp.getSupportCross()); + Assertions.assertNotNull(resp.getBuyLimit()); + Assertions.assertNotNull(resp.getSellLimit()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -83,76 +84,77 @@ * Get All Symbols * /api/v1/contracts/active */ - public void testGetAllSymbols() { - GetAllSymbolsResp resp = this.api.getAllSymbols(); - foreach($resp->data as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->rootSymbol); - self::assertNotNull($item->type); - self::assertNotNull($item->firstOpenDate); - self::assertNotNull($item->expireDate); - self::assertNotNull($item->settleDate); - self::assertNotNull($item->baseCurrency); - self::assertNotNull($item->quoteCurrency); - self::assertNotNull($item->settleCurrency); - self::assertNotNull($item->maxOrderQty); - self::assertNotNull($item->maxPrice); - self::assertNotNull($item->lotSize); - self::assertNotNull($item->tickSize); - self::assertNotNull($item->indexPriceTickSize); - self::assertNotNull($item->multiplier); - self::assertNotNull($item->initialMargin); - self::assertNotNull($item->maintainMargin); - self::assertNotNull($item->maxRiskLimit); - self::assertNotNull($item->minRiskLimit); - self::assertNotNull($item->riskStep); - self::assertNotNull($item->makerFeeRate); - self::assertNotNull($item->takerFeeRate); - self::assertNotNull($item->takerFixFee); - self::assertNotNull($item->makerFixFee); - self::assertNotNull($item->settlementFee); - self::assertNotNull($item->isDeleverage); - self::assertNotNull($item->isQuanto); - self::assertNotNull($item->isInverse); - self::assertNotNull($item->markMethod); - self::assertNotNull($item->fairMethod); - self::assertNotNull($item->fundingBaseSymbol); - self::assertNotNull($item->fundingQuoteSymbol); - self::assertNotNull($item->fundingRateSymbol); - self::assertNotNull($item->indexSymbol); - self::assertNotNull($item->settlementSymbol); - self::assertNotNull($item->status); - self::assertNotNull($item->fundingFeeRate); - self::assertNotNull($item->predictedFundingFeeRate); - self::assertNotNull($item->fundingRateGranularity); - self::assertNotNull($item->openInterest); - self::assertNotNull($item->turnoverOf24h); - self::assertNotNull($item->volumeOf24h); - self::assertNotNull($item->markPrice); - self::assertNotNull($item->indexPrice); - self::assertNotNull($item->lastTradePrice); - self::assertNotNull($item->nextFundingRateTime); - self::assertNotNull($item->maxLeverage); - self::assertNotNull($item->sourceExchanges); - self::assertNotNull($item->premiumsSymbol1M); - self::assertNotNull($item->premiumsSymbol8H); - self::assertNotNull($item->fundingBaseSymbol1M); - self::assertNotNull($item->fundingQuoteSymbol1M); - self::assertNotNull($item->lowPrice); - self::assertNotNull($item->highPrice); - self::assertNotNull($item->priceChgPct); - self::assertNotNull($item->priceChg); - self::assertNotNull($item->k); - self::assertNotNull($item->m); - self::assertNotNull($item->f); - self::assertNotNull($item->mmrLimit); - self::assertNotNull($item->mmrLevConstant); - self::assertNotNull($item->supportCross); - self::assertNotNull($item->buyLimit); - self::assertNotNull($item->sellLimit); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetAllSymbols() throws Exception { + GetAllSymbolsResp resp = api.getAllSymbols(); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getRootSymbol()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getFirstOpenDate()); + Assertions.assertNotNull(item.getExpireDate()); + Assertions.assertNotNull(item.getSettleDate()); + Assertions.assertNotNull(item.getBaseCurrency()); + Assertions.assertNotNull(item.getQuoteCurrency()); + Assertions.assertNotNull(item.getSettleCurrency()); + Assertions.assertNotNull(item.getMaxOrderQty()); + Assertions.assertNotNull(item.getMaxPrice()); + Assertions.assertNotNull(item.getLotSize()); + Assertions.assertNotNull(item.getTickSize()); + Assertions.assertNotNull(item.getIndexPriceTickSize()); + Assertions.assertNotNull(item.getMultiplier()); + Assertions.assertNotNull(item.getInitialMargin()); + Assertions.assertNotNull(item.getMaintainMargin()); + Assertions.assertNotNull(item.getMaxRiskLimit()); + Assertions.assertNotNull(item.getMinRiskLimit()); + Assertions.assertNotNull(item.getRiskStep()); + Assertions.assertNotNull(item.getMakerFeeRate()); + Assertions.assertNotNull(item.getTakerFeeRate()); + Assertions.assertNotNull(item.getTakerFixFee()); + Assertions.assertNotNull(item.getMakerFixFee()); + Assertions.assertNotNull(item.getSettlementFee()); + Assertions.assertNotNull(item.getIsDeleverage()); + Assertions.assertNotNull(item.getIsQuanto()); + Assertions.assertNotNull(item.getIsInverse()); + Assertions.assertNotNull(item.getMarkMethod()); + Assertions.assertNotNull(item.getFairMethod()); + Assertions.assertNotNull(item.getFundingBaseSymbol()); + Assertions.assertNotNull(item.getFundingQuoteSymbol()); + Assertions.assertNotNull(item.getFundingRateSymbol()); + Assertions.assertNotNull(item.getIndexSymbol()); + Assertions.assertNotNull(item.getSettlementSymbol()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getFundingFeeRate()); + Assertions.assertNotNull(item.getPredictedFundingFeeRate()); + Assertions.assertNotNull(item.getFundingRateGranularity()); + Assertions.assertNotNull(item.getOpenInterest()); + Assertions.assertNotNull(item.getTurnoverOf24h()); + Assertions.assertNotNull(item.getVolumeOf24h()); + Assertions.assertNotNull(item.getMarkPrice()); + Assertions.assertNotNull(item.getIndexPrice()); + Assertions.assertNotNull(item.getLastTradePrice()); + Assertions.assertNotNull(item.getNextFundingRateTime()); + Assertions.assertNotNull(item.getMaxLeverage()); + Assertions.assertNotNull(item.getSourceExchanges()); + Assertions.assertNotNull(item.getPremiumsSymbol1M()); + Assertions.assertNotNull(item.getPremiumsSymbol8H()); + Assertions.assertNotNull(item.getFundingBaseSymbol1M()); + Assertions.assertNotNull(item.getFundingQuoteSymbol1M()); + Assertions.assertNotNull(item.getLowPrice()); + Assertions.assertNotNull(item.getHighPrice()); + Assertions.assertNotNull(item.getPriceChgPct()); + Assertions.assertNotNull(item.getPriceChg()); + Assertions.assertNotNull(item.getK()); + Assertions.assertNotNull(item.getM()); + Assertions.assertNotNull(item.getF()); + Assertions.assertNotNull(item.getMmrLimit()); + Assertions.assertNotNull(item.getMmrLevConstant()); + Assertions.assertNotNull(item.getSupportCross()); + Assertions.assertNotNull(item.getBuyLimit()); + Assertions.assertNotNull(item.getSellLimit()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -160,23 +162,24 @@ * Get Ticker * /api/v1/ticker */ - public void testGetTicker() { + @Test + public void testGetTicker() throws Exception { GetTickerReq.GetTickerReqBuilder builder = GetTickerReq.builder(); builder.symbol(?); GetTickerReq req = builder.build(); - GetTickerResp resp = this.api.getTicker(req); - self::assertNotNull($resp->sequence); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->side); - self::assertNotNull($resp->size); - self::assertNotNull($resp->tradeId); - self::assertNotNull($resp->price); - self::assertNotNull($resp->bestBidPrice); - self::assertNotNull($resp->bestBidSize); - self::assertNotNull($resp->bestAskPrice); - self::assertNotNull($resp->bestAskSize); - self::assertNotNull($resp->ts); - Logger::info($resp->jsonSerialize($this->serializer)); + GetTickerResp resp = api.getTicker(req); + Assertions.assertNotNull(resp.getSequence()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getTradeId()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getBestBidPrice()); + Assertions.assertNotNull(resp.getBestBidSize()); + Assertions.assertNotNull(resp.getBestAskPrice()); + Assertions.assertNotNull(resp.getBestAskSize()); + Assertions.assertNotNull(resp.getTs()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -184,23 +187,24 @@ * Get All Tickers * /api/v1/allTickers */ - public void testGetAllTickers() { - GetAllTickersResp resp = this.api.getAllTickers(); - foreach($resp->data as $item) { - self::assertNotNull($item->sequence); - self::assertNotNull($item->symbol); - self::assertNotNull($item->side); - self::assertNotNull($item->size); - self::assertNotNull($item->tradeId); - self::assertNotNull($item->price); - self::assertNotNull($item->bestBidPrice); - self::assertNotNull($item->bestBidSize); - self::assertNotNull($item->bestAskPrice); - self::assertNotNull($item->bestAskSize); - self::assertNotNull($item->ts); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetAllTickers() throws Exception { + GetAllTickersResp resp = api.getAllTickers(); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getSequence()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getTradeId()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getBestBidPrice()); + Assertions.assertNotNull(item.getBestBidSize()); + Assertions.assertNotNull(item.getBestAskPrice()); + Assertions.assertNotNull(item.getBestAskSize()); + Assertions.assertNotNull(item.getTs()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -208,21 +212,22 @@ * Get Full OrderBook * /api/v1/level2/snapshot */ - public void testGetFullOrderBook() { + @Test + public void testGetFullOrderBook() throws Exception { GetFullOrderBookReq.GetFullOrderBookReqBuilder builder = GetFullOrderBookReq.builder(); builder.symbol(?); GetFullOrderBookReq req = builder.build(); - GetFullOrderBookResp resp = this.api.getFullOrderBook(req); - self::assertNotNull($resp->sequence); - self::assertNotNull($resp->symbol); - foreach($resp->bids as $item) { - } + GetFullOrderBookResp resp = api.getFullOrderBook(req); + Assertions.assertNotNull(resp.getSequence()); + Assertions.assertNotNull(resp.getSymbol()); + resp.getBids().forEach( item -> { + }); - foreach($resp->asks as $item) { - } + resp.getAsks().forEach( item -> { + }); - self::assertNotNull($resp->ts); - Logger::info($resp->jsonSerialize($this->serializer)); + Assertions.assertNotNull(resp.getTs()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -230,21 +235,22 @@ * Get Part OrderBook * /api/v1/level2/depth{size} */ - public void testGetPartOrderBook() { + @Test + public void testGetPartOrderBook() throws Exception { GetPartOrderBookReq.GetPartOrderBookReqBuilder builder = GetPartOrderBookReq.builder(); builder.size(?).symbol(?); GetPartOrderBookReq req = builder.build(); - GetPartOrderBookResp resp = this.api.getPartOrderBook(req); - self::assertNotNull($resp->sequence); - self::assertNotNull($resp->symbol); - foreach($resp->bids as $item) { - } + GetPartOrderBookResp resp = api.getPartOrderBook(req); + Assertions.assertNotNull(resp.getSequence()); + Assertions.assertNotNull(resp.getSymbol()); + resp.getBids().forEach( item -> { + }); - foreach($resp->asks as $item) { - } + resp.getAsks().forEach( item -> { + }); - self::assertNotNull($resp->ts); - Logger::info($resp->jsonSerialize($this->serializer)); + Assertions.assertNotNull(resp.getTs()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -252,24 +258,25 @@ * Get Trade History * /api/v1/trade/history */ - public void testGetTradeHistory() { + @Test + public void testGetTradeHistory() throws Exception { GetTradeHistoryReq.GetTradeHistoryReqBuilder builder = GetTradeHistoryReq.builder(); builder.symbol(?); GetTradeHistoryReq req = builder.build(); - GetTradeHistoryResp resp = this.api.getTradeHistory(req); - foreach($resp->data as $item) { - self::assertNotNull($item->sequence); - self::assertNotNull($item->contractId); - self::assertNotNull($item->tradeId); - self::assertNotNull($item->makerOrderId); - self::assertNotNull($item->takerOrderId); - self::assertNotNull($item->ts); - self::assertNotNull($item->size); - self::assertNotNull($item->price); - self::assertNotNull($item->side); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + GetTradeHistoryResp resp = api.getTradeHistory(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getSequence()); + Assertions.assertNotNull(item.getContractId()); + Assertions.assertNotNull(item.getTradeId()); + Assertions.assertNotNull(item.getMakerOrderId()); + Assertions.assertNotNull(item.getTakerOrderId()); + Assertions.assertNotNull(item.getTs()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSide()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -277,15 +284,16 @@ * Get Klines * /api/v1/kline/query */ - public void testGetKlines() { + @Test + public void testGetKlines() throws Exception { GetKlinesReq.GetKlinesReqBuilder builder = GetKlinesReq.builder(); builder.symbol(?).granularity(?).from(?).to(?); GetKlinesReq req = builder.build(); - GetKlinesResp resp = this.api.getKlines(req); - foreach($resp->data as $item) { - } + GetKlinesResp resp = api.getKlines(req); + resp.getData().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -293,17 +301,18 @@ * Get Mark Price * /api/v1/mark-price/{symbol}/current */ - public void testGetMarkPrice() { + @Test + public void testGetMarkPrice() throws Exception { GetMarkPriceReq.GetMarkPriceReqBuilder builder = GetMarkPriceReq.builder(); builder.symbol(?); GetMarkPriceReq req = builder.build(); - GetMarkPriceResp resp = this.api.getMarkPrice(req); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->granularity); - self::assertNotNull($resp->timePoint); - self::assertNotNull($resp->value); - self::assertNotNull($resp->indexPrice); - Logger::info($resp->jsonSerialize($this->serializer)); + GetMarkPriceResp resp = api.getMarkPrice(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getGranularity()); + Assertions.assertNotNull(resp.getTimePoint()); + Assertions.assertNotNull(resp.getValue()); + Assertions.assertNotNull(resp.getIndexPrice()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -311,21 +320,22 @@ * Get Spot Index Price * /api/v1/index/query */ - public void testGetSpotIndexPrice() { + @Test + public void testGetSpotIndexPrice() throws Exception { GetSpotIndexPriceReq.GetSpotIndexPriceReqBuilder builder = GetSpotIndexPriceReq.builder(); builder.symbol(?).startAt(?).endAt(?).reverse(?).offset(?).forward(?).maxCount(?); GetSpotIndexPriceReq req = builder.build(); - GetSpotIndexPriceResp resp = this.api.getSpotIndexPrice(req); - foreach($resp->dataList as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->granularity); - self::assertNotNull($item->timePoint); - self::assertNotNull($item->value); - self::assertNotNull($item->decomposionList); - } - - self::assertNotNull($resp->hasMore); - Logger::info($resp->jsonSerialize($this->serializer)); + GetSpotIndexPriceResp resp = api.getSpotIndexPrice(req); + resp.getDataList().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getGranularity()); + Assertions.assertNotNull(item.getTimePoint()); + Assertions.assertNotNull(item.getValue()); + Assertions.assertNotNull(item.getDecomposionList()); + }); + + Assertions.assertNotNull(resp.getHasMore()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -333,20 +343,21 @@ * Get Interest Rate Index * /api/v1/interest/query */ - public void testGetInterestRateIndex() { + @Test + public void testGetInterestRateIndex() throws Exception { GetInterestRateIndexReq.GetInterestRateIndexReqBuilder builder = GetInterestRateIndexReq.builder(); builder.symbol(?).startAt(?).endAt(?).reverse(?).offset(?).forward(?).maxCount(?); GetInterestRateIndexReq req = builder.build(); - GetInterestRateIndexResp resp = this.api.getInterestRateIndex(req); - foreach($resp->dataList as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->granularity); - self::assertNotNull($item->timePoint); - self::assertNotNull($item->value); - } - - self::assertNotNull($resp->hasMore); - Logger::info($resp->jsonSerialize($this->serializer)); + GetInterestRateIndexResp resp = api.getInterestRateIndex(req); + resp.getDataList().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getGranularity()); + Assertions.assertNotNull(item.getTimePoint()); + Assertions.assertNotNull(item.getValue()); + }); + + Assertions.assertNotNull(resp.getHasMore()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -354,20 +365,21 @@ * Get Premium Index * /api/v1/premium/query */ - public void testGetPremiumIndex() { + @Test + public void testGetPremiumIndex() throws Exception { GetPremiumIndexReq.GetPremiumIndexReqBuilder builder = GetPremiumIndexReq.builder(); builder.symbol(?).startAt(?).endAt(?).reverse(?).offset(?).forward(?).maxCount(?); GetPremiumIndexReq req = builder.build(); - GetPremiumIndexResp resp = this.api.getPremiumIndex(req); - foreach($resp->dataList as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->granularity); - self::assertNotNull($item->timePoint); - self::assertNotNull($item->value); - } - - self::assertNotNull($resp->hasMore); - Logger::info($resp->jsonSerialize($this->serializer)); + GetPremiumIndexResp resp = api.getPremiumIndex(req); + resp.getDataList().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getGranularity()); + Assertions.assertNotNull(item.getTimePoint()); + Assertions.assertNotNull(item.getValue()); + }); + + Assertions.assertNotNull(resp.getHasMore()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -375,10 +387,11 @@ * Get 24hr stats * /api/v1/trade-statistics */ - public void testGet24hrStats() { - Get24hrStatsResp resp = this.api.get24hrStats(); - self::assertNotNull($resp->turnoverOf24h); - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGet24hrStats() throws Exception { + Get24hrStatsResp resp = api.get24hrStats(); + Assertions.assertNotNull(resp.getTurnoverOf24h()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -386,10 +399,11 @@ * Get Server Time * /api/v1/timestamp */ - public void testGetServerTime() { - GetServerTimeResp resp = this.api.getServerTime(); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetServerTime() throws Exception { + GetServerTimeResp resp = api.getServerTime(); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -397,11 +411,12 @@ * Get Service Status * /api/v1/status */ - public void testGetServiceStatus() { - GetServiceStatusResp resp = this.api.getServiceStatus(); - self::assertNotNull($resp->msg); - self::assertNotNull($resp->status); - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetServiceStatus() throws Exception { + GetServiceStatusResp resp = api.getServiceStatus(); + Assertions.assertNotNull(resp.getMsg()); + Assertions.assertNotNull(resp.getStatus()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -409,18 +424,19 @@ * Get Public Token - Futures * /api/v1/bullet-public */ - public void testGetPublicToken() { - GetPublicTokenResp resp = this.api.getPublicToken(); - self::assertNotNull($resp->token); - foreach($resp->instanceServers as $item) { - self::assertNotNull($item->endpoint); - self::assertNotNull($item->encrypt); - self::assertNotNull($item->protocol); - self::assertNotNull($item->pingInterval); - self::assertNotNull($item->pingTimeout); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetPublicToken() throws Exception { + GetPublicTokenResp resp = api.getPublicToken(); + Assertions.assertNotNull(resp.getToken()); + resp.getInstanceServers().forEach( item -> { + Assertions.assertNotNull(item.getEndpoint()); + Assertions.assertNotNull(item.getEncrypt()); + Assertions.assertNotNull(item.getProtocol()); + Assertions.assertNotNull(item.getPingInterval()); + Assertions.assertNotNull(item.getPingTimeout()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -428,17 +444,18 @@ * Get Private Token - Futures * /api/v1/bullet-private */ - public void testGetPrivateToken() { - GetPrivateTokenResp resp = this.api.getPrivateToken(); - self::assertNotNull($resp->token); - foreach($resp->instanceServers as $item) { - self::assertNotNull($item->endpoint); - self::assertNotNull($item->encrypt); - self::assertNotNull($item->protocol); - self::assertNotNull($item->pingInterval); - self::assertNotNull($item->pingTimeout); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetPrivateToken() throws Exception { + GetPrivateTokenResp resp = api.getPrivateToken(); + Assertions.assertNotNull(resp.getToken()); + resp.getInstanceServers().forEach( item -> { + Assertions.assertNotNull(item.getEndpoint()); + Assertions.assertNotNull(item.getEncrypt()); + Assertions.assertNotNull(item.getProtocol()); + Assertions.assertNotNull(item.getPingInterval()); + Assertions.assertNotNull(item.getPingTimeout()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.template index 436fb51f..f2c268b3 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/OrderApi.template @@ -4,14 +4,15 @@ * Add Order * /api/v1/orders */ - public void testAddOrder() { + @Test + public void testAddOrder() throws Exception { AddOrderReq.AddOrderReqBuilder builder = AddOrderReq.builder(); builder.clientOid(?).side(?).symbol(?).leverage(?).type(?).remark(?).stop(?).stopPriceType(?).stopPrice(?).reduceOnly(?).closeOrder(?).forceHold(?).stp(?).marginMode(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).qty(?).valueQty(?); AddOrderReq req = builder.build(); - AddOrderResp resp = this.api.addOrder(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->clientOid); - Logger::info($resp->jsonSerialize($this->serializer)); + AddOrderResp resp = api.addOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -19,14 +20,15 @@ * Add Order Test * /api/v1/orders/test */ - public void testAddOrderTest() { + @Test + public void testAddOrderTest() throws Exception { AddOrderTestReq.AddOrderTestReqBuilder builder = AddOrderTestReq.builder(); builder.clientOid(?).side(?).symbol(?).leverage(?).type(?).remark(?).stop(?).stopPriceType(?).stopPrice(?).reduceOnly(?).closeOrder(?).forceHold(?).stp(?).marginMode(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).qty(?).valueQty(?); AddOrderTestReq req = builder.build(); - AddOrderTestResp resp = this.api.addOrderTest(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->clientOid); - Logger::info($resp->jsonSerialize($this->serializer)); + AddOrderTestResp resp = api.addOrderTest(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -34,20 +36,21 @@ * Batch Add Orders * /api/v1/orders/multi */ - public void testBatchAddOrders() { + @Test + public void testBatchAddOrders() throws Exception { BatchAddOrdersReq.BatchAddOrdersReqBuilder builder = BatchAddOrdersReq.builder(); builder.items(?); BatchAddOrdersReq req = builder.build(); - BatchAddOrdersResp resp = this.api.batchAddOrders(req); - foreach($resp->data as $item) { - self::assertNotNull($item->orderId); - self::assertNotNull($item->clientOid); - self::assertNotNull($item->symbol); - self::assertNotNull($item->code); - self::assertNotNull($item->msg); - } + BatchAddOrdersResp resp = api.batchAddOrders(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getCode()); + Assertions.assertNotNull(item.getMsg()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -55,14 +58,15 @@ * Add Take Profit And Stop Loss Order * /api/v1/st-orders */ - public void testAddTPSLOrder() { + @Test + public void testAddTPSLOrder() throws Exception { AddTPSLOrderReq.AddTPSLOrderReqBuilder builder = AddTPSLOrderReq.builder(); builder.clientOid(?).side(?).symbol(?).leverage(?).type(?).remark(?).stopPriceType(?).reduceOnly(?).closeOrder(?).forceHold(?).stp(?).marginMode(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).triggerStopUpPrice(?).triggerStopDownPrice(?).qty(?).valueQty(?); AddTPSLOrderReq req = builder.build(); - AddTPSLOrderResp resp = this.api.addTPSLOrder(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->clientOid); - Logger::info($resp->jsonSerialize($this->serializer)); + AddTPSLOrderResp resp = api.addTPSLOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -70,15 +74,16 @@ * Cancel Order By OrderId * /api/v1/orders/{orderId} */ - public void testCancelOrderById() { + @Test + public void testCancelOrderById() throws Exception { CancelOrderByIdReq.CancelOrderByIdReqBuilder builder = CancelOrderByIdReq.builder(); builder.orderId(?); CancelOrderByIdReq req = builder.build(); - CancelOrderByIdResp resp = this.api.cancelOrderById(req); - foreach($resp->cancelledOrderIds as $item) { - } + CancelOrderByIdResp resp = api.cancelOrderById(req); + resp.getCancelledOrderIds().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -86,13 +91,14 @@ * Cancel Order By ClientOid * /api/v1/orders/client-order/{clientOid} */ - public void testCancelOrderByClientOid() { + @Test + public void testCancelOrderByClientOid() throws Exception { CancelOrderByClientOidReq.CancelOrderByClientOidReqBuilder builder = CancelOrderByClientOidReq.builder(); builder.symbol(?).clientOid(?); CancelOrderByClientOidReq req = builder.build(); - CancelOrderByClientOidResp resp = this.api.cancelOrderByClientOid(req); - self::assertNotNull($resp->clientOid); - Logger::info($resp->jsonSerialize($this->serializer)); + CancelOrderByClientOidResp resp = api.cancelOrderByClientOid(req); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -100,19 +106,20 @@ * Batch Cancel Orders * /api/v1/orders/multi-cancel */ - public void testBatchCancelOrders() { + @Test + public void testBatchCancelOrders() throws Exception { BatchCancelOrdersReq.BatchCancelOrdersReqBuilder builder = BatchCancelOrdersReq.builder(); builder.orderIdsList(?).clientOidsList(?); BatchCancelOrdersReq req = builder.build(); - BatchCancelOrdersResp resp = this.api.batchCancelOrders(req); - foreach($resp->data as $item) { - self::assertNotNull($item->orderId); - self::assertNotNull($item->clientOid); - self::assertNotNull($item->code); - self::assertNotNull($item->msg); - } + BatchCancelOrdersResp resp = api.batchCancelOrders(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getCode()); + Assertions.assertNotNull(item.getMsg()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -120,15 +127,16 @@ * Cancel All Orders * /api/v3/orders */ - public void testCancelAllOrdersV3() { + @Test + public void testCancelAllOrdersV3() throws Exception { CancelAllOrdersV3Req.CancelAllOrdersV3ReqBuilder builder = CancelAllOrdersV3Req.builder(); builder.symbol(?); CancelAllOrdersV3Req req = builder.build(); - CancelAllOrdersV3Resp resp = this.api.cancelAllOrdersV3(req); - foreach($resp->cancelledOrderIds as $item) { - } + CancelAllOrdersV3Resp resp = api.cancelAllOrdersV3(req); + resp.getCancelledOrderIds().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -136,15 +144,16 @@ * Cancel All Stop orders * /api/v1/stopOrders */ - public void testCancelAllStopOrders() { + @Test + public void testCancelAllStopOrders() throws Exception { CancelAllStopOrdersReq.CancelAllStopOrdersReqBuilder builder = CancelAllStopOrdersReq.builder(); builder.symbol(?); CancelAllStopOrdersReq req = builder.build(); - CancelAllStopOrdersResp resp = this.api.cancelAllStopOrders(req); - foreach($resp->cancelledOrderIds as $item) { - } + CancelAllStopOrdersResp resp = api.cancelAllStopOrders(req); + resp.getCancelledOrderIds().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -152,50 +161,51 @@ * Get Order By OrderId * /api/v1/orders/{order-id} */ - public void testGetOrderByOrderId() { + @Test + public void testGetOrderByOrderId() throws Exception { GetOrderByOrderIdReq.GetOrderByOrderIdReqBuilder builder = GetOrderByOrderIdReq.builder(); builder.orderId(?); GetOrderByOrderIdReq req = builder.build(); - GetOrderByOrderIdResp resp = this.api.getOrderByOrderId(req); - self::assertNotNull($resp->id); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->type); - self::assertNotNull($resp->side); - self::assertNotNull($resp->price); - self::assertNotNull($resp->size); - self::assertNotNull($resp->value); - self::assertNotNull($resp->dealValue); - self::assertNotNull($resp->dealSize); - self::assertNotNull($resp->stp); - self::assertNotNull($resp->stop); - self::assertNotNull($resp->stopPriceType); - self::assertNotNull($resp->stopTriggered); - self::assertNotNull($resp->stopPrice); - self::assertNotNull($resp->timeInForce); - self::assertNotNull($resp->postOnly); - self::assertNotNull($resp->hidden); - self::assertNotNull($resp->iceberg); - self::assertNotNull($resp->leverage); - self::assertNotNull($resp->forceHold); - self::assertNotNull($resp->closeOrder); - self::assertNotNull($resp->visibleSize); - self::assertNotNull($resp->clientOid); - self::assertNotNull($resp->remark); - self::assertNotNull($resp->tags); - self::assertNotNull($resp->isActive); - self::assertNotNull($resp->cancelExist); - self::assertNotNull($resp->createdAt); - self::assertNotNull($resp->updatedAt); - self::assertNotNull($resp->endAt); - self::assertNotNull($resp->orderTime); - self::assertNotNull($resp->settleCurrency); - self::assertNotNull($resp->marginMode); - self::assertNotNull($resp->avgDealPrice); - self::assertNotNull($resp->filledSize); - self::assertNotNull($resp->filledValue); - self::assertNotNull($resp->status); - self::assertNotNull($resp->reduceOnly); - Logger::info($resp->jsonSerialize($this->serializer)); + GetOrderByOrderIdResp resp = api.getOrderByOrderId(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getValue()); + Assertions.assertNotNull(resp.getDealValue()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getStp()); + Assertions.assertNotNull(resp.getStop()); + Assertions.assertNotNull(resp.getStopPriceType()); + Assertions.assertNotNull(resp.getStopTriggered()); + Assertions.assertNotNull(resp.getStopPrice()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getLeverage()); + Assertions.assertNotNull(resp.getForceHold()); + Assertions.assertNotNull(resp.getCloseOrder()); + Assertions.assertNotNull(resp.getVisibleSize()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getTags()); + Assertions.assertNotNull(resp.getIsActive()); + Assertions.assertNotNull(resp.getCancelExist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getUpdatedAt()); + Assertions.assertNotNull(resp.getEndAt()); + Assertions.assertNotNull(resp.getOrderTime()); + Assertions.assertNotNull(resp.getSettleCurrency()); + Assertions.assertNotNull(resp.getMarginMode()); + Assertions.assertNotNull(resp.getAvgDealPrice()); + Assertions.assertNotNull(resp.getFilledSize()); + Assertions.assertNotNull(resp.getFilledValue()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getReduceOnly()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -203,50 +213,51 @@ * Get Order By ClientOid * /api/v1/orders/byClientOid */ - public void testGetOrderByClientOid() { + @Test + public void testGetOrderByClientOid() throws Exception { GetOrderByClientOidReq.GetOrderByClientOidReqBuilder builder = GetOrderByClientOidReq.builder(); builder.clientOid(?); GetOrderByClientOidReq req = builder.build(); - GetOrderByClientOidResp resp = this.api.getOrderByClientOid(req); - self::assertNotNull($resp->id); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->type); - self::assertNotNull($resp->side); - self::assertNotNull($resp->price); - self::assertNotNull($resp->size); - self::assertNotNull($resp->value); - self::assertNotNull($resp->dealValue); - self::assertNotNull($resp->dealSize); - self::assertNotNull($resp->stp); - self::assertNotNull($resp->stop); - self::assertNotNull($resp->stopPriceType); - self::assertNotNull($resp->stopTriggered); - self::assertNotNull($resp->stopPrice); - self::assertNotNull($resp->timeInForce); - self::assertNotNull($resp->postOnly); - self::assertNotNull($resp->hidden); - self::assertNotNull($resp->iceberg); - self::assertNotNull($resp->leverage); - self::assertNotNull($resp->forceHold); - self::assertNotNull($resp->closeOrder); - self::assertNotNull($resp->visibleSize); - self::assertNotNull($resp->clientOid); - self::assertNotNull($resp->remark); - self::assertNotNull($resp->tags); - self::assertNotNull($resp->isActive); - self::assertNotNull($resp->cancelExist); - self::assertNotNull($resp->createdAt); - self::assertNotNull($resp->updatedAt); - self::assertNotNull($resp->endAt); - self::assertNotNull($resp->orderTime); - self::assertNotNull($resp->settleCurrency); - self::assertNotNull($resp->marginMode); - self::assertNotNull($resp->avgDealPrice); - self::assertNotNull($resp->filledSize); - self::assertNotNull($resp->filledValue); - self::assertNotNull($resp->status); - self::assertNotNull($resp->reduceOnly); - Logger::info($resp->jsonSerialize($this->serializer)); + GetOrderByClientOidResp resp = api.getOrderByClientOid(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getValue()); + Assertions.assertNotNull(resp.getDealValue()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getStp()); + Assertions.assertNotNull(resp.getStop()); + Assertions.assertNotNull(resp.getStopPriceType()); + Assertions.assertNotNull(resp.getStopTriggered()); + Assertions.assertNotNull(resp.getStopPrice()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getLeverage()); + Assertions.assertNotNull(resp.getForceHold()); + Assertions.assertNotNull(resp.getCloseOrder()); + Assertions.assertNotNull(resp.getVisibleSize()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getTags()); + Assertions.assertNotNull(resp.getIsActive()); + Assertions.assertNotNull(resp.getCancelExist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getUpdatedAt()); + Assertions.assertNotNull(resp.getEndAt()); + Assertions.assertNotNull(resp.getOrderTime()); + Assertions.assertNotNull(resp.getSettleCurrency()); + Assertions.assertNotNull(resp.getMarginMode()); + Assertions.assertNotNull(resp.getAvgDealPrice()); + Assertions.assertNotNull(resp.getFilledSize()); + Assertions.assertNotNull(resp.getFilledValue()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getReduceOnly()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -254,57 +265,58 @@ * Get Order List * /api/v1/orders */ - public void testGetOrderList() { + @Test + public void testGetOrderList() throws Exception { GetOrderListReq.GetOrderListReqBuilder builder = GetOrderListReq.builder(); builder.status(?).symbol(?).side(?).type(?).startAt(?).endAt(?).currentPage(?).pageSize(?); GetOrderListReq req = builder.build(); - GetOrderListResp resp = this.api.getOrderList(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->symbol); - self::assertNotNull($item->type); - self::assertNotNull($item->side); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->value); - self::assertNotNull($item->dealValue); - self::assertNotNull($item->dealSize); - self::assertNotNull($item->stp); - self::assertNotNull($item->stop); - self::assertNotNull($item->stopPriceType); - self::assertNotNull($item->stopTriggered); - self::assertNotNull($item->stopPrice); - self::assertNotNull($item->timeInForce); - self::assertNotNull($item->postOnly); - self::assertNotNull($item->hidden); - self::assertNotNull($item->iceberg); - self::assertNotNull($item->leverage); - self::assertNotNull($item->forceHold); - self::assertNotNull($item->closeOrder); - self::assertNotNull($item->visibleSize); - self::assertNotNull($item->clientOid); - self::assertNotNull($item->remark); - self::assertNotNull($item->tags); - self::assertNotNull($item->isActive); - self::assertNotNull($item->cancelExist); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->updatedAt); - self::assertNotNull($item->endAt); - self::assertNotNull($item->orderTime); - self::assertNotNull($item->settleCurrency); - self::assertNotNull($item->marginMode); - self::assertNotNull($item->avgDealPrice); - self::assertNotNull($item->status); - self::assertNotNull($item->filledSize); - self::assertNotNull($item->filledValue); - self::assertNotNull($item->reduceOnly); - } + GetOrderListResp resp = api.getOrderList(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getValue()); + Assertions.assertNotNull(item.getDealValue()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getStp()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getStopPriceType()); + Assertions.assertNotNull(item.getStopTriggered()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getLeverage()); + Assertions.assertNotNull(item.getForceHold()); + Assertions.assertNotNull(item.getCloseOrder()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getTags()); + Assertions.assertNotNull(item.getIsActive()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getUpdatedAt()); + Assertions.assertNotNull(item.getEndAt()); + Assertions.assertNotNull(item.getOrderTime()); + Assertions.assertNotNull(item.getSettleCurrency()); + Assertions.assertNotNull(item.getMarginMode()); + Assertions.assertNotNull(item.getAvgDealPrice()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getFilledSize()); + Assertions.assertNotNull(item.getFilledValue()); + Assertions.assertNotNull(item.getReduceOnly()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -312,53 +324,54 @@ * Get Recent Closed Orders * /api/v1/recentDoneOrders */ - public void testGetRecentClosedOrders() { + @Test + public void testGetRecentClosedOrders() throws Exception { GetRecentClosedOrdersReq.GetRecentClosedOrdersReqBuilder builder = GetRecentClosedOrdersReq.builder(); builder.symbol(?); GetRecentClosedOrdersReq req = builder.build(); - GetRecentClosedOrdersResp resp = this.api.getRecentClosedOrders(req); - foreach($resp->data as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->symbol); - self::assertNotNull($item->type); - self::assertNotNull($item->side); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->value); - self::assertNotNull($item->dealValue); - self::assertNotNull($item->dealSize); - self::assertNotNull($item->stp); - self::assertNotNull($item->stop); - self::assertNotNull($item->stopPriceType); - self::assertNotNull($item->stopTriggered); - self::assertNotNull($item->stopPrice); - self::assertNotNull($item->timeInForce); - self::assertNotNull($item->postOnly); - self::assertNotNull($item->hidden); - self::assertNotNull($item->iceberg); - self::assertNotNull($item->leverage); - self::assertNotNull($item->forceHold); - self::assertNotNull($item->closeOrder); - self::assertNotNull($item->visibleSize); - self::assertNotNull($item->clientOid); - self::assertNotNull($item->remark); - self::assertNotNull($item->tags); - self::assertNotNull($item->isActive); - self::assertNotNull($item->cancelExist); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->updatedAt); - self::assertNotNull($item->endAt); - self::assertNotNull($item->orderTime); - self::assertNotNull($item->settleCurrency); - self::assertNotNull($item->marginMode); - self::assertNotNull($item->avgDealPrice); - self::assertNotNull($item->filledSize); - self::assertNotNull($item->filledValue); - self::assertNotNull($item->status); - self::assertNotNull($item->reduceOnly); - } + GetRecentClosedOrdersResp resp = api.getRecentClosedOrders(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getValue()); + Assertions.assertNotNull(item.getDealValue()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getStp()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getStopPriceType()); + Assertions.assertNotNull(item.getStopTriggered()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getLeverage()); + Assertions.assertNotNull(item.getForceHold()); + Assertions.assertNotNull(item.getCloseOrder()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getTags()); + Assertions.assertNotNull(item.getIsActive()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getUpdatedAt()); + Assertions.assertNotNull(item.getEndAt()); + Assertions.assertNotNull(item.getOrderTime()); + Assertions.assertNotNull(item.getSettleCurrency()); + Assertions.assertNotNull(item.getMarginMode()); + Assertions.assertNotNull(item.getAvgDealPrice()); + Assertions.assertNotNull(item.getFilledSize()); + Assertions.assertNotNull(item.getFilledValue()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getReduceOnly()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -366,57 +379,58 @@ * Get Stop Order List * /api/v1/stopOrders */ - public void testGetStopOrderList() { + @Test + public void testGetStopOrderList() throws Exception { GetStopOrderListReq.GetStopOrderListReqBuilder builder = GetStopOrderListReq.builder(); builder.symbol(?).side(?).type(?).startAt(?).endAt(?).currentPage(?).pageSize(?); GetStopOrderListReq req = builder.build(); - GetStopOrderListResp resp = this.api.getStopOrderList(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->symbol); - self::assertNotNull($item->type); - self::assertNotNull($item->side); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->value); - self::assertNotNull($item->dealValue); - self::assertNotNull($item->dealSize); - self::assertNotNull($item->stp); - self::assertNotNull($item->stop); - self::assertNotNull($item->stopPriceType); - self::assertNotNull($item->stopTriggered); - self::assertNotNull($item->stopPrice); - self::assertNotNull($item->timeInForce); - self::assertNotNull($item->postOnly); - self::assertNotNull($item->hidden); - self::assertNotNull($item->iceberg); - self::assertNotNull($item->leverage); - self::assertNotNull($item->forceHold); - self::assertNotNull($item->closeOrder); - self::assertNotNull($item->visibleSize); - self::assertNotNull($item->clientOid); - self::assertNotNull($item->remark); - self::assertNotNull($item->tags); - self::assertNotNull($item->isActive); - self::assertNotNull($item->cancelExist); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->updatedAt); - self::assertNotNull($item->endAt); - self::assertNotNull($item->orderTime); - self::assertNotNull($item->settleCurrency); - self::assertNotNull($item->marginMode); - self::assertNotNull($item->avgDealPrice); - self::assertNotNull($item->filledSize); - self::assertNotNull($item->filledValue); - self::assertNotNull($item->status); - self::assertNotNull($item->reduceOnly); - } + GetStopOrderListResp resp = api.getStopOrderList(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getValue()); + Assertions.assertNotNull(item.getDealValue()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getStp()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getStopPriceType()); + Assertions.assertNotNull(item.getStopTriggered()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getLeverage()); + Assertions.assertNotNull(item.getForceHold()); + Assertions.assertNotNull(item.getCloseOrder()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getTags()); + Assertions.assertNotNull(item.getIsActive()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getUpdatedAt()); + Assertions.assertNotNull(item.getEndAt()); + Assertions.assertNotNull(item.getOrderTime()); + Assertions.assertNotNull(item.getSettleCurrency()); + Assertions.assertNotNull(item.getMarginMode()); + Assertions.assertNotNull(item.getAvgDealPrice()); + Assertions.assertNotNull(item.getFilledSize()); + Assertions.assertNotNull(item.getFilledValue()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getReduceOnly()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -424,17 +438,18 @@ * Get Open Order Value * /api/v1/openOrderStatistics */ - public void testGetOpenOrderValue() { + @Test + public void testGetOpenOrderValue() throws Exception { GetOpenOrderValueReq.GetOpenOrderValueReqBuilder builder = GetOpenOrderValueReq.builder(); builder.symbol(?); GetOpenOrderValueReq req = builder.build(); - GetOpenOrderValueResp resp = this.api.getOpenOrderValue(req); - self::assertNotNull($resp->openOrderBuySize); - self::assertNotNull($resp->openOrderSellSize); - self::assertNotNull($resp->openOrderBuyCost); - self::assertNotNull($resp->openOrderSellCost); - self::assertNotNull($resp->settleCurrency); - Logger::info($resp->jsonSerialize($this->serializer)); + GetOpenOrderValueResp resp = api.getOpenOrderValue(req); + Assertions.assertNotNull(resp.getOpenOrderBuySize()); + Assertions.assertNotNull(resp.getOpenOrderSellSize()); + Assertions.assertNotNull(resp.getOpenOrderBuyCost()); + Assertions.assertNotNull(resp.getOpenOrderSellCost()); + Assertions.assertNotNull(resp.getSettleCurrency()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -442,39 +457,40 @@ * Get Recent Trade History * /api/v1/recentFills */ - public void testGetRecentTradeHistory() { + @Test + public void testGetRecentTradeHistory() throws Exception { GetRecentTradeHistoryReq.GetRecentTradeHistoryReqBuilder builder = GetRecentTradeHistoryReq.builder(); builder.symbol(?); GetRecentTradeHistoryReq req = builder.build(); - GetRecentTradeHistoryResp resp = this.api.getRecentTradeHistory(req); - foreach($resp->data as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->tradeId); - self::assertNotNull($item->orderId); - self::assertNotNull($item->side); - self::assertNotNull($item->liquidity); - self::assertNotNull($item->forceTaker); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->value); - self::assertNotNull($item->openFeePay); - self::assertNotNull($item->closeFeePay); - self::assertNotNull($item->stop); - self::assertNotNull($item->feeRate); - self::assertNotNull($item->fixFee); - self::assertNotNull($item->feeCurrency); - self::assertNotNull($item->tradeTime); - self::assertNotNull($item->subTradeType); - self::assertNotNull($item->marginMode); - self::assertNotNull($item->displayType); - self::assertNotNull($item->fee); - self::assertNotNull($item->settleCurrency); - self::assertNotNull($item->orderType); - self::assertNotNull($item->tradeType); - self::assertNotNull($item->createdAt); - } + GetRecentTradeHistoryResp resp = api.getRecentTradeHistory(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTradeId()); + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getLiquidity()); + Assertions.assertNotNull(item.getForceTaker()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getValue()); + Assertions.assertNotNull(item.getOpenFeePay()); + Assertions.assertNotNull(item.getCloseFeePay()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getFeeRate()); + Assertions.assertNotNull(item.getFixFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getTradeTime()); + Assertions.assertNotNull(item.getSubTradeType()); + Assertions.assertNotNull(item.getMarginMode()); + Assertions.assertNotNull(item.getDisplayType()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getSettleCurrency()); + Assertions.assertNotNull(item.getOrderType()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getCreatedAt()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -482,45 +498,46 @@ * Get Trade History * /api/v1/fills */ - public void testGetTradeHistory() { + @Test + public void testGetTradeHistory() throws Exception { GetTradeHistoryReq.GetTradeHistoryReqBuilder builder = GetTradeHistoryReq.builder(); builder.orderId(?).symbol(?).side(?).type(?).tradeTypes(?).startAt(?).endAt(?).currentPage(?).pageSize(?); GetTradeHistoryReq req = builder.build(); - GetTradeHistoryResp resp = this.api.getTradeHistory(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->tradeId); - self::assertNotNull($item->orderId); - self::assertNotNull($item->side); - self::assertNotNull($item->liquidity); - self::assertNotNull($item->forceTaker); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->value); - self::assertNotNull($item->openFeePay); - self::assertNotNull($item->closeFeePay); - self::assertNotNull($item->stop); - self::assertNotNull($item->feeRate); - self::assertNotNull($item->fixFee); - self::assertNotNull($item->feeCurrency); - self::assertNotNull($item->tradeTime); - self::assertNotNull($item->subTradeType); - self::assertNotNull($item->marginMode); - self::assertNotNull($item->settleCurrency); - self::assertNotNull($item->displayType); - self::assertNotNull($item->fee); - self::assertNotNull($item->orderType); - self::assertNotNull($item->tradeType); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->openFeeTaxPay); - self::assertNotNull($item->closeFeeTaxPay); - } + GetTradeHistoryResp resp = api.getTradeHistory(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTradeId()); + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getLiquidity()); + Assertions.assertNotNull(item.getForceTaker()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getValue()); + Assertions.assertNotNull(item.getOpenFeePay()); + Assertions.assertNotNull(item.getCloseFeePay()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getFeeRate()); + Assertions.assertNotNull(item.getFixFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getTradeTime()); + Assertions.assertNotNull(item.getSubTradeType()); + Assertions.assertNotNull(item.getMarginMode()); + Assertions.assertNotNull(item.getSettleCurrency()); + Assertions.assertNotNull(item.getDisplayType()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getOrderType()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getOpenFeeTaxPay()); + Assertions.assertNotNull(item.getCloseFeeTaxPay()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -528,14 +545,15 @@ * Cancel All Orders - V1 * /api/v1/orders */ - public void testCancelAllOrdersV1() { + @Test + public void testCancelAllOrdersV1() throws Exception { CancelAllOrdersV1Req.CancelAllOrdersV1ReqBuilder builder = CancelAllOrdersV1Req.builder(); builder.symbol(?); CancelAllOrdersV1Req req = builder.build(); - CancelAllOrdersV1Resp resp = this.api.cancelAllOrdersV1(req); - foreach($resp->cancelledOrderIds as $item) { - } + CancelAllOrdersV1Resp resp = api.cancelAllOrdersV1(req); + resp.getCancelledOrderIds().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.template index 6749fd13..989ddc40 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/PositionsApi.template @@ -4,14 +4,15 @@ * Get Margin Mode * /api/v2/position/getMarginMode */ - public void testGetMarginMode() { + @Test + public void testGetMarginMode() throws Exception { GetMarginModeReq.GetMarginModeReqBuilder builder = GetMarginModeReq.builder(); builder.symbol(?); GetMarginModeReq req = builder.build(); - GetMarginModeResp resp = this.api.getMarginMode(req); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->marginMode); - Logger::info($resp->jsonSerialize($this->serializer)); + GetMarginModeResp resp = api.getMarginMode(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getMarginMode()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -19,14 +20,15 @@ * Switch Margin Mode * /api/v2/position/changeMarginMode */ - public void testSwitchMarginMode() { + @Test + public void testSwitchMarginMode() throws Exception { SwitchMarginModeReq.SwitchMarginModeReqBuilder builder = SwitchMarginModeReq.builder(); builder.symbol(?).marginMode(?); SwitchMarginModeReq req = builder.build(); - SwitchMarginModeResp resp = this.api.switchMarginMode(req); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->marginMode); - Logger::info($resp->jsonSerialize($this->serializer)); + SwitchMarginModeResp resp = api.switchMarginMode(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getMarginMode()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -34,19 +36,20 @@ * Batch Switch Margin Mode * /api/v2/position/batchChangeMarginMode */ - public void testBatchSwitchMarginMode() { + @Test + public void testBatchSwitchMarginMode() throws Exception { BatchSwitchMarginModeReq.BatchSwitchMarginModeReqBuilder builder = BatchSwitchMarginModeReq.builder(); builder.marginMode(?).symbols(?); BatchSwitchMarginModeReq req = builder.build(); - BatchSwitchMarginModeResp resp = this.api.batchSwitchMarginMode(req); - self::assertNotNull($resp->marginMode); - foreach($resp->errors as $item) { - self::assertNotNull($item->code); - self::assertNotNull($item->msg); - self::assertNotNull($item->symbol); - } + BatchSwitchMarginModeResp resp = api.batchSwitchMarginMode(req); + Assertions.assertNotNull(resp.getMarginMode()); + resp.getErrors().forEach( item -> { + Assertions.assertNotNull(item.getCode()); + Assertions.assertNotNull(item.getMsg()); + Assertions.assertNotNull(item.getSymbol()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -54,15 +57,16 @@ * Get Max Open Size * /api/v2/getMaxOpenSize */ - public void testGetMaxOpenSize() { + @Test + public void testGetMaxOpenSize() throws Exception { GetMaxOpenSizeReq.GetMaxOpenSizeReqBuilder builder = GetMaxOpenSizeReq.builder(); builder.symbol(?).price(?).leverage(?); GetMaxOpenSizeReq req = builder.build(); - GetMaxOpenSizeResp resp = this.api.getMaxOpenSize(req); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->maxBuyOpenSize); - self::assertNotNull($resp->maxSellOpenSize); - Logger::info($resp->jsonSerialize($this->serializer)); + GetMaxOpenSizeResp resp = api.getMaxOpenSize(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getMaxBuyOpenSize()); + Assertions.assertNotNull(resp.getMaxSellOpenSize()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -70,56 +74,57 @@ * Get Position Details * /api/v1/position */ - public void testGetPositionDetails() { + @Test + public void testGetPositionDetails() throws Exception { GetPositionDetailsReq.GetPositionDetailsReqBuilder builder = GetPositionDetailsReq.builder(); builder.symbol(?); GetPositionDetailsReq req = builder.build(); - GetPositionDetailsResp resp = this.api.getPositionDetails(req); - self::assertNotNull($resp->id); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->crossMode); - self::assertNotNull($resp->delevPercentage); - self::assertNotNull($resp->openingTimestamp); - self::assertNotNull($resp->currentTimestamp); - self::assertNotNull($resp->currentQty); - self::assertNotNull($resp->currentCost); - self::assertNotNull($resp->currentComm); - self::assertNotNull($resp->unrealisedCost); - self::assertNotNull($resp->realisedGrossCost); - self::assertNotNull($resp->realisedCost); - self::assertNotNull($resp->isOpen); - self::assertNotNull($resp->markPrice); - self::assertNotNull($resp->markValue); - self::assertNotNull($resp->posCost); - self::assertNotNull($resp->posInit); - self::assertNotNull($resp->posMargin); - self::assertNotNull($resp->realisedGrossPnl); - self::assertNotNull($resp->realisedPnl); - self::assertNotNull($resp->unrealisedPnl); - self::assertNotNull($resp->unrealisedPnlPcnt); - self::assertNotNull($resp->unrealisedRoePcnt); - self::assertNotNull($resp->avgEntryPrice); - self::assertNotNull($resp->liquidationPrice); - self::assertNotNull($resp->bankruptPrice); - self::assertNotNull($resp->settleCurrency); - self::assertNotNull($resp->isInverse); - self::assertNotNull($resp->marginMode); - self::assertNotNull($resp->positionSide); - self::assertNotNull($resp->leverage); - self::assertNotNull($resp->autoDeposit); - self::assertNotNull($resp->maintMarginReq); - self::assertNotNull($resp->riskLimit); - self::assertNotNull($resp->realLeverage); - self::assertNotNull($resp->posCross); - self::assertNotNull($resp->posCrossMargin); - self::assertNotNull($resp->posComm); - self::assertNotNull($resp->posCommCommon); - self::assertNotNull($resp->posLoss); - self::assertNotNull($resp->posFunding); - self::assertNotNull($resp->posMaint); - self::assertNotNull($resp->maintMargin); - self::assertNotNull($resp->maintainMargin); - Logger::info($resp->jsonSerialize($this->serializer)); + GetPositionDetailsResp resp = api.getPositionDetails(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getCrossMode()); + Assertions.assertNotNull(resp.getDelevPercentage()); + Assertions.assertNotNull(resp.getOpeningTimestamp()); + Assertions.assertNotNull(resp.getCurrentTimestamp()); + Assertions.assertNotNull(resp.getCurrentQty()); + Assertions.assertNotNull(resp.getCurrentCost()); + Assertions.assertNotNull(resp.getCurrentComm()); + Assertions.assertNotNull(resp.getUnrealisedCost()); + Assertions.assertNotNull(resp.getRealisedGrossCost()); + Assertions.assertNotNull(resp.getRealisedCost()); + Assertions.assertNotNull(resp.getIsOpen()); + Assertions.assertNotNull(resp.getMarkPrice()); + Assertions.assertNotNull(resp.getMarkValue()); + Assertions.assertNotNull(resp.getPosCost()); + Assertions.assertNotNull(resp.getPosInit()); + Assertions.assertNotNull(resp.getPosMargin()); + Assertions.assertNotNull(resp.getRealisedGrossPnl()); + Assertions.assertNotNull(resp.getRealisedPnl()); + Assertions.assertNotNull(resp.getUnrealisedPnl()); + Assertions.assertNotNull(resp.getUnrealisedPnlPcnt()); + Assertions.assertNotNull(resp.getUnrealisedRoePcnt()); + Assertions.assertNotNull(resp.getAvgEntryPrice()); + Assertions.assertNotNull(resp.getLiquidationPrice()); + Assertions.assertNotNull(resp.getBankruptPrice()); + Assertions.assertNotNull(resp.getSettleCurrency()); + Assertions.assertNotNull(resp.getIsInverse()); + Assertions.assertNotNull(resp.getMarginMode()); + Assertions.assertNotNull(resp.getPositionSide()); + Assertions.assertNotNull(resp.getLeverage()); + Assertions.assertNotNull(resp.getAutoDeposit()); + Assertions.assertNotNull(resp.getMaintMarginReq()); + Assertions.assertNotNull(resp.getRiskLimit()); + Assertions.assertNotNull(resp.getRealLeverage()); + Assertions.assertNotNull(resp.getPosCross()); + Assertions.assertNotNull(resp.getPosCrossMargin()); + Assertions.assertNotNull(resp.getPosComm()); + Assertions.assertNotNull(resp.getPosCommCommon()); + Assertions.assertNotNull(resp.getPosLoss()); + Assertions.assertNotNull(resp.getPosFunding()); + Assertions.assertNotNull(resp.getPosMaint()); + Assertions.assertNotNull(resp.getMaintMargin()); + Assertions.assertNotNull(resp.getMaintainMargin()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -127,59 +132,60 @@ * Get Position List * /api/v1/positions */ - public void testGetPositionList() { + @Test + public void testGetPositionList() throws Exception { GetPositionListReq.GetPositionListReqBuilder builder = GetPositionListReq.builder(); builder.currency(?); GetPositionListReq req = builder.build(); - GetPositionListResp resp = this.api.getPositionList(req); - foreach($resp->data as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->symbol); - self::assertNotNull($item->crossMode); - self::assertNotNull($item->delevPercentage); - self::assertNotNull($item->openingTimestamp); - self::assertNotNull($item->currentTimestamp); - self::assertNotNull($item->currentQty); - self::assertNotNull($item->currentCost); - self::assertNotNull($item->currentComm); - self::assertNotNull($item->unrealisedCost); - self::assertNotNull($item->realisedGrossCost); - self::assertNotNull($item->realisedCost); - self::assertNotNull($item->isOpen); - self::assertNotNull($item->markPrice); - self::assertNotNull($item->markValue); - self::assertNotNull($item->posCost); - self::assertNotNull($item->posInit); - self::assertNotNull($item->posMargin); - self::assertNotNull($item->realisedGrossPnl); - self::assertNotNull($item->realisedPnl); - self::assertNotNull($item->unrealisedPnl); - self::assertNotNull($item->unrealisedPnlPcnt); - self::assertNotNull($item->unrealisedRoePcnt); - self::assertNotNull($item->avgEntryPrice); - self::assertNotNull($item->liquidationPrice); - self::assertNotNull($item->bankruptPrice); - self::assertNotNull($item->settleCurrency); - self::assertNotNull($item->isInverse); - self::assertNotNull($item->marginMode); - self::assertNotNull($item->positionSide); - self::assertNotNull($item->leverage); - self::assertNotNull($item->autoDeposit); - self::assertNotNull($item->maintMarginReq); - self::assertNotNull($item->riskLimit); - self::assertNotNull($item->realLeverage); - self::assertNotNull($item->posCross); - self::assertNotNull($item->posCrossMargin); - self::assertNotNull($item->posComm); - self::assertNotNull($item->posCommCommon); - self::assertNotNull($item->posLoss); - self::assertNotNull($item->posFunding); - self::assertNotNull($item->posMaint); - self::assertNotNull($item->maintMargin); - self::assertNotNull($item->maintainMargin); - } + GetPositionListResp resp = api.getPositionList(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getCrossMode()); + Assertions.assertNotNull(item.getDelevPercentage()); + Assertions.assertNotNull(item.getOpeningTimestamp()); + Assertions.assertNotNull(item.getCurrentTimestamp()); + Assertions.assertNotNull(item.getCurrentQty()); + Assertions.assertNotNull(item.getCurrentCost()); + Assertions.assertNotNull(item.getCurrentComm()); + Assertions.assertNotNull(item.getUnrealisedCost()); + Assertions.assertNotNull(item.getRealisedGrossCost()); + Assertions.assertNotNull(item.getRealisedCost()); + Assertions.assertNotNull(item.getIsOpen()); + Assertions.assertNotNull(item.getMarkPrice()); + Assertions.assertNotNull(item.getMarkValue()); + Assertions.assertNotNull(item.getPosCost()); + Assertions.assertNotNull(item.getPosInit()); + Assertions.assertNotNull(item.getPosMargin()); + Assertions.assertNotNull(item.getRealisedGrossPnl()); + Assertions.assertNotNull(item.getRealisedPnl()); + Assertions.assertNotNull(item.getUnrealisedPnl()); + Assertions.assertNotNull(item.getUnrealisedPnlPcnt()); + Assertions.assertNotNull(item.getUnrealisedRoePcnt()); + Assertions.assertNotNull(item.getAvgEntryPrice()); + Assertions.assertNotNull(item.getLiquidationPrice()); + Assertions.assertNotNull(item.getBankruptPrice()); + Assertions.assertNotNull(item.getSettleCurrency()); + Assertions.assertNotNull(item.getIsInverse()); + Assertions.assertNotNull(item.getMarginMode()); + Assertions.assertNotNull(item.getPositionSide()); + Assertions.assertNotNull(item.getLeverage()); + Assertions.assertNotNull(item.getAutoDeposit()); + Assertions.assertNotNull(item.getMaintMarginReq()); + Assertions.assertNotNull(item.getRiskLimit()); + Assertions.assertNotNull(item.getRealLeverage()); + Assertions.assertNotNull(item.getPosCross()); + Assertions.assertNotNull(item.getPosCrossMargin()); + Assertions.assertNotNull(item.getPosComm()); + Assertions.assertNotNull(item.getPosCommCommon()); + Assertions.assertNotNull(item.getPosLoss()); + Assertions.assertNotNull(item.getPosFunding()); + Assertions.assertNotNull(item.getPosMaint()); + Assertions.assertNotNull(item.getMaintMargin()); + Assertions.assertNotNull(item.getMaintainMargin()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -187,41 +193,42 @@ * Get Positions History * /api/v1/history-positions */ - public void testGetPositionsHistory() { + @Test + public void testGetPositionsHistory() throws Exception { GetPositionsHistoryReq.GetPositionsHistoryReqBuilder builder = GetPositionsHistoryReq.builder(); builder.symbol(?).from(?).to(?).limit(?).pageId(?); GetPositionsHistoryReq req = builder.build(); - GetPositionsHistoryResp resp = this.api.getPositionsHistory(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->closeId); - self::assertNotNull($item->userId); - self::assertNotNull($item->symbol); - self::assertNotNull($item->settleCurrency); - self::assertNotNull($item->leverage); - self::assertNotNull($item->type); - self::assertNotNull($item->pnl); - self::assertNotNull($item->realisedGrossCost); - self::assertNotNull($item->withdrawPnl); - self::assertNotNull($item->tradeFee); - self::assertNotNull($item->fundingFee); - self::assertNotNull($item->openTime); - self::assertNotNull($item->closeTime); - self::assertNotNull($item->openPrice); - self::assertNotNull($item->closePrice); - self::assertNotNull($item->marginMode); - self::assertNotNull($item->realisedGrossCostNew); - self::assertNotNull($item->tax); - self::assertNotNull($item->roe); - self::assertNotNull($item->liquidAmount); - self::assertNotNull($item->liquidPrice); - self::assertNotNull($item->side); - } + GetPositionsHistoryResp resp = api.getPositionsHistory(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getCloseId()); + Assertions.assertNotNull(item.getUserId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getSettleCurrency()); + Assertions.assertNotNull(item.getLeverage()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getPnl()); + Assertions.assertNotNull(item.getRealisedGrossCost()); + Assertions.assertNotNull(item.getWithdrawPnl()); + Assertions.assertNotNull(item.getTradeFee()); + Assertions.assertNotNull(item.getFundingFee()); + Assertions.assertNotNull(item.getOpenTime()); + Assertions.assertNotNull(item.getCloseTime()); + Assertions.assertNotNull(item.getOpenPrice()); + Assertions.assertNotNull(item.getClosePrice()); + Assertions.assertNotNull(item.getMarginMode()); + Assertions.assertNotNull(item.getRealisedGrossCostNew()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getRoe()); + Assertions.assertNotNull(item.getLiquidAmount()); + Assertions.assertNotNull(item.getLiquidPrice()); + Assertions.assertNotNull(item.getSide()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -229,13 +236,14 @@ * Get Max Withdraw Margin * /api/v1/margin/maxWithdrawMargin */ - public void testGetMaxWithdrawMargin() { + @Test + public void testGetMaxWithdrawMargin() throws Exception { GetMaxWithdrawMarginReq.GetMaxWithdrawMarginReqBuilder builder = GetMaxWithdrawMarginReq.builder(); builder.symbol(?); GetMaxWithdrawMarginReq req = builder.build(); - GetMaxWithdrawMarginResp resp = this.api.getMaxWithdrawMargin(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + GetMaxWithdrawMarginResp resp = api.getMaxWithdrawMargin(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -243,14 +251,15 @@ * Get Cross Margin Leverage * /api/v2/getCrossUserLeverage */ - public void testGetCrossMarginLeverage() { + @Test + public void testGetCrossMarginLeverage() throws Exception { GetCrossMarginLeverageReq.GetCrossMarginLeverageReqBuilder builder = GetCrossMarginLeverageReq.builder(); builder.symbol(?); GetCrossMarginLeverageReq req = builder.build(); - GetCrossMarginLeverageResp resp = this.api.getCrossMarginLeverage(req); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->leverage); - Logger::info($resp->jsonSerialize($this->serializer)); + GetCrossMarginLeverageResp resp = api.getCrossMarginLeverage(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getLeverage()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -258,13 +267,14 @@ * Modify Cross Margin Leverage * /api/v2/changeCrossUserLeverage */ - public void testModifyMarginLeverage() { + @Test + public void testModifyMarginLeverage() throws Exception { ModifyMarginLeverageReq.ModifyMarginLeverageReqBuilder builder = ModifyMarginLeverageReq.builder(); builder.symbol(?).leverage(?); ModifyMarginLeverageReq req = builder.build(); - ModifyMarginLeverageResp resp = this.api.modifyMarginLeverage(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + ModifyMarginLeverageResp resp = api.modifyMarginLeverage(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -272,49 +282,50 @@ * Add Isolated Margin * /api/v1/position/margin/deposit-margin */ - public void testAddIsolatedMargin() { + @Test + public void testAddIsolatedMargin() throws Exception { AddIsolatedMarginReq.AddIsolatedMarginReqBuilder builder = AddIsolatedMarginReq.builder(); builder.symbol(?).margin(?).bizNo(?); AddIsolatedMarginReq req = builder.build(); - AddIsolatedMarginResp resp = this.api.addIsolatedMargin(req); - self::assertNotNull($resp->id); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->autoDeposit); - self::assertNotNull($resp->maintMarginReq); - self::assertNotNull($resp->riskLimit); - self::assertNotNull($resp->realLeverage); - self::assertNotNull($resp->crossMode); - self::assertNotNull($resp->delevPercentage); - self::assertNotNull($resp->openingTimestamp); - self::assertNotNull($resp->currentTimestamp); - self::assertNotNull($resp->currentQty); - self::assertNotNull($resp->currentCost); - self::assertNotNull($resp->currentComm); - self::assertNotNull($resp->unrealisedCost); - self::assertNotNull($resp->realisedGrossCost); - self::assertNotNull($resp->realisedCost); - self::assertNotNull($resp->isOpen); - self::assertNotNull($resp->markPrice); - self::assertNotNull($resp->markValue); - self::assertNotNull($resp->posCost); - self::assertNotNull($resp->posCross); - self::assertNotNull($resp->posInit); - self::assertNotNull($resp->posComm); - self::assertNotNull($resp->posLoss); - self::assertNotNull($resp->posMargin); - self::assertNotNull($resp->posMaint); - self::assertNotNull($resp->maintMargin); - self::assertNotNull($resp->realisedGrossPnl); - self::assertNotNull($resp->realisedPnl); - self::assertNotNull($resp->unrealisedPnl); - self::assertNotNull($resp->unrealisedPnlPcnt); - self::assertNotNull($resp->unrealisedRoePcnt); - self::assertNotNull($resp->avgEntryPrice); - self::assertNotNull($resp->liquidationPrice); - self::assertNotNull($resp->bankruptPrice); - self::assertNotNull($resp->userId); - self::assertNotNull($resp->settleCurrency); - Logger::info($resp->jsonSerialize($this->serializer)); + AddIsolatedMarginResp resp = api.addIsolatedMargin(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getAutoDeposit()); + Assertions.assertNotNull(resp.getMaintMarginReq()); + Assertions.assertNotNull(resp.getRiskLimit()); + Assertions.assertNotNull(resp.getRealLeverage()); + Assertions.assertNotNull(resp.getCrossMode()); + Assertions.assertNotNull(resp.getDelevPercentage()); + Assertions.assertNotNull(resp.getOpeningTimestamp()); + Assertions.assertNotNull(resp.getCurrentTimestamp()); + Assertions.assertNotNull(resp.getCurrentQty()); + Assertions.assertNotNull(resp.getCurrentCost()); + Assertions.assertNotNull(resp.getCurrentComm()); + Assertions.assertNotNull(resp.getUnrealisedCost()); + Assertions.assertNotNull(resp.getRealisedGrossCost()); + Assertions.assertNotNull(resp.getRealisedCost()); + Assertions.assertNotNull(resp.getIsOpen()); + Assertions.assertNotNull(resp.getMarkPrice()); + Assertions.assertNotNull(resp.getMarkValue()); + Assertions.assertNotNull(resp.getPosCost()); + Assertions.assertNotNull(resp.getPosCross()); + Assertions.assertNotNull(resp.getPosInit()); + Assertions.assertNotNull(resp.getPosComm()); + Assertions.assertNotNull(resp.getPosLoss()); + Assertions.assertNotNull(resp.getPosMargin()); + Assertions.assertNotNull(resp.getPosMaint()); + Assertions.assertNotNull(resp.getMaintMargin()); + Assertions.assertNotNull(resp.getRealisedGrossPnl()); + Assertions.assertNotNull(resp.getRealisedPnl()); + Assertions.assertNotNull(resp.getUnrealisedPnl()); + Assertions.assertNotNull(resp.getUnrealisedPnlPcnt()); + Assertions.assertNotNull(resp.getUnrealisedRoePcnt()); + Assertions.assertNotNull(resp.getAvgEntryPrice()); + Assertions.assertNotNull(resp.getLiquidationPrice()); + Assertions.assertNotNull(resp.getBankruptPrice()); + Assertions.assertNotNull(resp.getUserId()); + Assertions.assertNotNull(resp.getSettleCurrency()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -322,13 +333,14 @@ * Remove Isolated Margin * /api/v1/margin/withdrawMargin */ - public void testRemoveIsolatedMargin() { + @Test + public void testRemoveIsolatedMargin() throws Exception { RemoveIsolatedMarginReq.RemoveIsolatedMarginReqBuilder builder = RemoveIsolatedMarginReq.builder(); builder.symbol(?).withdrawAmount(?); RemoveIsolatedMarginReq req = builder.build(); - RemoveIsolatedMarginResp resp = this.api.removeIsolatedMargin(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + RemoveIsolatedMarginResp resp = api.removeIsolatedMargin(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -336,24 +348,25 @@ * Get Cross Margin Risk Limit * /api/v2/batchGetCrossOrderLimit */ - public void testGetCrossMarginRiskLimit() { + @Test + public void testGetCrossMarginRiskLimit() throws Exception { GetCrossMarginRiskLimitReq.GetCrossMarginRiskLimitReqBuilder builder = GetCrossMarginRiskLimitReq.builder(); builder.symbol(?).totalMargin(?).leverage(?); GetCrossMarginRiskLimitReq req = builder.build(); - GetCrossMarginRiskLimitResp resp = this.api.getCrossMarginRiskLimit(req); - foreach($resp->data as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->maxOpenSize); - self::assertNotNull($item->maxOpenValue); - self::assertNotNull($item->totalMargin); - self::assertNotNull($item->price); - self::assertNotNull($item->leverage); - self::assertNotNull($item->mmr); - self::assertNotNull($item->imr); - self::assertNotNull($item->currency); - } + GetCrossMarginRiskLimitResp resp = api.getCrossMarginRiskLimit(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getMaxOpenSize()); + Assertions.assertNotNull(item.getMaxOpenValue()); + Assertions.assertNotNull(item.getTotalMargin()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getLeverage()); + Assertions.assertNotNull(item.getMmr()); + Assertions.assertNotNull(item.getImr()); + Assertions.assertNotNull(item.getCurrency()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -361,22 +374,23 @@ * Get Isolated Margin Risk Limit * /api/v1/contracts/risk-limit/{symbol} */ - public void testGetIsolatedMarginRiskLimit() { + @Test + public void testGetIsolatedMarginRiskLimit() throws Exception { GetIsolatedMarginRiskLimitReq.GetIsolatedMarginRiskLimitReqBuilder builder = GetIsolatedMarginRiskLimitReq.builder(); builder.symbol(?); GetIsolatedMarginRiskLimitReq req = builder.build(); - GetIsolatedMarginRiskLimitResp resp = this.api.getIsolatedMarginRiskLimit(req); - foreach($resp->data as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->level); - self::assertNotNull($item->maxRiskLimit); - self::assertNotNull($item->minRiskLimit); - self::assertNotNull($item->maxLeverage); - self::assertNotNull($item->initialMargin); - self::assertNotNull($item->maintainMargin); - } + GetIsolatedMarginRiskLimitResp resp = api.getIsolatedMarginRiskLimit(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getLevel()); + Assertions.assertNotNull(item.getMaxRiskLimit()); + Assertions.assertNotNull(item.getMinRiskLimit()); + Assertions.assertNotNull(item.getMaxLeverage()); + Assertions.assertNotNull(item.getInitialMargin()); + Assertions.assertNotNull(item.getMaintainMargin()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -384,13 +398,14 @@ * Modify Isolated Margin Risk Limit * /api/v1/position/risk-limit-level/change */ - public void testModifyIsolatedMarginRiskLimt() { + @Test + public void testModifyIsolatedMarginRiskLimt() throws Exception { ModifyIsolatedMarginRiskLimtReq.ModifyIsolatedMarginRiskLimtReqBuilder builder = ModifyIsolatedMarginRiskLimtReq.builder(); builder.symbol(?).level(?); ModifyIsolatedMarginRiskLimtReq req = builder.build(); - ModifyIsolatedMarginRiskLimtResp resp = this.api.modifyIsolatedMarginRiskLimt(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + ModifyIsolatedMarginRiskLimtResp resp = api.modifyIsolatedMarginRiskLimt(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -398,12 +413,13 @@ * Modify Isolated Margin Auto-Deposit Status * /api/v1/position/margin/auto-deposit-status */ - public void testModifyAutoDepositStatus() { + @Test + public void testModifyAutoDepositStatus() throws Exception { ModifyAutoDepositStatusReq.ModifyAutoDepositStatusReqBuilder builder = ModifyAutoDepositStatusReq.builder(); builder.symbol(?).status(?); ModifyAutoDepositStatusReq req = builder.build(); - ModifyAutoDepositStatusResp resp = this.api.modifyAutoDepositStatus(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + ModifyAutoDepositStatusResp resp = api.modifyAutoDepositStatus(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApi.template index 03d51458..c0556c28 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/CreditApi.template @@ -4,26 +4,27 @@ * Get Loan Market * /api/v3/project/list */ - public void testGetLoanMarket() { + @Test + public void testGetLoanMarket() throws Exception { GetLoanMarketReq.GetLoanMarketReqBuilder builder = GetLoanMarketReq.builder(); builder.currency(?); GetLoanMarketReq req = builder.build(); - GetLoanMarketResp resp = this.api.getLoanMarket(req); - foreach($resp->data as $item) { - self::assertNotNull($item->currency); - self::assertNotNull($item->purchaseEnable); - self::assertNotNull($item->redeemEnable); - self::assertNotNull($item->increment); - self::assertNotNull($item->minPurchaseSize); - self::assertNotNull($item->minInterestRate); - self::assertNotNull($item->maxInterestRate); - self::assertNotNull($item->interestIncrement); - self::assertNotNull($item->maxPurchaseSize); - self::assertNotNull($item->marketInterestRate); - self::assertNotNull($item->autoPurchaseEnable); - } + GetLoanMarketResp resp = api.getLoanMarket(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getPurchaseEnable()); + Assertions.assertNotNull(item.getRedeemEnable()); + Assertions.assertNotNull(item.getIncrement()); + Assertions.assertNotNull(item.getMinPurchaseSize()); + Assertions.assertNotNull(item.getMinInterestRate()); + Assertions.assertNotNull(item.getMaxInterestRate()); + Assertions.assertNotNull(item.getInterestIncrement()); + Assertions.assertNotNull(item.getMaxPurchaseSize()); + Assertions.assertNotNull(item.getMarketInterestRate()); + Assertions.assertNotNull(item.getAutoPurchaseEnable()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -31,17 +32,18 @@ * Get Loan Market Interest Rate * /api/v3/project/marketInterestRate */ - public void testGetLoanMarketInterestRate() { + @Test + public void testGetLoanMarketInterestRate() throws Exception { GetLoanMarketInterestRateReq.GetLoanMarketInterestRateReqBuilder builder = GetLoanMarketInterestRateReq.builder(); builder.currency(?); GetLoanMarketInterestRateReq req = builder.build(); - GetLoanMarketInterestRateResp resp = this.api.getLoanMarketInterestRate(req); - foreach($resp->data as $item) { - self::assertNotNull($item->time); - self::assertNotNull($item->marketInterestRate); - } + GetLoanMarketInterestRateResp resp = api.getLoanMarketInterestRate(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getTime()); + Assertions.assertNotNull(item.getMarketInterestRate()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -49,13 +51,14 @@ * Purchase * /api/v3/purchase */ - public void testPurchase() { + @Test + public void testPurchase() throws Exception { PurchaseReq.PurchaseReqBuilder builder = PurchaseReq.builder(); builder.currency(?).size(?).interestRate(?); PurchaseReq req = builder.build(); - PurchaseResp resp = this.api.purchase(req); - self::assertNotNull($resp->orderNo); - Logger::info($resp->jsonSerialize($this->serializer)); + PurchaseResp resp = api.purchase(req); + Assertions.assertNotNull(resp.getOrderNo()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -63,13 +66,14 @@ * Modify Purchase * /api/v3/lend/purchase/update */ - public void testModifyPurchase() { + @Test + public void testModifyPurchase() throws Exception { ModifyPurchaseReq.ModifyPurchaseReqBuilder builder = ModifyPurchaseReq.builder(); builder.currency(?).interestRate(?).purchaseOrderNo(?); ModifyPurchaseReq req = builder.build(); - ModifyPurchaseResp resp = this.api.modifyPurchase(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + ModifyPurchaseResp resp = api.modifyPurchase(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -77,27 +81,28 @@ * Get Purchase Orders * /api/v3/purchase/orders */ - public void testGetPurchaseOrders() { + @Test + public void testGetPurchaseOrders() throws Exception { GetPurchaseOrdersReq.GetPurchaseOrdersReqBuilder builder = GetPurchaseOrdersReq.builder(); builder.status(?).currency(?).purchaseOrderNo(?).currentPage(?).pageSize(?); GetPurchaseOrdersReq req = builder.build(); - GetPurchaseOrdersResp resp = this.api.getPurchaseOrders(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->currency); - self::assertNotNull($item->purchaseOrderNo); - self::assertNotNull($item->purchaseSize); - self::assertNotNull($item->matchSize); - self::assertNotNull($item->interestRate); - self::assertNotNull($item->incomeSize); - self::assertNotNull($item->applyTime); - self::assertNotNull($item->status); - } + GetPurchaseOrdersResp resp = api.getPurchaseOrders(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getPurchaseOrderNo()); + Assertions.assertNotNull(item.getPurchaseSize()); + Assertions.assertNotNull(item.getMatchSize()); + Assertions.assertNotNull(item.getInterestRate()); + Assertions.assertNotNull(item.getIncomeSize()); + Assertions.assertNotNull(item.getApplyTime()); + Assertions.assertNotNull(item.getStatus()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -105,13 +110,14 @@ * Redeem * /api/v3/redeem */ - public void testRedeem() { + @Test + public void testRedeem() throws Exception { RedeemReq.RedeemReqBuilder builder = RedeemReq.builder(); builder.currency(?).size(?).purchaseOrderNo(?); RedeemReq req = builder.build(); - RedeemResp resp = this.api.redeem(req); - self::assertNotNull($resp->orderNo); - Logger::info($resp->jsonSerialize($this->serializer)); + RedeemResp resp = api.redeem(req); + Assertions.assertNotNull(resp.getOrderNo()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -119,25 +125,26 @@ * Get Redeem Orders * /api/v3/redeem/orders */ - public void testGetRedeemOrders() { + @Test + public void testGetRedeemOrders() throws Exception { GetRedeemOrdersReq.GetRedeemOrdersReqBuilder builder = GetRedeemOrdersReq.builder(); builder.status(?).currency(?).redeemOrderNo(?).currentPage(?).pageSize(?); GetRedeemOrdersReq req = builder.build(); - GetRedeemOrdersResp resp = this.api.getRedeemOrders(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->currency); - self::assertNotNull($item->purchaseOrderNo); - self::assertNotNull($item->redeemOrderNo); - self::assertNotNull($item->redeemSize); - self::assertNotNull($item->receiptSize); - self::assertNotNull($item->applyTime); - self::assertNotNull($item->status); - } + GetRedeemOrdersResp resp = api.getRedeemOrders(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getPurchaseOrderNo()); + Assertions.assertNotNull(item.getRedeemOrderNo()); + Assertions.assertNotNull(item.getRedeemSize()); + Assertions.assertNotNull(item.getReceiptSize()); + Assertions.assertNotNull(item.getApplyTime()); + Assertions.assertNotNull(item.getStatus()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApi.template index 1ae3a6f0..6ad297fb 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/DebitApi.template @@ -4,14 +4,15 @@ * Borrow * /api/v3/margin/borrow */ - public void testBorrow() { + @Test + public void testBorrow() throws Exception { BorrowReq.BorrowReqBuilder builder = BorrowReq.builder(); builder.currency(?).size(?).timeInForce(?).symbol(?).isIsolated(?).isHf(?); BorrowReq req = builder.build(); - BorrowResp resp = this.api.borrow(req); - self::assertNotNull($resp->orderNo); - self::assertNotNull($resp->actualSize); - Logger::info($resp->jsonSerialize($this->serializer)); + BorrowResp resp = api.borrow(req); + Assertions.assertNotNull(resp.getOrderNo()); + Assertions.assertNotNull(resp.getActualSize()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -19,27 +20,28 @@ * Get Borrow History * /api/v3/margin/borrow */ - public void testGetBorrowHistory() { + @Test + public void testGetBorrowHistory() throws Exception { GetBorrowHistoryReq.GetBorrowHistoryReqBuilder builder = GetBorrowHistoryReq.builder(); builder.currency(?).isIsolated(?).symbol(?).orderNo(?).startTime(?).endTime(?).currentPage(?).pageSize(?); GetBorrowHistoryReq req = builder.build(); - GetBorrowHistoryResp resp = this.api.getBorrowHistory(req); - self::assertNotNull($resp->timestamp); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->orderNo); - self::assertNotNull($item->symbol); - self::assertNotNull($item->currency); - self::assertNotNull($item->size); - self::assertNotNull($item->actualSize); - self::assertNotNull($item->status); - self::assertNotNull($item->createdTime); - } + GetBorrowHistoryResp resp = api.getBorrowHistory(req); + Assertions.assertNotNull(resp.getTimestamp()); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getOrderNo()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getActualSize()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getCreatedTime()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -47,15 +49,16 @@ * Repay * /api/v3/margin/repay */ - public void testRepay() { + @Test + public void testRepay() throws Exception { RepayReq.RepayReqBuilder builder = RepayReq.builder(); builder.currency(?).size(?).symbol(?).isIsolated(?).isHf(?); RepayReq req = builder.build(); - RepayResp resp = this.api.repay(req); - self::assertNotNull($resp->timestamp); - self::assertNotNull($resp->orderNo); - self::assertNotNull($resp->actualSize); - Logger::info($resp->jsonSerialize($this->serializer)); + RepayResp resp = api.repay(req); + Assertions.assertNotNull(resp.getTimestamp()); + Assertions.assertNotNull(resp.getOrderNo()); + Assertions.assertNotNull(resp.getActualSize()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -63,28 +66,29 @@ * Get Repay History * /api/v3/margin/repay */ - public void testGetRepayHistory() { + @Test + public void testGetRepayHistory() throws Exception { GetRepayHistoryReq.GetRepayHistoryReqBuilder builder = GetRepayHistoryReq.builder(); builder.currency(?).isIsolated(?).symbol(?).orderNo(?).startTime(?).endTime(?).currentPage(?).pageSize(?); GetRepayHistoryReq req = builder.build(); - GetRepayHistoryResp resp = this.api.getRepayHistory(req); - self::assertNotNull($resp->timestamp); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->orderNo); - self::assertNotNull($item->symbol); - self::assertNotNull($item->currency); - self::assertNotNull($item->size); - self::assertNotNull($item->principal); - self::assertNotNull($item->interest); - self::assertNotNull($item->status); - self::assertNotNull($item->createdTime); - } + GetRepayHistoryResp resp = api.getRepayHistory(req); + Assertions.assertNotNull(resp.getTimestamp()); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getOrderNo()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getPrincipal()); + Assertions.assertNotNull(item.getInterest()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getCreatedTime()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -92,24 +96,25 @@ * Get Interest History. * /api/v3/margin/interest */ - public void testGetInterestHistory() { + @Test + public void testGetInterestHistory() throws Exception { GetInterestHistoryReq.GetInterestHistoryReqBuilder builder = GetInterestHistoryReq.builder(); builder.currency(?).isIsolated(?).symbol(?).startTime(?).endTime(?).currentPage(?).pageSize(?); GetInterestHistoryReq req = builder.build(); - GetInterestHistoryResp resp = this.api.getInterestHistory(req); - self::assertNotNull($resp->timestamp); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->currency); - self::assertNotNull($item->dayRatio); - self::assertNotNull($item->interestAmount); - self::assertNotNull($item->createdTime); - } + GetInterestHistoryResp resp = api.getInterestHistory(req); + Assertions.assertNotNull(resp.getTimestamp()); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getDayRatio()); + Assertions.assertNotNull(item.getInterestAmount()); + Assertions.assertNotNull(item.getCreatedTime()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -117,12 +122,13 @@ * Modify Leverage * /api/v3/position/update-user-leverage */ - public void testModifyLeverage() { + @Test + public void testModifyLeverage() throws Exception { ModifyLeverageReq.ModifyLeverageReqBuilder builder = ModifyLeverageReq.builder(); builder.symbol(?).isIsolated(?).leverage(?); ModifyLeverageReq req = builder.build(); - ModifyLeverageResp resp = this.api.modifyLeverage(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + ModifyLeverageResp resp = api.modifyLeverage(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApi.template index 7975b392..01204388 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/MarketApi.template @@ -4,32 +4,33 @@ * Get Symbols - Cross Margin * /api/v3/margin/symbols */ - public void testGetCrossMarginSymbols() { + @Test + public void testGetCrossMarginSymbols() throws Exception { GetCrossMarginSymbolsReq.GetCrossMarginSymbolsReqBuilder builder = GetCrossMarginSymbolsReq.builder(); builder.symbol(?); GetCrossMarginSymbolsReq req = builder.build(); - GetCrossMarginSymbolsResp resp = this.api.getCrossMarginSymbols(req); - self::assertNotNull($resp->timestamp); - foreach($resp->items as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->name); - self::assertNotNull($item->enableTrading); - self::assertNotNull($item->market); - self::assertNotNull($item->baseCurrency); - self::assertNotNull($item->quoteCurrency); - self::assertNotNull($item->baseIncrement); - self::assertNotNull($item->baseMinSize); - self::assertNotNull($item->quoteIncrement); - self::assertNotNull($item->quoteMinSize); - self::assertNotNull($item->baseMaxSize); - self::assertNotNull($item->quoteMaxSize); - self::assertNotNull($item->priceIncrement); - self::assertNotNull($item->feeCurrency); - self::assertNotNull($item->priceLimitRate); - self::assertNotNull($item->minFunds); - } + GetCrossMarginSymbolsResp resp = api.getCrossMarginSymbols(req); + Assertions.assertNotNull(resp.getTimestamp()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getName()); + Assertions.assertNotNull(item.getEnableTrading()); + Assertions.assertNotNull(item.getMarket()); + Assertions.assertNotNull(item.getBaseCurrency()); + Assertions.assertNotNull(item.getQuoteCurrency()); + Assertions.assertNotNull(item.getBaseIncrement()); + Assertions.assertNotNull(item.getBaseMinSize()); + Assertions.assertNotNull(item.getQuoteIncrement()); + Assertions.assertNotNull(item.getQuoteMinSize()); + Assertions.assertNotNull(item.getBaseMaxSize()); + Assertions.assertNotNull(item.getQuoteMaxSize()); + Assertions.assertNotNull(item.getPriceIncrement()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getPriceLimitRate()); + Assertions.assertNotNull(item.getMinFunds()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -37,21 +38,22 @@ * Get ETF Info * /api/v3/etf/info */ - public void testGetETFInfo() { + @Test + public void testGetETFInfo() throws Exception { GetETFInfoReq.GetETFInfoReqBuilder builder = GetETFInfoReq.builder(); builder.currency(?); GetETFInfoReq req = builder.build(); - GetETFInfoResp resp = this.api.getETFInfo(req); - foreach($resp->data as $item) { - self::assertNotNull($item->currency); - self::assertNotNull($item->netAsset); - self::assertNotNull($item->targetLeverage); - self::assertNotNull($item->actualLeverage); - self::assertNotNull($item->issuedSize); - self::assertNotNull($item->basket); - } + GetETFInfoResp resp = api.getETFInfo(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getNetAsset()); + Assertions.assertNotNull(item.getTargetLeverage()); + Assertions.assertNotNull(item.getActualLeverage()); + Assertions.assertNotNull(item.getIssuedSize()); + Assertions.assertNotNull(item.getBasket()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -59,15 +61,16 @@ * Get Mark Price Detail * /api/v1/mark-price/{symbol}/current */ - public void testGetMarkPriceDetail() { + @Test + public void testGetMarkPriceDetail() throws Exception { GetMarkPriceDetailReq.GetMarkPriceDetailReqBuilder builder = GetMarkPriceDetailReq.builder(); builder.symbol(?); GetMarkPriceDetailReq req = builder.build(); - GetMarkPriceDetailResp resp = this.api.getMarkPriceDetail(req); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->timePoint); - self::assertNotNull($resp->value); - Logger::info($resp->jsonSerialize($this->serializer)); + GetMarkPriceDetailResp resp = api.getMarkPriceDetail(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getTimePoint()); + Assertions.assertNotNull(resp.getValue()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -75,15 +78,16 @@ * Get Margin Config * /api/v1/margin/config */ - public void testGetMarginConfig() { - GetMarginConfigResp resp = this.api.getMarginConfig(); - foreach($resp->currencyList as $item) { - } + @Test + public void testGetMarginConfig() throws Exception { + GetMarginConfigResp resp = api.getMarginConfig(); + resp.getCurrencyList().forEach( item -> { + }); - self::assertNotNull($resp->maxLeverage); - self::assertNotNull($resp->warningDebtRatio); - self::assertNotNull($resp->liqDebtRatio); - Logger::info($resp->jsonSerialize($this->serializer)); + Assertions.assertNotNull(resp.getMaxLeverage()); + Assertions.assertNotNull(resp.getWarningDebtRatio()); + Assertions.assertNotNull(resp.getLiqDebtRatio()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -91,15 +95,16 @@ * Get Mark Price List * /api/v3/mark-price/all-symbols */ - public void testGetMarkPriceList() { - GetMarkPriceListResp resp = this.api.getMarkPriceList(); - foreach($resp->data as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->timePoint); - self::assertNotNull($item->value); - } + @Test + public void testGetMarkPriceList() throws Exception { + GetMarkPriceListResp resp = api.getMarkPriceList(); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTimePoint()); + Assertions.assertNotNull(item.getValue()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -107,25 +112,26 @@ * Get Symbols - Isolated Margin * /api/v1/isolated/symbols */ - public void testGetIsolatedMarginSymbols() { - GetIsolatedMarginSymbolsResp resp = this.api.getIsolatedMarginSymbols(); - foreach($resp->data as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->symbolName); - self::assertNotNull($item->baseCurrency); - self::assertNotNull($item->quoteCurrency); - self::assertNotNull($item->maxLeverage); - self::assertNotNull($item->flDebtRatio); - self::assertNotNull($item->tradeEnable); - self::assertNotNull($item->autoRenewMaxDebtRatio); - self::assertNotNull($item->baseBorrowEnable); - self::assertNotNull($item->quoteBorrowEnable); - self::assertNotNull($item->baseTransferInEnable); - self::assertNotNull($item->quoteTransferInEnable); - self::assertNotNull($item->baseBorrowCoefficient); - self::assertNotNull($item->quoteBorrowCoefficient); - } + @Test + public void testGetIsolatedMarginSymbols() throws Exception { + GetIsolatedMarginSymbolsResp resp = api.getIsolatedMarginSymbols(); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getSymbolName()); + Assertions.assertNotNull(item.getBaseCurrency()); + Assertions.assertNotNull(item.getQuoteCurrency()); + Assertions.assertNotNull(item.getMaxLeverage()); + Assertions.assertNotNull(item.getFlDebtRatio()); + Assertions.assertNotNull(item.getTradeEnable()); + Assertions.assertNotNull(item.getAutoRenewMaxDebtRatio()); + Assertions.assertNotNull(item.getBaseBorrowEnable()); + Assertions.assertNotNull(item.getQuoteBorrowEnable()); + Assertions.assertNotNull(item.getBaseTransferInEnable()); + Assertions.assertNotNull(item.getQuoteTransferInEnable()); + Assertions.assertNotNull(item.getBaseBorrowCoefficient()); + Assertions.assertNotNull(item.getQuoteBorrowCoefficient()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.template index 74189c2a..3cf01144 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/OrderApi.template @@ -4,16 +4,17 @@ * Add Order * /api/v3/hf/margin/order */ - public void testAddOrder() { + @Test + public void testAddOrder() throws Exception { AddOrderReq.AddOrderReqBuilder builder = AddOrderReq.builder(); builder.clientOid(?).side(?).symbol(?).type(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).cancelAfter(?).funds(?).isIsolated(?).autoBorrow(?).autoRepay(?); AddOrderReq req = builder.build(); - AddOrderResp resp = this.api.addOrder(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->loanApplyId); - self::assertNotNull($resp->borrowSize); - self::assertNotNull($resp->clientOid); - Logger::info($resp->jsonSerialize($this->serializer)); + AddOrderResp resp = api.addOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getLoanApplyId()); + Assertions.assertNotNull(resp.getBorrowSize()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -21,16 +22,17 @@ * Add Order Test * /api/v3/hf/margin/order/test */ - public void testAddOrderTest() { + @Test + public void testAddOrderTest() throws Exception { AddOrderTestReq.AddOrderTestReqBuilder builder = AddOrderTestReq.builder(); builder.clientOid(?).side(?).symbol(?).type(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).cancelAfter(?).funds(?).isIsolated(?).autoBorrow(?).autoRepay(?); AddOrderTestReq req = builder.build(); - AddOrderTestResp resp = this.api.addOrderTest(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->loanApplyId); - self::assertNotNull($resp->borrowSize); - self::assertNotNull($resp->clientOid); - Logger::info($resp->jsonSerialize($this->serializer)); + AddOrderTestResp resp = api.addOrderTest(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getLoanApplyId()); + Assertions.assertNotNull(resp.getBorrowSize()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -38,13 +40,14 @@ * Cancel Order By OrderId * /api/v3/hf/margin/orders/{orderId} */ - public void testCancelOrderByOrderId() { + @Test + public void testCancelOrderByOrderId() throws Exception { CancelOrderByOrderIdReq.CancelOrderByOrderIdReqBuilder builder = CancelOrderByOrderIdReq.builder(); builder.symbol(?).orderId(?); CancelOrderByOrderIdReq req = builder.build(); - CancelOrderByOrderIdResp resp = this.api.cancelOrderByOrderId(req); - self::assertNotNull($resp->orderId); - Logger::info($resp->jsonSerialize($this->serializer)); + CancelOrderByOrderIdResp resp = api.cancelOrderByOrderId(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -52,13 +55,14 @@ * Cancel Order By ClientOid * /api/v3/hf/margin/orders/client-order/{clientOid} */ - public void testCancelOrderByClientOid() { + @Test + public void testCancelOrderByClientOid() throws Exception { CancelOrderByClientOidReq.CancelOrderByClientOidReqBuilder builder = CancelOrderByClientOidReq.builder(); builder.symbol(?).clientOid(?); CancelOrderByClientOidReq req = builder.build(); - CancelOrderByClientOidResp resp = this.api.cancelOrderByClientOid(req); - self::assertNotNull($resp->clientOid); - Logger::info($resp->jsonSerialize($this->serializer)); + CancelOrderByClientOidResp resp = api.cancelOrderByClientOid(req); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -66,13 +70,14 @@ * Cancel All Orders By Symbol * /api/v3/hf/margin/orders */ - public void testCancelAllOrdersBySymbol() { + @Test + public void testCancelAllOrdersBySymbol() throws Exception { CancelAllOrdersBySymbolReq.CancelAllOrdersBySymbolReqBuilder builder = CancelAllOrdersBySymbolReq.builder(); builder.symbol(?).tradeType(?); CancelAllOrdersBySymbolReq req = builder.build(); - CancelAllOrdersBySymbolResp resp = this.api.cancelAllOrdersBySymbol(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + CancelAllOrdersBySymbolResp resp = api.cancelAllOrdersBySymbol(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -80,16 +85,17 @@ * Get Symbols With Open Order * /api/v3/hf/margin/order/active/symbols */ - public void testGetSymbolsWithOpenOrder() { + @Test + public void testGetSymbolsWithOpenOrder() throws Exception { GetSymbolsWithOpenOrderReq.GetSymbolsWithOpenOrderReqBuilder builder = GetSymbolsWithOpenOrderReq.builder(); builder.tradeType(?); GetSymbolsWithOpenOrderReq req = builder.build(); - GetSymbolsWithOpenOrderResp resp = this.api.getSymbolsWithOpenOrder(req); - self::assertNotNull($resp->symbolSize); - foreach($resp->symbols as $item) { - } + GetSymbolsWithOpenOrderResp resp = api.getSymbolsWithOpenOrder(req); + Assertions.assertNotNull(resp.getSymbolSize()); + resp.getSymbols().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -97,52 +103,53 @@ * Get Open Orders * /api/v3/hf/margin/orders/active */ - public void testGetOpenOrders() { + @Test + public void testGetOpenOrders() throws Exception { GetOpenOrdersReq.GetOpenOrdersReqBuilder builder = GetOpenOrdersReq.builder(); builder.symbol(?).tradeType(?); GetOpenOrdersReq req = builder.build(); - GetOpenOrdersResp resp = this.api.getOpenOrders(req); - foreach($resp->data as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->symbol); - self::assertNotNull($item->opType); - self::assertNotNull($item->type); - self::assertNotNull($item->side); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->funds); - self::assertNotNull($item->dealSize); - self::assertNotNull($item->dealFunds); - self::assertNotNull($item->fee); - self::assertNotNull($item->feeCurrency); - self::assertNotNull($item->stp); - self::assertNotNull($item->stop); - self::assertNotNull($item->stopTriggered); - self::assertNotNull($item->stopPrice); - self::assertNotNull($item->timeInForce); - self::assertNotNull($item->postOnly); - self::assertNotNull($item->hidden); - self::assertNotNull($item->iceberg); - self::assertNotNull($item->visibleSize); - self::assertNotNull($item->cancelAfter); - self::assertNotNull($item->channel); - self::assertNotNull($item->clientOid); - self::assertNotNull($item->remark); - self::assertNotNull($item->tags); - self::assertNotNull($item->cancelExist); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->lastUpdatedAt); - self::assertNotNull($item->tradeType); - self::assertNotNull($item->inOrderBook); - self::assertNotNull($item->cancelledSize); - self::assertNotNull($item->cancelledFunds); - self::assertNotNull($item->remainSize); - self::assertNotNull($item->remainFunds); - self::assertNotNull($item->tax); - self::assertNotNull($item->active); - } + GetOpenOrdersResp resp = api.getOpenOrders(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getOpType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getDealFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStp()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getStopTriggered()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getTags()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getLastUpdatedAt()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getInOrderBook()); + Assertions.assertNotNull(item.getCancelledSize()); + Assertions.assertNotNull(item.getCancelledFunds()); + Assertions.assertNotNull(item.getRemainSize()); + Assertions.assertNotNull(item.getRemainFunds()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getActive()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -150,53 +157,54 @@ * Get Closed Orders * /api/v3/hf/margin/orders/done */ - public void testGetClosedOrders() { + @Test + public void testGetClosedOrders() throws Exception { GetClosedOrdersReq.GetClosedOrdersReqBuilder builder = GetClosedOrdersReq.builder(); builder.symbol(?).tradeType(?).side(?).type(?).lastId(?).limit(?).startAt(?).endAt(?); GetClosedOrdersReq req = builder.build(); - GetClosedOrdersResp resp = this.api.getClosedOrders(req); - self::assertNotNull($resp->lastId); - foreach($resp->items as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->symbol); - self::assertNotNull($item->opType); - self::assertNotNull($item->type); - self::assertNotNull($item->side); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->funds); - self::assertNotNull($item->dealSize); - self::assertNotNull($item->dealFunds); - self::assertNotNull($item->fee); - self::assertNotNull($item->feeCurrency); - self::assertNotNull($item->stp); - self::assertNotNull($item->stop); - self::assertNotNull($item->stopTriggered); - self::assertNotNull($item->stopPrice); - self::assertNotNull($item->timeInForce); - self::assertNotNull($item->postOnly); - self::assertNotNull($item->hidden); - self::assertNotNull($item->iceberg); - self::assertNotNull($item->visibleSize); - self::assertNotNull($item->cancelAfter); - self::assertNotNull($item->channel); - self::assertNotNull($item->clientOid); - self::assertNotNull($item->remark); - self::assertNotNull($item->tags); - self::assertNotNull($item->cancelExist); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->lastUpdatedAt); - self::assertNotNull($item->tradeType); - self::assertNotNull($item->inOrderBook); - self::assertNotNull($item->cancelledSize); - self::assertNotNull($item->cancelledFunds); - self::assertNotNull($item->remainSize); - self::assertNotNull($item->remainFunds); - self::assertNotNull($item->tax); - self::assertNotNull($item->active); - } + GetClosedOrdersResp resp = api.getClosedOrders(req); + Assertions.assertNotNull(resp.getLastId()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getOpType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getDealFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStp()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getStopTriggered()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getTags()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getLastUpdatedAt()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getInOrderBook()); + Assertions.assertNotNull(item.getCancelledSize()); + Assertions.assertNotNull(item.getCancelledFunds()); + Assertions.assertNotNull(item.getRemainSize()); + Assertions.assertNotNull(item.getRemainFunds()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getActive()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -204,36 +212,37 @@ * Get Trade History * /api/v3/hf/margin/fills */ - public void testGetTradeHistory() { + @Test + public void testGetTradeHistory() throws Exception { GetTradeHistoryReq.GetTradeHistoryReqBuilder builder = GetTradeHistoryReq.builder(); builder.symbol(?).tradeType(?).orderId(?).side(?).type(?).lastId(?).limit(?).startAt(?).endAt(?); GetTradeHistoryReq req = builder.build(); - GetTradeHistoryResp resp = this.api.getTradeHistory(req); - foreach($resp->items as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->symbol); - self::assertNotNull($item->tradeId); - self::assertNotNull($item->orderId); - self::assertNotNull($item->counterOrderId); - self::assertNotNull($item->side); - self::assertNotNull($item->liquidity); - self::assertNotNull($item->forceTaker); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->funds); - self::assertNotNull($item->fee); - self::assertNotNull($item->feeRate); - self::assertNotNull($item->feeCurrency); - self::assertNotNull($item->stop); - self::assertNotNull($item->tradeType); - self::assertNotNull($item->tax); - self::assertNotNull($item->taxRate); - self::assertNotNull($item->type); - self::assertNotNull($item->createdAt); - } + GetTradeHistoryResp resp = api.getTradeHistory(req); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTradeId()); + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getCounterOrderId()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getLiquidity()); + Assertions.assertNotNull(item.getForceTaker()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeRate()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getTaxRate()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getCreatedAt()); + }); - self::assertNotNull($resp->lastId); - Logger::info($resp->jsonSerialize($this->serializer)); + Assertions.assertNotNull(resp.getLastId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -241,49 +250,50 @@ * Get Order By OrderId * /api/v3/hf/margin/orders/{orderId} */ - public void testGetOrderByOrderId() { + @Test + public void testGetOrderByOrderId() throws Exception { GetOrderByOrderIdReq.GetOrderByOrderIdReqBuilder builder = GetOrderByOrderIdReq.builder(); builder.symbol(?).orderId(?); GetOrderByOrderIdReq req = builder.build(); - GetOrderByOrderIdResp resp = this.api.getOrderByOrderId(req); - self::assertNotNull($resp->id); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->opType); - self::assertNotNull($resp->type); - self::assertNotNull($resp->side); - self::assertNotNull($resp->price); - self::assertNotNull($resp->size); - self::assertNotNull($resp->funds); - self::assertNotNull($resp->dealSize); - self::assertNotNull($resp->dealFunds); - self::assertNotNull($resp->fee); - self::assertNotNull($resp->feeCurrency); - self::assertNotNull($resp->stp); - self::assertNotNull($resp->stop); - self::assertNotNull($resp->stopTriggered); - self::assertNotNull($resp->stopPrice); - self::assertNotNull($resp->timeInForce); - self::assertNotNull($resp->postOnly); - self::assertNotNull($resp->hidden); - self::assertNotNull($resp->iceberg); - self::assertNotNull($resp->visibleSize); - self::assertNotNull($resp->cancelAfter); - self::assertNotNull($resp->channel); - self::assertNotNull($resp->clientOid); - self::assertNotNull($resp->remark); - self::assertNotNull($resp->tags); - self::assertNotNull($resp->cancelExist); - self::assertNotNull($resp->createdAt); - self::assertNotNull($resp->lastUpdatedAt); - self::assertNotNull($resp->tradeType); - self::assertNotNull($resp->inOrderBook); - self::assertNotNull($resp->cancelledSize); - self::assertNotNull($resp->cancelledFunds); - self::assertNotNull($resp->remainSize); - self::assertNotNull($resp->remainFunds); - self::assertNotNull($resp->tax); - self::assertNotNull($resp->active); - Logger::info($resp->jsonSerialize($this->serializer)); + GetOrderByOrderIdResp resp = api.getOrderByOrderId(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getOpType()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getFunds()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getDealFunds()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getFeeCurrency()); + Assertions.assertNotNull(resp.getStp()); + Assertions.assertNotNull(resp.getStop()); + Assertions.assertNotNull(resp.getStopTriggered()); + Assertions.assertNotNull(resp.getStopPrice()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getVisibleSize()); + Assertions.assertNotNull(resp.getCancelAfter()); + Assertions.assertNotNull(resp.getChannel()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getTags()); + Assertions.assertNotNull(resp.getCancelExist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getLastUpdatedAt()); + Assertions.assertNotNull(resp.getTradeType()); + Assertions.assertNotNull(resp.getInOrderBook()); + Assertions.assertNotNull(resp.getCancelledSize()); + Assertions.assertNotNull(resp.getCancelledFunds()); + Assertions.assertNotNull(resp.getRemainSize()); + Assertions.assertNotNull(resp.getRemainFunds()); + Assertions.assertNotNull(resp.getTax()); + Assertions.assertNotNull(resp.getActive()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -291,49 +301,50 @@ * Get Order By ClientOid * /api/v3/hf/margin/orders/client-order/{clientOid} */ - public void testGetOrderByClientOid() { + @Test + public void testGetOrderByClientOid() throws Exception { GetOrderByClientOidReq.GetOrderByClientOidReqBuilder builder = GetOrderByClientOidReq.builder(); builder.symbol(?).clientOid(?); GetOrderByClientOidReq req = builder.build(); - GetOrderByClientOidResp resp = this.api.getOrderByClientOid(req); - self::assertNotNull($resp->id); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->opType); - self::assertNotNull($resp->type); - self::assertNotNull($resp->side); - self::assertNotNull($resp->price); - self::assertNotNull($resp->size); - self::assertNotNull($resp->funds); - self::assertNotNull($resp->dealSize); - self::assertNotNull($resp->dealFunds); - self::assertNotNull($resp->fee); - self::assertNotNull($resp->feeCurrency); - self::assertNotNull($resp->stp); - self::assertNotNull($resp->stop); - self::assertNotNull($resp->stopTriggered); - self::assertNotNull($resp->stopPrice); - self::assertNotNull($resp->timeInForce); - self::assertNotNull($resp->postOnly); - self::assertNotNull($resp->hidden); - self::assertNotNull($resp->iceberg); - self::assertNotNull($resp->visibleSize); - self::assertNotNull($resp->cancelAfter); - self::assertNotNull($resp->channel); - self::assertNotNull($resp->clientOid); - self::assertNotNull($resp->remark); - self::assertNotNull($resp->tags); - self::assertNotNull($resp->cancelExist); - self::assertNotNull($resp->createdAt); - self::assertNotNull($resp->lastUpdatedAt); - self::assertNotNull($resp->tradeType); - self::assertNotNull($resp->inOrderBook); - self::assertNotNull($resp->cancelledSize); - self::assertNotNull($resp->cancelledFunds); - self::assertNotNull($resp->remainSize); - self::assertNotNull($resp->remainFunds); - self::assertNotNull($resp->tax); - self::assertNotNull($resp->active); - Logger::info($resp->jsonSerialize($this->serializer)); + GetOrderByClientOidResp resp = api.getOrderByClientOid(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getOpType()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getFunds()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getDealFunds()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getFeeCurrency()); + Assertions.assertNotNull(resp.getStp()); + Assertions.assertNotNull(resp.getStop()); + Assertions.assertNotNull(resp.getStopTriggered()); + Assertions.assertNotNull(resp.getStopPrice()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getVisibleSize()); + Assertions.assertNotNull(resp.getCancelAfter()); + Assertions.assertNotNull(resp.getChannel()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getTags()); + Assertions.assertNotNull(resp.getCancelExist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getLastUpdatedAt()); + Assertions.assertNotNull(resp.getTradeType()); + Assertions.assertNotNull(resp.getInOrderBook()); + Assertions.assertNotNull(resp.getCancelledSize()); + Assertions.assertNotNull(resp.getCancelledFunds()); + Assertions.assertNotNull(resp.getRemainSize()); + Assertions.assertNotNull(resp.getRemainFunds()); + Assertions.assertNotNull(resp.getTax()); + Assertions.assertNotNull(resp.getActive()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -341,16 +352,17 @@ * Add Order - V1 * /api/v1/margin/order */ - public void testAddOrderV1() { + @Test + public void testAddOrderV1() throws Exception { AddOrderV1Req.AddOrderV1ReqBuilder builder = AddOrderV1Req.builder(); builder.clientOid(?).side(?).symbol(?).type(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).cancelAfter(?).funds(?).autoBorrow(?).autoRepay(?).marginModel(?); AddOrderV1Req req = builder.build(); - AddOrderV1Resp resp = this.api.addOrderV1(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->loanApplyId); - self::assertNotNull($resp->borrowSize); - self::assertNotNull($resp->clientOid); - Logger::info($resp->jsonSerialize($this->serializer)); + AddOrderV1Resp resp = api.addOrderV1(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getLoanApplyId()); + Assertions.assertNotNull(resp.getBorrowSize()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -358,15 +370,16 @@ * Add Order Test - V1 * /api/v1/margin/order/test */ - public void testAddOrderTestV1() { + @Test + public void testAddOrderTestV1() throws Exception { AddOrderTestV1Req.AddOrderTestV1ReqBuilder builder = AddOrderTestV1Req.builder(); builder.clientOid(?).side(?).symbol(?).type(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).cancelAfter(?).funds(?).autoBorrow(?).autoRepay(?).marginModel(?); AddOrderTestV1Req req = builder.build(); - AddOrderTestV1Resp resp = this.api.addOrderTestV1(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->loanApplyId); - self::assertNotNull($resp->borrowSize); - self::assertNotNull($resp->clientOid); - Logger::info($resp->jsonSerialize($this->serializer)); + AddOrderTestV1Resp resp = api.addOrderTestV1(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getLoanApplyId()); + Assertions.assertNotNull(resp.getBorrowSize()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApi.template index cc779daa..23af45d4 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/RiskLimitApi.template @@ -4,44 +4,45 @@ * Get Margin Risk Limit * /api/v3/margin/currencies */ - public void testGetMarginRiskLimit() { + @Test + public void testGetMarginRiskLimit() throws Exception { GetMarginRiskLimitReq.GetMarginRiskLimitReqBuilder builder = GetMarginRiskLimitReq.builder(); builder.isIsolated(?).currency(?).symbol(?); GetMarginRiskLimitReq req = builder.build(); - GetMarginRiskLimitResp resp = this.api.getMarginRiskLimit(req); - foreach($resp->data as $item) { - self::assertNotNull($item->timestamp); - self::assertNotNull($item->currency); - self::assertNotNull($item->borrowMaxAmount); - self::assertNotNull($item->buyMaxAmount); - self::assertNotNull($item->holdMaxAmount); - self::assertNotNull($item->borrowCoefficient); - self::assertNotNull($item->marginCoefficient); - self::assertNotNull($item->precision); - self::assertNotNull($item->borrowMinAmount); - self::assertNotNull($item->borrowMinUnit); - self::assertNotNull($item->borrowEnabled); - self::assertNotNull($item->symbol); - self::assertNotNull($item->baseMaxBorrowAmount); - self::assertNotNull($item->quoteMaxBorrowAmount); - self::assertNotNull($item->baseMaxBuyAmount); - self::assertNotNull($item->quoteMaxBuyAmount); - self::assertNotNull($item->baseMaxHoldAmount); - self::assertNotNull($item->quoteMaxHoldAmount); - self::assertNotNull($item->basePrecision); - self::assertNotNull($item->quotePrecision); - self::assertNotNull($item->baseBorrowMinAmount); - self::assertNotNull($item->quoteBorrowMinAmount); - self::assertNotNull($item->baseBorrowMinUnit); - self::assertNotNull($item->quoteBorrowMinUnit); - self::assertNotNull($item->baseBorrowEnabled); - self::assertNotNull($item->quoteBorrowEnabled); - self::assertNotNull($item->baseBorrowCoefficient); - self::assertNotNull($item->quoteBorrowCoefficient); - self::assertNotNull($item->baseMarginCoefficient); - self::assertNotNull($item->quoteMarginCoefficient); - } + GetMarginRiskLimitResp resp = api.getMarginRiskLimit(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getTimestamp()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getBorrowMaxAmount()); + Assertions.assertNotNull(item.getBuyMaxAmount()); + Assertions.assertNotNull(item.getHoldMaxAmount()); + Assertions.assertNotNull(item.getBorrowCoefficient()); + Assertions.assertNotNull(item.getMarginCoefficient()); + Assertions.assertNotNull(item.getPrecision()); + Assertions.assertNotNull(item.getBorrowMinAmount()); + Assertions.assertNotNull(item.getBorrowMinUnit()); + Assertions.assertNotNull(item.getBorrowEnabled()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getBaseMaxBorrowAmount()); + Assertions.assertNotNull(item.getQuoteMaxBorrowAmount()); + Assertions.assertNotNull(item.getBaseMaxBuyAmount()); + Assertions.assertNotNull(item.getQuoteMaxBuyAmount()); + Assertions.assertNotNull(item.getBaseMaxHoldAmount()); + Assertions.assertNotNull(item.getQuoteMaxHoldAmount()); + Assertions.assertNotNull(item.getBasePrecision()); + Assertions.assertNotNull(item.getQuotePrecision()); + Assertions.assertNotNull(item.getBaseBorrowMinAmount()); + Assertions.assertNotNull(item.getQuoteBorrowMinAmount()); + Assertions.assertNotNull(item.getBaseBorrowMinUnit()); + Assertions.assertNotNull(item.getQuoteBorrowMinUnit()); + Assertions.assertNotNull(item.getBaseBorrowEnabled()); + Assertions.assertNotNull(item.getQuoteBorrowEnabled()); + Assertions.assertNotNull(item.getBaseBorrowCoefficient()); + Assertions.assertNotNull(item.getQuoteBorrowCoefficient()); + Assertions.assertNotNull(item.getBaseMarginCoefficient()); + Assertions.assertNotNull(item.getQuoteMarginCoefficient()); + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.template index 259c8d6a..c47c3961 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/MarketApi.template @@ -4,26 +4,27 @@ * Get Announcements * /api/v3/announcements */ - public void testGetAnnouncements() { + @Test + public void testGetAnnouncements() throws Exception { GetAnnouncementsReq.GetAnnouncementsReqBuilder builder = GetAnnouncementsReq.builder(); builder.currentPage(?).pageSize(?).annType(?).lang(?).startTime(?).endTime(?); GetAnnouncementsReq req = builder.build(); - GetAnnouncementsResp resp = this.api.getAnnouncements(req); - self::assertNotNull($resp->totalNum); - foreach($resp->items as $item) { - self::assertNotNull($item->annId); - self::assertNotNull($item->annTitle); - self::assertNotNull($item->annType); - self::assertNotNull($item->annDesc); - self::assertNotNull($item->cTime); - self::assertNotNull($item->language); - self::assertNotNull($item->annUrl); - } - - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalPage); - Logger::info($resp->jsonSerialize($this->serializer)); + GetAnnouncementsResp resp = api.getAnnouncements(req); + Assertions.assertNotNull(resp.getTotalNum()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getAnnId()); + Assertions.assertNotNull(item.getAnnTitle()); + Assertions.assertNotNull(item.getAnnType()); + Assertions.assertNotNull(item.getAnnDesc()); + Assertions.assertNotNull(item.getcTime()); + Assertions.assertNotNull(item.getLanguage()); + Assertions.assertNotNull(item.getAnnUrl()); + }); + + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalPage()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -31,38 +32,39 @@ * Get Currency * /api/v3/currencies/{currency} */ - public void testGetCurrency() { + @Test + public void testGetCurrency() throws Exception { GetCurrencyReq.GetCurrencyReqBuilder builder = GetCurrencyReq.builder(); builder.chain(?).currency(?); GetCurrencyReq req = builder.build(); - GetCurrencyResp resp = this.api.getCurrency(req); - self::assertNotNull($resp->currency); - self::assertNotNull($resp->name); - self::assertNotNull($resp->fullName); - self::assertNotNull($resp->precision); - self::assertNotNull($resp->confirms); - self::assertNotNull($resp->contractAddress); - self::assertNotNull($resp->isMarginEnabled); - self::assertNotNull($resp->isDebitEnabled); - foreach($resp->chains as $item) { - self::assertNotNull($item->chainName); - self::assertNotNull($item->withdrawalMinSize); - self::assertNotNull($item->depositMinSize); - self::assertNotNull($item->withdrawFeeRate); - self::assertNotNull($item->withdrawalMinFee); - self::assertNotNull($item->isWithdrawEnabled); - self::assertNotNull($item->isDepositEnabled); - self::assertNotNull($item->confirms); - self::assertNotNull($item->preConfirms); - self::assertNotNull($item->contractAddress); - self::assertNotNull($item->withdrawPrecision); - self::assertNotNull($item->maxWithdraw); - self::assertNotNull($item->maxDeposit); - self::assertNotNull($item->needTag); - self::assertNotNull($item->chainId); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + GetCurrencyResp resp = api.getCurrency(req); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getName()); + Assertions.assertNotNull(resp.getFullName()); + Assertions.assertNotNull(resp.getPrecision()); + Assertions.assertNotNull(resp.getConfirms()); + Assertions.assertNotNull(resp.getContractAddress()); + Assertions.assertNotNull(resp.getIsMarginEnabled()); + Assertions.assertNotNull(resp.getIsDebitEnabled()); + resp.getChains().forEach( item -> { + Assertions.assertNotNull(item.getChainName()); + Assertions.assertNotNull(item.getWithdrawalMinSize()); + Assertions.assertNotNull(item.getDepositMinSize()); + Assertions.assertNotNull(item.getWithdrawFeeRate()); + Assertions.assertNotNull(item.getWithdrawalMinFee()); + Assertions.assertNotNull(item.getIsWithdrawEnabled()); + Assertions.assertNotNull(item.getIsDepositEnabled()); + Assertions.assertNotNull(item.getConfirms()); + Assertions.assertNotNull(item.getPreConfirms()); + Assertions.assertNotNull(item.getContractAddress()); + Assertions.assertNotNull(item.getWithdrawPrecision()); + Assertions.assertNotNull(item.getMaxWithdraw()); + Assertions.assertNotNull(item.getMaxDeposit()); + Assertions.assertNotNull(item.getNeedTag()); + Assertions.assertNotNull(item.getChainId()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -70,21 +72,22 @@ * Get All Currencies * /api/v3/currencies */ - public void testGetAllCurrencies() { - GetAllCurrenciesResp resp = this.api.getAllCurrencies(); - foreach($resp->data as $item) { - self::assertNotNull($item->currency); - self::assertNotNull($item->name); - self::assertNotNull($item->fullName); - self::assertNotNull($item->precision); - self::assertNotNull($item->confirms); - self::assertNotNull($item->contractAddress); - self::assertNotNull($item->isMarginEnabled); - self::assertNotNull($item->isDebitEnabled); - self::assertNotNull($item->chains); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetAllCurrencies() throws Exception { + GetAllCurrenciesResp resp = api.getAllCurrencies(); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getName()); + Assertions.assertNotNull(item.getFullName()); + Assertions.assertNotNull(item.getPrecision()); + Assertions.assertNotNull(item.getConfirms()); + Assertions.assertNotNull(item.getContractAddress()); + Assertions.assertNotNull(item.getIsMarginEnabled()); + Assertions.assertNotNull(item.getIsDebitEnabled()); + Assertions.assertNotNull(item.getChains()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -92,40 +95,41 @@ * Get Symbol * /api/v2/symbols/{symbol} */ - public void testGetSymbol() { + @Test + public void testGetSymbol() throws Exception { GetSymbolReq.GetSymbolReqBuilder builder = GetSymbolReq.builder(); builder.symbol(?); GetSymbolReq req = builder.build(); - GetSymbolResp resp = this.api.getSymbol(req); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->name); - self::assertNotNull($resp->baseCurrency); - self::assertNotNull($resp->quoteCurrency); - self::assertNotNull($resp->feeCurrency); - self::assertNotNull($resp->market); - self::assertNotNull($resp->baseMinSize); - self::assertNotNull($resp->quoteMinSize); - self::assertNotNull($resp->baseMaxSize); - self::assertNotNull($resp->quoteMaxSize); - self::assertNotNull($resp->baseIncrement); - self::assertNotNull($resp->quoteIncrement); - self::assertNotNull($resp->priceIncrement); - self::assertNotNull($resp->priceLimitRate); - self::assertNotNull($resp->minFunds); - self::assertNotNull($resp->isMarginEnabled); - self::assertNotNull($resp->enableTrading); - self::assertNotNull($resp->feeCategory); - self::assertNotNull($resp->makerFeeCoefficient); - self::assertNotNull($resp->takerFeeCoefficient); - self::assertNotNull($resp->st); - self::assertNotNull($resp->callauctionIsEnabled); - self::assertNotNull($resp->callauctionPriceFloor); - self::assertNotNull($resp->callauctionPriceCeiling); - self::assertNotNull($resp->callauctionFirstStageStartTime); - self::assertNotNull($resp->callauctionSecondStageStartTime); - self::assertNotNull($resp->callauctionThirdStageStartTime); - self::assertNotNull($resp->tradingStartTime); - Logger::info($resp->jsonSerialize($this->serializer)); + GetSymbolResp resp = api.getSymbol(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getName()); + Assertions.assertNotNull(resp.getBaseCurrency()); + Assertions.assertNotNull(resp.getQuoteCurrency()); + Assertions.assertNotNull(resp.getFeeCurrency()); + Assertions.assertNotNull(resp.getMarket()); + Assertions.assertNotNull(resp.getBaseMinSize()); + Assertions.assertNotNull(resp.getQuoteMinSize()); + Assertions.assertNotNull(resp.getBaseMaxSize()); + Assertions.assertNotNull(resp.getQuoteMaxSize()); + Assertions.assertNotNull(resp.getBaseIncrement()); + Assertions.assertNotNull(resp.getQuoteIncrement()); + Assertions.assertNotNull(resp.getPriceIncrement()); + Assertions.assertNotNull(resp.getPriceLimitRate()); + Assertions.assertNotNull(resp.getMinFunds()); + Assertions.assertNotNull(resp.getIsMarginEnabled()); + Assertions.assertNotNull(resp.getEnableTrading()); + Assertions.assertNotNull(resp.getFeeCategory()); + Assertions.assertNotNull(resp.getMakerFeeCoefficient()); + Assertions.assertNotNull(resp.getTakerFeeCoefficient()); + Assertions.assertNotNull(resp.getSt()); + Assertions.assertNotNull(resp.getCallauctionIsEnabled()); + Assertions.assertNotNull(resp.getCallauctionPriceFloor()); + Assertions.assertNotNull(resp.getCallauctionPriceCeiling()); + Assertions.assertNotNull(resp.getCallauctionFirstStageStartTime()); + Assertions.assertNotNull(resp.getCallauctionSecondStageStartTime()); + Assertions.assertNotNull(resp.getCallauctionThirdStageStartTime()); + Assertions.assertNotNull(resp.getTradingStartTime()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -133,43 +137,44 @@ * Get All Symbols * /api/v2/symbols */ - public void testGetAllSymbols() { + @Test + public void testGetAllSymbols() throws Exception { GetAllSymbolsReq.GetAllSymbolsReqBuilder builder = GetAllSymbolsReq.builder(); builder.market(?); GetAllSymbolsReq req = builder.build(); - GetAllSymbolsResp resp = this.api.getAllSymbols(req); - foreach($resp->data as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->name); - self::assertNotNull($item->baseCurrency); - self::assertNotNull($item->quoteCurrency); - self::assertNotNull($item->feeCurrency); - self::assertNotNull($item->market); - self::assertNotNull($item->baseMinSize); - self::assertNotNull($item->quoteMinSize); - self::assertNotNull($item->baseMaxSize); - self::assertNotNull($item->quoteMaxSize); - self::assertNotNull($item->baseIncrement); - self::assertNotNull($item->quoteIncrement); - self::assertNotNull($item->priceIncrement); - self::assertNotNull($item->priceLimitRate); - self::assertNotNull($item->minFunds); - self::assertNotNull($item->isMarginEnabled); - self::assertNotNull($item->enableTrading); - self::assertNotNull($item->feeCategory); - self::assertNotNull($item->makerFeeCoefficient); - self::assertNotNull($item->takerFeeCoefficient); - self::assertNotNull($item->st); - self::assertNotNull($item->callauctionIsEnabled); - self::assertNotNull($item->callauctionPriceFloor); - self::assertNotNull($item->callauctionPriceCeiling); - self::assertNotNull($item->callauctionFirstStageStartTime); - self::assertNotNull($item->callauctionSecondStageStartTime); - self::assertNotNull($item->callauctionThirdStageStartTime); - self::assertNotNull($item->tradingStartTime); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + GetAllSymbolsResp resp = api.getAllSymbols(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getName()); + Assertions.assertNotNull(item.getBaseCurrency()); + Assertions.assertNotNull(item.getQuoteCurrency()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getMarket()); + Assertions.assertNotNull(item.getBaseMinSize()); + Assertions.assertNotNull(item.getQuoteMinSize()); + Assertions.assertNotNull(item.getBaseMaxSize()); + Assertions.assertNotNull(item.getQuoteMaxSize()); + Assertions.assertNotNull(item.getBaseIncrement()); + Assertions.assertNotNull(item.getQuoteIncrement()); + Assertions.assertNotNull(item.getPriceIncrement()); + Assertions.assertNotNull(item.getPriceLimitRate()); + Assertions.assertNotNull(item.getMinFunds()); + Assertions.assertNotNull(item.getIsMarginEnabled()); + Assertions.assertNotNull(item.getEnableTrading()); + Assertions.assertNotNull(item.getFeeCategory()); + Assertions.assertNotNull(item.getMakerFeeCoefficient()); + Assertions.assertNotNull(item.getTakerFeeCoefficient()); + Assertions.assertNotNull(item.getSt()); + Assertions.assertNotNull(item.getCallauctionIsEnabled()); + Assertions.assertNotNull(item.getCallauctionPriceFloor()); + Assertions.assertNotNull(item.getCallauctionPriceCeiling()); + Assertions.assertNotNull(item.getCallauctionFirstStageStartTime()); + Assertions.assertNotNull(item.getCallauctionSecondStageStartTime()); + Assertions.assertNotNull(item.getCallauctionThirdStageStartTime()); + Assertions.assertNotNull(item.getTradingStartTime()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -177,20 +182,21 @@ * Get Ticker * /api/v1/market/orderbook/level1 */ - public void testGetTicker() { + @Test + public void testGetTicker() throws Exception { GetTickerReq.GetTickerReqBuilder builder = GetTickerReq.builder(); builder.symbol(?); GetTickerReq req = builder.build(); - GetTickerResp resp = this.api.getTicker(req); - self::assertNotNull($resp->time); - self::assertNotNull($resp->sequence); - self::assertNotNull($resp->price); - self::assertNotNull($resp->size); - self::assertNotNull($resp->bestBid); - self::assertNotNull($resp->bestBidSize); - self::assertNotNull($resp->bestAsk); - self::assertNotNull($resp->bestAskSize); - Logger::info($resp->jsonSerialize($this->serializer)); + GetTickerResp resp = api.getTicker(req); + Assertions.assertNotNull(resp.getTime()); + Assertions.assertNotNull(resp.getSequence()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getBestBid()); + Assertions.assertNotNull(resp.getBestBidSize()); + Assertions.assertNotNull(resp.getBestAsk()); + Assertions.assertNotNull(resp.getBestAskSize()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -198,31 +204,32 @@ * Get All Tickers * /api/v1/market/allTickers */ - public void testGetAllTickers() { - GetAllTickersResp resp = this.api.getAllTickers(); - self::assertNotNull($resp->time); - foreach($resp->ticker as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->symbolName); - self::assertNotNull($item->buy); - self::assertNotNull($item->bestBidSize); - self::assertNotNull($item->sell); - self::assertNotNull($item->bestAskSize); - self::assertNotNull($item->changeRate); - self::assertNotNull($item->changePrice); - self::assertNotNull($item->high); - self::assertNotNull($item->low); - self::assertNotNull($item->vol); - self::assertNotNull($item->volValue); - self::assertNotNull($item->last); - self::assertNotNull($item->averagePrice); - self::assertNotNull($item->takerFeeRate); - self::assertNotNull($item->makerFeeRate); - self::assertNotNull($item->takerCoefficient); - self::assertNotNull($item->makerCoefficient); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetAllTickers() throws Exception { + GetAllTickersResp resp = api.getAllTickers(); + Assertions.assertNotNull(resp.getTime()); + resp.getTicker().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getSymbolName()); + Assertions.assertNotNull(item.getBuy()); + Assertions.assertNotNull(item.getBestBidSize()); + Assertions.assertNotNull(item.getSell()); + Assertions.assertNotNull(item.getBestAskSize()); + Assertions.assertNotNull(item.getChangeRate()); + Assertions.assertNotNull(item.getChangePrice()); + Assertions.assertNotNull(item.getHigh()); + Assertions.assertNotNull(item.getLow()); + Assertions.assertNotNull(item.getVol()); + Assertions.assertNotNull(item.getVolValue()); + Assertions.assertNotNull(item.getLast()); + Assertions.assertNotNull(item.getAveragePrice()); + Assertions.assertNotNull(item.getTakerFeeRate()); + Assertions.assertNotNull(item.getMakerFeeRate()); + Assertions.assertNotNull(item.getTakerCoefficient()); + Assertions.assertNotNull(item.getMakerCoefficient()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -230,20 +237,21 @@ * Get Trade History * /api/v1/market/histories */ - public void testGetTradeHistory() { + @Test + public void testGetTradeHistory() throws Exception { GetTradeHistoryReq.GetTradeHistoryReqBuilder builder = GetTradeHistoryReq.builder(); builder.symbol(?); GetTradeHistoryReq req = builder.build(); - GetTradeHistoryResp resp = this.api.getTradeHistory(req); - foreach($resp->data as $item) { - self::assertNotNull($item->sequence); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->side); - self::assertNotNull($item->time); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + GetTradeHistoryResp resp = api.getTradeHistory(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getSequence()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getTime()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -251,15 +259,16 @@ * Get Klines * /api/v1/market/candles */ - public void testGetKlines() { + @Test + public void testGetKlines() throws Exception { GetKlinesReq.GetKlinesReqBuilder builder = GetKlinesReq.builder(); builder.symbol(?).type(?).startAt(?).endAt(?); GetKlinesReq req = builder.build(); - GetKlinesResp resp = this.api.getKlines(req); - foreach($resp->data as $item) { - } + GetKlinesResp resp = api.getKlines(req); + resp.getData().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -267,20 +276,21 @@ * Get Part OrderBook * /api/v1/market/orderbook/level2_{size} */ - public void testGetPartOrderBook() { + @Test + public void testGetPartOrderBook() throws Exception { GetPartOrderBookReq.GetPartOrderBookReqBuilder builder = GetPartOrderBookReq.builder(); builder.symbol(?).size(?); GetPartOrderBookReq req = builder.build(); - GetPartOrderBookResp resp = this.api.getPartOrderBook(req); - self::assertNotNull($resp->time); - self::assertNotNull($resp->sequence); - foreach($resp->bids as $item) { - } + GetPartOrderBookResp resp = api.getPartOrderBook(req); + Assertions.assertNotNull(resp.getTime()); + Assertions.assertNotNull(resp.getSequence()); + resp.getBids().forEach( item -> { + }); - foreach($resp->asks as $item) { - } + resp.getAsks().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -288,20 +298,21 @@ * Get Full OrderBook * /api/v3/market/orderbook/level2 */ - public void testGetFullOrderBook() { + @Test + public void testGetFullOrderBook() throws Exception { GetFullOrderBookReq.GetFullOrderBookReqBuilder builder = GetFullOrderBookReq.builder(); builder.symbol(?); GetFullOrderBookReq req = builder.build(); - GetFullOrderBookResp resp = this.api.getFullOrderBook(req); - self::assertNotNull($resp->time); - self::assertNotNull($resp->sequence); - foreach($resp->bids as $item) { - } + GetFullOrderBookResp resp = api.getFullOrderBook(req); + Assertions.assertNotNull(resp.getTime()); + Assertions.assertNotNull(resp.getSequence()); + resp.getBids().forEach( item -> { + }); - foreach($resp->asks as $item) { - } + resp.getAsks().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -309,20 +320,21 @@ * Get Call Auction Part OrderBook * /api/v1/market/orderbook/callauction/level2_{size} */ - public void testGetCallAuctionPartOrderBook() { + @Test + public void testGetCallAuctionPartOrderBook() throws Exception { GetCallAuctionPartOrderBookReq.GetCallAuctionPartOrderBookReqBuilder builder = GetCallAuctionPartOrderBookReq.builder(); builder.symbol(?).size(?); GetCallAuctionPartOrderBookReq req = builder.build(); - GetCallAuctionPartOrderBookResp resp = this.api.getCallAuctionPartOrderBook(req); - self::assertNotNull($resp->time); - self::assertNotNull($resp->sequence); - foreach($resp->bids as $item) { - } + GetCallAuctionPartOrderBookResp resp = api.getCallAuctionPartOrderBook(req); + Assertions.assertNotNull(resp.getTime()); + Assertions.assertNotNull(resp.getSequence()); + resp.getBids().forEach( item -> { + }); - foreach($resp->asks as $item) { - } + resp.getAsks().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -330,20 +342,21 @@ * Get Call Auction Info * /api/v1/market/callauctionData */ - public void testGetCallAuctionInfo() { + @Test + public void testGetCallAuctionInfo() throws Exception { GetCallAuctionInfoReq.GetCallAuctionInfoReqBuilder builder = GetCallAuctionInfoReq.builder(); builder.symbol(?); GetCallAuctionInfoReq req = builder.build(); - GetCallAuctionInfoResp resp = this.api.getCallAuctionInfo(req); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->estimatedPrice); - self::assertNotNull($resp->estimatedSize); - self::assertNotNull($resp->sellOrderRangeLowPrice); - self::assertNotNull($resp->sellOrderRangeHighPrice); - self::assertNotNull($resp->buyOrderRangeLowPrice); - self::assertNotNull($resp->buyOrderRangeHighPrice); - self::assertNotNull($resp->time); - Logger::info($resp->jsonSerialize($this->serializer)); + GetCallAuctionInfoResp resp = api.getCallAuctionInfo(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getEstimatedPrice()); + Assertions.assertNotNull(resp.getEstimatedSize()); + Assertions.assertNotNull(resp.getSellOrderRangeLowPrice()); + Assertions.assertNotNull(resp.getSellOrderRangeHighPrice()); + Assertions.assertNotNull(resp.getBuyOrderRangeLowPrice()); + Assertions.assertNotNull(resp.getBuyOrderRangeHighPrice()); + Assertions.assertNotNull(resp.getTime()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -351,13 +364,14 @@ * Get Fiat Price * /api/v1/prices */ - public void testGetFiatPrice() { + @Test + public void testGetFiatPrice() throws Exception { GetFiatPriceReq.GetFiatPriceReqBuilder builder = GetFiatPriceReq.builder(); builder.base(?).currencies(?); GetFiatPriceReq req = builder.build(); - GetFiatPriceResp resp = this.api.getFiatPrice(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + GetFiatPriceResp resp = api.getFiatPrice(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -365,28 +379,29 @@ * Get 24hr Stats * /api/v1/market/stats */ - public void testGet24hrStats() { + @Test + public void testGet24hrStats() throws Exception { Get24hrStatsReq.Get24hrStatsReqBuilder builder = Get24hrStatsReq.builder(); builder.symbol(?); Get24hrStatsReq req = builder.build(); - Get24hrStatsResp resp = this.api.get24hrStats(req); - self::assertNotNull($resp->time); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->buy); - self::assertNotNull($resp->sell); - self::assertNotNull($resp->changeRate); - self::assertNotNull($resp->changePrice); - self::assertNotNull($resp->high); - self::assertNotNull($resp->low); - self::assertNotNull($resp->vol); - self::assertNotNull($resp->volValue); - self::assertNotNull($resp->last); - self::assertNotNull($resp->averagePrice); - self::assertNotNull($resp->takerFeeRate); - self::assertNotNull($resp->makerFeeRate); - self::assertNotNull($resp->takerCoefficient); - self::assertNotNull($resp->makerCoefficient); - Logger::info($resp->jsonSerialize($this->serializer)); + Get24hrStatsResp resp = api.get24hrStats(req); + Assertions.assertNotNull(resp.getTime()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getBuy()); + Assertions.assertNotNull(resp.getSell()); + Assertions.assertNotNull(resp.getChangeRate()); + Assertions.assertNotNull(resp.getChangePrice()); + Assertions.assertNotNull(resp.getHigh()); + Assertions.assertNotNull(resp.getLow()); + Assertions.assertNotNull(resp.getVol()); + Assertions.assertNotNull(resp.getVolValue()); + Assertions.assertNotNull(resp.getLast()); + Assertions.assertNotNull(resp.getAveragePrice()); + Assertions.assertNotNull(resp.getTakerFeeRate()); + Assertions.assertNotNull(resp.getMakerFeeRate()); + Assertions.assertNotNull(resp.getTakerCoefficient()); + Assertions.assertNotNull(resp.getMakerCoefficient()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -394,12 +409,13 @@ * Get Market List * /api/v1/markets */ - public void testGetMarketList() { - GetMarketListResp resp = this.api.getMarketList(); - foreach($resp->data as $item) { - } + @Test + public void testGetMarketList() throws Exception { + GetMarketListResp resp = api.getMarketList(); + resp.getData().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -407,10 +423,11 @@ * Get Client IP Address * /api/v1/my-ip */ - public void testGetClientIPAddress() { - GetClientIPAddressResp resp = this.api.getClientIPAddress(); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetClientIPAddress() throws Exception { + GetClientIPAddressResp resp = api.getClientIPAddress(); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -418,10 +435,11 @@ * Get Server Time * /api/v1/timestamp */ - public void testGetServerTime() { - GetServerTimeResp resp = this.api.getServerTime(); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetServerTime() throws Exception { + GetServerTimeResp resp = api.getServerTime(); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -429,11 +447,12 @@ * Get Service Status * /api/v1/status */ - public void testGetServiceStatus() { - GetServiceStatusResp resp = this.api.getServiceStatus(); - self::assertNotNull($resp->status); - self::assertNotNull($resp->msg); - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetServiceStatus() throws Exception { + GetServiceStatusResp resp = api.getServiceStatus(); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getMsg()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -441,18 +460,19 @@ * Get Public Token - Spot/Margin * /api/v1/bullet-public */ - public void testGetPublicToken() { - GetPublicTokenResp resp = this.api.getPublicToken(); - self::assertNotNull($resp->token); - foreach($resp->instanceServers as $item) { - self::assertNotNull($item->endpoint); - self::assertNotNull($item->encrypt); - self::assertNotNull($item->protocol); - self::assertNotNull($item->pingInterval); - self::assertNotNull($item->pingTimeout); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetPublicToken() throws Exception { + GetPublicTokenResp resp = api.getPublicToken(); + Assertions.assertNotNull(resp.getToken()); + resp.getInstanceServers().forEach( item -> { + Assertions.assertNotNull(item.getEndpoint()); + Assertions.assertNotNull(item.getEncrypt()); + Assertions.assertNotNull(item.getProtocol()); + Assertions.assertNotNull(item.getPingInterval()); + Assertions.assertNotNull(item.getPingTimeout()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -460,17 +480,18 @@ * Get Private Token - Spot/Margin * /api/v1/bullet-private */ - public void testGetPrivateToken() { - GetPrivateTokenResp resp = this.api.getPrivateToken(); - self::assertNotNull($resp->token); - foreach($resp->instanceServers as $item) { - self::assertNotNull($item->endpoint); - self::assertNotNull($item->encrypt); - self::assertNotNull($item->protocol); - self::assertNotNull($item->pingInterval); - self::assertNotNull($item->pingTimeout); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetPrivateToken() throws Exception { + GetPrivateTokenResp resp = api.getPrivateToken(); + Assertions.assertNotNull(resp.getToken()); + resp.getInstanceServers().forEach( item -> { + Assertions.assertNotNull(item.getEndpoint()); + Assertions.assertNotNull(item.getEncrypt()); + Assertions.assertNotNull(item.getProtocol()); + Assertions.assertNotNull(item.getPingInterval()); + Assertions.assertNotNull(item.getPingTimeout()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.template index beab3c3c..9f7060b0 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/OrderApi.template @@ -4,14 +4,15 @@ * Add Order * /api/v1/hf/orders */ - public void testAddOrder() { + @Test + public void testAddOrder() throws Exception { AddOrderReq.AddOrderReqBuilder builder = AddOrderReq.builder(); builder.clientOid(?).side(?).symbol(?).type(?).remark(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).tags(?).cancelAfter(?).funds(?).allowMaxTimeWindow(?).clientTimestamp(?); AddOrderReq req = builder.build(); - AddOrderResp resp = this.api.addOrder(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->clientOid); - Logger::info($resp->jsonSerialize($this->serializer)); + AddOrderResp resp = api.addOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -19,21 +20,22 @@ * Add Order Sync * /api/v1/hf/orders/sync */ - public void testAddOrderSync() { + @Test + public void testAddOrderSync() throws Exception { AddOrderSyncReq.AddOrderSyncReqBuilder builder = AddOrderSyncReq.builder(); builder.clientOid(?).side(?).symbol(?).type(?).remark(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).tags(?).cancelAfter(?).funds(?).allowMaxTimeWindow(?).clientTimestamp(?); AddOrderSyncReq req = builder.build(); - AddOrderSyncResp resp = this.api.addOrderSync(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->clientOid); - self::assertNotNull($resp->orderTime); - self::assertNotNull($resp->originSize); - self::assertNotNull($resp->dealSize); - self::assertNotNull($resp->remainSize); - self::assertNotNull($resp->canceledSize); - self::assertNotNull($resp->status); - self::assertNotNull($resp->matchTime); - Logger::info($resp->jsonSerialize($this->serializer)); + AddOrderSyncResp resp = api.addOrderSync(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getOrderTime()); + Assertions.assertNotNull(resp.getOriginSize()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getRemainSize()); + Assertions.assertNotNull(resp.getCanceledSize()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getMatchTime()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -41,14 +43,15 @@ * Add Order Test * /api/v1/hf/orders/test */ - public void testAddOrderTest() { + @Test + public void testAddOrderTest() throws Exception { AddOrderTestReq.AddOrderTestReqBuilder builder = AddOrderTestReq.builder(); builder.clientOid(?).side(?).symbol(?).type(?).remark(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).tags(?).cancelAfter(?).funds(?).allowMaxTimeWindow(?).clientTimestamp(?); AddOrderTestReq req = builder.build(); - AddOrderTestResp resp = this.api.addOrderTest(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->clientOid); - Logger::info($resp->jsonSerialize($this->serializer)); + AddOrderTestResp resp = api.addOrderTest(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -56,19 +59,20 @@ * Batch Add Orders * /api/v1/hf/orders/multi */ - public void testBatchAddOrders() { + @Test + public void testBatchAddOrders() throws Exception { BatchAddOrdersReq.BatchAddOrdersReqBuilder builder = BatchAddOrdersReq.builder(); builder.orderList(?); BatchAddOrdersReq req = builder.build(); - BatchAddOrdersResp resp = this.api.batchAddOrders(req); - foreach($resp->data as $item) { - self::assertNotNull($item->orderId); - self::assertNotNull($item->clientOid); - self::assertNotNull($item->success); - self::assertNotNull($item->failMsg); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + BatchAddOrdersResp resp = api.batchAddOrders(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getSuccess()); + Assertions.assertNotNull(item.getFailMsg()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -76,26 +80,27 @@ * Batch Add Orders Sync * /api/v1/hf/orders/multi/sync */ - public void testBatchAddOrdersSync() { + @Test + public void testBatchAddOrdersSync() throws Exception { BatchAddOrdersSyncReq.BatchAddOrdersSyncReqBuilder builder = BatchAddOrdersSyncReq.builder(); builder.orderList(?); BatchAddOrdersSyncReq req = builder.build(); - BatchAddOrdersSyncResp resp = this.api.batchAddOrdersSync(req); - foreach($resp->data as $item) { - self::assertNotNull($item->orderId); - self::assertNotNull($item->clientOid); - self::assertNotNull($item->orderTime); - self::assertNotNull($item->originSize); - self::assertNotNull($item->dealSize); - self::assertNotNull($item->remainSize); - self::assertNotNull($item->canceledSize); - self::assertNotNull($item->status); - self::assertNotNull($item->matchTime); - self::assertNotNull($item->success); - self::assertNotNull($item->failMsg); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + BatchAddOrdersSyncResp resp = api.batchAddOrdersSync(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getOrderTime()); + Assertions.assertNotNull(item.getOriginSize()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getRemainSize()); + Assertions.assertNotNull(item.getCanceledSize()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getMatchTime()); + Assertions.assertNotNull(item.getSuccess()); + Assertions.assertNotNull(item.getFailMsg()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -103,13 +108,14 @@ * Cancel Order By OrderId * /api/v1/hf/orders/{orderId} */ - public void testCancelOrderByOrderId() { + @Test + public void testCancelOrderByOrderId() throws Exception { CancelOrderByOrderIdReq.CancelOrderByOrderIdReqBuilder builder = CancelOrderByOrderIdReq.builder(); builder.orderId(?).symbol(?); CancelOrderByOrderIdReq req = builder.build(); - CancelOrderByOrderIdResp resp = this.api.cancelOrderByOrderId(req); - self::assertNotNull($resp->orderId); - Logger::info($resp->jsonSerialize($this->serializer)); + CancelOrderByOrderIdResp resp = api.cancelOrderByOrderId(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -117,18 +123,19 @@ * Cancel Order By OrderId Sync * /api/v1/hf/orders/sync/{orderId} */ - public void testCancelOrderByOrderIdSync() { + @Test + public void testCancelOrderByOrderIdSync() throws Exception { CancelOrderByOrderIdSyncReq.CancelOrderByOrderIdSyncReqBuilder builder = CancelOrderByOrderIdSyncReq.builder(); builder.symbol(?).orderId(?); CancelOrderByOrderIdSyncReq req = builder.build(); - CancelOrderByOrderIdSyncResp resp = this.api.cancelOrderByOrderIdSync(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->originSize); - self::assertNotNull($resp->dealSize); - self::assertNotNull($resp->remainSize); - self::assertNotNull($resp->canceledSize); - self::assertNotNull($resp->status); - Logger::info($resp->jsonSerialize($this->serializer)); + CancelOrderByOrderIdSyncResp resp = api.cancelOrderByOrderIdSync(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getOriginSize()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getRemainSize()); + Assertions.assertNotNull(resp.getCanceledSize()); + Assertions.assertNotNull(resp.getStatus()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -136,13 +143,14 @@ * Cancel Order By ClientOid * /api/v1/hf/orders/client-order/{clientOid} */ - public void testCancelOrderByClientOid() { + @Test + public void testCancelOrderByClientOid() throws Exception { CancelOrderByClientOidReq.CancelOrderByClientOidReqBuilder builder = CancelOrderByClientOidReq.builder(); builder.clientOid(?).symbol(?); CancelOrderByClientOidReq req = builder.build(); - CancelOrderByClientOidResp resp = this.api.cancelOrderByClientOid(req); - self::assertNotNull($resp->clientOid); - Logger::info($resp->jsonSerialize($this->serializer)); + CancelOrderByClientOidResp resp = api.cancelOrderByClientOid(req); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -150,18 +158,19 @@ * Cancel Order By ClientOid Sync * /api/v1/hf/orders/sync/client-order/{clientOid} */ - public void testCancelOrderByClientOidSync() { + @Test + public void testCancelOrderByClientOidSync() throws Exception { CancelOrderByClientOidSyncReq.CancelOrderByClientOidSyncReqBuilder builder = CancelOrderByClientOidSyncReq.builder(); builder.symbol(?).clientOid(?); CancelOrderByClientOidSyncReq req = builder.build(); - CancelOrderByClientOidSyncResp resp = this.api.cancelOrderByClientOidSync(req); - self::assertNotNull($resp->clientOid); - self::assertNotNull($resp->originSize); - self::assertNotNull($resp->dealSize); - self::assertNotNull($resp->remainSize); - self::assertNotNull($resp->canceledSize); - self::assertNotNull($resp->status); - Logger::info($resp->jsonSerialize($this->serializer)); + CancelOrderByClientOidSyncResp resp = api.cancelOrderByClientOidSync(req); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getOriginSize()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getRemainSize()); + Assertions.assertNotNull(resp.getCanceledSize()); + Assertions.assertNotNull(resp.getStatus()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -169,14 +178,15 @@ * Cancel Partial Order * /api/v1/hf/orders/cancel/{orderId} */ - public void testCancelPartialOrder() { + @Test + public void testCancelPartialOrder() throws Exception { CancelPartialOrderReq.CancelPartialOrderReqBuilder builder = CancelPartialOrderReq.builder(); builder.orderId(?).symbol(?).cancelSize(?); CancelPartialOrderReq req = builder.build(); - CancelPartialOrderResp resp = this.api.cancelPartialOrder(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->cancelSize); - Logger::info($resp->jsonSerialize($this->serializer)); + CancelPartialOrderResp resp = api.cancelPartialOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getCancelSize()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -184,13 +194,14 @@ * Cancel All Orders By Symbol * /api/v1/hf/orders */ - public void testCancelAllOrdersBySymbol() { + @Test + public void testCancelAllOrdersBySymbol() throws Exception { CancelAllOrdersBySymbolReq.CancelAllOrdersBySymbolReqBuilder builder = CancelAllOrdersBySymbolReq.builder(); builder.symbol(?); CancelAllOrdersBySymbolReq req = builder.build(); - CancelAllOrdersBySymbolResp resp = this.api.cancelAllOrdersBySymbol(req); - self::assertNotNull($resp->data); - Logger::info($resp->jsonSerialize($this->serializer)); + CancelAllOrdersBySymbolResp resp = api.cancelAllOrdersBySymbol(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -198,17 +209,18 @@ * Cancel All Orders * /api/v1/hf/orders/cancelAll */ - public void testCancelAllOrders() { - CancelAllOrdersResp resp = this.api.cancelAllOrders(); - foreach($resp->succeedSymbols as $item) { - } - - foreach($resp->failedSymbols as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->error); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testCancelAllOrders() throws Exception { + CancelAllOrdersResp resp = api.cancelAllOrders(); + resp.getSucceedSymbols().forEach( item -> { + }); + + resp.getFailedSymbols().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getError()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -216,14 +228,15 @@ * Modify Order * /api/v1/hf/orders/alter */ - public void testModifyOrder() { + @Test + public void testModifyOrder() throws Exception { ModifyOrderReq.ModifyOrderReqBuilder builder = ModifyOrderReq.builder(); builder.clientOid(?).symbol(?).orderId(?).newPrice(?).newSize(?); ModifyOrderReq req = builder.build(); - ModifyOrderResp resp = this.api.modifyOrder(req); - self::assertNotNull($resp->newOrderId); - self::assertNotNull($resp->clientOid); - Logger::info($resp->jsonSerialize($this->serializer)); + ModifyOrderResp resp = api.modifyOrder(req); + Assertions.assertNotNull(resp.getNewOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -231,46 +244,47 @@ * Get Order By OrderId * /api/v1/hf/orders/{orderId} */ - public void testGetOrderByOrderId() { + @Test + public void testGetOrderByOrderId() throws Exception { GetOrderByOrderIdReq.GetOrderByOrderIdReqBuilder builder = GetOrderByOrderIdReq.builder(); builder.symbol(?).orderId(?); GetOrderByOrderIdReq req = builder.build(); - GetOrderByOrderIdResp resp = this.api.getOrderByOrderId(req); - self::assertNotNull($resp->id); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->opType); - self::assertNotNull($resp->type); - self::assertNotNull($resp->side); - self::assertNotNull($resp->price); - self::assertNotNull($resp->size); - self::assertNotNull($resp->funds); - self::assertNotNull($resp->dealSize); - self::assertNotNull($resp->dealFunds); - self::assertNotNull($resp->fee); - self::assertNotNull($resp->feeCurrency); - self::assertNotNull($resp->stp); - self::assertNotNull($resp->timeInForce); - self::assertNotNull($resp->postOnly); - self::assertNotNull($resp->hidden); - self::assertNotNull($resp->iceberg); - self::assertNotNull($resp->visibleSize); - self::assertNotNull($resp->cancelAfter); - self::assertNotNull($resp->channel); - self::assertNotNull($resp->clientOid); - self::assertNotNull($resp->remark); - self::assertNotNull($resp->tags); - self::assertNotNull($resp->cancelExist); - self::assertNotNull($resp->createdAt); - self::assertNotNull($resp->lastUpdatedAt); - self::assertNotNull($resp->tradeType); - self::assertNotNull($resp->inOrderBook); - self::assertNotNull($resp->cancelledSize); - self::assertNotNull($resp->cancelledFunds); - self::assertNotNull($resp->remainSize); - self::assertNotNull($resp->remainFunds); - self::assertNotNull($resp->tax); - self::assertNotNull($resp->active); - Logger::info($resp->jsonSerialize($this->serializer)); + GetOrderByOrderIdResp resp = api.getOrderByOrderId(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getOpType()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getFunds()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getDealFunds()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getFeeCurrency()); + Assertions.assertNotNull(resp.getStp()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getVisibleSize()); + Assertions.assertNotNull(resp.getCancelAfter()); + Assertions.assertNotNull(resp.getChannel()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getTags()); + Assertions.assertNotNull(resp.getCancelExist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getLastUpdatedAt()); + Assertions.assertNotNull(resp.getTradeType()); + Assertions.assertNotNull(resp.getInOrderBook()); + Assertions.assertNotNull(resp.getCancelledSize()); + Assertions.assertNotNull(resp.getCancelledFunds()); + Assertions.assertNotNull(resp.getRemainSize()); + Assertions.assertNotNull(resp.getRemainFunds()); + Assertions.assertNotNull(resp.getTax()); + Assertions.assertNotNull(resp.getActive()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -278,46 +292,47 @@ * Get Order By ClientOid * /api/v1/hf/orders/client-order/{clientOid} */ - public void testGetOrderByClientOid() { + @Test + public void testGetOrderByClientOid() throws Exception { GetOrderByClientOidReq.GetOrderByClientOidReqBuilder builder = GetOrderByClientOidReq.builder(); builder.symbol(?).clientOid(?); GetOrderByClientOidReq req = builder.build(); - GetOrderByClientOidResp resp = this.api.getOrderByClientOid(req); - self::assertNotNull($resp->id); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->opType); - self::assertNotNull($resp->type); - self::assertNotNull($resp->side); - self::assertNotNull($resp->price); - self::assertNotNull($resp->size); - self::assertNotNull($resp->funds); - self::assertNotNull($resp->dealSize); - self::assertNotNull($resp->dealFunds); - self::assertNotNull($resp->fee); - self::assertNotNull($resp->feeCurrency); - self::assertNotNull($resp->stp); - self::assertNotNull($resp->timeInForce); - self::assertNotNull($resp->postOnly); - self::assertNotNull($resp->hidden); - self::assertNotNull($resp->iceberg); - self::assertNotNull($resp->visibleSize); - self::assertNotNull($resp->cancelAfter); - self::assertNotNull($resp->channel); - self::assertNotNull($resp->clientOid); - self::assertNotNull($resp->remark); - self::assertNotNull($resp->tags); - self::assertNotNull($resp->cancelExist); - self::assertNotNull($resp->createdAt); - self::assertNotNull($resp->lastUpdatedAt); - self::assertNotNull($resp->tradeType); - self::assertNotNull($resp->inOrderBook); - self::assertNotNull($resp->cancelledSize); - self::assertNotNull($resp->cancelledFunds); - self::assertNotNull($resp->remainSize); - self::assertNotNull($resp->remainFunds); - self::assertNotNull($resp->tax); - self::assertNotNull($resp->active); - Logger::info($resp->jsonSerialize($this->serializer)); + GetOrderByClientOidResp resp = api.getOrderByClientOid(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getOpType()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getFunds()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getDealFunds()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getFeeCurrency()); + Assertions.assertNotNull(resp.getStp()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getVisibleSize()); + Assertions.assertNotNull(resp.getCancelAfter()); + Assertions.assertNotNull(resp.getChannel()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getTags()); + Assertions.assertNotNull(resp.getCancelExist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getLastUpdatedAt()); + Assertions.assertNotNull(resp.getTradeType()); + Assertions.assertNotNull(resp.getInOrderBook()); + Assertions.assertNotNull(resp.getCancelledSize()); + Assertions.assertNotNull(resp.getCancelledFunds()); + Assertions.assertNotNull(resp.getRemainSize()); + Assertions.assertNotNull(resp.getRemainFunds()); + Assertions.assertNotNull(resp.getTax()); + Assertions.assertNotNull(resp.getActive()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -325,12 +340,13 @@ * Get Symbols With Open Order * /api/v1/hf/orders/active/symbols */ - public void testGetSymbolsWithOpenOrder() { - GetSymbolsWithOpenOrderResp resp = this.api.getSymbolsWithOpenOrder(); - foreach($resp->symbols as $item) { - } + @Test + public void testGetSymbolsWithOpenOrder() throws Exception { + GetSymbolsWithOpenOrderResp resp = api.getSymbolsWithOpenOrder(); + resp.getSymbols().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -338,49 +354,50 @@ * Get Open Orders * /api/v1/hf/orders/active */ - public void testGetOpenOrders() { + @Test + public void testGetOpenOrders() throws Exception { GetOpenOrdersReq.GetOpenOrdersReqBuilder builder = GetOpenOrdersReq.builder(); builder.symbol(?); GetOpenOrdersReq req = builder.build(); - GetOpenOrdersResp resp = this.api.getOpenOrders(req); - foreach($resp->data as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->symbol); - self::assertNotNull($item->opType); - self::assertNotNull($item->type); - self::assertNotNull($item->side); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->funds); - self::assertNotNull($item->dealSize); - self::assertNotNull($item->dealFunds); - self::assertNotNull($item->fee); - self::assertNotNull($item->feeCurrency); - self::assertNotNull($item->stp); - self::assertNotNull($item->timeInForce); - self::assertNotNull($item->postOnly); - self::assertNotNull($item->hidden); - self::assertNotNull($item->iceberg); - self::assertNotNull($item->visibleSize); - self::assertNotNull($item->cancelAfter); - self::assertNotNull($item->channel); - self::assertNotNull($item->clientOid); - self::assertNotNull($item->remark); - self::assertNotNull($item->tags); - self::assertNotNull($item->cancelExist); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->lastUpdatedAt); - self::assertNotNull($item->tradeType); - self::assertNotNull($item->inOrderBook); - self::assertNotNull($item->cancelledSize); - self::assertNotNull($item->cancelledFunds); - self::assertNotNull($item->remainSize); - self::assertNotNull($item->remainFunds); - self::assertNotNull($item->tax); - self::assertNotNull($item->active); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + GetOpenOrdersResp resp = api.getOpenOrders(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getOpType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getDealFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStp()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getTags()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getLastUpdatedAt()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getInOrderBook()); + Assertions.assertNotNull(item.getCancelledSize()); + Assertions.assertNotNull(item.getCancelledFunds()); + Assertions.assertNotNull(item.getRemainSize()); + Assertions.assertNotNull(item.getRemainFunds()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getActive()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -388,53 +405,54 @@ * Get Open Orders By Page * /api/v1/hf/orders/active/page */ - public void testGetOpenOrdersByPage() { + @Test + public void testGetOpenOrdersByPage() throws Exception { GetOpenOrdersByPageReq.GetOpenOrdersByPageReqBuilder builder = GetOpenOrdersByPageReq.builder(); builder.symbol(?).pageNum(?).pageSize(?); GetOpenOrdersByPageReq req = builder.build(); - GetOpenOrdersByPageResp resp = this.api.getOpenOrdersByPage(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->symbol); - self::assertNotNull($item->opType); - self::assertNotNull($item->type); - self::assertNotNull($item->side); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->funds); - self::assertNotNull($item->dealSize); - self::assertNotNull($item->dealFunds); - self::assertNotNull($item->fee); - self::assertNotNull($item->feeCurrency); - self::assertNotNull($item->stp); - self::assertNotNull($item->timeInForce); - self::assertNotNull($item->postOnly); - self::assertNotNull($item->hidden); - self::assertNotNull($item->iceberg); - self::assertNotNull($item->visibleSize); - self::assertNotNull($item->cancelAfter); - self::assertNotNull($item->channel); - self::assertNotNull($item->clientOid); - self::assertNotNull($item->remark); - self::assertNotNull($item->tags); - self::assertNotNull($item->cancelExist); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->lastUpdatedAt); - self::assertNotNull($item->tradeType); - self::assertNotNull($item->inOrderBook); - self::assertNotNull($item->cancelledSize); - self::assertNotNull($item->cancelledFunds); - self::assertNotNull($item->remainSize); - self::assertNotNull($item->remainFunds); - self::assertNotNull($item->tax); - self::assertNotNull($item->active); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + GetOpenOrdersByPageResp resp = api.getOpenOrdersByPage(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getOpType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getDealFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStp()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getTags()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getLastUpdatedAt()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getInOrderBook()); + Assertions.assertNotNull(item.getCancelledSize()); + Assertions.assertNotNull(item.getCancelledFunds()); + Assertions.assertNotNull(item.getRemainSize()); + Assertions.assertNotNull(item.getRemainFunds()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getActive()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -442,50 +460,51 @@ * Get Closed Orders * /api/v1/hf/orders/done */ - public void testGetClosedOrders() { + @Test + public void testGetClosedOrders() throws Exception { GetClosedOrdersReq.GetClosedOrdersReqBuilder builder = GetClosedOrdersReq.builder(); builder.symbol(?).side(?).type(?).lastId(?).limit(?).startAt(?).endAt(?); GetClosedOrdersReq req = builder.build(); - GetClosedOrdersResp resp = this.api.getClosedOrders(req); - self::assertNotNull($resp->lastId); - foreach($resp->items as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->symbol); - self::assertNotNull($item->opType); - self::assertNotNull($item->type); - self::assertNotNull($item->side); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->funds); - self::assertNotNull($item->dealSize); - self::assertNotNull($item->dealFunds); - self::assertNotNull($item->fee); - self::assertNotNull($item->feeCurrency); - self::assertNotNull($item->stp); - self::assertNotNull($item->timeInForce); - self::assertNotNull($item->postOnly); - self::assertNotNull($item->hidden); - self::assertNotNull($item->iceberg); - self::assertNotNull($item->visibleSize); - self::assertNotNull($item->cancelAfter); - self::assertNotNull($item->channel); - self::assertNotNull($item->clientOid); - self::assertNotNull($item->remark); - self::assertNotNull($item->tags); - self::assertNotNull($item->cancelExist); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->lastUpdatedAt); - self::assertNotNull($item->tradeType); - self::assertNotNull($item->inOrderBook); - self::assertNotNull($item->cancelledSize); - self::assertNotNull($item->cancelledFunds); - self::assertNotNull($item->remainSize); - self::assertNotNull($item->remainFunds); - self::assertNotNull($item->tax); - self::assertNotNull($item->active); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + GetClosedOrdersResp resp = api.getClosedOrders(req); + Assertions.assertNotNull(resp.getLastId()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getOpType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getDealFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStp()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getTags()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getLastUpdatedAt()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getInOrderBook()); + Assertions.assertNotNull(item.getCancelledSize()); + Assertions.assertNotNull(item.getCancelledFunds()); + Assertions.assertNotNull(item.getRemainSize()); + Assertions.assertNotNull(item.getRemainFunds()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getActive()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -493,36 +512,37 @@ * Get Trade History * /api/v1/hf/fills */ - public void testGetTradeHistory() { + @Test + public void testGetTradeHistory() throws Exception { GetTradeHistoryReq.GetTradeHistoryReqBuilder builder = GetTradeHistoryReq.builder(); builder.symbol(?).orderId(?).side(?).type(?).lastId(?).limit(?).startAt(?).endAt(?); GetTradeHistoryReq req = builder.build(); - GetTradeHistoryResp resp = this.api.getTradeHistory(req); - foreach($resp->items as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->symbol); - self::assertNotNull($item->tradeId); - self::assertNotNull($item->orderId); - self::assertNotNull($item->counterOrderId); - self::assertNotNull($item->side); - self::assertNotNull($item->liquidity); - self::assertNotNull($item->forceTaker); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->funds); - self::assertNotNull($item->fee); - self::assertNotNull($item->feeRate); - self::assertNotNull($item->feeCurrency); - self::assertNotNull($item->stop); - self::assertNotNull($item->tradeType); - self::assertNotNull($item->taxRate); - self::assertNotNull($item->tax); - self::assertNotNull($item->type); - self::assertNotNull($item->createdAt); - } - - self::assertNotNull($resp->lastId); - Logger::info($resp->jsonSerialize($this->serializer)); + GetTradeHistoryResp resp = api.getTradeHistory(req); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTradeId()); + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getCounterOrderId()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getLiquidity()); + Assertions.assertNotNull(item.getForceTaker()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeRate()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getTaxRate()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getCreatedAt()); + }); + + Assertions.assertNotNull(resp.getLastId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -530,13 +550,14 @@ * Get DCP * /api/v1/hf/orders/dead-cancel-all/query */ - public void testGetDCP() { - GetDCPResp resp = this.api.getDCP(); - self::assertNotNull($resp->timeout); - self::assertNotNull($resp->symbols); - self::assertNotNull($resp->currentTime); - self::assertNotNull($resp->triggerTime); - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetDCP() throws Exception { + GetDCPResp resp = api.getDCP(); + Assertions.assertNotNull(resp.getTimeout()); + Assertions.assertNotNull(resp.getSymbols()); + Assertions.assertNotNull(resp.getCurrentTime()); + Assertions.assertNotNull(resp.getTriggerTime()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -544,14 +565,15 @@ * Set DCP * /api/v1/hf/orders/dead-cancel-all */ - public void testSetDCP() { + @Test + public void testSetDCP() throws Exception { SetDCPReq.SetDCPReqBuilder builder = SetDCPReq.builder(); builder.timeout(?).symbols(?); SetDCPReq req = builder.build(); - SetDCPResp resp = this.api.setDCP(req); - self::assertNotNull($resp->currentTime); - self::assertNotNull($resp->triggerTime); - Logger::info($resp->jsonSerialize($this->serializer)); + SetDCPResp resp = api.setDCP(req); + Assertions.assertNotNull(resp.getCurrentTime()); + Assertions.assertNotNull(resp.getTriggerTime()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -559,13 +581,14 @@ * Add Stop Order * /api/v1/stop-order */ - public void testAddStopOrder() { + @Test + public void testAddStopOrder() throws Exception { AddStopOrderReq.AddStopOrderReqBuilder builder = AddStopOrderReq.builder(); builder.clientOid(?).side(?).symbol(?).type(?).remark(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).cancelAfter(?).funds(?).stopPrice(?).tradeType(?); AddStopOrderReq req = builder.build(); - AddStopOrderResp resp = this.api.addStopOrder(req); - self::assertNotNull($resp->orderId); - Logger::info($resp->jsonSerialize($this->serializer)); + AddStopOrderResp resp = api.addStopOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -573,14 +596,15 @@ * Cancel Stop Order By ClientOid * /api/v1/stop-order/cancelOrderByClientOid */ - public void testCancelStopOrderByClientOid() { + @Test + public void testCancelStopOrderByClientOid() throws Exception { CancelStopOrderByClientOidReq.CancelStopOrderByClientOidReqBuilder builder = CancelStopOrderByClientOidReq.builder(); builder.symbol(?).clientOid(?); CancelStopOrderByClientOidReq req = builder.build(); - CancelStopOrderByClientOidResp resp = this.api.cancelStopOrderByClientOid(req); - self::assertNotNull($resp->clientOid); - self::assertNotNull($resp->cancelledOrderId); - Logger::info($resp->jsonSerialize($this->serializer)); + CancelStopOrderByClientOidResp resp = api.cancelStopOrderByClientOid(req); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getCancelledOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -588,15 +612,16 @@ * Cancel Stop Order By OrderId * /api/v1/stop-order/{orderId} */ - public void testCancelStopOrderByOrderId() { + @Test + public void testCancelStopOrderByOrderId() throws Exception { CancelStopOrderByOrderIdReq.CancelStopOrderByOrderIdReqBuilder builder = CancelStopOrderByOrderIdReq.builder(); builder.orderId(?); CancelStopOrderByOrderIdReq req = builder.build(); - CancelStopOrderByOrderIdResp resp = this.api.cancelStopOrderByOrderId(req); - foreach($resp->cancelledOrderIds as $item) { - } + CancelStopOrderByOrderIdResp resp = api.cancelStopOrderByOrderId(req); + resp.getCancelledOrderIds().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -604,15 +629,16 @@ * Batch Cancel Stop Orders * /api/v1/stop-order/cancel */ - public void testBatchCancelStopOrder() { + @Test + public void testBatchCancelStopOrder() throws Exception { BatchCancelStopOrderReq.BatchCancelStopOrderReqBuilder builder = BatchCancelStopOrderReq.builder(); builder.symbol(?).tradeType(?).orderIds(?); BatchCancelStopOrderReq req = builder.build(); - BatchCancelStopOrderResp resp = this.api.batchCancelStopOrder(req); - foreach($resp->cancelledOrderIds as $item) { - } + BatchCancelStopOrderResp resp = api.batchCancelStopOrder(req); + resp.getCancelledOrderIds().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -620,54 +646,55 @@ * Get Stop Orders List * /api/v1/stop-order */ - public void testGetStopOrdersList() { + @Test + public void testGetStopOrdersList() throws Exception { GetStopOrdersListReq.GetStopOrdersListReqBuilder builder = GetStopOrdersListReq.builder(); builder.symbol(?).side(?).type(?).tradeType(?).startAt(?).endAt(?).currentPage(?).orderIds(?).pageSize(?).stop(?); GetStopOrdersListReq req = builder.build(); - GetStopOrdersListResp resp = this.api.getStopOrdersList(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->symbol); - self::assertNotNull($item->userId); - self::assertNotNull($item->status); - self::assertNotNull($item->type); - self::assertNotNull($item->side); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->funds); - self::assertNotNull($item->stp); - self::assertNotNull($item->timeInForce); - self::assertNotNull($item->cancelAfter); - self::assertNotNull($item->postOnly); - self::assertNotNull($item->hidden); - self::assertNotNull($item->iceberg); - self::assertNotNull($item->visibleSize); - self::assertNotNull($item->channel); - self::assertNotNull($item->clientOid); - self::assertNotNull($item->remark); - self::assertNotNull($item->tags); - self::assertNotNull($item->orderTime); - self::assertNotNull($item->domainId); - self::assertNotNull($item->tradeSource); - self::assertNotNull($item->tradeType); - self::assertNotNull($item->feeCurrency); - self::assertNotNull($item->takerFeeRate); - self::assertNotNull($item->makerFeeRate); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->stop); - self::assertNotNull($item->stopTriggerTime); - self::assertNotNull($item->stopPrice); - self::assertNotNull($item->relatedNo); - self::assertNotNull($item->limitPrice); - self::assertNotNull($item->pop); - self::assertNotNull($item->activateCondition); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + GetStopOrdersListResp resp = api.getStopOrdersList(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getUserId()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getStp()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getTags()); + Assertions.assertNotNull(item.getOrderTime()); + Assertions.assertNotNull(item.getDomainId()); + Assertions.assertNotNull(item.getTradeSource()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getTakerFeeRate()); + Assertions.assertNotNull(item.getMakerFeeRate()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getStopTriggerTime()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getRelatedNo()); + Assertions.assertNotNull(item.getLimitPrice()); + Assertions.assertNotNull(item.getPop()); + Assertions.assertNotNull(item.getActivateCondition()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -675,43 +702,44 @@ * Get Stop Order By OrderId * /api/v1/stop-order/{orderId} */ - public void testGetStopOrderByOrderId() { + @Test + public void testGetStopOrderByOrderId() throws Exception { GetStopOrderByOrderIdReq.GetStopOrderByOrderIdReqBuilder builder = GetStopOrderByOrderIdReq.builder(); builder.orderId(?); GetStopOrderByOrderIdReq req = builder.build(); - GetStopOrderByOrderIdResp resp = this.api.getStopOrderByOrderId(req); - self::assertNotNull($resp->id); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->userId); - self::assertNotNull($resp->status); - self::assertNotNull($resp->type); - self::assertNotNull($resp->side); - self::assertNotNull($resp->price); - self::assertNotNull($resp->size); - self::assertNotNull($resp->funds); - self::assertNotNull($resp->stp); - self::assertNotNull($resp->timeInForce); - self::assertNotNull($resp->cancelAfter); - self::assertNotNull($resp->postOnly); - self::assertNotNull($resp->hidden); - self::assertNotNull($resp->iceberg); - self::assertNotNull($resp->visibleSize); - self::assertNotNull($resp->channel); - self::assertNotNull($resp->clientOid); - self::assertNotNull($resp->remark); - self::assertNotNull($resp->tags); - self::assertNotNull($resp->domainId); - self::assertNotNull($resp->tradeSource); - self::assertNotNull($resp->tradeType); - self::assertNotNull($resp->feeCurrency); - self::assertNotNull($resp->takerFeeRate); - self::assertNotNull($resp->makerFeeRate); - self::assertNotNull($resp->createdAt); - self::assertNotNull($resp->stop); - self::assertNotNull($resp->stopTriggerTime); - self::assertNotNull($resp->stopPrice); - self::assertNotNull($resp->orderTime); - Logger::info($resp->jsonSerialize($this->serializer)); + GetStopOrderByOrderIdResp resp = api.getStopOrderByOrderId(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getUserId()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getFunds()); + Assertions.assertNotNull(resp.getStp()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getCancelAfter()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getVisibleSize()); + Assertions.assertNotNull(resp.getChannel()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getTags()); + Assertions.assertNotNull(resp.getDomainId()); + Assertions.assertNotNull(resp.getTradeSource()); + Assertions.assertNotNull(resp.getTradeType()); + Assertions.assertNotNull(resp.getFeeCurrency()); + Assertions.assertNotNull(resp.getTakerFeeRate()); + Assertions.assertNotNull(resp.getMakerFeeRate()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getStop()); + Assertions.assertNotNull(resp.getStopTriggerTime()); + Assertions.assertNotNull(resp.getStopPrice()); + Assertions.assertNotNull(resp.getOrderTime()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -719,46 +747,47 @@ * Get Stop Order By ClientOid * /api/v1/stop-order/queryOrderByClientOid */ - public void testGetStopOrderByClientOid() { + @Test + public void testGetStopOrderByClientOid() throws Exception { GetStopOrderByClientOidReq.GetStopOrderByClientOidReqBuilder builder = GetStopOrderByClientOidReq.builder(); builder.clientOid(?).symbol(?); GetStopOrderByClientOidReq req = builder.build(); - GetStopOrderByClientOidResp resp = this.api.getStopOrderByClientOid(req); - foreach($resp->data as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->symbol); - self::assertNotNull($item->userId); - self::assertNotNull($item->status); - self::assertNotNull($item->type); - self::assertNotNull($item->side); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->funds); - self::assertNotNull($item->stp); - self::assertNotNull($item->timeInForce); - self::assertNotNull($item->cancelAfter); - self::assertNotNull($item->postOnly); - self::assertNotNull($item->hidden); - self::assertNotNull($item->iceberg); - self::assertNotNull($item->visibleSize); - self::assertNotNull($item->channel); - self::assertNotNull($item->clientOid); - self::assertNotNull($item->remark); - self::assertNotNull($item->tags); - self::assertNotNull($item->domainId); - self::assertNotNull($item->tradeSource); - self::assertNotNull($item->tradeType); - self::assertNotNull($item->feeCurrency); - self::assertNotNull($item->takerFeeRate); - self::assertNotNull($item->makerFeeRate); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->stop); - self::assertNotNull($item->stopTriggerTime); - self::assertNotNull($item->stopPrice); - self::assertNotNull($item->orderTime); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + GetStopOrderByClientOidResp resp = api.getStopOrderByClientOid(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getUserId()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getStp()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getTags()); + Assertions.assertNotNull(item.getDomainId()); + Assertions.assertNotNull(item.getTradeSource()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getTakerFeeRate()); + Assertions.assertNotNull(item.getMakerFeeRate()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getStopTriggerTime()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getOrderTime()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -766,13 +795,14 @@ * Add OCO Order * /api/v3/oco/order */ - public void testAddOcoOrder() { + @Test + public void testAddOcoOrder() throws Exception { AddOcoOrderReq.AddOcoOrderReqBuilder builder = AddOcoOrderReq.builder(); builder.clientOid(?).side(?).symbol(?).remark(?).price(?).size(?).stopPrice(?).limitPrice(?).tradeType(?); AddOcoOrderReq req = builder.build(); - AddOcoOrderResp resp = this.api.addOcoOrder(req); - self::assertNotNull($resp->orderId); - Logger::info($resp->jsonSerialize($this->serializer)); + AddOcoOrderResp resp = api.addOcoOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -780,15 +810,16 @@ * Cancel OCO Order By OrderId * /api/v3/oco/order/{orderId} */ - public void testCancelOcoOrderByOrderId() { + @Test + public void testCancelOcoOrderByOrderId() throws Exception { CancelOcoOrderByOrderIdReq.CancelOcoOrderByOrderIdReqBuilder builder = CancelOcoOrderByOrderIdReq.builder(); builder.orderId(?); CancelOcoOrderByOrderIdReq req = builder.build(); - CancelOcoOrderByOrderIdResp resp = this.api.cancelOcoOrderByOrderId(req); - foreach($resp->cancelledOrderIds as $item) { - } + CancelOcoOrderByOrderIdResp resp = api.cancelOcoOrderByOrderId(req); + resp.getCancelledOrderIds().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -796,15 +827,16 @@ * Cancel OCO Order By ClientOid * /api/v3/oco/client-order/{clientOid} */ - public void testCancelOcoOrderByClientOid() { + @Test + public void testCancelOcoOrderByClientOid() throws Exception { CancelOcoOrderByClientOidReq.CancelOcoOrderByClientOidReqBuilder builder = CancelOcoOrderByClientOidReq.builder(); builder.clientOid(?); CancelOcoOrderByClientOidReq req = builder.build(); - CancelOcoOrderByClientOidResp resp = this.api.cancelOcoOrderByClientOid(req); - foreach($resp->cancelledOrderIds as $item) { - } + CancelOcoOrderByClientOidResp resp = api.cancelOcoOrderByClientOid(req); + resp.getCancelledOrderIds().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -812,15 +844,16 @@ * Batch Cancel OCO Order * /api/v3/oco/orders */ - public void testBatchCancelOcoOrders() { + @Test + public void testBatchCancelOcoOrders() throws Exception { BatchCancelOcoOrdersReq.BatchCancelOcoOrdersReqBuilder builder = BatchCancelOcoOrdersReq.builder(); builder.orderIds(?).symbol(?); BatchCancelOcoOrdersReq req = builder.build(); - BatchCancelOcoOrdersResp resp = this.api.batchCancelOcoOrders(req); - foreach($resp->cancelledOrderIds as $item) { - } + BatchCancelOcoOrdersResp resp = api.batchCancelOcoOrders(req); + resp.getCancelledOrderIds().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -828,17 +861,18 @@ * Get OCO Order By OrderId * /api/v3/oco/order/{orderId} */ - public void testGetOcoOrderByOrderId() { + @Test + public void testGetOcoOrderByOrderId() throws Exception { GetOcoOrderByOrderIdReq.GetOcoOrderByOrderIdReqBuilder builder = GetOcoOrderByOrderIdReq.builder(); builder.orderId(?); GetOcoOrderByOrderIdReq req = builder.build(); - GetOcoOrderByOrderIdResp resp = this.api.getOcoOrderByOrderId(req); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->clientOid); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->orderTime); - self::assertNotNull($resp->status); - Logger::info($resp->jsonSerialize($this->serializer)); + GetOcoOrderByOrderIdResp resp = api.getOcoOrderByOrderId(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getOrderTime()); + Assertions.assertNotNull(resp.getStatus()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -846,17 +880,18 @@ * Get OCO Order By ClientOid * /api/v3/oco/client-order/{clientOid} */ - public void testGetOcoOrderByClientOid() { + @Test + public void testGetOcoOrderByClientOid() throws Exception { GetOcoOrderByClientOidReq.GetOcoOrderByClientOidReqBuilder builder = GetOcoOrderByClientOidReq.builder(); builder.clientOid(?); GetOcoOrderByClientOidReq req = builder.build(); - GetOcoOrderByClientOidResp resp = this.api.getOcoOrderByClientOid(req); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->clientOid); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->orderTime); - self::assertNotNull($resp->status); - Logger::info($resp->jsonSerialize($this->serializer)); + GetOcoOrderByClientOidResp resp = api.getOcoOrderByClientOid(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getOrderTime()); + Assertions.assertNotNull(resp.getStatus()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -864,27 +899,28 @@ * Get OCO Order Detail By OrderId * /api/v3/oco/order/details/{orderId} */ - public void testGetOcoOrderDetailByOrderId() { + @Test + public void testGetOcoOrderDetailByOrderId() throws Exception { GetOcoOrderDetailByOrderIdReq.GetOcoOrderDetailByOrderIdReqBuilder builder = GetOcoOrderDetailByOrderIdReq.builder(); builder.orderId(?); GetOcoOrderDetailByOrderIdReq req = builder.build(); - GetOcoOrderDetailByOrderIdResp resp = this.api.getOcoOrderDetailByOrderId(req); - self::assertNotNull($resp->orderId); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->clientOid); - self::assertNotNull($resp->orderTime); - self::assertNotNull($resp->status); - foreach($resp->orders as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->symbol); - self::assertNotNull($item->side); - self::assertNotNull($item->price); - self::assertNotNull($item->stopPrice); - self::assertNotNull($item->size); - self::assertNotNull($item->status); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + GetOcoOrderDetailByOrderIdResp resp = api.getOcoOrderDetailByOrderId(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getOrderTime()); + Assertions.assertNotNull(resp.getStatus()); + resp.getOrders().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getStatus()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -892,24 +928,25 @@ * Get OCO Order List * /api/v3/oco/orders */ - public void testGetOcoOrderList() { + @Test + public void testGetOcoOrderList() throws Exception { GetOcoOrderListReq.GetOcoOrderListReqBuilder builder = GetOcoOrderListReq.builder(); builder.symbol(?).startAt(?).endAt(?).orderIds(?).pageSize(?).currentPage(?); GetOcoOrderListReq req = builder.build(); - GetOcoOrderListResp resp = this.api.getOcoOrderList(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->orderId); - self::assertNotNull($item->symbol); - self::assertNotNull($item->clientOid); - self::assertNotNull($item->orderTime); - self::assertNotNull($item->status); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + GetOcoOrderListResp resp = api.getOcoOrderList(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getOrderTime()); + Assertions.assertNotNull(item.getStatus()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -917,13 +954,14 @@ * Add Order - Old * /api/v1/orders */ - public void testAddOrderOld() { + @Test + public void testAddOrderOld() throws Exception { AddOrderOldReq.AddOrderOldReqBuilder builder = AddOrderOldReq.builder(); builder.clientOid(?).side(?).symbol(?).type(?).remark(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).cancelAfter(?).funds(?).tradeType(?); AddOrderOldReq req = builder.build(); - AddOrderOldResp resp = this.api.addOrderOld(req); - self::assertNotNull($resp->orderId); - Logger::info($resp->jsonSerialize($this->serializer)); + AddOrderOldResp resp = api.addOrderOld(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -931,13 +969,14 @@ * Add Order Test - Old * /api/v1/orders/test */ - public void testAddOrderTestOld() { + @Test + public void testAddOrderTestOld() throws Exception { AddOrderTestOldReq.AddOrderTestOldReqBuilder builder = AddOrderTestOldReq.builder(); builder.clientOid(?).side(?).symbol(?).type(?).remark(?).stp(?).price(?).size(?).timeInForce(?).postOnly(?).hidden(?).iceberg(?).visibleSize(?).cancelAfter(?).funds(?).tradeType(?); AddOrderTestOldReq req = builder.build(); - AddOrderTestOldResp resp = this.api.addOrderTestOld(req); - self::assertNotNull($resp->orderId); - Logger::info($resp->jsonSerialize($this->serializer)); + AddOrderTestOldResp resp = api.addOrderTestOld(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -945,36 +984,37 @@ * Batch Add Orders - Old * /api/v1/orders/multi */ - public void testBatchAddOrdersOld() { + @Test + public void testBatchAddOrdersOld() throws Exception { BatchAddOrdersOldReq.BatchAddOrdersOldReqBuilder builder = BatchAddOrdersOldReq.builder(); builder.orderList(?).symbol(?); BatchAddOrdersOldReq req = builder.build(); - BatchAddOrdersOldResp resp = this.api.batchAddOrdersOld(req); - foreach($resp->data as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->type); - self::assertNotNull($item->side); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->funds); - self::assertNotNull($item->stp); - self::assertNotNull($item->stop); - self::assertNotNull($item->stopPrice); - self::assertNotNull($item->timeInForce); - self::assertNotNull($item->cancelAfter); - self::assertNotNull($item->postOnly); - self::assertNotNull($item->hidden); - self::assertNotNull($item->iceberge); - self::assertNotNull($item->iceberg); - self::assertNotNull($item->visibleSize); - self::assertNotNull($item->channel); - self::assertNotNull($item->id); - self::assertNotNull($item->status); - self::assertNotNull($item->failMsg); - self::assertNotNull($item->clientOid); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + BatchAddOrdersOldResp resp = api.batchAddOrdersOld(req); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getStp()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberge()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getFailMsg()); + Assertions.assertNotNull(item.getClientOid()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -982,15 +1022,16 @@ * Cancel Order By OrderId - Old * /api/v1/orders/{orderId} */ - public void testCancelOrderByOrderIdOld() { + @Test + public void testCancelOrderByOrderIdOld() throws Exception { CancelOrderByOrderIdOldReq.CancelOrderByOrderIdOldReqBuilder builder = CancelOrderByOrderIdOldReq.builder(); builder.orderId(?); CancelOrderByOrderIdOldReq req = builder.build(); - CancelOrderByOrderIdOldResp resp = this.api.cancelOrderByOrderIdOld(req); - foreach($resp->cancelledOrderIds as $item) { - } + CancelOrderByOrderIdOldResp resp = api.cancelOrderByOrderIdOld(req); + resp.getCancelledOrderIds().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -998,17 +1039,18 @@ * Cancel Order By ClientOid - Old * /api/v1/order/client-order/{clientOid} */ - public void testCancelOrderByClientOidOld() { + @Test + public void testCancelOrderByClientOidOld() throws Exception { CancelOrderByClientOidOldReq.CancelOrderByClientOidOldReqBuilder builder = CancelOrderByClientOidOldReq.builder(); builder.clientOid(?); CancelOrderByClientOidOldReq req = builder.build(); - CancelOrderByClientOidOldResp resp = this.api.cancelOrderByClientOidOld(req); - self::assertNotNull($resp->clientOid); - self::assertNotNull($resp->cancelledOrderId); - foreach($resp->cancelledOcoOrderIds as $item) { - } + CancelOrderByClientOidOldResp resp = api.cancelOrderByClientOidOld(req); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getCancelledOrderId()); + resp.getCancelledOcoOrderIds().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -1016,15 +1058,16 @@ * Batch Cancel Order - Old * /api/v1/orders */ - public void testBatchCancelOrderOld() { + @Test + public void testBatchCancelOrderOld() throws Exception { BatchCancelOrderOldReq.BatchCancelOrderOldReqBuilder builder = BatchCancelOrderOldReq.builder(); builder.symbol(?).tradeType(?); BatchCancelOrderOldReq req = builder.build(); - BatchCancelOrderOldResp resp = this.api.batchCancelOrderOld(req); - foreach($resp->cancelledOrderIds as $item) { - } + BatchCancelOrderOldResp resp = api.batchCancelOrderOld(req); + resp.getCancelledOrderIds().forEach( item -> { + }); - Logger::info($resp->jsonSerialize($this->serializer)); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -1032,52 +1075,53 @@ * Get Orders List - Old * /api/v1/orders */ - public void testGetOrdersListOld() { + @Test + public void testGetOrdersListOld() throws Exception { GetOrdersListOldReq.GetOrdersListOldReqBuilder builder = GetOrdersListOldReq.builder(); builder.symbol(?).status(?).side(?).type(?).tradeType(?).startAt(?).endAt(?).currentPage(?).pageSize(?); GetOrdersListOldReq req = builder.build(); - GetOrdersListOldResp resp = this.api.getOrdersListOld(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->symbol); - self::assertNotNull($item->opType); - self::assertNotNull($item->type); - self::assertNotNull($item->side); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->funds); - self::assertNotNull($item->dealFunds); - self::assertNotNull($item->dealSize); - self::assertNotNull($item->fee); - self::assertNotNull($item->feeCurrency); - self::assertNotNull($item->stp); - self::assertNotNull($item->stop); - self::assertNotNull($item->stopTriggered); - self::assertNotNull($item->stopPrice); - self::assertNotNull($item->timeInForce); - self::assertNotNull($item->postOnly); - self::assertNotNull($item->hidden); - self::assertNotNull($item->iceberg); - self::assertNotNull($item->visibleSize); - self::assertNotNull($item->cancelAfter); - self::assertNotNull($item->channel); - self::assertNotNull($item->clientOid); - self::assertNotNull($item->remark); - self::assertNotNull($item->tags); - self::assertNotNull($item->isActive); - self::assertNotNull($item->cancelExist); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->tradeType); - self::assertNotNull($item->tax); - self::assertNotNull($item->taxRate); - self::assertNotNull($item->taxCurrency); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + GetOrdersListOldResp resp = api.getOrdersListOld(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getOpType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getDealFunds()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStp()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getStopTriggered()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getTags()); + Assertions.assertNotNull(item.getIsActive()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getTaxRate()); + Assertions.assertNotNull(item.getTaxCurrency()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -1085,45 +1129,46 @@ * Get Recent Orders List - Old * /api/v1/limit/orders */ - public void testGetRecentOrdersListOld() { - GetRecentOrdersListOldResp resp = this.api.getRecentOrdersListOld(); - foreach($resp->data as $item) { - self::assertNotNull($item->id); - self::assertNotNull($item->symbol); - self::assertNotNull($item->opType); - self::assertNotNull($item->type); - self::assertNotNull($item->side); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->funds); - self::assertNotNull($item->dealFunds); - self::assertNotNull($item->dealSize); - self::assertNotNull($item->fee); - self::assertNotNull($item->feeCurrency); - self::assertNotNull($item->stp); - self::assertNotNull($item->stop); - self::assertNotNull($item->stopTriggered); - self::assertNotNull($item->stopPrice); - self::assertNotNull($item->timeInForce); - self::assertNotNull($item->postOnly); - self::assertNotNull($item->hidden); - self::assertNotNull($item->iceberg); - self::assertNotNull($item->visibleSize); - self::assertNotNull($item->cancelAfter); - self::assertNotNull($item->channel); - self::assertNotNull($item->clientOid); - self::assertNotNull($item->remark); - self::assertNotNull($item->tags); - self::assertNotNull($item->isActive); - self::assertNotNull($item->cancelExist); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->tradeType); - self::assertNotNull($item->tax); - self::assertNotNull($item->taxRate); - self::assertNotNull($item->taxCurrency); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetRecentOrdersListOld() throws Exception { + GetRecentOrdersListOldResp resp = api.getRecentOrdersListOld(); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getOpType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getDealFunds()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStp()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getStopTriggered()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getTags()); + Assertions.assertNotNull(item.getIsActive()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getTaxRate()); + Assertions.assertNotNull(item.getTaxCurrency()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -1131,45 +1176,46 @@ * Get Order By OrderId - Old * /api/v1/orders/{orderId} */ - public void testGetOrderByOrderIdOld() { + @Test + public void testGetOrderByOrderIdOld() throws Exception { GetOrderByOrderIdOldReq.GetOrderByOrderIdOldReqBuilder builder = GetOrderByOrderIdOldReq.builder(); builder.orderId(?); GetOrderByOrderIdOldReq req = builder.build(); - GetOrderByOrderIdOldResp resp = this.api.getOrderByOrderIdOld(req); - self::assertNotNull($resp->id); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->opType); - self::assertNotNull($resp->type); - self::assertNotNull($resp->side); - self::assertNotNull($resp->price); - self::assertNotNull($resp->size); - self::assertNotNull($resp->funds); - self::assertNotNull($resp->dealFunds); - self::assertNotNull($resp->dealSize); - self::assertNotNull($resp->fee); - self::assertNotNull($resp->feeCurrency); - self::assertNotNull($resp->stp); - self::assertNotNull($resp->stop); - self::assertNotNull($resp->stopTriggered); - self::assertNotNull($resp->stopPrice); - self::assertNotNull($resp->timeInForce); - self::assertNotNull($resp->postOnly); - self::assertNotNull($resp->hidden); - self::assertNotNull($resp->iceberg); - self::assertNotNull($resp->visibleSize); - self::assertNotNull($resp->cancelAfter); - self::assertNotNull($resp->channel); - self::assertNotNull($resp->clientOid); - self::assertNotNull($resp->remark); - self::assertNotNull($resp->tags); - self::assertNotNull($resp->isActive); - self::assertNotNull($resp->cancelExist); - self::assertNotNull($resp->createdAt); - self::assertNotNull($resp->tradeType); - self::assertNotNull($resp->tax); - self::assertNotNull($resp->taxRate); - self::assertNotNull($resp->taxCurrency); - Logger::info($resp->jsonSerialize($this->serializer)); + GetOrderByOrderIdOldResp resp = api.getOrderByOrderIdOld(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getOpType()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getFunds()); + Assertions.assertNotNull(resp.getDealFunds()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getFeeCurrency()); + Assertions.assertNotNull(resp.getStp()); + Assertions.assertNotNull(resp.getStop()); + Assertions.assertNotNull(resp.getStopTriggered()); + Assertions.assertNotNull(resp.getStopPrice()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getVisibleSize()); + Assertions.assertNotNull(resp.getCancelAfter()); + Assertions.assertNotNull(resp.getChannel()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getTags()); + Assertions.assertNotNull(resp.getIsActive()); + Assertions.assertNotNull(resp.getCancelExist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getTradeType()); + Assertions.assertNotNull(resp.getTax()); + Assertions.assertNotNull(resp.getTaxRate()); + Assertions.assertNotNull(resp.getTaxCurrency()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -1177,45 +1223,46 @@ * Get Order By ClientOid - Old * /api/v1/order/client-order/{clientOid} */ - public void testGetOrderByClientOidOld() { + @Test + public void testGetOrderByClientOidOld() throws Exception { GetOrderByClientOidOldReq.GetOrderByClientOidOldReqBuilder builder = GetOrderByClientOidOldReq.builder(); builder.clientOid(?); GetOrderByClientOidOldReq req = builder.build(); - GetOrderByClientOidOldResp resp = this.api.getOrderByClientOidOld(req); - self::assertNotNull($resp->id); - self::assertNotNull($resp->symbol); - self::assertNotNull($resp->opType); - self::assertNotNull($resp->type); - self::assertNotNull($resp->side); - self::assertNotNull($resp->price); - self::assertNotNull($resp->size); - self::assertNotNull($resp->funds); - self::assertNotNull($resp->dealFunds); - self::assertNotNull($resp->dealSize); - self::assertNotNull($resp->fee); - self::assertNotNull($resp->feeCurrency); - self::assertNotNull($resp->stp); - self::assertNotNull($resp->stop); - self::assertNotNull($resp->stopTriggered); - self::assertNotNull($resp->stopPrice); - self::assertNotNull($resp->timeInForce); - self::assertNotNull($resp->postOnly); - self::assertNotNull($resp->hidden); - self::assertNotNull($resp->iceberg); - self::assertNotNull($resp->visibleSize); - self::assertNotNull($resp->cancelAfter); - self::assertNotNull($resp->channel); - self::assertNotNull($resp->clientOid); - self::assertNotNull($resp->remark); - self::assertNotNull($resp->tags); - self::assertNotNull($resp->isActive); - self::assertNotNull($resp->cancelExist); - self::assertNotNull($resp->createdAt); - self::assertNotNull($resp->tradeType); - self::assertNotNull($resp->tax); - self::assertNotNull($resp->taxRate); - self::assertNotNull($resp->taxCurrency); - Logger::info($resp->jsonSerialize($this->serializer)); + GetOrderByClientOidOldResp resp = api.getOrderByClientOidOld(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getOpType()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getFunds()); + Assertions.assertNotNull(resp.getDealFunds()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getFeeCurrency()); + Assertions.assertNotNull(resp.getStp()); + Assertions.assertNotNull(resp.getStop()); + Assertions.assertNotNull(resp.getStopTriggered()); + Assertions.assertNotNull(resp.getStopPrice()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getVisibleSize()); + Assertions.assertNotNull(resp.getCancelAfter()); + Assertions.assertNotNull(resp.getChannel()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getTags()); + Assertions.assertNotNull(resp.getIsActive()); + Assertions.assertNotNull(resp.getCancelExist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getTradeType()); + Assertions.assertNotNull(resp.getTax()); + Assertions.assertNotNull(resp.getTaxRate()); + Assertions.assertNotNull(resp.getTaxCurrency()); + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -1223,36 +1270,37 @@ * Get Trade History - Old * /api/v1/fills */ - public void testGetTradeHistoryOld() { + @Test + public void testGetTradeHistoryOld() throws Exception { GetTradeHistoryOldReq.GetTradeHistoryOldReqBuilder builder = GetTradeHistoryOldReq.builder(); builder.symbol(?).orderId(?).side(?).type(?).tradeType(?).startAt(?).endAt(?).currentPage(?).pageSize(?); GetTradeHistoryOldReq req = builder.build(); - GetTradeHistoryOldResp resp = this.api.getTradeHistoryOld(req); - self::assertNotNull($resp->currentPage); - self::assertNotNull($resp->pageSize); - self::assertNotNull($resp->totalNum); - self::assertNotNull($resp->totalPage); - foreach($resp->items as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->tradeId); - self::assertNotNull($item->orderId); - self::assertNotNull($item->counterOrderId); - self::assertNotNull($item->side); - self::assertNotNull($item->liquidity); - self::assertNotNull($item->forceTaker); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->funds); - self::assertNotNull($item->fee); - self::assertNotNull($item->feeRate); - self::assertNotNull($item->feeCurrency); - self::assertNotNull($item->stop); - self::assertNotNull($item->tradeType); - self::assertNotNull($item->type); - self::assertNotNull($item->createdAt); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + GetTradeHistoryOldResp resp = api.getTradeHistoryOld(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTradeId()); + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getCounterOrderId()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getLiquidity()); + Assertions.assertNotNull(item.getForceTaker()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeRate()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getCreatedAt()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -1260,31 +1308,32 @@ * Get Recent Trade History - Old * /api/v1/limit/fills */ - public void testGetRecentTradeHistoryOld() { - GetRecentTradeHistoryOldResp resp = this.api.getRecentTradeHistoryOld(); - foreach($resp->data as $item) { - self::assertNotNull($item->symbol); - self::assertNotNull($item->tradeId); - self::assertNotNull($item->orderId); - self::assertNotNull($item->counterOrderId); - self::assertNotNull($item->side); - self::assertNotNull($item->liquidity); - self::assertNotNull($item->forceTaker); - self::assertNotNull($item->price); - self::assertNotNull($item->size); - self::assertNotNull($item->funds); - self::assertNotNull($item->fee); - self::assertNotNull($item->feeRate); - self::assertNotNull($item->feeCurrency); - self::assertNotNull($item->stop); - self::assertNotNull($item->tradeType); - self::assertNotNull($item->type); - self::assertNotNull($item->createdAt); - self::assertNotNull($item->tax); - self::assertNotNull($item->taxCurrency); - self::assertNotNull($item->taxRate); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetRecentTradeHistoryOld() throws Exception { + GetRecentTradeHistoryOldResp resp = api.getRecentTradeHistoryOld(); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTradeId()); + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getCounterOrderId()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getLiquidity()); + Assertions.assertNotNull(item.getForceTaker()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeRate()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getTaxCurrency()); + Assertions.assertNotNull(item.getTaxRate()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.template b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.template index 6274a2fa..492a78e5 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.template +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/VIPLendingApi.template @@ -4,14 +4,15 @@ * Get Discount Rate Configs * /api/v1/otc-loan/discount-rate-configs */ - public void testGetDiscountRateConfigs() { - GetDiscountRateConfigsResp resp = this.api.getDiscountRateConfigs(); - foreach($resp->data as $item) { - self::assertNotNull($item->currency); - self::assertNotNull($item->usdtLevels); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetDiscountRateConfigs() throws Exception { + GetDiscountRateConfigsResp resp = api.getDiscountRateConfigs(); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getUsdtLevels()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -19,26 +20,27 @@ * Get Loan Info * /api/v1/otc-loan/loan */ - public void testGetLoanInfo() { - GetLoanInfoResp resp = this.api.getLoanInfo(); - self::assertNotNull($resp->parentUid); - foreach($resp->orders as $item) { - self::assertNotNull($item->orderId); - self::assertNotNull($item->principal); - self::assertNotNull($item->interest); - self::assertNotNull($item->currency); - } - - self::assertNotNull($resp->ltv); - self::assertNotNull($resp->totalMarginAmount); - self::assertNotNull($resp->transferMarginAmount); - foreach($resp->margins as $item) { - self::assertNotNull($item->marginCcy); - self::assertNotNull($item->marginQty); - self::assertNotNull($item->marginFactor); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetLoanInfo() throws Exception { + GetLoanInfoResp resp = api.getLoanInfo(); + Assertions.assertNotNull(resp.getParentUid()); + resp.getOrders().forEach( item -> { + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getPrincipal()); + Assertions.assertNotNull(item.getInterest()); + Assertions.assertNotNull(item.getCurrency()); + }); + + Assertions.assertNotNull(resp.getLtv()); + Assertions.assertNotNull(resp.getTotalMarginAmount()); + Assertions.assertNotNull(resp.getTransferMarginAmount()); + resp.getMargins().forEach( item -> { + Assertions.assertNotNull(item.getMarginCcy()); + Assertions.assertNotNull(item.getMarginQty()); + Assertions.assertNotNull(item.getMarginFactor()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } /** @@ -46,17 +48,18 @@ * Get Accounts * /api/v1/otc-loan/accounts */ - public void testGetAccounts() { - GetAccountsResp resp = this.api.getAccounts(); - foreach($resp->data as $item) { - self::assertNotNull($item->uid); - self::assertNotNull($item->marginCcy); - self::assertNotNull($item->marginQty); - self::assertNotNull($item->marginFactor); - self::assertNotNull($item->accountType); - self::assertNotNull($item->isParent); - } - - Logger::info($resp->jsonSerialize($this->serializer)); + @Test + public void testGetAccounts() throws Exception { + GetAccountsResp resp = api.getAccounts(); + resp.getData().forEach( item -> { + Assertions.assertNotNull(item.getUid()); + Assertions.assertNotNull(item.getMarginCcy()); + Assertions.assertNotNull(item.getMarginQty()); + Assertions.assertNotNull(item.getMarginFactor()); + Assertions.assertNotNull(item.getAccountType()); + Assertions.assertNotNull(item.getIsParent()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); } diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/account/AccountApiTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/account/AccountApiTest.java new file mode 100644 index 00000000..ebc25567 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/account/AccountApiTest.java @@ -0,0 +1,43 @@ +package com.kucoin.universal.sdk.e2e.rest.account; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.Client; +import com.kucoin.universal.sdk.api.DefaultClient; +import com.kucoin.universal.sdk.generate.account.account.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.BeforeAll; + +@Slf4j +public class AccountApiTest { + + private static AccountApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = TransportOption.builder().build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + Client client = new DefaultClient(clientOpt); + api = client.getRestService().getAccountService().getAccountApi(); + } +} From 5ab273905f0beefa6c283aea0cbc5822805c66d7 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Tue, 15 Jul 2025 09:52:45 +0800 Subject: [PATCH 19/39] feat(java): update events callback --- .../main/resources/java-sdk/model_ws.mustache | 6 +++++- .../resources/java-sdk/ws_test_template.mustache | 10 +++++----- .../universal/sdk/plugin/SdkGeneratorTest.java | 2 +- sdk/java/pom.xml | 6 ++++++ .../futures/futuresprivate/AllOrderEvent.java | 10 +++++----- .../futures/futuresprivate/AllPositionEvent.java | 10 +++++----- .../futures/futuresprivate/BalanceEvent.java | 10 +++++----- .../futuresprivate/CrossLeverageEvent.java | 11 ++++++----- .../futures/futuresprivate/MarginModeEvent.java | 10 +++++----- .../futures/futuresprivate/OrderEvent.java | 10 +++++----- .../futures/futuresprivate/PositionEvent.java | 10 +++++----- .../futures/futuresprivate/StopOrdersEvent.java | 10 +++++----- .../futures/futurespublic/AnnouncementEvent.java | 10 +++++----- .../futures/futurespublic/ExecutionEvent.java | 10 +++++----- .../futures/futurespublic/InstrumentEvent.java | 10 +++++----- .../futures/futurespublic/KlinesEvent.java | 10 +++++----- .../futurespublic/OrderbookIncrementEvent.java | 11 ++++++----- .../futurespublic/OrderbookLevel50Event.java | 11 ++++++----- .../futurespublic/OrderbookLevel5Event.java | 11 ++++++----- .../futurespublic/SymbolSnapshotEvent.java | 11 ++++++----- .../futures/futurespublic/TickerV1Event.java | 10 +++++----- .../futures/futurespublic/TickerV2Event.java | 10 +++++----- .../marginprivate/CrossMarginPositionEvent.java | 11 ++++++----- .../IsolatedMarginPositionEvent.java | 11 ++++++----- .../margin/marginpublic/IndexPriceEvent.java | 10 +++++----- .../margin/marginpublic/MarkPriceEvent.java | 10 +++++----- .../generate/spot/spotprivate/AccountEvent.java | 10 +++++----- .../generate/spot/spotprivate/OrderV1Event.java | 10 +++++----- .../generate/spot/spotprivate/OrderV2Event.java | 10 +++++----- .../spot/spotprivate/StopOrderEvent.java | 10 +++++----- .../spot/spotpublic/AllTickersEvent.java | 10 +++++----- .../spot/spotpublic/CallAuctionInfoEvent.java | 11 ++++++----- .../CallAuctionOrderbookLevel50Event.java | 11 ++++++----- .../generate/spot/spotpublic/KlinesEvent.java | 10 +++++----- .../spot/spotpublic/MarketSnapshotEvent.java | 11 ++++++----- .../spot/spotpublic/OrderbookIncrementEvent.java | 11 ++++++----- .../spot/spotpublic/OrderbookLevel1Event.java | 11 ++++++----- .../spot/spotpublic/OrderbookLevel50Event.java | 11 ++++++----- .../spot/spotpublic/OrderbookLevel5Event.java | 11 ++++++----- .../spot/spotpublic/SymbolSnapshotEvent.java | 11 ++++++----- .../generate/spot/spotpublic/TickerEvent.java | 10 +++++----- .../sdk/generate/spot/spotpublic/TradeEvent.java | 10 +++++----- .../sdk/internal/infra/DefaultTransport.java | 16 +++++++++------- .../universal/sdk/model/TransportOption.java | 5 +++++ 44 files changed, 236 insertions(+), 204 deletions(-) diff --git a/generator/plugin/src/main/resources/java-sdk/model_ws.mustache b/generator/plugin/src/main/resources/java-sdk/model_ws.mustache index 8a6d2ef6..7d16593c 100644 --- a/generator/plugin/src/main/resources/java-sdk/model_ws.mustache +++ b/generator/plugin/src/main/resources/java-sdk/model_ws.mustache @@ -63,7 +63,11 @@ class {{classname}} { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> callback.onEvent(msg.getTopic(), msg.getSubject(), objectMapper.convertValue(msg.getData(), {{classname}}.class)); + return (msg, objectMapper) -> { + {{classname}} event = objectMapper.convertValue(msg.getData(), {{classname}}.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } {{/vendorExtensions.x-response-model}} diff --git a/generator/plugin/src/main/resources/java-sdk/ws_test_template.mustache b/generator/plugin/src/main/resources/java-sdk/ws_test_template.mustache index 1071e2f8..d2b3c4d2 100644 --- a/generator/plugin/src/main/resources/java-sdk/ws_test_template.mustache +++ b/generator/plugin/src/main/resources/java-sdk/ws_test_template.mustache @@ -10,20 +10,20 @@ {{#vendorExtensions.x-response-model}} {{#vars}} {{#isArray}} - foreach($data->{{name}} as $item) { + event.{{getter}}().forEach( item -> { {{#vendorExtensions.x-response-inner-model}} {{#vars}} - self::assertNotNull($item->{{name}}); + Assertions.assertNotNull(item.{{getter}}()); {{/vars}} {{/vendorExtensions.x-response-inner-model}} - } + }); {{/isArray}} {{^isArray}} - self::assertNotNull($data->{{name}}); + Assertions.assertNotNull(event.{{getter}}()); {{/isArray}} {{/vars}} - Logger::info($data->jsonSerialize(self::$serializer)); + log.info("event: {}", mapper.writeValueAsString(event)); {{/vendorExtensions.x-response-model}} } diff --git a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java index 186c6482..2107567b 100644 --- a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java +++ b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java @@ -10,7 +10,7 @@ public class SdkGeneratorTest { private static final String SDK_NAME = "java-sdk"; private static final String SPEC_NAME = "../../spec/rest/api/openapi-spot-market.json"; private static final String SPEC_ENTRY_NAME = "../../spec/rest/entry/openapi-broker.json"; - private static final String WS_SPEC_NAME = "../../spec/ws/openapi-futures-private.json"; + private static final String WS_SPEC_NAME = "../../spec/ws/openapi-spot-public.json"; private static final String OUTPUT_DIR = "../../sdk/java/src/main/java/com/kucoin/universal/sdk/generate"; private static final String CSV_PATH = "../../spec"; diff --git a/sdk/java/pom.xml b/sdk/java/pom.xml index c7d62658..df803358 100644 --- a/sdk/java/pom.xml +++ b/sdk/java/pom.xml @@ -69,6 +69,12 @@ ${slf4j.version} compile + + org.slf4j + slf4j-simple + ${slf4j.version} + test + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllOrderEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllOrderEvent.java index 63a01939..3088b644 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllOrderEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllOrderEvent.java @@ -129,11 +129,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), AllOrderEvent.class)); + return (msg, objectMapper) -> { + AllOrderEvent event = objectMapper.convertValue(msg.getData(), AllOrderEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllPositionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllPositionEvent.java index eb962ee0..65c64374 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllPositionEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/AllPositionEvent.java @@ -236,11 +236,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), AllPositionEvent.class)); + return (msg, objectMapper) -> { + AllPositionEvent event = objectMapper.convertValue(msg.getData(), AllPositionEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/BalanceEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/BalanceEvent.java index 0410318e..5cbbb834 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/BalanceEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/BalanceEvent.java @@ -96,11 +96,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), BalanceEvent.class)); + return (msg, objectMapper) -> { + BalanceEvent event = objectMapper.convertValue(msg.getData(), BalanceEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageEvent.java index 59e7d613..c9a4fed3 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/CrossLeverageEvent.java @@ -47,11 +47,12 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), CrossLeverageEvent.class)); + return (msg, objectMapper) -> { + CrossLeverageEvent event = + objectMapper.convertValue(msg.getData(), CrossLeverageEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/MarginModeEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/MarginModeEvent.java index 0930e1b2..b9db264c 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/MarginModeEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/MarginModeEvent.java @@ -47,11 +47,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), MarginModeEvent.class)); + return (msg, objectMapper) -> { + MarginModeEvent event = objectMapper.convertValue(msg.getData(), MarginModeEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/OrderEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/OrderEvent.java index e707b7a8..352496d0 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/OrderEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/OrderEvent.java @@ -129,11 +129,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), OrderEvent.class)); + return (msg, objectMapper) -> { + OrderEvent event = objectMapper.convertValue(msg.getData(), OrderEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/PositionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/PositionEvent.java index c29769e5..87a84154 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/PositionEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/PositionEvent.java @@ -236,11 +236,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), PositionEvent.class)); + return (msg, objectMapper) -> { + PositionEvent event = objectMapper.convertValue(msg.getData(), PositionEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/StopOrdersEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/StopOrdersEvent.java index 8341b041..bf670243 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/StopOrdersEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/StopOrdersEvent.java @@ -89,11 +89,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), StopOrdersEvent.class)); + return (msg, objectMapper) -> { + StopOrdersEvent event = objectMapper.convertValue(msg.getData(), StopOrdersEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/AnnouncementEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/AnnouncementEvent.java index a8263bf4..bdb6ccb7 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/AnnouncementEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/AnnouncementEvent.java @@ -48,11 +48,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), AnnouncementEvent.class)); + return (msg, objectMapper) -> { + AnnouncementEvent event = objectMapper.convertValue(msg.getData(), AnnouncementEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/ExecutionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/ExecutionEvent.java index d40d2f55..0054eb25 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/ExecutionEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/ExecutionEvent.java @@ -68,11 +68,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), ExecutionEvent.class)); + return (msg, objectMapper) -> { + ExecutionEvent event = objectMapper.convertValue(msg.getData(), ExecutionEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/InstrumentEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/InstrumentEvent.java index 770fa1fa..47fa29a6 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/InstrumentEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/InstrumentEvent.java @@ -55,11 +55,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), InstrumentEvent.class)); + return (msg, objectMapper) -> { + InstrumentEvent event = objectMapper.convertValue(msg.getData(), InstrumentEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/KlinesEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/KlinesEvent.java index 2648bb5c..b8dca1d7 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/KlinesEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/KlinesEvent.java @@ -52,11 +52,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), KlinesEvent.class)); + return (msg, objectMapper) -> { + KlinesEvent event = objectMapper.convertValue(msg.getData(), KlinesEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookIncrementEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookIncrementEvent.java index 1ac715bc..7237cb3d 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookIncrementEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookIncrementEvent.java @@ -44,11 +44,12 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), OrderbookIncrementEvent.class)); + return (msg, objectMapper) -> { + OrderbookIncrementEvent event = + objectMapper.convertValue(msg.getData(), OrderbookIncrementEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel50Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel50Event.java index b70afabd..7842a037 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel50Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel50Event.java @@ -54,11 +54,12 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), OrderbookLevel50Event.class)); + return (msg, objectMapper) -> { + OrderbookLevel50Event event = + objectMapper.convertValue(msg.getData(), OrderbookLevel50Event.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel5Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel5Event.java index 5caac73e..5552285d 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel5Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/OrderbookLevel5Event.java @@ -54,11 +54,12 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), OrderbookLevel5Event.class)); + return (msg, objectMapper) -> { + OrderbookLevel5Event event = + objectMapper.convertValue(msg.getData(), OrderbookLevel5Event.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/SymbolSnapshotEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/SymbolSnapshotEvent.java index 91fd76a4..fbeaa80a 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/SymbolSnapshotEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/SymbolSnapshotEvent.java @@ -72,11 +72,12 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), SymbolSnapshotEvent.class)); + return (msg, objectMapper) -> { + SymbolSnapshotEvent event = + objectMapper.convertValue(msg.getData(), SymbolSnapshotEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV1Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV1Event.java index 44e01971..6795ff42 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV1Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV1Event.java @@ -76,11 +76,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), TickerV1Event.class)); + return (msg, objectMapper) -> { + TickerV1Event event = objectMapper.convertValue(msg.getData(), TickerV1Event.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV2Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV2Event.java index 11be7f5b..fdf3ab4f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV2Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/TickerV2Event.java @@ -60,11 +60,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), TickerV2Event.class)); + return (msg, objectMapper) -> { + TickerV2Event event = objectMapper.convertValue(msg.getData(), TickerV2Event.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionEvent.java index 394d73c5..7a9b3c60 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/CrossMarginPositionEvent.java @@ -68,11 +68,12 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), CrossMarginPositionEvent.class)); + return (msg, objectMapper) -> { + CrossMarginPositionEvent event = + objectMapper.convertValue(msg.getData(), CrossMarginPositionEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionEvent.java index ecac04ef..6f7e945e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/IsolatedMarginPositionEvent.java @@ -61,11 +61,12 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), IsolatedMarginPositionEvent.class)); + return (msg, objectMapper) -> { + IsolatedMarginPositionEvent event = + objectMapper.convertValue(msg.getData(), IsolatedMarginPositionEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/IndexPriceEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/IndexPriceEvent.java index cc5f20ae..00f32123 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/IndexPriceEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/IndexPriceEvent.java @@ -48,11 +48,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), IndexPriceEvent.class)); + return (msg, objectMapper) -> { + IndexPriceEvent event = objectMapper.convertValue(msg.getData(), IndexPriceEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarkPriceEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarkPriceEvent.java index 6e193874..f3309db6 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarkPriceEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarkPriceEvent.java @@ -48,11 +48,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), MarkPriceEvent.class)); + return (msg, objectMapper) -> { + MarkPriceEvent event = objectMapper.convertValue(msg.getData(), MarkPriceEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountEvent.java index 8d9cbfbe..3a00a19e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/AccountEvent.java @@ -76,11 +76,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), AccountEvent.class)); + return (msg, objectMapper) -> { + AccountEvent event = objectMapper.convertValue(msg.getData(), AccountEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV1Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV1Event.java index da6e8a7b..f764847a 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV1Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV1Event.java @@ -126,11 +126,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), OrderV1Event.class)); + return (msg, objectMapper) -> { + OrderV1Event event = objectMapper.convertValue(msg.getData(), OrderV1Event.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV2Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV2Event.java index af6d61f0..1d296247 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV2Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/OrderV2Event.java @@ -126,11 +126,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), OrderV2Event.class)); + return (msg, objectMapper) -> { + OrderV2Event event = objectMapper.convertValue(msg.getData(), OrderV2Event.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/StopOrderEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/StopOrderEvent.java index c429b90a..a0d5e4fb 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/StopOrderEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/StopOrderEvent.java @@ -85,11 +85,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), StopOrderEvent.class)); + return (msg, objectMapper) -> { + StopOrderEvent event = objectMapper.convertValue(msg.getData(), StopOrderEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java index 8da699e7..c7722472 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/AllTickersEvent.java @@ -64,11 +64,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), AllTickersEvent.class)); + return (msg, objectMapper) -> { + AllTickersEvent event = objectMapper.convertValue(msg.getData(), AllTickersEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java index b69bb2e4..d59f1ce6 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionInfoEvent.java @@ -64,11 +64,12 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), CallAuctionInfoEvent.class)); + return (msg, objectMapper) -> { + CallAuctionInfoEvent event = + objectMapper.convertValue(msg.getData(), CallAuctionInfoEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java index d51ef014..3cc73bb6 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/CallAuctionOrderbookLevel50Event.java @@ -47,11 +47,12 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), CallAuctionOrderbookLevel50Event.class)); + return (msg, objectMapper) -> { + CallAuctionOrderbookLevel50Event event = + objectMapper.convertValue(msg.getData(), CallAuctionOrderbookLevel50Event.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java index 6ce34328..d515c8eb 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/KlinesEvent.java @@ -49,11 +49,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), KlinesEvent.class)); + return (msg, objectMapper) -> { + KlinesEvent event = objectMapper.convertValue(msg.getData(), KlinesEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java index ff24a859..f1e86ea1 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/MarketSnapshotEvent.java @@ -40,11 +40,12 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), MarketSnapshotEvent.class)); + return (msg, objectMapper) -> { + MarketSnapshotEvent event = + objectMapper.convertValue(msg.getData(), MarketSnapshotEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java index ae2362e9..ca001a64 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookIncrementEvent.java @@ -52,11 +52,12 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), OrderbookIncrementEvent.class)); + return (msg, objectMapper) -> { + OrderbookIncrementEvent event = + objectMapper.convertValue(msg.getData(), OrderbookIncrementEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java index cd510276..0f023840 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel1Event.java @@ -46,11 +46,12 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), OrderbookLevel1Event.class)); + return (msg, objectMapper) -> { + OrderbookLevel1Event event = + objectMapper.convertValue(msg.getData(), OrderbookLevel1Event.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java index 4563b9e5..d6b8bdd0 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel50Event.java @@ -46,11 +46,12 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), OrderbookLevel50Event.class)); + return (msg, objectMapper) -> { + OrderbookLevel50Event event = + objectMapper.convertValue(msg.getData(), OrderbookLevel50Event.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java index 9dc8c7fd..daa242f3 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/OrderbookLevel5Event.java @@ -46,11 +46,12 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), OrderbookLevel5Event.class)); + return (msg, objectMapper) -> { + OrderbookLevel5Event event = + objectMapper.convertValue(msg.getData(), OrderbookLevel5Event.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java index 28907e03..761e8eb9 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SymbolSnapshotEvent.java @@ -40,11 +40,12 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), SymbolSnapshotEvent.class)); + return (msg, objectMapper) -> { + SymbolSnapshotEvent event = + objectMapper.convertValue(msg.getData(), SymbolSnapshotEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java index 61a1bcb0..18aac293 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TickerEvent.java @@ -64,11 +64,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), TickerEvent.class)); + return (msg, objectMapper) -> { + TickerEvent event = objectMapper.convertValue(msg.getData(), TickerEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java index b4e85eb6..675732bf 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/TradeEvent.java @@ -72,11 +72,11 @@ public interface Callback { public static class CallbackAdapters { public static WebSocketMessageCallback of(Callback callback) { - return (msg, objectMapper) -> - callback.onEvent( - msg.getTopic(), - msg.getSubject(), - objectMapper.convertValue(msg.getData(), TradeEvent.class)); + return (msg, objectMapper) -> { + TradeEvent event = objectMapper.convertValue(msg.getData(), TradeEvent.class); + event.setCommonResponse(msg); + callback.onEvent(msg.getTopic(), msg.getSubject(), event); + }; } } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java index 18941812..f9b0be67 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java @@ -199,15 +199,17 @@ private okhttp3.Request processRequest( } } - rawUrl = - rawUrl - + "?" - + queryParam.stream() - .map(p -> p.getFirst() + "=" + p.getSecond()) - .collect(Collectors.joining("&")); + if (!queryParam.isEmpty()) { + rawUrl = + rawUrl + + "?" + + queryParam.stream() + .map(p -> p.getFirst() + "=" + p.getSecond()) + .collect(Collectors.joining("&")); + } RequestBody rb = null; - if (!body.isEmpty()) { + if (!body.isEmpty() || method.equalsIgnoreCase("POST")) { rb = RequestBody.create(body, JSON); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/TransportOption.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/TransportOption.java index 22cca190..e77e0988 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/TransportOption.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/TransportOption.java @@ -74,4 +74,9 @@ public List interceptors() { ? Collections.emptyList() : Collections.unmodifiableList(interceptors); } + + /** no-op option with all defaults */ + public static TransportOption defaults() { + return TransportOption.builder().build(); + } } From b37a16ca4a82500f1d0e0655629f7fa329b18b24 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Tue, 15 Jul 2025 10:53:40 +0800 Subject: [PATCH 20/39] feat(java): update ws api --- .../main/resources/java-sdk/api_ws.mustache | 13 +- .../universal/sdk/generate/Version.java | 2 +- .../futuresprivate/FuturesPrivateWs.java | 83 ++++++++---- .../futurespublic/FuturesPublicWs.java | 108 ++++++++++----- .../margin/marginprivate/MarginPrivateWs.java | 29 ++-- .../margin/marginpublic/MarginPublicWs.java | 27 ++-- .../spot/spotprivate/SpotPrivateWs.java | 44 +++--- .../spot/spotpublic/SpotPublicWs.java | 126 ++++++++++++------ 8 files changed, 288 insertions(+), 144 deletions(-) diff --git a/generator/plugin/src/main/resources/java-sdk/api_ws.mustache b/generator/plugin/src/main/resources/java-sdk/api_ws.mustache index 489a9db6..6f31278d 100644 --- a/generator/plugin/src/main/resources/java-sdk/api_ws.mustache +++ b/generator/plugin/src/main/resources/java-sdk/api_ws.mustache @@ -7,25 +7,26 @@ public interface {{classname}} { /** * {{summary}} - * {{notes}} - * push frequency: {{vendorExtensions.x-push_frequency}} + * + *

{{notes}} + *

push frequency: {{vendorExtensions.x-push_frequency}} */ - public String {{vendorExtensions.x-meta.method}}{{operationName}}({{#vendorExtensions.x-meta.otherProperties}}{{#parameters}}{{#type}}{{#type.simple}}String {{paras}},{{/type.simple}}{{#type.array}}String[] {{paras}},{{/type.array}}{{#type.object}}{{#paras}}String {{.}},{{/paras}}{{/type.object}}{{/type}}{{/parameters}}{{/vendorExtensions.x-meta.otherProperties}}{{vendorExtensions.x-meta.methodServiceFmt}}Event.Callback callback); + String {{vendorExtensions.x-meta.method}}{{operationName}}({{#vendorExtensions.x-meta.otherProperties}}{{#parameters}}{{#type}}{{#type.simple}}String {{paras}},{{/type.simple}}{{#type.array}}String[] {{paras}},{{/type.array}}{{#type.object}}{{#paras}}String {{.}},{{/paras}}{{/type.object}}{{/type}}{{/parameters}}{{/vendorExtensions.x-meta.otherProperties}}{{vendorExtensions.x-meta.methodServiceFmt}}Event.Callback callback); {{/operation}} /** * Unsubscribe from topics */ - public void unSubscribe(String id); + void unSubscribe(String id); /** * Start websocket */ - public void start(); + void start(); /** * Stop websocket */ - public void stop(); + void stop(); {{/operations}} } \ No newline at end of file diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java index e30d8442..2f81ac45 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java @@ -2,5 +2,5 @@ public class Version { public static final String SDK_VERSION = "0.1.0-alpha"; - public static final String SDK_GENERATE_DATE = "2025-07-14"; + public static final String SDK_GENERATE_DATE = "2025-07-15"; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWs.java index 0975da84..b27a4af3 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWs.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWs.java @@ -2,56 +2,89 @@ package com.kucoin.universal.sdk.generate.futures.futuresprivate; +import java.util.concurrent.CompletableFuture; + public interface FuturesPrivateWs { - /** All Order change pushes. Push order changes for all symbol push frequency: real-time */ - public String allOrder(AllOrderEvent.Callback callback); + /** + * All Order change pushes. + * + *

Push order changes for all symbol + * + *

push frequency: real-time + */ + String allOrder(AllOrderEvent.Callback callback); /** - * All symbol position change events push Subscribe to this topic to get real-time pushes on all - * symbols’ position change events push frequency: real-time + * All symbol position change events push + * + *

Subscribe to this topic to get real-time pushes on all symbols’ position change events + * + *

push frequency: real-time */ - public String allPosition(AllPositionEvent.Callback callback); + String allPosition(AllPositionEvent.Callback callback); /** - * the balance change push Subscribe to this topic to get real-time balance change pushes push - * frequency: real-time + * the balance change push + * + *

Subscribe to this topic to get real-time balance change pushes + * + *

push frequency: real-time */ - public String balance(BalanceEvent.Callback callback); + String balance(BalanceEvent.Callback callback); /** - * the leverage change push Subscribe to this topic to get real-time pushes on leverage changes of - * contracts that are in cross margin mode push frequency: real-time + * the leverage change push + * + *

Subscribe to this topic to get real-time pushes on leverage changes of contracts that are in + * cross margin mode + * + *

push frequency: real-time */ - public String crossLeverage(CrossLeverageEvent.Callback callback); + String crossLeverage(CrossLeverageEvent.Callback callback); /** - * the margin mode change Subscribe to this topic to get real-time pushes on symbols’ margin mode - * change events push frequency: real-time + * the margin mode change + * + *

Subscribe to this topic to get real-time pushes on symbols’ margin mode change events + * + *

push frequency: real-time */ - public String marginMode(MarginModeEvent.Callback callback); + CompletableFuture marginMode(MarginModeEvent.Callback callback); - /** Order change pushes. Push order changes for the specified symbol push frequency: real-time */ - public String order(String symbol, OrderEvent.Callback callback); + /** + * Order change pushes. + * + *

Push order changes for the specified symbol + * + *

push frequency: real-time + */ + String order(String symbol, OrderEvent.Callback callback); /** - * the position change events push Subscribe this topic to get real-time pushes on symbols’ - * position change events push frequency: real-time + * the position change events push + * + *

Subscribe this topic to get real-time pushes on symbols’ position change events + * + *

push frequency: real-time */ - public String position(String symbol, PositionEvent.Callback callback); + String position(String symbol, PositionEvent.Callback callback); /** - * stop order change pushes. Subscribe to this topic to get real-time pushes on stop order - * changes. push frequency: real-time + * stop order change pushes. + * + *

Subscribe to this topic to get real-time pushes on stop order changes. + * + *

push frequency: real-time */ - public String stopOrders(StopOrdersEvent.Callback callback); + String stopOrders(StopOrdersEvent.Callback callback); /** Unsubscribe from topics */ - public void unSubscribe(String id); + void unSubscribe(String id); /** Start websocket */ - public void start(); + void start(); /** Stop websocket */ - public void stop(); + void stop(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWs.java index 29567f7f..cfd02a51 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWs.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWs.java @@ -5,64 +5,108 @@ public interface FuturesPublicWs { /** - * announcement Subscribe this topic to get Funding Fee Settlement. push frequency: Settlement is - * made every 8 hours, real-time push + * announcement + * + *

Subscribe this topic to get Funding Fee Settlement. + * + *

push frequency: Settlement is made every 8 hours, real-time push */ - public String announcement(String symbol, AnnouncementEvent.Callback callback); + String announcement(String symbol, AnnouncementEvent.Callback callback); /** - * Match execution data. For each order executed, the system will send you the match messages in - * the format as following. push frequency: real-time + * Match execution data. + * + *

For each order executed, the system will send you the match messages in the format as + * following. + * + *

push frequency: real-time */ - public String execution(String symbol, ExecutionEvent.Callback callback); + String execution(String symbol, ExecutionEvent.Callback callback); /** - * instrument Subscribe this topic to get the mark Price, index Price or funding fee Rate push - * frequency: mark.index.price 1s, funding.rate 1min + * instrument + * + *

Subscribe this topic to get the mark Price, index Price or funding fee Rate + * + *

push frequency: mark.index.price 1s, funding.rate 1min */ - public String instrument(String symbol, InstrumentEvent.Callback callback); + String instrument(String symbol, InstrumentEvent.Callback callback); - /** Klines Subscribe to this topic to get K-Line data. push frequency: 1s */ - public String klines(String symbol, String type, KlinesEvent.Callback callback); + /** + * Klines + * + *

Subscribe to this topic to get K-Line data. + * + *

push frequency: 1s + */ + String klines(String symbol, String type, KlinesEvent.Callback callback); /** - * 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: real-time + * 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: real-time */ - public String orderbookIncrement(String symbol, OrderbookIncrementEvent.Callback callback); + String orderbookIncrement(String symbol, OrderbookIncrementEvent.Callback callback); - /** Orderbook - Level50 The depth50 market data. push frequency: 100ms */ - public String orderbookLevel50(String symbol, OrderbookLevel50Event.Callback callback); + /** + * Orderbook - Level50 + * + *

The depth50 market data. + * + *

push frequency: 100ms + */ + String orderbookLevel50(String symbol, OrderbookLevel50Event.Callback callback); /** - * 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 push frequency: 100ms + * 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 + * + *

push frequency: 100ms */ - public String orderbookLevel5(String symbol, OrderbookLevel5Event.Callback callback); + String orderbookLevel5(String symbol, OrderbookLevel5Event.Callback callback); - /** Symbol Snapshot Get symbol snapshot. push frequency: 5000ms */ - public String symbolSnapshot(String symbol, SymbolSnapshotEvent.Callback callback); + /** + * Symbol Snapshot + * + *

Get symbol snapshot. + * + *

push frequency: 5000ms + */ + String symbolSnapshot(String symbol, SymbolSnapshotEvent.Callback callback); /** - * Get Ticker(not recommended) 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 + * Get Ticker(not recommended) + * + *

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 */ - public String tickerV1(String symbol, TickerV1Event.Callback callback); + String tickerV1(String symbol, TickerV1Event.Callback callback); /** - * Get Ticker V2 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 + * Get Ticker V2 + * + *

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 */ - public String tickerV2(String symbol, TickerV2Event.Callback callback); + String tickerV2(String symbol, TickerV2Event.Callback callback); /** Unsubscribe from topics */ - public void unSubscribe(String id); + void unSubscribe(String id); /** Start websocket */ - public void start(); + void start(); /** Stop websocket */ - public void stop(); + void stop(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWs.java index 6161379a..7382b77b 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWs.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWs.java @@ -5,26 +5,31 @@ public interface MarginPrivateWs { /** - * 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. push - * frequency: once every 4s + * 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. + * + *

push frequency: once every 4s */ - public String crossMarginPosition(CrossMarginPositionEvent.Callback callback); + String crossMarginPosition(CrossMarginPositionEvent.Callback callback); /** - * 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. push - * frequency: real time + * 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. + * + *

push frequency: real time */ - public String isolatedMarginPosition( - String symbol, IsolatedMarginPositionEvent.Callback callback); + String isolatedMarginPosition(String symbol, IsolatedMarginPositionEvent.Callback callback); /** Unsubscribe from topics */ - public void unSubscribe(String id); + void unSubscribe(String id); /** Start websocket */ - public void start(); + void start(); /** Stop websocket */ - public void stop(); + void stop(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWs.java index 007a5848..cc1316ee 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWs.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWs.java @@ -5,24 +5,31 @@ public interface MarginPublicWs { /** - * Index Price 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 + * Index Price + * + *

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 */ - public String indexPrice(String[] symbol, IndexPriceEvent.Callback callback); + String indexPrice(String[] symbol, IndexPriceEvent.Callback callback); /** - * Mark Price 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 + * Mark Price + * + *

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 */ - public String markPrice(String[] symbol, MarkPriceEvent.Callback callback); + String markPrice(String[] symbol, MarkPriceEvent.Callback callback); /** Unsubscribe from topics */ - public void unSubscribe(String id); + void unSubscribe(String id); /** Start websocket */ - public void start(); + void start(); /** Stop websocket */ - public void stop(); + void stop(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWs.java index 06694818..4d84837a 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWs.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWs.java @@ -5,35 +5,49 @@ public interface SpotPrivateWs { /** - * Get Account Balance You will receive this message when an account balance changes. The message - * contains the details of the change. push frequency: real-time + * Get Account Balance + * + *

You will receive this message when an account balance changes. The message contains the + * details of the change. + * + *

push frequency: real-time */ - public String account(AccountEvent.Callback callback); + String account(AccountEvent.Callback callback); /** - * Get Order(V1) This topic will push all change events of your orders. push frequency: real-time + * Get Order(V1) + * + *

This topic will push all change events of your orders. + * + *

push frequency: real-time */ - public String orderV1(OrderV1Event.Callback callback); + String orderV1(OrderV1Event.Callback callback); /** - * Get Order(V2) This topic will push all change events of your orders. Compared with v1, v2 adds - * an Order Status: \"new\", there is no difference in push speed push frequency: - * real-time + * Get Order(V2) + * + *

This topic will push all change events of your orders. Compared with v1, v2 adds an Order + * Status: \"new\", there is no difference in push speed + * + *

push frequency: real-time */ - public String orderV2(OrderV2Event.Callback callback); + String orderV2(OrderV2Event.Callback callback); /** - * Get Stop Order This topic will push all change events of your stop orders. push frequency: - * real-time + * Get Stop Order + * + *

This topic will push all change events of your stop orders. + * + *

push frequency: real-time */ - public String stopOrder(StopOrderEvent.Callback callback); + String stopOrder(StopOrderEvent.Callback callback); /** Unsubscribe from topics */ - public void unSubscribe(String id); + void unSubscribe(String id); /** Start websocket */ - public void start(); + void start(); /** Stop websocket */ - public void stop(); + void stop(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWs.java index 4c170e82..c6a12740 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWs.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWs.java @@ -5,86 +5,126 @@ public interface SpotPublicWs { /** - * Get All Tickers Subscribe to this topic to get pushes on all market symbol BBO changes. push - * frequency: once every 100ms + * Get All Tickers + * + *

Subscribe to this topic to get pushes on all market symbol BBO changes. + * + *

push frequency: once every 100ms */ - public String allTickers(AllTickersEvent.Callback callback); + String allTickers(AllTickersEvent.Callback callback); /** - * Get Call Auction Info Subscribe to this topic to get the specified symbol call auction info. - * push frequency: once every 100ms + * Get Call Auction Info + * + *

Subscribe to this topic to get the specified symbol call auction info. + * + *

push frequency: once every 100ms */ - public String callAuctionInfo(String symbol, CallAuctionInfoEvent.Callback callback); + String callAuctionInfo(String symbol, CallAuctionInfoEvent.Callback callback); /** - * 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 + * 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 */ - public String callAuctionOrderbookLevel50( + String callAuctionOrderbookLevel50( String symbol, CallAuctionOrderbookLevel50Event.Callback callback); - /** Klines Subscribe to this topic to get K-Line data. push frequency: real-time */ - public String klines(String symbol, String type, KlinesEvent.Callback callback); + /** + * Klines + * + *

Subscribe to this topic to get K-Line data. + * + *

push frequency: real-time + */ + String klines(String symbol, String type, KlinesEvent.Callback callback); /** - * Market Snapshot Subscribe to this topic to get snapshot data for the entire market. push - * frequency: once every 2s + * Market Snapshot + * + *

Subscribe to this topic to get snapshot data for the entire market. + * + *

push frequency: once every 2s */ - public String marketSnapshot(String market, MarketSnapshotEvent.Callback callback); + String marketSnapshot(String market, MarketSnapshotEvent.Callback callback); /** - * Orderbook - Increment 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 + * Orderbook - Increment + * + *

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 */ - public String orderbookIncrement(String[] symbol, OrderbookIncrementEvent.Callback callback); + String orderbookIncrement(String[] symbol, OrderbookIncrementEvent.Callback callback); /** - * 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 push frequency: - * once every 10ms + * 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 + * + *

push frequency: once every 10ms */ - public String orderbookLevel1(String[] symbol, OrderbookLevel1Event.Callback callback); + String orderbookLevel1(String[] symbol, OrderbookLevel1Event.Callback callback); /** - * Orderbook - Level50 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 + * Orderbook - Level50 + * + *

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 */ - public String orderbookLevel50(String[] symbol, OrderbookLevel50Event.Callback callback); + String orderbookLevel50(String[] symbol, OrderbookLevel50Event.Callback callback); /** - * 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 push frequency: - * once every 100ms + * 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 + * + *

push frequency: once every 100ms */ - public String orderbookLevel5(String[] symbol, OrderbookLevel5Event.Callback callback); + String orderbookLevel5(String[] symbol, OrderbookLevel5Event.Callback callback); /** - * Symbol Snapshot Subscribe to get snapshot data for a single symbol. push frequency: once every - * 2s + * Symbol Snapshot + * + *

Subscribe to get snapshot data for a single symbol. + * + *

push frequency: once every 2s */ - public String symbolSnapshot(String symbol, SymbolSnapshotEvent.Callback callback); + String symbolSnapshot(String symbol, SymbolSnapshotEvent.Callback callback); /** - * Get Ticker Subscribe to this topic to get specified symbol pushes on BBO changes. push - * frequency: once every 100ms + * Get Ticker + * + *

Subscribe to this topic to get specified symbol pushes on BBO changes. + * + *

push frequency: once every 100ms */ - public String ticker(String[] symbol, TickerEvent.Callback callback); + String ticker(String[] symbol, TickerEvent.Callback callback); /** - * Trade Subscribe to this topic to get Level 3 matching event data flows. A topic supports up to - * 100 symbols. push frequency: real-time + * Trade + * + *

Subscribe to this topic to get Level 3 matching event data flows. A topic supports up to 100 + * symbols. + * + *

push frequency: real-time */ - public String trade(String[] symbol, TradeEvent.Callback callback); + String trade(String[] symbol, TradeEvent.Callback callback); /** Unsubscribe from topics */ - public void unSubscribe(String id); + void unSubscribe(String id); /** Start websocket */ - public void start(); + void start(); /** Stop websocket */ - public void stop(); + void stop(); } From 8330006e07d84162989e7bd5e4c81c51541dc471 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Tue, 15 Jul 2025 14:40:22 +0800 Subject: [PATCH 21/39] feat(java): add some tests for infra --- sdk/java/pom.xml | 6 + .../futuresprivate/FuturesPrivateWs.java | 4 +- .../infra/DefaultWebsocketTransport.java | 2 + .../sdk/e2e/rest/account/AccountApiTest.java | 355 +++++++++++++++++- .../sdk/e2e/rest/spot/OrderTest.java | 146 +++++++ .../universal/sdk/e2e/ws/spot/PublicTest.java | 128 +++++++ 6 files changed, 637 insertions(+), 4 deletions(-) create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/spot/OrderTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/ws/spot/PublicTest.java diff --git a/sdk/java/pom.xml b/sdk/java/pom.xml index df803358..46142b3d 100644 --- a/sdk/java/pom.xml +++ b/sdk/java/pom.xml @@ -75,6 +75,12 @@ ${slf4j.version} test + + org.mockito + mockito-core + 5.7.0 + test + diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWs.java index b27a4af3..1c1a017b 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWs.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWs.java @@ -2,8 +2,6 @@ package com.kucoin.universal.sdk.generate.futures.futuresprivate; -import java.util.concurrent.CompletableFuture; - public interface FuturesPrivateWs { /** @@ -50,7 +48,7 @@ public interface FuturesPrivateWs { * *

push frequency: real-time */ - CompletableFuture marginMode(MarginModeEvent.Callback callback); + String marginMode(MarginModeEvent.Callback callback); /** * Order change pushes. diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java index a984f762..ae216a5a 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java @@ -72,6 +72,7 @@ public void stop() { safeClose("shutdown"); scheduler.shutdownNow(); tokenProvider.close(); + log.info("websocket closed"); } @Override @@ -146,6 +147,7 @@ public void onFailure(WebSocket w, Throwable t, Response r) { connected.set(true); listener.onEvent(WebSocketEvent.CONNECTED, ""); + log.info("Websocket connected"); } catch (Exception e) { safeClose("dial-error"); throw new RuntimeException(e); diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/account/AccountApiTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/account/AccountApiTest.java index ebc25567..e33542b5 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/account/AccountApiTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/account/AccountApiTest.java @@ -7,8 +7,14 @@ import com.kucoin.universal.sdk.model.ClientOption; import com.kucoin.universal.sdk.model.Constants; import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; import lombok.extern.slf4j.Slf4j; +import okhttp3.*; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; @Slf4j public class AccountApiTest { @@ -24,7 +30,27 @@ public static void setUp() { String secret = System.getenv("API_SECRET"); String passphrase = System.getenv("API_PASSPHRASE"); - TransportOption httpTransport = TransportOption.builder().build(); + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); ClientOption clientOpt = ClientOption.builder() @@ -40,4 +66,331 @@ public static void setUp() { Client client = new DefaultClient(clientOpt); api = client.getRestService().getAccountService().getAccountApi(); } + + /** getAccountInfo Get Account Summary Info /api/v2/user-info */ + @Test + public void testGetAccountInfo() throws Exception { + GetAccountInfoResp resp = api.getAccountInfo(); + Assertions.assertNotNull(resp.getLevel()); + Assertions.assertNotNull(resp.getSubQuantity()); + Assertions.assertNotNull(resp.getSpotSubQuantity()); + Assertions.assertNotNull(resp.getMarginSubQuantity()); + Assertions.assertNotNull(resp.getFuturesSubQuantity()); + Assertions.assertNotNull(resp.getOptionSubQuantity()); + Assertions.assertNotNull(resp.getMaxSubQuantity()); + Assertions.assertNotNull(resp.getMaxDefaultSubQuantity()); + Assertions.assertNotNull(resp.getMaxSpotSubQuantity()); + Assertions.assertNotNull(resp.getMaxMarginSubQuantity()); + Assertions.assertNotNull(resp.getMaxFuturesSubQuantity()); + Assertions.assertNotNull(resp.getMaxOptionSubQuantity()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getApikeyInfo Get Apikey Info /api/v1/user/api-key */ + @Test + public void testGetApikeyInfo() throws Exception { + GetApikeyInfoResp resp = api.getApikeyInfo(); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getApiKey()); + Assertions.assertNotNull(resp.getApiVersion()); + Assertions.assertNotNull(resp.getPermission()); + Assertions.assertNotNull(resp.getIpWhitelist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getUid()); + Assertions.assertNotNull(resp.getIsMaster()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSpotAccountType Get Account Type - Spot /api/v1/hf/accounts/opened */ + @Test + public void testGetSpotAccountType() throws Exception { + GetSpotAccountTypeResp resp = api.getSpotAccountType(); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSpotAccountList Get Account List - Spot /api/v1/accounts */ + @Test + public void testGetSpotAccountList() throws Exception { + GetSpotAccountListReq.GetSpotAccountListReqBuilder builder = GetSpotAccountListReq.builder(); + builder.type(GetSpotAccountListReq.TypeEnum.MAIN); + GetSpotAccountListReq req = builder.build(); + GetSpotAccountListResp resp = api.getSpotAccountList(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getBalance()); + Assertions.assertNotNull(item.getAvailable()); + Assertions.assertNotNull(item.getHolds()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSpotAccountDetail Get Account Detail - Spot /api/v1/accounts/{accountId} */ + @Test + public void testGetSpotAccountDetail() throws Exception { + GetSpotAccountDetailReq.GetSpotAccountDetailReqBuilder builder = + GetSpotAccountDetailReq.builder(); + builder.accountId("6582f6a48c171f000769b867"); + GetSpotAccountDetailReq req = builder.build(); + GetSpotAccountDetailResp resp = api.getSpotAccountDetail(req); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getBalance()); + Assertions.assertNotNull(resp.getAvailable()); + Assertions.assertNotNull(resp.getHolds()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getCrossMarginAccount Get Account - Cross Margin /api/v3/margin/accounts */ + @Test + public void testGetCrossMarginAccount() throws Exception { + GetCrossMarginAccountReq.GetCrossMarginAccountReqBuilder builder = + GetCrossMarginAccountReq.builder(); + builder + .quoteCurrency(GetCrossMarginAccountReq.QuoteCurrencyEnum.USDT) + .queryType(GetCrossMarginAccountReq.QueryTypeEnum.MARGIN); + GetCrossMarginAccountReq req = builder.build(); + GetCrossMarginAccountResp resp = api.getCrossMarginAccount(req); + Assertions.assertNotNull(resp.getTotalAssetOfQuoteCurrency()); + Assertions.assertNotNull(resp.getTotalLiabilityOfQuoteCurrency()); + Assertions.assertNotNull(resp.getDebtRatio()); + Assertions.assertNotNull(resp.getStatus()); + resp.getAccounts() + .forEach( + item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getTotal()); + Assertions.assertNotNull(item.getAvailable()); + Assertions.assertNotNull(item.getHold()); + Assertions.assertNotNull(item.getLiability()); + Assertions.assertNotNull(item.getMaxBorrowSize()); + Assertions.assertNotNull(item.getBorrowEnabled()); + Assertions.assertNotNull(item.getTransferInEnabled()); + Assertions.assertNotNull(item.getLiabilityPrincipal()); + Assertions.assertNotNull(item.getLiabilityInterest()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getIsolatedMarginAccount Get Account - Isolated Margin /api/v3/isolated/accounts */ + @Test + public void testGetIsolatedMarginAccount() throws Exception { + GetIsolatedMarginAccountReq.GetIsolatedMarginAccountReqBuilder builder = + GetIsolatedMarginAccountReq.builder(); + builder + .symbol("BTC-USDT") + .quoteCurrency(GetIsolatedMarginAccountReq.QuoteCurrencyEnum.USDT) + .queryType(GetIsolatedMarginAccountReq.QueryTypeEnum.ISOLATED); + GetIsolatedMarginAccountReq req = builder.build(); + GetIsolatedMarginAccountResp resp = api.getIsolatedMarginAccount(req); + Assertions.assertNotNull(resp.getTotalAssetOfQuoteCurrency()); + Assertions.assertNotNull(resp.getTotalLiabilityOfQuoteCurrency()); + Assertions.assertNotNull(resp.getTimestamp()); + resp.getAssets() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getDebtRatio()); + Assertions.assertNotNull(item.getBaseAsset()); + Assertions.assertNotNull(item.getQuoteAsset()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getFuturesAccount Get Account - Futures /api/v1/account-overview */ + @Test + public void testGetFuturesAccount() throws Exception { + GetFuturesAccountReq.GetFuturesAccountReqBuilder builder = GetFuturesAccountReq.builder(); + builder.currency("XBT"); + GetFuturesAccountReq req = builder.build(); + GetFuturesAccountResp resp = api.getFuturesAccount(req); + Assertions.assertNotNull(resp.getAccountEquity()); + Assertions.assertNotNull(resp.getUnrealisedPNL()); + Assertions.assertNotNull(resp.getMarginBalance()); + Assertions.assertNotNull(resp.getPositionMargin()); + Assertions.assertNotNull(resp.getOrderMargin()); + Assertions.assertNotNull(resp.getFrozenFunds()); + Assertions.assertNotNull(resp.getAvailableBalance()); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getRiskRatio()); + Assertions.assertNotNull(resp.getMaxWithdrawAmount()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSpotLedger Get Account Ledgers - Spot/Margin /api/v1/accounts/ledgers */ + @Test + public void testGetSpotLedger() throws Exception { + GetSpotLedgerReq.GetSpotLedgerReqBuilder builder = GetSpotLedgerReq.builder(); + builder.currency("USDT").direction(GetSpotLedgerReq.DirectionEnum.IN); + GetSpotLedgerReq req = builder.build(); + GetSpotLedgerResp resp = api.getSpotLedger(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getBalance()); + Assertions.assertNotNull(item.getAccountType()); + Assertions.assertNotNull(item.getBizType()); + Assertions.assertNotNull(item.getDirection()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getContext()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSpotHFLedger Get Account Ledgers - Trade_hf /api/v1/hf/accounts/ledgers */ + @Test + public void testGetSpotHFLedger() throws Exception { + GetSpotHFLedgerReq.GetSpotHFLedgerReqBuilder builder = GetSpotHFLedgerReq.builder(); + builder.currency("USDT").bizType(GetSpotHFLedgerReq.BizTypeEnum.TRANSFER); + GetSpotHFLedgerReq req = builder.build(); + GetSpotHFLedgerResp resp = api.getSpotHFLedger(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getBalance()); + Assertions.assertNotNull(item.getAccountType()); + Assertions.assertNotNull(item.getBizType()); + Assertions.assertNotNull(item.getDirection()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getContext()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getMarginHFLedger Get Account Ledgers - Margin_hf /api/v3/hf/margin/account/ledgers */ + @Test + public void testGetMarginHFLedger() throws Exception { + GetMarginHFLedgerReq.GetMarginHFLedgerReqBuilder builder = GetMarginHFLedgerReq.builder(); + builder.currency("USDT"); + GetMarginHFLedgerReq req = builder.build(); + GetMarginHFLedgerResp resp = api.getMarginHFLedger(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getBalance()); + Assertions.assertNotNull(item.getAccountType()); + Assertions.assertNotNull(item.getBizType()); + Assertions.assertNotNull(item.getDirection()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getContext()); + Assertions.assertNotNull(item.getTax()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getFuturesLedger Get Account Ledgers - Futures /api/v1/transaction-history */ + @Test + public void testGetFuturesLedger() throws Exception { + GetFuturesLedgerReq.GetFuturesLedgerReqBuilder builder = GetFuturesLedgerReq.builder(); + builder.currency("USDT"); + GetFuturesLedgerReq req = builder.build(); + GetFuturesLedgerResp resp = api.getFuturesLedger(req); + resp.getDataList() + .forEach( + item -> { + Assertions.assertNotNull(item.getTime()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getAccountEquity()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getOffset()); + Assertions.assertNotNull(item.getCurrency()); + }); + + Assertions.assertNotNull(resp.getHasMore()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getMarginAccountDetail Get Account Detail - Margin /api/v1/margin/account */ + @Test + public void testGetMarginAccountDetail() throws Exception { + GetMarginAccountDetailResp resp = api.getMarginAccountDetail(); + Assertions.assertNotNull(resp.getDebtRatio()); + resp.getAccounts() + .forEach( + item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getTotalBalance()); + Assertions.assertNotNull(item.getAvailableBalance()); + Assertions.assertNotNull(item.getHoldBalance()); + Assertions.assertNotNull(item.getLiability()); + Assertions.assertNotNull(item.getMaxBorrowSize()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * getIsolatedMarginAccountListV1 Get Account List - Isolated Margin - V1 + * /api/v1/isolated/accounts + */ + @Test + public void testGetIsolatedMarginAccountListV1() throws Exception { + GetIsolatedMarginAccountListV1Req.GetIsolatedMarginAccountListV1ReqBuilder builder = + GetIsolatedMarginAccountListV1Req.builder(); + builder.balanceCurrency(GetIsolatedMarginAccountListV1Req.BalanceCurrencyEnum.BTC); + GetIsolatedMarginAccountListV1Req req = builder.build(); + GetIsolatedMarginAccountListV1Resp resp = api.getIsolatedMarginAccountListV1(req); + Assertions.assertNotNull(resp.getTotalConversionBalance()); + Assertions.assertNotNull(resp.getLiabilityConversionBalance()); + resp.getAssets() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getDebtRatio()); + Assertions.assertNotNull(item.getBaseAsset()); + Assertions.assertNotNull(item.getQuoteAsset()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * getIsolatedMarginAccountDetailV1 Get Account Detail - Isolated Margin - V1 + * /api/v1/isolated/account/{symbol} + */ + @Test + public void testGetIsolatedMarginAccountDetailV1() throws Exception { + GetIsolatedMarginAccountDetailV1Req.GetIsolatedMarginAccountDetailV1ReqBuilder builder = + GetIsolatedMarginAccountDetailV1Req.builder(); + builder.symbol("BTC-USDT"); + GetIsolatedMarginAccountDetailV1Req req = builder.build(); + GetIsolatedMarginAccountDetailV1Resp resp = api.getIsolatedMarginAccountDetailV1(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getDebtRatio()); + Assertions.assertNotNull(resp.getBaseAsset()); + Assertions.assertNotNull(resp.getQuoteAsset()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } } diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/spot/OrderTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/spot/OrderTest.java new file mode 100644 index 00000000..31b2d172 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/spot/OrderTest.java @@ -0,0 +1,146 @@ +package com.kucoin.universal.sdk.e2e.rest.spot; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.Client; +import com.kucoin.universal.sdk.api.DefaultClient; +import com.kucoin.universal.sdk.generate.spot.order.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; +import java.util.UUID; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class OrderTest { + + private static OrderApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + Client client = new DefaultClient(clientOpt); + api = client.getRestService().getSpotService().getOrderApi(); + } + + /** addOrder Add Order /api/v1/hf/orders */ + @Test + public void testAddOrder() throws Exception { + AddOrderReq.AddOrderReqBuilder builder = AddOrderReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .side(AddOrderReq.SideEnum.BUY) + .symbol("BTC-USDT") + .type(AddOrderReq.TypeEnum.LIMIT) + .remark("test") + .price("1") + .size("2"); + AddOrderReq req = builder.build(); + AddOrderResp resp = api.addOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + log.info("resp: {}", resp.toString()); + } + + /** cancelOrderByClientOid Cancel Order By ClientOid /api/v1/hf/orders/client-order/{clientOid} */ + @Test + public void testCancelOrderByClientOid() throws Exception { + CancelOrderByClientOidReq.CancelOrderByClientOidReqBuilder builder = + CancelOrderByClientOidReq.builder(); + builder.clientOid("120617f6-20c0-4317-9ba4-b1b07c4cdf49").symbol("BTC-USDT"); + CancelOrderByClientOidReq req = builder.build(); + CancelOrderByClientOidResp resp = api.cancelOrderByClientOid(req); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getOrderByOrderId Get Order By OrderId /api/v1/hf/orders/{orderId} */ + @Test + public void testGetOrderByOrderId() throws Exception { + GetOrderByOrderIdReq.GetOrderByOrderIdReqBuilder builder = GetOrderByOrderIdReq.builder(); + builder.symbol("BTC-USDT").orderId("6874ca31c402b70007f7f1de"); + GetOrderByOrderIdReq req = builder.build(); + GetOrderByOrderIdResp resp = api.getOrderByOrderId(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getOpType()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getFunds()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getDealFunds()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getFeeCurrency()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getVisibleSize()); + Assertions.assertNotNull(resp.getCancelAfter()); + Assertions.assertNotNull(resp.getChannel()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getCancelExist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getLastUpdatedAt()); + Assertions.assertNotNull(resp.getTradeType()); + Assertions.assertNotNull(resp.getInOrderBook()); + Assertions.assertNotNull(resp.getCancelledSize()); + Assertions.assertNotNull(resp.getCancelledFunds()); + Assertions.assertNotNull(resp.getRemainSize()); + Assertions.assertNotNull(resp.getRemainFunds()); + Assertions.assertNotNull(resp.getTax()); + Assertions.assertNotNull(resp.getActive()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/ws/spot/PublicTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/ws/spot/PublicTest.java new file mode 100644 index 00000000..70274b55 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/ws/spot/PublicTest.java @@ -0,0 +1,128 @@ +package com.kucoin.universal.sdk.e2e.ws.spot; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.Client; +import com.kucoin.universal.sdk.api.DefaultClient; +import com.kucoin.universal.sdk.generate.spot.spotpublic.SpotPublicWs; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import com.kucoin.universal.sdk.model.WebSocketClientOption; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CountDownLatch; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class PublicTest { + + private static SpotPublicWs api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + WebSocketClientOption webSocketClientOption = WebSocketClientOption.defaults(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(TransportOption.defaults()) + .websocketClientOption(webSocketClientOption) + .build(); + + Client client = new DefaultClient(clientOpt); + api = client.getWsService().newSpotPublicWS(); + api.start(); + } + + @AfterAll + public static void tearDown() { + api.stop(); + } + @Test + public void testKlines() throws Exception { + CountDownLatch gotEvent = new CountDownLatch(10); + CompletableFuture.supplyAsync( + () -> + api.klines( + "BTC-USDT", "1min", + (a, b, event) -> { + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)).join(); + } + + + @Test + public void testOrderbookIncrement() throws Exception { + CountDownLatch gotEvent = new CountDownLatch(10); + CompletableFuture.supplyAsync( + () -> + api.orderbookIncrement( + new String[]{"BTC-USDT", "ETH-USDT"}, + (a, b, event) -> { + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)).join(); + } + + + @Test + public void testMarketSnapshot() throws Exception { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.marketSnapshot( + "BTC-USDT", + (a, b, event) -> { + Assertions.assertNotNull(event.getSequence()); + Assertions.assertNotNull(event.getData()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)).join(); + } +} From ce67ff11b1a632f07b1aac5b85eaa6935f6854ec Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Mon, 21 Jul 2025 15:58:31 +0800 Subject: [PATCH 22/39] feat(java): add some tests for java sdk --- sdk/java/script/release_test.sh | 0 ...ltClient.java => DefaultKucoinClient.java} | 6 +- .../api/{Client.java => KucoinClient.java} | 2 +- .../sdk/e2e/rest/account/AccountApiTest.java | 8 +- .../sdk/e2e/rest/spot/OrderTest.java | 8 +- .../universal/sdk/e2e/ws/spot/PublicTest.java | 103 +++++++++--------- 6 files changed, 65 insertions(+), 62 deletions(-) create mode 100644 sdk/java/script/release_test.sh rename sdk/java/src/main/java/com/kucoin/universal/sdk/api/{DefaultClient.java => DefaultKucoinClient.java} (83%) rename sdk/java/src/main/java/com/kucoin/universal/sdk/api/{Client.java => KucoinClient.java} (91%) diff --git a/sdk/java/script/release_test.sh b/sdk/java/script/release_test.sh new file mode 100644 index 00000000..e69de29b diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultClient.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultKucoinClient.java similarity index 83% rename from sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultClient.java rename to sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultKucoinClient.java index f1c82219..1135489e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultClient.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultKucoinClient.java @@ -9,8 +9,8 @@ TODO */ -/** DefaultClient provides the default implementation of the {@link Client} interface. */ -public final class DefaultClient implements Client { +/** DefaultClient provides the default implementation of the {@link KucoinClient} interface. */ +public final class DefaultKucoinClient implements KucoinClient { /** REST-side facade. */ private final KucoinRestService restImpl; @@ -18,7 +18,7 @@ public final class DefaultClient implements Client { /** WebSocket-side facade. */ private final KucoinWSService wsImpl; - public DefaultClient(ClientOption option) { + public DefaultKucoinClient(ClientOption option) { this.restImpl = new DefaultKucoinRestAPIImpl(option); this.wsImpl = new DefaultKucoinWsImpl(option); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/api/Client.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/KucoinClient.java similarity index 91% rename from sdk/java/src/main/java/com/kucoin/universal/sdk/api/Client.java rename to sdk/java/src/main/java/com/kucoin/universal/sdk/api/KucoinClient.java index 6c200b06..c2d43e75 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/api/Client.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/KucoinClient.java @@ -1,7 +1,7 @@ package com.kucoin.universal.sdk.api; /** Client interface defines the methods to get REST and WebSocket services. */ -public interface Client { +public interface KucoinClient { /** * Get RESTful service. diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/account/AccountApiTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/account/AccountApiTest.java index e33542b5..e06cdfaf 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/account/AccountApiTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/account/AccountApiTest.java @@ -1,8 +1,8 @@ package com.kucoin.universal.sdk.e2e.rest.account; import com.fasterxml.jackson.databind.ObjectMapper; -import com.kucoin.universal.sdk.api.Client; -import com.kucoin.universal.sdk.api.DefaultClient; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; import com.kucoin.universal.sdk.generate.account.account.*; import com.kucoin.universal.sdk.model.ClientOption; import com.kucoin.universal.sdk.model.Constants; @@ -63,8 +63,8 @@ public Response intercept(@NotNull Chain chain) throws IOException { .transportOption(httpTransport) .build(); - Client client = new DefaultClient(clientOpt); - api = client.getRestService().getAccountService().getAccountApi(); + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getAccountService().getAccountApi(); } /** getAccountInfo Get Account Summary Info /api/v2/user-info */ diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/spot/OrderTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/spot/OrderTest.java index 31b2d172..1b51e21f 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/spot/OrderTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/spot/OrderTest.java @@ -1,8 +1,8 @@ package com.kucoin.universal.sdk.e2e.rest.spot; import com.fasterxml.jackson.databind.ObjectMapper; -import com.kucoin.universal.sdk.api.Client; -import com.kucoin.universal.sdk.api.DefaultClient; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; import com.kucoin.universal.sdk.generate.spot.order.*; import com.kucoin.universal.sdk.model.ClientOption; import com.kucoin.universal.sdk.model.Constants; @@ -66,8 +66,8 @@ public Response intercept(@NotNull Chain chain) throws IOException { .transportOption(httpTransport) .build(); - Client client = new DefaultClient(clientOpt); - api = client.getRestService().getSpotService().getOrderApi(); + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getSpotService().getOrderApi(); } /** addOrder Add Order /api/v1/hf/orders */ diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/ws/spot/PublicTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/ws/spot/PublicTest.java index 70274b55..68fff494 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/ws/spot/PublicTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/ws/spot/PublicTest.java @@ -1,8 +1,8 @@ package com.kucoin.universal.sdk.e2e.ws.spot; import com.fasterxml.jackson.databind.ObjectMapper; -import com.kucoin.universal.sdk.api.Client; -import com.kucoin.universal.sdk.api.DefaultClient; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; import com.kucoin.universal.sdk.generate.spot.spotpublic.SpotPublicWs; import com.kucoin.universal.sdk.model.ClientOption; import com.kucoin.universal.sdk.model.Constants; @@ -44,8 +44,8 @@ public static void setUp() { .websocketClientOption(webSocketClientOption) .build(); - Client client = new DefaultClient(clientOpt); - api = client.getWsService().newSpotPublicWS(); + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getWsService().newSpotPublicWS(); api.start(); } @@ -53,53 +53,55 @@ public static void setUp() { public static void tearDown() { api.stop(); } - @Test - public void testKlines() throws Exception { - CountDownLatch gotEvent = new CountDownLatch(10); - CompletableFuture.supplyAsync( - () -> - api.klines( - "BTC-USDT", "1min", - (a, b, event) -> { - log.info("event: {}", event.toString()); - gotEvent.countDown(); - })) - .thenApply( - id -> { - try { - gotEvent.await(); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - return id; - }) - .thenAccept(id -> api.unSubscribe(id)).join(); - } + @Test + public void testKlines() throws Exception { + CountDownLatch gotEvent = new CountDownLatch(10); + CompletableFuture.supplyAsync( + () -> + api.klines( + "BTC-USDT", + "1min", + (a, b, event) -> { + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } - @Test - public void testOrderbookIncrement() throws Exception { - CountDownLatch gotEvent = new CountDownLatch(10); - CompletableFuture.supplyAsync( - () -> - api.orderbookIncrement( - new String[]{"BTC-USDT", "ETH-USDT"}, - (a, b, event) -> { - log.info("event: {}", event.toString()); - gotEvent.countDown(); - })) - .thenApply( - id -> { - try { - gotEvent.await(); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - return id; - }) - .thenAccept(id -> api.unSubscribe(id)).join(); - } - + @Test + public void testOrderbookIncrement() throws Exception { + CountDownLatch gotEvent = new CountDownLatch(10); + CompletableFuture.supplyAsync( + () -> + api.orderbookIncrement( + new String[] {"BTC-USDT", "ETH-USDT"}, + (a, b, event) -> { + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } @Test public void testMarketSnapshot() throws Exception { @@ -123,6 +125,7 @@ public void testMarketSnapshot() throws Exception { } return id; }) - .thenAccept(id -> api.unSubscribe(id)).join(); + .thenAccept(id -> api.unSubscribe(id)) + .join(); } } From d03fed19ecba5cc8c9d2f9a02f89b04bb70421ae Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Tue, 22 Jul 2025 09:31:12 +0800 Subject: [PATCH 23/39] feat(java): add some tests for rest api --- sdk/java/pom.xml | 19 ++- .../sdk/internal/infra/DefaultTransport.java | 1 + .../universal/sdk/model/TransportOption.java | 28 ++-- .../sdk/test/robustness/ResourceLeakStat.java | 94 +++++++++++++ .../test/robustness/rest/ReliabilityTest.java | 131 ++++++++++++++++++ .../test/robustness/rest/ResourceTest.java | 129 +++++++++++++++++ 6 files changed, 382 insertions(+), 20 deletions(-) create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ResourceLeakStat.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/rest/ReliabilityTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/rest/ResourceTest.java diff --git a/sdk/java/pom.xml b/sdk/java/pom.xml index 46142b3d..8672ba02 100644 --- a/sdk/java/pom.xml +++ b/sdk/java/pom.xml @@ -75,12 +75,6 @@ ${slf4j.version} test - - org.mockito - mockito-core - 5.7.0 - test - @@ -102,6 +96,19 @@ 8 + + org.apache.maven.plugins + maven-source-plugin + 3.3.0 + + + attach-sources + + jar + + + + com.diffplug.spotless spotless-maven-plugin diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java index f9b0be67..d3590dce 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java @@ -78,6 +78,7 @@ private OkHttpClient buildOkHttp(TransportOption o) { // interceptors o.interceptors().forEach(b::addInterceptor); + o.eventListener().ifPresent(b::eventListener); return b.build(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/TransportOption.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/TransportOption.java index e77e0988..2e274a33 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/TransportOption.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/TransportOption.java @@ -6,6 +6,7 @@ import java.util.List; import java.util.Optional; import lombok.*; +import okhttp3.EventListener; import okhttp3.Interceptor; /** TransportOption holds configurations for HTTP client behavior. */ @@ -25,11 +26,11 @@ public final class TransportOption { /** Idle connection eviction threshold. */ @Builder.Default private final Duration keepAliveDuration = Duration.ofSeconds(30); - /** Global dispatcher limit (default 64). */ - @Builder.Default private final int maxRequests = 64; + /** Global dispatcher limit (default 256). */ + @Builder.Default private final int maxRequests = 256; - /** Per-host dispatcher limit (default 5). */ - @Builder.Default private final int maxRequestsPerHost = 5; + /** Per-host dispatcher limit (default 32). */ + @Builder.Default private final int maxRequestsPerHost = 32; /* ---------- timeout ---------- */ @@ -45,30 +46,29 @@ public final class TransportOption { /* ----------- proxy ------------ */ - /** Pre-configured proxy; {@code null} means “use JVM default”. */ - private final Proxy proxy; + /** Proxy; {@code null} means "no proxy". */ + @Builder.Default private final Proxy proxy = null; /* ---------- retry / redirect ---------- */ @Builder.Default private final boolean retryOnConnectionFailure = true; - /** SDK-level retry attempts for idempotent requests. */ - @Builder.Default private final int maxRetries = 3; - - /** Delay between retries. */ - @Builder.Default private final Duration retryDelay = Duration.ofSeconds(2); - - /* ---------- interceptors ---------- */ + /* ---------- interceptors&listener ---------- */ /** Application interceptors – executed before routing / retries. */ @Singular("interceptor") private final List interceptors; - /* ---------- convenience getters ---------- */ + /** Optional event listener for connection lifecycle logging, etc. */ + @Builder.Default private final EventListener eventListener = null; public Optional proxy() { return Optional.ofNullable(proxy); } + public Optional eventListener() { + return Optional.ofNullable(eventListener); + } + public List interceptors() { return interceptors == null ? Collections.emptyList() diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ResourceLeakStat.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ResourceLeakStat.java new file mode 100644 index 00000000..88ef9a82 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ResourceLeakStat.java @@ -0,0 +1,94 @@ +package com.kucoin.universal.sdk.test.robustness; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.lang.management.GarbageCollectorMXBean; +import java.lang.management.ManagementFactory; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class ResourceLeakStat { + + public static void stat(String label) { + long memBytes = getUsedMemory(); + int threads = Thread.activeCount(); + long fds = getFdCount(); + long tcp = getTcpConnCount(); + GcInfo gc = getGcInfo(); + + log.info( + "[{}] Mem: {} MB, Threads: {}, FDs: {}, TCP: {}, GC: count={}, time={}ms", + label, + memBytes / 1024.0 / 1024, + threads, + fds, + tcp, + gc.count, + gc.time); + } + + private static long getUsedMemory() { + Runtime rt = Runtime.getRuntime(); + return rt.totalMemory() - rt.freeMemory(); + } + + private static long getFdCount() { + try { + String pid = getPid(); + Process p = new ProcessBuilder("lsof", "-p", pid).start(); + return readLines(p); + } catch (Exception e) { + log.warn("FD count failed: {}", e.getMessage()); + return -1; + } + } + + public static long getTcpConnCount() { + try { + String pid = getPid(); + String[] cmd = {"sh", "-c", "lsof -iTCP -n -P | grep " + pid + " | wc -l"}; + Process process = new ProcessBuilder(cmd).start(); + try (BufferedReader reader = + new BufferedReader(new InputStreamReader(process.getInputStream()))) { + String line = reader.readLine(); + return line != null ? Long.parseLong(line.trim()) : 0; + } + } catch (Exception e) { + log.warn("TCP connection count failed: {}", e.getMessage()); + return -1; + } + } + + private static long readLines(Process p) throws Exception { + try (BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()))) { + return r.lines().count(); + } + } + + private static GcInfo getGcInfo() { + long count = 0, time = 0; + for (GarbageCollectorMXBean gc : ManagementFactory.getGarbageCollectorMXBeans()) { + if (gc.getCollectionCount() >= 0) count += gc.getCollectionCount(); + if (gc.getCollectionTime() >= 0) time += gc.getCollectionTime(); + } + return new GcInfo(count, time); + } + + private static String getPid() { + return ManagementFactory.getRuntimeMXBean().getName().split("@")[0]; + } + + private static class GcInfo { + long count; + long time; + + GcInfo(long count, long time) { + this.count = count; + this.time = time; + } + } + + public static void main(String[] args) { + ResourceLeakStat.stat("Start"); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/rest/ReliabilityTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/rest/ReliabilityTest.java new file mode 100644 index 00000000..5930e11e --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/rest/ReliabilityTest.java @@ -0,0 +1,131 @@ +package com.kucoin.universal.sdk.test.robustness.rest; + +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.net.InetSocketAddress; +import java.net.Proxy; +import java.time.Duration; +import java.util.Collections; +import lombok.extern.slf4j.Slf4j; +import okhttp3.*; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +@Slf4j +public class ReliabilityTest { + + @Test + public void testTimeoutRetry() { + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .readTimeout(Duration.ofMillis(1)) + .callTimeout(Duration.ofMillis(20)) + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + try { + kucoinClient.getRestService().getAccountService().getAccountApi().getAccountInfo(); + Assertions.fail(); + } catch (Exception e) { + Assertions.assertTrue(e.getMessage().contains("timeout")); + } + } + + @Test + public void testProxy() { + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .eventListener( + new EventListener() { + @Override + public void connectStart( + @NotNull Call call, + @NotNull InetSocketAddress inetSocketAddress, + @NotNull Proxy proxy) { + System.out.println("========== Connection Start =========="); + super.connectStart(call, inetSocketAddress, proxy); + } + }) + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .proxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 8080))) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + try { + kucoinClient.getRestService().getAccountService().getAccountApi().getAccountInfo(); + Assertions.fail(); + } catch (Exception e) { + Assertions.assertTrue(e.getMessage().contains("Failed to connect to /127.0.0.1:8080")); + } + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/rest/ResourceTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/rest/ResourceTest.java new file mode 100644 index 00000000..23b3a758 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/rest/ResourceTest.java @@ -0,0 +1,129 @@ +package com.kucoin.universal.sdk.test.robustness.rest; + +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import com.kucoin.universal.sdk.test.robustness.ResourceLeakStat; +import java.time.Duration; +import java.util.concurrent.CountDownLatch; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +@Slf4j +public class ResourceTest { + + @Test + public void testPools() throws Exception { + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + ResourceLeakStat.stat("begin"); + int start = Math.toIntExact(ResourceLeakStat.getTcpConnCount()); + + TransportOption httpTransport = + TransportOption.builder() + .maxIdleConnections(2) + .maxRequests(2) + .maxRequestsPerHost(2) + .keepAlive(true) + .keepAliveDuration(Duration.ofSeconds(5)) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + for (int i = 0; i < 5; i++) { + try { + kucoinClient.getRestService().getAccountService().getAccountApi().getAccountInfo(); + } catch (Exception e) { + Assertions.fail(e); + } + } + + ResourceLeakStat.stat("end"); + int end = Math.toIntExact(ResourceLeakStat.getTcpConnCount()); + Assertions.assertEquals(1, end - start); + } + + @Test + public void testResourceLeak() throws Exception { + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + ResourceLeakStat.stat("begin"); + TransportOption httpTransport = + TransportOption.builder() + .maxIdleConnections(2) + .maxRequests(2) + .maxRequestsPerHost(2) + .keepAlive(true) + .keepAliveDuration(Duration.ofSeconds(5)) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + + ResourceLeakStat.stat("begin"); + CountDownLatch latch = new CountDownLatch(2); + for (int i = 0; i < 2; i++) { + new Thread( + () -> { + try { + for (int j = 0; j < 100; j++) { + kucoinClient + .getRestService() + .getSpotService() + .getMarketApi() + .getAllCurrencies(); + Thread.sleep(1000); + } + } catch (InterruptedException e) { + throw new RuntimeException(e); + } finally { + latch.countDown(); + } + }) + .start(); + } + + new Thread( + () -> { + while (true) { + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + ResourceLeakStat.stat("end"); + } + }) + .start(); + + latch.await(); + ResourceLeakStat.stat("end"); + } +} From 8b36f933ac4b4c07cdf7e784ffc8aa1713c6972e Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Tue, 22 Jul 2025 09:43:01 +0800 Subject: [PATCH 24/39] feat(java): add README.md --- sdk/java/README.md | 208 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 sdk/java/README.md diff --git a/sdk/java/README.md b/sdk/java/README.md new file mode 100644 index 00000000..fdee84d7 --- /dev/null +++ b/sdk/java/README.md @@ -0,0 +1,208 @@ +# Java SDK Documentation +![License Badge](https://img.shields.io/badge/license-MIT-green) +![Language](https://img.shields.io/badge/java-blue) + +Welcome to the **Java** implementation of the KuCoin Universal SDK. This SDK is built based on KuCoin API specifications to provide a comprehensive and optimized interface for interacting with the KuCoin platform. + +For an overview of the project and SDKs in other languages, refer to the [Main README](https://github.com/kucoin/kucoin-universal-sdk). + +## 📦 Installation + +### Latest Version: `0.1.0-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. + +```xml + + com.kucoin + kucoin-universal-sdk + 0.1.0-SNAPSHOT + +``` + +## 📖 Getting Started + +Here's a quick example to get you started with the SDK in **Java**. + +```JAVA +package com.kucoin.example; + +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.api.KucoinRestService; +import com.kucoin.universal.sdk.generate.spot.market.GetPartOrderBookReq; +import com.kucoin.universal.sdk.generate.spot.market.GetPartOrderBookResp; +import com.kucoin.universal.sdk.generate.spot.market.MarketApi; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class ExampleGetStarted { + + public static String stringifyDepth(List> depth) { + return depth.stream() + .map(row -> "[" + String.join(", ", row) + "]") + .collect(Collectors.joining(", ")); + } + + public static void example() { + // Retrieve API secret information from environment variables + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + // Set specific options, others will fall back to default values + TransportOption httpTransportOption = TransportOption.builder().keepAlive(true).build(); + + // Create a client using the specified options + ClientOption clientOption = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransportOption) + .build(); + + KucoinClient client = new DefaultKucoinClient(clientOption); + + // Get the Restful Service + KucoinRestService kucoinRestService = client.getRestService(); + + MarketApi spotMarketApi = kucoinRestService.getSpotService().getMarketApi(); + + // Query partial order book depth data (aggregated by price). + // Build the request using the builder pattern. + GetPartOrderBookReq request = + GetPartOrderBookReq.builder().symbol("BTC-USDT").size("20").build(); + + GetPartOrderBookResp response = spotMarketApi.getPartOrderBook(request); + + log.info( + "time={}, sequence={}, bids={}, asks={}", + response.getTime(), + response.getSequence(), + stringifyDepth(response.getBids()), + stringifyDepth(response.getAsks())); + } + + public static void main(String[] args) { + example(); + } +} +``` +## 📚 Documentation +Official Documentation: [KuCoin API Docs](https://www.kucoin.com/docs-new) + +## 📂 Examples + +Explore more examples in the [example/](example/) directory for advanced usage. + +## 📋 Changelog + +For a detailed list of changes, see the [Changelog](./CHANGELOG.md). + +## 📌 Special Notes on APIs + +This section provides specific considerations and recommendations for using the REST and WebSocket APIs. + +### REST API Notes + +#### Client Features +- **Advanced HTTP Handling**: + - Supports retries, keep-alive connections, and configurable concurrency limits for robust request execution. + - Supports both [Guzzle](https://github.com/guzzle/guzzle) and [Saber (Swoole)](https://github.com/swlib/saber) as underlying HTTP clients. + - Use `useCoroutineHttp=true` to enable high-performance coroutine HTTP requests (requires `ext-swoole` and `swlib/saber`). + +- **Rich Response Details**: + - Includes rate-limiting information and raw response data in API responses for better debugging and control. +- **Public API Access**: + - For public endpoints, API keys are not required, simplifying integration for non-authenticated use cases. + +--- + +### WebSocket API Notes + +#### Client Features +- **Flexible Service Creation**: + - Supports creating services for public/private channels in Spot, Futures, or Margin trading as needed. + - Multiple services can be created independently. +- **Service Lifecycle**: + - If a service is closed, create a new service instead of reusing it to avoid undefined behavior. +- **Connection-to-Channel Mapping**: + - Each WebSocket connection corresponds to a specific channel type. For example: + - Spot public/private and Futures public/private services require 4 active WebSocket connections. + +#### Threading and Callbacks +- **Thread Model**: + - WebSocket services follow a simple thread model, ensuring callbacks are handled on a single thread. +- **Subscription Management**: + - A subscription is considered successful only after receiving an acknowledgment (ACK) from the server. + - Each subscription has a unique ID, which can be used for unsubscribe. + +#### Data and Message Handling +- **Framework-Managed Threads**: + - Data messages are handled by a single framework-managed thread, ensuring orderly processing. +- **Duplicate Subscriptions**: + - Avoid overlapping subscription parameters. For example: + - Subscribing to `["BTC-USDT", "ETH-USDT"]` and then to `["ETH-USDT", "DOGE-USDT"]` may result in undefined behavior. + - Identical subscriptions will raise an error for duplicate subscriptions. + +## 📑 Parameter Descriptions + +This section provides details about the configurable parameters for both HTTP and WebSocket client behavior. + +### HTTP Parameters +| Parameter | Type | Description | Default Value | +| -------------------------- |---------------------| -------------------------------------------------------------------------------------------- | ----------------- | +| `keepAlive` | `boolean` | Whether to enable connection pooling / HTTP keep-alive. | `true` | +| `maxIdleConnections` | `int` | Maximum number of idle connections kept in the pool. | `5` | +| `keepAliveDuration` | `Duration` | Idle connection eviction threshold. | `30s` | +| `maxRequests` | `int` | Maximum number of concurrent requests across all hosts (Dispatcher level). | `256` | +| `maxRequestsPerHost` | `int` | Maximum number of concurrent requests per host. | `32` | +| `connectTimeout` | `Duration` | Timeout for establishing a connection. | `10s` | +| `readTimeout` | `Duration` | Timeout for reading a response. | `30s` | +| `writeTimeout` | `Duration` | Timeout for writing a request. | `30s` | +| `callTimeout` | `Duration` | Overall timeout for the entire call. `0` disables it. | `0s` | +| `pingInterval` | `Duration` | Ping interval for HTTP/2 connections. `0` disables it. | `0s` | +| `proxy` | `Proxy` | Optional HTTP proxy. If `null`, no proxy will be used. | `null` | +| `retryOnConnectionFailure` | `boolean` | Whether to retry requests on connection failure. | `true` | +| `interceptors` | `List` | Application-level interceptors (e.g., logging, metrics). Executed before routing or retries. | `[]` (empty list) | +| `eventListener` | `EventListener` | Optional listener for connection lifecycle events (e.g., connect start, connect end, etc.). | `null` | + + +### WebSocket Parameters +| Parameter | Type | Description | Default Value | +| ---------------------------- |----------------------| --------------------------------------------------------------------------- | ------------- | +| `reconnect` | `boolean` | Whether to automatically reconnect after disconnection. | `true` | +| `reconnectAttempts` | `int` | Maximum number of reconnect attempts. `-1` means unlimited. | `-1` | +| `reconnectInterval` | `Duration` | Interval between reconnect attempts. | `5s` | +| `dialTimeout` | `Duration` | Timeout for establishing the WebSocket connection (handshake). | `10s` | +| `writeTimeout` | `Duration` | Timeout for sending a single message. | `5s` | +| `eventCallback` | `WebSocketCallback` | Optional callback to handle WebSocket events and error messages. | `null` | +| `autoResubscribeMaxAttempts` | `int` | Maximum number of retry attempts for automatic resubscription of each item. | `3` | + +## 📝 License + +This project is licensed under the MIT License. For more details, see the [LICENSE](LICENSE) file. + +## 📧 Contact Support + +If you encounter any issues or have questions, feel free to reach out through: +- GitHub Issues: [Submit an Issue](https://github.com/kucoin/kucoin-universal-sdk/issues) + +## ⚠️ Disclaimer + +- **Financial Risk**: This SDK is provided as a development tool to integrate with KuCoin's trading platform. It does not provide financial advice. Trading cryptocurrencies involves substantial risk, including the risk of loss. Users should assess their financial circumstances and consult with financial advisors before engaging in trading. + +- **No Warranty**: The SDK is provided "as is" without any guarantees of accuracy, reliability, or suitability for a specific purpose. Use it at your own risk. + +- **Compliance**: Users are responsible for ensuring compliance with all applicable laws and regulations in their jurisdiction when using this SDK. + +By using this SDK, you acknowledge that you have read, understood, and agreed to this disclaimer. \ No newline at end of file From 111212e6f3df84ab184f59d20fbca51dd5ede213 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Tue, 22 Jul 2025 15:56:51 +0800 Subject: [PATCH 25/39] feat(java): fix thread leak --- sdk/java/README.md | 34 +++++++++---------- .../sdk/internal/infra/DefaultTransport.java | 5 ++- .../infra/DefaultWebsocketTransport.java | 30 +++++++++++++--- .../universal/sdk/model/TransportOption.java | 8 +++++ .../sdk/model/WebSocketClientOption.java | 10 +----- .../universal/sdk/model/WebSocketEvent.java | 4 --- 6 files changed, 56 insertions(+), 35 deletions(-) diff --git a/sdk/java/README.md b/sdk/java/README.md index fdee84d7..10c620f7 100644 --- a/sdk/java/README.md +++ b/sdk/java/README.md @@ -159,22 +159,23 @@ This section provides specific considerations and recommendations for using the This section provides details about the configurable parameters for both HTTP and WebSocket client behavior. ### HTTP Parameters -| Parameter | Type | Description | Default Value | -| -------------------------- |---------------------| -------------------------------------------------------------------------------------------- | ----------------- | -| `keepAlive` | `boolean` | Whether to enable connection pooling / HTTP keep-alive. | `true` | -| `maxIdleConnections` | `int` | Maximum number of idle connections kept in the pool. | `5` | -| `keepAliveDuration` | `Duration` | Idle connection eviction threshold. | `30s` | -| `maxRequests` | `int` | Maximum number of concurrent requests across all hosts (Dispatcher level). | `256` | -| `maxRequestsPerHost` | `int` | Maximum number of concurrent requests per host. | `32` | -| `connectTimeout` | `Duration` | Timeout for establishing a connection. | `10s` | -| `readTimeout` | `Duration` | Timeout for reading a response. | `30s` | -| `writeTimeout` | `Duration` | Timeout for writing a request. | `30s` | -| `callTimeout` | `Duration` | Overall timeout for the entire call. `0` disables it. | `0s` | -| `pingInterval` | `Duration` | Ping interval for HTTP/2 connections. `0` disables it. | `0s` | -| `proxy` | `Proxy` | Optional HTTP proxy. If `null`, no proxy will be used. | `null` | -| `retryOnConnectionFailure` | `boolean` | Whether to retry requests on connection failure. | `true` | -| `interceptors` | `List` | Application-level interceptors (e.g., logging, metrics). Executed before routing or retries. | `[]` (empty list) | -| `eventListener` | `EventListener` | Optional listener for connection lifecycle events (e.g., connect start, connect end, etc.). | `null` | +| Parameter | Type | Description | Default Value | +|-----------------------------|---------------------| -------------------------------------------------------------------------------------------- | ----------------- | +| `keepAlive` | `boolean` | Whether to enable connection pooling / HTTP keep-alive. | `true` | +| `maxIdleConnections` | `int` | Maximum number of idle connections kept in the pool. | `5` | +| `keepAliveDuration` | `Duration` | Idle connection eviction threshold. | `30s` | +| `maxRequests` | `int` | Maximum number of concurrent requests across all hosts (Dispatcher level). | `256` | +| `maxRequestsPerHost` | `int` | Maximum number of concurrent requests per host. | `32` | +| `connectTimeout` | `Duration` | Timeout for establishing a connection. | `10s` | +| `readTimeout` | `Duration` | Timeout for reading a response. | `30s` | +| `writeTimeout` | `Duration` | Timeout for writing a request. | `30s` | +| `callTimeout` | `Duration` | Overall timeout for the entire call. `0` disables it. | `0s` | +| `pingInterval` | `Duration` | Ping interval for HTTP/2 connections. `0` disables it. | `0s` | +| `proxy` | `Proxy` | Optional HTTP proxy. If `null`, no proxy will be used. | `null` | +| `retryOnConnectionFailure` | `boolean` | Whether to retry requests on connection failure. | `true` | +| `interceptors` | `List` | Application-level interceptors (e.g., logging, metrics). Executed before routing or retries. | `[]` (empty list) | +| `eventListener` | `EventListener` | Optional listener for connection lifecycle events (e.g., connect start, connect end, etc.). | `null` | +| `dispatcherExecutor` | `ExecutorService` | Custom thread pool for executing HTTP requests (via OkHttp Dispatcher); `null` = use default pool. | `null` | ### WebSocket Parameters @@ -186,7 +187,6 @@ This section provides details about the configurable parameters for both HTTP an | `dialTimeout` | `Duration` | Timeout for establishing the WebSocket connection (handshake). | `10s` | | `writeTimeout` | `Duration` | Timeout for sending a single message. | `5s` | | `eventCallback` | `WebSocketCallback` | Optional callback to handle WebSocket events and error messages. | `null` | -| `autoResubscribeMaxAttempts` | `int` | Maximum number of retry attempts for automatic resubscription of each item. | `3` | ## 📝 License diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java index d3590dce..e97841ab 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java @@ -71,7 +71,10 @@ private OkHttpClient buildOkHttp(TransportOption o) { o.proxy().ifPresent(b::proxy); // dispatcher limits - Dispatcher d = new Dispatcher(); + Dispatcher d = + o.dispatcherExecutor().isPresent() + ? new Dispatcher(o.dispatcherExecutor().get()) + : new Dispatcher(); d.setMaxRequests(o.getMaxRequests()); d.setMaxRequestsPerHost(o.getMaxRequestsPerHost()); b.dispatcher(d); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java index ae216a5a..9eb12f05 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java @@ -27,13 +27,20 @@ public final class DefaultWebsocketTransport implements WebsocketTransport { private final WebSocketClientOption opt; private final WebsocketTransportListener listener; - private final OkHttpClient http = new OkHttpClient(); + private final OkHttpClient http; private final ObjectMapper mapper = new ObjectMapper(); private final AtomicBoolean connected = new AtomicBoolean(false); private final AtomicBoolean shutting = new AtomicBoolean(false); private final AtomicBoolean reconnecting = new AtomicBoolean(false); private final Map> ackMap = new ConcurrentHashMap<>(); - private final ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor(); + private final ScheduledExecutorService scheduler = + Executors.newSingleThreadScheduledExecutor( + r -> { + Thread t = new Thread(r); + t.setName("ws-scheduler-single-pool"); + t.setDaemon(true); + return t; + }); private volatile WebSocket socket; private volatile WsToken token; @@ -45,6 +52,12 @@ public DefaultWebsocketTransport( this.tokenProvider = tokenProvider; this.opt = option; this.listener = listener; + this.http = + new OkHttpClient() + .newBuilder() + .connectTimeout(option.getDialTimeout()) + .writeTimeout(option.getWriteTimeout()) + .build(); } private static WsToken pick(List list) { @@ -73,6 +86,7 @@ public void stop() { scheduler.shutdownNow(); tokenProvider.close(); log.info("websocket closed"); + listener.onEvent(WebSocketEvent.CLIENT_SHUTDOWN, ""); } @Override @@ -137,11 +151,15 @@ public void onClosed(WebSocket w, int c, String r) { @Override public void onFailure(WebSocket w, Throwable t, Response r) { - log.error("websocket emits error events", t); + if (!shutting.get()) { + log.error("websocket emits error events", t); + return; + } + tryReconnect(t.getMessage()); } }); - if (!welcome.await(5, TimeUnit.SECONDS)) { + if (!welcome.await(opt.getDialTimeout().toMillis(), TimeUnit.MILLISECONDS)) { throw new IllegalStateException("welcome not received"); } @@ -208,6 +226,7 @@ private void schedulePing() { write(ping, Duration.ofMillis(timeout)) .exceptionally( ex -> { + log.error("Schedule ping error", ex); listener.onEvent(WebSocketEvent.ERROR_RECEIVED, ex.getMessage()); return null; }); @@ -292,6 +311,9 @@ private void safeClose(String reason) { connected.set(false); if (socket != null) { socket.close(1000, reason); + socket.cancel(); + http.connectionPool().evictAll(); + http.dispatcher().executorService().shutdown(); } } catch (Exception e) { log.error("exception when safe close", e); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/TransportOption.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/TransportOption.java index 2e274a33..06e7de33 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/TransportOption.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/TransportOption.java @@ -5,6 +5,7 @@ import java.util.Collections; import java.util.List; import java.util.Optional; +import java.util.concurrent.ExecutorService; import lombok.*; import okhttp3.EventListener; import okhttp3.Interceptor; @@ -61,6 +62,9 @@ public final class TransportOption { /** Optional event listener for connection lifecycle logging, etc. */ @Builder.Default private final EventListener eventListener = null; + /** Custom executor for Dispatcher (call execution); null means use default */ + @Builder.Default private final ExecutorService dispatcherExecutor = null; + public Optional proxy() { return Optional.ofNullable(proxy); } @@ -69,6 +73,10 @@ public Optional eventListener() { return Optional.ofNullable(eventListener); } + public Optional dispatcherExecutor() { + return Optional.ofNullable(dispatcherExecutor); + } + public List interceptors() { return interceptors == null ? Collections.emptyList() diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketClientOption.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketClientOption.java index 08aaff3c..3e9a249c 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketClientOption.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketClientOption.java @@ -34,10 +34,7 @@ public interface WebSocketCallback { @Builder.Default private final Duration writeTimeout = Duration.ofSeconds(5); /** event dispatcher; may be {@code null} */ - private final WebSocketCallback eventCallback; - - /** max retry for automatic resubscribe (per item) */ - @Builder.Default private final int autoResubscribeMaxAttempts = 3; + @Builder.Default private final WebSocketCallback eventCallback = null; /* ---------------- helper ---------------- */ @@ -45,9 +42,4 @@ public interface WebSocketCallback { public static WebSocketClientOption defaults() { return WebSocketClientOption.builder().build(); } - - /** apply event callback without touching other fields */ - public WebSocketClientOption withCallback(WebSocketCallback cb) { - return toBuilder().eventCallback(cb).build(); - } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketEvent.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketEvent.java index 50aebfd9..6d958fcf 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketEvent.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/model/WebSocketEvent.java @@ -4,11 +4,7 @@ public enum WebSocketEvent { CONNECTED, // connection established DISCONNECTED, // closed by server or client TRY_RECONNECT, // about to reconnect - MESSAGE_RECEIVED, // text / binary msg arrived ERROR_RECEIVED, // I/O or protocol error - PONG_RECEIVED, // received pong - READ_BUFFER_FULL, // inbound queue is full - WRITE_BUFFER_FULL, // outbound queue is full CALLBACK_ERROR, // user-callback threw exception RE_SUBSCRIBE_OK, // resubscribe succeeded RE_SUBSCRIBE_ERROR, // resubscribe failed From 0e11cf5fcabc3647a8673c475a730675b6122cf3 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Wed, 23 Jul 2025 09:30:53 +0800 Subject: [PATCH 26/39] feat(java): add ws tests --- .../sdk/test/robustness/ResourceLeakStat.java | 14 ++ .../test/robustness/ws/ReliabilityTest.java | 188 ++++++++++++++++++ .../sdk/test/robustness/ws/ResourceTest.java | 58 ++++++ 3 files changed, 260 insertions(+) create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ws/ReliabilityTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ws/ResourceTest.java diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ResourceLeakStat.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ResourceLeakStat.java index 88ef9a82..3043d0c0 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ResourceLeakStat.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ResourceLeakStat.java @@ -91,4 +91,18 @@ private static class GcInfo { public static void main(String[] args) { ResourceLeakStat.stat("Start"); } + + public static void printAllThreadsWithStack() { + Thread.getAllStackTraces() + .forEach( + (thread, stackTrace) -> { + System.out.printf( + "=== Thread: %s (id=%d, state=%s) ===\n", + thread.getName(), thread.getId(), thread.getState()); + for (StackTraceElement element : stackTrace) { + System.out.println(" at " + element); + } + System.out.println(); + }); + } } diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ws/ReliabilityTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ws/ReliabilityTest.java new file mode 100644 index 00000000..45d8de7b --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ws/ReliabilityTest.java @@ -0,0 +1,188 @@ +package com.kucoin.universal.sdk.test.robustness.ws; + +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.spot.market.GetAllSymbolsData; +import com.kucoin.universal.sdk.generate.spot.market.GetAllSymbolsReq; +import com.kucoin.universal.sdk.generate.spot.market.GetAllSymbolsResp; +import com.kucoin.universal.sdk.generate.spot.spotpublic.AllTickersEvent; +import com.kucoin.universal.sdk.generate.spot.spotpublic.SpotPublicWs; +import com.kucoin.universal.sdk.generate.spot.spotpublic.TradeEvent; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import com.kucoin.universal.sdk.model.WebSocketClientOption; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; +import lombok.extern.slf4j.Slf4j; +import okhttp3.*; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +@Slf4j +public class ReliabilityTest { + + @Test + public void testCallback() { + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + AtomicInteger atomicInteger = new AtomicInteger(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(TransportOption.defaults()) + .websocketClientOption( + WebSocketClientOption.builder() + .eventCallback( + ((event, message) -> { + atomicInteger.incrementAndGet(); + log.info("Event: {}, {}", event, message); + })) + .build()) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + SpotPublicWs spotPublicWs = kucoinClient.getWsService().newSpotPublicWS(); + spotPublicWs.start(); + spotPublicWs.stop(); + + Assertions.assertEquals(3, atomicInteger.get()); + } + + @Test + public void testReconnect() throws Exception { + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + AtomicInteger atomicInteger = new AtomicInteger(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(TransportOption.defaults()) + .websocketClientOption( + WebSocketClientOption.builder() + .eventCallback( + ((event, message) -> { + atomicInteger.incrementAndGet(); + log.info("Event: {}, {}", event, message); + })) + .build()) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + SpotPublicWs spotPublicWs = kucoinClient.getWsService().newSpotPublicWS(); + spotPublicWs.start(); + + spotPublicWs.allTickers((String topic, String subject, AllTickersEvent data) -> {}); + + Thread.sleep(1000 * 12000); + spotPublicWs.stop(); + } + + private static void noop(String topic, String subject, TradeEvent data) {} + + @Test + public void testReconnect1() throws Exception { + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + AtomicInteger atomicInteger = new AtomicInteger(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(TransportOption.defaults()) + .websocketClientOption( + WebSocketClientOption.builder() + .eventCallback( + ((event, message) -> { + atomicInteger.incrementAndGet(); + log.info("Event: {}, {}", event, message); + })) + .build()) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + + GetAllSymbolsResp resp = + kucoinClient + .getRestService() + .getSpotService() + .getMarketApi() + .getAllSymbols(GetAllSymbolsReq.builder().market("USDS").build()); + List data = resp.getData(); + if (data.size() > 100) { + data = data.subList(0, 100); + } + + SpotPublicWs spotPublicWs = kucoinClient.getWsService().newSpotPublicWS(); + spotPublicWs.start(); + + data.forEach( + d -> { + spotPublicWs.trade(new String[] {d.getSymbol()}, ReliabilityTest::noop); + }); + + Thread.sleep(1000 * 12000); + spotPublicWs.stop(); + } + + @Test + public void testReconnect2() throws Exception { + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + AtomicInteger atomicInteger = new AtomicInteger(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(TransportOption.defaults()) + .websocketClientOption( + WebSocketClientOption.builder() + .eventCallback( + ((event, message) -> { + atomicInteger.incrementAndGet(); + log.info("Event: {}, {}", event, message); + })) + .build()) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + + SpotPublicWs spotPublicWs = kucoinClient.getWsService().newSpotPublicWS(); + spotPublicWs.start(); + + spotPublicWs.trade(new String[] {"BTC-USDT", "ETH-USDT"}, ReliabilityTest::noop); + + Thread.sleep(1000 * 12000); + spotPublicWs.stop(); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ws/ResourceTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ws/ResourceTest.java new file mode 100644 index 00000000..9c03bc2b --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ws/ResourceTest.java @@ -0,0 +1,58 @@ +package com.kucoin.universal.sdk.test.robustness.ws; + +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.spot.spotpublic.SpotPublicWs; +import com.kucoin.universal.sdk.generate.spot.spotpublic.TradeEvent; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import com.kucoin.universal.sdk.model.WebSocketClientOption; +import com.kucoin.universal.sdk.test.robustness.ResourceLeakStat; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Test; + +@Slf4j +public class ResourceTest { + private static void noop(String topic, String subject, TradeEvent data) {} + + @Test + public void testStarStop() throws Exception { + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(TransportOption.defaults()) + .websocketClientOption(WebSocketClientOption.defaults()) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + + ResourceLeakStat.stat("before"); + + for (int i = 0; i < 10; i++) { + SpotPublicWs spotPublicWs = kucoinClient.getWsService().newSpotPublicWS(); + spotPublicWs.start(); + String id = spotPublicWs.trade(new String[] {"BTC-USDT", "ETH-USDT"}, ResourceTest::noop); + spotPublicWs.unSubscribe(id); + spotPublicWs.stop(); + } + + ResourceLeakStat.stat("after"); + + // TaskRunner.INSTANCE + // okhttp3.internal.concurrent.TaskRunner.RealBackend + // ThreadPoolExecutor: keepAliveTime = 60s + Thread.sleep(120 * 1000); + + ResourceLeakStat.printAllThreadsWithStack(); + } +} From 19825337ce025ae516b3afa1284f4532a4718694 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Wed, 23 Jul 2025 11:11:46 +0800 Subject: [PATCH 27/39] feat(java): fix transport bug --- .../sdk/internal/infra/DefaultTransport.java | 7 ++++++- .../internal/infra/DefaultWebsocketTransport.java | 12 ++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java index e97841ab..6f51cc74 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultTransport.java @@ -1,5 +1,6 @@ package com.kucoin.universal.sdk.internal.infra; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.internal.interfaces.PathVar; @@ -44,6 +45,7 @@ public DefaultTransport(@NonNull ClientOption clientOpt, String version) { clientOpt.getBrokerName(), clientOpt.getBrokerPartner(), clientOpt.getBrokerKey()); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } private OkHttpClient buildOkHttp(TransportOption o) { @@ -211,7 +213,6 @@ private okhttp3.Request processRequest( .map(p -> p.getFirst() + "=" + p.getSecond()) .collect(Collectors.joining("&")); } - RequestBody rb = null; if (!body.isEmpty() || method.equalsIgnoreCase("POST")) { rb = RequestBody.create(body, JSON); @@ -251,6 +252,10 @@ private >> T doRequest( headerInt(resp, "gw-ratelimit-reset"))); common.checkError(); T response = common.getData(); + if (response == null) { + response = respClazz.getDeclaredConstructor().newInstance(); + } + response.setCommonResponse(common); return response; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java index 9eb12f05..cb96c37e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java @@ -35,12 +35,12 @@ public final class DefaultWebsocketTransport implements WebsocketTransport { private final Map> ackMap = new ConcurrentHashMap<>(); private final ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor( - r -> { - Thread t = new Thread(r); - t.setName("ws-scheduler-single-pool"); - t.setDaemon(true); - return t; - }); + r -> { + Thread t = new Thread(r); + t.setName("ws-scheduler-single-pool"); + t.setDaemon(true); + return t; + }); private volatile WebSocket socket; private volatile WsToken token; From 80d8b6f5131094f4b50fef6007456f0a168ab407 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Wed, 23 Jul 2025 11:12:29 +0800 Subject: [PATCH 28/39] feat(java): add example and tests --- sdk/java/example/.gitignore | 38 ++ sdk/java/example/pom.xml | 88 +++ .../java/com/kucoin/example/ExampleAPI.java | 160 ++++++ .../example/ExampleArbitrageStrategy.java | 519 ++++++++++++++++++ .../com/kucoin/example/ExampleGetStarted.java | 71 +++ .../com/kucoin/example/ExampleMAStrategy.java | 251 +++++++++ .../kucoin/example/ExampleRealtimeKline.java | 160 ++++++ .../java/com/kucoin/example/ExampleSign.java | 157 ++++++ .../java/com/kucoin/example/ExampleWs.java | 72 +++ .../test/regression/RunForeverTest.java | 138 +++++ .../test/regression/RunReconnectTest.java | 90 +++ .../test/regression/RunServiceTest.java | 149 +++++ .../e2e/rest/account/AccountApiTest.java | 2 +- .../e2e/rest/account/AccountDepositTest.java | 222 ++++++++ .../test/e2e/rest/account/AccountFeeTest.java | 115 ++++ .../rest/account/AccountSubAccountTest.java | 375 +++++++++++++ .../e2e/rest/account/AccountTransferTest.java | 217 ++++++++ .../e2e/rest/account/AccountWithdrawTest.java | 229 ++++++++ .../sdk/test/e2e/rest/earn/EarnApiTest.java | 74 +++ .../{ => test}/e2e/rest/spot/OrderTest.java | 2 +- .../{ => test}/e2e/ws/spot/PublicTest.java | 2 +- 21 files changed, 3128 insertions(+), 3 deletions(-) create mode 100644 sdk/java/example/.gitignore create mode 100644 sdk/java/example/pom.xml create mode 100644 sdk/java/example/src/main/java/com/kucoin/example/ExampleAPI.java create mode 100644 sdk/java/example/src/main/java/com/kucoin/example/ExampleArbitrageStrategy.java create mode 100644 sdk/java/example/src/main/java/com/kucoin/example/ExampleGetStarted.java create mode 100644 sdk/java/example/src/main/java/com/kucoin/example/ExampleMAStrategy.java create mode 100644 sdk/java/example/src/main/java/com/kucoin/example/ExampleRealtimeKline.java create mode 100644 sdk/java/example/src/main/java/com/kucoin/example/ExampleSign.java create mode 100644 sdk/java/example/src/main/java/com/kucoin/example/ExampleWs.java create mode 100644 sdk/java/example/src/main/java/com/kucoin/test/regression/RunForeverTest.java create mode 100644 sdk/java/example/src/main/java/com/kucoin/test/regression/RunReconnectTest.java create mode 100644 sdk/java/example/src/main/java/com/kucoin/test/regression/RunServiceTest.java rename sdk/java/src/test/java/com/kucoin/universal/sdk/{ => test}/e2e/rest/account/AccountApiTest.java (99%) create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountDepositTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountFeeTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountSubAccountTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountTransferTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountWithdrawTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/earn/EarnApiTest.java rename sdk/java/src/test/java/com/kucoin/universal/sdk/{ => test}/e2e/rest/spot/OrderTest.java (99%) rename sdk/java/src/test/java/com/kucoin/universal/sdk/{ => test}/e2e/ws/spot/PublicTest.java (98%) diff --git a/sdk/java/example/.gitignore b/sdk/java/example/.gitignore new file mode 100644 index 00000000..5ff6309b --- /dev/null +++ b/sdk/java/example/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/sdk/java/example/pom.xml b/sdk/java/example/pom.xml new file mode 100644 index 00000000..c8ead119 --- /dev/null +++ b/sdk/java/example/pom.xml @@ -0,0 +1,88 @@ + + + 4.0.0 + + com.kucoin + example + 1.0-SNAPSHOT + + + 11 + 11 + UTF-8 + + + + + com.kucoin + kucoin-universal-sdk + 0.1.0-SNAPSHOT + + + org.projectlombok + lombok + 1.18.34 + provided + + + org.slf4j + slf4j-api + 2.0.16 + compile + + + org.slf4j + slf4j-simple + 2.0.16 + compile + + + org.junit.jupiter + junit-jupiter + 5.13.2 + compile + + + + + + + + com.diffplug.spotless + spotless-maven-plugin + 2.44.5 + + + format + verify + + apply + + + + + + + src/main/java/**/*.java + src/test/java/**/*.java + + + + 1.27.0 + + true + true + com.google.googlejavaformat:google-java-format + + + + + + + + + + + \ No newline at end of file diff --git a/sdk/java/example/src/main/java/com/kucoin/example/ExampleAPI.java b/sdk/java/example/src/main/java/com/kucoin/example/ExampleAPI.java new file mode 100644 index 00000000..5f1b8a18 --- /dev/null +++ b/sdk/java/example/src/main/java/com/kucoin/example/ExampleAPI.java @@ -0,0 +1,160 @@ +package com.kucoin.example; + +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.api.KucoinRestService; +import com.kucoin.universal.sdk.generate.account.account.AccountApi; +import com.kucoin.universal.sdk.generate.account.account.GetAccountInfoResp; +import com.kucoin.universal.sdk.generate.account.fee.FeeApi; +import com.kucoin.universal.sdk.generate.account.fee.GetSpotActualFeeData; +import com.kucoin.universal.sdk.generate.account.fee.GetSpotActualFeeReq; +import com.kucoin.universal.sdk.generate.account.fee.GetSpotActualFeeResp; +import com.kucoin.universal.sdk.generate.futures.market.*; +import com.kucoin.universal.sdk.generate.service.AccountService; +import com.kucoin.universal.sdk.generate.service.FuturesService; +import com.kucoin.universal.sdk.generate.service.SpotService; +import com.kucoin.universal.sdk.generate.spot.order.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.UUID; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class ExampleAPI { + + public static void restExample() { + // Retrieve API secret information from environment variables + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + // Optional: Retrieve broker secret information from environment variables; applicable for + // broker API only + String brokerName = System.getenv("BROKER_NAME"); + String brokerKey = System.getenv("BROKER_KEY"); + String brokerPartner = System.getenv("BROKER_PARTNER"); + + // Set specific options, others will fall back to default values + TransportOption httpTransportOption = TransportOption.builder().keepAlive(true).build(); + + // Create a client using the specified options + ClientOption clientOption = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .brokerName(brokerName) + .brokerKey(brokerKey) + .brokerPartner(brokerPartner) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransportOption) + .build(); + + KucoinClient client = new DefaultKucoinClient(clientOption); + KucoinRestService kucoinRestService = client.getRestService(); + + accountServiceExample(kucoinRestService.getAccountService()); + spotServiceExample(kucoinRestService.getSpotService()); + futuresServiceExample(kucoinRestService.getFuturesService()); + } + + public static void accountServiceExample(AccountService accountService) { + AccountApi accountApi = accountService.getAccountApi(); + GetAccountInfoResp accountInfoResp = accountApi.getAccountInfo(); + log.info( + "account info: level: {}, SubAccountSize: {}", + accountInfoResp.getLevel(), + accountInfoResp.getSubQuantity()); + + FeeApi feeApi = accountService.getFeeApi(); + GetSpotActualFeeReq getActualFeeReq = + GetSpotActualFeeReq.builder().symbols("BTC-USDT,ETH-USDT").build(); + + GetSpotActualFeeResp getActualFeeResp = feeApi.getSpotActualFee(getActualFeeReq); + + for (GetSpotActualFeeData feeData : getActualFeeResp.getData()) { + log.info( + "Fee info: symbol: {}, TakerFee: {}, MakerFee: {}", + feeData.getSymbol(), + feeData.getTakerFeeRate(), + feeData.getMakerFeeRate()); + } + } + + public static void spotServiceExample(SpotService spotService) { + OrderApi orderApi = spotService.getOrderApi(); + + AddOrderSyncReq addOrderReq = + AddOrderSyncReq.builder() + .clientOid(UUID.randomUUID().toString()) + .side(AddOrderSyncReq.SideEnum.BUY) + .symbol("BTC-USDT") + .type(AddOrderSyncReq.TypeEnum.LIMIT) + .remark("sdk_example") + .price("10000") + .size("0.001") + .build(); + + AddOrderSyncResp resp = orderApi.addOrderSync(addOrderReq); + log.info("Add order success, id: {}, oid: {}", resp.getOrderId(), resp.getClientOid()); + + GetOrderByOrderIdReq queryOrderDetailReq = + GetOrderByOrderIdReq.builder().orderId(resp.getOrderId()).symbol("BTC-USDT").build(); + GetOrderByOrderIdResp orderDetailResp = orderApi.getOrderByOrderId(queryOrderDetailReq); + log.info("Order detail: {}", orderDetailResp.toString()); + + CancelOrderByOrderIdSyncReq cancelOrderReq = + CancelOrderByOrderIdSyncReq.builder().orderId(resp.getOrderId()).symbol("BTC-USDT").build(); + CancelOrderByOrderIdSyncResp cancelOrderResp = + orderApi.cancelOrderByOrderIdSync(cancelOrderReq); + log.info("Cancel order success, id: {}", cancelOrderResp.getOrderId()); + } + + public static void futuresServiceExample(FuturesService futuresService) { + MarketApi marketApi = futuresService.getMarketApi(); + + GetAllSymbolsResp allSymbolResp = marketApi.getAllSymbols(); + int maxQuery = Math.min(allSymbolResp.getData().size(), 10); + + for (int i = 0; i < maxQuery; i++) { + GetAllSymbolsData symbol = allSymbolResp.getData().get(i); + + long start = (long) ((System.currentTimeMillis() - 600000)); + long end = (long) (System.currentTimeMillis()); + + GetKlinesReq getKlineReq = + GetKlinesReq.builder() + .symbol(symbol.getSymbol()) + .granularity(GetKlinesReq.GranularityEnum._1) + .from(start) + .to(end) + .build(); + + GetKlinesResp getKlineResp = marketApi.getKlines(getKlineReq); + List rows = new ArrayList<>(); + + for (List row : getKlineResp.getData()) { + String timestamp = + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(row.get(0).longValue())); + String formattedRow = + String.format( + "[Time: %s, Open: %.2f, High: %.2f, Low: %.2f, Close: %.2f, Volume: %.2f]", + timestamp, row.get(1), row.get(2), row.get(3), row.get(4), row.get(5)); + rows.add(formattedRow); + } + + log.info("Symbol: {}, Kline: {}", symbol.getSymbol(), String.join(", ", rows)); + } + } + + public static void main(String[] args) { + restExample(); + } +} diff --git a/sdk/java/example/src/main/java/com/kucoin/example/ExampleArbitrageStrategy.java b/sdk/java/example/src/main/java/com/kucoin/example/ExampleArbitrageStrategy.java new file mode 100644 index 00000000..2da7fd2c --- /dev/null +++ b/sdk/java/example/src/main/java/com/kucoin/example/ExampleArbitrageStrategy.java @@ -0,0 +1,519 @@ +package com.kucoin.example; + +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.account.account.GetCrossMarginAccountReq; +import com.kucoin.universal.sdk.generate.account.account.GetCrossMarginAccountResp; +import com.kucoin.universal.sdk.generate.account.account.GetFuturesAccountReq; +import com.kucoin.universal.sdk.generate.account.account.GetFuturesAccountResp; +import com.kucoin.universal.sdk.generate.account.account.GetSpotAccountListReq; +import com.kucoin.universal.sdk.generate.account.account.GetSpotAccountListResp; +import com.kucoin.universal.sdk.generate.futures.fundingfees.GetCurrentFundingRateReq; +import com.kucoin.universal.sdk.generate.futures.fundingfees.GetCurrentFundingRateResp; +import com.kucoin.universal.sdk.generate.futures.market.GetSymbolReq; +import com.kucoin.universal.sdk.generate.futures.market.GetSymbolResp; +import com.kucoin.universal.sdk.generate.service.AccountService; +import com.kucoin.universal.sdk.generate.service.FuturesService; +import com.kucoin.universal.sdk.generate.service.MarginService; +import com.kucoin.universal.sdk.generate.service.SpotService; +import com.kucoin.universal.sdk.generate.spot.market.GetTickerReq; +import com.kucoin.universal.sdk.generate.spot.market.GetTickerResp; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.util.UUID; +import lombok.extern.slf4j.Slf4j; + +/** + * DISCLAIMER: This strategy is provided for educational and illustrative purposes only. It is not + * intended to be used as financial or investment advice. Trading cryptocurrencies involves + * significant risk, and you should carefully consider your investment objectives, level of + * experience, and risk appetite. Past performance of any trading strategy is not indicative of + * future results. + * + *

The authors and contributors of this example are not responsible for any financial losses or + * damages that may occur from using this code. Use it at your own discretion and consult with a + * professional financial advisor if necessary. + */ +@Slf4j +public class ExampleArbitrageStrategy { + + private static final String SPOT_SYMBOL = "DOGE-USDT"; + private static final String FUTURES_SYMBOL = "DOGEUSDTM"; + private static final String BASE_CURRENCY = "USDT"; + private static final int MAX_PLACE_ORDER_WAIT_TIME_SEC = 15; + + public enum MarketSide { + BUY, + SELL + } + + public enum MarketType { + SPOT, + MARGIN, + FUTURES + } + + public static KucoinClient initClient() { + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption transportOption = TransportOption.builder().keepAlive(true).build(); + + ClientOption clientOption = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(transportOption) + .build(); + + return new DefaultKucoinClient(clientOption); + } + + public static boolean checkAvailableBalance( + AccountService accountService, double price, double amount, String marketType) { + double tradeValue = price * amount; + + if (marketType.equals(MarketType.SPOT.name())) { + GetSpotAccountListReq request = + GetSpotAccountListReq.builder() + .type(GetSpotAccountListReq.TypeEnum.TRADE) + .currency(BASE_CURRENCY) + .build(); + + GetSpotAccountListResp resp = accountService.getAccountApi().getSpotAccountList(request); + double available = + resp.getData().stream() + .mapToDouble(item -> Double.parseDouble(item.getAvailable())) + .sum(); + + log.info( + "[SPOT] Available {} balance: {}, Required: {}", BASE_CURRENCY, available, tradeValue); + return available >= tradeValue; + + } else if (marketType.equals(MarketType.FUTURES.name())) { + GetFuturesAccountReq request = GetFuturesAccountReq.builder().currency(BASE_CURRENCY).build(); + + GetFuturesAccountResp resp = accountService.getAccountApi().getFuturesAccount(request); + double available = resp.getAvailableBalance(); + + log.info( + "[FUTURES] Available {} balance: {}, Required: {}", BASE_CURRENCY, available, tradeValue); + return available >= tradeValue; + + } else if (marketType.equals(MarketType.MARGIN.name())) { + GetCrossMarginAccountReq request = + GetCrossMarginAccountReq.builder() + .queryType(GetCrossMarginAccountReq.QueryTypeEnum.MARGIN) + .quoteCurrency(GetCrossMarginAccountReq.QuoteCurrencyEnum.USDT) + .build(); + + GetCrossMarginAccountResp resp = + accountService.getAccountApi().getCrossMarginAccount(request); + double available = Double.parseDouble(resp.getTotalAssetOfQuoteCurrency()); + + log.info( + "[MARGIN] Available {} balance: {}, Required: {}", BASE_CURRENCY, available, tradeValue); + return available >= tradeValue; + } + + return false; + } + + public static double[] getLastTradedPrice( + SpotService spotService, FuturesService futuresService) { + GetTickerResp spotPriceResp = + spotService.getMarketApi().getTicker(GetTickerReq.builder().symbol(SPOT_SYMBOL).build()); + double spotPrice = Double.parseDouble(spotPriceResp.getPrice()); + + GetSymbolResp futuresSymbolResp = + futuresService + .getMarketApi() + .getSymbol(GetSymbolReq.builder().symbol(FUTURES_SYMBOL).build()); + double futuresPrice = futuresSymbolResp.getLastTradePrice(); + + log.info("[PRICE] Spot Price: {}, Futures Price: {}", spotPrice, futuresPrice); + + return new double[] {spotPrice, futuresPrice}; + } + + /** Executes the funding rate arbitrage strategy. */ + public static void fundingRateArbitrageStrategy( + FuturesService futuresService, + SpotService spotService, + MarginService marginService, + AccountService accountService, + double amount, + double threshold) { + try { + // Step 1: Fetch funding rate + GetCurrentFundingRateReq fundingRateReq = + GetCurrentFundingRateReq.builder().symbol(FUTURES_SYMBOL).build(); + + GetCurrentFundingRateResp fundingRateResp = + futuresService.getFundingFeesApi().getCurrentFundingRate(fundingRateReq); + double fundingRate = fundingRateResp.getValue() * 100; + + log.info("[STRATEGY] Funding rate for {}: {}%", FUTURES_SYMBOL, fundingRate); + + // Step 2: Check if funding rate meets threshold + if (Math.abs(fundingRate) < threshold) { + log.info( + "[STRATEGY] No arbitrage opportunity: Funding rate ({}%) below threshold" + " ({}%).", + fundingRate, threshold); + return; + } + + // Step 3: Get spot and futures prices + double[] prices = getLastTradedPrice(spotService, futuresService); + double spotPrice = prices[0]; + double futuresPrice = prices[1]; + + // Get futures multiplier + GetSymbolResp futuresSymbolResp = + futuresService + .getMarketApi() + .getSymbol(GetSymbolReq.builder().symbol(FUTURES_SYMBOL).build()); + double multiplier = futuresSymbolResp.getMultiplier(); + int futuresAmount = (int) Math.ceil(amount / multiplier); + + if (fundingRate > 0) { + log.info( + "[STRATEGY] Positive funding rate. Executing LONG spot and SHORT futures arbitrage."); + + if (!checkAvailableBalance(accountService, spotPrice, amount, MarketType.SPOT.name())) { + log.warn("[STRATEGY] Insufficient balance in spot account."); + return; + } + if (!checkAvailableBalance( + accountService, futuresPrice, amount, MarketType.FUTURES.name())) { + log.warn("[STRATEGY] Insufficient balance in futures account."); + return; + } + + if (!addSpotOrderWaitFill( + spotService, SPOT_SYMBOL, MarketSide.BUY.name(), amount, spotPrice)) { + log.warn("[STRATEGY] Failed to execute spot order."); + return; + } + if (!addFuturesOrderWaitFill( + futuresService, FUTURES_SYMBOL, MarketSide.SELL.name(), futuresAmount, futuresPrice)) { + log.warn("[STRATEGY] Failed to execute futures order."); + return; + } + + } else { + log.info( + "[STRATEGY] Negative funding rate. Executing SHORT margin and LONG futures arbitrage."); + + if (!checkAvailableBalance(accountService, spotPrice, amount, MarketType.MARGIN.name())) { + log.warn("[STRATEGY] Insufficient balance in margin account."); + return; + } + if (!checkAvailableBalance( + accountService, futuresPrice, amount, MarketType.FUTURES.name())) { + log.warn("[STRATEGY] Insufficient balance in futures account."); + return; + } + + if (!addMarginOrderWaitFill(marginService, SPOT_SYMBOL, amount, spotPrice)) { + log.warn("[STRATEGY] Failed to execute margin order."); + return; + } + if (!addFuturesOrderWaitFill( + futuresService, FUTURES_SYMBOL, MarketSide.BUY.name(), futuresAmount, futuresPrice)) { + log.warn("[STRATEGY] Failed to execute futures order."); + return; + } + } + + log.info("[STRATEGY] Arbitrage execution completed successfully."); + + } catch (Exception e) { + log.error("[STRATEGY] Error executing arbitrage strategy: {}", e.getMessage(), e); + } + } + + /** + * Places a spot order and waits for it to be filled. + * + * @return true if the order was filled, false if it was cancelled or failed. + */ + public static boolean addSpotOrderWaitFill( + SpotService spotService, String symbol, String side, double amount, double price) { + com.kucoin.universal.sdk.generate.spot.order.AddOrderSyncReq orderReq = + com.kucoin.universal.sdk.generate.spot.order.AddOrderSyncReq.builder() + .clientOid(UUID.randomUUID().toString()) + .side( + side.equals(MarketSide.BUY.name()) + ? com.kucoin.universal.sdk.generate.spot.order.AddOrderSyncReq.SideEnum.BUY + : com.kucoin.universal.sdk.generate.spot.order.AddOrderSyncReq.SideEnum.SELL) + .symbol(symbol) + .type(com.kucoin.universal.sdk.generate.spot.order.AddOrderSyncReq.TypeEnum.LIMIT) + .remark("arbitrage") + .price(String.format("%.4f", price)) + .size(String.format("%.4f", amount)) + .build(); + + com.kucoin.universal.sdk.generate.spot.order.AddOrderSyncResp orderResp = + spotService.getOrderApi().addOrderSync(orderReq); + + log.info( + "[SPOT ORDER] Placed {} order for {} {} at {}. Order ID: {}", + side.toUpperCase(), + amount, + symbol, + price, + orderResp.getOrderId()); + + double deadline = System.currentTimeMillis() / 1000.0 + MAX_PLACE_ORDER_WAIT_TIME_SEC; + + while (System.currentTimeMillis() / 1000.0 < deadline) { + try { + Thread.sleep(1000); + log.info("[SPOT ORDER] Checking order status..."); + + com.kucoin.universal.sdk.generate.spot.order.GetOrderByOrderIdReq detailReq = + com.kucoin.universal.sdk.generate.spot.order.GetOrderByOrderIdReq.builder() + .symbol(symbol) + .orderId(orderResp.getOrderId()) + .build(); + + com.kucoin.universal.sdk.generate.spot.order.GetOrderByOrderIdResp orderDetail = + spotService.getOrderApi().getOrderByOrderId(detailReq); + + if (!orderDetail.getActive()) { + log.info( + "[SPOT ORDER] Order filled successfully: {} {} {}. Order ID: {}", + side.toUpperCase(), + amount, + symbol, + orderResp.getOrderId()); + return true; + } + } catch (InterruptedException e) { + log.error("[SPOT ORDER] Sleep interrupted: {}", e.getMessage(), e); + break; + } + } + + log.warn( + "[SPOT ORDER] Order not filled within {} seconds. Cancelling order...", + MAX_PLACE_ORDER_WAIT_TIME_SEC); + + com.kucoin.universal.sdk.generate.spot.order.CancelOrderByOrderIdSyncReq cancelReq = + com.kucoin.universal.sdk.generate.spot.order.CancelOrderByOrderIdSyncReq.builder() + .orderId(orderResp.getOrderId()) + .symbol(symbol) + .build(); + + com.kucoin.universal.sdk.generate.spot.order.CancelOrderByOrderIdSyncResp cancelResp = + spotService.getOrderApi().cancelOrderByOrderIdSync(cancelReq); + + if (cancelResp.getStatus() + != com.kucoin.universal.sdk.generate.spot.order.CancelOrderByOrderIdSyncResp.StatusEnum + .DONE) { + throw new RuntimeException( + "[SPOT ORDER] Failed to cancel order. Order ID: " + orderResp.getOrderId()); + } + + log.info("[SPOT ORDER] Order cancelled successfully. Order ID: {}", orderResp.getOrderId()); + return false; + } + + /** + * Places a futures order and waits for it to be filled. + * + * @return true if the order was filled, false if cancelled or failed. + */ + public static boolean addFuturesOrderWaitFill( + FuturesService futuresService, String symbol, String side, int amount, double price) { + com.kucoin.universal.sdk.generate.futures.order.AddOrderReq orderReq = + com.kucoin.universal.sdk.generate.futures.order.AddOrderReq.builder() + .clientOid(UUID.randomUUID().toString()) + .side( + side.equals(MarketSide.BUY.name()) + ? com.kucoin.universal.sdk.generate.futures.order.AddOrderReq.SideEnum.BUY + : com.kucoin.universal.sdk.generate.futures.order.AddOrderReq.SideEnum.SELL) + .symbol(symbol) + .type(com.kucoin.universal.sdk.generate.futures.order.AddOrderReq.TypeEnum.LIMIT) + .marginMode( + com.kucoin.universal.sdk.generate.futures.order.AddOrderReq.MarginModeEnum.CROSS) + .remark("arbitrage") + .price(String.format("%.4f", price)) + .leverage(1) + .size(amount) + .build(); + + com.kucoin.universal.sdk.generate.futures.order.AddOrderResp orderResp = + futuresService.getOrderApi().addOrder(orderReq); + + log.info( + "[FUTURES ORDER] Placed {} order for {} {} at {}. Order ID: {}", + side.toUpperCase(), + amount, + symbol, + price, + orderResp.getOrderId()); + + double deadline = System.currentTimeMillis() / 1000.0 + MAX_PLACE_ORDER_WAIT_TIME_SEC; + + while (System.currentTimeMillis() / 1000.0 < deadline) { + try { + Thread.sleep(1000); + log.info("[FUTURES ORDER] Checking order status..."); + + com.kucoin.universal.sdk.generate.futures.order.GetOrderByOrderIdReq detailReq = + com.kucoin.universal.sdk.generate.futures.order.GetOrderByOrderIdReq.builder() + .orderId(orderResp.getOrderId()) + .build(); + + com.kucoin.universal.sdk.generate.futures.order.GetOrderByOrderIdResp orderDetail = + futuresService.getOrderApi().getOrderByOrderId(detailReq); + + if (orderDetail.getStatus() + == com.kucoin.universal.sdk.generate.futures.order.GetOrderByOrderIdResp.StatusEnum + .DONE) { + log.info( + "[FUTURES ORDER] Order filled successfully: {} {} {}. Order ID: {}", + side.toUpperCase(), + amount, + symbol, + orderResp.getOrderId()); + return true; + } + } catch (InterruptedException e) { + log.error("[FUTURES ORDER] Sleep interrupted: {}", e.getMessage(), e); + break; + } + } + + log.warn( + "[FUTURES ORDER] Order not filled within {} seconds. Cancelling order...", + MAX_PLACE_ORDER_WAIT_TIME_SEC); + + com.kucoin.universal.sdk.generate.futures.order.CancelOrderByIdReq cancelReq = + com.kucoin.universal.sdk.generate.futures.order.CancelOrderByIdReq.builder() + .orderId(orderResp.getOrderId()) + .build(); + + com.kucoin.universal.sdk.generate.futures.order.CancelOrderByIdResp cancelResp = + futuresService.getOrderApi().cancelOrderById(cancelReq); + + if (!cancelResp.getCancelledOrderIds().contains(orderResp.getOrderId())) { + throw new RuntimeException( + "[FUTURES ORDER] Failed to cancel order. Order ID: " + orderResp.getOrderId()); + } + + log.info("[FUTURES ORDER] Order cancelled successfully. Order ID: {}", orderResp.getOrderId()); + return false; + } + + /** + * Places a margin (cross) order and waits for it to be filled. + * + * @return true if the order was filled, false if cancelled or failed. + */ + public static boolean addMarginOrderWaitFill( + MarginService marginService, String symbol, double amount, double price) { + com.kucoin.universal.sdk.generate.margin.order.AddOrderReq orderReq = + com.kucoin.universal.sdk.generate.margin.order.AddOrderReq.builder() + .clientOid(UUID.randomUUID().toString()) + .side(com.kucoin.universal.sdk.generate.margin.order.AddOrderReq.SideEnum.BUY) + .symbol(symbol) + .type(com.kucoin.universal.sdk.generate.margin.order.AddOrderReq.TypeEnum.LIMIT) + .isIsolated(false) + .autoBorrow(true) + .autoRepay(true) + .price(String.format("%.4f", price)) + .size(String.format("%.4f", amount)) + .build(); + + com.kucoin.universal.sdk.generate.margin.order.AddOrderResp orderResp = + marginService.getOrderApi().addOrder(orderReq); + + log.info( + "[MARGIN ORDER] Placed BUY order for {} {} at {}. Order ID: {}", + amount, + symbol, + price, + orderResp.getOrderId()); + + double deadline = System.currentTimeMillis() / 1000.0 + MAX_PLACE_ORDER_WAIT_TIME_SEC; + + while (System.currentTimeMillis() / 1000.0 < deadline) { + try { + Thread.sleep(1000); + log.info("[MARGIN ORDER] Checking order status..."); + + com.kucoin.universal.sdk.generate.margin.order.GetOrderByOrderIdReq detailReq = + com.kucoin.universal.sdk.generate.margin.order.GetOrderByOrderIdReq.builder() + .symbol(symbol) + .orderId(orderResp.getOrderId()) + .build(); + + com.kucoin.universal.sdk.generate.margin.order.GetOrderByOrderIdResp orderDetail = + marginService.getOrderApi().getOrderByOrderId(detailReq); + + if (!orderDetail.getActive()) { + log.info( + "[MARGIN ORDER] Order filled successfully: BUY {} {}. Order ID: {}", + amount, + symbol, + orderResp.getOrderId()); + return true; + } + } catch (InterruptedException e) { + log.error("[MARGIN ORDER] Sleep interrupted: {}", e.getMessage(), e); + break; + } + } + + log.warn( + "[MARGIN ORDER] Order not filled within {} seconds. Cancelling order...", + MAX_PLACE_ORDER_WAIT_TIME_SEC); + + com.kucoin.universal.sdk.generate.margin.order.CancelOrderByOrderIdReq cancelReq = + com.kucoin.universal.sdk.generate.margin.order.CancelOrderByOrderIdReq.builder() + .orderId(orderResp.getOrderId()) + .symbol(symbol) + .build(); + + com.kucoin.universal.sdk.generate.margin.order.CancelOrderByOrderIdResp cancelResp = + marginService.getOrderApi().cancelOrderByOrderId(cancelReq); + + if (cancelResp.getOrderId() == null) { + throw new RuntimeException( + "[MARGIN ORDER] Failed to cancel order. Order ID: " + orderResp.getOrderId()); + } + + log.info("[MARGIN ORDER] Order cancelled successfully. Order ID: {}", orderResp.getOrderId()); + return false; + } + + public static void main(String[] args) { + log.info("Initializing APIs..."); + + KucoinClient client = initClient(); + FuturesService futuresService = client.getRestService().getFuturesService(); + SpotService spotService = client.getRestService().getSpotService(); + MarginService marginService = client.getRestService().getMarginService(); + AccountService accountService = client.getRestService().getAccountService(); + + double amount = 100.0; // Amount to trade + double threshold = 0.005; // 0.5% minimum funding rate difference + + log.info("Starting funding rate arbitrage strategy..."); + try { + fundingRateArbitrageStrategy( + futuresService, spotService, marginService, accountService, amount, threshold); + } catch (Exception e) { + log.error("Error running arbitrage strategy: {}", e.getMessage(), e); + } + } +} diff --git a/sdk/java/example/src/main/java/com/kucoin/example/ExampleGetStarted.java b/sdk/java/example/src/main/java/com/kucoin/example/ExampleGetStarted.java new file mode 100644 index 00000000..5339bfe2 --- /dev/null +++ b/sdk/java/example/src/main/java/com/kucoin/example/ExampleGetStarted.java @@ -0,0 +1,71 @@ +package com.kucoin.example; + +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.api.KucoinRestService; +import com.kucoin.universal.sdk.generate.spot.market.GetPartOrderBookReq; +import com.kucoin.universal.sdk.generate.spot.market.GetPartOrderBookResp; +import com.kucoin.universal.sdk.generate.spot.market.MarketApi; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class ExampleGetStarted { + + public static String stringifyDepth(List> depth) { + return depth.stream() + .map(row -> "[" + String.join(", ", row) + "]") + .collect(Collectors.joining(", ")); + } + + public static void example() { + // Retrieve API secret information from environment variables + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + // Set specific options, others will fall back to default values + TransportOption httpTransportOption = TransportOption.builder().keepAlive(true).build(); + + // Create a client using the specified options + ClientOption clientOption = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransportOption) + .build(); + + KucoinClient client = new DefaultKucoinClient(clientOption); + + // Get the Restful Service + KucoinRestService kucoinRestService = client.getRestService(); + + MarketApi spotMarketApi = kucoinRestService.getSpotService().getMarketApi(); + + // Query partial order book depth data (aggregated by price). + // Build the request using the builder pattern. + GetPartOrderBookReq request = + GetPartOrderBookReq.builder().symbol("BTC-USDT").size("20").build(); + + GetPartOrderBookResp response = spotMarketApi.getPartOrderBook(request); + + log.info( + "time={}, sequence={}, bids={}, asks={}", + response.getTime(), + response.getSequence(), + stringifyDepth(response.getBids()), + stringifyDepth(response.getAsks())); + } + + public static void main(String[] args) { + example(); + } +} diff --git a/sdk/java/example/src/main/java/com/kucoin/example/ExampleMAStrategy.java b/sdk/java/example/src/main/java/com/kucoin/example/ExampleMAStrategy.java new file mode 100644 index 00000000..2a281c27 --- /dev/null +++ b/sdk/java/example/src/main/java/com/kucoin/example/ExampleMAStrategy.java @@ -0,0 +1,251 @@ +package com.kucoin.example; + +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.api.KucoinRestService; +import com.kucoin.universal.sdk.generate.account.account.AccountApi; +import com.kucoin.universal.sdk.generate.account.account.GetSpotAccountListData; +import com.kucoin.universal.sdk.generate.account.account.GetSpotAccountListReq; +import com.kucoin.universal.sdk.generate.account.account.GetSpotAccountListResp; +import com.kucoin.universal.sdk.generate.spot.market.Get24hrStatsReq; +import com.kucoin.universal.sdk.generate.spot.market.Get24hrStatsResp; +import com.kucoin.universal.sdk.generate.spot.market.GetKlinesReq; +import com.kucoin.universal.sdk.generate.spot.market.GetKlinesResp; +import com.kucoin.universal.sdk.generate.spot.market.MarketApi; +import com.kucoin.universal.sdk.generate.spot.order.AddOrderSyncReq; +import com.kucoin.universal.sdk.generate.spot.order.AddOrderSyncResp; +import com.kucoin.universal.sdk.generate.spot.order.CancelAllOrdersBySymbolReq; +import com.kucoin.universal.sdk.generate.spot.order.CancelAllOrdersBySymbolResp; +import com.kucoin.universal.sdk.generate.spot.order.GetOpenOrdersReq; +import com.kucoin.universal.sdk.generate.spot.order.GetOpenOrdersResp; +import com.kucoin.universal.sdk.generate.spot.order.OrderApi; +import com.kucoin.universal.sdk.generate.spot.order.SetDCPReq; +import com.kucoin.universal.sdk.generate.spot.order.SetDCPResp; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import lombok.extern.slf4j.Slf4j; + +/** + * DISCLAIMER: This strategy is provided for educational and illustrative purposes only. It is not + * intended to be used as financial or investment advice. Trading cryptocurrencies involves + * significant risk, and you should carefully consider your investment objectives, level of + * experience, and risk appetite. Past performance of any trading strategy is not indicative of + * future results. + * + *

The authors and contributors of this example are not responsible for any financial losses or + * damages that may occur from using this code. Use it at your own discretion and consult with a + * professional financial advisor if necessary. + */ +@Slf4j +public class ExampleMAStrategy { + + public enum Action { + BUY, + SELL, + SKIP + } + + public static String simpleMovingAverageStrategy( + MarketApi marketApi, String symbol, int shortWindow, int longWindow, Long endTime) { + Long startTime = endTime - longWindow * 60L; + log.info( + "Query kline data start Time: {}, end Time: {}", + new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss") + .format(new java.util.Date(startTime * 1000L)), + new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss") + .format(new java.util.Date(endTime * 1000L))); + + GetKlinesReq getKlineReq = + GetKlinesReq.builder() + .symbol(symbol) + .type(GetKlinesReq.TypeEnum._1MIN) + .startAt(startTime) + .endAt(endTime) + .build(); + + GetKlinesResp klineResp = marketApi.getKlines(getKlineReq); + + List prices = new ArrayList<>(); + for (List kline : klineResp.getData()) { + prices.add(Double.parseDouble(kline.get(2))); + } + + double shortMA = + prices.subList(prices.size() - shortWindow, prices.size()).stream() + .mapToDouble(Double::doubleValue) + .sum() + / shortWindow; + double longMA = + prices.subList(prices.size() - longWindow, prices.size()).stream() + .mapToDouble(Double::doubleValue) + .sum() + / longWindow; + + log.info("Short MA: {}, Long MA: {}", shortMA, longMA); + + if (shortMA > longMA) { + log.info("{}: Short MA > Long MA. Should place a BUY order.", symbol); + return Action.BUY.name(); + } else if (shortMA < longMA) { + log.info("{}: Short MA < Long MA. Should place a SELL order.", symbol); + return Action.SELL.name(); + } else { + return Action.SKIP.name(); + } + } + + public static double getLastTradePrice(MarketApi marketApi, String symbol) { + Get24hrStatsReq req = Get24hrStatsReq.builder().symbol(symbol).build(); + Get24hrStatsResp resp = marketApi.get24hrStats(req); + return Double.parseDouble(resp.getLast()); + } + + public static boolean checkAvailableBalance( + AccountApi accountApi, double lastPrice, double amount, String action) { + double tradeValue = lastPrice * amount; + String currency = action.equals(Action.BUY.name()) ? "USDT" : "DOGE"; + log.info("Checking balance for currency: {}", currency); + + GetSpotAccountListReq req = + GetSpotAccountListReq.builder() + .type(GetSpotAccountListReq.TypeEnum.TRADE) + .currency(currency) + .build(); + GetSpotAccountListResp resp = accountApi.getSpotAccountList(req); + + double available = 0.0; + for (GetSpotAccountListData acc : resp.getData()) { + available += Double.parseDouble(acc.getAvailable()); + } + + log.info("Available {} balance: {}", currency, available); + + if (action.equals(Action.BUY.name())) { + if (tradeValue <= available) { + log.info("Balance is sufficient for the trade: {} {} required.", tradeValue, currency); + return true; + } else { + log.info( + "Insufficient balance: {} {} required, but only {} available.", + tradeValue, + currency, + available); + return false; + } + } else { + return amount <= available; + } + } + + public static void placeOrder( + OrderApi orderApi, + String symbol, + String action, + double lastPrice, + double amount, + double delta) { + GetOpenOrdersReq openOrdersReq = GetOpenOrdersReq.builder().symbol(symbol).build(); + GetOpenOrdersResp openOrdersResp = orderApi.getOpenOrders(openOrdersReq); + + if (!openOrdersResp.getData().isEmpty()) { + CancelAllOrdersBySymbolReq cancelReq = + CancelAllOrdersBySymbolReq.builder().symbol(symbol).build(); + CancelAllOrdersBySymbolResp cancelResp = orderApi.cancelAllOrdersBySymbol(cancelReq); + log.info("Canceled all open orders: {}", cancelResp.getData()); + } + + AddOrderSyncReq.SideEnum side = AddOrderSyncReq.SideEnum.BUY; + double price = lastPrice * (1 - delta); + if (action.equals(Action.SELL.name())) { + side = AddOrderSyncReq.SideEnum.SELL; + price = lastPrice * (1 + delta); + } + + log.info("Placing a {} order at {} for {}", side.name(), price, symbol); + + AddOrderSyncReq orderReq = + AddOrderSyncReq.builder() + .clientOid(UUID.randomUUID().toString()) + .side(side) + .symbol(symbol) + .type(AddOrderSyncReq.TypeEnum.LIMIT) + .remark("ma") + .price(String.format("%.2f", price)) + .size(String.format("%.8f", amount)) + .build(); + + AddOrderSyncResp orderResp = orderApi.addOrderSync(orderReq); + log.info("Order placed successfully with ID: {}", orderResp.getOrderId()); + + SetDCPReq dcpReq = SetDCPReq.builder().symbols(symbol).timeout(30).build(); + SetDCPResp dcpResp = orderApi.setDCP(dcpReq); + log.info( + "DCP set: current_time={}, trigger_time={}", + dcpResp.getCurrentTime(), + dcpResp.getTriggerTime()); + } + + public static void example() { + // Entry point + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption transportOption = TransportOption.builder().keepAlive(true).build(); + + ClientOption clientOption = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(transportOption) + .build(); + + KucoinClient client = new DefaultKucoinClient(clientOption); + KucoinRestService rest = client.getRestService(); + + MarketApi marketApi = rest.getSpotService().getMarketApi(); + OrderApi orderApi = rest.getSpotService().getOrderApi(); + AccountApi accountApi = rest.getAccountService().getAccountApi(); + + final String SYMBOL = "DOGE-USDT"; + final double ORDER_AMOUNT = 10; + final double PRICE_DELTA = 0.1; + + long currentTime = (System.currentTimeMillis() / 1000 / 60) * 60; + + log.info("Starting the moving average strategy using K-line data. Press Ctrl+C to stop."); + while (true) { + String action = simpleMovingAverageStrategy(marketApi, SYMBOL, 10, 30, currentTime); + if (!action.equals(Action.SKIP.name())) { + double lastPrice = getLastTradePrice(marketApi, SYMBOL); + log.info("Last trade price for {}: {}", SYMBOL, lastPrice); + if (checkAvailableBalance(accountApi, lastPrice, ORDER_AMOUNT, action)) { + log.info("Sufficient balance available. Attempting to place the order..."); + placeOrder(orderApi, SYMBOL, action, lastPrice, ORDER_AMOUNT, PRICE_DELTA); + } else { + log.info("Insufficient balance. Skipping the trade..."); + } + } + log.info("Waiting for 1 minute before the next run..."); + try { + Thread.sleep(60 * 1000); + } catch (InterruptedException e) { + log.error("Sleep interrupted", e); + break; + } + currentTime += 60; + } + } + + public static void main(String[] args) { + example(); + } +} diff --git a/sdk/java/example/src/main/java/com/kucoin/example/ExampleRealtimeKline.java b/sdk/java/example/src/main/java/com/kucoin/example/ExampleRealtimeKline.java new file mode 100644 index 00000000..649135b7 --- /dev/null +++ b/sdk/java/example/src/main/java/com/kucoin/example/ExampleRealtimeKline.java @@ -0,0 +1,160 @@ +package com.kucoin.example; + +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.spot.spotpublic.SpotPublicWs; +import com.kucoin.universal.sdk.generate.spot.spotpublic.TradeEvent; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import com.kucoin.universal.sdk.model.WebSocketClientOption; +import java.util.HashMap; +import java.util.Map; +import lombok.Data; +import lombok.extern.slf4j.Slf4j; + +/** + * DISCLAIMER: This strategy is provided for educational and illustrative purposes only. It is not + * intended to be used as financial or investment advice. Trading cryptocurrencies involves + * significant risk, and you should carefully consider your investment objectives, level of + * experience, and risk appetite. Past performance of any trading strategy is not indicative of + * future results. + * + *

The authors and contributors of this example are not responsible for any financial losses or + * damages that may occur from using this code. Use it at your own discretion and consult with a + * professional financial advisor if necessary. + */ +@Slf4j +public class ExampleRealtimeKline { + + // === KLine definition === + @Data + public static class KLine { + private double open; + private double high; + private double low; + private double close; + private double volume; + private int startTime; + private int endTime; + + public KLine(double price, double size, int startTime, int endTime) { + this.open = price; + this.high = price; + this.low = price; + this.close = price; + this.volume = size; + this.startTime = startTime; + this.endTime = endTime; + } + + public void update(double price, double size) { + this.high = Math.max(this.high, price); + this.low = Math.min(this.low, price); + this.close = price; + this.volume += size; + } + } + + // === Global data === + private static final int TIME_INTERVAL = 60; // seconds + private static final Map> klineData = new HashMap<>(); + + public static void processTradeToKline(String topic, String subject, TradeEvent tradeEvent) { + String symbol = tradeEvent.getSymbol(); + double price = Double.parseDouble(tradeEvent.getPrice()); + double size = Double.parseDouble(tradeEvent.getSize()); + int timestamp = (int) (Long.parseLong(tradeEvent.getTime()) / 1_000_000_000L); + + int periodStart = Math.floorDiv(timestamp, TIME_INTERVAL) * TIME_INTERVAL; + int periodEnd = periodStart + TIME_INTERVAL; + + klineData.computeIfAbsent(periodStart, k -> new HashMap<>()); + klineData + .get(periodStart) + .computeIfAbsent(symbol, s -> new KLine(price, size, periodStart, periodEnd)) + .update(price, size); + + log.info( + "KLine @{} [{}]: O={} H={} L={} C={} V={}", + new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX") + .format(new java.util.Date(periodStart * 1000L)), + symbol, + klineData.get(periodStart).get(symbol).getOpen(), + klineData.get(periodStart).get(symbol).getHigh(), + klineData.get(periodStart).get(symbol).getLow(), + klineData.get(periodStart).get(symbol).getClose(), + klineData.get(periodStart).get(symbol).getVolume()); + } + + public static void printKlineData() { + klineData.keySet().stream() + .sorted() + .forEach( + periodStart -> { + System.out.println( + "\nTime Period: " + + new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX") + .format(new java.util.Date(periodStart * 1000L))); + Map symbols = klineData.get(periodStart); + symbols.keySet().stream() + .sorted() + .forEach( + symbol -> { + KLine kline = symbols.get(symbol); + System.out.println(" Symbol: " + symbol); + System.out.println(" Open: " + kline.getOpen()); + System.out.println(" High: " + kline.getHigh()); + System.out.println(" Low: " + kline.getLow()); + System.out.println(" Close: " + kline.getClose()); + System.out.println(" Volume: " + kline.getVolume()); + System.out.println( + " Start Time: " + + new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX") + .format(new java.util.Date(kline.getStartTime() * 1000L))); + System.out.println( + " End Time: " + + new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX") + .format(new java.util.Date(kline.getEndTime() * 1000L))); + }); + }); + } + + public static void main(String[] args) throws Exception { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpOption = TransportOption.builder().keepAlive(true).build(); + WebSocketClientOption wsOption = WebSocketClientOption.defaults(); + + ClientOption clientOption = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpOption) + .websocketClientOption(wsOption) + .build(); + + KucoinClient client = new DefaultKucoinClient(clientOption); + SpotPublicWs spotWs = client.getWsService().newSpotPublicWS(); + spotWs.start(); + + String[] symbols = {"BTC-USDT", "ETH-USDT"}; + String subId = spotWs.trade(symbols, ExampleRealtimeKline::processTradeToKline); + + log.info("Subscribed with ID: {}", subId); + Thread.sleep(180 * 1000); + + log.info("Unsubscribing..."); + spotWs.unSubscribe(subId); + spotWs.stop(); + + printKlineData(); + } +} diff --git a/sdk/java/example/src/main/java/com/kucoin/example/ExampleSign.java b/sdk/java/example/src/main/java/com/kucoin/example/ExampleSign.java new file mode 100644 index 00000000..1ddfaa9f --- /dev/null +++ b/sdk/java/example/src/main/java/com/kucoin/example/ExampleSign.java @@ -0,0 +1,157 @@ +package com.kucoin.example; + +import com.fasterxml.jackson.databind.ObjectMapper; +import java.net.URI; +import java.net.URLEncoder; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.Base64; +import java.util.Map; +import java.util.UUID; +import java.util.stream.Stream; +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class ExampleSign { + + public static class KcSigner { + private final String apiKey; + private final String apiSecret; + private String apiPassphrase; + + public KcSigner(String apiKey, String apiSecret, String apiPassphrase) { + this.apiKey = apiKey != null ? apiKey : ""; + this.apiSecret = apiSecret != null ? apiSecret : ""; + this.apiPassphrase = apiPassphrase != null ? apiPassphrase : ""; + + if (!this.apiSecret.isEmpty() && !this.apiPassphrase.isEmpty()) { + this.apiPassphrase = sign(apiPassphrase, apiSecret); + } + + if (this.apiKey.isEmpty() || this.apiSecret.isEmpty() || this.apiPassphrase.isEmpty()) { + log.warn("Warning: API credentials are empty. Public endpoints only."); + } + } + + private String sign(String plain, String key) { + try { + Mac mac = Mac.getInstance("HmacSHA256"); + SecretKeySpec secretKey = + new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "HmacSHA256"); + mac.init(secretKey); + byte[] hash = mac.doFinal(plain.getBytes(StandardCharsets.UTF_8)); + return Base64.getEncoder().encodeToString(hash); + } catch (Exception e) { + log.error("Error signing data: {}", e.getMessage(), e); + return ""; + } + } + + public Map headers(String payload) { + String timestamp = String.valueOf(System.currentTimeMillis()); + String signature = sign(timestamp + payload, apiSecret); + + return Map.of( + "KC-API-KEY", apiKey, + "KC-API-PASSPHRASE", apiPassphrase, + "KC-API-TIMESTAMP", timestamp, + "KC-API-SIGN", signature, + "KC-API-KEY-VERSION", "3", + "Content-Type", "application/json"); + } + } + + public static Map processHeaders( + KcSigner signer, String body, String rawUrl, String method) { + String payload = method + rawUrl + body; + return signer.headers(payload); + } + + public static void getTradeFees(KcSigner signer, HttpClient client) { + String endpoint = "https://api.kucoin.com"; + String path = "/api/v1/trade-fees"; + String method = "GET"; + String query = "symbols=" + URLEncoder.encode("BTC-USDT", StandardCharsets.UTF_8); + String rawUrl = path + "?" + query; + String url = endpoint + rawUrl; + + Map headers = processHeaders(signer, "", rawUrl, method); + + try { + HttpRequest request = + HttpRequest.newBuilder() + .uri(URI.create(url)) + .method(method, HttpRequest.BodyPublishers.noBody()) + .headers( + headers.entrySet().stream() + .flatMap(e -> Stream.of(e.getKey(), e.getValue())) + .toArray(String[]::new)) + .build(); + + HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); + log.info("{}", response.body()); + } catch (Exception e) { + log.error("Error fetching trade fees: {}", e.getMessage(), e); + } + } + + public static void addLimitOrder(KcSigner signer, HttpClient client) { + String endpoint = "https://api.kucoin.com"; + String path = "/api/v1/hf/orders"; + String method = "POST"; + String url = endpoint + path; + String rawUrl = path; + + Map bodyData = + Map.of( + "clientOid", UUID.randomUUID().toString(), + "side", "buy", + "symbol", "BTC-USDT", + "type", "limit", + "price", "10000", + "size", "0.001"); + + String bodyJson; + try { + bodyJson = new ObjectMapper().writeValueAsString(bodyData); + } catch (Exception e) { + log.error("Error serializing body: {}", e.getMessage(), e); + return; + } + + Map headers = processHeaders(signer, bodyJson, rawUrl, method); + + try { + HttpRequest request = + HttpRequest.newBuilder() + .uri(URI.create(url)) + .method(method, HttpRequest.BodyPublishers.ofString(bodyJson)) + .headers( + headers.entrySet().stream() + .flatMap(e -> Stream.of(e.getKey(), e.getValue())) + .toArray(String[]::new)) + .build(); + + HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); + log.info("{}", response.body()); + } catch (Exception e) { + log.error("Error placing limit order: {}", e.getMessage(), e); + } + } + + public static void main(String[] args) { + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + KcSigner signer = new KcSigner(key, secret, passphrase); + HttpClient client = HttpClient.newHttpClient(); + + getTradeFees(signer, client); + addLimitOrder(signer, client); + } +} diff --git a/sdk/java/example/src/main/java/com/kucoin/example/ExampleWs.java b/sdk/java/example/src/main/java/com/kucoin/example/ExampleWs.java new file mode 100644 index 00000000..3c3e37e9 --- /dev/null +++ b/sdk/java/example/src/main/java/com/kucoin/example/ExampleWs.java @@ -0,0 +1,72 @@ +package com.kucoin.example; + +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.spot.spotpublic.SpotPublicWs; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import com.kucoin.universal.sdk.model.WebSocketClientOption; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class ExampleWs { + + public static void wsExample() throws Exception { + // Credentials & setup + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + String brokerName = System.getenv("BROKER_NAME"); + String brokerKey = System.getenv("BROKER_KEY"); + String brokerPartner = System.getenv("BROKER_PARTNER"); + + TransportOption httpTransportOption = TransportOption.builder().keepAlive(true).build(); + + WebSocketClientOption websocketTransportOption = WebSocketClientOption.defaults(); + + ClientOption clientOption = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .brokerName(brokerName) + .brokerKey(brokerKey) + .brokerPartner(brokerPartner) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransportOption) + .websocketClientOption(websocketTransportOption) + .build(); + + KucoinClient client = new DefaultKucoinClient(clientOption); + SpotPublicWs spotWs = client.getWsService().newSpotPublicWS(); + + spotWs.start(); + log.info("WebSocket started"); + + String subId = + spotWs.allTickers( + (topic, subject, event) -> { + log.info( + "Ticker update: topic={}, subject={}, bestBid={}, bestAsk={}", + topic, + subject, + event.getBestBid(), + event.getBestAsk()); + }); + log.info("Subscribed with ID: {}", subId); + Thread.sleep(5000); + + log.info("Unsubscribing..."); + spotWs.unSubscribe(subId); + spotWs.stop(); + log.info("Done"); + } + + public static void main(String[] args) throws Exception { + wsExample(); + } +} diff --git a/sdk/java/example/src/main/java/com/kucoin/test/regression/RunForeverTest.java b/sdk/java/example/src/main/java/com/kucoin/test/regression/RunForeverTest.java new file mode 100644 index 00000000..46fc5b71 --- /dev/null +++ b/sdk/java/example/src/main/java/com/kucoin/test/regression/RunForeverTest.java @@ -0,0 +1,138 @@ +package com.kucoin.test.regression; + +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.api.KucoinWSService; +import com.kucoin.universal.sdk.generate.spot.market.GetAllSymbolsReq; +import com.kucoin.universal.sdk.generate.spot.market.GetAllSymbolsResp; +import com.kucoin.universal.sdk.generate.spot.market.MarketApi; +import com.kucoin.universal.sdk.generate.spot.spotpublic.SpotPublicWs; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import com.kucoin.universal.sdk.model.WebSocketClientOption; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import lombok.extern.slf4j.Slf4j; + +/** + * Runner class to periodically fetch market data, manage WebSocket subscriptions, and track + * statistics. + */ +@Slf4j +public class RunForeverTest { + + private static final double STEP = 5.0; // seconds + + private AtomicInteger wsMsgCnt = new AtomicInteger(0); + private AtomicInteger wsErrCnt = new AtomicInteger(0); + private AtomicInteger mkErrCnt = new AtomicInteger(0); + + private final KucoinWSService wsSvc; + private final MarketApi marketApi; + private final ScheduledExecutorService executor; + + public RunForeverTest() { + this.executor = Executors.newScheduledThreadPool(Runtime.getRuntime().availableProcessors()); + ClientOption clientOption = + ClientOption.builder() + .key(System.getenv("API_KEY")) + .secret(System.getenv("API_SECRET")) + .passphrase(System.getenv("API_PASSPHRASE")) + .transportOption(TransportOption.builder().keepAlive(true).build()) + .websocketClientOption(WebSocketClientOption.defaults()) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .build(); + + KucoinClient client = new DefaultKucoinClient(clientOption); + this.wsSvc = client.getWsService(); + this.marketApi = client.getRestService().getSpotService().getMarketApi(); + } + + public void run() { + try { + marketLoop(); + wsForever(); + wsStartStopLoop(); + statLoop(); + + // Keep the application running + CountDownLatch latch = new CountDownLatch(1); + latch.await(); + } catch (InterruptedException e) { + log.error("Main thread interrupted", e); + Thread.currentThread().interrupt(); + } finally { + executor.shutdown(); + } + } + + private void marketLoop() { + executor.scheduleAtFixedRate( + () -> { + try { + GetAllSymbolsResp resp = + marketApi.getAllSymbols(GetAllSymbolsReq.builder().market("USDS").build()); + log.info("MARKET API [OK] {}", resp.getData().size()); + } catch (Exception e) { + mkErrCnt.incrementAndGet(); + log.info("MARKET API [ERROR] " + e.getMessage()); + } + }, + 0, + (long) STEP, + TimeUnit.SECONDS); + } + + private void wsForever() { + SpotPublicWs ws = wsSvc.newSpotPublicWS(); + ws.start(); + ws.orderbookLevel50( + new String[] {"ETH-USDT", "BTC-USDT"}, (____, __, ___) -> wsMsgCnt.incrementAndGet()); + } + + private void wsStartStopLoop() { + executor.scheduleAtFixedRate( + () -> { + try { + + SpotPublicWs ws = wsSvc.newSpotPublicWS(); + ws.start(); + String id = ws.ticker(new String[] {"ETH-USDT", "BTC-USDT"}, (__, ___, ____) -> {}); + Thread.sleep(1000); + ws.unSubscribe(id); + ws.stop(); + log.info("WS START/STOP [OK]"); + } catch (Exception e) { + wsErrCnt.incrementAndGet(); + log.info("WS START/STOP [ERROR] " + e.getMessage()); + } + }, + 0, + (long) STEP, + TimeUnit.SECONDS); + } + + private void statLoop() { + executor.scheduleAtFixedRate( + () -> { + log.info( + "Stat Market_ERR:{} WS_SS_ERR:{} WS_MSG:{}", + mkErrCnt.get(), + wsErrCnt.get(), + wsMsgCnt.get()); + }, + 0, + (long) STEP, + TimeUnit.SECONDS); + } + + public static void main(String[] args) { + new RunForeverTest().run(); + } +} diff --git a/sdk/java/example/src/main/java/com/kucoin/test/regression/RunReconnectTest.java b/sdk/java/example/src/main/java/com/kucoin/test/regression/RunReconnectTest.java new file mode 100644 index 00000000..12fef7bd --- /dev/null +++ b/sdk/java/example/src/main/java/com/kucoin/test/regression/RunReconnectTest.java @@ -0,0 +1,90 @@ +package com.kucoin.test.regression; + +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.api.KucoinRestService; +import com.kucoin.universal.sdk.api.KucoinWSService; +import com.kucoin.universal.sdk.generate.futures.futurespublic.FuturesPublicWs; +import com.kucoin.universal.sdk.generate.spot.market.GetAllSymbolsData; +import com.kucoin.universal.sdk.generate.spot.market.GetAllSymbolsReq; +import com.kucoin.universal.sdk.generate.spot.spotpublic.SpotPublicWs; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import com.kucoin.universal.sdk.model.WebSocketClientOption; +import java.util.List; +import java.util.concurrent.CountDownLatch; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; + +/** Runs a WebSocket reconnect test, subscribing to spot and futures market data. */ +@Slf4j +public class RunReconnectTest { + + public static void runReconnectTest() { + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + ClientOption clientOption = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .transportOption(TransportOption.builder().build()) + .websocketClientOption(WebSocketClientOption.defaults()) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .build(); + + KucoinClient client = new DefaultKucoinClient(clientOption); + KucoinRestService rest = client.getRestService(); + KucoinWSService wsSvc = client.getWsService(); + + List symbols = + rest + .getSpotService() + .getMarketApi() + .getAllSymbols(GetAllSymbolsReq.builder().market("USDS").build()) + .getData() + .stream() + .map(GetAllSymbolsData::getSymbol) + .limit(50) + .collect(Collectors.toList()); + + spotWsExample(wsSvc.newSpotPublicWS(), symbols); + futuresWsExample(wsSvc.newFuturesPublicWS()); + + log.info("Total subscribe: 53"); + + try { + CountDownLatch latch = new CountDownLatch(1); + latch.await(); + } catch (InterruptedException e) { + log.error("Main thread interrupted", e); + Thread.currentThread().interrupt(); + } + } + + private static void noop(String __, String ___, Object ____) {} + + public static void spotWsExample(SpotPublicWs ws, List symbols) { + ws.start(); + for (String symbol : symbols) { + ws.trade(new String[] {symbol}, RunReconnectTest::noop); + } + ws.ticker(new String[] {"BTC-USDT", "ETH-USDT"}, RunReconnectTest::noop); + } + + public static void futuresWsExample(FuturesPublicWs ws) { + ws.start(); + ws.tickerV2("XBTUSDTM", RunReconnectTest::noop); + ws.tickerV1("XBTUSDTM", RunReconnectTest::noop); + log.info("Futures subscribe [OK]"); + } + + public static void main(String[] args) { + runReconnectTest(); + } +} diff --git a/sdk/java/example/src/main/java/com/kucoin/test/regression/RunServiceTest.java b/sdk/java/example/src/main/java/com/kucoin/test/regression/RunServiceTest.java new file mode 100644 index 00000000..801fea31 --- /dev/null +++ b/sdk/java/example/src/main/java/com/kucoin/test/regression/RunServiceTest.java @@ -0,0 +1,149 @@ +package com.kucoin.test.regression; + +import static org.junit.jupiter.api.Assertions.*; + +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinRestService; +import com.kucoin.universal.sdk.generate.account.fee.GetBasicFeeReq; +import com.kucoin.universal.sdk.generate.account.fee.GetBasicFeeResp; +import com.kucoin.universal.sdk.generate.earn.earn.GetSavingsProductsReq; +import com.kucoin.universal.sdk.generate.earn.earn.GetSavingsProductsResp; +import com.kucoin.universal.sdk.generate.futures.order.AddOrderResp; +import com.kucoin.universal.sdk.generate.futures.order.CancelOrderByIdReq; +import com.kucoin.universal.sdk.generate.service.SpotService; +import com.kucoin.universal.sdk.generate.spot.market.Get24hrStatsReq; +import com.kucoin.universal.sdk.generate.spot.market.Get24hrStatsResp; +import com.kucoin.universal.sdk.generate.spot.order.AddOrderSyncReq; +import com.kucoin.universal.sdk.generate.spot.order.AddOrderSyncResp; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.RestResponse; +import com.kucoin.universal.sdk.model.TransportOption; +import java.util.UUID; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +public class RunServiceTest { + + private static KucoinRestService rest; + + @BeforeAll + public static void setUp() { + ClientOption clientOption = + ClientOption.builder() + .key(System.getenv("API_KEY")) + .secret(System.getenv("API_SECRET")) + .passphrase(System.getenv("API_PASSPHRASE")) + .transportOption(TransportOption.builder().build()) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .build(); + + rest = new DefaultKucoinClient(clientOption).getRestService(); + } + + private static void ok(RestResponse commonResponse) { + assertEquals("200000", commonResponse.getCode()); + assertNotNull(commonResponse.getRateLimit()); + } + + @Test + public void testAccount() { + GetBasicFeeResp response = + rest.getAccountService() + .getFeeApi() + .getBasicFee( + GetBasicFeeReq.builder().currencyType(GetBasicFeeReq.CurrencyTypeEnum._0).build()); + ok(response.getCommonResponse()); + assertNotNull(response.getMakerFeeRate()); + } + + @Test + public void testEarn() { + GetSavingsProductsResp response = + rest.getEarnService() + .getEarnApi() + .getSavingsProducts(GetSavingsProductsReq.builder().currency("USDT").build()); + ok(response.getCommonResponse()); + assertFalse(response.getData().isEmpty()); + } + + @Test + public void testMargin() { + com.kucoin.universal.sdk.generate.margin.order.OrderApi api = + rest.getMarginService().getOrderApi(); + com.kucoin.universal.sdk.generate.margin.order.AddOrderResp add = + api.addOrder( + com.kucoin.universal.sdk.generate.margin.order.AddOrderReq.builder() + .clientOid(UUID.randomUUID().toString()) + .side(com.kucoin.universal.sdk.generate.margin.order.AddOrderReq.SideEnum.BUY) + .symbol("BTC-USDT") + .type(com.kucoin.universal.sdk.generate.margin.order.AddOrderReq.TypeEnum.LIMIT) + .price("10000") + .size("0.001") + .autoRepay(true) + .autoBorrow(true) + .isIsolated(true) + .build()); + ok(add.getCommonResponse()); + + api.cancelOrderByOrderId( + com.kucoin.universal.sdk.generate.margin.order.CancelOrderByOrderIdReq.builder() + .orderId(add.getOrderId()) + .symbol("BTC-USDT") + .build()); + } + + @Test + public void testSpot() { + SpotService spot = rest.getSpotService(); + Get24hrStatsResp marketResponse = + spot.getMarketApi().get24hrStats(Get24hrStatsReq.builder().symbol("BTC-USDT").build()); + ok(marketResponse.getCommonResponse()); + + com.kucoin.universal.sdk.generate.spot.order.OrderApi orderApi = spot.getOrderApi(); + AddOrderSyncResp add = + orderApi.addOrderSync( + AddOrderSyncReq.builder() + .clientOid(UUID.randomUUID().toString()) + .side(AddOrderSyncReq.SideEnum.BUY) + .symbol("BTC-USDT") + .type(AddOrderSyncReq.TypeEnum.LIMIT) + .remark("sdk_test") + .price("10000") + .size("0.001") + .build()); + ok(add.getCommonResponse()); + + orderApi.cancelOrderByOrderId( + com.kucoin.universal.sdk.generate.spot.order.CancelOrderByOrderIdReq.builder() + .orderId(add.getOrderId()) + .symbol("BTC-USDT") + .build()); + } + + @Test + public void testFutures() { + com.kucoin.universal.sdk.generate.futures.order.OrderApi orderApi = + rest.getFuturesService().getOrderApi(); + AddOrderResp add = + orderApi.addOrder( + com.kucoin.universal.sdk.generate.futures.order.AddOrderReq.builder() + .clientOid(UUID.randomUUID().toString()) + .side(com.kucoin.universal.sdk.generate.futures.order.AddOrderReq.SideEnum.BUY) + .symbol("XBTUSDTM") + .leverage(1) + .type(com.kucoin.universal.sdk.generate.futures.order.AddOrderReq.TypeEnum.LIMIT) + .remark("sdk_test") + .marginMode( + com.kucoin.universal.sdk.generate.futures.order.AddOrderReq.MarginModeEnum + .CROSS) + .price("1") + .size(1) + .build()); + ok(add.getCommonResponse()); + + orderApi.cancelOrderById(CancelOrderByIdReq.builder().orderId(add.getOrderId()).build()); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/account/AccountApiTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountApiTest.java similarity index 99% rename from sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/account/AccountApiTest.java rename to sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountApiTest.java index e06cdfaf..0acf4a19 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/account/AccountApiTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountApiTest.java @@ -1,4 +1,4 @@ -package com.kucoin.universal.sdk.e2e.rest.account; +package com.kucoin.universal.sdk.test.e2e.rest.account; import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.api.DefaultKucoinClient; diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountDepositTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountDepositTest.java new file mode 100644 index 00000000..6c241a63 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountDepositTest.java @@ -0,0 +1,222 @@ +package com.kucoin.universal.sdk.test.e2e.rest.account; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.account.account.*; +import com.kucoin.universal.sdk.generate.account.deposit.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class AccountDepositTest { + + private static DepositApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getAccountService().getDepositApi(); + } + + /** addDepositAddressV3 Add Deposit Address (V3) /api/v3/deposit-address/create */ + @Test + public void testAddDepositAddressV3() throws Exception { + AddDepositAddressV3Req.AddDepositAddressV3ReqBuilder builder = AddDepositAddressV3Req.builder(); + builder.currency("BTC").chain("kcc").to(AddDepositAddressV3Req.ToEnum.MAIN).amount("1.0"); + AddDepositAddressV3Req req = builder.build(); + AddDepositAddressV3Resp resp = api.addDepositAddressV3(req); + Assertions.assertNotNull(resp.getAddress()); + Assertions.assertNotNull(resp.getChainId()); + Assertions.assertNotNull(resp.getTo()); + Assertions.assertNotNull(resp.getExpirationDate()); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getChainName()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getDepositAddressV3 Get Deposit Address (V3) /api/v3/deposit-addresses */ + @Test + public void testGetDepositAddressV3() throws Exception { + GetDepositAddressV3Req.GetDepositAddressV3ReqBuilder builder = GetDepositAddressV3Req.builder(); + builder.currency("ETH").amount("10").chain("eth"); + GetDepositAddressV3Req req = builder.build(); + GetDepositAddressV3Resp resp = api.getDepositAddressV3(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getAddress()); + Assertions.assertNotNull(item.getMemo()); + Assertions.assertNotNull(item.getChainId()); + Assertions.assertNotNull(item.getTo()); + Assertions.assertNotNull(item.getExpirationDate()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getContractAddress()); + Assertions.assertNotNull(item.getChainName()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getDepositHistory Get Deposit History /api/v1/deposits */ + @Test + public void testGetDepositHistory() throws Exception { + GetDepositHistoryReq.GetDepositHistoryReqBuilder builder = GetDepositHistoryReq.builder(); + builder.currency("USDT").startAt(1673496371000L).endAt(1705032371000L); + GetDepositHistoryReq req = builder.build(); + GetDepositHistoryResp resp = api.getDepositHistory(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getChain()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getAddress()); + Assertions.assertNotNull(item.getMemo()); + Assertions.assertNotNull(item.getIsInner()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getWalletTxId()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getUpdatedAt()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getArrears()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getDepositAddressV2 Get Deposit Addresses (V2) /api/v2/deposit-addresses */ + @Test + public void testGetDepositAddressV2() throws Exception { + GetDepositAddressV2Req.GetDepositAddressV2ReqBuilder builder = GetDepositAddressV2Req.builder(); + builder.currency("USDT").chain("SOL"); + GetDepositAddressV2Req req = builder.build(); + GetDepositAddressV2Resp resp = api.getDepositAddressV2(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getAddress()); + Assertions.assertNotNull(item.getMemo()); + Assertions.assertNotNull(item.getChain()); + Assertions.assertNotNull(item.getChainId()); + Assertions.assertNotNull(item.getTo()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getContractAddress()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getDepositAddressV1 Get Deposit Addresses - V1 /api/v1/deposit-addresses */ + @Test + public void testGetDepositAddressV1() throws Exception { + GetDepositAddressV1Req.GetDepositAddressV1ReqBuilder builder = GetDepositAddressV1Req.builder(); + builder.currency("USDT").chain("eth"); + GetDepositAddressV1Req req = builder.build(); + GetDepositAddressV1Resp resp = api.getDepositAddressV1(req); + Assertions.assertNotNull(resp.getAddress()); + Assertions.assertNotNull(resp.getMemo()); + Assertions.assertNotNull(resp.getChain()); + Assertions.assertNotNull(resp.getChainId()); + Assertions.assertNotNull(resp.getTo()); + Assertions.assertNotNull(resp.getCurrency()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getDepositHistoryOld Get Deposit History - Old /api/v1/hist-deposits */ + @Test + public void testGetDepositHistoryOld() throws Exception { + GetDepositHistoryOldReq.GetDepositHistoryOldReqBuilder builder = + GetDepositHistoryOldReq.builder(); + builder.startAt(1714492800000L).endAt(1732982400000L); + GetDepositHistoryOldReq req = builder.build(); + GetDepositHistoryOldResp resp = api.getDepositHistoryOld(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getCreateAt()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getWalletTxId()); + Assertions.assertNotNull(item.getIsInner()); + Assertions.assertNotNull(item.getStatus()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** addDepositAddressV1 Add Deposit Address - V1 /api/v1/deposit-addresses */ + @Test + public void testAddDepositAddressV1() throws Exception { + AddDepositAddressV1Req.AddDepositAddressV1ReqBuilder builder = AddDepositAddressV1Req.builder(); + builder.currency("ETH").chain("base").to(AddDepositAddressV1Req.ToEnum.TRADE); + AddDepositAddressV1Req req = builder.build(); + AddDepositAddressV1Resp resp = api.addDepositAddressV1(req); + Assertions.assertNotNull(resp.getAddress()); + Assertions.assertNotNull(resp.getChain()); + Assertions.assertNotNull(resp.getChainId()); + Assertions.assertNotNull(resp.getTo()); + Assertions.assertNotNull(resp.getCurrency()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountFeeTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountFeeTest.java new file mode 100644 index 00000000..d67d0cc2 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountFeeTest.java @@ -0,0 +1,115 @@ +package com.kucoin.universal.sdk.test.e2e.rest.account; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.account.deposit.*; +import com.kucoin.universal.sdk.generate.account.fee.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class AccountFeeTest { + + private static FeeApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getAccountService().getFeeApi(); + } + + /** getBasicFee Get Basic Fee - Spot/Margin /api/v1/base-fee */ + @Test + public void testGetBasicFee() throws Exception { + GetBasicFeeReq.GetBasicFeeReqBuilder builder = GetBasicFeeReq.builder(); + builder.currencyType(GetBasicFeeReq.CurrencyTypeEnum._0); + GetBasicFeeReq req = builder.build(); + GetBasicFeeResp resp = api.getBasicFee(req); + Assertions.assertNotNull(resp.getTakerFeeRate()); + Assertions.assertNotNull(resp.getMakerFeeRate()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSpotActualFee Get Actual Fee - Spot/Margin /api/v1/trade-fees */ + @Test + public void testGetSpotActualFee() throws Exception { + GetSpotActualFeeReq.GetSpotActualFeeReqBuilder builder = GetSpotActualFeeReq.builder(); + builder.symbols("BTC-USDT,ETH-USDT"); + GetSpotActualFeeReq req = builder.build(); + GetSpotActualFeeResp resp = api.getSpotActualFee(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTakerFeeRate()); + Assertions.assertNotNull(item.getMakerFeeRate()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getFuturesActualFee Get Actual Fee - Futures /api/v1/trade-fees */ + @Test + public void testGetFuturesActualFee() throws Exception { + GetFuturesActualFeeReq.GetFuturesActualFeeReqBuilder builder = GetFuturesActualFeeReq.builder(); + builder.symbol("XBTUSDM"); + GetFuturesActualFeeReq req = builder.build(); + GetFuturesActualFeeResp resp = api.getFuturesActualFee(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getTakerFeeRate()); + Assertions.assertNotNull(resp.getMakerFeeRate()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountSubAccountTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountSubAccountTest.java new file mode 100644 index 00000000..39255d1f --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountSubAccountTest.java @@ -0,0 +1,375 @@ +package com.kucoin.universal.sdk.test.e2e.rest.account; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.account.fee.*; +import com.kucoin.universal.sdk.generate.account.subaccount.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class AccountSubAccountTest { + + private static SubAccountApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getAccountService().getSubAccountApi(); + } + + /** addSubAccount Add sub-account /api/v2/sub/user/created */ + @Test + public void testAddSubAccount() throws Exception { + AddSubAccountReq.AddSubAccountReqBuilder builder = AddSubAccountReq.builder(); + builder + .password("********@123") + .remarks("") + .subName("sdkTestIntegration3") + .access(AddSubAccountReq.AccessEnum.SPOT); + AddSubAccountReq req = builder.build(); + AddSubAccountResp resp = api.addSubAccount(req); + Assertions.assertNotNull(resp.getUid()); + Assertions.assertNotNull(resp.getSubName()); + Assertions.assertNotNull(resp.getRemarks()); + Assertions.assertNotNull(resp.getAccess()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * addSubAccountMarginPermission Add sub-account Margin Permission /api/v3/sub/user/margin/enable + */ + @Test + public void testAddSubAccountMarginPermission() throws Exception { + AddSubAccountMarginPermissionReq.AddSubAccountMarginPermissionReqBuilder builder = + AddSubAccountMarginPermissionReq.builder(); + builder.uid("248443791"); + AddSubAccountMarginPermissionReq req = builder.build(); + AddSubAccountMarginPermissionResp resp = api.addSubAccountMarginPermission(req); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * addSubAccountFuturesPermission Add sub-account Futures Permission + * /api/v3/sub/user/futures/enable + */ + @Test + public void testAddSubAccountFuturesPermission() throws Exception { + AddSubAccountFuturesPermissionReq.AddSubAccountFuturesPermissionReqBuilder builder = + AddSubAccountFuturesPermissionReq.builder(); + builder.uid("248443791"); + AddSubAccountFuturesPermissionReq req = builder.build(); + AddSubAccountFuturesPermissionResp resp = api.addSubAccountFuturesPermission(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSpotSubAccountsSummaryV2 Get sub-account List - Summary Info /api/v2/sub/user */ + @Test + public void testGetSpotSubAccountsSummaryV2() throws Exception { + GetSpotSubAccountsSummaryV2Req.GetSpotSubAccountsSummaryV2ReqBuilder builder = + GetSpotSubAccountsSummaryV2Req.builder(); + builder.currentPage(1).pageSize(10); + GetSpotSubAccountsSummaryV2Req req = builder.build(); + GetSpotSubAccountsSummaryV2Resp resp = api.getSpotSubAccountsSummaryV2(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getUserId()); + Assertions.assertNotNull(item.getUid()); + Assertions.assertNotNull(item.getSubName()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getAccess()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getRemarks()); + Assertions.assertNotNull(item.getTradeTypes()); + Assertions.assertNotNull(item.getOpenedTradeTypes()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSpotSubAccountDetail Get sub-account Detail - Balance /api/v1/sub-accounts/{subUserId} */ + @Test + public void testGetSpotSubAccountDetail() throws Exception { + GetSpotSubAccountDetailReq.GetSpotSubAccountDetailReqBuilder builder = + GetSpotSubAccountDetailReq.builder(); + builder + .subUserId("6745b7bc890ba20001911363") + .includeBaseAmount(false) + .baseCurrency("USDT") + .baseAmount("0.1"); + GetSpotSubAccountDetailReq req = builder.build(); + GetSpotSubAccountDetailResp resp = api.getSpotSubAccountDetail(req); + Assertions.assertNotNull(resp.getSubUserId()); + Assertions.assertNotNull(resp.getSubName()); + resp.getMainAccounts() + .forEach( + item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getBalance()); + Assertions.assertNotNull(item.getAvailable()); + Assertions.assertNotNull(item.getHolds()); + Assertions.assertNotNull(item.getBaseCurrency()); + Assertions.assertNotNull(item.getBaseCurrencyPrice()); + Assertions.assertNotNull(item.getBaseAmount()); + Assertions.assertNotNull(item.getTag()); + }); + + resp.getTradeAccounts() + .forEach( + item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getBalance()); + Assertions.assertNotNull(item.getAvailable()); + Assertions.assertNotNull(item.getHolds()); + Assertions.assertNotNull(item.getBaseCurrency()); + Assertions.assertNotNull(item.getBaseCurrencyPrice()); + Assertions.assertNotNull(item.getBaseAmount()); + Assertions.assertNotNull(item.getTag()); + }); + + resp.getMarginAccounts() + .forEach( + item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getBalance()); + Assertions.assertNotNull(item.getAvailable()); + Assertions.assertNotNull(item.getHolds()); + Assertions.assertNotNull(item.getBaseCurrency()); + Assertions.assertNotNull(item.getBaseCurrencyPrice()); + Assertions.assertNotNull(item.getBaseAmount()); + Assertions.assertNotNull(item.getTag()); + }); + + resp.getTradeHFAccounts().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSpotSubAccountListV2 Get sub-account List - Spot Balance (V2) /api/v2/sub-accounts */ + @Test + public void testGetSpotSubAccountListV2() throws Exception { + GetSpotSubAccountListV2Req.GetSpotSubAccountListV2ReqBuilder builder = + GetSpotSubAccountListV2Req.builder(); + builder.currentPage(1).pageSize(10); + GetSpotSubAccountListV2Req req = builder.build(); + GetSpotSubAccountListV2Resp resp = api.getSpotSubAccountListV2(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getSubUserId()); + Assertions.assertNotNull(item.getSubName()); + Assertions.assertNotNull(item.getMainAccounts()); + Assertions.assertNotNull(item.getTradeAccounts()); + Assertions.assertNotNull(item.getMarginAccounts()); + Assertions.assertNotNull(item.getTradeHFAccounts()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * getFuturesSubAccountListV2 Get sub-account List - Futures Balance (V2) + * /api/v1/account-overview-all + */ + @Test + public void testGetFuturesSubAccountListV2() throws Exception { + GetFuturesSubAccountListV2Req.GetFuturesSubAccountListV2ReqBuilder builder = + GetFuturesSubAccountListV2Req.builder(); + builder.currency("XBT"); + GetFuturesSubAccountListV2Req req = builder.build(); + GetFuturesSubAccountListV2Resp resp = api.getFuturesSubAccountListV2(req); + Assertions.assertNotNull(resp.getSummary()); + resp.getAccounts() + .forEach( + item -> { + Assertions.assertNotNull(item.getAccountName()); + Assertions.assertNotNull(item.getAccountEquity()); + Assertions.assertNotNull(item.getUnrealisedPNL()); + Assertions.assertNotNull(item.getMarginBalance()); + Assertions.assertNotNull(item.getPositionMargin()); + Assertions.assertNotNull(item.getOrderMargin()); + Assertions.assertNotNull(item.getFrozenFunds()); + Assertions.assertNotNull(item.getAvailableBalance()); + Assertions.assertNotNull(item.getCurrency()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** addSubAccountApi Add sub-account API /api/v1/sub/api-key */ + @Test + public void testAddSubAccountApi() throws Exception { + AddSubAccountApiReq.AddSubAccountApiReqBuilder builder = AddSubAccountApiReq.builder(); + builder + .passphrase("******") + .remark("******") + .permission("General,Spot") + .ipWhitelist("") + .expire(AddSubAccountApiReq.ExpireEnum._30) + .subName("sdkTestIntegration3"); + AddSubAccountApiReq req = builder.build(); + AddSubAccountApiResp resp = api.addSubAccountApi(req); + Assertions.assertNotNull(resp.getApiKey()); + Assertions.assertNotNull(resp.getApiSecret()); + Assertions.assertNotNull(resp.getApiVersion()); + Assertions.assertNotNull(resp.getPassphrase()); + Assertions.assertNotNull(resp.getPermission()); + Assertions.assertNotNull(resp.getCreatedAt()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** modifySubAccountApi Modify sub-account API /api/v1/sub/api-key/update */ + @Test + public void testModifySubAccountApi() throws Exception { + ModifySubAccountApiReq.ModifySubAccountApiReqBuilder builder = ModifySubAccountApiReq.builder(); + builder + .passphrase("******") + .expire(ModifySubAccountApiReq.ExpireEnum._90) + .subName("sdkTestIntegration3") + .apiKey("6880428d28335c0001f5b45d"); + ModifySubAccountApiReq req = builder.build(); + ModifySubAccountApiResp resp = api.modifySubAccountApi(req); + Assertions.assertNotNull(resp.getSubName()); + Assertions.assertNotNull(resp.getApiKey()); + Assertions.assertNotNull(resp.getPermission()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSubAccountApiList Get sub-account API List /api/v1/sub/api-key */ + @Test + public void testGetSubAccountApiList() throws Exception { + GetSubAccountApiListReq.GetSubAccountApiListReqBuilder builder = + GetSubAccountApiListReq.builder(); + builder.apiKey("6880428d28335c0001f5b45d").subName("sdkTestIntegration3"); + GetSubAccountApiListReq req = builder.build(); + GetSubAccountApiListResp resp = api.getSubAccountApiList(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getSubName()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getApiKey()); + Assertions.assertNotNull(item.getApiVersion()); + Assertions.assertNotNull(item.getPermission()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getUid()); + Assertions.assertNotNull(item.getIsMaster()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** deleteSubAccountApi Delete sub-account API /api/v1/sub/api-key */ + @Test + public void testDeleteSubAccountApi() throws Exception { + DeleteSubAccountApiReq.DeleteSubAccountApiReqBuilder builder = DeleteSubAccountApiReq.builder(); + builder + .apiKey("6880428d28335c0001f5b45d") + .subName("sdkTestIntegration3") + .passphrase("123hhhhakjsbc"); + DeleteSubAccountApiReq req = builder.build(); + DeleteSubAccountApiResp resp = api.deleteSubAccountApi(req); + Assertions.assertNotNull(resp.getSubName()); + Assertions.assertNotNull(resp.getApiKey()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSpotSubAccountsSummaryV1 Get sub-account List - Summary Info (V1) /api/v1/sub/user */ + @Test + public void testGetSpotSubAccountsSummaryV1() throws Exception { + GetSpotSubAccountsSummaryV1Resp resp = api.getSpotSubAccountsSummaryV1(); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getUserId()); + Assertions.assertNotNull(item.getUid()); + Assertions.assertNotNull(item.getSubName()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getRemarks()); + Assertions.assertNotNull(item.getAccess()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSpotSubAccountListV1 Get sub-account List - Spot Balance (V1) /api/v1/sub-accounts */ + @Test + public void testGetSpotSubAccountListV1() throws Exception { + GetSpotSubAccountListV1Resp resp = api.getSpotSubAccountListV1(); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getSubUserId()); + Assertions.assertNotNull(item.getSubName()); + Assertions.assertNotNull(item.getMainAccounts()); + Assertions.assertNotNull(item.getTradeAccounts()); + Assertions.assertNotNull(item.getMarginAccounts()); + Assertions.assertNotNull(item.getTradeHFAccounts()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountTransferTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountTransferTest.java new file mode 100644 index 00000000..3759d7c8 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountTransferTest.java @@ -0,0 +1,217 @@ +package com.kucoin.universal.sdk.test.e2e.rest.account; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.account.transfer.*; +import com.kucoin.universal.sdk.generate.account.withdrawal.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; +import java.util.UUID; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class AccountTransferTest { + + private static TransferApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getAccountService().getTransferApi(); + } + + /** getTransferQuotas Get Transfer Quotas /api/v1/accounts/transferable */ + @Test + public void testGetTransferQuotas() throws Exception { + GetTransferQuotasReq.GetTransferQuotasReqBuilder builder = GetTransferQuotasReq.builder(); + builder.currency("USDT").type(GetTransferQuotasReq.TypeEnum.MAIN).tag(""); + GetTransferQuotasReq req = builder.build(); + GetTransferQuotasResp resp = api.getTransferQuotas(req); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getBalance()); + Assertions.assertNotNull(resp.getAvailable()); + Assertions.assertNotNull(resp.getHolds()); + Assertions.assertNotNull(resp.getTransferable()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** flexTransfer Flex Transfer /api/v3/accounts/universal-transfer */ + @Test + public void testFlexTransfer() throws Exception { + FlexTransferReq.FlexTransferReqBuilder builder = FlexTransferReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .currency("USDT") + .amount("1") + .fromAccountType(FlexTransferReq.FromAccountTypeEnum.TRADE) + .toAccountType(FlexTransferReq.ToAccountTypeEnum.MAIN) + .type(FlexTransferReq.TypeEnum.INTERNAL); + FlexTransferReq req = builder.build(); + FlexTransferResp resp = api.flexTransfer(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** subAccountTransfer Sub-account Transfer /api/v2/accounts/sub-transfer */ + @Test + public void testSubAccountTransfer() throws Exception { + SubAccountTransferReq.SubAccountTransferReqBuilder builder = SubAccountTransferReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .currency("USDT") + .amount("1") + .direction(SubAccountTransferReq.DirectionEnum.OUT) + .accountType(SubAccountTransferReq.AccountTypeEnum.MAIN) + .subAccountType(SubAccountTransferReq.SubAccountTypeEnum.MAIN) + .subUserId("6744227ce235b300012232d6"); + SubAccountTransferReq req = builder.build(); + SubAccountTransferResp resp = api.subAccountTransfer(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** innerTransfer Internal Transfer /api/v2/accounts/inner-transfer */ + @Test + public void testInnerTransfer() throws Exception { + InnerTransferReq.InnerTransferReqBuilder builder = InnerTransferReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .currency("USDT") + .amount("1") + .to(InnerTransferReq.ToEnum.MAIN) + .from(InnerTransferReq.FromEnum.TRADE); + InnerTransferReq req = builder.build(); + InnerTransferResp resp = api.innerTransfer(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * getFuturesAccountTransferOutLedger Get Futures Account Transfer Out Ledger + * /api/v1/transfer-list + */ + @Test + public void testGetFuturesAccountTransferOutLedger() throws Exception { + GetFuturesAccountTransferOutLedgerReq.GetFuturesAccountTransferOutLedgerReqBuilder builder = + GetFuturesAccountTransferOutLedgerReq.builder(); + builder.currency("USDT").type(GetFuturesAccountTransferOutLedgerReq.TypeEnum.MAIN); + GetFuturesAccountTransferOutLedgerReq req = builder.build(); + GetFuturesAccountTransferOutLedgerResp resp = api.getFuturesAccountTransferOutLedger(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getApplyId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getRecRemark()); + Assertions.assertNotNull(item.getRecSystem()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getReason()); + Assertions.assertNotNull(item.getOffset()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getRemark()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** futuresAccountTransferOut Futures Account Transfer Out /api/v3/transfer-out */ + @Test + public void testFuturesAccountTransferOut() throws Exception { + FuturesAccountTransferOutReq.FuturesAccountTransferOutReqBuilder builder = + FuturesAccountTransferOutReq.builder(); + builder + .currency("USDT") + .amount(1.0) + .recAccountType(FuturesAccountTransferOutReq.RecAccountTypeEnum.MAIN); + FuturesAccountTransferOutReq req = builder.build(); + FuturesAccountTransferOutResp resp = api.futuresAccountTransferOut(req); + Assertions.assertNotNull(resp.getApplyId()); + Assertions.assertNotNull(resp.getBizNo()); + Assertions.assertNotNull(resp.getPayAccountType()); + Assertions.assertNotNull(resp.getPayTag()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getRecAccountType()); + Assertions.assertNotNull(resp.getRecTag()); + Assertions.assertNotNull(resp.getRecRemark()); + Assertions.assertNotNull(resp.getRecSystem()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getAmount()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getSn()); + Assertions.assertNotNull(resp.getReason()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getUpdatedAt()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** futuresAccountTransferIn Futures Account Transfer In /api/v1/transfer-in */ + @Test + public void testFuturesAccountTransferIn() throws Exception { + FuturesAccountTransferInReq.FuturesAccountTransferInReqBuilder builder = + FuturesAccountTransferInReq.builder(); + builder + .currency("USDT") + .amount(1.0) + .payAccountType(FuturesAccountTransferInReq.PayAccountTypeEnum.MAIN); + FuturesAccountTransferInReq req = builder.build(); + FuturesAccountTransferInResp resp = api.futuresAccountTransferIn(req); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountWithdrawTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountWithdrawTest.java new file mode 100644 index 00000000..0e4e6371 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountWithdrawTest.java @@ -0,0 +1,229 @@ +package com.kucoin.universal.sdk.test.e2e.rest.account; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.account.subaccount.*; +import com.kucoin.universal.sdk.generate.account.withdrawal.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class AccountWithdrawTest { + + private static WithdrawalApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getAccountService().getWithdrawalApi(); + } + + /** getWithdrawalQuotas Get Withdrawal Quotas /api/v1/withdrawals/quotas */ + @Test + public void testGetWithdrawalQuotas() throws Exception { + GetWithdrawalQuotasReq.GetWithdrawalQuotasReqBuilder builder = GetWithdrawalQuotasReq.builder(); + builder.currency("USDT").chain("bsc"); + GetWithdrawalQuotasReq req = builder.build(); + GetWithdrawalQuotasResp resp = api.getWithdrawalQuotas(req); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getLimitBTCAmount()); + Assertions.assertNotNull(resp.getUsedBTCAmount()); + Assertions.assertNotNull(resp.getQuotaCurrency()); + Assertions.assertNotNull(resp.getLimitQuotaCurrencyAmount()); + Assertions.assertNotNull(resp.getUsedQuotaCurrencyAmount()); + Assertions.assertNotNull(resp.getRemainAmount()); + Assertions.assertNotNull(resp.getAvailableAmount()); + Assertions.assertNotNull(resp.getWithdrawMinFee()); + Assertions.assertNotNull(resp.getInnerWithdrawMinFee()); + Assertions.assertNotNull(resp.getWithdrawMinSize()); + Assertions.assertNotNull(resp.getIsWithdrawEnabled()); + Assertions.assertNotNull(resp.getPrecision()); + Assertions.assertNotNull(resp.getChain()); + Assertions.assertNotNull(resp.getLockedAmount()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** withdrawalV3 Withdraw (V3) /api/v3/withdrawals */ + @Test + public void testWithdrawalV3() throws Exception { + WithdrawalV3Req.WithdrawalV3ReqBuilder builder = WithdrawalV3Req.builder(); + builder + .currency("USDT") + .chain("bsc") + .amount("10") + .memo("") + .isInner(false) + .remark("****") + .feeDeductType("INTERNAL") + .toAddress("***") + .withdrawType(WithdrawalV3Req.WithdrawTypeEnum.ADDRESS); + WithdrawalV3Req req = builder.build(); + WithdrawalV3Resp resp = api.withdrawalV3(req); + Assertions.assertNotNull(resp.getWithdrawalId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** cancelWithdrawal Cancel Withdrawal /api/v1/withdrawals/{withdrawalId} */ + @Test + public void testCancelWithdrawal() throws Exception { + CancelWithdrawalReq.CancelWithdrawalReqBuilder builder = CancelWithdrawalReq.builder(); + builder.withdrawalId("68804a886538a800078cdde3"); + CancelWithdrawalReq req = builder.build(); + CancelWithdrawalResp resp = api.cancelWithdrawal(req); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getWithdrawalHistory Get Withdrawal History /api/v1/withdrawals */ + @Test + public void testGetWithdrawalHistory() throws Exception { + GetWithdrawalHistoryReq.GetWithdrawalHistoryReqBuilder builder = + GetWithdrawalHistoryReq.builder(); + builder.currency("USDT"); + GetWithdrawalHistoryReq req = builder.build(); + GetWithdrawalHistoryResp resp = api.getWithdrawalHistory(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getChain()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getAddress()); + Assertions.assertNotNull(item.getMemo()); + Assertions.assertNotNull(item.getIsInner()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getUpdatedAt()); + Assertions.assertNotNull(item.getRemark()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getWithdrawalHistoryById Get Withdrawal History By ID /api/v1/withdrawals/{withdrawalId} */ + @Test + public void testGetWithdrawalHistoryById() throws Exception { + GetWithdrawalHistoryByIdReq.GetWithdrawalHistoryByIdReqBuilder builder = + GetWithdrawalHistoryByIdReq.builder(); + builder.withdrawalId("68804a886538a800078cdde3"); + GetWithdrawalHistoryByIdReq req = builder.build(); + GetWithdrawalHistoryByIdResp resp = api.getWithdrawalHistoryById(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getUid()); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getChainId()); + Assertions.assertNotNull(resp.getChainName()); + Assertions.assertNotNull(resp.getCurrencyName()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getFailureReason()); + Assertions.assertNotNull(resp.getAddress()); + Assertions.assertNotNull(resp.getMemo()); + Assertions.assertNotNull(resp.getIsInner()); + Assertions.assertNotNull(resp.getAmount()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getWalletTxId()); + Assertions.assertNotNull(resp.getAddressRemark()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getCancelType()); + + Assertions.assertNotNull(resp.getReturnStatus()); + Assertions.assertNotNull(resp.getReturnCurrency()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getWithdrawalHistoryOld Get Withdrawal History - Old /api/v1/hist-withdrawals */ + @Test + public void testGetWithdrawalHistoryOld() throws Exception { + GetWithdrawalHistoryOldReq.GetWithdrawalHistoryOldReqBuilder builder = + GetWithdrawalHistoryOldReq.builder(); + builder.currency("USDT").startAt(1703001600000L).endAt(1703260800000L); + GetWithdrawalHistoryOldReq req = builder.build(); + GetWithdrawalHistoryOldResp resp = api.getWithdrawalHistoryOld(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getCreateAt()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getAddress()); + Assertions.assertNotNull(item.getWalletTxId()); + Assertions.assertNotNull(item.getIsInner()); + Assertions.assertNotNull(item.getStatus()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** withdrawalV1 Withdraw - V1 /api/v1/withdrawals */ + @Test + public void testWithdrawalV1() throws Exception { + WithdrawalV1Req.WithdrawalV1ReqBuilder builder = WithdrawalV1Req.builder(); + builder.currency("USDT").chain("bsc").address("***").amount(10L).memo("").isInner(false); + WithdrawalV1Req req = builder.build(); + WithdrawalV1Resp resp = api.withdrawalV1(req); + Assertions.assertNotNull(resp.getWithdrawalId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/earn/EarnApiTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/earn/EarnApiTest.java new file mode 100644 index 00000000..c0bee35b --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/earn/EarnApiTest.java @@ -0,0 +1,74 @@ +package com.kucoin.universal.sdk.test.e2e.rest.earn; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.account.account.*; +import com.kucoin.universal.sdk.generate.earn.earn.EarnApi; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.util.Collections; + +@Slf4j +public class EarnApiTest { + + private static EarnApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull + @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getEarnService().getEarnApi(); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/spot/OrderTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/spot/OrderTest.java similarity index 99% rename from sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/spot/OrderTest.java rename to sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/spot/OrderTest.java index 1b51e21f..cabfd663 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/rest/spot/OrderTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/spot/OrderTest.java @@ -1,4 +1,4 @@ -package com.kucoin.universal.sdk.e2e.rest.spot; +package com.kucoin.universal.sdk.test.e2e.rest.spot; import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.api.DefaultKucoinClient; diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/ws/spot/PublicTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/spot/PublicTest.java similarity index 98% rename from sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/ws/spot/PublicTest.java rename to sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/spot/PublicTest.java index 68fff494..cbd56d96 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/e2e/ws/spot/PublicTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/spot/PublicTest.java @@ -1,4 +1,4 @@ -package com.kucoin.universal.sdk.e2e.ws.spot; +package com.kucoin.universal.sdk.test.e2e.ws.spot; import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.api.DefaultKucoinClient; From bfef0e1cedf1140845d434cb3dbdfdc1e19167c8 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Wed, 23 Jul 2025 11:21:08 +0800 Subject: [PATCH 29/39] feat(java): remove unused keywords from the interface --- .../src/main/resources/java-sdk/api_entry.mustache | 2 +- .../com/kucoin/universal/sdk/generate/Version.java | 2 +- .../sdk/generate/service/AccountService.java | 12 ++++++------ .../sdk/generate/service/AffiliateService.java | 2 +- .../sdk/generate/service/BrokerService.java | 4 ++-- .../sdk/generate/service/CopyTradingService.java | 2 +- .../universal/sdk/generate/service/EarnService.java | 2 +- .../sdk/generate/service/FuturesService.java | 8 ++++---- .../sdk/generate/service/MarginService.java | 10 +++++----- .../universal/sdk/generate/service/SpotService.java | 4 ++-- .../sdk/generate/service/VIPLendingService.java | 2 +- 11 files changed, 25 insertions(+), 25 deletions(-) diff --git a/generator/plugin/src/main/resources/java-sdk/api_entry.mustache b/generator/plugin/src/main/resources/java-sdk/api_entry.mustache index 65e1dc7e..366c1a14 100644 --- a/generator/plugin/src/main/resources/java-sdk/api_entry.mustache +++ b/generator/plugin/src/main/resources/java-sdk/api_entry.mustache @@ -11,7 +11,7 @@ package {{package}}; public interface {{api_entry_name}} { {{#api_entry_value}} - public {{target_service}} get{{methodUppercase}}Api(); + {{target_service}} get{{methodUppercase}}Api(); {{/api_entry_value}} } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java index 2f81ac45..7a6ab588 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java @@ -2,5 +2,5 @@ public class Version { public static final String SDK_VERSION = "0.1.0-alpha"; - public static final String SDK_GENERATE_DATE = "2025-07-15"; + public static final String SDK_GENERATE_DATE = "2025-07-23"; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AccountService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AccountService.java index b6bf8b5d..52e28449 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AccountService.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AccountService.java @@ -11,15 +11,15 @@ public interface AccountService { - public AccountApi getAccountApi(); + AccountApi getAccountApi(); - public DepositApi getDepositApi(); + DepositApi getDepositApi(); - public WithdrawalApi getWithdrawalApi(); + WithdrawalApi getWithdrawalApi(); - public FeeApi getFeeApi(); + FeeApi getFeeApi(); - public SubAccountApi getSubAccountApi(); + SubAccountApi getSubAccountApi(); - public TransferApi getTransferApi(); + TransferApi getTransferApi(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AffiliateService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AffiliateService.java index 31feeaea..15a52dfb 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AffiliateService.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/AffiliateService.java @@ -5,5 +5,5 @@ import com.kucoin.universal.sdk.generate.affiliate.affiliate.AffiliateApi; public interface AffiliateService { - public AffiliateApi getAffiliateApi(); + AffiliateApi getAffiliateApi(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/BrokerService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/BrokerService.java index 3870640b..991666b6 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/BrokerService.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/BrokerService.java @@ -7,7 +7,7 @@ public interface BrokerService { - public APIBrokerApi getAPIBrokerApi(); + APIBrokerApi getAPIBrokerApi(); - public NDBrokerApi getNDBrokerApi(); + NDBrokerApi getNDBrokerApi(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/CopyTradingService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/CopyTradingService.java index d2119154..b49329ce 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/CopyTradingService.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/CopyTradingService.java @@ -5,5 +5,5 @@ import com.kucoin.universal.sdk.generate.copytrading.futures.FuturesApi; public interface CopyTradingService { - public FuturesApi getFuturesApi(); + FuturesApi getFuturesApi(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/EarnService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/EarnService.java index 4c61a1c6..4c5a2ea3 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/EarnService.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/EarnService.java @@ -5,5 +5,5 @@ import com.kucoin.universal.sdk.generate.earn.earn.EarnApi; public interface EarnService { - public EarnApi getEarnApi(); + EarnApi getEarnApi(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/FuturesService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/FuturesService.java index 845f61c3..aae2eb0e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/FuturesService.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/FuturesService.java @@ -9,11 +9,11 @@ public interface FuturesService { - public OrderApi getOrderApi(); + OrderApi getOrderApi(); - public PositionsApi getPositionsApi(); + PositionsApi getPositionsApi(); - public FundingFeesApi getFundingFeesApi(); + FundingFeesApi getFundingFeesApi(); - public MarketApi getMarketApi(); + MarketApi getMarketApi(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/MarginService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/MarginService.java index 998207e9..1e259057 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/MarginService.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/MarginService.java @@ -10,13 +10,13 @@ public interface MarginService { - public OrderApi getOrderApi(); + OrderApi getOrderApi(); - public DebitApi getDebitApi(); + DebitApi getDebitApi(); - public CreditApi getCreditApi(); + CreditApi getCreditApi(); - public MarketApi getMarketApi(); + MarketApi getMarketApi(); - public RiskLimitApi getRiskLimitApi(); + RiskLimitApi getRiskLimitApi(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/SpotService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/SpotService.java index 6450f40a..5a2306f1 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/SpotService.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/SpotService.java @@ -7,7 +7,7 @@ public interface SpotService { - public OrderApi getOrderApi(); + OrderApi getOrderApi(); - public MarketApi getMarketApi(); + MarketApi getMarketApi(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/VIPLendingService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/VIPLendingService.java index cfdb6eea..b6016f19 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/VIPLendingService.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/service/VIPLendingService.java @@ -5,5 +5,5 @@ import com.kucoin.universal.sdk.generate.viplending.viplending.VIPLendingApi; public interface VIPLendingService { - public VIPLendingApi getVIPLendingApi(); + VIPLendingApi getVIPLendingApi(); } From 5ac20c3d35d6d896f0259581a6c2d0884212236f Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Wed, 23 Jul 2025 14:20:24 +0800 Subject: [PATCH 30/39] feat(java): add test for api --- .../test/e2e/rest/account/AccountApiTest.java | 4 +- .../e2e/rest/account/AccountDepositTest.java | 1 - .../test/e2e/rest/account/AccountFeeTest.java | 1 - .../rest/account/AccountSubAccountTest.java | 1 - .../e2e/rest/account/AccountTransferTest.java | 1 - .../e2e/rest/account/AccountWithdrawTest.java | 1 - .../sdk/test/e2e/rest/earn/EarnApiTest.java | 370 ++++++++++++--- .../test/e2e/rest/margin/CreditApiTest.java | 206 ++++++++ .../test/e2e/rest/margin/DebitApiTest.java | 191 ++++++++ .../test/e2e/rest/margin/MarketApiTest.java | 191 ++++++++ .../test/e2e/rest/margin/OrderApiTest.java | 441 ++++++++++++++++++ .../e2e/rest/margin/RiskLimitApiTest.java | 93 ++++ 12 files changed, 1442 insertions(+), 59 deletions(-) create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/CreditApiTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/DebitApiTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/MarketApiTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/OrderApiTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/RiskLimitApiTest.java diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountApiTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountApiTest.java index 0acf4a19..d8e3087a 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountApiTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountApiTest.java @@ -10,7 +10,9 @@ import java.io.IOException; import java.util.Collections; import lombok.extern.slf4j.Slf4j; -import okhttp3.*; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountDepositTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountDepositTest.java index 6c241a63..86f6286e 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountDepositTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountDepositTest.java @@ -3,7 +3,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.api.DefaultKucoinClient; import com.kucoin.universal.sdk.api.KucoinClient; -import com.kucoin.universal.sdk.generate.account.account.*; import com.kucoin.universal.sdk.generate.account.deposit.*; import com.kucoin.universal.sdk.model.ClientOption; import com.kucoin.universal.sdk.model.Constants; diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountFeeTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountFeeTest.java index d67d0cc2..81ff6bb8 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountFeeTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountFeeTest.java @@ -3,7 +3,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.api.DefaultKucoinClient; import com.kucoin.universal.sdk.api.KucoinClient; -import com.kucoin.universal.sdk.generate.account.deposit.*; import com.kucoin.universal.sdk.generate.account.fee.*; import com.kucoin.universal.sdk.model.ClientOption; import com.kucoin.universal.sdk.model.Constants; diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountSubAccountTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountSubAccountTest.java index 39255d1f..66e4a172 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountSubAccountTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountSubAccountTest.java @@ -3,7 +3,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.api.DefaultKucoinClient; import com.kucoin.universal.sdk.api.KucoinClient; -import com.kucoin.universal.sdk.generate.account.fee.*; import com.kucoin.universal.sdk.generate.account.subaccount.*; import com.kucoin.universal.sdk.model.ClientOption; import com.kucoin.universal.sdk.model.Constants; diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountTransferTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountTransferTest.java index 3759d7c8..be0b3f42 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountTransferTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountTransferTest.java @@ -4,7 +4,6 @@ import com.kucoin.universal.sdk.api.DefaultKucoinClient; import com.kucoin.universal.sdk.api.KucoinClient; import com.kucoin.universal.sdk.generate.account.transfer.*; -import com.kucoin.universal.sdk.generate.account.withdrawal.*; import com.kucoin.universal.sdk.model.ClientOption; import com.kucoin.universal.sdk.model.Constants; import com.kucoin.universal.sdk.model.TransportOption; diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountWithdrawTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountWithdrawTest.java index 0e4e6371..9b4eb611 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountWithdrawTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/account/AccountWithdrawTest.java @@ -3,7 +3,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.api.DefaultKucoinClient; import com.kucoin.universal.sdk.api.KucoinClient; -import com.kucoin.universal.sdk.generate.account.subaccount.*; import com.kucoin.universal.sdk.generate.account.withdrawal.*; import com.kucoin.universal.sdk.model.ClientOption; import com.kucoin.universal.sdk.model.Constants; diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/earn/EarnApiTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/earn/EarnApiTest.java index c0bee35b..591bc0ed 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/earn/EarnApiTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/earn/EarnApiTest.java @@ -3,11 +3,12 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.api.DefaultKucoinClient; import com.kucoin.universal.sdk.api.KucoinClient; -import com.kucoin.universal.sdk.generate.account.account.*; -import com.kucoin.universal.sdk.generate.earn.earn.EarnApi; +import com.kucoin.universal.sdk.generate.earn.earn.*; import com.kucoin.universal.sdk.model.ClientOption; import com.kucoin.universal.sdk.model.Constants; import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; import lombok.extern.slf4j.Slf4j; import okhttp3.Interceptor; import okhttp3.Request; @@ -17,58 +18,321 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import java.io.IOException; -import java.util.Collections; - @Slf4j public class EarnApiTest { - private static EarnApi api; - - public static ObjectMapper mapper = new ObjectMapper(); - - @BeforeAll - public static void setUp() { - - String key = System.getenv("API_KEY"); - String secret = System.getenv("API_SECRET"); - String passphrase = System.getenv("API_PASSPHRASE"); - - TransportOption httpTransport = - TransportOption.builder() - .interceptors( - Collections.singleton( - new Interceptor() { - @NotNull - @Override - public Response intercept(@NotNull Chain chain) throws IOException { - Request request = chain.request(); - - System.out.println("========== Request =========="); - System.out.println(request.method() + " " + request.url()); - - Response response = chain.proceed(request); - - System.out.println("========== Response =========="); - System.out.println("Status Code: " + response.code()); - System.out.println("Message: " + response.message()); - return response; - } - })) - .build(); - - ClientOption clientOpt = - ClientOption.builder() - .key(key) - .secret(secret) - .passphrase(passphrase) - .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) - .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) - .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) - .transportOption(httpTransport) - .build(); - - KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); - api = kucoinClient.getRestService().getEarnService().getEarnApi(); - } + private static EarnApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getEarnService().getEarnApi(); + } + + /** purchase Purchase /api/v1/earn/orders */ + @Test + public void testPurchase() throws Exception { + PurchaseReq.PurchaseReqBuilder builder = PurchaseReq.builder(); + builder.productId("2152").amount("10").accountType(PurchaseReq.AccountTypeEnum.MAIN); + PurchaseReq req = builder.build(); + PurchaseResp resp = api.purchase(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getOrderTxId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getRedeemPreview Get Redeem Preview /api/v1/earn/redeem-preview */ + @Test + public void testGetRedeemPreview() throws Exception { + GetRedeemPreviewReq.GetRedeemPreviewReqBuilder builder = GetRedeemPreviewReq.builder(); + builder.orderId("2155441").fromAccountType(GetRedeemPreviewReq.FromAccountTypeEnum.MAIN); + GetRedeemPreviewReq req = builder.build(); + GetRedeemPreviewResp resp = api.getRedeemPreview(req); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getRedeemAmount()); + Assertions.assertNotNull(resp.getPenaltyInterestAmount()); + Assertions.assertNotNull(resp.getRedeemPeriod()); + Assertions.assertNotNull(resp.getDeliverTime()); + Assertions.assertNotNull(resp.getManualRedeemable()); + Assertions.assertNotNull(resp.getRedeemAll()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** redeem Redeem /api/v1/earn/orders */ + @Test + public void testRedeem() throws Exception { + RedeemReq.RedeemReqBuilder builder = RedeemReq.builder(); + builder + .orderId("2155441") + .amount("10") + .fromAccountType(RedeemReq.FromAccountTypeEnum.MAIN) + .confirmPunishRedeem("1"); + RedeemReq req = builder.build(); + RedeemResp resp = api.redeem(req); + Assertions.assertNotNull(resp.getOrderTxId()); + Assertions.assertNotNull(resp.getDeliverTime()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getAmount()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSavingsProducts Get Savings Products /api/v1/earn/saving/products */ + @Test + public void testGetSavingsProducts() throws Exception { + GetSavingsProductsReq.GetSavingsProductsReqBuilder builder = GetSavingsProductsReq.builder(); + builder.currency("USDT"); + GetSavingsProductsReq req = builder.build(); + GetSavingsProductsResp resp = api.getSavingsProducts(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getCategory()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getPrecision()); + Assertions.assertNotNull(item.getProductUpperLimit()); + Assertions.assertNotNull(item.getUserUpperLimit()); + Assertions.assertNotNull(item.getUserLowerLimit()); + Assertions.assertNotNull(item.getRedeemPeriod()); + Assertions.assertNotNull(item.getLockStartTime()); + Assertions.assertNotNull(item.getApplyStartTime()); + Assertions.assertNotNull(item.getReturnRate()); + Assertions.assertNotNull(item.getIncomeCurrency()); + Assertions.assertNotNull(item.getEarlyRedeemSupported()); + Assertions.assertNotNull(item.getProductRemainAmount()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getRedeemType()); + Assertions.assertNotNull(item.getIncomeReleaseType()); + Assertions.assertNotNull(item.getInterestDate()); + Assertions.assertNotNull(item.getDuration()); + Assertions.assertNotNull(item.getNewUserOnly()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getPromotionProducts Get Promotion Products /api/v1/earn/promotion/products */ + @Test + public void testGetPromotionProducts() throws Exception { + GetPromotionProductsReq.GetPromotionProductsReqBuilder builder = + GetPromotionProductsReq.builder(); + builder.currency("USDT"); + GetPromotionProductsReq req = builder.build(); + GetPromotionProductsResp resp = api.getPromotionProducts(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getCategory()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getPrecision()); + Assertions.assertNotNull(item.getProductUpperLimit()); + Assertions.assertNotNull(item.getUserUpperLimit()); + Assertions.assertNotNull(item.getUserLowerLimit()); + Assertions.assertNotNull(item.getRedeemPeriod()); + Assertions.assertNotNull(item.getLockStartTime()); + Assertions.assertNotNull(item.getApplyStartTime()); + Assertions.assertNotNull(item.getReturnRate()); + Assertions.assertNotNull(item.getIncomeCurrency()); + Assertions.assertNotNull(item.getEarlyRedeemSupported()); + Assertions.assertNotNull(item.getProductRemainAmount()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getRedeemType()); + Assertions.assertNotNull(item.getIncomeReleaseType()); + Assertions.assertNotNull(item.getInterestDate()); + Assertions.assertNotNull(item.getDuration()); + Assertions.assertNotNull(item.getNewUserOnly()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getStakingProducts Get Staking Products /api/v1/earn/staking/products */ + @Test + public void testGetStakingProducts() throws Exception { + GetStakingProductsReq.GetStakingProductsReqBuilder builder = GetStakingProductsReq.builder(); + builder.currency("ATOM"); + GetStakingProductsReq req = builder.build(); + GetStakingProductsResp resp = api.getStakingProducts(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getCategory()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getPrecision()); + Assertions.assertNotNull(item.getProductUpperLimit()); + Assertions.assertNotNull(item.getUserUpperLimit()); + Assertions.assertNotNull(item.getUserLowerLimit()); + Assertions.assertNotNull(item.getRedeemPeriod()); + Assertions.assertNotNull(item.getLockStartTime()); + Assertions.assertNotNull(item.getApplyStartTime()); + Assertions.assertNotNull(item.getReturnRate()); + Assertions.assertNotNull(item.getIncomeCurrency()); + Assertions.assertNotNull(item.getEarlyRedeemSupported()); + Assertions.assertNotNull(item.getProductRemainAmount()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getRedeemType()); + Assertions.assertNotNull(item.getIncomeReleaseType()); + Assertions.assertNotNull(item.getInterestDate()); + Assertions.assertNotNull(item.getDuration()); + Assertions.assertNotNull(item.getNewUserOnly()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getKcsStakingProducts Get KCS Staking Products /api/v1/earn/kcs-staking/products */ + @Test + public void testGetKcsStakingProducts() throws Exception { + GetKcsStakingProductsReq.GetKcsStakingProductsReqBuilder builder = + GetKcsStakingProductsReq.builder(); + builder.currency("KCS"); + GetKcsStakingProductsReq req = builder.build(); + GetKcsStakingProductsResp resp = api.getKcsStakingProducts(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getCategory()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getPrecision()); + Assertions.assertNotNull(item.getProductUpperLimit()); + Assertions.assertNotNull(item.getUserUpperLimit()); + Assertions.assertNotNull(item.getUserLowerLimit()); + Assertions.assertNotNull(item.getRedeemPeriod()); + Assertions.assertNotNull(item.getLockStartTime()); + Assertions.assertNotNull(item.getApplyStartTime()); + Assertions.assertNotNull(item.getReturnRate()); + Assertions.assertNotNull(item.getIncomeCurrency()); + Assertions.assertNotNull(item.getEarlyRedeemSupported()); + Assertions.assertNotNull(item.getProductRemainAmount()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getRedeemType()); + Assertions.assertNotNull(item.getIncomeReleaseType()); + Assertions.assertNotNull(item.getInterestDate()); + Assertions.assertNotNull(item.getDuration()); + Assertions.assertNotNull(item.getNewUserOnly()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getETHStakingProducts Get ETH Staking Products /api/v1/earn/eth-staking/products */ + @Test + public void testGetETHStakingProducts() throws Exception { + GetETHStakingProductsReq.GetETHStakingProductsReqBuilder builder = + GetETHStakingProductsReq.builder(); + builder.currency("ETH"); + GetETHStakingProductsReq req = builder.build(); + GetETHStakingProductsResp resp = api.getETHStakingProducts(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getCategory()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getPrecision()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getIncomeCurrency()); + Assertions.assertNotNull(item.getReturnRate()); + Assertions.assertNotNull(item.getUserLowerLimit()); + Assertions.assertNotNull(item.getUserUpperLimit()); + Assertions.assertNotNull(item.getProductUpperLimit()); + Assertions.assertNotNull(item.getProductRemainAmount()); + Assertions.assertNotNull(item.getRedeemPeriod()); + Assertions.assertNotNull(item.getRedeemType()); + Assertions.assertNotNull(item.getIncomeReleaseType()); + Assertions.assertNotNull(item.getApplyStartTime()); + Assertions.assertNotNull(item.getLockStartTime()); + Assertions.assertNotNull(item.getInterestDate()); + Assertions.assertNotNull(item.getNewUserOnly()); + Assertions.assertNotNull(item.getEarlyRedeemSupported()); + Assertions.assertNotNull(item.getDuration()); + Assertions.assertNotNull(item.getStatus()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getAccountHolding Get Account Holding /api/v1/earn/hold-assets */ + @Test + public void testGetAccountHolding() throws Exception { + GetAccountHoldingReq.GetAccountHoldingReqBuilder builder = GetAccountHoldingReq.builder(); + builder + .currency("USDT") + .productId("2152") + .productCategory(GetAccountHoldingReq.ProductCategoryEnum.DEMAND); + GetAccountHoldingReq req = builder.build(); + GetAccountHoldingResp resp = api.getAccountHolding(req); + Assertions.assertNotNull(resp.getTotalNum()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getProductId()); + Assertions.assertNotNull(item.getProductCategory()); + Assertions.assertNotNull(item.getProductType()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getIncomeCurrency()); + Assertions.assertNotNull(item.getReturnRate()); + Assertions.assertNotNull(item.getHoldAmount()); + Assertions.assertNotNull(item.getRedeemedAmount()); + Assertions.assertNotNull(item.getRedeemingAmount()); + Assertions.assertNotNull(item.getLockStartTime()); + Assertions.assertNotNull(item.getPurchaseTime()); + Assertions.assertNotNull(item.getRedeemPeriod()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getEarlyRedeemSupported()); + }); + + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalPage()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } } diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/CreditApiTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/CreditApiTest.java new file mode 100644 index 00000000..e497a708 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/CreditApiTest.java @@ -0,0 +1,206 @@ +package com.kucoin.universal.sdk.test.e2e.rest.margin; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.margin.credit.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class CreditApiTest { + + private static CreditApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getMarginService().getCreditApi(); + } + + /** getLoanMarket Get Loan Market /api/v3/project/list */ + @Test + public void testGetLoanMarket() throws Exception { + GetLoanMarketReq.GetLoanMarketReqBuilder builder = GetLoanMarketReq.builder(); + builder.currency("DOGE"); + GetLoanMarketReq req = builder.build(); + GetLoanMarketResp resp = api.getLoanMarket(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getPurchaseEnable()); + Assertions.assertNotNull(item.getRedeemEnable()); + Assertions.assertNotNull(item.getIncrement()); + Assertions.assertNotNull(item.getMinPurchaseSize()); + Assertions.assertNotNull(item.getMinInterestRate()); + Assertions.assertNotNull(item.getMaxInterestRate()); + Assertions.assertNotNull(item.getInterestIncrement()); + Assertions.assertNotNull(item.getMaxPurchaseSize()); + Assertions.assertNotNull(item.getMarketInterestRate()); + Assertions.assertNotNull(item.getAutoPurchaseEnable()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getLoanMarketInterestRate Get Loan Market Interest Rate /api/v3/project/marketInterestRate */ + @Test + public void testGetLoanMarketInterestRate() throws Exception { + GetLoanMarketInterestRateReq.GetLoanMarketInterestRateReqBuilder builder = + GetLoanMarketInterestRateReq.builder(); + builder.currency("DOGE"); + GetLoanMarketInterestRateReq req = builder.build(); + GetLoanMarketInterestRateResp resp = api.getLoanMarketInterestRate(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getTime()); + Assertions.assertNotNull(item.getMarketInterestRate()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** purchase Purchase /api/v3/purchase */ + @Test + public void testPurchase() throws Exception { + PurchaseReq.PurchaseReqBuilder builder = PurchaseReq.builder(); + builder.currency("DOGE").size("10").interestRate("0.01"); + PurchaseReq req = builder.build(); + PurchaseResp resp = api.purchase(req); + Assertions.assertNotNull(resp.getOrderNo()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** modifyPurchase Modify Purchase /api/v3/lend/purchase/update */ + @Test + public void testModifyPurchase() throws Exception { + ModifyPurchaseReq.ModifyPurchaseReqBuilder builder = ModifyPurchaseReq.builder(); + builder.currency("DOGE").interestRate("0.011").purchaseOrderNo("68805d5b3cffab0007189d08"); + ModifyPurchaseReq req = builder.build(); + ModifyPurchaseResp resp = api.modifyPurchase(req); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getPurchaseOrders Get Purchase Orders /api/v3/purchase/orders */ + @Test + public void testGetPurchaseOrders() throws Exception { + GetPurchaseOrdersReq.GetPurchaseOrdersReqBuilder builder = GetPurchaseOrdersReq.builder(); + builder + .status(GetPurchaseOrdersReq.StatusEnum.DONE) + .currency("DOGE") + .purchaseOrderNo("67aabb111a8c110007ba2e5a"); + GetPurchaseOrdersReq req = builder.build(); + GetPurchaseOrdersResp resp = api.getPurchaseOrders(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getPurchaseOrderNo()); + Assertions.assertNotNull(item.getPurchaseSize()); + Assertions.assertNotNull(item.getMatchSize()); + Assertions.assertNotNull(item.getInterestRate()); + Assertions.assertNotNull(item.getIncomeSize()); + Assertions.assertNotNull(item.getApplyTime()); + Assertions.assertNotNull(item.getStatus()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** redeem Redeem /api/v3/redeem */ + @Test + public void testRedeem() throws Exception { + RedeemReq.RedeemReqBuilder builder = RedeemReq.builder(); + builder.currency("DOGE").size("10").purchaseOrderNo("68805d5b3cffab0007189d08"); + RedeemReq req = builder.build(); + RedeemResp resp = api.redeem(req); + Assertions.assertNotNull(resp.getOrderNo()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getRedeemOrders Get Redeem Orders /api/v3/redeem/orders */ + @Test + public void testGetRedeemOrders() throws Exception { + GetRedeemOrdersReq.GetRedeemOrdersReqBuilder builder = GetRedeemOrdersReq.builder(); + builder + .status(GetRedeemOrdersReq.StatusEnum.DONE) + .currency("DOGE") + .redeemOrderNo("68805d5b3cffab0007189d08"); + GetRedeemOrdersReq req = builder.build(); + GetRedeemOrdersResp resp = api.getRedeemOrders(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getPurchaseOrderNo()); + Assertions.assertNotNull(item.getRedeemOrderNo()); + Assertions.assertNotNull(item.getRedeemSize()); + Assertions.assertNotNull(item.getReceiptSize()); + Assertions.assertNotNull(item.getApplyTime()); + Assertions.assertNotNull(item.getStatus()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/DebitApiTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/DebitApiTest.java new file mode 100644 index 00000000..2f570ec5 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/DebitApiTest.java @@ -0,0 +1,191 @@ +package com.kucoin.universal.sdk.test.e2e.rest.margin; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.margin.debit.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class DebitApiTest { + + private static DebitApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getMarginService().getDebitApi(); + } + + /** borrow Borrow /api/v3/margin/borrow */ + @Test + public void testBorrow() throws Exception { + BorrowReq.BorrowReqBuilder builder = BorrowReq.builder(); + builder + .currency("USDT") + .size(10.0) + .timeInForce(BorrowReq.TimeInForceEnum.IOC) + .symbol("BTC-USDT") + .isIsolated(true) + .isHf(true); + BorrowReq req = builder.build(); + BorrowResp resp = api.borrow(req); + Assertions.assertNotNull(resp.getOrderNo()); + Assertions.assertNotNull(resp.getActualSize()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getBorrowHistory Get Borrow History /api/v3/margin/borrow */ + @Test + public void testGetBorrowHistory() throws Exception { + GetBorrowHistoryReq.GetBorrowHistoryReqBuilder builder = GetBorrowHistoryReq.builder(); + builder.currency("USDT").isIsolated(true).symbol("BTC-USDT"); + GetBorrowHistoryReq req = builder.build(); + GetBorrowHistoryResp resp = api.getBorrowHistory(req); + Assertions.assertNotNull(resp.getTimestamp()); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getOrderNo()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getActualSize()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getCreatedTime()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** repay Repay /api/v3/margin/repay */ + @Test + public void testRepay() throws Exception { + RepayReq.RepayReqBuilder builder = RepayReq.builder(); + builder.currency("USDT").size(10.0).symbol("BTC-USDT").isIsolated(true).isHf(true); + RepayReq req = builder.build(); + RepayResp resp = api.repay(req); + Assertions.assertNotNull(resp.getTimestamp()); + Assertions.assertNotNull(resp.getOrderNo()); + Assertions.assertNotNull(resp.getActualSize()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getRepayHistory Get Repay History /api/v3/margin/repay */ + @Test + public void testGetRepayHistory() throws Exception { + GetRepayHistoryReq.GetRepayHistoryReqBuilder builder = GetRepayHistoryReq.builder(); + builder.currency("USDT").isIsolated(true).symbol("BTC-USDT"); + GetRepayHistoryReq req = builder.build(); + GetRepayHistoryResp resp = api.getRepayHistory(req); + Assertions.assertNotNull(resp.getTimestamp()); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getOrderNo()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getPrincipal()); + Assertions.assertNotNull(item.getInterest()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getCreatedTime()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getInterestHistory Get Interest History. /api/v3/margin/interest */ + @Test + public void testGetInterestHistory() throws Exception { + GetInterestHistoryReq.GetInterestHistoryReqBuilder builder = GetInterestHistoryReq.builder(); + builder.symbol("BTC-USDT").isIsolated(true); + GetInterestHistoryReq req = builder.build(); + GetInterestHistoryResp resp = api.getInterestHistory(req); + Assertions.assertNotNull(resp.getTimestamp()); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getDayRatio()); + Assertions.assertNotNull(item.getInterestAmount()); + Assertions.assertNotNull(item.getCreatedTime()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** modifyLeverage Modify Leverage /api/v3/position/update-user-leverage */ + @Test + public void testModifyLeverage() throws Exception { + ModifyLeverageReq.ModifyLeverageReqBuilder builder = ModifyLeverageReq.builder(); + builder.symbol("BTC-USDT").isIsolated(true).leverage("3.1"); + ModifyLeverageReq req = builder.build(); + ModifyLeverageResp resp = api.modifyLeverage(req); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/MarketApiTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/MarketApiTest.java new file mode 100644 index 00000000..637ff964 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/MarketApiTest.java @@ -0,0 +1,191 @@ +package com.kucoin.universal.sdk.test.e2e.rest.margin; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.margin.market.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class MarketApiTest { + + private static MarketApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getMarginService().getMarketApi(); + } + + /** getCrossMarginSymbols Get Symbols - Cross Margin /api/v3/margin/symbols */ + @Test + public void testGetCrossMarginSymbols() throws Exception { + GetCrossMarginSymbolsReq.GetCrossMarginSymbolsReqBuilder builder = + GetCrossMarginSymbolsReq.builder(); + builder.symbol("BTC-USDT"); + GetCrossMarginSymbolsReq req = builder.build(); + GetCrossMarginSymbolsResp resp = api.getCrossMarginSymbols(req); + Assertions.assertNotNull(resp.getTimestamp()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getName()); + Assertions.assertNotNull(item.getEnableTrading()); + Assertions.assertNotNull(item.getMarket()); + Assertions.assertNotNull(item.getBaseCurrency()); + Assertions.assertNotNull(item.getQuoteCurrency()); + Assertions.assertNotNull(item.getBaseIncrement()); + Assertions.assertNotNull(item.getBaseMinSize()); + Assertions.assertNotNull(item.getQuoteIncrement()); + Assertions.assertNotNull(item.getQuoteMinSize()); + Assertions.assertNotNull(item.getBaseMaxSize()); + Assertions.assertNotNull(item.getQuoteMaxSize()); + Assertions.assertNotNull(item.getPriceIncrement()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getPriceLimitRate()); + Assertions.assertNotNull(item.getMinFunds()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getETFInfo Get ETF Info /api/v3/etf/info */ + @Test + public void testGetETFInfo() throws Exception { + GetETFInfoReq.GetETFInfoReqBuilder builder = GetETFInfoReq.builder(); + builder.currency("BTCUP"); + GetETFInfoReq req = builder.build(); + GetETFInfoResp resp = api.getETFInfo(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getNetAsset()); + Assertions.assertNotNull(item.getTargetLeverage()); + Assertions.assertNotNull(item.getActualLeverage()); + Assertions.assertNotNull(item.getIssuedSize()); + Assertions.assertNotNull(item.getBasket()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getMarkPriceDetail Get Mark Price Detail /api/v1/mark-price/{symbol}/current */ + @Test + public void testGetMarkPriceDetail() throws Exception { + GetMarkPriceDetailReq.GetMarkPriceDetailReqBuilder builder = GetMarkPriceDetailReq.builder(); + builder.symbol("USDT-BTC"); + GetMarkPriceDetailReq req = builder.build(); + GetMarkPriceDetailResp resp = api.getMarkPriceDetail(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getTimePoint()); + Assertions.assertNotNull(resp.getValue()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getMarginConfig Get Margin Config /api/v1/margin/config */ + @Test + public void testGetMarginConfig() throws Exception { + GetMarginConfigResp resp = api.getMarginConfig(); + resp.getCurrencyList().forEach(item -> {}); + + Assertions.assertNotNull(resp.getMaxLeverage()); + Assertions.assertNotNull(resp.getWarningDebtRatio()); + Assertions.assertNotNull(resp.getLiqDebtRatio()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getMarkPriceList Get Mark Price List /api/v3/mark-price/all-symbols */ + @Test + public void testGetMarkPriceList() throws Exception { + GetMarkPriceListResp resp = api.getMarkPriceList(); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTimePoint()); + Assertions.assertNotNull(item.getValue()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getIsolatedMarginSymbols Get Symbols - Isolated Margin /api/v1/isolated/symbols */ + @Test + public void testGetIsolatedMarginSymbols() throws Exception { + GetIsolatedMarginSymbolsResp resp = api.getIsolatedMarginSymbols(); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getSymbolName()); + Assertions.assertNotNull(item.getBaseCurrency()); + Assertions.assertNotNull(item.getQuoteCurrency()); + Assertions.assertNotNull(item.getMaxLeverage()); + Assertions.assertNotNull(item.getFlDebtRatio()); + Assertions.assertNotNull(item.getTradeEnable()); + Assertions.assertNotNull(item.getAutoRenewMaxDebtRatio()); + Assertions.assertNotNull(item.getBaseBorrowEnable()); + Assertions.assertNotNull(item.getQuoteBorrowEnable()); + Assertions.assertNotNull(item.getBaseTransferInEnable()); + Assertions.assertNotNull(item.getQuoteTransferInEnable()); + Assertions.assertNotNull(item.getBaseBorrowCoefficient()); + Assertions.assertNotNull(item.getQuoteBorrowCoefficient()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/OrderApiTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/OrderApiTest.java new file mode 100644 index 00000000..5ac53a20 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/OrderApiTest.java @@ -0,0 +1,441 @@ +package com.kucoin.universal.sdk.test.e2e.rest.margin; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.margin.order.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; +import java.util.UUID; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class OrderApiTest { + + private static OrderApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getMarginService().getOrderApi(); + } + + /** addOrder Add Order /api/v3/hf/margin/order */ + @Test + public void testAddOrder() throws Exception { + AddOrderReq.AddOrderReqBuilder builder = AddOrderReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .side(AddOrderReq.SideEnum.BUY) + .symbol("DOGE-USDT") + .type(AddOrderReq.TypeEnum.LIMIT) + .price("0.01") + .size("100") + .isIsolated(false) + .autoBorrow(true) + .autoRepay(true); + AddOrderReq req = builder.build(); + AddOrderResp resp = api.addOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getLoanApplyId()); + Assertions.assertNotNull(resp.getBorrowSize()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** addOrderTest Add Order Test /api/v3/hf/margin/order/test */ + @Test + public void testAddOrderTest() throws Exception { + AddOrderTestReq.AddOrderTestReqBuilder builder = AddOrderTestReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .side(AddOrderTestReq.SideEnum.BUY) + .symbol("DOGE-USDT") + .type(AddOrderTestReq.TypeEnum.LIMIT) + .price("0.01") + .size("100") + .isIsolated(false) + .autoBorrow(true) + .autoRepay(true); + + AddOrderTestReq req = builder.build(); + AddOrderTestResp resp = api.addOrderTest(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** cancelOrderByOrderId Cancel Order By OrderId /api/v3/hf/margin/orders/{orderId} */ + @Test + public void testCancelOrderByOrderId() throws Exception { + CancelOrderByOrderIdReq.CancelOrderByOrderIdReqBuilder builder = + CancelOrderByOrderIdReq.builder(); + builder.symbol("DOGE-USDT").orderId("68807b1a275af50007592aff"); + CancelOrderByOrderIdReq req = builder.build(); + CancelOrderByOrderIdResp resp = api.cancelOrderByOrderId(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * cancelOrderByClientOid Cancel Order By ClientOid + * /api/v3/hf/margin/orders/client-order/{clientOid} + */ + @Test + public void testCancelOrderByClientOid() throws Exception { + CancelOrderByClientOidReq.CancelOrderByClientOidReqBuilder builder = + CancelOrderByClientOidReq.builder(); + builder.symbol("DOGE-USDT").clientOid("1372c988-5b32-4fdf-80c0-d953de11e900"); + CancelOrderByClientOidReq req = builder.build(); + CancelOrderByClientOidResp resp = api.cancelOrderByClientOid(req); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** cancelAllOrdersBySymbol Cancel All Orders By Symbol /api/v3/hf/margin/orders */ + @Test + public void testCancelAllOrdersBySymbol() throws Exception { + CancelAllOrdersBySymbolReq.CancelAllOrdersBySymbolReqBuilder builder = + CancelAllOrdersBySymbolReq.builder(); + builder.symbol("DOGE-USDT").tradeType(CancelAllOrdersBySymbolReq.TradeTypeEnum.MARGIN_TRADE); + CancelAllOrdersBySymbolReq req = builder.build(); + CancelAllOrdersBySymbolResp resp = api.cancelAllOrdersBySymbol(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSymbolsWithOpenOrder Get Symbols With Open Order /api/v3/hf/margin/order/active/symbols */ + @Test + public void testGetSymbolsWithOpenOrder() throws Exception { + GetSymbolsWithOpenOrderReq.GetSymbolsWithOpenOrderReqBuilder builder = + GetSymbolsWithOpenOrderReq.builder(); + builder.tradeType(GetSymbolsWithOpenOrderReq.TradeTypeEnum.MARGIN_TRADE); + GetSymbolsWithOpenOrderReq req = builder.build(); + GetSymbolsWithOpenOrderResp resp = api.getSymbolsWithOpenOrder(req); + Assertions.assertNotNull(resp.getSymbolSize()); + resp.getSymbols().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getOpenOrders Get Open Orders /api/v3/hf/margin/orders/active */ + @Test + public void testGetOpenOrders() throws Exception { + GetOpenOrdersReq.GetOpenOrdersReqBuilder builder = GetOpenOrdersReq.builder(); + builder.symbol("DOGE-USDT").tradeType(GetOpenOrdersReq.TradeTypeEnum.MARGIN_TRADE); + GetOpenOrdersReq req = builder.build(); + GetOpenOrdersResp resp = api.getOpenOrders(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getOpType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getDealFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStopTriggered()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getLastUpdatedAt()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getInOrderBook()); + Assertions.assertNotNull(item.getCancelledSize()); + Assertions.assertNotNull(item.getCancelledFunds()); + Assertions.assertNotNull(item.getRemainSize()); + Assertions.assertNotNull(item.getRemainFunds()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getActive()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getClosedOrders Get Closed Orders /api/v3/hf/margin/orders/done */ + @Test + public void testGetClosedOrders() throws Exception { + GetClosedOrdersReq.GetClosedOrdersReqBuilder builder = GetClosedOrdersReq.builder(); + builder + .symbol("DOGE-USDT") + .tradeType(GetClosedOrdersReq.TradeTypeEnum.MARGIN_TRADE) + .side(GetClosedOrdersReq.SideEnum.BUY); + GetClosedOrdersReq req = builder.build(); + GetClosedOrdersResp resp = api.getClosedOrders(req); + Assertions.assertNotNull(resp.getLastId()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getOpType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getDealFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStopTriggered()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getLastUpdatedAt()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getInOrderBook()); + Assertions.assertNotNull(item.getCancelledSize()); + Assertions.assertNotNull(item.getCancelledFunds()); + Assertions.assertNotNull(item.getRemainSize()); + Assertions.assertNotNull(item.getRemainFunds()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getActive()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getTradeHistory Get Trade History /api/v3/hf/margin/fills */ + @Test + public void testGetTradeHistory() throws Exception { + GetTradeHistoryReq.GetTradeHistoryReqBuilder builder = GetTradeHistoryReq.builder(); + builder.symbol("DOGE-USDT").tradeType(GetTradeHistoryReq.TradeTypeEnum.MARGIN_TRADE); + GetTradeHistoryReq req = builder.build(); + GetTradeHistoryResp resp = api.getTradeHistory(req); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTradeId()); + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getCounterOrderId()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getLiquidity()); + Assertions.assertNotNull(item.getForceTaker()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeRate()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getTaxRate()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getCreatedAt()); + }); + + Assertions.assertNotNull(resp.getLastId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getOrderByOrderId Get Order By OrderId /api/v3/hf/margin/orders/{orderId} */ + @Test + public void testGetOrderByOrderId() throws Exception { + GetOrderByOrderIdReq.GetOrderByOrderIdReqBuilder builder = GetOrderByOrderIdReq.builder(); + builder.symbol("DOGE-USDT").orderId("68807d17ad309c00072df99f"); + GetOrderByOrderIdReq req = builder.build(); + GetOrderByOrderIdResp resp = api.getOrderByOrderId(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getOpType()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getFunds()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getDealFunds()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getFeeCurrency()); + Assertions.assertNotNull(resp.getStopTriggered()); + Assertions.assertNotNull(resp.getStopPrice()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getVisibleSize()); + Assertions.assertNotNull(resp.getCancelAfter()); + Assertions.assertNotNull(resp.getChannel()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getCancelExist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getLastUpdatedAt()); + Assertions.assertNotNull(resp.getTradeType()); + Assertions.assertNotNull(resp.getInOrderBook()); + Assertions.assertNotNull(resp.getCancelledSize()); + Assertions.assertNotNull(resp.getCancelledFunds()); + Assertions.assertNotNull(resp.getRemainSize()); + Assertions.assertNotNull(resp.getTax()); + Assertions.assertNotNull(resp.getActive()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * getOrderByClientOid Get Order By ClientOid /api/v3/hf/margin/orders/client-order/{clientOid} + */ + @Test + public void testGetOrderByClientOid() throws Exception { + GetOrderByClientOidReq.GetOrderByClientOidReqBuilder builder = GetOrderByClientOidReq.builder(); + builder.symbol("DOGE-USDT").clientOid("9e30b59f-bf21-4840-8288-df8cc6d2b6ee"); + GetOrderByClientOidReq req = builder.build(); + GetOrderByClientOidResp resp = api.getOrderByClientOid(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getOpType()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getFunds()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getDealFunds()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getFeeCurrency()); + Assertions.assertNotNull(resp.getStopTriggered()); + Assertions.assertNotNull(resp.getStopPrice()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getVisibleSize()); + Assertions.assertNotNull(resp.getCancelAfter()); + Assertions.assertNotNull(resp.getChannel()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getCancelExist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getLastUpdatedAt()); + Assertions.assertNotNull(resp.getTradeType()); + Assertions.assertNotNull(resp.getInOrderBook()); + Assertions.assertNotNull(resp.getCancelledSize()); + Assertions.assertNotNull(resp.getCancelledFunds()); + Assertions.assertNotNull(resp.getRemainSize()); + Assertions.assertNotNull(resp.getTax()); + Assertions.assertNotNull(resp.getActive()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** addOrderV1 Add Order - V1 /api/v1/margin/order */ + @Test + public void testAddOrderV1() throws Exception { + AddOrderV1Req.AddOrderV1ReqBuilder builder = AddOrderV1Req.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .side(AddOrderV1Req.SideEnum.BUY) + .symbol("DOGE-USDT") + .type(AddOrderV1Req.TypeEnum.LIMIT) + .price("0.01") + .size("100") + .autoBorrow(true) + .autoRepay(true) + .marginModel(AddOrderV1Req.MarginModelEnum.CROSS); + AddOrderV1Req req = builder.build(); + AddOrderV1Resp resp = api.addOrderV1(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getLoanApplyId()); + Assertions.assertNotNull(resp.getBorrowSize()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** addOrderTestV1 Add Order Test - V1 /api/v1/margin/order/test */ + @Test + public void testAddOrderTestV1() throws Exception { + AddOrderTestV1Req.AddOrderTestV1ReqBuilder builder = AddOrderTestV1Req.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .side(AddOrderTestV1Req.SideEnum.BUY) + .symbol("DOGE-USDT") + .type(AddOrderTestV1Req.TypeEnum.LIMIT) + .price("0.01") + .size("100") + .autoBorrow(true) + .autoRepay(true) + .marginModel(AddOrderTestV1Req.MarginModelEnum.CROSS); + AddOrderTestV1Req req = builder.build(); + AddOrderTestV1Resp resp = api.addOrderTestV1(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getLoanApplyId()); + Assertions.assertNotNull(resp.getBorrowSize()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/RiskLimitApiTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/RiskLimitApiTest.java new file mode 100644 index 00000000..d682aa27 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/margin/RiskLimitApiTest.java @@ -0,0 +1,93 @@ +package com.kucoin.universal.sdk.test.e2e.rest.margin; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.margin.risklimit.GetMarginRiskLimitReq; +import com.kucoin.universal.sdk.generate.margin.risklimit.GetMarginRiskLimitResp; +import com.kucoin.universal.sdk.generate.margin.risklimit.RiskLimitApi; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class RiskLimitApiTest { + + private static RiskLimitApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getMarginService().getRiskLimitApi(); + } + + /** getMarginRiskLimit Get Margin Risk Limit /api/v3/margin/currencies */ + @Test + public void testGetMarginRiskLimit() throws Exception { + GetMarginRiskLimitReq.GetMarginRiskLimitReqBuilder builder = GetMarginRiskLimitReq.builder(); + builder.isIsolated(false).currency("BTC"); + GetMarginRiskLimitReq req = builder.build(); + GetMarginRiskLimitResp resp = api.getMarginRiskLimit(req); + resp.getData() + .forEach( + item -> { + try { + log.info("resp: {}", mapper.writeValueAsString(item)); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} From 60a4f7baf2369ce6ec13027d6eeef68422be5ae0 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Wed, 23 Jul 2025 17:57:58 +0800 Subject: [PATCH 31/39] feat(java): add test for api --- .../test/e2e/rest/futures/MarketApiTest.java | 408 ++++++ .../e2e/rest/futures/PositionsApiTest.java | 444 ++++++ .../sdk/test/e2e/rest/spot/MarketTest.java | 483 +++++++ .../sdk/test/e2e/rest/spot/OrderTest.java | 1189 ++++++++++++++++- .../test/robustness/ws/ReliabilityTest.java | 1 - 5 files changed, 2522 insertions(+), 3 deletions(-) create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/MarketApiTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/PositionsApiTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/spot/MarketTest.java diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/MarketApiTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/MarketApiTest.java new file mode 100644 index 00000000..2e6eac95 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/MarketApiTest.java @@ -0,0 +1,408 @@ +package com.kucoin.universal.sdk.test.e2e.rest.futures; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.futures.market.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class MarketApiTest { + + private static MarketApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getFuturesService().getMarketApi(); + } + + /** getSymbol Get Symbol /api/v1/contracts/{symbol} */ + @Test + public void testGetSymbol() throws Exception { + GetSymbolReq.GetSymbolReqBuilder builder = GetSymbolReq.builder(); + builder.symbol("XBTUSDTM"); + GetSymbolReq req = builder.build(); + GetSymbolResp resp = api.getSymbol(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getRootSymbol()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getFirstOpenDate()); + Assertions.assertNotNull(resp.getBaseCurrency()); + Assertions.assertNotNull(resp.getQuoteCurrency()); + Assertions.assertNotNull(resp.getSettleCurrency()); + Assertions.assertNotNull(resp.getMaxOrderQty()); + Assertions.assertNotNull(resp.getMaxPrice()); + Assertions.assertNotNull(resp.getLotSize()); + Assertions.assertNotNull(resp.getTickSize()); + Assertions.assertNotNull(resp.getIndexPriceTickSize()); + Assertions.assertNotNull(resp.getMultiplier()); + Assertions.assertNotNull(resp.getInitialMargin()); + Assertions.assertNotNull(resp.getMaintainMargin()); + Assertions.assertNotNull(resp.getMaxRiskLimit()); + Assertions.assertNotNull(resp.getMinRiskLimit()); + Assertions.assertNotNull(resp.getRiskStep()); + Assertions.assertNotNull(resp.getMakerFeeRate()); + Assertions.assertNotNull(resp.getTakerFeeRate()); + Assertions.assertNotNull(resp.getTakerFixFee()); + Assertions.assertNotNull(resp.getMakerFixFee()); + Assertions.assertNotNull(resp.getIsDeleverage()); + Assertions.assertNotNull(resp.getIsQuanto()); + Assertions.assertNotNull(resp.getIsInverse()); + Assertions.assertNotNull(resp.getMarkMethod()); + Assertions.assertNotNull(resp.getFairMethod()); + Assertions.assertNotNull(resp.getFundingBaseSymbol()); + Assertions.assertNotNull(resp.getFundingQuoteSymbol()); + Assertions.assertNotNull(resp.getFundingRateSymbol()); + Assertions.assertNotNull(resp.getIndexSymbol()); + Assertions.assertNotNull(resp.getSettlementSymbol()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getFundingFeeRate()); + Assertions.assertNotNull(resp.getFundingRateGranularity()); + Assertions.assertNotNull(resp.getOpenInterest()); + Assertions.assertNotNull(resp.getTurnoverOf24h()); + Assertions.assertNotNull(resp.getVolumeOf24h()); + Assertions.assertNotNull(resp.getMarkPrice()); + Assertions.assertNotNull(resp.getIndexPrice()); + Assertions.assertNotNull(resp.getLastTradePrice()); + Assertions.assertNotNull(resp.getNextFundingRateTime()); + Assertions.assertNotNull(resp.getMaxLeverage()); + resp.getSourceExchanges().forEach(item -> {}); + + Assertions.assertNotNull(resp.getPremiumsSymbol1M()); + Assertions.assertNotNull(resp.getPremiumsSymbol8H()); + Assertions.assertNotNull(resp.getFundingBaseSymbol1M()); + Assertions.assertNotNull(resp.getFundingQuoteSymbol1M()); + Assertions.assertNotNull(resp.getLowPrice()); + Assertions.assertNotNull(resp.getHighPrice()); + Assertions.assertNotNull(resp.getPriceChgPct()); + Assertions.assertNotNull(resp.getPriceChg()); + Assertions.assertNotNull(resp.getK()); + Assertions.assertNotNull(resp.getM()); + Assertions.assertNotNull(resp.getF()); + Assertions.assertNotNull(resp.getMmrLimit()); + Assertions.assertNotNull(resp.getMmrLevConstant()); + Assertions.assertNotNull(resp.getSupportCross()); + Assertions.assertNotNull(resp.getBuyLimit()); + Assertions.assertNotNull(resp.getSellLimit()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getAllSymbols Get All Symbols /api/v1/contracts/active */ + @Test + public void testGetAllSymbols() throws Exception { + GetAllSymbolsResp resp = api.getAllSymbols(); + Assertions.assertNotNull(resp.getData()); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getTicker Get Ticker /api/v1/ticker */ + @Test + public void testGetTicker() throws Exception { + GetTickerReq.GetTickerReqBuilder builder = GetTickerReq.builder(); + builder.symbol("XBTUSDTM"); + GetTickerReq req = builder.build(); + GetTickerResp resp = api.getTicker(req); + Assertions.assertNotNull(resp.getSequence()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getTradeId()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getBestBidPrice()); + Assertions.assertNotNull(resp.getBestBidSize()); + Assertions.assertNotNull(resp.getBestAskPrice()); + Assertions.assertNotNull(resp.getBestAskSize()); + Assertions.assertNotNull(resp.getTs()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getAllTickers Get All Tickers /api/v1/allTickers */ + @Test + public void testGetAllTickers() throws Exception { + GetAllTickersResp resp = api.getAllTickers(); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getSequence()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getTradeId()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getBestBidPrice()); + Assertions.assertNotNull(item.getBestBidSize()); + Assertions.assertNotNull(item.getBestAskPrice()); + Assertions.assertNotNull(item.getBestAskSize()); + Assertions.assertNotNull(item.getTs()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getFullOrderBook Get Full OrderBook /api/v1/level2/snapshot */ + @Test + public void testGetFullOrderBook() throws Exception { + GetFullOrderBookReq.GetFullOrderBookReqBuilder builder = GetFullOrderBookReq.builder(); + builder.symbol("XBTUSDTM"); + GetFullOrderBookReq req = builder.build(); + GetFullOrderBookResp resp = api.getFullOrderBook(req); + Assertions.assertNotNull(resp.getSequence()); + Assertions.assertNotNull(resp.getSymbol()); + resp.getBids().forEach(item -> {}); + + resp.getAsks().forEach(item -> {}); + + Assertions.assertNotNull(resp.getTs()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getPartOrderBook Get Part OrderBook /api/v1/level2/depth{size} */ + @Test + public void testGetPartOrderBook() throws Exception { + GetPartOrderBookReq.GetPartOrderBookReqBuilder builder = GetPartOrderBookReq.builder(); + builder.size("20").symbol("XBTUSDTM"); + GetPartOrderBookReq req = builder.build(); + GetPartOrderBookResp resp = api.getPartOrderBook(req); + Assertions.assertNotNull(resp.getSequence()); + Assertions.assertNotNull(resp.getSymbol()); + resp.getBids().forEach(item -> {}); + + resp.getAsks().forEach(item -> {}); + + Assertions.assertNotNull(resp.getTs()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getTradeHistory Get Trade History /api/v1/trade/history */ + @Test + public void testGetTradeHistory() throws Exception { + GetTradeHistoryReq.GetTradeHistoryReqBuilder builder = GetTradeHistoryReq.builder(); + builder.symbol("XBTUSDTM"); + GetTradeHistoryReq req = builder.build(); + GetTradeHistoryResp resp = api.getTradeHistory(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getSequence()); + Assertions.assertNotNull(item.getContractId()); + Assertions.assertNotNull(item.getTradeId()); + Assertions.assertNotNull(item.getMakerOrderId()); + Assertions.assertNotNull(item.getTakerOrderId()); + Assertions.assertNotNull(item.getTs()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSide()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getKlines Get Klines /api/v1/kline/query */ + @Test + public void testGetKlines() throws Exception { + GetKlinesReq.GetKlinesReqBuilder builder = GetKlinesReq.builder(); + builder + .symbol("XBTUSDTM") + .granularity(GetKlinesReq.GranularityEnum._1) + .from(1753203600000L) + .to(1753207200000L); + GetKlinesReq req = builder.build(); + GetKlinesResp resp = api.getKlines(req); + resp.getData().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getMarkPrice Get Mark Price /api/v1/mark-price/{symbol}/current */ + @Test + public void testGetMarkPrice() throws Exception { + GetMarkPriceReq.GetMarkPriceReqBuilder builder = GetMarkPriceReq.builder(); + builder.symbol("XBTUSDTM"); + GetMarkPriceReq req = builder.build(); + GetMarkPriceResp resp = api.getMarkPrice(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getGranularity()); + Assertions.assertNotNull(resp.getTimePoint()); + Assertions.assertNotNull(resp.getValue()); + Assertions.assertNotNull(resp.getIndexPrice()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSpotIndexPrice Get Spot Index Price /api/v1/index/query */ + @Test + public void testGetSpotIndexPrice() throws Exception { + GetSpotIndexPriceReq.GetSpotIndexPriceReqBuilder builder = GetSpotIndexPriceReq.builder(); + builder.symbol(".KXBTUSDT"); + GetSpotIndexPriceReq req = builder.build(); + GetSpotIndexPriceResp resp = api.getSpotIndexPrice(req); + resp.getDataList() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getGranularity()); + Assertions.assertNotNull(item.getTimePoint()); + Assertions.assertNotNull(item.getValue()); + Assertions.assertNotNull(item.getDecomposionList()); + }); + + Assertions.assertNotNull(resp.getHasMore()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getInterestRateIndex Get Interest Rate Index /api/v1/interest/query */ + @Test + public void testGetInterestRateIndex() throws Exception { + GetInterestRateIndexReq.GetInterestRateIndexReqBuilder builder = + GetInterestRateIndexReq.builder(); + builder.symbol(".XBTINT"); + GetInterestRateIndexReq req = builder.build(); + GetInterestRateIndexResp resp = api.getInterestRateIndex(req); + resp.getDataList() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getGranularity()); + Assertions.assertNotNull(item.getTimePoint()); + Assertions.assertNotNull(item.getValue()); + }); + + Assertions.assertNotNull(resp.getHasMore()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getPremiumIndex Get Premium Index /api/v1/premium/query */ + @Test + public void testGetPremiumIndex() throws Exception { + GetPremiumIndexReq.GetPremiumIndexReqBuilder builder = GetPremiumIndexReq.builder(); + builder.symbol("XBTUSDTMPI"); + GetPremiumIndexReq req = builder.build(); + GetPremiumIndexResp resp = api.getPremiumIndex(req); + resp.getDataList() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getGranularity()); + Assertions.assertNotNull(item.getTimePoint()); + Assertions.assertNotNull(item.getValue()); + }); + + Assertions.assertNotNull(resp.getHasMore()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** get24hrStats Get 24hr stats /api/v1/trade-statistics */ + @Test + public void testGet24hrStats() throws Exception { + Get24hrStatsResp resp = api.get24hrStats(); + Assertions.assertNotNull(resp.getTurnoverOf24h()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getServerTime Get Server Time /api/v1/timestamp */ + @Test + public void testGetServerTime() throws Exception { + GetServerTimeResp resp = api.getServerTime(); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getServiceStatus Get Service Status /api/v1/status */ + @Test + public void testGetServiceStatus() throws Exception { + GetServiceStatusResp resp = api.getServiceStatus(); + Assertions.assertNotNull(resp.getMsg()); + Assertions.assertNotNull(resp.getStatus()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + // + /** getPublicToken Get Public Token - Futures /api/v1/bullet-public */ + @Test + public void testGetPublicToken() throws Exception { + GetPublicTokenResp resp = api.getPublicToken(); + Assertions.assertNotNull(resp.getToken()); + resp.getInstanceServers() + .forEach( + item -> { + Assertions.assertNotNull(item.getEndpoint()); + Assertions.assertNotNull(item.getEncrypt()); + Assertions.assertNotNull(item.getProtocol()); + Assertions.assertNotNull(item.getPingInterval()); + Assertions.assertNotNull(item.getPingTimeout()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getPrivateToken Get Private Token - Futures /api/v1/bullet-private */ + @Test + public void testGetPrivateToken() throws Exception { + GetPrivateTokenResp resp = api.getPrivateToken(); + Assertions.assertNotNull(resp.getToken()); + resp.getInstanceServers() + .forEach( + item -> { + Assertions.assertNotNull(item.getEndpoint()); + Assertions.assertNotNull(item.getEncrypt()); + Assertions.assertNotNull(item.getProtocol()); + Assertions.assertNotNull(item.getPingInterval()); + Assertions.assertNotNull(item.getPingTimeout()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/PositionsApiTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/PositionsApiTest.java new file mode 100644 index 00000000..ad62350c --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/PositionsApiTest.java @@ -0,0 +1,444 @@ +package com.kucoin.universal.sdk.test.e2e.rest.futures; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.futures.market.*; +import com.kucoin.universal.sdk.generate.futures.positions.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Arrays; +import java.util.Collections; +import java.util.UUID; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class PositionsApiTest { + + private static PositionsApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getFuturesService().getPositionsApi(); + } + + /** getMarginMode Get Margin Mode /api/v2/position/getMarginMode */ + @Test + public void testGetMarginMode() throws Exception { + GetMarginModeReq.GetMarginModeReqBuilder builder = GetMarginModeReq.builder(); + builder.symbol("XBTUSDTM"); + GetMarginModeReq req = builder.build(); + GetMarginModeResp resp = api.getMarginMode(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getMarginMode()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** switchMarginMode Switch Margin Mode /api/v2/position/changeMarginMode */ + @Test + public void testSwitchMarginMode() throws Exception { + SwitchMarginModeReq.SwitchMarginModeReqBuilder builder = SwitchMarginModeReq.builder(); + builder.symbol("XBTUSDTM").marginMode(SwitchMarginModeReq.MarginModeEnum.CROSS); + SwitchMarginModeReq req = builder.build(); + SwitchMarginModeResp resp = api.switchMarginMode(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getMarginMode()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** batchSwitchMarginMode Batch Switch Margin Mode /api/v2/position/batchChangeMarginMode */ + @Test + public void testBatchSwitchMarginMode() throws Exception { + BatchSwitchMarginModeReq.BatchSwitchMarginModeReqBuilder builder = + BatchSwitchMarginModeReq.builder(); + builder + .marginMode(BatchSwitchMarginModeReq.MarginModeEnum.CROSS) + .symbols(Arrays.asList("XBTUSDTM", "ETHUSDTM")); + BatchSwitchMarginModeReq req = builder.build(); + BatchSwitchMarginModeResp resp = api.batchSwitchMarginMode(req); + Assertions.assertNotNull(resp.getMarginMode()); + resp.getErrors() + .forEach( + item -> { + Assertions.assertNotNull(item.getCode()); + Assertions.assertNotNull(item.getMsg()); + Assertions.assertNotNull(item.getSymbol()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getMaxOpenSize Get Max Open Size /api/v2/getMaxOpenSize */ + @Test + public void testGetMaxOpenSize() throws Exception { + GetMaxOpenSizeReq.GetMaxOpenSizeReqBuilder builder = GetMaxOpenSizeReq.builder(); + builder.symbol("XBTUSDTM").price("10000").leverage(4); + GetMaxOpenSizeReq req = builder.build(); + GetMaxOpenSizeResp resp = api.getMaxOpenSize(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getMaxBuyOpenSize()); + Assertions.assertNotNull(resp.getMaxSellOpenSize()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getPositionDetails Get Position Details /api/v1/position */ + @Test + public void testGetPositionDetails() throws Exception { + GetPositionDetailsReq.GetPositionDetailsReqBuilder builder = GetPositionDetailsReq.builder(); + builder.symbol("XBTUSDTM"); + GetPositionDetailsReq req = builder.build(); + GetPositionDetailsResp resp = api.getPositionDetails(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getCrossMode()); + Assertions.assertNotNull(resp.getDelevPercentage()); + Assertions.assertNotNull(resp.getOpeningTimestamp()); + Assertions.assertNotNull(resp.getCurrentTimestamp()); + Assertions.assertNotNull(resp.getCurrentQty()); + Assertions.assertNotNull(resp.getCurrentCost()); + Assertions.assertNotNull(resp.getCurrentComm()); + Assertions.assertNotNull(resp.getUnrealisedCost()); + Assertions.assertNotNull(resp.getRealisedGrossCost()); + Assertions.assertNotNull(resp.getRealisedCost()); + Assertions.assertNotNull(resp.getIsOpen()); + Assertions.assertNotNull(resp.getMarkPrice()); + Assertions.assertNotNull(resp.getMarkValue()); + Assertions.assertNotNull(resp.getPosCost()); + Assertions.assertNotNull(resp.getPosInit()); + Assertions.assertNotNull(resp.getPosMargin()); + Assertions.assertNotNull(resp.getRealisedGrossPnl()); + Assertions.assertNotNull(resp.getRealisedPnl()); + Assertions.assertNotNull(resp.getUnrealisedPnl()); + Assertions.assertNotNull(resp.getUnrealisedPnlPcnt()); + Assertions.assertNotNull(resp.getUnrealisedRoePcnt()); + Assertions.assertNotNull(resp.getAvgEntryPrice()); + Assertions.assertNotNull(resp.getLiquidationPrice()); + Assertions.assertNotNull(resp.getBankruptPrice()); + Assertions.assertNotNull(resp.getSettleCurrency()); + Assertions.assertNotNull(resp.getIsInverse()); + Assertions.assertNotNull(resp.getMarginMode()); + Assertions.assertNotNull(resp.getPositionSide()); + Assertions.assertNotNull(resp.getMaintMarginReq()); + Assertions.assertNotNull(resp.getRiskLimit()); + Assertions.assertNotNull(resp.getRealLeverage()); + Assertions.assertNotNull(resp.getPosCross()); + Assertions.assertNotNull(resp.getPosComm()); + Assertions.assertNotNull(resp.getPosMaint()); + Assertions.assertNotNull(resp.getMaintMargin()); + Assertions.assertNotNull(resp.getMaintainMargin()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getPositionList Get Position List /api/v1/positions */ + @Test + public void testGetPositionList() throws Exception { + GetPositionListReq.GetPositionListReqBuilder builder = GetPositionListReq.builder(); + builder.currency("USDT"); + GetPositionListReq req = builder.build(); + GetPositionListResp resp = api.getPositionList(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getCrossMode()); + Assertions.assertNotNull(item.getDelevPercentage()); + Assertions.assertNotNull(item.getOpeningTimestamp()); + Assertions.assertNotNull(item.getCurrentTimestamp()); + Assertions.assertNotNull(item.getCurrentQty()); + Assertions.assertNotNull(item.getCurrentCost()); + Assertions.assertNotNull(item.getCurrentComm()); + Assertions.assertNotNull(item.getUnrealisedCost()); + Assertions.assertNotNull(item.getRealisedGrossCost()); + Assertions.assertNotNull(item.getRealisedCost()); + Assertions.assertNotNull(item.getIsOpen()); + Assertions.assertNotNull(item.getMarkPrice()); + Assertions.assertNotNull(item.getMarkValue()); + Assertions.assertNotNull(item.getPosCost()); + Assertions.assertNotNull(item.getPosInit()); + Assertions.assertNotNull(item.getPosMargin()); + Assertions.assertNotNull(item.getRealisedGrossPnl()); + Assertions.assertNotNull(item.getRealisedPnl()); + Assertions.assertNotNull(item.getUnrealisedPnl()); + Assertions.assertNotNull(item.getUnrealisedPnlPcnt()); + Assertions.assertNotNull(item.getUnrealisedRoePcnt()); + Assertions.assertNotNull(item.getAvgEntryPrice()); + Assertions.assertNotNull(item.getLiquidationPrice()); + Assertions.assertNotNull(item.getBankruptPrice()); + Assertions.assertNotNull(item.getSettleCurrency()); + Assertions.assertNotNull(item.getIsInverse()); + Assertions.assertNotNull(item.getMarginMode()); + Assertions.assertNotNull(item.getPositionSide()); + Assertions.assertNotNull(item.getLeverage()); + Assertions.assertNotNull(item.getMaintMarginReq()); + Assertions.assertNotNull(item.getPosMaint()); + Assertions.assertNotNull(item.getMaintainMargin()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getPositionsHistory Get Positions History /api/v1/history-positions */ + @Test + public void testGetPositionsHistory() throws Exception { + GetPositionsHistoryReq.GetPositionsHistoryReqBuilder builder = GetPositionsHistoryReq.builder(); + builder.symbol("XBTUSDTM"); + GetPositionsHistoryReq req = builder.build(); + GetPositionsHistoryResp resp = api.getPositionsHistory(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getCloseId()); + Assertions.assertNotNull(item.getUserId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getSettleCurrency()); + Assertions.assertNotNull(item.getLeverage()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getPnl()); + Assertions.assertNotNull(item.getRealisedGrossCost()); + Assertions.assertNotNull(item.getWithdrawPnl()); + Assertions.assertNotNull(item.getTradeFee()); + Assertions.assertNotNull(item.getFundingFee()); + Assertions.assertNotNull(item.getOpenTime()); + Assertions.assertNotNull(item.getCloseTime()); + Assertions.assertNotNull(item.getOpenPrice()); + Assertions.assertNotNull(item.getClosePrice()); + Assertions.assertNotNull(item.getMarginMode()); + Assertions.assertNotNull(item.getRealisedGrossCostNew()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getRoe()); + Assertions.assertNotNull(item.getSide()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getMaxWithdrawMargin Get Max Withdraw Margin /api/v1/margin/maxWithdrawMargin */ + @Test + public void testGetMaxWithdrawMargin() throws Exception { + GetMaxWithdrawMarginReq.GetMaxWithdrawMarginReqBuilder builder = + GetMaxWithdrawMarginReq.builder(); + builder.symbol("XBTUSDTM"); + GetMaxWithdrawMarginReq req = builder.build(); + GetMaxWithdrawMarginResp resp = api.getMaxWithdrawMargin(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getCrossMarginLeverage Get Cross Margin Leverage /api/v2/getCrossUserLeverage */ + @Test + public void testGetCrossMarginLeverage() throws Exception { + GetCrossMarginLeverageReq.GetCrossMarginLeverageReqBuilder builder = + GetCrossMarginLeverageReq.builder(); + builder.symbol("XBTUSDTM"); + GetCrossMarginLeverageReq req = builder.build(); + GetCrossMarginLeverageResp resp = api.getCrossMarginLeverage(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getLeverage()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** modifyMarginLeverage Modify Cross Margin Leverage /api/v2/changeCrossUserLeverage */ + @Test + public void testModifyMarginLeverage() throws Exception { + ModifyMarginLeverageReq.ModifyMarginLeverageReqBuilder builder = + ModifyMarginLeverageReq.builder(); + builder.symbol("XBTUSDTM").leverage("10"); + ModifyMarginLeverageReq req = builder.build(); + ModifyMarginLeverageResp resp = api.modifyMarginLeverage(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** addIsolatedMargin Add Isolated Margin /api/v1/position/margin/deposit-margin */ + @Test + public void testAddIsolatedMargin() throws Exception { + AddIsolatedMarginReq.AddIsolatedMarginReqBuilder builder = AddIsolatedMarginReq.builder(); + builder.symbol("XBTUSDTM").margin(1.23).bizNo(UUID.randomUUID().toString()); + AddIsolatedMarginReq req = builder.build(); + AddIsolatedMarginResp resp = api.addIsolatedMargin(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getAutoDeposit()); + Assertions.assertNotNull(resp.getMaintMarginReq()); + Assertions.assertNotNull(resp.getRiskLimit()); + Assertions.assertNotNull(resp.getRealLeverage()); + Assertions.assertNotNull(resp.getCrossMode()); + Assertions.assertNotNull(resp.getDelevPercentage()); + Assertions.assertNotNull(resp.getOpeningTimestamp()); + Assertions.assertNotNull(resp.getCurrentTimestamp()); + Assertions.assertNotNull(resp.getCurrentQty()); + Assertions.assertNotNull(resp.getCurrentCost()); + Assertions.assertNotNull(resp.getCurrentComm()); + Assertions.assertNotNull(resp.getUnrealisedCost()); + Assertions.assertNotNull(resp.getRealisedGrossCost()); + Assertions.assertNotNull(resp.getRealisedCost()); + Assertions.assertNotNull(resp.getIsOpen()); + Assertions.assertNotNull(resp.getMarkPrice()); + Assertions.assertNotNull(resp.getMarkValue()); + Assertions.assertNotNull(resp.getPosCost()); + Assertions.assertNotNull(resp.getPosCross()); + Assertions.assertNotNull(resp.getPosInit()); + Assertions.assertNotNull(resp.getPosComm()); + Assertions.assertNotNull(resp.getPosLoss()); + Assertions.assertNotNull(resp.getPosMargin()); + Assertions.assertNotNull(resp.getPosMaint()); + Assertions.assertNotNull(resp.getMaintMargin()); + Assertions.assertNotNull(resp.getRealisedGrossPnl()); + Assertions.assertNotNull(resp.getRealisedPnl()); + Assertions.assertNotNull(resp.getUnrealisedPnl()); + Assertions.assertNotNull(resp.getUnrealisedPnlPcnt()); + Assertions.assertNotNull(resp.getUnrealisedRoePcnt()); + Assertions.assertNotNull(resp.getAvgEntryPrice()); + Assertions.assertNotNull(resp.getLiquidationPrice()); + Assertions.assertNotNull(resp.getBankruptPrice()); + Assertions.assertNotNull(resp.getSettleCurrency()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** removeIsolatedMargin Remove Isolated Margin /api/v1/margin/withdrawMargin */ + @Test + public void testRemoveIsolatedMargin() throws Exception { + RemoveIsolatedMarginReq.RemoveIsolatedMarginReqBuilder builder = + RemoveIsolatedMarginReq.builder(); + builder.symbol("XBTUSDTM").withdrawAmount("1.0"); + RemoveIsolatedMarginReq req = builder.build(); + RemoveIsolatedMarginResp resp = api.removeIsolatedMargin(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getCrossMarginRiskLimit Get Cross Margin Risk Limit /api/v2/batchGetCrossOrderLimit */ + @Test + public void testGetCrossMarginRiskLimit() throws Exception { + GetCrossMarginRiskLimitReq.GetCrossMarginRiskLimitReqBuilder builder = + GetCrossMarginRiskLimitReq.builder(); + builder.symbol("XBTUSDTM").totalMargin("1").leverage(1); + GetCrossMarginRiskLimitReq req = builder.build(); + GetCrossMarginRiskLimitResp resp = api.getCrossMarginRiskLimit(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getMaxOpenSize()); + Assertions.assertNotNull(item.getMaxOpenValue()); + Assertions.assertNotNull(item.getTotalMargin()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getLeverage()); + Assertions.assertNotNull(item.getMmr()); + Assertions.assertNotNull(item.getImr()); + Assertions.assertNotNull(item.getCurrency()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * getIsolatedMarginRiskLimit Get Isolated Margin Risk Limit /api/v1/contracts/risk-limit/{symbol} + */ + @Test + public void testGetIsolatedMarginRiskLimit() throws Exception { + GetIsolatedMarginRiskLimitReq.GetIsolatedMarginRiskLimitReqBuilder builder = + GetIsolatedMarginRiskLimitReq.builder(); + builder.symbol("XBTUSDTM"); + GetIsolatedMarginRiskLimitReq req = builder.build(); + GetIsolatedMarginRiskLimitResp resp = api.getIsolatedMarginRiskLimit(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getLevel()); + Assertions.assertNotNull(item.getMaxRiskLimit()); + Assertions.assertNotNull(item.getMinRiskLimit()); + Assertions.assertNotNull(item.getMaxLeverage()); + Assertions.assertNotNull(item.getInitialMargin()); + Assertions.assertNotNull(item.getMaintainMargin()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * modifyIsolatedMarginRiskLimt Modify Isolated Margin Risk Limit + * /api/v1/position/risk-limit-level/change + */ + @Test + public void testModifyIsolatedMarginRiskLimt() throws Exception { + ModifyIsolatedMarginRiskLimtReq.ModifyIsolatedMarginRiskLimtReqBuilder builder = + ModifyIsolatedMarginRiskLimtReq.builder(); + builder.symbol("XBTUSDTM").level(1); + ModifyIsolatedMarginRiskLimtReq req = builder.build(); + ModifyIsolatedMarginRiskLimtResp resp = api.modifyIsolatedMarginRiskLimt(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * modifyAutoDepositStatus Modify Isolated Margin Auto-Deposit Status + * /api/v1/position/margin/auto-deposit-status + */ + @Test + public void testModifyAutoDepositStatus() throws Exception { + ModifyAutoDepositStatusReq.ModifyAutoDepositStatusReqBuilder builder = + ModifyAutoDepositStatusReq.builder(); + builder.symbol("XBTUSDTM").status(false); + ModifyAutoDepositStatusReq req = builder.build(); + ModifyAutoDepositStatusResp resp = api.modifyAutoDepositStatus(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/spot/MarketTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/spot/MarketTest.java new file mode 100644 index 00000000..1082117b --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/spot/MarketTest.java @@ -0,0 +1,483 @@ +package com.kucoin.universal.sdk.test.e2e.rest.spot; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.spot.market.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class MarketTest { + + private static MarketApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getSpotService().getMarketApi(); + } + + /** getAnnouncements Get Announcements /api/v3/announcements */ + @Test + public void testGetAnnouncements() throws Exception { + GetAnnouncementsReq.GetAnnouncementsReqBuilder builder = GetAnnouncementsReq.builder(); + builder + .annType(GetAnnouncementsReq.AnnTypeEnum.LATEST_ANNOUNCEMENTS) + .lang(GetAnnouncementsReq.LangEnum.EN_US); + GetAnnouncementsReq req = builder.build(); + GetAnnouncementsResp resp = api.getAnnouncements(req); + Assertions.assertNotNull(resp.getTotalNum()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getAnnId()); + Assertions.assertNotNull(item.getAnnTitle()); + Assertions.assertNotNull(item.getAnnType()); + Assertions.assertNotNull(item.getAnnDesc()); + Assertions.assertNotNull(item.getCTime()); + Assertions.assertNotNull(item.getLanguage()); + Assertions.assertNotNull(item.getAnnUrl()); + }); + + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalPage()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getCurrency Get Currency /api/v3/currencies/{currency} */ + @Test + public void testGetCurrency() throws Exception { + GetCurrencyReq.GetCurrencyReqBuilder builder = GetCurrencyReq.builder(); + builder.chain("eth").currency("eth"); + GetCurrencyReq req = builder.build(); + GetCurrencyResp resp = api.getCurrency(req); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getName()); + Assertions.assertNotNull(resp.getFullName()); + Assertions.assertNotNull(resp.getPrecision()); + Assertions.assertNotNull(resp.getIsMarginEnabled()); + Assertions.assertNotNull(resp.getIsDebitEnabled()); + resp.getChains() + .forEach( + item -> { + Assertions.assertNotNull(item.getChainName()); + Assertions.assertNotNull(item.getWithdrawalMinSize()); + Assertions.assertNotNull(item.getDepositMinSize()); + Assertions.assertNotNull(item.getWithdrawFeeRate()); + Assertions.assertNotNull(item.getWithdrawalMinFee()); + Assertions.assertNotNull(item.getIsWithdrawEnabled()); + Assertions.assertNotNull(item.getIsDepositEnabled()); + Assertions.assertNotNull(item.getConfirms()); + Assertions.assertNotNull(item.getPreConfirms()); + Assertions.assertNotNull(item.getContractAddress()); + Assertions.assertNotNull(item.getWithdrawPrecision()); + Assertions.assertNotNull(item.getNeedTag()); + Assertions.assertNotNull(item.getChainId()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getAllCurrencies Get All Currencies /api/v3/currencies */ + @Test + public void testGetAllCurrencies() throws Exception { + GetAllCurrenciesResp resp = api.getAllCurrencies(); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getName()); + Assertions.assertNotNull(item.getFullName()); + Assertions.assertNotNull(item.getPrecision()); + Assertions.assertNotNull(item.getIsMarginEnabled()); + Assertions.assertNotNull(item.getIsDebitEnabled()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSymbol Get Symbol /api/v2/symbols/{symbol} */ + @Test + public void testGetSymbol() throws Exception { + GetSymbolReq.GetSymbolReqBuilder builder = GetSymbolReq.builder(); + builder.symbol("BTC-USDT"); + GetSymbolReq req = builder.build(); + GetSymbolResp resp = api.getSymbol(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getName()); + Assertions.assertNotNull(resp.getBaseCurrency()); + Assertions.assertNotNull(resp.getQuoteCurrency()); + Assertions.assertNotNull(resp.getFeeCurrency()); + Assertions.assertNotNull(resp.getMarket()); + Assertions.assertNotNull(resp.getBaseMinSize()); + Assertions.assertNotNull(resp.getQuoteMinSize()); + Assertions.assertNotNull(resp.getBaseMaxSize()); + Assertions.assertNotNull(resp.getQuoteMaxSize()); + Assertions.assertNotNull(resp.getBaseIncrement()); + Assertions.assertNotNull(resp.getQuoteIncrement()); + Assertions.assertNotNull(resp.getPriceIncrement()); + Assertions.assertNotNull(resp.getPriceLimitRate()); + Assertions.assertNotNull(resp.getMinFunds()); + Assertions.assertNotNull(resp.getIsMarginEnabled()); + Assertions.assertNotNull(resp.getEnableTrading()); + Assertions.assertNotNull(resp.getFeeCategory()); + Assertions.assertNotNull(resp.getMakerFeeCoefficient()); + Assertions.assertNotNull(resp.getTakerFeeCoefficient()); + Assertions.assertNotNull(resp.getSt()); + Assertions.assertNotNull(resp.getCallauctionIsEnabled()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getAllSymbols Get All Symbols /api/v2/symbols */ + @Test + public void testGetAllSymbols() throws Exception { + GetAllSymbolsReq.GetAllSymbolsReqBuilder builder = GetAllSymbolsReq.builder(); + builder.market("USDS"); + GetAllSymbolsReq req = builder.build(); + GetAllSymbolsResp resp = api.getAllSymbols(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getName()); + Assertions.assertNotNull(item.getBaseCurrency()); + Assertions.assertNotNull(item.getQuoteCurrency()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getMarket()); + Assertions.assertNotNull(item.getBaseMinSize()); + Assertions.assertNotNull(item.getQuoteMinSize()); + Assertions.assertNotNull(item.getBaseMaxSize()); + Assertions.assertNotNull(item.getQuoteMaxSize()); + Assertions.assertNotNull(item.getBaseIncrement()); + Assertions.assertNotNull(item.getQuoteIncrement()); + Assertions.assertNotNull(item.getPriceIncrement()); + Assertions.assertNotNull(item.getPriceLimitRate()); + Assertions.assertNotNull(item.getIsMarginEnabled()); + Assertions.assertNotNull(item.getEnableTrading()); + Assertions.assertNotNull(item.getFeeCategory()); + Assertions.assertNotNull(item.getMakerFeeCoefficient()); + Assertions.assertNotNull(item.getTakerFeeCoefficient()); + Assertions.assertNotNull(item.getSt()); + Assertions.assertNotNull(item.getCallauctionIsEnabled()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getTicker Get Ticker /api/v1/market/orderbook/level1 */ + @Test + public void testGetTicker() throws Exception { + GetTickerReq.GetTickerReqBuilder builder = GetTickerReq.builder(); + builder.symbol("BTC-USDT"); + GetTickerReq req = builder.build(); + GetTickerResp resp = api.getTicker(req); + Assertions.assertNotNull(resp.getTime()); + Assertions.assertNotNull(resp.getSequence()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getBestBid()); + Assertions.assertNotNull(resp.getBestBidSize()); + Assertions.assertNotNull(resp.getBestAsk()); + Assertions.assertNotNull(resp.getBestAskSize()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * TODO fix later MakerCoefficientEnum(2) getAllTickers Get All Tickers /api/v1/market/allTickers + */ + @Test + public void testGetAllTickers() throws Exception { + GetAllTickersResp resp = api.getAllTickers(); + Assertions.assertNotNull(resp.getTime()); + resp.getTicker() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getSymbolName()); + Assertions.assertNotNull(item.getBuy()); + Assertions.assertNotNull(item.getBestBidSize()); + Assertions.assertNotNull(item.getSell()); + Assertions.assertNotNull(item.getBestAskSize()); + Assertions.assertNotNull(item.getChangeRate()); + Assertions.assertNotNull(item.getChangePrice()); + Assertions.assertNotNull(item.getHigh()); + Assertions.assertNotNull(item.getLow()); + Assertions.assertNotNull(item.getVol()); + Assertions.assertNotNull(item.getVolValue()); + Assertions.assertNotNull(item.getLast()); + Assertions.assertNotNull(item.getAveragePrice()); + Assertions.assertNotNull(item.getTakerFeeRate()); + Assertions.assertNotNull(item.getMakerFeeRate()); + Assertions.assertNotNull(item.getTakerCoefficient()); + Assertions.assertNotNull(item.getMakerCoefficient()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getTradeHistory Get Trade History /api/v1/market/histories */ + @Test + public void testGetTradeHistory() throws Exception { + GetTradeHistoryReq.GetTradeHistoryReqBuilder builder = GetTradeHistoryReq.builder(); + builder.symbol("BTC-USDT"); + GetTradeHistoryReq req = builder.build(); + GetTradeHistoryResp resp = api.getTradeHistory(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getSequence()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getTime()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getKlines Get Klines /api/v1/market/candles */ + @Test + public void testGetKlines() throws Exception { + GetKlinesReq.GetKlinesReqBuilder builder = GetKlinesReq.builder(); + builder + .symbol("BTC-USDT") + .type(GetKlinesReq.TypeEnum._1MIN) + .startAt(1753200000000L) + .endAt(1753203600000L); + GetKlinesReq req = builder.build(); + GetKlinesResp resp = api.getKlines(req); + resp.getData().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getPartOrderBook Get Part OrderBook /api/v1/market/orderbook/level2_{size} */ + @Test + public void testGetPartOrderBook() throws Exception { + GetPartOrderBookReq.GetPartOrderBookReqBuilder builder = GetPartOrderBookReq.builder(); + builder.symbol("BTC-USDT").size("20"); + GetPartOrderBookReq req = builder.build(); + GetPartOrderBookResp resp = api.getPartOrderBook(req); + Assertions.assertNotNull(resp.getTime()); + Assertions.assertNotNull(resp.getSequence()); + resp.getBids().forEach(item -> {}); + + resp.getAsks().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getFullOrderBook Get Full OrderBook /api/v3/market/orderbook/level2 */ + @Test + public void testGetFullOrderBook() throws Exception { + GetFullOrderBookReq.GetFullOrderBookReqBuilder builder = GetFullOrderBookReq.builder(); + builder.symbol("BTC-USDT"); + GetFullOrderBookReq req = builder.build(); + GetFullOrderBookResp resp = api.getFullOrderBook(req); + Assertions.assertNotNull(resp.getTime()); + Assertions.assertNotNull(resp.getSequence()); + resp.getBids().forEach(item -> {}); + + resp.getAsks().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * getCallAuctionPartOrderBook Get Call Auction Part OrderBook + * /api/v1/market/orderbook/callauction/level2_{size} + */ + @Test + public void testGetCallAuctionPartOrderBook() throws Exception { + GetCallAuctionPartOrderBookReq.GetCallAuctionPartOrderBookReqBuilder builder = + GetCallAuctionPartOrderBookReq.builder(); + builder.symbol("HBAR-USDC").size("20"); + GetCallAuctionPartOrderBookReq req = builder.build(); + GetCallAuctionPartOrderBookResp resp = api.getCallAuctionPartOrderBook(req); + Assertions.assertNotNull(resp.getTime()); + Assertions.assertNotNull(resp.getSequence()); + resp.getBids().forEach(item -> {}); + + resp.getAsks().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getCallAuctionInfo Get Call Auction Info /api/v1/market/callauctionData */ + @Test + public void testGetCallAuctionInfo() throws Exception { + GetCallAuctionInfoReq.GetCallAuctionInfoReqBuilder builder = GetCallAuctionInfoReq.builder(); + builder.symbol("HBAR-USDC"); + GetCallAuctionInfoReq req = builder.build(); + GetCallAuctionInfoResp resp = api.getCallAuctionInfo(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getEstimatedPrice()); + Assertions.assertNotNull(resp.getEstimatedSize()); + Assertions.assertNotNull(resp.getSellOrderRangeLowPrice()); + Assertions.assertNotNull(resp.getSellOrderRangeHighPrice()); + Assertions.assertNotNull(resp.getBuyOrderRangeLowPrice()); + Assertions.assertNotNull(resp.getBuyOrderRangeHighPrice()); + Assertions.assertNotNull(resp.getTime()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getFiatPrice Get Fiat Price /api/v1/prices */ + @Test + public void testGetFiatPrice() throws Exception { + GetFiatPriceReq.GetFiatPriceReqBuilder builder = GetFiatPriceReq.builder(); + builder.base("USD").currencies("BTC"); + GetFiatPriceReq req = builder.build(); + GetFiatPriceResp resp = api.getFiatPrice(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** get24hrStats Get 24hr Stats /api/v1/market/stats */ + @Test + public void testGet24hrStats() throws Exception { + Get24hrStatsReq.Get24hrStatsReqBuilder builder = Get24hrStatsReq.builder(); + builder.symbol("BTC-USDT"); + Get24hrStatsReq req = builder.build(); + Get24hrStatsResp resp = api.get24hrStats(req); + Assertions.assertNotNull(resp.getTime()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getBuy()); + Assertions.assertNotNull(resp.getSell()); + Assertions.assertNotNull(resp.getChangeRate()); + Assertions.assertNotNull(resp.getChangePrice()); + Assertions.assertNotNull(resp.getHigh()); + Assertions.assertNotNull(resp.getLow()); + Assertions.assertNotNull(resp.getVol()); + Assertions.assertNotNull(resp.getVolValue()); + Assertions.assertNotNull(resp.getLast()); + Assertions.assertNotNull(resp.getAveragePrice()); + Assertions.assertNotNull(resp.getTakerFeeRate()); + Assertions.assertNotNull(resp.getMakerFeeRate()); + Assertions.assertNotNull(resp.getTakerCoefficient()); + Assertions.assertNotNull(resp.getMakerCoefficient()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getMarketList Get Market List /api/v1/markets */ + @Test + public void testGetMarketList() throws Exception { + GetMarketListResp resp = api.getMarketList(); + resp.getData().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getClientIPAddress Get Client IP Address /api/v1/my-ip */ + @Test + public void testGetClientIPAddress() throws Exception { + GetClientIPAddressResp resp = api.getClientIPAddress(); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getServerTime Get Server Time /api/v1/timestamp */ + @Test + public void testGetServerTime() throws Exception { + GetServerTimeResp resp = api.getServerTime(); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getServiceStatus Get Service Status /api/v1/status */ + @Test + public void testGetServiceStatus() throws Exception { + GetServiceStatusResp resp = api.getServiceStatus(); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getMsg()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getPublicToken Get Public Token - Spot/Margin /api/v1/bullet-public */ + @Test + public void testGetPublicToken() throws Exception { + GetPublicTokenResp resp = api.getPublicToken(); + Assertions.assertNotNull(resp.getToken()); + resp.getInstanceServers() + .forEach( + item -> { + Assertions.assertNotNull(item.getEndpoint()); + Assertions.assertNotNull(item.getEncrypt()); + Assertions.assertNotNull(item.getProtocol()); + Assertions.assertNotNull(item.getPingInterval()); + Assertions.assertNotNull(item.getPingTimeout()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getPrivateToken Get Private Token - Spot/Margin /api/v1/bullet-private */ + @Test + public void testGetPrivateToken() throws Exception { + GetPrivateTokenResp resp = api.getPrivateToken(); + Assertions.assertNotNull(resp.getToken()); + resp.getInstanceServers() + .forEach( + item -> { + Assertions.assertNotNull(item.getEndpoint()); + Assertions.assertNotNull(item.getEncrypt()); + Assertions.assertNotNull(item.getProtocol()); + Assertions.assertNotNull(item.getPingInterval()); + Assertions.assertNotNull(item.getPingTimeout()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/spot/OrderTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/spot/OrderTest.java index cabfd663..c893247b 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/spot/OrderTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/spot/OrderTest.java @@ -8,6 +8,7 @@ import com.kucoin.universal.sdk.model.Constants; import com.kucoin.universal.sdk.model.TransportOption; import java.io.IOException; +import java.util.Arrays; import java.util.Collections; import java.util.UUID; import lombok.extern.slf4j.Slf4j; @@ -90,23 +91,262 @@ public void testAddOrder() throws Exception { log.info("resp: {}", resp.toString()); } + /** addOrderSync Add Order Sync /api/v1/hf/orders/sync */ + @Test + public void testAddOrderSync() throws Exception { + AddOrderSyncReq.AddOrderSyncReqBuilder builder = AddOrderSyncReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .side(AddOrderSyncReq.SideEnum.BUY) + .symbol("BTC-USDT") + .type(AddOrderSyncReq.TypeEnum.LIMIT) + .remark("test") + .price("1") + .size("2"); + AddOrderSyncReq req = builder.build(); + AddOrderSyncResp resp = api.addOrderSync(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getOrderTime()); + Assertions.assertNotNull(resp.getOriginSize()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getRemainSize()); + Assertions.assertNotNull(resp.getCanceledSize()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getMatchTime()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** addOrderTest Add Order Test /api/v1/hf/orders/test */ + @Test + public void testAddOrderTest() throws Exception { + AddOrderTestReq.AddOrderTestReqBuilder builder = AddOrderTestReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .side(AddOrderTestReq.SideEnum.BUY) + .symbol("BTC-USDT") + .type(AddOrderTestReq.TypeEnum.LIMIT) + .remark("test") + .price("1") + .size("2"); + AddOrderTestReq req = builder.build(); + AddOrderTestResp resp = api.addOrderTest(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** batchAddOrders Batch Add Orders /api/v1/hf/orders/multi */ + @Test + public void testBatchAddOrders() throws Exception { + BatchAddOrdersReq.BatchAddOrdersReqBuilder builder = BatchAddOrdersReq.builder(); + + BatchAddOrdersOrderList.BatchAddOrdersOrderListBuilder builder1 = + BatchAddOrdersOrderList.builder(); + builder1 + .clientOid(UUID.randomUUID().toString()) + .side(BatchAddOrdersOrderList.SideEnum.BUY) + .symbol("BTC-USDT") + .type(BatchAddOrdersOrderList.TypeEnum.LIMIT) + .remark("test") + .price("1") + .size("2"); + + BatchAddOrdersOrderList.BatchAddOrdersOrderListBuilder builder2 = + BatchAddOrdersOrderList.builder(); + builder2 + .clientOid(UUID.randomUUID().toString()) + .side(BatchAddOrdersOrderList.SideEnum.BUY) + .symbol("BTC-USDT") + .type(BatchAddOrdersOrderList.TypeEnum.LIMIT) + .remark("test") + .price("1") + .size("2"); + + builder.orderList(Arrays.asList(builder1.build(), builder2.build())); + BatchAddOrdersReq req = builder.build(); + BatchAddOrdersResp resp = api.batchAddOrders(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getSuccess()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** batchAddOrdersSync Batch Add Orders Sync /api/v1/hf/orders/multi/sync */ + @Test + public void testBatchAddOrdersSync() throws Exception { + BatchAddOrdersSyncReq.BatchAddOrdersSyncReqBuilder builder = BatchAddOrdersSyncReq.builder(); + + BatchAddOrdersSyncOrderList.BatchAddOrdersSyncOrderListBuilder builder1 = + BatchAddOrdersSyncOrderList.builder(); + builder1 + .clientOid(UUID.randomUUID().toString()) + .side(BatchAddOrdersSyncOrderList.SideEnum.BUY) + .symbol("BTC-USDT") + .type(BatchAddOrdersSyncOrderList.TypeEnum.LIMIT) + .remark("test") + .price("1") + .size("2"); + + BatchAddOrdersSyncOrderList.BatchAddOrdersSyncOrderListBuilder builder2 = + BatchAddOrdersSyncOrderList.builder(); + builder2 + .clientOid(UUID.randomUUID().toString()) + .side(BatchAddOrdersSyncOrderList.SideEnum.BUY) + .symbol("BTC-USDT") + .type(BatchAddOrdersSyncOrderList.TypeEnum.LIMIT) + .remark("test") + .price("1") + .size("2"); + builder.orderList(Arrays.asList(builder1.build(), builder2.build())); + BatchAddOrdersSyncReq req = builder.build(); + BatchAddOrdersSyncResp resp = api.batchAddOrdersSync(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getOrderTime()); + Assertions.assertNotNull(item.getOriginSize()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getRemainSize()); + Assertions.assertNotNull(item.getCanceledSize()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getMatchTime()); + Assertions.assertNotNull(item.getSuccess()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** cancelOrderByOrderId Cancel Order By OrderId /api/v1/hf/orders/{orderId} */ + @Test + public void testCancelOrderByOrderId() throws Exception { + CancelOrderByOrderIdReq.CancelOrderByOrderIdReqBuilder builder = + CancelOrderByOrderIdReq.builder(); + builder.orderId("68808675ba0009000762a170").symbol("BTC-USDT"); + CancelOrderByOrderIdReq req = builder.build(); + CancelOrderByOrderIdResp resp = api.cancelOrderByOrderId(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** cancelOrderByOrderIdSync Cancel Order By OrderId Sync /api/v1/hf/orders/sync/{orderId} */ + @Test + public void testCancelOrderByOrderIdSync() throws Exception { + CancelOrderByOrderIdSyncReq.CancelOrderByOrderIdSyncReqBuilder builder = + CancelOrderByOrderIdSyncReq.builder(); + builder.symbol("BTC-USDT").orderId("688086d9abe6f40007d9d64a"); + CancelOrderByOrderIdSyncReq req = builder.build(); + CancelOrderByOrderIdSyncResp resp = api.cancelOrderByOrderIdSync(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getOriginSize()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getRemainSize()); + Assertions.assertNotNull(resp.getCanceledSize()); + Assertions.assertNotNull(resp.getStatus()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + /** cancelOrderByClientOid Cancel Order By ClientOid /api/v1/hf/orders/client-order/{clientOid} */ @Test public void testCancelOrderByClientOid() throws Exception { CancelOrderByClientOidReq.CancelOrderByClientOidReqBuilder builder = CancelOrderByClientOidReq.builder(); - builder.clientOid("120617f6-20c0-4317-9ba4-b1b07c4cdf49").symbol("BTC-USDT"); + builder.clientOid("7c1413d2-9a7b-4a2b-ab9b-fb03d3d01520").symbol("BTC-USDT"); CancelOrderByClientOidReq req = builder.build(); CancelOrderByClientOidResp resp = api.cancelOrderByClientOid(req); Assertions.assertNotNull(resp.getClientOid()); log.info("resp: {}", mapper.writeValueAsString(resp)); } + /** + * cancelOrderByClientOidSync Cancel Order By ClientOid Sync + * /api/v1/hf/orders/sync/client-order/{clientOid} + */ + @Test + public void testCancelOrderByClientOidSync() throws Exception { + CancelOrderByClientOidSyncReq.CancelOrderByClientOidSyncReqBuilder builder = + CancelOrderByClientOidSyncReq.builder(); + builder.symbol("BTC-USDT").clientOid("0b455f26-f0fa-4b49-ad20-bf0b9a3a014d"); + CancelOrderByClientOidSyncReq req = builder.build(); + CancelOrderByClientOidSyncResp resp = api.cancelOrderByClientOidSync(req); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getOriginSize()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getRemainSize()); + Assertions.assertNotNull(resp.getCanceledSize()); + Assertions.assertNotNull(resp.getStatus()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** cancelPartialOrder Cancel Partial Order /api/v1/hf/orders/cancel/{orderId} */ + @Test + public void testCancelPartialOrder() throws Exception { + CancelPartialOrderReq.CancelPartialOrderReqBuilder builder = CancelPartialOrderReq.builder(); + builder.orderId("688087a7bcd4f40007d0d563").symbol("BTC-USDT").cancelSize("1"); + CancelPartialOrderReq req = builder.build(); + CancelPartialOrderResp resp = api.cancelPartialOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getCancelSize()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** cancelAllOrdersBySymbol Cancel All Orders By Symbol /api/v1/hf/orders */ + @Test + public void testCancelAllOrdersBySymbol() throws Exception { + CancelAllOrdersBySymbolReq.CancelAllOrdersBySymbolReqBuilder builder = + CancelAllOrdersBySymbolReq.builder(); + builder.symbol("BTC-USDT"); + CancelAllOrdersBySymbolReq req = builder.build(); + CancelAllOrdersBySymbolResp resp = api.cancelAllOrdersBySymbol(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** cancelAllOrders Cancel All Orders /api/v1/hf/orders/cancelAll */ + @Test + public void testCancelAllOrders() throws Exception { + CancelAllOrdersResp resp = api.cancelAllOrders(); + resp.getSucceedSymbols().forEach(item -> {}); + + resp.getFailedSymbols() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getError()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** modifyOrder Modify Order /api/v1/hf/orders/alter */ + @Test + public void testModifyOrder() throws Exception { + ModifyOrderReq.ModifyOrderReqBuilder builder = ModifyOrderReq.builder(); + builder + .clientOid("e66d0636-69f1-4d16-bcf6-e0436f9461e6") + .symbol("BTC-USDT") + .orderId("68808854edd3e00007270165") + .newPrice("2") + .newSize("4"); + ModifyOrderReq req = builder.build(); + ModifyOrderResp resp = api.modifyOrder(req); + Assertions.assertNotNull(resp.getNewOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + /** getOrderByOrderId Get Order By OrderId /api/v1/hf/orders/{orderId} */ @Test public void testGetOrderByOrderId() throws Exception { GetOrderByOrderIdReq.GetOrderByOrderIdReqBuilder builder = GetOrderByOrderIdReq.builder(); - builder.symbol("BTC-USDT").orderId("6874ca31c402b70007f7f1de"); + builder.symbol("BTC-USDT").orderId("68808874c402b700073b85c4"); GetOrderByOrderIdReq req = builder.build(); GetOrderByOrderIdResp resp = api.getOrderByOrderId(req); Assertions.assertNotNull(resp.getId()); @@ -143,4 +383,949 @@ public void testGetOrderByOrderId() throws Exception { Assertions.assertNotNull(resp.getActive()); log.info("resp: {}", mapper.writeValueAsString(resp)); } + + /** getOrderByClientOid Get Order By ClientOid /api/v1/hf/orders/client-order/{clientOid} */ + @Test + public void testGetOrderByClientOid() throws Exception { + GetOrderByClientOidReq.GetOrderByClientOidReqBuilder builder = GetOrderByClientOidReq.builder(); + builder.symbol("BTC-USDT").clientOid("e66d0636-69f1-4d16-bcf6-e0436f9461e6"); + GetOrderByClientOidReq req = builder.build(); + GetOrderByClientOidResp resp = api.getOrderByClientOid(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getOpType()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getFunds()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getDealFunds()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getFeeCurrency()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getVisibleSize()); + Assertions.assertNotNull(resp.getCancelAfter()); + Assertions.assertNotNull(resp.getChannel()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getCancelExist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getLastUpdatedAt()); + Assertions.assertNotNull(resp.getTradeType()); + Assertions.assertNotNull(resp.getInOrderBook()); + Assertions.assertNotNull(resp.getCancelledSize()); + Assertions.assertNotNull(resp.getCancelledFunds()); + Assertions.assertNotNull(resp.getRemainSize()); + Assertions.assertNotNull(resp.getRemainFunds()); + Assertions.assertNotNull(resp.getTax()); + Assertions.assertNotNull(resp.getActive()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSymbolsWithOpenOrder Get Symbols With Open Order /api/v1/hf/orders/active/symbols */ + @Test + public void testGetSymbolsWithOpenOrder() throws Exception { + GetSymbolsWithOpenOrderResp resp = api.getSymbolsWithOpenOrder(); + resp.getSymbols().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getOpenOrders Get Open Orders /api/v1/hf/orders/active */ + @Test + public void testGetOpenOrders() throws Exception { + GetOpenOrdersReq.GetOpenOrdersReqBuilder builder = GetOpenOrdersReq.builder(); + builder.symbol("BTC-USDT"); + GetOpenOrdersReq req = builder.build(); + GetOpenOrdersResp resp = api.getOpenOrders(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getOpType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getDealFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getLastUpdatedAt()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getInOrderBook()); + Assertions.assertNotNull(item.getCancelledSize()); + Assertions.assertNotNull(item.getCancelledFunds()); + Assertions.assertNotNull(item.getRemainSize()); + Assertions.assertNotNull(item.getRemainFunds()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getActive()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getOpenOrdersByPage Get Open Orders By Page /api/v1/hf/orders/active/page */ + @Test + public void testGetOpenOrdersByPage() throws Exception { + GetOpenOrdersByPageReq.GetOpenOrdersByPageReqBuilder builder = GetOpenOrdersByPageReq.builder(); + builder.symbol("BTC-USDT").pageNum(1).pageSize(10); + GetOpenOrdersByPageReq req = builder.build(); + GetOpenOrdersByPageResp resp = api.getOpenOrdersByPage(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getOpType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getDealFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getLastUpdatedAt()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getInOrderBook()); + Assertions.assertNotNull(item.getCancelledSize()); + Assertions.assertNotNull(item.getCancelledFunds()); + Assertions.assertNotNull(item.getRemainSize()); + Assertions.assertNotNull(item.getRemainFunds()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getActive()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getClosedOrders Get Closed Orders /api/v1/hf/orders/done */ + @Test + public void testGetClosedOrders() throws Exception { + GetClosedOrdersReq.GetClosedOrdersReqBuilder builder = GetClosedOrdersReq.builder(); + builder.symbol("BTC-USDT").side(GetClosedOrdersReq.SideEnum.BUY); + GetClosedOrdersReq req = builder.build(); + GetClosedOrdersResp resp = api.getClosedOrders(req); + Assertions.assertNotNull(resp.getLastId()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getOpType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getDealFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getLastUpdatedAt()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getInOrderBook()); + Assertions.assertNotNull(item.getCancelledSize()); + Assertions.assertNotNull(item.getCancelledFunds()); + Assertions.assertNotNull(item.getRemainSize()); + Assertions.assertNotNull(item.getRemainFunds()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getActive()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getTradeHistory Get Trade History /api/v1/hf/fills */ + @Test + public void testGetTradeHistory() throws Exception { + GetTradeHistoryReq.GetTradeHistoryReqBuilder builder = GetTradeHistoryReq.builder(); + builder.symbol("DOGE-USDT"); + GetTradeHistoryReq req = builder.build(); + GetTradeHistoryResp resp = api.getTradeHistory(req); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTradeId()); + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getCounterOrderId()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getLiquidity()); + Assertions.assertNotNull(item.getForceTaker()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeRate()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getTaxRate()); + Assertions.assertNotNull(item.getTax()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getCreatedAt()); + }); + + Assertions.assertNotNull(resp.getLastId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getDCP Get DCP /api/v1/hf/orders/dead-cancel-all/query */ + @Test + public void testGetDCP() throws Exception { + GetDCPResp resp = api.getDCP(); + Assertions.assertNotNull(resp.getTimeout()); + Assertions.assertNotNull(resp.getSymbols()); + Assertions.assertNotNull(resp.getCurrentTime()); + Assertions.assertNotNull(resp.getTriggerTime()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** setDCP Set DCP /api/v1/hf/orders/dead-cancel-all */ + @Test + public void testSetDCP() throws Exception { + SetDCPReq.SetDCPReqBuilder builder = SetDCPReq.builder(); + builder.timeout(5).symbols("BTC-USDT"); + SetDCPReq req = builder.build(); + SetDCPResp resp = api.setDCP(req); + Assertions.assertNotNull(resp.getCurrentTime()); + Assertions.assertNotNull(resp.getTriggerTime()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** addStopOrder Add Stop Order /api/v1/stop-order */ + @Test + public void testAddStopOrder() throws Exception { + AddStopOrderReq.AddStopOrderReqBuilder builder = AddStopOrderReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .side(AddStopOrderReq.SideEnum.BUY) + .symbol("BTC-USDT") + .type(AddStopOrderReq.TypeEnum.LIMIT) + .remark("sdk_test") + .price("8100") + .size("0.001") + .stopPrice("8000"); + AddStopOrderReq req = builder.build(); + AddStopOrderResp resp = api.addStopOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {} {}", mapper.writeValueAsString(resp), req.getClientOid()); + } + + /** + * cancelStopOrderByClientOid Cancel Stop Order By ClientOid + * /api/v1/stop-order/cancelOrderByClientOid + */ + @Test + public void testCancelStopOrderByClientOid() throws Exception { + CancelStopOrderByClientOidReq.CancelStopOrderByClientOidReqBuilder builder = + CancelStopOrderByClientOidReq.builder(); + builder.symbol("BTC-USDT").clientOid("001869b9-bc72-4196-828f-22034e8efa06"); + CancelStopOrderByClientOidReq req = builder.build(); + CancelStopOrderByClientOidResp resp = api.cancelStopOrderByClientOid(req); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getCancelledOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** cancelStopOrderByOrderId Cancel Stop Order By OrderId /api/v1/stop-order/{orderId} */ + @Test + public void testCancelStopOrderByOrderId() throws Exception { + CancelStopOrderByOrderIdReq.CancelStopOrderByOrderIdReqBuilder builder = + CancelStopOrderByOrderIdReq.builder(); + builder.orderId("vs93gq40hp29bcik003t1tvg"); + CancelStopOrderByOrderIdReq req = builder.build(); + CancelStopOrderByOrderIdResp resp = api.cancelStopOrderByOrderId(req); + resp.getCancelledOrderIds().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** batchCancelStopOrder Batch Cancel Stop Orders /api/v1/stop-order/cancel */ + @Test + public void testBatchCancelStopOrder() throws Exception { + BatchCancelStopOrderReq.BatchCancelStopOrderReqBuilder builder = + BatchCancelStopOrderReq.builder(); + builder.symbol("BTC-USDT").tradeType("TRADE").orderIds("vs93gq40hpucmad4003rdr00"); + BatchCancelStopOrderReq req = builder.build(); + BatchCancelStopOrderResp resp = api.batchCancelStopOrder(req); + resp.getCancelledOrderIds().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getStopOrdersList Get Stop Orders List /api/v1/stop-order */ + @Test + public void testGetStopOrdersList() throws Exception { + GetStopOrdersListReq.GetStopOrdersListReqBuilder builder = GetStopOrdersListReq.builder(); + builder.symbol("BTC-USDT"); + GetStopOrdersListReq req = builder.build(); + GetStopOrdersListResp resp = api.getStopOrdersList(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getUserId()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getOrderTime()); + Assertions.assertNotNull(item.getDomainId()); + Assertions.assertNotNull(item.getTradeSource()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getTakerFeeRate()); + Assertions.assertNotNull(item.getMakerFeeRate()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getStopPrice()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getStopOrderByOrderId Get Stop Order By OrderId /api/v1/stop-order/{orderId} */ + @Test + public void testGetStopOrderByOrderId() throws Exception { + GetStopOrderByOrderIdReq.GetStopOrderByOrderIdReqBuilder builder = + GetStopOrderByOrderIdReq.builder(); + builder.orderId("vs93gq40hnslqnu6003sc6g7"); + GetStopOrderByOrderIdReq req = builder.build(); + GetStopOrderByOrderIdResp resp = api.getStopOrderByOrderId(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getUserId()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getCancelAfter()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getChannel()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getDomainId()); + Assertions.assertNotNull(resp.getTradeSource()); + Assertions.assertNotNull(resp.getTradeType()); + Assertions.assertNotNull(resp.getFeeCurrency()); + Assertions.assertNotNull(resp.getTakerFeeRate()); + Assertions.assertNotNull(resp.getMakerFeeRate()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getStop()); + Assertions.assertNotNull(resp.getStopPrice()); + Assertions.assertNotNull(resp.getOrderTime()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * getStopOrderByClientOid Get Stop Order By ClientOid /api/v1/stop-order/queryOrderByClientOid + */ + @Test + public void testGetStopOrderByClientOid() throws Exception { + GetStopOrderByClientOidReq.GetStopOrderByClientOidReqBuilder builder = + GetStopOrderByClientOidReq.builder(); + builder.clientOid("14cb6ad8-7304-4e88-ae9d-646daccca426").symbol("BTC-USDT"); + GetStopOrderByClientOidReq req = builder.build(); + GetStopOrderByClientOidResp resp = api.getStopOrderByClientOid(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getUserId()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getDomainId()); + Assertions.assertNotNull(item.getTradeSource()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getTakerFeeRate()); + Assertions.assertNotNull(item.getMakerFeeRate()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getOrderTime()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** addOcoOrder Add OCO Order /api/v3/oco/order */ + @Test + public void testAddOcoOrder() throws Exception { + AddOcoOrderReq.AddOcoOrderReqBuilder builder = AddOcoOrderReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .side(AddOcoOrderReq.SideEnum.BUY) + .symbol("BTC-USDT") + .price("94000") + .size("0.001") + .stopPrice("130000") + .limitPrice("96000") + .tradeType(AddOcoOrderReq.TradeTypeEnum.TRADE); + AddOcoOrderReq req = builder.build(); + AddOcoOrderResp resp = api.addOcoOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {} {}", mapper.writeValueAsString(resp), req.getClientOid()); + } + + /** cancelOcoOrderByOrderId Cancel OCO Order By OrderId /api/v3/oco/order/{orderId} */ + @Test + public void testCancelOcoOrderByOrderId() throws Exception { + CancelOcoOrderByOrderIdReq.CancelOcoOrderByOrderIdReqBuilder builder = + CancelOcoOrderByOrderIdReq.builder(); + builder.orderId("68809163cb29a40007b6ec43"); + CancelOcoOrderByOrderIdReq req = builder.build(); + CancelOcoOrderByOrderIdResp resp = api.cancelOcoOrderByOrderId(req); + resp.getCancelledOrderIds().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * cancelOcoOrderByClientOid Cancel OCO Order By ClientOid /api/v3/oco/client-order/{clientOid} + */ + @Test + public void testCancelOcoOrderByClientOid() throws Exception { + CancelOcoOrderByClientOidReq.CancelOcoOrderByClientOidReqBuilder builder = + CancelOcoOrderByClientOidReq.builder(); + builder.clientOid("ca5d2e6b-98b3-4ae5-a540-2d277dba7213"); + CancelOcoOrderByClientOidReq req = builder.build(); + CancelOcoOrderByClientOidResp resp = api.cancelOcoOrderByClientOid(req); + resp.getCancelledOrderIds().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** batchCancelOcoOrders Batch Cancel OCO Order /api/v3/oco/orders */ + @Test + public void testBatchCancelOcoOrders() throws Exception { + BatchCancelOcoOrdersReq.BatchCancelOcoOrdersReqBuilder builder = + BatchCancelOcoOrdersReq.builder(); + builder.orderIds("688091bae09c5d0007025620").symbol("BTC-USDT"); + BatchCancelOcoOrdersReq req = builder.build(); + BatchCancelOcoOrdersResp resp = api.batchCancelOcoOrders(req); + resp.getCancelledOrderIds().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getOcoOrderByOrderId Get OCO Order By OrderId /api/v3/oco/order/{orderId} */ + @Test + public void testGetOcoOrderByOrderId() throws Exception { + GetOcoOrderByOrderIdReq.GetOcoOrderByOrderIdReqBuilder builder = + GetOcoOrderByOrderIdReq.builder(); + builder.orderId("688091bae09c5d0007025620"); + GetOcoOrderByOrderIdReq req = builder.build(); + GetOcoOrderByOrderIdResp resp = api.getOcoOrderByOrderId(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getOrderTime()); + Assertions.assertNotNull(resp.getStatus()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getOcoOrderByClientOid Get OCO Order By ClientOid /api/v3/oco/client-order/{clientOid} */ + @Test + public void testGetOcoOrderByClientOid() throws Exception { + GetOcoOrderByClientOidReq.GetOcoOrderByClientOidReqBuilder builder = + GetOcoOrderByClientOidReq.builder(); + builder.clientOid("036aa8cb-b437-4130-9218-1c25320258d2"); + GetOcoOrderByClientOidReq req = builder.build(); + GetOcoOrderByClientOidResp resp = api.getOcoOrderByClientOid(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getOrderTime()); + Assertions.assertNotNull(resp.getStatus()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * getOcoOrderDetailByOrderId Get OCO Order Detail By OrderId /api/v3/oco/order/details/{orderId} + */ + @Test + public void testGetOcoOrderDetailByOrderId() throws Exception { + GetOcoOrderDetailByOrderIdReq.GetOcoOrderDetailByOrderIdReqBuilder builder = + GetOcoOrderDetailByOrderIdReq.builder(); + builder.orderId("688091bae09c5d0007025620"); + GetOcoOrderDetailByOrderIdReq req = builder.build(); + GetOcoOrderDetailByOrderIdResp resp = api.getOcoOrderDetailByOrderId(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getOrderTime()); + Assertions.assertNotNull(resp.getStatus()); + resp.getOrders() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getStatus()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getOcoOrderList Get OCO Order List /api/v3/oco/orders */ + @Test + public void testGetOcoOrderList() throws Exception { + GetOcoOrderListReq.GetOcoOrderListReqBuilder builder = GetOcoOrderListReq.builder(); + builder.symbol("BTC-USDT"); + GetOcoOrderListReq req = builder.build(); + GetOcoOrderListResp resp = api.getOcoOrderList(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getOrderTime()); + Assertions.assertNotNull(item.getStatus()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** addOrderOld Add Order - Old /api/v1/orders */ + @Test + public void testAddOrderOld() throws Exception { + AddOrderOldReq.AddOrderOldReqBuilder builder = AddOrderOldReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .side(AddOrderOldReq.SideEnum.BUY) + .symbol("BTC-USDT") + .type(AddOrderOldReq.TypeEnum.LIMIT) + .remark("test") + .price("1") + .size("2"); + AddOrderOldReq req = builder.build(); + AddOrderOldResp resp = api.addOrderOld(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** addOrderTestOld Add Order Test - Old /api/v1/orders/test */ + @Test + public void testAddOrderTestOld() throws Exception { + AddOrderTestOldReq.AddOrderTestOldReqBuilder builder = AddOrderTestOldReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .side(AddOrderTestOldReq.SideEnum.BUY) + .symbol("BTC-USDT") + .type(AddOrderTestOldReq.TypeEnum.LIMIT) + .remark("test") + .price("1") + .size("2"); + AddOrderTestOldReq req = builder.build(); + AddOrderTestOldResp resp = api.addOrderTestOld(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** batchAddOrdersOld Batch Add Orders - Old /api/v1/orders/multi */ + @Test + public void testBatchAddOrdersOld() throws Exception { + BatchAddOrdersOldReq.BatchAddOrdersOldReqBuilder builder = BatchAddOrdersOldReq.builder(); + + BatchAddOrdersOldOrderList.BatchAddOrdersOldOrderListBuilder builder1 = + BatchAddOrdersOldOrderList.builder(); + builder1 + .clientOid(UUID.randomUUID().toString()) + .side(BatchAddOrdersOldOrderList.SideEnum.BUY) + .symbol("BTC-USDT") + .type(BatchAddOrdersOldOrderList.TypeEnum.LIMIT) + .remark("test") + .price("1") + .size("2"); + + BatchAddOrdersOldOrderList.BatchAddOrdersOldOrderListBuilder builder2 = + BatchAddOrdersOldOrderList.builder(); + builder2 + .clientOid(UUID.randomUUID().toString()) + .side(BatchAddOrdersOldOrderList.SideEnum.BUY) + .symbol("BTC-USDT") + .type(BatchAddOrdersOldOrderList.TypeEnum.LIMIT) + .remark("test") + .price("1") + .size("2"); + + builder.orderList(Arrays.asList(builder1.build(), builder2.build())).symbol("BTC-USDT"); + BatchAddOrdersOldReq req = builder.build(); + BatchAddOrdersOldResp resp = api.batchAddOrdersOld(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getStp()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberge()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getClientOid()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** cancelOrderByOrderIdOld Cancel Order By OrderId - Old /api/v1/orders/{orderId} */ + @Test + public void testCancelOrderByOrderIdOld() throws Exception { + CancelOrderByOrderIdOldReq.CancelOrderByOrderIdOldReqBuilder builder = + CancelOrderByOrderIdOldReq.builder(); + builder.orderId("688092b513900400085ba585"); + CancelOrderByOrderIdOldReq req = builder.build(); + CancelOrderByOrderIdOldResp resp = api.cancelOrderByOrderIdOld(req); + resp.getCancelledOrderIds().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * cancelOrderByClientOidOld Cancel Order By ClientOid - Old + * /api/v1/order/client-order/{clientOid} + */ + @Test + public void testCancelOrderByClientOidOld() throws Exception { + CancelOrderByClientOidOldReq.CancelOrderByClientOidOldReqBuilder builder = + CancelOrderByClientOidOldReq.builder(); + builder.clientOid("67974f4a-44e6-4374-beca-e45dc7089d97"); + CancelOrderByClientOidOldReq req = builder.build(); + CancelOrderByClientOidOldResp resp = api.cancelOrderByClientOidOld(req); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getCancelledOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** batchCancelOrderOld Batch Cancel Order - Old /api/v1/orders */ + @Test + public void testBatchCancelOrderOld() throws Exception { + BatchCancelOrderOldReq.BatchCancelOrderOldReqBuilder builder = BatchCancelOrderOldReq.builder(); + builder.symbol("BTC-USDT").tradeType(BatchCancelOrderOldReq.TradeTypeEnum.TRADE); + BatchCancelOrderOldReq req = builder.build(); + BatchCancelOrderOldResp resp = api.batchCancelOrderOld(req); + resp.getCancelledOrderIds().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getOrdersListOld Get Orders List - Old /api/v1/orders */ + @Test + public void testGetOrdersListOld() throws Exception { + GetOrdersListOldReq.GetOrdersListOldReqBuilder builder = GetOrdersListOldReq.builder(); + builder.symbol("BTC-USDT"); + GetOrdersListOldReq req = builder.build(); + GetOrdersListOldResp resp = api.getOrdersListOld(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getOpType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getDealFunds()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getStopTriggered()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getIsActive()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getTradeType()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getRecentOrdersListOld Get Recent Orders List - Old /api/v1/limit/orders */ + @Test + public void testGetRecentOrdersListOld() throws Exception { + GetRecentOrdersListOldResp resp = api.getRecentOrdersListOld(); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getOpType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getDealFunds()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getStopTriggered()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getCancelAfter()); + Assertions.assertNotNull(item.getChannel()); + Assertions.assertNotNull(item.getIsActive()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getTradeType()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getOrderByOrderIdOld Get Order By OrderId - Old /api/v1/orders/{orderId} */ + @Test + public void testGetOrderByOrderIdOld() throws Exception { + GetOrderByOrderIdOldReq.GetOrderByOrderIdOldReqBuilder builder = + GetOrderByOrderIdOldReq.builder(); + builder.orderId("688092dd988d1a0007415ab7"); + GetOrderByOrderIdOldReq req = builder.build(); + GetOrderByOrderIdOldResp resp = api.getOrderByOrderIdOld(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getOpType()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getFunds()); + Assertions.assertNotNull(resp.getDealFunds()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getFeeCurrency()); + Assertions.assertNotNull(resp.getStp()); + Assertions.assertNotNull(resp.getStop()); + Assertions.assertNotNull(resp.getStopTriggered()); + Assertions.assertNotNull(resp.getStopPrice()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getVisibleSize()); + Assertions.assertNotNull(resp.getCancelAfter()); + Assertions.assertNotNull(resp.getChannel()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getIsActive()); + Assertions.assertNotNull(resp.getCancelExist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getTradeType()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getOrderByClientOidOld Get Order By ClientOid - Old /api/v1/order/client-order/{clientOid} */ + @Test + public void testGetOrderByClientOidOld() throws Exception { + GetOrderByClientOidOldReq.GetOrderByClientOidOldReqBuilder builder = + GetOrderByClientOidOldReq.builder(); + builder.clientOid("391b2c3a-ebcc-4503-8fec-975219046f09"); + GetOrderByClientOidOldReq req = builder.build(); + GetOrderByClientOidOldResp resp = api.getOrderByClientOidOld(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getOpType()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getFunds()); + Assertions.assertNotNull(resp.getDealFunds()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getFeeCurrency()); + Assertions.assertNotNull(resp.getStp()); + Assertions.assertNotNull(resp.getStop()); + Assertions.assertNotNull(resp.getStopTriggered()); + Assertions.assertNotNull(resp.getStopPrice()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getVisibleSize()); + Assertions.assertNotNull(resp.getCancelAfter()); + Assertions.assertNotNull(resp.getChannel()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getIsActive()); + Assertions.assertNotNull(resp.getCancelExist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getTradeType()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getTradeHistoryOld Get Trade History - Old /api/v1/fills */ + @Test + public void testGetTradeHistoryOld() throws Exception { + GetTradeHistoryOldReq.GetTradeHistoryOldReqBuilder builder = GetTradeHistoryOldReq.builder(); + builder.symbol("DOGE-USDT"); + GetTradeHistoryOldReq req = builder.build(); + GetTradeHistoryOldResp resp = api.getTradeHistoryOld(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTradeId()); + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getCounterOrderId()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getLiquidity()); + Assertions.assertNotNull(item.getForceTaker()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeRate()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getCreatedAt()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getRecentTradeHistoryOld Get Recent Trade History - Old /api/v1/limit/fills */ + @Test + public void testGetRecentTradeHistoryOld() throws Exception { + GetRecentTradeHistoryOldResp resp = api.getRecentTradeHistoryOld(); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTradeId()); + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getCounterOrderId()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getLiquidity()); + Assertions.assertNotNull(item.getForceTaker()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getFunds()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getFeeRate()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getCreatedAt()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } } diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ws/ReliabilityTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ws/ReliabilityTest.java index 45d8de7b..0fbda6d9 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ws/ReliabilityTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/robustness/ws/ReliabilityTest.java @@ -15,7 +15,6 @@ import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import lombok.extern.slf4j.Slf4j; -import okhttp3.*; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; From 08fb134a7641f93b97d55414f82b6bfd544efc96 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Thu, 24 Jul 2025 15:03:26 +0800 Subject: [PATCH 32/39] feat(java): add `@JsonValue` annotation to convert response data to JSON --- .../sdk/plugin/generator/JavaSdkGenerator.java | 1 + .../plugin/src/main/resources/java-sdk/model.mustache | 11 +++++++++++ .../com/kucoin/universal/sdk/generate/Version.java | 2 +- .../account/account/GetMarginHFLedgerResp.java | 6 ++++++ .../account/account/GetSpotAccountListResp.java | 6 ++++++ .../account/account/GetSpotAccountTypeResp.java | 6 ++++++ .../generate/account/account/GetSpotHFLedgerResp.java | 6 ++++++ .../account/deposit/GetDepositAddressV2Resp.java | 6 ++++++ .../account/deposit/GetDepositAddressV3Resp.java | 6 ++++++ .../generate/account/fee/GetSpotActualFeeResp.java | 6 ++++++ .../AddSubAccountFuturesPermissionResp.java | 6 ++++++ .../subaccount/AddSubAccountMarginPermissionResp.java | 6 ++++++ .../subaccount/GetSpotSubAccountListV1Resp.java | 6 ++++++ .../subaccount/GetSpotSubAccountsSummaryV1Resp.java | 6 ++++++ .../account/subaccount/GetSubAccountApiListResp.java | 6 ++++++ .../transfer/FuturesAccountTransferInResp.java | 6 ++++++ .../account/withdrawal/CancelWithdrawalResp.java | 6 ++++++ .../broker/ndbroker/DeleteSubAccountAPIResp.java | 6 ++++++ .../generate/broker/ndbroker/GetDepositListResp.java | 6 ++++++ .../generate/broker/ndbroker/GetKYCStatusResp.java | 6 ++++++ .../broker/ndbroker/GetSubAccountAPIResp.java | 6 ++++++ .../sdk/generate/broker/ndbroker/SubmitKYCResp.java | 6 ++++++ .../copytrading/futures/GetMaxWithdrawMarginResp.java | 6 ++++++ .../futures/ModifyAutoDepositStatusResp.java | 6 ++++++ .../futures/ModifyIsolatedMarginRiskLimtResp.java | 6 ++++++ .../copytrading/futures/RemoveIsolatedMarginResp.java | 6 ++++++ .../generate/earn/earn/GetETHStakingProductsResp.java | 6 ++++++ .../generate/earn/earn/GetKcsStakingProductsResp.java | 6 ++++++ .../generate/earn/earn/GetPromotionProductsResp.java | 6 ++++++ .../generate/earn/earn/GetSavingsProductsResp.java | 6 ++++++ .../generate/earn/earn/GetStakingProductsResp.java | 6 ++++++ .../fundingfees/GetPublicFundingHistoryResp.java | 6 ++++++ .../generate/futures/market/GetAllSymbolsResp.java | 6 ++++++ .../generate/futures/market/GetAllTickersResp.java | 6 ++++++ .../sdk/generate/futures/market/GetKlinesResp.java | 6 ++++++ .../generate/futures/market/GetServerTimeResp.java | 6 ++++++ .../generate/futures/market/GetTradeHistoryResp.java | 6 ++++++ .../sdk/generate/futures/order/BatchAddOrdersReq.java | 6 ++++++ .../generate/futures/order/BatchAddOrdersResp.java | 6 ++++++ .../generate/futures/order/BatchCancelOrdersResp.java | 6 ++++++ .../futures/order/GetRecentClosedOrdersResp.java | 6 ++++++ .../futures/order/GetRecentTradeHistoryResp.java | 6 ++++++ .../positions/GetCrossMarginRiskLimitResp.java | 6 ++++++ .../positions/GetIsolatedMarginRiskLimitResp.java | 6 ++++++ .../futures/positions/GetMaxWithdrawMarginResp.java | 6 ++++++ .../futures/positions/GetPositionListResp.java | 6 ++++++ .../positions/ModifyAutoDepositStatusResp.java | 6 ++++++ .../positions/ModifyIsolatedMarginRiskLimtResp.java | 6 ++++++ .../futures/positions/ModifyMarginLeverageResp.java | 6 ++++++ .../futures/positions/RemoveIsolatedMarginResp.java | 6 ++++++ .../margin/credit/GetLoanMarketInterestRateResp.java | 6 ++++++ .../sdk/generate/margin/credit/GetLoanMarketResp.java | 6 ++++++ .../generate/margin/credit/ModifyPurchaseResp.java | 6 ++++++ .../sdk/generate/margin/debit/ModifyLeverageResp.java | 6 ++++++ .../sdk/generate/margin/market/GetETFInfoResp.java | 6 ++++++ .../margin/market/GetIsolatedMarginSymbolsResp.java | 6 ++++++ .../generate/margin/market/GetMarkPriceListResp.java | 6 ++++++ .../margin/order/CancelAllOrdersBySymbolResp.java | 6 ++++++ .../sdk/generate/margin/order/GetOpenOrdersResp.java | 6 ++++++ .../margin/risklimit/GetMarginRiskLimitResp.java | 6 ++++++ .../generate/spot/market/GetAllCurrenciesResp.java | 6 ++++++ .../sdk/generate/spot/market/GetAllSymbolsResp.java | 6 ++++++ .../generate/spot/market/GetClientIPAddressResp.java | 6 ++++++ .../sdk/generate/spot/market/GetFiatPriceResp.java | 6 ++++++ .../sdk/generate/spot/market/GetKlinesResp.java | 6 ++++++ .../sdk/generate/spot/market/GetMarketListResp.java | 6 ++++++ .../sdk/generate/spot/market/GetServerTimeResp.java | 6 ++++++ .../sdk/generate/spot/market/GetTradeHistoryResp.java | 6 ++++++ .../sdk/generate/spot/order/BatchAddOrdersResp.java | 6 ++++++ .../generate/spot/order/BatchAddOrdersSyncResp.java | 6 ++++++ .../spot/order/CancelAllOrdersBySymbolResp.java | 6 ++++++ .../sdk/generate/spot/order/GetOpenOrdersResp.java | 6 ++++++ .../spot/order/GetRecentOrdersListOldResp.java | 6 ++++++ .../spot/order/GetRecentTradeHistoryOldResp.java | 6 ++++++ .../spot/order/GetStopOrderByClientOidResp.java | 6 ++++++ .../viplending/viplending/GetAccountsResp.java | 6 ++++++ .../viplending/GetDiscountRateConfigsResp.java | 6 ++++++ 77 files changed, 457 insertions(+), 1 deletion(-) diff --git a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java index 4cf43b9c..ffe28218 100644 --- a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java +++ b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/JavaSdkGenerator.java @@ -361,6 +361,7 @@ public ModelsMap postProcessModels(ModelsMap objs) { if (vendorExtension.containsKey("x-original-response") || vendorExtension.containsKey("x-request-raw-array")) { imports.add("import com.fasterxml.jackson.annotation.JsonCreator;"); + imports.add("import com.fasterxml.jackson.annotation.JsonValue;"); } codegenModel.getVars().forEach(var -> { diff --git a/generator/plugin/src/main/resources/java-sdk/model.mustache b/generator/plugin/src/main/resources/java-sdk/model.mustache index 03447d88..d5fea9ca 100644 --- a/generator/plugin/src/main/resources/java-sdk/model.mustache +++ b/generator/plugin/src/main/resources/java-sdk/model.mustache @@ -61,6 +61,12 @@ public class {{classname}} { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } + {{/vars}} {{/vendorExtensions.x-original-response}} {{#vendorExtensions.x-request-raw-array}} @@ -72,6 +78,11 @@ public class {{classname}} { obj.items = data; return obj; } + + @JsonValue + public Object toJson() { + return this.items; + } {{/vars}} {{/vendorExtensions.x-request-raw-array}} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java index 7a6ab588..702bc60c 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java @@ -2,5 +2,5 @@ public class Version { public static final String SDK_VERSION = "0.1.0-alpha"; - public static final String SDK_GENERATE_DATE = "2025-07-23"; + public static final String SDK_GENERATE_DATE = "2025-07-24"; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginHFLedgerResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginHFLedgerResp.java index 79ac8ed1..f7d61468 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginHFLedgerResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetMarginHFLedgerResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetMarginHFLedgerResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountListResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountListResp.java index 11be728a..f7df7d06 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountListResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountListResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetSpotAccountListResp fromJson(List data) obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountTypeResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountTypeResp.java index e739f004..3f829dd6 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountTypeResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotAccountTypeResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -40,4 +41,9 @@ public static GetSpotAccountTypeResp fromJson(Boolean data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotHFLedgerResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotHFLedgerResp.java index d5b1308d..6a619d62 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotHFLedgerResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/account/GetSpotHFLedgerResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetSpotHFLedgerResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV2Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV2Resp.java index 2b653094..76a3db63 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV2Resp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV2Resp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetDepositAddressV2Resp fromJson(List dat obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV3Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV3Resp.java index 5f2df223..3d514876 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV3Resp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/deposit/GetDepositAddressV3Resp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetDepositAddressV3Resp fromJson(List dat obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetSpotActualFeeResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetSpotActualFeeResp.java index bc1718e9..b957c108 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetSpotActualFeeResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/fee/GetSpotActualFeeResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetSpotActualFeeResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountFuturesPermissionResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountFuturesPermissionResp.java index 0036984e..4755fe94 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountFuturesPermissionResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountFuturesPermissionResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -38,4 +39,9 @@ public static AddSubAccountFuturesPermissionResp fromJson(Boolean data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountMarginPermissionResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountMarginPermissionResp.java index 136908af..9e7a914a 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountMarginPermissionResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/AddSubAccountMarginPermissionResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -38,4 +39,9 @@ public static AddSubAccountMarginPermissionResp fromJson(String data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1Resp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1Resp.java index 1aac8be6..468c5be8 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1Resp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/subaccount/GetSpotSubAccountListV1Resp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetSpotSubAccountListV1Resp fromJson(List d obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferInResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferInResp.java index 671c5a62..58f8a91e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferInResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/transfer/FuturesAccountTransferInResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -37,4 +38,9 @@ public static FuturesAccountTransferInResp fromJson(String data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/CancelWithdrawalResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/CancelWithdrawalResp.java index 1a76e262..3dd96810 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/CancelWithdrawalResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/account/withdrawal/CancelWithdrawalResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -37,4 +38,9 @@ public static CancelWithdrawalResp fromJson(String data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/DeleteSubAccountAPIResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/DeleteSubAccountAPIResp.java index 04f8678a..0ea2154e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/DeleteSubAccountAPIResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/DeleteSubAccountAPIResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -37,4 +38,9 @@ public static DeleteSubAccountAPIResp fromJson(Boolean data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositListResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositListResp.java index 54ee3f68..1b27aa36 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositListResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetDepositListResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetDepositListResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusResp.java index 71ddc489..83f71495 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetKYCStatusResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetKYCStatusResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountAPIResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountAPIResp.java index f2f85d0e..cdf071af 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountAPIResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/GetSubAccountAPIResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetSubAccountAPIResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/SubmitKYCResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/SubmitKYCResp.java index 70a00805..31294771 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/SubmitKYCResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/broker/ndbroker/SubmitKYCResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -36,4 +37,9 @@ public static SubmitKYCResp fromJson(String data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxWithdrawMarginResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxWithdrawMarginResp.java index 2c6019f0..0de98785 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxWithdrawMarginResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/GetMaxWithdrawMarginResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -40,4 +41,9 @@ public static GetMaxWithdrawMarginResp fromJson(String data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyAutoDepositStatusResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyAutoDepositStatusResp.java index c3f5bf65..2e0742c5 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyAutoDepositStatusResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyAutoDepositStatusResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -37,4 +38,9 @@ public static ModifyAutoDepositStatusResp fromJson(Boolean data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyIsolatedMarginRiskLimtResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyIsolatedMarginRiskLimtResp.java index 581bc1f9..80118447 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyIsolatedMarginRiskLimtResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/ModifyIsolatedMarginRiskLimtResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -41,4 +42,9 @@ public static ModifyIsolatedMarginRiskLimtResp fromJson(Boolean data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/RemoveIsolatedMarginResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/RemoveIsolatedMarginResp.java index 4ff12855..13ffe65f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/RemoveIsolatedMarginResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/copytrading/futures/RemoveIsolatedMarginResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -40,4 +41,9 @@ public static RemoveIsolatedMarginResp fromJson(String data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetETHStakingProductsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetETHStakingProductsResp.java index aa7f0853..a3d53eec 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetETHStakingProductsResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetETHStakingProductsResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetETHStakingProductsResp fromJson(List obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetKcsStakingProductsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetKcsStakingProductsResp.java index 9e226bae..c1148410 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetKcsStakingProductsResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetKcsStakingProductsResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetKcsStakingProductsResp fromJson(List obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetPromotionProductsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetPromotionProductsResp.java index 032d29d5..cc96cc5e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetPromotionProductsResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetPromotionProductsResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetPromotionProductsResp fromJson(List d obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetSavingsProductsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetSavingsProductsResp.java index 279a230e..565b4c4c 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetSavingsProductsResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetSavingsProductsResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetSavingsProductsResp fromJson(List data) obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetStakingProductsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetStakingProductsResp.java index b927f9c6..6bb0bc37 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetStakingProductsResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/earn/earn/GetStakingProductsResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetStakingProductsResp fromJson(List data) obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPublicFundingHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPublicFundingHistoryResp.java index c81d8425..cc22f0b3 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPublicFundingHistoryResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/fundingfees/GetPublicFundingHistoryResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetPublicFundingHistoryResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllTickersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllTickersResp.java index 730adf5c..47ede6ab 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllTickersResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetAllTickersResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetAllTickersResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetKlinesResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetKlinesResp.java index fadeb48c..87a08441 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetKlinesResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetKlinesResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -38,4 +39,9 @@ public static GetKlinesResp fromJson(List> data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetServerTimeResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetServerTimeResp.java index 7cc83af7..61120459 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetServerTimeResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetServerTimeResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -37,4 +38,9 @@ public static GetServerTimeResp fromJson(Long data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTradeHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTradeHistoryResp.java index 39e0b8c4..e0288f80 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTradeHistoryResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/market/GetTradeHistoryResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetTradeHistoryResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersReq.java index f4c2230a..85efd293 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersReq.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersReq.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Request; import java.util.ArrayList; import java.util.List; @@ -31,4 +32,9 @@ public static BatchAddOrdersReq fromJson(List data) { obj.items = data; return obj; } + + @JsonValue + public Object toJson() { + return this.items; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersResp.java index 92cdbbaa..3cd50f71 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchAddOrdersResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static BatchAddOrdersResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersResp.java index 797e7d24..7be37979 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/BatchCancelOrdersResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static BatchCancelOrdersResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentClosedOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentClosedOrdersResp.java index f17b56b2..168c5a98 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentClosedOrdersResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentClosedOrdersResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetRecentClosedOrdersResp fromJson(List obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentTradeHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentTradeHistoryResp.java index 73f17eef..bfbaab2d 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentTradeHistoryResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetRecentTradeHistoryResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetRecentTradeHistoryResp fromJson(List obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginRiskLimitResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginRiskLimitResp.java index eb942c8f..37ad86b1 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginRiskLimitResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/GetCrossMarginRiskLimitResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetCrossMarginRiskLimitResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyAutoDepositStatusResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyAutoDepositStatusResp.java index edcb5854..694660ba 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyAutoDepositStatusResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyAutoDepositStatusResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -37,4 +38,9 @@ public static ModifyAutoDepositStatusResp fromJson(Boolean data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyIsolatedMarginRiskLimtResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyIsolatedMarginRiskLimtResp.java index cbb9c8e4..1e594857 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyIsolatedMarginRiskLimtResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyIsolatedMarginRiskLimtResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -41,4 +42,9 @@ public static ModifyIsolatedMarginRiskLimtResp fromJson(Boolean data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyMarginLeverageResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyMarginLeverageResp.java index 180e2e3c..b8865cc1 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyMarginLeverageResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/ModifyMarginLeverageResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -37,4 +38,9 @@ public static ModifyMarginLeverageResp fromJson(Boolean data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/RemoveIsolatedMarginResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/RemoveIsolatedMarginResp.java index 563abb2a..27f893fa 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/RemoveIsolatedMarginResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/positions/RemoveIsolatedMarginResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -40,4 +41,9 @@ public static RemoveIsolatedMarginResp fromJson(String data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketInterestRateResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketInterestRateResp.java index 1c702a85..a77d67ad 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketInterestRateResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/GetLoanMarketInterestRateResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -40,4 +41,9 @@ public static GetLoanMarketInterestRateResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/ModifyPurchaseResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/ModifyPurchaseResp.java index 4a8b2102..90687bb0 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/ModifyPurchaseResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/credit/ModifyPurchaseResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -37,4 +38,9 @@ public static ModifyPurchaseResp fromJson(String data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/ModifyLeverageResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/ModifyLeverageResp.java index 1f1ae18f..53dd8c5e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/ModifyLeverageResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/debit/ModifyLeverageResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -37,4 +38,9 @@ public static ModifyLeverageResp fromJson(String data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetETFInfoResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetETFInfoResp.java index 136e0a31..e592769f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetETFInfoResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetETFInfoResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -38,4 +39,9 @@ public static GetETFInfoResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetIsolatedMarginSymbolsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetIsolatedMarginSymbolsResp.java index 5c12eba4..968fe480 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetIsolatedMarginSymbolsResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/market/GetIsolatedMarginSymbolsResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetIsolatedMarginSymbolsResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelAllOrdersBySymbolResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelAllOrdersBySymbolResp.java index f9e7be84..33831b89 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelAllOrdersBySymbolResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/CancelAllOrdersBySymbolResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -37,4 +38,9 @@ public static CancelAllOrdersBySymbolResp fromJson(String data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOpenOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOpenOrdersResp.java index 8bc988d9..367cb9fd 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOpenOrdersResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/order/GetOpenOrdersResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetOpenOrdersResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/GetMarginRiskLimitResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/GetMarginRiskLimitResp.java index 6b5d5c34..3f87225b 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/GetMarginRiskLimitResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/risklimit/GetMarginRiskLimitResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetMarginRiskLimitResp fromJson(List data) obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesResp.java index 0650d23c..17c8aa98 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllCurrenciesResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetAllCurrenciesResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsResp.java index e9f59137..168d166f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetAllSymbolsResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetAllSymbolsResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetClientIPAddressResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetClientIPAddressResp.java index d1a5e1f4..c83aefc4 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetClientIPAddressResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetClientIPAddressResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -37,4 +38,9 @@ public static GetClientIPAddressResp fromJson(String data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceResp.java index 1b10a095..3e1ca650 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetFiatPriceResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.HashMap; @@ -39,4 +40,9 @@ public static GetFiatPriceResp fromJson(Map data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesResp.java index cc29fba7..ec1b097f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetKlinesResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -38,4 +39,9 @@ public static GetKlinesResp fromJson(List> data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetMarketListResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetMarketListResp.java index 9c9a701f..01a3cbf1 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetMarketListResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetMarketListResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetMarketListResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServerTimeResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServerTimeResp.java index 4e824164..57f509b2 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServerTimeResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetServerTimeResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -37,4 +38,9 @@ public static GetServerTimeResp fromJson(Long data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryResp.java index 0536d7b2..8090fb66 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/market/GetTradeHistoryResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetTradeHistoryResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersResp.java index 2a6a4d55..e8f59a81 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static BatchAddOrdersResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncResp.java index dcb7c3bd..256ea32e 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/BatchAddOrdersSyncResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static BatchAddOrdersSyncResp fromJson(List data) obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersBySymbolResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersBySymbolResp.java index f0329c8c..b39dc869 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersBySymbolResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/CancelAllOrdersBySymbolResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import lombok.AllArgsConstructor; @@ -37,4 +38,9 @@ public static CancelAllOrdersBySymbolResp fromJson(String data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersResp.java index 930ab2c2..92442cc4 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetOpenOrdersResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetOpenOrdersResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentOrdersListOldResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentOrdersListOldResp.java index d40c33d7..0fe5d228 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentOrdersListOldResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/order/GetRecentOrdersListOldResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetRecentOrdersListOldResp fromJson(List data) { obj.data = data; return obj; } + + @JsonValue + public Object toJson() { + return this.data; + } } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetDiscountRateConfigsResp.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetDiscountRateConfigsResp.java index 5c1e8d1b..0beb824f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetDiscountRateConfigsResp.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/viplending/viplending/GetDiscountRateConfigsResp.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.kucoin.universal.sdk.internal.interfaces.Response; import com.kucoin.universal.sdk.model.RestResponse; import java.util.ArrayList; @@ -39,4 +40,9 @@ public static GetDiscountRateConfigsResp fromJson(List Date: Thu, 24 Jul 2025 17:19:01 +0800 Subject: [PATCH 33/39] feat(java): update path variable names --- generator/plugin/src/main/resources/java-sdk/model.mustache | 2 +- .../sdk/generate/futures/order/GetOrderByOrderIdReq.java | 2 +- .../java/com/kucoin/universal/sdk/internal/infra/KcSigner.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generator/plugin/src/main/resources/java-sdk/model.mustache b/generator/plugin/src/main/resources/java-sdk/model.mustache index d5fea9ca..49c08636 100644 --- a/generator/plugin/src/main/resources/java-sdk/model.mustache +++ b/generator/plugin/src/main/resources/java-sdk/model.mustache @@ -30,7 +30,7 @@ public class {{classname}} { */ {{#vendorExtensions.x-tag-path}} @JsonIgnore - @PathVar("{{name}}") + @PathVar("{{baseName}}") {{/vendorExtensions.x-tag-path}} @JsonProperty("{{baseName}}") {{#vendorExtensions.x-annotation}} diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByOrderIdReq.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByOrderIdReq.java index b81d791c..036e7f1d 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByOrderIdReq.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/order/GetOrderByOrderIdReq.java @@ -20,7 +20,7 @@ public class GetOrderByOrderIdReq implements Request { /** */ @JsonIgnore - @PathVar("orderId") + @PathVar("order-id") @JsonProperty("order-id") private String orderId; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/KcSigner.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/KcSigner.java index 48122c16..5c878eb3 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/KcSigner.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/KcSigner.java @@ -82,7 +82,7 @@ public Map headers(String plain) { /** Headers for broker request (includes partner signature). */ public Map brokerHeaders(String plain) { if (brokerPartner.isEmpty() || brokerName.isEmpty()) { - System.err.println("[BROKER ERROR] Missing broker information"); + log.error("[BROKER ERROR] Missing broker information"); throw new IllegalStateException("Broker information cannot be empty"); } From da86f3565bb1da65ffac879489e3b77a26da6e97 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Fri, 25 Jul 2025 11:22:36 +0800 Subject: [PATCH 34/39] feat(java): add and update WS and REST tests for various endpoints --- .../java-sdk/ws_test_template.mustache | 4 +- .../sdk/plugin/SdkGeneratorTest.java | 4 +- .../example/ExampleArbitrageStrategy.java | 4 +- .../sdk/internal/infra/DefaultWsService.java | 1 + .../test/e2e/rest/broker/ApiBrokerTest.java | 90 +++ .../test/e2e/rest/broker/NdBrokerTest.java | 395 +++++++++++ .../e2e/rest/copytrading/FuturesTest.java | 288 ++++++++ .../e2e/rest/futures/FundingFeeApiTest.java | 137 ++++ .../test/e2e/rest/futures/OrderApiTest.java | 625 ++++++++++++++++++ .../e2e/rest/futures/PositionsApiTest.java | 1 - .../e2e/rest/viplending/VipLendingTest.java | 135 ++++ .../sdk/test/e2e/ws/futures/PrivateTest.java | 259 ++++++++ .../sdk/test/e2e/ws/futures/PublicTest.java | 364 ++++++++++ .../sdk/test/e2e/ws/margin/PrivateTest.java | 110 +++ .../sdk/test/e2e/ws/margin/PublicTest.java | 112 ++++ .../sdk/test/e2e/ws/spot/PrivateTest.java | 170 +++++ .../sdk/test/e2e/ws/spot/PublicTest.java | 324 ++++++++- 17 files changed, 3009 insertions(+), 14 deletions(-) create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/broker/ApiBrokerTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/broker/NdBrokerTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/copytrading/FuturesTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/FundingFeeApiTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/OrderApiTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/viplending/VipLendingTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/futures/PrivateTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/futures/PublicTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/margin/PrivateTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/margin/PublicTest.java create mode 100644 sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/spot/PrivateTest.java diff --git a/generator/plugin/src/main/resources/java-sdk/ws_test_template.mustache b/generator/plugin/src/main/resources/java-sdk/ws_test_template.mustache index d2b3c4d2..d1d12784 100644 --- a/generator/plugin/src/main/resources/java-sdk/ws_test_template.mustache +++ b/generator/plugin/src/main/resources/java-sdk/ws_test_template.mustache @@ -6,7 +6,7 @@ * {{summary}} * {{path}} */ - public function test{{vendorExtensions.x-meta.methodServiceFmt}}() { + public void test{{vendorExtensions.x-meta.methodServiceFmt}}() { {{#vendorExtensions.x-response-model}} {{#vars}} {{#isArray}} @@ -23,7 +23,7 @@ Assertions.assertNotNull(event.{{getter}}()); {{/isArray}} {{/vars}} - log.info("event: {}", mapper.writeValueAsString(event)); + log.info("event: {}", event.toString()); {{/vendorExtensions.x-response-model}} } diff --git a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java index 2107567b..fc434051 100644 --- a/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java +++ b/generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java @@ -10,8 +10,8 @@ public class SdkGeneratorTest { private static final String SDK_NAME = "java-sdk"; private static final String SPEC_NAME = "../../spec/rest/api/openapi-spot-market.json"; private static final String SPEC_ENTRY_NAME = "../../spec/rest/entry/openapi-broker.json"; - private static final String WS_SPEC_NAME = "../../spec/ws/openapi-spot-public.json"; - private static final String OUTPUT_DIR = "../../sdk/java/src/main/java/com/kucoin/universal/sdk/generate"; + private static final String WS_SPEC_NAME = "../../spec/ws/openapi-futures-private.json"; + private static final String OUTPUT_DIR = "./out"; private static final String CSV_PATH = "../../spec"; @Test diff --git a/sdk/java/example/src/main/java/com/kucoin/example/ExampleArbitrageStrategy.java b/sdk/java/example/src/main/java/com/kucoin/example/ExampleArbitrageStrategy.java index 2da7fd2c..f476c5f6 100644 --- a/sdk/java/example/src/main/java/com/kucoin/example/ExampleArbitrageStrategy.java +++ b/sdk/java/example/src/main/java/com/kucoin/example/ExampleArbitrageStrategy.java @@ -287,7 +287,7 @@ public static boolean addSpotOrderWaitFill( com.kucoin.universal.sdk.generate.spot.order.GetOrderByOrderIdResp orderDetail = spotService.getOrderApi().getOrderByOrderId(detailReq); - if (!orderDetail.getActive()) { + if (orderDetail.getActive() != null && !orderDetail.getActive()) { log.info( "[SPOT ORDER] Order filled successfully: {} {} {}. Order ID: {}", side.toUpperCase(), @@ -460,7 +460,7 @@ public static boolean addMarginOrderWaitFill( com.kucoin.universal.sdk.generate.margin.order.GetOrderByOrderIdResp orderDetail = marginService.getOrderApi().getOrderByOrderId(detailReq); - if (!orderDetail.getActive()) { + if (orderDetail.getActive() != null && !orderDetail.getActive()) { log.info( "[MARGIN ORDER] Order filled successfully: BUY {} {}. Order ID: {}", amount, diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsService.java index be95e1fb..7786acac 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsService.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWsService.java @@ -118,6 +118,7 @@ public void onMessage(WsMessage wsMessage) { cb.onMessage(wsMessage, mapper); } catch (Throwable t) { notifyEvent(WebSocketEvent.CALLBACK_ERROR, t.getMessage()); + log.error("invoke callback error", t); } } diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/broker/ApiBrokerTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/broker/ApiBrokerTest.java new file mode 100644 index 00000000..9608ad0a --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/broker/ApiBrokerTest.java @@ -0,0 +1,90 @@ +package com.kucoin.universal.sdk.test.e2e.rest.broker; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.broker.apibroker.APIBrokerApi; +import com.kucoin.universal.sdk.generate.broker.apibroker.GetRebaseReq; +import com.kucoin.universal.sdk.generate.broker.apibroker.GetRebaseResp; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class ApiBrokerTest { + + private static APIBrokerApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + String brokerName = System.getenv("BROKER_NAME"); + String brokerPartner = System.getenv("BROKER_PARTNER"); + String brokerKey = System.getenv("BROKER_KEY"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .brokerName(brokerName) + .brokerPartner(brokerPartner) + .brokerKey(brokerKey) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getBrokerService().getAPIBrokerApi(); + } + + /** getRebase Get Broker Rebate /api/v1/broker/api/rebase/download */ + @Test + public void testGetRebase() throws Exception { + GetRebaseReq.GetRebaseReqBuilder builder = GetRebaseReq.builder(); + builder.begin("20240610").end("20241010").tradeType(GetRebaseReq.TradeTypeEnum._1); + GetRebaseReq req = builder.build(); + GetRebaseResp resp = api.getRebase(req); + Assertions.assertNotNull(resp.getUrl()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/broker/NdBrokerTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/broker/NdBrokerTest.java new file mode 100644 index 00000000..b6fa5c53 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/broker/NdBrokerTest.java @@ -0,0 +1,395 @@ +package com.kucoin.universal.sdk.test.e2e.rest.broker; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.broker.ndbroker.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Arrays; +import java.util.Collections; +import java.util.UUID; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class NdBrokerTest { + + private static NDBrokerApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + String brokerName = System.getenv("BROKER_NAME"); + String brokerPartner = System.getenv("BROKER_PARTNER"); + String brokerKey = System.getenv("BROKER_KEY"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .brokerName(brokerName) + .brokerPartner(brokerPartner) + .brokerKey(brokerKey) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getBrokerService().getNDBrokerApi(); + } + + /** submitKYC Submit KYC /api/kyc/ndBroker/proxyClient/submit */ + @Test + public void testSubmitKYC() throws Exception { + SubmitKYCReq.SubmitKYCReqBuilder builder = SubmitKYCReq.builder(); + builder + .clientUid("226383154") + .firstName("Kaylah") + .lastName("Padberg") + .issueCountry("JP") + .birthDate("2000-01-01") + .identityType(SubmitKYCReq.IdentityTypeEnum.PASSPORT) + .identityNumber("55") + .expireDate("2030-01-01") + .frontPhoto("****") + .backendPhoto("***") + .facePhoto("***"); + SubmitKYCReq req = builder.build(); + SubmitKYCResp resp = api.submitKYC(req); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getKYCStatus Get KYC Status /api/kyc/ndBroker/proxyClient/status/list */ + @Test + public void testGetKYCStatus() throws Exception { + GetKYCStatusReq.GetKYCStatusReqBuilder builder = GetKYCStatusReq.builder(); + builder.clientUids("226383154"); + GetKYCStatusReq req = builder.build(); + GetKYCStatusResp resp = api.getKYCStatus(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getClientUid()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getRejectReason()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getKYCStatusList Get KYC Status List /api/kyc/ndBroker/proxyClient/status/page */ + @Test + public void testGetKYCStatusList() throws Exception { + GetKYCStatusListReq.GetKYCStatusListReqBuilder builder = GetKYCStatusListReq.builder(); + builder.pageNumber(10).pageSize(1); + GetKYCStatusListReq req = builder.build(); + GetKYCStatusListResp resp = api.getKYCStatusList(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getClientUid()); + Assertions.assertNotNull(item.getStatus()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getBrokerInfo Get Broker Info /api/v1/broker/nd/info */ + @Test + public void testGetBrokerInfo() throws Exception { + GetBrokerInfoReq.GetBrokerInfoReqBuilder builder = GetBrokerInfoReq.builder(); + builder.tradeType(GetBrokerInfoReq.TradeTypeEnum._1); + GetBrokerInfoReq req = builder.build(); + GetBrokerInfoResp resp = api.getBrokerInfo(req); + Assertions.assertNotNull(resp.getAccountSize()); + Assertions.assertNotNull(resp.getLevel()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** addSubAccount Add sub-account /api/v1/broker/nd/account */ + @Test + public void testAddSubAccount() throws Exception { + AddSubAccountReq.AddSubAccountReqBuilder builder = AddSubAccountReq.builder(); + builder.accountName("sdk_test_5"); + AddSubAccountReq req = builder.build(); + AddSubAccountResp resp = api.addSubAccount(req); + Assertions.assertNotNull(resp.getAccountName()); + Assertions.assertNotNull(resp.getUid()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getLevel()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSubAccount Get sub-account /api/v1/broker/nd/account */ + @Test + public void testGetSubAccount() throws Exception { + GetSubAccountReq.GetSubAccountReqBuilder builder = GetSubAccountReq.builder(); + builder.uid("248494737"); + GetSubAccountReq req = builder.build(); + GetSubAccountResp resp = api.getSubAccount(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getAccountName()); + Assertions.assertNotNull(item.getUid()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getLevel()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** addSubAccountApi Add sub-account API /api/v1/broker/nd/account/apikey */ + @Test + public void testAddSubAccountApi() throws Exception { + AddSubAccountApiReq.AddSubAccountApiReqBuilder builder = AddSubAccountApiReq.builder(); + builder + .uid("248494737") + .passphrase("****") + .ipWhitelist(Arrays.asList("127.0.0.1", "192.168.1.1")) + .permissions(Arrays.asList(AddSubAccountApiReq.PermissionsEnum.FUTURES)) + .label("labels"); + AddSubAccountApiReq req = builder.build(); + AddSubAccountApiResp resp = api.addSubAccountApi(req); + Assertions.assertNotNull(resp.getUid()); + Assertions.assertNotNull(resp.getLabel()); + Assertions.assertNotNull(resp.getApiKey()); + Assertions.assertNotNull(resp.getSecretKey()); + Assertions.assertNotNull(resp.getApiVersion()); + resp.getPermissions().forEach(item -> {}); + + resp.getIpWhitelist().forEach(item -> {}); + + Assertions.assertNotNull(resp.getCreatedAt()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getSubAccountAPI Get sub-account API /api/v1/broker/nd/account/apikey */ + @Test + public void testGetSubAccountAPI() throws Exception { + GetSubAccountAPIReq.GetSubAccountAPIReqBuilder builder = GetSubAccountAPIReq.builder(); + builder.uid("248494737").apiKey("6881ee4028335c0001f5c02a"); + GetSubAccountAPIReq req = builder.build(); + GetSubAccountAPIResp resp = api.getSubAccountAPI(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getUid()); + Assertions.assertNotNull(item.getLabel()); + Assertions.assertNotNull(item.getApiKey()); + Assertions.assertNotNull(item.getApiVersion()); + Assertions.assertNotNull(item.getPermissions()); + Assertions.assertNotNull(item.getIpWhitelist()); + Assertions.assertNotNull(item.getCreatedAt()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** TODO 404 modifySubAccountApi Modify sub-account API /api/v1/broker/nd/account/update-apikey */ + @Test + public void testModifySubAccountApi() throws Exception { + ModifySubAccountApiReq.ModifySubAccountApiReqBuilder builder = ModifySubAccountApiReq.builder(); + builder + .uid("226383154") + .ipWhitelist(Arrays.asList("127.0.0.1")) + .permissions(Arrays.asList(ModifySubAccountApiReq.PermissionsEnum.FUTURES)) + .apiKey("6881f6c4dffe710001e66b16"); + ModifySubAccountApiReq req = builder.build(); + ModifySubAccountApiResp resp = api.modifySubAccountApi(req); + Assertions.assertNotNull(resp.getUid()); + Assertions.assertNotNull(resp.getLabel()); + Assertions.assertNotNull(resp.getApiKey()); + Assertions.assertNotNull(resp.getApiVersion()); + resp.getPermissions().forEach(item -> {}); + + resp.getIpWhitelist().forEach(item -> {}); + + Assertions.assertNotNull(resp.getCreatedAt()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** deleteSubAccountAPI Delete sub-account API /api/v1/broker/nd/account/apikey */ + @Test + public void testDeleteSubAccountAPI() throws Exception { + DeleteSubAccountAPIReq.DeleteSubAccountAPIReqBuilder builder = DeleteSubAccountAPIReq.builder(); + builder.uid("226383154").apiKey("6881f6c4dffe710001e66b16"); + DeleteSubAccountAPIReq req = builder.build(); + DeleteSubAccountAPIResp resp = api.deleteSubAccountAPI(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** transfer Transfer /api/v1/broker/nd/transfer */ + @Test + public void testTransfer() throws Exception { + TransferReq.TransferReqBuilder builder = TransferReq.builder(); + + builder + .currency("USDT") + .amount("0.01") + .direction(TransferReq.DirectionEnum.OUT) + .accountType(TransferReq.AccountTypeEnum.TRADE) + .specialUid("237082742") + .specialAccountType(TransferReq.SpecialAccountTypeEnum.MAIN) + .clientOid(UUID.randomUUID().toString()); + TransferReq req = builder.build(); + TransferResp resp = api.transfer(req); + Assertions.assertNotNull(resp.getOrderId()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getTransferHistory Get Transfer History /api/v3/broker/nd/transfer/detail */ + @Test + public void testGetTransferHistory() throws Exception { + GetTransferHistoryReq.GetTransferHistoryReqBuilder builder = GetTransferHistoryReq.builder(); + builder.orderId("6881ef67d3bb93000750693a"); + GetTransferHistoryReq req = builder.build(); + GetTransferHistoryResp resp = api.getTransferHistory(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getAmount()); + Assertions.assertNotNull(resp.getFromUid()); + Assertions.assertNotNull(resp.getFromAccountType()); + Assertions.assertNotNull(resp.getFromAccountTag()); + Assertions.assertNotNull(resp.getToUid()); + Assertions.assertNotNull(resp.getToAccountType()); + Assertions.assertNotNull(resp.getToAccountTag()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getCreatedAt()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getDepositList Get Deposit List /api/v1/asset/ndbroker/deposit/list */ + @Test + public void testGetDepositList() throws Exception { + GetDepositListReq.GetDepositListReqBuilder builder = GetDepositListReq.builder(); + builder.currency("USDT"); + GetDepositListReq req = builder.build(); + GetDepositListResp resp = api.getDepositList(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getUid()); + Assertions.assertNotNull(item.getHash()); + Assertions.assertNotNull(item.getAddress()); + Assertions.assertNotNull(item.getMemo()); + Assertions.assertNotNull(item.getAmount()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getIsInner()); + Assertions.assertNotNull(item.getWalletTxId()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getChain()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getUpdatedAt()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getDepositDetail Get Deposit Detail /api/v3/broker/nd/deposit/detail */ + @Test + public void testGetDepositDetail() throws Exception { + GetDepositDetailReq.GetDepositDetailReqBuilder builder = GetDepositDetailReq.builder(); + builder.currency("USDT").hash("6724e363a492800007ec602b"); + GetDepositDetailReq req = builder.build(); + GetDepositDetailResp resp = api.getDepositDetail(req); + Assertions.assertNotNull(resp.getChain()); + Assertions.assertNotNull(resp.getHash()); + Assertions.assertNotNull(resp.getWalletTxId()); + Assertions.assertNotNull(resp.getUid()); + Assertions.assertNotNull(resp.getUpdatedAt()); + Assertions.assertNotNull(resp.getAmount()); + Assertions.assertNotNull(resp.getMemo()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getAddress()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getIsInner()); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getCreatedAt()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getWithdrawDetail Get Withdraw Detail /api/v3/broker/nd/withdraw/detail */ + @Test + public void testGetWithdrawDetail() throws Exception { + GetWithdrawDetailReq.GetWithdrawDetailReqBuilder builder = GetWithdrawDetailReq.builder(); + builder.withdrawalId("674686fa1ac01f0007b25768"); + GetWithdrawDetailReq req = builder.build(); + GetWithdrawDetailResp resp = api.getWithdrawDetail(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getChain()); + Assertions.assertNotNull(resp.getUid()); + Assertions.assertNotNull(resp.getAmount()); + Assertions.assertNotNull(resp.getMemo()); + Assertions.assertNotNull(resp.getFee()); + Assertions.assertNotNull(resp.getAddress()); + Assertions.assertNotNull(resp.getRemark()); + Assertions.assertNotNull(resp.getIsInner()); + Assertions.assertNotNull(resp.getCurrency()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getCreatedAt()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getRebase Get Broker Rebate /api/v1/broker/nd/rebase/download */ + @Test + public void testGetRebase() throws Exception { + GetRebaseReq.GetRebaseReqBuilder builder = GetRebaseReq.builder(); + builder.begin("20240610").end("20241010").tradeType(GetRebaseReq.TradeTypeEnum._1); + GetRebaseReq req = builder.build(); + GetRebaseResp resp = api.getRebase(req); + Assertions.assertNotNull(resp.getUrl()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/copytrading/FuturesTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/copytrading/FuturesTest.java new file mode 100644 index 00000000..71309b00 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/copytrading/FuturesTest.java @@ -0,0 +1,288 @@ +package com.kucoin.universal.sdk.test.e2e.rest.copytrading; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.copytrading.futures.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; +import java.util.UUID; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class FuturesTest { + + private static FuturesApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getCopytradingService().getFuturesApi(); + } + + /** addOrder Add Order /api/v1/copy-trade/futures/orders */ + @Test + public void testAddOrder() throws Exception { + AddOrderReq.AddOrderReqBuilder builder = AddOrderReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .side(AddOrderReq.SideEnum.BUY) + .symbol("XBTUSDTM") + .leverage(3) + .type(AddOrderReq.TypeEnum.LIMIT) + .reduceOnly(false) + .marginMode(AddOrderReq.MarginModeEnum.ISOLATED) + .price("0.1") + .size(1) + .timeInForce(AddOrderReq.TimeInForceEnum.GOODTILLCANCELED); + AddOrderReq req = builder.build(); + AddOrderResp resp = api.addOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** addOrderTest Add Order Test /api/v1/copy-trade/futures/orders/test */ + @Test + public void testAddOrderTest() throws Exception { + AddOrderTestReq.AddOrderTestReqBuilder builder = AddOrderTestReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .side(AddOrderTestReq.SideEnum.BUY) + .symbol("XBTUSDTM") + .leverage(3) + .type(AddOrderTestReq.TypeEnum.LIMIT) + .reduceOnly(false) + .marginMode(AddOrderTestReq.MarginModeEnum.ISOLATED) + .price("0.1") + .size(1) + .timeInForce(AddOrderTestReq.TimeInForceEnum.GOODTILLCANCELED); + AddOrderTestReq req = builder.build(); + AddOrderTestResp resp = api.addOrderTest(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** addTPSLOrder Add Take Profit And Stop Loss Order /api/v1/copy-trade/futures/st-orders */ + @Test + public void testAddTPSLOrder() throws Exception { + AddTPSLOrderReq.AddTPSLOrderReqBuilder builder = AddTPSLOrderReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .side(AddTPSLOrderReq.SideEnum.BUY) + .symbol("XBTUSDTM") + .leverage(3) + .type(AddTPSLOrderReq.TypeEnum.LIMIT) + .reduceOnly(false) + .marginMode(AddTPSLOrderReq.MarginModeEnum.ISOLATED) + .price("0.1") + .size(1) + .timeInForce(AddTPSLOrderReq.TimeInForceEnum.GOODTILLCANCELED) + .triggerStopUpPrice("0.3") + .triggerStopDownPrice("0.1") + .stopPriceType(AddTPSLOrderReq.StopPriceTypeEnum.TRADEPRICE); + AddTPSLOrderReq req = builder.build(); + AddTPSLOrderResp resp = api.addTPSLOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** cancelOrderById Cancel Order By OrderId /api/v1/copy-trade/futures/orders */ + @Test + public void testCancelOrderById() throws Exception { + CancelOrderByIdReq.CancelOrderByIdReqBuilder builder = CancelOrderByIdReq.builder(); + builder.orderId("338035702044397568"); + CancelOrderByIdReq req = builder.build(); + CancelOrderByIdResp resp = api.cancelOrderById(req); + resp.getCancelledOrderIds().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * cancelOrderByClientOid Cancel Order By ClientOid /api/v1/copy-trade/futures/orders/client-order + */ + @Test + public void testCancelOrderByClientOid() throws Exception { + CancelOrderByClientOidReq.CancelOrderByClientOidReqBuilder builder = + CancelOrderByClientOidReq.builder(); + builder.symbol("XBTUSDTM").clientOid("465e8c0f-6026-4331-ae8f-2c75aaf1370f"); + CancelOrderByClientOidReq req = builder.build(); + CancelOrderByClientOidResp resp = api.cancelOrderByClientOid(req); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getMaxOpenSize Get Max Open Size /api/v1/copy-trade/futures/get-max-open-size */ + @Test + public void testGetMaxOpenSize() throws Exception { + GetMaxOpenSizeReq.GetMaxOpenSizeReqBuilder builder = GetMaxOpenSizeReq.builder(); + builder.symbol("XBTUSDTM").price(0.1).leverage(10); + GetMaxOpenSizeReq req = builder.build(); + GetMaxOpenSizeResp resp = api.getMaxOpenSize(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getMaxBuyOpenSize()); + Assertions.assertNotNull(resp.getMaxSellOpenSize()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * getMaxWithdrawMargin Get Max Withdraw Margin + * /api/v1/copy-trade/futures/position/margin/max-withdraw-margin + */ + @Test + public void testGetMaxWithdrawMargin() throws Exception { + GetMaxWithdrawMarginReq.GetMaxWithdrawMarginReqBuilder builder = + GetMaxWithdrawMarginReq.builder(); + builder.symbol("XBTUSDTM"); + GetMaxWithdrawMarginReq req = builder.build(); + GetMaxWithdrawMarginResp resp = api.getMaxWithdrawMargin(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * addIsolatedMargin Add Isolated Margin /api/v1/copy-trade/futures/position/margin/deposit-margin + */ + @Test + public void testAddIsolatedMargin() throws Exception { + AddIsolatedMarginReq.AddIsolatedMarginReqBuilder builder = AddIsolatedMarginReq.builder(); + builder.symbol("XBTUSDTM").margin(3.0).bizNo(UUID.randomUUID().toString()); + AddIsolatedMarginReq req = builder.build(); + AddIsolatedMarginResp resp = api.addIsolatedMargin(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getAutoDeposit()); + Assertions.assertNotNull(resp.getMaintMarginReq()); + Assertions.assertNotNull(resp.getRiskLimit()); + Assertions.assertNotNull(resp.getRealLeverage()); + Assertions.assertNotNull(resp.getCrossMode()); + Assertions.assertNotNull(resp.getDelevPercentage()); + Assertions.assertNotNull(resp.getOpeningTimestamp()); + Assertions.assertNotNull(resp.getCurrentTimestamp()); + Assertions.assertNotNull(resp.getCurrentQty()); + Assertions.assertNotNull(resp.getCurrentCost()); + Assertions.assertNotNull(resp.getCurrentComm()); + Assertions.assertNotNull(resp.getUnrealisedCost()); + Assertions.assertNotNull(resp.getRealisedGrossCost()); + Assertions.assertNotNull(resp.getRealisedCost()); + Assertions.assertNotNull(resp.getIsOpen()); + Assertions.assertNotNull(resp.getMarkPrice()); + Assertions.assertNotNull(resp.getMarkValue()); + Assertions.assertNotNull(resp.getPosCost()); + Assertions.assertNotNull(resp.getPosCross()); + Assertions.assertNotNull(resp.getPosInit()); + Assertions.assertNotNull(resp.getPosComm()); + Assertions.assertNotNull(resp.getPosLoss()); + Assertions.assertNotNull(resp.getPosMargin()); + Assertions.assertNotNull(resp.getPosMaint()); + Assertions.assertNotNull(resp.getMaintMargin()); + Assertions.assertNotNull(resp.getRealisedGrossPnl()); + Assertions.assertNotNull(resp.getRealisedPnl()); + Assertions.assertNotNull(resp.getUnrealisedPnl()); + Assertions.assertNotNull(resp.getUnrealisedPnlPcnt()); + Assertions.assertNotNull(resp.getUnrealisedRoePcnt()); + Assertions.assertNotNull(resp.getAvgEntryPrice()); + Assertions.assertNotNull(resp.getLiquidationPrice()); + Assertions.assertNotNull(resp.getBankruptPrice()); + Assertions.assertNotNull(resp.getSettleCurrency()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * removeIsolatedMargin Remove Isolated Margin + * /api/v1/copy-trade/futures/position/margin/withdraw-margin + */ + @Test + public void testRemoveIsolatedMargin() throws Exception { + RemoveIsolatedMarginReq.RemoveIsolatedMarginReqBuilder builder = + RemoveIsolatedMarginReq.builder(); + builder.symbol("XBTUSDTM").withdrawAmount(0.000001); + RemoveIsolatedMarginReq req = builder.build(); + RemoveIsolatedMarginResp resp = api.removeIsolatedMargin(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * modifyIsolatedMarginRiskLimt Modify Isolated Margin Risk Limit + * /api/v1/copy-trade/futures/position/risk-limit-level/change + */ + @Test + public void testModifyIsolatedMarginRiskLimt() throws Exception { + ModifyIsolatedMarginRiskLimtReq.ModifyIsolatedMarginRiskLimtReqBuilder builder = + ModifyIsolatedMarginRiskLimtReq.builder(); + builder.symbol("XBTUSDTM").level(1); + ModifyIsolatedMarginRiskLimtReq req = builder.build(); + ModifyIsolatedMarginRiskLimtResp resp = api.modifyIsolatedMarginRiskLimt(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** + * modifyAutoDepositStatus Modify Isolated Margin Auto-Deposit Status + * /api/v1/copy-trade/futures/position/margin/auto-deposit-status + */ + @Test + public void testModifyAutoDepositStatus() throws Exception { + ModifyAutoDepositStatusReq.ModifyAutoDepositStatusReqBuilder builder = + ModifyAutoDepositStatusReq.builder(); + builder.symbol("XBTUSDTM").status(true); + ModifyAutoDepositStatusReq req = builder.build(); + ModifyAutoDepositStatusResp resp = api.modifyAutoDepositStatus(req); + Assertions.assertNotNull(resp.getData()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/FundingFeeApiTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/FundingFeeApiTest.java new file mode 100644 index 00000000..91c5c0ea --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/FundingFeeApiTest.java @@ -0,0 +1,137 @@ +package com.kucoin.universal.sdk.test.e2e.rest.futures; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.futures.fundingfees.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class FundingFeeApiTest { + + private static FundingFeesApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getFuturesService().getFundingFeesApi(); + } + + /** getCurrentFundingRate Get Current Funding Rate /api/v1/funding-rate/{symbol}/current */ + @Test + public void testGetCurrentFundingRate() throws Exception { + GetCurrentFundingRateReq.GetCurrentFundingRateReqBuilder builder = + GetCurrentFundingRateReq.builder(); + builder.symbol("XBTUSDTM"); + GetCurrentFundingRateReq req = builder.build(); + GetCurrentFundingRateResp resp = api.getCurrentFundingRate(req); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getGranularity()); + Assertions.assertNotNull(resp.getTimePoint()); + Assertions.assertNotNull(resp.getValue()); + Assertions.assertNotNull(resp.getFundingRateCap()); + Assertions.assertNotNull(resp.getFundingRateFloor()); + Assertions.assertNotNull(resp.getPeriod()); + Assertions.assertNotNull(resp.getFundingTime()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getPublicFundingHistory Get Public Funding History /api/v1/contract/funding-rates */ + @Test + public void testGetPublicFundingHistory() throws Exception { + GetPublicFundingHistoryReq.GetPublicFundingHistoryReqBuilder builder = + GetPublicFundingHistoryReq.builder(); + builder.symbol("XBTUSDTM").from(1753286400000L).to(1753372800000L); + GetPublicFundingHistoryReq req = builder.build(); + GetPublicFundingHistoryResp resp = api.getPublicFundingHistory(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getFundingRate()); + Assertions.assertNotNull(item.getTimepoint()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getPrivateFundingHistory Get Private Funding History /api/v1/funding-history */ + @Test + public void testGetPrivateFundingHistory() throws Exception { + GetPrivateFundingHistoryReq.GetPrivateFundingHistoryReqBuilder builder = + GetPrivateFundingHistoryReq.builder(); + builder.symbol("XBTUSDTM").startAt(1753200000000L).endAt(1753372800000L); + GetPrivateFundingHistoryReq req = builder.build(); + GetPrivateFundingHistoryResp resp = api.getPrivateFundingHistory(req); + resp.getDataList() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTimePoint()); + Assertions.assertNotNull(item.getFundingRate()); + Assertions.assertNotNull(item.getMarkPrice()); + Assertions.assertNotNull(item.getPositionQty()); + Assertions.assertNotNull(item.getPositionCost()); + Assertions.assertNotNull(item.getFunding()); + Assertions.assertNotNull(item.getSettleCurrency()); + Assertions.assertNotNull(item.getContext()); + Assertions.assertNotNull(item.getMarginMode()); + }); + + Assertions.assertNotNull(resp.getHasMore()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/OrderApiTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/OrderApiTest.java new file mode 100644 index 00000000..4b3ea9eb --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/OrderApiTest.java @@ -0,0 +1,625 @@ +package com.kucoin.universal.sdk.test.e2e.rest.futures; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.futures.order.*; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Arrays; +import java.util.Collections; +import java.util.UUID; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class OrderApiTest { + + private static OrderApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getFuturesService().getOrderApi(); + } + + /** addOrder Add Order /api/v1/orders */ + @Test + public void testAddOrder() throws Exception { + AddOrderReq.AddOrderReqBuilder builder = AddOrderReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .side(AddOrderReq.SideEnum.BUY) + .symbol("XBTUSDTM") + .leverage(3) + .type(AddOrderReq.TypeEnum.LIMIT) + .remark("order_test") + .marginMode(AddOrderReq.MarginModeEnum.CROSS) + .price("1") + .size(1); + AddOrderReq req = builder.build(); + AddOrderResp resp = api.addOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** addOrderTest Add Order Test /api/v1/orders/test */ + @Test + public void testAddOrderTest() throws Exception { + AddOrderTestReq.AddOrderTestReqBuilder builder = AddOrderTestReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .side(AddOrderTestReq.SideEnum.BUY) + .symbol("XBTUSDTM") + .leverage(3) + .type(AddOrderTestReq.TypeEnum.LIMIT) + .remark("order_test") + .marginMode(AddOrderTestReq.MarginModeEnum.CROSS) + .price("1") + .size(1); + AddOrderTestReq req = builder.build(); + AddOrderTestResp resp = api.addOrderTest(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** batchAddOrders Batch Add Orders /api/v1/orders/multi */ + @Test + public void testBatchAddOrders() throws Exception { + BatchAddOrdersReq.BatchAddOrdersReqBuilder builder = BatchAddOrdersReq.builder(); + + BatchAddOrdersItem.BatchAddOrdersItemBuilder builder1 = BatchAddOrdersItem.builder(); + builder1 + .clientOid(UUID.randomUUID().toString()) + .side(BatchAddOrdersItem.SideEnum.BUY) + .symbol("XBTUSDTM") + .leverage(3) + .type(BatchAddOrdersItem.TypeEnum.LIMIT) + .remark("order_test") + .marginMode(BatchAddOrdersItem.MarginModeEnum.CROSS) + .price("1") + .size(1); + + BatchAddOrdersItem.BatchAddOrdersItemBuilder builder2 = BatchAddOrdersItem.builder(); + builder2 + .clientOid(UUID.randomUUID().toString()) + .side(BatchAddOrdersItem.SideEnum.BUY) + .symbol("XBTUSDTM") + .leverage(3) + .type(BatchAddOrdersItem.TypeEnum.LIMIT) + .remark("order_test") + .marginMode(BatchAddOrdersItem.MarginModeEnum.CROSS) + .price("1") + .size(1); + + builder.items(Arrays.asList(builder1.build(), builder2.build())); + BatchAddOrdersReq req = builder.build(); + BatchAddOrdersResp resp = api.batchAddOrders(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getCode()); + Assertions.assertNotNull(item.getMsg()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** addTPSLOrder Add Take Profit And Stop Loss Order /api/v1/st-orders */ + @Test + public void testAddTPSLOrder() throws Exception { + AddTPSLOrderReq.AddTPSLOrderReqBuilder builder = AddTPSLOrderReq.builder(); + builder + .clientOid(UUID.randomUUID().toString()) + .side(AddTPSLOrderReq.SideEnum.BUY) + .symbol("XBTUSDTM") + .leverage(3) + .type(AddTPSLOrderReq.TypeEnum.LIMIT) + .remark("order_test") + .stopPriceType(AddTPSLOrderReq.StopPriceTypeEnum.TRADEPRICE) + .marginMode(AddTPSLOrderReq.MarginModeEnum.CROSS) + .price("10000") + .size(1) + .triggerStopUpPrice("8000") + .triggerStopDownPrice("12000"); + AddTPSLOrderReq req = builder.build(); + AddTPSLOrderResp resp = api.addTPSLOrder(req); + Assertions.assertNotNull(resp.getOrderId()); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** cancelOrderById Cancel Order By OrderId /api/v1/orders/{orderId} */ + @Test + public void testCancelOrderById() throws Exception { + CancelOrderByIdReq.CancelOrderByIdReqBuilder builder = CancelOrderByIdReq.builder(); + builder.orderId("337705650295418881"); + CancelOrderByIdReq req = builder.build(); + CancelOrderByIdResp resp = api.cancelOrderById(req); + resp.getCancelledOrderIds().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** cancelOrderByClientOid Cancel Order By ClientOid /api/v1/orders/client-order/{clientOid} */ + @Test + public void testCancelOrderByClientOid() throws Exception { + CancelOrderByClientOidReq.CancelOrderByClientOidReqBuilder builder = + CancelOrderByClientOidReq.builder(); + builder.symbol("XBTUSDTM").clientOid("2252fd15-bcee-4d05-ba37-65c2e97af013"); + CancelOrderByClientOidReq req = builder.build(); + CancelOrderByClientOidResp resp = api.cancelOrderByClientOid(req); + Assertions.assertNotNull(resp.getClientOid()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** batchCancelOrders Batch Cancel Orders /api/v1/orders/multi-cancel */ + @Test + public void testBatchCancelOrders() throws Exception { + BatchCancelOrdersReq.BatchCancelOrdersReqBuilder builder = BatchCancelOrdersReq.builder(); + builder + .orderIdsList(Arrays.asList("337760909529260032", "337760909562814464")) + .clientOidsList( + Arrays.asList( + BatchCancelOrdersClientOidsList.builder() + .symbol("XBTUSDTM") + .clientOid("7bd1ac22-0cbc-4b78-95b9-fa422d1f86f4") + .build(), + (BatchCancelOrdersClientOidsList.builder() + .symbol("XBTUSDTM") + .clientOid("00f46911-45a5-416a-9591-61e1e5009407") + .build()))); + BatchCancelOrdersReq req = builder.build(); + BatchCancelOrdersResp resp = api.batchCancelOrders(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getCode()); + Assertions.assertNotNull(item.getMsg()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** cancelAllOrdersV3 Cancel All Orders /api/v3/orders */ + @Test + public void testCancelAllOrdersV3() throws Exception { + CancelAllOrdersV3Req.CancelAllOrdersV3ReqBuilder builder = CancelAllOrdersV3Req.builder(); + builder.symbol("XBTUSDTM"); + CancelAllOrdersV3Req req = builder.build(); + CancelAllOrdersV3Resp resp = api.cancelAllOrdersV3(req); + resp.getCancelledOrderIds().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** cancelAllStopOrders Cancel All Stop orders /api/v1/stopOrders */ + @Test + public void testCancelAllStopOrders() throws Exception { + CancelAllStopOrdersReq.CancelAllStopOrdersReqBuilder builder = CancelAllStopOrdersReq.builder(); + builder.symbol("XBTUSDTM"); + CancelAllStopOrdersReq req = builder.build(); + CancelAllStopOrdersResp resp = api.cancelAllStopOrders(req); + resp.getCancelledOrderIds().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getOrderByOrderId Get Order By OrderId /api/v1/orders/{order-id} */ + @Test + public void testGetOrderByOrderId() throws Exception { + GetOrderByOrderIdReq.GetOrderByOrderIdReqBuilder builder = GetOrderByOrderIdReq.builder(); + builder.orderId("337761538230231040"); + GetOrderByOrderIdReq req = builder.build(); + GetOrderByOrderIdResp resp = api.getOrderByOrderId(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getValue()); + Assertions.assertNotNull(resp.getDealValue()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getStp()); + Assertions.assertNotNull(resp.getStop()); + Assertions.assertNotNull(resp.getStopPriceType()); + Assertions.assertNotNull(resp.getStopTriggered()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getLeverage()); + Assertions.assertNotNull(resp.getForceHold()); + Assertions.assertNotNull(resp.getCloseOrder()); + Assertions.assertNotNull(resp.getVisibleSize()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getTags()); + Assertions.assertNotNull(resp.getIsActive()); + Assertions.assertNotNull(resp.getCancelExist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getUpdatedAt()); + Assertions.assertNotNull(resp.getOrderTime()); + Assertions.assertNotNull(resp.getSettleCurrency()); + Assertions.assertNotNull(resp.getMarginMode()); + Assertions.assertNotNull(resp.getAvgDealPrice()); + Assertions.assertNotNull(resp.getFilledSize()); + Assertions.assertNotNull(resp.getFilledValue()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getReduceOnly()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getOrderByClientOid Get Order By ClientOid /api/v1/orders/byClientOid */ + @Test + public void testGetOrderByClientOid() throws Exception { + GetOrderByClientOidReq.GetOrderByClientOidReqBuilder builder = GetOrderByClientOidReq.builder(); + builder.clientOid("6e68ec8c-8613-451a-b29b-d60e007c0138"); + GetOrderByClientOidReq req = builder.build(); + GetOrderByClientOidResp resp = api.getOrderByClientOid(req); + Assertions.assertNotNull(resp.getId()); + Assertions.assertNotNull(resp.getSymbol()); + Assertions.assertNotNull(resp.getType()); + Assertions.assertNotNull(resp.getSide()); + Assertions.assertNotNull(resp.getPrice()); + Assertions.assertNotNull(resp.getSize()); + Assertions.assertNotNull(resp.getValue()); + Assertions.assertNotNull(resp.getDealValue()); + Assertions.assertNotNull(resp.getDealSize()); + Assertions.assertNotNull(resp.getStp()); + Assertions.assertNotNull(resp.getStop()); + Assertions.assertNotNull(resp.getStopPriceType()); + Assertions.assertNotNull(resp.getStopTriggered()); + Assertions.assertNotNull(resp.getTimeInForce()); + Assertions.assertNotNull(resp.getPostOnly()); + Assertions.assertNotNull(resp.getHidden()); + Assertions.assertNotNull(resp.getIceberg()); + Assertions.assertNotNull(resp.getLeverage()); + Assertions.assertNotNull(resp.getForceHold()); + Assertions.assertNotNull(resp.getCloseOrder()); + Assertions.assertNotNull(resp.getVisibleSize()); + Assertions.assertNotNull(resp.getClientOid()); + Assertions.assertNotNull(resp.getTags()); + Assertions.assertNotNull(resp.getIsActive()); + Assertions.assertNotNull(resp.getCancelExist()); + Assertions.assertNotNull(resp.getCreatedAt()); + Assertions.assertNotNull(resp.getUpdatedAt()); + Assertions.assertNotNull(resp.getOrderTime()); + Assertions.assertNotNull(resp.getSettleCurrency()); + Assertions.assertNotNull(resp.getMarginMode()); + Assertions.assertNotNull(resp.getAvgDealPrice()); + Assertions.assertNotNull(resp.getFilledSize()); + Assertions.assertNotNull(resp.getFilledValue()); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getReduceOnly()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getOrderList Get Order List /api/v1/orders */ + @Test + public void testGetOrderList() throws Exception { + GetOrderListReq.GetOrderListReqBuilder builder = GetOrderListReq.builder(); + builder.status(GetOrderListReq.StatusEnum.DONE).symbol("XBTUSDTM"); + GetOrderListReq req = builder.build(); + GetOrderListResp resp = api.getOrderList(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getValue()); + Assertions.assertNotNull(item.getDealValue()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getStp()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getStopPriceType()); + Assertions.assertNotNull(item.getStopTriggered()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getLeverage()); + Assertions.assertNotNull(item.getForceHold()); + Assertions.assertNotNull(item.getCloseOrder()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getTags()); + Assertions.assertNotNull(item.getIsActive()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getUpdatedAt()); + Assertions.assertNotNull(item.getEndAt()); + Assertions.assertNotNull(item.getOrderTime()); + Assertions.assertNotNull(item.getSettleCurrency()); + Assertions.assertNotNull(item.getMarginMode()); + Assertions.assertNotNull(item.getAvgDealPrice()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getFilledSize()); + Assertions.assertNotNull(item.getFilledValue()); + Assertions.assertNotNull(item.getReduceOnly()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getRecentClosedOrders Get Recent Closed Orders /api/v1/recentDoneOrders */ + @Test + public void testGetRecentClosedOrders() throws Exception { + GetRecentClosedOrdersReq.GetRecentClosedOrdersReqBuilder builder = + GetRecentClosedOrdersReq.builder(); + builder.symbol("XBTUSDTM"); + GetRecentClosedOrdersReq req = builder.build(); + GetRecentClosedOrdersResp resp = api.getRecentClosedOrders(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getValue()); + Assertions.assertNotNull(item.getDealValue()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getStp()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getStopPriceType()); + Assertions.assertNotNull(item.getStopTriggered()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getLeverage()); + Assertions.assertNotNull(item.getForceHold()); + Assertions.assertNotNull(item.getCloseOrder()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getTags()); + Assertions.assertNotNull(item.getIsActive()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getUpdatedAt()); + Assertions.assertNotNull(item.getEndAt()); + Assertions.assertNotNull(item.getOrderTime()); + Assertions.assertNotNull(item.getSettleCurrency()); + Assertions.assertNotNull(item.getMarginMode()); + Assertions.assertNotNull(item.getAvgDealPrice()); + Assertions.assertNotNull(item.getFilledSize()); + Assertions.assertNotNull(item.getFilledValue()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getReduceOnly()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getStopOrderList Get Stop Order List /api/v1/stopOrders */ + @Test + public void testGetStopOrderList() throws Exception { + GetStopOrderListReq.GetStopOrderListReqBuilder builder = GetStopOrderListReq.builder(); + builder.symbol("XBTUSDTM"); + GetStopOrderListReq req = builder.build(); + GetStopOrderListResp resp = api.getStopOrderList(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getId()); + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getType()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getValue()); + Assertions.assertNotNull(item.getDealValue()); + Assertions.assertNotNull(item.getDealSize()); + Assertions.assertNotNull(item.getStp()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getStopPriceType()); + Assertions.assertNotNull(item.getStopTriggered()); + Assertions.assertNotNull(item.getStopPrice()); + Assertions.assertNotNull(item.getTimeInForce()); + Assertions.assertNotNull(item.getPostOnly()); + Assertions.assertNotNull(item.getHidden()); + Assertions.assertNotNull(item.getIceberg()); + Assertions.assertNotNull(item.getLeverage()); + Assertions.assertNotNull(item.getForceHold()); + Assertions.assertNotNull(item.getCloseOrder()); + Assertions.assertNotNull(item.getVisibleSize()); + Assertions.assertNotNull(item.getClientOid()); + Assertions.assertNotNull(item.getRemark()); + Assertions.assertNotNull(item.getTags()); + Assertions.assertNotNull(item.getIsActive()); + Assertions.assertNotNull(item.getCancelExist()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getUpdatedAt()); + Assertions.assertNotNull(item.getEndAt()); + Assertions.assertNotNull(item.getOrderTime()); + Assertions.assertNotNull(item.getSettleCurrency()); + Assertions.assertNotNull(item.getMarginMode()); + Assertions.assertNotNull(item.getAvgDealPrice()); + Assertions.assertNotNull(item.getFilledSize()); + Assertions.assertNotNull(item.getFilledValue()); + Assertions.assertNotNull(item.getStatus()); + Assertions.assertNotNull(item.getReduceOnly()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getOpenOrderValue Get Open Order Value /api/v1/openOrderStatistics */ + @Test + public void testGetOpenOrderValue() throws Exception { + GetOpenOrderValueReq.GetOpenOrderValueReqBuilder builder = GetOpenOrderValueReq.builder(); + builder.symbol("XBTUSDTM"); + GetOpenOrderValueReq req = builder.build(); + GetOpenOrderValueResp resp = api.getOpenOrderValue(req); + Assertions.assertNotNull(resp.getOpenOrderBuySize()); + Assertions.assertNotNull(resp.getOpenOrderSellSize()); + Assertions.assertNotNull(resp.getOpenOrderBuyCost()); + Assertions.assertNotNull(resp.getOpenOrderSellCost()); + Assertions.assertNotNull(resp.getSettleCurrency()); + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getRecentTradeHistory Get Recent Trade History /api/v1/recentFills */ + @Test + public void testGetRecentTradeHistory() throws Exception { + GetRecentTradeHistoryReq.GetRecentTradeHistoryReqBuilder builder = + GetRecentTradeHistoryReq.builder(); + builder.symbol("XBTUSDTM"); + GetRecentTradeHistoryReq req = builder.build(); + GetRecentTradeHistoryResp resp = api.getRecentTradeHistory(req); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTradeId()); + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getLiquidity()); + Assertions.assertNotNull(item.getForceTaker()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getValue()); + Assertions.assertNotNull(item.getOpenFeePay()); + Assertions.assertNotNull(item.getCloseFeePay()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getFeeRate()); + Assertions.assertNotNull(item.getFixFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getTradeTime()); + Assertions.assertNotNull(item.getMarginMode()); + Assertions.assertNotNull(item.getDisplayType()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getSettleCurrency()); + Assertions.assertNotNull(item.getOrderType()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getCreatedAt()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getTradeHistory Get Trade History /api/v1/fills */ + @Test + public void testGetTradeHistory() throws Exception { + GetTradeHistoryReq.GetTradeHistoryReqBuilder builder = GetTradeHistoryReq.builder(); + builder.symbol("XBTUSDTM"); + GetTradeHistoryReq req = builder.build(); + GetTradeHistoryResp resp = api.getTradeHistory(req); + Assertions.assertNotNull(resp.getCurrentPage()); + Assertions.assertNotNull(resp.getPageSize()); + Assertions.assertNotNull(resp.getTotalNum()); + Assertions.assertNotNull(resp.getTotalPage()); + resp.getItems() + .forEach( + item -> { + Assertions.assertNotNull(item.getSymbol()); + Assertions.assertNotNull(item.getTradeId()); + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getSide()); + Assertions.assertNotNull(item.getLiquidity()); + Assertions.assertNotNull(item.getForceTaker()); + Assertions.assertNotNull(item.getPrice()); + Assertions.assertNotNull(item.getSize()); + Assertions.assertNotNull(item.getValue()); + Assertions.assertNotNull(item.getOpenFeePay()); + Assertions.assertNotNull(item.getCloseFeePay()); + Assertions.assertNotNull(item.getStop()); + Assertions.assertNotNull(item.getFeeRate()); + Assertions.assertNotNull(item.getFixFee()); + Assertions.assertNotNull(item.getFeeCurrency()); + Assertions.assertNotNull(item.getTradeTime()); + Assertions.assertNotNull(item.getMarginMode()); + Assertions.assertNotNull(item.getSettleCurrency()); + Assertions.assertNotNull(item.getDisplayType()); + Assertions.assertNotNull(item.getFee()); + Assertions.assertNotNull(item.getOrderType()); + Assertions.assertNotNull(item.getTradeType()); + Assertions.assertNotNull(item.getCreatedAt()); + Assertions.assertNotNull(item.getOpenFeeTaxPay()); + Assertions.assertNotNull(item.getCloseFeeTaxPay()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** cancelAllOrdersV1 Cancel All Orders - V1 /api/v1/orders */ + @Test + public void testCancelAllOrdersV1() throws Exception { + CancelAllOrdersV1Req.CancelAllOrdersV1ReqBuilder builder = CancelAllOrdersV1Req.builder(); + builder.symbol("XBTUSDTM"); + CancelAllOrdersV1Req req = builder.build(); + CancelAllOrdersV1Resp resp = api.cancelAllOrdersV1(req); + resp.getCancelledOrderIds().forEach(item -> {}); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/PositionsApiTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/PositionsApiTest.java index ad62350c..ad6f2fc7 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/PositionsApiTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/futures/PositionsApiTest.java @@ -3,7 +3,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.kucoin.universal.sdk.api.DefaultKucoinClient; import com.kucoin.universal.sdk.api.KucoinClient; -import com.kucoin.universal.sdk.generate.futures.market.*; import com.kucoin.universal.sdk.generate.futures.positions.*; import com.kucoin.universal.sdk.model.ClientOption; import com.kucoin.universal.sdk.model.Constants; diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/viplending/VipLendingTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/viplending/VipLendingTest.java new file mode 100644 index 00000000..10d4f250 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/rest/viplending/VipLendingTest.java @@ -0,0 +1,135 @@ +package com.kucoin.universal.sdk.test.e2e.rest.viplending; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.viplending.viplending.GetAccountsResp; +import com.kucoin.universal.sdk.generate.viplending.viplending.GetDiscountRateConfigsResp; +import com.kucoin.universal.sdk.generate.viplending.viplending.GetLoanInfoResp; +import com.kucoin.universal.sdk.generate.viplending.viplending.VIPLendingApi; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import java.io.IOException; +import java.util.Collections; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +// TODO 401 +@Slf4j +public class VipLendingTest { + + private static VIPLendingApi api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + TransportOption httpTransport = + TransportOption.builder() + .interceptors( + Collections.singleton( + new Interceptor() { + @NotNull @Override + public Response intercept(@NotNull Chain chain) throws IOException { + Request request = chain.request(); + + System.out.println("========== Request =========="); + System.out.println(request.method() + " " + request.url()); + + Response response = chain.proceed(request); + + System.out.println("========== Response =========="); + System.out.println("Status Code: " + response.code()); + System.out.println("Message: " + response.message()); + return response; + } + })) + .build(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(httpTransport) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getRestService().getVipLendingService().getVIPLendingApi(); + } + + /** getDiscountRateConfigs Get Discount Rate Configs /api/v1/otc-loan/discount-rate-configs */ + @Test + public void testGetDiscountRateConfigs() throws Exception { + GetDiscountRateConfigsResp resp = api.getDiscountRateConfigs(); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getCurrency()); + Assertions.assertNotNull(item.getUsdtLevels()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getLoanInfo Get Loan Info /api/v1/otc-loan/loan */ + @Test + public void testGetLoanInfo() throws Exception { + GetLoanInfoResp resp = api.getLoanInfo(); + Assertions.assertNotNull(resp.getParentUid()); + resp.getOrders() + .forEach( + item -> { + Assertions.assertNotNull(item.getOrderId()); + Assertions.assertNotNull(item.getPrincipal()); + Assertions.assertNotNull(item.getInterest()); + Assertions.assertNotNull(item.getCurrency()); + }); + + Assertions.assertNotNull(resp.getLtv()); + Assertions.assertNotNull(resp.getTotalMarginAmount()); + Assertions.assertNotNull(resp.getTransferMarginAmount()); + resp.getMargins() + .forEach( + item -> { + Assertions.assertNotNull(item.getMarginCcy()); + Assertions.assertNotNull(item.getMarginQty()); + Assertions.assertNotNull(item.getMarginFactor()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } + + /** getAccounts Get Accounts /api/v1/otc-loan/accounts */ + @Test + public void testGetAccounts() throws Exception { + GetAccountsResp resp = api.getAccounts(); + resp.getData() + .forEach( + item -> { + Assertions.assertNotNull(item.getUid()); + Assertions.assertNotNull(item.getMarginCcy()); + Assertions.assertNotNull(item.getMarginQty()); + Assertions.assertNotNull(item.getMarginFactor()); + Assertions.assertNotNull(item.getAccountType()); + Assertions.assertNotNull(item.getIsParent()); + }); + + log.info("resp: {}", mapper.writeValueAsString(resp)); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/futures/PrivateTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/futures/PrivateTest.java new file mode 100644 index 00000000..b0910691 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/futures/PrivateTest.java @@ -0,0 +1,259 @@ +package com.kucoin.universal.sdk.test.e2e.ws.futures; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.futures.futuresprivate.FuturesPrivateWs; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import com.kucoin.universal.sdk.model.WebSocketClientOption; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CountDownLatch; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class PrivateTest { + + private static FuturesPrivateWs api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + WebSocketClientOption webSocketClientOption = WebSocketClientOption.defaults(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(TransportOption.defaults()) + .websocketClientOption(webSocketClientOption) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getWsService().newFuturesPrivateWS(); + api.start(); + } + + @AfterAll + public static void tearDown() { + api.stop(); + } + + @Test + public void testAllOrder() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.allOrder( + (__, ___, event) -> { + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testAllPosition() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.allPosition( + (__, ___, event) -> { + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testBalance() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.balance( + (__, ___, event) -> { + Assertions.assertNotNull(event.getCrossPosMargin()); + Assertions.assertNotNull(event.getIsolatedOrderMargin()); + Assertions.assertNotNull(event.getHoldBalance()); + Assertions.assertNotNull(event.getEquity()); + Assertions.assertNotNull(event.getVersion()); + Assertions.assertNotNull(event.getAvailableBalance()); + Assertions.assertNotNull(event.getIsolatedPosMargin()); + Assertions.assertNotNull(event.getWalletBalance()); + Assertions.assertNotNull(event.getIsolatedFundingFeeMargin()); + Assertions.assertNotNull(event.getCrossUnPnl()); + Assertions.assertNotNull(event.getTotalCrossMargin()); + Assertions.assertNotNull(event.getCurrency()); + Assertions.assertNotNull(event.getIsolatedUnPnl()); + Assertions.assertNotNull(event.getCrossOrderMargin()); + Assertions.assertNotNull(event.getTimestamp()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testCrossLeverage() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.crossLeverage( + (__, ___, event) -> { + Assertions.assertNotNull(event.getData()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testMarginMode() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.marginMode( + (__, ___, event) -> { + Assertions.assertNotNull(event.getData()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testOrder() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.order( + "XBTUSDTM", + (__, ___, event) -> { + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testPosition() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.position( + "XBTUSDTM", + (__, ___, event) -> { + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testStopOrders() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.stopOrders( + (__, ___, event) -> { + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/futures/PublicTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/futures/PublicTest.java new file mode 100644 index 00000000..5b38f9e6 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/futures/PublicTest.java @@ -0,0 +1,364 @@ +package com.kucoin.universal.sdk.test.e2e.ws.futures; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.futures.futurespublic.FuturesPublicWs; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import com.kucoin.universal.sdk.model.WebSocketClientOption; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CountDownLatch; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class PublicTest { + + private static FuturesPublicWs api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + WebSocketClientOption webSocketClientOption = WebSocketClientOption.defaults(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(TransportOption.defaults()) + .websocketClientOption(webSocketClientOption) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getWsService().newFuturesPublicWS(); + api.start(); + } + + @AfterAll + public static void tearDown() { + api.stop(); + } + + // TODO + @Test + public void testAnnouncement() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.announcement( + "XBTUSDTM", + (__, ___, event) -> { + Assertions.assertNotNull(event.getSymbol()); + Assertions.assertNotNull(event.getFundingTime()); + Assertions.assertNotNull(event.getFundingRate()); + Assertions.assertNotNull(event.getTimestamp()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testExecution() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.execution( + "XBTUSDTM", + (__, ___, event) -> { + Assertions.assertNotNull(event.getSymbol()); + Assertions.assertNotNull(event.getSequence()); + Assertions.assertNotNull(event.getSide()); + Assertions.assertNotNull(event.getSize()); + Assertions.assertNotNull(event.getPrice()); + Assertions.assertNotNull(event.getTakerOrderId()); + Assertions.assertNotNull(event.getMakerOrderId()); + Assertions.assertNotNull(event.getTradeId()); + Assertions.assertNotNull(event.getTs()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testInstrument() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.instrument( + "XBTUSDTM", + (__, ___, event) -> { + Assertions.assertNotNull(event.getGranularity()); + Assertions.assertNotNull(event.getTimestamp()); + Assertions.assertNotNull(event.getMarkPrice()); + Assertions.assertNotNull(event.getIndexPrice()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testKlines() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.klines( + "XBTUSDTM", + "1min", + (__, ___, event) -> { + Assertions.assertNotNull(event.getSymbol()); + event.getCandles().forEach(item -> {}); + + Assertions.assertNotNull(event.getTime()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testOrderbookIncrement() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.orderbookIncrement( + "XBTUSDTM", + (__, ___, event) -> { + Assertions.assertNotNull(event.getSequence()); + Assertions.assertNotNull(event.getChange()); + Assertions.assertNotNull(event.getTimestamp()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testOrderbookLevel50() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.orderbookLevel50( + "XBTUSDTM", + (__, ___, event) -> { + event.getBids().forEach(item -> {}); + + Assertions.assertNotNull(event.getSequence()); + Assertions.assertNotNull(event.getTimestamp()); + Assertions.assertNotNull(event.getTs()); + event.getAsks().forEach(item -> {}); + + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testOrderbookLevel5() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.orderbookLevel5( + "XBTUSDTM", + (__, ___, event) -> { + event.getBids().forEach(item -> {}); + + Assertions.assertNotNull(event.getSequence()); + Assertions.assertNotNull(event.getTimestamp()); + Assertions.assertNotNull(event.getTs()); + event.getAsks().forEach(item -> {}); + + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testSymbolSnapshot() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.symbolSnapshot( + "XBTUSDTM", + (__, ___, event) -> { + Assertions.assertNotNull(event.getHighPrice()); + Assertions.assertNotNull(event.getLastPrice()); + Assertions.assertNotNull(event.getLowPrice()); + Assertions.assertNotNull(event.getPrice24HoursBefore()); + Assertions.assertNotNull(event.getPriceChg()); + Assertions.assertNotNull(event.getPriceChgPct()); + Assertions.assertNotNull(event.getSymbol()); + Assertions.assertNotNull(event.getTs()); + Assertions.assertNotNull(event.getTurnover()); + Assertions.assertNotNull(event.getVolume()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testTickerV1() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.tickerV1( + "XBTUSDTM", + (__, ___, event) -> { + Assertions.assertNotNull(event.getSymbol()); + Assertions.assertNotNull(event.getSequence()); + Assertions.assertNotNull(event.getSide()); + Assertions.assertNotNull(event.getSize()); + Assertions.assertNotNull(event.getPrice()); + Assertions.assertNotNull(event.getBestBidSize()); + Assertions.assertNotNull(event.getBestBidPrice()); + Assertions.assertNotNull(event.getBestAskPrice()); + Assertions.assertNotNull(event.getTradeId()); + Assertions.assertNotNull(event.getBestAskSize()); + Assertions.assertNotNull(event.getTs()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testTickerV2() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.tickerV2( + "XBTUSDTM", + (__, ___, event) -> { + Assertions.assertNotNull(event.getSymbol()); + Assertions.assertNotNull(event.getSequence()); + Assertions.assertNotNull(event.getBestBidSize()); + Assertions.assertNotNull(event.getBestBidPrice()); + Assertions.assertNotNull(event.getBestAskPrice()); + Assertions.assertNotNull(event.getBestAskSize()); + Assertions.assertNotNull(event.getTs()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/margin/PrivateTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/margin/PrivateTest.java new file mode 100644 index 00000000..b99f75b4 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/margin/PrivateTest.java @@ -0,0 +1,110 @@ +package com.kucoin.universal.sdk.test.e2e.ws.margin; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.margin.marginprivate.MarginPrivateWs; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import com.kucoin.universal.sdk.model.WebSocketClientOption; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CountDownLatch; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class PrivateTest { + + private static MarginPrivateWs api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + WebSocketClientOption webSocketClientOption = WebSocketClientOption.defaults(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(TransportOption.defaults()) + .websocketClientOption(webSocketClientOption) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getWsService().newMarginPrivateWS(); + api.start(); + } + + @AfterAll + public static void tearDown() { + api.stop(); + } + + @Test + public void testCrossMarginPosition() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.crossMarginPosition( + (__, ___, event) -> { + Assertions.assertNotNull(event.getDebtRatio()); + Assertions.assertNotNull(event.getTotalAsset()); + Assertions.assertNotNull(event.getMarginCoefficientTotalAsset()); + Assertions.assertNotNull(event.getTotalDebt()); + Assertions.assertNotNull(event.getAssetList()); + Assertions.assertNotNull(event.getDebtList()); + Assertions.assertNotNull(event.getTimestamp()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testIsolatedMarginPosition() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.isolatedMarginPosition( + "ETH-USDT", + (__, ___, event) -> { + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/margin/PublicTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/margin/PublicTest.java new file mode 100644 index 00000000..576c2142 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/margin/PublicTest.java @@ -0,0 +1,112 @@ +package com.kucoin.universal.sdk.test.e2e.ws.margin; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.margin.marginpublic.MarginPublicWs; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import com.kucoin.universal.sdk.model.WebSocketClientOption; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CountDownLatch; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class PublicTest { + + private static MarginPublicWs api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + WebSocketClientOption webSocketClientOption = WebSocketClientOption.defaults(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(TransportOption.defaults()) + .websocketClientOption(webSocketClientOption) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getWsService().newMarginPublicWS(); + api.start(); + } + + @AfterAll + public static void tearDown() { + api.stop(); + } + + @Test + public void testIndexPrice() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.indexPrice( + new String[] {"ETH-USDT", "BTC-USDT"}, + (__, ___, event) -> { + Assertions.assertNotNull(event.getSymbol()); + Assertions.assertNotNull(event.getGranularity()); + Assertions.assertNotNull(event.getTimestamp()); + Assertions.assertNotNull(event.getValue()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testMarkPrice() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.markPrice( + new String[] {"ETH-USDT", "BTC-USDT"}, + (__, ___, event) -> { + Assertions.assertNotNull(event.getSymbol()); + Assertions.assertNotNull(event.getGranularity()); + Assertions.assertNotNull(event.getTimestamp()); + Assertions.assertNotNull(event.getValue()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/spot/PrivateTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/spot/PrivateTest.java new file mode 100644 index 00000000..7744bcf6 --- /dev/null +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/spot/PrivateTest.java @@ -0,0 +1,170 @@ +package com.kucoin.universal.sdk.test.e2e.ws.spot; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kucoin.universal.sdk.api.DefaultKucoinClient; +import com.kucoin.universal.sdk.api.KucoinClient; +import com.kucoin.universal.sdk.generate.spot.spotprivate.SpotPrivateWs; +import com.kucoin.universal.sdk.model.ClientOption; +import com.kucoin.universal.sdk.model.Constants; +import com.kucoin.universal.sdk.model.TransportOption; +import com.kucoin.universal.sdk.model.WebSocketClientOption; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CountDownLatch; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +@Slf4j +public class PrivateTest { + + private static SpotPrivateWs api; + + public static ObjectMapper mapper = new ObjectMapper(); + + @BeforeAll + public static void setUp() { + + String key = System.getenv("API_KEY"); + String secret = System.getenv("API_SECRET"); + String passphrase = System.getenv("API_PASSPHRASE"); + + WebSocketClientOption webSocketClientOption = WebSocketClientOption.defaults(); + + ClientOption clientOpt = + ClientOption.builder() + .key(key) + .secret(secret) + .passphrase(passphrase) + .spotEndpoint(Constants.GLOBAL_API_ENDPOINT) + .futuresEndpoint(Constants.GLOBAL_FUTURES_API_ENDPOINT) + .brokerEndpoint(Constants.GLOBAL_BROKER_API_ENDPOINT) + .transportOption(TransportOption.defaults()) + .websocketClientOption(webSocketClientOption) + .build(); + + KucoinClient kucoinClient = new DefaultKucoinClient(clientOpt); + api = kucoinClient.getWsService().newSpotPrivateWS(); + api.start(); + } + + @AfterAll + public static void tearDown() { + api.stop(); + } + + @Test + public void testAccount() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.account( + (__, ___, event) -> { + Assertions.assertNotNull(event.getAccountId()); + Assertions.assertNotNull(event.getAvailable()); + Assertions.assertNotNull(event.getAvailableChange()); + Assertions.assertNotNull(event.getCurrency()); + Assertions.assertNotNull(event.getHold()); + Assertions.assertNotNull(event.getHoldChange()); + Assertions.assertNotNull(event.getRelationContext()); + Assertions.assertNotNull(event.getRelationEvent()); + Assertions.assertNotNull(event.getRelationEventId()); + Assertions.assertNotNull(event.getTime()); + Assertions.assertNotNull(event.getTotal()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testOrderV1() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.orderV1( + (__, ___, event) -> { + log.info("event: {}", event.toString()); + Assertions.assertNotNull(event.getFilledSize()); + Assertions.assertNotNull(event.getOrderId()); + Assertions.assertNotNull(event.getOrderTime()); + Assertions.assertNotNull(event.getOrderType()); + Assertions.assertNotNull(event.getPrice()); + Assertions.assertNotNull(event.getSide()); + Assertions.assertNotNull(event.getSize()); + Assertions.assertNotNull(event.getStatus()); + Assertions.assertNotNull(event.getSymbol()); + Assertions.assertNotNull(event.getTs()); + Assertions.assertNotNull(event.getType()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testOrderV2() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.orderV2( + (__, ___, event) -> { + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + @Test + public void testStopOrder() { + CountDownLatch gotEvent = new CountDownLatch(1); + CompletableFuture.supplyAsync( + () -> + api.stopOrder( + (__, ___, event) -> { + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } +} diff --git a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/spot/PublicTest.java b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/spot/PublicTest.java index cbd56d96..9827642f 100644 --- a/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/spot/PublicTest.java +++ b/sdk/java/src/test/java/com/kucoin/universal/sdk/test/e2e/ws/spot/PublicTest.java @@ -54,15 +54,146 @@ public static void tearDown() { api.stop(); } + /** allTickers Get All Tickers /allTickers/market/ticker:all */ @Test - public void testKlines() throws Exception { + public void testAllTickers() { + CountDownLatch gotEvent = new CountDownLatch(10); + CompletableFuture.supplyAsync( + () -> + api.allTickers( + (__, ___, event) -> { + Assertions.assertNotNull(event.getBestAsk()); + Assertions.assertNotNull(event.getBestAskSize()); + Assertions.assertNotNull(event.getBestBid()); + Assertions.assertNotNull(event.getBestBidSize()); + Assertions.assertNotNull(event.getPrice()); + Assertions.assertNotNull(event.getSequence()); + Assertions.assertNotNull(event.getSize()); + Assertions.assertNotNull(event.getTime()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + /** + * TODO callAuctionInfo Get Call Auction Info + * /callAuctionInfo/callauction/callauctionData:_symbol_ + */ + @Test + public void testCallAuctionInfo() { + CountDownLatch gotEvent = new CountDownLatch(10); + CompletableFuture.supplyAsync( + () -> + api.callAuctionInfo( + "", + (__, ___, event) -> { + Assertions.assertNotNull(event.getSymbol()); + Assertions.assertNotNull(event.getEstimatedPrice()); + Assertions.assertNotNull(event.getEstimatedSize()); + Assertions.assertNotNull(event.getSellOrderRangeLowPrice()); + Assertions.assertNotNull(event.getSellOrderRangeHighPrice()); + Assertions.assertNotNull(event.getBuyOrderRangeLowPrice()); + Assertions.assertNotNull(event.getBuyOrderRangeHighPrice()); + Assertions.assertNotNull(event.getTime()); + log.info("event: {}", event.toString()); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + /** + * TODO callAuctionOrderbookLevel50 CallAuctionOrderbook - Level50 + * /callAuctionOrderbookLevel50/callauction/level2Depth50:_symbol_ + */ + @Test + public void testCallAuctionOrderbookLevel50() { + CountDownLatch gotEvent = new CountDownLatch(10); + CompletableFuture.supplyAsync( + () -> + api.callAuctionOrderbookLevel50( + "", + (__, ___, event) -> { + event.getAsks().forEach(item -> {}); + + event.getBids().forEach(item -> {}); + + Assertions.assertNotNull(event.getTimestamp()); + log.info("event: {}", event.toString()); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + /** klines Klines /klines/market/candles:_symbol___type_ */ + @Test + public void testKlines() { CountDownLatch gotEvent = new CountDownLatch(10); CompletableFuture.supplyAsync( () -> api.klines( "BTC-USDT", "1min", - (a, b, event) -> { + (__, ___, event) -> { + Assertions.assertNotNull(event.getSymbol()); + event.getCandles().forEach(item -> {}); + + Assertions.assertNotNull(event.getTime()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + /** marketSnapshot Market Snapshot /marketSnapshot/market/snapshot:_market_ */ + @Test + public void testMarketSnapshot() { + CountDownLatch gotEvent = new CountDownLatch(10); + CompletableFuture.supplyAsync( + () -> + api.marketSnapshot( + "BTC-USDT", + (__, ___, event) -> { + Assertions.assertNotNull(event.getSequence()); + Assertions.assertNotNull(event.getData()); log.info("event: {}", event.toString()); gotEvent.countDown(); })) @@ -79,14 +210,22 @@ public void testKlines() throws Exception { .join(); } + /** + * orderbookIncrement Orderbook - Increment /orderbookIncrement/market/level2:_symbol_,_symbol_ + */ @Test - public void testOrderbookIncrement() throws Exception { + public void testOrderbookIncrement() { CountDownLatch gotEvent = new CountDownLatch(10); CompletableFuture.supplyAsync( () -> api.orderbookIncrement( new String[] {"BTC-USDT", "ETH-USDT"}, - (a, b, event) -> { + (__, ___, event) -> { + Assertions.assertNotNull(event.getChanges()); + Assertions.assertNotNull(event.getSequenceEnd()); + Assertions.assertNotNull(event.getSequenceStart()); + Assertions.assertNotNull(event.getSymbol()); + Assertions.assertNotNull(event.getTime()); log.info("event: {}", event.toString()); gotEvent.countDown(); })) @@ -94,6 +233,7 @@ public void testOrderbookIncrement() throws Exception { id -> { try { gotEvent.await(); + } catch (InterruptedException e) { throw new RuntimeException(e); } @@ -103,14 +243,113 @@ public void testOrderbookIncrement() throws Exception { .join(); } + /** orderbookLevel1 Orderbook - Level1 /orderbookLevel1/spotMarket/level1:_symbol_,_symbol_ */ @Test - public void testMarketSnapshot() throws Exception { - CountDownLatch gotEvent = new CountDownLatch(1); + public void testOrderbookLevel1() { + CountDownLatch gotEvent = new CountDownLatch(10); + CompletableFuture.supplyAsync( + () -> + api.orderbookLevel1( + new String[] {"BTC-USDT", "ETH-USDT"}, + (__, ___, event) -> { + event.getAsks().forEach(item -> {}); + + event.getBids().forEach(item -> {}); + + Assertions.assertNotNull(event.getTimestamp()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + /** + * orderbookLevel50 Orderbook - Level50 + * /orderbookLevel50/spotMarket/level2Depth50:_symbol_,_symbol_ + */ + @Test + public void testOrderbookLevel50() { + CountDownLatch gotEvent = new CountDownLatch(10); + CompletableFuture.supplyAsync( + () -> + api.orderbookLevel50( + new String[] {"BTC-USDT", "ETH-USDT"}, + (__, ___, event) -> { + event.getAsks().forEach(item -> {}); + + event.getBids().forEach(item -> {}); + + Assertions.assertNotNull(event.getTimestamp()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + /** + * orderbookLevel5 Orderbook - Level5 /orderbookLevel5/spotMarket/level2Depth5:_symbol_,_symbol_ + */ + @Test + public void testOrderbookLevel5() { + CountDownLatch gotEvent = new CountDownLatch(10); + CompletableFuture.supplyAsync( + () -> + api.orderbookLevel5( + new String[] {"BTC-USDT", "ETH-USDT"}, + (__, ___, event) -> { + event.getAsks().forEach(item -> {}); + + event.getBids().forEach(item -> {}); + + Assertions.assertNotNull(event.getTimestamp()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + /** symbolSnapshot Symbol Snapshot /symbolSnapshot/market/snapshot:_symbol_ */ + @Test + public void testSymbolSnapshot() { + CountDownLatch gotEvent = new CountDownLatch(10); CompletableFuture.supplyAsync( () -> api.marketSnapshot( "BTC-USDT", - (a, b, event) -> { + (__, ___, event) -> { Assertions.assertNotNull(event.getSequence()); Assertions.assertNotNull(event.getData()); log.info("event: {}", event.toString()); @@ -120,6 +359,77 @@ public void testMarketSnapshot() throws Exception { id -> { try { gotEvent.await(); + + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + /** ticker Get Ticker /ticker/market/ticker:_symbol_,_symbol_ */ + @Test + public void testTicker() { + CountDownLatch gotEvent = new CountDownLatch(10); + CompletableFuture.supplyAsync( + () -> + api.ticker( + new String[] {"BTC-USDT", "ETH-USDT"}, + (__, ___, event) -> { + Assertions.assertNotNull(event.getSequence()); + Assertions.assertNotNull(event.getPrice()); + Assertions.assertNotNull(event.getSize()); + Assertions.assertNotNull(event.getBestAsk()); + Assertions.assertNotNull(event.getBestAskSize()); + Assertions.assertNotNull(event.getBestBid()); + Assertions.assertNotNull(event.getBestBidSize()); + Assertions.assertNotNull(event.getTime()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return id; + }) + .thenAccept(id -> api.unSubscribe(id)) + .join(); + } + + /** trade Trade /trade/market/match:_symbol_,_symbol_ */ + @Test + public void testTrade() { + CountDownLatch gotEvent = new CountDownLatch(10); + CompletableFuture.supplyAsync( + () -> + api.trade( + new String[] {"BTC-USDT", "ETH-USDT"}, + (__, ___, event) -> { + Assertions.assertNotNull(event.getMakerOrderId()); + Assertions.assertNotNull(event.getPrice()); + Assertions.assertNotNull(event.getSequence()); + Assertions.assertNotNull(event.getSide()); + Assertions.assertNotNull(event.getSize()); + Assertions.assertNotNull(event.getSymbol()); + Assertions.assertNotNull(event.getTakerOrderId()); + Assertions.assertNotNull(event.getTime()); + Assertions.assertNotNull(event.getTradeId()); + Assertions.assertNotNull(event.getType()); + log.info("event: {}", event.toString()); + gotEvent.countDown(); + })) + .thenApply( + id -> { + try { + gotEvent.await(); + } catch (InterruptedException e) { throw new RuntimeException(e); } From 5fc01e29beff86ef569a077f62edfe19c1865029 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Mon, 28 Jul 2025 10:57:49 +0800 Subject: [PATCH 35/39] feat(java): update SDK version to 0.1.0-alpha and add test scripts --- sdk/java/Dockerfile | 8 +- sdk/java/Makefile | 22 ++---- sdk/java/README.md | 7 +- sdk/java/example/pom.xml | 7 +- .../test/regression/RunServiceTest.java | 77 ++++++++++++++++++- sdk/java/pom.xml | 2 +- sdk/java/script/release_test.sh | 39 ++++++++++ sdk/java/script/run_forever_test.sh | 23 ++++++ sdk/java/script/ws_reconnect_test.sh | 23 ++++++ 9 files changed, 177 insertions(+), 31 deletions(-) create mode 100644 sdk/java/script/run_forever_test.sh create mode 100644 sdk/java/script/ws_reconnect_test.sh diff --git a/sdk/java/Dockerfile b/sdk/java/Dockerfile index 6490d473..0413b042 100644 --- a/sdk/java/Dockerfile +++ b/sdk/java/Dockerfile @@ -1,10 +1,4 @@ -FROM maven:3.9.10-amazoncorretto-17-debian-bookworm AS builder -WORKDIR /src -COPY . . -RUN --mount=type=cache,target=/root/.m2,sharing=locked mvn clean install -DskipTests - FROM maven:3.9.10-amazoncorretto-17-debian-bookworm WORKDIR /app COPY . /src -COPY script /app -COPY --from=builder /src/target/*.jar /tmp/ \ No newline at end of file +COPY script /app \ No newline at end of file diff --git a/sdk/java/Makefile b/sdk/java/Makefile index bdef1d2e..2ccf8938 100644 --- a/sdk/java/Makefile +++ b/sdk/java/Makefile @@ -19,6 +19,7 @@ before-release-test: build -e API_SECRET="$$API_SECRET" \ -e API_PASSPHRASE="$$API_PASSPHRASE" \ -e USE_LOCAL="true" \ + -v m2-cache:/root/.m2 \ java-sdk-image:latest \ bash /app/release_test.sh @@ -38,6 +39,8 @@ run-forever-test: build -e API_KEY="$$API_KEY" \ -e API_SECRET="$$API_SECRET" \ -e API_PASSPHRASE="$$API_PASSPHRASE" \ + -e USE_LOCAL="true" \ + -v m2-cache:/root/.m2 \ --name java-run-forever-test \ java-sdk-image:latest \ bash /app/run_forever_test.sh @@ -49,21 +52,8 @@ reconnect-test: build -e API_KEY="$$API_KEY" \ -e API_SECRET="$$API_SECRET" \ -e API_PASSPHRASE="$$API_PASSPHRASE" \ + -e USE_LOCAL="true" \ + -v m2-cache:/root/.m2 \ --name java-reconnect-test --network isolated_net \ java-sdk-image:latest \ - bash /app/ws_reconnect_test.sh - - -VERSIONS = 7.4 8.0 8.1 8.2 -.PHONY: java-version-test -java-version-test: - @for v in $(VERSIONS); do \ - echo "---- java $$v ----"; \ - docker build --build-arg java_RUNTIME=$$v -t java-sdk-image:$$v . ; \ - docker run --rm \ - -e API_KEY="$$API_KEY" \ - -e API_SECRET="$$API_SECRET" \ - -e API_PASSPHRASE="$$API_PASSPHRASE" \ - -e USE_LOCAL="true" \ - java-sdk-image:$$v bash /app/release_test.sh || exit $$? ; \ - done \ No newline at end of file + bash /app/ws_reconnect_test.sh \ No newline at end of file diff --git a/sdk/java/README.md b/sdk/java/README.md index 10c620f7..9f819e0e 100644 --- a/sdk/java/README.md +++ b/sdk/java/README.md @@ -16,7 +16,7 @@ For an overview of the project and SDKs in other languages, refer to the [Main R com.kucoin kucoin-universal-sdk - 0.1.0-SNAPSHOT + 0.1.0-alpha ``` @@ -116,10 +116,7 @@ This section provides specific considerations and recommendations for using the #### Client Features - **Advanced HTTP Handling**: - - Supports retries, keep-alive connections, and configurable concurrency limits for robust request execution. - - Supports both [Guzzle](https://github.com/guzzle/guzzle) and [Saber (Swoole)](https://github.com/swlib/saber) as underlying HTTP clients. - - Use `useCoroutineHttp=true` to enable high-performance coroutine HTTP requests (requires `ext-swoole` and `swlib/saber`). - + - Supports keep-alive connections, and configurable concurrency limits for robust request execution. - **Rich Response Details**: - Includes rate-limiting information and raw response data in API responses for better debugging and control. - **Public API Access**: diff --git a/sdk/java/example/pom.xml b/sdk/java/example/pom.xml index c8ead119..2185f4e1 100644 --- a/sdk/java/example/pom.xml +++ b/sdk/java/example/pom.xml @@ -18,7 +18,7 @@ com.kucoin kucoin-universal-sdk - 0.1.0-SNAPSHOT + 0.1.0-alpha org.projectlombok @@ -44,6 +44,11 @@ 5.13.2 compile + + org.junit.platform + junit-platform-launcher + 1.13.2 + diff --git a/sdk/java/example/src/main/java/com/kucoin/test/regression/RunServiceTest.java b/sdk/java/example/src/main/java/com/kucoin/test/regression/RunServiceTest.java index 801fea31..1d0a3963 100644 --- a/sdk/java/example/src/main/java/com/kucoin/test/regression/RunServiceTest.java +++ b/sdk/java/example/src/main/java/com/kucoin/test/regression/RunServiceTest.java @@ -19,9 +19,19 @@ import com.kucoin.universal.sdk.model.Constants; import com.kucoin.universal.sdk.model.RestResponse; import com.kucoin.universal.sdk.model.TransportOption; +import java.util.ArrayList; +import java.util.List; import java.util.UUID; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.junit.platform.engine.TestExecutionResult; +import org.junit.platform.engine.discovery.DiscoverySelectors; +import org.junit.platform.launcher.Launcher; +import org.junit.platform.launcher.LauncherDiscoveryRequest; +import org.junit.platform.launcher.TestExecutionListener; +import org.junit.platform.launcher.TestIdentifier; +import org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder; +import org.junit.platform.launcher.core.LauncherFactory; public class RunServiceTest { @@ -84,7 +94,7 @@ public void testMargin() { .size("0.001") .autoRepay(true) .autoBorrow(true) - .isIsolated(true) + .isIsolated(false) .build()); ok(add.getCommonResponse()); @@ -146,4 +156,69 @@ public void testFutures() { orderApi.cancelOrderById(CancelOrderByIdReq.builder().orderId(add.getOrderId()).build()); } + + public static void main(String[] args) { + LauncherDiscoveryRequest request = + LauncherDiscoveryRequestBuilder.request() + .selectors(DiscoverySelectors.selectClass(RunServiceTest.class)) + .build(); + + Launcher launcher = LauncherFactory.create(); + + class TestResult { + String displayName; + boolean success; + Throwable exception; + } + + List results = new ArrayList<>(); + int[] failedCount = {0}; + + TestExecutionListener listener = + new TestExecutionListener() { + @Override + public void executionFinished( + TestIdentifier testIdentifier, TestExecutionResult testExecutionResult) { + if (!testIdentifier.isTest()) return; + + TestResult result = new TestResult(); + result.displayName = testIdentifier.getDisplayName(); + + if (testExecutionResult.getStatus() == TestExecutionResult.Status.SUCCESSFUL) { + result.success = true; + } else { + result.success = false; + result.exception = testExecutionResult.getThrowable().orElse(null); + failedCount[0]++; + } + + results.add(result); + } + }; + + launcher.registerTestExecutionListeners(listener); + launcher.execute(request); + + System.out.println("\nTest Execution Summary:\n"); + + for (TestResult r : results) { + if (r.success) { + System.out.println(r.displayName + " - OK"); + } else { + System.out.println(r.displayName + " - FAILED"); + if (r.exception != null) { + System.out.println(" Exception: " + r.exception.toString()); + r.exception.printStackTrace(System.out); + } + } + } + + System.out.printf( + "\nTotal: %d, Passed: %d, Failed: %d%n", + results.size(), results.size() - failedCount[0], failedCount[0]); + + if (failedCount[0] > 0) { + System.exit(1); + } + } } diff --git a/sdk/java/pom.xml b/sdk/java/pom.xml index 8672ba02..1441055e 100644 --- a/sdk/java/pom.xml +++ b/sdk/java/pom.xml @@ -6,7 +6,7 @@ com.kucoin kucoin-universal-sdk - 0.1.0-SNAPSHOT + 0.1.0-alpha kucoin-universal-sdk https://www.kucoin.com diff --git a/sdk/java/script/release_test.sh b/sdk/java/script/release_test.sh index e69de29b..4a05fad1 100644 --- a/sdk/java/script/release_test.sh +++ b/sdk/java/script/release_test.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -e + + +if [[ "${USE_LOCAL,,}" == "true" ]]; then + cd /src + mvn clean install -DskipTests + echo "Local jars installed." +else + echo "USE_LOCAL is not true, skipping local jar installation." +fi + + +cd /src/example + +echo "Compiling project..." +mvn compile +if [ $? -ne 0 ]; then + echo "Build failed" + exit 1 +fi + +ls ./target + +CLASSES=( + "com.kucoin.example.ExampleAPI" + "com.kucoin.example.ExampleGetStarted" + "com.kucoin.example.ExampleSign" + "com.kucoin.example.ExampleWs" + "com.kucoin.test.regression.RunServiceTest" +) + +for class in "${CLASSES[@]}"; do + echo "Running $class..." + mvn exec:java -Dexec.mainClass="$class" + echo "Finished $class" +done + +echo "All classes executed successfully." \ No newline at end of file diff --git a/sdk/java/script/run_forever_test.sh b/sdk/java/script/run_forever_test.sh new file mode 100644 index 00000000..d4f53df7 --- /dev/null +++ b/sdk/java/script/run_forever_test.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -e + + +if [[ "${USE_LOCAL,,}" == "true" ]]; then + cd /src + mvn clean install -DskipTests + echo "Local jars installed." +else + echo "USE_LOCAL is not true, skipping local jar installation." +fi + + +cd /src/example + +echo "Compiling project..." +mvn compile +if [ $? -ne 0 ]; then + echo "Build failed" + exit 1 +fi + +mvn exec:java -Dexec.mainClass="com.kucoin.test.regression.RunForeverTest" diff --git a/sdk/java/script/ws_reconnect_test.sh b/sdk/java/script/ws_reconnect_test.sh new file mode 100644 index 00000000..c6d076de --- /dev/null +++ b/sdk/java/script/ws_reconnect_test.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -e + + +if [[ "${USE_LOCAL,,}" == "true" ]]; then + cd /src + mvn clean install -DskipTests + echo "Local jars installed." +else + echo "USE_LOCAL is not true, skipping local jar installation." +fi + + +cd /src/example + +echo "Compiling project..." +mvn compile +if [ $? -ne 0 ]; then + echo "Build failed" + exit 1 +fi + +mvn exec:java -Dexec.mainClass="com.kucoin.test.regression.RunReconnectTest" From 8d691f1dd0555a021c6fef2b2dbfffc236599b92 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Mon, 28 Jul 2025 16:35:32 +0800 Subject: [PATCH 36/39] feat(java): release Java implementation 0.1.0-alpha and update WebSocket service documentation --- CHANGELOG.md | 3 ++ README.md | 21 ++++++---- .../main/resources/java-sdk/api_ws.mustache | 11 ++++- sdk/java/CHANGELOG.md | 3 ++ .../sdk/api/DefaultKucoinClient.java | 40 ++++++++++++++++++- .../universal/sdk/api/KucoinRestService.java | 6 +++ .../universal/sdk/generate/Version.java | 2 +- .../futuresprivate/FuturesPrivateWs.java | 15 ++++++- .../futurespublic/FuturesPublicWs.java | 15 ++++++- .../margin/marginprivate/MarginPrivateWs.java | 15 ++++++- .../margin/marginpublic/MarginPublicWs.java | 15 ++++++- .../spot/spotprivate/SpotPrivateWs.java | 15 ++++++- .../spot/spotpublic/SpotPublicWs.java | 15 ++++++- .../infra/DefaultWebsocketTransport.java | 17 ++++---- .../rest/DefaultKucoinRestAPIImpl.java | 9 ++++- 15 files changed, 169 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5596a2a..5b91b4e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ API documentation [Changelog](https://www.kucoin.com/docs-new/change-log) Current synchronized API documentation version [20250529](https://www.kucoin.com/docs-new/change-log#20250529) +## 2025-07-30(Java 0.1.0-alpha) +- Release Java implementation + ## 2025-06-11(1.3.0) - Update the latest APIs, documentation, etc - Introduced a new testing framework for all SDKs diff --git a/README.md b/README.md index 16eb8b23..d810bd09 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,16 @@ npm install kucoin-universal-sdk composer require kucoin/kucoin-universal-sdk=0.1.2-alpha ``` +### Java Installation(0.1.0-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. +```bash + + com.kucoin + kucoin-universal-sdk + 0.1.0-alpha + +``` + ### Postman Installation Visit the [KuCoin API Collection on Postman](https://www.postman.com/kucoin-api/kucoin-api/overview) @@ -137,6 +147,7 @@ For other languages, refer to the [Examples](#-examples) section. - **[Go Documentation](sdk/golang/README.md)** - **[Node.js Documentation](sdk/node/README.md)** - **[PHP Documentation](sdk/php/README.md)** +- **[Java Documentation](sdk/java/README.md)** - **[Postman Documentation](sdk/postman/README.md)** ## 📂 Examples @@ -147,7 +158,8 @@ Find usage examples for your desired language by selecting the corresponding lin | Python | [sdk/python/examples/](sdk/python/example/)| | Go | [sdk/go/examples/](sdk/golang/example/) | | Node.js | [sdk/node/examples/](sdk/node/example/) | -| PHP | [sdk/php/examples/](sdk/php/example/) | +| PHP | [sdk/php/examples/](sdk/php/example/) | +| Java | [sdk/java/examples/](sdk/java/example/) | ## 📋 Changelog @@ -236,12 +248,7 @@ Before you begin, ensure the following dependencies are installed: 5. **Run Tests** Run automatically generated tests for all SDKs. - Command: `make test` - -6. **Run All Steps** - Execute the entire pipeline: build tools, preprocess specifications, validate, and generate code. - Command: `make all` - + Command: `make auto-test` ## 🤝 Contribution Guidelines diff --git a/generator/plugin/src/main/resources/java-sdk/api_ws.mustache b/generator/plugin/src/main/resources/java-sdk/api_ws.mustache index 6f31278d..847a43ef 100644 --- a/generator/plugin/src/main/resources/java-sdk/api_ws.mustache +++ b/generator/plugin/src/main/resources/java-sdk/api_ws.mustache @@ -20,12 +20,19 @@ public interface {{classname}} { void unSubscribe(String id); /** - * Start websocket + * Initiates the WebSocket service + * + *

This method must be called before subscribing to any topics. */ void start(); /** - * Stop websocket + * Stops the WebSocket service. + * + *

This method is used to terminate the WebSocket connection and stop all ongoing + * subscriptions. It should be called when no further communication is needed with + * the server, or when the application is being shut down to ensure a clean + * disconnection and release of resources. */ void stop(); {{/operations}} diff --git a/sdk/java/CHANGELOG.md b/sdk/java/CHANGELOG.md index f5596a2a..5b91b4e3 100644 --- a/sdk/java/CHANGELOG.md +++ b/sdk/java/CHANGELOG.md @@ -4,6 +4,9 @@ API documentation [Changelog](https://www.kucoin.com/docs-new/change-log) Current synchronized API documentation version [20250529](https://www.kucoin.com/docs-new/change-log#20250529) +## 2025-07-30(Java 0.1.0-alpha) +- Release Java implementation + ## 2025-06-11(1.3.0) - Update the latest APIs, documentation, etc - Introduced a new testing framework for all SDKs diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultKucoinClient.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultKucoinClient.java index 1135489e..1d424ba1 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultKucoinClient.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/DefaultKucoinClient.java @@ -6,7 +6,45 @@ /* Client -TODO +### REST API Notes + +#### Client Features +- **Advanced HTTP Handling**: + - Supports keep-alive connections, and configurable concurrency limits for robust request execution. +- **Rich Response Details**: + - Includes rate-limiting information and raw response data in API responses for better debugging and control. +- **Public API Access**: + - For public endpoints, API keys are not required, simplifying integration for non-authenticated use cases. + +--- + +### WebSocket API Notes + +#### Client Features +- **Flexible Service Creation**: + - Supports creating services for public/private channels in Spot, Futures, or Margin trading as needed. + - Multiple services can be created independently. +- **Service Lifecycle**: + - If a service is closed, create a new service instead of reusing it to avoid undefined behavior. +- **Connection-to-Channel Mapping**: + - Each WebSocket connection corresponds to a specific channel type. For example: + - Spot public/private and Futures public/private services require 4 active WebSocket connections. + +#### Threading and Callbacks +- **Thread Model**: + - WebSocket services follow a simple thread model, ensuring callbacks are handled on a single thread. +- **Subscription Management**: + - A subscription is considered successful only after receiving an acknowledgment (ACK) from the server. + - Each subscription has a unique ID, which can be used for unsubscribe. + +#### Data and Message Handling +- **Framework-Managed Threads**: + - Data messages are handled by a single framework-managed thread, ensuring orderly processing. +- **Duplicate Subscriptions**: + - Avoid overlapping subscription parameters. For example: + - Subscribing to `["BTC-USDT", "ETH-USDT"]` and then to `["ETH-USDT", "DOGE-USDT"]` may result in undefined behavior. + - Identical subscriptions will raise an error for duplicate subscriptions. + */ /** DefaultClient provides the default implementation of the {@link KucoinClient} interface. */ diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/api/KucoinRestService.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/KucoinRestService.java index 8ba387d7..4f2788b6 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/api/KucoinRestService.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/api/KucoinRestService.java @@ -77,4 +77,10 @@ public interface KucoinRestService { * @return VIPLendingService */ VIPLendingService getVipLendingService(); + + /** + * Closes the service and releases any resources held by the KucoinRestService. This method should + * be called when the service is no longer needed to ensure proper cleanup. + */ + void closeService(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java index 702bc60c..17bd8d8f 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java @@ -2,5 +2,5 @@ public class Version { public static final String SDK_VERSION = "0.1.0-alpha"; - public static final String SDK_GENERATE_DATE = "2025-07-24"; + public static final String SDK_GENERATE_DATE = "2025-07-28"; } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWs.java index 1c1a017b..8a16f28b 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWs.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futuresprivate/FuturesPrivateWs.java @@ -80,9 +80,20 @@ public interface FuturesPrivateWs { /** Unsubscribe from topics */ void unSubscribe(String id); - /** Start websocket */ + /** + * Initiates the WebSocket service + * + *

This method must be called before subscribing to any topics. + */ void start(); - /** Stop websocket */ + /** + * Stops the WebSocket service. + * + *

This method is used to terminate the WebSocket connection and stop all ongoing + * subscriptions. It should be called when no further communication is needed with the server, or + * when the application is being shut down to ensure a clean disconnection and release of + * resources. + */ void stop(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWs.java index cfd02a51..958b7531 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWs.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/futures/futurespublic/FuturesPublicWs.java @@ -104,9 +104,20 @@ public interface FuturesPublicWs { /** Unsubscribe from topics */ void unSubscribe(String id); - /** Start websocket */ + /** + * Initiates the WebSocket service + * + *

This method must be called before subscribing to any topics. + */ void start(); - /** Stop websocket */ + /** + * Stops the WebSocket service. + * + *

This method is used to terminate the WebSocket connection and stop all ongoing + * subscriptions. It should be called when no further communication is needed with the server, or + * when the application is being shut down to ensure a clean disconnection and release of + * resources. + */ void stop(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWs.java index 7382b77b..d246bd21 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWs.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginprivate/MarginPrivateWs.java @@ -27,9 +27,20 @@ public interface MarginPrivateWs { /** Unsubscribe from topics */ void unSubscribe(String id); - /** Start websocket */ + /** + * Initiates the WebSocket service + * + *

This method must be called before subscribing to any topics. + */ void start(); - /** Stop websocket */ + /** + * Stops the WebSocket service. + * + *

This method is used to terminate the WebSocket connection and stop all ongoing + * subscriptions. It should be called when no further communication is needed with the server, or + * when the application is being shut down to ensure a clean disconnection and release of + * resources. + */ void stop(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWs.java index cc1316ee..86e838d8 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWs.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/margin/marginpublic/MarginPublicWs.java @@ -27,9 +27,20 @@ public interface MarginPublicWs { /** Unsubscribe from topics */ void unSubscribe(String id); - /** Start websocket */ + /** + * Initiates the WebSocket service + * + *

This method must be called before subscribing to any topics. + */ void start(); - /** Stop websocket */ + /** + * Stops the WebSocket service. + * + *

This method is used to terminate the WebSocket connection and stop all ongoing + * subscriptions. It should be called when no further communication is needed with the server, or + * when the application is being shut down to ensure a clean disconnection and release of + * resources. + */ void stop(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWs.java index 4d84837a..c87296fe 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWs.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotprivate/SpotPrivateWs.java @@ -45,9 +45,20 @@ public interface SpotPrivateWs { /** Unsubscribe from topics */ void unSubscribe(String id); - /** Start websocket */ + /** + * Initiates the WebSocket service + * + *

This method must be called before subscribing to any topics. + */ void start(); - /** Stop websocket */ + /** + * Stops the WebSocket service. + * + *

This method is used to terminate the WebSocket connection and stop all ongoing + * subscriptions. It should be called when no further communication is needed with the server, or + * when the application is being shut down to ensure a clean disconnection and release of + * resources. + */ void stop(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWs.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWs.java index c6a12740..f5821381 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWs.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/spot/spotpublic/SpotPublicWs.java @@ -122,9 +122,20 @@ String callAuctionOrderbookLevel50( /** Unsubscribe from topics */ void unSubscribe(String id); - /** Start websocket */ + /** + * Initiates the WebSocket service + * + *

This method must be called before subscribing to any topics. + */ void start(); - /** Stop websocket */ + /** + * Stops the WebSocket service. + * + *

This method is used to terminate the WebSocket connection and stop all ongoing + * subscriptions. It should be called when no further communication is needed with the server, or + * when the application is being shut down to ensure a clean disconnection and release of + * resources. + */ void stop(); } diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java index cb96c37e..1eb161b5 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/DefaultWebsocketTransport.java @@ -83,6 +83,8 @@ public void start() { public void stop() { shutting.set(true); safeClose("shutdown"); + http.connectionPool().evictAll(); + http.dispatcher().executorService().shutdown(); scheduler.shutdownNow(); tokenProvider.close(); log.info("websocket closed"); @@ -101,7 +103,7 @@ public CompletableFuture write(WsMessage m, Duration timeout) { try { boolean queued = socket.send(mapper.writeValueAsString(m)); if (!queued) { - throw new IllegalStateException("OkHttp buffer full"); + throw new IllegalStateException("enqueue message failed"); } } catch (Exception e) { ackMap.remove(m.getId()); @@ -151,10 +153,6 @@ public void onClosed(WebSocket w, int c, String r) { @Override public void onFailure(WebSocket w, Throwable t, Response r) { - if (!shutting.get()) { - log.error("websocket emits error events", t); - return; - } tryReconnect(t.getMessage()); } }); @@ -237,11 +235,10 @@ private void schedulePing() { } private void tryReconnect(String reason) { + log.error("Websocket disconnected due to {}, Reconnection...", reason); if (shutting.get()) { return; } - log.info("Websocket disconnected due to {}, Reconnection...", reason); - safeClose(reason); if (!opt.isReconnect()) { log.warn("Reconnect failed: auto-reconnect is disabled"); @@ -253,6 +250,8 @@ private void tryReconnect(String reason) { return; } + safeClose("reconnect"); + Thread reconnectThread = new Thread( () -> { @@ -303,6 +302,7 @@ private void tryReconnect(String reason) { private void safeClose(String reason) { try { + log.info("Safe close resource for reason: {}", reason); listener.onEvent(WebSocketEvent.DISCONNECTED, ""); ackMap .values() @@ -312,8 +312,7 @@ private void safeClose(String reason) { if (socket != null) { socket.close(1000, reason); socket.cancel(); - http.connectionPool().evictAll(); - http.dispatcher().executorService().shutdown(); + socket = null; } } catch (Exception e) { log.error("exception when safe close", e); diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/rest/DefaultKucoinRestAPIImpl.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/rest/DefaultKucoinRestAPIImpl.java index f51a1b60..9078aea6 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/rest/DefaultKucoinRestAPIImpl.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/rest/DefaultKucoinRestAPIImpl.java @@ -21,6 +21,7 @@ import com.kucoin.universal.sdk.generate.service.VIPLendingService; import com.kucoin.universal.sdk.generate.service.VIPLendingServiceImpl; import com.kucoin.universal.sdk.internal.infra.DefaultTransport; +import com.kucoin.universal.sdk.internal.interfaces.Transport; import com.kucoin.universal.sdk.model.ClientOption; import lombok.extern.slf4j.Slf4j; @@ -40,12 +41,13 @@ public final class DefaultKucoinRestAPIImpl implements KucoinRestService { private final MarginService marginService; private final SpotService spotService; private final VIPLendingService vipLendingService; + private final Transport transport; public DefaultKucoinRestAPIImpl(ClientOption option) { if (option.getTransportOption() == null) { throw new RuntimeException("no transport option provided"); } - DefaultTransport transport = new DefaultTransport(option, Version.SDK_VERSION); + transport = new DefaultTransport(option, Version.SDK_VERSION); this.accountService = new AccountServiceImpl(transport); this.affiliateService = new AffiliateServiceImpl(transport); @@ -104,4 +106,9 @@ public SpotService getSpotService() { public VIPLendingService getVipLendingService() { return vipLendingService; } + + @Override + public void closeService() { + transport.close(); + } } From f765c226d55723ed5c74b5a6f67083045f571cf3 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Tue, 29 Jul 2025 14:39:45 +0800 Subject: [PATCH 37/39] feat(java): add check for empty apiSecret and update nullSafe method --- .../com/kucoin/universal/sdk/internal/infra/KcSigner.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/KcSigner.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/KcSigner.java index 5c878eb3..b19965de 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/KcSigner.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/internal/infra/KcSigner.java @@ -68,7 +68,11 @@ private static String ts() { /** Headers for normal signed request. */ public Map headers(String plain) { String timestamp = ts(); - String sig = sign(timestamp + plain, apiSecret); + + String sig = ""; + if (!apiSecret.isEmpty()) { + sig = sign(timestamp + plain, apiSecret); + } Map h = new HashMap<>(); h.put("KC-API-KEY", apiKey); @@ -104,6 +108,6 @@ public Map brokerHeaders(String plain) { } private static String nullSafe(String s) { - return s == null ? "" : s.trim(); + return s == null ? "" : s; } } From 162c760e16cabbd1867f3e77d0a974b1e1abb7ef Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Tue, 29 Jul 2025 15:41:20 +0800 Subject: [PATCH 38/39] feat(java): add Maven Central deployment configuration and GitHub Actions workflow --- .github/workflows/upload-java-sdk-package.yml | 36 +++++++++++++ sdk/java/pom.xml | 50 +++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 .github/workflows/upload-java-sdk-package.yml diff --git a/.github/workflows/upload-java-sdk-package.yml b/.github/workflows/upload-java-sdk-package.yml new file mode 100644 index 00000000..7b153b68 --- /dev/null +++ b/.github/workflows/upload-java-sdk-package.yml @@ -0,0 +1,36 @@ +name: Publish Java Package to Maven Central + +on: + workflow_dispatch: + +permissions: + contents: read + packages: write + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'temurin' + cache: 'maven' + server-id: ossrh + server-username: OSSRH_USERNAME + server-password: OSSRH_PASSWORD + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + + - name: Publish to Apache Maven Central + run: mvn deploy -DskipTest + working-directory: sdk/java + env: + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} \ No newline at end of file diff --git a/sdk/java/pom.xml b/sdk/java/pom.xml index 1441055e..357654bd 100644 --- a/sdk/java/pom.xml +++ b/sdk/java/pom.xml @@ -143,7 +143,57 @@ + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + ossrh + https://s01.oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.7 + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + + maven_central + Maven Central + https://repo.maven.apache.org/maven2/ + + + + + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + \ No newline at end of file From 1c82c5e8cf73d812275ac38d5d64bdba36475925 Mon Sep 17 00:00:00 2001 From: "Isaac.Tang" Date: Tue, 29 Jul 2025 16:01:43 +0800 Subject: [PATCH 39/39] feat(doc): Update docs --- Makefile | 10 +++++----- sdk/java/CHANGELOG.md | 3 +++ .../com/kucoin/universal/sdk/generate/Version.java | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 8f978372..67c53cdb 100644 --- a/Makefile +++ b/Makefile @@ -88,11 +88,11 @@ endef .PHONY: generate 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) -# $(call generate-code,php,/src/Generate,0.1.2-alpha) + $(call generate-postman) + $(call generate-code,golang,/pkg/generate) + $(call generate-code,python,/kucoin_universal_sdk/generate) + $(call generate-code,node,/src/generate) + $(call generate-code,php,/src/Generate,0.1.3-alpha) $(call generate-code,java,/src/main/java/com/kucoin/universal/sdk/generate,0.1.0-alpha) .PHONY: gen-postman diff --git a/sdk/java/CHANGELOG.md b/sdk/java/CHANGELOG.md index 5b91b4e3..bcd44d28 100644 --- a/sdk/java/CHANGELOG.md +++ b/sdk/java/CHANGELOG.md @@ -7,6 +7,9 @@ Current synchronized API documentation version [20250529](https://www.kucoin.com ## 2025-07-30(Java 0.1.0-alpha) - Release Java implementation +## 2025-06-11(PHP 0.1.3-alpha) +- Add compatibility for PHP versions from 7.4 to 8.x + ## 2025-06-11(1.3.0) - Update the latest APIs, documentation, etc - Introduced a new testing framework for all SDKs diff --git a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java index 17bd8d8f..6ce7364a 100644 --- a/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java +++ b/sdk/java/src/main/java/com/kucoin/universal/sdk/generate/Version.java @@ -2,5 +2,5 @@ public class Version { public static final String SDK_VERSION = "0.1.0-alpha"; - public static final String SDK_GENERATE_DATE = "2025-07-28"; + public static final String SDK_GENERATE_DATE = "2025-07-29"; }