Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

## 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.
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,8 @@ When making changes to the version of the SDK, ensure the following files are up
```bash
pip install kucoin-universal-sdk==1.0.1
```

4. **CHANGELOG File**
- Add release notes to the CHANGELOG

Ensure all version updates are consistent across these files before committing changes.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 KuCoin
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
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ define generate-code
@echo "$(GREEN)lang: $(lang), clean...$(NC)"
docker run --rm -v "${PWD}:/local" $(IMAGE_NAME):$(IMAGE_TAG) rm -rf $(outdir)

@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)

@echo "$(GREEN)lang: $(lang), clean...$(NC)"
Expand All @@ -75,6 +78,7 @@ define generate-code
endef

define generate-postman
docker run --rm -v "${PWD}:/local" $(IMAGE_NAME):$(IMAGE_TAG) cp /local/CHANGELOG.md /local/sdk/postman
@make -f generate.mk generate-postman
endef

Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The **KuCoin Universal SDK** is the official SDK provided by KuCoin, offering a

## 🛠️ Installation

### Latest Version: `1.0.0`
### Latest Version: `1.1.0`

### Python Installation

Expand Down Expand Up @@ -134,6 +134,9 @@ 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/) |

## 📋 Changelog

For a detailed list of changes, see the [Changelog](./CHANGELOG.md).

## 🏗️ Technical Design

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.0
v1.1.0
8 changes: 5 additions & 3 deletions generator/preprocessor/api_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


class ApiMetaUtil:

doc_id = []

@staticmethod
Expand Down Expand Up @@ -43,7 +42,7 @@ def group_api(api_collection, entry) -> dict:
raise Exception("illegal customApiFields" + api_name)

x_fields = {
'x-api-doc' : api_doc,
'x-api-doc': api_doc,
}
for k in api_fields:
x_fields[f'x-{k}'] = api_fields[k]
Expand Down Expand Up @@ -256,7 +255,7 @@ def generate_path_operation(api):
result = {
'name': query_para['name'],
'in': 'query',
'description': ApiMetaUtil.escape_url(query_para['description'], ApiMetaUtil.doc_id),
'description': ApiMetaUtil.escape_url(query_para['description'], ApiMetaUtil.doc_id),
'required': query_para['required'],
'schema': schema,
}
Expand Down Expand Up @@ -361,8 +360,11 @@ def generator_openapi(service, api_collection, entry):
paths = {}
schemas = {}

api_idx = 0
for api in api_collection:
api_idx = api_idx + 1
path_operation = ApiMetaUtil.generate_path_operation(api)
path_operation['operationId'] = "{:03d}".format(api_idx)
method = api['api']['method']
path = api['api']['path']

Expand Down
10 changes: 10 additions & 0 deletions sdk/golang/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

## 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.
2 changes: 1 addition & 1 deletion sdk/golang/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 KuCoin
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
Expand Down
5 changes: 4 additions & 1 deletion sdk/golang/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ For an overview of the project and SDKs in other languages, refer to the [Main R

## 📦 Installation

### Latest Version: `1.0.0`
### Latest Version: `1.1.0`
Install the Golang SDK using `go get`:

```bash
Expand Down Expand Up @@ -88,6 +88,9 @@ Official Documentation: [KuCoin API Docs](https://www.kucoin.com/docs-new)

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

Expand Down
38 changes: 22 additions & 16 deletions sdk/golang/internal/rest/default_rest_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import (
)

type KuCoinDefaultRestImpl struct {
accountService service.AccountService
affiliateService service.AffiliateService
brokerService service.BrokerService
earnService service.EarnService
futuresService service.FuturesService
marginService service.MarginService
spotService service.SpotService
vipLendingService service.ViplendingService
accountService service.AccountService
affiliateService service.AffiliateService
brokerService service.BrokerService
copytradingService service.CopytradingService
earnService service.EarnService
futuresService service.FuturesService
marginService service.MarginService
spotService service.SpotService
vipLendingService service.ViplendingService
}

func NewKuCoinDefaultRestImpl(op *types.ClientOption) *KuCoinDefaultRestImpl {
Expand All @@ -29,14 +30,15 @@ func NewKuCoinDefaultRestImpl(op *types.ClientOption) *KuCoinDefaultRestImpl {
transport := infra.NewDefaultTransport(op, generate.SdkVersion)

return &KuCoinDefaultRestImpl{
accountService: service.NewAccountService(transport),
affiliateService: service.NewAffiliateService(transport),
brokerService: service.NewBrokerService(transport),
earnService: service.NewEarnService(transport),
futuresService: service.NewFuturesService(transport),
marginService: service.NewMarginService(transport),
spotService: service.NewSpotService(transport),
vipLendingService: service.NewViplendingService(transport),
accountService: service.NewAccountService(transport),
affiliateService: service.NewAffiliateService(transport),
brokerService: service.NewBrokerService(transport),
copytradingService: service.NewCopytradingService(transport),
earnService: service.NewEarnService(transport),
futuresService: service.NewFuturesService(transport),
marginService: service.NewMarginService(transport),
spotService: service.NewSpotService(transport),
vipLendingService: service.NewViplendingService(transport),
}
}

Expand All @@ -52,6 +54,10 @@ func (impl *KuCoinDefaultRestImpl) GetBrokerService() service.BrokerService {
return impl.brokerService
}

func (impl *KuCoinDefaultRestImpl) GetCopytradingService() service.CopytradingService {
return impl.copytradingService
}

func (impl *KuCoinDefaultRestImpl) GetEarnService() service.EarnService {
return impl.earnService
}
Expand Down
4 changes: 4 additions & 0 deletions sdk/golang/pkg/api/api_rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ type KucoinRestService interface {
// BrokerService provides functions to access and manage broker-related data.
GetBrokerService() service.BrokerService

// GetCopytradingService
// Provides functions to access and manage copy trading-related data
GetCopytradingService() service.CopytradingService

// GetEarnService
// EarnService provides functions to access and manage earn-related data.
GetEarnService() service.EarnService
Expand Down
Loading
Loading