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,125 @@
|
|
|
1
|
+
export interface PlaceSpreadOrderResponse {
|
|
2
|
+
ordId: string;
|
|
3
|
+
clOrdId: string;
|
|
4
|
+
tag: string;
|
|
5
|
+
sCode: string;
|
|
6
|
+
sMsg: string;
|
|
7
|
+
}
|
|
8
|
+
export interface CancelSpreadOrderResponse {
|
|
9
|
+
ordId: string;
|
|
10
|
+
clOrdId: string;
|
|
11
|
+
sCode: string;
|
|
12
|
+
sMsg: string;
|
|
13
|
+
}
|
|
14
|
+
export interface UpdateSpreadOrderResponse {
|
|
15
|
+
ordId: string;
|
|
16
|
+
clOrdId: string;
|
|
17
|
+
reqId: string;
|
|
18
|
+
sCode: string;
|
|
19
|
+
sMsg: string;
|
|
20
|
+
}
|
|
21
|
+
export interface SpreadOrder {
|
|
22
|
+
instId: string;
|
|
23
|
+
ordId: string;
|
|
24
|
+
clOrdId: string;
|
|
25
|
+
tag: string;
|
|
26
|
+
px: string;
|
|
27
|
+
sz: string;
|
|
28
|
+
ordType: 'limit' | 'post_only' | 'ioc';
|
|
29
|
+
side: 'buy' | 'sell';
|
|
30
|
+
fillSz: string;
|
|
31
|
+
fillPx: string;
|
|
32
|
+
tradeId: string;
|
|
33
|
+
accFillSz: string;
|
|
34
|
+
pendingFillSz: string;
|
|
35
|
+
pendingSettleSz: string;
|
|
36
|
+
canceledSz: string;
|
|
37
|
+
avgPx: string;
|
|
38
|
+
state: 'canceled' | 'live' | 'partially_filled' | 'filled';
|
|
39
|
+
cancelSource: string;
|
|
40
|
+
uTime: string;
|
|
41
|
+
cTime: string;
|
|
42
|
+
}
|
|
43
|
+
export interface SpreadTradeLeg {
|
|
44
|
+
instId: string;
|
|
45
|
+
px: string;
|
|
46
|
+
sz: string;
|
|
47
|
+
side: 'buy' | 'sell';
|
|
48
|
+
fee: string;
|
|
49
|
+
feeCcy: string;
|
|
50
|
+
tradeId: string;
|
|
51
|
+
}
|
|
52
|
+
export interface SpreadTrade {
|
|
53
|
+
sprdId: string;
|
|
54
|
+
tradeId: string;
|
|
55
|
+
ordId: string;
|
|
56
|
+
clOrdId: string;
|
|
57
|
+
tag: string;
|
|
58
|
+
fillPx: string;
|
|
59
|
+
fillSz: string;
|
|
60
|
+
side: 'buy' | 'sell';
|
|
61
|
+
state: 'filled' | 'rejected';
|
|
62
|
+
execType: 'T' | 'M';
|
|
63
|
+
ts: string;
|
|
64
|
+
legs: SpreadTradeLeg[];
|
|
65
|
+
}
|
|
66
|
+
export interface SpreadLeg {
|
|
67
|
+
instId: string;
|
|
68
|
+
side: 'buy' | 'sell';
|
|
69
|
+
}
|
|
70
|
+
export interface SpreadDetails {
|
|
71
|
+
sprdId: string;
|
|
72
|
+
sprdType: 'linear' | 'inverse' | 'hybrid';
|
|
73
|
+
state: 'live' | 'expired' | 'suspend';
|
|
74
|
+
baseCcy: string;
|
|
75
|
+
szCcy: string;
|
|
76
|
+
quoteCcy: string;
|
|
77
|
+
tickSz: string;
|
|
78
|
+
minSz: string;
|
|
79
|
+
lotSz: string;
|
|
80
|
+
listTime: string;
|
|
81
|
+
expTime: string;
|
|
82
|
+
uTime: string;
|
|
83
|
+
legs: SpreadLeg[];
|
|
84
|
+
}
|
|
85
|
+
export interface OrderBookEntry {
|
|
86
|
+
price: string;
|
|
87
|
+
quantity: string;
|
|
88
|
+
orderCount: string;
|
|
89
|
+
}
|
|
90
|
+
export interface SpreadOrderBook {
|
|
91
|
+
asks: OrderBookEntry[];
|
|
92
|
+
bids: OrderBookEntry[];
|
|
93
|
+
ts: string;
|
|
94
|
+
}
|
|
95
|
+
export interface SpreadTicker {
|
|
96
|
+
sprdId: string;
|
|
97
|
+
last: string;
|
|
98
|
+
lastSz: string;
|
|
99
|
+
askPx: string;
|
|
100
|
+
askSz: string;
|
|
101
|
+
bidPx: string;
|
|
102
|
+
bidSz: string;
|
|
103
|
+
open24h: string;
|
|
104
|
+
high24h: string;
|
|
105
|
+
low24h: string;
|
|
106
|
+
vol24h: string;
|
|
107
|
+
ts: string;
|
|
108
|
+
}
|
|
109
|
+
export interface PublicSpreadTrade {
|
|
110
|
+
sprdId: string;
|
|
111
|
+
tradeId: string;
|
|
112
|
+
px: string;
|
|
113
|
+
sz: string;
|
|
114
|
+
side: 'buy' | 'sell';
|
|
115
|
+
ts: string;
|
|
116
|
+
}
|
|
117
|
+
export interface SpreadCandle {
|
|
118
|
+
ts: string;
|
|
119
|
+
o: string;
|
|
120
|
+
h: string;
|
|
121
|
+
l: string;
|
|
122
|
+
c: string;
|
|
123
|
+
vol: string;
|
|
124
|
+
confirm: string;
|
|
125
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-spread-trading.js","sourceRoot":"","sources":["../../../../src/types/rest/response/private-spread-trading.ts"],"names":[],"mappings":""}
|
|
@@ -54,3 +54,19 @@ export interface SubAccountBalances {
|
|
|
54
54
|
export interface SubAccountTransferResult {
|
|
55
55
|
transId: string;
|
|
56
56
|
}
|
|
57
|
+
export interface SubAccountMaxWithdrawal {
|
|
58
|
+
ccy: string;
|
|
59
|
+
maxWd: string;
|
|
60
|
+
maxWdEx: string;
|
|
61
|
+
spotOffsetMaxWd: string;
|
|
62
|
+
spotOffsetMaxWdEx: string;
|
|
63
|
+
}
|
|
64
|
+
export interface ManagedSubAccountTransfer {
|
|
65
|
+
billId: string;
|
|
66
|
+
ccy: string;
|
|
67
|
+
amt: string;
|
|
68
|
+
type: string;
|
|
69
|
+
subAcct: string;
|
|
70
|
+
subUid: string;
|
|
71
|
+
ts: string;
|
|
72
|
+
}
|
|
@@ -136,4 +136,31 @@ export interface FundingRateHistory {
|
|
|
136
136
|
export interface SystemTime {
|
|
137
137
|
ts: string;
|
|
138
138
|
}
|
|
139
|
+
export interface OptionsTradeInfo {
|
|
140
|
+
instId: string;
|
|
141
|
+
tradeId: string;
|
|
142
|
+
px: string;
|
|
143
|
+
sz: string;
|
|
144
|
+
side: 'buy' | 'sell';
|
|
145
|
+
ts: string;
|
|
146
|
+
}
|
|
147
|
+
export interface OptionTrade {
|
|
148
|
+
vol24h: string;
|
|
149
|
+
optType: 'C' | 'P';
|
|
150
|
+
tradeInfo: OptionsTradeInfo[];
|
|
151
|
+
}
|
|
152
|
+
export interface OptionTrades {
|
|
153
|
+
instId: string;
|
|
154
|
+
instFamily: string;
|
|
155
|
+
tradeId: string;
|
|
156
|
+
px: string;
|
|
157
|
+
sz: string;
|
|
158
|
+
side: 'buy' | 'sell';
|
|
159
|
+
optType: 'C' | 'P';
|
|
160
|
+
fillVol: string;
|
|
161
|
+
fwdPx: string;
|
|
162
|
+
idxPx: string;
|
|
163
|
+
markPx: string;
|
|
164
|
+
ts: string;
|
|
165
|
+
}
|
|
139
166
|
export {};
|
package/package.json
CHANGED