天择加密量化开放框架下载
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.

212 lines
6.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 UniCurrencyPair(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. 'currency_pair': 'str',
  26. 'base_min_borrow_amount': 'str',
  27. 'quote_min_borrow_amount': 'str',
  28. 'leverage': 'str',
  29. }
  30. attribute_map = {
  31. 'currency_pair': 'currency_pair',
  32. 'base_min_borrow_amount': 'base_min_borrow_amount',
  33. 'quote_min_borrow_amount': 'quote_min_borrow_amount',
  34. 'leverage': 'leverage',
  35. }
  36. def __init__(
  37. self,
  38. currency_pair=None,
  39. base_min_borrow_amount=None,
  40. quote_min_borrow_amount=None,
  41. leverage=None,
  42. local_vars_configuration=None,
  43. ): # noqa: E501
  44. # type: (str, str, str, str, Configuration) -> None
  45. """UniCurrencyPair - a model defined in OpenAPI""" # noqa: E501
  46. if local_vars_configuration is None:
  47. local_vars_configuration = Configuration()
  48. self.local_vars_configuration = local_vars_configuration
  49. self._currency_pair = None
  50. self._base_min_borrow_amount = None
  51. self._quote_min_borrow_amount = None
  52. self._leverage = None
  53. self.discriminator = None
  54. if currency_pair is not None:
  55. self.currency_pair = currency_pair
  56. if base_min_borrow_amount is not None:
  57. self.base_min_borrow_amount = base_min_borrow_amount
  58. if quote_min_borrow_amount is not None:
  59. self.quote_min_borrow_amount = quote_min_borrow_amount
  60. if leverage is not None:
  61. self.leverage = leverage
  62. @property
  63. def currency_pair(self):
  64. """Gets the currency_pair of this UniCurrencyPair. # noqa: E501
  65. Currency pair # noqa: E501
  66. :return: The currency_pair of this UniCurrencyPair. # noqa: E501
  67. :rtype: str
  68. """
  69. return self._currency_pair
  70. @currency_pair.setter
  71. def currency_pair(self, currency_pair):
  72. """Sets the currency_pair of this UniCurrencyPair.
  73. Currency pair # noqa: E501
  74. :param currency_pair: The currency_pair of this UniCurrencyPair. # noqa: E501
  75. :type: str
  76. """
  77. self._currency_pair = currency_pair
  78. @property
  79. def base_min_borrow_amount(self):
  80. """Gets the base_min_borrow_amount of this UniCurrencyPair. # noqa: E501
  81. Minimum borrow amount of base currency # noqa: E501
  82. :return: The base_min_borrow_amount of this UniCurrencyPair. # noqa: E501
  83. :rtype: str
  84. """
  85. return self._base_min_borrow_amount
  86. @base_min_borrow_amount.setter
  87. def base_min_borrow_amount(self, base_min_borrow_amount):
  88. """Sets the base_min_borrow_amount of this UniCurrencyPair.
  89. Minimum borrow amount of base currency # noqa: E501
  90. :param base_min_borrow_amount: The base_min_borrow_amount of this UniCurrencyPair. # noqa: E501
  91. :type: str
  92. """
  93. self._base_min_borrow_amount = base_min_borrow_amount
  94. @property
  95. def quote_min_borrow_amount(self):
  96. """Gets the quote_min_borrow_amount of this UniCurrencyPair. # noqa: E501
  97. Minimum borrow amount of quote currency # noqa: E501
  98. :return: The quote_min_borrow_amount of this UniCurrencyPair. # noqa: E501
  99. :rtype: str
  100. """
  101. return self._quote_min_borrow_amount
  102. @quote_min_borrow_amount.setter
  103. def quote_min_borrow_amount(self, quote_min_borrow_amount):
  104. """Sets the quote_min_borrow_amount of this UniCurrencyPair.
  105. Minimum borrow amount of quote currency # noqa: E501
  106. :param quote_min_borrow_amount: The quote_min_borrow_amount of this UniCurrencyPair. # noqa: E501
  107. :type: str
  108. """
  109. self._quote_min_borrow_amount = quote_min_borrow_amount
  110. @property
  111. def leverage(self):
  112. """Gets the leverage of this UniCurrencyPair. # noqa: E501
  113. Position leverage # noqa: E501
  114. :return: The leverage of this UniCurrencyPair. # noqa: E501
  115. :rtype: str
  116. """
  117. return self._leverage
  118. @leverage.setter
  119. def leverage(self, leverage):
  120. """Sets the leverage of this UniCurrencyPair.
  121. Position leverage # noqa: E501
  122. :param leverage: The leverage of this UniCurrencyPair. # noqa: E501
  123. :type: str
  124. """
  125. self._leverage = leverage
  126. def to_dict(self):
  127. """Returns the model properties as a dict"""
  128. result = {}
  129. for attr, _ in six.iteritems(self.openapi_types):
  130. value = getattr(self, attr)
  131. if isinstance(value, list):
  132. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  133. elif hasattr(value, "to_dict"):
  134. result[attr] = value.to_dict()
  135. elif isinstance(value, dict):
  136. result[attr] = dict(
  137. map(
  138. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  139. value.items(),
  140. )
  141. )
  142. else:
  143. result[attr] = value
  144. return result
  145. def to_str(self):
  146. """Returns the string representation of the model"""
  147. return pprint.pformat(self.to_dict())
  148. def __repr__(self):
  149. """For `print` and `pprint`"""
  150. return self.to_str()
  151. def __eq__(self, other):
  152. """Returns true if both objects are equal"""
  153. if not isinstance(other, UniCurrencyPair):
  154. return False
  155. return self.to_dict() == other.to_dict()
  156. def __ne__(self, other):
  157. """Returns true if both objects are not equal"""
  158. if not isinstance(other, UniCurrencyPair):
  159. return True
  160. return self.to_dict() != other.to_dict()