Skip to content

Commit 0ebb95e

Browse files
authored
Merge pull request #55 from Kucoin/release/2025.07.01
Release/2025.07.01
2 parents a65defc + 1bbb549 commit 0ebb95e

Some content is hidden

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

46 files changed

+1909
-115
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 [20250529](https://www.kucoin.com/docs-new/change-log#20250529)
66

7+
## 2025-06-11(PHP 0.1.3-alpha)
8+
- Add compatibility for PHP versions from 7.4 to 8.x
9+
710
## 2025-06-11(1.3.0)
811
- Update the latest APIs, documentation, etc
912
- Introduced a new testing framework for all SDKs

Makefile

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,6 @@ define generate-postman
8282
@make -f generate.mk generate-postman
8383
endef
8484

85-
86-
SUBDIRS := $(shell find ./sdk -mindepth 1 -maxdepth 1 -type d)
87-
.PHONY: test $(SUBDIRS)
88-
test: $(SUBDIRS)
89-
$(SUBDIRS):
90-
@echo "Running tests in $@"
91-
@docker run --rm \
92-
-v venv-test-cache:/app/.venv-test \
93-
-v go-mod-cache:/go/pkg/mod \
94-
-v go-build-cache:/root/.cache/go-build \
95-
-v ./$@:/app -w /app $(IMAGE_NAME):$(IMAGE_TAG) \
96-
bash run_test.sh
97-
@echo "Completed tests in $@"
98-
9985
.PHONY: generate
10086
generate: setup-logs
10187
$(call generate-postman)
@@ -114,4 +100,14 @@ fastgen: build-tools preprocessor
114100

115101
.PHONY: all
116102
all: build-tools preprocessor validate
117-
@make generate
103+
@make generate
104+
105+
SUBDIRS := $(shell find ./sdk -mindepth 1 -maxdepth 1 -type d | sort)
106+
STAGES := auto-test before-release-test after-release-test run-forever-test reconnect-test
107+
.PHONY: $(STAGES)
108+
$(STAGES):
109+
@for dir in $(SUBDIRS); do \
110+
echo "Running $@ in $$dir"; \
111+
$(MAKE) -C $$dir $@; \
112+
echo "Completed $@ in $$dir"; \
113+
done

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ go mod tidy
5252
npm install kucoin-universal-sdk
5353
```
5454

55-
### PHP Installation(0.1.2-alpha)
55+
### PHP Installation(0.1.3-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=0.1.2-alpha
58+
composer require kucoin/kucoin-universal-sdk=0.1.3-alpha
5959
```
6060

6161
### Postman Installation

sdk/golang/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM golang:1.23
2+
3+
WORKDIR /app
4+
RUN apt-get update && apt-get install -y bash
5+
COPY . /src
6+
COPY script/* /app/
7+
COPY example/* /app/

sdk/golang/Makefile

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
.PHONY: build
2+
build:
3+
docker build -t golang-sdk-image:latest -f Dockerfile .
4+
5+
.PHONY: auto-test
6+
auto-test: build
7+
docker run --rm golang-sdk-image:latest bash /app/auto_test.sh
8+
9+
.PHONY: before-release-test
10+
before-release-test: build
11+
docker run --rm \
12+
-e API_KEY="$$API_KEY" \
13+
-e API_SECRET="$$API_SECRET" \
14+
-e API_PASSPHRASE="$$API_PASSPHRASE" \
15+
-e USE_LOCAL="true" \
16+
golang-sdk-image:latest \
17+
bash /app/release_test.sh
18+
19+
.PHONY: after-release-test
20+
after-release-test: build
21+
docker run --rm \
22+
-e API_KEY="$$API_KEY" \
23+
-e API_SECRET="$$API_SECRET" \
24+
-e API_PASSPHRASE="$$API_PASSPHRASE" \
25+
golang-sdk-image:latest \
26+
bash /app/release_test.sh
27+
28+
.PHONY: run-forever-test
29+
run-forever-test: build
30+
docker rm -f golang-run-forever-test || true
31+
docker run -idt \
32+
-e API_KEY="$$API_KEY" \
33+
-e API_SECRET="$$API_SECRET" \
34+
-e API_PASSPHRASE="$$API_PASSPHRASE" \
35+
--name golang-run-forever-test \
36+
golang-sdk-image:latest \
37+
bash /app/run_forever_test.sh
38+
39+
.PHONY: reconnect-test
40+
reconnect-test: build
41+
docker rm -f golang-reconnect-test || true
42+
docker run -idt \
43+
-e API_KEY="$$API_KEY" \
44+
-e API_SECRET="$$API_SECRET" \
45+
-e API_PASSPHRASE="$$API_PASSPHRASE" \
46+
--name golang-reconnect-test --network isolated_net \
47+
golang-sdk-image:latest \
48+
bash /app/ws_reconnect_test.sh

sdk/golang/example/example_get_started.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ package main
22

33
import (
44
"context"
5+
"os"
6+
57
"github.com/Kucoin/kucoin-universal-sdk/sdk/golang/pkg/api"
68
"github.com/Kucoin/kucoin-universal-sdk/sdk/golang/pkg/common/logger"
79
"github.com/Kucoin/kucoin-universal-sdk/sdk/golang/pkg/generate/spot/market"
810
"github.com/Kucoin/kucoin-universal-sdk/sdk/golang/pkg/types"
9-
"os"
1011
)
1112

12-
func example() {
13+
func GetStarted() {
1314
// Use the default logger or supply your custom logger
1415
defaultLogger := logger.NewDefaultLogger()
1516
logger.SetLogger(defaultLogger)

sdk/golang/example/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@ package main
33
func main() {
44
RestExample()
55

6+
GetStarted()
7+
8+
SignExample()
9+
610
WsExample()
711
}
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
#!/bin/bash
2-
2+
set -e
33
LOG_FILE="${PWD}/test.log"
44
if [ -f "$LOG_FILE" ]; then
55
rm "$LOG_FILE"
66
fi
77

8-
cd "$(dirname "$0")/pkg/generate" || exit 1
8+
cd /src
9+
go mod tidy
10+
11+
cd "/src/pkg/generate" || exit 1
912

1013
go test -json ./... 2>&1 | tee "$LOG_FILE" >/dev/null
1114

sdk/golang/script/release_test.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
set -e
3+
echo "USE_LOCAL = ${USE_LOCAL:-<unset>}"
4+
5+
go mod init github.com/kucoin/sdk-test-runner
6+
if [[ "${USE_LOCAL,,}" == "true" ]]; then
7+
echo "Using local Go SDK..."
8+
cp -r /src /go/src/kucoin-universal-sdk
9+
echo 'require github.com/Kucoin/kucoin-universal-sdk/sdk/golang v0.0.0' >> go.mod
10+
echo 'replace github.com/Kucoin/kucoin-universal-sdk/sdk/golang => /go/src/kucoin-universal-sdk' >> go.mod
11+
else
12+
echo "Installing kucoin-universal-sdk from remote..."
13+
go get github.com/Kucoin/kucoin-universal-sdk/sdk/golang
14+
fi
15+
cp /src/tests/regression/* /app/
16+
cat go.mod
17+
go mod tidy
18+
go run main.go example_api.go example_get_started.go example_sign.go example_ws.go
19+
go test -v run_service_test.go
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
set -e
3+
echo "USE_LOCAL = ${USE_LOCAL:-<unset>}"
4+
5+
go mod init github.com/kucoin/sdk-test-runner
6+
if [[ "${USE_LOCAL,,}" == "true" ]]; then
7+
echo "Using local Go SDK..."
8+
cp -r /src /go/src/kucoin-universal-sdk
9+
echo 'require github.com/Kucoin/kucoin-universal-sdk/sdk/golang v0.0.0' >> go.mod
10+
echo 'replace github.com/Kucoin/kucoin-universal-sdk/sdk/golang => /go/src/kucoin-universal-sdk' >> go.mod
11+
else
12+
echo "Installing kucoin-universal-sdk from remote..."
13+
go get github.com/Kucoin/kucoin-universal-sdk/sdk/golang
14+
fi
15+
16+
cp /src/tests/regression/* /app/
17+
go mod tidy
18+
go run run_forever.go

0 commit comments

Comments
 (0)