Skip to content

Commit de77d01

Browse files
authored
Merge pull request #4 from Kucoin/release/2025.06.11
Release/2025.06.11
2 parents fd93e88 + cacd34c commit de77d01

File tree

97 files changed

+2881
-233
lines changed

Some content is hidden

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

97 files changed

+2881
-233
lines changed

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22

33
API documentation [Changelog](https://www.kucoin.com/docs-new/change-log)
44

5-
Current synchronized API documentation version [20250313](https://www.kucoin.com/docs-new/change-log#20250313)
5+
Current synchronized API documentation version [20250529](https://www.kucoin.com/docs-new/change-log#20250529)
6+
7+
## 2025-06-11(1.3.0)
8+
- Update the latest APIs, documentation, etc
9+
- Introduced a new testing framework for all SDKs
10+
- Expanded regression-test coverage for Python components
11+
- Updated Node.js dependencies to address security vulnerabilities
12+
13+
## 2025-06-11(PHP 0.1.2-alpha)
14+
- Update the latest APIs, documentation, etc
615

716
## 2025-05-29(PHP 0.1.1-alpha)
817
- Fix compatibility issues on non-macOS systems by enforcing case-sensitive PSR-4 autoloading.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ For an overview of the project and SDKs in other languages, refer to the [Main R
1313

1414
## 📦 Installation
1515

16-
### Latest Version: `0.1.1-alpha`
16+
### Latest Version: `0.1.2-alpha`
1717

1818
**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.
1919

2020
Install the SDK using `composer`:
2121

2222
```bash
23-
composer require kucoin/kucoin-universal-sdk=0.1.1-alpha
23+
composer require kucoin/kucoin-universal-sdk=0.1.2-alpha
2424
```
2525

2626
## 📖 Getting Started

src/Generate/Account/Account/AccountApi.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@
113113
self::assertNotNull($item->maxBorrowSize);
114114
self::assertNotNull($item->borrowEnabled);
115115
self::assertNotNull($item->transferInEnabled);
116+
self::assertNotNull($item->liabilityPrincipal);
117+
self::assertNotNull($item->liabilityInterest);
116118
}
117119

118120
Logger::info($resp->jsonSerialize($this->serializer));

src/Generate/Account/Account/AccountApiTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public function testGetCrossMarginAccountRequest()
244244
public function testGetCrossMarginAccountResponse()
245245
{
246246
$data =
247-
"{\n \"code\": \"200000\",\n \"data\": {\n \"totalAssetOfQuoteCurrency\": \"0.02\",\n \"totalLiabilityOfQuoteCurrency\": \"0\",\n \"debtRatio\": \"0\",\n \"status\": \"EFFECTIVE\",\n \"accounts\": [\n {\n \"currency\": \"USDT\",\n \"total\": \"0.02\",\n \"available\": \"0.02\",\n \"hold\": \"0\",\n \"liability\": \"0\",\n \"maxBorrowSize\": \"0\",\n \"borrowEnabled\": true,\n \"transferInEnabled\": true\n }\n ]\n }\n}";
247+
"{\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}";
248248
$commonResp = RestResponse::jsonDeserialize($data, $this->serializer);
249249
$respData = $commonResp->data
250250
? $this->serializer->serialize($commonResp->data, "json")
@@ -266,7 +266,7 @@ public function testGetCrossMarginAccountResponse()
266266
public function testGetIsolatedMarginAccountRequest()
267267
{
268268
$data =
269-
"{\"symbol\": \"example_string_default_value\", \"quoteCurrency\": \"USDT\", \"queryType\": \"ISOLATED\"}";
269+
"{\"symbol\": \"BTC-USDT\", \"quoteCurrency\": \"USDT\", \"queryType\": \"ISOLATED\"}";
270270
$req = GetIsolatedMarginAccountReq::jsonDeserialize(
271271
$data,
272272
$this->serializer
@@ -283,7 +283,7 @@ public function testGetIsolatedMarginAccountRequest()
283283
public function testGetIsolatedMarginAccountResponse()
284284
{
285285
$data =
286-
"{\n \"code\": \"200000\",\n \"data\": {\n \"totalAssetOfQuoteCurrency\": \"0.01\",\n \"totalLiabilityOfQuoteCurrency\": \"0\",\n \"timestamp\": 1728725465994,\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 \"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\",\n \"total\": \"0.01\",\n \"available\": \"0.01\",\n \"hold\": \"0\",\n \"maxBorrowSize\": \"0\"\n }\n }\n ]\n }\n}";
286+
"{\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}";
287287
$commonResp = RestResponse::jsonDeserialize($data, $this->serializer);
288288
$respData = $commonResp->data
289289
? $this->serializer->serialize($commonResp->data, "json")

src/Generate/Account/Account/GetCrossMarginAccountAccounts.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,20 @@ class GetCrossMarginAccountAccounts implements Serializable
6767
* @SerializedName("transferInEnabled")
6868
*/
6969
public $transferInEnabled;
70+
/**
71+
* Outstanding principal – the unpaid loan amount
72+
* @var string $liabilityPrincipal
73+
* @Type("string")
74+
* @SerializedName("liabilityPrincipal")
75+
*/
76+
public $liabilityPrincipal;
77+
/**
78+
* Accrued interest – the unpaid interest amount
79+
* @var string $liabilityInterest
80+
* @Type("string")
81+
* @SerializedName("liabilityInterest")
82+
*/
83+
public $liabilityInterest;
7084

7185
private function __construct() {}
7286

src/Generate/Account/Account/GetCrossMarginAccountResp.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ class GetCrossMarginAccountResp implements Response
3535
public $debtRatio;
3636
/**
3737
* Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW-borrowing
38-
* - 'EFFECTIVE' : Effective
39-
* - 'BANKRUPTCY' : Bankruptcy liquidation
40-
* - 'LIQUIDATION' : Closing
41-
* - 'REPAY' : Repayment
42-
* - 'BORROW' : Borrowing
4338
* @var string $status
4439
* @Type("string")
4540
* @SerializedName("status")

src/Generate/Account/Account/GetIsolatedMarginAccountAssets.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,35 @@ class GetIsolatedMarginAccountAssets implements Serializable
1313
{
1414
/**
1515
* Symbol
16-
* @var string $symbol
16+
* @var string|null $symbol
1717
* @Type("string")
1818
* @SerializedName("symbol")
1919
*/
2020
public $symbol;
2121
/**
2222
* Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW-borrowing
23-
* - 'EFFECTIVE' : Effective
24-
* - 'BANKRUPTCY' : Bankruptcy liquidation
25-
* - 'LIQUIDATION' : Closing
26-
* - 'REPAY' : Repayment
27-
* - 'BORROW' : Borrowing
28-
* @var string $status
23+
* @var string|null $status
2924
* @Type("string")
3025
* @SerializedName("status")
3126
*/
3227
public $status;
3328
/**
3429
* debt ratio
35-
* @var string $debtRatio
30+
* @var string|null $debtRatio
3631
* @Type("string")
3732
* @SerializedName("debtRatio")
3833
*/
3934
public $debtRatio;
4035
/**
4136
*
42-
* @var GetIsolatedMarginAccountAssetsBaseAsset $baseAsset
37+
* @var GetIsolatedMarginAccountAssetsBaseAsset|null $baseAsset
4338
* @Type("KuCoin\UniversalSDK\Generate\Account\Account\GetIsolatedMarginAccountAssetsBaseAsset")
4439
* @SerializedName("baseAsset")
4540
*/
4641
public $baseAsset;
4742
/**
4843
*
49-
* @var GetIsolatedMarginAccountAssetsQuoteAsset $quoteAsset
44+
* @var GetIsolatedMarginAccountAssetsQuoteAsset|null $quoteAsset
5045
* @Type("KuCoin\UniversalSDK\Generate\Account\Account\GetIsolatedMarginAccountAssetsQuoteAsset")
5146
* @SerializedName("quoteAsset")
5247
*/

src/Generate/Account/Account/GetIsolatedMarginAccountAssetsBaseAsset.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,20 @@ class GetIsolatedMarginAccountAssetsBaseAsset implements Serializable
6767
* @SerializedName("maxBorrowSize")
6868
*/
6969
public $maxBorrowSize;
70+
/**
71+
* Outstanding principal
72+
* @var string $liabilityPrincipal
73+
* @Type("string")
74+
* @SerializedName("liabilityPrincipal")
75+
*/
76+
public $liabilityPrincipal;
77+
/**
78+
* Outstanding interest
79+
* @var string $liabilityInterest
80+
* @Type("string")
81+
* @SerializedName("liabilityInterest")
82+
*/
83+
public $liabilityInterest;
7084

7185
private function __construct() {}
7286

src/Generate/Account/Account/GetIsolatedMarginAccountAssetsQuoteAsset.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,20 @@ class GetIsolatedMarginAccountAssetsQuoteAsset implements Serializable
6767
* @SerializedName("maxBorrowSize")
6868
*/
6969
public $maxBorrowSize;
70+
/**
71+
*
72+
* @var string $liabilityPrincipal
73+
* @Type("string")
74+
* @SerializedName("liabilityPrincipal")
75+
*/
76+
public $liabilityPrincipal;
77+
/**
78+
*
79+
* @var string $liabilityInterest
80+
* @Type("string")
81+
* @SerializedName("liabilityInterest")
82+
*/
83+
public $liabilityInterest;
7084

7185
private function __construct() {}
7286

src/Generate/Account/Account/GetSpotHFLedgerReq.php

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ public function pathVarMapping()
3939
public $direction;
4040
/**
4141
* Transaction type
42-
* - 'TRADE_EXCHANGE' : trade exchange
43-
* - 'TRANSFER' : transfer
44-
* - 'RETURNED_FEES' : returned fees
45-
* - 'DEDUCTION_FEES' : deduction fees
46-
* - 'OTHER' : other
42+
* - 'TRADE_EXCHANGE' : Trade exchange
43+
* - 'TRANSFER' : Transfer
44+
* - 'SUB_TRANSFER' : Sub transfer
45+
* - 'RETURNED_FEES' : Returned fees
46+
* - 'DEDUCTION_FEES' : Deduction fees
47+
* - 'OTHER' : Other
4748
* @var string|null $bizType
4849
* @Type("string")
4950
* @SerializedName("bizType")
@@ -170,11 +171,12 @@ public function setDirection($value)
170171

171172
/**
172173
* Transaction type
173-
* - 'TRADE_EXCHANGE' : trade exchange
174-
* - 'TRANSFER' : transfer
175-
* - 'RETURNED_FEES' : returned fees
176-
* - 'DEDUCTION_FEES' : deduction fees
177-
* - 'OTHER' : other
174+
* - 'TRADE_EXCHANGE' : Trade exchange
175+
* - 'TRANSFER' : Transfer
176+
* - 'SUB_TRANSFER' : Sub transfer
177+
* - 'RETURNED_FEES' : Returned fees
178+
* - 'DEDUCTION_FEES' : Deduction fees
179+
* - 'OTHER' : Other
178180
* @param string $value
179181
* @return self
180182
*/

0 commit comments

Comments
 (0)