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

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