ccxt 4.4.33__py2.py3-none-any.whl → 4.4.35__py2.py3-none-any.whl
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.
- ccxt/__init__.py +3 -1
- ccxt/abstract/bingx.py +17 -0
- ccxt/abstract/bitbank.py +5 -0
- ccxt/abstract/bitfinex2.py +1 -0
- ccxt/abstract/bitpanda.py +0 -12
- ccxt/abstract/bitrue.py +3 -3
- ccxt/abstract/ellipx.py +25 -0
- ccxt/abstract/okx.py +1 -0
- ccxt/abstract/onetrading.py +0 -12
- ccxt/abstract/xt.py +5 -5
- ccxt/alpaca.py +2 -0
- ccxt/async_support/__init__.py +3 -1
- ccxt/async_support/alpaca.py +2 -0
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +19 -15
- ccxt/async_support/bingx.py +479 -146
- ccxt/async_support/bitbank.py +5 -0
- ccxt/async_support/bitbns.py +2 -0
- ccxt/async_support/bitfinex2.py +1 -0
- ccxt/async_support/bitget.py +174 -40
- ccxt/async_support/bitmex.py +3 -1
- ccxt/async_support/bitopro.py +3 -0
- ccxt/async_support/bitrue.py +3 -2
- ccxt/async_support/btcmarkets.py +5 -3
- ccxt/async_support/btcturk.py +19 -19
- ccxt/async_support/bybit.py +13 -10
- ccxt/async_support/cex.py +13 -4
- ccxt/async_support/coinbase.py +3 -2
- ccxt/async_support/coinex.py +1 -0
- ccxt/async_support/coinone.py +7 -7
- ccxt/async_support/coinsph.py +7 -7
- ccxt/async_support/coinspot.py +39 -39
- ccxt/async_support/cryptocom.py +36 -34
- ccxt/async_support/ellipx.py +1828 -0
- ccxt/async_support/gate.py +143 -39
- ccxt/async_support/hyperliquid.py +70 -11
- ccxt/async_support/idex.py +3 -4
- ccxt/async_support/kraken.py +58 -49
- ccxt/async_support/krakenfutures.py +3 -1
- ccxt/async_support/kucoin.py +1 -1
- ccxt/async_support/okcoin.py +2 -0
- ccxt/async_support/okx.py +15 -10
- ccxt/async_support/onetrading.py +67 -370
- ccxt/async_support/paradex.py +2 -0
- ccxt/async_support/phemex.py +16 -0
- ccxt/async_support/poloniex.py +3 -1
- ccxt/async_support/poloniexfutures.py +3 -1
- ccxt/async_support/vertex.py +2 -0
- ccxt/async_support/woo.py +69 -69
- ccxt/async_support/xt.py +10 -10
- ccxt/base/exchange.py +28 -7
- ccxt/binance.py +19 -15
- ccxt/bingx.py +479 -146
- ccxt/bitbank.py +5 -0
- ccxt/bitbns.py +2 -0
- ccxt/bitfinex2.py +1 -0
- ccxt/bitget.py +174 -40
- ccxt/bitmex.py +3 -1
- ccxt/bitopro.py +3 -0
- ccxt/bitrue.py +3 -2
- ccxt/btcmarkets.py +5 -3
- ccxt/btcturk.py +19 -19
- ccxt/bybit.py +13 -10
- ccxt/cex.py +13 -4
- ccxt/coinbase.py +3 -2
- ccxt/coinex.py +1 -0
- ccxt/coinone.py +7 -7
- ccxt/coinsph.py +7 -7
- ccxt/coinspot.py +39 -39
- ccxt/cryptocom.py +36 -34
- ccxt/ellipx.py +1828 -0
- ccxt/gate.py +143 -39
- ccxt/hyperliquid.py +70 -11
- ccxt/idex.py +3 -4
- ccxt/kraken.py +58 -49
- ccxt/krakenfutures.py +3 -1
- ccxt/kucoin.py +1 -1
- ccxt/okcoin.py +2 -0
- ccxt/okx.py +15 -10
- ccxt/onetrading.py +67 -370
- ccxt/paradex.py +2 -0
- ccxt/phemex.py +16 -0
- ccxt/poloniex.py +3 -1
- ccxt/poloniexfutures.py +3 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/bitrue.py +13 -11
- ccxt/pro/idex.py +15 -0
- ccxt/pro/probit.py +58 -68
- ccxt/pro/woo.py +15 -15
- ccxt/test/tests_async.py +29 -2
- ccxt/test/tests_helpers.py +0 -2
- ccxt/test/tests_sync.py +29 -2
- ccxt/vertex.py +2 -0
- ccxt/woo.py +69 -69
- ccxt/xt.py +10 -10
- {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/METADATA +9 -8
- {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/RECORD +100 -97
- {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/WHEEL +0 -0
- {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/top_level.txt +0 -0
ccxt/async_support/poloniex.py
CHANGED
@@ -51,6 +51,8 @@ class poloniex(Exchange, ImplicitAPI):
|
|
51
51
|
'createMarketOrderWithCost': False,
|
52
52
|
'createMarketSellOrderWithCost': False,
|
53
53
|
'createOrder': True,
|
54
|
+
'createStopOrder': True,
|
55
|
+
'createTriggerOrder': True,
|
54
56
|
'editOrder': True,
|
55
57
|
'fetchBalance': True,
|
56
58
|
'fetchClosedOrder': False,
|
@@ -1256,7 +1258,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1256
1258
|
:param float amount: how much of currency you want to trade in units of base currency
|
1257
1259
|
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1258
1260
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1259
|
-
:param float [params.triggerPrice]:
|
1261
|
+
:param float [params.triggerPrice]: the price at which a trigger order is triggered at
|
1260
1262
|
:param float [params.cost]: *spot market buy only* the quote quantity that can be used alternative for the amount
|
1261
1263
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1262
1264
|
"""
|
@@ -42,6 +42,8 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
42
42
|
'future': False,
|
43
43
|
'option': None,
|
44
44
|
'createOrder': True,
|
45
|
+
'createStopOrder': True,
|
46
|
+
'createTriggerOrder': True,
|
45
47
|
'fetchBalance': True,
|
46
48
|
'fetchClosedOrders': True,
|
47
49
|
'fetchCurrencies': False,
|
@@ -827,7 +829,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
827
829
|
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
828
830
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
829
831
|
:param float [params.leverage]: Leverage size of the order
|
830
|
-
:param float [params.
|
832
|
+
:param float [params.triggerPrice]: The price at which a trigger order is triggered at
|
831
833
|
:param bool [params.reduceOnly]: A mark to reduce the position size only. Set to False by default. Need to set the position size when reduceOnly is True.
|
832
834
|
:param str [params.timeInForce]: GTC, GTT, IOC, or FOK, default is GTC, limit orders only
|
833
835
|
:param str [params.postOnly]: Post only flag, invalid when timeInForce is IOC or FOK
|
ccxt/async_support/vertex.py
CHANGED
ccxt/async_support/woo.py
CHANGED
@@ -33,7 +33,7 @@ class woo(Exchange, ImplicitAPI):
|
|
33
33
|
'version': 'v1',
|
34
34
|
'certified': True,
|
35
35
|
'pro': True,
|
36
|
-
'hostname': '
|
36
|
+
'hostname': 'woox.io',
|
37
37
|
'has': {
|
38
38
|
'CORS': None,
|
39
39
|
'spot': True,
|
@@ -142,24 +142,24 @@ class woo(Exchange, ImplicitAPI):
|
|
142
142
|
'urls': {
|
143
143
|
'logo': 'https://user-images.githubusercontent.com/1294454/150730761-1a00e5e0-d28c-480f-9e65-089ce3e6ef3b.jpg',
|
144
144
|
'api': {
|
145
|
-
'pub': 'https://api-pub.
|
145
|
+
'pub': 'https://api-pub.woox.io',
|
146
146
|
'public': 'https://api.{hostname}',
|
147
147
|
'private': 'https://api.{hostname}',
|
148
148
|
},
|
149
149
|
'test': {
|
150
|
-
'pub': 'https://api-pub.staging.
|
151
|
-
'public': 'https://api.staging.
|
152
|
-
'private': 'https://api.staging.
|
150
|
+
'pub': 'https://api-pub.staging.woox.io',
|
151
|
+
'public': 'https://api.staging.woox.io',
|
152
|
+
'private': 'https://api.staging.woox.io',
|
153
153
|
},
|
154
|
-
'www': 'https://
|
154
|
+
'www': 'https://woox.io/',
|
155
155
|
'doc': [
|
156
|
-
'https://docs.
|
156
|
+
'https://docs.woox.io/',
|
157
157
|
],
|
158
158
|
'fees': [
|
159
|
-
'https://support.
|
159
|
+
'https://support.woox.io/hc/en-001/articles/4404611795353--Trading-Fees',
|
160
160
|
],
|
161
161
|
'referral': {
|
162
|
-
'url': 'https://
|
162
|
+
'url': 'https://woox.io/register?ref=DIJT0CNL',
|
163
163
|
'discount': 0.35,
|
164
164
|
},
|
165
165
|
},
|
@@ -357,7 +357,7 @@ class woo(Exchange, ImplicitAPI):
|
|
357
357
|
"""
|
358
358
|
the latest known information on the availability of the exchange API
|
359
359
|
|
360
|
-
https://docs.
|
360
|
+
https://docs.woox.io/#get-system-maintenance-status-public
|
361
361
|
|
362
362
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
363
363
|
:returns dict: a `status structure <https://docs.ccxt.com/#/?id=exchange-status-structure>`
|
@@ -393,7 +393,7 @@ class woo(Exchange, ImplicitAPI):
|
|
393
393
|
"""
|
394
394
|
fetches the current integer timestamp in milliseconds from the exchange server
|
395
395
|
|
396
|
-
https://docs.
|
396
|
+
https://docs.woox.io/#get-system-maintenance-status-public
|
397
397
|
|
398
398
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
399
399
|
:returns int: the current integer timestamp in milliseconds from the exchange server
|
@@ -415,7 +415,7 @@ class woo(Exchange, ImplicitAPI):
|
|
415
415
|
"""
|
416
416
|
retrieves data on all markets for woo
|
417
417
|
|
418
|
-
https://docs.
|
418
|
+
https://docs.woox.io/#exchange-information
|
419
419
|
|
420
420
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
421
421
|
:returns dict[]: an array of objects representing market data
|
@@ -530,7 +530,7 @@ class woo(Exchange, ImplicitAPI):
|
|
530
530
|
"""
|
531
531
|
get the list of most recent trades for a particular symbol
|
532
532
|
|
533
|
-
https://docs.
|
533
|
+
https://docs.woox.io/#market-trades-public
|
534
534
|
|
535
535
|
:param str symbol: unified symbol of the market to fetch trades for
|
536
536
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
@@ -657,7 +657,7 @@ class woo(Exchange, ImplicitAPI):
|
|
657
657
|
"""
|
658
658
|
fetch the trading fees for multiple markets
|
659
659
|
|
660
|
-
https://docs.
|
660
|
+
https://docs.woox.io/#get-account-information-new
|
661
661
|
|
662
662
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
663
663
|
:returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>` indexed by market symbols
|
@@ -712,7 +712,7 @@ class woo(Exchange, ImplicitAPI):
|
|
712
712
|
"""
|
713
713
|
fetches all available currencies on an exchange
|
714
714
|
|
715
|
-
https://docs.
|
715
|
+
https://docs.woox.io/#available-token-public
|
716
716
|
|
717
717
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
718
718
|
:returns dict: an associative dictionary of currencies
|
@@ -846,7 +846,7 @@ class woo(Exchange, ImplicitAPI):
|
|
846
846
|
"""
|
847
847
|
create a market buy order by providing the symbol and cost
|
848
848
|
|
849
|
-
https://docs.
|
849
|
+
https://docs.woox.io/#send-order
|
850
850
|
|
851
851
|
:param str symbol: unified symbol of the market to create an order in
|
852
852
|
:param float cost: how much you want to trade in units of the quote currency
|
@@ -863,7 +863,7 @@ class woo(Exchange, ImplicitAPI):
|
|
863
863
|
"""
|
864
864
|
create a market sell order by providing the symbol and cost
|
865
865
|
|
866
|
-
https://docs.
|
866
|
+
https://docs.woox.io/#send-order
|
867
867
|
|
868
868
|
:param str symbol: unified symbol of the market to create an order in
|
869
869
|
:param float cost: how much you want to trade in units of the quote currency
|
@@ -880,7 +880,7 @@ class woo(Exchange, ImplicitAPI):
|
|
880
880
|
"""
|
881
881
|
create a trailing order by providing the symbol, type, side, amount, price and trailingAmount
|
882
882
|
|
883
|
-
https://docs.
|
883
|
+
https://docs.woox.io/#send-algo-order
|
884
884
|
|
885
885
|
:param str symbol: unified symbol of the market to create an order in
|
886
886
|
:param str type: 'market' or 'limit'
|
@@ -904,7 +904,7 @@ class woo(Exchange, ImplicitAPI):
|
|
904
904
|
"""
|
905
905
|
create a trailing order by providing the symbol, type, side, amount, price and trailingPercent
|
906
906
|
|
907
|
-
https://docs.
|
907
|
+
https://docs.woox.io/#send-algo-order
|
908
908
|
|
909
909
|
:param str symbol: unified symbol of the market to create an order in
|
910
910
|
:param str type: 'market' or 'limit'
|
@@ -928,8 +928,8 @@ class woo(Exchange, ImplicitAPI):
|
|
928
928
|
"""
|
929
929
|
create a trade order
|
930
930
|
|
931
|
-
https://docs.
|
932
|
-
https://docs.
|
931
|
+
https://docs.woox.io/#send-order
|
932
|
+
https://docs.woox.io/#send-algo-order
|
933
933
|
|
934
934
|
:param str symbol: unified symbol of the market to create an order in
|
935
935
|
:param str type: 'market' or 'limit'
|
@@ -1112,10 +1112,10 @@ class woo(Exchange, ImplicitAPI):
|
|
1112
1112
|
"""
|
1113
1113
|
edit a trade order
|
1114
1114
|
|
1115
|
-
https://docs.
|
1116
|
-
https://docs.
|
1117
|
-
https://docs.
|
1118
|
-
https://docs.
|
1115
|
+
https://docs.woox.io/#edit-order
|
1116
|
+
https://docs.woox.io/#edit-order-by-client_order_id
|
1117
|
+
https://docs.woox.io/#edit-algo-order
|
1118
|
+
https://docs.woox.io/#edit-algo-order-by-client_order_id
|
1119
1119
|
|
1120
1120
|
:param str id: order id
|
1121
1121
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -1195,9 +1195,9 @@ class woo(Exchange, ImplicitAPI):
|
|
1195
1195
|
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1196
1196
|
"""
|
1197
1197
|
|
1198
|
-
https://docs.
|
1199
|
-
https://docs.
|
1200
|
-
https://docs.
|
1198
|
+
https://docs.woox.io/#cancel-algo-order
|
1199
|
+
https://docs.woox.io/#cancel-order
|
1200
|
+
https://docs.woox.io/#cancel-order-by-client_order_id
|
1201
1201
|
|
1202
1202
|
cancels an open order
|
1203
1203
|
:param str id: order id
|
@@ -1244,9 +1244,9 @@ class woo(Exchange, ImplicitAPI):
|
|
1244
1244
|
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
1245
1245
|
"""
|
1246
1246
|
|
1247
|
-
https://docs.
|
1248
|
-
https://docs.
|
1249
|
-
https://docs.
|
1247
|
+
https://docs.woox.io/#cancel-all-pending-orders
|
1248
|
+
https://docs.woox.io/#cancel-orders
|
1249
|
+
https://docs.woox.io/#cancel-all-pending-algo-orders
|
1250
1250
|
|
1251
1251
|
cancel all open orders in a market
|
1252
1252
|
:param str symbol: unified market symbol
|
@@ -1280,7 +1280,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1280
1280
|
"""
|
1281
1281
|
dead man's switch, cancel all orders after the given timeout
|
1282
1282
|
|
1283
|
-
https://docs.
|
1283
|
+
https://docs.woox.io/#cancel-all-after
|
1284
1284
|
|
1285
1285
|
:param number timeout: time in milliseconds, 0 represents cancel the timer
|
1286
1286
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1307,8 +1307,8 @@ class woo(Exchange, ImplicitAPI):
|
|
1307
1307
|
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1308
1308
|
"""
|
1309
1309
|
|
1310
|
-
https://docs.
|
1311
|
-
https://docs.
|
1310
|
+
https://docs.woox.io/#get-algo-order
|
1311
|
+
https://docs.woox.io/#get-order
|
1312
1312
|
|
1313
1313
|
fetches information on an order made by the user
|
1314
1314
|
:param str id: the order id
|
@@ -1375,8 +1375,8 @@ class woo(Exchange, ImplicitAPI):
|
|
1375
1375
|
"""
|
1376
1376
|
fetches information on multiple orders made by the user
|
1377
1377
|
|
1378
|
-
https://docs.
|
1379
|
-
https://docs.
|
1378
|
+
https://docs.woox.io/#get-orders
|
1379
|
+
https://docs.woox.io/#get-algo-orders
|
1380
1380
|
|
1381
1381
|
:param str symbol: unified market symbol of the market orders were made in
|
1382
1382
|
:param int [since]: the earliest time in ms to fetch orders for
|
@@ -1459,8 +1459,8 @@ class woo(Exchange, ImplicitAPI):
|
|
1459
1459
|
"""
|
1460
1460
|
fetches information on multiple orders made by the user
|
1461
1461
|
|
1462
|
-
https://docs.
|
1463
|
-
https://docs.
|
1462
|
+
https://docs.woox.io/#get-orders
|
1463
|
+
https://docs.woox.io/#get-algo-orders
|
1464
1464
|
|
1465
1465
|
:param str symbol: unified market symbol of the market orders were made in
|
1466
1466
|
:param int [since]: the earliest time in ms to fetch orders for
|
@@ -1481,8 +1481,8 @@ class woo(Exchange, ImplicitAPI):
|
|
1481
1481
|
"""
|
1482
1482
|
fetches information on multiple orders made by the user
|
1483
1483
|
|
1484
|
-
https://docs.
|
1485
|
-
https://docs.
|
1484
|
+
https://docs.woox.io/#get-orders
|
1485
|
+
https://docs.woox.io/#get-algo-orders
|
1486
1486
|
|
1487
1487
|
:param str symbol: unified market symbol of the market orders were made in
|
1488
1488
|
:param int [since]: the earliest time in ms to fetch orders for
|
@@ -1636,7 +1636,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1636
1636
|
"""
|
1637
1637
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
1638
1638
|
|
1639
|
-
https://docs.
|
1639
|
+
https://docs.woox.io/#orderbook-snapshot-public
|
1640
1640
|
|
1641
1641
|
:param str symbol: unified symbol of the market to fetch the order book for
|
1642
1642
|
:param int [limit]: the maximum amount of order book entries to return
|
@@ -1674,8 +1674,8 @@ class woo(Exchange, ImplicitAPI):
|
|
1674
1674
|
async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
|
1675
1675
|
"""
|
1676
1676
|
|
1677
|
-
https://docs.
|
1678
|
-
https://docs.
|
1677
|
+
https://docs.woox.io/#kline-public
|
1678
|
+
https://docs.woox.io/#kline-historical-data-public
|
1679
1679
|
|
1680
1680
|
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
1681
1681
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
@@ -1766,7 +1766,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1766
1766
|
"""
|
1767
1767
|
fetch all the trades made from a single order
|
1768
1768
|
|
1769
|
-
https://docs.
|
1769
|
+
https://docs.woox.io/#get-trades
|
1770
1770
|
|
1771
1771
|
:param str id: order id
|
1772
1772
|
:param str symbol: unified market symbol
|
@@ -1808,7 +1808,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1808
1808
|
"""
|
1809
1809
|
fetch all trades made by the user
|
1810
1810
|
|
1811
|
-
https://docs.
|
1811
|
+
https://docs.woox.io/#get-trades
|
1812
1812
|
|
1813
1813
|
:param str symbol: unified market symbol
|
1814
1814
|
:param int [since]: the earliest time in ms to fetch trades for
|
@@ -1864,7 +1864,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1864
1864
|
"""
|
1865
1865
|
fetch all the accounts associated with a profile
|
1866
1866
|
|
1867
|
-
https://docs.
|
1867
|
+
https://docs.woox.io/#get-assets-of-subaccounts
|
1868
1868
|
|
1869
1869
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1870
1870
|
:returns dict: a dictionary of `account structures <https://docs.ccxt.com/#/?id=account-structure>` indexed by the account type
|
@@ -1910,7 +1910,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1910
1910
|
"""
|
1911
1911
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
1912
1912
|
|
1913
|
-
https://docs.
|
1913
|
+
https://docs.woox.io/#get-current-holding-get-balance-new
|
1914
1914
|
|
1915
1915
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1916
1916
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
@@ -1961,7 +1961,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1961
1961
|
"""
|
1962
1962
|
fetch the deposit address for a currency associated with self account
|
1963
1963
|
|
1964
|
-
https://docs.
|
1964
|
+
https://docs.woox.io/#get-token-deposit-address
|
1965
1965
|
|
1966
1966
|
:param str code: unified currency code
|
1967
1967
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -2050,7 +2050,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2050
2050
|
"""
|
2051
2051
|
fetch the history of changes, actions done by the user or operations that altered balance of the user
|
2052
2052
|
|
2053
|
-
https://docs.
|
2053
|
+
https://docs.woox.io/#get-asset-history
|
2054
2054
|
|
2055
2055
|
:param str [code]: unified currency code, default is None
|
2056
2056
|
:param int [since]: timestamp in ms of the earliest ledger entry, default is None
|
@@ -2113,7 +2113,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2113
2113
|
"""
|
2114
2114
|
fetch all deposits made to an account
|
2115
2115
|
|
2116
|
-
https://docs.
|
2116
|
+
https://docs.woox.io/#get-asset-history
|
2117
2117
|
|
2118
2118
|
:param str code: unified currency code
|
2119
2119
|
:param int [since]: the earliest time in ms to fetch deposits for
|
@@ -2130,7 +2130,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2130
2130
|
"""
|
2131
2131
|
fetch all withdrawals made from an account
|
2132
2132
|
|
2133
|
-
https://docs.
|
2133
|
+
https://docs.woox.io/#get-asset-history
|
2134
2134
|
|
2135
2135
|
:param str code: unified currency code
|
2136
2136
|
:param int [since]: the earliest time in ms to fetch withdrawals for
|
@@ -2147,7 +2147,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2147
2147
|
"""
|
2148
2148
|
fetch history of deposits and withdrawals
|
2149
2149
|
|
2150
|
-
https://docs.
|
2150
|
+
https://docs.woox.io/#get-asset-history
|
2151
2151
|
|
2152
2152
|
:param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
|
2153
2153
|
:param int [since]: timestamp in ms of the earliest deposit/withdrawal, default is None
|
@@ -2221,7 +2221,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2221
2221
|
"""
|
2222
2222
|
transfer currency internally between wallets on the same account
|
2223
2223
|
|
2224
|
-
https://docs.
|
2224
|
+
https://docs.woox.io/#get-transfer-history
|
2225
2225
|
|
2226
2226
|
:param str code: unified currency code
|
2227
2227
|
:param float amount: amount to transfer
|
@@ -2258,7 +2258,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2258
2258
|
"""
|
2259
2259
|
fetch a history of internal transfers made on an account
|
2260
2260
|
|
2261
|
-
https://docs.
|
2261
|
+
https://docs.woox.io/#get-transfer-history
|
2262
2262
|
|
2263
2263
|
:param str code: unified currency code of the currency transferred
|
2264
2264
|
:param int [since]: the earliest time in ms to fetch transfers for
|
@@ -2360,7 +2360,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2360
2360
|
"""
|
2361
2361
|
make a withdrawal
|
2362
2362
|
|
2363
|
-
https://docs.
|
2363
|
+
https://docs.woox.io/#token-withdraw
|
2364
2364
|
|
2365
2365
|
:param str code: unified currency code
|
2366
2366
|
:param float amount: the amount to withdraw
|
@@ -2401,7 +2401,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2401
2401
|
"""
|
2402
2402
|
repay borrowed margin and interest
|
2403
2403
|
|
2404
|
-
https://docs.
|
2404
|
+
https://docs.woox.io/#repay-interest
|
2405
2405
|
|
2406
2406
|
:param str code: unified currency code of the currency to repay
|
2407
2407
|
:param float amount: the amount to repay
|
@@ -2562,7 +2562,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2562
2562
|
"""
|
2563
2563
|
fetch the history of funding payments paid and received on self account
|
2564
2564
|
|
2565
|
-
https://docs.
|
2565
|
+
https://docs.woox.io/#get-funding-fee-history
|
2566
2566
|
|
2567
2567
|
:param str [symbol]: unified market symbol
|
2568
2568
|
:param int [since]: the earliest time in ms to fetch funding history for
|
@@ -2744,7 +2744,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2744
2744
|
"""
|
2745
2745
|
fetches historical funding rate prices
|
2746
2746
|
|
2747
|
-
https://docs.
|
2747
|
+
https://docs.woox.io/#get-funding-rate-history-for-one-market-public
|
2748
2748
|
|
2749
2749
|
:param str symbol: unified symbol of the market to fetch the funding rate history for
|
2750
2750
|
:param int [since]: timestamp in ms of the earliest funding rate to fetch
|
@@ -2807,7 +2807,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2807
2807
|
"""
|
2808
2808
|
set hedged to True or False for a market
|
2809
2809
|
|
2810
|
-
https://docs.
|
2810
|
+
https://docs.woox.io/#update-position-mode
|
2811
2811
|
|
2812
2812
|
:param bool hedged: set to True to use HEDGE_MODE, False for ONE_WAY
|
2813
2813
|
:param str symbol: not used by woo setPositionMode
|
@@ -2836,7 +2836,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2836
2836
|
"""
|
2837
2837
|
fetch the set leverage for a market
|
2838
2838
|
|
2839
|
-
https://docs.
|
2839
|
+
https://docs.woox.io/#get-account-information-new
|
2840
2840
|
|
2841
2841
|
:param str symbol: unified market symbol
|
2842
2842
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -2961,8 +2961,8 @@ class woo(Exchange, ImplicitAPI):
|
|
2961
2961
|
"""
|
2962
2962
|
set the level of leverage for a market
|
2963
2963
|
|
2964
|
-
https://docs.
|
2965
|
-
https://docs.
|
2964
|
+
https://docs.woox.io/#update-leverage-setting
|
2965
|
+
https://docs.woox.io/#update-futures-leverage-setting
|
2966
2966
|
|
2967
2967
|
:param float leverage: the rate of leverage(1, 2, 3, 4 or 5 for spot markets, 1, 2, 3, 4, 5, 10, 15, 20 for swap markets)
|
2968
2968
|
:param str [symbol]: unified market symbol(is mandatory for swap markets)
|
@@ -2993,7 +2993,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2993
2993
|
"""
|
2994
2994
|
add margin
|
2995
2995
|
|
2996
|
-
https://docs.
|
2996
|
+
https://docs.woox.io/#update-isolated-margin-setting
|
2997
2997
|
|
2998
2998
|
:param str symbol: unified market symbol
|
2999
2999
|
:param float amount: amount of margin to add
|
@@ -3007,7 +3007,7 @@ class woo(Exchange, ImplicitAPI):
|
|
3007
3007
|
"""
|
3008
3008
|
remove margin from a position
|
3009
3009
|
|
3010
|
-
https://docs.
|
3010
|
+
https://docs.woox.io/#update-isolated-margin-setting
|
3011
3011
|
|
3012
3012
|
:param str symbol: unified market symbol
|
3013
3013
|
:param float amount: amount of margin to remove
|
@@ -3221,7 +3221,7 @@ class woo(Exchange, ImplicitAPI):
|
|
3221
3221
|
"""
|
3222
3222
|
fetch a quote for converting from one currency to another
|
3223
3223
|
|
3224
|
-
https://docs.
|
3224
|
+
https://docs.woox.io/#get-quote-rfq
|
3225
3225
|
|
3226
3226
|
:param str fromCode: the currency that you want to sell and convert from
|
3227
3227
|
:param str toCode: the currency that you want to buy and convert into
|
@@ -3263,7 +3263,7 @@ class woo(Exchange, ImplicitAPI):
|
|
3263
3263
|
"""
|
3264
3264
|
convert from one currency to another
|
3265
3265
|
|
3266
|
-
https://docs.
|
3266
|
+
https://docs.woox.io/#send-quote-rft
|
3267
3267
|
|
3268
3268
|
:param str id: the id of the trade that you want to make
|
3269
3269
|
:param str fromCode: the currency that you want to sell and convert from
|
@@ -3294,7 +3294,7 @@ class woo(Exchange, ImplicitAPI):
|
|
3294
3294
|
"""
|
3295
3295
|
fetch the data for a conversion trade
|
3296
3296
|
|
3297
|
-
https://docs.
|
3297
|
+
https://docs.woox.io/#get-quote-trade
|
3298
3298
|
|
3299
3299
|
:param str id: the id of the trade that you want to fetch
|
3300
3300
|
:param str [code]: the unified currency code of the conversion trade
|
@@ -3335,7 +3335,7 @@ class woo(Exchange, ImplicitAPI):
|
|
3335
3335
|
"""
|
3336
3336
|
fetch the users history of conversion trades
|
3337
3337
|
|
3338
|
-
https://docs.
|
3338
|
+
https://docs.woox.io/#get-quote-trades
|
3339
3339
|
|
3340
3340
|
:param str [code]: the unified currency code
|
3341
3341
|
:param int [since]: the earliest time in ms to fetch conversions for
|
@@ -3434,7 +3434,7 @@ class woo(Exchange, ImplicitAPI):
|
|
3434
3434
|
"""
|
3435
3435
|
fetches all available currencies that can be converted
|
3436
3436
|
|
3437
|
-
https://docs.
|
3437
|
+
https://docs.woox.io/#get-quote-asset-info
|
3438
3438
|
|
3439
3439
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3440
3440
|
:returns dict: an associative dictionary of currencies
|
ccxt/async_support/xt.py
CHANGED
@@ -157,16 +157,16 @@ class xt(Exchange, ImplicitAPI):
|
|
157
157
|
'spot': {
|
158
158
|
'get': {
|
159
159
|
'currencies': 1,
|
160
|
-
'depth':
|
161
|
-
'kline':
|
162
|
-
'symbol': 1, #
|
163
|
-
'ticker': 1, #
|
164
|
-
'ticker/book': 1, #
|
165
|
-
'ticker/price': 1, #
|
166
|
-
'ticker/24h': 1, #
|
160
|
+
'depth': 10,
|
161
|
+
'kline': 1,
|
162
|
+
'symbol': 1, # 1 for a single symbol
|
163
|
+
'ticker': 1, # 1 for a single symbol
|
164
|
+
'ticker/book': 1, # 1 for a single symbol
|
165
|
+
'ticker/price': 1, # 1 for a single symbol
|
166
|
+
'ticker/24h': 1, # 1 for a single symbol
|
167
167
|
'time': 1,
|
168
|
-
'trade/history':
|
169
|
-
'trade/recent':
|
168
|
+
'trade/history': 1,
|
169
|
+
'trade/recent': 1,
|
170
170
|
'wallet/support/currency': 1,
|
171
171
|
},
|
172
172
|
},
|
@@ -236,7 +236,7 @@ class xt(Exchange, ImplicitAPI):
|
|
236
236
|
},
|
237
237
|
'post': {
|
238
238
|
'order': 0.2,
|
239
|
-
'withdraw':
|
239
|
+
'withdraw': 10,
|
240
240
|
'balance/transfer': 1,
|
241
241
|
'balance/account/transfer': 1,
|
242
242
|
'ws-token': 1,
|
ccxt/base/exchange.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.35'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -382,6 +382,7 @@ class Exchange(object):
|
|
382
382
|
self.transactions = dict() if self.transactions is None else self.transactions
|
383
383
|
self.ohlcvs = dict() if self.ohlcvs is None else self.ohlcvs
|
384
384
|
self.liquidations = dict() if self.liquidations is None else self.liquidations
|
385
|
+
self.myLiquidations = dict() if self.myLiquidations is None else self.myLiquidations
|
385
386
|
self.currencies = dict() if self.currencies is None else self.currencies
|
386
387
|
self.options = self.get_default_options() if self.options is None else self.options # Python does not allow to define properties in run-time with setattr
|
387
388
|
self.decimal_to_precision = decimal_to_precision
|
@@ -2398,7 +2399,7 @@ class Exchange(object):
|
|
2398
2399
|
entryFiledEqualValue = entry[field] == value
|
2399
2400
|
firstCondition = entryFiledEqualValue if valueIsDefined else True
|
2400
2401
|
entryKeyValue = self.safe_value(entry, key)
|
2401
|
-
entryKeyGESince = (entryKeyValue) and since and (entryKeyValue >= since)
|
2402
|
+
entryKeyGESince = (entryKeyValue) and (since is not None) and (entryKeyValue >= since)
|
2402
2403
|
secondCondition = entryKeyGESince if sinceIsDefined else True
|
2403
2404
|
if firstCondition and secondCondition:
|
2404
2405
|
result.append(entry)
|
@@ -2407,6 +2408,10 @@ class Exchange(object):
|
|
2407
2408
|
return self.filter_by_limit(result, limit, key, sinceIsDefined)
|
2408
2409
|
|
2409
2410
|
def set_sandbox_mode(self, enabled: bool):
|
2411
|
+
"""
|
2412
|
+
set the sandbox mode for the exchange
|
2413
|
+
:param boolean enabled: True to enable sandbox mode, False to disable it
|
2414
|
+
"""
|
2410
2415
|
if enabled:
|
2411
2416
|
if 'test' in self.urls:
|
2412
2417
|
if isinstance(self.urls['api'], str):
|
@@ -2769,7 +2774,7 @@ class Exchange(object):
|
|
2769
2774
|
self.features = {}
|
2770
2775
|
unifiedMarketTypes = ['spot', 'swap', 'future', 'option']
|
2771
2776
|
subTypes = ['linear', 'inverse']
|
2772
|
-
# atm only support basic methods
|
2777
|
+
# atm only support basic methods, eg: 'createOrder', 'fetchOrder', 'fetchOrders', 'fetchMyTrades'
|
2773
2778
|
for i in range(0, len(unifiedMarketTypes)):
|
2774
2779
|
marketType = unifiedMarketTypes[i]
|
2775
2780
|
# if marketType is not filled for self exchange, don't add that in `features`
|
@@ -2789,8 +2794,8 @@ class Exchange(object):
|
|
2789
2794
|
extendsStr: Str = self.safe_string(featuresObj, 'extends')
|
2790
2795
|
if extendsStr is not None:
|
2791
2796
|
featuresObj = self.omit(featuresObj, 'extends')
|
2792
|
-
extendObj = initialFeatures
|
2793
|
-
featuresObj = self.
|
2797
|
+
extendObj = self.features_mapper(initialFeatures, extendsStr)
|
2798
|
+
featuresObj = self.deep_extend(extendObj, featuresObj)
|
2794
2799
|
#
|
2795
2800
|
# corrections
|
2796
2801
|
#
|
@@ -2799,9 +2804,9 @@ class Exchange(object):
|
|
2799
2804
|
if value is not None:
|
2800
2805
|
featuresObj['createOrder']['stopLoss'] = value
|
2801
2806
|
featuresObj['createOrder']['takeProfit'] = value
|
2802
|
-
#
|
2807
|
+
# False 'hedged' for spot
|
2803
2808
|
if marketType == 'spot':
|
2804
|
-
featuresObj['createOrder']['hedged'] =
|
2809
|
+
featuresObj['createOrder']['hedged'] = False
|
2805
2810
|
return featuresObj
|
2806
2811
|
|
2807
2812
|
def orderbook_checksum_message(self, symbol: Str):
|
@@ -3744,6 +3749,14 @@ class Exchange(object):
|
|
3744
3749
|
result.append(self.market_id(symbols[i]))
|
3745
3750
|
return result
|
3746
3751
|
|
3752
|
+
def currency_ids(self, codes: Strings = None):
|
3753
|
+
if codes is None:
|
3754
|
+
return codes
|
3755
|
+
result = []
|
3756
|
+
for i in range(0, len(codes)):
|
3757
|
+
result.append(self.currency_id(codes[i]))
|
3758
|
+
return result
|
3759
|
+
|
3747
3760
|
def markets_for_symbols(self, symbols: Strings = None):
|
3748
3761
|
if symbols is None:
|
3749
3762
|
return symbols
|
@@ -4097,6 +4110,14 @@ class Exchange(object):
|
|
4097
4110
|
def set_headers(self, headers):
|
4098
4111
|
return headers
|
4099
4112
|
|
4113
|
+
def currency_id(self, code: str):
|
4114
|
+
currency = self.safe_dict(self.currencies, code)
|
4115
|
+
if currency is None:
|
4116
|
+
currency = self.safe_currency(code)
|
4117
|
+
if currency is not None:
|
4118
|
+
return currency['id']
|
4119
|
+
return code
|
4120
|
+
|
4100
4121
|
def market_id(self, symbol: str):
|
4101
4122
|
market = self.market(symbol)
|
4102
4123
|
if market is not None:
|