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.

Files changed (251) hide show
  1. ccxt/__init__.py +2 -2
  2. ccxt/abstract/binance.py +1 -0
  3. ccxt/abstract/binancecoinm.py +1 -0
  4. ccxt/abstract/binanceus.py +1 -0
  5. ccxt/abstract/binanceusdm.py +1 -0
  6. ccxt/abstract/bitbank.py +1 -0
  7. ccxt/abstract/coinbase.py +2 -0
  8. ccxt/abstract/htx.py +3 -0
  9. ccxt/abstract/huobi.py +3 -0
  10. ccxt/abstract/huobipro.py +3 -0
  11. ccxt/abstract/okex.py +3 -1
  12. ccxt/abstract/okex5.py +3 -1
  13. ccxt/abstract/okx.py +3 -1
  14. ccxt/ace.py +23 -23
  15. ccxt/alpaca.py +8 -8
  16. ccxt/ascendex.py +26 -26
  17. ccxt/async_support/__init__.py +2 -2
  18. ccxt/async_support/ace.py +23 -23
  19. ccxt/async_support/alpaca.py +8 -8
  20. ccxt/async_support/ascendex.py +26 -26
  21. ccxt/async_support/base/exchange.py +4 -2216
  22. ccxt/async_support/bigone.py +21 -24
  23. ccxt/async_support/binance.py +61 -54
  24. ccxt/async_support/bingx.py +28 -28
  25. ccxt/async_support/bit2c.py +9 -9
  26. ccxt/async_support/bitbank.py +11 -10
  27. ccxt/async_support/bitbns.py +11 -11
  28. ccxt/async_support/bitfinex.py +15 -15
  29. ccxt/async_support/bitfinex2.py +22 -22
  30. ccxt/async_support/bitflyer.py +13 -13
  31. ccxt/async_support/bitforex.py +10 -10
  32. ccxt/async_support/bitget.py +44 -44
  33. ccxt/async_support/bithumb.py +9 -9
  34. ccxt/async_support/bitmart.py +85 -104
  35. ccxt/async_support/bitmex.py +27 -27
  36. ccxt/async_support/bitopro.py +18 -18
  37. ccxt/async_support/bitpanda.py +18 -18
  38. ccxt/async_support/bitrue.py +14 -14
  39. ccxt/async_support/bitso.py +17 -17
  40. ccxt/async_support/bitstamp.py +17 -17
  41. ccxt/async_support/bittrex.py +22 -24
  42. ccxt/async_support/bitvavo.py +15 -15
  43. ccxt/async_support/bl3p.py +4 -4
  44. ccxt/async_support/blockchaincom.py +17 -17
  45. ccxt/async_support/btcalpha.py +14 -14
  46. ccxt/async_support/btcbox.py +9 -9
  47. ccxt/async_support/btcmarkets.py +17 -17
  48. ccxt/async_support/btcturk.py +9 -9
  49. ccxt/async_support/bybit.py +46 -46
  50. ccxt/async_support/cex.py +10 -10
  51. ccxt/async_support/coinbase.py +69 -25
  52. ccxt/async_support/coinbasepro.py +19 -19
  53. ccxt/async_support/coincheck.py +10 -10
  54. ccxt/async_support/coinex.py +57 -66
  55. ccxt/async_support/coinlist.py +22 -22
  56. ccxt/async_support/coinmate.py +10 -10
  57. ccxt/async_support/coinone.py +10 -10
  58. ccxt/async_support/coinsph.py +17 -17
  59. ccxt/async_support/coinspot.py +5 -5
  60. ccxt/async_support/cryptocom.py +27 -27
  61. ccxt/async_support/currencycom.py +18 -18
  62. ccxt/async_support/delta.py +21 -21
  63. ccxt/async_support/deribit.py +24 -24
  64. ccxt/async_support/digifinex.py +35 -35
  65. ccxt/async_support/exmo.py +19 -19
  66. ccxt/async_support/gate.py +38 -38
  67. ccxt/async_support/gemini.py +11 -11
  68. ccxt/async_support/hitbtc.py +27 -27
  69. ccxt/async_support/hollaex.py +19 -19
  70. ccxt/async_support/htx.py +47 -44
  71. ccxt/async_support/huobijp.py +22 -22
  72. ccxt/async_support/idex.py +20 -20
  73. ccxt/async_support/independentreserve.py +9 -9
  74. ccxt/async_support/indodax.py +10 -10
  75. ccxt/async_support/kraken.py +25 -25
  76. ccxt/async_support/krakenfutures.py +17 -17
  77. ccxt/async_support/kucoin.py +27 -27
  78. ccxt/async_support/kucoinfutures.py +20 -20
  79. ccxt/async_support/kuna.py +19 -19
  80. ccxt/async_support/latoken.py +14 -14
  81. ccxt/async_support/lbank.py +18 -18
  82. ccxt/async_support/luno.py +14 -14
  83. ccxt/async_support/lykke.py +12 -12
  84. ccxt/async_support/mercado.py +11 -11
  85. ccxt/async_support/mexc.py +36 -36
  86. ccxt/async_support/ndax.py +18 -18
  87. ccxt/async_support/novadax.py +17 -17
  88. ccxt/async_support/oceanex.py +12 -12
  89. ccxt/async_support/okcoin.py +19 -19
  90. ccxt/async_support/okx.py +48 -45
  91. ccxt/async_support/p2b.py +6 -6
  92. ccxt/async_support/paymium.py +6 -6
  93. ccxt/async_support/phemex.py +57 -57
  94. ccxt/async_support/poloniex.py +31 -30
  95. ccxt/async_support/poloniexfutures.py +16 -16
  96. ccxt/async_support/probit.py +22 -22
  97. ccxt/async_support/tidex.py +15 -15
  98. ccxt/async_support/timex.py +20 -20
  99. ccxt/async_support/tokocrypto.py +16 -16
  100. ccxt/async_support/upbit.py +15 -15
  101. ccxt/async_support/wavesexchange.py +12 -12
  102. ccxt/async_support/wazirx.py +13 -13
  103. ccxt/async_support/whitebit.py +26 -26
  104. ccxt/async_support/woo.py +47 -47
  105. ccxt/async_support/yobit.py +8 -8
  106. ccxt/async_support/zaif.py +10 -10
  107. ccxt/async_support/zonda.py +16 -16
  108. ccxt/base/errors.py +17 -16
  109. ccxt/base/exchange.py +57 -97
  110. ccxt/base/types.py +138 -139
  111. ccxt/bigone.py +21 -24
  112. ccxt/binance.py +61 -54
  113. ccxt/bingx.py +28 -28
  114. ccxt/bit2c.py +9 -9
  115. ccxt/bitbank.py +11 -10
  116. ccxt/bitbns.py +11 -11
  117. ccxt/bitfinex.py +15 -15
  118. ccxt/bitfinex2.py +22 -22
  119. ccxt/bitflyer.py +13 -13
  120. ccxt/bitforex.py +10 -10
  121. ccxt/bitget.py +44 -44
  122. ccxt/bithumb.py +9 -9
  123. ccxt/bitmart.py +85 -104
  124. ccxt/bitmex.py +27 -27
  125. ccxt/bitopro.py +18 -18
  126. ccxt/bitpanda.py +18 -18
  127. ccxt/bitrue.py +14 -14
  128. ccxt/bitso.py +17 -17
  129. ccxt/bitstamp.py +17 -17
  130. ccxt/bittrex.py +22 -24
  131. ccxt/bitvavo.py +15 -15
  132. ccxt/bl3p.py +4 -4
  133. ccxt/blockchaincom.py +17 -17
  134. ccxt/btcalpha.py +14 -14
  135. ccxt/btcbox.py +9 -9
  136. ccxt/btcmarkets.py +17 -17
  137. ccxt/btcturk.py +9 -9
  138. ccxt/bybit.py +46 -46
  139. ccxt/cex.py +10 -10
  140. ccxt/coinbase.py +69 -25
  141. ccxt/coinbasepro.py +19 -19
  142. ccxt/coincheck.py +10 -10
  143. ccxt/coinex.py +57 -66
  144. ccxt/coinlist.py +22 -22
  145. ccxt/coinmate.py +10 -10
  146. ccxt/coinone.py +10 -10
  147. ccxt/coinsph.py +17 -17
  148. ccxt/coinspot.py +5 -5
  149. ccxt/cryptocom.py +27 -27
  150. ccxt/currencycom.py +18 -18
  151. ccxt/delta.py +21 -21
  152. ccxt/deribit.py +24 -24
  153. ccxt/digifinex.py +35 -35
  154. ccxt/exmo.py +19 -19
  155. ccxt/gate.py +38 -38
  156. ccxt/gemini.py +11 -11
  157. ccxt/hitbtc.py +27 -27
  158. ccxt/hollaex.py +19 -19
  159. ccxt/htx.py +47 -44
  160. ccxt/huobijp.py +22 -22
  161. ccxt/idex.py +20 -20
  162. ccxt/independentreserve.py +9 -9
  163. ccxt/indodax.py +10 -10
  164. ccxt/kraken.py +25 -25
  165. ccxt/krakenfutures.py +17 -17
  166. ccxt/kucoin.py +27 -27
  167. ccxt/kucoinfutures.py +20 -20
  168. ccxt/kuna.py +19 -19
  169. ccxt/latoken.py +14 -14
  170. ccxt/lbank.py +18 -18
  171. ccxt/luno.py +14 -14
  172. ccxt/lykke.py +12 -12
  173. ccxt/mercado.py +11 -11
  174. ccxt/mexc.py +36 -36
  175. ccxt/ndax.py +18 -18
  176. ccxt/novadax.py +17 -17
  177. ccxt/oceanex.py +12 -12
  178. ccxt/okcoin.py +19 -19
  179. ccxt/okx.py +48 -45
  180. ccxt/p2b.py +6 -6
  181. ccxt/paymium.py +6 -6
  182. ccxt/phemex.py +57 -57
  183. ccxt/poloniex.py +31 -30
  184. ccxt/poloniexfutures.py +16 -16
  185. ccxt/pro/__init__.py +1 -1
  186. ccxt/pro/alpaca.py +3 -3
  187. ccxt/pro/ascendex.py +2 -2
  188. ccxt/pro/binance.py +9 -9
  189. ccxt/pro/bingx.py +3 -3
  190. ccxt/pro/bitfinex.py +3 -3
  191. ccxt/pro/bitfinex2.py +3 -3
  192. ccxt/pro/bitget.py +3 -3
  193. ccxt/pro/bitmart.py +2 -2
  194. ccxt/pro/bitmex.py +3 -3
  195. ccxt/pro/bitpanda.py +3 -3
  196. ccxt/pro/bitrue.py +2 -2
  197. ccxt/pro/bitstamp.py +2 -2
  198. ccxt/pro/bittrex.py +3 -3
  199. ccxt/pro/bitvavo.py +3 -3
  200. ccxt/pro/blockchaincom.py +2 -2
  201. ccxt/pro/bybit.py +4 -4
  202. ccxt/pro/cex.py +3 -3
  203. ccxt/pro/coinbasepro.py +3 -3
  204. ccxt/pro/coinex.py +2 -2
  205. ccxt/pro/cryptocom.py +5 -5
  206. ccxt/pro/deribit.py +3 -3
  207. ccxt/pro/exmo.py +2 -2
  208. ccxt/pro/gate.py +3 -3
  209. ccxt/pro/gemini.py +2 -2
  210. ccxt/pro/hitbtc.py +4 -4
  211. ccxt/pro/hollaex.py +3 -3
  212. ccxt/pro/htx.py +3 -3
  213. ccxt/pro/idex.py +3 -3
  214. ccxt/pro/kraken.py +7 -7
  215. ccxt/pro/krakenfutures.py +4 -4
  216. ccxt/pro/kucoin.py +3 -3
  217. ccxt/pro/kucoinfutures.py +3 -3
  218. ccxt/pro/mexc.py +3 -3
  219. ccxt/pro/okcoin.py +2 -2
  220. ccxt/pro/okx.py +6 -6
  221. ccxt/pro/phemex.py +3 -3
  222. ccxt/pro/poloniex.py +3 -3
  223. ccxt/pro/poloniexfutures.py +3 -3
  224. ccxt/pro/probit.py +3 -3
  225. ccxt/pro/wazirx.py +3 -3
  226. ccxt/pro/whitebit.py +3 -3
  227. ccxt/pro/woo.py +2 -2
  228. ccxt/probit.py +22 -22
  229. ccxt/test/base/test_shared_methods.py +3 -3
  230. ccxt/test/test_async.py +543 -535
  231. ccxt/test/test_sync.py +542 -534
  232. ccxt/tidex.py +15 -15
  233. ccxt/timex.py +20 -20
  234. ccxt/tokocrypto.py +16 -16
  235. ccxt/upbit.py +15 -15
  236. ccxt/wavesexchange.py +12 -12
  237. ccxt/wazirx.py +13 -13
  238. ccxt/whitebit.py +26 -26
  239. ccxt/woo.py +47 -47
  240. ccxt/yobit.py +8 -8
  241. ccxt/zaif.py +10 -10
  242. ccxt/zonda.py +16 -16
  243. {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/METADATA +10 -8
  244. ccxt-4.1.56.dist-info/RECORD +449 -0
  245. ccxt/async_support/bitstamp1.py +0 -402
  246. ccxt/async_support/lbank2.py +0 -2620
  247. ccxt/bitstamp1.py +0 -402
  248. ccxt/lbank2.py +0 -2619
  249. ccxt-4.1.54.dist-info/RECORD +0 -453
  250. {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/WHEEL +0 -0
  251. {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
- Numeric = Union[None, str, float, int, Decimal]
44
- String = Optional[str]
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: Numeric
53
- used: Numeric
54
- total: Numeric
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: Numeric
60
- datetime: String
61
- id: String
62
- order: String
63
- price: Numeric
58
+ amount: Num
59
+ datetime: Str
60
+ id: Str
61
+ order: Str
62
+ price: Num
64
63
  timestamp: Int
65
- type: String
66
- side: String
67
- symbol: String
68
- takerOrMaker: String
69
- cost: Numeric
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: String
76
- id: String
74
+ symbol: Str
75
+ id: Str
77
76
  timestamp: Int
78
- datetime: String
79
- contracts: Numeric
80
- contractSize: Numeric
81
- side: String
82
- notional: Numeric
83
- leverage: Numeric
84
- unrealizedPnl: Numeric
85
- realizedPnl: Numeric
86
- collateral: Numeric
87
- entryPrice: Numeric
88
- markPrice: Numeric
89
- liquidationPrice: Numeric
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: Numeric
92
- initialMargin: Numeric
93
- initialMarginPercentage: Numeric
94
- marginMode: String
95
- marginRatio: Numeric
90
+ maintenanceMargin: Num
91
+ initialMargin: Num
92
+ initialMarginPercentage: Num
93
+ marginMode: Str
94
+ marginRatio: Num
96
95
  lastUpdateTimestamp: Int
97
- lastPrice: Numeric
98
- percentage: Numeric
99
- stopLossPrice: Numeric
100
- takeProfitPrice: Numeric
96
+ lastPrice: Num
97
+ percentage: Num
98
+ stopLossPrice: Num
99
+ takeProfitPrice: Num
101
100
 
102
101
 
103
102
  class OrderRequest(TypedDict):
104
- symbol: String
105
- type: String
106
- side: String
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: String
115
- clientOrderId: String
116
- datetime: String
113
+ id: Str
114
+ clientOrderId: Str
115
+ datetime: Str
117
116
  timestamp: Int
118
117
  lastTradeTimestamp: Int
119
118
  lastUpdateTimestamp: Int
120
- status: String
121
- symbol: String
122
- type: String
123
- timeInForce: String
119
+ status: Str
120
+ symbol: Str
121
+ type: Str
122
+ timeInForce: Str
124
123
  side: OrderSide
125
- price: Numeric
126
- average: Numeric
127
- amount: Numeric
128
- filled: Numeric
129
- remaining: Numeric
130
- stopPrice: Numeric
131
- takeProfitPrice: Numeric
132
- stopLossPrice: Numeric
133
- cost: Numeric
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: String
141
- code: String
139
+ symbol: Str
140
+ code: Str
142
141
  timestamp: Int
143
- datetime: String
144
- id: String
145
- amount: Numeric
142
+ datetime: Str
143
+ id: Str
144
+ amount: Num
146
145
 
147
146
 
148
147
  class Balances(Dict[str, Balance]):
149
- datetime: String
148
+ datetime: Str
150
149
  timestamp: Int
151
150
 
152
151
 
153
152
  class OrderBook(TypedDict):
154
- asks: List[Numeric]
155
- bids: List[Numeric]
156
- datetime: String
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: String
164
- txid: String
162
+ id: Str
163
+ txid: Str
165
164
  timestamp: Int
166
- datetime: String
167
- address: String
168
- addressFrom: String
169
- addressTo: String
170
- tag: String
171
- tagFrom: String
172
- tagTo: String
173
- type: String
174
- amount: Numeric
175
- currency: String
176
- status: String
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: String
180
- comment: String
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: String
185
+ symbol: Str
187
186
  timestamp: Int
188
- datetime: String
189
- high: Numeric
190
- low: Numeric
191
- bid: Numeric
192
- bidVolume: Numeric
193
- ask: Numeric
194
- askVolume: Numeric
195
- vwap: Numeric
196
- open: Numeric
197
- close: Numeric
198
- last: Numeric
199
- previousClose: Numeric
200
- change: Numeric
201
- percentage: Numeric
202
- average: Numeric
203
- quoteVolume: Numeric
204
- baseVolume: Numeric
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: String
213
- marginMode: String
211
+ symbol: Str
212
+ marginMode: Str
214
213
 
215
214
 
216
215
  class Greeks(TypedDict):
217
- symbol: String
216
+ symbol: Str
218
217
  timestamp: Int
219
- datetime: String
220
- delta: Numeric
221
- gamma: Numeric
222
- theta: Numeric
223
- vega: Numeric
224
- rho: Numeric
225
- bidSize: Numeric
226
- askSize: Numeric
227
- bidImpliedVolatility: Numeric
228
- askImpliedVolatility: Numeric
229
- markImpliedVolatility: Numeric
230
- bidPrice: Numeric
231
- askPrice: Numeric
232
- markPrice: Numeric
233
- lastPrice: Numeric
234
- underlyingPrice: Numeric
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: String
241
- symbol: String
242
- base: String
243
- quote: String
244
- baseId: String
245
- quoteId: String
239
+ id: Str
240
+ symbol: Str
241
+ base: Str
242
+ quote: Str
243
+ baseId: Str
244
+ quoteId: Str
246
245
  active: Bool
247
- type: String
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: String
255
- settleId: String
256
- contractSize: Numeric
253
+ settle: Str
254
+ settleId: Str
255
+ contractSize: Num
257
256
  linear: bool
258
257
  inverse: bool
259
- expiry: Numeric
260
- expiryDatetime: String
261
- strike: Numeric
262
- optionType: String
263
- taker: Numeric
264
- maker: Numeric
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: String
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: String
275
- code: String
276
- precision: Numeric
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, String, Strings, Ticker, Tickers, Trade, Transaction
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
- if takerOrderId is not None:
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: String = None, params={}):
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: String = None, params={}):
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: String = None, params={}):
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: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
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: String = None, since: Int = None, limit: Int = None, params={}):
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: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
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: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
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: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
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: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
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,