ccxt 4.5.63 → 4.5.64
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 +6 -8
- package/dist/ccxt.browser.min.js +4 -4
- package/dist/cjs/ccxt.js +6 -12
- package/dist/cjs/src/aster.js +2 -2
- package/dist/cjs/src/base/Exchange.js +34 -3
- package/dist/cjs/src/bitget.js +5 -3
- package/dist/cjs/src/bitmex.js +1 -1
- package/dist/cjs/src/bitstamp.js +2 -1
- package/dist/cjs/src/bitvavo.js +1 -0
- package/dist/cjs/src/btcbox.js +1 -1
- package/dist/cjs/src/bullish.js +1 -1
- package/dist/cjs/src/bybiteu.js +3 -0
- package/dist/cjs/src/coinbase.js +3 -2
- package/dist/cjs/src/coinbaseinternational.js +1 -1
- package/dist/cjs/src/delta.js +23 -1
- package/dist/cjs/src/derive.js +1 -1
- package/dist/cjs/src/digifinex.js +12 -0
- package/dist/cjs/src/dydx.js +2 -2
- package/dist/cjs/src/extended.js +1 -1
- package/dist/cjs/src/gateeu.js +1 -0
- package/dist/cjs/src/grvt.js +1 -1
- package/dist/cjs/src/hashkey.js +127 -6
- package/dist/cjs/src/hibachi.js +20 -10
- package/dist/cjs/src/hyperliquid.js +1 -1
- package/dist/cjs/src/kraken.js +2 -0
- package/dist/cjs/src/kucoin.js +1 -1
- package/dist/cjs/src/kucoineu.js +3 -0
- package/dist/cjs/src/lighter.js +6 -4
- package/dist/cjs/src/mudrex.js +1328 -0
- package/dist/cjs/src/myokx.js +3 -0
- package/dist/cjs/src/okxus.js +1 -5
- package/dist/cjs/src/onetrading.js +1 -0
- package/dist/cjs/src/pacifica.js +1 -1
- package/dist/cjs/src/poloniex.js +1 -1
- package/dist/cjs/src/pro/bingx.js +4 -2
- package/dist/cjs/src/pro/bitget.js +9 -7
- package/dist/cjs/src/pro/grvt.js +1 -1
- package/dist/cjs/src/pro/hashkey.js +1 -1
- package/dist/cjs/src/pro/kraken.js +1 -1
- package/dist/cjs/src/pro/mudrex.js +226 -0
- package/dist/cjs/src/pro/okxus.js +1 -1
- package/js/ccxt.d.ts +8 -14
- package/js/ccxt.js +6 -10
- package/js/src/abstract/binance.d.ts +3 -0
- package/js/src/abstract/binancecoinm.d.ts +3 -0
- package/js/src/abstract/binanceus.d.ts +3 -0
- package/js/src/abstract/binanceusdm.d.ts +3 -0
- package/js/src/abstract/bybit.d.ts +39 -0
- package/js/src/abstract/bybiteu.d.ts +39 -0
- package/js/src/abstract/coincheck.d.ts +3 -0
- package/js/src/abstract/coinsph.d.ts +8 -1
- package/js/src/abstract/kucoineu.js +0 -6
- package/js/src/abstract/mudrex.d.ts +33 -0
- package/js/src/aster.js +2 -2
- package/js/src/base/Exchange.d.ts +10 -1
- package/js/src/base/Exchange.js +34 -3
- package/js/src/bitget.js +5 -3
- package/js/src/bitmex.js +1 -1
- package/js/src/bitstamp.js +2 -1
- package/js/src/bitvavo.js +1 -0
- package/js/src/btcbox.js +1 -1
- package/js/src/bullish.js +1 -1
- package/js/src/bybiteu.js +3 -0
- package/js/src/coinbase.js +3 -2
- package/js/src/coinbaseinternational.js +1 -1
- package/js/src/delta.d.ts +12 -0
- package/js/src/delta.js +23 -1
- package/js/src/derive.js +1 -1
- package/js/src/digifinex.d.ts +12 -0
- package/js/src/digifinex.js +12 -0
- package/js/src/dydx.d.ts +2 -2
- package/js/src/dydx.js +2 -2
- package/js/src/extended.js +1 -1
- package/js/src/gateeu.js +1 -0
- package/js/src/grvt.d.ts +1 -1
- package/js/src/grvt.js +1 -1
- package/js/src/hashkey.d.ts +40 -3
- package/js/src/hashkey.js +127 -6
- package/js/src/hibachi.d.ts +9 -5
- package/js/src/hibachi.js +20 -10
- package/js/src/hyperliquid.js +1 -1
- package/js/src/kraken.js +2 -0
- package/js/src/kucoin.js +1 -1
- package/js/src/kucoineu.js +3 -0
- package/js/src/lighter.js +6 -4
- package/js/src/mudrex.d.ts +310 -0
- package/js/src/mudrex.js +1321 -0
- package/js/src/myokx.js +3 -0
- package/js/src/okxus.js +1 -5
- package/js/src/onetrading.js +1 -0
- package/js/src/pacifica.js +1 -1
- package/js/src/poloniex.js +1 -1
- package/js/src/pro/bingx.js +4 -2
- package/js/src/pro/bitget.js +9 -7
- package/js/src/pro/grvt.d.ts +1 -1
- package/js/src/pro/grvt.js +1 -1
- package/js/src/pro/hashkey.d.ts +1 -1
- package/js/src/pro/hashkey.js +1 -1
- package/js/src/pro/kraken.js +1 -1
- package/js/src/pro/mudrex.d.ts +23 -0
- package/js/src/pro/mudrex.js +219 -0
- package/js/src/pro/okxus.js +1 -1
- package/package.json +3 -3
- package/dist/cjs/src/abstract/coinmetro.js +0 -11
- package/dist/cjs/src/abstract/novadax.js +0 -11
- package/dist/cjs/src/ascendex.js +0 -3780
- package/dist/cjs/src/coinmetro.js +0 -2030
- package/dist/cjs/src/novadax.js +0 -1678
- package/dist/cjs/src/pro/ascendex.js +0 -1013
- package/js/src/abstract/ascendex.d.ts +0 -80
- package/js/src/abstract/coinmetro.d.ts +0 -37
- package/js/src/abstract/coinmetro.js +0 -5
- package/js/src/abstract/novadax.d.ts +0 -32
- package/js/src/abstract/novadax.js +0 -5
- package/js/src/ascendex.d.ts +0 -436
- package/js/src/ascendex.js +0 -3773
- package/js/src/coinmetro.d.ts +0 -245
- package/js/src/coinmetro.js +0 -2023
- package/js/src/novadax.d.ts +0 -279
- package/js/src/novadax.js +0 -1671
- package/js/src/pro/ascendex.d.ts +0 -99
- package/js/src/pro/ascendex.js +0 -1006
- /package/dist/cjs/src/abstract/{ascendex.js → mudrex.js} +0 -0
- /package/js/src/abstract/{ascendex.js → mudrex.js} +0 -0
package/dist/cjs/ccxt.js
CHANGED
|
@@ -11,7 +11,6 @@ var errors = require('./src/base/errors.js');
|
|
|
11
11
|
var aftermath = require('./src/aftermath.js');
|
|
12
12
|
var alpaca = require('./src/alpaca.js');
|
|
13
13
|
var apex = require('./src/apex.js');
|
|
14
|
-
var ascendex = require('./src/ascendex.js');
|
|
15
14
|
var aster = require('./src/aster.js');
|
|
16
15
|
var backpack = require('./src/backpack.js');
|
|
17
16
|
var bequant = require('./src/bequant.js');
|
|
@@ -53,7 +52,6 @@ var coinbaseinternational = require('./src/coinbaseinternational.js');
|
|
|
53
52
|
var coincheck = require('./src/coincheck.js');
|
|
54
53
|
var coinex = require('./src/coinex.js');
|
|
55
54
|
var coinmate = require('./src/coinmate.js');
|
|
56
|
-
var coinmetro = require('./src/coinmetro.js');
|
|
57
55
|
var coinone = require('./src/coinone.js');
|
|
58
56
|
var coinsph = require('./src/coinsph.js');
|
|
59
57
|
var coinspot = require('./src/coinspot.js');
|
|
@@ -93,9 +91,9 @@ var luno = require('./src/luno.js');
|
|
|
93
91
|
var mercado = require('./src/mercado.js');
|
|
94
92
|
var mexc = require('./src/mexc.js');
|
|
95
93
|
var modetrade = require('./src/modetrade.js');
|
|
94
|
+
var mudrex = require('./src/mudrex.js');
|
|
96
95
|
var myokx = require('./src/myokx.js');
|
|
97
96
|
var ndax = require('./src/ndax.js');
|
|
98
|
-
var novadax = require('./src/novadax.js');
|
|
99
97
|
var okx = require('./src/okx.js');
|
|
100
98
|
var okxus = require('./src/okxus.js');
|
|
101
99
|
var onetrading = require('./src/onetrading.js');
|
|
@@ -118,7 +116,6 @@ var zebpay = require('./src/zebpay.js');
|
|
|
118
116
|
var aftermath$1 = require('./src/pro/aftermath.js');
|
|
119
117
|
var alpaca$1 = require('./src/pro/alpaca.js');
|
|
120
118
|
var apex$1 = require('./src/pro/apex.js');
|
|
121
|
-
var ascendex$1 = require('./src/pro/ascendex.js');
|
|
122
119
|
var aster$1 = require('./src/pro/aster.js');
|
|
123
120
|
var backpack$1 = require('./src/pro/backpack.js');
|
|
124
121
|
var bequant$1 = require('./src/pro/bequant.js');
|
|
@@ -177,6 +174,7 @@ var lighter$1 = require('./src/pro/lighter.js');
|
|
|
177
174
|
var luno$1 = require('./src/pro/luno.js');
|
|
178
175
|
var mexc$1 = require('./src/pro/mexc.js');
|
|
179
176
|
var modetrade$1 = require('./src/pro/modetrade.js');
|
|
177
|
+
var mudrex$1 = require('./src/pro/mudrex.js');
|
|
180
178
|
var myokx$1 = require('./src/pro/myokx.js');
|
|
181
179
|
var ndax$1 = require('./src/pro/ndax.js');
|
|
182
180
|
var okx$1 = require('./src/pro/okx.js');
|
|
@@ -197,12 +195,11 @@ var xt$1 = require('./src/pro/xt.js');
|
|
|
197
195
|
|
|
198
196
|
//-----------------------------------------------------------------------------
|
|
199
197
|
// this is updated by vss.js when building
|
|
200
|
-
const version = '4.5.
|
|
198
|
+
const version = '4.5.64';
|
|
201
199
|
const exchanges = {
|
|
202
200
|
'aftermath': aftermath["default"],
|
|
203
201
|
'alpaca': alpaca["default"],
|
|
204
202
|
'apex': apex["default"],
|
|
205
|
-
'ascendex': ascendex["default"],
|
|
206
203
|
'aster': aster["default"],
|
|
207
204
|
'backpack': backpack["default"],
|
|
208
205
|
'bequant': bequant["default"],
|
|
@@ -244,7 +241,6 @@ const exchanges = {
|
|
|
244
241
|
'coincheck': coincheck["default"],
|
|
245
242
|
'coinex': coinex["default"],
|
|
246
243
|
'coinmate': coinmate["default"],
|
|
247
|
-
'coinmetro': coinmetro["default"],
|
|
248
244
|
'coinone': coinone["default"],
|
|
249
245
|
'coinsph': coinsph["default"],
|
|
250
246
|
'coinspot': coinspot["default"],
|
|
@@ -284,9 +280,9 @@ const exchanges = {
|
|
|
284
280
|
'mercado': mercado["default"],
|
|
285
281
|
'mexc': mexc["default"],
|
|
286
282
|
'modetrade': modetrade["default"],
|
|
283
|
+
'mudrex': mudrex["default"],
|
|
287
284
|
'myokx': myokx["default"],
|
|
288
285
|
'ndax': ndax["default"],
|
|
289
|
-
'novadax': novadax["default"],
|
|
290
286
|
'okx': okx["default"],
|
|
291
287
|
'okxus': okxus["default"],
|
|
292
288
|
'onetrading': onetrading["default"],
|
|
@@ -311,7 +307,6 @@ const pro = {
|
|
|
311
307
|
'aftermath': aftermath$1["default"],
|
|
312
308
|
'alpaca': alpaca$1["default"],
|
|
313
309
|
'apex': apex$1["default"],
|
|
314
|
-
'ascendex': ascendex$1["default"],
|
|
315
310
|
'aster': aster$1["default"],
|
|
316
311
|
'backpack': backpack$1["default"],
|
|
317
312
|
'bequant': bequant$1["default"],
|
|
@@ -370,6 +365,7 @@ const pro = {
|
|
|
370
365
|
'luno': luno$1["default"],
|
|
371
366
|
'mexc': mexc$1["default"],
|
|
372
367
|
'modetrade': modetrade$1["default"],
|
|
368
|
+
'mudrex': mudrex$1["default"],
|
|
373
369
|
'myokx': myokx$1["default"],
|
|
374
370
|
'ndax': ndax$1["default"],
|
|
375
371
|
'okx': okx$1["default"],
|
|
@@ -442,7 +438,6 @@ exports.errors = errors;
|
|
|
442
438
|
exports.aftermath = aftermath["default"];
|
|
443
439
|
exports.alpaca = alpaca["default"];
|
|
444
440
|
exports.apex = apex["default"];
|
|
445
|
-
exports.ascendex = ascendex["default"];
|
|
446
441
|
exports.aster = aster["default"];
|
|
447
442
|
exports.backpack = backpack["default"];
|
|
448
443
|
exports.bequant = bequant["default"];
|
|
@@ -484,7 +479,6 @@ exports.coinbaseinternational = coinbaseinternational["default"];
|
|
|
484
479
|
exports.coincheck = coincheck["default"];
|
|
485
480
|
exports.coinex = coinex["default"];
|
|
486
481
|
exports.coinmate = coinmate["default"];
|
|
487
|
-
exports.coinmetro = coinmetro["default"];
|
|
488
482
|
exports.coinone = coinone["default"];
|
|
489
483
|
exports.coinsph = coinsph["default"];
|
|
490
484
|
exports.coinspot = coinspot["default"];
|
|
@@ -524,9 +518,9 @@ exports.luno = luno["default"];
|
|
|
524
518
|
exports.mercado = mercado["default"];
|
|
525
519
|
exports.mexc = mexc["default"];
|
|
526
520
|
exports.modetrade = modetrade["default"];
|
|
521
|
+
exports.mudrex = mudrex["default"];
|
|
527
522
|
exports.myokx = myokx["default"];
|
|
528
523
|
exports.ndax = ndax["default"];
|
|
529
|
-
exports.novadax = novadax["default"];
|
|
530
524
|
exports.okx = okx["default"];
|
|
531
525
|
exports.okxus = okxus["default"];
|
|
532
526
|
exports.onetrading = onetrading["default"];
|
package/dist/cjs/src/aster.js
CHANGED
|
@@ -70,7 +70,7 @@ let SignMode = undefined;
|
|
|
70
70
|
*/
|
|
71
71
|
class Exchange {
|
|
72
72
|
// this is updated by vss.js when building
|
|
73
|
-
static { this.ccxtVersion = '4.5.
|
|
73
|
+
static { this.ccxtVersion = '4.5.63'; }
|
|
74
74
|
constructor(userConfig = {}) {
|
|
75
75
|
this.isSandboxModeEnabled = false;
|
|
76
76
|
this.api = undefined;
|
|
@@ -142,6 +142,8 @@ class Exchange {
|
|
|
142
142
|
this.last_request_body = undefined;
|
|
143
143
|
this.last_request_url = undefined;
|
|
144
144
|
this.last_request_path = undefined;
|
|
145
|
+
this.fetchHistoryCache = [];
|
|
146
|
+
this.fetchHistoryCacheSize = 0;
|
|
145
147
|
this.id = 'Exchange';
|
|
146
148
|
this.markets = undefined;
|
|
147
149
|
this.features = undefined;
|
|
@@ -589,6 +591,18 @@ class Exchange {
|
|
|
589
591
|
}
|
|
590
592
|
return undefined;
|
|
591
593
|
}
|
|
594
|
+
addFetchCache(data) {
|
|
595
|
+
if (this.fetchHistoryCacheSize <= 0) {
|
|
596
|
+
return;
|
|
597
|
+
}
|
|
598
|
+
if (this.fetchHistoryCache.length >= this.fetchHistoryCacheSize) {
|
|
599
|
+
this.fetchHistoryCache.shift();
|
|
600
|
+
}
|
|
601
|
+
this.fetchHistoryCache.push(data);
|
|
602
|
+
}
|
|
603
|
+
getFetchCache() {
|
|
604
|
+
return this.fetchHistoryCache;
|
|
605
|
+
}
|
|
592
606
|
isBinaryMessage(msg) {
|
|
593
607
|
return msg instanceof Uint8Array || msg instanceof ArrayBuffer;
|
|
594
608
|
}
|
|
@@ -2638,7 +2652,7 @@ class Exchange {
|
|
|
2638
2652
|
this.options['enableDemoTrading'] = enable;
|
|
2639
2653
|
}
|
|
2640
2654
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
2641
|
-
return {};
|
|
2655
|
+
return { 'url': undefined, 'method': undefined, 'headers': undefined, 'body': undefined };
|
|
2642
2656
|
}
|
|
2643
2657
|
async fetchAccounts(params = {}) {
|
|
2644
2658
|
throw new errors.NotSupported(this.id + ' fetchAccounts() is not supported yet');
|
|
@@ -5211,14 +5225,31 @@ class Exchange {
|
|
|
5211
5225
|
[retries, params] = this.handleOptionAndParams(params, path, 'maxRetriesOnFailure', 0);
|
|
5212
5226
|
let retryDelay = undefined;
|
|
5213
5227
|
[retryDelay, params] = this.handleOptionAndParams(params, path, 'maxRetriesOnFailureDelay', 0);
|
|
5228
|
+
let fetchData = undefined;
|
|
5229
|
+
const fetchDataCacheEnabled = this.fetchHistoryCacheSize > 0;
|
|
5214
5230
|
for (let i = 0; i < retries + 1; i++) {
|
|
5231
|
+
if (fetchDataCacheEnabled) {
|
|
5232
|
+
fetchData = { 'request': undefined, 'response': { 'body': undefined }, 'error': undefined };
|
|
5233
|
+
}
|
|
5215
5234
|
try {
|
|
5216
5235
|
this.setLastRestRequestTimestamp();
|
|
5217
5236
|
const request = this.sign(path, api, method, params, headers, body);
|
|
5237
|
+
if (fetchDataCacheEnabled) {
|
|
5238
|
+
fetchData['request'] = request;
|
|
5239
|
+
}
|
|
5218
5240
|
this.setLastRequest(request);
|
|
5219
|
-
|
|
5241
|
+
const response = await this.fetch(request['url'], request['method'], request['headers'], request['body']);
|
|
5242
|
+
if (fetchDataCacheEnabled) {
|
|
5243
|
+
fetchData['response']['body'] = response;
|
|
5244
|
+
this.addFetchCache(fetchData);
|
|
5245
|
+
}
|
|
5246
|
+
return response;
|
|
5220
5247
|
}
|
|
5221
5248
|
catch (e) {
|
|
5249
|
+
if (fetchDataCacheEnabled) {
|
|
5250
|
+
fetchData['error'] = e;
|
|
5251
|
+
this.addFetchCache(fetchData);
|
|
5252
|
+
}
|
|
5222
5253
|
if (e instanceof errors.OperationFailed) {
|
|
5223
5254
|
if (i < retries) {
|
|
5224
5255
|
if (this.verbose) {
|
package/dist/cjs/src/bitget.js
CHANGED
|
@@ -6387,7 +6387,7 @@ class bitget extends bitget$1["default"] {
|
|
|
6387
6387
|
// {
|
|
6388
6388
|
// "code": "00000",
|
|
6389
6389
|
// "msg": "success",
|
|
6390
|
-
// "requestTime": "
|
|
6390
|
+
// "requestTime": "1680008815966",
|
|
6391
6391
|
// "data": {
|
|
6392
6392
|
// "successList": [
|
|
6393
6393
|
// {
|
|
@@ -11255,8 +11255,10 @@ class bitget extends bitget$1["default"] {
|
|
|
11255
11255
|
}
|
|
11256
11256
|
url += queryInner;
|
|
11257
11257
|
// bitget signs the raw (non-percent-encoded) query string, so the
|
|
11258
|
-
// signature must use the decoded values (e.g. non-ascii market ids)
|
|
11259
|
-
|
|
11258
|
+
// signature must use the decoded values (e.g. non-ascii market ids).
|
|
11259
|
+
// sort explicitly (true) so the signed order matches the url order in Go,
|
|
11260
|
+
// where map iteration is not ordered (keysort's order is otherwise lost)
|
|
11261
|
+
auth += '?' + this.rawencode(sortedParams, true);
|
|
11260
11262
|
}
|
|
11261
11263
|
}
|
|
11262
11264
|
const signature = this.hmac(this.encode(auth), this.encode(this.secret), sha2_js.sha256, 'base64');
|
package/dist/cjs/src/bitmex.js
CHANGED
|
@@ -115,7 +115,7 @@ class bitmex extends bitmex$1["default"] {
|
|
|
115
115
|
'fetchTransfer': false,
|
|
116
116
|
'fetchTransfers': false,
|
|
117
117
|
'fetchVolatilityHistory': false,
|
|
118
|
-
'index':
|
|
118
|
+
'index': false,
|
|
119
119
|
'reduceMargin': undefined,
|
|
120
120
|
'repayCrossMargin': false,
|
|
121
121
|
'repayIsolatedMargin': false,
|
package/dist/cjs/src/bitstamp.js
CHANGED
|
@@ -29,7 +29,7 @@ class bitstamp extends bitstamp$1["default"] {
|
|
|
29
29
|
'CORS': true,
|
|
30
30
|
'spot': true,
|
|
31
31
|
'margin': false,
|
|
32
|
-
'swap':
|
|
32
|
+
'swap': true,
|
|
33
33
|
'future': false,
|
|
34
34
|
'option': false,
|
|
35
35
|
'addMargin': false,
|
|
@@ -489,6 +489,7 @@ class bitstamp extends bitstamp$1["default"] {
|
|
|
489
489
|
},
|
|
490
490
|
// exchange-specific options
|
|
491
491
|
'options': {
|
|
492
|
+
'mica': true,
|
|
492
493
|
'networksById': {
|
|
493
494
|
'bitcoin-cash': 'BCH',
|
|
494
495
|
'bitcoin': 'BTC',
|
package/dist/cjs/src/bitvavo.js
CHANGED
package/dist/cjs/src/btcbox.js
CHANGED
package/dist/cjs/src/bullish.js
CHANGED
package/dist/cjs/src/bybiteu.js
CHANGED
package/dist/cjs/src/coinbase.js
CHANGED
|
@@ -389,6 +389,7 @@ class coinbase extends coinbase$1["default"] {
|
|
|
389
389
|
'CGLD': 'CELO',
|
|
390
390
|
},
|
|
391
391
|
'options': {
|
|
392
|
+
'mica': true,
|
|
392
393
|
'usePrivate': false,
|
|
393
394
|
'brokerId': 'ccxt',
|
|
394
395
|
'stablePairs': ['BUSD-USD', 'CBETH-ETH', 'DAI-USD', 'GUSD-USD', 'GYEN-USD', 'PAX-USD', 'PAX-USDT', 'USDC-EUR', 'USDC-GBP', 'USDT-EUR', 'USDT-GBP', 'USDT-USD', 'USDT-USDC', 'WBTC-BTC'],
|
|
@@ -1372,8 +1373,8 @@ class coinbase extends coinbase$1["default"] {
|
|
|
1372
1373
|
'type': 'spot',
|
|
1373
1374
|
'spot': true,
|
|
1374
1375
|
'margin': false,
|
|
1375
|
-
'swap':
|
|
1376
|
-
'future':
|
|
1376
|
+
'swap': true,
|
|
1377
|
+
'future': true,
|
|
1377
1378
|
'option': false,
|
|
1378
1379
|
'active': undefined,
|
|
1379
1380
|
'contract': false,
|
|
@@ -1458,7 +1458,7 @@ class coinbaseinternational extends coinbaseinternational$1["default"] {
|
|
|
1458
1458
|
// [
|
|
1459
1459
|
// {
|
|
1460
1460
|
// "asset_id":"1",
|
|
1461
|
-
// "asset_uuid":"2b92315d-eab7-5bef-84fa-
|
|
1461
|
+
// "asset_uuid":"2b92315d-eab7-5bef-84fa-089a131333f6",
|
|
1462
1462
|
// "asset_name":"USDC",
|
|
1463
1463
|
// "status":"ACTIVE",
|
|
1464
1464
|
// "collateral_weight":1.0,
|
package/dist/cjs/src/delta.js
CHANGED
|
@@ -90,7 +90,7 @@ class delta extends delta$1["default"] {
|
|
|
90
90
|
'reduceMargin': true,
|
|
91
91
|
'setLeverage': true,
|
|
92
92
|
'setMargin': false,
|
|
93
|
-
'setMarginMode':
|
|
93
|
+
'setMarginMode': true,
|
|
94
94
|
'setPositionMode': false,
|
|
95
95
|
'transfer': false,
|
|
96
96
|
'withdraw': false,
|
|
@@ -163,6 +163,7 @@ class delta extends delta$1["default"] {
|
|
|
163
163
|
'users/trading_preferences',
|
|
164
164
|
'sub_accounts',
|
|
165
165
|
'profile',
|
|
166
|
+
'rate_limits/quota',
|
|
166
167
|
'heartbeat',
|
|
167
168
|
'deposits/address',
|
|
168
169
|
],
|
|
@@ -186,6 +187,7 @@ class delta extends delta$1["default"] {
|
|
|
186
187
|
'positions/auto_topup',
|
|
187
188
|
'users/update_mmp',
|
|
188
189
|
'users/reset_mmp',
|
|
190
|
+
'users/margin_mode',
|
|
189
191
|
],
|
|
190
192
|
'delete': [
|
|
191
193
|
'orders',
|
|
@@ -3552,6 +3554,26 @@ class delta extends delta$1["default"] {
|
|
|
3552
3554
|
'marginMode': this.safeString(marginMode, 'margin_mode'),
|
|
3553
3555
|
};
|
|
3554
3556
|
}
|
|
3557
|
+
/**
|
|
3558
|
+
* @method
|
|
3559
|
+
* @name delta#setMarginMode
|
|
3560
|
+
* @description set margin mode to 'isolated' or 'portfolio'
|
|
3561
|
+
* @see https://docs.delta.exchange/#change-margin-mode
|
|
3562
|
+
* @param {string} marginMode 'isolated' or 'portfolio'
|
|
3563
|
+
* @param {string} [symbol] not used by delta.setMarginMode
|
|
3564
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3565
|
+
* @param {string} params.subaccount_user_id the user id of the subaccount
|
|
3566
|
+
* @returns {object} response from the exchange
|
|
3567
|
+
*/
|
|
3568
|
+
async setMarginMode(marginMode, symbol = undefined, params = {}) {
|
|
3569
|
+
this.checkRequiredArgument('setMarginMode', marginMode, 'marginMode', ['isolated', 'portfolio']);
|
|
3570
|
+
const subaccountUserId = this.safeString(params, 'subaccount_user_id');
|
|
3571
|
+
this.checkRequiredArgument('setMarginMode', subaccountUserId, 'params["subaccount_user_id"]');
|
|
3572
|
+
const request = {
|
|
3573
|
+
'margin_mode': marginMode,
|
|
3574
|
+
};
|
|
3575
|
+
return await this.privatePutUsersMarginMode(this.extend(request, params));
|
|
3576
|
+
}
|
|
3555
3577
|
/**
|
|
3556
3578
|
* @method
|
|
3557
3579
|
* @name delta#fetchOption
|
package/dist/cjs/src/derive.js
CHANGED
|
@@ -471,6 +471,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
471
471
|
* @method
|
|
472
472
|
* @name digifinex#fetchCurrencies
|
|
473
473
|
* @description fetches all available currencies on an exchange
|
|
474
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-currency-deposit-and-withdrawal-information
|
|
474
475
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
475
476
|
* @returns {object} an associative dictionary of currencies
|
|
476
477
|
*/
|
|
@@ -563,6 +564,10 @@ class digifinex extends digifinex$1["default"] {
|
|
|
563
564
|
* @method
|
|
564
565
|
* @name digifinex#fetchMarkets
|
|
565
566
|
* @description retrieves data on all markets for digifinex
|
|
567
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#all-the-market-description
|
|
568
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#spot-trading-pair-symbol
|
|
569
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-trading-pair-symbol
|
|
570
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#instruments
|
|
566
571
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
567
572
|
* @returns {object[]} an array of objects representing market data
|
|
568
573
|
*/
|
|
@@ -1388,6 +1393,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
1388
1393
|
* @method
|
|
1389
1394
|
* @name digifinex#fetchTime
|
|
1390
1395
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
1396
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#server-timestamp
|
|
1391
1397
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1392
1398
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
1393
1399
|
*/
|
|
@@ -1405,6 +1411,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
1405
1411
|
* @method
|
|
1406
1412
|
* @name digifinex#fetchStatus
|
|
1407
1413
|
* @description the latest known information on the availability of the exchange API
|
|
1414
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#server-ping
|
|
1408
1415
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1409
1416
|
* @returns {object} a [status structure]{@link https://docs.ccxt.com/?id=exchange-status-structure}
|
|
1410
1417
|
*/
|
|
@@ -2033,6 +2040,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
2033
2040
|
* @method
|
|
2034
2041
|
* @name digifinex#cancelOrders
|
|
2035
2042
|
* @description cancel multiple orders
|
|
2043
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#cancel-order
|
|
2036
2044
|
* @param {string[]} ids order ids
|
|
2037
2045
|
* @param {string} symbol not used by digifinex cancelOrders ()
|
|
2038
2046
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -2809,6 +2817,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
2809
2817
|
* @method
|
|
2810
2818
|
* @name digifinex#fetchDepositAddress
|
|
2811
2819
|
* @description fetch the deposit address for a currency associated with this account
|
|
2820
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#deposit-address-inquiry
|
|
2812
2821
|
* @param {string} code unified currency code
|
|
2813
2822
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2814
2823
|
* @returns {object} an [address structure]{@link https://docs.ccxt.com/?id=address-structure}
|
|
@@ -2891,6 +2900,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
2891
2900
|
* @method
|
|
2892
2901
|
* @name digifinex#fetchDeposits
|
|
2893
2902
|
* @description fetch all deposits made to an account
|
|
2903
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#deposit-history
|
|
2894
2904
|
* @param {string} code unified currency code
|
|
2895
2905
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2896
2906
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
@@ -2904,6 +2914,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
2904
2914
|
* @method
|
|
2905
2915
|
* @name digifinex#fetchWithdrawals
|
|
2906
2916
|
* @description fetch all withdrawals made from an account
|
|
2917
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#withdrawal-history
|
|
2907
2918
|
* @param {string} code unified currency code
|
|
2908
2919
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2909
2920
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
@@ -3415,6 +3426,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
3415
3426
|
* @method
|
|
3416
3427
|
* @name digifinex#fetchFundingRateHistory
|
|
3417
3428
|
* @description fetches historical funding rate prices
|
|
3429
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#fundingratehistory
|
|
3418
3430
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
3419
3431
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
3420
3432
|
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/?id=funding-rate-history-structure} to fetch
|
package/dist/cjs/src/dydx.js
CHANGED
|
@@ -576,7 +576,7 @@ class dydx extends dydx$1["default"] {
|
|
|
576
576
|
/**
|
|
577
577
|
* @method
|
|
578
578
|
* @name dydx#fetchMarkets
|
|
579
|
-
* @description retrieves data on all markets for
|
|
579
|
+
* @description retrieves data on all markets for dydx
|
|
580
580
|
* @see https://docs.dydx.xyz/indexer-client/http#get-perpetual-markets
|
|
581
581
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
582
582
|
* @returns {object[]} an array of objects representing market data
|
|
@@ -658,7 +658,7 @@ class dydx extends dydx$1["default"] {
|
|
|
658
658
|
* @method
|
|
659
659
|
* @name dydx#fetchTrades
|
|
660
660
|
* @description get the list of most recent trades for a particular symbol
|
|
661
|
-
* @see https://
|
|
661
|
+
* @see https://docs.dydx.xyz/indexer-client/http#get-trades
|
|
662
662
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
663
663
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
664
664
|
* @param {int} [limit] the maximum amount of trades to fetch
|
package/dist/cjs/src/extended.js
CHANGED
package/dist/cjs/src/gateeu.js
CHANGED
package/dist/cjs/src/grvt.js
CHANGED
|
@@ -1421,7 +1421,7 @@ class grvt extends grvt$1["default"] {
|
|
|
1421
1421
|
* @method
|
|
1422
1422
|
* @name grvt#fetchWithdrawals
|
|
1423
1423
|
* @description fetch all withdrawals made from an account
|
|
1424
|
-
* @see https://docs.
|
|
1424
|
+
* @see https://api-docs.grvt.io/trading_api/#withdrawal-history
|
|
1425
1425
|
* @param {string} [code] unified currency code of the currency transferred
|
|
1426
1426
|
* @param {int} [since] the earliest time in ms to fetch transfers for (default 24 hours ago)
|
|
1427
1427
|
* @param {int} [limit] the maximum number of transfer structures to retrieve (default 50, max 200)
|