天择加密量化开放框架下载
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

328 lines
9.7 KiB

1 year ago
  1. # coding: utf-8
  2. """
  3. Gate API v4
  4. Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
  5. Contact: support@mail.gate.io
  6. Generated by: https://openapi-generator.tech
  7. """
  8. import pprint
  9. import re # noqa: F401
  10. import six
  11. from gate_api.configuration import Configuration
  12. class MarginCurrencyPair(object):
  13. """NOTE: This class is auto generated by OpenAPI Generator.
  14. Ref: https://openapi-generator.tech
  15. Do not edit the class manually.
  16. """
  17. """
  18. Attributes:
  19. openapi_types (dict): The key is attribute name
  20. and the value is attribute type.
  21. attribute_map (dict): The key is attribute name
  22. and the value is json key in definition.
  23. """
  24. openapi_types = {
  25. 'id': 'str',
  26. 'base': 'str',
  27. 'quote': 'str',
  28. 'leverage': 'int',
  29. 'min_base_amount': 'str',
  30. 'min_quote_amount': 'str',
  31. 'max_quote_amount': 'str',
  32. 'status': 'int',
  33. }
  34. attribute_map = {
  35. 'id': 'id',
  36. 'base': 'base',
  37. 'quote': 'quote',
  38. 'leverage': 'leverage',
  39. 'min_base_amount': 'min_base_amount',
  40. 'min_quote_amount': 'min_quote_amount',
  41. 'max_quote_amount': 'max_quote_amount',
  42. 'status': 'status',
  43. }
  44. def __init__(
  45. self,
  46. id=None,
  47. base=None,
  48. quote=None,
  49. leverage=None,
  50. min_base_amount=None,
  51. min_quote_amount=None,
  52. max_quote_amount=None,
  53. status=None,
  54. local_vars_configuration=None,
  55. ): # noqa: E501
  56. # type: (str, str, str, int, str, str, str, int, Configuration) -> None
  57. """MarginCurrencyPair - a model defined in OpenAPI""" # noqa: E501
  58. if local_vars_configuration is None:
  59. local_vars_configuration = Configuration()
  60. self.local_vars_configuration = local_vars_configuration
  61. self._id = None
  62. self._base = None
  63. self._quote = None
  64. self._leverage = None
  65. self._min_base_amount = None
  66. self._min_quote_amount = None
  67. self._max_quote_amount = None
  68. self._status = None
  69. self.discriminator = None
  70. if id is not None:
  71. self.id = id
  72. if base is not None:
  73. self.base = base
  74. if quote is not None:
  75. self.quote = quote
  76. if leverage is not None:
  77. self.leverage = leverage
  78. if min_base_amount is not None:
  79. self.min_base_amount = min_base_amount
  80. if min_quote_amount is not None:
  81. self.min_quote_amount = min_quote_amount
  82. if max_quote_amount is not None:
  83. self.max_quote_amount = max_quote_amount
  84. if status is not None:
  85. self.status = status
  86. @property
  87. def id(self):
  88. """Gets the id of this MarginCurrencyPair. # noqa: E501
  89. Currency pair # noqa: E501
  90. :return: The id of this MarginCurrencyPair. # noqa: E501
  91. :rtype: str
  92. """
  93. return self._id
  94. @id.setter
  95. def id(self, id):
  96. """Sets the id of this MarginCurrencyPair.
  97. Currency pair # noqa: E501
  98. :param id: The id of this MarginCurrencyPair. # noqa: E501
  99. :type: str
  100. """
  101. self._id = id
  102. @property
  103. def base(self):
  104. """Gets the base of this MarginCurrencyPair. # noqa: E501
  105. Base currency # noqa: E501
  106. :return: The base of this MarginCurrencyPair. # noqa: E501
  107. :rtype: str
  108. """
  109. return self._base
  110. @base.setter
  111. def base(self, base):
  112. """Sets the base of this MarginCurrencyPair.
  113. Base currency # noqa: E501
  114. :param base: The base of this MarginCurrencyPair. # noqa: E501
  115. :type: str
  116. """
  117. self._base = base
  118. @property
  119. def quote(self):
  120. """Gets the quote of this MarginCurrencyPair. # noqa: E501
  121. Quote currency # noqa: E501
  122. :return: The quote of this MarginCurrencyPair. # noqa: E501
  123. :rtype: str
  124. """
  125. return self._quote
  126. @quote.setter
  127. def quote(self, quote):
  128. """Sets the quote of this MarginCurrencyPair.
  129. Quote currency # noqa: E501
  130. :param quote: The quote of this MarginCurrencyPair. # noqa: E501
  131. :type: str
  132. """
  133. self._quote = quote
  134. @property
  135. def leverage(self):
  136. """Gets the leverage of this MarginCurrencyPair. # noqa: E501
  137. Leverage # noqa: E501
  138. :return: The leverage of this MarginCurrencyPair. # noqa: E501
  139. :rtype: int
  140. """
  141. return self._leverage
  142. @leverage.setter
  143. def leverage(self, leverage):
  144. """Sets the leverage of this MarginCurrencyPair.
  145. Leverage # noqa: E501
  146. :param leverage: The leverage of this MarginCurrencyPair. # noqa: E501
  147. :type: int
  148. """
  149. self._leverage = leverage
  150. @property
  151. def min_base_amount(self):
  152. """Gets the min_base_amount of this MarginCurrencyPair. # noqa: E501
  153. Minimum base currency to loan, `null` means no limit # noqa: E501
  154. :return: The min_base_amount of this MarginCurrencyPair. # noqa: E501
  155. :rtype: str
  156. """
  157. return self._min_base_amount
  158. @min_base_amount.setter
  159. def min_base_amount(self, min_base_amount):
  160. """Sets the min_base_amount of this MarginCurrencyPair.
  161. Minimum base currency to loan, `null` means no limit # noqa: E501
  162. :param min_base_amount: The min_base_amount of this MarginCurrencyPair. # noqa: E501
  163. :type: str
  164. """
  165. self._min_base_amount = min_base_amount
  166. @property
  167. def min_quote_amount(self):
  168. """Gets the min_quote_amount of this MarginCurrencyPair. # noqa: E501
  169. Minimum quote currency to loan, `null` means no limit # noqa: E501
  170. :return: The min_quote_amount of this MarginCurrencyPair. # noqa: E501
  171. :rtype: str
  172. """
  173. return self._min_quote_amount
  174. @min_quote_amount.setter
  175. def min_quote_amount(self, min_quote_amount):
  176. """Sets the min_quote_amount of this MarginCurrencyPair.
  177. Minimum quote currency to loan, `null` means no limit # noqa: E501
  178. :param min_quote_amount: The min_quote_amount of this MarginCurrencyPair. # noqa: E501
  179. :type: str
  180. """
  181. self._min_quote_amount = min_quote_amount
  182. @property
  183. def max_quote_amount(self):
  184. """Gets the max_quote_amount of this MarginCurrencyPair. # noqa: E501
  185. Maximum borrowable amount for quote currency. Base currency limit is calculated by quote maximum and market price. `null` means no limit # noqa: E501
  186. :return: The max_quote_amount of this MarginCurrencyPair. # noqa: E501
  187. :rtype: str
  188. """
  189. return self._max_quote_amount
  190. @max_quote_amount.setter
  191. def max_quote_amount(self, max_quote_amount):
  192. """Sets the max_quote_amount of this MarginCurrencyPair.
  193. Maximum borrowable amount for quote currency. Base currency limit is calculated by quote maximum and market price. `null` means no limit # noqa: E501
  194. :param max_quote_amount: The max_quote_amount of this MarginCurrencyPair. # noqa: E501
  195. :type: str
  196. """
  197. self._max_quote_amount = max_quote_amount
  198. @property
  199. def status(self):
  200. """Gets the status of this MarginCurrencyPair. # noqa: E501
  201. Currency pair status - `0`: disabled - `1`: enabled # noqa: E501
  202. :return: The status of this MarginCurrencyPair. # noqa: E501
  203. :rtype: int
  204. """
  205. return self._status
  206. @status.setter
  207. def status(self, status):
  208. """Sets the status of this MarginCurrencyPair.
  209. Currency pair status - `0`: disabled - `1`: enabled # noqa: E501
  210. :param status: The status of this MarginCurrencyPair. # noqa: E501
  211. :type: int
  212. """
  213. self._status = status
  214. def to_dict(self):
  215. """Returns the model properties as a dict"""
  216. result = {}
  217. for attr, _ in six.iteritems(self.openapi_types):
  218. value = getattr(self, attr)
  219. if isinstance(value, list):
  220. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  221. elif hasattr(value, "to_dict"):
  222. result[attr] = value.to_dict()
  223. elif isinstance(value, dict):
  224. result[attr] = dict(
  225. map(
  226. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  227. value.items(),
  228. )
  229. )
  230. else:
  231. result[attr] = value
  232. return result
  233. def to_str(self):
  234. """Returns the string representation of the model"""
  235. return pprint.pformat(self.to_dict())
  236. def __repr__(self):
  237. """For `print` and `pprint`"""
  238. return self.to_str()
  239. def __eq__(self, other):
  240. """Returns true if both objects are equal"""
  241. if not isinstance(other, MarginCurrencyPair):
  242. return False
  243. return self.to_dict() == other.to_dict()
  244. def __ne__(self, other):
  245. """Returns true if both objects are not equal"""
  246. if not isinstance(other, MarginCurrencyPair):
  247. return True
  248. return self.to_dict() != other.to_dict()