ccxt 4.4.30__py2.py3-none-any.whl → 4.4.32__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 +1 -1
- ccxt/ace.py +36 -12
- ccxt/alpaca.py +62 -22
- ccxt/ascendex.py +65 -30
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +36 -12
- ccxt/async_support/alpaca.py +62 -22
- ccxt/async_support/ascendex.py +65 -30
- ccxt/async_support/base/exchange.py +3 -3
- ccxt/async_support/base/ws/aiohttp_client.py +25 -3
- ccxt/async_support/bigone.py +71 -27
- ccxt/async_support/binance.py +555 -323
- ccxt/async_support/bingx.py +208 -108
- ccxt/async_support/bit2c.py +34 -12
- ccxt/async_support/bitbank.py +42 -14
- ccxt/async_support/bitbns.py +17 -9
- ccxt/async_support/bitfinex.py +68 -24
- ccxt/async_support/bitfinex2.py +116 -44
- ccxt/async_support/bitflyer.py +54 -18
- ccxt/async_support/bitget.py +277 -145
- ccxt/async_support/bithumb.py +39 -14
- ccxt/async_support/bitmart.py +145 -79
- ccxt/async_support/bitmex.py +90 -30
- ccxt/async_support/bitopro.py +66 -22
- ccxt/async_support/bitrue.py +109 -57
- ccxt/async_support/bitso.py +55 -19
- ccxt/async_support/bitstamp.py +84 -36
- ccxt/async_support/bitteam.py +51 -17
- ccxt/async_support/bitvavo.py +57 -22
- ccxt/async_support/bl3p.py +26 -10
- ccxt/async_support/blockchaincom.py +63 -21
- ccxt/async_support/blofin.py +95 -38
- ccxt/async_support/btcalpha.py +48 -16
- ccxt/async_support/btcbox.py +27 -9
- ccxt/async_support/btcmarkets.py +57 -19
- ccxt/async_support/btcturk.py +36 -12
- ccxt/async_support/bybit.py +251 -95
- ccxt/async_support/cex.py +65 -22
- ccxt/async_support/coinbase.py +138 -56
- ccxt/async_support/coinbaseexchange.py +76 -28
- ccxt/async_support/coinbaseinternational.py +75 -27
- ccxt/async_support/coincatch.py +191 -97
- ccxt/async_support/coincheck.py +33 -11
- ccxt/async_support/coinex.py +212 -101
- ccxt/async_support/coinlist.py +87 -30
- ccxt/async_support/coinmate.py +55 -24
- ccxt/async_support/coinmetro.py +52 -18
- ccxt/async_support/coinone.py +27 -10
- ccxt/async_support/coinsph.py +73 -27
- ccxt/async_support/coinspot.py +25 -9
- ccxt/async_support/cryptocom.py +103 -38
- ccxt/async_support/currencycom.py +70 -23
- ccxt/async_support/delta.py +90 -30
- ccxt/async_support/deribit.py +131 -50
- ccxt/async_support/digifinex.py +114 -51
- ccxt/async_support/exmo.py +104 -45
- ccxt/async_support/gate.py +313 -157
- ccxt/async_support/gemini.py +57 -20
- ccxt/async_support/hashkey.py +151 -66
- ccxt/async_support/hitbtc.py +157 -74
- ccxt/async_support/hollaex.py +76 -25
- ccxt/async_support/htx.py +297 -240
- ccxt/async_support/huobijp.py +1 -0
- ccxt/async_support/hyperliquid.py +94 -38
- ccxt/async_support/idex.py +73 -24
- ccxt/async_support/independentreserve.py +12 -5
- ccxt/async_support/indodax.py +54 -17
- ccxt/async_support/kraken.py +108 -36
- ccxt/async_support/krakenfutures.py +88 -34
- ccxt/async_support/kucoin.py +214 -110
- ccxt/async_support/kucoinfutures.py +209 -64
- ccxt/async_support/kuna.py +80 -39
- ccxt/async_support/latoken.py +70 -33
- ccxt/async_support/lbank.py +89 -38
- ccxt/async_support/luno.py +54 -19
- ccxt/async_support/lykke.py +54 -19
- ccxt/async_support/mercado.py +1 -0
- ccxt/async_support/mexc.py +226 -108
- ccxt/async_support/ndax.py +58 -19
- ccxt/async_support/novadax.py +67 -22
- ccxt/async_support/oceanex.py +58 -19
- ccxt/async_support/okcoin.py +81 -38
- ccxt/async_support/okx.py +270 -109
- ccxt/async_support/onetrading.py +3 -1
- ccxt/async_support/oxfun.py +95 -36
- ccxt/async_support/p2b.py +49 -23
- ccxt/async_support/paradex.py +75 -27
- ccxt/async_support/paymium.py +31 -11
- ccxt/async_support/phemex.py +108 -56
- ccxt/async_support/poloniex.py +80 -30
- ccxt/async_support/poloniexfutures.py +72 -30
- ccxt/async_support/probit.py +64 -22
- ccxt/async_support/timex.py +58 -19
- ccxt/async_support/tokocrypto.py +63 -22
- ccxt/async_support/tradeogre.py +7 -2
- ccxt/async_support/upbit.py +72 -25
- ccxt/async_support/vertex.py +74 -28
- ccxt/async_support/wavesexchange.py +32 -8
- ccxt/async_support/wazirx.py +51 -17
- ccxt/async_support/whitebit.py +105 -41
- ccxt/async_support/woo.py +162 -65
- ccxt/async_support/woofipro.py +119 -50
- ccxt/async_support/xt.py +150 -73
- ccxt/async_support/yobit.py +49 -16
- ccxt/async_support/zaif.py +30 -10
- ccxt/async_support/zonda.py +46 -16
- ccxt/base/exchange.py +47 -35
- ccxt/base/types.py +1 -0
- ccxt/bigone.py +71 -27
- ccxt/binance.py +555 -323
- ccxt/bingx.py +208 -108
- ccxt/bit2c.py +34 -12
- ccxt/bitbank.py +42 -14
- ccxt/bitbns.py +17 -9
- ccxt/bitfinex.py +68 -24
- ccxt/bitfinex2.py +116 -44
- ccxt/bitflyer.py +54 -18
- ccxt/bitget.py +277 -145
- ccxt/bithumb.py +39 -14
- ccxt/bitmart.py +145 -79
- ccxt/bitmex.py +90 -30
- ccxt/bitopro.py +66 -22
- ccxt/bitrue.py +109 -57
- ccxt/bitso.py +55 -19
- ccxt/bitstamp.py +84 -36
- ccxt/bitteam.py +51 -17
- ccxt/bitvavo.py +57 -22
- ccxt/bl3p.py +26 -10
- ccxt/blockchaincom.py +63 -21
- ccxt/blofin.py +95 -38
- ccxt/btcalpha.py +48 -16
- ccxt/btcbox.py +27 -9
- ccxt/btcmarkets.py +57 -19
- ccxt/btcturk.py +36 -12
- ccxt/bybit.py +251 -95
- ccxt/cex.py +65 -22
- ccxt/coinbase.py +138 -56
- ccxt/coinbaseexchange.py +76 -28
- ccxt/coinbaseinternational.py +75 -27
- ccxt/coincatch.py +191 -97
- ccxt/coincheck.py +33 -11
- ccxt/coinex.py +212 -101
- ccxt/coinlist.py +87 -30
- ccxt/coinmate.py +55 -24
- ccxt/coinmetro.py +52 -18
- ccxt/coinone.py +27 -10
- ccxt/coinsph.py +73 -27
- ccxt/coinspot.py +25 -9
- ccxt/cryptocom.py +103 -38
- ccxt/currencycom.py +70 -23
- ccxt/delta.py +90 -30
- ccxt/deribit.py +131 -50
- ccxt/digifinex.py +114 -51
- ccxt/exmo.py +104 -45
- ccxt/gate.py +313 -157
- ccxt/gemini.py +57 -20
- ccxt/hashkey.py +151 -66
- ccxt/hitbtc.py +157 -74
- ccxt/hollaex.py +76 -25
- ccxt/htx.py +297 -240
- ccxt/huobijp.py +1 -0
- ccxt/hyperliquid.py +94 -38
- ccxt/idex.py +73 -24
- ccxt/independentreserve.py +12 -5
- ccxt/indodax.py +54 -17
- ccxt/kraken.py +108 -36
- ccxt/krakenfutures.py +88 -34
- ccxt/kucoin.py +214 -110
- ccxt/kucoinfutures.py +209 -64
- ccxt/kuna.py +80 -39
- ccxt/latoken.py +70 -33
- ccxt/lbank.py +89 -38
- ccxt/luno.py +54 -19
- ccxt/lykke.py +54 -19
- ccxt/mercado.py +1 -0
- ccxt/mexc.py +226 -108
- ccxt/ndax.py +58 -19
- ccxt/novadax.py +67 -22
- ccxt/oceanex.py +58 -19
- ccxt/okcoin.py +81 -38
- ccxt/okx.py +270 -109
- ccxt/onetrading.py +3 -1
- ccxt/oxfun.py +95 -36
- ccxt/p2b.py +49 -23
- ccxt/paradex.py +75 -27
- ccxt/paymium.py +31 -11
- ccxt/phemex.py +108 -56
- ccxt/poloniex.py +80 -30
- ccxt/poloniexfutures.py +72 -30
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +15 -5
- ccxt/pro/ascendex.py +18 -6
- ccxt/pro/binance.py +204 -123
- ccxt/pro/bingx.py +44 -24
- ccxt/pro/bitfinex.py +13 -5
- ccxt/pro/bitget.py +76 -37
- ccxt/pro/bithumb.py +12 -4
- ccxt/pro/bitmart.py +44 -20
- ccxt/pro/bitmex.py +42 -14
- ccxt/pro/bitopro.py +15 -5
- ccxt/pro/bitrue.py +7 -3
- ccxt/pro/bitvavo.py +97 -62
- ccxt/pro/blockchaincom.py +18 -6
- ccxt/pro/blofin.py +36 -12
- ccxt/pro/bybit.py +100 -42
- ccxt/pro/cex.py +48 -16
- ccxt/pro/coinbase.py +32 -12
- ccxt/pro/coinbaseexchange.py +1 -1
- ccxt/pro/coinbaseinternational.py +34 -14
- ccxt/pro/coincatch.py +54 -19
- ccxt/pro/coincheck.py +6 -2
- ccxt/pro/coinex.py +40 -20
- ccxt/pro/coinone.py +9 -3
- ccxt/pro/cryptocom.py +71 -27
- ccxt/pro/deribit.py +36 -12
- ccxt/pro/exmo.py +10 -4
- ccxt/pro/gate.py +65 -31
- ccxt/pro/gemini.py +21 -7
- ccxt/pro/hashkey.py +27 -9
- ccxt/pro/hitbtc.py +61 -37
- ccxt/pro/hollaex.py +15 -5
- ccxt/pro/htx.py +39 -21
- ccxt/pro/hyperliquid.py +41 -14
- ccxt/pro/kraken.py +49 -17
- ccxt/pro/krakenfutures.py +47 -24
- ccxt/pro/kucoin.py +60 -31
- ccxt/pro/kucoinfutures.py +41 -19
- ccxt/pro/lbank.py +27 -9
- ccxt/pro/luno.py +3 -1
- ccxt/pro/mexc.py +36 -19
- ccxt/pro/ndax.py +12 -4
- ccxt/pro/okcoin.py +18 -6
- ccxt/pro/okx.py +76 -28
- ccxt/pro/onetrading.py +21 -7
- ccxt/pro/oxfun.py +54 -20
- ccxt/pro/p2b.py +23 -11
- ccxt/pro/paradex.py +12 -4
- ccxt/pro/phemex.py +31 -19
- ccxt/pro/poloniex.py +50 -22
- ccxt/pro/poloniexfutures.py +17 -7
- ccxt/pro/probit.py +18 -6
- ccxt/pro/upbit.py +25 -9
- ccxt/pro/vertex.py +20 -6
- ccxt/pro/wazirx.py +21 -7
- ccxt/pro/whitebit.py +25 -9
- ccxt/pro/woo.py +32 -12
- ccxt/pro/woofipro.py +35 -13
- ccxt/pro/xt.py +46 -26
- ccxt/probit.py +64 -22
- ccxt/timex.py +58 -19
- ccxt/tokocrypto.py +63 -22
- ccxt/tradeogre.py +7 -2
- ccxt/upbit.py +72 -25
- ccxt/vertex.py +74 -28
- ccxt/wavesexchange.py +32 -8
- ccxt/wazirx.py +51 -17
- ccxt/whitebit.py +105 -41
- ccxt/woo.py +162 -65
- ccxt/woofipro.py +119 -50
- ccxt/xt.py +150 -73
- ccxt/yobit.py +49 -16
- ccxt/zaif.py +30 -10
- ccxt/zonda.py +46 -16
- {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/METADATA +11 -5
- {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/RECORD +268 -268
- {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/WHEEL +0 -0
- {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/top_level.txt +0 -0
ccxt/base/exchange.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.32'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -88,6 +88,14 @@ import gzip
|
|
88
88
|
import hashlib
|
89
89
|
import hmac
|
90
90
|
import io
|
91
|
+
|
92
|
+
# load orjson if available, otherwise default to json
|
93
|
+
orjson = None
|
94
|
+
try:
|
95
|
+
import orjson as orjson
|
96
|
+
except ImportError:
|
97
|
+
pass
|
98
|
+
|
91
99
|
import json
|
92
100
|
import math
|
93
101
|
import random
|
@@ -486,9 +494,11 @@ class Exchange(object):
|
|
486
494
|
return response_body.strip()
|
487
495
|
|
488
496
|
def on_json_response(self, response_body):
|
489
|
-
if self.quoteJsonNumbers:
|
497
|
+
if self.quoteJsonNumbers and orjson is None:
|
490
498
|
return json.loads(response_body, parse_float=str, parse_int=str)
|
491
499
|
else:
|
500
|
+
if orjson:
|
501
|
+
return orjson.loads(response_body)
|
492
502
|
return json.loads(response_body)
|
493
503
|
|
494
504
|
def fetch(self, url, method='GET', headers=None, body=None):
|
@@ -1433,6 +1443,8 @@ class Exchange(object):
|
|
1433
1443
|
|
1434
1444
|
@staticmethod
|
1435
1445
|
def json(data, params=None):
|
1446
|
+
if orjson:
|
1447
|
+
return orjson.dumps(data).decode('utf-8')
|
1436
1448
|
return json.dumps(data, separators=(',', ':'), cls=SafeJSONEncoder)
|
1437
1449
|
|
1438
1450
|
@staticmethod
|
@@ -2097,7 +2109,7 @@ class Exchange(object):
|
|
2097
2109
|
|
2098
2110
|
def safe_bool_n(self, dictionaryOrList, keys: List[IndexType], defaultValue: bool = None):
|
2099
2111
|
"""
|
2100
|
-
|
2112
|
+
@ignore
|
2101
2113
|
safely extract boolean value from dictionary or list
|
2102
2114
|
:returns bool | None:
|
2103
2115
|
"""
|
@@ -2108,7 +2120,7 @@ class Exchange(object):
|
|
2108
2120
|
|
2109
2121
|
def safe_bool_2(self, dictionary, key1: IndexType, key2: IndexType, defaultValue: bool = None):
|
2110
2122
|
"""
|
2111
|
-
|
2123
|
+
@ignore
|
2112
2124
|
safely extract boolean value from dictionary or list
|
2113
2125
|
:returns bool | None:
|
2114
2126
|
"""
|
@@ -2116,7 +2128,7 @@ class Exchange(object):
|
|
2116
2128
|
|
2117
2129
|
def safe_bool(self, dictionary, key: IndexType, defaultValue: bool = None):
|
2118
2130
|
"""
|
2119
|
-
|
2131
|
+
@ignore
|
2120
2132
|
safely extract boolean value from dictionary or list
|
2121
2133
|
:returns bool | None:
|
2122
2134
|
"""
|
@@ -2124,7 +2136,7 @@ class Exchange(object):
|
|
2124
2136
|
|
2125
2137
|
def safe_dict_n(self, dictionaryOrList, keys: List[IndexType], defaultValue: dict = None):
|
2126
2138
|
"""
|
2127
|
-
|
2139
|
+
@ignore
|
2128
2140
|
safely extract a dictionary from dictionary or list
|
2129
2141
|
:returns dict | None:
|
2130
2142
|
"""
|
@@ -2138,7 +2150,7 @@ class Exchange(object):
|
|
2138
2150
|
|
2139
2151
|
def safe_dict(self, dictionary, key: IndexType, defaultValue: dict = None):
|
2140
2152
|
"""
|
2141
|
-
|
2153
|
+
@ignore
|
2142
2154
|
safely extract a dictionary from dictionary or list
|
2143
2155
|
:returns dict | None:
|
2144
2156
|
"""
|
@@ -2146,7 +2158,7 @@ class Exchange(object):
|
|
2146
2158
|
|
2147
2159
|
def safe_dict_2(self, dictionary, key1: IndexType, key2: str, defaultValue: dict = None):
|
2148
2160
|
"""
|
2149
|
-
|
2161
|
+
@ignore
|
2150
2162
|
safely extract a dictionary from dictionary or list
|
2151
2163
|
:returns dict | None:
|
2152
2164
|
"""
|
@@ -2154,7 +2166,7 @@ class Exchange(object):
|
|
2154
2166
|
|
2155
2167
|
def safe_list_n(self, dictionaryOrList, keys: List[IndexType], defaultValue: List[Any] = None):
|
2156
2168
|
"""
|
2157
|
-
|
2169
|
+
@ignore
|
2158
2170
|
safely extract an Array from dictionary or list
|
2159
2171
|
:returns Array | None:
|
2160
2172
|
"""
|
@@ -2167,7 +2179,7 @@ class Exchange(object):
|
|
2167
2179
|
|
2168
2180
|
def safe_list_2(self, dictionaryOrList, key1: IndexType, key2: str, defaultValue: List[Any] = None):
|
2169
2181
|
"""
|
2170
|
-
|
2182
|
+
@ignore
|
2171
2183
|
safely extract an Array from dictionary or list
|
2172
2184
|
:returns Array | None:
|
2173
2185
|
"""
|
@@ -2175,7 +2187,7 @@ class Exchange(object):
|
|
2175
2187
|
|
2176
2188
|
def safe_list(self, dictionaryOrList, key: IndexType, defaultValue: List[Any] = None):
|
2177
2189
|
"""
|
2178
|
-
|
2190
|
+
@ignore
|
2179
2191
|
safely extract an Array from dictionary or list
|
2180
2192
|
:returns Array | None:
|
2181
2193
|
"""
|
@@ -3738,7 +3750,7 @@ class Exchange(object):
|
|
3738
3750
|
|
3739
3751
|
def network_code_to_id(self, networkCode: str, currencyCode: Str = None):
|
3740
3752
|
"""
|
3741
|
-
|
3753
|
+
@ignore
|
3742
3754
|
tries to convert the provided networkCode(which is expected to be an unified network code) to a network id. In order to achieve self, derived class needs to have 'options->networks' defined.
|
3743
3755
|
:param str networkCode: unified network code
|
3744
3756
|
:param str currencyCode: unified currency code, but self argument is not required by default, unless there is an exchange(like huobi) that needs an override of the method to be able to pass currencyCode argument additionally
|
@@ -3786,7 +3798,7 @@ class Exchange(object):
|
|
3786
3798
|
|
3787
3799
|
def network_id_to_code(self, networkId: Str = None, currencyCode: Str = None):
|
3788
3800
|
"""
|
3789
|
-
|
3801
|
+
@ignore
|
3790
3802
|
tries to convert the provided exchange-specific networkId to an unified network Code. In order to achieve self, derived class needs to have "options['networksById']" defined.
|
3791
3803
|
:param str networkId: exchange specific network id/title, like: TRON, Trc-20, usdt-erc20, etc
|
3792
3804
|
:param str|None currencyCode: unified currency code, but self argument is not required by default, unless there is an exchange(like huobi) that needs an override of the method to be able to pass currencyCode argument additionally
|
@@ -4316,7 +4328,7 @@ class Exchange(object):
|
|
4316
4328
|
|
4317
4329
|
def check_required_credentials(self, error=True):
|
4318
4330
|
"""
|
4319
|
-
|
4331
|
+
@ignore
|
4320
4332
|
:param boolean error: raise an error that a credential is required if True
|
4321
4333
|
:returns boolean: True if all required credentials have been set, otherwise False or an error is thrown is param error=true
|
4322
4334
|
"""
|
@@ -4444,8 +4456,8 @@ class Exchange(object):
|
|
4444
4456
|
|
4445
4457
|
def handle_market_type_and_params(self, methodName: str, market: Market = None, params={}, defaultValue=None):
|
4446
4458
|
"""
|
4447
|
-
|
4448
|
-
|
4459
|
+
@ignore
|
4460
|
+
@param methodName the method calling handleMarketTypeAndParams
|
4449
4461
|
:param Market market:
|
4450
4462
|
:param dict params:
|
4451
4463
|
:param str [params.type]: type assigned by user
|
@@ -4491,7 +4503,7 @@ class Exchange(object):
|
|
4491
4503
|
|
4492
4504
|
def handle_margin_mode_and_params(self, methodName: str, params={}, defaultValue=None):
|
4493
4505
|
"""
|
4494
|
-
|
4506
|
+
@ignore
|
4495
4507
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4496
4508
|
:returns Array: the marginMode in lowercase by params["marginMode"], params["defaultMarginMode"] self.options["marginMode"] or self.options["defaultMarginMode"]
|
4497
4509
|
"""
|
@@ -5259,7 +5271,7 @@ class Exchange(object):
|
|
5259
5271
|
|
5260
5272
|
def parse_precision(self, precision: str):
|
5261
5273
|
"""
|
5262
|
-
|
5274
|
+
@ignore
|
5263
5275
|
:param str precision: The number of digits to the right of the decimal
|
5264
5276
|
:returns str: a string number equal to 1e-precision
|
5265
5277
|
"""
|
@@ -5275,7 +5287,7 @@ class Exchange(object):
|
|
5275
5287
|
|
5276
5288
|
def integer_precision_to_amount(self, precision: Str):
|
5277
5289
|
"""
|
5278
|
-
|
5290
|
+
@ignore
|
5279
5291
|
handles positive & negative numbers too. parsePrecision() does not handle negative numbers, but self method handles
|
5280
5292
|
:param str precision: The number of digits to the right of the decimal
|
5281
5293
|
:returns str: a string number equal to 1e-precision
|
@@ -5548,7 +5560,7 @@ class Exchange(object):
|
|
5548
5560
|
|
5549
5561
|
def is_post_only(self, isMarketOrder: bool, exchangeSpecificParam, params={}):
|
5550
5562
|
"""
|
5551
|
-
|
5563
|
+
@ignore
|
5552
5564
|
:param str type: Order type
|
5553
5565
|
:param boolean exchangeSpecificParam: exchange specific postOnly
|
5554
5566
|
:param dict [params]: exchange specific params
|
@@ -5573,7 +5585,7 @@ class Exchange(object):
|
|
5573
5585
|
|
5574
5586
|
def handle_post_only(self, isMarketOrder: bool, exchangeSpecificPostOnlyOption: bool, params: Any = {}):
|
5575
5587
|
"""
|
5576
|
-
|
5588
|
+
@ignore
|
5577
5589
|
:param str type: Order type
|
5578
5590
|
:param boolean exchangeSpecificBoolean: exchange specific postOnly
|
5579
5591
|
:param dict [params]: exchange specific params
|
@@ -5686,7 +5698,7 @@ class Exchange(object):
|
|
5686
5698
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
5687
5699
|
:param int [limit]: the maximum amount of candles to fetch
|
5688
5700
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5689
|
-
|
5701
|
+
@returns {} A list of candles ordered, open, high, low, close, None
|
5690
5702
|
"""
|
5691
5703
|
if self.has['fetchIndexOHLCV']:
|
5692
5704
|
request: dict = {
|
@@ -5716,8 +5728,8 @@ class Exchange(object):
|
|
5716
5728
|
|
5717
5729
|
def handle_time_in_force(self, params={}):
|
5718
5730
|
"""
|
5719
|
-
|
5720
|
-
|
5731
|
+
@ignore
|
5732
|
+
Must add timeInForce to self.options to use self method
|
5721
5733
|
:returns str: returns the exchange specific value for timeInForce
|
5722
5734
|
"""
|
5723
5735
|
timeInForce = self.safe_string_upper(params, 'timeInForce') # supported values GTC, IOC, PO
|
@@ -5730,8 +5742,8 @@ class Exchange(object):
|
|
5730
5742
|
|
5731
5743
|
def convert_type_to_account(self, account):
|
5732
5744
|
"""
|
5733
|
-
|
5734
|
-
|
5745
|
+
@ignore
|
5746
|
+
Must add accountsByType to self.options to use self method
|
5735
5747
|
:param str account: key for account name in self.options['accountsByType']
|
5736
5748
|
:returns: the exchange specific account name or the isolated margin id for transfers
|
5737
5749
|
"""
|
@@ -5747,7 +5759,7 @@ class Exchange(object):
|
|
5747
5759
|
|
5748
5760
|
def check_required_argument(self, methodName: str, argument, argumentName, options=[]):
|
5749
5761
|
"""
|
5750
|
-
|
5762
|
+
@ignore
|
5751
5763
|
:param str methodName: the name of the method that the argument is being checked for
|
5752
5764
|
:param str argument: the argument's actual value provided
|
5753
5765
|
:param str argumentName: the name of the argument being checked(for logging purposes)
|
@@ -5764,7 +5776,7 @@ class Exchange(object):
|
|
5764
5776
|
|
5765
5777
|
def check_required_margin_argument(self, methodName: str, symbol: Str, marginMode: str):
|
5766
5778
|
"""
|
5767
|
-
|
5779
|
+
@ignore
|
5768
5780
|
:param str symbol: unified symbol of the market
|
5769
5781
|
:param str methodName: name of the method that requires a symbol
|
5770
5782
|
:param str marginMode: is either 'isolated' or 'cross'
|
@@ -5776,7 +5788,7 @@ class Exchange(object):
|
|
5776
5788
|
|
5777
5789
|
def parse_deposit_withdraw_fees(self, response, codes: Strings = None, currencyIdKey=None):
|
5778
5790
|
"""
|
5779
|
-
|
5791
|
+
@ignore
|
5780
5792
|
:param object[]|dict response: unparsed response from the exchange
|
5781
5793
|
:param str[]|None codes: the unified currency codes to fetch transactions fees for, returns all currencies when None
|
5782
5794
|
:param str currencyIdKey: *should only be None when response is a dictionary* the object key that corresponds to the currency id
|
@@ -5816,7 +5828,7 @@ class Exchange(object):
|
|
5816
5828
|
|
5817
5829
|
def assign_default_deposit_withdraw_fees(self, fee, currency=None):
|
5818
5830
|
"""
|
5819
|
-
|
5831
|
+
@ignore
|
5820
5832
|
Takes a depositWithdrawFee structure and assigns the default values for withdraw and deposit
|
5821
5833
|
:param dict fee: A deposit withdraw fee structure
|
5822
5834
|
:param dict currency: A currency structure, the response from self.currency()
|
@@ -5841,7 +5853,7 @@ class Exchange(object):
|
|
5841
5853
|
|
5842
5854
|
def parse_incomes(self, incomes, market=None, since: Int = None, limit: Int = None):
|
5843
5855
|
"""
|
5844
|
-
|
5856
|
+
@ignore
|
5845
5857
|
parses funding fee info from exchange response
|
5846
5858
|
:param dict[] incomes: each item describes once instance of currency being received or paid
|
5847
5859
|
:param dict market: ccxt market
|
@@ -5872,7 +5884,7 @@ class Exchange(object):
|
|
5872
5884
|
|
5873
5885
|
def fetch_transactions(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
5874
5886
|
"""
|
5875
|
-
|
5887
|
+
@deprecated
|
5876
5888
|
*DEPRECATED* use fetchDepositsWithdrawals instead
|
5877
5889
|
:param str code: unified currency code for the currency of the deposit/withdrawals, default is None
|
5878
5890
|
:param int [since]: timestamp in ms of the earliest deposit/withdrawal, default is None
|
@@ -5887,14 +5899,14 @@ class Exchange(object):
|
|
5887
5899
|
|
5888
5900
|
def filter_by_array_positions(self, objects, key: IndexType, values=None, indexed=True):
|
5889
5901
|
"""
|
5890
|
-
|
5902
|
+
@ignore
|
5891
5903
|
Typed wrapper for filterByArray that returns a list of positions
|
5892
5904
|
"""
|
5893
5905
|
return self.filter_by_array(objects, key, values, indexed)
|
5894
5906
|
|
5895
5907
|
def filter_by_array_tickers(self, objects, key: IndexType, values=None, indexed=True):
|
5896
5908
|
"""
|
5897
|
-
|
5909
|
+
@ignore
|
5898
5910
|
Typed wrapper for filterByArray that returns a dictionary of tickers
|
5899
5911
|
"""
|
5900
5912
|
return self.filter_by_array(objects, key, values, indexed)
|
@@ -6178,7 +6190,7 @@ class Exchange(object):
|
|
6178
6190
|
|
6179
6191
|
def parse_liquidations(self, liquidations: List[dict], market: Market = None, since: Int = None, limit: Int = None):
|
6180
6192
|
"""
|
6181
|
-
|
6193
|
+
@ignore
|
6182
6194
|
parses liquidation info from the exchange response
|
6183
6195
|
:param dict[] liquidations: each item describes an instance of a liquidation event
|
6184
6196
|
:param dict market: ccxt market
|
ccxt/base/types.py
CHANGED
ccxt/bigone.py
CHANGED
@@ -475,7 +475,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
475
475
|
def fetch_markets(self, params={}) -> List[Market]:
|
476
476
|
"""
|
477
477
|
retrieves data on all markets for bigone
|
478
|
-
|
478
|
+
|
479
|
+
https://open.big.one/docs/spot_asset_pair.html
|
480
|
+
|
479
481
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
480
482
|
:returns dict[]: an array of objects representing market data
|
481
483
|
"""
|
@@ -736,7 +738,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
736
738
|
def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
737
739
|
"""
|
738
740
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
739
|
-
|
741
|
+
|
742
|
+
https://open.big.one/docs/spot_tickers.html
|
743
|
+
|
740
744
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
741
745
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
742
746
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -775,7 +779,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
775
779
|
def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
776
780
|
"""
|
777
781
|
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
778
|
-
|
782
|
+
|
783
|
+
https://open.big.one/docs/spot_tickers.html
|
784
|
+
|
779
785
|
:param str[] [symbols]: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
780
786
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
781
787
|
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -857,7 +863,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
857
863
|
def fetch_time(self, params={}):
|
858
864
|
"""
|
859
865
|
fetches the current integer timestamp in milliseconds from the exchange server
|
860
|
-
|
866
|
+
|
867
|
+
https://open.big.one/docs/spot_ping.html
|
868
|
+
|
861
869
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
862
870
|
:returns int: the current integer timestamp in milliseconds from the exchange server
|
863
871
|
"""
|
@@ -876,7 +884,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
876
884
|
def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
877
885
|
"""
|
878
886
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
879
|
-
|
887
|
+
|
888
|
+
https://open.big.one/docs/contract_misc.html#get-orderbook-snapshot
|
889
|
+
|
880
890
|
:param str symbol: unified symbol of the market to fetch the order book for
|
881
891
|
:param int [limit]: the maximum amount of order book entries to return
|
882
892
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1091,7 +1101,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
1091
1101
|
def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
1092
1102
|
"""
|
1093
1103
|
get the list of most recent trades for a particular symbol
|
1094
|
-
|
1104
|
+
|
1105
|
+
https://open.big.one/docs/spot_asset_pair_trade.html
|
1106
|
+
|
1095
1107
|
:param str symbol: unified symbol of the market to fetch trades for
|
1096
1108
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
1097
1109
|
:param int [limit]: the maximum amount of trades to fetch
|
@@ -1153,7 +1165,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
1153
1165
|
def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
|
1154
1166
|
"""
|
1155
1167
|
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
1156
|
-
|
1168
|
+
|
1169
|
+
https://open.big.one/docs/spot_asset_pair_candle.html
|
1170
|
+
|
1157
1171
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
1158
1172
|
:param str timeframe: the length of time each candle represents
|
1159
1173
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
@@ -1224,8 +1238,10 @@ class bigone(Exchange, ImplicitAPI):
|
|
1224
1238
|
def fetch_balance(self, params={}) -> Balances:
|
1225
1239
|
"""
|
1226
1240
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
1227
|
-
|
1228
|
-
|
1241
|
+
|
1242
|
+
https://open.big.one/docs/fund_accounts.html
|
1243
|
+
https://open.big.one/docs/spot_accounts.html
|
1244
|
+
|
1229
1245
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1230
1246
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
1231
1247
|
"""
|
@@ -1332,7 +1348,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
1332
1348
|
def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
|
1333
1349
|
"""
|
1334
1350
|
create a market buy order by providing the symbol and cost
|
1335
|
-
|
1351
|
+
|
1352
|
+
https://open.big.one/docs/spot_orders.html#create-order
|
1353
|
+
|
1336
1354
|
:param str symbol: unified symbol of the market to create an order in
|
1337
1355
|
:param float cost: how much you want to trade in units of the quote currency
|
1338
1356
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1348,7 +1366,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
1348
1366
|
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
1349
1367
|
"""
|
1350
1368
|
create a trade order
|
1351
|
-
|
1369
|
+
|
1370
|
+
https://open.big.one/docs/spot_orders.html#create-order
|
1371
|
+
|
1352
1372
|
:param str symbol: unified symbol of the market to create an order in
|
1353
1373
|
:param str type: 'market' or 'limit'
|
1354
1374
|
:param str side: 'buy' or 'sell'
|
@@ -1359,10 +1379,10 @@ class bigone(Exchange, ImplicitAPI):
|
|
1359
1379
|
:param bool [params.postOnly]: if True, the order will only be posted to the order book and not executed immediately
|
1360
1380
|
:param str [params.timeInForce]: "GTC", "IOC", or "PO"
|
1361
1381
|
:param float [params.cost]: *spot market buy only* the quote quantity that can be used alternative for the amount
|
1362
|
-
|
1363
|
-
|
1364
|
-
:param str operator: *stop order only* GTE or LTE(default)
|
1365
|
-
:param str client_order_id: must match ^[a-zA-Z0-9-_]{1,36}$ self regex. client_order_id is unique in 24 hours, If created 24 hours later and the order closed, it will be released and can be reused
|
1382
|
+
|
1383
|
+
EXCHANGE SPECIFIC PARAMETERS
|
1384
|
+
:param str [params.operator]: *stop order only* GTE or LTE(default)
|
1385
|
+
:param str [params.client_order_id]: must match ^[a-zA-Z0-9-_]{1,36}$ self regex. client_order_id is unique in 24 hours, If created 24 hours later and the order closed, it will be released and can be reused
|
1366
1386
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1367
1387
|
"""
|
1368
1388
|
self.load_markets()
|
@@ -1445,7 +1465,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
1445
1465
|
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1446
1466
|
"""
|
1447
1467
|
cancels an open order
|
1448
|
-
|
1468
|
+
|
1469
|
+
https://open.big.one/docs/spot_orders.html#cancel-order
|
1470
|
+
|
1449
1471
|
:param str id: order id
|
1450
1472
|
:param str symbol: Not used by bigone cancelOrder()
|
1451
1473
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1472,7 +1494,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
1472
1494
|
def cancel_all_orders(self, symbol: Str = None, params={}):
|
1473
1495
|
"""
|
1474
1496
|
cancel all open orders
|
1475
|
-
|
1497
|
+
|
1498
|
+
https://open.big.one/docs/spot_orders.html#cancel-all-orders
|
1499
|
+
|
1476
1500
|
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
1477
1501
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1478
1502
|
:returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -1518,7 +1542,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
1518
1542
|
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1519
1543
|
"""
|
1520
1544
|
fetches information on an order made by the user
|
1521
|
-
|
1545
|
+
|
1546
|
+
https://open.big.one/docs/spot_orders.html#get-one-order
|
1547
|
+
|
1522
1548
|
:param str id: the order id
|
1523
1549
|
:param str symbol: not used by bigone fetchOrder
|
1524
1550
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1533,7 +1559,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
1533
1559
|
def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1534
1560
|
"""
|
1535
1561
|
fetches information on multiple orders made by the user
|
1536
|
-
|
1562
|
+
|
1563
|
+
https://open.big.one/docs/spot_orders.html#get-user-orders-in-one-asset-pair
|
1564
|
+
|
1537
1565
|
:param str symbol: unified market symbol of the market orders were made in
|
1538
1566
|
:param int [since]: the earliest time in ms to fetch orders for
|
1539
1567
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -1580,7 +1608,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
1580
1608
|
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1581
1609
|
"""
|
1582
1610
|
fetch all trades made by the user
|
1583
|
-
|
1611
|
+
|
1612
|
+
https://open.big.one/docs/spot_trade.html#trades-of-user
|
1613
|
+
|
1584
1614
|
:param str symbol: unified market symbol
|
1585
1615
|
:param int [since]: the earliest time in ms to fetch trades for
|
1586
1616
|
:param int [limit]: the maximum number of trades structures to retrieve
|
@@ -1646,7 +1676,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
1646
1676
|
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1647
1677
|
"""
|
1648
1678
|
fetch all unfilled currently open orders
|
1649
|
-
|
1679
|
+
|
1680
|
+
https://open.big.one/docs/spot_orders.html#get-user-orders-in-one-asset-pair
|
1681
|
+
|
1650
1682
|
:param str symbol: unified market symbol
|
1651
1683
|
:param int [since]: the earliest time in ms to fetch open orders for
|
1652
1684
|
:param int [limit]: the maximum number of open orders structures to retrieve
|
@@ -1661,7 +1693,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
1661
1693
|
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1662
1694
|
"""
|
1663
1695
|
fetches information on multiple closed orders made by the user
|
1664
|
-
|
1696
|
+
|
1697
|
+
https://open.big.one/docs/spot_orders.html#get-user-orders-in-one-asset-pair
|
1698
|
+
|
1665
1699
|
:param str symbol: unified market symbol of the market orders were made in
|
1666
1700
|
:param int [since]: the earliest time in ms to fetch orders for
|
1667
1701
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -1708,7 +1742,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
1708
1742
|
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1709
1743
|
"""
|
1710
1744
|
fetch the deposit address for a currency associated with self account
|
1711
|
-
|
1745
|
+
|
1746
|
+
https://open.big.one/docs/spot_deposit.html#get-deposite-address-of-one-asset-of-user
|
1747
|
+
|
1712
1748
|
:param str code: unified currency code
|
1713
1749
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1714
1750
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
@@ -1856,7 +1892,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
1856
1892
|
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1857
1893
|
"""
|
1858
1894
|
fetch all deposits made to an account
|
1859
|
-
|
1895
|
+
|
1896
|
+
https://open.big.one/docs/spot_deposit.html#deposit-of-user
|
1897
|
+
|
1860
1898
|
:param str code: unified currency code
|
1861
1899
|
:param int [since]: the earliest time in ms to fetch deposits for
|
1862
1900
|
:param int [limit]: the maximum number of deposits structures to retrieve
|
@@ -1904,7 +1942,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
1904
1942
|
def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1905
1943
|
"""
|
1906
1944
|
fetch all withdrawals made from an account
|
1907
|
-
|
1945
|
+
|
1946
|
+
https://open.big.one/docs/spot_withdrawal.html#get-withdrawals-of-user
|
1947
|
+
|
1908
1948
|
:param str code: unified currency code
|
1909
1949
|
:param int [since]: the earliest time in ms to fetch withdrawals for
|
1910
1950
|
:param int [limit]: the maximum number of withdrawals structures to retrieve
|
@@ -1952,7 +1992,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
1952
1992
|
def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
1953
1993
|
"""
|
1954
1994
|
transfer currency internally between wallets on the same account
|
1955
|
-
|
1995
|
+
|
1996
|
+
https://open.big.one/docs/spot_transfer.html#transfer-of-user
|
1997
|
+
|
1956
1998
|
:param str code: unified currency code
|
1957
1999
|
:param float amount: amount to transfer
|
1958
2000
|
:param str fromAccount: 'SPOT', 'FUND', or 'CONTRACT'
|
@@ -2021,7 +2063,9 @@ class bigone(Exchange, ImplicitAPI):
|
|
2021
2063
|
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2022
2064
|
"""
|
2023
2065
|
make a withdrawal
|
2024
|
-
|
2066
|
+
|
2067
|
+
https://open.big.one/docs/spot_withdrawal.html#create-withdrawal-of-user
|
2068
|
+
|
2025
2069
|
:param str code: unified currency code
|
2026
2070
|
:param float amount: the amount to withdraw
|
2027
2071
|
:param str address: the address to withdraw to
|