bitget-api 3.1.6 → 3.1.8
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/index.d.ts +8 -0
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/rest-client-v2.d.ts +45 -6
- package/dist/cjs/rest-client-v2.js +73 -0
- package/dist/cjs/rest-client-v2.js.map +1 -1
- package/dist/cjs/rest-client-v3.d.ts +110 -5
- package/dist/cjs/rest-client-v3.js +176 -1
- package/dist/cjs/rest-client-v3.js.map +1 -1
- package/dist/cjs/types/request/v2/broker.d.ts +68 -0
- package/dist/cjs/types/request/v2/common.d.ts +7 -0
- package/dist/cjs/types/request/v2/earn.d.ts +38 -0
- package/dist/cjs/types/request/v3/account.d.ts +16 -0
- package/dist/cjs/types/request/v3/broker.d.ts +2 -2
- package/dist/cjs/types/request/v3/copytrading.d.ts +15 -0
- package/dist/cjs/types/request/v3/copytrading.js +3 -0
- package/dist/cjs/types/request/v3/copytrading.js.map +1 -0
- package/dist/cjs/types/request/v3/earn.d.ts +38 -0
- package/dist/cjs/types/request/v3/earn.js +10 -0
- package/dist/cjs/types/request/v3/earn.js.map +1 -0
- package/dist/cjs/types/request/v3/p2p.d.ts +105 -0
- package/dist/cjs/types/request/v3/p2p.js +3 -0
- package/dist/cjs/types/request/v3/p2p.js.map +1 -0
- package/dist/cjs/types/request/v3/public.d.ts +4 -0
- package/dist/cjs/types/request/v3/strategy.d.ts +28 -13
- package/dist/cjs/types/request/v3/trade.d.ts +3 -0
- package/dist/cjs/types/response/v2/broker.d.ts +98 -0
- package/dist/cjs/types/response/v2/common.d.ts +8 -0
- package/dist/cjs/types/response/v2/earn.d.ts +115 -0
- package/dist/cjs/types/response/v2/spot.d.ts +2 -0
- package/dist/cjs/types/response/v3/account.d.ts +45 -1
- package/dist/cjs/types/response/v3/broker.d.ts +3 -3
- package/dist/cjs/types/response/v3/copytrading.d.ts +54 -0
- package/dist/cjs/types/response/v3/copytrading.js +10 -0
- package/dist/cjs/types/response/v3/copytrading.js.map +1 -0
- package/dist/cjs/types/response/v3/earn.d.ts +114 -0
- package/dist/cjs/types/response/v3/earn.js +10 -0
- package/dist/cjs/types/response/v3/earn.js.map +1 -0
- package/dist/cjs/types/response/v3/p2p.d.ts +202 -0
- package/dist/cjs/types/response/v3/p2p.js +3 -0
- package/dist/cjs/types/response/v3/p2p.js.map +1 -0
- package/dist/cjs/types/response/v3/public.d.ts +19 -0
- package/dist/cjs/types/response/v3/strategy.d.ts +15 -8
- package/dist/cjs/types/response/v3/trade.d.ts +2 -1
- package/dist/cjs/types/websockets/ws-api-request.d.ts +3 -0
- package/dist/cjs/types/websockets/ws-api.d.ts +2 -0
- package/dist/cjs/types/websockets/ws-general.d.ts +1 -1
- package/dist/cjs/util/websocket-util.js +1 -0
- package/dist/cjs/util/websocket-util.js.map +1 -1
- package/dist/mjs/index.d.ts +8 -0
- package/dist/mjs/index.js +8 -0
- package/dist/mjs/index.js.map +1 -1
- package/dist/mjs/rest-client-v2.d.ts +45 -6
- package/dist/mjs/rest-client-v2.js +73 -0
- package/dist/mjs/rest-client-v2.js.map +1 -1
- package/dist/mjs/rest-client-v3.d.ts +110 -5
- package/dist/mjs/rest-client-v3.js +176 -1
- package/dist/mjs/rest-client-v3.js.map +1 -1
- package/dist/mjs/types/request/v2/broker.d.ts +68 -0
- package/dist/mjs/types/request/v2/common.d.ts +7 -0
- package/dist/mjs/types/request/v2/earn.d.ts +38 -0
- package/dist/mjs/types/request/v3/account.d.ts +16 -0
- package/dist/mjs/types/request/v3/broker.d.ts +2 -2
- package/dist/mjs/types/request/v3/copytrading.d.ts +15 -0
- package/dist/mjs/types/request/v3/copytrading.js +2 -0
- package/dist/mjs/types/request/v3/copytrading.js.map +1 -0
- package/dist/mjs/types/request/v3/earn.d.ts +38 -0
- package/dist/mjs/types/request/v3/earn.js +9 -0
- package/dist/mjs/types/request/v3/earn.js.map +1 -0
- package/dist/mjs/types/request/v3/p2p.d.ts +105 -0
- package/dist/mjs/types/request/v3/p2p.js +2 -0
- package/dist/mjs/types/request/v3/p2p.js.map +1 -0
- package/dist/mjs/types/request/v3/public.d.ts +4 -0
- package/dist/mjs/types/request/v3/strategy.d.ts +28 -13
- package/dist/mjs/types/request/v3/trade.d.ts +3 -0
- package/dist/mjs/types/response/v2/broker.d.ts +98 -0
- package/dist/mjs/types/response/v2/common.d.ts +8 -0
- package/dist/mjs/types/response/v2/earn.d.ts +115 -0
- package/dist/mjs/types/response/v2/spot.d.ts +2 -0
- package/dist/mjs/types/response/v3/account.d.ts +45 -1
- package/dist/mjs/types/response/v3/broker.d.ts +3 -3
- package/dist/mjs/types/response/v3/copytrading.d.ts +54 -0
- package/dist/mjs/types/response/v3/copytrading.js +9 -0
- package/dist/mjs/types/response/v3/copytrading.js.map +1 -0
- package/dist/mjs/types/response/v3/earn.d.ts +114 -0
- package/dist/mjs/types/response/v3/earn.js +9 -0
- package/dist/mjs/types/response/v3/earn.js.map +1 -0
- package/dist/mjs/types/response/v3/p2p.d.ts +202 -0
- package/dist/mjs/types/response/v3/p2p.js +2 -0
- package/dist/mjs/types/response/v3/p2p.js.map +1 -0
- package/dist/mjs/types/response/v3/public.d.ts +19 -0
- package/dist/mjs/types/response/v3/strategy.d.ts +15 -8
- package/dist/mjs/types/response/v3/trade.d.ts +2 -1
- package/dist/mjs/types/websockets/ws-api-request.d.ts +3 -0
- package/dist/mjs/types/websockets/ws-api.d.ts +2 -0
- package/dist/mjs/types/websockets/ws-general.d.ts +1 -1
- package/dist/mjs/util/websocket-util.js +1 -0
- package/dist/mjs/util/websocket-util.js.map +1 -1
- package/llms.txt +7178 -5570
- package/package.json +1 -1
|
@@ -292,3 +292,118 @@ export interface EarnLoanLiquidationRecordsV2 {
|
|
|
292
292
|
runlockAmount: string;
|
|
293
293
|
repayLoanAmount: string;
|
|
294
294
|
}
|
|
295
|
+
/**
|
|
296
|
+
*
|
|
297
|
+
*
|
|
298
|
+
* Earn | On-Chain Elite
|
|
299
|
+
*
|
|
300
|
+
*
|
|
301
|
+
*/
|
|
302
|
+
export interface EarnEliteSubscriptionCoinV2 {
|
|
303
|
+
subscriptionCoin: string;
|
|
304
|
+
precision: string;
|
|
305
|
+
feeRate: string;
|
|
306
|
+
exchangeRate: string;
|
|
307
|
+
remainQuota?: string;
|
|
308
|
+
minAmount?: string;
|
|
309
|
+
}
|
|
310
|
+
export interface EarnEliteProductV2 {
|
|
311
|
+
productId: string;
|
|
312
|
+
coin: string;
|
|
313
|
+
minApr: string;
|
|
314
|
+
maxApr: string;
|
|
315
|
+
subscriptionCoinList: EarnEliteSubscriptionCoinV2[];
|
|
316
|
+
sellOut: 'YES' | 'NO' | string;
|
|
317
|
+
}
|
|
318
|
+
export interface EarnEliteAssetProjectV2 {
|
|
319
|
+
projectName: string;
|
|
320
|
+
}
|
|
321
|
+
export interface EarnEliteAssetV2 {
|
|
322
|
+
productId: string;
|
|
323
|
+
productCoin: string;
|
|
324
|
+
holdingAmount: string;
|
|
325
|
+
usdtHoldingAmount: string;
|
|
326
|
+
exchangeRate: string;
|
|
327
|
+
apr: string;
|
|
328
|
+
minApy?: string;
|
|
329
|
+
maxApy?: string;
|
|
330
|
+
subscriptionCoin: string;
|
|
331
|
+
exchangeAmount: string;
|
|
332
|
+
projectList?: EarnEliteAssetProjectV2[];
|
|
333
|
+
unsettledBGPoints: string;
|
|
334
|
+
interestCoin: string;
|
|
335
|
+
totalProfit: string;
|
|
336
|
+
}
|
|
337
|
+
export interface EarnEliteAssetsV2 {
|
|
338
|
+
resultList: EarnEliteAssetV2[];
|
|
339
|
+
}
|
|
340
|
+
export interface EarnEliteRecordV2 {
|
|
341
|
+
recordId: string;
|
|
342
|
+
productId: string;
|
|
343
|
+
coin: string;
|
|
344
|
+
status: string;
|
|
345
|
+
exchangeRate: string;
|
|
346
|
+
receivedCoin: string;
|
|
347
|
+
receivedAmount: string;
|
|
348
|
+
investAmount: string;
|
|
349
|
+
feeRate: string;
|
|
350
|
+
redeemType?: string | string[];
|
|
351
|
+
receivingAccount: string;
|
|
352
|
+
actualReceivingAccount: string;
|
|
353
|
+
paymentAccount?: string[];
|
|
354
|
+
settlePoints: string;
|
|
355
|
+
fee: string;
|
|
356
|
+
}
|
|
357
|
+
export interface EarnEliteRecordsV2 {
|
|
358
|
+
recordList: EarnEliteRecordV2[];
|
|
359
|
+
endId: string;
|
|
360
|
+
}
|
|
361
|
+
export interface EarnEliteSubscribeInfoV2 {
|
|
362
|
+
productSubId: string;
|
|
363
|
+
minAmount: string;
|
|
364
|
+
remainQuota: string;
|
|
365
|
+
exchangeRate: string;
|
|
366
|
+
productCoin: string;
|
|
367
|
+
interestTime: string;
|
|
368
|
+
settleTime: string;
|
|
369
|
+
precision: string;
|
|
370
|
+
feeRate: string;
|
|
371
|
+
/** Present for BGUSD per API docs. */
|
|
372
|
+
subscriptionCoinList?: EarnEliteSubscriptionCoinV2[];
|
|
373
|
+
}
|
|
374
|
+
export interface EarnEliteSubscribeResultV2 {
|
|
375
|
+
orderId: string;
|
|
376
|
+
}
|
|
377
|
+
export interface EarnEliteSubscribeStatusV2 {
|
|
378
|
+
result: 'settled' | 'pending' | 'rejected' | string;
|
|
379
|
+
}
|
|
380
|
+
export interface EarnEliteRedeemInfoBgusdReceiveCoinV2 {
|
|
381
|
+
bgusdReceiveCoin: string;
|
|
382
|
+
bgusdExchangeRate: string;
|
|
383
|
+
}
|
|
384
|
+
export interface EarnEliteRedeemModeV2 {
|
|
385
|
+
redeemFeeRate: string;
|
|
386
|
+
remainQuota: string;
|
|
387
|
+
redeemType: 'fast' | 'standard' | string;
|
|
388
|
+
redeemScale: string;
|
|
389
|
+
redeemDelayDate: string;
|
|
390
|
+
minRedeemAmount: string;
|
|
391
|
+
redeemTime: string;
|
|
392
|
+
}
|
|
393
|
+
export interface EarnEliteRedeemInfoV2 {
|
|
394
|
+
productId: string;
|
|
395
|
+
productSubId: string;
|
|
396
|
+
productCoin: string;
|
|
397
|
+
subscriptionCoin: string;
|
|
398
|
+
profitCoin: string;
|
|
399
|
+
exchangeRate: string;
|
|
400
|
+
totalUnPayInterestAmount: string;
|
|
401
|
+
preSettleApr: string;
|
|
402
|
+
receivedCoin: string;
|
|
403
|
+
unsettledPoints: string;
|
|
404
|
+
bgusdReceiveCoinList: EarnEliteRedeemInfoBgusdReceiveCoinV2[];
|
|
405
|
+
redeemModeList: EarnEliteRedeemModeV2[];
|
|
406
|
+
}
|
|
407
|
+
export interface RedeemEarnEliteResultV2 {
|
|
408
|
+
orderId: string;
|
|
409
|
+
}
|
|
@@ -8,12 +8,41 @@ export interface AccountCoinConfigV3 {
|
|
|
8
8
|
coin: string;
|
|
9
9
|
leverage: string;
|
|
10
10
|
}
|
|
11
|
+
export type AccountPermissionV3 = 'uta_mgt' | 'uta_trade' | 'withdraw' | 'copy_futures_position' | 'copy_futures_order';
|
|
12
|
+
export interface AccountInfoV3 {
|
|
13
|
+
userId: string;
|
|
14
|
+
inviterId: string;
|
|
15
|
+
/** Only set when the calling account is a sub-account */
|
|
16
|
+
parentId: string;
|
|
17
|
+
channelCode: string;
|
|
18
|
+
channel: string;
|
|
19
|
+
ips: string;
|
|
20
|
+
permType: 'read-only' | 'read-and-write';
|
|
21
|
+
permissions: AccountPermissionV3[];
|
|
22
|
+
regisTime: string;
|
|
23
|
+
}
|
|
24
|
+
export type AccountLevelV3 = 'basic' | 'advanced' | 'isolated' | 'delta';
|
|
11
25
|
export interface AccountSettingsV3 {
|
|
26
|
+
uid: string;
|
|
27
|
+
accountMode: 'unified' | 'hybrid' | 'upgrading' | 'switching';
|
|
12
28
|
assetMode: string;
|
|
29
|
+
accountLevel: AccountLevelV3;
|
|
13
30
|
holdMode: string;
|
|
31
|
+
stpMode: 'none' | 'cancel_taker' | 'cancel_maker' | 'cancel_both';
|
|
14
32
|
symbolConfigList: AccountSymbolConfigV3[];
|
|
15
33
|
coinConfigList: AccountCoinConfigV3[];
|
|
16
34
|
}
|
|
35
|
+
export interface AccountDeltaCoinPositionV3 {
|
|
36
|
+
coin: string;
|
|
37
|
+
positionRatio: string;
|
|
38
|
+
}
|
|
39
|
+
/** Delta-neutral mode metrics. Only available when accountLevel is delta. */
|
|
40
|
+
export interface AccountDeltaInfoV3 {
|
|
41
|
+
deltaEquityRatio: string;
|
|
42
|
+
deltaThreshold: string;
|
|
43
|
+
positionThreshold: string;
|
|
44
|
+
list: AccountDeltaCoinPositionV3[];
|
|
45
|
+
}
|
|
17
46
|
export interface AccountAssetV3 {
|
|
18
47
|
coin: string;
|
|
19
48
|
equity: string;
|
|
@@ -106,11 +135,26 @@ export interface SubAccountV3 {
|
|
|
106
135
|
username: string;
|
|
107
136
|
status: string;
|
|
108
137
|
accountMode: string;
|
|
109
|
-
type:
|
|
138
|
+
type: 'normal' | 'virtual' | 'custodian';
|
|
110
139
|
note: string;
|
|
111
140
|
createdTime: string;
|
|
112
141
|
updatedTime: string;
|
|
113
142
|
}
|
|
143
|
+
export interface WithdrawAddressBookEntryV3 {
|
|
144
|
+
coin: string;
|
|
145
|
+
chain: string;
|
|
146
|
+
address: string;
|
|
147
|
+
countryCode: string;
|
|
148
|
+
label: string;
|
|
149
|
+
memo: string;
|
|
150
|
+
type: 'regular' | 'EVM' | 'universal' | 'internal';
|
|
151
|
+
internalType: '' | 'uid' | 'mobile' | 'email';
|
|
152
|
+
createdTime: string;
|
|
153
|
+
}
|
|
154
|
+
export interface WithdrawAddressBookV3 {
|
|
155
|
+
addressList: WithdrawAddressBookEntryV3[];
|
|
156
|
+
cursor?: string;
|
|
157
|
+
}
|
|
114
158
|
export interface TransferResponseV3 {
|
|
115
159
|
transferId: string;
|
|
116
160
|
}
|
|
@@ -73,7 +73,7 @@ export interface CreateBrokerSubApiKeyResponseV3 {
|
|
|
73
73
|
label: string;
|
|
74
74
|
apiKey: string;
|
|
75
75
|
secretKey: string;
|
|
76
|
-
permType: '
|
|
76
|
+
permType: 'read_write' | 'read_only';
|
|
77
77
|
permList: string[];
|
|
78
78
|
ipList: string[] | null;
|
|
79
79
|
}
|
|
@@ -81,7 +81,7 @@ export interface ModifyBrokerSubApiKeyResponseV3 {
|
|
|
81
81
|
subUid: string;
|
|
82
82
|
label: string;
|
|
83
83
|
apiKey: string;
|
|
84
|
-
permType: '
|
|
84
|
+
permType: 'read_write' | 'read_only';
|
|
85
85
|
permList: string[];
|
|
86
86
|
ipList: string[];
|
|
87
87
|
}
|
|
@@ -90,7 +90,7 @@ export interface GetBrokerSubApiKeyResponseV3 {
|
|
|
90
90
|
label: string;
|
|
91
91
|
apiKey: string;
|
|
92
92
|
secretKey: string;
|
|
93
|
-
permType: '
|
|
93
|
+
permType: 'read_write' | 'read_only';
|
|
94
94
|
permList: string[];
|
|
95
95
|
ipList: string[] | null;
|
|
96
96
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
*
|
|
4
|
+
* Copy Trading | Futures (UTA)
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export interface CopyFuturesMarginDetailV3 {
|
|
9
|
+
marginCoin: string;
|
|
10
|
+
maxLongCount: string;
|
|
11
|
+
remainingLongCount: string;
|
|
12
|
+
maxShortCount: string;
|
|
13
|
+
remainingShortCount: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CopyFuturesTradingPairV3 {
|
|
16
|
+
symbol: string;
|
|
17
|
+
leverage: string;
|
|
18
|
+
marginDetails: CopyFuturesMarginDetailV3[];
|
|
19
|
+
}
|
|
20
|
+
export interface CopyFuturesPositionSummaryV3 {
|
|
21
|
+
unrealizedPnl: string;
|
|
22
|
+
realizedPnl: string;
|
|
23
|
+
holdSize: string;
|
|
24
|
+
avgPrice: string;
|
|
25
|
+
symbol: string;
|
|
26
|
+
leverage: string;
|
|
27
|
+
marginMode: string;
|
|
28
|
+
liqPrice: string;
|
|
29
|
+
margin: string;
|
|
30
|
+
holdSide: string;
|
|
31
|
+
roi: string;
|
|
32
|
+
markPrice: string;
|
|
33
|
+
positionValue: string;
|
|
34
|
+
}
|
|
35
|
+
export interface CopyFuturesMaxTransferableV3 {
|
|
36
|
+
maxTransferable: string;
|
|
37
|
+
available: string;
|
|
38
|
+
}
|
|
39
|
+
export interface CopyFuturesTransferResponseV3 {
|
|
40
|
+
transferId: string;
|
|
41
|
+
}
|
|
42
|
+
export type CopyFuturesTransferAccountTypeV3 = 'spot' | 'uta' | 'lead';
|
|
43
|
+
export interface CopyFuturesTransferRecordV3 {
|
|
44
|
+
transferId: string;
|
|
45
|
+
fromType: CopyFuturesTransferAccountTypeV3;
|
|
46
|
+
toType: CopyFuturesTransferAccountTypeV3;
|
|
47
|
+
amount: string;
|
|
48
|
+
coin: string;
|
|
49
|
+
status: 'Successful' | 'Failed' | 'Processing';
|
|
50
|
+
createdTime: string;
|
|
51
|
+
}
|
|
52
|
+
export interface CopyFuturesTransferRecordListV3 {
|
|
53
|
+
list: CopyFuturesTransferRecordV3[];
|
|
54
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copytrading.js","sourceRoot":"","sources":["../../../../../src/types/response/v3/copytrading.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
*
|
|
4
|
+
* Earn | On-Chain Elite (UTA)
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export interface EarnEliteSubscriptionCoinV3 {
|
|
9
|
+
subscriptionCoin: string;
|
|
10
|
+
precision: string;
|
|
11
|
+
feeRate: string;
|
|
12
|
+
exchangeRate: string;
|
|
13
|
+
remainQuota?: string;
|
|
14
|
+
minAmount?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface EarnEliteProductV3 {
|
|
17
|
+
productId: string;
|
|
18
|
+
coin: string;
|
|
19
|
+
minApr: string;
|
|
20
|
+
maxApr: string;
|
|
21
|
+
subscriptionCoinList: EarnEliteSubscriptionCoinV3[];
|
|
22
|
+
sellOut: 'YES' | 'NO' | string;
|
|
23
|
+
}
|
|
24
|
+
export interface EarnEliteAssetProjectV3 {
|
|
25
|
+
projectName: string;
|
|
26
|
+
}
|
|
27
|
+
export interface EarnEliteAssetV3 {
|
|
28
|
+
productId: string;
|
|
29
|
+
productCoin: string;
|
|
30
|
+
holdingAmount: string;
|
|
31
|
+
usdtHoldingAmount: string;
|
|
32
|
+
exchangeRate: string;
|
|
33
|
+
apr: string;
|
|
34
|
+
minApy?: string;
|
|
35
|
+
maxApy?: string;
|
|
36
|
+
subscriptionCoin: string;
|
|
37
|
+
exchangeAmount: string;
|
|
38
|
+
projectList?: EarnEliteAssetProjectV3[];
|
|
39
|
+
unsettledBGPoints: string;
|
|
40
|
+
interestCoin: string;
|
|
41
|
+
totalProfit: string;
|
|
42
|
+
}
|
|
43
|
+
export interface EarnEliteAssetsV3 {
|
|
44
|
+
resultList: EarnEliteAssetV3[];
|
|
45
|
+
}
|
|
46
|
+
export interface EarnEliteRecordV3 {
|
|
47
|
+
recordId: string;
|
|
48
|
+
productId: string;
|
|
49
|
+
coin: string;
|
|
50
|
+
status: string;
|
|
51
|
+
exchangeRate: string;
|
|
52
|
+
receivedCoin: string;
|
|
53
|
+
receivedAmount: string;
|
|
54
|
+
investAmount: string;
|
|
55
|
+
feeRate: string;
|
|
56
|
+
redeemType?: string | string[];
|
|
57
|
+
receivingAccount: string;
|
|
58
|
+
actualReceivingAccount: string;
|
|
59
|
+
paymentAccount?: string[];
|
|
60
|
+
settlePoints: string;
|
|
61
|
+
fee: string;
|
|
62
|
+
}
|
|
63
|
+
export interface EarnEliteRecordsV3 {
|
|
64
|
+
recordList: EarnEliteRecordV3[];
|
|
65
|
+
endId: string;
|
|
66
|
+
}
|
|
67
|
+
export interface EarnEliteSubscribeInfoV3 {
|
|
68
|
+
productSubId: string;
|
|
69
|
+
minAmount: string;
|
|
70
|
+
remainQuota: string;
|
|
71
|
+
exchangeRate: string;
|
|
72
|
+
productCoin: string;
|
|
73
|
+
interestTime: string;
|
|
74
|
+
settleTime: string;
|
|
75
|
+
precision: string;
|
|
76
|
+
feeRate: string;
|
|
77
|
+
subscriptionCoinList?: EarnEliteSubscriptionCoinV3[];
|
|
78
|
+
}
|
|
79
|
+
export interface EarnEliteSubscribeResultV3 {
|
|
80
|
+
orderId: string;
|
|
81
|
+
}
|
|
82
|
+
export interface EarnEliteSubscribeStatusV3 {
|
|
83
|
+
result: 'settled' | 'pending' | 'rejected' | string;
|
|
84
|
+
}
|
|
85
|
+
export interface EarnEliteRedeemInfoBgusdReceiveCoinV3 {
|
|
86
|
+
bgusdReceiveCoin: string;
|
|
87
|
+
bgusdExchangeRate: string;
|
|
88
|
+
}
|
|
89
|
+
export interface EarnEliteRedeemModeV3 {
|
|
90
|
+
redeemFeeRate: string;
|
|
91
|
+
remainQuota: string;
|
|
92
|
+
redeemType: 'fast' | 'standard' | string;
|
|
93
|
+
redeemScale: string;
|
|
94
|
+
redeemDelayDate: string;
|
|
95
|
+
minRedeemAmount: string;
|
|
96
|
+
redeemTime: string;
|
|
97
|
+
}
|
|
98
|
+
export interface EarnEliteRedeemInfoV3 {
|
|
99
|
+
productId: string;
|
|
100
|
+
productSubId: string;
|
|
101
|
+
productCoin: string;
|
|
102
|
+
subscriptionCoin: string;
|
|
103
|
+
profitCoin: string;
|
|
104
|
+
exchangeRate: string;
|
|
105
|
+
totalUnPayInterestAmount: string;
|
|
106
|
+
preSettleApr: string;
|
|
107
|
+
receivedCoin: string;
|
|
108
|
+
unsettledPoints: string;
|
|
109
|
+
bgusdReceiveCoinList: EarnEliteRedeemInfoBgusdReceiveCoinV3[];
|
|
110
|
+
redeemModeList: EarnEliteRedeemModeV3[];
|
|
111
|
+
}
|
|
112
|
+
export interface RedeemEarnEliteResultV3 {
|
|
113
|
+
orderId: string;
|
|
114
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"earn.js","sourceRoot":"","sources":["../../../../../src/types/response/v3/earn.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import type { P2pAdStatusV3, P2pMarketTypeV3, P2pOrderStatusV3, P2pPriceTypeV3, P2pSideV3 } from '../../request/v3/p2p.js';
|
|
2
|
+
export interface P2pPayMethodInfoFieldV3 {
|
|
3
|
+
name: string;
|
|
4
|
+
type: 'file' | 'number' | 'txt';
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
export interface P2pPayMethodV3 {
|
|
8
|
+
payMethodId: string;
|
|
9
|
+
payMethodName: string;
|
|
10
|
+
payMethodUserName: string;
|
|
11
|
+
userPayMethodId: string;
|
|
12
|
+
payMethodInfo: P2pPayMethodInfoFieldV3[];
|
|
13
|
+
}
|
|
14
|
+
export interface P2pTokenDetailV3 {
|
|
15
|
+
token: string;
|
|
16
|
+
precision: string;
|
|
17
|
+
}
|
|
18
|
+
export interface P2pFiatPayMethodV3 {
|
|
19
|
+
payMethodName: string;
|
|
20
|
+
iconUrl: string;
|
|
21
|
+
payMethodId: string;
|
|
22
|
+
}
|
|
23
|
+
export interface P2pWithdrawalLimitV3 {
|
|
24
|
+
withdrawLimitKey: string;
|
|
25
|
+
withdrawLimitValue: string;
|
|
26
|
+
}
|
|
27
|
+
export interface P2pFiatDetailV3 {
|
|
28
|
+
fiat: string;
|
|
29
|
+
precision: string;
|
|
30
|
+
floatRateMin: string;
|
|
31
|
+
floatRateMax: string;
|
|
32
|
+
fixedRateMin: string;
|
|
33
|
+
fixedRateMax: string;
|
|
34
|
+
adMinLimit: string;
|
|
35
|
+
adMaxLimit: string;
|
|
36
|
+
payMethods: P2pFiatPayMethodV3;
|
|
37
|
+
withdrawalLimit: P2pWithdrawalLimitV3;
|
|
38
|
+
payTimeLimit: number[];
|
|
39
|
+
}
|
|
40
|
+
export interface P2pCurrenciesV3 {
|
|
41
|
+
tokenDetailList: P2pTokenDetailV3[];
|
|
42
|
+
fiatDetailList: P2pFiatDetailV3[];
|
|
43
|
+
}
|
|
44
|
+
export interface P2pUserEquityDetailV3 {
|
|
45
|
+
maxAdvSellNum: string;
|
|
46
|
+
maxAdvSellLimit: string;
|
|
47
|
+
maxAdvBuyNum: string;
|
|
48
|
+
maxAdvBuyLimit: string;
|
|
49
|
+
totalMaxPendingOrder: string;
|
|
50
|
+
advMaxPendingOrder: string;
|
|
51
|
+
}
|
|
52
|
+
export interface P2pUserInfoV3 {
|
|
53
|
+
uid: string;
|
|
54
|
+
nickName: string;
|
|
55
|
+
accountLevel: 'starter' | 'advanced' | 'master';
|
|
56
|
+
completedOrderNum: string;
|
|
57
|
+
positiveRate: string;
|
|
58
|
+
completedOrderNum30D: string;
|
|
59
|
+
completedRate30D: string;
|
|
60
|
+
avgPayTime30D: string;
|
|
61
|
+
avgReleaseTime30D: string;
|
|
62
|
+
equityDetail: P2pUserEquityDetailV3;
|
|
63
|
+
registerTime: string;
|
|
64
|
+
}
|
|
65
|
+
export interface P2pBalanceV3 {
|
|
66
|
+
token: string;
|
|
67
|
+
totalBalance: string;
|
|
68
|
+
frozenBalance: string;
|
|
69
|
+
availableBalance: string;
|
|
70
|
+
}
|
|
71
|
+
export interface P2pExchangeRateV3 {
|
|
72
|
+
rate: string;
|
|
73
|
+
}
|
|
74
|
+
export interface P2pFeeSimulateV3 {
|
|
75
|
+
feeToken: string;
|
|
76
|
+
feeAmount: string;
|
|
77
|
+
taxToken: string;
|
|
78
|
+
taxAmount: string;
|
|
79
|
+
}
|
|
80
|
+
export interface P2pAdLimitV3 {
|
|
81
|
+
buyMinTokenAmount: string;
|
|
82
|
+
buyMaxTokenAmount: string;
|
|
83
|
+
sellMinTokenAmount: string;
|
|
84
|
+
sellMaxTokenAmount: string;
|
|
85
|
+
}
|
|
86
|
+
export interface P2pCreateAdResponseV3 {
|
|
87
|
+
advId: string;
|
|
88
|
+
}
|
|
89
|
+
export interface P2pAdPayMethodRefV3 {
|
|
90
|
+
payMethodId: string;
|
|
91
|
+
userPayMethodId?: string;
|
|
92
|
+
}
|
|
93
|
+
export interface P2pAdInfoV3 {
|
|
94
|
+
advId: string;
|
|
95
|
+
side: P2pSideV3;
|
|
96
|
+
priceType: P2pPriceTypeV3;
|
|
97
|
+
token: string;
|
|
98
|
+
fiat: string;
|
|
99
|
+
price: string;
|
|
100
|
+
amount: string;
|
|
101
|
+
minAmount: string;
|
|
102
|
+
maxAmount: string;
|
|
103
|
+
payDuration: string;
|
|
104
|
+
soldAmount: string;
|
|
105
|
+
lastAmount: string;
|
|
106
|
+
premium: string;
|
|
107
|
+
turnover: string;
|
|
108
|
+
remark: string;
|
|
109
|
+
tradeTerm: string;
|
|
110
|
+
payMethodIds: P2pAdPayMethodRefV3[];
|
|
111
|
+
tokenPrecision: string;
|
|
112
|
+
fiatPrecision: string;
|
|
113
|
+
market: P2pMarketTypeV3;
|
|
114
|
+
avgTime: string;
|
|
115
|
+
createdTime: string;
|
|
116
|
+
updatedTime: string;
|
|
117
|
+
}
|
|
118
|
+
export interface P2pPublicAdListItemV3 {
|
|
119
|
+
advId: string;
|
|
120
|
+
merchantId: string;
|
|
121
|
+
merchantName: string;
|
|
122
|
+
token: string;
|
|
123
|
+
fiat: string;
|
|
124
|
+
side: P2pSideV3;
|
|
125
|
+
price: string;
|
|
126
|
+
minAmount: string;
|
|
127
|
+
maxAmount: string;
|
|
128
|
+
quantity: string;
|
|
129
|
+
payMethods: {
|
|
130
|
+
payMethodId: string;
|
|
131
|
+
payMethodName: string;
|
|
132
|
+
}[];
|
|
133
|
+
completedOrderNum: string;
|
|
134
|
+
completedRate: string;
|
|
135
|
+
avgReleaseTime: string;
|
|
136
|
+
createdTime: string;
|
|
137
|
+
}
|
|
138
|
+
export interface P2pMyAdListItemV3 {
|
|
139
|
+
advId: string;
|
|
140
|
+
side: P2pSideV3;
|
|
141
|
+
priceType: P2pPriceTypeV3;
|
|
142
|
+
token: string;
|
|
143
|
+
fiat: string;
|
|
144
|
+
price: string;
|
|
145
|
+
soldAmount: string;
|
|
146
|
+
lastAmount: string;
|
|
147
|
+
payMethods: {
|
|
148
|
+
payMethodId: string;
|
|
149
|
+
}[];
|
|
150
|
+
status: P2pAdStatusV3;
|
|
151
|
+
createdTime: string;
|
|
152
|
+
updatedTime: string;
|
|
153
|
+
}
|
|
154
|
+
export interface P2pCursorListV3<T> {
|
|
155
|
+
items: T[];
|
|
156
|
+
nextId?: string;
|
|
157
|
+
}
|
|
158
|
+
export interface P2pOrderListItemV3 {
|
|
159
|
+
orderId: string;
|
|
160
|
+
side: P2pSideV3;
|
|
161
|
+
token: string;
|
|
162
|
+
fiat: string;
|
|
163
|
+
price: string;
|
|
164
|
+
amount: string;
|
|
165
|
+
quantity: string;
|
|
166
|
+
fee: string;
|
|
167
|
+
counterparty: string;
|
|
168
|
+
status: P2pOrderStatusV3;
|
|
169
|
+
createdTime: string;
|
|
170
|
+
updatedTime: string;
|
|
171
|
+
}
|
|
172
|
+
export interface P2pOrderPayMethodDetailV3 {
|
|
173
|
+
payMethodId: string;
|
|
174
|
+
payMethodName: string;
|
|
175
|
+
payMethodUserName: string;
|
|
176
|
+
postscript: string;
|
|
177
|
+
payMethodInfo: P2pPayMethodInfoFieldV3[];
|
|
178
|
+
}
|
|
179
|
+
export interface P2pOrderUserInfoV3 {
|
|
180
|
+
nickName: string;
|
|
181
|
+
realName: string;
|
|
182
|
+
}
|
|
183
|
+
export interface P2pOrderInfoV3 {
|
|
184
|
+
orderId: string;
|
|
185
|
+
side: P2pSideV3;
|
|
186
|
+
token: string;
|
|
187
|
+
fiat: string;
|
|
188
|
+
price: string;
|
|
189
|
+
quantity: string;
|
|
190
|
+
amount: string;
|
|
191
|
+
status: P2pOrderStatusV3;
|
|
192
|
+
advId: string;
|
|
193
|
+
remark: string;
|
|
194
|
+
orderCancelCountdown: string;
|
|
195
|
+
fee: string;
|
|
196
|
+
verifyCapital: 'yes' | 'no';
|
|
197
|
+
payMethodDetail?: P2pOrderPayMethodDetailV3;
|
|
198
|
+
sellUserInfo: P2pOrderUserInfoV3;
|
|
199
|
+
buyUserInfo: P2pOrderUserInfoV3;
|
|
200
|
+
createdTime: string;
|
|
201
|
+
updatedTime: string;
|
|
202
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"p2p.js","sourceRoot":"","sources":["../../../../../src/types/response/v3/p2p.ts"],"names":[],"mappings":""}
|
|
@@ -64,11 +64,30 @@ export interface RiskReserveRecordV3 {
|
|
|
64
64
|
balance: string;
|
|
65
65
|
amount: string;
|
|
66
66
|
ts: string;
|
|
67
|
+
type?: string;
|
|
67
68
|
}
|
|
68
69
|
export interface RiskReserveV3 {
|
|
70
|
+
totalBalance?: string;
|
|
69
71
|
coin: string;
|
|
70
72
|
riskReserveRecords: RiskReserveRecordV3[];
|
|
71
73
|
}
|
|
74
|
+
export interface RiskReserveHourRecordV3 {
|
|
75
|
+
amount: string;
|
|
76
|
+
balance: string;
|
|
77
|
+
ts: string;
|
|
78
|
+
}
|
|
79
|
+
export interface RiskReserveHourV3 {
|
|
80
|
+
coin: string;
|
|
81
|
+
riskReserveRecords: RiskReserveHourRecordV3[];
|
|
82
|
+
}
|
|
83
|
+
export interface RiskReserveAllItemV3 {
|
|
84
|
+
symbols: string[];
|
|
85
|
+
coin: string;
|
|
86
|
+
balance: string;
|
|
87
|
+
}
|
|
88
|
+
export interface RiskReserveAllV3 {
|
|
89
|
+
list: RiskReserveAllItemV3[];
|
|
90
|
+
}
|
|
72
91
|
export interface InstrumentV3 {
|
|
73
92
|
symbol: string;
|
|
74
93
|
category: 'SPOT' | 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { StrategyOrderStatusV3, StrategyTriggerByV3, StrategyTriggerOrderTypeV3 } from '../../request/v3/strategy.js';
|
|
1
2
|
export interface PlaceStrategyOrderResponseV3 {
|
|
2
3
|
orderId: string;
|
|
3
4
|
clientOid: string;
|
|
@@ -13,14 +14,20 @@ export interface StrategyOrderV3 {
|
|
|
13
14
|
symbol: string;
|
|
14
15
|
qty: string;
|
|
15
16
|
posSide: 'long' | 'short';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
status: StrategyOrderStatusV3;
|
|
18
|
+
triggerType?: 'takeProfit' | 'stopLoss';
|
|
19
|
+
tpTriggerBy?: StrategyTriggerByV3;
|
|
20
|
+
slTriggerBy?: StrategyTriggerByV3;
|
|
21
|
+
takeProfit?: string;
|
|
22
|
+
stopLoss?: string;
|
|
23
|
+
tpOrderType?: StrategyTriggerOrderTypeV3;
|
|
24
|
+
slOrderType?: StrategyTriggerOrderTypeV3;
|
|
25
|
+
tpLimitPrice?: string;
|
|
26
|
+
slLimitPrice?: string;
|
|
27
|
+
triggerBy?: StrategyTriggerByV3;
|
|
28
|
+
triggerPrice?: string;
|
|
29
|
+
triggerOrderType?: StrategyTriggerOrderTypeV3;
|
|
30
|
+
triggerOrderPrice?: string;
|
|
24
31
|
createdTime: string;
|
|
25
32
|
updatedTime: string;
|
|
26
33
|
}
|