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
ccxt/gate.py CHANGED
@@ -169,7 +169,7 @@ class gate(Exchange, ImplicitAPI):
169
169
  'fetchSettlementHistory': True,
170
170
  'fetchTicker': True,
171
171
  'fetchTickers': True,
172
- 'fetchTime': False,
172
+ 'fetchTime': True,
173
173
  'fetchTrades': True,
174
174
  'fetchTradingFee': True,
175
175
  'fetchTradingFees': True,
@@ -916,8 +916,11 @@ class gate(Exchange, ImplicitAPI):
916
916
 
917
917
  def load_unified_status(self, params={}):
918
918
  """
919
+ :param dict [params]: extra parameters specific to the exchange API endpoint
919
920
  returns unifiedAccount so the user can check if the unified account is enabled
920
- :see: https://www.gate.io/docs/developers/apiv4/#get-account-detail
921
+
922
+ https://www.gate.io/docs/developers/apiv4/#get-account-detail
923
+
921
924
  :returns boolean: True or False if the enabled unified account is enabled or not and sets the unifiedAccount option if it is None
922
925
  """
923
926
  unifiedAccount = self.safe_bool(self.options, 'unifiedAccount')
@@ -946,6 +949,23 @@ class gate(Exchange, ImplicitAPI):
946
949
  def upgrade_unified_trade_account(self, params={}):
947
950
  return self.privateUnifiedPutUnifiedMode(params)
948
951
 
952
+ def fetch_time(self, params={}):
953
+ """
954
+ fetches the current integer timestamp in milliseconds from the exchange server
955
+
956
+ https://www.gate.io/docs/developers/apiv4/en/#get-server-current-time
957
+
958
+ :param dict [params]: extra parameters specific to the exchange API endpoint
959
+ :returns int: the current integer timestamp in milliseconds from the exchange server
960
+ """
961
+ response = self.publicSpotGetTime(params)
962
+ #
963
+ # {
964
+ # "server_time": 1731447921098
965
+ # }
966
+ #
967
+ return self.safe_integer(response, 'server_time')
968
+
949
969
  def create_expired_option_market(self, symbol: str):
950
970
  # support expired option contracts
951
971
  quote = 'USDT'
@@ -1019,11 +1039,13 @@ class gate(Exchange, ImplicitAPI):
1019
1039
  def fetch_markets(self, params={}) -> List[Market]:
1020
1040
  """
1021
1041
  retrieves data on all markets for gate
1022
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-currency-pairs-supported # spot
1023
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-supported-currency-pairs-supported-in-margin-trading # margin
1024
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts # swap
1025
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts-2 # future
1026
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-the-contracts-with-specified-underlying-and-expiration-time # option
1042
+
1043
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-currency-pairs-supported # spot
1044
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-supported-currency-pairs-supported-in-margin-trading # margin
1045
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts # swap
1046
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts-2 # future
1047
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-the-contracts-with-specified-underlying-and-expiration-time # option
1048
+
1027
1049
  :param dict [params]: extra parameters specific to the exchange API endpoint
1028
1050
  :returns dict[]: an array of objects representing market data
1029
1051
  """
@@ -1483,7 +1505,7 @@ class gate(Exchange, ImplicitAPI):
1483
1505
 
1484
1506
  def prepare_request(self, market=None, type=None, params={}):
1485
1507
  """
1486
- * @ignore
1508
+ @ignore
1487
1509
  Fills request params contract, settle, currency_pair, market and account where applicable
1488
1510
  :param dict market: CCXT market, required when type is None
1489
1511
  :param str type: 'spot', 'swap', or 'future', required when market is None
@@ -1511,7 +1533,7 @@ class gate(Exchange, ImplicitAPI):
1511
1533
 
1512
1534
  def spot_order_prepare_request(self, market=None, stop=False, params={}):
1513
1535
  """
1514
- * @ignore
1536
+ @ignore
1515
1537
  Fills request params currency_pair, market and account where applicable for spot order methods like fetchOpenOrders, cancelAllOrders
1516
1538
  :param dict market: CCXT market
1517
1539
  :param bool stop: True if for a stop order
@@ -1529,7 +1551,7 @@ class gate(Exchange, ImplicitAPI):
1529
1551
 
1530
1552
  def multi_order_spot_prepare_request(self, market=None, trigger=False, params={}):
1531
1553
  """
1532
- * @ignore
1554
+ @ignore
1533
1555
  Fills request params currency_pair, market and account where applicable for spot order methods like fetchOpenOrders, cancelAllOrders
1534
1556
  :param dict market: CCXT market
1535
1557
  :param bool stop: True if for a stop order
@@ -1550,7 +1572,7 @@ class gate(Exchange, ImplicitAPI):
1550
1572
 
1551
1573
  def get_margin_mode(self, stop, params):
1552
1574
  """
1553
- * @ignore
1575
+ @ignore
1554
1576
  Gets the margin type for self api call
1555
1577
  :param bool stop: True if for a stop order
1556
1578
  :param dict [params]: Request params
@@ -1586,7 +1608,9 @@ class gate(Exchange, ImplicitAPI):
1586
1608
  def fetch_currencies(self, params={}) -> Currencies:
1587
1609
  """
1588
1610
  fetches all available currencies on an exchange
1589
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-currencies-details
1611
+
1612
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-currencies-details
1613
+
1590
1614
  :param dict [params]: extra parameters specific to the exchange API endpoint
1591
1615
  :returns dict: an associative dictionary of currencies
1592
1616
  """
@@ -1697,7 +1721,9 @@ class gate(Exchange, ImplicitAPI):
1697
1721
  def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
1698
1722
  """
1699
1723
  fetch the current funding rate
1700
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-a-single-contract
1724
+
1725
+ https://www.gate.io/docs/developers/apiv4/en/#get-a-single-contract
1726
+
1701
1727
  :param str symbol: unified market symbol
1702
1728
  :param dict [params]: extra parameters specific to the exchange API endpoint
1703
1729
  :returns dict: a `funding rate structure <https://docs.ccxt.com/#/?id=funding-rate-structure>`
@@ -1757,7 +1783,9 @@ class gate(Exchange, ImplicitAPI):
1757
1783
  def fetch_funding_rates(self, symbols: Strings = None, params={}) -> FundingRates:
1758
1784
  """
1759
1785
  fetch the funding rate for multiple markets
1760
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts
1786
+
1787
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts
1788
+
1761
1789
  :param str[]|None symbols: list of unified market symbols
1762
1790
  :param dict [params]: extra parameters specific to the exchange API endpoint
1763
1791
  :returns dict[]: a list of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rates-structure>`, indexed by market symbols
@@ -1936,7 +1964,9 @@ class gate(Exchange, ImplicitAPI):
1936
1964
  def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1937
1965
  """
1938
1966
  fetch the deposit address for a currency associated with self account
1939
- :see: https://www.gate.io/docs/developers/apiv4/en/#generate-currency-deposit-address
1967
+
1968
+ https://www.gate.io/docs/developers/apiv4/en/#generate-currency-deposit-address
1969
+
1940
1970
  :param str code: unified currency code
1941
1971
  :param dict [params]: extra parameters specific to the exchange API endpoint
1942
1972
  :param str [params.network]: unified network code(not used directly by gate.io but used by ccxt to filter the response)
@@ -2007,7 +2037,9 @@ class gate(Exchange, ImplicitAPI):
2007
2037
  def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
2008
2038
  """
2009
2039
  fetch the trading fees for a market
2010
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-personal-trading-fee
2040
+
2041
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-personal-trading-fee
2042
+
2011
2043
  :param str symbol: unified market symbol
2012
2044
  :param dict [params]: extra parameters specific to the exchange API endpoint
2013
2045
  :returns dict: a `fee structure <https://docs.ccxt.com/#/?id=fee-structure>`
@@ -2037,7 +2069,9 @@ class gate(Exchange, ImplicitAPI):
2037
2069
  def fetch_trading_fees(self, params={}) -> TradingFees:
2038
2070
  """
2039
2071
  fetch the trading fees for multiple markets
2040
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-personal-trading-fee
2072
+
2073
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-personal-trading-fee
2074
+
2041
2075
  :param dict [params]: extra parameters specific to the exchange API endpoint
2042
2076
  :returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>` indexed by market symbols
2043
2077
  """
@@ -2099,9 +2133,11 @@ class gate(Exchange, ImplicitAPI):
2099
2133
 
2100
2134
  def fetch_transaction_fees(self, codes: Strings = None, params={}):
2101
2135
  """
2102
- * @deprecated
2136
+ @deprecated
2103
2137
  please use fetchDepositWithdrawFees instead
2104
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-status
2138
+
2139
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-status
2140
+
2105
2141
  :param str[]|None codes: list of unified currency codes
2106
2142
  :param dict [params]: extra parameters specific to the exchange API endpoint
2107
2143
  :returns dict: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
@@ -2152,7 +2188,9 @@ class gate(Exchange, ImplicitAPI):
2152
2188
  def fetch_deposit_withdraw_fees(self, codes: Strings = None, params={}):
2153
2189
  """
2154
2190
  fetch deposit and withdraw fees
2155
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-status
2191
+
2192
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-status
2193
+
2156
2194
  :param str[]|None codes: list of unified currency codes
2157
2195
  :param dict [params]: extra parameters specific to the exchange API endpoint
2158
2196
  :returns dict: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
@@ -2230,8 +2268,10 @@ class gate(Exchange, ImplicitAPI):
2230
2268
  def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2231
2269
  """
2232
2270
  fetch the history of funding payments paid and received on self account
2233
- :see: https://www.gate.io/docs/developers/apiv4/en/#query-account-book-2
2234
- :see: https://www.gate.io/docs/developers/apiv4/en/#query-account-book-3
2271
+
2272
+ https://www.gate.io/docs/developers/apiv4/en/#query-account-book-2
2273
+ https://www.gate.io/docs/developers/apiv4/en/#query-account-book-3
2274
+
2235
2275
  :param str symbol: unified market symbol
2236
2276
  :param int [since]: the earliest time in ms to fetch funding history for
2237
2277
  :param int [limit]: the maximum number of funding history structures to retrieve
@@ -2308,10 +2348,12 @@ class gate(Exchange, ImplicitAPI):
2308
2348
  def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
2309
2349
  """
2310
2350
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
2311
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-order-book
2312
- :see: https://www.gate.io/docs/developers/apiv4/en/#futures-order-book
2313
- :see: https://www.gate.io/docs/developers/apiv4/en/#futures-order-book-2
2314
- :see: https://www.gate.io/docs/developers/apiv4/en/#options-order-book
2351
+
2352
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-order-book
2353
+ https://www.gate.io/docs/developers/apiv4/en/#futures-order-book
2354
+ https://www.gate.io/docs/developers/apiv4/en/#futures-order-book-2
2355
+ https://www.gate.io/docs/developers/apiv4/en/#options-order-book
2356
+
2315
2357
  :param str symbol: unified symbol of the market to fetch the order book for
2316
2358
  :param int [limit]: the maximum amount of order book entries to return
2317
2359
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2419,10 +2461,12 @@ class gate(Exchange, ImplicitAPI):
2419
2461
  def fetch_ticker(self, symbol: str, params={}) -> Ticker:
2420
2462
  """
2421
2463
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
2422
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-details-of-a-specifc-order
2423
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers
2424
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers-2
2425
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
2464
+
2465
+ https://www.gate.io/docs/developers/apiv4/en/#get-details-of-a-specifc-order
2466
+ https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers
2467
+ https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers-2
2468
+ https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
2469
+
2426
2470
  :param str symbol: unified symbol of the market to fetch the ticker for
2427
2471
  :param dict [params]: extra parameters specific to the exchange API endpoint
2428
2472
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -2570,10 +2614,12 @@ class gate(Exchange, ImplicitAPI):
2570
2614
  def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
2571
2615
  """
2572
2616
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
2573
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-details-of-a-specifc-order
2574
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers
2575
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers-2
2576
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
2617
+
2618
+ https://www.gate.io/docs/developers/apiv4/en/#get-details-of-a-specifc-order
2619
+ https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers
2620
+ https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers-2
2621
+ https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
2622
+
2577
2623
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
2578
2624
  :param dict [params]: extra parameters specific to the exchange API endpoint
2579
2625
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -2621,6 +2667,7 @@ class gate(Exchange, ImplicitAPI):
2621
2667
  :param str [params.marginMode]: 'cross' or 'isolated' - marginMode for margin trading if not provided self.options['defaultMarginMode'] is used
2622
2668
  :param str [params.symbol]: margin only - unified ccxt symbol
2623
2669
  :param boolean [params.unifiedAccount]: default False, set to True for fetching the unified account balance
2670
+ :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
2624
2671
  """
2625
2672
  self.load_markets()
2626
2673
  self.load_unified_status()
@@ -2890,10 +2937,12 @@ class gate(Exchange, ImplicitAPI):
2890
2937
  def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
2891
2938
  """
2892
2939
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
2893
- :see: https://www.gate.io/docs/developers/apiv4/en/#market-candlesticks # spot
2894
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-futures-candlesticks # swap
2895
- :see: https://www.gate.io/docs/developers/apiv4/en/#market-candlesticks # future
2896
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-options-candlesticks # option
2940
+
2941
+ https://www.gate.io/docs/developers/apiv4/en/#market-candlesticks # spot
2942
+ https://www.gate.io/docs/developers/apiv4/en/#get-futures-candlesticks # swap
2943
+ https://www.gate.io/docs/developers/apiv4/en/#market-candlesticks # future
2944
+ https://www.gate.io/docs/developers/apiv4/en/#get-options-candlesticks # option
2945
+
2897
2946
  :param str symbol: unified symbol of the market to fetch OHLCV data for
2898
2947
  :param str timeframe: the length of time each candle represents
2899
2948
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -2966,7 +3015,9 @@ class gate(Exchange, ImplicitAPI):
2966
3015
  def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2967
3016
  """
2968
3017
  fetches historical funding rate prices
2969
- :see: https://www.gate.io/docs/developers/apiv4/en/#funding-rate-history
3018
+
3019
+ https://www.gate.io/docs/developers/apiv4/en/#funding-rate-history
3020
+
2970
3021
  :param str symbol: unified symbol of the market to fetch the funding rate history for
2971
3022
  :param int [since]: timestamp in ms of the earliest funding rate to fetch
2972
3023
  :param int [limit]: the maximum amount of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rate-history-structure>` to fetch
@@ -3051,10 +3102,12 @@ class gate(Exchange, ImplicitAPI):
3051
3102
  def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
3052
3103
  """
3053
3104
  get the list of most recent trades for a particular symbol
3054
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-market-trades
3055
- :see: https://www.gate.io/docs/developers/apiv4/en/#futures-trading-history
3056
- :see: https://www.gate.io/docs/developers/apiv4/en/#futures-trading-history-2
3057
- :see: https://www.gate.io/docs/developers/apiv4/en/#options-trade-history
3105
+
3106
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-market-trades
3107
+ https://www.gate.io/docs/developers/apiv4/en/#futures-trading-history
3108
+ https://www.gate.io/docs/developers/apiv4/en/#futures-trading-history-2
3109
+ https://www.gate.io/docs/developers/apiv4/en/#options-trade-history
3110
+
3058
3111
  :param str symbol: unified symbol of the market to fetch trades for
3059
3112
  :param int [since]: timestamp in ms of the earliest trade to fetch
3060
3113
  :param int [limit]: the maximum amount of trades to fetch
@@ -3155,10 +3208,12 @@ class gate(Exchange, ImplicitAPI):
3155
3208
  def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3156
3209
  """
3157
3210
  fetch all the trades made from a single order
3158
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history
3159
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-2
3160
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-3
3161
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-4
3211
+
3212
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history
3213
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-2
3214
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-3
3215
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-4
3216
+
3162
3217
  :param str id: order id
3163
3218
  :param str symbol: unified market symbol
3164
3219
  :param int [since]: the earliest time in ms to fetch trades for
@@ -3194,10 +3249,12 @@ class gate(Exchange, ImplicitAPI):
3194
3249
  def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3195
3250
  """
3196
3251
  Fetch personal trading history
3197
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history
3198
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-2
3199
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-3
3200
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-4
3252
+
3253
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history
3254
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-2
3255
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-3
3256
+ https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-4
3257
+
3201
3258
  :param str symbol: unified market symbol
3202
3259
  :param int [since]: the earliest time in ms to fetch trades for
3203
3260
  :param int [limit]: the maximum number of trades structures to retrieve
@@ -3466,12 +3523,14 @@ class gate(Exchange, ImplicitAPI):
3466
3523
  def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
3467
3524
  """
3468
3525
  fetch all deposits made to an account
3469
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-deposit-records
3526
+
3527
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-deposit-records
3528
+
3470
3529
  :param str code: unified currency code
3471
3530
  :param int [since]: the earliest time in ms to fetch deposits for
3472
3531
  :param int [limit]: the maximum number of deposits structures to retrieve
3473
- :param int [params.until]: end time in ms
3474
3532
  :param dict [params]: extra parameters specific to the exchange API endpoint
3533
+ :param int [params.until]: end time in ms
3475
3534
  :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)
3476
3535
  :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
3477
3536
  """
@@ -3498,7 +3557,9 @@ class gate(Exchange, ImplicitAPI):
3498
3557
  def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
3499
3558
  """
3500
3559
  fetch all withdrawals made from an account
3501
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-records
3560
+
3561
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-records
3562
+
3502
3563
  :param str code: unified currency code
3503
3564
  :param int [since]: the earliest time in ms to fetch withdrawals for
3504
3565
  :param int [limit]: the maximum number of withdrawals structures to retrieve
@@ -3530,7 +3591,9 @@ class gate(Exchange, ImplicitAPI):
3530
3591
  def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
3531
3592
  """
3532
3593
  make a withdrawal
3533
- :see: https://www.gate.io/docs/developers/apiv4/en/#withdraw
3594
+
3595
+ https://www.gate.io/docs/developers/apiv4/en/#withdraw
3596
+
3534
3597
  :param str code: unified currency code
3535
3598
  :param float amount: the amount to withdraw
3536
3599
  :param str address: the address to withdraw to
@@ -3706,13 +3769,15 @@ class gate(Exchange, ImplicitAPI):
3706
3769
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
3707
3770
  """
3708
3771
  Create an order on the exchange
3709
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-an-order
3710
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order
3711
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order
3712
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order-2
3713
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order-2
3714
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order-3
3715
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-an-options-order
3772
+
3773
+ https://www.gate.io/docs/developers/apiv4/en/#create-an-order
3774
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order
3775
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order
3776
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order-2
3777
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order-2
3778
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order-3
3779
+ https://www.gate.io/docs/developers/apiv4/en/#create-an-options-order
3780
+
3716
3781
  :param str symbol: Unified CCXT market symbol
3717
3782
  :param str type: 'limit' or 'market' *"market" is contract only*
3718
3783
  :param str side: 'buy' or 'sell'
@@ -3866,10 +3931,13 @@ class gate(Exchange, ImplicitAPI):
3866
3931
  def create_orders(self, orders: List[OrderRequest], params={}):
3867
3932
  """
3868
3933
  create a list of trade orders
3869
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-2
3870
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-batch-of-orders
3871
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-batch-of-futures-orders
3934
+
3935
+ https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-2
3936
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-batch-of-orders
3937
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-batch-of-futures-orders
3938
+
3872
3939
  :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
3940
+ :param dict [params]: extra parameters specific to the exchange API endpoint
3873
3941
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
3874
3942
  """
3875
3943
  self.load_markets()
@@ -4098,7 +4166,9 @@ class gate(Exchange, ImplicitAPI):
4098
4166
  def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
4099
4167
  """
4100
4168
  create a market buy order by providing the symbol and cost
4101
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-an-order
4169
+
4170
+ https://www.gate.io/docs/developers/apiv4/en/#create-an-order
4171
+
4102
4172
  :param str symbol: unified symbol of the market to create an order in
4103
4173
  :param float cost: how much you want to trade in units of the quote currency
4104
4174
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -4149,8 +4219,10 @@ class gate(Exchange, ImplicitAPI):
4149
4219
  def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
4150
4220
  """
4151
4221
  edit a trade order, gate currently only supports the modification of the price or amount fields
4152
- :see: https://www.gate.io/docs/developers/apiv4/en/#amend-an-order
4153
- :see: https://www.gate.io/docs/developers/apiv4/en/#amend-an-order-2
4222
+
4223
+ https://www.gate.io/docs/developers/apiv4/en/#amend-an-order
4224
+ https://www.gate.io/docs/developers/apiv4/en/#amend-an-order-2
4225
+
4154
4226
  :param str id: order id
4155
4227
  :param str symbol: unified symbol of the market to create an order in
4156
4228
  :param str type: 'market' or 'limit'
@@ -4493,10 +4565,12 @@ class gate(Exchange, ImplicitAPI):
4493
4565
  def fetch_order(self, id: str, symbol: Str = None, params={}):
4494
4566
  """
4495
4567
  Retrieves information on an order
4496
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order
4497
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-2
4498
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-3
4499
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-4
4568
+
4569
+ https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order
4570
+ https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-2
4571
+ https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-3
4572
+ https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-4
4573
+
4500
4574
  :param str id: Order id
4501
4575
  :param str symbol: Unified market symbol, *required for spot and margin*
4502
4576
  :param dict [params]: Parameters specified by the exchange api
@@ -4539,8 +4613,10 @@ class gate(Exchange, ImplicitAPI):
4539
4613
  def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
4540
4614
  """
4541
4615
  fetch all unfilled currently open orders
4542
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-open-orders
4543
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-running-auto-order-list
4616
+
4617
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-open-orders
4618
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-running-auto-order-list
4619
+
4544
4620
  :param str symbol: unified market symbol
4545
4621
  :param int [since]: the earliest time in ms to fetch open orders for
4546
4622
  :param int [limit]: the maximum number of open orders structures to retrieve
@@ -4556,14 +4632,16 @@ class gate(Exchange, ImplicitAPI):
4556
4632
  def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
4557
4633
  """
4558
4634
  fetches information on multiple closed orders made by the user
4559
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-orders
4560
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-running-auto-order-list
4561
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders
4562
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-auto-orders
4563
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders-2
4564
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-auto-orders-2
4565
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-options-orders
4566
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders-by-time-range
4635
+
4636
+ https://www.gate.io/docs/developers/apiv4/en/#list-orders
4637
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-running-auto-order-list
4638
+ https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders
4639
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-auto-orders
4640
+ https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders-2
4641
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-auto-orders-2
4642
+ https://www.gate.io/docs/developers/apiv4/en/#list-options-orders
4643
+ https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders-by-time-range
4644
+
4567
4645
  :param str symbol: unified market symbol of the market orders were made in
4568
4646
  :param int [since]: the earliest time in ms to fetch orders for
4569
4647
  :param int [limit]: the maximum number of order structures to retrieve
@@ -4828,10 +4906,12 @@ class gate(Exchange, ImplicitAPI):
4828
4906
  def cancel_order(self, id: str, symbol: Str = None, params={}):
4829
4907
  """
4830
4908
  Cancels an open order
4831
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order
4832
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-2
4833
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-3
4834
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-4
4909
+
4910
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order
4911
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-2
4912
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-3
4913
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-4
4914
+
4835
4915
  :param str id: Order id
4836
4916
  :param str symbol: Unified market symbol
4837
4917
  :param dict [params]: Parameters specified by the exchange api
@@ -4953,8 +5033,10 @@ class gate(Exchange, ImplicitAPI):
4953
5033
  def cancel_orders(self, ids: List[str], symbol: Str = None, params={}):
4954
5034
  """
4955
5035
  cancel multiple orders
4956
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
4957
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list-2
5036
+
5037
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
5038
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list-2
5039
+
4958
5040
  :param str[] ids: order ids
4959
5041
  :param str symbol: unified symbol of the market the order was made in
4960
5042
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -4995,7 +5077,9 @@ class gate(Exchange, ImplicitAPI):
4995
5077
  def cancel_orders_for_symbols(self, orders: List[CancellationRequest], params={}):
4996
5078
  """
4997
5079
  cancel multiple orders for multiple symbols
4998
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
5080
+
5081
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
5082
+
4999
5083
  :param CancellationRequest[] orders: list of order ids with symbol, example [{"id": "a", "symbol": "BTC/USDT"}, {"id": "b", "symbol": "ETH/USDT"}]
5000
5084
  :param dict [params]: extra parameters specific to the exchange API endpoint
5001
5085
  :param str[] [params.clientOrderIds]: client order ids
@@ -5031,10 +5115,12 @@ class gate(Exchange, ImplicitAPI):
5031
5115
  def cancel_all_orders(self, symbol: Str = None, params={}):
5032
5116
  """
5033
5117
  cancel all open orders
5034
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-in-specified-currency-pair
5035
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched
5036
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched-2
5037
- :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched-3
5118
+
5119
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-in-specified-currency-pair
5120
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched
5121
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched-2
5122
+ https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched-3
5123
+
5038
5124
  :param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
5039
5125
  :param dict [params]: extra parameters specific to the exchange API endpoint
5040
5126
  :param bool [params.unifiedAccount]: set to True for canceling unified account orders
@@ -5100,7 +5186,9 @@ class gate(Exchange, ImplicitAPI):
5100
5186
  def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
5101
5187
  """
5102
5188
  transfer currency internally between wallets on the same account
5103
- :see: https://www.gate.io/docs/developers/apiv4/en/#transfer-between-trading-accounts
5189
+
5190
+ https://www.gate.io/docs/developers/apiv4/en/#transfer-between-trading-accounts
5191
+
5104
5192
  :param str code: unified currency code for currency being transferred
5105
5193
  :param float amount: the amount of currency to transfer
5106
5194
  :param str fromAccount: the account to transfer currency from
@@ -5176,8 +5264,10 @@ class gate(Exchange, ImplicitAPI):
5176
5264
  def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
5177
5265
  """
5178
5266
  set the level of leverage for a market
5179
- :see: https://www.gate.io/docs/developers/apiv4/en/#update-position-leverage
5180
- :see: https://www.gate.io/docs/developers/apiv4/en/#update-position-leverage-2
5267
+
5268
+ https://www.gate.io/docs/developers/apiv4/en/#update-position-leverage
5269
+ https://www.gate.io/docs/developers/apiv4/en/#update-position-leverage-2
5270
+
5181
5271
  :param float leverage: the rate of leverage
5182
5272
  :param str symbol: unified market symbol
5183
5273
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -5378,9 +5468,11 @@ class gate(Exchange, ImplicitAPI):
5378
5468
  def fetch_position(self, symbol: str, params={}):
5379
5469
  """
5380
5470
  fetch data on an open contract position
5381
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-single-position
5382
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-single-position-2
5383
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-specified-contract-position
5471
+
5472
+ https://www.gate.io/docs/developers/apiv4/en/#get-single-position
5473
+ https://www.gate.io/docs/developers/apiv4/en/#get-single-position-2
5474
+ https://www.gate.io/docs/developers/apiv4/en/#get-specified-contract-position
5475
+
5384
5476
  :param str symbol: unified market symbol of the market the position is held in
5385
5477
  :param dict [params]: extra parameters specific to the exchange API endpoint
5386
5478
  :returns dict: a `position structure <https://docs.ccxt.com/#/?id=position-structure>`
@@ -5460,9 +5552,11 @@ class gate(Exchange, ImplicitAPI):
5460
5552
  def fetch_positions(self, symbols: Strings = None, params={}):
5461
5553
  """
5462
5554
  fetch all open positions
5463
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-positions-of-a-user
5464
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-positions-of-a-user-2
5465
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-user-s-positions-of-specified-underlying
5555
+
5556
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-positions-of-a-user
5557
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-positions-of-a-user-2
5558
+ https://www.gate.io/docs/developers/apiv4/en/#list-user-s-positions-of-specified-underlying
5559
+
5466
5560
  :param str[]|None symbols: Not used by gate, but parsed internally by CCXT
5467
5561
  :param dict [params]: extra parameters specific to the exchange API endpoint
5468
5562
  :param str [params.settle]: 'btc' or 'usdt' - settle currency for perpetual swap and future - default="usdt" for swap and "btc" for future
@@ -5560,8 +5654,10 @@ class gate(Exchange, ImplicitAPI):
5560
5654
  def fetch_leverage_tiers(self, symbols: Strings = None, params={}) -> LeverageTiers:
5561
5655
  """
5562
5656
  retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
5563
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts
5564
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts-2
5657
+
5658
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts
5659
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts-2
5660
+
5565
5661
  :param str[] [symbols]: list of unified market symbols
5566
5662
  :param dict [params]: extra parameters specific to the exchange API endpoint
5567
5663
  :returns dict: a dictionary of `leverage tiers structures <https://docs.ccxt.com/#/?id=leverage-tiers-structure>`, indexed by market symbols
@@ -5675,7 +5771,9 @@ class gate(Exchange, ImplicitAPI):
5675
5771
  def fetch_market_leverage_tiers(self, symbol: str, params={}) -> List[LeverageTier]:
5676
5772
  """
5677
5773
  retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
5678
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-risk-limit-tiers
5774
+
5775
+ https://www.gate.io/docs/developers/apiv4/en/#list-risk-limit-tiers
5776
+
5679
5777
  :param str symbol: unified market symbol
5680
5778
  :param dict [params]: extra parameters specific to the exchange API endpoint
5681
5779
  :returns dict: a `leverage tiers structure <https://docs.ccxt.com/#/?id=leverage-tiers-structure>`
@@ -5700,7 +5798,8 @@ class gate(Exchange, ImplicitAPI):
5700
5798
  #
5701
5799
  return self.parse_market_leverage_tiers(response, market)
5702
5800
 
5703
- def parse_emulated_leverage_tiers(self, info, market=None):
5801
+ def parse_emulated_leverage_tiers(self, info, market=None) -> List[LeverageTier]:
5802
+ marketId = self.safe_string(info, 'name')
5704
5803
  maintenanceMarginUnit = self.safe_string(info, 'maintenance_rate') # '0.005',
5705
5804
  leverageMax = self.safe_string(info, 'leverage_max') # '100',
5706
5805
  riskLimitStep = self.safe_string(info, 'risk_limit_step') # '1000000',
@@ -5714,6 +5813,7 @@ class gate(Exchange, ImplicitAPI):
5714
5813
  cap = Precise.string_add(floor, riskLimitStep)
5715
5814
  tiers.append({
5716
5815
  'tier': self.parse_number(Precise.string_div(cap, riskLimitStep)),
5816
+ 'symbol': self.safe_symbol(marketId, market, None, 'contract'),
5717
5817
  'currency': self.safe_string(market, 'settle'),
5718
5818
  'minNotional': self.parse_number(floor),
5719
5819
  'maxNotional': self.parse_number(cap),
@@ -5747,6 +5847,7 @@ class gate(Exchange, ImplicitAPI):
5747
5847
  maxNotional = self.safe_number(item, 'risk_limit')
5748
5848
  tiers.append({
5749
5849
  'tier': self.sum(i, 1),
5850
+ 'symbol': market['symbol'],
5750
5851
  'currency': market['base'],
5751
5852
  'minNotional': minNotional,
5752
5853
  'maxNotional': maxNotional,
@@ -5760,7 +5861,9 @@ class gate(Exchange, ImplicitAPI):
5760
5861
  def repay_isolated_margin(self, symbol: str, code: str, amount, params={}):
5761
5862
  """
5762
5863
  repay borrowed margin and interest
5763
- :see: https://www.gate.io/docs/apiv4/en/#repay-a-loan
5864
+
5865
+ https://www.gate.io/docs/apiv4/en/#repay-a-loan
5866
+
5764
5867
  :param str symbol: unified market symbol
5765
5868
  :param str code: unified currency code of the currency to repay
5766
5869
  :param float amount: the amount to repay
@@ -5787,11 +5890,12 @@ class gate(Exchange, ImplicitAPI):
5787
5890
  def repay_cross_margin(self, code: str, amount, params={}):
5788
5891
  """
5789
5892
  repay cross margin borrowed margin and interest
5790
- :see: https://www.gate.io/docs/developers/apiv4/en/#cross-margin-repayments
5791
- :see: https://www.gate.io/docs/developers/apiv4/en/#borrow-or-repay
5893
+
5894
+ https://www.gate.io/docs/developers/apiv4/en/#cross-margin-repayments
5895
+ https://www.gate.io/docs/developers/apiv4/en/#borrow-or-repay
5896
+
5792
5897
  :param str code: unified currency code of the currency to repay
5793
5898
  :param float amount: the amount to repay
5794
- :param str symbol: unified market symbol, required for isolated margin
5795
5899
  :param dict [params]: extra parameters specific to the exchange API endpoint
5796
5900
  :param str [params.mode]: 'all' or 'partial' payment mode, extra parameter required for isolated margin
5797
5901
  :param str [params.id]: '34267567' loan id, extra parameter required for isolated margin
@@ -5835,10 +5939,12 @@ class gate(Exchange, ImplicitAPI):
5835
5939
  def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
5836
5940
  """
5837
5941
  create a loan to borrow margin
5838
- :see: https://www.gate.io/docs/developers/apiv4/en/#marginuni
5942
+
5943
+ https://www.gate.io/docs/developers/apiv4/en/#marginuni
5944
+
5945
+ :param str symbol: unified market symbol, required for isolated margin
5839
5946
  :param str code: unified currency code of the currency to borrow
5840
5947
  :param float amount: the amount to borrow
5841
- :param str symbol: unified market symbol, required for isolated margin
5842
5948
  :param dict [params]: extra parameters specific to the exchange API endpoint
5843
5949
  :param str [params.rate]: '0.0002' or '0.002' extra parameter required for isolated margin
5844
5950
  :returns dict: a `margin loan structure <https://docs.ccxt.com/#/?id=margin-loan-structure>`
@@ -5878,11 +5984,12 @@ class gate(Exchange, ImplicitAPI):
5878
5984
  def borrow_cross_margin(self, code: str, amount: float, params={}):
5879
5985
  """
5880
5986
  create a loan to borrow margin
5881
- :see: https://www.gate.io/docs/apiv4/en/#create-a-cross-margin-borrow-loan
5882
- :see: https://www.gate.io/docs/developers/apiv4/en/#borrow-or-repay
5987
+
5988
+ https://www.gate.io/docs/apiv4/en/#create-a-cross-margin-borrow-loan
5989
+ https://www.gate.io/docs/developers/apiv4/en/#borrow-or-repay
5990
+
5883
5991
  :param str code: unified currency code of the currency to borrow
5884
5992
  :param float amount: the amount to borrow
5885
- :param str symbol: unified market symbol, required for isolated margin
5886
5993
  :param dict [params]: extra parameters specific to the exchange API endpoint
5887
5994
  :param str [params.rate]: '0.0002' or '0.002' extra parameter required for isolated margin
5888
5995
  :param boolean [params.unifiedAccount]: set to True for borrowing in the unified account
@@ -5975,9 +6082,11 @@ class gate(Exchange, ImplicitAPI):
5975
6082
  def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[BorrowInterest]:
5976
6083
  """
5977
6084
  fetch the interest owed by the user for borrowing currency for margin trading
5978
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-interest-records
5979
- :see: https://www.gate.io/docs/developers/apiv4/en/#interest-records-for-the-cross-margin-account
5980
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-interest-records-2
6085
+
6086
+ https://www.gate.io/docs/developers/apiv4/en/#list-interest-records
6087
+ https://www.gate.io/docs/developers/apiv4/en/#interest-records-for-the-cross-margin-account
6088
+ https://www.gate.io/docs/developers/apiv4/en/#list-interest-records-2
6089
+
5981
6090
  :param str [code]: unified currency code
5982
6091
  :param str [symbol]: unified market symbol when fetching interest in isolated markets
5983
6092
  :param int [since]: the earliest time in ms to fetch borrow interest for
@@ -6169,8 +6278,10 @@ class gate(Exchange, ImplicitAPI):
6169
6278
  def reduce_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
6170
6279
  """
6171
6280
  remove margin from a position
6172
- :see: https://www.gate.io/docs/developers/apiv4/en/#update-position-margin
6173
- :see: https://www.gate.io/docs/developers/apiv4/en/#update-position-margin-2
6281
+
6282
+ https://www.gate.io/docs/developers/apiv4/en/#update-position-margin
6283
+ https://www.gate.io/docs/developers/apiv4/en/#update-position-margin-2
6284
+
6174
6285
  :param str symbol: unified market symbol
6175
6286
  :param float amount: the amount of margin to remove
6176
6287
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -6181,8 +6292,10 @@ class gate(Exchange, ImplicitAPI):
6181
6292
  def add_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
6182
6293
  """
6183
6294
  add margin
6184
- :see: https://www.gate.io/docs/developers/apiv4/en/#update-position-margin
6185
- :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
+
6186
6299
  :param str symbol: unified market symbol
6187
6300
  :param float amount: amount of margin to add
6188
6301
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -6193,7 +6306,9 @@ class gate(Exchange, ImplicitAPI):
6193
6306
  def fetch_open_interest_history(self, symbol: str, timeframe='5m', since: Int = None, limit: Int = None, params={}):
6194
6307
  """
6195
6308
  Retrieves the open interest of a currency
6196
- :see: https://www.gate.io/docs/developers/apiv4/en/#futures-stats
6309
+
6310
+ https://www.gate.io/docs/developers/apiv4/en/#futures-stats
6311
+
6197
6312
  :param str symbol: Unified CCXT market symbol
6198
6313
  :param str timeframe: "5m", "15m", "30m", "1h", "4h", "1d"
6199
6314
  :param int [since]: the time(ms) of the earliest record to retrieve unix timestamp
@@ -6275,7 +6390,9 @@ class gate(Exchange, ImplicitAPI):
6275
6390
  def fetch_settlement_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
6276
6391
  """
6277
6392
  fetches historical settlement records
6278
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-settlement-history-2
6393
+
6394
+ https://www.gate.io/docs/developers/apiv4/en/#list-settlement-history-2
6395
+
6279
6396
  :param str symbol: unified market symbol of the settlement history, required on gate
6280
6397
  :param int [since]: timestamp in ms
6281
6398
  :param int [limit]: number of records
@@ -6319,7 +6436,9 @@ class gate(Exchange, ImplicitAPI):
6319
6436
  def fetch_my_settlement_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
6320
6437
  """
6321
6438
  fetches historical settlement records of the user
6322
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-my-options-settlements
6439
+
6440
+ https://www.gate.io/docs/developers/apiv4/en/#list-my-options-settlements
6441
+
6323
6442
  :param str symbol: unified market symbol of the settlement history
6324
6443
  :param int [since]: timestamp in ms
6325
6444
  :param int [limit]: number of records
@@ -6442,11 +6561,13 @@ class gate(Exchange, ImplicitAPI):
6442
6561
  def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]:
6443
6562
  """
6444
6563
  fetch the history of changes, actions done by the user or operations that altered the balance of the user
6445
- :see: https://www.gate.io/docs/developers/apiv4/en/#query-account-book
6446
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-margin-account-balance-change-history
6447
- :see: https://www.gate.io/docs/developers/apiv4/en/#query-account-book-2
6448
- :see: https://www.gate.io/docs/developers/apiv4/en/#query-account-book-3
6449
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-account-changing-history
6564
+
6565
+ https://www.gate.io/docs/developers/apiv4/en/#query-account-book
6566
+ https://www.gate.io/docs/developers/apiv4/en/#list-margin-account-balance-change-history
6567
+ https://www.gate.io/docs/developers/apiv4/en/#query-account-book-2
6568
+ https://www.gate.io/docs/developers/apiv4/en/#query-account-book-3
6569
+ https://www.gate.io/docs/developers/apiv4/en/#list-account-changing-history
6570
+
6450
6571
  :param str [code]: unified currency code
6451
6572
  :param int [since]: timestamp in ms of the earliest ledger entry
6452
6573
  :param int [limit]: max number of ledger entries to return
@@ -6671,7 +6792,9 @@ class gate(Exchange, ImplicitAPI):
6671
6792
  def set_position_mode(self, hedged: bool, symbol: Str = None, params={}):
6672
6793
  """
6673
6794
  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
6674
- :see: https://www.gate.io/docs/developers/apiv4/en/#enable-or-disable-dual-mode
6795
+
6796
+ https://www.gate.io/docs/developers/apiv4/en/#enable-or-disable-dual-mode
6797
+
6675
6798
  :param bool hedged: set to True to enable dual mode
6676
6799
  :param str|None symbol: if passed, dual mode is set for all markets with the same settle currency
6677
6800
  :param dict params: extra parameters specific to the exchange API endpoint
@@ -6686,7 +6809,9 @@ class gate(Exchange, ImplicitAPI):
6686
6809
  def fetch_underlying_assets(self, params={}):
6687
6810
  """
6688
6811
  fetches the market ids of underlying assets for a specific contract market type
6689
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-underlyings
6812
+
6813
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-underlyings
6814
+
6690
6815
  :param dict [params]: exchange specific params
6691
6816
  :param str [params.type]: the contract market type, 'option', 'swap' or 'future', the default is 'option'
6692
6817
  :returns dict[]: a list of `underlying assets <https://docs.ccxt.com/#/?id=underlying-assets-structure>`
@@ -6719,7 +6844,9 @@ class gate(Exchange, ImplicitAPI):
6719
6844
  def fetch_liquidations(self, symbol: str, since: Int = None, limit: Int = None, params={}):
6720
6845
  """
6721
6846
  retrieves the public liquidations of a trading pair
6722
- :see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-liquidation-history
6847
+
6848
+ https://www.gate.io/docs/developers/apiv4/en/#retrieve-liquidation-history
6849
+
6723
6850
  :param str symbol: unified CCXT market symbol
6724
6851
  :param int [since]: the earliest time in ms to fetch liquidations for
6725
6852
  :param int [limit]: the maximum number of liquidation structures to retrieve
@@ -6758,9 +6885,11 @@ class gate(Exchange, ImplicitAPI):
6758
6885
  def fetch_my_liquidations(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
6759
6886
  """
6760
6887
  retrieves the users liquidated positions
6761
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-liquidation-history
6762
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-liquidation-history-2
6763
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-user-s-liquidation-history-of-specified-underlying
6888
+
6889
+ https://www.gate.io/docs/developers/apiv4/en/#list-liquidation-history
6890
+ https://www.gate.io/docs/developers/apiv4/en/#list-liquidation-history-2
6891
+ https://www.gate.io/docs/developers/apiv4/en/#list-user-s-liquidation-history-of-specified-underlying
6892
+
6764
6893
  :param str symbol: unified CCXT market symbol
6765
6894
  :param int [since]: the earliest time in ms to fetch liquidations for
6766
6895
  :param int [limit]: the maximum number of liquidation structures to retrieve
@@ -6893,7 +7022,9 @@ class gate(Exchange, ImplicitAPI):
6893
7022
  def fetch_greeks(self, symbol: str, params={}) -> Greeks:
6894
7023
  """
6895
7024
  fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract
6896
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
7025
+
7026
+ https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
7027
+
6897
7028
  :param str symbol: unified symbol of the market to fetch greeks for
6898
7029
  :param dict [params]: extra parameters specific to the exchange API endpoint
6899
7030
  :returns dict: a `greeks structure <https://docs.ccxt.com/#/?id=greeks-structure>`
@@ -6982,9 +7113,11 @@ class gate(Exchange, ImplicitAPI):
6982
7113
  def close_position(self, symbol: str, side: OrderSide = None, params={}) -> Order:
6983
7114
  """
6984
7115
  closes open positions for a market
6985
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order
6986
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order-2
6987
- :see: https://www.gate.io/docs/developers/apiv4/en/#create-an-options-order
7116
+
7117
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order
7118
+ https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order-2
7119
+ https://www.gate.io/docs/developers/apiv4/en/#create-an-options-order
7120
+
6988
7121
  :param str symbol: Unified CCXT market symbol
6989
7122
  :param str side: 'buy' or 'sell'
6990
7123
  :param dict [params]: extra parameters specific to the okx api endpoint
@@ -7001,9 +7134,11 @@ class gate(Exchange, ImplicitAPI):
7001
7134
  def fetch_leverage(self, symbol: str, params={}) -> Leverage:
7002
7135
  """
7003
7136
  fetch the set leverage for a market
7004
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-unified-account-information
7005
- :see: https://www.gate.io/docs/developers/apiv4/en/#get-detail-of-lending-market
7006
- :see: https://www.gate.io/docs/developers/apiv4/en/#query-one-single-margin-currency-pair-deprecated
7137
+
7138
+ https://www.gate.io/docs/developers/apiv4/en/#get-unified-account-information
7139
+ https://www.gate.io/docs/developers/apiv4/en/#get-detail-of-lending-market
7140
+ https://www.gate.io/docs/developers/apiv4/en/#query-one-single-margin-currency-pair-deprecated
7141
+
7007
7142
  :param str symbol: unified market symbol
7008
7143
  :param dict [params]: extra parameters specific to the exchange API endpoint
7009
7144
  :param boolean [params.unified]: default False, set to True for fetching the unified accounts leverage
@@ -7103,8 +7238,10 @@ class gate(Exchange, ImplicitAPI):
7103
7238
  def fetch_leverages(self, symbols: Strings = None, params={}) -> Leverages:
7104
7239
  """
7105
7240
  fetch the set leverage for all leverage markets, only spot margin is supported on gate
7106
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-lending-markets
7107
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-supported-currency-pairs-supported-in-margin-trading-deprecated
7241
+
7242
+ https://www.gate.io/docs/developers/apiv4/en/#list-lending-markets
7243
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-supported-currency-pairs-supported-in-margin-trading-deprecated
7244
+
7108
7245
  :param str[] symbols: a list of unified market symbols
7109
7246
  :param dict [params]: extra parameters specific to the exchange API endpoint
7110
7247
  :param boolean [params.unified]: default False, set to True for fetching unified account leverages
@@ -7161,7 +7298,9 @@ class gate(Exchange, ImplicitAPI):
7161
7298
  def fetch_option(self, symbol: str, params={}) -> Option:
7162
7299
  """
7163
7300
  fetches option data that is commonly found in an option chain
7164
- :see: https://www.gate.io/docs/developers/apiv4/en/#query-specified-contract-detail
7301
+
7302
+ https://www.gate.io/docs/developers/apiv4/en/#query-specified-contract-detail
7303
+
7165
7304
  :param str symbol: unified market symbol
7166
7305
  :param dict [params]: extra parameters specific to the exchange API endpoint
7167
7306
  :returns dict: an `option chain structure <https://docs.ccxt.com/#/?id=option-chain-structure>`
@@ -7217,8 +7356,10 @@ class gate(Exchange, ImplicitAPI):
7217
7356
  def fetch_option_chain(self, code: str, params={}) -> OptionChain:
7218
7357
  """
7219
7358
  fetches data for an underlying asset that is commonly found in an option chain
7220
- :see: https://www.gate.io/docs/developers/apiv4/en/#list-all-the-contracts-with-specified-underlying-and-expiration-time
7221
- :param str currency: base currency to fetch an option chain for
7359
+
7360
+ https://www.gate.io/docs/developers/apiv4/en/#list-all-the-contracts-with-specified-underlying-and-expiration-time
7361
+
7362
+ :param str code: base currency to fetch an option chain for
7222
7363
  :param dict [params]: extra parameters specific to the exchange API endpoint
7223
7364
  :param str [params.underlying]: the underlying asset, can be obtained from fetchUnderlyingAssets()
7224
7365
  :param int [params.expiration]: unix timestamp of the expiration time
@@ -7341,18 +7482,20 @@ class gate(Exchange, ImplicitAPI):
7341
7482
  def fetch_positions_history(self, symbols: Strings = None, since: Int = None, limit: Int = None, params={}) -> List[Position]:
7342
7483
  """
7343
7484
  fetches historical positions
7344
- :see: https://www.gate.io/docs/developers/apiv4/#list-position-close-history
7345
- :see: https://www.gate.io/docs/developers/apiv4/#list-position-close-history-2
7485
+
7486
+ https://www.gate.io/docs/developers/apiv4/#list-position-close-history
7487
+ https://www.gate.io/docs/developers/apiv4/#list-position-close-history-2
7488
+
7346
7489
  :param str[] symbols: unified conract symbols, must all have the same settle currency and the same market type
7347
7490
  :param int [since]: the earliest time in ms to fetch positions for
7348
7491
  :param int [limit]: the maximum amount of records to fetch, default=1000
7349
7492
  :param dict params: extra parameters specific to the exchange api endpoint
7350
7493
  :param int [params.until]: the latest time in ms to fetch positions for
7351
- *
7352
- * EXCHANGE SPECIFIC PARAMETERS
7353
- :param int offset: list offset, starting from 0
7354
- :param str side: long or short
7355
- :param str pnl: query profit or loss
7494
+
7495
+ EXCHANGE SPECIFIC PARAMETERS
7496
+ :param int [params.offset]: list offset, starting from 0
7497
+ :param str [params.side]: long or short
7498
+ :param str [params.pnl]: query profit or loss
7356
7499
  :returns dict[]: a list of `position structures <https://docs.ccxt.com/#/?id=position-structure>`
7357
7500
  """
7358
7501
  self.load_markets()