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

299 lines
8.4 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 MarginAccountBook(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. 'time': 'str',
  27. 'time_ms': 'int',
  28. 'currency': 'str',
  29. 'currency_pair': 'str',
  30. 'change': 'str',
  31. 'balance': 'str',
  32. }
  33. attribute_map = {
  34. 'id': 'id',
  35. 'time': 'time',
  36. 'time_ms': 'time_ms',
  37. 'currency': 'currency',
  38. 'currency_pair': 'currency_pair',
  39. 'change': 'change',
  40. 'balance': 'balance',
  41. }
  42. def __init__(
  43. self,
  44. id=None,
  45. time=None,
  46. time_ms=None,
  47. currency=None,
  48. currency_pair=None,
  49. change=None,
  50. balance=None,
  51. local_vars_configuration=None,
  52. ): # noqa: E501
  53. # type: (str, str, int, str, str, str, str, Configuration) -> None
  54. """MarginAccountBook - a model defined in OpenAPI""" # noqa: E501
  55. if local_vars_configuration is None:
  56. local_vars_configuration = Configuration()
  57. self.local_vars_configuration = local_vars_configuration
  58. self._id = None
  59. self._time = None
  60. self._time_ms = None
  61. self._currency = None
  62. self._currency_pair = None
  63. self._change = None
  64. self._balance = None
  65. self.discriminator = None
  66. if id is not None:
  67. self.id = id
  68. if time is not None:
  69. self.time = time
  70. if time_ms is not None:
  71. self.time_ms = time_ms
  72. if currency is not None:
  73. self.currency = currency
  74. if currency_pair is not None:
  75. self.currency_pair = currency_pair
  76. if change is not None:
  77. self.change = change
  78. if balance is not None:
  79. self.balance = balance
  80. @property
  81. def id(self):
  82. """Gets the id of this MarginAccountBook. # noqa: E501
  83. Balance change record ID # noqa: E501
  84. :return: The id of this MarginAccountBook. # noqa: E501
  85. :rtype: str
  86. """
  87. return self._id
  88. @id.setter
  89. def id(self, id):
  90. """Sets the id of this MarginAccountBook.
  91. Balance change record ID # noqa: E501
  92. :param id: The id of this MarginAccountBook. # noqa: E501
  93. :type: str
  94. """
  95. self._id = id
  96. @property
  97. def time(self):
  98. """Gets the time of this MarginAccountBook. # noqa: E501
  99. Balance changed timestamp # noqa: E501
  100. :return: The time of this MarginAccountBook. # noqa: E501
  101. :rtype: str
  102. """
  103. return self._time
  104. @time.setter
  105. def time(self, time):
  106. """Sets the time of this MarginAccountBook.
  107. Balance changed timestamp # noqa: E501
  108. :param time: The time of this MarginAccountBook. # noqa: E501
  109. :type: str
  110. """
  111. self._time = time
  112. @property
  113. def time_ms(self):
  114. """Gets the time_ms of this MarginAccountBook. # noqa: E501
  115. The timestamp of the change (in milliseconds) # noqa: E501
  116. :return: The time_ms of this MarginAccountBook. # noqa: E501
  117. :rtype: int
  118. """
  119. return self._time_ms
  120. @time_ms.setter
  121. def time_ms(self, time_ms):
  122. """Sets the time_ms of this MarginAccountBook.
  123. The timestamp of the change (in milliseconds) # noqa: E501
  124. :param time_ms: The time_ms of this MarginAccountBook. # noqa: E501
  125. :type: int
  126. """
  127. self._time_ms = time_ms
  128. @property
  129. def currency(self):
  130. """Gets the currency of this MarginAccountBook. # noqa: E501
  131. Currency changed # noqa: E501
  132. :return: The currency of this MarginAccountBook. # noqa: E501
  133. :rtype: str
  134. """
  135. return self._currency
  136. @currency.setter
  137. def currency(self, currency):
  138. """Sets the currency of this MarginAccountBook.
  139. Currency changed # noqa: E501
  140. :param currency: The currency of this MarginAccountBook. # noqa: E501
  141. :type: str
  142. """
  143. self._currency = currency
  144. @property
  145. def currency_pair(self):
  146. """Gets the currency_pair of this MarginAccountBook. # noqa: E501
  147. Account currency pair # noqa: E501
  148. :return: The currency_pair of this MarginAccountBook. # noqa: E501
  149. :rtype: str
  150. """
  151. return self._currency_pair
  152. @currency_pair.setter
  153. def currency_pair(self, currency_pair):
  154. """Sets the currency_pair of this MarginAccountBook.
  155. Account currency pair # noqa: E501
  156. :param currency_pair: The currency_pair of this MarginAccountBook. # noqa: E501
  157. :type: str
  158. """
  159. self._currency_pair = currency_pair
  160. @property
  161. def change(self):
  162. """Gets the change of this MarginAccountBook. # noqa: E501
  163. Amount changed. Positive value means transferring in, while negative out # noqa: E501
  164. :return: The change of this MarginAccountBook. # noqa: E501
  165. :rtype: str
  166. """
  167. return self._change
  168. @change.setter
  169. def change(self, change):
  170. """Sets the change of this MarginAccountBook.
  171. Amount changed. Positive value means transferring in, while negative out # noqa: E501
  172. :param change: The change of this MarginAccountBook. # noqa: E501
  173. :type: str
  174. """
  175. self._change = change
  176. @property
  177. def balance(self):
  178. """Gets the balance of this MarginAccountBook. # noqa: E501
  179. Balance after change # noqa: E501
  180. :return: The balance of this MarginAccountBook. # noqa: E501
  181. :rtype: str
  182. """
  183. return self._balance
  184. @balance.setter
  185. def balance(self, balance):
  186. """Sets the balance of this MarginAccountBook.
  187. Balance after change # noqa: E501
  188. :param balance: The balance of this MarginAccountBook. # noqa: E501
  189. :type: str
  190. """
  191. self._balance = balance
  192. def to_dict(self):
  193. """Returns the model properties as a dict"""
  194. result = {}
  195. for attr, _ in six.iteritems(self.openapi_types):
  196. value = getattr(self, attr)
  197. if isinstance(value, list):
  198. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  199. elif hasattr(value, "to_dict"):
  200. result[attr] = value.to_dict()
  201. elif isinstance(value, dict):
  202. result[attr] = dict(
  203. map(
  204. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  205. value.items(),
  206. )
  207. )
  208. else:
  209. result[attr] = value
  210. return result
  211. def to_str(self):
  212. """Returns the string representation of the model"""
  213. return pprint.pformat(self.to_dict())
  214. def __repr__(self):
  215. """For `print` and `pprint`"""
  216. return self.to_str()
  217. def __eq__(self, other):
  218. """Returns true if both objects are equal"""
  219. if not isinstance(other, MarginAccountBook):
  220. return False
  221. return self.to_dict() == other.to_dict()
  222. def __ne__(self, other):
  223. """Returns true if both objects are not equal"""
  224. if not isinstance(other, MarginAccountBook):
  225. return True
  226. return self.to_dict() != other.to_dict()