kucoin-api 2.1.13 → 2.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/FuturesClient.js +2 -2
- package/dist/cjs/SpotClient.d.ts +47 -3
- package/dist/cjs/SpotClient.js +67 -13
- package/dist/cjs/SpotClient.js.map +1 -1
- package/dist/cjs/WebsocketClient.js +7 -7
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/BaseRestClient.js.map +1 -1
- package/dist/cjs/lib/BaseWSClient.d.ts +0 -1
- package/dist/cjs/lib/BaseWSClient.js +14 -14
- package/dist/cjs/lib/BaseWSClient.js.map +1 -1
- package/dist/cjs/lib/misc-util.js +1 -2
- package/dist/cjs/lib/misc-util.js.map +1 -1
- package/dist/cjs/lib/requestUtils.js +3 -3
- package/dist/cjs/lib/requestUtils.js.map +1 -1
- package/dist/cjs/lib/webCryptoAPI.js +2 -3
- package/dist/cjs/lib/webCryptoAPI.js.map +1 -1
- package/dist/cjs/lib/websocket/WsStore.js +3 -3
- package/dist/cjs/lib/websocket/WsStore.js.map +1 -1
- package/dist/cjs/lib/websocket/WsStore.types.d.ts +0 -1
- package/dist/cjs/lib/websocket/websocket-util.js +3 -3
- package/dist/cjs/lib/websocket/websocket-util.js.map +1 -1
- package/dist/cjs/types/request/spot-affiliate.d.ts +25 -0
- package/dist/cjs/types/request/spot-affiliate.js +3 -0
- package/dist/cjs/types/request/spot-affiliate.js.map +1 -0
- package/dist/cjs/types/request/spot-earn.d.ts +24 -0
- package/dist/cjs/types/response/spot-account.d.ts +23 -23
- package/dist/cjs/types/response/spot-affiliate.d.ts +52 -0
- package/dist/cjs/types/response/spot-affiliate.js +3 -0
- package/dist/cjs/types/response/spot-affiliate.js.map +1 -0
- package/dist/cjs/types/response/spot-earn.d.ts +51 -0
- package/dist/cjs/types/response/spot-funding.d.ts +13 -13
- package/dist/cjs/types/response/spot-margin-trading.d.ts +25 -25
- package/dist/cjs/types/response/spot-trading.d.ts +38 -38
- package/dist/mjs/FuturesClient.js +2 -2
- package/dist/mjs/SpotClient.d.ts +47 -3
- package/dist/mjs/SpotClient.js +67 -13
- package/dist/mjs/SpotClient.js.map +1 -1
- package/dist/mjs/WebsocketClient.js +7 -7
- package/dist/mjs/index.d.ts +2 -0
- package/dist/mjs/index.js +2 -0
- package/dist/mjs/index.js.map +1 -1
- package/dist/mjs/lib/BaseRestClient.js.map +1 -1
- package/dist/mjs/lib/BaseWSClient.d.ts +0 -1
- package/dist/mjs/lib/BaseWSClient.js +14 -14
- package/dist/mjs/lib/BaseWSClient.js.map +1 -1
- package/dist/mjs/lib/websocket/WsStore.js +1 -1
- package/dist/mjs/lib/websocket/WsStore.js.map +1 -1
- package/dist/mjs/lib/websocket/WsStore.types.d.ts +0 -1
- package/dist/mjs/types/request/spot-affiliate.d.ts +25 -0
- package/dist/mjs/types/request/spot-affiliate.js +2 -0
- package/dist/mjs/types/request/spot-affiliate.js.map +1 -0
- package/dist/mjs/types/request/spot-earn.d.ts +24 -0
- package/dist/mjs/types/response/spot-account.d.ts +23 -23
- package/dist/mjs/types/response/spot-affiliate.d.ts +52 -0
- package/dist/mjs/types/response/spot-affiliate.js +2 -0
- package/dist/mjs/types/response/spot-affiliate.js.map +1 -0
- package/dist/mjs/types/response/spot-earn.d.ts +51 -0
- package/dist/mjs/types/response/spot-funding.d.ts +13 -13
- package/dist/mjs/types/response/spot-margin-trading.d.ts +25 -25
- package/dist/mjs/types/response/spot-trading.d.ts +38 -38
- package/package.json +6 -6
|
@@ -64,13 +64,6 @@ export interface AccountHFMarginTransactions {
|
|
|
64
64
|
* Sub-Account
|
|
65
65
|
*
|
|
66
66
|
*/
|
|
67
|
-
export interface SubAccountsV2 {
|
|
68
|
-
currentPage: number;
|
|
69
|
-
pageSize: number;
|
|
70
|
-
totalNum: number;
|
|
71
|
-
totalPage: number;
|
|
72
|
-
items: SubAccountInfo[];
|
|
73
|
-
}
|
|
74
67
|
export interface SubAccountInfo {
|
|
75
68
|
userId: string;
|
|
76
69
|
uid: number;
|
|
@@ -84,12 +77,12 @@ export interface SubAccountInfo {
|
|
|
84
77
|
openedTradeTypes: string[];
|
|
85
78
|
hostedStatus: null | string;
|
|
86
79
|
}
|
|
87
|
-
export interface
|
|
80
|
+
export interface SubAccountsV2 {
|
|
88
81
|
currentPage: number;
|
|
89
82
|
pageSize: number;
|
|
90
83
|
totalNum: number;
|
|
91
84
|
totalPage: number;
|
|
92
|
-
items:
|
|
85
|
+
items: SubAccountInfo[];
|
|
93
86
|
}
|
|
94
87
|
export interface SubAccountItem {
|
|
95
88
|
userId: string;
|
|
@@ -104,12 +97,12 @@ export interface SubAccountItem {
|
|
|
104
97
|
openedTradeTypes: string[];
|
|
105
98
|
hostedStatus: null | string;
|
|
106
99
|
}
|
|
107
|
-
export interface
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
100
|
+
export interface CreateSubAccount {
|
|
101
|
+
currentPage: number;
|
|
102
|
+
pageSize: number;
|
|
103
|
+
totalNum: number;
|
|
104
|
+
totalPage: number;
|
|
105
|
+
items: SubAccountItem[];
|
|
113
106
|
}
|
|
114
107
|
export interface SubAccountBalance {
|
|
115
108
|
currency: string;
|
|
@@ -120,6 +113,13 @@ export interface SubAccountBalance {
|
|
|
120
113
|
baseCurrencyPrice: string;
|
|
121
114
|
baseAmount: string;
|
|
122
115
|
}
|
|
116
|
+
export interface SubAccountBalances {
|
|
117
|
+
subUserId: string;
|
|
118
|
+
subName: string;
|
|
119
|
+
mainAccounts: SubAccountBalance[];
|
|
120
|
+
tradeAccounts: SubAccountBalance[];
|
|
121
|
+
marginAccounts: SubAccountBalance[];
|
|
122
|
+
}
|
|
123
123
|
export interface SubAccountBalancesV2 {
|
|
124
124
|
currentPage: number;
|
|
125
125
|
pageSize: number;
|
|
@@ -131,14 +131,6 @@ export interface SubAccountBalancesV2 {
|
|
|
131
131
|
mainAccounts: SubAccountBalance[];
|
|
132
132
|
}[];
|
|
133
133
|
}
|
|
134
|
-
export interface SubAccountBalanceItemV2 {
|
|
135
|
-
subUserId: string;
|
|
136
|
-
subName: string;
|
|
137
|
-
mainAccounts: SubAccountV2Details[];
|
|
138
|
-
tradeAccounts: SubAccountV2Details[];
|
|
139
|
-
marginAccounts: SubAccountV2Details[];
|
|
140
|
-
tradeHFAccounts: string[];
|
|
141
|
-
}
|
|
142
134
|
export interface SubAccountV2Details {
|
|
143
135
|
currency?: string;
|
|
144
136
|
balance?: string;
|
|
@@ -149,6 +141,14 @@ export interface SubAccountV2Details {
|
|
|
149
141
|
baseAmount?: string;
|
|
150
142
|
tag?: string;
|
|
151
143
|
}
|
|
144
|
+
export interface SubAccountBalanceItemV2 {
|
|
145
|
+
subUserId: string;
|
|
146
|
+
subName: string;
|
|
147
|
+
mainAccounts: SubAccountV2Details[];
|
|
148
|
+
tradeAccounts: SubAccountV2Details[];
|
|
149
|
+
marginAccounts: SubAccountV2Details[];
|
|
150
|
+
tradeHFAccounts: string[];
|
|
151
|
+
}
|
|
152
152
|
/**
|
|
153
153
|
*
|
|
154
154
|
* Sub-Account API
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export interface AffiliateTradeHistoryItem {
|
|
2
|
+
tradeTime: number;
|
|
3
|
+
tradeType: string;
|
|
4
|
+
tradeCurrency: string;
|
|
5
|
+
tradeAmount: string;
|
|
6
|
+
tradeAmountU: string;
|
|
7
|
+
feeU: string;
|
|
8
|
+
commission: string;
|
|
9
|
+
currency: string;
|
|
10
|
+
}
|
|
11
|
+
export interface AffiliateTradeHistory {
|
|
12
|
+
currentPage: number;
|
|
13
|
+
pageSize: number;
|
|
14
|
+
totalNum: number;
|
|
15
|
+
totalPage: number;
|
|
16
|
+
items: AffiliateTradeHistoryItem[];
|
|
17
|
+
}
|
|
18
|
+
export interface AffiliateCommissionItem {
|
|
19
|
+
siteType: string;
|
|
20
|
+
rebateType: 1 | 2;
|
|
21
|
+
payoutTime: number;
|
|
22
|
+
periodStartTime: number;
|
|
23
|
+
periodEndTime: number;
|
|
24
|
+
status: 1 | 2 | 3 | 4;
|
|
25
|
+
takerVolume: string;
|
|
26
|
+
makerVolume: string;
|
|
27
|
+
commission: string;
|
|
28
|
+
currency: string;
|
|
29
|
+
}
|
|
30
|
+
export interface AffiliateInviteeItem {
|
|
31
|
+
uid: string;
|
|
32
|
+
nickName: string;
|
|
33
|
+
referralCode: string;
|
|
34
|
+
country: string;
|
|
35
|
+
registrationTime: number;
|
|
36
|
+
completedKyc: boolean;
|
|
37
|
+
completedFirstDeposit: boolean;
|
|
38
|
+
completedFirstTrade: boolean;
|
|
39
|
+
past7dFees: string;
|
|
40
|
+
past7dCommission: string;
|
|
41
|
+
totalCommission: string;
|
|
42
|
+
myCommissionRate: string;
|
|
43
|
+
cashbackRate: string;
|
|
44
|
+
currency: string;
|
|
45
|
+
}
|
|
46
|
+
export interface AffiliateInvitees {
|
|
47
|
+
currentPage: number;
|
|
48
|
+
pageSize: number;
|
|
49
|
+
totalNum: number;
|
|
50
|
+
totalPage: number;
|
|
51
|
+
items: AffiliateInviteeItem[];
|
|
52
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spot-affiliate.js","sourceRoot":"","sources":["../../../../src/types/response/spot-affiliate.ts"],"names":[],"mappings":""}
|
|
@@ -72,3 +72,54 @@ export interface EarnProduct {
|
|
|
72
72
|
duration: number;
|
|
73
73
|
newUserOnly: 0 | 1;
|
|
74
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* STRUCTURED EARN - DUAL
|
|
78
|
+
*
|
|
79
|
+
*/
|
|
80
|
+
export interface StructuredProductPurchaseResponse {
|
|
81
|
+
orderId: string;
|
|
82
|
+
}
|
|
83
|
+
export interface DualInvestmentProduct {
|
|
84
|
+
category: 'DUAL_CLASSIC' | 'DUAL_BOOSTER' | 'DUAL_EXTRA';
|
|
85
|
+
productId: string;
|
|
86
|
+
targetCurrency: string;
|
|
87
|
+
quoteCurrency: string;
|
|
88
|
+
investCurrency: string;
|
|
89
|
+
strikeCurrency: string;
|
|
90
|
+
strikePrice: string;
|
|
91
|
+
protectPrice?: string;
|
|
92
|
+
annualRate: string;
|
|
93
|
+
expirationTime: number;
|
|
94
|
+
side: 'CALL' | 'PUT';
|
|
95
|
+
expectSettleTime: number;
|
|
96
|
+
duration: string;
|
|
97
|
+
lowerLimit: string;
|
|
98
|
+
upperLimit: string;
|
|
99
|
+
availableScale: string;
|
|
100
|
+
soldStatus: 'SOLD_OUT' | 'AVAILABLE';
|
|
101
|
+
increment: string;
|
|
102
|
+
}
|
|
103
|
+
export interface StructuredProductOrder {
|
|
104
|
+
category: string;
|
|
105
|
+
side: string;
|
|
106
|
+
duration: string;
|
|
107
|
+
apr: string;
|
|
108
|
+
investCurrency: string;
|
|
109
|
+
strikeCurrency: string;
|
|
110
|
+
investAmount: string;
|
|
111
|
+
settleAmount: string;
|
|
112
|
+
settleCurrency: string | null;
|
|
113
|
+
targetPrice: string;
|
|
114
|
+
settlePrice: string;
|
|
115
|
+
expirationTime: number;
|
|
116
|
+
orderId: string;
|
|
117
|
+
status: string;
|
|
118
|
+
}
|
|
119
|
+
export interface StructuredProductOrders {
|
|
120
|
+
currentPage: number;
|
|
121
|
+
pageSize: number;
|
|
122
|
+
totalNum: number;
|
|
123
|
+
totalPage: number;
|
|
124
|
+
items: StructuredProductOrder[];
|
|
125
|
+
}
|
|
@@ -32,12 +32,6 @@ export interface MarginBalance {
|
|
|
32
32
|
status: 'EFFECTIVE' | 'BANKRUPTCY' | 'LIQUIDATION' | 'REPAY' | 'BORROW';
|
|
33
33
|
accounts: MarginAccountDetail[];
|
|
34
34
|
}
|
|
35
|
-
export interface IsolatedMarginBalance {
|
|
36
|
-
totalAssetOfQuoteCurrency: string;
|
|
37
|
-
totalLiabilityOfQuoteCurrency: string;
|
|
38
|
-
timestamp: number;
|
|
39
|
-
assets: IsolatedMarginAssetDetail[];
|
|
40
|
-
}
|
|
41
35
|
export interface IsolatedMarginAssetDetail {
|
|
42
36
|
symbol: string;
|
|
43
37
|
debtRatio: string;
|
|
@@ -45,6 +39,12 @@ export interface IsolatedMarginAssetDetail {
|
|
|
45
39
|
baseAsset: MarginAccountDetail;
|
|
46
40
|
quoteAsset: MarginAccountDetail;
|
|
47
41
|
}
|
|
42
|
+
export interface IsolatedMarginBalance {
|
|
43
|
+
totalAssetOfQuoteCurrency: string;
|
|
44
|
+
totalLiabilityOfQuoteCurrency: string;
|
|
45
|
+
timestamp: number;
|
|
46
|
+
assets: IsolatedMarginAssetDetail[];
|
|
47
|
+
}
|
|
48
48
|
/**
|
|
49
49
|
*
|
|
50
50
|
* Deposit
|
|
@@ -76,13 +76,6 @@ export interface HistoricalDepositItem {
|
|
|
76
76
|
isInner: boolean;
|
|
77
77
|
status: 'PROCESSING' | 'SUCCESS' | 'FAILURE';
|
|
78
78
|
}
|
|
79
|
-
export interface Deposits {
|
|
80
|
-
currentPage: number;
|
|
81
|
-
pageSize: number;
|
|
82
|
-
totalNum: number;
|
|
83
|
-
totalPage: number;
|
|
84
|
-
items: DepositItem[];
|
|
85
|
-
}
|
|
86
79
|
export interface DepositItem {
|
|
87
80
|
currency?: string;
|
|
88
81
|
chain?: string;
|
|
@@ -98,6 +91,13 @@ export interface DepositItem {
|
|
|
98
91
|
remark?: string;
|
|
99
92
|
arrears?: boolean;
|
|
100
93
|
}
|
|
94
|
+
export interface Deposits {
|
|
95
|
+
currentPage: number;
|
|
96
|
+
pageSize: number;
|
|
97
|
+
totalNum: number;
|
|
98
|
+
totalPage: number;
|
|
99
|
+
items: DepositItem[];
|
|
100
|
+
}
|
|
101
101
|
export interface V1HistoricalDeposits {
|
|
102
102
|
currentPage: number;
|
|
103
103
|
pageSize: number;
|
|
@@ -181,34 +181,34 @@ export interface IsolatedMarginSymbolsConfig {
|
|
|
181
181
|
baseBorrowCoefficient: string;
|
|
182
182
|
quoteBorrowCoefficient: string;
|
|
183
183
|
}
|
|
184
|
-
export interface
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
184
|
+
export interface AssetDetail {
|
|
185
|
+
currency: string;
|
|
186
|
+
totalBalance: string;
|
|
187
|
+
holdBalance: string;
|
|
188
|
+
availableBalance: string;
|
|
189
|
+
liability: string;
|
|
190
|
+
interest: string;
|
|
191
|
+
borrowableAmount: string;
|
|
188
192
|
}
|
|
189
|
-
export interface
|
|
193
|
+
export interface AssetInfo {
|
|
190
194
|
symbol: string;
|
|
191
195
|
status: string;
|
|
192
196
|
debtRatio: string;
|
|
193
197
|
baseAsset: AssetDetail;
|
|
194
198
|
quoteAsset: AssetDetail;
|
|
195
199
|
}
|
|
196
|
-
export interface
|
|
200
|
+
export interface IsolatedMarginAccountInfo {
|
|
201
|
+
totalConversionBalance: string;
|
|
202
|
+
liabilityConversionBalance: string;
|
|
203
|
+
assets: AssetInfo[];
|
|
204
|
+
}
|
|
205
|
+
export interface SingleIsolatedMarginAccountInfo {
|
|
197
206
|
symbol: string;
|
|
198
207
|
status: string;
|
|
199
208
|
debtRatio: string;
|
|
200
209
|
baseAsset: AssetDetail;
|
|
201
210
|
quoteAsset: AssetDetail;
|
|
202
211
|
}
|
|
203
|
-
export interface AssetDetail {
|
|
204
|
-
currency: string;
|
|
205
|
-
totalBalance: string;
|
|
206
|
-
holdBalance: string;
|
|
207
|
-
availableBalance: string;
|
|
208
|
-
liability: string;
|
|
209
|
-
interest: string;
|
|
210
|
-
borrowableAmount: string;
|
|
211
|
-
}
|
|
212
212
|
/**
|
|
213
213
|
*
|
|
214
214
|
* Margin trading(v3)
|
|
@@ -225,14 +225,6 @@ export interface MarginOrderV3 {
|
|
|
225
225
|
orderNo: string;
|
|
226
226
|
actualSize: number;
|
|
227
227
|
}
|
|
228
|
-
export interface MarginBorrowHistoryV3 {
|
|
229
|
-
timestamp: number;
|
|
230
|
-
currentPage: number;
|
|
231
|
-
pageSize: number;
|
|
232
|
-
totalNum: number;
|
|
233
|
-
totalPage: number;
|
|
234
|
-
items: MarginBorrowHistoryRecord[];
|
|
235
|
-
}
|
|
236
228
|
export interface MarginBorrowHistoryRecord {
|
|
237
229
|
orderNo: string;
|
|
238
230
|
symbol: string;
|
|
@@ -242,13 +234,13 @@ export interface MarginBorrowHistoryRecord {
|
|
|
242
234
|
status: string;
|
|
243
235
|
createdTime: number;
|
|
244
236
|
}
|
|
245
|
-
export interface
|
|
237
|
+
export interface MarginBorrowHistoryV3 {
|
|
246
238
|
timestamp: number;
|
|
247
239
|
currentPage: number;
|
|
248
240
|
pageSize: number;
|
|
249
241
|
totalNum: number;
|
|
250
242
|
totalPage: number;
|
|
251
|
-
items:
|
|
243
|
+
items: MarginBorrowHistoryRecord[];
|
|
252
244
|
}
|
|
253
245
|
export interface MarginRepayHistoryRecord {
|
|
254
246
|
orderNo: string;
|
|
@@ -260,6 +252,14 @@ export interface MarginRepayHistoryRecord {
|
|
|
260
252
|
status: string;
|
|
261
253
|
createdTime: number;
|
|
262
254
|
}
|
|
255
|
+
export interface MarginRepayHistoryV3 {
|
|
256
|
+
timestamp: number;
|
|
257
|
+
currentPage: number;
|
|
258
|
+
pageSize: number;
|
|
259
|
+
totalNum: number;
|
|
260
|
+
totalPage: number;
|
|
261
|
+
items: MarginRepayHistoryRecord[];
|
|
262
|
+
}
|
|
263
263
|
export interface MarginInterestRecord {
|
|
264
264
|
currency: string;
|
|
265
265
|
dayRatio: string;
|
|
@@ -10,17 +10,6 @@
|
|
|
10
10
|
* Market data
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
|
-
export interface CurrencyInfo {
|
|
14
|
-
currency: string;
|
|
15
|
-
name: string;
|
|
16
|
-
fullName: string;
|
|
17
|
-
precision: number;
|
|
18
|
-
confirms: number | null;
|
|
19
|
-
contractAddress: string | null;
|
|
20
|
-
isMarginEnabled: boolean;
|
|
21
|
-
isDebitEnabled: boolean;
|
|
22
|
-
chains: Chain[];
|
|
23
|
-
}
|
|
24
13
|
interface Chain {
|
|
25
14
|
chainName: string;
|
|
26
15
|
withdrawalMinSize: string;
|
|
@@ -38,6 +27,17 @@ interface Chain {
|
|
|
38
27
|
needTag: boolean;
|
|
39
28
|
chainId: string;
|
|
40
29
|
}
|
|
30
|
+
export interface CurrencyInfo {
|
|
31
|
+
currency: string;
|
|
32
|
+
name: string;
|
|
33
|
+
fullName: string;
|
|
34
|
+
precision: number;
|
|
35
|
+
confirms: number | null;
|
|
36
|
+
contractAddress: string | null;
|
|
37
|
+
isMarginEnabled: boolean;
|
|
38
|
+
isDebitEnabled: boolean;
|
|
39
|
+
chains: Chain[];
|
|
40
|
+
}
|
|
41
41
|
export interface SymbolInfo {
|
|
42
42
|
symbol: string;
|
|
43
43
|
name: string;
|
|
@@ -285,13 +285,6 @@ export interface MultipleOrdersResponse {
|
|
|
285
285
|
failMsg?: any;
|
|
286
286
|
clientOid: string;
|
|
287
287
|
}
|
|
288
|
-
export interface SpotOrderList {
|
|
289
|
-
currentPage: number;
|
|
290
|
-
pageSize: number;
|
|
291
|
-
totalNum: number;
|
|
292
|
-
totalPage: number;
|
|
293
|
-
items: SpotOrder[];
|
|
294
|
-
}
|
|
295
288
|
export interface SpotOrder {
|
|
296
289
|
id: string;
|
|
297
290
|
symbol: string;
|
|
@@ -324,6 +317,13 @@ export interface SpotOrder {
|
|
|
324
317
|
createdAt: number;
|
|
325
318
|
tradeType: string;
|
|
326
319
|
}
|
|
320
|
+
export interface SpotOrderList {
|
|
321
|
+
currentPage: number;
|
|
322
|
+
pageSize: number;
|
|
323
|
+
totalNum: number;
|
|
324
|
+
totalPage: number;
|
|
325
|
+
items: SpotOrder[];
|
|
326
|
+
}
|
|
327
327
|
/**
|
|
328
328
|
*
|
|
329
329
|
* Fills
|
|
@@ -359,13 +359,6 @@ export interface SpotOrderFills {
|
|
|
359
359
|
* Stop order
|
|
360
360
|
*
|
|
361
361
|
*/
|
|
362
|
-
export interface StopOrders {
|
|
363
|
-
currentPage: number;
|
|
364
|
-
pageSize: number;
|
|
365
|
-
totalNum: number;
|
|
366
|
-
totalPage: number;
|
|
367
|
-
items: StopOrderItem[];
|
|
368
|
-
}
|
|
369
362
|
export interface StopOrderItem {
|
|
370
363
|
id?: string;
|
|
371
364
|
symbol?: string;
|
|
@@ -399,11 +392,27 @@ export interface StopOrderItem {
|
|
|
399
392
|
stopPrice?: string;
|
|
400
393
|
orderTime?: number;
|
|
401
394
|
}
|
|
395
|
+
export interface StopOrders {
|
|
396
|
+
currentPage: number;
|
|
397
|
+
pageSize: number;
|
|
398
|
+
totalNum: number;
|
|
399
|
+
totalPage: number;
|
|
400
|
+
items: StopOrderItem[];
|
|
401
|
+
}
|
|
402
402
|
/**
|
|
403
403
|
*
|
|
404
404
|
* OCO order
|
|
405
405
|
*
|
|
406
406
|
*/
|
|
407
|
+
export interface OCOOrderSubOrder {
|
|
408
|
+
id: string;
|
|
409
|
+
symbol: string;
|
|
410
|
+
side: 'buy' | 'sell';
|
|
411
|
+
price: string;
|
|
412
|
+
stopPrice: string;
|
|
413
|
+
size: string;
|
|
414
|
+
status: 'NEW' | 'DONE' | 'TRIGGERED' | 'CANCELLED';
|
|
415
|
+
}
|
|
407
416
|
export interface OCOOrderDetails {
|
|
408
417
|
orderId: string;
|
|
409
418
|
symbol: string;
|
|
@@ -412,13 +421,11 @@ export interface OCOOrderDetails {
|
|
|
412
421
|
status: 'NEW' | 'DONE' | 'TRIGGERED' | 'CANCELLED';
|
|
413
422
|
orders: OCOOrderSubOrder[];
|
|
414
423
|
}
|
|
415
|
-
export interface
|
|
416
|
-
|
|
424
|
+
export interface OCOOrderListItem {
|
|
425
|
+
orderId: string;
|
|
417
426
|
symbol: string;
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
stopPrice: string;
|
|
421
|
-
size: string;
|
|
427
|
+
clientOid: string;
|
|
428
|
+
orderTime: number;
|
|
422
429
|
status: 'NEW' | 'DONE' | 'TRIGGERED' | 'CANCELLED';
|
|
423
430
|
}
|
|
424
431
|
export interface OCOOrders {
|
|
@@ -428,11 +435,4 @@ export interface OCOOrders {
|
|
|
428
435
|
totalPage: number;
|
|
429
436
|
items: OCOOrderListItem[];
|
|
430
437
|
}
|
|
431
|
-
export interface OCOOrderListItem {
|
|
432
|
-
orderId: string;
|
|
433
|
-
symbol: string;
|
|
434
|
-
clientOid: string;
|
|
435
|
-
orderTime: number;
|
|
436
|
-
status: 'NEW' | 'DONE' | 'TRIGGERED' | 'CANCELLED';
|
|
437
|
-
}
|
|
438
438
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kucoin-api",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.15",
|
|
4
4
|
"description": "Complete & robust Node.js SDK for Kucoin's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rm -rf dist",
|
|
@@ -34,20 +34,20 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/jest": "^29.5.12",
|
|
37
|
-
"@types/node": "^
|
|
37
|
+
"@types/node": "^22.11.6",
|
|
38
38
|
"@types/ws": "^8.5.10",
|
|
39
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
40
|
-
"@typescript-eslint/parser": "^
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "^8.18.0",
|
|
40
|
+
"@typescript-eslint/parser": "^8.18.0",
|
|
41
41
|
"eslint": "^8.29.0",
|
|
42
42
|
"eslint-config-prettier": "^9.1.0",
|
|
43
43
|
"eslint-plugin-prettier": "^5.1.3",
|
|
44
44
|
"eslint-plugin-require-extensions": "^0.1.3",
|
|
45
|
-
"eslint-plugin-simple-import-sort": "^12.
|
|
45
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
46
46
|
"jest": "^29.7.0",
|
|
47
47
|
"prettier": "^3.3.3",
|
|
48
48
|
"ts-jest": "^29.2.4",
|
|
49
49
|
"ts-node": "^10.9.2",
|
|
50
|
-
"typescript": "^5.
|
|
50
|
+
"typescript": "^5.7.3"
|
|
51
51
|
},
|
|
52
52
|
"keywords": [
|
|
53
53
|
"kucoin",
|