ccxt 4.4.47 → 4.4.48
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 +3 -3
- package/dist/ccxt.browser.min.js +16 -16
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +1 -1
- package/dist/cjs/src/binance.js +18 -14
- package/dist/cjs/src/bitget.js +4 -2
- package/dist/cjs/src/bitmart.js +7 -2
- package/dist/cjs/src/bitmex.js +8 -5
- package/dist/cjs/src/bybit.js +7 -2
- package/dist/cjs/src/coinbase.js +11 -1
- package/dist/cjs/src/coincatch.js +86 -2
- package/dist/cjs/src/coincheck.js +52 -0
- package/dist/cjs/src/coinlist.js +77 -0
- package/dist/cjs/src/coinmate.js +63 -0
- package/dist/cjs/src/coinmetro.js +68 -0
- package/dist/cjs/src/coinone.js +56 -0
- package/dist/cjs/src/coinsph.js +67 -1
- package/dist/cjs/src/coinspot.js +47 -0
- package/dist/cjs/src/currencycom.js +72 -0
- package/dist/cjs/src/defx.js +93 -6
- package/dist/cjs/src/delta.js +83 -1
- package/dist/cjs/src/gate.js +10 -1
- package/dist/cjs/src/htx.js +10 -2
- package/dist/cjs/src/hyperliquid.js +6 -1
- package/dist/cjs/src/independentreserve.js +60 -0
- package/dist/cjs/src/kraken.js +1 -1
- package/dist/cjs/src/krakenfutures.js +4 -4
- package/dist/cjs/src/okx.js +9 -1
- package/dist/cjs/src/paradex.js +5 -2
- package/dist/cjs/src/phemex.js +103 -0
- package/dist/cjs/src/poloniex.js +61 -0
- package/dist/cjs/src/poloniexfutures.js +74 -0
- package/dist/cjs/src/upbit.js +61 -0
- package/dist/cjs/src/woo.js +6 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/independentreserve.d.ts +6 -0
- package/js/src/ace.js +1 -1
- package/js/src/binance.d.ts +7 -0
- package/js/src/binance.js +18 -14
- package/js/src/bitget.js +4 -2
- package/js/src/bitmart.js +7 -2
- package/js/src/bitmex.js +8 -5
- package/js/src/bybit.d.ts +1 -1
- package/js/src/bybit.js +7 -2
- package/js/src/coinbase.d.ts +1 -0
- package/js/src/coinbase.js +11 -1
- package/js/src/coincatch.d.ts +1 -2
- package/js/src/coincatch.js +86 -2
- package/js/src/coincheck.js +52 -0
- package/js/src/coinlist.js +77 -0
- package/js/src/coinmate.js +63 -0
- package/js/src/coinmetro.js +68 -0
- package/js/src/coinone.js +56 -0
- package/js/src/coinsph.d.ts +1 -1
- package/js/src/coinsph.js +67 -1
- package/js/src/coinspot.js +47 -0
- package/js/src/currencycom.js +72 -0
- package/js/src/defx.js +93 -6
- package/js/src/delta.js +83 -1
- package/js/src/gate.d.ts +1 -0
- package/js/src/gate.js +10 -1
- package/js/src/htx.d.ts +1 -0
- package/js/src/htx.js +10 -2
- package/js/src/hyperliquid.js +6 -1
- package/js/src/independentreserve.js +60 -0
- package/js/src/kraken.js +1 -1
- package/js/src/krakenfutures.js +4 -4
- package/js/src/okx.d.ts +1 -0
- package/js/src/okx.js +9 -1
- package/js/src/paradex.js +5 -2
- package/js/src/phemex.js +103 -0
- package/js/src/poloniex.js +61 -0
- package/js/src/poloniexfutures.js +74 -0
- package/js/src/upbit.js +61 -0
- package/js/src/woo.js +6 -1
- package/package.json +1 -1
package/js/src/coinsph.js
CHANGED
|
@@ -297,6 +297,72 @@ export default class coinsph extends Exchange {
|
|
|
297
297
|
'ARB': 'ARBITRUM',
|
|
298
298
|
},
|
|
299
299
|
},
|
|
300
|
+
'features': {
|
|
301
|
+
'spot': {
|
|
302
|
+
'sandbox': false,
|
|
303
|
+
'createOrder': {
|
|
304
|
+
'marginMode': false,
|
|
305
|
+
'triggerPrice': true,
|
|
306
|
+
'triggerPriceType': undefined,
|
|
307
|
+
'triggerDirection': false,
|
|
308
|
+
'stopLossPrice': false,
|
|
309
|
+
'takeProfitPrice': false,
|
|
310
|
+
'attachedStopLossTakeProfit': undefined,
|
|
311
|
+
'timeInForce': {
|
|
312
|
+
'IOC': true,
|
|
313
|
+
'FOK': true,
|
|
314
|
+
'PO': false,
|
|
315
|
+
'GTD': false,
|
|
316
|
+
},
|
|
317
|
+
'hedged': false,
|
|
318
|
+
'trailing': false,
|
|
319
|
+
'leverage': false,
|
|
320
|
+
'marketBuyByCost': true,
|
|
321
|
+
'marketBuyRequiresPrice': false,
|
|
322
|
+
'selfTradePrevention': true,
|
|
323
|
+
'iceberg': false,
|
|
324
|
+
},
|
|
325
|
+
'createOrders': undefined,
|
|
326
|
+
'fetchMyTrades': {
|
|
327
|
+
'marginMode': false,
|
|
328
|
+
'limit': 1000,
|
|
329
|
+
'daysBack': 100000,
|
|
330
|
+
'untilDays': 100000, // todo implement
|
|
331
|
+
},
|
|
332
|
+
'fetchOrder': {
|
|
333
|
+
'marginMode': false,
|
|
334
|
+
'trigger': false,
|
|
335
|
+
'trailing': false,
|
|
336
|
+
},
|
|
337
|
+
'fetchOpenOrders': {
|
|
338
|
+
'marginMode': false,
|
|
339
|
+
'limit': undefined,
|
|
340
|
+
'trigger': false,
|
|
341
|
+
'trailing': false,
|
|
342
|
+
},
|
|
343
|
+
'fetchOrders': undefined,
|
|
344
|
+
'fetchClosedOrders': {
|
|
345
|
+
'marginMode': false,
|
|
346
|
+
'limit': 1000,
|
|
347
|
+
'daysBack': 100000,
|
|
348
|
+
'daysBackCanceled': 1,
|
|
349
|
+
'untilDays': 100000,
|
|
350
|
+
'trigger': false,
|
|
351
|
+
'trailing': false,
|
|
352
|
+
},
|
|
353
|
+
'fetchOHLCV': {
|
|
354
|
+
'limit': 1000,
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
'swap': {
|
|
358
|
+
'linear': undefined,
|
|
359
|
+
'inverse': undefined,
|
|
360
|
+
},
|
|
361
|
+
'future': {
|
|
362
|
+
'linear': undefined,
|
|
363
|
+
'inverse': undefined,
|
|
364
|
+
},
|
|
365
|
+
},
|
|
300
366
|
// https://coins-docs.github.io/errors/
|
|
301
367
|
'exceptions': {
|
|
302
368
|
'exact': {
|
|
@@ -1248,7 +1314,7 @@ export default class coinsph extends Exchange {
|
|
|
1248
1314
|
* @method
|
|
1249
1315
|
* @name coinsph#fetchOpenOrders
|
|
1250
1316
|
* @description fetch all unfilled currently open orders
|
|
1251
|
-
* @see https://coins-docs.github.io/rest-api/#
|
|
1317
|
+
* @see https://coins-docs.github.io/rest-api/#current-open-orders-user_data
|
|
1252
1318
|
* @param {string} symbol unified market symbol
|
|
1253
1319
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1254
1320
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
package/js/src/coinspot.js
CHANGED
|
@@ -144,6 +144,53 @@ export default class coinspot extends Exchange {
|
|
|
144
144
|
'options': {
|
|
145
145
|
'fetchBalance': 'private_post_my_balances',
|
|
146
146
|
},
|
|
147
|
+
'features': {
|
|
148
|
+
'spot': {
|
|
149
|
+
'sandbox': false,
|
|
150
|
+
'createOrder': {
|
|
151
|
+
'marginMode': false,
|
|
152
|
+
'triggerPrice': false,
|
|
153
|
+
'triggerPriceType': undefined,
|
|
154
|
+
'triggerDirection': false,
|
|
155
|
+
'stopLossPrice': false,
|
|
156
|
+
'takeProfitPrice': false,
|
|
157
|
+
'attachedStopLossTakeProfit': undefined,
|
|
158
|
+
'timeInForce': {
|
|
159
|
+
'IOC': false,
|
|
160
|
+
'FOK': false,
|
|
161
|
+
'PO': false,
|
|
162
|
+
'GTD': false,
|
|
163
|
+
},
|
|
164
|
+
'hedged': false,
|
|
165
|
+
'trailing': false,
|
|
166
|
+
'leverage': false,
|
|
167
|
+
'marketBuyByCost': false,
|
|
168
|
+
'marketBuyRequiresPrice': false,
|
|
169
|
+
'selfTradePrevention': false,
|
|
170
|
+
'iceberg': false,
|
|
171
|
+
},
|
|
172
|
+
'createOrders': undefined,
|
|
173
|
+
'fetchMyTrades': {
|
|
174
|
+
'marginMode': false,
|
|
175
|
+
'limit': undefined,
|
|
176
|
+
'daysBack': 100000,
|
|
177
|
+
'untilDays': 100000, // todo implement
|
|
178
|
+
},
|
|
179
|
+
'fetchOrder': undefined,
|
|
180
|
+
'fetchOpenOrders': undefined,
|
|
181
|
+
'fetchOrders': undefined,
|
|
182
|
+
'fetchClosedOrders': undefined,
|
|
183
|
+
'fetchOHLCV': undefined,
|
|
184
|
+
},
|
|
185
|
+
'swap': {
|
|
186
|
+
'linear': undefined,
|
|
187
|
+
'inverse': undefined,
|
|
188
|
+
},
|
|
189
|
+
'future': {
|
|
190
|
+
'linear': undefined,
|
|
191
|
+
'inverse': undefined,
|
|
192
|
+
},
|
|
193
|
+
},
|
|
147
194
|
'precisionMode': TICK_SIZE,
|
|
148
195
|
});
|
|
149
196
|
}
|
package/js/src/currencycom.js
CHANGED
|
@@ -251,6 +251,78 @@ export default class currencycom extends Exchange {
|
|
|
251
251
|
'leverage_markets_suffix': '_LEVERAGE',
|
|
252
252
|
'collateralCurrencies': ['USD', 'EUR', 'USDT'],
|
|
253
253
|
},
|
|
254
|
+
'features': {
|
|
255
|
+
'default': {
|
|
256
|
+
'sandbox': true,
|
|
257
|
+
'createOrder': {
|
|
258
|
+
'marginMode': true,
|
|
259
|
+
'triggerPrice': true,
|
|
260
|
+
'triggerPriceType': undefined,
|
|
261
|
+
'triggerDirection': false,
|
|
262
|
+
'stopLossPrice': false,
|
|
263
|
+
'takeProfitPrice': false,
|
|
264
|
+
'attachedStopLossTakeProfit': {
|
|
265
|
+
'triggerPriceType': undefined,
|
|
266
|
+
'price': false,
|
|
267
|
+
},
|
|
268
|
+
'timeInForce': {
|
|
269
|
+
'IOC': true,
|
|
270
|
+
'FOK': true,
|
|
271
|
+
'PO': false,
|
|
272
|
+
'GTD': true,
|
|
273
|
+
},
|
|
274
|
+
'hedged': false,
|
|
275
|
+
'selfTradePrevention': false,
|
|
276
|
+
'trailing': false,
|
|
277
|
+
'iceberg': false,
|
|
278
|
+
'leverage': true,
|
|
279
|
+
'marketBuyByCost': false,
|
|
280
|
+
'marketBuyRequiresPrice': false,
|
|
281
|
+
},
|
|
282
|
+
'createOrders': undefined,
|
|
283
|
+
'fetchMyTrades': {
|
|
284
|
+
'marginMode': false,
|
|
285
|
+
'limit': 500,
|
|
286
|
+
'daysBack': 100000,
|
|
287
|
+
'untilDays': 100000, // todo implementation
|
|
288
|
+
},
|
|
289
|
+
'fetchOrder': {
|
|
290
|
+
'marginMode': false,
|
|
291
|
+
'trigger': false,
|
|
292
|
+
'trailing': false,
|
|
293
|
+
},
|
|
294
|
+
'fetchOpenOrders': {
|
|
295
|
+
'marginMode': true,
|
|
296
|
+
'limit': 100,
|
|
297
|
+
'trigger': false,
|
|
298
|
+
'trailing': false,
|
|
299
|
+
},
|
|
300
|
+
'fetchOrders': undefined,
|
|
301
|
+
'fetchClosedOrders': undefined,
|
|
302
|
+
'fetchOHLCV': {
|
|
303
|
+
'limit': 1000,
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
'spot': {
|
|
307
|
+
'extends': 'default',
|
|
308
|
+
},
|
|
309
|
+
'swap': {
|
|
310
|
+
'linear': {
|
|
311
|
+
'extends': 'default',
|
|
312
|
+
},
|
|
313
|
+
'inverse': {
|
|
314
|
+
'extends': 'default',
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
'future': {
|
|
318
|
+
'linear': {
|
|
319
|
+
'extends': 'default',
|
|
320
|
+
},
|
|
321
|
+
'inverse': {
|
|
322
|
+
'extends': 'default',
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
},
|
|
254
326
|
'exceptions': {
|
|
255
327
|
'broad': {
|
|
256
328
|
'FIELD_VALIDATION_ERROR Cancel is available only for LIMIT order': InvalidOrder,
|
package/js/src/defx.js
CHANGED
|
@@ -253,6 +253,87 @@ export default class defx extends Exchange {
|
|
|
253
253
|
'options': {
|
|
254
254
|
'sandboxMode': false,
|
|
255
255
|
},
|
|
256
|
+
'features': {
|
|
257
|
+
'spot': undefined,
|
|
258
|
+
'forDerivatives': {
|
|
259
|
+
'sandbox': true,
|
|
260
|
+
'createOrder': {
|
|
261
|
+
'marginMode': false,
|
|
262
|
+
'triggerPrice': true,
|
|
263
|
+
// todo implement
|
|
264
|
+
'triggerPriceType': {
|
|
265
|
+
'last': true,
|
|
266
|
+
'mark': true,
|
|
267
|
+
'index': false,
|
|
268
|
+
},
|
|
269
|
+
'triggerDirection': false,
|
|
270
|
+
'stopLossPrice': false,
|
|
271
|
+
'takeProfitPrice': false,
|
|
272
|
+
'attachedStopLossTakeProfit': undefined,
|
|
273
|
+
'timeInForce': {
|
|
274
|
+
'IOC': true,
|
|
275
|
+
'FOK': true,
|
|
276
|
+
'PO': true,
|
|
277
|
+
'GTD': false,
|
|
278
|
+
},
|
|
279
|
+
'hedged': false,
|
|
280
|
+
'selfTradePrevention': false,
|
|
281
|
+
'trailing': false,
|
|
282
|
+
'iceberg': false,
|
|
283
|
+
'leverage': false,
|
|
284
|
+
'marketBuyByCost': false,
|
|
285
|
+
'marketBuyRequiresPrice': false,
|
|
286
|
+
},
|
|
287
|
+
'createOrders': undefined,
|
|
288
|
+
'fetchMyTrades': {
|
|
289
|
+
'marginMode': false,
|
|
290
|
+
'limit': 1000,
|
|
291
|
+
'daysBack': undefined,
|
|
292
|
+
'untilDays': undefined,
|
|
293
|
+
},
|
|
294
|
+
'fetchOrder': {
|
|
295
|
+
'marginMode': false,
|
|
296
|
+
'trigger': false,
|
|
297
|
+
'trailing': false,
|
|
298
|
+
},
|
|
299
|
+
'fetchOpenOrders': {
|
|
300
|
+
'marginMode': true,
|
|
301
|
+
'limit': 100,
|
|
302
|
+
'trigger': false,
|
|
303
|
+
'trailing': false,
|
|
304
|
+
},
|
|
305
|
+
'fetchOrders': {
|
|
306
|
+
'marginMode': false,
|
|
307
|
+
'limit': 500,
|
|
308
|
+
'daysBack': 100000,
|
|
309
|
+
'untilDays': 100000,
|
|
310
|
+
'trigger': false,
|
|
311
|
+
'trailing': false,
|
|
312
|
+
},
|
|
313
|
+
'fetchClosedOrders': {
|
|
314
|
+
'marginMode': false,
|
|
315
|
+
'limit': 500,
|
|
316
|
+
'daysBack': 100000,
|
|
317
|
+
'daysBackCanceled': 1,
|
|
318
|
+
'untilDays': 100000,
|
|
319
|
+
'trigger': false,
|
|
320
|
+
'trailing': false,
|
|
321
|
+
},
|
|
322
|
+
'fetchOHLCV': {
|
|
323
|
+
'limit': 1000,
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
'swap': {
|
|
327
|
+
'linear': {
|
|
328
|
+
'extends': 'forDerivatives',
|
|
329
|
+
},
|
|
330
|
+
'inverse': undefined,
|
|
331
|
+
},
|
|
332
|
+
'future': {
|
|
333
|
+
'linear': undefined,
|
|
334
|
+
'inverse': undefined,
|
|
335
|
+
},
|
|
336
|
+
},
|
|
256
337
|
'commonCurrencies': {},
|
|
257
338
|
'exceptions': {
|
|
258
339
|
'exact': {
|
|
@@ -1663,8 +1744,10 @@ export default class defx extends Exchange {
|
|
|
1663
1744
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1664
1745
|
*/
|
|
1665
1746
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1666
|
-
|
|
1667
|
-
|
|
1747
|
+
const req = {
|
|
1748
|
+
'statuses': 'OPEN',
|
|
1749
|
+
};
|
|
1750
|
+
return await this.fetchOrders(symbol, since, limit, this.extend(req, params));
|
|
1668
1751
|
}
|
|
1669
1752
|
/**
|
|
1670
1753
|
* @method
|
|
@@ -1679,8 +1762,10 @@ export default class defx extends Exchange {
|
|
|
1679
1762
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1680
1763
|
*/
|
|
1681
1764
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1682
|
-
|
|
1683
|
-
|
|
1765
|
+
const req = {
|
|
1766
|
+
'statuses': 'FILLED',
|
|
1767
|
+
};
|
|
1768
|
+
return await this.fetchOrders(symbol, since, limit, this.extend(req, params));
|
|
1684
1769
|
}
|
|
1685
1770
|
/**
|
|
1686
1771
|
* @method
|
|
@@ -1695,8 +1780,10 @@ export default class defx extends Exchange {
|
|
|
1695
1780
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1696
1781
|
*/
|
|
1697
1782
|
async fetchCanceledOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1698
|
-
|
|
1699
|
-
|
|
1783
|
+
const req = {
|
|
1784
|
+
'statuses': 'CANCELED',
|
|
1785
|
+
};
|
|
1786
|
+
return await this.fetchOrders(symbol, since, limit, this.extend(req, params));
|
|
1700
1787
|
}
|
|
1701
1788
|
/**
|
|
1702
1789
|
* @method
|
package/js/src/delta.js
CHANGED
|
@@ -222,6 +222,88 @@ export default class delta extends Exchange {
|
|
|
222
222
|
'BEP20': 'BEP20(BSC)',
|
|
223
223
|
},
|
|
224
224
|
},
|
|
225
|
+
'features': {
|
|
226
|
+
'default': {
|
|
227
|
+
'sandbox': true,
|
|
228
|
+
'createOrder': {
|
|
229
|
+
'marginMode': false,
|
|
230
|
+
'triggerPrice': true,
|
|
231
|
+
// todo implement
|
|
232
|
+
'triggerPriceType': {
|
|
233
|
+
'last': true,
|
|
234
|
+
'mark': true,
|
|
235
|
+
'index': true,
|
|
236
|
+
},
|
|
237
|
+
'triggerDirection': false,
|
|
238
|
+
'stopLossPrice': false,
|
|
239
|
+
'takeProfitPrice': false,
|
|
240
|
+
'attachedStopLossTakeProfit': {
|
|
241
|
+
'triggerPriceType': undefined,
|
|
242
|
+
'price': true,
|
|
243
|
+
},
|
|
244
|
+
// todo implementation
|
|
245
|
+
'timeInForce': {
|
|
246
|
+
'IOC': true,
|
|
247
|
+
'FOK': true,
|
|
248
|
+
'PO': true,
|
|
249
|
+
'GTD': false,
|
|
250
|
+
},
|
|
251
|
+
'hedged': false,
|
|
252
|
+
'selfTradePrevention': false,
|
|
253
|
+
'trailing': false,
|
|
254
|
+
'iceberg': false,
|
|
255
|
+
'leverage': false,
|
|
256
|
+
'marketBuyByCost': false,
|
|
257
|
+
'marketBuyRequiresPrice': false,
|
|
258
|
+
},
|
|
259
|
+
'createOrders': undefined,
|
|
260
|
+
'fetchMyTrades': {
|
|
261
|
+
'marginMode': false,
|
|
262
|
+
'limit': 100,
|
|
263
|
+
'daysBack': 100000,
|
|
264
|
+
'untilDays': 100000,
|
|
265
|
+
},
|
|
266
|
+
'fetchOrder': undefined,
|
|
267
|
+
'fetchOpenOrders': {
|
|
268
|
+
'marginMode': false,
|
|
269
|
+
'limit': 100,
|
|
270
|
+
'trigger': false,
|
|
271
|
+
'trailing': false,
|
|
272
|
+
},
|
|
273
|
+
'fetchOrders': undefined,
|
|
274
|
+
'fetchClosedOrders': {
|
|
275
|
+
'marginMode': false,
|
|
276
|
+
'limit': 500,
|
|
277
|
+
'daysBack': 100000,
|
|
278
|
+
'daysBackCanceled': 1,
|
|
279
|
+
'untilDays': 100000,
|
|
280
|
+
'trigger': false,
|
|
281
|
+
'trailing': false,
|
|
282
|
+
},
|
|
283
|
+
'fetchOHLCV': {
|
|
284
|
+
'limit': 2000, // todo: recheck
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
'spot': {
|
|
288
|
+
'extends': 'default',
|
|
289
|
+
},
|
|
290
|
+
'swap': {
|
|
291
|
+
'linear': {
|
|
292
|
+
'extends': 'default',
|
|
293
|
+
},
|
|
294
|
+
'inverse': {
|
|
295
|
+
'extends': 'default',
|
|
296
|
+
},
|
|
297
|
+
},
|
|
298
|
+
'future': {
|
|
299
|
+
'linear': {
|
|
300
|
+
'extends': 'default',
|
|
301
|
+
},
|
|
302
|
+
'inverse': {
|
|
303
|
+
'extends': 'default',
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
},
|
|
225
307
|
'precisionMode': TICK_SIZE,
|
|
226
308
|
'requiredCredentials': {
|
|
227
309
|
'apiKey': true,
|
|
@@ -3488,7 +3570,7 @@ export default class delta extends Exchange {
|
|
|
3488
3570
|
'timestamp': timestamp,
|
|
3489
3571
|
};
|
|
3490
3572
|
let auth = method + timestamp + requestPath;
|
|
3491
|
-
if (
|
|
3573
|
+
if (method === 'GET') {
|
|
3492
3574
|
if (Object.keys(query).length) {
|
|
3493
3575
|
const queryString = '?' + this.urlencode(query);
|
|
3494
3576
|
auth += queryString;
|
package/js/src/gate.d.ts
CHANGED
|
@@ -801,6 +801,7 @@ export default class gate extends Exchange {
|
|
|
801
801
|
*/
|
|
802
802
|
fetchBorrowInterest(code?: Str, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<BorrowInterest[]>;
|
|
803
803
|
parseBorrowInterest(info: Dict, market?: Market): BorrowInterest;
|
|
804
|
+
nonce(): number;
|
|
804
805
|
sign(path: any, api?: any[], method?: string, params?: {}, headers?: any, body?: any): {
|
|
805
806
|
url: any;
|
|
806
807
|
method: string;
|
package/js/src/gate.js
CHANGED
|
@@ -650,6 +650,8 @@ export default class gate extends Exchange {
|
|
|
650
650
|
'X-Gate-Channel-Id': 'ccxt',
|
|
651
651
|
},
|
|
652
652
|
'options': {
|
|
653
|
+
'timeDifference': 0,
|
|
654
|
+
'adjustForTimeDifference': false,
|
|
653
655
|
'sandboxMode': false,
|
|
654
656
|
'unifiedAccount': undefined,
|
|
655
657
|
'createOrder': {
|
|
@@ -1163,6 +1165,9 @@ export default class gate extends Exchange {
|
|
|
1163
1165
|
* @returns {object[]} an array of objects representing market data
|
|
1164
1166
|
*/
|
|
1165
1167
|
async fetchMarkets(params = {}) {
|
|
1168
|
+
if (this.options['adjustForTimeDifference']) {
|
|
1169
|
+
await this.loadTimeDifference();
|
|
1170
|
+
}
|
|
1166
1171
|
const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
|
|
1167
1172
|
let rawPromises = [
|
|
1168
1173
|
this.fetchContractMarkets(params),
|
|
@@ -6667,6 +6672,9 @@ export default class gate extends Exchange {
|
|
|
6667
6672
|
'datetime': this.iso8601(timestamp),
|
|
6668
6673
|
};
|
|
6669
6674
|
}
|
|
6675
|
+
nonce() {
|
|
6676
|
+
return this.milliseconds() - this.options['timeDifference'];
|
|
6677
|
+
}
|
|
6670
6678
|
sign(path, api = [], method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
6671
6679
|
const authentication = api[0]; // public, private
|
|
6672
6680
|
const type = api[1]; // spot, margin, future, delivery
|
|
@@ -6740,7 +6748,8 @@ export default class gate extends Exchange {
|
|
|
6740
6748
|
}
|
|
6741
6749
|
const bodyPayload = (body === undefined) ? '' : body;
|
|
6742
6750
|
const bodySignature = this.hash(this.encode(bodyPayload), sha512);
|
|
6743
|
-
const
|
|
6751
|
+
const nonce = this.nonce();
|
|
6752
|
+
const timestamp = this.parseToInt(nonce / 1000);
|
|
6744
6753
|
const timestampString = timestamp.toString();
|
|
6745
6754
|
const signaturePath = '/api/' + this.version + entirePath;
|
|
6746
6755
|
const payloadArray = [method.toUpperCase(), signaturePath, queryString, bodySignature, timestampString];
|
package/js/src/htx.d.ts
CHANGED
|
@@ -672,6 +672,7 @@ export default class htx extends Exchange {
|
|
|
672
672
|
*/
|
|
673
673
|
fetchBorrowInterest(code?: Str, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<BorrowInterest[]>;
|
|
674
674
|
parseBorrowInterest(info: Dict, market?: Market): BorrowInterest;
|
|
675
|
+
nonce(): number;
|
|
675
676
|
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
676
677
|
url: string;
|
|
677
678
|
method: string;
|
package/js/src/htx.js
CHANGED
|
@@ -953,6 +953,8 @@ export default class htx extends Exchange {
|
|
|
953
953
|
'inverse': true,
|
|
954
954
|
},
|
|
955
955
|
},
|
|
956
|
+
'timeDifference': 0,
|
|
957
|
+
'adjustForTimeDifference': false,
|
|
956
958
|
'fetchOHLCV': {
|
|
957
959
|
'useHistoricalEndpointForSpot': true,
|
|
958
960
|
},
|
|
@@ -1771,6 +1773,9 @@ export default class htx extends Exchange {
|
|
|
1771
1773
|
* @returns {object[]} an array of objects representing market data
|
|
1772
1774
|
*/
|
|
1773
1775
|
async fetchMarkets(params = {}) {
|
|
1776
|
+
if (this.options['adjustForTimeDifference']) {
|
|
1777
|
+
await this.loadTimeDifference();
|
|
1778
|
+
}
|
|
1774
1779
|
let types = undefined;
|
|
1775
1780
|
[types, params] = this.handleOptionAndParams(params, 'fetchMarkets', 'types', {});
|
|
1776
1781
|
let allMarkets = [];
|
|
@@ -7451,6 +7456,9 @@ export default class htx extends Exchange {
|
|
|
7451
7456
|
'datetime': this.iso8601(timestamp),
|
|
7452
7457
|
};
|
|
7453
7458
|
}
|
|
7459
|
+
nonce() {
|
|
7460
|
+
return this.milliseconds() - this.options['timeDifference'];
|
|
7461
|
+
}
|
|
7454
7462
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
7455
7463
|
let url = '/';
|
|
7456
7464
|
const query = this.omit(params, this.extractParams(path));
|
|
@@ -7465,7 +7473,7 @@ export default class htx extends Exchange {
|
|
|
7465
7473
|
url += '/' + this.implodeParams(path, params);
|
|
7466
7474
|
if (api === 'private' || api === 'v2Private') {
|
|
7467
7475
|
this.checkRequiredCredentials();
|
|
7468
|
-
const timestamp = this.ymdhms(this.
|
|
7476
|
+
const timestamp = this.ymdhms(this.nonce(), 'T');
|
|
7469
7477
|
let request = {
|
|
7470
7478
|
'SignatureMethod': 'HmacSHA256',
|
|
7471
7479
|
'SignatureVersion': '2',
|
|
@@ -7545,7 +7553,7 @@ export default class htx extends Exchange {
|
|
|
7545
7553
|
}
|
|
7546
7554
|
}
|
|
7547
7555
|
}
|
|
7548
|
-
const timestamp = this.ymdhms(this.
|
|
7556
|
+
const timestamp = this.ymdhms(this.nonce(), 'T');
|
|
7549
7557
|
let request = {
|
|
7550
7558
|
'SignatureMethod': 'HmacSHA256',
|
|
7551
7559
|
'SignatureVersion': '2',
|
package/js/src/hyperliquid.js
CHANGED
|
@@ -694,6 +694,11 @@ export default class hyperliquid extends Exchange {
|
|
|
694
694
|
const price = this.safeNumber(market, 'markPx', 0);
|
|
695
695
|
const pricePrecision = this.calculatePricePrecision(price, amountPrecision, 6);
|
|
696
696
|
const pricePrecisionStr = this.numberToString(pricePrecision);
|
|
697
|
+
const isDelisted = this.safeBool(market, 'isDelisted');
|
|
698
|
+
let active = true;
|
|
699
|
+
if (isDelisted !== undefined) {
|
|
700
|
+
active = !isDelisted;
|
|
701
|
+
}
|
|
697
702
|
return this.safeMarketStructure({
|
|
698
703
|
'id': baseId,
|
|
699
704
|
'symbol': symbol,
|
|
@@ -709,7 +714,7 @@ export default class hyperliquid extends Exchange {
|
|
|
709
714
|
'swap': swap,
|
|
710
715
|
'future': false,
|
|
711
716
|
'option': false,
|
|
712
|
-
'active':
|
|
717
|
+
'active': active,
|
|
713
718
|
'contract': contract,
|
|
714
719
|
'linear': true,
|
|
715
720
|
'inverse': false,
|
|
@@ -109,6 +109,9 @@ export default class independentreserve extends Exchange {
|
|
|
109
109
|
'GetFxRates',
|
|
110
110
|
'GetOrderMinimumVolumes',
|
|
111
111
|
'GetCryptoWithdrawalFees',
|
|
112
|
+
'GetCryptoWithdrawalFees2',
|
|
113
|
+
'GetNetworks',
|
|
114
|
+
'GetPrimaryCurrencyConfig2',
|
|
112
115
|
],
|
|
113
116
|
},
|
|
114
117
|
'private': {
|
|
@@ -121,7 +124,9 @@ export default class independentreserve extends Exchange {
|
|
|
121
124
|
'GetTransactions',
|
|
122
125
|
'GetFiatBankAccounts',
|
|
123
126
|
'GetDigitalCurrencyDepositAddress',
|
|
127
|
+
'GetDigitalCurrencyDepositAddress2',
|
|
124
128
|
'GetDigitalCurrencyDepositAddresses',
|
|
129
|
+
'GetDigitalCurrencyDepositAddresses2',
|
|
125
130
|
'GetTrades',
|
|
126
131
|
'GetBrokerageFees',
|
|
127
132
|
'GetDigitalCurrencyWithdrawal',
|
|
@@ -132,6 +137,7 @@ export default class independentreserve extends Exchange {
|
|
|
132
137
|
'RequestFiatWithdrawal',
|
|
133
138
|
'WithdrawFiatCurrency',
|
|
134
139
|
'WithdrawDigitalCurrency',
|
|
140
|
+
'WithdrawCrypto',
|
|
135
141
|
],
|
|
136
142
|
},
|
|
137
143
|
},
|
|
@@ -147,6 +153,60 @@ export default class independentreserve extends Exchange {
|
|
|
147
153
|
'PLA': 'PlayChip',
|
|
148
154
|
},
|
|
149
155
|
'precisionMode': TICK_SIZE,
|
|
156
|
+
'options': {
|
|
157
|
+
'defaultNetworks': {
|
|
158
|
+
'USDT': 'Ethereum',
|
|
159
|
+
'USDC': 'Ethereum',
|
|
160
|
+
'BTC': 'Bitcoin',
|
|
161
|
+
'BCH': 'BitcoinCash',
|
|
162
|
+
'ETH': 'Ethereum',
|
|
163
|
+
'LTC': 'Litecoin',
|
|
164
|
+
'XRP': 'XrpLedger',
|
|
165
|
+
'ZRX': 'Ethereum',
|
|
166
|
+
'EOS': 'EosIo',
|
|
167
|
+
'XLM': 'Stellar',
|
|
168
|
+
'BAT': 'Ethereum',
|
|
169
|
+
'ETC': 'EthereumClassic',
|
|
170
|
+
'LINK': 'Ethereum',
|
|
171
|
+
'MKR': 'Ethereum',
|
|
172
|
+
'DAI': 'Ethereum',
|
|
173
|
+
'COMP': 'Ethereum',
|
|
174
|
+
'SNX': 'Ethereum',
|
|
175
|
+
'YFI': 'Ethereum',
|
|
176
|
+
'AAVE': 'Ethereum',
|
|
177
|
+
'GRT': 'Ethereum',
|
|
178
|
+
'DOT': 'Polkadot',
|
|
179
|
+
'UNI': 'Ethereum',
|
|
180
|
+
'ADA': 'Cardano',
|
|
181
|
+
'MATIC': 'Ethereum',
|
|
182
|
+
'DOGE': 'Dogecoin',
|
|
183
|
+
'SOL': 'Solana',
|
|
184
|
+
'MANA': 'Ethereum',
|
|
185
|
+
'SAND': 'Ethereum',
|
|
186
|
+
'SHIB': 'Ethereum',
|
|
187
|
+
'TRX': 'Tron',
|
|
188
|
+
'RENDER': 'Solana',
|
|
189
|
+
'WIF': 'Solana',
|
|
190
|
+
'RLUSD': 'Ethereum',
|
|
191
|
+
'PEPE': 'Ethereum',
|
|
192
|
+
},
|
|
193
|
+
'networks': {
|
|
194
|
+
'BTC': 'Bitcoin',
|
|
195
|
+
'ETH': 'Ethereum',
|
|
196
|
+
'BCH': 'BitcoinCash',
|
|
197
|
+
'LTC': 'Litecoin',
|
|
198
|
+
'XRP': 'XrpLedger',
|
|
199
|
+
'EOS': 'EosIo',
|
|
200
|
+
'XLM': 'Stellar',
|
|
201
|
+
'ETC': 'EthereumClassic',
|
|
202
|
+
'BSV': 'BitcoinSV',
|
|
203
|
+
'DOGE': 'Dogecoin',
|
|
204
|
+
'DOT': 'Polkadot',
|
|
205
|
+
'ADA': 'Cardano',
|
|
206
|
+
'SOL': 'Solana',
|
|
207
|
+
'TRX': 'Tron',
|
|
208
|
+
},
|
|
209
|
+
},
|
|
150
210
|
});
|
|
151
211
|
}
|
|
152
212
|
/**
|
package/js/src/kraken.js
CHANGED
|
@@ -695,7 +695,7 @@ export default class kraken extends Exchange {
|
|
|
695
695
|
if (currencyId !== undefined) {
|
|
696
696
|
if (currencyId.length > 3) {
|
|
697
697
|
if ((currencyId.indexOf('X') === 0) || (currencyId.indexOf('Z') === 0)) {
|
|
698
|
-
if (!(currencyId.indexOf('.') > 0)) {
|
|
698
|
+
if (!(currencyId.indexOf('.') > 0) && (currencyId !== 'ZEUS')) {
|
|
699
699
|
currencyId = currencyId.slice(1);
|
|
700
700
|
}
|
|
701
701
|
}
|