ccxt-look 1.81.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/.cache/eslintcache +1 -0
  2. package/.dockerignore +6 -0
  3. package/.eslintignore +1 -0
  4. package/.gitattributes +5 -0
  5. package/.readthedocs.yaml +16 -0
  6. package/CONTRIBUTING.md +1049 -0
  7. package/LICENSE.txt +21 -0
  8. package/README.md +537 -0
  9. package/SECURITY.md +5 -0
  10. package/build/cleanup-old-tags.js +94 -0
  11. package/build/countries.js +256 -0
  12. package/build/export-exchanges.js +520 -0
  13. package/build/fs.js +51 -0
  14. package/build/transpile.js +1772 -0
  15. package/build/vss.js +78 -0
  16. package/ccxt.browser.js +7 -0
  17. package/ccxt.d.ts +692 -0
  18. package/ccxt.js +171 -0
  19. package/cleanup.sh +2 -0
  20. package/composer-install.sh +20 -0
  21. package/dist/ccxt.browser.js +208383 -0
  22. package/gource.sh +3 -0
  23. package/index.html +7 -0
  24. package/js/.eslintrc +87 -0
  25. package/js/aax.js +2686 -0
  26. package/js/ascendex.js +2584 -0
  27. package/js/base/.eslintrc.js +43 -0
  28. package/js/base/Exchange.js +2371 -0
  29. package/js/base/Precise.js +283 -0
  30. package/js/base/errorHierarchy.js +47 -0
  31. package/js/base/errors.js +55 -0
  32. package/js/base/functions/crypto.js +158 -0
  33. package/js/base/functions/encode.js +118 -0
  34. package/js/base/functions/generic.js +270 -0
  35. package/js/base/functions/misc.js +138 -0
  36. package/js/base/functions/number.js +329 -0
  37. package/js/base/functions/platform.js +38 -0
  38. package/js/base/functions/string.js +21 -0
  39. package/js/base/functions/throttle.js +79 -0
  40. package/js/base/functions/time.js +210 -0
  41. package/js/base/functions/type.js +66 -0
  42. package/js/base/functions.js +28 -0
  43. package/js/bequant.js +32 -0
  44. package/js/bibox.js +1407 -0
  45. package/js/bigone.js +1366 -0
  46. package/js/binance.js +5652 -0
  47. package/js/binancecoinm.js +46 -0
  48. package/js/binanceus.js +46 -0
  49. package/js/binanceusdm.js +49 -0
  50. package/js/bit2c.js +535 -0
  51. package/js/bitbank.js +842 -0
  52. package/js/bitbay.js +16 -0
  53. package/js/bitbns.js +1073 -0
  54. package/js/bitcoincom.js +15 -0
  55. package/js/bitfinex.js +1433 -0
  56. package/js/bitfinex2.js +2025 -0
  57. package/js/bitflyer.js +840 -0
  58. package/js/bitforex.js +614 -0
  59. package/js/bitget.js +2397 -0
  60. package/js/bithumb.js +980 -0
  61. package/js/bitmart.js +2516 -0
  62. package/js/bitmex.js +1809 -0
  63. package/js/bitopro.js +1443 -0
  64. package/js/bitpanda.js +1782 -0
  65. package/js/bitrue.js +1747 -0
  66. package/js/bitso.js +1062 -0
  67. package/js/bitstamp.js +1757 -0
  68. package/js/bitstamp1.js +343 -0
  69. package/js/bittrex.js +1876 -0
  70. package/js/bitvavo.js +1579 -0
  71. package/js/bkex.js +1233 -0
  72. package/js/bl3p.js +346 -0
  73. package/js/blockchaincom.js +969 -0
  74. package/js/btcalpha.js +680 -0
  75. package/js/btcbox.js +477 -0
  76. package/js/btcmarkets.js +1022 -0
  77. package/js/btctradeua.js +466 -0
  78. package/js/btcturk.js +734 -0
  79. package/js/buda.js +946 -0
  80. package/js/bw.js +1265 -0
  81. package/js/bybit.js +3372 -0
  82. package/js/bytetrade.js +1336 -0
  83. package/js/cdax.js +1646 -0
  84. package/js/cex.js +1410 -0
  85. package/js/coinbase.js +1342 -0
  86. package/js/coinbaseprime.js +31 -0
  87. package/js/coinbasepro.js +1466 -0
  88. package/js/coincheck.js +755 -0
  89. package/js/coinex.js +3400 -0
  90. package/js/coinfalcon.js +880 -0
  91. package/js/coinmate.js +794 -0
  92. package/js/coinone.js +816 -0
  93. package/js/coinspot.js +345 -0
  94. package/js/crex24.js +1636 -0
  95. package/js/cryptocom.js +1832 -0
  96. package/js/currencycom.js +1748 -0
  97. package/js/delta.js +1547 -0
  98. package/js/deribit.js +2148 -0
  99. package/js/digifinex.js +1585 -0
  100. package/js/eqonex.js +1660 -0
  101. package/js/exmo.js +1670 -0
  102. package/js/fairdesk.js +1231 -0
  103. package/js/flowbtc.js +35 -0
  104. package/js/fmfwio.js +34 -0
  105. package/js/ftx.js +2751 -0
  106. package/js/ftxus.js +38 -0
  107. package/js/gateio.js +4174 -0
  108. package/js/gemini.js +1397 -0
  109. package/js/hitbtc.js +1343 -0
  110. package/js/hitbtc3.js +2329 -0
  111. package/js/hollaex.js +1486 -0
  112. package/js/huobi.js +5706 -0
  113. package/js/huobijp.js +1710 -0
  114. package/js/huobipro.js +18 -0
  115. package/js/idex.js +1439 -0
  116. package/js/independentreserve.js +649 -0
  117. package/js/indodax.js +742 -0
  118. package/js/itbit.js +722 -0
  119. package/js/kraken.js +2179 -0
  120. package/js/kucoin.js +2571 -0
  121. package/js/kucoinfutures.js +1771 -0
  122. package/js/kuna.js +809 -0
  123. package/js/latoken.js +1445 -0
  124. package/js/lbank.js +760 -0
  125. package/js/liquid.js +1432 -0
  126. package/js/luno.js +873 -0
  127. package/js/lykke.js +1147 -0
  128. package/js/mercado.js +771 -0
  129. package/js/mexc.js +3151 -0
  130. package/js/ndax.js +2233 -0
  131. package/js/novadax.js +1318 -0
  132. package/js/oceanex.js +816 -0
  133. package/js/okcoin.js +3841 -0
  134. package/js/okex.js +16 -0
  135. package/js/okex5.js +16 -0
  136. package/js/okx.js +4795 -0
  137. package/js/paymium.js +498 -0
  138. package/js/phemex.js +2957 -0
  139. package/js/poloniex.js +1674 -0
  140. package/js/probit.js +1346 -0
  141. package/js/qtrade.js +1588 -0
  142. package/js/ripio.js +1061 -0
  143. package/js/static_dependencies/BN/bn.js +3526 -0
  144. package/js/static_dependencies/README.md +1 -0
  145. package/js/static_dependencies/crypto-js/crypto-js.js +5988 -0
  146. package/js/static_dependencies/elliptic/lib/elliptic/curve/base.js +375 -0
  147. package/js/static_dependencies/elliptic/lib/elliptic/curve/edwards.js +433 -0
  148. package/js/static_dependencies/elliptic/lib/elliptic/curve/index.js +8 -0
  149. package/js/static_dependencies/elliptic/lib/elliptic/curve/mont.js +180 -0
  150. package/js/static_dependencies/elliptic/lib/elliptic/curve/short.js +938 -0
  151. package/js/static_dependencies/elliptic/lib/elliptic/curves.js +204 -0
  152. package/js/static_dependencies/elliptic/lib/elliptic/ec/index.js +240 -0
  153. package/js/static_dependencies/elliptic/lib/elliptic/ec/key.js +119 -0
  154. package/js/static_dependencies/elliptic/lib/elliptic/ec/signature.js +24 -0
  155. package/js/static_dependencies/elliptic/lib/elliptic/eddsa/index.js +145 -0
  156. package/js/static_dependencies/elliptic/lib/elliptic/eddsa/key.js +100 -0
  157. package/js/static_dependencies/elliptic/lib/elliptic/eddsa/signature.js +65 -0
  158. package/js/static_dependencies/elliptic/lib/elliptic/precomputed/secp256k1.js +780 -0
  159. package/js/static_dependencies/elliptic/lib/elliptic/utils.js +214 -0
  160. package/js/static_dependencies/elliptic/lib/elliptic.js +22 -0
  161. package/js/static_dependencies/elliptic/lib/hmac-drbg/hmac-drbg.js +114 -0
  162. package/js/static_dependencies/fetch-ponyfill/fetch-node.js +39 -0
  163. package/js/static_dependencies/node-fetch/index.js +1564 -0
  164. package/js/static_dependencies/node-rsa/NodeRSA.js +223 -0
  165. package/js/static_dependencies/node-rsa/asn1/ber/errors.js +13 -0
  166. package/js/static_dependencies/node-rsa/asn1/ber/index.js +21 -0
  167. package/js/static_dependencies/node-rsa/asn1/ber/reader.js +262 -0
  168. package/js/static_dependencies/node-rsa/asn1/ber/types.js +36 -0
  169. package/js/static_dependencies/node-rsa/asn1/index.js +17 -0
  170. package/js/static_dependencies/node-rsa/encryptEngines/js.js +34 -0
  171. package/js/static_dependencies/node-rsa/formats/components.js +71 -0
  172. package/js/static_dependencies/node-rsa/formats/formats.js +31 -0
  173. package/js/static_dependencies/node-rsa/formats/pkcs1.js +148 -0
  174. package/js/static_dependencies/node-rsa/formats/pkcs8.js +187 -0
  175. package/js/static_dependencies/node-rsa/libs/jsbn.js +1252 -0
  176. package/js/static_dependencies/node-rsa/libs/rsa.js +147 -0
  177. package/js/static_dependencies/node-rsa/schemes/pkcs1.js +176 -0
  178. package/js/static_dependencies/node-rsa/schemes/schemes.js +21 -0
  179. package/js/static_dependencies/node-rsa/utils.js +98 -0
  180. package/js/static_dependencies/qs/formats.js +18 -0
  181. package/js/static_dependencies/qs/index.js +11 -0
  182. package/js/static_dependencies/qs/parse.js +242 -0
  183. package/js/static_dependencies/qs/stringify.js +269 -0
  184. package/js/static_dependencies/qs/utils.js +230 -0
  185. package/js/stex.js +1925 -0
  186. package/js/test/.eslintrc.js +42 -0
  187. package/js/test/Exchange/test.balance.js +61 -0
  188. package/js/test/Exchange/test.borrowRate.js +32 -0
  189. package/js/test/Exchange/test.currency.js +52 -0
  190. package/js/test/Exchange/test.fetchBalance.js +23 -0
  191. package/js/test/Exchange/test.fetchBorrowInterest.js +59 -0
  192. package/js/test/Exchange/test.fetchBorrowRate.js +32 -0
  193. package/js/test/Exchange/test.fetchBorrowRates.js +28 -0
  194. package/js/test/Exchange/test.fetchClosedOrders.js +32 -0
  195. package/js/test/Exchange/test.fetchCurrencies.js +35 -0
  196. package/js/test/Exchange/test.fetchDeposits.js +31 -0
  197. package/js/test/Exchange/test.fetchFundingFees.js +19 -0
  198. package/js/test/Exchange/test.fetchFundingRateHistory.js +40 -0
  199. package/js/test/Exchange/test.fetchL2OrderBook.js +23 -0
  200. package/js/test/Exchange/test.fetchLedger.js +42 -0
  201. package/js/test/Exchange/test.fetchLeverageTiers.js +33 -0
  202. package/js/test/Exchange/test.fetchMarketLeverageTiers.js +22 -0
  203. package/js/test/Exchange/test.fetchMarkets.js +33 -0
  204. package/js/test/Exchange/test.fetchMyTrades.js +42 -0
  205. package/js/test/Exchange/test.fetchOHLCV.js +46 -0
  206. package/js/test/Exchange/test.fetchOpenOrders.js +36 -0
  207. package/js/test/Exchange/test.fetchOrderBook.js +25 -0
  208. package/js/test/Exchange/test.fetchOrderBooks.js +35 -0
  209. package/js/test/Exchange/test.fetchOrders.js +41 -0
  210. package/js/test/Exchange/test.fetchPositions.js +47 -0
  211. package/js/test/Exchange/test.fetchStatus.js +35 -0
  212. package/js/test/Exchange/test.fetchTicker.js +38 -0
  213. package/js/test/Exchange/test.fetchTickers.js +49 -0
  214. package/js/test/Exchange/test.fetchTrades.js +39 -0
  215. package/js/test/Exchange/test.fetchTradingFee.js +18 -0
  216. package/js/test/Exchange/test.fetchTradingFees.js +22 -0
  217. package/js/test/Exchange/test.fetchTransactions.js +31 -0
  218. package/js/test/Exchange/test.fetchWithdrawals.js +31 -0
  219. package/js/test/Exchange/test.ledgerItem.js +46 -0
  220. package/js/test/Exchange/test.leverageTier.js +33 -0
  221. package/js/test/Exchange/test.loadMarkets.js +35 -0
  222. package/js/test/Exchange/test.market.js +129 -0
  223. package/js/test/Exchange/test.ohlcv.js +33 -0
  224. package/js/test/Exchange/test.order.js +62 -0
  225. package/js/test/Exchange/test.orderbook.js +61 -0
  226. package/js/test/Exchange/test.position.js +21 -0
  227. package/js/test/Exchange/test.throttle.js +94 -0
  228. package/js/test/Exchange/test.ticker.js +95 -0
  229. package/js/test/Exchange/test.trade.js +68 -0
  230. package/js/test/Exchange/test.tradingFee.js +34 -0
  231. package/js/test/Exchange/test.transaction.js +35 -0
  232. package/js/test/base/.eslintrc +38 -0
  233. package/js/test/base/functions/test.crypto.js +110 -0
  234. package/js/test/base/functions/test.datetime.js +62 -0
  235. package/js/test/base/functions/test.generic.js +152 -0
  236. package/js/test/base/functions/test.number.js +362 -0
  237. package/js/test/base/functions/test.time.js +56 -0
  238. package/js/test/base/functions/test.type.js +53 -0
  239. package/js/test/base/test.base.js +193 -0
  240. package/js/test/errors/test.InsufficientFunds.js +86 -0
  241. package/js/test/errors/test.InvalidNonce.js +64 -0
  242. package/js/test/errors/test.InvalidOrder.js +35 -0
  243. package/js/test/errors/test.OrderNotFound.js +39 -0
  244. package/js/test/test.js +426 -0
  245. package/js/test/test.timeout_hang.js +12 -0
  246. package/js/therock.js +1431 -0
  247. package/js/tidebit.js +632 -0
  248. package/js/tidex.js +939 -0
  249. package/js/timex.js +1283 -0
  250. package/js/upbit.js +1622 -0
  251. package/js/vcc.js +1353 -0
  252. package/js/wavesexchange.js +2185 -0
  253. package/js/wazirx.js +732 -0
  254. package/js/whitebit.js +1352 -0
  255. package/js/woo.js +1577 -0
  256. package/js/xena.js +1948 -0
  257. package/js/yobit.js +1129 -0
  258. package/js/zaif.js +647 -0
  259. package/js/zb.js +4088 -0
  260. package/js/zipmex.js +40 -0
  261. package/js/zonda.js +1497 -0
  262. package/multilang.sh +159 -0
  263. package/package.json +591 -0
  264. package/postinstall.js +103 -0
package/ccxt.d.ts ADDED
@@ -0,0 +1,692 @@
1
+ declare module 'ccxt' {
2
+
3
+ /**
4
+ * Represents an associative array of a same type.
5
+ */
6
+ interface Dictionary<T> {
7
+ [key: string]: T;
8
+ }
9
+
10
+ // errors.js -----------------------------------------
11
+
12
+ export class BaseError extends Error {
13
+ constructor(message: string);
14
+ }
15
+
16
+ export class ExchangeError extends BaseError {}
17
+ export class AuthenticationError extends ExchangeError {}
18
+ export class PermissionDenied extends AuthenticationError {}
19
+ export class AccountNotEnabled extends PermissionDenied {}
20
+ export class AccountSuspended extends AuthenticationError {}
21
+ export class ArgumentsRequired extends ExchangeError {}
22
+ export class BadRequest extends ExchangeError {}
23
+ export class BadSymbol extends BadRequest {}
24
+ export class MarginModeAlreadySet extends BadRequest {}
25
+ export class BadResponse extends ExchangeError {}
26
+ export class NullResponse extends BadResponse {}
27
+ export class InsufficientFunds extends ExchangeError {}
28
+ export class InvalidAddress extends ExchangeError {}
29
+ export class AddressPending extends InvalidAddress {}
30
+ export class InvalidOrder extends ExchangeError {}
31
+ export class OrderNotFound extends InvalidOrder {}
32
+ export class OrderNotCached extends InvalidOrder {}
33
+ export class CancelPending extends InvalidOrder {}
34
+ export class OrderImmediatelyFillable extends InvalidOrder {}
35
+ export class OrderNotFillable extends InvalidOrder {}
36
+ export class DuplicateOrderId extends InvalidOrder {}
37
+ export class NotSupported extends ExchangeError {}
38
+ export class NetworkError extends BaseError {}
39
+ export class DDoSProtection extends NetworkError {}
40
+ export class RateLimitExceeded extends DDoSProtection {}
41
+ export class ExchangeNotAvailable extends NetworkError {}
42
+ export class OnMaintenance extends ExchangeNotAvailable {}
43
+ export class InvalidNonce extends NetworkError {}
44
+ export class RequestTimeout extends NetworkError {}
45
+
46
+ // -----------------------------------------------
47
+
48
+ export const version: string;
49
+ export const exchanges: string[];
50
+
51
+ export interface MinMax {
52
+ min: number | undefined;
53
+ max: number | undefined;
54
+ }
55
+
56
+ export interface Market {
57
+ id: string;
58
+ symbol: string;
59
+ base: string;
60
+ quote: string;
61
+ baseId: string;
62
+ quoteId: string;
63
+ active?: boolean | undefined;
64
+ type?: string;
65
+ spot?: boolean;
66
+ margin?: boolean;
67
+ swap?: boolean;
68
+ future?: boolean;
69
+ option?: boolean;
70
+ contract?: boolean;
71
+ settle?: string | undefined;
72
+ settleId?: string | undefined;
73
+ contractSize?: number | undefined;
74
+ linear?: boolean | undefined;
75
+ inverse?: boolean | undefined;
76
+ expiry?: number | undefined;
77
+ expiryDatetime?: string | undefined;
78
+ strike?: number | undefined;
79
+ optionType?: string | undefined;
80
+ taker?: number | undefined;
81
+ maker?: number | undefined;
82
+ percentage?: boolean | undefined;
83
+ tierBased?: boolean | undefined;
84
+ feeSide?: string | undefined;
85
+ precision: {
86
+ amount: number | undefined,
87
+ price: number | undefined
88
+ };
89
+ limits: {
90
+ amount?: MinMax,
91
+ cost?: MinMax,
92
+ leverage?: MinMax,
93
+ price?: MinMax,
94
+ };
95
+ info: any;
96
+ }
97
+
98
+ export interface Order {
99
+ id: string;
100
+ clientOrderId: string;
101
+ datetime: string;
102
+ timestamp: number;
103
+ lastTradeTimestamp: number;
104
+ status: 'open' | 'closed' | 'canceled';
105
+ symbol: string;
106
+ type: string;
107
+ timeInForce?: string;
108
+ side: 'buy' | 'sell';
109
+ price: number;
110
+ average?: number;
111
+ amount: number;
112
+ filled: number;
113
+ remaining: number;
114
+ cost: number;
115
+ trades: Trade[];
116
+ fee: Fee;
117
+ info: any;
118
+ }
119
+
120
+ export interface OrderBook {
121
+ asks: [number, number][];
122
+ bids: [number, number][];
123
+ datetime: string;
124
+ timestamp: number;
125
+ nonce: number;
126
+ }
127
+
128
+ export interface Trade {
129
+ amount: number; // amount of base currency
130
+ datetime: string; // ISO8601 datetime with milliseconds;
131
+ id: string; // string trade id
132
+ info: any; // the original decoded JSON as is
133
+ order?: string; // string order id or undefined/None/null
134
+ price: number; // float price in quote currency
135
+ timestamp: number; // Unix timestamp in milliseconds
136
+ type?: string; // order type, 'market', 'limit', ... or undefined/None/null
137
+ side: 'buy' | 'sell'; // direction of the trade, 'buy' or 'sell'
138
+ symbol: string; // symbol in CCXT format
139
+ takerOrMaker: 'taker' | 'maker'; // string, 'taker' or 'maker'
140
+ cost: number; // total cost (including fees), `price * amount`
141
+ fee: Fee;
142
+ }
143
+
144
+ export interface Ticker {
145
+ symbol: string;
146
+ info: any;
147
+ timestamp: number;
148
+ datetime: string;
149
+ high: number;
150
+ low: number;
151
+ bid: number;
152
+ bidVolume?: number;
153
+ ask: number;
154
+ askVolume?: number;
155
+ vwap?: number;
156
+ open?: number;
157
+ close?: number;
158
+ last?: number;
159
+ previousClose?: number;
160
+ change?: number;
161
+ percentage?: number;
162
+ average?: number;
163
+ quoteVolume?: number;
164
+ baseVolume?: number;
165
+ }
166
+
167
+ export interface Transaction {
168
+ info: any;
169
+ id: string;
170
+ txid?: string;
171
+ timestamp: number;
172
+ datetime: string;
173
+ address: string;
174
+ type: "deposit" | "withdrawal";
175
+ amount: number;
176
+ currency: string;
177
+ status: "pending" | "ok";
178
+ updated: number;
179
+ fee: Fee;
180
+ }
181
+
182
+ export interface Tickers extends Dictionary<Ticker> {
183
+ info: any;
184
+ }
185
+
186
+ export interface Currency {
187
+ id: string;
188
+ code: string;
189
+ numericId?: number;
190
+ precision: number;
191
+ }
192
+
193
+ export interface Balance {
194
+ free: number;
195
+ used: number;
196
+ total: number;
197
+ }
198
+
199
+ export interface PartialBalances extends Dictionary<number> {
200
+ }
201
+
202
+ export interface Balances extends Dictionary<Balance> {
203
+ info: any;
204
+ }
205
+
206
+ export interface DepositAddress {
207
+ currency: string;
208
+ address: string;
209
+ status: string;
210
+ info: any;
211
+ }
212
+
213
+ export interface Fee {
214
+ type: 'taker' | 'maker';
215
+ currency: string;
216
+ rate: number;
217
+ cost: number;
218
+ }
219
+
220
+ export interface WithdrawalResponse {
221
+ info: any;
222
+ id: string;
223
+ }
224
+
225
+ export interface DepositAddressResponse {
226
+ currency: string;
227
+ address: string;
228
+ info: any;
229
+ tag?: string;
230
+ }
231
+
232
+ /** [ timestamp, open, high, low, close, volume ] */
233
+ export type OHLCV = [number, number, number, number, number, number];
234
+
235
+ /** Request parameters */
236
+ type Params = Dictionary<string | number | boolean | string[]>;
237
+
238
+ export class Exchange {
239
+ constructor(config?: {[key in keyof Exchange]?: Exchange[key]});
240
+ // allow dynamic keys
241
+ [key: string]: any;
242
+ // properties
243
+ version: string;
244
+ apiKey: string;
245
+ secret: string;
246
+ password: string;
247
+ uid: string;
248
+ requiredCredentials: {
249
+ apiKey: boolean;
250
+ secret: boolean;
251
+ uid: boolean;
252
+ login: boolean;
253
+ password: boolean;
254
+ twofa: boolean;
255
+ privateKey: boolean;
256
+ walletAddress: boolean;
257
+ token: boolean;
258
+ };
259
+ options: {
260
+ [key: string]: any;
261
+ };
262
+ urls: {
263
+ logo: string;
264
+ api: string | Dictionary<string>;
265
+ test: string | Dictionary<string>;
266
+ www: string;
267
+ doc: string[];
268
+ api_management?: string;
269
+ fees: string;
270
+ referral: string;
271
+ };
272
+ precisionMode: number;
273
+ hash: any;
274
+ hmac: any;
275
+ jwt: any;
276
+ binaryConcat: any;
277
+ stringToBinary: any;
278
+ stringToBase64: any;
279
+ base64ToBinary: any;
280
+ base64ToString: any;
281
+ binaryToString: any;
282
+ utf16ToBase64: any;
283
+ urlencode: any;
284
+ pluck: any;
285
+ unique: any;
286
+ extend: any;
287
+ deepExtend: any;
288
+ flatten: any;
289
+ groupBy: any;
290
+ indexBy: any;
291
+ sortBy: any;
292
+ keysort: any;
293
+ decimal: any;
294
+ safeFloat: any;
295
+ safeString: any;
296
+ safeInteger: any;
297
+ safeValue: any;
298
+ capitalize: any;
299
+ json: JSON["stringify"]
300
+ sum: any;
301
+ ordered: any;
302
+ aggregate: any;
303
+ truncate: any;
304
+ name: string;
305
+ // nodeVersion: string;
306
+ fees: object;
307
+ enableRateLimit: boolean;
308
+ countries: string[];
309
+ // set by loadMarkets
310
+ markets: Dictionary<Market>;
311
+ markets_by_id: Dictionary<Market>;
312
+ currencies: Dictionary<Currency>;
313
+ ids: string[];
314
+ symbols: string[];
315
+ id: string;
316
+ proxy: string;
317
+ parse8601: typeof Date.parse
318
+ milliseconds: typeof Date.now;
319
+ rateLimit: number; // milliseconds = seconds * 1000
320
+ timeout: number; // milliseconds
321
+ verbose: boolean;
322
+ twofa: boolean;// two-factor authentication
323
+ substituteCommonCurrencyCodes: boolean;
324
+ timeframes: Dictionary<number | string>;
325
+ has: Dictionary<boolean | 'emulated'>; // https://github.com/ccxt/ccxt/pull/1984
326
+ balance: object;
327
+ orderbooks: object;
328
+ orders: object;
329
+ trades: object;
330
+ userAgent: { 'User-Agent': string } | false;
331
+ limits: { amount: MinMax, price: MinMax, cost: MinMax };
332
+ hasCancelAllOrders: boolean;
333
+ hasCancelOrder: boolean;
334
+ hasCancelOrders: boolean;
335
+ hasCORS: boolean;
336
+ hasCreateDepositAddress: boolean;
337
+ hasCreateLimitOrder: boolean;
338
+ hasCreateMarketOrder: boolean;
339
+ hasCreateOrder: boolean;
340
+ hasDeposit: boolean;
341
+ hasEditOrder: boolean;
342
+ hasFetchBalance: boolean;
343
+ hasFetchBidsAsks: boolean;
344
+ hasFetchClosedOrders: boolean;
345
+ hasFetchCurrencies: boolean;
346
+ hasFetchDepositAddress: boolean;
347
+ hasFetchDeposits: boolean;
348
+ hasFetchFundingFees: boolean;
349
+ hasFetchL2OrderBook: boolean;
350
+ hasFetchLedger: boolean;
351
+ hasFetchMarkets: boolean;
352
+ hasFetchMyTrades: boolean;
353
+ hasFetchOHLCV: boolean;
354
+ hasFetchOpenOrders: boolean;
355
+ hasFetchOrder: boolean;
356
+ hasFetchOrderBook: boolean;
357
+ hasFetchOrderBooks: boolean;
358
+ hasFetchOrders: boolean;
359
+ hasFetchStatus: boolean;
360
+ hasFetchTicker: boolean;
361
+ hasFetchTickers: boolean;
362
+ hasFetchTime: boolean;
363
+ hasFetchTrades: boolean;
364
+ hasFetchTradingFee: boolean;
365
+ hasFetchTradingFees: boolean;
366
+ hasFetchTradingLimits: boolean;
367
+ hasFetchTransactions: boolean;
368
+ hasFetchWithdrawals: boolean;
369
+ hasPrivateAPI: boolean;
370
+ hasPublicAPI: boolean;
371
+ hasWithdraw: boolean;
372
+
373
+ // methods
374
+ account (): Balance;
375
+ cancelAllOrders (...args: any): Promise<any>; // TODO: add function signatures
376
+ cancelOrder (id: string, symbol?: string, params?: Params): Promise<Order>;
377
+ cancelOrders (...args: any): Promise<any>; // TODO: add function signatures
378
+ checkRequiredCredentials (): void;
379
+ commonCurrencyCode (currency: string): string;
380
+ createDepositAddress (currency: string, params?: Params): Promise<DepositAddressResponse>;
381
+ createLimitOrder (symbol: string, side: Order['side'], amount: number, price: number, params?: Params): Promise<Order>;
382
+ createLimitBuyOrder (symbol: string, amount: number, price: number, params?: Params): Promise<Order>;
383
+ createLimitSellOrder (symbol: string, amount: number, price: number, params?: Params): Promise<Order>;
384
+ createMarketOrder (symbol: string, side: Order['side'], amount: number, price?: number, params?: Params): Promise<Order>;
385
+ createOrder (symbol: string, type: Order['type'], side: Order['side'], amount: number, price?: number, params?: Params): Promise<Order>;
386
+ decode (str: string): string;
387
+ defaults (): any;
388
+ defineRestApi (api: any, methodName: any, options?: Dictionary<any>): void;
389
+ deposit (...args: any): Promise<any>; // TODO: add function signatures
390
+ describe (): any;
391
+ editOrder (id: string, symbol: string, type: Order['type'], side: Order['side'], amount: number, price?: number, params?: Params): Promise<Order>;
392
+ encode (str: string): string;
393
+ encodeURIComponent (...args: any[]): string;
394
+ extractParams (str: string): string[];
395
+ fetch (url: string, method?: string, headers?: any, body?: any): Promise<any>;
396
+ fetch2 (path: any, api?: string, method?: string, params?: Params, headers?: any, body?: any): Promise<any>;
397
+ fetchBalance (params?: Params): Promise<Balances>;
398
+ fetchBidsAsks (symbols?: string[], params?: Params): Promise<any>;
399
+ fetchClosedOrders (symbol?: string, since?: number, limit?: number, params?: Params): Promise<Order[]>;
400
+ fetchCurrencies (params?: Params): Promise<Dictionary<Currency>>;
401
+ fetchDepositAddress (currency: string, params?: Params): Promise<DepositAddressResponse>;
402
+ fetchDeposits (currency?: string, since?: number, limit?: number, params?: Params): Promise<Transaction[]>;
403
+ fetchFreeBalance (params?: Params): Promise<PartialBalances>;
404
+ fetchFundingFees (...args: any): Promise<any>; // TODO: add function signatures
405
+ fetchL2OrderBook (...args: any): Promise<any>; // TODO: add function signatures
406
+ fetchLedger (...args: any): Promise<any>; // TODO: add function signatures
407
+ fetchMarkets (): Promise<Market[]>;
408
+ fetchMyTrades (symbol?: string, since?: any, limit?: any, params?: Params): Promise<Trade[]>;
409
+ fetchOHLCV (symbol: string, timeframe?: string, since?: number, limit?: number, params?: Params): Promise<OHLCV[]>;
410
+ fetchOpenOrders (symbol?: string, since?: number, limit?: number, params?: Params): Promise<Order[]>;
411
+ fetchOrder (id: string, symbol: string, params?: Params): Promise<Order>;
412
+ fetchOrderBook (symbol: string, limit?: number, params?: Params): Promise<OrderBook>;
413
+ fetchOrderBooks (...args: any): Promise<any>; // TODO: add function signatures
414
+ fetchOrders (symbol?: string, since?: number, limit?: number, params?: Params): Promise<Order[]>;
415
+ fetchOrderStatus (id: string, market: string): Promise<string>;
416
+ fetchStatus (...args: any): Promise<any>; // TODO: add function signatures
417
+ fetchTicker (symbol: string, params?: Params): Promise<Ticker>;
418
+ fetchTickers (symbols?: string[], params?: Params): Promise<Dictionary<Ticker>>;
419
+ fetchTime (params?: Params): Promise<number>;
420
+ fetchTotalBalance (params?: Params): Promise<PartialBalances>;
421
+ fetchTrades (symbol: string, since?: number, limit?: number, params?: Params): Promise<Trade[]>;
422
+ fetchTradingFee (...args: any): Promise<any>; // TODO: add function signatures
423
+ fetchTradingFees (...args: any): Promise<any>; // TODO: add function signatures
424
+ fetchTradingLimits (...args: any): Promise<any>; // TODO: add function signatures
425
+ fetchTransactions (currency?: string, since?: number, limit?: number, params?: Params): Promise<Transaction[]>;
426
+ fetchUsedBalance (params?: Params): Promise<PartialBalances>;
427
+ fetchWithdrawals (currency?: string, since?: number, limit?: number, params?: Params): Promise<Transaction[]>;
428
+ getMarket (symbol: string): Market;
429
+ initRestRateLimiter (): void;
430
+ iso8601 (timestamp: number | string): string;
431
+ loadMarkets (reload?: boolean): Promise<Dictionary<Market>>;
432
+ market (symbol: string): Market;
433
+ marketId (symbol: string): string;
434
+ marketIds (symbols: string[]): string[];
435
+ microseconds (): number;
436
+ nonce (): number;
437
+ parseTimeframe (timeframe: string): number;
438
+ purgeCachedOrders (timestamp: number): void;
439
+ request (path: string, api?: string, method?: string, params?: Params, headers?: any, body?: any): Promise<any>;
440
+ seconds (): number;
441
+ setMarkets (markets: Market[], currencies?: Currency[]): Dictionary<Market>;
442
+ symbol (symbol: string): string;
443
+ withdraw (currency: string, amount: number, address: string, tag?: string, params?: Params): Promise<WithdrawalResponse>;
444
+ YmdHMS (timestamp: string, infix: string) : string;
445
+ }
446
+
447
+ /* tslint:disable */
448
+
449
+ export class aax extends Exchange {}
450
+ export class ascendex extends Exchange {}
451
+ export class bequant extends hitbtc {}
452
+ export class bibox extends Exchange {}
453
+ export class bigone extends Exchange {}
454
+ export class binance extends Exchange {}
455
+ export class binancecoinm extends binance {}
456
+ export class binanceus extends binance {}
457
+ export class binanceusdm extends binance {}
458
+ export class bit2c extends Exchange {}
459
+ export class bitbank extends Exchange {}
460
+ export class bitbay extends zonda {}
461
+ export class bitbns extends Exchange {}
462
+ export class bitcoincom extends fmfwio {}
463
+ export class bitfinex extends Exchange {}
464
+ export class bitfinex2 extends bitfinex {}
465
+ export class bitflyer extends Exchange {}
466
+ export class bitforex extends Exchange {}
467
+ export class bitget extends Exchange {}
468
+ export class bithumb extends Exchange {}
469
+ export class bitmart extends Exchange {}
470
+ export class bitmex extends Exchange {}
471
+ export class bitopro extends Exchange {}
472
+ export class bitpanda extends Exchange {}
473
+ export class bitrue extends Exchange {}
474
+ export class bitso extends Exchange {}
475
+ export class bitstamp extends Exchange {}
476
+ export class bitstamp1 extends Exchange {}
477
+ export class bittrex extends Exchange {}
478
+ export class bitvavo extends Exchange {}
479
+ export class bkex extends Exchange {}
480
+ export class bl3p extends Exchange {}
481
+ export class blockchaincom extends Exchange {}
482
+ export class btcalpha extends Exchange {}
483
+ export class btcbox extends Exchange {}
484
+ export class btcmarkets extends Exchange {}
485
+ export class btctradeua extends Exchange {}
486
+ export class btcturk extends Exchange {}
487
+ export class buda extends Exchange {}
488
+ export class bw extends Exchange {}
489
+ export class bybit extends Exchange {}
490
+ export class bytetrade extends Exchange {}
491
+ export class cdax extends Exchange {}
492
+ export class cex extends Exchange {}
493
+ export class coinbase extends Exchange {}
494
+ export class coinbaseprime extends coinbasepro {}
495
+ export class coinbasepro extends Exchange {}
496
+ export class coincheck extends Exchange {}
497
+ export class coinex extends Exchange {}
498
+ export class coinfalcon extends Exchange {}
499
+ export class coinmate extends Exchange {}
500
+ export class coinone extends Exchange {}
501
+ export class coinspot extends Exchange {}
502
+ export class crex24 extends Exchange {}
503
+ export class cryptocom extends Exchange {}
504
+ export class currencycom extends Exchange {}
505
+ export class delta extends Exchange {}
506
+ export class deribit extends Exchange {}
507
+ export class digifinex extends Exchange {}
508
+ export class eqonex extends Exchange {}
509
+ export class exmo extends Exchange {}
510
+ export class fairdesk extends Exchange {}
511
+ export class flowbtc extends ndax {}
512
+ export class fmfwio extends hitbtc {}
513
+ export class ftx extends Exchange {}
514
+ export class ftxus extends ftx {}
515
+ export class gateio extends Exchange {}
516
+ export class gemini extends Exchange {}
517
+ export class hitbtc extends Exchange {}
518
+ export class hitbtc3 extends Exchange {}
519
+ export class hollaex extends Exchange {}
520
+ export class huobi extends Exchange {}
521
+ export class huobijp extends Exchange {}
522
+ export class huobipro extends huobi {}
523
+ export class idex extends Exchange {}
524
+ export class independentreserve extends Exchange {}
525
+ export class indodax extends Exchange {}
526
+ export class itbit extends Exchange {}
527
+ export class kraken extends Exchange {}
528
+ export class kucoin extends Exchange {}
529
+ export class kucoinfutures extends kucoin {}
530
+ export class kuna extends Exchange {}
531
+ export class latoken extends Exchange {}
532
+ export class lbank extends Exchange {}
533
+ export class liquid extends Exchange {}
534
+ export class luno extends Exchange {}
535
+ export class lykke extends Exchange {}
536
+ export class mercado extends Exchange {}
537
+ export class mexc extends Exchange {}
538
+ export class ndax extends Exchange {}
539
+ export class novadax extends Exchange {}
540
+ export class oceanex extends Exchange {}
541
+ export class okcoin extends Exchange {}
542
+ export class okex extends okx {}
543
+ export class okex5 extends okex {}
544
+ export class okx extends Exchange {}
545
+ export class paymium extends Exchange {}
546
+ export class phemex extends Exchange {}
547
+ export class poloniex extends Exchange {}
548
+ export class probit extends Exchange {}
549
+ export class qtrade extends Exchange {}
550
+ export class ripio extends Exchange {}
551
+ export class stex extends Exchange {}
552
+ export class therock extends Exchange {}
553
+ export class tidebit extends Exchange {}
554
+ export class tidex extends Exchange {}
555
+ export class timex extends Exchange {}
556
+ export class upbit extends Exchange {}
557
+ export class vcc extends Exchange {}
558
+ export class wavesexchange extends Exchange {}
559
+ export class wazirx extends Exchange {}
560
+ export class whitebit extends Exchange {}
561
+ export class woo extends Exchange {}
562
+ export class xena extends Exchange {}
563
+ export class yobit extends Exchange {}
564
+ export class zaif extends Exchange {}
565
+ export class zb extends Exchange {}
566
+ export class zipmex extends ndax {}
567
+ export class zonda extends Exchange {}
568
+
569
+ /* tslint:enable */
570
+
571
+ export type ExchangeId =
572
+ | 'aax'
573
+ | 'ascendex'
574
+ | 'bequant'
575
+ | 'bibox'
576
+ | 'bigone'
577
+ | 'binance'
578
+ | 'binancecoinm'
579
+ | 'binanceus'
580
+ | 'binanceusdm'
581
+ | 'bit2c'
582
+ | 'bitbank'
583
+ | 'bitbay'
584
+ | 'bitbns'
585
+ | 'bitcoincom'
586
+ | 'bitfinex'
587
+ | 'bitfinex2'
588
+ | 'bitflyer'
589
+ | 'bitforex'
590
+ | 'bitget'
591
+ | 'bithumb'
592
+ | 'bitmart'
593
+ | 'bitmex'
594
+ | 'bitopro'
595
+ | 'bitpanda'
596
+ | 'bitrue'
597
+ | 'bitso'
598
+ | 'bitstamp'
599
+ | 'bitstamp1'
600
+ | 'bittrex'
601
+ | 'bitvavo'
602
+ | 'bkex'
603
+ | 'bl3p'
604
+ | 'blockchaincom'
605
+ | 'btcalpha'
606
+ | 'btcbox'
607
+ | 'btcmarkets'
608
+ | 'btctradeua'
609
+ | 'btcturk'
610
+ | 'buda'
611
+ | 'bw'
612
+ | 'bybit'
613
+ | 'bytetrade'
614
+ | 'cdax'
615
+ | 'cex'
616
+ | 'coinbase'
617
+ | 'coinbaseprime'
618
+ | 'coinbasepro'
619
+ | 'coincheck'
620
+ | 'coinex'
621
+ | 'coinfalcon'
622
+ | 'coinmate'
623
+ | 'coinone'
624
+ | 'coinspot'
625
+ | 'crex24'
626
+ | 'cryptocom'
627
+ | 'currencycom'
628
+ | 'delta'
629
+ | 'deribit'
630
+ | 'digifinex'
631
+ | 'eqonex'
632
+ | 'exmo'
633
+ | 'fairdesk'
634
+ | 'flowbtc'
635
+ | 'fmfwio'
636
+ | 'ftx'
637
+ | 'ftxus'
638
+ | 'gateio'
639
+ | 'gemini'
640
+ | 'hitbtc'
641
+ | 'hitbtc3'
642
+ | 'hollaex'
643
+ | 'huobi'
644
+ | 'huobijp'
645
+ | 'huobipro'
646
+ | 'idex'
647
+ | 'independentreserve'
648
+ | 'indodax'
649
+ | 'itbit'
650
+ | 'kraken'
651
+ | 'kucoin'
652
+ | 'kucoinfutures'
653
+ | 'kuna'
654
+ | 'latoken'
655
+ | 'lbank'
656
+ | 'liquid'
657
+ | 'luno'
658
+ | 'lykke'
659
+ | 'mercado'
660
+ | 'mexc'
661
+ | 'ndax'
662
+ | 'novadax'
663
+ | 'oceanex'
664
+ | 'okcoin'
665
+ | 'okex'
666
+ | 'okex5'
667
+ | 'okx'
668
+ | 'paymium'
669
+ | 'phemex'
670
+ | 'poloniex'
671
+ | 'probit'
672
+ | 'qtrade'
673
+ | 'ripio'
674
+ | 'stex'
675
+ | 'therock'
676
+ | 'tidebit'
677
+ | 'tidex'
678
+ | 'timex'
679
+ | 'upbit'
680
+ | 'vcc'
681
+ | 'wavesexchange'
682
+ | 'wazirx'
683
+ | 'whitebit'
684
+ | 'woo'
685
+ | 'xena'
686
+ | 'yobit'
687
+ | 'zaif'
688
+ | 'zb'
689
+ | 'zipmex'
690
+ | 'zonda'
691
+
692
+ }