ccxt-ir 4.9.13 → 4.9.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/README.md +4 -4
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +232 -229
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/src/abantether.js +344 -344
- package/dist/cjs/src/abstract/bitbarg.js +1 -1
- package/dist/cjs/src/abstract/bitunix.js +1 -1
- package/dist/cjs/src/abstract/bydfi.js +1 -1
- package/dist/cjs/src/abstract/cafearz.js +1 -1
- package/dist/cjs/src/abstract/hamtapay.js +1 -1
- package/dist/cjs/src/abstract/kifpoolme.js +1 -1
- package/dist/cjs/src/abstract/mazdax.js +1 -1
- package/dist/cjs/src/abstract/pingi.js +1 -1
- package/dist/cjs/src/abstract/pooleno.js +1 -1
- package/dist/cjs/src/abstract/tehran_exchange.js +11 -0
- package/dist/cjs/src/afratether.js +347 -347
- package/dist/cjs/src/arzplus.js +572 -572
- package/dist/cjs/src/bitbarg.js +303 -303
- package/dist/cjs/src/bitunix.js +317 -317
- package/dist/cjs/src/bydfi.js +425 -425
- package/dist/cjs/src/cafearz.js +337 -337
- package/dist/cjs/src/hamtapay.js +291 -291
- package/dist/cjs/src/kcex.js +326 -326
- package/dist/cjs/src/kifpoolme.js +401 -401
- package/dist/cjs/src/mazdax.js +525 -526
- package/dist/cjs/src/pingi.js +437 -438
- package/dist/cjs/src/pooleno.js +338 -338
- package/dist/cjs/src/tehran_exchange.js +334 -0
- package/dist/cjs/src/tetherland.js +358 -358
- package/dist/cjs/src/twox.js +362 -362
- package/dist/cjs/src/xt.js +5171 -5171
- package/js/ccxt.d.ts +676 -673
- package/js/ccxt.js +493 -491
- package/js/src/abantether.js +347 -347
- package/js/src/abstract/abantether.d.ts +8 -8
- package/js/src/abstract/arzplus.d.ts +11 -11
- package/js/src/abstract/bitbarg.d.ts +8 -8
- package/js/src/abstract/bitbarg.js +5 -5
- package/js/src/abstract/bitunix.d.ts +9 -9
- package/js/src/abstract/bitunix.js +5 -5
- package/js/src/abstract/bydfi.d.ts +11 -11
- package/js/src/abstract/bydfi.js +5 -5
- package/js/src/abstract/cafearz.d.ts +8 -8
- package/js/src/abstract/cafearz.js +5 -5
- package/js/src/abstract/hamtapay.d.ts +9 -9
- package/js/src/abstract/hamtapay.js +5 -5
- package/js/src/abstract/kcex.d.ts +10 -10
- package/js/src/abstract/kifpoolme.d.ts +9 -9
- package/js/src/abstract/kifpoolme.js +5 -5
- package/js/src/abstract/mazdax.d.ts +11 -11
- package/js/src/abstract/mazdax.js +5 -5
- package/js/src/abstract/pingi.d.ts +9 -9
- package/js/src/abstract/pingi.js +5 -5
- package/js/src/abstract/pooleno.d.ts +8 -8
- package/js/src/abstract/pooleno.js +5 -5
- package/js/src/abstract/tehran_exchange.d.ts +9 -0
- package/js/src/abstract/tehran_exchange.js +11 -0
- package/js/src/afratether.js +350 -350
- package/js/src/arzplus.d.ts +26 -26
- package/js/src/arzplus.js +575 -575
- package/js/src/base/Exchange.d.ts +926 -926
- package/js/src/base/types.d.ts +586 -586
- package/js/src/bitbarg.d.ts +21 -21
- package/js/src/bitbarg.js +306 -306
- package/js/src/bitunix.d.ts +21 -21
- package/js/src/bitunix.js +320 -320
- package/js/src/bydfi.d.ts +23 -23
- package/js/src/bydfi.js +428 -428
- package/js/src/cafearz.d.ts +21 -21
- package/js/src/cafearz.js +340 -340
- package/js/src/coinbaseexchange.d.ts +334 -334
- package/js/src/hamtapay.d.ts +21 -21
- package/js/src/hamtapay.js +294 -294
- package/js/src/kcex.d.ts +21 -21
- package/js/src/kcex.js +329 -329
- package/js/src/kifpoolme.d.ts +23 -23
- package/js/src/kifpoolme.js +404 -404
- package/js/src/mazdax.d.ts +23 -23
- package/js/src/mazdax.js +528 -529
- package/js/src/pingi.d.ts +22 -22
- package/js/src/pingi.js +440 -441
- package/js/src/pooleno.d.ts +21 -21
- package/js/src/pooleno.js +341 -341
- package/js/src/protobuf/mexc/compiled.d.cts +2 -2
- package/js/src/static_dependencies/fflake/browser.d.ts +222 -222
- package/js/src/static_dependencies/jsencrypt/lib/asn1js/asn1.d.ts +51 -51
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +101 -101
- package/js/src/static_dependencies/qs/formats.d.cts +8 -8
- package/js/src/static_dependencies/qs/index.d.cts +4 -4
- package/js/src/static_dependencies/qs/parse.d.cts +2 -2
- package/js/src/static_dependencies/qs/stringify.d.cts +2 -2
- package/js/src/static_dependencies/qs/utils.d.cts +9 -9
- package/js/src/static_dependencies/starknet/utils/calldata/parser/index.d.ts +5 -5
- package/js/src/tehran_exchange.d.ts +21 -0
- package/js/src/tehran_exchange.js +333 -0
- package/js/src/tetherland.js +361 -361
- package/js/src/twox.js +365 -365
- package/js/src/xt.js +5178 -5178
- package/package.json +1 -1
package/js/src/base/types.d.ts
CHANGED
|
@@ -1,586 +1,586 @@
|
|
|
1
|
-
export declare type Int = number | undefined;
|
|
2
|
-
export declare type int = number;
|
|
3
|
-
export declare type Str = string | undefined;
|
|
4
|
-
export declare type Strings = string[] | undefined;
|
|
5
|
-
export declare type Num = number | undefined;
|
|
6
|
-
export declare type Bool = boolean | undefined;
|
|
7
|
-
export declare type IndexType = number | string;
|
|
8
|
-
export declare type OrderSide = 'buy' | 'sell' | string | undefined;
|
|
9
|
-
export declare type OrderType = 'limit' | 'market' | string;
|
|
10
|
-
export declare type MarketType = 'spot' | 'margin' | 'swap' | 'future' | 'option' | 'delivery' | 'index' | 'otc';
|
|
11
|
-
export declare type SubType = 'linear' | 'inverse' | undefined;
|
|
12
|
-
export interface Dictionary<T> {
|
|
13
|
-
[key: string]: T;
|
|
14
|
-
}
|
|
15
|
-
export declare type Dict = Dictionary<any>;
|
|
16
|
-
export declare type NullableDict = Dict | undefined;
|
|
17
|
-
export declare type List = Array<any>;
|
|
18
|
-
export declare type NullableList = List | undefined;
|
|
19
|
-
/** Request parameters */
|
|
20
|
-
export interface MinMax {
|
|
21
|
-
min: Num;
|
|
22
|
-
max: Num;
|
|
23
|
-
}
|
|
24
|
-
export interface FeeInterface {
|
|
25
|
-
currency: Str;
|
|
26
|
-
cost: Num;
|
|
27
|
-
rate?: Num;
|
|
28
|
-
}
|
|
29
|
-
export interface TradingFeeInterface {
|
|
30
|
-
info: any;
|
|
31
|
-
symbol: Str;
|
|
32
|
-
maker: Num;
|
|
33
|
-
taker: Num;
|
|
34
|
-
percentage: Bool;
|
|
35
|
-
tierBased: Bool;
|
|
36
|
-
}
|
|
37
|
-
export declare type Fee = FeeInterface | undefined;
|
|
38
|
-
export interface MarketMarginModes {
|
|
39
|
-
isolated: boolean;
|
|
40
|
-
cross: boolean;
|
|
41
|
-
}
|
|
42
|
-
export interface MarketInterface {
|
|
43
|
-
id: Str;
|
|
44
|
-
numericId?: Num;
|
|
45
|
-
uppercaseId?: Str;
|
|
46
|
-
lowercaseId?: Str;
|
|
47
|
-
symbol: string;
|
|
48
|
-
base: string;
|
|
49
|
-
quote: string;
|
|
50
|
-
baseId: Str;
|
|
51
|
-
quoteId: Str;
|
|
52
|
-
active: Bool;
|
|
53
|
-
type: MarketType;
|
|
54
|
-
subType?: SubType;
|
|
55
|
-
spot: boolean;
|
|
56
|
-
margin: boolean;
|
|
57
|
-
swap: boolean;
|
|
58
|
-
future: boolean;
|
|
59
|
-
option: boolean;
|
|
60
|
-
contract: boolean;
|
|
61
|
-
settle: Str;
|
|
62
|
-
settleId: Str;
|
|
63
|
-
contractSize: Num;
|
|
64
|
-
linear: Bool;
|
|
65
|
-
inverse: Bool;
|
|
66
|
-
quanto?: boolean;
|
|
67
|
-
expiry: Int;
|
|
68
|
-
expiryDatetime: Str;
|
|
69
|
-
strike: Num;
|
|
70
|
-
optionType: Str;
|
|
71
|
-
taker?: Num;
|
|
72
|
-
maker?: Num;
|
|
73
|
-
percentage?: Bool;
|
|
74
|
-
tierBased?: Bool;
|
|
75
|
-
feeSide?: Str;
|
|
76
|
-
precision: {
|
|
77
|
-
amount: Num;
|
|
78
|
-
price: Num;
|
|
79
|
-
cost?: Num;
|
|
80
|
-
};
|
|
81
|
-
marginModes?: MarketMarginModes;
|
|
82
|
-
limits: {
|
|
83
|
-
amount?: MinMax;
|
|
84
|
-
cost?: MinMax;
|
|
85
|
-
leverage?: MinMax;
|
|
86
|
-
price?: MinMax;
|
|
87
|
-
market?: MinMax;
|
|
88
|
-
};
|
|
89
|
-
created: Int;
|
|
90
|
-
info: any;
|
|
91
|
-
}
|
|
92
|
-
export interface Trade {
|
|
93
|
-
info: any;
|
|
94
|
-
amount: Num;
|
|
95
|
-
datetime: Str;
|
|
96
|
-
id: Str;
|
|
97
|
-
order: Str;
|
|
98
|
-
price: number;
|
|
99
|
-
timestamp: Int;
|
|
100
|
-
type: Str;
|
|
101
|
-
side: 'buy' | 'sell' | Str;
|
|
102
|
-
symbol: Str;
|
|
103
|
-
takerOrMaker: 'taker' | 'maker' | Str;
|
|
104
|
-
cost: Num;
|
|
105
|
-
fee: Fee;
|
|
106
|
-
}
|
|
107
|
-
export interface Order {
|
|
108
|
-
id: string;
|
|
109
|
-
clientOrderId: Str;
|
|
110
|
-
datetime: string;
|
|
111
|
-
timestamp: number;
|
|
112
|
-
lastTradeTimestamp: number;
|
|
113
|
-
lastUpdateTimestamp?: number;
|
|
114
|
-
status: 'open' | 'closed' | 'canceled' | Str;
|
|
115
|
-
symbol: string;
|
|
116
|
-
type: Str;
|
|
117
|
-
timeInForce?: Str;
|
|
118
|
-
side: 'buy' | 'sell' | Str;
|
|
119
|
-
price: number;
|
|
120
|
-
average?: number;
|
|
121
|
-
amount: number;
|
|
122
|
-
filled: number;
|
|
123
|
-
remaining: number;
|
|
124
|
-
stopPrice?: number;
|
|
125
|
-
triggerPrice?: number;
|
|
126
|
-
takeProfitPrice?: number;
|
|
127
|
-
stopLossPrice?: number;
|
|
128
|
-
cost: number;
|
|
129
|
-
trades: Trade[];
|
|
130
|
-
fee: Fee;
|
|
131
|
-
reduceOnly: Bool;
|
|
132
|
-
postOnly: Bool;
|
|
133
|
-
info: any;
|
|
134
|
-
}
|
|
135
|
-
export interface OrderBook {
|
|
136
|
-
asks: [Num, Num][];
|
|
137
|
-
bids: [Num, Num][];
|
|
138
|
-
datetime: Str;
|
|
139
|
-
timestamp: Int;
|
|
140
|
-
nonce: Int;
|
|
141
|
-
symbol: Str;
|
|
142
|
-
}
|
|
143
|
-
export interface OrderBooks extends Dictionary<OrderBook> {
|
|
144
|
-
}
|
|
145
|
-
export interface Ticker {
|
|
146
|
-
symbol: string;
|
|
147
|
-
info: any;
|
|
148
|
-
timestamp: Int;
|
|
149
|
-
datetime: Str;
|
|
150
|
-
high: Num;
|
|
151
|
-
low: Num;
|
|
152
|
-
bid: Num;
|
|
153
|
-
bidVolume: Num;
|
|
154
|
-
ask: Num;
|
|
155
|
-
askVolume: Num;
|
|
156
|
-
vwap: Num;
|
|
157
|
-
open: Num;
|
|
158
|
-
close: Num;
|
|
159
|
-
last: Num;
|
|
160
|
-
previousClose: Num;
|
|
161
|
-
change: Num;
|
|
162
|
-
percentage: Num;
|
|
163
|
-
average: Num;
|
|
164
|
-
quoteVolume: Num;
|
|
165
|
-
baseVolume: Num;
|
|
166
|
-
indexPrice: Num;
|
|
167
|
-
markPrice: Num;
|
|
168
|
-
}
|
|
169
|
-
export interface Transaction {
|
|
170
|
-
info: any;
|
|
171
|
-
id: Str;
|
|
172
|
-
txid: Str;
|
|
173
|
-
timestamp: Int;
|
|
174
|
-
datetime: Str;
|
|
175
|
-
address: Str;
|
|
176
|
-
addressFrom: Str;
|
|
177
|
-
addressTo: Str;
|
|
178
|
-
tag: Str;
|
|
179
|
-
tagFrom: Str;
|
|
180
|
-
tagTo: Str;
|
|
181
|
-
type: 'deposit' | 'withdrawal' | Str;
|
|
182
|
-
amount: Num;
|
|
183
|
-
currency: Str;
|
|
184
|
-
status: 'pending' | 'ok' | Str;
|
|
185
|
-
updated: Int;
|
|
186
|
-
fee: Fee;
|
|
187
|
-
network: Str;
|
|
188
|
-
comment: Str;
|
|
189
|
-
internal: Bool;
|
|
190
|
-
}
|
|
191
|
-
export interface Tickers extends Dictionary<Ticker> {
|
|
192
|
-
}
|
|
193
|
-
export interface CurrencyInterface {
|
|
194
|
-
id: string;
|
|
195
|
-
code: string;
|
|
196
|
-
numericId?: Int;
|
|
197
|
-
precision: number;
|
|
198
|
-
type?: Str;
|
|
199
|
-
margin?: Bool;
|
|
200
|
-
name?: Str;
|
|
201
|
-
active?: Bool;
|
|
202
|
-
deposit?: Bool;
|
|
203
|
-
withdraw?: Bool;
|
|
204
|
-
fee?: Num;
|
|
205
|
-
limits: {
|
|
206
|
-
amount: {
|
|
207
|
-
min?: Num;
|
|
208
|
-
max?: Num;
|
|
209
|
-
};
|
|
210
|
-
withdraw: {
|
|
211
|
-
min?: Num;
|
|
212
|
-
max?: Num;
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
networks: {
|
|
216
|
-
string: any;
|
|
217
|
-
};
|
|
218
|
-
info: any;
|
|
219
|
-
}
|
|
220
|
-
export interface Balance {
|
|
221
|
-
free: Num;
|
|
222
|
-
used: Num;
|
|
223
|
-
total: Num;
|
|
224
|
-
debt?: Num;
|
|
225
|
-
}
|
|
226
|
-
export interface BalanceAccount {
|
|
227
|
-
free: Str;
|
|
228
|
-
used: Str;
|
|
229
|
-
total: Str;
|
|
230
|
-
}
|
|
231
|
-
export interface Account {
|
|
232
|
-
id: Str;
|
|
233
|
-
type: Str;
|
|
234
|
-
code: Str;
|
|
235
|
-
info: any;
|
|
236
|
-
}
|
|
237
|
-
export interface PartialBalances extends Dictionary<number> {
|
|
238
|
-
}
|
|
239
|
-
export interface Balances extends Dictionary<Balance> {
|
|
240
|
-
info: any;
|
|
241
|
-
timestamp?: any;
|
|
242
|
-
datetime?: any;
|
|
243
|
-
}
|
|
244
|
-
export interface DepositAddress {
|
|
245
|
-
info: any;
|
|
246
|
-
currency: string;
|
|
247
|
-
network?: string;
|
|
248
|
-
address: string;
|
|
249
|
-
tag?: Str;
|
|
250
|
-
}
|
|
251
|
-
export interface WithdrawalResponse {
|
|
252
|
-
info: any;
|
|
253
|
-
id: string;
|
|
254
|
-
}
|
|
255
|
-
export interface FundingRate {
|
|
256
|
-
symbol: string;
|
|
257
|
-
info: any;
|
|
258
|
-
timestamp?: number;
|
|
259
|
-
fundingRate?: number;
|
|
260
|
-
datetime?: string;
|
|
261
|
-
markPrice?: number;
|
|
262
|
-
indexPrice?: number;
|
|
263
|
-
interestRate?: number;
|
|
264
|
-
estimatedSettlePrice?: number;
|
|
265
|
-
fundingTimestamp?: number;
|
|
266
|
-
fundingDatetime?: string;
|
|
267
|
-
nextFundingTimestamp?: number;
|
|
268
|
-
nextFundingDatetime?: string;
|
|
269
|
-
nextFundingRate?: number;
|
|
270
|
-
previousFundingTimestamp?: number;
|
|
271
|
-
previousFundingDatetime?: string;
|
|
272
|
-
previousFundingRate?: number;
|
|
273
|
-
interval?: string;
|
|
274
|
-
}
|
|
275
|
-
export interface FundingRates extends Dictionary<FundingRate> {
|
|
276
|
-
}
|
|
277
|
-
export interface Position {
|
|
278
|
-
symbol: string;
|
|
279
|
-
id?: Str;
|
|
280
|
-
info: any;
|
|
281
|
-
timestamp?: number;
|
|
282
|
-
datetime?: string;
|
|
283
|
-
contracts?: number;
|
|
284
|
-
contractSize?: number;
|
|
285
|
-
side: Str;
|
|
286
|
-
notional?: number;
|
|
287
|
-
leverage?: number;
|
|
288
|
-
unrealizedPnl?: number;
|
|
289
|
-
realizedPnl?: number;
|
|
290
|
-
collateral?: number;
|
|
291
|
-
entryPrice?: number;
|
|
292
|
-
markPrice?: number;
|
|
293
|
-
liquidationPrice?: number;
|
|
294
|
-
marginMode?: Str;
|
|
295
|
-
hedged?: boolean;
|
|
296
|
-
maintenanceMargin?: number;
|
|
297
|
-
maintenanceMarginPercentage?: number;
|
|
298
|
-
initialMargin?: number;
|
|
299
|
-
initialMarginPercentage?: number;
|
|
300
|
-
marginRatio?: number;
|
|
301
|
-
lastUpdateTimestamp?: number;
|
|
302
|
-
lastPrice?: number;
|
|
303
|
-
stopLossPrice?: number;
|
|
304
|
-
takeProfitPrice?: number;
|
|
305
|
-
percentage?: number;
|
|
306
|
-
}
|
|
307
|
-
export interface BorrowInterest {
|
|
308
|
-
info: any;
|
|
309
|
-
symbol?: Str;
|
|
310
|
-
currency?: Str;
|
|
311
|
-
interest?: number;
|
|
312
|
-
interestRate?: number;
|
|
313
|
-
amountBorrowed?: number;
|
|
314
|
-
marginMode?: Str;
|
|
315
|
-
timestamp?: Int;
|
|
316
|
-
datetime?: Str;
|
|
317
|
-
}
|
|
318
|
-
export interface LeverageTier {
|
|
319
|
-
tier?: number;
|
|
320
|
-
symbol?: Str;
|
|
321
|
-
currency?: Str;
|
|
322
|
-
minNotional?: number;
|
|
323
|
-
maxNotional?: number;
|
|
324
|
-
maintenanceMarginRate?: number;
|
|
325
|
-
maxLeverage?: number;
|
|
326
|
-
info: any;
|
|
327
|
-
}
|
|
328
|
-
export interface LedgerEntry {
|
|
329
|
-
info: any;
|
|
330
|
-
id?: Str;
|
|
331
|
-
timestamp?: number;
|
|
332
|
-
datetime?: Str;
|
|
333
|
-
direction?: Str;
|
|
334
|
-
account?: Str;
|
|
335
|
-
referenceId?: Str;
|
|
336
|
-
referenceAccount?: Str;
|
|
337
|
-
type?: Str;
|
|
338
|
-
currency?: Str;
|
|
339
|
-
amount?: number;
|
|
340
|
-
before?: number;
|
|
341
|
-
after?: number;
|
|
342
|
-
status?: Str;
|
|
343
|
-
fee?: Fee;
|
|
344
|
-
}
|
|
345
|
-
export interface DepositWithdrawFeeNetwork {
|
|
346
|
-
fee?: number;
|
|
347
|
-
percentage?: boolean;
|
|
348
|
-
}
|
|
349
|
-
export interface DepositWithdrawFee {
|
|
350
|
-
info: any;
|
|
351
|
-
withdraw?: DepositWithdrawFeeNetwork;
|
|
352
|
-
deposit?: DepositWithdrawFeeNetwork;
|
|
353
|
-
networks?: Dictionary<DepositWithdrawFeeNetwork>;
|
|
354
|
-
}
|
|
355
|
-
export interface TransferEntry {
|
|
356
|
-
info?: any;
|
|
357
|
-
id?: Str;
|
|
358
|
-
timestamp?: number;
|
|
359
|
-
datetime?: Str;
|
|
360
|
-
currency?: Str;
|
|
361
|
-
amount?: number;
|
|
362
|
-
fromAccount?: Str;
|
|
363
|
-
toAccount?: Str;
|
|
364
|
-
status?: Str;
|
|
365
|
-
}
|
|
366
|
-
export interface CrossBorrowRate {
|
|
367
|
-
info: any;
|
|
368
|
-
currency?: Str;
|
|
369
|
-
rate: number;
|
|
370
|
-
period?: number;
|
|
371
|
-
timestamp?: number;
|
|
372
|
-
datetime?: Str;
|
|
373
|
-
}
|
|
374
|
-
export interface IsolatedBorrowRate {
|
|
375
|
-
info: any;
|
|
376
|
-
symbol: string;
|
|
377
|
-
base: string;
|
|
378
|
-
baseRate: number;
|
|
379
|
-
quote: string;
|
|
380
|
-
quoteRate: number;
|
|
381
|
-
period?: Int;
|
|
382
|
-
timestamp?: Int;
|
|
383
|
-
datetime?: Str;
|
|
384
|
-
}
|
|
385
|
-
export interface FundingRateHistory {
|
|
386
|
-
info: any;
|
|
387
|
-
symbol: string;
|
|
388
|
-
fundingRate: number;
|
|
389
|
-
timestamp?: number;
|
|
390
|
-
datetime?: Str;
|
|
391
|
-
}
|
|
392
|
-
export interface OpenInterest {
|
|
393
|
-
symbol: string;
|
|
394
|
-
openInterestAmount?: number;
|
|
395
|
-
openInterestValue?: number;
|
|
396
|
-
baseVolume?: number;
|
|
397
|
-
quoteVolume?: number;
|
|
398
|
-
timestamp?: number;
|
|
399
|
-
datetime?: Str;
|
|
400
|
-
info: any;
|
|
401
|
-
}
|
|
402
|
-
export interface OpenInterests extends Dictionary<OpenInterest> {
|
|
403
|
-
}
|
|
404
|
-
export interface Liquidation {
|
|
405
|
-
info: any;
|
|
406
|
-
symbol: string;
|
|
407
|
-
timestamp?: number;
|
|
408
|
-
datetime?: Str;
|
|
409
|
-
price: number;
|
|
410
|
-
baseValue?: number;
|
|
411
|
-
quoteValue?: number;
|
|
412
|
-
side?: OrderSide;
|
|
413
|
-
}
|
|
414
|
-
export interface OrderRequest {
|
|
415
|
-
symbol: string;
|
|
416
|
-
type: OrderType;
|
|
417
|
-
side: OrderSide;
|
|
418
|
-
amount?: number;
|
|
419
|
-
price?: number | undefined;
|
|
420
|
-
params?: any;
|
|
421
|
-
}
|
|
422
|
-
export interface CancellationRequest {
|
|
423
|
-
id: string;
|
|
424
|
-
clientOrderId?: string;
|
|
425
|
-
symbol: string;
|
|
426
|
-
}
|
|
427
|
-
export interface FundingHistory {
|
|
428
|
-
info: any;
|
|
429
|
-
symbol: string;
|
|
430
|
-
code: string;
|
|
431
|
-
timestamp?: number;
|
|
432
|
-
datetime?: Str;
|
|
433
|
-
id: string;
|
|
434
|
-
amount: number;
|
|
435
|
-
}
|
|
436
|
-
export interface MarginMode {
|
|
437
|
-
info: any;
|
|
438
|
-
symbol: string;
|
|
439
|
-
marginMode: 'isolated' | 'cross' | Str;
|
|
440
|
-
}
|
|
441
|
-
export interface Greeks {
|
|
442
|
-
symbol: string;
|
|
443
|
-
timestamp?: number;
|
|
444
|
-
datetime?: Str;
|
|
445
|
-
delta: number;
|
|
446
|
-
gamma: number;
|
|
447
|
-
theta: number;
|
|
448
|
-
vega: number;
|
|
449
|
-
rho: number;
|
|
450
|
-
vanna?: number;
|
|
451
|
-
volga?: number;
|
|
452
|
-
charm?: number;
|
|
453
|
-
bidSize: number;
|
|
454
|
-
askSize: number;
|
|
455
|
-
bidImpliedVolatility: number;
|
|
456
|
-
askImpliedVolatility: number;
|
|
457
|
-
markImpliedVolatility: number;
|
|
458
|
-
bidPrice: number;
|
|
459
|
-
askPrice: number;
|
|
460
|
-
markPrice: number;
|
|
461
|
-
lastPrice: number;
|
|
462
|
-
underlyingPrice: number;
|
|
463
|
-
info: any;
|
|
464
|
-
}
|
|
465
|
-
export interface Conversion {
|
|
466
|
-
info: any;
|
|
467
|
-
timestamp?: number;
|
|
468
|
-
datetime?: string;
|
|
469
|
-
id: string;
|
|
470
|
-
fromCurrency: string;
|
|
471
|
-
fromAmount: number;
|
|
472
|
-
toCurrency: string;
|
|
473
|
-
toAmount: number;
|
|
474
|
-
price: number;
|
|
475
|
-
fee: number;
|
|
476
|
-
}
|
|
477
|
-
export interface Option {
|
|
478
|
-
info: any;
|
|
479
|
-
currency: string;
|
|
480
|
-
symbol: string;
|
|
481
|
-
timestamp?: number;
|
|
482
|
-
datetime?: Str;
|
|
483
|
-
impliedVolatility: number;
|
|
484
|
-
openInterest: number;
|
|
485
|
-
bidPrice: number;
|
|
486
|
-
askPrice: number;
|
|
487
|
-
midPrice: number;
|
|
488
|
-
markPrice: number;
|
|
489
|
-
lastPrice: number;
|
|
490
|
-
underlyingPrice: number;
|
|
491
|
-
change: number;
|
|
492
|
-
percentage: number;
|
|
493
|
-
baseVolume: number;
|
|
494
|
-
quoteVolume: number;
|
|
495
|
-
}
|
|
496
|
-
export interface LastPrice {
|
|
497
|
-
symbol: string;
|
|
498
|
-
timestamp?: number;
|
|
499
|
-
datetime?: string;
|
|
500
|
-
price: number;
|
|
501
|
-
side?: OrderSide;
|
|
502
|
-
info: any;
|
|
503
|
-
}
|
|
504
|
-
export interface Leverage {
|
|
505
|
-
info: any;
|
|
506
|
-
symbol: string;
|
|
507
|
-
marginMode: 'isolated' | 'cross' | Str;
|
|
508
|
-
longLeverage: number;
|
|
509
|
-
shortLeverage: number;
|
|
510
|
-
}
|
|
511
|
-
export interface LongShortRatio {
|
|
512
|
-
info: any;
|
|
513
|
-
symbol: string;
|
|
514
|
-
timestamp?: number;
|
|
515
|
-
datetime?: string;
|
|
516
|
-
timeframe?: string;
|
|
517
|
-
longShortRatio: number;
|
|
518
|
-
}
|
|
519
|
-
export interface MarginModification {
|
|
520
|
-
'info': any;
|
|
521
|
-
'symbol': string;
|
|
522
|
-
'type': 'add' | 'reduce' | 'set' | undefined;
|
|
523
|
-
'marginMode': 'cross' | 'isolated' | undefined;
|
|
524
|
-
'amount': Num;
|
|
525
|
-
'total': Num;
|
|
526
|
-
'code': Str;
|
|
527
|
-
'status': Str;
|
|
528
|
-
'timestamp': Int;
|
|
529
|
-
'datetime': Str;
|
|
530
|
-
}
|
|
531
|
-
export interface Leverages extends Dictionary<Leverage> {
|
|
532
|
-
}
|
|
533
|
-
export interface LastPrices extends Dictionary<LastPrice> {
|
|
534
|
-
}
|
|
535
|
-
export interface Currencies extends Dictionary<CurrencyInterface> {
|
|
536
|
-
}
|
|
537
|
-
export interface TradingFees extends Dictionary<TradingFeeInterface> {
|
|
538
|
-
}
|
|
539
|
-
export interface MarginModes extends Dictionary<MarginMode> {
|
|
540
|
-
}
|
|
541
|
-
export interface OptionChain extends Dictionary<Option> {
|
|
542
|
-
}
|
|
543
|
-
export interface IsolatedBorrowRates extends Dictionary<IsolatedBorrowRate> {
|
|
544
|
-
}
|
|
545
|
-
export interface CrossBorrowRates extends Dictionary<CrossBorrowRate> {
|
|
546
|
-
}
|
|
547
|
-
export interface LeverageTiers extends Dictionary<LeverageTier[]> {
|
|
548
|
-
}
|
|
549
|
-
/** [ timestamp, open, high, low, close, volume ] */
|
|
550
|
-
export declare type OHLCV = [Num, Num, Num, Num, Num, Num];
|
|
551
|
-
/** [ timestamp, open, high, low, close, volume, count ] */
|
|
552
|
-
export declare type OHLCVC = [Num, Num, Num, Num, Num, Num, Num];
|
|
553
|
-
export declare type implicitReturnType = any;
|
|
554
|
-
export declare type Market = MarketInterface | undefined;
|
|
555
|
-
export declare type Currency = CurrencyInterface | undefined;
|
|
556
|
-
interface BaseConstructorArgs {
|
|
557
|
-
apiKey?: string;
|
|
558
|
-
secret?: string;
|
|
559
|
-
password?: string;
|
|
560
|
-
privateKey?: string;
|
|
561
|
-
walletAddress?: string;
|
|
562
|
-
uid?: string;
|
|
563
|
-
verbose?: boolean;
|
|
564
|
-
sandbox?: boolean;
|
|
565
|
-
testnet?: boolean;
|
|
566
|
-
options?: Dict;
|
|
567
|
-
enableRateLimit?: boolean;
|
|
568
|
-
httpsProxy?: string;
|
|
569
|
-
socksProxy?: string;
|
|
570
|
-
wssProxy?: string;
|
|
571
|
-
proxy?: string;
|
|
572
|
-
rateLimit?: number;
|
|
573
|
-
commonCurrencies?: Dict;
|
|
574
|
-
userAgent?: string;
|
|
575
|
-
userAgents?: Dict;
|
|
576
|
-
timeout?: number;
|
|
577
|
-
markets?: Dict;
|
|
578
|
-
currencies?: Dict;
|
|
579
|
-
hostname?: string;
|
|
580
|
-
urls?: Dict;
|
|
581
|
-
headers?: Dict;
|
|
582
|
-
}
|
|
583
|
-
export declare type ConstructorArgs = Partial<BaseConstructorArgs> & {
|
|
584
|
-
[key: string]: any;
|
|
585
|
-
};
|
|
586
|
-
export {};
|
|
1
|
+
export declare type Int = number | undefined;
|
|
2
|
+
export declare type int = number;
|
|
3
|
+
export declare type Str = string | undefined;
|
|
4
|
+
export declare type Strings = string[] | undefined;
|
|
5
|
+
export declare type Num = number | undefined;
|
|
6
|
+
export declare type Bool = boolean | undefined;
|
|
7
|
+
export declare type IndexType = number | string;
|
|
8
|
+
export declare type OrderSide = 'buy' | 'sell' | string | undefined;
|
|
9
|
+
export declare type OrderType = 'limit' | 'market' | string;
|
|
10
|
+
export declare type MarketType = 'spot' | 'margin' | 'swap' | 'future' | 'option' | 'delivery' | 'index' | 'otc';
|
|
11
|
+
export declare type SubType = 'linear' | 'inverse' | undefined;
|
|
12
|
+
export interface Dictionary<T> {
|
|
13
|
+
[key: string]: T;
|
|
14
|
+
}
|
|
15
|
+
export declare type Dict = Dictionary<any>;
|
|
16
|
+
export declare type NullableDict = Dict | undefined;
|
|
17
|
+
export declare type List = Array<any>;
|
|
18
|
+
export declare type NullableList = List | undefined;
|
|
19
|
+
/** Request parameters */
|
|
20
|
+
export interface MinMax {
|
|
21
|
+
min: Num;
|
|
22
|
+
max: Num;
|
|
23
|
+
}
|
|
24
|
+
export interface FeeInterface {
|
|
25
|
+
currency: Str;
|
|
26
|
+
cost: Num;
|
|
27
|
+
rate?: Num;
|
|
28
|
+
}
|
|
29
|
+
export interface TradingFeeInterface {
|
|
30
|
+
info: any;
|
|
31
|
+
symbol: Str;
|
|
32
|
+
maker: Num;
|
|
33
|
+
taker: Num;
|
|
34
|
+
percentage: Bool;
|
|
35
|
+
tierBased: Bool;
|
|
36
|
+
}
|
|
37
|
+
export declare type Fee = FeeInterface | undefined;
|
|
38
|
+
export interface MarketMarginModes {
|
|
39
|
+
isolated: boolean;
|
|
40
|
+
cross: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface MarketInterface {
|
|
43
|
+
id: Str;
|
|
44
|
+
numericId?: Num;
|
|
45
|
+
uppercaseId?: Str;
|
|
46
|
+
lowercaseId?: Str;
|
|
47
|
+
symbol: string;
|
|
48
|
+
base: string;
|
|
49
|
+
quote: string;
|
|
50
|
+
baseId: Str;
|
|
51
|
+
quoteId: Str;
|
|
52
|
+
active: Bool;
|
|
53
|
+
type: MarketType;
|
|
54
|
+
subType?: SubType;
|
|
55
|
+
spot: boolean;
|
|
56
|
+
margin: boolean;
|
|
57
|
+
swap: boolean;
|
|
58
|
+
future: boolean;
|
|
59
|
+
option: boolean;
|
|
60
|
+
contract: boolean;
|
|
61
|
+
settle: Str;
|
|
62
|
+
settleId: Str;
|
|
63
|
+
contractSize: Num;
|
|
64
|
+
linear: Bool;
|
|
65
|
+
inverse: Bool;
|
|
66
|
+
quanto?: boolean;
|
|
67
|
+
expiry: Int;
|
|
68
|
+
expiryDatetime: Str;
|
|
69
|
+
strike: Num;
|
|
70
|
+
optionType: Str;
|
|
71
|
+
taker?: Num;
|
|
72
|
+
maker?: Num;
|
|
73
|
+
percentage?: Bool;
|
|
74
|
+
tierBased?: Bool;
|
|
75
|
+
feeSide?: Str;
|
|
76
|
+
precision: {
|
|
77
|
+
amount: Num;
|
|
78
|
+
price: Num;
|
|
79
|
+
cost?: Num;
|
|
80
|
+
};
|
|
81
|
+
marginModes?: MarketMarginModes;
|
|
82
|
+
limits: {
|
|
83
|
+
amount?: MinMax;
|
|
84
|
+
cost?: MinMax;
|
|
85
|
+
leverage?: MinMax;
|
|
86
|
+
price?: MinMax;
|
|
87
|
+
market?: MinMax;
|
|
88
|
+
};
|
|
89
|
+
created: Int;
|
|
90
|
+
info: any;
|
|
91
|
+
}
|
|
92
|
+
export interface Trade {
|
|
93
|
+
info: any;
|
|
94
|
+
amount: Num;
|
|
95
|
+
datetime: Str;
|
|
96
|
+
id: Str;
|
|
97
|
+
order: Str;
|
|
98
|
+
price: number;
|
|
99
|
+
timestamp: Int;
|
|
100
|
+
type: Str;
|
|
101
|
+
side: 'buy' | 'sell' | Str;
|
|
102
|
+
symbol: Str;
|
|
103
|
+
takerOrMaker: 'taker' | 'maker' | Str;
|
|
104
|
+
cost: Num;
|
|
105
|
+
fee: Fee;
|
|
106
|
+
}
|
|
107
|
+
export interface Order {
|
|
108
|
+
id: string;
|
|
109
|
+
clientOrderId: Str;
|
|
110
|
+
datetime: string;
|
|
111
|
+
timestamp: number;
|
|
112
|
+
lastTradeTimestamp: number;
|
|
113
|
+
lastUpdateTimestamp?: number;
|
|
114
|
+
status: 'open' | 'closed' | 'canceled' | Str;
|
|
115
|
+
symbol: string;
|
|
116
|
+
type: Str;
|
|
117
|
+
timeInForce?: Str;
|
|
118
|
+
side: 'buy' | 'sell' | Str;
|
|
119
|
+
price: number;
|
|
120
|
+
average?: number;
|
|
121
|
+
amount: number;
|
|
122
|
+
filled: number;
|
|
123
|
+
remaining: number;
|
|
124
|
+
stopPrice?: number;
|
|
125
|
+
triggerPrice?: number;
|
|
126
|
+
takeProfitPrice?: number;
|
|
127
|
+
stopLossPrice?: number;
|
|
128
|
+
cost: number;
|
|
129
|
+
trades: Trade[];
|
|
130
|
+
fee: Fee;
|
|
131
|
+
reduceOnly: Bool;
|
|
132
|
+
postOnly: Bool;
|
|
133
|
+
info: any;
|
|
134
|
+
}
|
|
135
|
+
export interface OrderBook {
|
|
136
|
+
asks: [Num, Num][];
|
|
137
|
+
bids: [Num, Num][];
|
|
138
|
+
datetime: Str;
|
|
139
|
+
timestamp: Int;
|
|
140
|
+
nonce: Int;
|
|
141
|
+
symbol: Str;
|
|
142
|
+
}
|
|
143
|
+
export interface OrderBooks extends Dictionary<OrderBook> {
|
|
144
|
+
}
|
|
145
|
+
export interface Ticker {
|
|
146
|
+
symbol: string;
|
|
147
|
+
info: any;
|
|
148
|
+
timestamp: Int;
|
|
149
|
+
datetime: Str;
|
|
150
|
+
high: Num;
|
|
151
|
+
low: Num;
|
|
152
|
+
bid: Num;
|
|
153
|
+
bidVolume: Num;
|
|
154
|
+
ask: Num;
|
|
155
|
+
askVolume: Num;
|
|
156
|
+
vwap: Num;
|
|
157
|
+
open: Num;
|
|
158
|
+
close: Num;
|
|
159
|
+
last: Num;
|
|
160
|
+
previousClose: Num;
|
|
161
|
+
change: Num;
|
|
162
|
+
percentage: Num;
|
|
163
|
+
average: Num;
|
|
164
|
+
quoteVolume: Num;
|
|
165
|
+
baseVolume: Num;
|
|
166
|
+
indexPrice: Num;
|
|
167
|
+
markPrice: Num;
|
|
168
|
+
}
|
|
169
|
+
export interface Transaction {
|
|
170
|
+
info: any;
|
|
171
|
+
id: Str;
|
|
172
|
+
txid: Str;
|
|
173
|
+
timestamp: Int;
|
|
174
|
+
datetime: Str;
|
|
175
|
+
address: Str;
|
|
176
|
+
addressFrom: Str;
|
|
177
|
+
addressTo: Str;
|
|
178
|
+
tag: Str;
|
|
179
|
+
tagFrom: Str;
|
|
180
|
+
tagTo: Str;
|
|
181
|
+
type: 'deposit' | 'withdrawal' | Str;
|
|
182
|
+
amount: Num;
|
|
183
|
+
currency: Str;
|
|
184
|
+
status: 'pending' | 'ok' | Str;
|
|
185
|
+
updated: Int;
|
|
186
|
+
fee: Fee;
|
|
187
|
+
network: Str;
|
|
188
|
+
comment: Str;
|
|
189
|
+
internal: Bool;
|
|
190
|
+
}
|
|
191
|
+
export interface Tickers extends Dictionary<Ticker> {
|
|
192
|
+
}
|
|
193
|
+
export interface CurrencyInterface {
|
|
194
|
+
id: string;
|
|
195
|
+
code: string;
|
|
196
|
+
numericId?: Int;
|
|
197
|
+
precision: number;
|
|
198
|
+
type?: Str;
|
|
199
|
+
margin?: Bool;
|
|
200
|
+
name?: Str;
|
|
201
|
+
active?: Bool;
|
|
202
|
+
deposit?: Bool;
|
|
203
|
+
withdraw?: Bool;
|
|
204
|
+
fee?: Num;
|
|
205
|
+
limits: {
|
|
206
|
+
amount: {
|
|
207
|
+
min?: Num;
|
|
208
|
+
max?: Num;
|
|
209
|
+
};
|
|
210
|
+
withdraw: {
|
|
211
|
+
min?: Num;
|
|
212
|
+
max?: Num;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
networks: {
|
|
216
|
+
string: any;
|
|
217
|
+
};
|
|
218
|
+
info: any;
|
|
219
|
+
}
|
|
220
|
+
export interface Balance {
|
|
221
|
+
free: Num;
|
|
222
|
+
used: Num;
|
|
223
|
+
total: Num;
|
|
224
|
+
debt?: Num;
|
|
225
|
+
}
|
|
226
|
+
export interface BalanceAccount {
|
|
227
|
+
free: Str;
|
|
228
|
+
used: Str;
|
|
229
|
+
total: Str;
|
|
230
|
+
}
|
|
231
|
+
export interface Account {
|
|
232
|
+
id: Str;
|
|
233
|
+
type: Str;
|
|
234
|
+
code: Str;
|
|
235
|
+
info: any;
|
|
236
|
+
}
|
|
237
|
+
export interface PartialBalances extends Dictionary<number> {
|
|
238
|
+
}
|
|
239
|
+
export interface Balances extends Dictionary<Balance> {
|
|
240
|
+
info: any;
|
|
241
|
+
timestamp?: any;
|
|
242
|
+
datetime?: any;
|
|
243
|
+
}
|
|
244
|
+
export interface DepositAddress {
|
|
245
|
+
info: any;
|
|
246
|
+
currency: string;
|
|
247
|
+
network?: string;
|
|
248
|
+
address: string;
|
|
249
|
+
tag?: Str;
|
|
250
|
+
}
|
|
251
|
+
export interface WithdrawalResponse {
|
|
252
|
+
info: any;
|
|
253
|
+
id: string;
|
|
254
|
+
}
|
|
255
|
+
export interface FundingRate {
|
|
256
|
+
symbol: string;
|
|
257
|
+
info: any;
|
|
258
|
+
timestamp?: number;
|
|
259
|
+
fundingRate?: number;
|
|
260
|
+
datetime?: string;
|
|
261
|
+
markPrice?: number;
|
|
262
|
+
indexPrice?: number;
|
|
263
|
+
interestRate?: number;
|
|
264
|
+
estimatedSettlePrice?: number;
|
|
265
|
+
fundingTimestamp?: number;
|
|
266
|
+
fundingDatetime?: string;
|
|
267
|
+
nextFundingTimestamp?: number;
|
|
268
|
+
nextFundingDatetime?: string;
|
|
269
|
+
nextFundingRate?: number;
|
|
270
|
+
previousFundingTimestamp?: number;
|
|
271
|
+
previousFundingDatetime?: string;
|
|
272
|
+
previousFundingRate?: number;
|
|
273
|
+
interval?: string;
|
|
274
|
+
}
|
|
275
|
+
export interface FundingRates extends Dictionary<FundingRate> {
|
|
276
|
+
}
|
|
277
|
+
export interface Position {
|
|
278
|
+
symbol: string;
|
|
279
|
+
id?: Str;
|
|
280
|
+
info: any;
|
|
281
|
+
timestamp?: number;
|
|
282
|
+
datetime?: string;
|
|
283
|
+
contracts?: number;
|
|
284
|
+
contractSize?: number;
|
|
285
|
+
side: Str;
|
|
286
|
+
notional?: number;
|
|
287
|
+
leverage?: number;
|
|
288
|
+
unrealizedPnl?: number;
|
|
289
|
+
realizedPnl?: number;
|
|
290
|
+
collateral?: number;
|
|
291
|
+
entryPrice?: number;
|
|
292
|
+
markPrice?: number;
|
|
293
|
+
liquidationPrice?: number;
|
|
294
|
+
marginMode?: Str;
|
|
295
|
+
hedged?: boolean;
|
|
296
|
+
maintenanceMargin?: number;
|
|
297
|
+
maintenanceMarginPercentage?: number;
|
|
298
|
+
initialMargin?: number;
|
|
299
|
+
initialMarginPercentage?: number;
|
|
300
|
+
marginRatio?: number;
|
|
301
|
+
lastUpdateTimestamp?: number;
|
|
302
|
+
lastPrice?: number;
|
|
303
|
+
stopLossPrice?: number;
|
|
304
|
+
takeProfitPrice?: number;
|
|
305
|
+
percentage?: number;
|
|
306
|
+
}
|
|
307
|
+
export interface BorrowInterest {
|
|
308
|
+
info: any;
|
|
309
|
+
symbol?: Str;
|
|
310
|
+
currency?: Str;
|
|
311
|
+
interest?: number;
|
|
312
|
+
interestRate?: number;
|
|
313
|
+
amountBorrowed?: number;
|
|
314
|
+
marginMode?: Str;
|
|
315
|
+
timestamp?: Int;
|
|
316
|
+
datetime?: Str;
|
|
317
|
+
}
|
|
318
|
+
export interface LeverageTier {
|
|
319
|
+
tier?: number;
|
|
320
|
+
symbol?: Str;
|
|
321
|
+
currency?: Str;
|
|
322
|
+
minNotional?: number;
|
|
323
|
+
maxNotional?: number;
|
|
324
|
+
maintenanceMarginRate?: number;
|
|
325
|
+
maxLeverage?: number;
|
|
326
|
+
info: any;
|
|
327
|
+
}
|
|
328
|
+
export interface LedgerEntry {
|
|
329
|
+
info: any;
|
|
330
|
+
id?: Str;
|
|
331
|
+
timestamp?: number;
|
|
332
|
+
datetime?: Str;
|
|
333
|
+
direction?: Str;
|
|
334
|
+
account?: Str;
|
|
335
|
+
referenceId?: Str;
|
|
336
|
+
referenceAccount?: Str;
|
|
337
|
+
type?: Str;
|
|
338
|
+
currency?: Str;
|
|
339
|
+
amount?: number;
|
|
340
|
+
before?: number;
|
|
341
|
+
after?: number;
|
|
342
|
+
status?: Str;
|
|
343
|
+
fee?: Fee;
|
|
344
|
+
}
|
|
345
|
+
export interface DepositWithdrawFeeNetwork {
|
|
346
|
+
fee?: number;
|
|
347
|
+
percentage?: boolean;
|
|
348
|
+
}
|
|
349
|
+
export interface DepositWithdrawFee {
|
|
350
|
+
info: any;
|
|
351
|
+
withdraw?: DepositWithdrawFeeNetwork;
|
|
352
|
+
deposit?: DepositWithdrawFeeNetwork;
|
|
353
|
+
networks?: Dictionary<DepositWithdrawFeeNetwork>;
|
|
354
|
+
}
|
|
355
|
+
export interface TransferEntry {
|
|
356
|
+
info?: any;
|
|
357
|
+
id?: Str;
|
|
358
|
+
timestamp?: number;
|
|
359
|
+
datetime?: Str;
|
|
360
|
+
currency?: Str;
|
|
361
|
+
amount?: number;
|
|
362
|
+
fromAccount?: Str;
|
|
363
|
+
toAccount?: Str;
|
|
364
|
+
status?: Str;
|
|
365
|
+
}
|
|
366
|
+
export interface CrossBorrowRate {
|
|
367
|
+
info: any;
|
|
368
|
+
currency?: Str;
|
|
369
|
+
rate: number;
|
|
370
|
+
period?: number;
|
|
371
|
+
timestamp?: number;
|
|
372
|
+
datetime?: Str;
|
|
373
|
+
}
|
|
374
|
+
export interface IsolatedBorrowRate {
|
|
375
|
+
info: any;
|
|
376
|
+
symbol: string;
|
|
377
|
+
base: string;
|
|
378
|
+
baseRate: number;
|
|
379
|
+
quote: string;
|
|
380
|
+
quoteRate: number;
|
|
381
|
+
period?: Int;
|
|
382
|
+
timestamp?: Int;
|
|
383
|
+
datetime?: Str;
|
|
384
|
+
}
|
|
385
|
+
export interface FundingRateHistory {
|
|
386
|
+
info: any;
|
|
387
|
+
symbol: string;
|
|
388
|
+
fundingRate: number;
|
|
389
|
+
timestamp?: number;
|
|
390
|
+
datetime?: Str;
|
|
391
|
+
}
|
|
392
|
+
export interface OpenInterest {
|
|
393
|
+
symbol: string;
|
|
394
|
+
openInterestAmount?: number;
|
|
395
|
+
openInterestValue?: number;
|
|
396
|
+
baseVolume?: number;
|
|
397
|
+
quoteVolume?: number;
|
|
398
|
+
timestamp?: number;
|
|
399
|
+
datetime?: Str;
|
|
400
|
+
info: any;
|
|
401
|
+
}
|
|
402
|
+
export interface OpenInterests extends Dictionary<OpenInterest> {
|
|
403
|
+
}
|
|
404
|
+
export interface Liquidation {
|
|
405
|
+
info: any;
|
|
406
|
+
symbol: string;
|
|
407
|
+
timestamp?: number;
|
|
408
|
+
datetime?: Str;
|
|
409
|
+
price: number;
|
|
410
|
+
baseValue?: number;
|
|
411
|
+
quoteValue?: number;
|
|
412
|
+
side?: OrderSide;
|
|
413
|
+
}
|
|
414
|
+
export interface OrderRequest {
|
|
415
|
+
symbol: string;
|
|
416
|
+
type: OrderType;
|
|
417
|
+
side: OrderSide;
|
|
418
|
+
amount?: number;
|
|
419
|
+
price?: number | undefined;
|
|
420
|
+
params?: any;
|
|
421
|
+
}
|
|
422
|
+
export interface CancellationRequest {
|
|
423
|
+
id: string;
|
|
424
|
+
clientOrderId?: string;
|
|
425
|
+
symbol: string;
|
|
426
|
+
}
|
|
427
|
+
export interface FundingHistory {
|
|
428
|
+
info: any;
|
|
429
|
+
symbol: string;
|
|
430
|
+
code: string;
|
|
431
|
+
timestamp?: number;
|
|
432
|
+
datetime?: Str;
|
|
433
|
+
id: string;
|
|
434
|
+
amount: number;
|
|
435
|
+
}
|
|
436
|
+
export interface MarginMode {
|
|
437
|
+
info: any;
|
|
438
|
+
symbol: string;
|
|
439
|
+
marginMode: 'isolated' | 'cross' | Str;
|
|
440
|
+
}
|
|
441
|
+
export interface Greeks {
|
|
442
|
+
symbol: string;
|
|
443
|
+
timestamp?: number;
|
|
444
|
+
datetime?: Str;
|
|
445
|
+
delta: number;
|
|
446
|
+
gamma: number;
|
|
447
|
+
theta: number;
|
|
448
|
+
vega: number;
|
|
449
|
+
rho: number;
|
|
450
|
+
vanna?: number;
|
|
451
|
+
volga?: number;
|
|
452
|
+
charm?: number;
|
|
453
|
+
bidSize: number;
|
|
454
|
+
askSize: number;
|
|
455
|
+
bidImpliedVolatility: number;
|
|
456
|
+
askImpliedVolatility: number;
|
|
457
|
+
markImpliedVolatility: number;
|
|
458
|
+
bidPrice: number;
|
|
459
|
+
askPrice: number;
|
|
460
|
+
markPrice: number;
|
|
461
|
+
lastPrice: number;
|
|
462
|
+
underlyingPrice: number;
|
|
463
|
+
info: any;
|
|
464
|
+
}
|
|
465
|
+
export interface Conversion {
|
|
466
|
+
info: any;
|
|
467
|
+
timestamp?: number;
|
|
468
|
+
datetime?: string;
|
|
469
|
+
id: string;
|
|
470
|
+
fromCurrency: string;
|
|
471
|
+
fromAmount: number;
|
|
472
|
+
toCurrency: string;
|
|
473
|
+
toAmount: number;
|
|
474
|
+
price: number;
|
|
475
|
+
fee: number;
|
|
476
|
+
}
|
|
477
|
+
export interface Option {
|
|
478
|
+
info: any;
|
|
479
|
+
currency: string;
|
|
480
|
+
symbol: string;
|
|
481
|
+
timestamp?: number;
|
|
482
|
+
datetime?: Str;
|
|
483
|
+
impliedVolatility: number;
|
|
484
|
+
openInterest: number;
|
|
485
|
+
bidPrice: number;
|
|
486
|
+
askPrice: number;
|
|
487
|
+
midPrice: number;
|
|
488
|
+
markPrice: number;
|
|
489
|
+
lastPrice: number;
|
|
490
|
+
underlyingPrice: number;
|
|
491
|
+
change: number;
|
|
492
|
+
percentage: number;
|
|
493
|
+
baseVolume: number;
|
|
494
|
+
quoteVolume: number;
|
|
495
|
+
}
|
|
496
|
+
export interface LastPrice {
|
|
497
|
+
symbol: string;
|
|
498
|
+
timestamp?: number;
|
|
499
|
+
datetime?: string;
|
|
500
|
+
price: number;
|
|
501
|
+
side?: OrderSide;
|
|
502
|
+
info: any;
|
|
503
|
+
}
|
|
504
|
+
export interface Leverage {
|
|
505
|
+
info: any;
|
|
506
|
+
symbol: string;
|
|
507
|
+
marginMode: 'isolated' | 'cross' | Str;
|
|
508
|
+
longLeverage: number;
|
|
509
|
+
shortLeverage: number;
|
|
510
|
+
}
|
|
511
|
+
export interface LongShortRatio {
|
|
512
|
+
info: any;
|
|
513
|
+
symbol: string;
|
|
514
|
+
timestamp?: number;
|
|
515
|
+
datetime?: string;
|
|
516
|
+
timeframe?: string;
|
|
517
|
+
longShortRatio: number;
|
|
518
|
+
}
|
|
519
|
+
export interface MarginModification {
|
|
520
|
+
'info': any;
|
|
521
|
+
'symbol': string;
|
|
522
|
+
'type': 'add' | 'reduce' | 'set' | undefined;
|
|
523
|
+
'marginMode': 'cross' | 'isolated' | undefined;
|
|
524
|
+
'amount': Num;
|
|
525
|
+
'total': Num;
|
|
526
|
+
'code': Str;
|
|
527
|
+
'status': Str;
|
|
528
|
+
'timestamp': Int;
|
|
529
|
+
'datetime': Str;
|
|
530
|
+
}
|
|
531
|
+
export interface Leverages extends Dictionary<Leverage> {
|
|
532
|
+
}
|
|
533
|
+
export interface LastPrices extends Dictionary<LastPrice> {
|
|
534
|
+
}
|
|
535
|
+
export interface Currencies extends Dictionary<CurrencyInterface> {
|
|
536
|
+
}
|
|
537
|
+
export interface TradingFees extends Dictionary<TradingFeeInterface> {
|
|
538
|
+
}
|
|
539
|
+
export interface MarginModes extends Dictionary<MarginMode> {
|
|
540
|
+
}
|
|
541
|
+
export interface OptionChain extends Dictionary<Option> {
|
|
542
|
+
}
|
|
543
|
+
export interface IsolatedBorrowRates extends Dictionary<IsolatedBorrowRate> {
|
|
544
|
+
}
|
|
545
|
+
export interface CrossBorrowRates extends Dictionary<CrossBorrowRate> {
|
|
546
|
+
}
|
|
547
|
+
export interface LeverageTiers extends Dictionary<LeverageTier[]> {
|
|
548
|
+
}
|
|
549
|
+
/** [ timestamp, open, high, low, close, volume ] */
|
|
550
|
+
export declare type OHLCV = [Num, Num, Num, Num, Num, Num];
|
|
551
|
+
/** [ timestamp, open, high, low, close, volume, count ] */
|
|
552
|
+
export declare type OHLCVC = [Num, Num, Num, Num, Num, Num, Num];
|
|
553
|
+
export declare type implicitReturnType = any;
|
|
554
|
+
export declare type Market = MarketInterface | undefined;
|
|
555
|
+
export declare type Currency = CurrencyInterface | undefined;
|
|
556
|
+
interface BaseConstructorArgs {
|
|
557
|
+
apiKey?: string;
|
|
558
|
+
secret?: string;
|
|
559
|
+
password?: string;
|
|
560
|
+
privateKey?: string;
|
|
561
|
+
walletAddress?: string;
|
|
562
|
+
uid?: string;
|
|
563
|
+
verbose?: boolean;
|
|
564
|
+
sandbox?: boolean;
|
|
565
|
+
testnet?: boolean;
|
|
566
|
+
options?: Dict;
|
|
567
|
+
enableRateLimit?: boolean;
|
|
568
|
+
httpsProxy?: string;
|
|
569
|
+
socksProxy?: string;
|
|
570
|
+
wssProxy?: string;
|
|
571
|
+
proxy?: string;
|
|
572
|
+
rateLimit?: number;
|
|
573
|
+
commonCurrencies?: Dict;
|
|
574
|
+
userAgent?: string;
|
|
575
|
+
userAgents?: Dict;
|
|
576
|
+
timeout?: number;
|
|
577
|
+
markets?: Dict;
|
|
578
|
+
currencies?: Dict;
|
|
579
|
+
hostname?: string;
|
|
580
|
+
urls?: Dict;
|
|
581
|
+
headers?: Dict;
|
|
582
|
+
}
|
|
583
|
+
export declare type ConstructorArgs = Partial<BaseConstructorArgs> & {
|
|
584
|
+
[key: string]: any;
|
|
585
|
+
};
|
|
586
|
+
export {};
|