kucoin-api 2.0.3 → 2.1.1

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.
Files changed (41) hide show
  1. package/dist/cjs/BrokerClient.d.ts +162 -0
  2. package/dist/cjs/BrokerClient.js +175 -0
  3. package/dist/cjs/BrokerClient.js.map +1 -0
  4. package/dist/cjs/SpotClient.d.ts +1 -0
  5. package/dist/cjs/SpotClient.js +3 -0
  6. package/dist/cjs/SpotClient.js.map +1 -1
  7. package/dist/cjs/index.d.ts +3 -0
  8. package/dist/cjs/index.js +3 -0
  9. package/dist/cjs/index.js.map +1 -1
  10. package/dist/cjs/lib/requestUtils.d.ts +2 -0
  11. package/dist/cjs/lib/requestUtils.js +3 -0
  12. package/dist/cjs/lib/requestUtils.js.map +1 -1
  13. package/dist/cjs/types/request/broker.types.d.ts +52 -0
  14. package/dist/cjs/types/request/broker.types.js +3 -0
  15. package/dist/cjs/types/request/broker.types.js.map +1 -0
  16. package/dist/cjs/types/request/spot-account.d.ts +1 -1
  17. package/dist/cjs/types/request/spot-funding.d.ts +1 -1
  18. package/dist/cjs/types/response/broker.types.d.ts +92 -0
  19. package/dist/cjs/types/response/broker.types.js +3 -0
  20. package/dist/cjs/types/response/broker.types.js.map +1 -0
  21. package/dist/mjs/BrokerClient.d.ts +162 -0
  22. package/dist/mjs/BrokerClient.js +171 -0
  23. package/dist/mjs/BrokerClient.js.map +1 -0
  24. package/dist/mjs/SpotClient.d.ts +1 -0
  25. package/dist/mjs/SpotClient.js +3 -0
  26. package/dist/mjs/SpotClient.js.map +1 -1
  27. package/dist/mjs/index.d.ts +3 -0
  28. package/dist/mjs/index.js +3 -0
  29. package/dist/mjs/index.js.map +1 -1
  30. package/dist/mjs/lib/requestUtils.d.ts +2 -0
  31. package/dist/mjs/lib/requestUtils.js +3 -0
  32. package/dist/mjs/lib/requestUtils.js.map +1 -1
  33. package/dist/mjs/types/request/broker.types.d.ts +52 -0
  34. package/dist/mjs/types/request/broker.types.js +2 -0
  35. package/dist/mjs/types/request/broker.types.js.map +1 -0
  36. package/dist/mjs/types/request/spot-account.d.ts +1 -1
  37. package/dist/mjs/types/request/spot-funding.d.ts +1 -1
  38. package/dist/mjs/types/response/broker.types.d.ts +92 -0
  39. package/dist/mjs/types/response/broker.types.js +2 -0
  40. package/dist/mjs/types/response/broker.types.js.map +1 -0
  41. package/package.json +1 -1
@@ -0,0 +1,52 @@
1
+ export interface GetBrokerInfoRequest {
2
+ begin: string;
3
+ end: string;
4
+ tradeType: '1' | '2';
5
+ }
6
+ export interface GetBrokerSubAccountsRequest {
7
+ uid: string;
8
+ currentPage?: number;
9
+ pageSize?: number;
10
+ }
11
+ export type BrokerSubAccountPermission = 'general' | 'spot' | 'futures';
12
+ export interface CreateBrokerSubAccountApiRequest {
13
+ uid: string;
14
+ passphrase: string;
15
+ ipWhitelist: string[];
16
+ permissions: BrokerSubAccountPermission[];
17
+ label: string;
18
+ }
19
+ export interface GetBrokerSubAccountApisRequest {
20
+ uid: string;
21
+ apiKey?: string;
22
+ }
23
+ export interface UpdateBrokerSubAccountApiRequest {
24
+ uid: string;
25
+ apiKey: string;
26
+ ipWhitelist: string[];
27
+ permissions: BrokerSubAccountPermission[];
28
+ label: string;
29
+ }
30
+ export interface DeleteBrokerSubAccountApiRequest {
31
+ uid: string;
32
+ apiKey: string;
33
+ }
34
+ export type BrokerTransferDirection = 'OUT' | 'IN';
35
+ export type BrokerAccountType = 'MAIN' | 'TRADE';
36
+ export interface BrokerTransferRequest {
37
+ currency: string;
38
+ amount: string;
39
+ clientOid: string;
40
+ direction: BrokerTransferDirection;
41
+ accountType: BrokerAccountType;
42
+ specialUid: string;
43
+ specialAccountType: BrokerAccountType;
44
+ }
45
+ export interface GetBrokerDepositListRequest {
46
+ currency?: string;
47
+ status?: 'PROCESSING' | 'SUCCESS' | 'FAILURE';
48
+ hash?: string;
49
+ startTimestamp?: number;
50
+ endTimestamp?: number;
51
+ limit?: number;
52
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=broker.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"broker.types.js","sourceRoot":"","sources":["../../../../src/types/request/broker.types.ts"],"names":[],"mappings":""}
@@ -14,7 +14,7 @@ export interface GetSpotTransactionsRequest {
14
14
  export interface AccountHFTransactionsRequest {
15
15
  currency?: string;
16
16
  direction?: 'in' | 'out';
17
- bizType?: 'TRANSFER' | 'TRADE_EXCHANGE';
17
+ bizType?: 'TRANSFER' | 'TRADE_EXCHANGE' | 'RETURNED_FEES' | 'DEDUCTION_FEES' | 'OTHER';
18
18
  lastId?: number;
19
19
  limit?: number;
20
20
  startAt?: number;
@@ -74,7 +74,7 @@ export interface SubmitWithdrawV3Request {
74
74
  */
75
75
  export interface GetTransferableRequest {
76
76
  currency: string;
77
- type: 'MAIN' | 'TRADE' | 'TRADE_HF' | 'MARGIN' | 'ISOLATED' | 'OPTION';
77
+ type: 'MAIN' | 'TRADE' | 'TRADE_HF' | 'MARGIN' | 'ISOLATED' | 'OPTION' | 'MARGIN_V2' | 'ISOLATED_V2';
78
78
  tag?: string;
79
79
  }
80
80
  export interface FlexTransferRequest {
@@ -0,0 +1,92 @@
1
+ export interface BrokerInfo {
2
+ accountSize: number;
3
+ maxAccountSize: number | null;
4
+ level: number;
5
+ }
6
+ export interface CreateBrokerSubAccountResponse {
7
+ accountName: string;
8
+ uid: string;
9
+ createdAt: number;
10
+ level: number;
11
+ }
12
+ export interface BrokerSubAccount {
13
+ accountName: string;
14
+ uid: string;
15
+ createdAt: number;
16
+ level: number;
17
+ }
18
+ export interface GetBrokerSubAccountsResponse {
19
+ currentPage: number;
20
+ pageSize: number;
21
+ totalNum: number;
22
+ totalPage: number;
23
+ items: BrokerSubAccount[];
24
+ }
25
+ export interface CreateBrokerSubAccountApiResponse {
26
+ uid: string;
27
+ label: string;
28
+ apiKey: string;
29
+ secretKey: string;
30
+ apiVersion: number;
31
+ permissions: string[];
32
+ ipWhitelist: string[];
33
+ createdAt: number;
34
+ }
35
+ export interface BrokerSubAccountApi {
36
+ uid: string;
37
+ label: string;
38
+ apiKey: string;
39
+ apiVersion: number;
40
+ permissions: ('General' | 'Spot' | 'Futures')[];
41
+ ipWhitelist: string[];
42
+ createdAt: number;
43
+ }
44
+ export type BrokerTransferAccountType = 'MAIN' | 'TRADE' | 'CONTRACT' | 'MARGIN' | 'ISOLATED';
45
+ export type BrokerTransferStatus = 'PROCESSING' | 'SUCCESS' | 'FAILURE';
46
+ export interface BrokerTransferHistory {
47
+ orderId: string;
48
+ currency: string;
49
+ amount: string;
50
+ fromUid: number;
51
+ fromAccountType: BrokerTransferAccountType;
52
+ fromAccountTag: string;
53
+ toUid: number;
54
+ toAccountType: BrokerTransferAccountType;
55
+ toAccountTag: string;
56
+ status: BrokerTransferStatus;
57
+ reason: string | null;
58
+ createdAt: number;
59
+ }
60
+ export interface BrokerDepositRecord {
61
+ uid: number;
62
+ hash: string;
63
+ address: string;
64
+ memo: string;
65
+ amount: string;
66
+ fee: string;
67
+ currency: string;
68
+ isInner: boolean;
69
+ walletTxId: string;
70
+ status: BrokerTransferStatus;
71
+ remark: string;
72
+ chain: string;
73
+ createdAt: number;
74
+ updatedAt: number;
75
+ }
76
+ export type BrokerWithdrawalStatus = 'PROCESSING' | 'WALLET_PROCESSING' | 'REVIEW' | 'SUCCESS' | 'FAILURE';
77
+ export interface BrokerWithdrawalRecord {
78
+ id: string;
79
+ chain: string;
80
+ walletTxId: string;
81
+ uid: number;
82
+ amount: string;
83
+ memo: string;
84
+ fee: string;
85
+ address: string;
86
+ remark: string;
87
+ isInner: boolean;
88
+ currency: string;
89
+ status: BrokerWithdrawalStatus;
90
+ createdAt: number;
91
+ updatedAt: number;
92
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=broker.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"broker.types.js","sourceRoot":"","sources":["../../../../src/types/response/broker.types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kucoin-api",
3
- "version": "2.0.3",
3
+ "version": "2.1.1",
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",