Skip to content

Commit 8b37a7d

Browse files
authored
Merge pull request #47 from Kucoin/dev
Go(mapping number type to float64)
2 parents 03e1e8b + cbe9e18 commit 8b37a7d

File tree

64 files changed

+454
-437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+454
-437
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ API documentation [Changelog](https://www.kucoin.com/docs-new/change-log)
44

55
Current synchronized API documentation version [20250313](https://www.kucoin.com/docs-new/change-log#20250313)
66

7+
## 2025-05-27(GO 1.2.1)
8+
- Fix the Golang type mapping: map OpenAPI number type to float64 to prevent overflow
9+
710
## 2025-05-26(PHP 0.1.0-alpha)
811
- Release PHP implementation
912

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ $(SUBDIRS):
9999
.PHONY: generate
100100
generate: setup-logs
101101
$(call generate-postman)
102-
$(call generate-code,golang,/pkg/generate)
102+
$(call generate-code,golang,/pkg/generate,1.2.1)
103103
$(call generate-code,python,/kucoin_universal_sdk/generate)
104104
$(call generate-code,node,/src/generate)
105105
$(call generate-code,php,/src/Generate,0.1.0-alpha)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The **KuCoin Universal SDK** is the official SDK provided by KuCoin, offering a
4040
pip install kucoin-universal-sdk
4141
```
4242

43-
### Golang Installation
43+
### Golang Installation(1.2.1)
4444

4545
```bash
4646
go get github.com/Kucoin/kucoin-universal-sdk/sdk/golang
@@ -55,7 +55,7 @@ npm install kucoin-universal-sdk
5555
### PHP Installation(0.1.0-alpha)
5656
**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.
5757
```bash
58-
composer require kucoin/kucoin-universal-sdk
58+
composer require kucoin/kucoin-universal-sdk=0.1.0-alpha
5959
```
6060

6161
### Postman Installation

generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/GolangSdkGenerator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public GolangSdkGenerator() {
5757
super();
5858
cliOptions.add(ModeSwitch.option);
5959
typeMapping.put("bigint", "int64");
60+
typeMapping.put("number", "float64");
6061
}
6162

6263
@Override

sdk/golang/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ API documentation [Changelog](https://www.kucoin.com/docs-new/change-log)
44

55
Current synchronized API documentation version [20250313](https://www.kucoin.com/docs-new/change-log#20250313)
66

7+
## 2025-05-27(GO 1.2.1)
8+
- Fix the Golang type mapping: map OpenAPI number type to float64 to prevent overflow
9+
10+
## 2025-05-26(PHP 0.1.0-alpha)
11+
- Release PHP implementation
12+
13+
## 2025-04-04(Python 1.2.1.post1)
14+
- Bug Fixes
15+
16+
## 2025-03-31(Python 1.2.1)
17+
- Optimize WebSocket reconnection logic
18+
719
## 2025-03-21(1.2.0)
820
- Update the latest APIs, documentation, etc
921
- Remove range validation in Python

sdk/golang/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ For an overview of the project and SDKs in other languages, refer to the [Main R
99

1010
## 📦 Installation
1111

12-
### Latest Version: `1.2.0`
12+
### Latest Version: `1.2.1`
1313
Install the Golang SDK using `go get`:
1414

1515
```bash

sdk/golang/internal/infra/default_ws_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ func (c *WebSocketClient) readMessages() {
249249

250250
if err := c.conn.ReadJSON(m); err != nil {
251251
logger.GetLogger().Errorf("websocket connection got error: %v", err)
252-
if !websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway, websocket.CloseAbnormalClosure) {
252+
if !websocket.IsUnexpectedCloseError(err, websocket.CloseNormalClosure, websocket.CloseGoingAway, websocket.CloseAbnormalClosure) {
253253
c.disconnectEvent <- struct{}{}
254254
return
255255
}

sdk/golang/pkg/generate/account/account/types_get_futures_account_resp.go

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/golang/pkg/generate/account/account/types_get_futures_ledger_data_list.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/golang/pkg/generate/account/subaccount/types_get_futures_sub_account_list_v2_accounts.go

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)