ccxt 4.1.54__py2.py3-none-any.whl → 4.1.56__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.
Potentially problematic release.
This version of ccxt might be problematic. Click here for more details.
- ccxt/__init__.py +2 -2
- ccxt/abstract/binance.py +1 -0
- ccxt/abstract/binancecoinm.py +1 -0
- ccxt/abstract/binanceus.py +1 -0
- ccxt/abstract/binanceusdm.py +1 -0
- ccxt/abstract/bitbank.py +1 -0
- ccxt/abstract/coinbase.py +2 -0
- ccxt/abstract/htx.py +3 -0
- ccxt/abstract/huobi.py +3 -0
- ccxt/abstract/huobipro.py +3 -0
- ccxt/abstract/okex.py +3 -1
- ccxt/abstract/okex5.py +3 -1
- ccxt/abstract/okx.py +3 -1
- ccxt/ace.py +23 -23
- ccxt/alpaca.py +8 -8
- ccxt/ascendex.py +26 -26
- ccxt/async_support/__init__.py +2 -2
- ccxt/async_support/ace.py +23 -23
- ccxt/async_support/alpaca.py +8 -8
- ccxt/async_support/ascendex.py +26 -26
- ccxt/async_support/base/exchange.py +4 -2216
- ccxt/async_support/bigone.py +21 -24
- ccxt/async_support/binance.py +61 -54
- ccxt/async_support/bingx.py +28 -28
- ccxt/async_support/bit2c.py +9 -9
- ccxt/async_support/bitbank.py +11 -10
- ccxt/async_support/bitbns.py +11 -11
- ccxt/async_support/bitfinex.py +15 -15
- ccxt/async_support/bitfinex2.py +22 -22
- ccxt/async_support/bitflyer.py +13 -13
- ccxt/async_support/bitforex.py +10 -10
- ccxt/async_support/bitget.py +44 -44
- ccxt/async_support/bithumb.py +9 -9
- ccxt/async_support/bitmart.py +85 -104
- ccxt/async_support/bitmex.py +27 -27
- ccxt/async_support/bitopro.py +18 -18
- ccxt/async_support/bitpanda.py +18 -18
- ccxt/async_support/bitrue.py +14 -14
- ccxt/async_support/bitso.py +17 -17
- ccxt/async_support/bitstamp.py +17 -17
- ccxt/async_support/bittrex.py +22 -24
- ccxt/async_support/bitvavo.py +15 -15
- ccxt/async_support/bl3p.py +4 -4
- ccxt/async_support/blockchaincom.py +17 -17
- ccxt/async_support/btcalpha.py +14 -14
- ccxt/async_support/btcbox.py +9 -9
- ccxt/async_support/btcmarkets.py +17 -17
- ccxt/async_support/btcturk.py +9 -9
- ccxt/async_support/bybit.py +46 -46
- ccxt/async_support/cex.py +10 -10
- ccxt/async_support/coinbase.py +69 -25
- ccxt/async_support/coinbasepro.py +19 -19
- ccxt/async_support/coincheck.py +10 -10
- ccxt/async_support/coinex.py +57 -66
- ccxt/async_support/coinlist.py +22 -22
- ccxt/async_support/coinmate.py +10 -10
- ccxt/async_support/coinone.py +10 -10
- ccxt/async_support/coinsph.py +17 -17
- ccxt/async_support/coinspot.py +5 -5
- ccxt/async_support/cryptocom.py +27 -27
- ccxt/async_support/currencycom.py +18 -18
- ccxt/async_support/delta.py +21 -21
- ccxt/async_support/deribit.py +24 -24
- ccxt/async_support/digifinex.py +35 -35
- ccxt/async_support/exmo.py +19 -19
- ccxt/async_support/gate.py +38 -38
- ccxt/async_support/gemini.py +11 -11
- ccxt/async_support/hitbtc.py +27 -27
- ccxt/async_support/hollaex.py +19 -19
- ccxt/async_support/htx.py +47 -44
- ccxt/async_support/huobijp.py +22 -22
- ccxt/async_support/idex.py +20 -20
- ccxt/async_support/independentreserve.py +9 -9
- ccxt/async_support/indodax.py +10 -10
- ccxt/async_support/kraken.py +25 -25
- ccxt/async_support/krakenfutures.py +17 -17
- ccxt/async_support/kucoin.py +27 -27
- ccxt/async_support/kucoinfutures.py +20 -20
- ccxt/async_support/kuna.py +19 -19
- ccxt/async_support/latoken.py +14 -14
- ccxt/async_support/lbank.py +18 -18
- ccxt/async_support/luno.py +14 -14
- ccxt/async_support/lykke.py +12 -12
- ccxt/async_support/mercado.py +11 -11
- ccxt/async_support/mexc.py +36 -36
- ccxt/async_support/ndax.py +18 -18
- ccxt/async_support/novadax.py +17 -17
- ccxt/async_support/oceanex.py +12 -12
- ccxt/async_support/okcoin.py +19 -19
- ccxt/async_support/okx.py +48 -45
- ccxt/async_support/p2b.py +6 -6
- ccxt/async_support/paymium.py +6 -6
- ccxt/async_support/phemex.py +57 -57
- ccxt/async_support/poloniex.py +31 -30
- ccxt/async_support/poloniexfutures.py +16 -16
- ccxt/async_support/probit.py +22 -22
- ccxt/async_support/tidex.py +15 -15
- ccxt/async_support/timex.py +20 -20
- ccxt/async_support/tokocrypto.py +16 -16
- ccxt/async_support/upbit.py +15 -15
- ccxt/async_support/wavesexchange.py +12 -12
- ccxt/async_support/wazirx.py +13 -13
- ccxt/async_support/whitebit.py +26 -26
- ccxt/async_support/woo.py +47 -47
- ccxt/async_support/yobit.py +8 -8
- ccxt/async_support/zaif.py +10 -10
- ccxt/async_support/zonda.py +16 -16
- ccxt/base/errors.py +17 -16
- ccxt/base/exchange.py +57 -97
- ccxt/base/types.py +138 -139
- ccxt/bigone.py +21 -24
- ccxt/binance.py +61 -54
- ccxt/bingx.py +28 -28
- ccxt/bit2c.py +9 -9
- ccxt/bitbank.py +11 -10
- ccxt/bitbns.py +11 -11
- ccxt/bitfinex.py +15 -15
- ccxt/bitfinex2.py +22 -22
- ccxt/bitflyer.py +13 -13
- ccxt/bitforex.py +10 -10
- ccxt/bitget.py +44 -44
- ccxt/bithumb.py +9 -9
- ccxt/bitmart.py +85 -104
- ccxt/bitmex.py +27 -27
- ccxt/bitopro.py +18 -18
- ccxt/bitpanda.py +18 -18
- ccxt/bitrue.py +14 -14
- ccxt/bitso.py +17 -17
- ccxt/bitstamp.py +17 -17
- ccxt/bittrex.py +22 -24
- ccxt/bitvavo.py +15 -15
- ccxt/bl3p.py +4 -4
- ccxt/blockchaincom.py +17 -17
- ccxt/btcalpha.py +14 -14
- ccxt/btcbox.py +9 -9
- ccxt/btcmarkets.py +17 -17
- ccxt/btcturk.py +9 -9
- ccxt/bybit.py +46 -46
- ccxt/cex.py +10 -10
- ccxt/coinbase.py +69 -25
- ccxt/coinbasepro.py +19 -19
- ccxt/coincheck.py +10 -10
- ccxt/coinex.py +57 -66
- ccxt/coinlist.py +22 -22
- ccxt/coinmate.py +10 -10
- ccxt/coinone.py +10 -10
- ccxt/coinsph.py +17 -17
- ccxt/coinspot.py +5 -5
- ccxt/cryptocom.py +27 -27
- ccxt/currencycom.py +18 -18
- ccxt/delta.py +21 -21
- ccxt/deribit.py +24 -24
- ccxt/digifinex.py +35 -35
- ccxt/exmo.py +19 -19
- ccxt/gate.py +38 -38
- ccxt/gemini.py +11 -11
- ccxt/hitbtc.py +27 -27
- ccxt/hollaex.py +19 -19
- ccxt/htx.py +47 -44
- ccxt/huobijp.py +22 -22
- ccxt/idex.py +20 -20
- ccxt/independentreserve.py +9 -9
- ccxt/indodax.py +10 -10
- ccxt/kraken.py +25 -25
- ccxt/krakenfutures.py +17 -17
- ccxt/kucoin.py +27 -27
- ccxt/kucoinfutures.py +20 -20
- ccxt/kuna.py +19 -19
- ccxt/latoken.py +14 -14
- ccxt/lbank.py +18 -18
- ccxt/luno.py +14 -14
- ccxt/lykke.py +12 -12
- ccxt/mercado.py +11 -11
- ccxt/mexc.py +36 -36
- ccxt/ndax.py +18 -18
- ccxt/novadax.py +17 -17
- ccxt/oceanex.py +12 -12
- ccxt/okcoin.py +19 -19
- ccxt/okx.py +48 -45
- ccxt/p2b.py +6 -6
- ccxt/paymium.py +6 -6
- ccxt/phemex.py +57 -57
- ccxt/poloniex.py +31 -30
- ccxt/poloniexfutures.py +16 -16
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +3 -3
- ccxt/pro/ascendex.py +2 -2
- ccxt/pro/binance.py +9 -9
- ccxt/pro/bingx.py +3 -3
- ccxt/pro/bitfinex.py +3 -3
- ccxt/pro/bitfinex2.py +3 -3
- ccxt/pro/bitget.py +3 -3
- ccxt/pro/bitmart.py +2 -2
- ccxt/pro/bitmex.py +3 -3
- ccxt/pro/bitpanda.py +3 -3
- ccxt/pro/bitrue.py +2 -2
- ccxt/pro/bitstamp.py +2 -2
- ccxt/pro/bittrex.py +3 -3
- ccxt/pro/bitvavo.py +3 -3
- ccxt/pro/blockchaincom.py +2 -2
- ccxt/pro/bybit.py +4 -4
- ccxt/pro/cex.py +3 -3
- ccxt/pro/coinbasepro.py +3 -3
- ccxt/pro/coinex.py +2 -2
- ccxt/pro/cryptocom.py +5 -5
- ccxt/pro/deribit.py +3 -3
- ccxt/pro/exmo.py +2 -2
- ccxt/pro/gate.py +3 -3
- ccxt/pro/gemini.py +2 -2
- ccxt/pro/hitbtc.py +4 -4
- ccxt/pro/hollaex.py +3 -3
- ccxt/pro/htx.py +3 -3
- ccxt/pro/idex.py +3 -3
- ccxt/pro/kraken.py +7 -7
- ccxt/pro/krakenfutures.py +4 -4
- ccxt/pro/kucoin.py +3 -3
- ccxt/pro/kucoinfutures.py +3 -3
- ccxt/pro/mexc.py +3 -3
- ccxt/pro/okcoin.py +2 -2
- ccxt/pro/okx.py +6 -6
- ccxt/pro/phemex.py +3 -3
- ccxt/pro/poloniex.py +3 -3
- ccxt/pro/poloniexfutures.py +3 -3
- ccxt/pro/probit.py +3 -3
- ccxt/pro/wazirx.py +3 -3
- ccxt/pro/whitebit.py +3 -3
- ccxt/pro/woo.py +2 -2
- ccxt/probit.py +22 -22
- ccxt/test/base/test_shared_methods.py +3 -3
- ccxt/test/test_async.py +543 -535
- ccxt/test/test_sync.py +542 -534
- ccxt/tidex.py +15 -15
- ccxt/timex.py +20 -20
- ccxt/tokocrypto.py +16 -16
- ccxt/upbit.py +15 -15
- ccxt/wavesexchange.py +12 -12
- ccxt/wazirx.py +13 -13
- ccxt/whitebit.py +26 -26
- ccxt/woo.py +47 -47
- ccxt/yobit.py +8 -8
- ccxt/zaif.py +10 -10
- ccxt/zonda.py +16 -16
- {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/METADATA +10 -8
- ccxt-4.1.56.dist-info/RECORD +449 -0
- ccxt/async_support/bitstamp1.py +0 -402
- ccxt/async_support/lbank2.py +0 -2620
- ccxt/bitstamp1.py +0 -402
- ccxt/lbank2.py +0 -2619
- ccxt-4.1.54.dist-info/RECORD +0 -453
- {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/WHEEL +0 -0
- {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/top_level.txt +0 -0
ccxt/base/types.py
CHANGED
@@ -10,7 +10,6 @@ else:
|
|
10
10
|
from typing_extensions import Literal
|
11
11
|
TypedDict = Dict
|
12
12
|
|
13
|
-
|
14
13
|
OrderSide = Literal['buy', 'sell']
|
15
14
|
OrderType = Literal['limit', 'market']
|
16
15
|
PositionSide = Literal['long', 'short']
|
@@ -40,8 +39,8 @@ class Entry:
|
|
40
39
|
|
41
40
|
|
42
41
|
IndexType = Union[str, int]
|
43
|
-
|
44
|
-
|
42
|
+
Num = Union[None, str, float, int, Decimal]
|
43
|
+
Str = Optional[str]
|
45
44
|
Strings = Optional[List[str]]
|
46
45
|
Int = Optional[int]
|
47
46
|
Bool = Optional[bool]
|
@@ -49,61 +48,61 @@ Fee = Optional[Dict[str, Any]]
|
|
49
48
|
|
50
49
|
|
51
50
|
class Balance(TypedDict):
|
52
|
-
free:
|
53
|
-
used:
|
54
|
-
total:
|
51
|
+
free: Num
|
52
|
+
used: Num
|
53
|
+
total: Num
|
55
54
|
|
56
55
|
|
57
56
|
class Trade(TypedDict):
|
58
57
|
info: Dict[str, Any]
|
59
|
-
amount:
|
60
|
-
datetime:
|
61
|
-
id:
|
62
|
-
order:
|
63
|
-
price:
|
58
|
+
amount: Num
|
59
|
+
datetime: Str
|
60
|
+
id: Str
|
61
|
+
order: Str
|
62
|
+
price: Num
|
64
63
|
timestamp: Int
|
65
|
-
type:
|
66
|
-
side:
|
67
|
-
symbol:
|
68
|
-
takerOrMaker:
|
69
|
-
cost:
|
64
|
+
type: Str
|
65
|
+
side: Str
|
66
|
+
symbol: Str
|
67
|
+
takerOrMaker: Str
|
68
|
+
cost: Num
|
70
69
|
fee: Fee
|
71
70
|
|
72
71
|
|
73
72
|
class Position(TypedDict):
|
74
73
|
info: Dict[str, Any]
|
75
|
-
symbol:
|
76
|
-
id:
|
74
|
+
symbol: Str
|
75
|
+
id: Str
|
77
76
|
timestamp: Int
|
78
|
-
datetime:
|
79
|
-
contracts:
|
80
|
-
contractSize:
|
81
|
-
side:
|
82
|
-
notional:
|
83
|
-
leverage:
|
84
|
-
unrealizedPnl:
|
85
|
-
realizedPnl:
|
86
|
-
collateral:
|
87
|
-
entryPrice:
|
88
|
-
markPrice:
|
89
|
-
liquidationPrice:
|
77
|
+
datetime: Str
|
78
|
+
contracts: Num
|
79
|
+
contractSize: Num
|
80
|
+
side: Str
|
81
|
+
notional: Num
|
82
|
+
leverage: Num
|
83
|
+
unrealizedPnl: Num
|
84
|
+
realizedPnl: Num
|
85
|
+
collateral: Num
|
86
|
+
entryPrice: Num
|
87
|
+
markPrice: Num
|
88
|
+
liquidationPrice: Num
|
90
89
|
hedged: bool
|
91
|
-
maintenanceMargin:
|
92
|
-
initialMargin:
|
93
|
-
initialMarginPercentage:
|
94
|
-
marginMode:
|
95
|
-
marginRatio:
|
90
|
+
maintenanceMargin: Num
|
91
|
+
initialMargin: Num
|
92
|
+
initialMarginPercentage: Num
|
93
|
+
marginMode: Str
|
94
|
+
marginRatio: Num
|
96
95
|
lastUpdateTimestamp: Int
|
97
|
-
lastPrice:
|
98
|
-
percentage:
|
99
|
-
stopLossPrice:
|
100
|
-
takeProfitPrice:
|
96
|
+
lastPrice: Num
|
97
|
+
percentage: Num
|
98
|
+
stopLossPrice: Num
|
99
|
+
takeProfitPrice: Num
|
101
100
|
|
102
101
|
|
103
102
|
class OrderRequest(TypedDict):
|
104
|
-
symbol:
|
105
|
-
type:
|
106
|
-
side:
|
103
|
+
symbol: Str
|
104
|
+
type: Str
|
105
|
+
side: Str
|
107
106
|
amount: Union[None, float]
|
108
107
|
price: Union[None, float]
|
109
108
|
params: Dict[str, Any]
|
@@ -111,97 +110,97 @@ class OrderRequest(TypedDict):
|
|
111
110
|
|
112
111
|
class Order(TypedDict):
|
113
112
|
info: Dict[str, Any]
|
114
|
-
id:
|
115
|
-
clientOrderId:
|
116
|
-
datetime:
|
113
|
+
id: Str
|
114
|
+
clientOrderId: Str
|
115
|
+
datetime: Str
|
117
116
|
timestamp: Int
|
118
117
|
lastTradeTimestamp: Int
|
119
118
|
lastUpdateTimestamp: Int
|
120
|
-
status:
|
121
|
-
symbol:
|
122
|
-
type:
|
123
|
-
timeInForce:
|
119
|
+
status: Str
|
120
|
+
symbol: Str
|
121
|
+
type: Str
|
122
|
+
timeInForce: Str
|
124
123
|
side: OrderSide
|
125
|
-
price:
|
126
|
-
average:
|
127
|
-
amount:
|
128
|
-
filled:
|
129
|
-
remaining:
|
130
|
-
stopPrice:
|
131
|
-
takeProfitPrice:
|
132
|
-
stopLossPrice:
|
133
|
-
cost:
|
124
|
+
price: Num
|
125
|
+
average: Num
|
126
|
+
amount: Num
|
127
|
+
filled: Num
|
128
|
+
remaining: Num
|
129
|
+
stopPrice: Num
|
130
|
+
takeProfitPrice: Num
|
131
|
+
stopLossPrice: Num
|
132
|
+
cost: Num
|
134
133
|
trades: List[Trade]
|
135
134
|
fee: Fee
|
136
135
|
|
137
136
|
|
138
137
|
class FundingHistory(TypedDict):
|
139
138
|
info: Dict[str, Any]
|
140
|
-
symbol:
|
141
|
-
code:
|
139
|
+
symbol: Str
|
140
|
+
code: Str
|
142
141
|
timestamp: Int
|
143
|
-
datetime:
|
144
|
-
id:
|
145
|
-
amount:
|
142
|
+
datetime: Str
|
143
|
+
id: Str
|
144
|
+
amount: Num
|
146
145
|
|
147
146
|
|
148
147
|
class Balances(Dict[str, Balance]):
|
149
|
-
datetime:
|
148
|
+
datetime: Str
|
150
149
|
timestamp: Int
|
151
150
|
|
152
151
|
|
153
152
|
class OrderBook(TypedDict):
|
154
|
-
asks: List[
|
155
|
-
bids: List[
|
156
|
-
datetime:
|
153
|
+
asks: List[Num]
|
154
|
+
bids: List[Num]
|
155
|
+
datetime: Str
|
157
156
|
timestamp: Int
|
158
157
|
nonce: Int
|
159
158
|
|
160
159
|
|
161
160
|
class Transaction(TypedDict):
|
162
161
|
info: Dict[str, any]
|
163
|
-
id:
|
164
|
-
txid:
|
162
|
+
id: Str
|
163
|
+
txid: Str
|
165
164
|
timestamp: Int
|
166
|
-
datetime:
|
167
|
-
address:
|
168
|
-
addressFrom:
|
169
|
-
addressTo:
|
170
|
-
tag:
|
171
|
-
tagFrom:
|
172
|
-
tagTo:
|
173
|
-
type:
|
174
|
-
amount:
|
175
|
-
currency:
|
176
|
-
status:
|
165
|
+
datetime: Str
|
166
|
+
address: Str
|
167
|
+
addressFrom: Str
|
168
|
+
addressTo: Str
|
169
|
+
tag: Str
|
170
|
+
tagFrom: Str
|
171
|
+
tagTo: Str
|
172
|
+
type: Str
|
173
|
+
amount: Num
|
174
|
+
currency: Str
|
175
|
+
status: Str
|
177
176
|
updated: Int
|
178
177
|
fee: Fee
|
179
|
-
network:
|
180
|
-
comment:
|
178
|
+
network: Str
|
179
|
+
comment: Str
|
181
180
|
internal: Bool
|
182
181
|
|
183
182
|
|
184
183
|
class Ticker(TypedDict):
|
185
184
|
info: Dict[str, Any]
|
186
|
-
symbol:
|
185
|
+
symbol: Str
|
187
186
|
timestamp: Int
|
188
|
-
datetime:
|
189
|
-
high:
|
190
|
-
low:
|
191
|
-
bid:
|
192
|
-
bidVolume:
|
193
|
-
ask:
|
194
|
-
askVolume:
|
195
|
-
vwap:
|
196
|
-
open:
|
197
|
-
close:
|
198
|
-
last:
|
199
|
-
previousClose:
|
200
|
-
change:
|
201
|
-
percentage:
|
202
|
-
average:
|
203
|
-
quoteVolume:
|
204
|
-
baseVolume:
|
187
|
+
datetime: Str
|
188
|
+
high: Num
|
189
|
+
low: Num
|
190
|
+
bid: Num
|
191
|
+
bidVolume: Num
|
192
|
+
ask: Num
|
193
|
+
askVolume: Num
|
194
|
+
vwap: Num
|
195
|
+
open: Num
|
196
|
+
close: Num
|
197
|
+
last: Num
|
198
|
+
previousClose: Num
|
199
|
+
change: Num
|
200
|
+
percentage: Num
|
201
|
+
average: Num
|
202
|
+
quoteVolume: Num
|
203
|
+
baseVolume: Num
|
205
204
|
|
206
205
|
|
207
206
|
Tickers = Dict[str, Ticker]
|
@@ -209,71 +208,71 @@ Tickers = Dict[str, Ticker]
|
|
209
208
|
|
210
209
|
class MarginMode(TypedDict):
|
211
210
|
info: Dict[str, Any]
|
212
|
-
symbol:
|
213
|
-
marginMode:
|
211
|
+
symbol: Str
|
212
|
+
marginMode: Str
|
214
213
|
|
215
214
|
|
216
215
|
class Greeks(TypedDict):
|
217
|
-
symbol:
|
216
|
+
symbol: Str
|
218
217
|
timestamp: Int
|
219
|
-
datetime:
|
220
|
-
delta:
|
221
|
-
gamma:
|
222
|
-
theta:
|
223
|
-
vega:
|
224
|
-
rho:
|
225
|
-
bidSize:
|
226
|
-
askSize:
|
227
|
-
bidImpliedVolatility:
|
228
|
-
askImpliedVolatility:
|
229
|
-
markImpliedVolatility:
|
230
|
-
bidPrice:
|
231
|
-
askPrice:
|
232
|
-
markPrice:
|
233
|
-
lastPrice:
|
234
|
-
underlyingPrice:
|
218
|
+
datetime: Str
|
219
|
+
delta: Num
|
220
|
+
gamma: Num
|
221
|
+
theta: Num
|
222
|
+
vega: Num
|
223
|
+
rho: Num
|
224
|
+
bidSize: Num
|
225
|
+
askSize: Num
|
226
|
+
bidImpliedVolatility: Num
|
227
|
+
askImpliedVolatility: Num
|
228
|
+
markImpliedVolatility: Num
|
229
|
+
bidPrice: Num
|
230
|
+
askPrice: Num
|
231
|
+
markPrice: Num
|
232
|
+
lastPrice: Num
|
233
|
+
underlyingPrice: Num
|
235
234
|
info: Dict[str, Any]
|
236
235
|
|
237
236
|
|
238
237
|
class MarketInterface(TypedDict):
|
239
238
|
info: Dict[str, Any]
|
240
|
-
id:
|
241
|
-
symbol:
|
242
|
-
base:
|
243
|
-
quote:
|
244
|
-
baseId:
|
245
|
-
quoteId:
|
239
|
+
id: Str
|
240
|
+
symbol: Str
|
241
|
+
base: Str
|
242
|
+
quote: Str
|
243
|
+
baseId: Str
|
244
|
+
quoteId: Str
|
246
245
|
active: Bool
|
247
|
-
type:
|
246
|
+
type: Str
|
248
247
|
spot: bool
|
249
248
|
margin: bool
|
250
249
|
swap: bool
|
251
250
|
future: bool
|
252
251
|
option: bool
|
253
252
|
contract: bool
|
254
|
-
settle:
|
255
|
-
settleId:
|
256
|
-
contractSize:
|
253
|
+
settle: Str
|
254
|
+
settleId: Str
|
255
|
+
contractSize: Num
|
257
256
|
linear: bool
|
258
257
|
inverse: bool
|
259
|
-
expiry:
|
260
|
-
expiryDatetime:
|
261
|
-
strike:
|
262
|
-
optionType:
|
263
|
-
taker:
|
264
|
-
maker:
|
258
|
+
expiry: Num
|
259
|
+
expiryDatetime: Str
|
260
|
+
strike: Num
|
261
|
+
optionType: Str
|
262
|
+
taker: Num
|
263
|
+
maker: Num
|
265
264
|
percentage: bool
|
266
265
|
tierBased: bool
|
267
|
-
feeSide:
|
266
|
+
feeSide: Str
|
268
267
|
precision: Any
|
269
268
|
limits: Any
|
270
269
|
created: Int
|
271
270
|
|
272
271
|
|
273
272
|
class CurrencyInterface(TypedDict):
|
274
|
-
id:
|
275
|
-
code:
|
276
|
-
precision:
|
273
|
+
id: Str
|
274
|
+
code: Str
|
275
|
+
precision: Num
|
277
276
|
|
278
277
|
|
279
278
|
Market = Optional[MarketInterface]
|
ccxt/bigone.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bigone import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType,
|
8
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Bool, Strings, Ticker, Tickers, Trade, Transaction
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import PermissionDenied
|
@@ -414,8 +414,8 @@ class bigone(Exchange, ImplicitAPI):
|
|
414
414
|
networks = {}
|
415
415
|
chains = self.safe_value(currency, 'binding_gateways', [])
|
416
416
|
currencyMaxPrecision = self.parse_precision(self.safe_string_2(currency, 'withdrawal_scale', 'scale'))
|
417
|
-
currencyDepositEnabled = None
|
418
|
-
currencyWithdrawEnabled = None
|
417
|
+
currencyDepositEnabled: Bool = None
|
418
|
+
currencyWithdrawEnabled: Bool = None
|
419
419
|
for j in range(0, len(chains)):
|
420
420
|
chain = chains[j]
|
421
421
|
networkId = self.safe_string(chain, 'gateway_name')
|
@@ -570,7 +570,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
570
570
|
'info': market,
|
571
571
|
}
|
572
572
|
|
573
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
573
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
574
574
|
#
|
575
575
|
# {
|
576
576
|
# "asset_pair_name":"ETH-BTC",
|
@@ -747,7 +747,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
747
747
|
orderbook = self.safe_value(response, 'data', {})
|
748
748
|
return self.parse_order_book(orderbook, market['symbol'], None, 'bids', 'asks', 'price', 'quantity')
|
749
749
|
|
750
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
750
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
751
751
|
#
|
752
752
|
# fetchTrades(public)
|
753
753
|
#
|
@@ -796,7 +796,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
796
796
|
market = self.safe_market(marketId, market, '-')
|
797
797
|
side = self.safe_string(trade, 'side')
|
798
798
|
takerSide = self.safe_string(trade, 'taker_side')
|
799
|
-
takerOrMaker = None
|
799
|
+
takerOrMaker: Str = None
|
800
800
|
if (takerSide is not None) and (side is not None) and (side != 'SELF_TRADING'):
|
801
801
|
takerOrMaker = 'taker' if (takerSide == side) else 'maker'
|
802
802
|
if side is None:
|
@@ -810,12 +810,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
810
810
|
side = 'sell'
|
811
811
|
makerOrderId = self.safe_string(trade, 'maker_order_id')
|
812
812
|
takerOrderId = self.safe_string(trade, 'taker_order_id')
|
813
|
-
orderId = None
|
813
|
+
orderId: Str = None
|
814
814
|
if makerOrderId is not None:
|
815
|
-
|
816
|
-
orderId = [makerOrderId, takerOrderId]
|
817
|
-
else:
|
818
|
-
orderId = makerOrderId
|
815
|
+
orderId = makerOrderId
|
819
816
|
elif takerOrderId is not None:
|
820
817
|
orderId = takerOrderId
|
821
818
|
id = self.safe_string(trade, 'id')
|
@@ -912,7 +909,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
912
909
|
trades = self.safe_value(response, 'data', [])
|
913
910
|
return self.parse_trades(trades, market, since, limit)
|
914
911
|
|
915
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
912
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
916
913
|
#
|
917
914
|
# {
|
918
915
|
# "close": "0.021562",
|
@@ -1035,7 +1032,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1035
1032
|
}
|
1036
1033
|
return self.safe_string(types, type, type)
|
1037
1034
|
|
1038
|
-
def parse_order(self, order, market=None) -> Order:
|
1035
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1039
1036
|
#
|
1040
1037
|
# {
|
1041
1038
|
# "id": "42154072251",
|
@@ -1189,7 +1186,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1189
1186
|
order = self.safe_value(response, 'data')
|
1190
1187
|
return self.parse_order(order, market)
|
1191
1188
|
|
1192
|
-
def cancel_order(self, id: str, symbol:
|
1189
|
+
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1193
1190
|
"""
|
1194
1191
|
cancels an open order
|
1195
1192
|
:param str id: order id
|
@@ -1215,7 +1212,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1215
1212
|
order = self.safe_value(response, 'data')
|
1216
1213
|
return self.parse_order(order)
|
1217
1214
|
|
1218
|
-
def cancel_all_orders(self, symbol:
|
1215
|
+
def cancel_all_orders(self, symbol: Str = None, params={}):
|
1219
1216
|
"""
|
1220
1217
|
cancel all open orders
|
1221
1218
|
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
@@ -1242,7 +1239,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1242
1239
|
#
|
1243
1240
|
return response
|
1244
1241
|
|
1245
|
-
def fetch_order(self, id: str, symbol:
|
1242
|
+
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1246
1243
|
"""
|
1247
1244
|
fetches information on an order made by the user
|
1248
1245
|
:param str symbol: not used by bigone fetchOrder
|
@@ -1255,7 +1252,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1255
1252
|
order = self.safe_value(response, 'data', {})
|
1256
1253
|
return self.parse_order(order)
|
1257
1254
|
|
1258
|
-
def fetch_orders(self, symbol:
|
1255
|
+
def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1259
1256
|
"""
|
1260
1257
|
fetches information on multiple orders made by the user
|
1261
1258
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -1300,7 +1297,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1300
1297
|
orders = self.safe_value(response, 'data', [])
|
1301
1298
|
return self.parse_orders(orders, market, since, limit)
|
1302
1299
|
|
1303
|
-
def fetch_my_trades(self, symbol:
|
1300
|
+
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1304
1301
|
"""
|
1305
1302
|
fetch all trades made by the user
|
1306
1303
|
:param str symbol: unified market symbol
|
@@ -1364,7 +1361,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1364
1361
|
}
|
1365
1362
|
return self.safe_string(statuses, status)
|
1366
1363
|
|
1367
|
-
def fetch_open_orders(self, symbol:
|
1364
|
+
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1368
1365
|
"""
|
1369
1366
|
fetch all unfilled currently open orders
|
1370
1367
|
:param str symbol: unified market symbol
|
@@ -1378,7 +1375,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1378
1375
|
}
|
1379
1376
|
return self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
1380
1377
|
|
1381
|
-
def fetch_closed_orders(self, symbol:
|
1378
|
+
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1382
1379
|
"""
|
1383
1380
|
fetches information on multiple closed orders made by the user
|
1384
1381
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -1484,7 +1481,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1484
1481
|
}
|
1485
1482
|
return self.safe_string(statuses, status, status)
|
1486
1483
|
|
1487
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
1484
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1488
1485
|
#
|
1489
1486
|
# fetchDeposits
|
1490
1487
|
#
|
@@ -1571,7 +1568,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1571
1568
|
'internal': internal,
|
1572
1569
|
}
|
1573
1570
|
|
1574
|
-
def fetch_deposits(self, code:
|
1571
|
+
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1575
1572
|
"""
|
1576
1573
|
fetch all deposits made to an account
|
1577
1574
|
:param str code: unified currency code
|
@@ -1618,7 +1615,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1618
1615
|
deposits = self.safe_value(response, 'data', [])
|
1619
1616
|
return self.parse_transactions(deposits, currency, since, limit)
|
1620
1617
|
|
1621
|
-
def fetch_withdrawals(self, code:
|
1618
|
+
def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1622
1619
|
"""
|
1623
1620
|
fetch all withdrawals made from an account
|
1624
1621
|
:param str code: unified currency code
|
@@ -1708,7 +1705,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1708
1705
|
transfer['id'] = guid
|
1709
1706
|
return transfer
|
1710
1707
|
|
1711
|
-
def parse_transfer(self, transfer, currency=None):
|
1708
|
+
def parse_transfer(self, transfer, currency: Currency = None):
|
1712
1709
|
#
|
1713
1710
|
# {
|
1714
1711
|
# "code": 0,
|