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.
Files changed (268) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/ace.py +36 -12
  3. ccxt/alpaca.py +62 -22
  4. ccxt/ascendex.py +65 -30
  5. ccxt/async_support/__init__.py +1 -1
  6. ccxt/async_support/ace.py +36 -12
  7. ccxt/async_support/alpaca.py +62 -22
  8. ccxt/async_support/ascendex.py +65 -30
  9. ccxt/async_support/base/exchange.py +3 -3
  10. ccxt/async_support/base/ws/aiohttp_client.py +25 -3
  11. ccxt/async_support/bigone.py +71 -27
  12. ccxt/async_support/binance.py +555 -323
  13. ccxt/async_support/bingx.py +208 -108
  14. ccxt/async_support/bit2c.py +34 -12
  15. ccxt/async_support/bitbank.py +42 -14
  16. ccxt/async_support/bitbns.py +17 -9
  17. ccxt/async_support/bitfinex.py +68 -24
  18. ccxt/async_support/bitfinex2.py +116 -44
  19. ccxt/async_support/bitflyer.py +54 -18
  20. ccxt/async_support/bitget.py +277 -145
  21. ccxt/async_support/bithumb.py +39 -14
  22. ccxt/async_support/bitmart.py +145 -79
  23. ccxt/async_support/bitmex.py +90 -30
  24. ccxt/async_support/bitopro.py +66 -22
  25. ccxt/async_support/bitrue.py +109 -57
  26. ccxt/async_support/bitso.py +55 -19
  27. ccxt/async_support/bitstamp.py +84 -36
  28. ccxt/async_support/bitteam.py +51 -17
  29. ccxt/async_support/bitvavo.py +57 -22
  30. ccxt/async_support/bl3p.py +26 -10
  31. ccxt/async_support/blockchaincom.py +63 -21
  32. ccxt/async_support/blofin.py +95 -38
  33. ccxt/async_support/btcalpha.py +48 -16
  34. ccxt/async_support/btcbox.py +27 -9
  35. ccxt/async_support/btcmarkets.py +57 -19
  36. ccxt/async_support/btcturk.py +36 -12
  37. ccxt/async_support/bybit.py +251 -95
  38. ccxt/async_support/cex.py +65 -22
  39. ccxt/async_support/coinbase.py +138 -56
  40. ccxt/async_support/coinbaseexchange.py +76 -28
  41. ccxt/async_support/coinbaseinternational.py +75 -27
  42. ccxt/async_support/coincatch.py +191 -97
  43. ccxt/async_support/coincheck.py +33 -11
  44. ccxt/async_support/coinex.py +212 -101
  45. ccxt/async_support/coinlist.py +87 -30
  46. ccxt/async_support/coinmate.py +55 -24
  47. ccxt/async_support/coinmetro.py +52 -18
  48. ccxt/async_support/coinone.py +27 -10
  49. ccxt/async_support/coinsph.py +73 -27
  50. ccxt/async_support/coinspot.py +25 -9
  51. ccxt/async_support/cryptocom.py +103 -38
  52. ccxt/async_support/currencycom.py +70 -23
  53. ccxt/async_support/delta.py +90 -30
  54. ccxt/async_support/deribit.py +131 -50
  55. ccxt/async_support/digifinex.py +114 -51
  56. ccxt/async_support/exmo.py +104 -45
  57. ccxt/async_support/gate.py +313 -157
  58. ccxt/async_support/gemini.py +57 -20
  59. ccxt/async_support/hashkey.py +151 -66
  60. ccxt/async_support/hitbtc.py +157 -74
  61. ccxt/async_support/hollaex.py +76 -25
  62. ccxt/async_support/htx.py +297 -240
  63. ccxt/async_support/huobijp.py +1 -0
  64. ccxt/async_support/hyperliquid.py +94 -38
  65. ccxt/async_support/idex.py +73 -24
  66. ccxt/async_support/independentreserve.py +12 -5
  67. ccxt/async_support/indodax.py +54 -17
  68. ccxt/async_support/kraken.py +108 -36
  69. ccxt/async_support/krakenfutures.py +88 -34
  70. ccxt/async_support/kucoin.py +214 -110
  71. ccxt/async_support/kucoinfutures.py +209 -64
  72. ccxt/async_support/kuna.py +80 -39
  73. ccxt/async_support/latoken.py +70 -33
  74. ccxt/async_support/lbank.py +89 -38
  75. ccxt/async_support/luno.py +54 -19
  76. ccxt/async_support/lykke.py +54 -19
  77. ccxt/async_support/mercado.py +1 -0
  78. ccxt/async_support/mexc.py +226 -108
  79. ccxt/async_support/ndax.py +58 -19
  80. ccxt/async_support/novadax.py +67 -22
  81. ccxt/async_support/oceanex.py +58 -19
  82. ccxt/async_support/okcoin.py +81 -38
  83. ccxt/async_support/okx.py +270 -109
  84. ccxt/async_support/onetrading.py +3 -1
  85. ccxt/async_support/oxfun.py +95 -36
  86. ccxt/async_support/p2b.py +49 -23
  87. ccxt/async_support/paradex.py +75 -27
  88. ccxt/async_support/paymium.py +31 -11
  89. ccxt/async_support/phemex.py +108 -56
  90. ccxt/async_support/poloniex.py +80 -30
  91. ccxt/async_support/poloniexfutures.py +72 -30
  92. ccxt/async_support/probit.py +64 -22
  93. ccxt/async_support/timex.py +58 -19
  94. ccxt/async_support/tokocrypto.py +63 -22
  95. ccxt/async_support/tradeogre.py +7 -2
  96. ccxt/async_support/upbit.py +72 -25
  97. ccxt/async_support/vertex.py +74 -28
  98. ccxt/async_support/wavesexchange.py +32 -8
  99. ccxt/async_support/wazirx.py +51 -17
  100. ccxt/async_support/whitebit.py +105 -41
  101. ccxt/async_support/woo.py +162 -65
  102. ccxt/async_support/woofipro.py +119 -50
  103. ccxt/async_support/xt.py +150 -73
  104. ccxt/async_support/yobit.py +49 -16
  105. ccxt/async_support/zaif.py +30 -10
  106. ccxt/async_support/zonda.py +46 -16
  107. ccxt/base/exchange.py +47 -35
  108. ccxt/base/types.py +1 -0
  109. ccxt/bigone.py +71 -27
  110. ccxt/binance.py +555 -323
  111. ccxt/bingx.py +208 -108
  112. ccxt/bit2c.py +34 -12
  113. ccxt/bitbank.py +42 -14
  114. ccxt/bitbns.py +17 -9
  115. ccxt/bitfinex.py +68 -24
  116. ccxt/bitfinex2.py +116 -44
  117. ccxt/bitflyer.py +54 -18
  118. ccxt/bitget.py +277 -145
  119. ccxt/bithumb.py +39 -14
  120. ccxt/bitmart.py +145 -79
  121. ccxt/bitmex.py +90 -30
  122. ccxt/bitopro.py +66 -22
  123. ccxt/bitrue.py +109 -57
  124. ccxt/bitso.py +55 -19
  125. ccxt/bitstamp.py +84 -36
  126. ccxt/bitteam.py +51 -17
  127. ccxt/bitvavo.py +57 -22
  128. ccxt/bl3p.py +26 -10
  129. ccxt/blockchaincom.py +63 -21
  130. ccxt/blofin.py +95 -38
  131. ccxt/btcalpha.py +48 -16
  132. ccxt/btcbox.py +27 -9
  133. ccxt/btcmarkets.py +57 -19
  134. ccxt/btcturk.py +36 -12
  135. ccxt/bybit.py +251 -95
  136. ccxt/cex.py +65 -22
  137. ccxt/coinbase.py +138 -56
  138. ccxt/coinbaseexchange.py +76 -28
  139. ccxt/coinbaseinternational.py +75 -27
  140. ccxt/coincatch.py +191 -97
  141. ccxt/coincheck.py +33 -11
  142. ccxt/coinex.py +212 -101
  143. ccxt/coinlist.py +87 -30
  144. ccxt/coinmate.py +55 -24
  145. ccxt/coinmetro.py +52 -18
  146. ccxt/coinone.py +27 -10
  147. ccxt/coinsph.py +73 -27
  148. ccxt/coinspot.py +25 -9
  149. ccxt/cryptocom.py +103 -38
  150. ccxt/currencycom.py +70 -23
  151. ccxt/delta.py +90 -30
  152. ccxt/deribit.py +131 -50
  153. ccxt/digifinex.py +114 -51
  154. ccxt/exmo.py +104 -45
  155. ccxt/gate.py +313 -157
  156. ccxt/gemini.py +57 -20
  157. ccxt/hashkey.py +151 -66
  158. ccxt/hitbtc.py +157 -74
  159. ccxt/hollaex.py +76 -25
  160. ccxt/htx.py +297 -240
  161. ccxt/huobijp.py +1 -0
  162. ccxt/hyperliquid.py +94 -38
  163. ccxt/idex.py +73 -24
  164. ccxt/independentreserve.py +12 -5
  165. ccxt/indodax.py +54 -17
  166. ccxt/kraken.py +108 -36
  167. ccxt/krakenfutures.py +88 -34
  168. ccxt/kucoin.py +214 -110
  169. ccxt/kucoinfutures.py +209 -64
  170. ccxt/kuna.py +80 -39
  171. ccxt/latoken.py +70 -33
  172. ccxt/lbank.py +89 -38
  173. ccxt/luno.py +54 -19
  174. ccxt/lykke.py +54 -19
  175. ccxt/mercado.py +1 -0
  176. ccxt/mexc.py +226 -108
  177. ccxt/ndax.py +58 -19
  178. ccxt/novadax.py +67 -22
  179. ccxt/oceanex.py +58 -19
  180. ccxt/okcoin.py +81 -38
  181. ccxt/okx.py +270 -109
  182. ccxt/onetrading.py +3 -1
  183. ccxt/oxfun.py +95 -36
  184. ccxt/p2b.py +49 -23
  185. ccxt/paradex.py +75 -27
  186. ccxt/paymium.py +31 -11
  187. ccxt/phemex.py +108 -56
  188. ccxt/poloniex.py +80 -30
  189. ccxt/poloniexfutures.py +72 -30
  190. ccxt/pro/__init__.py +1 -1
  191. ccxt/pro/alpaca.py +15 -5
  192. ccxt/pro/ascendex.py +18 -6
  193. ccxt/pro/binance.py +204 -123
  194. ccxt/pro/bingx.py +44 -24
  195. ccxt/pro/bitfinex.py +13 -5
  196. ccxt/pro/bitget.py +76 -37
  197. ccxt/pro/bithumb.py +12 -4
  198. ccxt/pro/bitmart.py +44 -20
  199. ccxt/pro/bitmex.py +42 -14
  200. ccxt/pro/bitopro.py +15 -5
  201. ccxt/pro/bitrue.py +7 -3
  202. ccxt/pro/bitvavo.py +97 -62
  203. ccxt/pro/blockchaincom.py +18 -6
  204. ccxt/pro/blofin.py +36 -12
  205. ccxt/pro/bybit.py +100 -42
  206. ccxt/pro/cex.py +48 -16
  207. ccxt/pro/coinbase.py +32 -12
  208. ccxt/pro/coinbaseexchange.py +1 -1
  209. ccxt/pro/coinbaseinternational.py +34 -14
  210. ccxt/pro/coincatch.py +54 -19
  211. ccxt/pro/coincheck.py +6 -2
  212. ccxt/pro/coinex.py +40 -20
  213. ccxt/pro/coinone.py +9 -3
  214. ccxt/pro/cryptocom.py +71 -27
  215. ccxt/pro/deribit.py +36 -12
  216. ccxt/pro/exmo.py +10 -4
  217. ccxt/pro/gate.py +65 -31
  218. ccxt/pro/gemini.py +21 -7
  219. ccxt/pro/hashkey.py +27 -9
  220. ccxt/pro/hitbtc.py +61 -37
  221. ccxt/pro/hollaex.py +15 -5
  222. ccxt/pro/htx.py +39 -21
  223. ccxt/pro/hyperliquid.py +41 -14
  224. ccxt/pro/kraken.py +49 -17
  225. ccxt/pro/krakenfutures.py +47 -24
  226. ccxt/pro/kucoin.py +60 -31
  227. ccxt/pro/kucoinfutures.py +41 -19
  228. ccxt/pro/lbank.py +27 -9
  229. ccxt/pro/luno.py +3 -1
  230. ccxt/pro/mexc.py +36 -19
  231. ccxt/pro/ndax.py +12 -4
  232. ccxt/pro/okcoin.py +18 -6
  233. ccxt/pro/okx.py +76 -28
  234. ccxt/pro/onetrading.py +21 -7
  235. ccxt/pro/oxfun.py +54 -20
  236. ccxt/pro/p2b.py +23 -11
  237. ccxt/pro/paradex.py +12 -4
  238. ccxt/pro/phemex.py +31 -19
  239. ccxt/pro/poloniex.py +50 -22
  240. ccxt/pro/poloniexfutures.py +17 -7
  241. ccxt/pro/probit.py +18 -6
  242. ccxt/pro/upbit.py +25 -9
  243. ccxt/pro/vertex.py +20 -6
  244. ccxt/pro/wazirx.py +21 -7
  245. ccxt/pro/whitebit.py +25 -9
  246. ccxt/pro/woo.py +32 -12
  247. ccxt/pro/woofipro.py +35 -13
  248. ccxt/pro/xt.py +46 -26
  249. ccxt/probit.py +64 -22
  250. ccxt/timex.py +58 -19
  251. ccxt/tokocrypto.py +63 -22
  252. ccxt/tradeogre.py +7 -2
  253. ccxt/upbit.py +72 -25
  254. ccxt/vertex.py +74 -28
  255. ccxt/wavesexchange.py +32 -8
  256. ccxt/wazirx.py +51 -17
  257. ccxt/whitebit.py +105 -41
  258. ccxt/woo.py +162 -65
  259. ccxt/woofipro.py +119 -50
  260. ccxt/xt.py +150 -73
  261. ccxt/yobit.py +49 -16
  262. ccxt/zaif.py +30 -10
  263. ccxt/zonda.py +46 -16
  264. {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/METADATA +11 -5
  265. {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/RECORD +268 -268
  266. {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/LICENSE.txt +0 -0
  267. {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/WHEEL +0 -0
  268. {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/top_level.txt +0 -0
@@ -170,7 +170,7 @@ class gate(Exchange, ImplicitAPI):
170
170
  'fetchSettlementHistory': True,
171
171
  'fetchTicker': True,
172
172
  'fetchTickers': True,
173
- 'fetchTime': False,
173
+ 'fetchTime': True,
174
174
  'fetchTrades': True,
175
175
  'fetchTradingFee': True,
176
176
  'fetchTradingFees': True,
@@ -917,8 +917,11 @@ class gate(Exchange, ImplicitAPI):
917
917
 
918
918
  async def load_unified_status(self, params={}):
919
919
  """
920
+ :param dict [params]: extra parameters specific to the exchange API endpoint
920
921
  returns unifiedAccount so the user can check if the unified account is enabled
921
- :see: https://www.gate.io/docs/developers/apiv4/#get-account-detail
922
+
923
+ https://www.gate.io/docs/developers/apiv4/#get-account-detail
924
+
922
925
  :returns boolean: True or False if the enabled unified account is enabled or not and sets the unifiedAccount option if it is None
923
926
  """
924
927
  unifiedAccount = self.safe_bool(self.options, 'unifiedAccount')
@@ -947,6 +950,23 @@ class gate(Exchange, ImplicitAPI):
947
950
  async def upgrade_unified_trade_account(self, params={}):
948
951
  return await self.privateUnifiedPutUnifiedMode(params)
949
952
 
953
+ async def fetch_time(self, params={}):
954
+ """
955
+ fetches the current integer timestamp in milliseconds from the exchange server
956
+
957
+ https://www.gate.io/docs/developers/apiv4/en/#get-server-current-time
958
+
959
+ :param dict [params]: extra parameters specific to the exchange API endpoint
960
+ :returns int: the current integer timestamp in milliseconds from the exchange server
961
+ """
962
+ response = await self.publicSpotGetTime(params)
963
+ #
964
+ # {
965
+ # "server_time": 1731447921098
966
+ # }
967
+ #
968
+ return self.safe_integer(response, 'server_time')
969
+
950
970
  def create_expired_option_market(self, symbol: str):
951
971
  # support expired option contracts
952
972
  quote = 'USDT'
@@ -1020,11 +1040,13 @@ class gate(Exchange, ImplicitAPI):
1020
1040
  async def fetch_markets(self, params={}) -> List[Market]:
1021
1041
  """
1022
1042
  retrieves data on all markets for gate
1023
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-currency-pairs-supported # spot
1024
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-supported-currency-pairs-supported-in-margin-trading # margin
1025
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts # swap
1026
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts-2 # future
1027
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-the-contracts-with-specified-underlying-and-expiration-time # option
1043
+
1044
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-currency-pairs-supported # spot
1045
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-supported-currency-pairs-supported-in-margin-trading # margin
1046
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts # swap
1047
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts-2 # future
1048
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-the-contracts-with-specified-underlying-and-expiration-time # option
1049
+
1028
1050
  :param dict [params]: extra parameters specific to the exchange API endpoint
1029
1051
  :returns dict[]: an array of objects representing market data
1030
1052
  """
@@ -1484,7 +1506,7 @@ class gate(Exchange, ImplicitAPI):
1484
1506
 
1485
1507
  def prepare_request(self, market=None, type=None, params={}):
1486
1508
  """
1487
- * @ignore
1509
+ @ignore
1488
1510
  Fills request params contract, settle, currency_pair, market and account where applicable
1489
1511
  :param dict market: CCXT market, required when type is None
1490
1512
  :param str type: 'spot', 'swap', or 'future', required when market is None
@@ -1512,7 +1534,7 @@ class gate(Exchange, ImplicitAPI):
1512
1534
 
1513
1535
  def spot_order_prepare_request(self, market=None, stop=False, params={}):
1514
1536
  """
1515
- * @ignore
1537
+ @ignore
1516
1538
  Fills request params currency_pair, market and account where applicable for spot order methods like fetchOpenOrders, cancelAllOrders
1517
1539
  :param dict market: CCXT market
1518
1540
  :param bool stop: True if for a stop order
@@ -1530,7 +1552,7 @@ class gate(Exchange, ImplicitAPI):
1530
1552
 
1531
1553
  def multi_order_spot_prepare_request(self, market=None, trigger=False, params={}):
1532
1554
  """
1533
- * @ignore
1555
+ @ignore
1534
1556
  Fills request params currency_pair, market and account where applicable for spot order methods like fetchOpenOrders, cancelAllOrders
1535
1557
  :param dict market: CCXT market
1536
1558
  :param bool stop: True if for a stop order
@@ -1551,7 +1573,7 @@ class gate(Exchange, ImplicitAPI):
1551
1573
 
1552
1574
  def get_margin_mode(self, stop, params):
1553
1575
  """
1554
- * @ignore
1576
+ @ignore
1555
1577
  Gets the margin type for self api call
1556
1578
  :param bool stop: True if for a stop order
1557
1579
  :param dict [params]: Request params
@@ -1587,7 +1609,9 @@ class gate(Exchange, ImplicitAPI):
1587
1609
  async def fetch_currencies(self, params={}) -> Currencies:
1588
1610
  """
1589
1611
  fetches all available currencies on an exchange
1590
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-currencies-details
1612
+
1613
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-currencies-details
1614
+
1591
1615
  :param dict [params]: extra parameters specific to the exchange API endpoint
1592
1616
  :returns dict: an associative dictionary of currencies
1593
1617
  """
@@ -1698,7 +1722,9 @@ class gate(Exchange, ImplicitAPI):
1698
1722
  async def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
1699
1723
  """
1700
1724
  fetch the current funding rate
1701
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-a-single-contract
1725
+
1726
+ https://www.gate.io/docs/developers/apiv4/en/#get-a-single-contract
1727
+
1702
1728
  :param str symbol: unified market symbol
1703
1729
  :param dict [params]: extra parameters specific to the exchange API endpoint
1704
1730
  :returns dict: a `funding rate structure <https://docs.ccxt.com/#/?id=funding-rate-structure>`
@@ -1758,7 +1784,9 @@ class gate(Exchange, ImplicitAPI):
1758
1784
  async def fetch_funding_rates(self, symbols: Strings = None, params={}) -> FundingRates:
1759
1785
  """
1760
1786
  fetch the funding rate for multiple markets
1761
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts
1787
+
1788
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts
1789
+
1762
1790
  :param str[]|None symbols: list of unified market symbols
1763
1791
  :param dict [params]: extra parameters specific to the exchange API endpoint
1764
1792
  :returns dict[]: a list of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rates-structure>`, indexed by market symbols
@@ -1937,7 +1965,9 @@ class gate(Exchange, ImplicitAPI):
1937
1965
  async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1938
1966
  """
1939
1967
  fetch the deposit address for a currency associated with self account
1940
- :see: https://www.gate.io/docs/developers/apiv4/en/#generate-currency-deposit-address
1968
+
1969
+ https://www.gate.io/docs/developers/apiv4/en/#generate-currency-deposit-address
1970
+
1941
1971
  :param str code: unified currency code
1942
1972
  :param dict [params]: extra parameters specific to the exchange API endpoint
1943
1973
  :param str [params.network]: unified network code(not used directly by gate.io but used by ccxt to filter the response)
@@ -2008,7 +2038,9 @@ class gate(Exchange, ImplicitAPI):
2008
2038
  async def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
2009
2039
  """
2010
2040
  fetch the trading fees for a market
2011
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-personal-trading-fee
2041
+
2042
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-personal-trading-fee
2043
+
2012
2044
  :param str symbol: unified market symbol
2013
2045
  :param dict [params]: extra parameters specific to the exchange API endpoint
2014
2046
  :returns dict: a `fee structure <https://docs.ccxt.com/#/?id=fee-structure>`
@@ -2038,7 +2070,9 @@ class gate(Exchange, ImplicitAPI):
2038
2070
  async def fetch_trading_fees(self, params={}) -> TradingFees:
2039
2071
  """
2040
2072
  fetch the trading fees for multiple markets
2041
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-personal-trading-fee
2073
+
2074
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-personal-trading-fee
2075
+
2042
2076
  :param dict [params]: extra parameters specific to the exchange API endpoint
2043
2077
  :returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>` indexed by market symbols
2044
2078
  """
@@ -2100,9 +2134,11 @@ class gate(Exchange, ImplicitAPI):
2100
2134
 
2101
2135
  async def fetch_transaction_fees(self, codes: Strings = None, params={}):
2102
2136
  """
2103
- * @deprecated
2137
+ @deprecated
2104
2138
  please use fetchDepositWithdrawFees instead
2105
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-status
2139
+
2140
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-status
2141
+
2106
2142
  :param str[]|None codes: list of unified currency codes
2107
2143
  :param dict [params]: extra parameters specific to the exchange API endpoint
2108
2144
  :returns dict: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
@@ -2153,7 +2189,9 @@ class gate(Exchange, ImplicitAPI):
2153
2189
  async def fetch_deposit_withdraw_fees(self, codes: Strings = None, params={}):
2154
2190
  """
2155
2191
  fetch deposit and withdraw fees
2156
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-status
2192
+
2193
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-status
2194
+
2157
2195
  :param str[]|None codes: list of unified currency codes
2158
2196
  :param dict [params]: extra parameters specific to the exchange API endpoint
2159
2197
  :returns dict: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
@@ -2231,8 +2269,10 @@ class gate(Exchange, ImplicitAPI):
2231
2269
  async def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2232
2270
  """
2233
2271
  fetch the history of funding payments paid and received on self account
2234
- :see: https://www.gate.io/docs/developers/apiv4/en/#query-account-book-2
2235
- :see: https://www.gate.io/docs/developers/apiv4/en/#query-account-book-3
2272
+
2273
+ https://www.gate.io/docs/developers/apiv4/en/#query-account-book-2
2274
+ https://www.gate.io/docs/developers/apiv4/en/#query-account-book-3
2275
+
2236
2276
  :param str symbol: unified market symbol
2237
2277
  :param int [since]: the earliest time in ms to fetch funding history for
2238
2278
  :param int [limit]: the maximum number of funding history structures to retrieve
@@ -2309,10 +2349,12 @@ class gate(Exchange, ImplicitAPI):
2309
2349
  async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
2310
2350
  """
2311
2351
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
2312
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-order-book
2313
- :see: https://www.gate.io/docs/developers/apiv4/en/#futures-order-book
2314
- :see: https://www.gate.io/docs/developers/apiv4/en/#futures-order-book-2
2315
- :see: https://www.gate.io/docs/developers/apiv4/en/#options-order-book
2352
+
2353
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-order-book
2354
+ https://www.gate.io/docs/developers/apiv4/en/#futures-order-book
2355
+ https://www.gate.io/docs/developers/apiv4/en/#futures-order-book-2
2356
+ https://www.gate.io/docs/developers/apiv4/en/#options-order-book
2357
+
2316
2358
  :param str symbol: unified symbol of the market to fetch the order book for
2317
2359
  :param int [limit]: the maximum amount of order book entries to return
2318
2360
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2420,10 +2462,12 @@ class gate(Exchange, ImplicitAPI):
2420
2462
  async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
2421
2463
  """
2422
2464
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
2423
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-details-of-a-specifc-order
2424
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers
2425
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers-2
2426
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
2465
+
2466
+ https://www.gate.io/docs/developers/apiv4/en/#get-details-of-a-specifc-order
2467
+ https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers
2468
+ https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers-2
2469
+ https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
2470
+
2427
2471
  :param str symbol: unified symbol of the market to fetch the ticker for
2428
2472
  :param dict [params]: extra parameters specific to the exchange API endpoint
2429
2473
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -2571,10 +2615,12 @@ class gate(Exchange, ImplicitAPI):
2571
2615
  async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
2572
2616
  """
2573
2617
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
2574
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-details-of-a-specifc-order
2575
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers
2576
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers-2
2577
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
2618
+
2619
+ https://www.gate.io/docs/developers/apiv4/en/#get-details-of-a-specifc-order
2620
+ https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers
2621
+ https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers-2
2622
+ https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
2623
+
2578
2624
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
2579
2625
  :param dict [params]: extra parameters specific to the exchange API endpoint
2580
2626
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -2622,6 +2668,7 @@ class gate(Exchange, ImplicitAPI):
2622
2668
  :param str [params.marginMode]: 'cross' or 'isolated' - marginMode for margin trading if not provided self.options['defaultMarginMode'] is used
2623
2669
  :param str [params.symbol]: margin only - unified ccxt symbol
2624
2670
  :param boolean [params.unifiedAccount]: default False, set to True for fetching the unified account balance
2671
+ :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
2625
2672
  """
2626
2673
  await self.load_markets()
2627
2674
  await self.load_unified_status()
@@ -2891,10 +2938,12 @@ class gate(Exchange, ImplicitAPI):
2891
2938
  async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
2892
2939
  """
2893
2940
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
2894
- :see: https://www.gate.io/docs/developers/apiv4/en/#market-candlesticks # spot
2895
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-futures-candlesticks # swap
2896
- :see: https://www.gate.io/docs/developers/apiv4/en/#market-candlesticks # future
2897
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-options-candlesticks # option
2941
+
2942
+ https://www.gate.io/docs/developers/apiv4/en/#market-candlesticks # spot
2943
+ https://www.gate.io/docs/developers/apiv4/en/#get-futures-candlesticks # swap
2944
+ https://www.gate.io/docs/developers/apiv4/en/#market-candlesticks # future
2945
+ https://www.gate.io/docs/developers/apiv4/en/#get-options-candlesticks # option
2946
+
2898
2947
  :param str symbol: unified symbol of the market to fetch OHLCV data for
2899
2948
  :param str timeframe: the length of time each candle represents
2900
2949
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -2967,23 +3016,38 @@ class gate(Exchange, ImplicitAPI):
2967
3016
  async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2968
3017
  """
2969
3018
  fetches historical funding rate prices
2970
- :see: https://www.gate.io/docs/developers/apiv4/en/#funding-rate-history
3019
+
3020
+ https://www.gate.io/docs/developers/apiv4/en/#funding-rate-history
3021
+
2971
3022
  :param str symbol: unified symbol of the market to fetch the funding rate history for
2972
3023
  :param int [since]: timestamp in ms of the earliest funding rate to fetch
2973
3024
  :param int [limit]: the maximum amount of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rate-history-structure>` to fetch
2974
3025
  :param dict [params]: extra parameters specific to the exchange API endpoint
3026
+ :param int [params.until]: timestamp in ms of the latest funding rate to fetch
3027
+ :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
2975
3028
  :returns dict[]: a list of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rate-history-structure>`
2976
3029
  """
2977
3030
  if symbol is None:
2978
3031
  raise ArgumentsRequired(self.id + ' fetchFundingRateHistory() requires a symbol argument')
2979
3032
  await self.load_markets()
3033
+ paginate = False
3034
+ paginate, params = self.handle_option_and_params(params, 'fetchFundingRateHistory', 'paginate')
3035
+ if paginate:
3036
+ return await self.fetch_paginated_call_deterministic('fetchFundingRateHistory', symbol, since, limit, '8h', params)
2980
3037
  market = self.market(symbol)
2981
3038
  if not market['swap']:
2982
3039
  raise BadSymbol(self.id + ' fetchFundingRateHistory() supports swap contracts only')
2983
- request, query = self.prepare_request(market, None, params)
3040
+ request: dict = {}
3041
+ request, params = self.prepare_request(market, None, params)
2984
3042
  if limit is not None:
2985
3043
  request['limit'] = limit
2986
- response = await self.publicFuturesGetSettleFundingRate(self.extend(request, query))
3044
+ if since is not None:
3045
+ request['from'] = self.parse_to_int(since / 1000)
3046
+ until = self.safe_integer(params, 'until')
3047
+ if until is not None:
3048
+ params = self.omit(params, 'until')
3049
+ request['to'] = self.parse_to_int(until / 1000)
3050
+ response = await self.publicFuturesGetSettleFundingRate(self.extend(request, params))
2987
3051
  #
2988
3052
  # {
2989
3053
  # "r": "0.00063521",
@@ -3052,10 +3116,12 @@ class gate(Exchange, ImplicitAPI):
3052
3116
  async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
3053
3117
  """
3054
3118
  get the list of most recent trades for a particular symbol
3055
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-market-trades
3056
- :see: https://www.gate.io/docs/developers/apiv4/en/#futures-trading-history
3057
- :see: https://www.gate.io/docs/developers/apiv4/en/#futures-trading-history-2
3058
- :see: https://www.gate.io/docs/developers/apiv4/en/#options-trade-history
3119
+
3120
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-market-trades
3121
+ https://www.gate.io/docs/developers/apiv4/en/#futures-trading-history
3122
+ https://www.gate.io/docs/developers/apiv4/en/#futures-trading-history-2
3123
+ https://www.gate.io/docs/developers/apiv4/en/#options-trade-history
3124
+
3059
3125
  :param str symbol: unified symbol of the market to fetch trades for
3060
3126
  :param int [since]: timestamp in ms of the earliest trade to fetch
3061
3127
  :param int [limit]: the maximum amount of trades to fetch
@@ -3156,10 +3222,12 @@ class gate(Exchange, ImplicitAPI):
3156
3222
  async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3157
3223
  """
3158
3224
  fetch all the trades made from a single order
3159
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history
3160
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-2
3161
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-3
3162
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-4
3225
+
3226
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history
3227
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-2
3228
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-3
3229
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-4
3230
+
3163
3231
  :param str id: order id
3164
3232
  :param str symbol: unified market symbol
3165
3233
  :param int [since]: the earliest time in ms to fetch trades for
@@ -3195,10 +3263,12 @@ class gate(Exchange, ImplicitAPI):
3195
3263
  async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3196
3264
  """
3197
3265
  Fetch personal trading history
3198
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history
3199
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-2
3200
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-3
3201
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-4
3266
+
3267
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history
3268
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-2
3269
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-3
3270
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-4
3271
+
3202
3272
  :param str symbol: unified market symbol
3203
3273
  :param int [since]: the earliest time in ms to fetch trades for
3204
3274
  :param int [limit]: the maximum number of trades structures to retrieve
@@ -3467,12 +3537,14 @@ class gate(Exchange, ImplicitAPI):
3467
3537
  async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
3468
3538
  """
3469
3539
  fetch all deposits made to an account
3470
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-deposit-records
3540
+
3541
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-deposit-records
3542
+
3471
3543
  :param str code: unified currency code
3472
3544
  :param int [since]: the earliest time in ms to fetch deposits for
3473
3545
  :param int [limit]: the maximum number of deposits structures to retrieve
3474
- :param int [params.until]: end time in ms
3475
3546
  :param dict [params]: extra parameters specific to the exchange API endpoint
3547
+ :param int [params.until]: end time in ms
3476
3548
  :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
3477
3549
  :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
3478
3550
  """
@@ -3499,7 +3571,9 @@ class gate(Exchange, ImplicitAPI):
3499
3571
  async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
3500
3572
  """
3501
3573
  fetch all withdrawals made from an account
3502
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-records
3574
+
3575
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-records
3576
+
3503
3577
  :param str code: unified currency code
3504
3578
  :param int [since]: the earliest time in ms to fetch withdrawals for
3505
3579
  :param int [limit]: the maximum number of withdrawals structures to retrieve
@@ -3531,7 +3605,9 @@ class gate(Exchange, ImplicitAPI):
3531
3605
  async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
3532
3606
  """
3533
3607
  make a withdrawal
3534
- :see: https://www.gate.io/docs/developers/apiv4/en/#withdraw
3608
+
3609
+ https://www.gate.io/docs/developers/apiv4/en/#withdraw
3610
+
3535
3611
  :param str code: unified currency code
3536
3612
  :param float amount: the amount to withdraw
3537
3613
  :param str address: the address to withdraw to
@@ -3707,13 +3783,15 @@ class gate(Exchange, ImplicitAPI):
3707
3783
  async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
3708
3784
  """
3709
3785
  Create an order on the exchange
3710
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-an-order
3711
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order
3712
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order
3713
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order-2
3714
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order-2
3715
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order-3
3716
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-an-options-order
3786
+
3787
+ https://www.gate.io/docs/developers/apiv4/en/#create-an-order
3788
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order
3789
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order
3790
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order-2
3791
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order-2
3792
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order-3
3793
+ https://www.gate.io/docs/developers/apiv4/en/#create-an-options-order
3794
+
3717
3795
  :param str symbol: Unified CCXT market symbol
3718
3796
  :param str type: 'limit' or 'market' *"market" is contract only*
3719
3797
  :param str side: 'buy' or 'sell'
@@ -3867,10 +3945,13 @@ class gate(Exchange, ImplicitAPI):
3867
3945
  async def create_orders(self, orders: List[OrderRequest], params={}):
3868
3946
  """
3869
3947
  create a list of trade orders
3870
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-2
3871
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-batch-of-orders
3872
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-batch-of-futures-orders
3948
+
3949
+ https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-2
3950
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-batch-of-orders
3951
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-batch-of-futures-orders
3952
+
3873
3953
  :param Array orders: list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
3954
+ :param dict [params]: extra parameters specific to the exchange API endpoint
3874
3955
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
3875
3956
  """
3876
3957
  await self.load_markets()
@@ -4099,7 +4180,9 @@ class gate(Exchange, ImplicitAPI):
4099
4180
  async def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
4100
4181
  """
4101
4182
  create a market buy order by providing the symbol and cost
4102
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-an-order
4183
+
4184
+ https://www.gate.io/docs/developers/apiv4/en/#create-an-order
4185
+
4103
4186
  :param str symbol: unified symbol of the market to create an order in
4104
4187
  :param float cost: how much you want to trade in units of the quote currency
4105
4188
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -4150,8 +4233,10 @@ class gate(Exchange, ImplicitAPI):
4150
4233
  async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
4151
4234
  """
4152
4235
  edit a trade order, gate currently only supports the modification of the price or amount fields
4153
- :see: https://www.gate.io/docs/developers/apiv4/en/#amend-an-order
4154
- :see: https://www.gate.io/docs/developers/apiv4/en/#amend-an-order-2
4236
+
4237
+ https://www.gate.io/docs/developers/apiv4/en/#amend-an-order
4238
+ https://www.gate.io/docs/developers/apiv4/en/#amend-an-order-2
4239
+
4155
4240
  :param str id: order id
4156
4241
  :param str symbol: unified symbol of the market to create an order in
4157
4242
  :param str type: 'market' or 'limit'
@@ -4494,10 +4579,12 @@ class gate(Exchange, ImplicitAPI):
4494
4579
  async def fetch_order(self, id: str, symbol: Str = None, params={}):
4495
4580
  """
4496
4581
  Retrieves information on an order
4497
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order
4498
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-2
4499
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-3
4500
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-4
4582
+
4583
+ https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order
4584
+ https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-2
4585
+ https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-3
4586
+ https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-4
4587
+
4501
4588
  :param str id: Order id
4502
4589
  :param str symbol: Unified market symbol, *required for spot and margin*
4503
4590
  :param dict [params]: Parameters specified by the exchange api
@@ -4540,8 +4627,10 @@ class gate(Exchange, ImplicitAPI):
4540
4627
  async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
4541
4628
  """
4542
4629
  fetch all unfilled currently open orders
4543
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-open-orders
4544
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-running-auto-order-list
4630
+
4631
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-open-orders
4632
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-running-auto-order-list
4633
+
4545
4634
  :param str symbol: unified market symbol
4546
4635
  :param int [since]: the earliest time in ms to fetch open orders for
4547
4636
  :param int [limit]: the maximum number of open orders structures to retrieve
@@ -4557,14 +4646,16 @@ class gate(Exchange, ImplicitAPI):
4557
4646
  async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
4558
4647
  """
4559
4648
  fetches information on multiple closed orders made by the user
4560
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-orders
4561
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-running-auto-order-list
4562
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders
4563
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-auto-orders
4564
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders-2
4565
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-auto-orders-2
4566
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-options-orders
4567
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders-by-time-range
4649
+
4650
+ https://www.gate.io/docs/developers/apiv4/en/#list-orders
4651
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-running-auto-order-list
4652
+ https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders
4653
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-auto-orders
4654
+ https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders-2
4655
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-auto-orders-2
4656
+ https://www.gate.io/docs/developers/apiv4/en/#list-options-orders
4657
+ https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders-by-time-range
4658
+
4568
4659
  :param str symbol: unified market symbol of the market orders were made in
4569
4660
  :param int [since]: the earliest time in ms to fetch orders for
4570
4661
  :param int [limit]: the maximum number of order structures to retrieve
@@ -4829,10 +4920,12 @@ class gate(Exchange, ImplicitAPI):
4829
4920
  async def cancel_order(self, id: str, symbol: Str = None, params={}):
4830
4921
  """
4831
4922
  Cancels an open order
4832
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order
4833
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-2
4834
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-3
4835
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-4
4923
+
4924
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order
4925
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-2
4926
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-3
4927
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-4
4928
+
4836
4929
  :param str id: Order id
4837
4930
  :param str symbol: Unified market symbol
4838
4931
  :param dict [params]: Parameters specified by the exchange api
@@ -4954,8 +5047,10 @@ class gate(Exchange, ImplicitAPI):
4954
5047
  async def cancel_orders(self, ids: List[str], symbol: Str = None, params={}):
4955
5048
  """
4956
5049
  cancel multiple orders
4957
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
4958
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list-2
5050
+
5051
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
5052
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list-2
5053
+
4959
5054
  :param str[] ids: order ids
4960
5055
  :param str symbol: unified symbol of the market the order was made in
4961
5056
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -4996,7 +5091,9 @@ class gate(Exchange, ImplicitAPI):
4996
5091
  async def cancel_orders_for_symbols(self, orders: List[CancellationRequest], params={}):
4997
5092
  """
4998
5093
  cancel multiple orders for multiple symbols
4999
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
5094
+
5095
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
5096
+
5000
5097
  :param CancellationRequest[] orders: list of order ids with symbol, example [{"id": "a", "symbol": "BTC/USDT"}, {"id": "b", "symbol": "ETH/USDT"}]
5001
5098
  :param dict [params]: extra parameters specific to the exchange API endpoint
5002
5099
  :param str[] [params.clientOrderIds]: client order ids
@@ -5032,10 +5129,12 @@ class gate(Exchange, ImplicitAPI):
5032
5129
  async def cancel_all_orders(self, symbol: Str = None, params={}):
5033
5130
  """
5034
5131
  cancel all open orders
5035
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-in-specified-currency-pair
5036
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched
5037
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched-2
5038
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched-3
5132
+
5133
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-in-specified-currency-pair
5134
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched
5135
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched-2
5136
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched-3
5137
+
5039
5138
  :param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
5040
5139
  :param dict [params]: extra parameters specific to the exchange API endpoint
5041
5140
  :param bool [params.unifiedAccount]: set to True for canceling unified account orders
@@ -5101,7 +5200,9 @@ class gate(Exchange, ImplicitAPI):
5101
5200
  async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
5102
5201
  """
5103
5202
  transfer currency internally between wallets on the same account
5104
- :see: https://www.gate.io/docs/developers/apiv4/en/#transfer-between-trading-accounts
5203
+
5204
+ https://www.gate.io/docs/developers/apiv4/en/#transfer-between-trading-accounts
5205
+
5105
5206
  :param str code: unified currency code for currency being transferred
5106
5207
  :param float amount: the amount of currency to transfer
5107
5208
  :param str fromAccount: the account to transfer currency from
@@ -5177,8 +5278,10 @@ class gate(Exchange, ImplicitAPI):
5177
5278
  async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
5178
5279
  """
5179
5280
  set the level of leverage for a market
5180
- :see: https://www.gate.io/docs/developers/apiv4/en/#update-position-leverage
5181
- :see: https://www.gate.io/docs/developers/apiv4/en/#update-position-leverage-2
5281
+
5282
+ https://www.gate.io/docs/developers/apiv4/en/#update-position-leverage
5283
+ https://www.gate.io/docs/developers/apiv4/en/#update-position-leverage-2
5284
+
5182
5285
  :param float leverage: the rate of leverage
5183
5286
  :param str symbol: unified market symbol
5184
5287
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -5379,9 +5482,11 @@ class gate(Exchange, ImplicitAPI):
5379
5482
  async def fetch_position(self, symbol: str, params={}):
5380
5483
  """
5381
5484
  fetch data on an open contract position
5382
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-single-position
5383
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-single-position-2
5384
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-specified-contract-position
5485
+
5486
+ https://www.gate.io/docs/developers/apiv4/en/#get-single-position
5487
+ https://www.gate.io/docs/developers/apiv4/en/#get-single-position-2
5488
+ https://www.gate.io/docs/developers/apiv4/en/#get-specified-contract-position
5489
+
5385
5490
  :param str symbol: unified market symbol of the market the position is held in
5386
5491
  :param dict [params]: extra parameters specific to the exchange API endpoint
5387
5492
  :returns dict: a `position structure <https://docs.ccxt.com/#/?id=position-structure>`
@@ -5461,9 +5566,11 @@ class gate(Exchange, ImplicitAPI):
5461
5566
  async def fetch_positions(self, symbols: Strings = None, params={}):
5462
5567
  """
5463
5568
  fetch all open positions
5464
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-positions-of-a-user
5465
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-positions-of-a-user-2
5466
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-user-s-positions-of-specified-underlying
5569
+
5570
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-positions-of-a-user
5571
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-positions-of-a-user-2
5572
+ https://www.gate.io/docs/developers/apiv4/en/#list-user-s-positions-of-specified-underlying
5573
+
5467
5574
  :param str[]|None symbols: Not used by gate, but parsed internally by CCXT
5468
5575
  :param dict [params]: extra parameters specific to the exchange API endpoint
5469
5576
  :param str [params.settle]: 'btc' or 'usdt' - settle currency for perpetual swap and future - default="usdt" for swap and "btc" for future
@@ -5561,8 +5668,10 @@ class gate(Exchange, ImplicitAPI):
5561
5668
  async def fetch_leverage_tiers(self, symbols: Strings = None, params={}) -> LeverageTiers:
5562
5669
  """
5563
5670
  retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
5564
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts
5565
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts-2
5671
+
5672
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts
5673
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts-2
5674
+
5566
5675
  :param str[] [symbols]: list of unified market symbols
5567
5676
  :param dict [params]: extra parameters specific to the exchange API endpoint
5568
5677
  :returns dict: a dictionary of `leverage tiers structures <https://docs.ccxt.com/#/?id=leverage-tiers-structure>`, indexed by market symbols
@@ -5676,7 +5785,9 @@ class gate(Exchange, ImplicitAPI):
5676
5785
  async def fetch_market_leverage_tiers(self, symbol: str, params={}) -> List[LeverageTier]:
5677
5786
  """
5678
5787
  retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
5679
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-risk-limit-tiers
5788
+
5789
+ https://www.gate.io/docs/developers/apiv4/en/#list-risk-limit-tiers
5790
+
5680
5791
  :param str symbol: unified market symbol
5681
5792
  :param dict [params]: extra parameters specific to the exchange API endpoint
5682
5793
  :returns dict: a `leverage tiers structure <https://docs.ccxt.com/#/?id=leverage-tiers-structure>`
@@ -5701,7 +5812,8 @@ class gate(Exchange, ImplicitAPI):
5701
5812
  #
5702
5813
  return self.parse_market_leverage_tiers(response, market)
5703
5814
 
5704
- def parse_emulated_leverage_tiers(self, info, market=None):
5815
+ def parse_emulated_leverage_tiers(self, info, market=None) -> List[LeverageTier]:
5816
+ marketId = self.safe_string(info, 'name')
5705
5817
  maintenanceMarginUnit = self.safe_string(info, 'maintenance_rate') # '0.005',
5706
5818
  leverageMax = self.safe_string(info, 'leverage_max') # '100',
5707
5819
  riskLimitStep = self.safe_string(info, 'risk_limit_step') # '1000000',
@@ -5715,6 +5827,7 @@ class gate(Exchange, ImplicitAPI):
5715
5827
  cap = Precise.string_add(floor, riskLimitStep)
5716
5828
  tiers.append({
5717
5829
  'tier': self.parse_number(Precise.string_div(cap, riskLimitStep)),
5830
+ 'symbol': self.safe_symbol(marketId, market, None, 'contract'),
5718
5831
  'currency': self.safe_string(market, 'settle'),
5719
5832
  'minNotional': self.parse_number(floor),
5720
5833
  'maxNotional': self.parse_number(cap),
@@ -5748,6 +5861,7 @@ class gate(Exchange, ImplicitAPI):
5748
5861
  maxNotional = self.safe_number(item, 'risk_limit')
5749
5862
  tiers.append({
5750
5863
  'tier': self.sum(i, 1),
5864
+ 'symbol': market['symbol'],
5751
5865
  'currency': market['base'],
5752
5866
  'minNotional': minNotional,
5753
5867
  'maxNotional': maxNotional,
@@ -5761,7 +5875,9 @@ class gate(Exchange, ImplicitAPI):
5761
5875
  async def repay_isolated_margin(self, symbol: str, code: str, amount, params={}):
5762
5876
  """
5763
5877
  repay borrowed margin and interest
5764
- :see: https://www.gate.io/docs/apiv4/en/#repay-a-loan
5878
+
5879
+ https://www.gate.io/docs/apiv4/en/#repay-a-loan
5880
+
5765
5881
  :param str symbol: unified market symbol
5766
5882
  :param str code: unified currency code of the currency to repay
5767
5883
  :param float amount: the amount to repay
@@ -5788,11 +5904,12 @@ class gate(Exchange, ImplicitAPI):
5788
5904
  async def repay_cross_margin(self, code: str, amount, params={}):
5789
5905
  """
5790
5906
  repay cross margin borrowed margin and interest
5791
- :see: https://www.gate.io/docs/developers/apiv4/en/#cross-margin-repayments
5792
- :see: https://www.gate.io/docs/developers/apiv4/en/#borrow-or-repay
5907
+
5908
+ https://www.gate.io/docs/developers/apiv4/en/#cross-margin-repayments
5909
+ https://www.gate.io/docs/developers/apiv4/en/#borrow-or-repay
5910
+
5793
5911
  :param str code: unified currency code of the currency to repay
5794
5912
  :param float amount: the amount to repay
5795
- :param str symbol: unified market symbol, required for isolated margin
5796
5913
  :param dict [params]: extra parameters specific to the exchange API endpoint
5797
5914
  :param str [params.mode]: 'all' or 'partial' payment mode, extra parameter required for isolated margin
5798
5915
  :param str [params.id]: '34267567' loan id, extra parameter required for isolated margin
@@ -5836,10 +5953,12 @@ class gate(Exchange, ImplicitAPI):
5836
5953
  async def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
5837
5954
  """
5838
5955
  create a loan to borrow margin
5839
- :see: https://www.gate.io/docs/developers/apiv4/en/#marginuni
5956
+
5957
+ https://www.gate.io/docs/developers/apiv4/en/#marginuni
5958
+
5959
+ :param str symbol: unified market symbol, required for isolated margin
5840
5960
  :param str code: unified currency code of the currency to borrow
5841
5961
  :param float amount: the amount to borrow
5842
- :param str symbol: unified market symbol, required for isolated margin
5843
5962
  :param dict [params]: extra parameters specific to the exchange API endpoint
5844
5963
  :param str [params.rate]: '0.0002' or '0.002' extra parameter required for isolated margin
5845
5964
  :returns dict: a `margin loan structure <https://docs.ccxt.com/#/?id=margin-loan-structure>`
@@ -5879,11 +5998,12 @@ class gate(Exchange, ImplicitAPI):
5879
5998
  async def borrow_cross_margin(self, code: str, amount: float, params={}):
5880
5999
  """
5881
6000
  create a loan to borrow margin
5882
- :see: https://www.gate.io/docs/apiv4/en/#create-a-cross-margin-borrow-loan
5883
- :see: https://www.gate.io/docs/developers/apiv4/en/#borrow-or-repay
6001
+
6002
+ https://www.gate.io/docs/apiv4/en/#create-a-cross-margin-borrow-loan
6003
+ https://www.gate.io/docs/developers/apiv4/en/#borrow-or-repay
6004
+
5884
6005
  :param str code: unified currency code of the currency to borrow
5885
6006
  :param float amount: the amount to borrow
5886
- :param str symbol: unified market symbol, required for isolated margin
5887
6007
  :param dict [params]: extra parameters specific to the exchange API endpoint
5888
6008
  :param str [params.rate]: '0.0002' or '0.002' extra parameter required for isolated margin
5889
6009
  :param boolean [params.unifiedAccount]: set to True for borrowing in the unified account
@@ -5976,9 +6096,11 @@ class gate(Exchange, ImplicitAPI):
5976
6096
  async def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[BorrowInterest]:
5977
6097
  """
5978
6098
  fetch the interest owed by the user for borrowing currency for margin trading
5979
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-interest-records
5980
- :see: https://www.gate.io/docs/developers/apiv4/en/#interest-records-for-the-cross-margin-account
5981
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-interest-records-2
6099
+
6100
+ https://www.gate.io/docs/developers/apiv4/en/#list-interest-records
6101
+ https://www.gate.io/docs/developers/apiv4/en/#interest-records-for-the-cross-margin-account
6102
+ https://www.gate.io/docs/developers/apiv4/en/#list-interest-records-2
6103
+
5982
6104
  :param str [code]: unified currency code
5983
6105
  :param str [symbol]: unified market symbol when fetching interest in isolated markets
5984
6106
  :param int [since]: the earliest time in ms to fetch borrow interest for
@@ -6170,8 +6292,10 @@ class gate(Exchange, ImplicitAPI):
6170
6292
  async def reduce_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
6171
6293
  """
6172
6294
  remove margin from a position
6173
- :see: https://www.gate.io/docs/developers/apiv4/en/#update-position-margin
6174
- :see: https://www.gate.io/docs/developers/apiv4/en/#update-position-margin-2
6295
+
6296
+ https://www.gate.io/docs/developers/apiv4/en/#update-position-margin
6297
+ https://www.gate.io/docs/developers/apiv4/en/#update-position-margin-2
6298
+
6175
6299
  :param str symbol: unified market symbol
6176
6300
  :param float amount: the amount of margin to remove
6177
6301
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -6182,8 +6306,10 @@ class gate(Exchange, ImplicitAPI):
6182
6306
  async def add_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
6183
6307
  """
6184
6308
  add margin
6185
- :see: https://www.gate.io/docs/developers/apiv4/en/#update-position-margin
6186
- :see: https://www.gate.io/docs/developers/apiv4/en/#update-position-margin-2
6309
+
6310
+ https://www.gate.io/docs/developers/apiv4/en/#update-position-margin
6311
+ https://www.gate.io/docs/developers/apiv4/en/#update-position-margin-2
6312
+
6187
6313
  :param str symbol: unified market symbol
6188
6314
  :param float amount: amount of margin to add
6189
6315
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -6194,7 +6320,9 @@ class gate(Exchange, ImplicitAPI):
6194
6320
  async def fetch_open_interest_history(self, symbol: str, timeframe='5m', since: Int = None, limit: Int = None, params={}):
6195
6321
  """
6196
6322
  Retrieves the open interest of a currency
6197
- :see: https://www.gate.io/docs/developers/apiv4/en/#futures-stats
6323
+
6324
+ https://www.gate.io/docs/developers/apiv4/en/#futures-stats
6325
+
6198
6326
  :param str symbol: Unified CCXT market symbol
6199
6327
  :param str timeframe: "5m", "15m", "30m", "1h", "4h", "1d"
6200
6328
  :param int [since]: the time(ms) of the earliest record to retrieve unix timestamp
@@ -6276,7 +6404,9 @@ class gate(Exchange, ImplicitAPI):
6276
6404
  async def fetch_settlement_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
6277
6405
  """
6278
6406
  fetches historical settlement records
6279
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-settlement-history-2
6407
+
6408
+ https://www.gate.io/docs/developers/apiv4/en/#list-settlement-history-2
6409
+
6280
6410
  :param str symbol: unified market symbol of the settlement history, required on gate
6281
6411
  :param int [since]: timestamp in ms
6282
6412
  :param int [limit]: number of records
@@ -6320,7 +6450,9 @@ class gate(Exchange, ImplicitAPI):
6320
6450
  async def fetch_my_settlement_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
6321
6451
  """
6322
6452
  fetches historical settlement records of the user
6323
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-my-options-settlements
6453
+
6454
+ https://www.gate.io/docs/developers/apiv4/en/#list-my-options-settlements
6455
+
6324
6456
  :param str symbol: unified market symbol of the settlement history
6325
6457
  :param int [since]: timestamp in ms
6326
6458
  :param int [limit]: number of records
@@ -6443,11 +6575,13 @@ class gate(Exchange, ImplicitAPI):
6443
6575
  async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]:
6444
6576
  """
6445
6577
  fetch the history of changes, actions done by the user or operations that altered the balance of the user
6446
- :see: https://www.gate.io/docs/developers/apiv4/en/#query-account-book
6447
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-margin-account-balance-change-history
6448
- :see: https://www.gate.io/docs/developers/apiv4/en/#query-account-book-2
6449
- :see: https://www.gate.io/docs/developers/apiv4/en/#query-account-book-3
6450
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-account-changing-history
6578
+
6579
+ https://www.gate.io/docs/developers/apiv4/en/#query-account-book
6580
+ https://www.gate.io/docs/developers/apiv4/en/#list-margin-account-balance-change-history
6581
+ https://www.gate.io/docs/developers/apiv4/en/#query-account-book-2
6582
+ https://www.gate.io/docs/developers/apiv4/en/#query-account-book-3
6583
+ https://www.gate.io/docs/developers/apiv4/en/#list-account-changing-history
6584
+
6451
6585
  :param str [code]: unified currency code
6452
6586
  :param int [since]: timestamp in ms of the earliest ledger entry
6453
6587
  :param int [limit]: max number of ledger entries to return
@@ -6672,7 +6806,9 @@ class gate(Exchange, ImplicitAPI):
6672
6806
  async def set_position_mode(self, hedged: bool, symbol: Str = None, params={}):
6673
6807
  """
6674
6808
  set dual/hedged mode to True or False for a swap market, make sure all positions are closed and no orders are open before setting dual mode
6675
- :see: https://www.gate.io/docs/developers/apiv4/en/#enable-or-disable-dual-mode
6809
+
6810
+ https://www.gate.io/docs/developers/apiv4/en/#enable-or-disable-dual-mode
6811
+
6676
6812
  :param bool hedged: set to True to enable dual mode
6677
6813
  :param str|None symbol: if passed, dual mode is set for all markets with the same settle currency
6678
6814
  :param dict params: extra parameters specific to the exchange API endpoint
@@ -6687,7 +6823,9 @@ class gate(Exchange, ImplicitAPI):
6687
6823
  async def fetch_underlying_assets(self, params={}):
6688
6824
  """
6689
6825
  fetches the market ids of underlying assets for a specific contract market type
6690
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-underlyings
6826
+
6827
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-underlyings
6828
+
6691
6829
  :param dict [params]: exchange specific params
6692
6830
  :param str [params.type]: the contract market type, 'option', 'swap' or 'future', the default is 'option'
6693
6831
  :returns dict[]: a list of `underlying assets <https://docs.ccxt.com/#/?id=underlying-assets-structure>`
@@ -6720,7 +6858,9 @@ class gate(Exchange, ImplicitAPI):
6720
6858
  async def fetch_liquidations(self, symbol: str, since: Int = None, limit: Int = None, params={}):
6721
6859
  """
6722
6860
  retrieves the public liquidations of a trading pair
6723
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-liquidation-history
6861
+
6862
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-liquidation-history
6863
+
6724
6864
  :param str symbol: unified CCXT market symbol
6725
6865
  :param int [since]: the earliest time in ms to fetch liquidations for
6726
6866
  :param int [limit]: the maximum number of liquidation structures to retrieve
@@ -6759,9 +6899,11 @@ class gate(Exchange, ImplicitAPI):
6759
6899
  async def fetch_my_liquidations(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
6760
6900
  """
6761
6901
  retrieves the users liquidated positions
6762
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-liquidation-history
6763
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-liquidation-history-2
6764
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-user-s-liquidation-history-of-specified-underlying
6902
+
6903
+ https://www.gate.io/docs/developers/apiv4/en/#list-liquidation-history
6904
+ https://www.gate.io/docs/developers/apiv4/en/#list-liquidation-history-2
6905
+ https://www.gate.io/docs/developers/apiv4/en/#list-user-s-liquidation-history-of-specified-underlying
6906
+
6765
6907
  :param str symbol: unified CCXT market symbol
6766
6908
  :param int [since]: the earliest time in ms to fetch liquidations for
6767
6909
  :param int [limit]: the maximum number of liquidation structures to retrieve
@@ -6894,7 +7036,9 @@ class gate(Exchange, ImplicitAPI):
6894
7036
  async def fetch_greeks(self, symbol: str, params={}) -> Greeks:
6895
7037
  """
6896
7038
  fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract
6897
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
7039
+
7040
+ https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
7041
+
6898
7042
  :param str symbol: unified symbol of the market to fetch greeks for
6899
7043
  :param dict [params]: extra parameters specific to the exchange API endpoint
6900
7044
  :returns dict: a `greeks structure <https://docs.ccxt.com/#/?id=greeks-structure>`
@@ -6983,9 +7127,11 @@ class gate(Exchange, ImplicitAPI):
6983
7127
  async def close_position(self, symbol: str, side: OrderSide = None, params={}) -> Order:
6984
7128
  """
6985
7129
  closes open positions for a market
6986
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order
6987
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order-2
6988
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-an-options-order
7130
+
7131
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order
7132
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order-2
7133
+ https://www.gate.io/docs/developers/apiv4/en/#create-an-options-order
7134
+
6989
7135
  :param str symbol: Unified CCXT market symbol
6990
7136
  :param str side: 'buy' or 'sell'
6991
7137
  :param dict [params]: extra parameters specific to the okx api endpoint
@@ -7002,9 +7148,11 @@ class gate(Exchange, ImplicitAPI):
7002
7148
  async def fetch_leverage(self, symbol: str, params={}) -> Leverage:
7003
7149
  """
7004
7150
  fetch the set leverage for a market
7005
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-unified-account-information
7006
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-detail-of-lending-market
7007
- :see: https://www.gate.io/docs/developers/apiv4/en/#query-one-single-margin-currency-pair-deprecated
7151
+
7152
+ https://www.gate.io/docs/developers/apiv4/en/#get-unified-account-information
7153
+ https://www.gate.io/docs/developers/apiv4/en/#get-detail-of-lending-market
7154
+ https://www.gate.io/docs/developers/apiv4/en/#query-one-single-margin-currency-pair-deprecated
7155
+
7008
7156
  :param str symbol: unified market symbol
7009
7157
  :param dict [params]: extra parameters specific to the exchange API endpoint
7010
7158
  :param boolean [params.unified]: default False, set to True for fetching the unified accounts leverage
@@ -7104,8 +7252,10 @@ class gate(Exchange, ImplicitAPI):
7104
7252
  async def fetch_leverages(self, symbols: Strings = None, params={}) -> Leverages:
7105
7253
  """
7106
7254
  fetch the set leverage for all leverage markets, only spot margin is supported on gate
7107
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-lending-markets
7108
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-supported-currency-pairs-supported-in-margin-trading-deprecated
7255
+
7256
+ https://www.gate.io/docs/developers/apiv4/en/#list-lending-markets
7257
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-supported-currency-pairs-supported-in-margin-trading-deprecated
7258
+
7109
7259
  :param str[] symbols: a list of unified market symbols
7110
7260
  :param dict [params]: extra parameters specific to the exchange API endpoint
7111
7261
  :param boolean [params.unified]: default False, set to True for fetching unified account leverages
@@ -7162,7 +7312,9 @@ class gate(Exchange, ImplicitAPI):
7162
7312
  async def fetch_option(self, symbol: str, params={}) -> Option:
7163
7313
  """
7164
7314
  fetches option data that is commonly found in an option chain
7165
- :see: https://www.gate.io/docs/developers/apiv4/en/#query-specified-contract-detail
7315
+
7316
+ https://www.gate.io/docs/developers/apiv4/en/#query-specified-contract-detail
7317
+
7166
7318
  :param str symbol: unified market symbol
7167
7319
  :param dict [params]: extra parameters specific to the exchange API endpoint
7168
7320
  :returns dict: an `option chain structure <https://docs.ccxt.com/#/?id=option-chain-structure>`
@@ -7218,8 +7370,10 @@ class gate(Exchange, ImplicitAPI):
7218
7370
  async def fetch_option_chain(self, code: str, params={}) -> OptionChain:
7219
7371
  """
7220
7372
  fetches data for an underlying asset that is commonly found in an option chain
7221
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-the-contracts-with-specified-underlying-and-expiration-time
7222
- :param str currency: base currency to fetch an option chain for
7373
+
7374
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-the-contracts-with-specified-underlying-and-expiration-time
7375
+
7376
+ :param str code: base currency to fetch an option chain for
7223
7377
  :param dict [params]: extra parameters specific to the exchange API endpoint
7224
7378
  :param str [params.underlying]: the underlying asset, can be obtained from fetchUnderlyingAssets()
7225
7379
  :param int [params.expiration]: unix timestamp of the expiration time
@@ -7342,18 +7496,20 @@ class gate(Exchange, ImplicitAPI):
7342
7496
  async def fetch_positions_history(self, symbols: Strings = None, since: Int = None, limit: Int = None, params={}) -> List[Position]:
7343
7497
  """
7344
7498
  fetches historical positions
7345
- :see: https://www.gate.io/docs/developers/apiv4/#list-position-close-history
7346
- :see: https://www.gate.io/docs/developers/apiv4/#list-position-close-history-2
7499
+
7500
+ https://www.gate.io/docs/developers/apiv4/#list-position-close-history
7501
+ https://www.gate.io/docs/developers/apiv4/#list-position-close-history-2
7502
+
7347
7503
  :param str[] symbols: unified conract symbols, must all have the same settle currency and the same market type
7348
7504
  :param int [since]: the earliest time in ms to fetch positions for
7349
7505
  :param int [limit]: the maximum amount of records to fetch, default=1000
7350
7506
  :param dict params: extra parameters specific to the exchange api endpoint
7351
7507
  :param int [params.until]: the latest time in ms to fetch positions for
7352
- *
7353
- * EXCHANGE SPECIFIC PARAMETERS
7354
- :param int offset: list offset, starting from 0
7355
- :param str side: long or short
7356
- :param str pnl: query profit or loss
7508
+
7509
+ EXCHANGE SPECIFIC PARAMETERS
7510
+ :param int [params.offset]: list offset, starting from 0
7511
+ :param str [params.side]: long or short
7512
+ :param str [params.pnl]: query profit or loss
7357
7513
  :returns dict[]: a list of `position structures <https://docs.ccxt.com/#/?id=position-structure>`
7358
7514
  """
7359
7515
  await self.load_markets()