天择加密量化开放框架下载
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 AgencyTransaction(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. 'transaction_time': 'int',
  26. 'user_id': 'int',
  27. 'group_name': 'str',
  28. 'fee': 'str',
  29. 'fee_asset': 'str',
  30. 'currency_pair': 'str',
  31. 'amount': 'str',
  32. 'amount_asset': 'str',
  33. 'source': 'str',
  34. }
  35. attribute_map = {
  36. 'transaction_time': 'transaction_time',
  37. 'user_id': 'user_id',
  38. 'group_name': 'group_name',
  39. 'fee': 'fee',
  40. 'fee_asset': 'fee_asset',
  41. 'currency_pair': 'currency_pair',
  42. 'amount': 'amount',
  43. 'amount_asset': 'amount_asset',
  44. 'source': 'source',
  45. }
  46. def __init__(
  47. self,
  48. transaction_time=None,
  49. user_id=None,
  50. group_name=None,
  51. fee=None,
  52. fee_asset=None,
  53. currency_pair=None,
  54. amount=None,
  55. amount_asset=None,
  56. source=None,
  57. local_vars_configuration=None,
  58. ): # noqa: E501
  59. # type: (int, int, str, str, str, str, str, str, str, Configuration) -> None
  60. """AgencyTransaction - 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._transaction_time = None
  65. self._user_id = None
  66. self._group_name = None
  67. self._fee = None
  68. self._fee_asset = None
  69. self._currency_pair = None
  70. self._amount = None
  71. self._amount_asset = None
  72. self._source = None
  73. self.discriminator = None
  74. if transaction_time is not None:
  75. self.transaction_time = transaction_time
  76. if user_id is not None:
  77. self.user_id = user_id
  78. if group_name is not None:
  79. self.group_name = group_name
  80. if fee is not None:
  81. self.fee = fee
  82. if fee_asset is not None:
  83. self.fee_asset = fee_asset
  84. if currency_pair is not None:
  85. self.currency_pair = currency_pair
  86. if amount is not None:
  87. self.amount = amount
  88. if amount_asset is not None:
  89. self.amount_asset = amount_asset
  90. if source is not None:
  91. self.source = source
  92. @property
  93. def transaction_time(self):
  94. """Gets the transaction_time of this AgencyTransaction. # noqa: E501
  95. Transaction Time. (unix timestamp) # noqa: E501
  96. :return: The transaction_time of this AgencyTransaction. # noqa: E501
  97. :rtype: int
  98. """
  99. return self._transaction_time
  100. @transaction_time.setter
  101. def transaction_time(self, transaction_time):
  102. """Sets the transaction_time of this AgencyTransaction.
  103. Transaction Time. (unix timestamp) # noqa: E501
  104. :param transaction_time: The transaction_time of this AgencyTransaction. # noqa: E501
  105. :type: int
  106. """
  107. self._transaction_time = transaction_time
  108. @property
  109. def user_id(self):
  110. """Gets the user_id of this AgencyTransaction. # noqa: E501
  111. User ID # noqa: E501
  112. :return: The user_id of this AgencyTransaction. # noqa: E501
  113. :rtype: int
  114. """
  115. return self._user_id
  116. @user_id.setter
  117. def user_id(self, user_id):
  118. """Sets the user_id of this AgencyTransaction.
  119. User ID # noqa: E501
  120. :param user_id: The user_id of this AgencyTransaction. # noqa: E501
  121. :type: int
  122. """
  123. self._user_id = user_id
  124. @property
  125. def group_name(self):
  126. """Gets the group_name of this AgencyTransaction. # noqa: E501
  127. Group name # noqa: E501
  128. :return: The group_name of this AgencyTransaction. # noqa: E501
  129. :rtype: str
  130. """
  131. return self._group_name
  132. @group_name.setter
  133. def group_name(self, group_name):
  134. """Sets the group_name of this AgencyTransaction.
  135. Group name # noqa: E501
  136. :param group_name: The group_name of this AgencyTransaction. # noqa: E501
  137. :type: str
  138. """
  139. self._group_name = group_name
  140. @property
  141. def fee(self):
  142. """Gets the fee of this AgencyTransaction. # noqa: E501
  143. Fee # noqa: E501
  144. :return: The fee of this AgencyTransaction. # noqa: E501
  145. :rtype: str
  146. """
  147. return self._fee
  148. @fee.setter
  149. def fee(self, fee):
  150. """Sets the fee of this AgencyTransaction.
  151. Fee # noqa: E501
  152. :param fee: The fee of this AgencyTransaction. # noqa: E501
  153. :type: str
  154. """
  155. self._fee = fee
  156. @property
  157. def fee_asset(self):
  158. """Gets the fee_asset of this AgencyTransaction. # noqa: E501
  159. Fee currency # noqa: E501
  160. :return: The fee_asset of this AgencyTransaction. # noqa: E501
  161. :rtype: str
  162. """
  163. return self._fee_asset
  164. @fee_asset.setter
  165. def fee_asset(self, fee_asset):
  166. """Sets the fee_asset of this AgencyTransaction.
  167. Fee currency # noqa: E501
  168. :param fee_asset: The fee_asset of this AgencyTransaction. # noqa: E501
  169. :type: str
  170. """
  171. self._fee_asset = fee_asset
  172. @property
  173. def currency_pair(self):
  174. """Gets the currency_pair of this AgencyTransaction. # noqa: E501
  175. Currency pair # noqa: E501
  176. :return: The currency_pair of this AgencyTransaction. # noqa: E501
  177. :rtype: str
  178. """
  179. return self._currency_pair
  180. @currency_pair.setter
  181. def currency_pair(self, currency_pair):
  182. """Sets the currency_pair of this AgencyTransaction.
  183. Currency pair # noqa: E501
  184. :param currency_pair: The currency_pair of this AgencyTransaction. # noqa: E501
  185. :type: str
  186. """
  187. self._currency_pair = currency_pair
  188. @property
  189. def amount(self):
  190. """Gets the amount of this AgencyTransaction. # noqa: E501
  191. Commission Amount # noqa: E501
  192. :return: The amount of this AgencyTransaction. # noqa: E501
  193. :rtype: str
  194. """
  195. return self._amount
  196. @amount.setter
  197. def amount(self, amount):
  198. """Sets the amount of this AgencyTransaction.
  199. Commission Amount # noqa: E501
  200. :param amount: The amount of this AgencyTransaction. # noqa: E501
  201. :type: str
  202. """
  203. self._amount = amount
  204. @property
  205. def amount_asset(self):
  206. """Gets the amount_asset of this AgencyTransaction. # noqa: E501
  207. Commission Asset # noqa: E501
  208. :return: The amount_asset of this AgencyTransaction. # noqa: E501
  209. :rtype: str
  210. """
  211. return self._amount_asset
  212. @amount_asset.setter
  213. def amount_asset(self, amount_asset):
  214. """Sets the amount_asset of this AgencyTransaction.
  215. Commission Asset # noqa: E501
  216. :param amount_asset: The amount_asset of this AgencyTransaction. # noqa: E501
  217. :type: str
  218. """
  219. self._amount_asset = amount_asset
  220. @property
  221. def source(self):
  222. """Gets the source of this AgencyTransaction. # noqa: E501
  223. Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501
  224. :return: The source of this AgencyTransaction. # noqa: E501
  225. :rtype: str
  226. """
  227. return self._source
  228. @source.setter
  229. def source(self, source):
  230. """Sets the source of this AgencyTransaction.
  231. Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501
  232. :param source: The source of this AgencyTransaction. # noqa: E501
  233. :type: str
  234. """
  235. self._source = source
  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, AgencyTransaction):
  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, AgencyTransaction):
  269. return True
  270. return self.to_dict() != other.to_dict()