ccxt 4.4.50 → 4.4.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 +227 -142
- package/dist/ccxt.browser.min.js +8 -8
- package/dist/cjs/ccxt.js +1 -4
- package/dist/cjs/src/ace.js +3 -0
- package/dist/cjs/src/alpaca.js +6 -1
- package/dist/cjs/src/ascendex.js +2 -1
- package/dist/cjs/src/base/Exchange.js +151 -59
- package/dist/cjs/src/bigone.js +5 -0
- package/dist/cjs/src/binance.js +87 -68
- package/dist/cjs/src/bingx.js +27 -30
- package/dist/cjs/src/bit2c.js +3 -0
- package/dist/cjs/src/bitbank.js +3 -0
- package/dist/cjs/src/bitbns.js +3 -0
- package/dist/cjs/src/bitfinex.js +7 -2
- package/dist/cjs/src/bitflyer.js +5 -0
- package/dist/cjs/src/bitget.js +9 -5
- package/dist/cjs/src/bithumb.js +2 -0
- package/dist/cjs/src/bitmart.js +20 -8
- package/dist/cjs/src/bitmex.js +99 -93
- package/dist/cjs/src/bitopro.js +5 -0
- package/dist/cjs/src/bitrue.js +4 -0
- package/dist/cjs/src/bitso.js +3 -0
- package/dist/cjs/src/bitstamp.js +3 -0
- package/dist/cjs/src/bitteam.js +5 -0
- package/dist/cjs/src/bitvavo.js +4 -0
- package/dist/cjs/src/blockchaincom.js +5 -1
- package/dist/cjs/src/blofin.js +7 -0
- package/dist/cjs/src/btcalpha.js +5 -0
- package/dist/cjs/src/btcbox.js +3 -3
- package/dist/cjs/src/btcmarkets.js +5 -0
- package/dist/cjs/src/btcturk.js +3 -0
- package/dist/cjs/src/bybit.js +12 -2
- package/dist/cjs/src/cex.js +2 -0
- package/dist/cjs/src/coinbase.js +16 -8
- package/dist/cjs/src/coinbaseexchange.js +5 -0
- package/dist/cjs/src/coinbaseinternational.js +7 -3
- package/dist/cjs/src/coincatch.js +4 -1
- package/dist/cjs/src/coincheck.js +2 -0
- package/dist/cjs/src/coinex.js +6 -2
- package/dist/cjs/src/coinlist.js +5 -0
- package/dist/cjs/src/coinmate.js +5 -1
- package/dist/cjs/src/coinmetro.js +29 -8
- package/dist/cjs/src/coinone.js +4 -1
- package/dist/cjs/src/coinsph.js +5 -1
- package/dist/cjs/src/coinspot.js +2 -1
- package/dist/cjs/src/cryptocom.js +5 -0
- package/dist/cjs/src/currencycom.js +4 -1
- package/dist/cjs/src/defx.js +5 -0
- package/dist/cjs/src/delta.js +3 -0
- package/dist/cjs/src/deribit.js +37 -36
- package/dist/cjs/src/digifinex.js +10 -5
- package/dist/cjs/src/ellipx.js +9 -5
- package/dist/cjs/src/exmo.js +5 -2
- package/dist/cjs/src/gate.js +5 -1
- package/dist/cjs/src/gemini.js +3 -0
- package/dist/cjs/src/hashkey.js +5 -4
- package/dist/cjs/src/hitbtc.js +4 -0
- package/dist/cjs/src/hollaex.js +8 -2
- package/dist/cjs/src/htx.js +15 -5
- package/dist/cjs/src/huobijp.js +5 -0
- package/dist/cjs/src/hyperliquid.js +9 -4
- package/dist/cjs/src/idex.js +6 -2
- package/dist/cjs/src/independentreserve.js +4 -0
- package/dist/cjs/src/indodax.js +3 -0
- package/dist/cjs/src/kraken.js +7 -5
- package/dist/cjs/src/krakenfutures.js +5 -2
- package/dist/cjs/src/kucoin.js +18 -10
- package/dist/cjs/src/kucoinfutures.js +5 -1
- package/dist/cjs/src/kuna.js +3 -0
- package/dist/cjs/src/latoken.js +4 -0
- package/dist/cjs/src/lbank.js +6 -1
- package/dist/cjs/src/luno.js +7 -2
- package/dist/cjs/src/mercado.js +5 -1
- package/dist/cjs/src/mexc.js +36 -15
- package/dist/cjs/src/ndax.js +7 -2
- package/dist/cjs/src/novadax.js +6 -1
- package/dist/cjs/src/oceanex.js +4 -0
- package/dist/cjs/src/okcoin.js +6 -2
- package/dist/cjs/src/okx.js +18 -4
- package/dist/cjs/src/onetrading.js +6 -2
- package/dist/cjs/src/oxfun.js +3 -0
- package/dist/cjs/src/p2b.js +3 -0
- package/dist/cjs/src/paradex.js +10 -4
- package/dist/cjs/src/phemex.js +12 -5
- package/dist/cjs/src/poloniex.js +6 -3
- package/dist/cjs/src/poloniexfutures.js +5 -1
- package/dist/cjs/src/pro/binance.js +4 -2
- package/dist/cjs/src/pro/bitcoincom.js +1 -4
- package/dist/cjs/src/pro/bitget.js +3 -3
- package/dist/cjs/src/pro/bitopro.js +1 -1
- package/dist/cjs/src/pro/blofin.js +8 -0
- package/dist/cjs/src/pro/bybit.js +10 -2
- package/dist/cjs/src/pro/cex.js +1 -1
- package/dist/cjs/src/pro/coincatch.js +3 -3
- package/dist/cjs/src/pro/coinex.js +4 -1
- package/dist/cjs/src/pro/htx.js +8 -8
- package/dist/cjs/src/pro/mexc.js +3 -3
- package/dist/cjs/src/pro/okx.js +1 -1
- package/dist/cjs/src/probit.js +14 -9
- package/dist/cjs/src/timex.js +5 -1
- package/dist/cjs/src/tokocrypto.js +6 -1
- package/dist/cjs/src/tradeogre.js +2 -0
- package/dist/cjs/src/upbit.js +3 -0
- package/dist/cjs/src/vertex.js +71 -4
- package/dist/cjs/src/wavesexchange.js +96 -3
- package/dist/cjs/src/wazirx.js +61 -3
- package/dist/cjs/src/whitebit.js +74 -4
- package/dist/cjs/src/woo.js +15 -5
- package/dist/cjs/src/woofipro.js +25 -9
- package/dist/cjs/src/xt.js +117 -0
- package/dist/cjs/src/yobit.js +59 -0
- package/dist/cjs/src/zaif.js +57 -0
- package/dist/cjs/src/zonda.js +58 -0
- package/js/ccxt.d.ts +3 -6
- package/js/ccxt.js +2 -4
- package/js/src/abstract/binance.d.ts +0 -1
- package/js/src/abstract/binancecoinm.d.ts +0 -1
- package/js/src/abstract/binanceus.d.ts +0 -1
- package/js/src/abstract/binanceusdm.d.ts +0 -1
- package/js/src/ace.js +3 -0
- package/js/src/alpaca.js +6 -1
- package/js/src/ascendex.js +2 -1
- package/js/src/base/Exchange.d.ts +9 -3
- package/js/src/base/Exchange.js +151 -59
- package/js/src/base/types.d.ts +2 -0
- package/js/src/bigone.d.ts +1 -1
- package/js/src/bigone.js +5 -0
- package/js/src/binance.d.ts +33 -33
- package/js/src/binance.js +87 -68
- package/js/src/bingx.d.ts +1 -1
- package/js/src/bingx.js +27 -30
- package/js/src/bit2c.js +3 -0
- package/js/src/bitbank.js +3 -0
- package/js/src/bitbns.js +3 -0
- package/js/src/bitfinex.js +7 -2
- package/js/src/bitflyer.js +5 -0
- package/js/src/bitget.js +9 -5
- package/js/src/bithumb.js +2 -0
- package/js/src/bitmart.d.ts +5 -5
- package/js/src/bitmart.js +20 -8
- package/js/src/bitmex.js +99 -93
- package/js/src/bitopro.d.ts +2 -2
- package/js/src/bitopro.js +5 -0
- package/js/src/bitrue.js +4 -0
- package/js/src/bitso.d.ts +2 -2
- package/js/src/bitso.js +3 -0
- package/js/src/bitstamp.js +3 -0
- package/js/src/bitteam.js +5 -0
- package/js/src/bitvavo.js +4 -0
- package/js/src/blockchaincom.js +5 -1
- package/js/src/blofin.js +7 -0
- package/js/src/btcalpha.js +5 -0
- package/js/src/btcbox.js +3 -3
- package/js/src/btcmarkets.js +5 -0
- package/js/src/btcturk.js +3 -0
- package/js/src/bybit.d.ts +3 -3
- package/js/src/bybit.js +12 -2
- package/js/src/cex.js +2 -0
- package/js/src/coinbase.d.ts +4 -4
- package/js/src/coinbase.js +16 -8
- package/js/src/coinbaseexchange.js +5 -0
- package/js/src/coinbaseinternational.d.ts +1 -1
- package/js/src/coinbaseinternational.js +7 -3
- package/js/src/coincatch.js +4 -1
- package/js/src/coincheck.js +2 -0
- package/js/src/coinex.d.ts +1 -1
- package/js/src/coinex.js +6 -2
- package/js/src/coinlist.js +5 -0
- package/js/src/coinmate.js +5 -1
- package/js/src/coinmetro.js +29 -8
- package/js/src/coinone.js +4 -1
- package/js/src/coinsph.js +5 -1
- package/js/src/coinspot.js +2 -1
- package/js/src/cryptocom.js +5 -0
- package/js/src/currencycom.js +4 -1
- package/js/src/defx.js +5 -0
- package/js/src/delta.js +3 -0
- package/js/src/deribit.d.ts +5 -3
- package/js/src/deribit.js +37 -36
- package/js/src/digifinex.js +10 -5
- package/js/src/ellipx.d.ts +1 -1
- package/js/src/ellipx.js +9 -5
- package/js/src/exmo.d.ts +3 -3
- package/js/src/exmo.js +5 -2
- package/js/src/gate.js +5 -1
- package/js/src/gemini.js +3 -0
- package/js/src/hashkey.js +5 -4
- package/js/src/hitbtc.d.ts +2 -2
- package/js/src/hitbtc.js +4 -0
- package/js/src/hollaex.d.ts +2 -2
- package/js/src/hollaex.js +8 -2
- package/js/src/htx.d.ts +1 -1
- package/js/src/htx.js +15 -5
- package/js/src/huobijp.js +5 -0
- package/js/src/hyperliquid.d.ts +1 -1
- package/js/src/hyperliquid.js +9 -4
- package/js/src/idex.d.ts +1 -1
- package/js/src/idex.js +6 -2
- package/js/src/independentreserve.js +4 -0
- package/js/src/indodax.js +3 -0
- package/js/src/kraken.js +7 -5
- package/js/src/krakenfutures.js +5 -2
- package/js/src/kucoin.d.ts +2 -1
- package/js/src/kucoin.js +18 -10
- package/js/src/kucoinfutures.d.ts +1 -1
- package/js/src/kucoinfutures.js +5 -1
- package/js/src/kuna.js +3 -0
- package/js/src/latoken.js +4 -0
- package/js/src/lbank.js +6 -1
- package/js/src/luno.d.ts +1 -1
- package/js/src/luno.js +7 -2
- package/js/src/mercado.js +5 -1
- package/js/src/mexc.d.ts +1 -1
- package/js/src/mexc.js +36 -15
- package/js/src/ndax.js +7 -2
- package/js/src/novadax.js +6 -1
- package/js/src/oceanex.d.ts +2 -2
- package/js/src/oceanex.js +4 -0
- package/js/src/okcoin.js +6 -2
- package/js/src/okx.js +18 -4
- package/js/src/onetrading.d.ts +1 -1
- package/js/src/onetrading.js +6 -2
- package/js/src/oxfun.js +3 -0
- package/js/src/p2b.js +3 -0
- package/js/src/paradex.js +10 -4
- package/js/src/phemex.d.ts +1 -1
- package/js/src/phemex.js +12 -5
- package/js/src/poloniex.js +6 -3
- package/js/src/poloniexfutures.d.ts +1 -1
- package/js/src/poloniexfutures.js +5 -1
- package/js/src/pro/binance.js +4 -2
- package/js/src/pro/bitcoincom.js +1 -4
- package/js/src/pro/bitget.js +3 -3
- package/js/src/pro/bitopro.js +1 -1
- package/js/src/pro/blofin.js +8 -0
- package/js/src/pro/bybit.js +10 -2
- package/js/src/pro/cex.js +1 -1
- package/js/src/pro/coincatch.js +3 -3
- package/js/src/pro/coinex.js +4 -1
- package/js/src/pro/htx.d.ts +8 -8
- package/js/src/pro/htx.js +8 -8
- package/js/src/pro/mexc.js +3 -3
- package/js/src/pro/okx.js +1 -1
- package/js/src/probit.d.ts +1 -0
- package/js/src/probit.js +14 -9
- package/js/src/static_dependencies/node-fetch/headers.d.ts +5 -0
- package/js/src/static_dependencies/proxies/agent-base/helpers.d.ts +1 -0
- package/js/src/static_dependencies/proxies/https-proxy-agent/parse-proxy-response.d.ts +1 -0
- package/js/src/timex.js +5 -1
- package/js/src/tokocrypto.js +6 -1
- package/js/src/tradeogre.js +2 -0
- package/js/src/upbit.d.ts +2 -2
- package/js/src/upbit.js +3 -0
- package/js/src/vertex.js +71 -4
- package/js/src/wavesexchange.d.ts +2 -1
- package/js/src/wavesexchange.js +96 -3
- package/js/src/wazirx.js +61 -3
- package/js/src/whitebit.js +74 -4
- package/js/src/woo.d.ts +1 -1
- package/js/src/woo.js +15 -5
- package/js/src/woofipro.d.ts +1 -1
- package/js/src/woofipro.js +25 -9
- package/js/src/xt.js +117 -0
- package/js/src/yobit.d.ts +2 -2
- package/js/src/yobit.js +59 -0
- package/js/src/zaif.js +57 -0
- package/js/src/zonda.d.ts +1 -0
- package/js/src/zonda.js +58 -0
- package/package.json +25 -7
- package/dist/cjs/src/abstract/lykke.js +0 -9
- package/dist/cjs/src/lykke.js +0 -1401
- package/js/src/abstract/lykke.d.ts +0 -32
- package/js/src/abstract/lykke.js +0 -11
- package/js/src/hitbtc3.d.ts +0 -8
- package/js/src/hitbtc3.js +0 -20
- package/js/src/lykke.d.ts +0 -212
- package/js/src/lykke.js +0 -1402
package/js/src/binance.js
CHANGED
|
@@ -228,7 +228,6 @@ export default class binance extends Exchange {
|
|
|
228
228
|
'private': 'https://api.binance.com/api/v3',
|
|
229
229
|
'v1': 'https://api.binance.com/api/v1',
|
|
230
230
|
'papi': 'https://papi.binance.com/papi/v1',
|
|
231
|
-
'papiV2': 'https://papi.binance.com/papi/v2',
|
|
232
231
|
},
|
|
233
232
|
'www': 'https://www.binance.com',
|
|
234
233
|
'referral': {
|
|
@@ -1173,11 +1172,6 @@ export default class binance extends Exchange {
|
|
|
1173
1172
|
'listenKey': 0.2,
|
|
1174
1173
|
},
|
|
1175
1174
|
},
|
|
1176
|
-
'papiV2': {
|
|
1177
|
-
'get': {
|
|
1178
|
-
'um/account': 1,
|
|
1179
|
-
},
|
|
1180
|
-
},
|
|
1181
1175
|
},
|
|
1182
1176
|
'fees': {
|
|
1183
1177
|
'trading': {
|
|
@@ -1337,6 +1331,7 @@ export default class binance extends Exchange {
|
|
|
1337
1331
|
'OMNI': 'OMNI',
|
|
1338
1332
|
'EOS': 'EOS',
|
|
1339
1333
|
'SPL': 'SOL',
|
|
1334
|
+
'SOL': 'SOL', // we shouldn't rename SOL
|
|
1340
1335
|
},
|
|
1341
1336
|
// keeping this object for backward-compatibility
|
|
1342
1337
|
'reverseNetworks': {
|
|
@@ -1434,6 +1429,7 @@ export default class binance extends Exchange {
|
|
|
1434
1429
|
'explorer.zensystem.io': 'ZEN',
|
|
1435
1430
|
},
|
|
1436
1431
|
'networksById': {
|
|
1432
|
+
'SOL': 'SOL',
|
|
1437
1433
|
'tronscan.org': 'TRC20',
|
|
1438
1434
|
'etherscan.io': 'ERC20',
|
|
1439
1435
|
'bscscan.com': 'BSC',
|
|
@@ -1588,24 +1584,30 @@ export default class binance extends Exchange {
|
|
|
1588
1584
|
},
|
|
1589
1585
|
'hedged': true,
|
|
1590
1586
|
'leverage': false,
|
|
1591
|
-
'marketBuyRequiresPrice': false,
|
|
1592
1587
|
'marketBuyByCost': true,
|
|
1593
|
-
|
|
1594
|
-
'selfTradePrevention':
|
|
1595
|
-
|
|
1596
|
-
|
|
1588
|
+
'marketBuyRequiresPrice': false,
|
|
1589
|
+
'selfTradePrevention': {
|
|
1590
|
+
'expire_maker': true,
|
|
1591
|
+
'expire_taker': true,
|
|
1592
|
+
'expire_both': true,
|
|
1593
|
+
'none': true,
|
|
1594
|
+
},
|
|
1595
|
+
'trailing': false,
|
|
1596
|
+
'icebergAmount': true,
|
|
1597
1597
|
},
|
|
1598
1598
|
'createOrders': undefined,
|
|
1599
1599
|
'fetchMyTrades': {
|
|
1600
1600
|
'marginMode': false,
|
|
1601
1601
|
'limit': 1000,
|
|
1602
1602
|
'daysBack': undefined,
|
|
1603
|
-
'untilDays': 1,
|
|
1603
|
+
'untilDays': 1,
|
|
1604
|
+
'symbolRequired': true,
|
|
1604
1605
|
},
|
|
1605
1606
|
'fetchOrder': {
|
|
1606
1607
|
'marginMode': true,
|
|
1607
1608
|
'trigger': false,
|
|
1608
1609
|
'trailing': false,
|
|
1610
|
+
'symbolRequired': true,
|
|
1609
1611
|
},
|
|
1610
1612
|
'fetchOpenOrders': {
|
|
1611
1613
|
'marginMode': true,
|
|
@@ -1620,6 +1622,7 @@ export default class binance extends Exchange {
|
|
|
1620
1622
|
'untilDays': 10000,
|
|
1621
1623
|
'trigger': false,
|
|
1622
1624
|
'trailing': false,
|
|
1625
|
+
'symbolRequired': true,
|
|
1623
1626
|
},
|
|
1624
1627
|
'fetchClosedOrders': {
|
|
1625
1628
|
'marginMode': true,
|
|
@@ -1629,12 +1632,13 @@ export default class binance extends Exchange {
|
|
|
1629
1632
|
'untilDays': 10000,
|
|
1630
1633
|
'trigger': false,
|
|
1631
1634
|
'trailing': false,
|
|
1635
|
+
'symbolRequired': true,
|
|
1632
1636
|
},
|
|
1633
1637
|
'fetchOHLCV': {
|
|
1634
1638
|
'limit': 1000,
|
|
1635
1639
|
},
|
|
1636
1640
|
},
|
|
1637
|
-
'
|
|
1641
|
+
'forDerivatives': {
|
|
1638
1642
|
'sandbox': true,
|
|
1639
1643
|
'createOrder': {
|
|
1640
1644
|
'marginMode': false,
|
|
@@ -1671,17 +1675,20 @@ export default class binance extends Exchange {
|
|
|
1671
1675
|
'daysBack': undefined,
|
|
1672
1676
|
'limit': 1000,
|
|
1673
1677
|
'untilDays': 7,
|
|
1678
|
+
'symbolRequired': true,
|
|
1674
1679
|
},
|
|
1675
1680
|
'fetchOrder': {
|
|
1676
1681
|
'marginMode': false,
|
|
1677
1682
|
'trigger': false,
|
|
1678
1683
|
'trailing': false,
|
|
1684
|
+
'symbolRequired': true,
|
|
1679
1685
|
},
|
|
1680
1686
|
'fetchOpenOrders': {
|
|
1681
1687
|
'marginMode': true,
|
|
1682
1688
|
'limit': 500,
|
|
1683
1689
|
'trigger': false,
|
|
1684
1690
|
'trailing': false,
|
|
1691
|
+
'symbolRequired': false,
|
|
1685
1692
|
},
|
|
1686
1693
|
'fetchOrders': {
|
|
1687
1694
|
'marginMode': true,
|
|
@@ -1690,6 +1697,7 @@ export default class binance extends Exchange {
|
|
|
1690
1697
|
'untilDays': 7,
|
|
1691
1698
|
'trigger': false,
|
|
1692
1699
|
'trailing': false,
|
|
1700
|
+
'symbolRequired': true,
|
|
1693
1701
|
},
|
|
1694
1702
|
'fetchClosedOrders': {
|
|
1695
1703
|
'marginMode': true,
|
|
@@ -1699,6 +1707,7 @@ export default class binance extends Exchange {
|
|
|
1699
1707
|
'untilDays': 7,
|
|
1700
1708
|
'trigger': false,
|
|
1701
1709
|
'trailing': false,
|
|
1710
|
+
'symbolRequired': true,
|
|
1702
1711
|
},
|
|
1703
1712
|
'fetchOHLCV': {
|
|
1704
1713
|
'limit': 1500,
|
|
@@ -1706,18 +1715,18 @@ export default class binance extends Exchange {
|
|
|
1706
1715
|
},
|
|
1707
1716
|
'swap': {
|
|
1708
1717
|
'linear': {
|
|
1709
|
-
'extends': '
|
|
1718
|
+
'extends': 'forDerivatives',
|
|
1710
1719
|
},
|
|
1711
1720
|
'inverse': {
|
|
1712
|
-
'extends': '
|
|
1721
|
+
'extends': 'forDerivatives',
|
|
1713
1722
|
},
|
|
1714
1723
|
},
|
|
1715
1724
|
'future': {
|
|
1716
1725
|
'linear': {
|
|
1717
|
-
'extends': '
|
|
1726
|
+
'extends': 'forDerivatives',
|
|
1718
1727
|
},
|
|
1719
1728
|
'inverse': {
|
|
1720
|
-
'extends': '
|
|
1729
|
+
'extends': 'forDerivatives',
|
|
1721
1730
|
},
|
|
1722
1731
|
},
|
|
1723
1732
|
},
|
|
@@ -2935,7 +2944,7 @@ export default class binance extends Exchange {
|
|
|
2935
2944
|
* @method
|
|
2936
2945
|
* @name binance#fetchTime
|
|
2937
2946
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
2938
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
2947
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#check-server-time // spot
|
|
2939
2948
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time // swap
|
|
2940
2949
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Check-Server-time // future
|
|
2941
2950
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -3183,7 +3192,7 @@ export default class binance extends Exchange {
|
|
|
3183
3192
|
* @method
|
|
3184
3193
|
* @name binance#fetchMarkets
|
|
3185
3194
|
* @description retrieves data on all markets for binance
|
|
3186
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
3195
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#exchange-information // spot
|
|
3187
3196
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information // swap
|
|
3188
3197
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Exchange-Information // future
|
|
3189
3198
|
* @see https://developers.binance.com/docs/derivatives/option/market-data/Exchange-Information // option
|
|
@@ -3797,7 +3806,7 @@ export default class binance extends Exchange {
|
|
|
3797
3806
|
* @method
|
|
3798
3807
|
* @name binance#fetchBalance
|
|
3799
3808
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
3800
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
3809
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-information-user_data // spot
|
|
3801
3810
|
* @see https://developers.binance.com/docs/margin_trading/account/Query-Cross-Margin-Account-Details // cross margin
|
|
3802
3811
|
* @see https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Account-Info // isolated margin
|
|
3803
3812
|
* @see https://developers.binance.com/docs/wallet/asset/funding-wallet // funding
|
|
@@ -4071,7 +4080,7 @@ export default class binance extends Exchange {
|
|
|
4071
4080
|
* @method
|
|
4072
4081
|
* @name binance#fetchOrderBook
|
|
4073
4082
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
4074
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
4083
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#order-book // spot
|
|
4075
4084
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Order-Book // swap
|
|
4076
4085
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Order-Book // future
|
|
4077
4086
|
* @see https://developers.binance.com/docs/derivatives/option/market-data/Order-Book // option
|
|
@@ -4337,8 +4346,8 @@ export default class binance extends Exchange {
|
|
|
4337
4346
|
* @method
|
|
4338
4347
|
* @name binance#fetchTicker
|
|
4339
4348
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
4340
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
4341
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
4349
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#24hr-ticker-price-change-statistics // spot
|
|
4350
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#rolling-window-price-change-statistics // spot
|
|
4342
4351
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics // swap
|
|
4343
4352
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/24hr-Ticker-Price-Change-Statistics // future
|
|
4344
4353
|
* @see https://developers.binance.com/docs/derivatives/option/market-data/24hr-Ticker-Price-Change-Statistics // option
|
|
@@ -4383,7 +4392,7 @@ export default class binance extends Exchange {
|
|
|
4383
4392
|
* @method
|
|
4384
4393
|
* @name binance#fetchBidsAsks
|
|
4385
4394
|
* @description fetches the bid and ask price and volume for multiple markets
|
|
4386
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
4395
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#symbol-order-book-ticker // spot
|
|
4387
4396
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker // swap
|
|
4388
4397
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Symbol-Order-Book-Ticker // future
|
|
4389
4398
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
|
|
@@ -4422,7 +4431,7 @@ export default class binance extends Exchange {
|
|
|
4422
4431
|
* @method
|
|
4423
4432
|
* @name binance#fetchLastPrices
|
|
4424
4433
|
* @description fetches the last price for multiple markets
|
|
4425
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
4434
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#symbol-price-ticker // spot
|
|
4426
4435
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker // swap
|
|
4427
4436
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Symbol-Price-Ticker // future
|
|
4428
4437
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the last prices
|
|
@@ -4513,12 +4522,11 @@ export default class binance extends Exchange {
|
|
|
4513
4522
|
const type = (timestamp === undefined) ? 'spot' : 'swap';
|
|
4514
4523
|
const marketId = this.safeString(entry, 'symbol');
|
|
4515
4524
|
market = this.safeMarket(marketId, market, undefined, type);
|
|
4516
|
-
const price = this.safeNumber(entry, 'price');
|
|
4517
4525
|
return {
|
|
4518
4526
|
'symbol': market['symbol'],
|
|
4519
4527
|
'timestamp': timestamp,
|
|
4520
4528
|
'datetime': this.iso8601(timestamp),
|
|
4521
|
-
'price': price,
|
|
4529
|
+
'price': this.safeNumberOmitZero(entry, 'price'),
|
|
4522
4530
|
'side': undefined,
|
|
4523
4531
|
'info': entry,
|
|
4524
4532
|
};
|
|
@@ -4527,7 +4535,7 @@ export default class binance extends Exchange {
|
|
|
4527
4535
|
* @method
|
|
4528
4536
|
* @name binance#fetchTickers
|
|
4529
4537
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
4530
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
4538
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#24hr-ticker-price-change-statistics // spot
|
|
4531
4539
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics // swap
|
|
4532
4540
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/24hr-Ticker-Price-Change-Statistics // future
|
|
4533
4541
|
* @see https://developers.binance.com/docs/derivatives/option/market-data/24hr-Ticker-Price-Change-Statistics // option
|
|
@@ -4701,7 +4709,7 @@ export default class binance extends Exchange {
|
|
|
4701
4709
|
* @method
|
|
4702
4710
|
* @name binance#fetchOHLCV
|
|
4703
4711
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
4704
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
4712
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#klinecandlestick-data
|
|
4705
4713
|
* @see https://developers.binance.com/docs/derivatives/option/market-data/Kline-Candlestick-Data
|
|
4706
4714
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data
|
|
4707
4715
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data
|
|
@@ -4835,7 +4843,8 @@ export default class binance extends Exchange {
|
|
|
4835
4843
|
// }
|
|
4836
4844
|
// ]
|
|
4837
4845
|
//
|
|
4838
|
-
|
|
4846
|
+
const candles = this.parseOHLCVs(response, market, timeframe, since, limit);
|
|
4847
|
+
return candles;
|
|
4839
4848
|
}
|
|
4840
4849
|
parseTrade(trade, market = undefined) {
|
|
4841
4850
|
if ('isDustTrade' in trade) {
|
|
@@ -5111,15 +5120,15 @@ export default class binance extends Exchange {
|
|
|
5111
5120
|
* @name binance#fetchTrades
|
|
5112
5121
|
* @description get the list of most recent trades for a particular symbol
|
|
5113
5122
|
* Default fetchTradesMethod
|
|
5114
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
5123
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#compressedaggregate-trades-list // publicGetAggTrades (spot)
|
|
5115
5124
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List // fapiPublicGetAggTrades (swap)
|
|
5116
5125
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Compressed-Aggregate-Trades-List // dapiPublicGetAggTrades (future)
|
|
5117
5126
|
* @see https://developers.binance.com/docs/derivatives/option/market-data/Recent-Trades-List // eapiPublicGetTrades (option)
|
|
5118
5127
|
* Other fetchTradesMethod
|
|
5119
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
5128
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#recent-trades-list // publicGetTrades (spot)
|
|
5120
5129
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List // fapiPublicGetTrades (swap)
|
|
5121
5130
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Recent-Trades-List // dapiPublicGetTrades (future)
|
|
5122
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
5131
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#old-trade-lookup // publicGetHistoricalTrades (spot)
|
|
5123
5132
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup // fapiPublicGetHistoricalTrades (swap)
|
|
5124
5133
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Old-Trades-Lookup // dapiPublicGetHistoricalTrades (future)
|
|
5125
5134
|
* @see https://developers.binance.com/docs/derivatives/option/market-data/Old-Trades-Lookup // eapiPublicGetHistoricalTrades (option)
|
|
@@ -5257,7 +5266,7 @@ export default class binance extends Exchange {
|
|
|
5257
5266
|
* @name binance#editSpotOrder
|
|
5258
5267
|
* @ignore
|
|
5259
5268
|
* @description edit a trade order
|
|
5260
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
5269
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-an-existing-order-and-send-a-new-order-trade
|
|
5261
5270
|
* @param {string} id cancel order id
|
|
5262
5271
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
5263
5272
|
* @param {string} type 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
|
|
@@ -5500,7 +5509,7 @@ export default class binance extends Exchange {
|
|
|
5500
5509
|
let isPortfolioMargin = undefined;
|
|
5501
5510
|
[isPortfolioMargin, params] = this.handleOptionAndParams2(params, 'editContractOrder', 'papi', 'portfolioMargin', false);
|
|
5502
5511
|
if (market['linear'] || isPortfolioMargin) {
|
|
5503
|
-
if (price === undefined) {
|
|
5512
|
+
if ((price === undefined) && !('priceMatch' in params)) {
|
|
5504
5513
|
throw new ArgumentsRequired(this.id + ' editOrder() requires a price argument for portfolio margin and linear orders');
|
|
5505
5514
|
}
|
|
5506
5515
|
}
|
|
@@ -5555,7 +5564,7 @@ export default class binance extends Exchange {
|
|
|
5555
5564
|
* @method
|
|
5556
5565
|
* @name binance#editOrder
|
|
5557
5566
|
* @description edit a trade order
|
|
5558
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
5567
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-an-existing-order-and-send-a-new-order-trade
|
|
5559
5568
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Order
|
|
5560
5569
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Modify-Order
|
|
5561
5570
|
* @param {string} id cancel order id
|
|
@@ -5565,7 +5574,6 @@ export default class binance extends Exchange {
|
|
|
5565
5574
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
5566
5575
|
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
5567
5576
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5568
|
-
* @param {boolean} [params.portfolioMargin] set to true if you would like to edit an order in a portfolio margin account
|
|
5569
5577
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5570
5578
|
*/
|
|
5571
5579
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
@@ -6247,13 +6255,13 @@ export default class binance extends Exchange {
|
|
|
6247
6255
|
* @method
|
|
6248
6256
|
* @name binance#createOrder
|
|
6249
6257
|
* @description create a trade order
|
|
6250
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api/
|
|
6258
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-trade
|
|
6251
6259
|
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#test-new-order-trade
|
|
6252
6260
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/New-Order
|
|
6253
6261
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/New-Order
|
|
6254
6262
|
* @see https://developers.binance.com/docs/derivatives/option/trade/New-Order
|
|
6255
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
6256
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
6263
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#sor
|
|
6264
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#test-new-order-using-sor-trade
|
|
6257
6265
|
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-UM-Order
|
|
6258
6266
|
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-CM-Order
|
|
6259
6267
|
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-Margin-Order
|
|
@@ -6275,10 +6283,11 @@ export default class binance extends Exchange {
|
|
|
6275
6283
|
* @param {float} [params.stopLossPrice] the price that a stop loss order is triggered at
|
|
6276
6284
|
* @param {float} [params.takeProfitPrice] the price that a take profit order is triggered at
|
|
6277
6285
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to create an order in a portfolio margin account
|
|
6286
|
+
* @param {string} [params.selfTradePrevention] set unified value for stp (see .features for available values)
|
|
6287
|
+
* @param {float} [params.icebergAmount] set iceberg amount for limit orders
|
|
6278
6288
|
* @param {string} [params.stopLossOrTakeProfit] 'stopLoss' or 'takeProfit', required for spot trailing orders
|
|
6279
6289
|
* @param {string} [params.positionSide] *swap and portfolio margin only* "BOTH" for one-way mode, "LONG" for buy side of hedged mode, "SHORT" for sell side of hedged mode
|
|
6280
6290
|
* @param {bool} [params.hedged] *swap and portfolio margin only* true for hedged mode, false for one way mode, default is false
|
|
6281
|
-
* @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
|
|
6282
6291
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
6283
6292
|
*/
|
|
6284
6293
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
@@ -6661,7 +6670,7 @@ export default class binance extends Exchange {
|
|
|
6661
6670
|
}
|
|
6662
6671
|
}
|
|
6663
6672
|
if (timeInForceIsRequired && (this.safeString(params, 'timeInForce') === undefined) && (this.safeString(request, 'timeInForce') === undefined)) {
|
|
6664
|
-
request['timeInForce'] = this.options
|
|
6673
|
+
request['timeInForce'] = this.safeString(this.options, 'defaultTimeInForce'); // 'GTC' = Good To Cancel (default), 'IOC' = Immediate Or Cancel
|
|
6665
6674
|
}
|
|
6666
6675
|
if (!isPortfolioMargin && market['contract'] && postOnly) {
|
|
6667
6676
|
request['timeInForce'] = 'GTX';
|
|
@@ -6678,14 +6687,28 @@ export default class binance extends Exchange {
|
|
|
6678
6687
|
}
|
|
6679
6688
|
request['positionSide'] = (side === 'buy') ? 'LONG' : 'SHORT';
|
|
6680
6689
|
}
|
|
6681
|
-
|
|
6690
|
+
// unified stp
|
|
6691
|
+
const selfTradePrevention = this.safeString(params, 'selfTradePrevention');
|
|
6692
|
+
if (selfTradePrevention !== undefined) {
|
|
6693
|
+
if (market['spot']) {
|
|
6694
|
+
request['selfTradePreventionMode'] = selfTradePrevention.toUpperCase(); // binance enums exactly match the unified ccxt enums (but needs uppercase)
|
|
6695
|
+
}
|
|
6696
|
+
}
|
|
6697
|
+
// unified iceberg
|
|
6698
|
+
const icebergAmount = this.safeNumber(params, 'icebergAmount');
|
|
6699
|
+
if (icebergAmount !== undefined) {
|
|
6700
|
+
if (market['spot']) {
|
|
6701
|
+
request['icebergQty'] = this.amountToPrecision(symbol, icebergAmount);
|
|
6702
|
+
}
|
|
6703
|
+
}
|
|
6704
|
+
const requestParams = this.omit(params, ['type', 'newClientOrderId', 'clientOrderId', 'postOnly', 'stopLossPrice', 'takeProfitPrice', 'stopPrice', 'triggerPrice', 'trailingTriggerPrice', 'trailingPercent', 'quoteOrderQty', 'cost', 'test', 'hedged', 'selfTradePrevention', 'icebergAmount']);
|
|
6682
6705
|
return this.extend(request, requestParams);
|
|
6683
6706
|
}
|
|
6684
6707
|
/**
|
|
6685
6708
|
* @method
|
|
6686
6709
|
* @name binance#createMarketOrderWithCost
|
|
6687
6710
|
* @description create a market order by providing the symbol, side and cost
|
|
6688
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
6711
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
|
|
6689
6712
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
6690
6713
|
* @param {string} side 'buy' or 'sell'
|
|
6691
6714
|
* @param {float} cost how much you want to trade in units of the quote currency
|
|
@@ -6698,16 +6721,14 @@ export default class binance extends Exchange {
|
|
|
6698
6721
|
if (!market['spot']) {
|
|
6699
6722
|
throw new NotSupported(this.id + ' createMarketOrderWithCost() supports spot orders only');
|
|
6700
6723
|
}
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
};
|
|
6704
|
-
return await this.createOrder(symbol, 'market', side, 0, undefined, this.extend(req, params));
|
|
6724
|
+
params['cost'] = cost;
|
|
6725
|
+
return await this.createOrder(symbol, 'market', side, cost, undefined, params);
|
|
6705
6726
|
}
|
|
6706
6727
|
/**
|
|
6707
6728
|
* @method
|
|
6708
6729
|
* @name binance#createMarketBuyOrderWithCost
|
|
6709
6730
|
* @description create a market buy order by providing the symbol and cost
|
|
6710
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
6731
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
|
|
6711
6732
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
6712
6733
|
* @param {float} cost how much you want to trade in units of the quote currency
|
|
6713
6734
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -6719,16 +6740,14 @@ export default class binance extends Exchange {
|
|
|
6719
6740
|
if (!market['spot']) {
|
|
6720
6741
|
throw new NotSupported(this.id + ' createMarketBuyOrderWithCost() supports spot orders only');
|
|
6721
6742
|
}
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
};
|
|
6725
|
-
return await this.createOrder(symbol, 'market', 'buy', 0, undefined, this.extend(req, params));
|
|
6743
|
+
params['cost'] = cost;
|
|
6744
|
+
return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
|
|
6726
6745
|
}
|
|
6727
6746
|
/**
|
|
6728
6747
|
* @method
|
|
6729
6748
|
* @name binance#createMarketSellOrderWithCost
|
|
6730
6749
|
* @description create a market sell order by providing the symbol and cost
|
|
6731
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
6750
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
|
|
6732
6751
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
6733
6752
|
* @param {float} cost how much you want to trade in units of the quote currency
|
|
6734
6753
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -6747,7 +6766,7 @@ export default class binance extends Exchange {
|
|
|
6747
6766
|
* @method
|
|
6748
6767
|
* @name binance#fetchOrder
|
|
6749
6768
|
* @description fetches information on an order made by the user
|
|
6750
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
6769
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#query-order-user_data
|
|
6751
6770
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Query-Order
|
|
6752
6771
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Query-Order
|
|
6753
6772
|
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Single-Order
|
|
@@ -6829,7 +6848,7 @@ export default class binance extends Exchange {
|
|
|
6829
6848
|
* @method
|
|
6830
6849
|
* @name binance#fetchOrders
|
|
6831
6850
|
* @description fetches information on multiple orders made by the user
|
|
6832
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
6851
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
|
|
6833
6852
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
|
|
6834
6853
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
|
|
6835
6854
|
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
|
|
@@ -7108,7 +7127,7 @@ export default class binance extends Exchange {
|
|
|
7108
7127
|
* @method
|
|
7109
7128
|
* @name binance#fetchOpenOrders
|
|
7110
7129
|
* @description fetch all unfilled currently open orders
|
|
7111
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
7130
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#current-open-orders-user_data
|
|
7112
7131
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders
|
|
7113
7132
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Current-All-Open-Orders
|
|
7114
7133
|
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Current-Open-Option-Orders
|
|
@@ -7431,7 +7450,7 @@ export default class binance extends Exchange {
|
|
|
7431
7450
|
* @method
|
|
7432
7451
|
* @name binance#fetchClosedOrders
|
|
7433
7452
|
* @description fetches information on multiple closed orders made by the user
|
|
7434
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
7453
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
|
|
7435
7454
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
|
|
7436
7455
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
|
|
7437
7456
|
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
|
|
@@ -7461,7 +7480,7 @@ export default class binance extends Exchange {
|
|
|
7461
7480
|
* @method
|
|
7462
7481
|
* @name binance#fetchCanceledOrders
|
|
7463
7482
|
* @description fetches information on multiple canceled orders made by the user
|
|
7464
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
7483
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
|
|
7465
7484
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
|
|
7466
7485
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
|
|
7467
7486
|
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
|
|
@@ -7491,7 +7510,7 @@ export default class binance extends Exchange {
|
|
|
7491
7510
|
* @method
|
|
7492
7511
|
* @name binance#fetchCanceledAndClosedOrders
|
|
7493
7512
|
* @description fetches information on multiple canceled orders made by the user
|
|
7494
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
7513
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
|
|
7495
7514
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
|
|
7496
7515
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
|
|
7497
7516
|
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
|
|
@@ -7524,7 +7543,7 @@ export default class binance extends Exchange {
|
|
|
7524
7543
|
* @method
|
|
7525
7544
|
* @name binance#cancelOrder
|
|
7526
7545
|
* @description cancels an open order
|
|
7527
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
7546
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-order-trade
|
|
7528
7547
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order
|
|
7529
7548
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Cancel-Order
|
|
7530
7549
|
* @see https://developers.binance.com/docs/derivatives/option/trade/Cancel-Option-Order
|
|
@@ -7630,7 +7649,7 @@ export default class binance extends Exchange {
|
|
|
7630
7649
|
* @method
|
|
7631
7650
|
* @name binance#cancelAllOrders
|
|
7632
7651
|
* @description cancel all open orders in a market
|
|
7633
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
7652
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-all-open-orders-on-a-symbol-trade
|
|
7634
7653
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders
|
|
7635
7654
|
* @see https://developers.binance.com/docs/derivatives/option/trade/Cancel-all-Option-orders-on-specific-symbol
|
|
7636
7655
|
* @see https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-All-Open-Orders
|
|
@@ -7878,7 +7897,7 @@ export default class binance extends Exchange {
|
|
|
7878
7897
|
* @method
|
|
7879
7898
|
* @name binance#fetchOrderTrades
|
|
7880
7899
|
* @description fetch all the trades made from a single order
|
|
7881
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
7900
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-trade-list-user_data
|
|
7882
7901
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List
|
|
7883
7902
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Account-Trade-List
|
|
7884
7903
|
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Trade-List
|
|
@@ -7909,7 +7928,7 @@ export default class binance extends Exchange {
|
|
|
7909
7928
|
* @method
|
|
7910
7929
|
* @name binance#fetchMyTrades
|
|
7911
7930
|
* @description fetch all trades made by the user
|
|
7912
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api
|
|
7931
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-trade-list-user_data
|
|
7913
7932
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List
|
|
7914
7933
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Account-Trade-List
|
|
7915
7934
|
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Trade-List
|
|
@@ -11978,7 +11997,7 @@ export default class binance extends Exchange {
|
|
|
11978
11997
|
throw new AuthenticationError(this.id + ' userDataStream endpoint requires `apiKey` credential');
|
|
11979
11998
|
}
|
|
11980
11999
|
}
|
|
11981
|
-
else if ((api === 'private') || (api === 'eapiPrivate') || (api === 'sapi' && path !== 'system/status') || (api === 'sapiV2') || (api === 'sapiV3') || (api === 'sapiV4') || (api === 'dapiPrivate') || (api === 'dapiPrivateV2') || (api === 'fapiPrivate') || (api === 'fapiPrivateV2') || (api === 'fapiPrivateV3') || (api === 'papi' && path !== 'ping')
|
|
12000
|
+
else if ((api === 'private') || (api === 'eapiPrivate') || (api === 'sapi' && path !== 'system/status') || (api === 'sapiV2') || (api === 'sapiV3') || (api === 'sapiV4') || (api === 'dapiPrivate') || (api === 'dapiPrivateV2') || (api === 'fapiPrivate') || (api === 'fapiPrivateV2') || (api === 'fapiPrivateV3') || (api === 'papi' && path !== 'ping')) {
|
|
11982
12001
|
this.checkRequiredCredentials();
|
|
11983
12002
|
if (method === 'POST' && ((path === 'order') || (path === 'sor/order'))) {
|
|
11984
12003
|
// inject in implicit API calls
|
|
@@ -12913,7 +12932,7 @@ export default class binance extends Exchange {
|
|
|
12913
12932
|
*/
|
|
12914
12933
|
async fetchOpenInterestHistory(symbol, timeframe = '5m', since = undefined, limit = undefined, params = {}) {
|
|
12915
12934
|
if (timeframe === '1m') {
|
|
12916
|
-
throw new BadRequest(this.id + 'fetchOpenInterestHistory cannot use the 1m timeframe');
|
|
12935
|
+
throw new BadRequest(this.id + ' fetchOpenInterestHistory cannot use the 1m timeframe');
|
|
12917
12936
|
}
|
|
12918
12937
|
await this.loadMarkets();
|
|
12919
12938
|
let paginate = false;
|
|
@@ -13261,7 +13280,7 @@ export default class binance extends Exchange {
|
|
|
13261
13280
|
// "price": "10871.09",
|
|
13262
13281
|
// "avgPrice": "10913.21000",
|
|
13263
13282
|
// "origQty": "0.001",
|
|
13264
|
-
// "executedQty": "0.
|
|
13283
|
+
// "executedQty": "0.002",
|
|
13265
13284
|
// "cumQuote": "10.91321",
|
|
13266
13285
|
// "timeInForce": "IOC",
|
|
13267
13286
|
// "type": "LIMIT",
|
|
@@ -13734,7 +13753,7 @@ export default class binance extends Exchange {
|
|
|
13734
13753
|
response = await this.dapiPrivateGetPositionMarginHistory(this.extend(request, params));
|
|
13735
13754
|
}
|
|
13736
13755
|
else {
|
|
13737
|
-
throw new BadRequest(this.id + 'fetchMarginAdjustmentHistory () is not supported for markets of type ' + market['type']);
|
|
13756
|
+
throw new BadRequest(this.id + ' fetchMarginAdjustmentHistory () is not supported for markets of type ' + market['type']);
|
|
13738
13757
|
}
|
|
13739
13758
|
//
|
|
13740
13759
|
// [
|
package/js/src/bingx.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export default class bingx extends Exchange {
|
|
|
24
24
|
* @returns {object} an associative dictionary of currencies
|
|
25
25
|
*/
|
|
26
26
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
27
|
-
fetchSpotMarkets(params: any): Promise<
|
|
27
|
+
fetchSpotMarkets(params: any): Promise<Market[]>;
|
|
28
28
|
fetchSwapMarkets(params: any): Promise<import("./base/types.js").MarketInterface[]>;
|
|
29
29
|
fetchInverseSwapMarkets(params: any): Promise<import("./base/types.js").MarketInterface[]>;
|
|
30
30
|
parseMarket(market: Dict): Market;
|