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

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