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

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