okx-api 1.3.6 → 1.4.0
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/README.md +22 -11
- package/lib/rest-client.d.ts +523 -43
- package/lib/rest-client.js +600 -48
- package/lib/rest-client.js.map +1 -1
- package/lib/types/rest/request/account.d.ts +93 -0
- package/lib/types/rest/request/block-trading.d.ts +16 -0
- package/lib/types/rest/request/copy-trading.d.ts +117 -0
- package/lib/types/rest/request/copy-trading.js +3 -0
- package/lib/types/rest/request/copy-trading.js.map +1 -0
- package/lib/types/rest/request/funding.d.ts +7 -0
- package/lib/types/rest/request/grid-trading.d.ts +14 -0
- package/lib/types/rest/request/index.d.ts +5 -0
- package/lib/types/rest/request/index.js +5 -0
- package/lib/types/rest/request/index.js.map +1 -1
- package/lib/types/rest/request/public.d.ts +40 -0
- package/lib/types/rest/request/recurring-buy.d.ts +28 -0
- package/lib/types/rest/request/recurring-buy.js +3 -0
- package/lib/types/rest/request/recurring-buy.js.map +1 -0
- package/lib/types/rest/request/signal-bot.d.ts +97 -0
- package/lib/types/rest/request/signal-bot.js +3 -0
- package/lib/types/rest/request/signal-bot.js.map +1 -0
- package/lib/types/rest/request/simple-earn.d.ts +23 -0
- package/lib/types/rest/request/simple-earn.js +3 -0
- package/lib/types/rest/request/simple-earn.js.map +1 -0
- package/lib/types/rest/request/spread-trading.d.ts +69 -0
- package/lib/types/rest/request/spread-trading.js +3 -0
- package/lib/types/rest/request/spread-trading.js.map +1 -0
- package/lib/types/rest/request/subaccount.d.ts +21 -0
- package/lib/types/rest/request/trade.d.ts +4 -0
- package/lib/types/rest/response/index.d.ts +4 -0
- package/lib/types/rest/response/index.js +4 -0
- package/lib/types/rest/response/index.js.map +1 -1
- package/lib/types/rest/response/private-account.d.ts +113 -0
- package/lib/types/rest/response/private-block-trading.d.ts +35 -0
- package/lib/types/rest/response/private-copy-trading.d.ts +259 -0
- package/lib/types/rest/response/private-copy-trading.js +3 -0
- package/lib/types/rest/response/private-copy-trading.js.map +1 -0
- package/lib/types/rest/response/private-funding.d.ts +14 -0
- package/lib/types/rest/response/private-recurring-buy.d.ts +63 -0
- package/lib/types/rest/response/private-recurring-buy.js +3 -0
- package/lib/types/rest/response/private-recurring-buy.js.map +1 -0
- package/lib/types/rest/response/private-signal-bot.d.ts +22 -0
- package/lib/types/rest/response/private-signal-bot.js +3 -0
- package/lib/types/rest/response/private-signal-bot.js.map +1 -0
- package/lib/types/rest/response/private-spread-trading.d.ts +125 -0
- package/lib/types/rest/response/private-spread-trading.js +3 -0
- package/lib/types/rest/response/private-spread-trading.js.map +1 -0
- package/lib/types/rest/response/private-subaccount.d.ts +16 -0
- package/lib/types/rest/response/private-trade.d.ts +5 -0
- package/lib/types/rest/response/public-data.d.ts +27 -0
- package/package.json +1 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export interface PlaceSpreadOrderRequest {
|
|
2
|
+
sprdId: string;
|
|
3
|
+
clOrdId?: string;
|
|
4
|
+
tag?: string;
|
|
5
|
+
side: 'buy' | 'sell';
|
|
6
|
+
ordType: 'limit' | 'post_only' | 'ioc';
|
|
7
|
+
sz: string;
|
|
8
|
+
px: string;
|
|
9
|
+
}
|
|
10
|
+
export interface UpdateSpreadOrderRequest {
|
|
11
|
+
ordId?: string;
|
|
12
|
+
clOrdId?: string;
|
|
13
|
+
reqId?: string;
|
|
14
|
+
newSz?: string;
|
|
15
|
+
newPx?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface GetActiveSpreadOrdersRequest {
|
|
18
|
+
sprdId?: string;
|
|
19
|
+
ordType?: 'limit' | 'post_only' | 'ioc';
|
|
20
|
+
state?: 'live' | 'partially_filled';
|
|
21
|
+
beginId?: string;
|
|
22
|
+
endId?: string;
|
|
23
|
+
limit?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface GetSpreadOrderHistoryRequest {
|
|
26
|
+
sprdId?: string;
|
|
27
|
+
ordType?: 'limit' | 'post_only' | 'ioc';
|
|
28
|
+
state?: 'canceled' | 'filled';
|
|
29
|
+
beginId?: string;
|
|
30
|
+
endId?: string;
|
|
31
|
+
begin?: string;
|
|
32
|
+
end?: string;
|
|
33
|
+
limit?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface GetSpreadOrderHistoryArchiveRequest {
|
|
36
|
+
sprdId?: string;
|
|
37
|
+
ordType?: 'limit' | 'post_only' | 'ioc';
|
|
38
|
+
state?: 'canceled' | 'filled';
|
|
39
|
+
instType?: 'SPOT' | 'FUTURES' | 'SWAP';
|
|
40
|
+
instFamily?: string;
|
|
41
|
+
beginId?: string;
|
|
42
|
+
endId?: string;
|
|
43
|
+
begin?: string;
|
|
44
|
+
end?: string;
|
|
45
|
+
limit?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface GetSpreadTradesRequest {
|
|
48
|
+
sprdId?: string;
|
|
49
|
+
tradeId?: string;
|
|
50
|
+
ordId?: string;
|
|
51
|
+
beginId?: string;
|
|
52
|
+
endId?: string;
|
|
53
|
+
begin?: string;
|
|
54
|
+
end?: string;
|
|
55
|
+
limit?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface GetSpreadsRequest {
|
|
58
|
+
baseCcy?: string;
|
|
59
|
+
instId?: string;
|
|
60
|
+
sprdId?: string;
|
|
61
|
+
state?: 'live' | 'suspend' | 'expired';
|
|
62
|
+
}
|
|
63
|
+
export interface GetSpreadCandlesRequest {
|
|
64
|
+
sprdId: string;
|
|
65
|
+
bar?: string;
|
|
66
|
+
after?: string;
|
|
67
|
+
before?: string;
|
|
68
|
+
limit?: string;
|
|
69
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spread-trading.js","sourceRoot":"","sources":["../../../../src/types/rest/request/spread-trading.ts"],"names":[],"mappings":""}
|
|
@@ -9,4 +9,25 @@ export interface SubAccountTransferRequest {
|
|
|
9
9
|
loanTrans?: boolean;
|
|
10
10
|
omitPosRisk?: boolean;
|
|
11
11
|
}
|
|
12
|
+
export interface GetSubAccountMaxWithdrawalsRequest {
|
|
13
|
+
subAcct: string;
|
|
14
|
+
ccy?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface GetManagedSubAccountTransferHistoryRequest {
|
|
17
|
+
ccy?: string;
|
|
18
|
+
type?: '0' | '1';
|
|
19
|
+
subAcct?: string;
|
|
20
|
+
subUid?: string;
|
|
21
|
+
after?: string;
|
|
22
|
+
before?: string;
|
|
23
|
+
limit?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface LoanAllocation {
|
|
26
|
+
subAcct: string;
|
|
27
|
+
loanAlloc: string;
|
|
28
|
+
}
|
|
29
|
+
export interface SetSubAccountLoanAllocationRequest {
|
|
30
|
+
enable: boolean;
|
|
31
|
+
alloc?: LoanAllocation[];
|
|
32
|
+
}
|
|
12
33
|
export {};
|
|
@@ -4,3 +4,7 @@ export * from './private-funding';
|
|
|
4
4
|
export * from './private-subaccount';
|
|
5
5
|
export * from './private-trade';
|
|
6
6
|
export * from './public-data';
|
|
7
|
+
export * from './private-signal-bot';
|
|
8
|
+
export * from './private-recurring-buy';
|
|
9
|
+
export * from './private-copy-trading';
|
|
10
|
+
export * from './private-spread-trading';
|
|
@@ -20,4 +20,8 @@ __exportStar(require("./private-funding"), exports);
|
|
|
20
20
|
__exportStar(require("./private-subaccount"), exports);
|
|
21
21
|
__exportStar(require("./private-trade"), exports);
|
|
22
22
|
__exportStar(require("./public-data"), exports);
|
|
23
|
+
__exportStar(require("./private-signal-bot"), exports);
|
|
24
|
+
__exportStar(require("./private-recurring-buy"), exports);
|
|
25
|
+
__exportStar(require("./private-copy-trading"), exports);
|
|
26
|
+
__exportStar(require("./private-spread-trading"), exports);
|
|
23
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/rest/response/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,0DAAwC;AACxC,oDAAkC;AAClC,uDAAqC;AACrC,kDAAgC;AAChC,gDAA8B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/rest/response/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,0DAAwC;AACxC,oDAAkC;AAClC,uDAAqC;AACrC,kDAAgC;AAChC,gDAA8B;AAC9B,uDAAqC;AACrC,0DAAwC;AACxC,yDAAuC;AACvC,2DAAyC"}
|
|
@@ -292,3 +292,116 @@ export interface WithdrawalHistory {
|
|
|
292
292
|
wdId: string;
|
|
293
293
|
clientId: string;
|
|
294
294
|
}
|
|
295
|
+
export interface AccountInstrument {
|
|
296
|
+
baseCcy: string;
|
|
297
|
+
ctMult: string;
|
|
298
|
+
ctType: string;
|
|
299
|
+
ctVal: string;
|
|
300
|
+
ctValCcy: string;
|
|
301
|
+
expTime: string;
|
|
302
|
+
instFamily: string;
|
|
303
|
+
instId: string;
|
|
304
|
+
instType: string;
|
|
305
|
+
lever: string;
|
|
306
|
+
listTime: string;
|
|
307
|
+
lotSz: string;
|
|
308
|
+
maxIcebergSz: string;
|
|
309
|
+
maxLmtAmt: string;
|
|
310
|
+
maxLmtSz: string;
|
|
311
|
+
maxMktAmt: string;
|
|
312
|
+
maxMktSz: string;
|
|
313
|
+
maxStopSz: string;
|
|
314
|
+
maxTriggerSz: string;
|
|
315
|
+
maxTwapSz: string;
|
|
316
|
+
minSz: string;
|
|
317
|
+
optType: string;
|
|
318
|
+
quoteCcy: string;
|
|
319
|
+
settleCcy: string;
|
|
320
|
+
state: string;
|
|
321
|
+
stk: string;
|
|
322
|
+
tickSz: string;
|
|
323
|
+
}
|
|
324
|
+
export interface QuickMarginBorrowRepayResult {
|
|
325
|
+
instId: string;
|
|
326
|
+
ccy: string;
|
|
327
|
+
side: 'borrow' | 'repay';
|
|
328
|
+
amt: string;
|
|
329
|
+
posSide: string;
|
|
330
|
+
ts: string;
|
|
331
|
+
}
|
|
332
|
+
export interface QuickMarginBorrowRepayRecord {
|
|
333
|
+
instId: string;
|
|
334
|
+
ccy: string;
|
|
335
|
+
side: 'borrow' | 'repay';
|
|
336
|
+
accBorrowed: string;
|
|
337
|
+
amt: string;
|
|
338
|
+
refId: string;
|
|
339
|
+
ts: string;
|
|
340
|
+
}
|
|
341
|
+
export interface VIPInterest {
|
|
342
|
+
ordId: string;
|
|
343
|
+
ccy: string;
|
|
344
|
+
interest: string;
|
|
345
|
+
interestRate: string;
|
|
346
|
+
liab: string;
|
|
347
|
+
ts: string;
|
|
348
|
+
}
|
|
349
|
+
export interface VIPLoanOrder {
|
|
350
|
+
ts: string;
|
|
351
|
+
nextRefreshTime: string;
|
|
352
|
+
ccy: string;
|
|
353
|
+
ordId: string;
|
|
354
|
+
state: '1' | '2' | '3' | '4' | '5';
|
|
355
|
+
origRate: string;
|
|
356
|
+
curRate: string;
|
|
357
|
+
dueAmt: string;
|
|
358
|
+
borrowAmt: string;
|
|
359
|
+
repayAmt: string;
|
|
360
|
+
}
|
|
361
|
+
export interface VIPLoanOrderDetail {
|
|
362
|
+
amt: string;
|
|
363
|
+
ccy: string;
|
|
364
|
+
failReason: string;
|
|
365
|
+
rate: string;
|
|
366
|
+
ts: string;
|
|
367
|
+
type: '1' | '2' | '3' | '4';
|
|
368
|
+
}
|
|
369
|
+
export interface FixedLoanBorrowingLimitDetail {
|
|
370
|
+
ccy: string;
|
|
371
|
+
used: string;
|
|
372
|
+
borrowed: string;
|
|
373
|
+
availBorrow: string;
|
|
374
|
+
minBorrow: string;
|
|
375
|
+
}
|
|
376
|
+
export interface FixedLoanBorrowingLimit {
|
|
377
|
+
totalBorrowLmt: string;
|
|
378
|
+
totalAvailBorrow: string;
|
|
379
|
+
borrowed: string;
|
|
380
|
+
used: string;
|
|
381
|
+
availRepay: string;
|
|
382
|
+
details: FixedLoanBorrowingLimitDetail[];
|
|
383
|
+
ts: string;
|
|
384
|
+
}
|
|
385
|
+
export interface FixedLoanBorrowQuote {
|
|
386
|
+
ccy: string;
|
|
387
|
+
term: string;
|
|
388
|
+
estAvailBorrow: string;
|
|
389
|
+
estRate: string;
|
|
390
|
+
estInterest: string;
|
|
391
|
+
penaltyInterest: string;
|
|
392
|
+
ts: string;
|
|
393
|
+
}
|
|
394
|
+
export interface SetMMPConfigResult {
|
|
395
|
+
instFamily: string;
|
|
396
|
+
timeInterval: string;
|
|
397
|
+
frozenInterval: string;
|
|
398
|
+
qtyLimit: string;
|
|
399
|
+
}
|
|
400
|
+
export interface MMPConfig {
|
|
401
|
+
frozenInterval: string;
|
|
402
|
+
instFamily: string;
|
|
403
|
+
mmpFrozen: boolean;
|
|
404
|
+
mmpFrozenUntil: string;
|
|
405
|
+
qtyLimit: string;
|
|
406
|
+
timeInterval: string;
|
|
407
|
+
}
|
|
@@ -87,3 +87,38 @@ export interface GetBlockQuoteResult {
|
|
|
87
87
|
clRfqId: string;
|
|
88
88
|
traderCode: string;
|
|
89
89
|
}
|
|
90
|
+
export interface BlockMakerInstrumentData {
|
|
91
|
+
uly?: string;
|
|
92
|
+
instId?: string;
|
|
93
|
+
maxBlockSz?: string;
|
|
94
|
+
makerPxBand?: string;
|
|
95
|
+
}
|
|
96
|
+
export interface BlockMakerInstrumentSettings {
|
|
97
|
+
instType: string;
|
|
98
|
+
includeALL: boolean;
|
|
99
|
+
data: BlockMakerInstrumentData[];
|
|
100
|
+
}
|
|
101
|
+
export interface SetMmpConfigResult {
|
|
102
|
+
timeInterval: string;
|
|
103
|
+
frozenInterval: string;
|
|
104
|
+
countLimit: string;
|
|
105
|
+
}
|
|
106
|
+
export interface BlockMMPConfig {
|
|
107
|
+
frozenInterval: string;
|
|
108
|
+
mmpFrozen: boolean;
|
|
109
|
+
mmpFrozenUntil: string;
|
|
110
|
+
countLimit: string;
|
|
111
|
+
timeInterval: string;
|
|
112
|
+
}
|
|
113
|
+
export interface PublicBlockTrade {
|
|
114
|
+
instId: string;
|
|
115
|
+
tradeId: string;
|
|
116
|
+
px: string;
|
|
117
|
+
sz: string;
|
|
118
|
+
side: 'buy' | 'sell';
|
|
119
|
+
fillVol?: string;
|
|
120
|
+
fwdPx?: string;
|
|
121
|
+
idxPx?: string;
|
|
122
|
+
markPx?: string;
|
|
123
|
+
ts: string;
|
|
124
|
+
}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
export interface CurrentSubposition {
|
|
2
|
+
algoId: string;
|
|
3
|
+
ccy: string;
|
|
4
|
+
instId: string;
|
|
5
|
+
instType: string;
|
|
6
|
+
lever: string;
|
|
7
|
+
margin: string;
|
|
8
|
+
markPx: string;
|
|
9
|
+
mgnMode: string;
|
|
10
|
+
openAvgPx: string;
|
|
11
|
+
openOrdId: string;
|
|
12
|
+
openTime: string;
|
|
13
|
+
posSide: string;
|
|
14
|
+
slOrdPx: string;
|
|
15
|
+
slTriggerPx: string;
|
|
16
|
+
subPos: string;
|
|
17
|
+
subPosId: string;
|
|
18
|
+
tpOrdPx: string;
|
|
19
|
+
tpTriggerPx: string;
|
|
20
|
+
uniqueCode: string;
|
|
21
|
+
upl: string;
|
|
22
|
+
uplRatio: string;
|
|
23
|
+
availSubPos: string;
|
|
24
|
+
}
|
|
25
|
+
export interface SubpositionsHistory {
|
|
26
|
+
ccy: string;
|
|
27
|
+
closeAvgPx: string;
|
|
28
|
+
closeTime: string;
|
|
29
|
+
instId: string;
|
|
30
|
+
instType: string;
|
|
31
|
+
lever: string;
|
|
32
|
+
margin: string;
|
|
33
|
+
markPx: string;
|
|
34
|
+
mgnMode: string;
|
|
35
|
+
openAvgPx: string;
|
|
36
|
+
openOrdId: string;
|
|
37
|
+
openTime: string;
|
|
38
|
+
pnl: string;
|
|
39
|
+
pnlRatio: string;
|
|
40
|
+
posSide: string;
|
|
41
|
+
profitSharingAmt: string;
|
|
42
|
+
subPos: string;
|
|
43
|
+
closeSubPos: string;
|
|
44
|
+
type: string;
|
|
45
|
+
subPosId: string;
|
|
46
|
+
uniqueCode: string;
|
|
47
|
+
}
|
|
48
|
+
export interface PlaceCTAlgoOrderResult {
|
|
49
|
+
subPosId: string;
|
|
50
|
+
tag: string;
|
|
51
|
+
}
|
|
52
|
+
export interface GetCTProfitDetailsResult {
|
|
53
|
+
ccy: string;
|
|
54
|
+
nickName: string;
|
|
55
|
+
profitSharingAmt: string;
|
|
56
|
+
profitSharingId: string;
|
|
57
|
+
portLink: string;
|
|
58
|
+
ts: string;
|
|
59
|
+
instType: string;
|
|
60
|
+
}
|
|
61
|
+
export interface GetCTTotalProfitResult {
|
|
62
|
+
ccy: string;
|
|
63
|
+
totalProfitSharingAmt: string;
|
|
64
|
+
instType: string;
|
|
65
|
+
}
|
|
66
|
+
export interface GetCTUnrealizedProfitResult {
|
|
67
|
+
ccy: string;
|
|
68
|
+
nickName: string;
|
|
69
|
+
portLink: string;
|
|
70
|
+
ts: string;
|
|
71
|
+
unrealizedProfitSharingAmt: string;
|
|
72
|
+
instType: string;
|
|
73
|
+
}
|
|
74
|
+
export interface AccountConfigurationDetails {
|
|
75
|
+
copyTraderNum: string;
|
|
76
|
+
instType: 'SPOT' | 'SWAP';
|
|
77
|
+
maxCopyTraderNum: string;
|
|
78
|
+
profitSharingRatio: string;
|
|
79
|
+
roleType: '0' | '1' | '2';
|
|
80
|
+
}
|
|
81
|
+
export interface GetAccountConfigurationResult {
|
|
82
|
+
uniqueCode: string;
|
|
83
|
+
nickName: string;
|
|
84
|
+
portLink: string;
|
|
85
|
+
details: AccountConfigurationDetails[];
|
|
86
|
+
}
|
|
87
|
+
export interface CopySettingsInstId {
|
|
88
|
+
instId: string;
|
|
89
|
+
enabled: string;
|
|
90
|
+
}
|
|
91
|
+
export interface GetCopySettingsResult {
|
|
92
|
+
ccy: string;
|
|
93
|
+
copyAmt: string;
|
|
94
|
+
copyInstIdType: 'custom' | 'copy';
|
|
95
|
+
copyMgnMode: 'cross' | 'isolated' | 'copy';
|
|
96
|
+
copyMode: 'fixed_amount' | 'ratio_copy';
|
|
97
|
+
copyRatio: string;
|
|
98
|
+
copyState: '0' | '1';
|
|
99
|
+
copyTotalAmt: string;
|
|
100
|
+
instIds: CopySettingsInstId[];
|
|
101
|
+
slRatio: string;
|
|
102
|
+
slTotalAmt: string;
|
|
103
|
+
subPosCloseType: 'market_close' | 'copy_close' | 'manual_close';
|
|
104
|
+
tpRatio: string;
|
|
105
|
+
}
|
|
106
|
+
export interface LeverageInfo {
|
|
107
|
+
lever: string;
|
|
108
|
+
posSide: 'long' | 'short';
|
|
109
|
+
}
|
|
110
|
+
export interface GetCTBatchLeverageInfoResult {
|
|
111
|
+
instId: string;
|
|
112
|
+
mgnMode: 'cross' | 'isolated';
|
|
113
|
+
leadTraderLevers: LeverageInfo[];
|
|
114
|
+
myLevers: LeverageInfo[];
|
|
115
|
+
}
|
|
116
|
+
export interface SetCTBatchLeverageResult {
|
|
117
|
+
succInstId: string;
|
|
118
|
+
failInstId: string;
|
|
119
|
+
result: '0' | '1' | '2';
|
|
120
|
+
}
|
|
121
|
+
export interface GetCTMyLeadTradersResult {
|
|
122
|
+
portLink: string;
|
|
123
|
+
nickName: string;
|
|
124
|
+
margin: string;
|
|
125
|
+
copyTotalAmt: string;
|
|
126
|
+
copyTotalPnl: string;
|
|
127
|
+
uniqueCode: string;
|
|
128
|
+
ccy: string;
|
|
129
|
+
profitSharingRatio: string;
|
|
130
|
+
beginCopyTime: string;
|
|
131
|
+
upl: string;
|
|
132
|
+
todayPnl: string;
|
|
133
|
+
leadMode: 'public' | 'private';
|
|
134
|
+
}
|
|
135
|
+
export interface GetCTHistoryLeadTradersResult {
|
|
136
|
+
portLink: string;
|
|
137
|
+
nickName: string;
|
|
138
|
+
uniqueCode: string;
|
|
139
|
+
copyNum: string;
|
|
140
|
+
copyTotalAmt: string;
|
|
141
|
+
copyTotalPnl: string;
|
|
142
|
+
copyAmt: string;
|
|
143
|
+
copyMode: 'fixed_amount' | 'ratio_copy';
|
|
144
|
+
copyRatio: string;
|
|
145
|
+
ccy: string;
|
|
146
|
+
profitSharingRatio: string;
|
|
147
|
+
beginCopyTime: string;
|
|
148
|
+
endCopyTime: string;
|
|
149
|
+
copyRelId: string;
|
|
150
|
+
copyState: '0' | '1';
|
|
151
|
+
leadMode: 'public' | 'private';
|
|
152
|
+
}
|
|
153
|
+
export interface GetCopyTradingConfigResult {
|
|
154
|
+
maxCopyAmt: string;
|
|
155
|
+
minCopyAmt: string;
|
|
156
|
+
maxCopyTotalAmt: string;
|
|
157
|
+
minCopyRatio: string;
|
|
158
|
+
maxCopyRatio: string;
|
|
159
|
+
maxTpRatio: string;
|
|
160
|
+
maxSlRatio: string;
|
|
161
|
+
}
|
|
162
|
+
export interface PnlRatio {
|
|
163
|
+
beginTs: string;
|
|
164
|
+
pnlRatio: string;
|
|
165
|
+
}
|
|
166
|
+
export interface LeadTraderRank {
|
|
167
|
+
accCopyTraderNum: string;
|
|
168
|
+
aum: string;
|
|
169
|
+
ccy: string;
|
|
170
|
+
copyState: '0' | '1';
|
|
171
|
+
copyTraderNum: string;
|
|
172
|
+
leadDays: string;
|
|
173
|
+
maxCopyTraderNum: string;
|
|
174
|
+
nickName: string;
|
|
175
|
+
pnl: string;
|
|
176
|
+
pnlRatio: string;
|
|
177
|
+
pnlRatios: PnlRatio[];
|
|
178
|
+
portLink: string;
|
|
179
|
+
traderInsts: string[];
|
|
180
|
+
uniqueCode: string;
|
|
181
|
+
winRatio: string;
|
|
182
|
+
}
|
|
183
|
+
export interface GetLeadTraderRanksResult {
|
|
184
|
+
dataVer: string;
|
|
185
|
+
ranks: LeadTraderRank[];
|
|
186
|
+
totalPage: string;
|
|
187
|
+
}
|
|
188
|
+
export interface LeadTraderPnl {
|
|
189
|
+
beginTs: string;
|
|
190
|
+
pnl: string;
|
|
191
|
+
pnlRatio: string;
|
|
192
|
+
}
|
|
193
|
+
export interface LeadTraderStats {
|
|
194
|
+
avgSubPosNotional: string;
|
|
195
|
+
ccy: string;
|
|
196
|
+
curCopyTraderPnl: string;
|
|
197
|
+
investAmt: string;
|
|
198
|
+
lossDays: string;
|
|
199
|
+
profitDays: string;
|
|
200
|
+
winRatio: string;
|
|
201
|
+
}
|
|
202
|
+
export interface LeadTraderPreference {
|
|
203
|
+
ccy: string;
|
|
204
|
+
ratio: string;
|
|
205
|
+
}
|
|
206
|
+
export interface LeadTraderCurrentPosition {
|
|
207
|
+
ccy: string;
|
|
208
|
+
instId: string;
|
|
209
|
+
instType: string;
|
|
210
|
+
lever: string;
|
|
211
|
+
margin: string;
|
|
212
|
+
markPx: string;
|
|
213
|
+
mgnMode: string;
|
|
214
|
+
openAvgPx: string;
|
|
215
|
+
openTime: string;
|
|
216
|
+
posSide: string;
|
|
217
|
+
subPos: string;
|
|
218
|
+
subPosId: string;
|
|
219
|
+
uniqueCode: string;
|
|
220
|
+
upl: string;
|
|
221
|
+
uplRatio: string;
|
|
222
|
+
}
|
|
223
|
+
export interface LeadTraderPositionHistory {
|
|
224
|
+
ccy: string;
|
|
225
|
+
closeAvgPx: string;
|
|
226
|
+
closeTime: string;
|
|
227
|
+
instId: string;
|
|
228
|
+
instType: string;
|
|
229
|
+
lever: string;
|
|
230
|
+
margin: string;
|
|
231
|
+
mgnMode: string;
|
|
232
|
+
openAvgPx: string;
|
|
233
|
+
openTime: string;
|
|
234
|
+
pnl: string;
|
|
235
|
+
pnlRatio: string;
|
|
236
|
+
posSide: string;
|
|
237
|
+
subPos: string;
|
|
238
|
+
subPosId: string;
|
|
239
|
+
uniqueCode: string;
|
|
240
|
+
}
|
|
241
|
+
export interface CopyTraderInfo {
|
|
242
|
+
beginCopyTime: string;
|
|
243
|
+
nickName: string;
|
|
244
|
+
portLink: string;
|
|
245
|
+
pnl: string;
|
|
246
|
+
}
|
|
247
|
+
export interface GetCopyTradersResult {
|
|
248
|
+
copyTotalPnl: string;
|
|
249
|
+
ccy: string;
|
|
250
|
+
copyTraderNumChg: string;
|
|
251
|
+
copyTraderNumChgRatio: string;
|
|
252
|
+
copyTraders: CopyTraderInfo[];
|
|
253
|
+
}
|
|
254
|
+
export interface GetPrivateLeadTraderRanksResult {
|
|
255
|
+
dataVer: string;
|
|
256
|
+
chanType: 'OKX' | 'ND';
|
|
257
|
+
ranks: LeadTraderRank[];
|
|
258
|
+
totalPage: string;
|
|
259
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-copy-trading.js","sourceRoot":"","sources":["../../../../src/types/rest/response/private-copy-trading.ts"],"names":[],"mappings":""}
|
|
@@ -73,3 +73,17 @@ export interface WithdrawResponse {
|
|
|
73
73
|
wdId: string;
|
|
74
74
|
clientId: string;
|
|
75
75
|
}
|
|
76
|
+
export interface NonTradableAsset {
|
|
77
|
+
ccy: string;
|
|
78
|
+
name: string;
|
|
79
|
+
logoLink: string;
|
|
80
|
+
bal: string;
|
|
81
|
+
canWd: boolean;
|
|
82
|
+
chain: string;
|
|
83
|
+
minWd: string;
|
|
84
|
+
wdAll: boolean;
|
|
85
|
+
fee: string;
|
|
86
|
+
ctAddr: string;
|
|
87
|
+
wdTickSz: string;
|
|
88
|
+
needTag: boolean;
|
|
89
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export interface RecurringBuyOrderResult {
|
|
2
|
+
algoId: string;
|
|
3
|
+
algoClOrdId: string;
|
|
4
|
+
sCode: string;
|
|
5
|
+
sMsg: string;
|
|
6
|
+
}
|
|
7
|
+
export interface RecurringBuyInfoResult {
|
|
8
|
+
ccy: string;
|
|
9
|
+
ratio: string;
|
|
10
|
+
}
|
|
11
|
+
export interface RecurringBuyOrder {
|
|
12
|
+
algoId: string;
|
|
13
|
+
algoClOrdId: string;
|
|
14
|
+
instType: string;
|
|
15
|
+
cTime: string;
|
|
16
|
+
uTime: string;
|
|
17
|
+
algoOrdType: 'recurring';
|
|
18
|
+
state: 'running' | 'stopping';
|
|
19
|
+
stgyName: string;
|
|
20
|
+
recurringList: RecurringBuyInfoResult[];
|
|
21
|
+
period: 'monthly' | 'weekly' | 'daily' | 'hourly';
|
|
22
|
+
recurringDay?: string;
|
|
23
|
+
recurringHour?: string;
|
|
24
|
+
recurringTime: string;
|
|
25
|
+
timeZone: string;
|
|
26
|
+
amt: string;
|
|
27
|
+
investmentAmt: string;
|
|
28
|
+
investmentCcy: 'USDT' | 'USDC';
|
|
29
|
+
totalPnl: string;
|
|
30
|
+
totalAnnRate: string;
|
|
31
|
+
pnlRatio: string;
|
|
32
|
+
mktCap: string;
|
|
33
|
+
cycles: string;
|
|
34
|
+
tag: string;
|
|
35
|
+
}
|
|
36
|
+
export interface RecurringBuyInfoOrder {
|
|
37
|
+
ccy: string;
|
|
38
|
+
ratio: string;
|
|
39
|
+
totalAmt: string;
|
|
40
|
+
profit: string;
|
|
41
|
+
avgPx: string;
|
|
42
|
+
px: string;
|
|
43
|
+
}
|
|
44
|
+
export interface RecurringBuySubOrder {
|
|
45
|
+
algoId: string;
|
|
46
|
+
instType: string;
|
|
47
|
+
instId: string;
|
|
48
|
+
algoOrdType: 'recurring';
|
|
49
|
+
ordId: string;
|
|
50
|
+
cTime: string;
|
|
51
|
+
uTime: string;
|
|
52
|
+
tdMode: 'cross' | 'cash';
|
|
53
|
+
ordType: 'market';
|
|
54
|
+
sz: string;
|
|
55
|
+
state: 'canceled' | 'live' | 'partially_filled' | 'filled' | 'cancelling';
|
|
56
|
+
side: 'buy' | 'sell';
|
|
57
|
+
px: string;
|
|
58
|
+
fee: string;
|
|
59
|
+
feeCcy: string;
|
|
60
|
+
avgPx: string;
|
|
61
|
+
accFillSz: string;
|
|
62
|
+
tag: string;
|
|
63
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-recurring-buy.js","sourceRoot":"","sources":["../../../../src/types/rest/response/private-recurring-buy.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface CreateSignalResult {
|
|
2
|
+
signalChanId: string;
|
|
3
|
+
signalToken: string;
|
|
4
|
+
}
|
|
5
|
+
export interface GetSignalsResult {
|
|
6
|
+
signalChanId: string;
|
|
7
|
+
signalChanName: string;
|
|
8
|
+
signalChanDesc: string;
|
|
9
|
+
signalChanToken: string;
|
|
10
|
+
signalSourceType: string;
|
|
11
|
+
}
|
|
12
|
+
export interface CreateSignalBotResult {
|
|
13
|
+
algoId: string;
|
|
14
|
+
algoClOrdId: string;
|
|
15
|
+
sCode: string;
|
|
16
|
+
sMsg: string;
|
|
17
|
+
}
|
|
18
|
+
export interface CancelSignalBotsResult {
|
|
19
|
+
algoId: string;
|
|
20
|
+
sCode: string;
|
|
21
|
+
sMsg: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-signal-bot.js","sourceRoot":"","sources":["../../../../src/types/rest/response/private-signal-bot.ts"],"names":[],"mappings":""}
|