ccxt 4.4.29__py2.py3-none-any.whl → 4.4.31__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 (273) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/alpaca.py +1 -0
  3. ccxt/abstract/binance.py +9 -0
  4. ccxt/abstract/binancecoinm.py +9 -0
  5. ccxt/abstract/binanceus.py +9 -0
  6. ccxt/abstract/binanceusdm.py +9 -0
  7. ccxt/ace.py +36 -12
  8. ccxt/alpaca.py +113 -28
  9. ccxt/ascendex.py +65 -30
  10. ccxt/async_support/__init__.py +1 -1
  11. ccxt/async_support/ace.py +36 -12
  12. ccxt/async_support/alpaca.py +113 -28
  13. ccxt/async_support/ascendex.py +65 -30
  14. ccxt/async_support/base/exchange.py +3 -3
  15. ccxt/async_support/bigone.py +71 -27
  16. ccxt/async_support/binance.py +564 -323
  17. ccxt/async_support/bingx.py +208 -108
  18. ccxt/async_support/bit2c.py +34 -12
  19. ccxt/async_support/bitbank.py +42 -14
  20. ccxt/async_support/bitbns.py +29 -21
  21. ccxt/async_support/bitfinex.py +77 -33
  22. ccxt/async_support/bitfinex2.py +116 -44
  23. ccxt/async_support/bitflyer.py +54 -18
  24. ccxt/async_support/bitget.py +277 -145
  25. ccxt/async_support/bithumb.py +39 -14
  26. ccxt/async_support/bitmart.py +198 -132
  27. ccxt/async_support/bitmex.py +90 -30
  28. ccxt/async_support/bitopro.py +66 -22
  29. ccxt/async_support/bitrue.py +109 -57
  30. ccxt/async_support/bitso.py +55 -19
  31. ccxt/async_support/bitstamp.py +84 -36
  32. ccxt/async_support/bitteam.py +51 -17
  33. ccxt/async_support/bitvavo.py +57 -19
  34. ccxt/async_support/bl3p.py +26 -10
  35. ccxt/async_support/blockchaincom.py +63 -21
  36. ccxt/async_support/blofin.py +95 -38
  37. ccxt/async_support/btcalpha.py +48 -16
  38. ccxt/async_support/btcbox.py +27 -9
  39. ccxt/async_support/btcmarkets.py +57 -19
  40. ccxt/async_support/btcturk.py +36 -12
  41. ccxt/async_support/bybit.py +251 -95
  42. ccxt/async_support/cex.py +65 -22
  43. ccxt/async_support/coinbase.py +138 -56
  44. ccxt/async_support/coinbaseexchange.py +76 -28
  45. ccxt/async_support/coinbaseinternational.py +75 -27
  46. ccxt/async_support/coincatch.py +191 -97
  47. ccxt/async_support/coincheck.py +33 -11
  48. ccxt/async_support/coinex.py +212 -101
  49. ccxt/async_support/coinlist.py +87 -30
  50. ccxt/async_support/coinmate.py +55 -24
  51. ccxt/async_support/coinmetro.py +52 -18
  52. ccxt/async_support/coinone.py +27 -10
  53. ccxt/async_support/coinsph.py +73 -27
  54. ccxt/async_support/coinspot.py +25 -9
  55. ccxt/async_support/cryptocom.py +103 -38
  56. ccxt/async_support/currencycom.py +70 -23
  57. ccxt/async_support/delta.py +90 -30
  58. ccxt/async_support/deribit.py +138 -53
  59. ccxt/async_support/digifinex.py +114 -51
  60. ccxt/async_support/exmo.py +104 -45
  61. ccxt/async_support/gate.py +298 -155
  62. ccxt/async_support/gemini.py +57 -20
  63. ccxt/async_support/hashkey.py +151 -66
  64. ccxt/async_support/hitbtc.py +156 -73
  65. ccxt/async_support/hollaex.py +76 -25
  66. ccxt/async_support/htx.py +297 -240
  67. ccxt/async_support/huobijp.py +1 -0
  68. ccxt/async_support/hyperliquid.py +203 -42
  69. ccxt/async_support/idex.py +73 -24
  70. ccxt/async_support/independentreserve.py +12 -5
  71. ccxt/async_support/indodax.py +53 -16
  72. ccxt/async_support/kraken.py +107 -35
  73. ccxt/async_support/krakenfutures.py +88 -34
  74. ccxt/async_support/kucoin.py +211 -109
  75. ccxt/async_support/kucoinfutures.py +119 -42
  76. ccxt/async_support/kuna.py +80 -39
  77. ccxt/async_support/latoken.py +70 -33
  78. ccxt/async_support/lbank.py +90 -39
  79. ccxt/async_support/luno.py +54 -19
  80. ccxt/async_support/lykke.py +54 -19
  81. ccxt/async_support/mercado.py +1 -0
  82. ccxt/async_support/mexc.py +226 -108
  83. ccxt/async_support/ndax.py +58 -19
  84. ccxt/async_support/novadax.py +67 -22
  85. ccxt/async_support/oceanex.py +58 -19
  86. ccxt/async_support/okcoin.py +81 -38
  87. ccxt/async_support/okx.py +270 -109
  88. ccxt/async_support/onetrading.py +3 -1
  89. ccxt/async_support/oxfun.py +95 -36
  90. ccxt/async_support/p2b.py +49 -23
  91. ccxt/async_support/paradex.py +75 -27
  92. ccxt/async_support/paymium.py +31 -11
  93. ccxt/async_support/phemex.py +91 -41
  94. ccxt/async_support/poloniex.py +80 -30
  95. ccxt/async_support/poloniexfutures.py +72 -30
  96. ccxt/async_support/probit.py +64 -22
  97. ccxt/async_support/timex.py +58 -19
  98. ccxt/async_support/tokocrypto.py +63 -22
  99. ccxt/async_support/tradeogre.py +7 -2
  100. ccxt/async_support/upbit.py +72 -25
  101. ccxt/async_support/vertex.py +74 -28
  102. ccxt/async_support/wavesexchange.py +29 -8
  103. ccxt/async_support/wazirx.py +51 -17
  104. ccxt/async_support/whitebit.py +105 -41
  105. ccxt/async_support/woo.py +162 -65
  106. ccxt/async_support/woofipro.py +118 -49
  107. ccxt/async_support/xt.py +150 -73
  108. ccxt/async_support/yobit.py +49 -16
  109. ccxt/async_support/zaif.py +30 -10
  110. ccxt/async_support/zonda.py +46 -16
  111. ccxt/base/exchange.py +34 -34
  112. ccxt/base/types.py +1 -0
  113. ccxt/bigone.py +71 -27
  114. ccxt/binance.py +564 -323
  115. ccxt/bingx.py +208 -108
  116. ccxt/bit2c.py +34 -12
  117. ccxt/bitbank.py +42 -14
  118. ccxt/bitbns.py +29 -21
  119. ccxt/bitfinex.py +77 -33
  120. ccxt/bitfinex2.py +116 -44
  121. ccxt/bitflyer.py +54 -18
  122. ccxt/bitget.py +277 -145
  123. ccxt/bithumb.py +39 -14
  124. ccxt/bitmart.py +198 -132
  125. ccxt/bitmex.py +90 -30
  126. ccxt/bitopro.py +66 -22
  127. ccxt/bitrue.py +109 -57
  128. ccxt/bitso.py +55 -19
  129. ccxt/bitstamp.py +84 -36
  130. ccxt/bitteam.py +51 -17
  131. ccxt/bitvavo.py +57 -19
  132. ccxt/bl3p.py +26 -10
  133. ccxt/blockchaincom.py +63 -21
  134. ccxt/blofin.py +95 -38
  135. ccxt/btcalpha.py +48 -16
  136. ccxt/btcbox.py +27 -9
  137. ccxt/btcmarkets.py +57 -19
  138. ccxt/btcturk.py +36 -12
  139. ccxt/bybit.py +251 -95
  140. ccxt/cex.py +65 -22
  141. ccxt/coinbase.py +138 -56
  142. ccxt/coinbaseexchange.py +76 -28
  143. ccxt/coinbaseinternational.py +75 -27
  144. ccxt/coincatch.py +191 -97
  145. ccxt/coincheck.py +33 -11
  146. ccxt/coinex.py +212 -101
  147. ccxt/coinlist.py +87 -30
  148. ccxt/coinmate.py +55 -24
  149. ccxt/coinmetro.py +52 -18
  150. ccxt/coinone.py +27 -10
  151. ccxt/coinsph.py +73 -27
  152. ccxt/coinspot.py +25 -9
  153. ccxt/cryptocom.py +103 -38
  154. ccxt/currencycom.py +70 -23
  155. ccxt/delta.py +90 -30
  156. ccxt/deribit.py +138 -53
  157. ccxt/digifinex.py +114 -51
  158. ccxt/exmo.py +104 -45
  159. ccxt/gate.py +298 -155
  160. ccxt/gemini.py +57 -20
  161. ccxt/hashkey.py +151 -66
  162. ccxt/hitbtc.py +156 -73
  163. ccxt/hollaex.py +76 -25
  164. ccxt/htx.py +297 -240
  165. ccxt/huobijp.py +1 -0
  166. ccxt/hyperliquid.py +203 -42
  167. ccxt/idex.py +73 -24
  168. ccxt/independentreserve.py +12 -5
  169. ccxt/indodax.py +53 -16
  170. ccxt/kraken.py +107 -35
  171. ccxt/krakenfutures.py +88 -34
  172. ccxt/kucoin.py +211 -109
  173. ccxt/kucoinfutures.py +119 -42
  174. ccxt/kuna.py +80 -39
  175. ccxt/latoken.py +70 -33
  176. ccxt/lbank.py +90 -39
  177. ccxt/luno.py +54 -19
  178. ccxt/lykke.py +54 -19
  179. ccxt/mercado.py +1 -0
  180. ccxt/mexc.py +226 -108
  181. ccxt/ndax.py +58 -19
  182. ccxt/novadax.py +67 -22
  183. ccxt/oceanex.py +58 -19
  184. ccxt/okcoin.py +81 -38
  185. ccxt/okx.py +270 -109
  186. ccxt/onetrading.py +3 -1
  187. ccxt/oxfun.py +95 -36
  188. ccxt/p2b.py +49 -23
  189. ccxt/paradex.py +75 -27
  190. ccxt/paymium.py +31 -11
  191. ccxt/phemex.py +91 -41
  192. ccxt/poloniex.py +80 -30
  193. ccxt/poloniexfutures.py +72 -30
  194. ccxt/pro/__init__.py +1 -1
  195. ccxt/pro/alpaca.py +15 -5
  196. ccxt/pro/ascendex.py +18 -6
  197. ccxt/pro/binance.py +200 -119
  198. ccxt/pro/bingx.py +44 -24
  199. ccxt/pro/bitfinex.py +13 -5
  200. ccxt/pro/bitget.py +75 -36
  201. ccxt/pro/bithumb.py +12 -4
  202. ccxt/pro/bitmart.py +44 -20
  203. ccxt/pro/bitmex.py +42 -14
  204. ccxt/pro/bitopro.py +15 -5
  205. ccxt/pro/bitrue.py +7 -3
  206. ccxt/pro/bitvavo.py +51 -17
  207. ccxt/pro/blockchaincom.py +18 -6
  208. ccxt/pro/blofin.py +38 -13
  209. ccxt/pro/bybit.py +100 -42
  210. ccxt/pro/cex.py +48 -16
  211. ccxt/pro/coinbase.py +32 -12
  212. ccxt/pro/coinbaseexchange.py +1 -1
  213. ccxt/pro/coinbaseinternational.py +34 -14
  214. ccxt/pro/coincatch.py +54 -19
  215. ccxt/pro/coincheck.py +6 -2
  216. ccxt/pro/coinex.py +40 -20
  217. ccxt/pro/coinone.py +9 -3
  218. ccxt/pro/cryptocom.py +70 -26
  219. ccxt/pro/deribit.py +36 -12
  220. ccxt/pro/exmo.py +10 -4
  221. ccxt/pro/gate.py +64 -30
  222. ccxt/pro/gemini.py +21 -7
  223. ccxt/pro/hashkey.py +26 -8
  224. ccxt/pro/hitbtc.py +61 -37
  225. ccxt/pro/hollaex.py +15 -5
  226. ccxt/pro/htx.py +39 -21
  227. ccxt/pro/hyperliquid.py +41 -14
  228. ccxt/pro/kraken.py +49 -17
  229. ccxt/pro/krakenfutures.py +47 -24
  230. ccxt/pro/kucoin.py +60 -31
  231. ccxt/pro/kucoinfutures.py +41 -19
  232. ccxt/pro/lbank.py +27 -9
  233. ccxt/pro/luno.py +3 -1
  234. ccxt/pro/mexc.py +35 -17
  235. ccxt/pro/ndax.py +12 -4
  236. ccxt/pro/okcoin.py +18 -6
  237. ccxt/pro/okx.py +76 -28
  238. ccxt/pro/onetrading.py +21 -7
  239. ccxt/pro/oxfun.py +54 -20
  240. ccxt/pro/p2b.py +23 -11
  241. ccxt/pro/paradex.py +12 -4
  242. ccxt/pro/phemex.py +31 -19
  243. ccxt/pro/poloniex.py +50 -22
  244. ccxt/pro/poloniexfutures.py +17 -7
  245. ccxt/pro/probit.py +18 -6
  246. ccxt/pro/upbit.py +25 -9
  247. ccxt/pro/vertex.py +20 -6
  248. ccxt/pro/wazirx.py +21 -7
  249. ccxt/pro/whitebit.py +25 -9
  250. ccxt/pro/woo.py +32 -12
  251. ccxt/pro/woofipro.py +35 -13
  252. ccxt/pro/xt.py +46 -26
  253. ccxt/probit.py +64 -22
  254. ccxt/test/tests_helpers.py +2 -2
  255. ccxt/timex.py +58 -19
  256. ccxt/tokocrypto.py +63 -22
  257. ccxt/tradeogre.py +7 -2
  258. ccxt/upbit.py +72 -25
  259. ccxt/vertex.py +74 -28
  260. ccxt/wavesexchange.py +29 -8
  261. ccxt/wazirx.py +51 -17
  262. ccxt/whitebit.py +105 -41
  263. ccxt/woo.py +162 -65
  264. ccxt/woofipro.py +118 -49
  265. ccxt/xt.py +150 -73
  266. ccxt/yobit.py +49 -16
  267. ccxt/zaif.py +30 -10
  268. ccxt/zonda.py +46 -16
  269. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/METADATA +5 -5
  270. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/RECORD +273 -273
  271. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/LICENSE.txt +0 -0
  272. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/WHEEL +0 -0
  273. {ccxt-4.4.29.dist-info → ccxt-4.4.31.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,7 +3016,9 @@ 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
@@ -3052,10 +3103,12 @@ class gate(Exchange, ImplicitAPI):
3052
3103
  async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
3053
3104
  """
3054
3105
  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
3106
+
3107
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-market-trades
3108
+ https://www.gate.io/docs/developers/apiv4/en/#futures-trading-history
3109
+ https://www.gate.io/docs/developers/apiv4/en/#futures-trading-history-2
3110
+ https://www.gate.io/docs/developers/apiv4/en/#options-trade-history
3111
+
3059
3112
  :param str symbol: unified symbol of the market to fetch trades for
3060
3113
  :param int [since]: timestamp in ms of the earliest trade to fetch
3061
3114
  :param int [limit]: the maximum amount of trades to fetch
@@ -3156,10 +3209,12 @@ class gate(Exchange, ImplicitAPI):
3156
3209
  async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3157
3210
  """
3158
3211
  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
3212
+
3213
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history
3214
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-2
3215
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-3
3216
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-4
3217
+
3163
3218
  :param str id: order id
3164
3219
  :param str symbol: unified market symbol
3165
3220
  :param int [since]: the earliest time in ms to fetch trades for
@@ -3195,10 +3250,12 @@ class gate(Exchange, ImplicitAPI):
3195
3250
  async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3196
3251
  """
3197
3252
  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
3253
+
3254
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history
3255
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-2
3256
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-3
3257
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-4
3258
+
3202
3259
  :param str symbol: unified market symbol
3203
3260
  :param int [since]: the earliest time in ms to fetch trades for
3204
3261
  :param int [limit]: the maximum number of trades structures to retrieve
@@ -3467,12 +3524,14 @@ class gate(Exchange, ImplicitAPI):
3467
3524
  async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
3468
3525
  """
3469
3526
  fetch all deposits made to an account
3470
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-deposit-records
3527
+
3528
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-deposit-records
3529
+
3471
3530
  :param str code: unified currency code
3472
3531
  :param int [since]: the earliest time in ms to fetch deposits for
3473
3532
  :param int [limit]: the maximum number of deposits structures to retrieve
3474
- :param int [params.until]: end time in ms
3475
3533
  :param dict [params]: extra parameters specific to the exchange API endpoint
3534
+ :param int [params.until]: end time in ms
3476
3535
  :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
3536
  :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
3478
3537
  """
@@ -3499,7 +3558,9 @@ class gate(Exchange, ImplicitAPI):
3499
3558
  async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
3500
3559
  """
3501
3560
  fetch all withdrawals made from an account
3502
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-records
3561
+
3562
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-records
3563
+
3503
3564
  :param str code: unified currency code
3504
3565
  :param int [since]: the earliest time in ms to fetch withdrawals for
3505
3566
  :param int [limit]: the maximum number of withdrawals structures to retrieve
@@ -3531,7 +3592,9 @@ class gate(Exchange, ImplicitAPI):
3531
3592
  async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
3532
3593
  """
3533
3594
  make a withdrawal
3534
- :see: https://www.gate.io/docs/developers/apiv4/en/#withdraw
3595
+
3596
+ https://www.gate.io/docs/developers/apiv4/en/#withdraw
3597
+
3535
3598
  :param str code: unified currency code
3536
3599
  :param float amount: the amount to withdraw
3537
3600
  :param str address: the address to withdraw to
@@ -3707,13 +3770,15 @@ class gate(Exchange, ImplicitAPI):
3707
3770
  async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
3708
3771
  """
3709
3772
  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
3773
+
3774
+ https://www.gate.io/docs/developers/apiv4/en/#create-an-order
3775
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order
3776
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order
3777
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order-2
3778
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order-2
3779
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order-3
3780
+ https://www.gate.io/docs/developers/apiv4/en/#create-an-options-order
3781
+
3717
3782
  :param str symbol: Unified CCXT market symbol
3718
3783
  :param str type: 'limit' or 'market' *"market" is contract only*
3719
3784
  :param str side: 'buy' or 'sell'
@@ -3867,10 +3932,13 @@ class gate(Exchange, ImplicitAPI):
3867
3932
  async def create_orders(self, orders: List[OrderRequest], params={}):
3868
3933
  """
3869
3934
  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
3935
+
3936
+ https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-2
3937
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-batch-of-orders
3938
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-batch-of-futures-orders
3939
+
3873
3940
  :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
3941
+ :param dict [params]: extra parameters specific to the exchange API endpoint
3874
3942
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
3875
3943
  """
3876
3944
  await self.load_markets()
@@ -4099,7 +4167,9 @@ class gate(Exchange, ImplicitAPI):
4099
4167
  async def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
4100
4168
  """
4101
4169
  create a market buy order by providing the symbol and cost
4102
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-an-order
4170
+
4171
+ https://www.gate.io/docs/developers/apiv4/en/#create-an-order
4172
+
4103
4173
  :param str symbol: unified symbol of the market to create an order in
4104
4174
  :param float cost: how much you want to trade in units of the quote currency
4105
4175
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -4150,8 +4220,10 @@ class gate(Exchange, ImplicitAPI):
4150
4220
  async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
4151
4221
  """
4152
4222
  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
4223
+
4224
+ https://www.gate.io/docs/developers/apiv4/en/#amend-an-order
4225
+ https://www.gate.io/docs/developers/apiv4/en/#amend-an-order-2
4226
+
4155
4227
  :param str id: order id
4156
4228
  :param str symbol: unified symbol of the market to create an order in
4157
4229
  :param str type: 'market' or 'limit'
@@ -4494,10 +4566,12 @@ class gate(Exchange, ImplicitAPI):
4494
4566
  async def fetch_order(self, id: str, symbol: Str = None, params={}):
4495
4567
  """
4496
4568
  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
4569
+
4570
+ https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order
4571
+ https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-2
4572
+ https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-3
4573
+ https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-4
4574
+
4501
4575
  :param str id: Order id
4502
4576
  :param str symbol: Unified market symbol, *required for spot and margin*
4503
4577
  :param dict [params]: Parameters specified by the exchange api
@@ -4540,8 +4614,10 @@ class gate(Exchange, ImplicitAPI):
4540
4614
  async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
4541
4615
  """
4542
4616
  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
4617
+
4618
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-open-orders
4619
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-running-auto-order-list
4620
+
4545
4621
  :param str symbol: unified market symbol
4546
4622
  :param int [since]: the earliest time in ms to fetch open orders for
4547
4623
  :param int [limit]: the maximum number of open orders structures to retrieve
@@ -4557,14 +4633,16 @@ class gate(Exchange, ImplicitAPI):
4557
4633
  async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
4558
4634
  """
4559
4635
  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
4636
+
4637
+ https://www.gate.io/docs/developers/apiv4/en/#list-orders
4638
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-running-auto-order-list
4639
+ https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders
4640
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-auto-orders
4641
+ https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders-2
4642
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-auto-orders-2
4643
+ https://www.gate.io/docs/developers/apiv4/en/#list-options-orders
4644
+ https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders-by-time-range
4645
+
4568
4646
  :param str symbol: unified market symbol of the market orders were made in
4569
4647
  :param int [since]: the earliest time in ms to fetch orders for
4570
4648
  :param int [limit]: the maximum number of order structures to retrieve
@@ -4829,10 +4907,12 @@ class gate(Exchange, ImplicitAPI):
4829
4907
  async def cancel_order(self, id: str, symbol: Str = None, params={}):
4830
4908
  """
4831
4909
  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
4910
+
4911
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order
4912
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-2
4913
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-3
4914
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-4
4915
+
4836
4916
  :param str id: Order id
4837
4917
  :param str symbol: Unified market symbol
4838
4918
  :param dict [params]: Parameters specified by the exchange api
@@ -4954,8 +5034,10 @@ class gate(Exchange, ImplicitAPI):
4954
5034
  async def cancel_orders(self, ids: List[str], symbol: Str = None, params={}):
4955
5035
  """
4956
5036
  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
5037
+
5038
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
5039
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list-2
5040
+
4959
5041
  :param str[] ids: order ids
4960
5042
  :param str symbol: unified symbol of the market the order was made in
4961
5043
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -4996,7 +5078,9 @@ class gate(Exchange, ImplicitAPI):
4996
5078
  async def cancel_orders_for_symbols(self, orders: List[CancellationRequest], params={}):
4997
5079
  """
4998
5080
  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
5081
+
5082
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
5083
+
5000
5084
  :param CancellationRequest[] orders: list of order ids with symbol, example [{"id": "a", "symbol": "BTC/USDT"}, {"id": "b", "symbol": "ETH/USDT"}]
5001
5085
  :param dict [params]: extra parameters specific to the exchange API endpoint
5002
5086
  :param str[] [params.clientOrderIds]: client order ids
@@ -5032,10 +5116,12 @@ class gate(Exchange, ImplicitAPI):
5032
5116
  async def cancel_all_orders(self, symbol: Str = None, params={}):
5033
5117
  """
5034
5118
  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
5119
+
5120
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-in-specified-currency-pair
5121
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched
5122
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched-2
5123
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched-3
5124
+
5039
5125
  :param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
5040
5126
  :param dict [params]: extra parameters specific to the exchange API endpoint
5041
5127
  :param bool [params.unifiedAccount]: set to True for canceling unified account orders
@@ -5101,7 +5187,9 @@ class gate(Exchange, ImplicitAPI):
5101
5187
  async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
5102
5188
  """
5103
5189
  transfer currency internally between wallets on the same account
5104
- :see: https://www.gate.io/docs/developers/apiv4/en/#transfer-between-trading-accounts
5190
+
5191
+ https://www.gate.io/docs/developers/apiv4/en/#transfer-between-trading-accounts
5192
+
5105
5193
  :param str code: unified currency code for currency being transferred
5106
5194
  :param float amount: the amount of currency to transfer
5107
5195
  :param str fromAccount: the account to transfer currency from
@@ -5177,8 +5265,10 @@ class gate(Exchange, ImplicitAPI):
5177
5265
  async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
5178
5266
  """
5179
5267
  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
5268
+
5269
+ https://www.gate.io/docs/developers/apiv4/en/#update-position-leverage
5270
+ https://www.gate.io/docs/developers/apiv4/en/#update-position-leverage-2
5271
+
5182
5272
  :param float leverage: the rate of leverage
5183
5273
  :param str symbol: unified market symbol
5184
5274
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -5379,9 +5469,11 @@ class gate(Exchange, ImplicitAPI):
5379
5469
  async def fetch_position(self, symbol: str, params={}):
5380
5470
  """
5381
5471
  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
5472
+
5473
+ https://www.gate.io/docs/developers/apiv4/en/#get-single-position
5474
+ https://www.gate.io/docs/developers/apiv4/en/#get-single-position-2
5475
+ https://www.gate.io/docs/developers/apiv4/en/#get-specified-contract-position
5476
+
5385
5477
  :param str symbol: unified market symbol of the market the position is held in
5386
5478
  :param dict [params]: extra parameters specific to the exchange API endpoint
5387
5479
  :returns dict: a `position structure <https://docs.ccxt.com/#/?id=position-structure>`
@@ -5461,9 +5553,11 @@ class gate(Exchange, ImplicitAPI):
5461
5553
  async def fetch_positions(self, symbols: Strings = None, params={}):
5462
5554
  """
5463
5555
  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
5556
+
5557
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-positions-of-a-user
5558
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-positions-of-a-user-2
5559
+ https://www.gate.io/docs/developers/apiv4/en/#list-user-s-positions-of-specified-underlying
5560
+
5467
5561
  :param str[]|None symbols: Not used by gate, but parsed internally by CCXT
5468
5562
  :param dict [params]: extra parameters specific to the exchange API endpoint
5469
5563
  :param str [params.settle]: 'btc' or 'usdt' - settle currency for perpetual swap and future - default="usdt" for swap and "btc" for future
@@ -5561,8 +5655,10 @@ class gate(Exchange, ImplicitAPI):
5561
5655
  async def fetch_leverage_tiers(self, symbols: Strings = None, params={}) -> LeverageTiers:
5562
5656
  """
5563
5657
  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
5658
+
5659
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts
5660
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts-2
5661
+
5566
5662
  :param str[] [symbols]: list of unified market symbols
5567
5663
  :param dict [params]: extra parameters specific to the exchange API endpoint
5568
5664
  :returns dict: a dictionary of `leverage tiers structures <https://docs.ccxt.com/#/?id=leverage-tiers-structure>`, indexed by market symbols
@@ -5676,7 +5772,9 @@ class gate(Exchange, ImplicitAPI):
5676
5772
  async def fetch_market_leverage_tiers(self, symbol: str, params={}) -> List[LeverageTier]:
5677
5773
  """
5678
5774
  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
5775
+
5776
+ https://www.gate.io/docs/developers/apiv4/en/#list-risk-limit-tiers
5777
+
5680
5778
  :param str symbol: unified market symbol
5681
5779
  :param dict [params]: extra parameters specific to the exchange API endpoint
5682
5780
  :returns dict: a `leverage tiers structure <https://docs.ccxt.com/#/?id=leverage-tiers-structure>`
@@ -5701,7 +5799,8 @@ class gate(Exchange, ImplicitAPI):
5701
5799
  #
5702
5800
  return self.parse_market_leverage_tiers(response, market)
5703
5801
 
5704
- def parse_emulated_leverage_tiers(self, info, market=None):
5802
+ def parse_emulated_leverage_tiers(self, info, market=None) -> List[LeverageTier]:
5803
+ marketId = self.safe_string(info, 'name')
5705
5804
  maintenanceMarginUnit = self.safe_string(info, 'maintenance_rate') # '0.005',
5706
5805
  leverageMax = self.safe_string(info, 'leverage_max') # '100',
5707
5806
  riskLimitStep = self.safe_string(info, 'risk_limit_step') # '1000000',
@@ -5715,6 +5814,7 @@ class gate(Exchange, ImplicitAPI):
5715
5814
  cap = Precise.string_add(floor, riskLimitStep)
5716
5815
  tiers.append({
5717
5816
  'tier': self.parse_number(Precise.string_div(cap, riskLimitStep)),
5817
+ 'symbol': self.safe_symbol(marketId, market, None, 'contract'),
5718
5818
  'currency': self.safe_string(market, 'settle'),
5719
5819
  'minNotional': self.parse_number(floor),
5720
5820
  'maxNotional': self.parse_number(cap),
@@ -5748,6 +5848,7 @@ class gate(Exchange, ImplicitAPI):
5748
5848
  maxNotional = self.safe_number(item, 'risk_limit')
5749
5849
  tiers.append({
5750
5850
  'tier': self.sum(i, 1),
5851
+ 'symbol': market['symbol'],
5751
5852
  'currency': market['base'],
5752
5853
  'minNotional': minNotional,
5753
5854
  'maxNotional': maxNotional,
@@ -5761,7 +5862,9 @@ class gate(Exchange, ImplicitAPI):
5761
5862
  async def repay_isolated_margin(self, symbol: str, code: str, amount, params={}):
5762
5863
  """
5763
5864
  repay borrowed margin and interest
5764
- :see: https://www.gate.io/docs/apiv4/en/#repay-a-loan
5865
+
5866
+ https://www.gate.io/docs/apiv4/en/#repay-a-loan
5867
+
5765
5868
  :param str symbol: unified market symbol
5766
5869
  :param str code: unified currency code of the currency to repay
5767
5870
  :param float amount: the amount to repay
@@ -5788,11 +5891,12 @@ class gate(Exchange, ImplicitAPI):
5788
5891
  async def repay_cross_margin(self, code: str, amount, params={}):
5789
5892
  """
5790
5893
  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
5894
+
5895
+ https://www.gate.io/docs/developers/apiv4/en/#cross-margin-repayments
5896
+ https://www.gate.io/docs/developers/apiv4/en/#borrow-or-repay
5897
+
5793
5898
  :param str code: unified currency code of the currency to repay
5794
5899
  :param float amount: the amount to repay
5795
- :param str symbol: unified market symbol, required for isolated margin
5796
5900
  :param dict [params]: extra parameters specific to the exchange API endpoint
5797
5901
  :param str [params.mode]: 'all' or 'partial' payment mode, extra parameter required for isolated margin
5798
5902
  :param str [params.id]: '34267567' loan id, extra parameter required for isolated margin
@@ -5836,10 +5940,12 @@ class gate(Exchange, ImplicitAPI):
5836
5940
  async def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
5837
5941
  """
5838
5942
  create a loan to borrow margin
5839
- :see: https://www.gate.io/docs/developers/apiv4/en/#marginuni
5943
+
5944
+ https://www.gate.io/docs/developers/apiv4/en/#marginuni
5945
+
5946
+ :param str symbol: unified market symbol, required for isolated margin
5840
5947
  :param str code: unified currency code of the currency to borrow
5841
5948
  :param float amount: the amount to borrow
5842
- :param str symbol: unified market symbol, required for isolated margin
5843
5949
  :param dict [params]: extra parameters specific to the exchange API endpoint
5844
5950
  :param str [params.rate]: '0.0002' or '0.002' extra parameter required for isolated margin
5845
5951
  :returns dict: a `margin loan structure <https://docs.ccxt.com/#/?id=margin-loan-structure>`
@@ -5879,11 +5985,12 @@ class gate(Exchange, ImplicitAPI):
5879
5985
  async def borrow_cross_margin(self, code: str, amount: float, params={}):
5880
5986
  """
5881
5987
  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
5988
+
5989
+ https://www.gate.io/docs/apiv4/en/#create-a-cross-margin-borrow-loan
5990
+ https://www.gate.io/docs/developers/apiv4/en/#borrow-or-repay
5991
+
5884
5992
  :param str code: unified currency code of the currency to borrow
5885
5993
  :param float amount: the amount to borrow
5886
- :param str symbol: unified market symbol, required for isolated margin
5887
5994
  :param dict [params]: extra parameters specific to the exchange API endpoint
5888
5995
  :param str [params.rate]: '0.0002' or '0.002' extra parameter required for isolated margin
5889
5996
  :param boolean [params.unifiedAccount]: set to True for borrowing in the unified account
@@ -5976,9 +6083,11 @@ class gate(Exchange, ImplicitAPI):
5976
6083
  async def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[BorrowInterest]:
5977
6084
  """
5978
6085
  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
6086
+
6087
+ https://www.gate.io/docs/developers/apiv4/en/#list-interest-records
6088
+ https://www.gate.io/docs/developers/apiv4/en/#interest-records-for-the-cross-margin-account
6089
+ https://www.gate.io/docs/developers/apiv4/en/#list-interest-records-2
6090
+
5982
6091
  :param str [code]: unified currency code
5983
6092
  :param str [symbol]: unified market symbol when fetching interest in isolated markets
5984
6093
  :param int [since]: the earliest time in ms to fetch borrow interest for
@@ -6170,8 +6279,10 @@ class gate(Exchange, ImplicitAPI):
6170
6279
  async def reduce_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
6171
6280
  """
6172
6281
  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
6282
+
6283
+ https://www.gate.io/docs/developers/apiv4/en/#update-position-margin
6284
+ https://www.gate.io/docs/developers/apiv4/en/#update-position-margin-2
6285
+
6175
6286
  :param str symbol: unified market symbol
6176
6287
  :param float amount: the amount of margin to remove
6177
6288
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -6182,8 +6293,10 @@ class gate(Exchange, ImplicitAPI):
6182
6293
  async def add_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
6183
6294
  """
6184
6295
  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
6296
+
6297
+ https://www.gate.io/docs/developers/apiv4/en/#update-position-margin
6298
+ https://www.gate.io/docs/developers/apiv4/en/#update-position-margin-2
6299
+
6187
6300
  :param str symbol: unified market symbol
6188
6301
  :param float amount: amount of margin to add
6189
6302
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -6194,7 +6307,9 @@ class gate(Exchange, ImplicitAPI):
6194
6307
  async def fetch_open_interest_history(self, symbol: str, timeframe='5m', since: Int = None, limit: Int = None, params={}):
6195
6308
  """
6196
6309
  Retrieves the open interest of a currency
6197
- :see: https://www.gate.io/docs/developers/apiv4/en/#futures-stats
6310
+
6311
+ https://www.gate.io/docs/developers/apiv4/en/#futures-stats
6312
+
6198
6313
  :param str symbol: Unified CCXT market symbol
6199
6314
  :param str timeframe: "5m", "15m", "30m", "1h", "4h", "1d"
6200
6315
  :param int [since]: the time(ms) of the earliest record to retrieve unix timestamp
@@ -6276,7 +6391,9 @@ class gate(Exchange, ImplicitAPI):
6276
6391
  async def fetch_settlement_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
6277
6392
  """
6278
6393
  fetches historical settlement records
6279
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-settlement-history-2
6394
+
6395
+ https://www.gate.io/docs/developers/apiv4/en/#list-settlement-history-2
6396
+
6280
6397
  :param str symbol: unified market symbol of the settlement history, required on gate
6281
6398
  :param int [since]: timestamp in ms
6282
6399
  :param int [limit]: number of records
@@ -6320,7 +6437,9 @@ class gate(Exchange, ImplicitAPI):
6320
6437
  async def fetch_my_settlement_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
6321
6438
  """
6322
6439
  fetches historical settlement records of the user
6323
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-my-options-settlements
6440
+
6441
+ https://www.gate.io/docs/developers/apiv4/en/#list-my-options-settlements
6442
+
6324
6443
  :param str symbol: unified market symbol of the settlement history
6325
6444
  :param int [since]: timestamp in ms
6326
6445
  :param int [limit]: number of records
@@ -6443,11 +6562,13 @@ class gate(Exchange, ImplicitAPI):
6443
6562
  async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]:
6444
6563
  """
6445
6564
  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
6565
+
6566
+ https://www.gate.io/docs/developers/apiv4/en/#query-account-book
6567
+ https://www.gate.io/docs/developers/apiv4/en/#list-margin-account-balance-change-history
6568
+ https://www.gate.io/docs/developers/apiv4/en/#query-account-book-2
6569
+ https://www.gate.io/docs/developers/apiv4/en/#query-account-book-3
6570
+ https://www.gate.io/docs/developers/apiv4/en/#list-account-changing-history
6571
+
6451
6572
  :param str [code]: unified currency code
6452
6573
  :param int [since]: timestamp in ms of the earliest ledger entry
6453
6574
  :param int [limit]: max number of ledger entries to return
@@ -6672,7 +6793,9 @@ class gate(Exchange, ImplicitAPI):
6672
6793
  async def set_position_mode(self, hedged: bool, symbol: Str = None, params={}):
6673
6794
  """
6674
6795
  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
6796
+
6797
+ https://www.gate.io/docs/developers/apiv4/en/#enable-or-disable-dual-mode
6798
+
6676
6799
  :param bool hedged: set to True to enable dual mode
6677
6800
  :param str|None symbol: if passed, dual mode is set for all markets with the same settle currency
6678
6801
  :param dict params: extra parameters specific to the exchange API endpoint
@@ -6687,7 +6810,9 @@ class gate(Exchange, ImplicitAPI):
6687
6810
  async def fetch_underlying_assets(self, params={}):
6688
6811
  """
6689
6812
  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
6813
+
6814
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-underlyings
6815
+
6691
6816
  :param dict [params]: exchange specific params
6692
6817
  :param str [params.type]: the contract market type, 'option', 'swap' or 'future', the default is 'option'
6693
6818
  :returns dict[]: a list of `underlying assets <https://docs.ccxt.com/#/?id=underlying-assets-structure>`
@@ -6720,7 +6845,9 @@ class gate(Exchange, ImplicitAPI):
6720
6845
  async def fetch_liquidations(self, symbol: str, since: Int = None, limit: Int = None, params={}):
6721
6846
  """
6722
6847
  retrieves the public liquidations of a trading pair
6723
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-liquidation-history
6848
+
6849
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-liquidation-history
6850
+
6724
6851
  :param str symbol: unified CCXT market symbol
6725
6852
  :param int [since]: the earliest time in ms to fetch liquidations for
6726
6853
  :param int [limit]: the maximum number of liquidation structures to retrieve
@@ -6759,9 +6886,11 @@ class gate(Exchange, ImplicitAPI):
6759
6886
  async def fetch_my_liquidations(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
6760
6887
  """
6761
6888
  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
6889
+
6890
+ https://www.gate.io/docs/developers/apiv4/en/#list-liquidation-history
6891
+ https://www.gate.io/docs/developers/apiv4/en/#list-liquidation-history-2
6892
+ https://www.gate.io/docs/developers/apiv4/en/#list-user-s-liquidation-history-of-specified-underlying
6893
+
6765
6894
  :param str symbol: unified CCXT market symbol
6766
6895
  :param int [since]: the earliest time in ms to fetch liquidations for
6767
6896
  :param int [limit]: the maximum number of liquidation structures to retrieve
@@ -6894,7 +7023,9 @@ class gate(Exchange, ImplicitAPI):
6894
7023
  async def fetch_greeks(self, symbol: str, params={}) -> Greeks:
6895
7024
  """
6896
7025
  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
7026
+
7027
+ https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
7028
+
6898
7029
  :param str symbol: unified symbol of the market to fetch greeks for
6899
7030
  :param dict [params]: extra parameters specific to the exchange API endpoint
6900
7031
  :returns dict: a `greeks structure <https://docs.ccxt.com/#/?id=greeks-structure>`
@@ -6983,9 +7114,11 @@ class gate(Exchange, ImplicitAPI):
6983
7114
  async def close_position(self, symbol: str, side: OrderSide = None, params={}) -> Order:
6984
7115
  """
6985
7116
  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
7117
+
7118
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order
7119
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order-2
7120
+ https://www.gate.io/docs/developers/apiv4/en/#create-an-options-order
7121
+
6989
7122
  :param str symbol: Unified CCXT market symbol
6990
7123
  :param str side: 'buy' or 'sell'
6991
7124
  :param dict [params]: extra parameters specific to the okx api endpoint
@@ -7002,9 +7135,11 @@ class gate(Exchange, ImplicitAPI):
7002
7135
  async def fetch_leverage(self, symbol: str, params={}) -> Leverage:
7003
7136
  """
7004
7137
  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
7138
+
7139
+ https://www.gate.io/docs/developers/apiv4/en/#get-unified-account-information
7140
+ https://www.gate.io/docs/developers/apiv4/en/#get-detail-of-lending-market
7141
+ https://www.gate.io/docs/developers/apiv4/en/#query-one-single-margin-currency-pair-deprecated
7142
+
7008
7143
  :param str symbol: unified market symbol
7009
7144
  :param dict [params]: extra parameters specific to the exchange API endpoint
7010
7145
  :param boolean [params.unified]: default False, set to True for fetching the unified accounts leverage
@@ -7104,8 +7239,10 @@ class gate(Exchange, ImplicitAPI):
7104
7239
  async def fetch_leverages(self, symbols: Strings = None, params={}) -> Leverages:
7105
7240
  """
7106
7241
  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
7242
+
7243
+ https://www.gate.io/docs/developers/apiv4/en/#list-lending-markets
7244
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-supported-currency-pairs-supported-in-margin-trading-deprecated
7245
+
7109
7246
  :param str[] symbols: a list of unified market symbols
7110
7247
  :param dict [params]: extra parameters specific to the exchange API endpoint
7111
7248
  :param boolean [params.unified]: default False, set to True for fetching unified account leverages
@@ -7162,7 +7299,9 @@ class gate(Exchange, ImplicitAPI):
7162
7299
  async def fetch_option(self, symbol: str, params={}) -> Option:
7163
7300
  """
7164
7301
  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
7302
+
7303
+ https://www.gate.io/docs/developers/apiv4/en/#query-specified-contract-detail
7304
+
7166
7305
  :param str symbol: unified market symbol
7167
7306
  :param dict [params]: extra parameters specific to the exchange API endpoint
7168
7307
  :returns dict: an `option chain structure <https://docs.ccxt.com/#/?id=option-chain-structure>`
@@ -7218,8 +7357,10 @@ class gate(Exchange, ImplicitAPI):
7218
7357
  async def fetch_option_chain(self, code: str, params={}) -> OptionChain:
7219
7358
  """
7220
7359
  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
7360
+
7361
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-the-contracts-with-specified-underlying-and-expiration-time
7362
+
7363
+ :param str code: base currency to fetch an option chain for
7223
7364
  :param dict [params]: extra parameters specific to the exchange API endpoint
7224
7365
  :param str [params.underlying]: the underlying asset, can be obtained from fetchUnderlyingAssets()
7225
7366
  :param int [params.expiration]: unix timestamp of the expiration time
@@ -7342,18 +7483,20 @@ class gate(Exchange, ImplicitAPI):
7342
7483
  async def fetch_positions_history(self, symbols: Strings = None, since: Int = None, limit: Int = None, params={}) -> List[Position]:
7343
7484
  """
7344
7485
  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
7486
+
7487
+ https://www.gate.io/docs/developers/apiv4/#list-position-close-history
7488
+ https://www.gate.io/docs/developers/apiv4/#list-position-close-history-2
7489
+
7347
7490
  :param str[] symbols: unified conract symbols, must all have the same settle currency and the same market type
7348
7491
  :param int [since]: the earliest time in ms to fetch positions for
7349
7492
  :param int [limit]: the maximum amount of records to fetch, default=1000
7350
7493
  :param dict params: extra parameters specific to the exchange api endpoint
7351
7494
  :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
7495
+
7496
+ EXCHANGE SPECIFIC PARAMETERS
7497
+ :param int [params.offset]: list offset, starting from 0
7498
+ :param str [params.side]: long or short
7499
+ :param str [params.pnl]: query profit or loss
7357
7500
  :returns dict[]: a list of `position structures <https://docs.ccxt.com/#/?id=position-structure>`
7358
7501
  """
7359
7502
  await self.load_markets()