gate-io-api 0.0.86__py3-none-any.whl → 0.0.88__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 gate-io-api might be problematic. Click here for more details.

gate/ccxt/__init__.py CHANGED
@@ -26,7 +26,7 @@ sys.modules['ccxt'] = ccxt_module
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
29
- __version__ = '4.5.4'
29
+ __version__ = '4.5.5'
30
30
 
31
31
  # ----------------------------------------------------------------------------
32
32
 
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
11
- __version__ = '4.5.4'
11
+ __version__ = '4.5.5'
12
12
 
13
13
  # -----------------------------------------------------------------------------
14
14
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.5.4'
5
+ __version__ = '4.5.5'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -645,7 +645,7 @@ class Exchange(BaseExchange):
645
645
  # ########################################################################
646
646
  # ########################################################################
647
647
 
648
- # METHODS BELOW THIS LINE ARE TRANSPILED FROM JAVASCRIPT TO PYTHON AND PHP
648
+ # METHODS BELOW THIS LINE ARE TRANSPILED FROM TYPESCRIPT
649
649
 
650
650
  async def fetch_accounts(self, params={}):
651
651
  raise NotSupported(self.id + ' fetchAccounts() is not supported yet')
@@ -2861,6 +2861,14 @@ class gate(Exchange, ImplicitAPI):
2861
2861
 
2862
2862
  async def fetch_balance(self, params={}) -> Balances:
2863
2863
  """
2864
+
2865
+ https://www.gate.com/docs/developers/apiv4/en/#margin-account-list
2866
+ https://www.gate.com/docs/developers/apiv4/en/#get-unified-account-information
2867
+ https://www.gate.com/docs/developers/apiv4/en/#list-spot-trading-accounts
2868
+ https://www.gate.com/docs/developers/apiv4/en/#get-futures-account
2869
+ https://www.gate.com/docs/developers/apiv4/en/#get-futures-account-2
2870
+ https://www.gate.com/docs/developers/apiv4/en/#query-account-information
2871
+
2864
2872
  :param dict [params]: exchange specific parameters
2865
2873
  :param str [params.type]: spot, margin, swap or future, if not provided self.options['defaultType'] is used
2866
2874
  :param str [params.settle]: 'btc' or 'usdt' - settle currency for perpetual swap and future - default="usdt" for swap and "btc" for future
@@ -3101,7 +3109,7 @@ class gate(Exchange, ImplicitAPI):
3101
3109
  result: dict = {
3102
3110
  'info': response,
3103
3111
  }
3104
- isolated = marginMode == 'margin'
3112
+ isolated = marginMode == 'margin' and type == 'spot'
3105
3113
  data = response
3106
3114
  if 'balances' in data: # True for cross_margin and unified
3107
3115
  flatBalances = []
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.5.4'
7
+ __version__ = '4.5.5'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -1383,9 +1383,9 @@ class Exchange(object):
1383
1383
  return msgHash
1384
1384
 
1385
1385
  @staticmethod
1386
- def starknet_sign (hash, pri):
1386
+ def starknet_sign (msg_hash, pri):
1387
1387
  # // TODO: unify to ecdsa
1388
- r, s = message_signature(hash, pri)
1388
+ r, s = message_signature(msg_hash, pri)
1389
1389
  return Exchange.json([hex(r), hex(s)])
1390
1390
 
1391
1391
  @staticmethod
@@ -1916,7 +1916,7 @@ class Exchange(object):
1916
1916
  # ########################################################################
1917
1917
  # ########################################################################
1918
1918
 
1919
- # METHODS BELOW THIS LINE ARE TRANSPILED FROM JAVASCRIPT TO PYTHON AND PHP
1919
+ # METHODS BELOW THIS LINE ARE TRANSPILED FROM TYPESCRIPT
1920
1920
 
1921
1921
  def describe(self) -> Any:
1922
1922
  return {
@@ -3343,6 +3343,12 @@ class Exchange(object):
3343
3343
  self.baseCurrencies = sourceExchange.baseCurrencies
3344
3344
  self.quoteCurrencies = sourceExchange.quoteCurrencies
3345
3345
  self.codes = sourceExchange.codes
3346
+ # check marketHelperProps
3347
+ sourceExchangeHelpers = self.safe_list(sourceExchange.options, 'marketHelperProps', [])
3348
+ for i in range(0, len(sourceExchangeHelpers)):
3349
+ helper = sourceExchangeHelpers[i]
3350
+ if sourceExchange.options[helper] is not None:
3351
+ self.options[helper] = sourceExchange.options[helper]
3346
3352
  return self
3347
3353
 
3348
3354
  def get_describe_for_extended_ws_exchange(self, currentRestInstance: Any, parentRestInstance: Any, wsBaseDescribe: dict):
@@ -6783,6 +6789,15 @@ class Exchange(object):
6783
6789
  values = list(uniqueResult.values())
6784
6790
  return values
6785
6791
 
6792
+ def remove_keys_from_dict(self, dict: dict, removeKeys: List[str]):
6793
+ keys = list(dict.keys())
6794
+ newDict = {}
6795
+ for i in range(0, len(keys)):
6796
+ key = keys[i]
6797
+ if not self.in_array(key, removeKeys):
6798
+ newDict[key] = dict[key]
6799
+ return newDict
6800
+
6786
6801
  def handle_until_option(self, key: str, request, params, multiplier=1):
6787
6802
  until = self.safe_integer_2(params, 'until', 'till')
6788
6803
  if until is not None:
gate/ccxt/gate.py CHANGED
@@ -2860,6 +2860,14 @@ class gate(Exchange, ImplicitAPI):
2860
2860
 
2861
2861
  def fetch_balance(self, params={}) -> Balances:
2862
2862
  """
2863
+
2864
+ https://www.gate.com/docs/developers/apiv4/en/#margin-account-list
2865
+ https://www.gate.com/docs/developers/apiv4/en/#get-unified-account-information
2866
+ https://www.gate.com/docs/developers/apiv4/en/#list-spot-trading-accounts
2867
+ https://www.gate.com/docs/developers/apiv4/en/#get-futures-account
2868
+ https://www.gate.com/docs/developers/apiv4/en/#get-futures-account-2
2869
+ https://www.gate.com/docs/developers/apiv4/en/#query-account-information
2870
+
2863
2871
  :param dict [params]: exchange specific parameters
2864
2872
  :param str [params.type]: spot, margin, swap or future, if not provided self.options['defaultType'] is used
2865
2873
  :param str [params.settle]: 'btc' or 'usdt' - settle currency for perpetual swap and future - default="usdt" for swap and "btc" for future
@@ -3100,7 +3108,7 @@ class gate(Exchange, ImplicitAPI):
3100
3108
  result: dict = {
3101
3109
  'info': response,
3102
3110
  }
3103
- isolated = marginMode == 'margin'
3111
+ isolated = marginMode == 'margin' and type == 'spot'
3104
3112
  data = response
3105
3113
  if 'balances' in data: # True for cross_margin and unified
3106
3114
  flatBalances = []
gate/ccxt/pro/__init__.py CHANGED
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
11
- __version__ = '4.5.4'
11
+ __version__ = '4.5.5'
12
12
 
13
13
  # ----------------------------------------------------------------------------
14
14
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gate-io-api
3
- Version: 0.0.86
3
+ Version: 0.0.88
4
4
  Summary: gate crypto exchange api client
5
5
  Project-URL: Homepage, https://github.com/ccxt/ccxt
6
6
  Project-URL: Issues, https://github.com/ccxt/ccxt
@@ -1,11 +1,11 @@
1
1
  gate/__init__.py,sha256=rmRavmagjlyk7Z5zGWWJiY8tfYIPsk04hRzC4SYJOzA,222
2
- gate/ccxt/__init__.py,sha256=i3CZmpHc7MyEMUCc7MAmDc_pBJlNJCUi_x1fBJTW-PM,6126
3
- gate/ccxt/gate.py,sha256=zCZJMYkxUE3qsy2q8Mo--ketScdWr7cmMji8hLduaj8,354225
2
+ gate/ccxt/__init__.py,sha256=PFkVSDcpB0bNe46DvY_3CN_irsG8-DZ4ogxctbFadgI,6126
3
+ gate/ccxt/gate.py,sha256=twM0HtspU97B_EUDrojZZVRF-wIfCkdOn8q7bsDtnlg,354723
4
4
  gate/ccxt/abstract/gate.py,sha256=MrRMycFEpZKJ6yC7qi0p_qcwZtU9WJi5bBbVllskGoA,45044
5
- gate/ccxt/async_support/__init__.py,sha256=PwMxJHb_0srPtajXR1qR2ykJurEZYeycFSV07Cot1Eg,4859
6
- gate/ccxt/async_support/gate.py,sha256=JkMRmZsHy5HesfqJUjJBqWlAydRsuJxJBLoPv2uwUPQ,356190
5
+ gate/ccxt/async_support/__init__.py,sha256=HJyuEBy1bx3cfrhl0FnA2jPSyGq8InU3cC3s3_L4DGY,4859
6
+ gate/ccxt/async_support/gate.py,sha256=hmGrxNzI4w_gRdaLlVCEV0bV4gz3sd2tJH5rdXc-2jg,356688
7
7
  gate/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
8
- gate/ccxt/async_support/base/exchange.py,sha256=yg4s0ITgw7YAAbfTHxBzRQo2cZtJj7BCvaUgMiUuvnw,121450
8
+ gate/ccxt/async_support/base/exchange.py,sha256=zcjR7MUn8V80r5FKX8ifKeOXMg7cNSuEfxbhZ6PLteY,121432
9
9
  gate/ccxt/async_support/base/throttler.py,sha256=tvDVcdRUVYi8fZRlEcnqtgzcgB_KMUMRs5Pu8tuU-tU,1847
10
10
  gate/ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
11
11
  gate/ccxt/async_support/base/ws/cache.py,sha256=xf2VOtfUwloxSlIQ39M1RGZHWQzyS9IGhB5NX6cDcAc,8370
@@ -17,10 +17,10 @@ gate/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9prod
17
17
  gate/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
18
18
  gate/ccxt/base/decimal_to_precision.py,sha256=3XI30u9YudHbTA438397u5rkdlXa3atxwZEfUus3C4k,6803
19
19
  gate/ccxt/base/errors.py,sha256=OGhWNvNtRlJOzFx-n1x3ZjTnaPpfWH0Vc0xACS-MeDw,5012
20
- gate/ccxt/base/exchange.py,sha256=-Kn1sp6UDgjrpACqsX-mYpp-e3amK3UoMFSCai7exkM,337938
20
+ gate/ccxt/base/exchange.py,sha256=pEYq-RPWeigwt4gmtNlP-wF7G-KD4NsY28n6YYIvBTE,338594
21
21
  gate/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
22
22
  gate/ccxt/base/types.py,sha256=Gvbogh9i7pPH7Z18xesYeDPribqqwq8uKpOv-YODFBs,11505
23
- gate/ccxt/pro/__init__.py,sha256=zBEzY7j6U6HBke9SVEgGNrQOoSRkmkL0839vvneyUbI,4173
23
+ gate/ccxt/pro/__init__.py,sha256=Zrl_lD8Z44fz6rhLY4s1-HtoF_EX54XtEyhThFQzqSY,4173
24
24
  gate/ccxt/pro/gate.py,sha256=Pl64TJO43NcLrqDGs2oU16bPfFqIjOHllJTkpGMuErI,89805
25
25
  gate/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
26
26
  gate/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
@@ -281,6 +281,6 @@ gate/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWnX2u
281
281
  gate/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
282
282
  gate/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
283
283
  gate/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
284
- gate_io_api-0.0.86.dist-info/METADATA,sha256=wmI2e9jhHn2-9ytaUHrGSxQWbjMR5QWbMjcOWa-WjRM,26827
285
- gate_io_api-0.0.86.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
- gate_io_api-0.0.86.dist-info/RECORD,,
284
+ gate_io_api-0.0.88.dist-info/METADATA,sha256=itcJABaJ2SqBVakM_5HdGSqmbDBPrDj44AXxLXar8kY,26827
285
+ gate_io_api-0.0.88.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
+ gate_io_api-0.0.88.dist-info/RECORD,,