ccxt 4.5.55 → 4.5.57
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 +215 -10
- package/dist/ccxt.browser.min.js +10 -10
- package/dist/cjs/ccxt.js +6 -11
- package/dist/cjs/src/aftermath.js +10 -5
- package/dist/cjs/src/alpaca.js +2 -2
- package/dist/cjs/src/apex.js +26 -17
- package/dist/cjs/src/arkham.js +10 -7
- package/dist/cjs/src/ascendex.js +8 -5
- package/dist/cjs/src/aster.js +7 -4
- package/dist/cjs/src/backpack.js +4 -4
- package/dist/cjs/src/base/Exchange.js +72 -35
- package/dist/cjs/src/base/functions/io.js +25 -0
- package/dist/cjs/src/base/functions.js +1 -0
- package/dist/cjs/src/bigone.js +10 -7
- package/dist/cjs/src/binance.js +196 -198
- package/dist/cjs/src/bingx.js +7 -7
- package/dist/cjs/src/bitfinex.js +71 -58
- package/dist/cjs/src/bitflyer.js +2 -1
- package/dist/cjs/src/bitget.js +16 -5
- package/dist/cjs/src/bitmart.js +18 -10
- package/dist/cjs/src/bitmex.js +8 -5
- package/dist/cjs/src/bitopro.js +2 -2
- package/dist/cjs/src/bitrue.js +4 -3
- package/dist/cjs/src/bitso.js +7 -4
- package/dist/cjs/src/bitstamp.js +7 -4
- package/dist/cjs/src/bitteam.js +1 -1
- package/dist/cjs/src/bittrade.js +2 -2
- package/dist/cjs/src/bitvavo.js +457 -34
- package/dist/cjs/src/blofin.js +28 -4
- package/dist/cjs/src/bullish.js +6 -5
- package/dist/cjs/src/bybit.js +19 -17
- package/dist/cjs/src/bybiteu.js +1 -0
- package/dist/cjs/src/bydfi.js +1 -1
- package/dist/cjs/src/cex.js +3 -3
- package/dist/cjs/src/coinbase.js +75 -65
- package/dist/cjs/src/coinbaseexchange.js +4 -3
- package/dist/cjs/src/coinbaseinternational.js +17 -10
- package/dist/cjs/src/coinex.js +79 -77
- package/dist/cjs/src/coinmetro.js +1 -1
- package/dist/cjs/src/coinsph.js +5 -5
- package/dist/cjs/src/cryptocom.js +52 -54
- package/dist/cjs/src/cryptomus.js +43 -39
- package/dist/cjs/src/deepcoin.js +9 -5
- package/dist/cjs/src/delta.js +53 -53
- package/dist/cjs/src/deribit.js +35 -35
- package/dist/cjs/src/derive.js +31 -31
- package/dist/cjs/src/digifinex.js +45 -45
- package/dist/cjs/src/exmo.js +104 -122
- package/dist/cjs/src/extended.js +3497 -0
- package/dist/cjs/src/foxbit.js +72 -76
- package/dist/cjs/src/gate.js +53 -53
- package/dist/cjs/src/gemini.js +45 -45
- package/dist/cjs/src/grvt.js +17 -11
- package/dist/cjs/src/hashkey.js +56 -58
- package/dist/cjs/src/hibachi.js +1 -1
- package/dist/cjs/src/hitbtc.js +5 -14
- package/dist/cjs/src/hollaex.js +51 -54
- package/dist/cjs/src/htx.js +84 -72
- package/dist/cjs/src/hyperliquid.js +60 -55
- package/dist/cjs/src/indodax.js +4 -3
- package/dist/cjs/src/kraken.js +71 -71
- package/dist/cjs/src/krakenfutures.js +2 -1
- package/dist/cjs/src/kucoin.js +3 -2
- package/dist/cjs/src/latoken.js +30 -32
- package/dist/cjs/src/lbank.js +64 -60
- package/dist/cjs/src/lighter.js +36 -38
- package/dist/cjs/src/luno.js +36 -44
- package/dist/cjs/src/mercado.js +2 -1
- package/dist/cjs/src/mexc.js +72 -63
- package/dist/cjs/src/modetrade.js +51 -53
- package/dist/cjs/src/ndax.js +35 -37
- package/dist/cjs/src/okx.js +23 -5
- package/dist/cjs/src/onetrading.js +21 -23
- package/dist/cjs/src/p2b.js +8 -4
- package/dist/cjs/src/paradex.js +3 -2
- package/dist/cjs/src/phemex.js +47 -47
- package/dist/cjs/src/poloniex.js +19 -13
- package/dist/cjs/src/pro/alpaca.js +1 -1
- package/dist/cjs/src/pro/apex.js +11 -2
- package/dist/cjs/src/pro/arkham.js +1 -1
- package/dist/cjs/src/pro/aster.js +10 -9
- package/dist/cjs/src/pro/backpack.js +1 -1
- package/dist/cjs/src/pro/binance.js +6 -6
- package/dist/cjs/src/pro/bingx.js +7 -2
- package/dist/cjs/src/pro/bitget.js +1 -1
- package/dist/cjs/src/pro/bithumb.js +1 -1
- package/dist/cjs/src/pro/bitmart.js +10 -0
- package/dist/cjs/src/pro/bitmex.js +1 -1
- package/dist/cjs/src/pro/bitstamp.js +1 -1
- package/dist/cjs/src/pro/blockchaincom.js +1 -1
- package/dist/cjs/src/pro/bybit.js +1 -1
- package/dist/cjs/src/pro/cex.js +1 -1
- package/dist/cjs/src/pro/coinex.js +1 -1
- package/dist/cjs/src/pro/coinone.js +1 -1
- package/dist/cjs/src/pro/cryptocom.js +3 -1
- package/dist/cjs/src/pro/dydx.js +1 -1
- package/dist/cjs/src/pro/exmo.js +1 -1
- package/dist/cjs/src/pro/extended.js +865 -0
- package/dist/cjs/src/pro/gate.js +1 -1
- package/dist/cjs/src/pro/grvt.js +8 -0
- package/dist/cjs/src/pro/htx.js +4 -4
- package/dist/cjs/src/pro/independentreserve.js +1 -1
- package/dist/cjs/src/pro/krakenfutures.js +16 -4
- package/dist/cjs/src/pro/kucoin.js +1 -1
- package/dist/cjs/src/pro/luno.js +3 -3
- package/dist/cjs/src/pro/modetrade.js +3 -3
- package/dist/cjs/src/pro/okx.js +4 -4
- package/dist/cjs/src/pro/onetrading.js +1 -1
- package/dist/cjs/src/pro/toobit.js +1 -1
- package/dist/cjs/src/pro/weex.js +1 -1
- package/dist/cjs/src/pro/woo.js +4 -4
- package/dist/cjs/src/pro/woofipro.js +3 -3
- package/dist/cjs/src/pro/xt.js +1 -1
- package/dist/cjs/src/static_dependencies/starknet/utils/hash/classHash.js +7 -7
- package/dist/cjs/src/tokocrypto.js +1 -1
- package/dist/cjs/src/toobit.js +3 -3
- package/dist/cjs/src/upbit.js +3 -3
- package/dist/cjs/src/weex.js +57 -62
- package/dist/cjs/src/whitebit.js +61 -63
- package/dist/cjs/src/woo.js +66 -55
- package/dist/cjs/src/woofipro.js +54 -48
- package/dist/cjs/src/xt.js +3 -2
- package/dist/cjs/src/yobit.js +4 -2
- package/dist/cjs/src/zebpay.js +73 -75
- package/js/ccxt.d.ts +8 -14
- package/js/ccxt.js +6 -10
- package/js/src/abstract/bitvavo.d.ts +15 -7
- package/js/src/abstract/extended.d.ts +58 -0
- package/js/src/abstract/mexc.d.ts +1 -0
- package/js/src/aftermath.js +10 -5
- package/js/src/alpaca.js +2 -2
- package/js/src/apex.d.ts +1 -1
- package/js/src/apex.js +26 -17
- package/js/src/arkham.js +10 -7
- package/js/src/ascendex.js +8 -5
- package/js/src/aster.js +7 -4
- package/js/src/backpack.js +4 -4
- package/js/src/base/Exchange.d.ts +10 -6
- package/js/src/base/Exchange.js +72 -35
- package/js/src/base/functions/io.d.ts +7 -0
- package/js/src/base/functions/io.js +24 -0
- package/js/src/bigone.js +10 -7
- package/js/src/binance.d.ts +2 -0
- package/js/src/binance.js +200 -202
- package/js/src/bingx.js +7 -7
- package/js/src/bitfinex.d.ts +2 -0
- package/js/src/bitfinex.js +71 -58
- package/js/src/bitflyer.js +2 -1
- package/js/src/bitget.js +16 -5
- package/js/src/bitmart.js +18 -10
- package/js/src/bitmex.js +8 -5
- package/js/src/bitopro.js +2 -2
- package/js/src/bitrue.js +4 -3
- package/js/src/bitso.js +7 -4
- package/js/src/bitstamp.js +7 -4
- package/js/src/bitteam.js +1 -1
- package/js/src/bittrade.js +2 -2
- package/js/src/bitvavo.d.ts +114 -21
- package/js/src/bitvavo.js +457 -34
- package/js/src/blofin.d.ts +1 -0
- package/js/src/blofin.js +28 -4
- package/js/src/bullish.js +6 -5
- package/js/src/bybit.d.ts +1 -1
- package/js/src/bybit.js +19 -17
- package/js/src/bybiteu.js +1 -0
- package/js/src/bydfi.js +1 -1
- package/js/src/cex.js +3 -3
- package/js/src/coinbase.d.ts +63 -56
- package/js/src/coinbase.js +75 -65
- package/js/src/coinbaseexchange.js +4 -3
- package/js/src/coinbaseinternational.d.ts +1 -1
- package/js/src/coinbaseinternational.js +17 -10
- package/js/src/coinex.d.ts +2 -1
- package/js/src/coinex.js +79 -77
- package/js/src/coinmetro.d.ts +1 -1
- package/js/src/coinmetro.js +1 -1
- package/js/src/coinsph.js +5 -5
- package/js/src/cryptocom.d.ts +1 -0
- package/js/src/cryptocom.js +52 -54
- package/js/src/cryptomus.d.ts +2 -1
- package/js/src/cryptomus.js +43 -39
- package/js/src/deepcoin.js +9 -5
- package/js/src/delta.d.ts +1 -0
- package/js/src/delta.js +53 -53
- package/js/src/deribit.d.ts +1 -0
- package/js/src/deribit.js +35 -35
- package/js/src/derive.d.ts +1 -0
- package/js/src/derive.js +31 -31
- package/js/src/digifinex.d.ts +1 -0
- package/js/src/digifinex.js +45 -45
- package/js/src/exmo.d.ts +1 -0
- package/js/src/exmo.js +104 -122
- package/js/src/extended.d.ts +554 -0
- package/js/src/extended.js +3490 -0
- package/js/src/foxbit.d.ts +1 -0
- package/js/src/foxbit.js +72 -76
- package/js/src/gate.d.ts +1 -0
- package/js/src/gate.js +53 -53
- package/js/src/gemini.d.ts +2 -1
- package/js/src/gemini.js +45 -45
- package/js/src/grvt.d.ts +1 -1
- package/js/src/grvt.js +17 -11
- package/js/src/hashkey.d.ts +1 -0
- package/js/src/hashkey.js +56 -58
- package/js/src/hibachi.d.ts +1 -1
- package/js/src/hibachi.js +1 -1
- package/js/src/hitbtc.d.ts +0 -1
- package/js/src/hitbtc.js +5 -14
- package/js/src/hollaex.d.ts +1 -0
- package/js/src/hollaex.js +51 -54
- package/js/src/htx.d.ts +1 -0
- package/js/src/htx.js +84 -72
- package/js/src/hyperliquid.d.ts +5 -4
- package/js/src/hyperliquid.js +60 -55
- package/js/src/indodax.js +4 -3
- package/js/src/kraken.d.ts +2 -1
- package/js/src/kraken.js +71 -71
- package/js/src/krakenfutures.js +2 -1
- package/js/src/kucoin.js +3 -2
- package/js/src/latoken.d.ts +1 -0
- package/js/src/latoken.js +30 -32
- package/js/src/lbank.d.ts +1 -0
- package/js/src/lbank.js +64 -60
- package/js/src/lighter.d.ts +2 -1
- package/js/src/lighter.js +36 -38
- package/js/src/luno.d.ts +1 -0
- package/js/src/luno.js +36 -44
- package/js/src/mercado.js +2 -1
- package/js/src/mexc.d.ts +4 -3
- package/js/src/mexc.js +72 -63
- package/js/src/modetrade.d.ts +1 -0
- package/js/src/modetrade.js +51 -53
- package/js/src/ndax.d.ts +1 -0
- package/js/src/ndax.js +35 -37
- package/js/src/okx.js +23 -5
- package/js/src/onetrading.d.ts +2 -1
- package/js/src/onetrading.js +21 -23
- package/js/src/p2b.js +8 -4
- package/js/src/paradex.js +3 -2
- package/js/src/phemex.d.ts +1 -0
- package/js/src/phemex.js +47 -47
- package/js/src/poloniex.js +19 -13
- package/js/src/pro/alpaca.js +1 -1
- package/js/src/pro/apex.js +11 -2
- package/js/src/pro/arkham.js +1 -1
- package/js/src/pro/aster.js +10 -9
- package/js/src/pro/backpack.js +1 -1
- package/js/src/pro/binance.d.ts +1 -1
- package/js/src/pro/binance.js +6 -6
- package/js/src/pro/bingx.js +7 -2
- package/js/src/pro/bitget.js +1 -1
- package/js/src/pro/bithumb.js +1 -1
- package/js/src/pro/bitmart.js +10 -0
- package/js/src/pro/bitmex.js +1 -1
- package/js/src/pro/bitstamp.js +1 -1
- package/js/src/pro/blockchaincom.js +1 -1
- package/js/src/pro/bybit.js +1 -1
- package/js/src/pro/cex.js +1 -1
- package/js/src/pro/coinex.js +1 -1
- package/js/src/pro/coinone.js +1 -1
- package/js/src/pro/cryptocom.js +3 -1
- package/js/src/pro/dydx.js +1 -1
- package/js/src/pro/exmo.js +1 -1
- package/js/src/pro/extended.d.ts +126 -0
- package/js/src/pro/extended.js +858 -0
- package/js/src/pro/gate.js +1 -1
- package/js/src/pro/grvt.js +8 -0
- package/js/src/pro/htx.d.ts +4 -4
- package/js/src/pro/htx.js +4 -4
- package/js/src/pro/independentreserve.js +1 -1
- package/js/src/pro/krakenfutures.d.ts +4 -4
- package/js/src/pro/krakenfutures.js +16 -4
- package/js/src/pro/kucoin.js +1 -1
- package/js/src/pro/luno.d.ts +1 -1
- package/js/src/pro/luno.js +3 -3
- package/js/src/pro/modetrade.d.ts +3 -3
- package/js/src/pro/modetrade.js +3 -3
- package/js/src/pro/okx.d.ts +4 -4
- package/js/src/pro/okx.js +4 -4
- package/js/src/pro/onetrading.js +1 -1
- package/js/src/pro/toobit.js +1 -1
- package/js/src/pro/weex.js +1 -1
- package/js/src/pro/woo.d.ts +4 -4
- package/js/src/pro/woo.js +4 -4
- package/js/src/pro/woofipro.d.ts +3 -3
- package/js/src/pro/woofipro.js +3 -3
- package/js/src/pro/xt.js +1 -1
- package/js/src/tokocrypto.js +1 -1
- package/js/src/toobit.d.ts +1 -1
- package/js/src/toobit.js +3 -3
- package/js/src/upbit.js +3 -3
- package/js/src/weex.d.ts +1 -0
- package/js/src/weex.js +57 -62
- package/js/src/whitebit.d.ts +1 -0
- package/js/src/whitebit.js +61 -63
- package/js/src/woo.d.ts +1 -0
- package/js/src/woo.js +66 -55
- package/js/src/woofipro.d.ts +1 -0
- package/js/src/woofipro.js +54 -48
- package/js/src/xt.js +3 -2
- package/js/src/yobit.js +4 -2
- package/js/src/zebpay.d.ts +2 -1
- package/js/src/zebpay.js +73 -75
- package/package.json +25 -11
- package/dist/cjs/src/gateio.js +0 -18
- package/dist/cjs/src/oxfun.js +0 -2931
- package/dist/cjs/src/pro/gateio.js +0 -18
- package/dist/cjs/src/pro/oxfun.js +0 -1113
- package/js/src/abstract/gateio.d.ts +0 -346
- package/js/src/abstract/gateio.js +0 -5
- package/js/src/abstract/oxfun.d.ts +0 -37
- package/js/src/gateio.d.ts +0 -4
- package/js/src/gateio.js +0 -11
- package/js/src/oxfun.d.ts +0 -442
- package/js/src/oxfun.js +0 -2924
- package/js/src/pro/gateio.d.ts +0 -4
- package/js/src/pro/gateio.js +0 -11
- package/js/src/pro/oxfun.d.ts +0 -234
- package/js/src/pro/oxfun.js +0 -1106
- /package/dist/cjs/src/abstract/{oxfun.js → extended.js} +0 -0
- /package/js/src/abstract/{oxfun.js → extended.js} +0 -0
package/dist/cjs/src/mexc.js
CHANGED
|
@@ -322,6 +322,7 @@ class mexc extends mexc$1["default"] {
|
|
|
322
322
|
'position/funding_records': 2,
|
|
323
323
|
'position/position_mode': 2,
|
|
324
324
|
'order/list/open_orders/{symbol}': 2,
|
|
325
|
+
'order/list/open_orders': 2,
|
|
325
326
|
'order/list/history_orders': 2,
|
|
326
327
|
'order/list/order_deals/v3': 2,
|
|
327
328
|
'order/external/{symbol}/{external_oid}': 2,
|
|
@@ -1150,56 +1151,54 @@ class mexc extends mexc$1["default"] {
|
|
|
1150
1151
|
// ]
|
|
1151
1152
|
// }
|
|
1152
1153
|
//
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
'active': undefined,
|
|
1169
|
-
'deposit': this.safeBool(chain, 'depositEnable', false),
|
|
1170
|
-
'withdraw': this.safeBool(chain, 'withdrawEnable', false),
|
|
1171
|
-
'fee': this.safeNumber(chain, 'withdrawFee'),
|
|
1172
|
-
'precision': undefined,
|
|
1173
|
-
'limits': {
|
|
1174
|
-
'withdraw': {
|
|
1175
|
-
'min': this.safeString(chain, 'withdrawMin'),
|
|
1176
|
-
'max': this.safeString(chain, 'withdrawMax'),
|
|
1177
|
-
},
|
|
1178
|
-
},
|
|
1179
|
-
'contract': this.safeString(chain, 'contract'),
|
|
1180
|
-
};
|
|
1181
|
-
}
|
|
1182
|
-
result[code] = this.safeCurrencyStructure({
|
|
1183
|
-
'info': currency,
|
|
1184
|
-
'id': id,
|
|
1185
|
-
'code': code,
|
|
1186
|
-
'name': this.safeString(currency, 'name'),
|
|
1154
|
+
return this.parseCurrencies(response);
|
|
1155
|
+
}
|
|
1156
|
+
parseCurrency(rawCurrency) {
|
|
1157
|
+
const id = this.safeString(rawCurrency, 'coin');
|
|
1158
|
+
const code = this.safeCurrencyCode(id);
|
|
1159
|
+
const networks = {};
|
|
1160
|
+
const chains = this.safeValue(rawCurrency, 'networkList', []);
|
|
1161
|
+
for (let j = 0; j < chains.length; j++) {
|
|
1162
|
+
const chain = chains[j];
|
|
1163
|
+
const networkId = this.safeString2(chain, 'netWork', 'network');
|
|
1164
|
+
const network = this.networkIdToCode(networkId, code);
|
|
1165
|
+
networks[network] = {
|
|
1166
|
+
'info': chain,
|
|
1167
|
+
'id': networkId,
|
|
1168
|
+
'network': network,
|
|
1187
1169
|
'active': undefined,
|
|
1188
|
-
'deposit':
|
|
1189
|
-
'withdraw':
|
|
1190
|
-
'fee':
|
|
1170
|
+
'deposit': this.safeBool(chain, 'depositEnable', false),
|
|
1171
|
+
'withdraw': this.safeBool(chain, 'withdrawEnable', false),
|
|
1172
|
+
'fee': this.safeNumber(chain, 'withdrawFee'),
|
|
1191
1173
|
'precision': undefined,
|
|
1192
1174
|
'limits': {
|
|
1193
|
-
'
|
|
1194
|
-
'min':
|
|
1195
|
-
'max':
|
|
1175
|
+
'withdraw': {
|
|
1176
|
+
'min': this.safeString(chain, 'withdrawMin'),
|
|
1177
|
+
'max': this.safeString(chain, 'withdrawMax'),
|
|
1196
1178
|
},
|
|
1197
1179
|
},
|
|
1198
|
-
'
|
|
1199
|
-
|
|
1200
|
-
});
|
|
1180
|
+
'contract': this.safeString(chain, 'contract'),
|
|
1181
|
+
};
|
|
1201
1182
|
}
|
|
1202
|
-
return
|
|
1183
|
+
return this.safeCurrencyStructure({
|
|
1184
|
+
'info': rawCurrency,
|
|
1185
|
+
'id': id,
|
|
1186
|
+
'code': code,
|
|
1187
|
+
'name': this.safeString(rawCurrency, 'name'),
|
|
1188
|
+
'active': undefined,
|
|
1189
|
+
'deposit': undefined,
|
|
1190
|
+
'withdraw': undefined,
|
|
1191
|
+
'fee': undefined,
|
|
1192
|
+
'precision': undefined,
|
|
1193
|
+
'limits': {
|
|
1194
|
+
'amount': {
|
|
1195
|
+
'min': undefined,
|
|
1196
|
+
'max': undefined,
|
|
1197
|
+
},
|
|
1198
|
+
},
|
|
1199
|
+
'type': 'crypto',
|
|
1200
|
+
'networks': networks,
|
|
1201
|
+
});
|
|
1203
1202
|
}
|
|
1204
1203
|
/**
|
|
1205
1204
|
* @method
|
|
@@ -1537,7 +1536,7 @@ class mexc extends mexc$1["default"] {
|
|
|
1537
1536
|
}
|
|
1538
1537
|
return orderbook;
|
|
1539
1538
|
}
|
|
1540
|
-
|
|
1539
|
+
parseOrderBookBidAsk(bidask, priceKey = 0, amountKey = 1, countOrIdKey = 2) {
|
|
1541
1540
|
const countKey = 2;
|
|
1542
1541
|
const price = this.safeNumber(bidask, priceKey);
|
|
1543
1542
|
const amount = this.safeNumber(bidask, amountKey);
|
|
@@ -2596,8 +2595,10 @@ class mexc extends mexc$1["default"] {
|
|
|
2596
2595
|
// Trigger
|
|
2597
2596
|
// {"success":true,"code":0,"data":259208506303929856}
|
|
2598
2597
|
//
|
|
2599
|
-
|
|
2600
|
-
|
|
2598
|
+
// {"success":true,"code":0,"data":{"orderId":"814218083416790528","ts":1779795118533}}
|
|
2599
|
+
//
|
|
2600
|
+
const data = this.safeDict(response, 'data');
|
|
2601
|
+
return this.safeOrder({ 'id': this.safeString(data, 'orderId'), 'timestamp': this.safeInteger(data, 'ts') }, market);
|
|
2601
2602
|
}
|
|
2602
2603
|
/**
|
|
2603
2604
|
* @method
|
|
@@ -3130,8 +3131,12 @@ class mexc extends mexc$1["default"] {
|
|
|
3130
3131
|
return this.parseOrders(response, market, since, limit);
|
|
3131
3132
|
}
|
|
3132
3133
|
else {
|
|
3133
|
-
|
|
3134
|
-
|
|
3134
|
+
if (limit === undefined) {
|
|
3135
|
+
request['page_size'] = 100; // max
|
|
3136
|
+
}
|
|
3137
|
+
const swapResponse = await this.contractPrivateGetOrderListOpenOrders(this.extend(request, params));
|
|
3138
|
+
const data = this.safeList(swapResponse, 'data', []);
|
|
3139
|
+
return this.parseOrders(data, market, since, limit, params);
|
|
3135
3140
|
}
|
|
3136
3141
|
}
|
|
3137
3142
|
/**
|
|
@@ -3920,7 +3925,7 @@ class mexc extends mexc$1["default"] {
|
|
|
3920
3925
|
for (let i = 0; i < wallet.length; i++) {
|
|
3921
3926
|
const entry = wallet[i];
|
|
3922
3927
|
const marketId = this.safeString(entry, 'symbol');
|
|
3923
|
-
const symbol = this.safeSymbol(marketId
|
|
3928
|
+
const symbol = this.safeSymbol(marketId);
|
|
3924
3929
|
const base = this.safeValue(entry, 'baseAsset', {});
|
|
3925
3930
|
const quote = this.safeValue(entry, 'quoteAsset', {});
|
|
3926
3931
|
const baseCode = this.safeCurrencyCode(this.safeString(base, 'asset'));
|
|
@@ -4730,14 +4735,17 @@ class mexc extends mexc$1["default"] {
|
|
|
4730
4735
|
}
|
|
4731
4736
|
while (Precise["default"].stringLt(floor, maxVol)) {
|
|
4732
4737
|
const cap = Precise["default"].stringAdd(floor, riskIncrVol);
|
|
4738
|
+
const minNotional = this.parseNumber(floor);
|
|
4739
|
+
const mainMarginRate = this.parseNumber(maintenanceMarginRate);
|
|
4740
|
+
const maxLev = this.parseNumber(Precise["default"].stringDiv('1', initialMarginRate));
|
|
4733
4741
|
tiers.push({
|
|
4734
4742
|
'tier': this.parseNumber(Precise["default"].stringDiv(cap, riskIncrVol)),
|
|
4735
4743
|
'symbol': this.safeSymbol(marketId, market, undefined, 'contract'),
|
|
4736
4744
|
'currency': this.safeCurrencyCode(quoteId),
|
|
4737
|
-
'minNotional':
|
|
4745
|
+
'minNotional': minNotional,
|
|
4738
4746
|
'maxNotional': this.parseNumber(cap),
|
|
4739
|
-
'maintenanceMarginRate':
|
|
4740
|
-
'maxLeverage':
|
|
4747
|
+
'maintenanceMarginRate': mainMarginRate,
|
|
4748
|
+
'maxLeverage': maxLev,
|
|
4741
4749
|
'info': info,
|
|
4742
4750
|
});
|
|
4743
4751
|
initialMarginRate = Precise["default"].stringAdd(initialMarginRate, riskIncrImr);
|
|
@@ -4757,11 +4765,12 @@ class mexc extends mexc$1["default"] {
|
|
|
4757
4765
|
//
|
|
4758
4766
|
const address = this.safeString(depositAddress, 'address');
|
|
4759
4767
|
const currencyId = this.safeString(depositAddress, 'coin');
|
|
4768
|
+
const code = this.safeCurrencyCode(currencyId, currency);
|
|
4760
4769
|
const networkId = this.safeString(depositAddress, 'netWork');
|
|
4761
4770
|
return {
|
|
4762
4771
|
'info': depositAddress,
|
|
4763
|
-
'currency':
|
|
4764
|
-
'network': this.networkIdToCode(networkId,
|
|
4772
|
+
'currency': code,
|
|
4773
|
+
'network': this.networkIdToCode(networkId, code),
|
|
4765
4774
|
'address': address,
|
|
4766
4775
|
'tag': this.safeString(depositAddress, 'memo'),
|
|
4767
4776
|
};
|
|
@@ -5080,12 +5089,12 @@ class mexc extends mexc$1["default"] {
|
|
|
5080
5089
|
if (currencyWithNetwork !== undefined) {
|
|
5081
5090
|
currencyId = currencyWithNetwork.split('-')[0];
|
|
5082
5091
|
}
|
|
5092
|
+
const code = this.safeCurrencyCode(currencyId, currency);
|
|
5083
5093
|
let network = undefined;
|
|
5084
5094
|
const rawNetwork = this.safeString(transaction, 'network');
|
|
5085
5095
|
if (rawNetwork !== undefined) {
|
|
5086
|
-
network = this.networkIdToCode(rawNetwork);
|
|
5096
|
+
network = this.networkIdToCode(rawNetwork, code);
|
|
5087
5097
|
}
|
|
5088
|
-
const code = this.safeCurrencyCode(currencyId, currency);
|
|
5089
5098
|
const status = this.parseTransactionStatusByType(this.safeString(transaction, 'status'), type);
|
|
5090
5099
|
let amountString = this.safeString(transaction, 'amount');
|
|
5091
5100
|
const address = this.safeString(transaction, 'address');
|
|
@@ -5363,8 +5372,8 @@ class mexc extends mexc$1["default"] {
|
|
|
5363
5372
|
* @description fetch a history of internal transfers made on an account
|
|
5364
5373
|
* @see https://mexcdevelop.github.io/apidocs/spot_v2_en/#get-internal-assets-transfer-records
|
|
5365
5374
|
* @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-user-39-s-asset-transfer-records
|
|
5366
|
-
* @see https://www.mexc.com/api-docs/spot-v3/wallet-endpoints#query-user-universal-transfer-history
|
|
5367
|
-
* @param code
|
|
5375
|
+
* @see https://www.mexc.com/api-docs/spot-v3/wallet-endpoints#query-user-universal-transfer-history
|
|
5376
|
+
* @param {string} [code] unified currency code of the currency transferred
|
|
5368
5377
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
5369
5378
|
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
5370
5379
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -6102,8 +6111,8 @@ class mexc extends mexc$1["default"] {
|
|
|
6102
6111
|
if (market['spot']) {
|
|
6103
6112
|
throw new errors.BadSymbol(this.id + ' setMarginMode() supports contract markets only');
|
|
6104
6113
|
}
|
|
6105
|
-
|
|
6106
|
-
if (
|
|
6114
|
+
const marginModeLower = marginMode.toLowerCase();
|
|
6115
|
+
if (marginModeLower !== 'isolated' && marginModeLower !== 'cross') {
|
|
6107
6116
|
throw new errors.BadRequest(this.id + ' setMarginMode() marginMode argument should be isolated or cross');
|
|
6108
6117
|
}
|
|
6109
6118
|
const leverage = this.safeInteger(params, 'leverage');
|
|
@@ -6113,7 +6122,7 @@ class mexc extends mexc$1["default"] {
|
|
|
6113
6122
|
const direction = this.safeStringLower2(params, 'direction', 'positionId');
|
|
6114
6123
|
const request = {
|
|
6115
6124
|
'leverage': leverage,
|
|
6116
|
-
'openType': (
|
|
6125
|
+
'openType': (marginModeLower === 'isolated') ? 1 : 2,
|
|
6117
6126
|
};
|
|
6118
6127
|
if (symbol !== undefined) {
|
|
6119
6128
|
request['symbol'] = market['id'];
|
|
@@ -6229,7 +6238,7 @@ class mexc extends mexc$1["default"] {
|
|
|
6229
6238
|
if (success === true) {
|
|
6230
6239
|
return undefined;
|
|
6231
6240
|
}
|
|
6232
|
-
const responseCode = this.safeString(response, 'code'
|
|
6241
|
+
const responseCode = this.safeString(response, 'code');
|
|
6233
6242
|
if ((responseCode !== undefined) && (responseCode !== '200') && (responseCode !== '0')) {
|
|
6234
6243
|
const feedback = this.id + ' ' + body;
|
|
6235
6244
|
this.throwBroadlyMatchedException(this.exceptions['broad'], body, feedback);
|
|
@@ -630,7 +630,6 @@ class modetrade extends modetrade$1["default"] {
|
|
|
630
630
|
* @returns {object} an associative dictionary of currencies
|
|
631
631
|
*/
|
|
632
632
|
async fetchCurrencies(params = {}) {
|
|
633
|
-
const result = {};
|
|
634
633
|
const response = await this.v1PublicGetPublicToken(params);
|
|
635
634
|
//
|
|
636
635
|
// {
|
|
@@ -656,66 +655,65 @@ class modetrade extends modetrade$1["default"] {
|
|
|
656
655
|
//
|
|
657
656
|
const data = this.safeDict(response, 'data', {});
|
|
658
657
|
const tokenRows = this.safeList(data, 'rows', []);
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
resultingNetworks[networkId] = {
|
|
675
|
-
'id': networkId,
|
|
676
|
-
'network': networkId,
|
|
677
|
-
'limits': {
|
|
678
|
-
'withdraw': {
|
|
679
|
-
'min': undefined,
|
|
680
|
-
'max': undefined,
|
|
681
|
-
},
|
|
682
|
-
'deposit': {
|
|
683
|
-
'min': undefined,
|
|
684
|
-
'max': undefined,
|
|
685
|
-
},
|
|
686
|
-
},
|
|
687
|
-
'active': undefined,
|
|
688
|
-
'deposit': undefined,
|
|
689
|
-
'withdraw': undefined,
|
|
690
|
-
'fee': this.safeNumber(network, 'withdrawal_fee'),
|
|
691
|
-
'precision': this.parseNumber(precision),
|
|
692
|
-
'info': network,
|
|
693
|
-
};
|
|
658
|
+
return this.parseCurrencies(tokenRows);
|
|
659
|
+
}
|
|
660
|
+
parseCurrency(rawCurrency) {
|
|
661
|
+
const currencyId = this.safeString(rawCurrency, 'token');
|
|
662
|
+
const networks = this.safeList(rawCurrency, 'chain_details');
|
|
663
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
664
|
+
let minPrecision = undefined;
|
|
665
|
+
const resultingNetworks = {};
|
|
666
|
+
for (let j = 0; j < networks.length; j++) {
|
|
667
|
+
const network = networks[j];
|
|
668
|
+
// TODO: transform chain id to human readable name
|
|
669
|
+
const networkId = this.safeString(network, 'chain_id');
|
|
670
|
+
const precision = this.parsePrecision(this.safeString(network, 'decimals'));
|
|
671
|
+
if (precision !== undefined) {
|
|
672
|
+
minPrecision = (minPrecision === undefined) ? precision : Precise["default"].stringMin(precision, minPrecision);
|
|
694
673
|
}
|
|
695
|
-
|
|
696
|
-
'id':
|
|
697
|
-
'
|
|
698
|
-
'code': code,
|
|
699
|
-
'precision': this.parseNumber(minPrecision),
|
|
700
|
-
'active': undefined,
|
|
701
|
-
'fee': undefined,
|
|
702
|
-
'networks': resultingNetworks,
|
|
703
|
-
'deposit': undefined,
|
|
704
|
-
'withdraw': undefined,
|
|
674
|
+
resultingNetworks[networkId] = {
|
|
675
|
+
'id': networkId,
|
|
676
|
+
'network': networkId,
|
|
705
677
|
'limits': {
|
|
706
|
-
'
|
|
678
|
+
'withdraw': {
|
|
707
679
|
'min': undefined,
|
|
708
680
|
'max': undefined,
|
|
709
681
|
},
|
|
710
|
-
'
|
|
711
|
-
'min':
|
|
682
|
+
'deposit': {
|
|
683
|
+
'min': undefined,
|
|
712
684
|
'max': undefined,
|
|
713
685
|
},
|
|
714
686
|
},
|
|
715
|
-
'
|
|
716
|
-
|
|
687
|
+
'active': undefined,
|
|
688
|
+
'deposit': undefined,
|
|
689
|
+
'withdraw': undefined,
|
|
690
|
+
'fee': this.safeNumber(network, 'withdrawal_fee'),
|
|
691
|
+
'precision': this.parseNumber(precision),
|
|
692
|
+
'info': network,
|
|
693
|
+
};
|
|
717
694
|
}
|
|
718
|
-
return
|
|
695
|
+
return this.safeCurrencyStructure({
|
|
696
|
+
'id': currencyId,
|
|
697
|
+
'name': currencyId,
|
|
698
|
+
'code': code,
|
|
699
|
+
'precision': this.parseNumber(minPrecision),
|
|
700
|
+
'active': undefined,
|
|
701
|
+
'fee': undefined,
|
|
702
|
+
'networks': resultingNetworks,
|
|
703
|
+
'deposit': undefined,
|
|
704
|
+
'withdraw': undefined,
|
|
705
|
+
'limits': {
|
|
706
|
+
'deposit': {
|
|
707
|
+
'min': undefined,
|
|
708
|
+
'max': undefined,
|
|
709
|
+
},
|
|
710
|
+
'withdraw': {
|
|
711
|
+
'min': this.safeNumber(rawCurrency, 'minimum_withdraw_amount'),
|
|
712
|
+
'max': undefined,
|
|
713
|
+
},
|
|
714
|
+
},
|
|
715
|
+
'info': rawCurrency,
|
|
716
|
+
});
|
|
719
717
|
}
|
|
720
718
|
parseTokenAndFeeTemp(item, feeTokenKey, feeAmountKey) {
|
|
721
719
|
const feeCost = this.safeString(item, feeAmountKey);
|
|
@@ -1405,7 +1403,7 @@ class modetrade extends modetrade$1["default"] {
|
|
|
1405
1403
|
'fok': 'FOK',
|
|
1406
1404
|
'post_only': 'PO',
|
|
1407
1405
|
};
|
|
1408
|
-
return this.safeString(timeInForces, timeInForce
|
|
1406
|
+
return this.safeString(timeInForces, timeInForce);
|
|
1409
1407
|
}
|
|
1410
1408
|
parseOrderStatus(status) {
|
|
1411
1409
|
if (status !== undefined) {
|
package/dist/cjs/src/ndax.js
CHANGED
|
@@ -480,43 +480,41 @@ class ndax extends ndax$1["default"] {
|
|
|
480
480
|
// },
|
|
481
481
|
// ...
|
|
482
482
|
//
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
}
|
|
494
|
-
result[code] = this.safeCurrencyStructure({
|
|
495
|
-
'id': id,
|
|
496
|
-
'name': this.safeString(currency, 'ProductFullName'),
|
|
497
|
-
'code': code,
|
|
498
|
-
'type': type,
|
|
499
|
-
'precision': this.safeNumber(currency, 'TickSize'),
|
|
500
|
-
'info': currency,
|
|
501
|
-
'active': !this.safeBool(currency, 'IsDisabled'),
|
|
502
|
-
'deposit': this.safeBool(currency, 'DepositEnabled'),
|
|
503
|
-
'withdraw': this.safeBool(currency, 'WithdrawEnabled'),
|
|
504
|
-
'fee': undefined,
|
|
505
|
-
'limits': {
|
|
506
|
-
'amount': {
|
|
507
|
-
'min': undefined,
|
|
508
|
-
'max': undefined,
|
|
509
|
-
},
|
|
510
|
-
'withdraw': {
|
|
511
|
-
'min': undefined,
|
|
512
|
-
'max': undefined,
|
|
513
|
-
},
|
|
514
|
-
},
|
|
515
|
-
'networks': {},
|
|
516
|
-
'margin': this.safeBool(currency, 'MarginEnabled'),
|
|
517
|
-
});
|
|
483
|
+
return this.parseCurrencies(response);
|
|
484
|
+
}
|
|
485
|
+
parseCurrency(rawCurrency) {
|
|
486
|
+
const id = this.safeString(rawCurrency, 'ProductId');
|
|
487
|
+
const code = this.safeCurrencyCode(this.safeString(rawCurrency, 'Product'));
|
|
488
|
+
const ProductType = this.safeString(rawCurrency, 'ProductType');
|
|
489
|
+
let type = (ProductType === 'NationalCurrency') ? 'fiat' : 'crypto';
|
|
490
|
+
if (ProductType === 'Unknown') {
|
|
491
|
+
// such currency is just a blanket entry
|
|
492
|
+
type = 'other';
|
|
518
493
|
}
|
|
519
|
-
return
|
|
494
|
+
return this.safeCurrencyStructure({
|
|
495
|
+
'id': id,
|
|
496
|
+
'name': this.safeString(rawCurrency, 'ProductFullName'),
|
|
497
|
+
'code': code,
|
|
498
|
+
'type': type,
|
|
499
|
+
'precision': this.safeNumber(rawCurrency, 'TickSize'),
|
|
500
|
+
'info': rawCurrency,
|
|
501
|
+
'active': !this.safeBool(rawCurrency, 'IsDisabled'),
|
|
502
|
+
'deposit': this.safeBool(rawCurrency, 'DepositEnabled'),
|
|
503
|
+
'withdraw': this.safeBool(rawCurrency, 'WithdrawEnabled'),
|
|
504
|
+
'fee': undefined,
|
|
505
|
+
'limits': {
|
|
506
|
+
'amount': {
|
|
507
|
+
'min': undefined,
|
|
508
|
+
'max': undefined,
|
|
509
|
+
},
|
|
510
|
+
'withdraw': {
|
|
511
|
+
'min': undefined,
|
|
512
|
+
'max': undefined,
|
|
513
|
+
},
|
|
514
|
+
},
|
|
515
|
+
'networks': {},
|
|
516
|
+
'margin': this.safeBool(rawCurrency, 'MarginEnabled'),
|
|
517
|
+
});
|
|
520
518
|
}
|
|
521
519
|
/**
|
|
522
520
|
* @method
|
|
@@ -666,7 +664,7 @@ class ndax extends ndax$1["default"] {
|
|
|
666
664
|
const newNonce = this.safeInteger(level, 0);
|
|
667
665
|
nonce = Math.max(nonce, newNonce);
|
|
668
666
|
}
|
|
669
|
-
const bidask = this.
|
|
667
|
+
const bidask = this.parseOrderBookBidAsk(level, priceKey, amountKey);
|
|
670
668
|
const levelSide = this.safeInteger(level, 9);
|
|
671
669
|
const side = levelSide ? asksKey : bidsKey;
|
|
672
670
|
const resultSide = result[side];
|
package/dist/cjs/src/okx.js
CHANGED
|
@@ -1517,7 +1517,18 @@ class okx extends okx$1["default"] {
|
|
|
1517
1517
|
};
|
|
1518
1518
|
}
|
|
1519
1519
|
safeMarket(marketId = undefined, market = undefined, delimiter = undefined, marketType = undefined) {
|
|
1520
|
-
|
|
1520
|
+
let isOption = false;
|
|
1521
|
+
if (marketId !== undefined) {
|
|
1522
|
+
const parts = marketId.split('-');
|
|
1523
|
+
const partsLength = parts.length;
|
|
1524
|
+
// a valid OKX option ends with the call/put flag and carries expiry+strike segments,
|
|
1525
|
+
// e.g. the market id BTC-USD-220325-194000-P (5 parts) or the unified symbol
|
|
1526
|
+
// BTC/USD:USD-260611-54000-C (4 parts). Requiring more than 3 dash-separated parts avoids
|
|
1527
|
+
// misclassifying ordinary ids that merely contain "-C"/"-P" (such as a SPOT id like
|
|
1528
|
+
// "PERFTESTA-PERFTESTB") as expired options, which would crash createExpiredOptionMarket
|
|
1529
|
+
// on the missing expiry.
|
|
1530
|
+
isOption = (partsLength > 3) && (marketId.endsWith('-C') || marketId.endsWith('-P'));
|
|
1531
|
+
}
|
|
1521
1532
|
if (isOption && !(marketId in this.markets_by_id)) {
|
|
1522
1533
|
// handle expired option contracts
|
|
1523
1534
|
return this.createExpiredOptionMarket(marketId);
|
|
@@ -1823,6 +1834,9 @@ class okx extends okx$1["default"] {
|
|
|
1823
1834
|
let maxLeverage = this.safeString(market, 'lever', '1');
|
|
1824
1835
|
maxLeverage = Precise["default"].stringMax(maxLeverage, '1');
|
|
1825
1836
|
const maxSpotCost = this.safeNumber(market, 'maxMktSz');
|
|
1837
|
+
const leverageAboveOne = Precise["default"].stringGt(maxLeverage, '1');
|
|
1838
|
+
const quoteEqualSettle = (quoteId === settleId);
|
|
1839
|
+
const baseEqualSettle = (baseId === settleId);
|
|
1826
1840
|
const status = this.safeString(market, 'state');
|
|
1827
1841
|
const instIdCode = this.safeInteger(market, 'instIdCode');
|
|
1828
1842
|
return this.extend(fees, {
|
|
@@ -1837,14 +1851,14 @@ class okx extends okx$1["default"] {
|
|
|
1837
1851
|
'settleId': settleId,
|
|
1838
1852
|
'type': type,
|
|
1839
1853
|
'spot': spot,
|
|
1840
|
-
'margin': spot &&
|
|
1854
|
+
'margin': spot && leverageAboveOne,
|
|
1841
1855
|
'swap': swap,
|
|
1842
1856
|
'future': future,
|
|
1843
1857
|
'option': option,
|
|
1844
1858
|
'active': status === 'live',
|
|
1845
1859
|
'contract': contract,
|
|
1846
|
-
'linear': contract ?
|
|
1847
|
-
'inverse': contract ?
|
|
1860
|
+
'linear': contract ? quoteEqualSettle : undefined,
|
|
1861
|
+
'inverse': contract ? baseEqualSettle : undefined,
|
|
1848
1862
|
'contractSize': contract ? this.safeNumber(market, 'ctVal') : undefined,
|
|
1849
1863
|
'expiry': expiry,
|
|
1850
1864
|
'expiryDatetime': this.iso8601(expiry),
|
|
@@ -1935,6 +1949,10 @@ class okx extends okx$1["default"] {
|
|
|
1935
1949
|
const marketsWithoutTest = [];
|
|
1936
1950
|
for (let i = 0; i < dataResponse.length; i++) {
|
|
1937
1951
|
const data = dataResponse[i];
|
|
1952
|
+
const instId = this.safeString(data, 'instId', '');
|
|
1953
|
+
if (instId === '') {
|
|
1954
|
+
continue; // skip broken "preopen" placeholder instruments that have no instId
|
|
1955
|
+
}
|
|
1938
1956
|
if (this.isSandboxModeEnabled) {
|
|
1939
1957
|
const instFamily = this.safeString(data, 'instFamily', '');
|
|
1940
1958
|
if (instFamily.startsWith('TEST')) {
|
|
@@ -9205,7 +9223,7 @@ class okx extends okx$1["default"] {
|
|
|
9205
9223
|
request['end'] = until;
|
|
9206
9224
|
}
|
|
9207
9225
|
if (timeframe !== undefined) {
|
|
9208
|
-
request['period'] = timeframe;
|
|
9226
|
+
request['period'] = this.safeString(this.timeframes, timeframe, timeframe);
|
|
9209
9227
|
}
|
|
9210
9228
|
if (since !== undefined) {
|
|
9211
9229
|
request['begin'] = since;
|
|
@@ -435,29 +435,27 @@ class onetrading extends onetrading$1["default"] {
|
|
|
435
435
|
// },
|
|
436
436
|
// ]
|
|
437
437
|
//
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
}
|
|
460
|
-
return result;
|
|
438
|
+
return this.parseCurrencies(response);
|
|
439
|
+
}
|
|
440
|
+
parseCurrency(rawCurrency) {
|
|
441
|
+
const id = this.safeString(rawCurrency, 'code');
|
|
442
|
+
const code = this.safeCurrencyCode(id);
|
|
443
|
+
return this.safeCurrencyStructure({
|
|
444
|
+
'id': id,
|
|
445
|
+
'code': code,
|
|
446
|
+
'name': this.safeString(rawCurrency, 'name'),
|
|
447
|
+
'info': rawCurrency,
|
|
448
|
+
'active': undefined,
|
|
449
|
+
'fee': undefined,
|
|
450
|
+
'precision': this.parseNumber(this.parsePrecision(this.safeString(rawCurrency, 'precision'))),
|
|
451
|
+
'withdraw': undefined,
|
|
452
|
+
'deposit': undefined,
|
|
453
|
+
'limits': {
|
|
454
|
+
'amount': { 'min': undefined, 'max': undefined },
|
|
455
|
+
'withdraw': { 'min': undefined, 'max': undefined },
|
|
456
|
+
},
|
|
457
|
+
'networks': {},
|
|
458
|
+
});
|
|
461
459
|
}
|
|
462
460
|
/**
|
|
463
461
|
* @method
|
package/dist/cjs/src/p2b.js
CHANGED
|
@@ -1113,10 +1113,12 @@ class p2b extends p2b$1["default"] {
|
|
|
1113
1113
|
throw new errors.BadRequest(this.id + ' fetchMyTrades () the time between since and params["until"] cannot be greater than 24 hours');
|
|
1114
1114
|
}
|
|
1115
1115
|
const market = this.market(symbol);
|
|
1116
|
+
const sinceSec = this.parseToInt(since / 1000);
|
|
1117
|
+
const untilSec = this.parseToInt(until / 1000);
|
|
1116
1118
|
const request = {
|
|
1117
1119
|
'market': market['id'],
|
|
1118
|
-
'startTime':
|
|
1119
|
-
'endTime':
|
|
1120
|
+
'startTime': sinceSec,
|
|
1121
|
+
'endTime': untilSec,
|
|
1120
1122
|
};
|
|
1121
1123
|
if (limit !== undefined) {
|
|
1122
1124
|
request['limit'] = limit;
|
|
@@ -1189,9 +1191,11 @@ class p2b extends p2b$1["default"] {
|
|
|
1189
1191
|
if ((until - since) > 86400000) {
|
|
1190
1192
|
throw new errors.BadRequest(this.id + ' fetchClosedOrders () the time between since and params["until"] cannot be greater than 24 hours');
|
|
1191
1193
|
}
|
|
1194
|
+
const sinceSec = this.parseToInt(since / 1000);
|
|
1195
|
+
const untilSec = this.parseToInt(until / 1000);
|
|
1192
1196
|
const request = {
|
|
1193
|
-
'startTime':
|
|
1194
|
-
'endTime':
|
|
1197
|
+
'startTime': sinceSec,
|
|
1198
|
+
'endTime': untilSec,
|
|
1195
1199
|
};
|
|
1196
1200
|
if (market !== undefined) {
|
|
1197
1201
|
request['market'] = market['id'];
|
package/dist/cjs/src/paradex.js
CHANGED
|
@@ -627,6 +627,7 @@ class paradex extends paradex$1["default"] {
|
|
|
627
627
|
else {
|
|
628
628
|
expiry = undefined;
|
|
629
629
|
}
|
|
630
|
+
const expireDatetime = (expiry === 0) ? undefined : this.iso8601(expiry);
|
|
630
631
|
return this.safeMarketStructure({
|
|
631
632
|
'id': marketId,
|
|
632
633
|
'symbol': symbol,
|
|
@@ -650,7 +651,7 @@ class paradex extends paradex$1["default"] {
|
|
|
650
651
|
'maker': makerFee,
|
|
651
652
|
'contractSize': this.parseNumber('1'),
|
|
652
653
|
'expiry': expiry,
|
|
653
|
-
'expiryDatetime':
|
|
654
|
+
'expiryDatetime': expireDatetime,
|
|
654
655
|
'strike': this.parseNumber(strikePrice),
|
|
655
656
|
'optionType': this.safeStringLower(market, 'option_type'),
|
|
656
657
|
'precision': {
|
|
@@ -1496,7 +1497,7 @@ class paradex extends paradex$1["default"] {
|
|
|
1496
1497
|
'GTC': 'GTC',
|
|
1497
1498
|
'POST_ONLY': 'PO',
|
|
1498
1499
|
};
|
|
1499
|
-
return this.safeString(timeInForces, timeInForce
|
|
1500
|
+
return this.safeString(timeInForces, timeInForce);
|
|
1500
1501
|
}
|
|
1501
1502
|
parseOrderStatus(status) {
|
|
1502
1503
|
if (status !== undefined) {
|