Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
496b27c
feat(java): add project
ISAAC-XXYYZZ Jun 23, 2025
e57bf11
feat(java): add model generator
ISAAC-XXYYZZ Jun 25, 2025
25b417a
Merge branch 'dev' into java
ISAAC-XXYYZZ Jun 30, 2025
90a680c
feat(java): add exlude to java model
ISAAC-XXYYZZ Jul 1, 2025
986867d
feat(api): add support for java
ISAAC-XXYYZZ Jul 1, 2025
c27eee8
feat(api): add models for java
ISAAC-XXYYZZ Jul 1, 2025
a97f5e1
feat(api): add format for java
ISAAC-XXYYZZ Jul 1, 2025
c948b57
feat(java): add models
ISAAC-XXYYZZ Jul 2, 2025
ac2e4cb
feat(api): add format for java
ISAAC-XXYYZZ Jul 2, 2025
12e39d5
feat(api): fix models
ISAAC-XXYYZZ Jul 4, 2025
c2b138e
feat(api): format api doc
ISAAC-XXYYZZ Jul 4, 2025
3f71853
feat(api): add @Deprecated support
ISAAC-XXYYZZ Jul 4, 2025
1af35ac
feat(java): add test support
ISAAC-XXYYZZ Jul 4, 2025
06ea7d0
feat(java): add transport support
ISAAC-XXYYZZ Jul 7, 2025
ad6372f
feat(java): add ws transport support
ISAAC-XXYYZZ Jul 9, 2025
b9f06f2
feat(java): update ws models
ISAAC-XXYYZZ Jul 9, 2025
0009f30
feat(java): add ws model support
ISAAC-XXYYZZ Jul 9, 2025
31d1fb8
feat(java): add api
ISAAC-XXYYZZ Jul 14, 2025
a4bdd5c
feat(java): update test template
ISAAC-XXYYZZ Jul 14, 2025
5ab2739
feat(java): update events callback
ISAAC-XXYYZZ Jul 15, 2025
b37a16c
feat(java): update ws api
ISAAC-XXYYZZ Jul 15, 2025
8330006
feat(java): add some tests for infra
ISAAC-XXYYZZ Jul 15, 2025
ce67ff1
feat(java): add some tests for java sdk
ISAAC-XXYYZZ Jul 21, 2025
d03fed1
feat(java): add some tests for rest api
ISAAC-XXYYZZ Jul 22, 2025
8b36f93
feat(java): add README.md
ISAAC-XXYYZZ Jul 22, 2025
111212e
feat(java): fix thread leak
ISAAC-XXYYZZ Jul 22, 2025
0e11cf5
feat(java): add ws tests
ISAAC-XXYYZZ Jul 23, 2025
1982533
feat(java): fix transport bug
ISAAC-XXYYZZ Jul 23, 2025
80d8b6f
feat(java): add example and tests
ISAAC-XXYYZZ Jul 23, 2025
bfef0e1
feat(java): remove unused keywords from the interface
ISAAC-XXYYZZ Jul 23, 2025
5ac20c3
feat(java): add test for api
ISAAC-XXYYZZ Jul 23, 2025
60a4f7b
feat(java): add test for api
ISAAC-XXYYZZ Jul 23, 2025
08fb134
feat(java): add `@JsonValue` annotation to convert response data to JSON
ISAAC-XXYYZZ Jul 24, 2025
b76b6a6
feat(java): update path variable names
ISAAC-XXYYZZ Jul 24, 2025
da86f35
feat(java): add and update WS and REST tests for various endpoints
ISAAC-XXYYZZ Jul 25, 2025
5fc01e2
feat(java): update SDK version to 0.1.0-alpha and add test scripts
ISAAC-XXYYZZ Jul 28, 2025
8d691f1
feat(java): release Java implementation 0.1.0-alpha and update WebSoc…
ISAAC-XXYYZZ Jul 28, 2025
f765c22
feat(java): add check for empty apiSecret and update nullSafe method
ISAAC-XXYYZZ Jul 29, 2025
162c760
feat(java): add Maven Central deployment configuration and GitHub Act…
ISAAC-XXYYZZ Jul 29, 2025
aab7d73
merge from dev
ISAAC-XXYYZZ Jul 29, 2025
6b1c6a5
Merge pull request #56 from Kucoin/java
ISAAC-XXYYZZ Jul 29, 2025
1c82c5e
feat(doc): Update docs
ISAAC-XXYYZZ Jul 29, 2025
85dc620
Merge pull request #57 from Kucoin/dev
ISAAC-XXYYZZ Jul 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 36 additions & 0 deletions .github/workflows/upload-java-sdk-package.yml
Original file line number Diff line number Diff line change
@@ -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 }}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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(PHP 0.1.3-alpha)
- Add compatibility for PHP versions from 7.4 to 8.x

Expand Down
13 changes: 3 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -22,7 +14,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 && \
Expand All @@ -49,6 +41,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"]

Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,16 @@ 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)"
@sleep 5
@$(MAKE) -C sdk/$(lang) format

@echo "$(GREEN)lang: $(lang), done!$(NC)"
endef

Expand All @@ -88,7 +92,8 @@ generate: setup-logs
$(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,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
gen-postman: preprocessor
Expand Down
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ npm install kucoin-universal-sdk
composer require kucoin/kucoin-universal-sdk=0.1.3-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
<dependency>
<groupId>com.kucoin</groupId>
<artifactId>kucoin-universal-sdk</artifactId>
<version>0.1.0-alpha</version>
</dependency>
```

### Postman Installation
Visit the [KuCoin API Collection on Postman](https://www.postman.com/kucoin-api/kucoin-api/overview)

Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions generator/plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<maven.compiler.plugin.version>3.6.1</maven.compiler.plugin.version>
<ascii-table.version>1.8.0</ascii-table.version>
<csv.version>5.7.1</csv.version>
<commons-lang3.version>3.17.0</commons-lang3.version>
</properties>

<dependencies>
Expand All @@ -43,6 +44,12 @@
<version>${csv.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>


Expand Down
Loading
Loading