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

357 lines
10 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 SpotFee(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. 'user_id': 'int',
  26. 'taker_fee': 'str',
  27. 'maker_fee': 'str',
  28. 'gt_discount': 'bool',
  29. 'gt_taker_fee': 'str',
  30. 'gt_maker_fee': 'str',
  31. 'loan_fee': 'str',
  32. 'point_type': 'str',
  33. 'currency_pair': 'str',
  34. }
  35. attribute_map = {
  36. 'user_id': 'user_id',
  37. 'taker_fee': 'taker_fee',
  38. 'maker_fee': 'maker_fee',
  39. 'gt_discount': 'gt_discount',
  40. 'gt_taker_fee': 'gt_taker_fee',
  41. 'gt_maker_fee': 'gt_maker_fee',
  42. 'loan_fee': 'loan_fee',
  43. 'point_type': 'point_type',
  44. 'currency_pair': 'currency_pair',
  45. }
  46. def __init__(
  47. self,
  48. user_id=None,
  49. taker_fee=None,
  50. maker_fee=None,
  51. gt_discount=None,
  52. gt_taker_fee=None,
  53. gt_maker_fee=None,
  54. loan_fee=None,
  55. point_type=None,
  56. currency_pair=None,
  57. local_vars_configuration=None,
  58. ): # noqa: E501
  59. # type: (int, str, str, bool, str, str, str, str, str, Configuration) -> None
  60. """SpotFee - a model defined in OpenAPI""" # noqa: E501
  61. if local_vars_configuration is None:
  62. local_vars_configuration = Configuration()
  63. self.local_vars_configuration = local_vars_configuration
  64. self._user_id = None
  65. self._taker_fee = None
  66. self._maker_fee = None
  67. self._gt_discount = None
  68. self._gt_taker_fee = None
  69. self._gt_maker_fee = None
  70. self._loan_fee = None
  71. self._point_type = None
  72. self._currency_pair = None
  73. self.discriminator = None
  74. if user_id is not None:
  75. self.user_id = user_id
  76. if taker_fee is not None:
  77. self.taker_fee = taker_fee
  78. if maker_fee is not None:
  79. self.maker_fee = maker_fee
  80. if gt_discount is not None:
  81. self.gt_discount = gt_discount
  82. if gt_taker_fee is not None:
  83. self.gt_taker_fee = gt_taker_fee
  84. if gt_maker_fee is not None:
  85. self.gt_maker_fee = gt_maker_fee
  86. if loan_fee is not None:
  87. self.loan_fee = loan_fee
  88. if point_type is not None:
  89. self.point_type = point_type
  90. if currency_pair is not None:
  91. self.currency_pair = currency_pair
  92. @property
  93. def user_id(self):
  94. """Gets the user_id of this SpotFee. # noqa: E501
  95. User ID # noqa: E501
  96. :return: The user_id of this SpotFee. # noqa: E501
  97. :rtype: int
  98. """
  99. return self._user_id
  100. @user_id.setter
  101. def user_id(self, user_id):
  102. """Sets the user_id of this SpotFee.
  103. User ID # noqa: E501
  104. :param user_id: The user_id of this SpotFee. # noqa: E501
  105. :type: int
  106. """
  107. self._user_id = user_id
  108. @property
  109. def taker_fee(self):
  110. """Gets the taker_fee of this SpotFee. # noqa: E501
  111. taker fee rate # noqa: E501
  112. :return: The taker_fee of this SpotFee. # noqa: E501
  113. :rtype: str
  114. """
  115. return self._taker_fee
  116. @taker_fee.setter
  117. def taker_fee(self, taker_fee):
  118. """Sets the taker_fee of this SpotFee.
  119. taker fee rate # noqa: E501
  120. :param taker_fee: The taker_fee of this SpotFee. # noqa: E501
  121. :type: str
  122. """
  123. self._taker_fee = taker_fee
  124. @property
  125. def maker_fee(self):
  126. """Gets the maker_fee of this SpotFee. # noqa: E501
  127. maker fee rate # noqa: E501
  128. :return: The maker_fee of this SpotFee. # noqa: E501
  129. :rtype: str
  130. """
  131. return self._maker_fee
  132. @maker_fee.setter
  133. def maker_fee(self, maker_fee):
  134. """Sets the maker_fee of this SpotFee.
  135. maker fee rate # noqa: E501
  136. :param maker_fee: The maker_fee of this SpotFee. # noqa: E501
  137. :type: str
  138. """
  139. self._maker_fee = maker_fee
  140. @property
  141. def gt_discount(self):
  142. """Gets the gt_discount of this SpotFee. # noqa: E501
  143. If GT deduction is enabled # noqa: E501
  144. :return: The gt_discount of this SpotFee. # noqa: E501
  145. :rtype: bool
  146. """
  147. return self._gt_discount
  148. @gt_discount.setter
  149. def gt_discount(self, gt_discount):
  150. """Sets the gt_discount of this SpotFee.
  151. If GT deduction is enabled # noqa: E501
  152. :param gt_discount: The gt_discount of this SpotFee. # noqa: E501
  153. :type: bool
  154. """
  155. self._gt_discount = gt_discount
  156. @property
  157. def gt_taker_fee(self):
  158. """Gets the gt_taker_fee of this SpotFee. # noqa: E501
  159. Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501
  160. :return: The gt_taker_fee of this SpotFee. # noqa: E501
  161. :rtype: str
  162. """
  163. return self._gt_taker_fee
  164. @gt_taker_fee.setter
  165. def gt_taker_fee(self, gt_taker_fee):
  166. """Sets the gt_taker_fee of this SpotFee.
  167. Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501
  168. :param gt_taker_fee: The gt_taker_fee of this SpotFee. # noqa: E501
  169. :type: str
  170. """
  171. self._gt_taker_fee = gt_taker_fee
  172. @property
  173. def gt_maker_fee(self):
  174. """Gets the gt_maker_fee of this SpotFee. # noqa: E501
  175. Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501
  176. :return: The gt_maker_fee of this SpotFee. # noqa: E501
  177. :rtype: str
  178. """
  179. return self._gt_maker_fee
  180. @gt_maker_fee.setter
  181. def gt_maker_fee(self, gt_maker_fee):
  182. """Sets the gt_maker_fee of this SpotFee.
  183. Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501
  184. :param gt_maker_fee: The gt_maker_fee of this SpotFee. # noqa: E501
  185. :type: str
  186. """
  187. self._gt_maker_fee = gt_maker_fee
  188. @property
  189. def loan_fee(self):
  190. """Gets the loan_fee of this SpotFee. # noqa: E501
  191. Loan fee rate of margin lending # noqa: E501
  192. :return: The loan_fee of this SpotFee. # noqa: E501
  193. :rtype: str
  194. """
  195. return self._loan_fee
  196. @loan_fee.setter
  197. def loan_fee(self, loan_fee):
  198. """Sets the loan_fee of this SpotFee.
  199. Loan fee rate of margin lending # noqa: E501
  200. :param loan_fee: The loan_fee of this SpotFee. # noqa: E501
  201. :type: str
  202. """
  203. self._loan_fee = loan_fee
  204. @property
  205. def point_type(self):
  206. """Gets the point_type of this SpotFee. # noqa: E501
  207. Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501
  208. :return: The point_type of this SpotFee. # noqa: E501
  209. :rtype: str
  210. """
  211. return self._point_type
  212. @point_type.setter
  213. def point_type(self, point_type):
  214. """Sets the point_type of this SpotFee.
  215. Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501
  216. :param point_type: The point_type of this SpotFee. # noqa: E501
  217. :type: str
  218. """
  219. self._point_type = point_type
  220. @property
  221. def currency_pair(self):
  222. """Gets the currency_pair of this SpotFee. # noqa: E501
  223. Currency pair # noqa: E501
  224. :return: The currency_pair of this SpotFee. # noqa: E501
  225. :rtype: str
  226. """
  227. return self._currency_pair
  228. @currency_pair.setter
  229. def currency_pair(self, currency_pair):
  230. """Sets the currency_pair of this SpotFee.
  231. Currency pair # noqa: E501
  232. :param currency_pair: The currency_pair of this SpotFee. # noqa: E501
  233. :type: str
  234. """
  235. self._currency_pair = currency_pair
  236. def to_dict(self):
  237. """Returns the model properties as a dict"""
  238. result = {}
  239. for attr, _ in six.iteritems(self.openapi_types):
  240. value = getattr(self, attr)
  241. if isinstance(value, list):
  242. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  243. elif hasattr(value, "to_dict"):
  244. result[attr] = value.to_dict()
  245. elif isinstance(value, dict):
  246. result[attr] = dict(
  247. map(
  248. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  249. value.items(),
  250. )
  251. )
  252. else:
  253. result[attr] = value
  254. return result
  255. def to_str(self):
  256. """Returns the string representation of the model"""
  257. return pprint.pformat(self.to_dict())
  258. def __repr__(self):
  259. """For `print` and `pprint`"""
  260. return self.to_str()
  261. def __eq__(self, other):
  262. """Returns true if both objects are equal"""
  263. if not isinstance(other, SpotFee):
  264. return False
  265. return self.to_dict() == other.to_dict()
  266. def __ne__(self, other):
  267. """Returns true if both objects are not equal"""
  268. if not isinstance(other, SpotFee):
  269. return True
  270. return self.to_dict() != other.to_dict()