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

328 lines
9.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 Currency(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': 'str',
  26. 'delisted': 'bool',
  27. 'withdraw_disabled': 'bool',
  28. 'withdraw_delayed': 'bool',
  29. 'deposit_disabled': 'bool',
  30. 'trade_disabled': 'bool',
  31. 'fixed_rate': 'str',
  32. 'chain': 'str',
  33. }
  34. attribute_map = {
  35. 'currency': 'currency',
  36. 'delisted': 'delisted',
  37. 'withdraw_disabled': 'withdraw_disabled',
  38. 'withdraw_delayed': 'withdraw_delayed',
  39. 'deposit_disabled': 'deposit_disabled',
  40. 'trade_disabled': 'trade_disabled',
  41. 'fixed_rate': 'fixed_rate',
  42. 'chain': 'chain',
  43. }
  44. def __init__(
  45. self,
  46. currency=None,
  47. delisted=None,
  48. withdraw_disabled=None,
  49. withdraw_delayed=None,
  50. deposit_disabled=None,
  51. trade_disabled=None,
  52. fixed_rate=None,
  53. chain=None,
  54. local_vars_configuration=None,
  55. ): # noqa: E501
  56. # type: (str, bool, bool, bool, bool, bool, str, str, Configuration) -> None
  57. """Currency - a model defined in OpenAPI""" # noqa: E501
  58. if local_vars_configuration is None:
  59. local_vars_configuration = Configuration()
  60. self.local_vars_configuration = local_vars_configuration
  61. self._currency = None
  62. self._delisted = None
  63. self._withdraw_disabled = None
  64. self._withdraw_delayed = None
  65. self._deposit_disabled = None
  66. self._trade_disabled = None
  67. self._fixed_rate = None
  68. self._chain = None
  69. self.discriminator = None
  70. if currency is not None:
  71. self.currency = currency
  72. if delisted is not None:
  73. self.delisted = delisted
  74. if withdraw_disabled is not None:
  75. self.withdraw_disabled = withdraw_disabled
  76. if withdraw_delayed is not None:
  77. self.withdraw_delayed = withdraw_delayed
  78. if deposit_disabled is not None:
  79. self.deposit_disabled = deposit_disabled
  80. if trade_disabled is not None:
  81. self.trade_disabled = trade_disabled
  82. if fixed_rate is not None:
  83. self.fixed_rate = fixed_rate
  84. if chain is not None:
  85. self.chain = chain
  86. @property
  87. def currency(self):
  88. """Gets the currency of this Currency. # noqa: E501
  89. Currency name # noqa: E501
  90. :return: The currency of this Currency. # noqa: E501
  91. :rtype: str
  92. """
  93. return self._currency
  94. @currency.setter
  95. def currency(self, currency):
  96. """Sets the currency of this Currency.
  97. Currency name # noqa: E501
  98. :param currency: The currency of this Currency. # noqa: E501
  99. :type: str
  100. """
  101. self._currency = currency
  102. @property
  103. def delisted(self):
  104. """Gets the delisted of this Currency. # noqa: E501
  105. Whether currency is de-listed # noqa: E501
  106. :return: The delisted of this Currency. # noqa: E501
  107. :rtype: bool
  108. """
  109. return self._delisted
  110. @delisted.setter
  111. def delisted(self, delisted):
  112. """Sets the delisted of this Currency.
  113. Whether currency is de-listed # noqa: E501
  114. :param delisted: The delisted of this Currency. # noqa: E501
  115. :type: bool
  116. """
  117. self._delisted = delisted
  118. @property
  119. def withdraw_disabled(self):
  120. """Gets the withdraw_disabled of this Currency. # noqa: E501
  121. Whether currency's withdrawal is disabled # noqa: E501
  122. :return: The withdraw_disabled of this Currency. # noqa: E501
  123. :rtype: bool
  124. """
  125. return self._withdraw_disabled
  126. @withdraw_disabled.setter
  127. def withdraw_disabled(self, withdraw_disabled):
  128. """Sets the withdraw_disabled of this Currency.
  129. Whether currency's withdrawal is disabled # noqa: E501
  130. :param withdraw_disabled: The withdraw_disabled of this Currency. # noqa: E501
  131. :type: bool
  132. """
  133. self._withdraw_disabled = withdraw_disabled
  134. @property
  135. def withdraw_delayed(self):
  136. """Gets the withdraw_delayed of this Currency. # noqa: E501
  137. Whether currency's withdrawal is delayed # noqa: E501
  138. :return: The withdraw_delayed of this Currency. # noqa: E501
  139. :rtype: bool
  140. """
  141. return self._withdraw_delayed
  142. @withdraw_delayed.setter
  143. def withdraw_delayed(self, withdraw_delayed):
  144. """Sets the withdraw_delayed of this Currency.
  145. Whether currency's withdrawal is delayed # noqa: E501
  146. :param withdraw_delayed: The withdraw_delayed of this Currency. # noqa: E501
  147. :type: bool
  148. """
  149. self._withdraw_delayed = withdraw_delayed
  150. @property
  151. def deposit_disabled(self):
  152. """Gets the deposit_disabled of this Currency. # noqa: E501
  153. Whether currency's deposit is disabled # noqa: E501
  154. :return: The deposit_disabled of this Currency. # noqa: E501
  155. :rtype: bool
  156. """
  157. return self._deposit_disabled
  158. @deposit_disabled.setter
  159. def deposit_disabled(self, deposit_disabled):
  160. """Sets the deposit_disabled of this Currency.
  161. Whether currency's deposit is disabled # noqa: E501
  162. :param deposit_disabled: The deposit_disabled of this Currency. # noqa: E501
  163. :type: bool
  164. """
  165. self._deposit_disabled = deposit_disabled
  166. @property
  167. def trade_disabled(self):
  168. """Gets the trade_disabled of this Currency. # noqa: E501
  169. Whether currency's trading is disabled # noqa: E501
  170. :return: The trade_disabled of this Currency. # noqa: E501
  171. :rtype: bool
  172. """
  173. return self._trade_disabled
  174. @trade_disabled.setter
  175. def trade_disabled(self, trade_disabled):
  176. """Sets the trade_disabled of this Currency.
  177. Whether currency's trading is disabled # noqa: E501
  178. :param trade_disabled: The trade_disabled of this Currency. # noqa: E501
  179. :type: bool
  180. """
  181. self._trade_disabled = trade_disabled
  182. @property
  183. def fixed_rate(self):
  184. """Gets the fixed_rate of this Currency. # noqa: E501
  185. Fixed fee rate. Only for fixed rate currencies, not valid for normal currencies # noqa: E501
  186. :return: The fixed_rate of this Currency. # noqa: E501
  187. :rtype: str
  188. """
  189. return self._fixed_rate
  190. @fixed_rate.setter
  191. def fixed_rate(self, fixed_rate):
  192. """Sets the fixed_rate of this Currency.
  193. Fixed fee rate. Only for fixed rate currencies, not valid for normal currencies # noqa: E501
  194. :param fixed_rate: The fixed_rate of this Currency. # noqa: E501
  195. :type: str
  196. """
  197. self._fixed_rate = fixed_rate
  198. @property
  199. def chain(self):
  200. """Gets the chain of this Currency. # noqa: E501
  201. Chain of currency # noqa: E501
  202. :return: The chain of this Currency. # noqa: E501
  203. :rtype: str
  204. """
  205. return self._chain
  206. @chain.setter
  207. def chain(self, chain):
  208. """Sets the chain of this Currency.
  209. Chain of currency # noqa: E501
  210. :param chain: The chain of this Currency. # noqa: E501
  211. :type: str
  212. """
  213. self._chain = chain
  214. def to_dict(self):
  215. """Returns the model properties as a dict"""
  216. result = {}
  217. for attr, _ in six.iteritems(self.openapi_types):
  218. value = getattr(self, attr)
  219. if isinstance(value, list):
  220. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  221. elif hasattr(value, "to_dict"):
  222. result[attr] = value.to_dict()
  223. elif isinstance(value, dict):
  224. result[attr] = dict(
  225. map(
  226. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  227. value.items(),
  228. )
  229. )
  230. else:
  231. result[attr] = value
  232. return result
  233. def to_str(self):
  234. """Returns the string representation of the model"""
  235. return pprint.pformat(self.to_dict())
  236. def __repr__(self):
  237. """For `print` and `pprint`"""
  238. return self.to_str()
  239. def __eq__(self, other):
  240. """Returns true if both objects are equal"""
  241. if not isinstance(other, Currency):
  242. return False
  243. return self.to_dict() == other.to_dict()
  244. def __ne__(self, other):
  245. """Returns true if both objects are not equal"""
  246. if not isinstance(other, Currency):
  247. return True
  248. return self.to_dict() != other.to_dict()