ccxt 4.4.82__py2.py3-none-any.whl → 4.4.86__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 -9
- ccxt/abstract/blofin.py +8 -0
- ccxt/abstract/btcbox.py +1 -0
- ccxt/abstract/myokx.py +2 -0
- ccxt/abstract/okx.py +2 -0
- ccxt/apex.py +2 -1
- ccxt/ascendex.py +187 -151
- ccxt/async_support/__init__.py +3 -9
- ccxt/async_support/apex.py +2 -1
- ccxt/async_support/ascendex.py +187 -151
- ccxt/async_support/base/exchange.py +51 -24
- ccxt/async_support/base/ws/cache.py +6 -1
- ccxt/async_support/bequant.py +1 -1
- ccxt/async_support/bitget.py +5 -6
- ccxt/async_support/bitmart.py +1 -1
- ccxt/async_support/bitrue.py +14 -32
- ccxt/async_support/bitso.py +33 -0
- ccxt/async_support/bitstamp.py +33 -0
- ccxt/async_support/{huobijp.py → bittrade.py} +11 -11
- ccxt/async_support/blofin.py +145 -14
- ccxt/async_support/btcbox.py +25 -5
- ccxt/async_support/bybit.py +16 -37
- ccxt/async_support/cex.py +2 -4
- ccxt/async_support/coinbase.py +58 -47
- ccxt/async_support/coinbaseexchange.py +141 -32
- ccxt/async_support/coincatch.py +14 -67
- ccxt/async_support/coinex.py +28 -29
- ccxt/async_support/coinlist.py +17 -16
- ccxt/async_support/coinmetro.py +20 -11
- ccxt/async_support/coinone.py +8 -10
- ccxt/async_support/coinsph.py +124 -2
- ccxt/async_support/cryptocom.py +109 -2
- ccxt/async_support/cryptomus.py +42 -80
- ccxt/async_support/delta.py +75 -36
- ccxt/async_support/deribit.py +4 -5
- ccxt/async_support/derive.py +46 -10
- ccxt/async_support/ellipx.py +175 -77
- ccxt/async_support/gate.py +1 -1
- ccxt/async_support/gemini.py +3 -4
- ccxt/async_support/hitbtc.py +56 -65
- ccxt/async_support/hollaex.py +106 -49
- ccxt/async_support/htx.py +20 -43
- ccxt/async_support/hyperliquid.py +6 -6
- ccxt/async_support/kraken.py +27 -23
- ccxt/async_support/kucoinfutures.py +5 -0
- ccxt/async_support/lbank.py +1 -1
- ccxt/async_support/mexc.py +2 -2
- ccxt/async_support/ndax.py +25 -24
- ccxt/async_support/okcoin.py +12 -29
- ccxt/async_support/okx.py +9 -0
- ccxt/async_support/onetrading.py +10 -7
- ccxt/async_support/oxfun.py +40 -110
- ccxt/async_support/paradex.py +123 -4
- ccxt/base/exchange.py +21 -2
- ccxt/base/types.py +3 -0
- ccxt/bequant.py +1 -1
- ccxt/bitget.py +5 -6
- ccxt/bitmart.py +1 -1
- ccxt/bitrue.py +14 -32
- ccxt/bitso.py +33 -0
- ccxt/bitstamp.py +33 -0
- ccxt/{huobijp.py → bittrade.py} +11 -11
- ccxt/blofin.py +145 -14
- ccxt/btcbox.py +24 -5
- ccxt/bybit.py +16 -37
- ccxt/cex.py +2 -4
- ccxt/coinbase.py +58 -47
- ccxt/coinbaseexchange.py +141 -32
- ccxt/coincatch.py +14 -67
- ccxt/coinex.py +28 -29
- ccxt/coinlist.py +17 -16
- ccxt/coinmetro.py +20 -11
- ccxt/coinone.py +8 -10
- ccxt/coinsph.py +124 -2
- ccxt/cryptocom.py +109 -2
- ccxt/cryptomus.py +42 -80
- ccxt/delta.py +75 -36
- ccxt/deribit.py +4 -5
- ccxt/derive.py +46 -10
- ccxt/ellipx.py +175 -77
- ccxt/gate.py +1 -1
- ccxt/gemini.py +3 -4
- ccxt/hitbtc.py +56 -65
- ccxt/hollaex.py +106 -49
- ccxt/htx.py +20 -43
- ccxt/hyperliquid.py +6 -6
- ccxt/kraken.py +27 -23
- ccxt/kucoinfutures.py +5 -0
- ccxt/lbank.py +1 -1
- ccxt/mexc.py +2 -2
- ccxt/ndax.py +25 -24
- ccxt/okcoin.py +12 -29
- ccxt/okx.py +9 -0
- ccxt/onetrading.py +10 -7
- ccxt/oxfun.py +40 -110
- ccxt/paradex.py +123 -4
- ccxt/pro/__init__.py +109 -5
- ccxt/pro/binance.py +32 -33
- ccxt/pro/bithumb.py +5 -3
- ccxt/pro/{huobijp.py → bittrade.py} +3 -3
- ccxt/pro/kraken.py +249 -79
- ccxt/pro/luno.py +6 -5
- ccxt/pro/mexc.py +254 -7
- ccxt/pro/poloniex.py +6 -2
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/METADATA +8 -11
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/RECORD +110 -121
- ccxt/abstract/bl3p.py +0 -19
- ccxt/abstract/idex.py +0 -26
- ccxt/abstract/kuna.py +0 -182
- ccxt/async_support/base/ws/fast_client.py +0 -97
- ccxt/async_support/bl3p.py +0 -543
- ccxt/async_support/idex.py +0 -1889
- ccxt/async_support/kuna.py +0 -1935
- ccxt/bl3p.py +0 -543
- ccxt/idex.py +0 -1889
- ccxt/kuna.py +0 -1935
- ccxt/pro/idex.py +0 -687
- /ccxt/abstract/{huobijp.py → bittrade.py} +0 -0
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/WHEEL +0 -0
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/top_level.txt +0 -0
ccxt/pro/__init__.py
CHANGED
@@ -4,13 +4,119 @@
|
|
4
4
|
|
5
5
|
# ----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.86'
|
8
8
|
|
9
9
|
# ----------------------------------------------------------------------------
|
10
10
|
|
11
11
|
from ccxt.async_support.base.exchange import Exchange # noqa: F401
|
12
12
|
|
13
13
|
# CCXT Pro exchanges (now this is mainly used for importing exchanges in WS tests)
|
14
|
+
|
15
|
+
# DO_NOT_REMOVE__ERROR_IMPORTS_START
|
16
|
+
from ccxt.base.errors import BaseError # noqa: F401
|
17
|
+
from ccxt.base.errors import ExchangeError # noqa: F401
|
18
|
+
from ccxt.base.errors import AuthenticationError # noqa: F401
|
19
|
+
from ccxt.base.errors import PermissionDenied # noqa: F401
|
20
|
+
from ccxt.base.errors import AccountNotEnabled # noqa: F401
|
21
|
+
from ccxt.base.errors import AccountSuspended # noqa: F401
|
22
|
+
from ccxt.base.errors import ArgumentsRequired # noqa: F401
|
23
|
+
from ccxt.base.errors import BadRequest # noqa: F401
|
24
|
+
from ccxt.base.errors import BadSymbol # noqa: F401
|
25
|
+
from ccxt.base.errors import OperationRejected # noqa: F401
|
26
|
+
from ccxt.base.errors import NoChange # noqa: F401
|
27
|
+
from ccxt.base.errors import MarginModeAlreadySet # noqa: F401
|
28
|
+
from ccxt.base.errors import MarketClosed # noqa: F401
|
29
|
+
from ccxt.base.errors import ManualInteractionNeeded # noqa: F401
|
30
|
+
from ccxt.base.errors import InsufficientFunds # noqa: F401
|
31
|
+
from ccxt.base.errors import InvalidAddress # noqa: F401
|
32
|
+
from ccxt.base.errors import AddressPending # noqa: F401
|
33
|
+
from ccxt.base.errors import InvalidOrder # noqa: F401
|
34
|
+
from ccxt.base.errors import OrderNotFound # noqa: F401
|
35
|
+
from ccxt.base.errors import OrderNotCached # noqa: F401
|
36
|
+
from ccxt.base.errors import OrderImmediatelyFillable # noqa: F401
|
37
|
+
from ccxt.base.errors import OrderNotFillable # noqa: F401
|
38
|
+
from ccxt.base.errors import DuplicateOrderId # noqa: F401
|
39
|
+
from ccxt.base.errors import ContractUnavailable # noqa: F401
|
40
|
+
from ccxt.base.errors import NotSupported # noqa: F401
|
41
|
+
from ccxt.base.errors import InvalidProxySettings # noqa: F401
|
42
|
+
from ccxt.base.errors import ExchangeClosedByUser # noqa: F401
|
43
|
+
from ccxt.base.errors import OperationFailed # noqa: F401
|
44
|
+
from ccxt.base.errors import NetworkError # noqa: F401
|
45
|
+
from ccxt.base.errors import DDoSProtection # noqa: F401
|
46
|
+
from ccxt.base.errors import RateLimitExceeded # noqa: F401
|
47
|
+
from ccxt.base.errors import ExchangeNotAvailable # noqa: F401
|
48
|
+
from ccxt.base.errors import OnMaintenance # noqa: F401
|
49
|
+
from ccxt.base.errors import InvalidNonce # noqa: F401
|
50
|
+
from ccxt.base.errors import ChecksumError # noqa: F401
|
51
|
+
from ccxt.base.errors import RequestTimeout # noqa: F401
|
52
|
+
from ccxt.base.errors import BadResponse # noqa: F401
|
53
|
+
from ccxt.base.errors import NullResponse # noqa: F401
|
54
|
+
from ccxt.base.errors import CancelPending # noqa: F401
|
55
|
+
from ccxt.base.errors import UnsubscribeError # noqa: F401
|
56
|
+
from ccxt.base.errors import error_hierarchy # noqa: F401
|
57
|
+
# DO_NOT_REMOVE__ERROR_IMPORTS_END
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
14
120
|
|
15
121
|
from ccxt.pro.alpaca import alpaca # noqa: F401
|
16
122
|
from ccxt.pro.apex import apex # noqa: F401
|
@@ -29,6 +135,7 @@ from ccxt.pro.bitmex import bitmex # noqa
|
|
29
135
|
from ccxt.pro.bitopro import bitopro # noqa: F401
|
30
136
|
from ccxt.pro.bitrue import bitrue # noqa: F401
|
31
137
|
from ccxt.pro.bitstamp import bitstamp # noqa: F401
|
138
|
+
from ccxt.pro.bittrade import bittrade # noqa: F401
|
32
139
|
from ccxt.pro.bitvavo import bitvavo # noqa: F401
|
33
140
|
from ccxt.pro.blockchaincom import blockchaincom # noqa: F401
|
34
141
|
from ccxt.pro.blofin import blofin # noqa: F401
|
@@ -55,9 +162,7 @@ from ccxt.pro.hitbtc import hitbtc # noqa
|
|
55
162
|
from ccxt.pro.hollaex import hollaex # noqa: F401
|
56
163
|
from ccxt.pro.htx import htx # noqa: F401
|
57
164
|
from ccxt.pro.huobi import huobi # noqa: F401
|
58
|
-
from ccxt.pro.huobijp import huobijp # noqa: F401
|
59
165
|
from ccxt.pro.hyperliquid import hyperliquid # noqa: F401
|
60
|
-
from ccxt.pro.idex import idex # noqa: F401
|
61
166
|
from ccxt.pro.independentreserve import independentreserve # noqa: F401
|
62
167
|
from ccxt.pro.kraken import kraken # noqa: F401
|
63
168
|
from ccxt.pro.krakenfutures import krakenfutures # noqa: F401
|
@@ -103,6 +208,7 @@ exchanges = [
|
|
103
208
|
'bitopro',
|
104
209
|
'bitrue',
|
105
210
|
'bitstamp',
|
211
|
+
'bittrade',
|
106
212
|
'bitvavo',
|
107
213
|
'blockchaincom',
|
108
214
|
'blofin',
|
@@ -129,9 +235,7 @@ exchanges = [
|
|
129
235
|
'hollaex',
|
130
236
|
'htx',
|
131
237
|
'huobi',
|
132
|
-
'huobijp',
|
133
238
|
'hyperliquid',
|
134
|
-
'idex',
|
135
239
|
'independentreserve',
|
136
240
|
'kraken',
|
137
241
|
'krakenfutures',
|
ccxt/pro/binance.py
CHANGED
@@ -718,7 +718,7 @@ class binance(ccxt.async_support.binance):
|
|
718
718
|
"""
|
719
719
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
720
720
|
|
721
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
721
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#order-book
|
722
722
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book
|
723
723
|
|
724
724
|
:param str symbol: unified symbol of the market to fetch the order book for
|
@@ -805,6 +805,7 @@ class binance(ccxt.async_support.binance):
|
|
805
805
|
orderbook.reset(snapshot)
|
806
806
|
# unroll the accumulated deltas
|
807
807
|
messages = orderbook.cache
|
808
|
+
orderbook.cache = []
|
808
809
|
for i in range(0, len(messages)):
|
809
810
|
messageItem = messages[i]
|
810
811
|
U = self.safe_integer(messageItem, 'U')
|
@@ -868,10 +869,8 @@ class binance(ccxt.async_support.binance):
|
|
868
869
|
# ]
|
869
870
|
# }
|
870
871
|
#
|
871
|
-
|
872
|
-
|
873
|
-
isSpot = isTestnetSpot or isSpotMainNet
|
874
|
-
marketType = 'spot' if isSpot else 'contract'
|
872
|
+
isSpot = (client.url.find('/stream') > -1)
|
873
|
+
marketType = 'spot' if (isSpot) else 'contract'
|
875
874
|
marketId = self.safe_string(message, 's')
|
876
875
|
market = self.safe_market(marketId, None, None, marketType)
|
877
876
|
symbol = market['symbol']
|
@@ -984,8 +983,8 @@ class binance(ccxt.async_support.binance):
|
|
984
983
|
"""
|
985
984
|
get the list of most recent trades for a list of symbols
|
986
985
|
|
987
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
988
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
986
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#aggregate-trades
|
987
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#recent-trades
|
989
988
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams
|
990
989
|
https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Aggregate-Trade-Streams
|
991
990
|
|
@@ -1042,8 +1041,8 @@ class binance(ccxt.async_support.binance):
|
|
1042
1041
|
"""
|
1043
1042
|
unsubscribes from the trades channel
|
1044
1043
|
|
1045
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
1046
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
1044
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#aggregate-trades
|
1045
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#recent-trades
|
1047
1046
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams
|
1048
1047
|
https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Aggregate-Trade-Streams
|
1049
1048
|
|
@@ -1100,8 +1099,8 @@ class binance(ccxt.async_support.binance):
|
|
1100
1099
|
"""
|
1101
1100
|
unsubscribes from the trades channel
|
1102
1101
|
|
1103
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
1104
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
1102
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#aggregate-trades
|
1103
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#recent-trades
|
1105
1104
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams
|
1106
1105
|
https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Aggregate-Trade-Streams
|
1107
1106
|
|
@@ -1117,8 +1116,8 @@ class binance(ccxt.async_support.binance):
|
|
1117
1116
|
"""
|
1118
1117
|
get the list of most recent trades for a particular symbol
|
1119
1118
|
|
1120
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
1121
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
1119
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#aggregate-trades
|
1120
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#recent-trades
|
1122
1121
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams
|
1123
1122
|
https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Aggregate-Trade-Streams
|
1124
1123
|
|
@@ -1290,7 +1289,7 @@ class binance(ccxt.async_support.binance):
|
|
1290
1289
|
def handle_trade(self, client: Client, message):
|
1291
1290
|
# the trade streams push raw trade information in real-time
|
1292
1291
|
# each trade has a unique buyer and seller
|
1293
|
-
isSpot = (
|
1292
|
+
isSpot = (client.url.find('/stream') > -1)
|
1294
1293
|
marketType = 'spot' if (isSpot) else 'contract'
|
1295
1294
|
marketId = self.safe_string(message, 's')
|
1296
1295
|
market = self.safe_market(marketId, None, None, marketType)
|
@@ -1309,7 +1308,7 @@ class binance(ccxt.async_support.binance):
|
|
1309
1308
|
"""
|
1310
1309
|
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
1311
1310
|
|
1312
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
1311
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#klines
|
1313
1312
|
https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Kline-Candlestick-Streams
|
1314
1313
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams
|
1315
1314
|
|
@@ -1332,7 +1331,7 @@ class binance(ccxt.async_support.binance):
|
|
1332
1331
|
"""
|
1333
1332
|
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
1334
1333
|
|
1335
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
1334
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#klines
|
1336
1335
|
https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Kline-Candlestick-Streams
|
1337
1336
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams
|
1338
1337
|
|
@@ -1394,7 +1393,7 @@ class binance(ccxt.async_support.binance):
|
|
1394
1393
|
"""
|
1395
1394
|
unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
1396
1395
|
|
1397
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
1396
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#klines
|
1398
1397
|
https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Kline-Candlestick-Streams
|
1399
1398
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams
|
1400
1399
|
|
@@ -1458,7 +1457,7 @@ class binance(ccxt.async_support.binance):
|
|
1458
1457
|
"""
|
1459
1458
|
unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
1460
1459
|
|
1461
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
1460
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#klines
|
1462
1461
|
https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Kline-Candlestick-Streams
|
1463
1462
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams
|
1464
1463
|
|
@@ -1523,7 +1522,7 @@ class binance(ccxt.async_support.binance):
|
|
1523
1522
|
self.safe_float(kline, 'c'),
|
1524
1523
|
self.safe_float(kline, 'v'),
|
1525
1524
|
]
|
1526
|
-
isSpot = (
|
1525
|
+
isSpot = (client.url.find('/stream') > -1)
|
1527
1526
|
marketType = 'spot' if (isSpot) else 'contract'
|
1528
1527
|
symbol = self.safe_symbol(marketId, None, None, marketType)
|
1529
1528
|
messageHash = 'ohlcv::' + symbol + '::' + unifiedTimeframe
|
@@ -1578,7 +1577,7 @@ class binance(ccxt.async_support.binance):
|
|
1578
1577
|
"""
|
1579
1578
|
query historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
1580
1579
|
|
1581
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
1580
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#klines
|
1582
1581
|
|
1583
1582
|
:param str symbol: unified symbol of the market to query OHLCV data for
|
1584
1583
|
:param str timeframe: the length of time each candle represents
|
@@ -1844,7 +1843,7 @@ class binance(ccxt.async_support.binance):
|
|
1844
1843
|
"""
|
1845
1844
|
watches best bid & ask for symbols
|
1846
1845
|
|
1847
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
1846
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#symbol-order-book-ticker
|
1848
1847
|
https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/All-Book-Tickers-Stream
|
1849
1848
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream
|
1850
1849
|
|
@@ -2123,7 +2122,7 @@ class binance(ccxt.async_support.binance):
|
|
2123
2122
|
self.handle_tickers_and_bids_asks(client, message, 'tickers')
|
2124
2123
|
|
2125
2124
|
def handle_tickers_and_bids_asks(self, client: Client, message, methodType):
|
2126
|
-
isSpot = (
|
2125
|
+
isSpot = (client.url.find('/stream') > -1)
|
2127
2126
|
marketType = 'spot' if (isSpot) else 'contract'
|
2128
2127
|
isBidAsk = (methodType == 'bidasks')
|
2129
2128
|
channelName = None
|
@@ -2335,7 +2334,7 @@ class binance(ccxt.async_support.binance):
|
|
2335
2334
|
fetch balance and get the amount of funds available for trading or funds locked in orders
|
2336
2335
|
|
2337
2336
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance
|
2338
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
2337
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#account-information-user_data
|
2339
2338
|
https://developers.binance.com/docs/derivatives/coin-margined-futures/account/websocket-api
|
2340
2339
|
|
2341
2340
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -2682,7 +2681,7 @@ class binance(ccxt.async_support.binance):
|
|
2682
2681
|
"""
|
2683
2682
|
create a trade order
|
2684
2683
|
|
2685
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
2684
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#place-new-order-trade
|
2686
2685
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/New-Order
|
2687
2686
|
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api
|
2688
2687
|
|
@@ -2827,7 +2826,7 @@ class binance(ccxt.async_support.binance):
|
|
2827
2826
|
"""
|
2828
2827
|
edit a trade order
|
2829
2828
|
|
2830
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
2829
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#cancel-and-replace-order-trade
|
2831
2830
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order
|
2832
2831
|
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Modify-Order
|
2833
2832
|
|
@@ -2980,7 +2979,7 @@ class binance(ccxt.async_support.binance):
|
|
2980
2979
|
"""
|
2981
2980
|
cancel multiple orders
|
2982
2981
|
|
2983
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
2982
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#cancel-order-trade
|
2984
2983
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order
|
2985
2984
|
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Cancel-Order
|
2986
2985
|
|
@@ -3024,7 +3023,7 @@ class binance(ccxt.async_support.binance):
|
|
3024
3023
|
"""
|
3025
3024
|
cancel all open orders in a market
|
3026
3025
|
|
3027
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
3026
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#cancel-open-orders-trade
|
3028
3027
|
|
3029
3028
|
:param str [symbol]: unified market symbol of the market to cancel orders in
|
3030
3029
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -3058,7 +3057,7 @@ class binance(ccxt.async_support.binance):
|
|
3058
3057
|
"""
|
3059
3058
|
fetches information on an order made by the user
|
3060
3059
|
|
3061
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
3060
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#query-order-user_data
|
3062
3061
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Query-Order
|
3063
3062
|
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Query-Order
|
3064
3063
|
|
@@ -3102,7 +3101,7 @@ class binance(ccxt.async_support.binance):
|
|
3102
3101
|
"""
|
3103
3102
|
fetches information on multiple orders made by the user
|
3104
3103
|
|
3105
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
3104
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#order-lists
|
3106
3105
|
|
3107
3106
|
:param str symbol: unified market symbol of the market orders were made in
|
3108
3107
|
:param int|None [since]: the earliest time in ms to fetch orders for
|
@@ -3145,7 +3144,7 @@ class binance(ccxt.async_support.binance):
|
|
3145
3144
|
"""
|
3146
3145
|
fetch closed orders
|
3147
3146
|
|
3148
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
3147
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#order-lists
|
3149
3148
|
|
3150
3149
|
:param str symbol: unified market symbol
|
3151
3150
|
:param int [since]: the earliest time in ms to fetch open orders for
|
@@ -3165,7 +3164,7 @@ class binance(ccxt.async_support.binance):
|
|
3165
3164
|
"""
|
3166
3165
|
fetch all unfilled currently open orders
|
3167
3166
|
|
3168
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
3167
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#current-open-orders-user_data
|
3169
3168
|
|
3170
3169
|
:param str symbol: unified market symbol
|
3171
3170
|
:param int|None [since]: the earliest time in ms to fetch open orders for
|
@@ -3686,7 +3685,7 @@ class binance(ccxt.async_support.binance):
|
|
3686
3685
|
"""
|
3687
3686
|
fetch all trades made by the user
|
3688
3687
|
|
3689
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
3688
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#account-trade-history-user_data
|
3690
3689
|
|
3691
3690
|
:param str symbol: unified market symbol
|
3692
3691
|
:param int|None [since]: the earliest time in ms to fetch trades for
|
@@ -3734,7 +3733,7 @@ class binance(ccxt.async_support.binance):
|
|
3734
3733
|
"""
|
3735
3734
|
fetch all trades made by the user
|
3736
3735
|
|
3737
|
-
https://developers.binance.com/docs/binance-spot-api-docs/
|
3736
|
+
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#recent-trades
|
3738
3737
|
|
3739
3738
|
:param str symbol: unified market symbol
|
3740
3739
|
:param int [since]: the earliest time in ms to fetch trades for
|
ccxt/pro/bithumb.py
CHANGED
@@ -323,18 +323,20 @@ class bithumb(ccxt.async_support.bithumb):
|
|
323
323
|
# "contPrice" : "10579000",
|
324
324
|
# "contQty" : "0.01",
|
325
325
|
# "contAmt" : "105790.00",
|
326
|
-
# "contDtm" : "2020-01-29 12:24:18.
|
326
|
+
# "contDtm" : "2020-01-29 12:24:18.830038",
|
327
327
|
# "updn" : "dn"
|
328
328
|
# }
|
329
329
|
#
|
330
330
|
marketId = self.safe_string(trade, 'symbol')
|
331
331
|
datetime = self.safe_string(trade, 'contDtm')
|
332
|
+
# that date is not UTC iso8601, but exchange's local time, -9hr difference
|
333
|
+
timestamp = self.parse8601(datetime) - 32400000
|
332
334
|
sideId = self.safe_string(trade, 'buySellGb')
|
333
335
|
return self.safe_trade({
|
334
336
|
'id': None,
|
335
337
|
'info': trade,
|
336
|
-
'timestamp':
|
337
|
-
'datetime':
|
338
|
+
'timestamp': timestamp,
|
339
|
+
'datetime': self.iso8601(timestamp),
|
338
340
|
'symbol': self.safe_symbol(marketId, market, '_'),
|
339
341
|
'order': None,
|
340
342
|
'type': None,
|
@@ -11,10 +11,10 @@ from typing import List
|
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
|
13
13
|
|
14
|
-
class
|
14
|
+
class bittrade(ccxt.async_support.bittrade):
|
15
15
|
|
16
16
|
def describe(self) -> Any:
|
17
|
-
return self.deep_extend(super(
|
17
|
+
return self.deep_extend(super(bittrade, self).describe(), {
|
18
18
|
'has': {
|
19
19
|
'ws': True,
|
20
20
|
'watchOrderBook': True,
|
@@ -556,7 +556,7 @@ class huobijp(ccxt.async_support.huobijp):
|
|
556
556
|
#
|
557
557
|
# ________________________
|
558
558
|
#
|
559
|
-
# sometimes
|
559
|
+
# sometimes bittrade responds with half of a JSON response like
|
560
560
|
#
|
561
561
|
# " {"ch":"market.ethbtc.m "
|
562
562
|
#
|