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

270 lines
7.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 OptionsSettlement(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. 'time': 'float',
  26. 'contract': 'str',
  27. 'profit': 'str',
  28. 'fee': 'str',
  29. 'strike_price': 'str',
  30. 'settle_price': 'str',
  31. }
  32. attribute_map = {
  33. 'time': 'time',
  34. 'contract': 'contract',
  35. 'profit': 'profit',
  36. 'fee': 'fee',
  37. 'strike_price': 'strike_price',
  38. 'settle_price': 'settle_price',
  39. }
  40. def __init__(
  41. self,
  42. time=None,
  43. contract=None,
  44. profit=None,
  45. fee=None,
  46. strike_price=None,
  47. settle_price=None,
  48. local_vars_configuration=None,
  49. ): # noqa: E501
  50. # type: (float, str, str, str, str, str, Configuration) -> None
  51. """OptionsSettlement - a model defined in OpenAPI""" # noqa: E501
  52. if local_vars_configuration is None:
  53. local_vars_configuration = Configuration()
  54. self.local_vars_configuration = local_vars_configuration
  55. self._time = None
  56. self._contract = None
  57. self._profit = None
  58. self._fee = None
  59. self._strike_price = None
  60. self._settle_price = None
  61. self.discriminator = None
  62. if time is not None:
  63. self.time = time
  64. if contract is not None:
  65. self.contract = contract
  66. if profit is not None:
  67. self.profit = profit
  68. if fee is not None:
  69. self.fee = fee
  70. if strike_price is not None:
  71. self.strike_price = strike_price
  72. if settle_price is not None:
  73. self.settle_price = settle_price
  74. @property
  75. def time(self):
  76. """Gets the time of this OptionsSettlement. # noqa: E501
  77. Last changed time of configuration # noqa: E501
  78. :return: The time of this OptionsSettlement. # noqa: E501
  79. :rtype: float
  80. """
  81. return self._time
  82. @time.setter
  83. def time(self, time):
  84. """Sets the time of this OptionsSettlement.
  85. Last changed time of configuration # noqa: E501
  86. :param time: The time of this OptionsSettlement. # noqa: E501
  87. :type: float
  88. """
  89. self._time = time
  90. @property
  91. def contract(self):
  92. """Gets the contract of this OptionsSettlement. # noqa: E501
  93. Options contract name # noqa: E501
  94. :return: The contract of this OptionsSettlement. # noqa: E501
  95. :rtype: str
  96. """
  97. return self._contract
  98. @contract.setter
  99. def contract(self, contract):
  100. """Sets the contract of this OptionsSettlement.
  101. Options contract name # noqa: E501
  102. :param contract: The contract of this OptionsSettlement. # noqa: E501
  103. :type: str
  104. """
  105. self._contract = contract
  106. @property
  107. def profit(self):
  108. """Gets the profit of this OptionsSettlement. # noqa: E501
  109. Settlement profit per size (quote currency) # noqa: E501
  110. :return: The profit of this OptionsSettlement. # noqa: E501
  111. :rtype: str
  112. """
  113. return self._profit
  114. @profit.setter
  115. def profit(self, profit):
  116. """Sets the profit of this OptionsSettlement.
  117. Settlement profit per size (quote currency) # noqa: E501
  118. :param profit: The profit of this OptionsSettlement. # noqa: E501
  119. :type: str
  120. """
  121. self._profit = profit
  122. @property
  123. def fee(self):
  124. """Gets the fee of this OptionsSettlement. # noqa: E501
  125. Settlement fee per size (quote currency) # noqa: E501
  126. :return: The fee of this OptionsSettlement. # noqa: E501
  127. :rtype: str
  128. """
  129. return self._fee
  130. @fee.setter
  131. def fee(self, fee):
  132. """Sets the fee of this OptionsSettlement.
  133. Settlement fee per size (quote currency) # noqa: E501
  134. :param fee: The fee of this OptionsSettlement. # noqa: E501
  135. :type: str
  136. """
  137. self._fee = fee
  138. @property
  139. def strike_price(self):
  140. """Gets the strike_price of this OptionsSettlement. # noqa: E501
  141. Strike price (quote currency) # noqa: E501
  142. :return: The strike_price of this OptionsSettlement. # noqa: E501
  143. :rtype: str
  144. """
  145. return self._strike_price
  146. @strike_price.setter
  147. def strike_price(self, strike_price):
  148. """Sets the strike_price of this OptionsSettlement.
  149. Strike price (quote currency) # noqa: E501
  150. :param strike_price: The strike_price of this OptionsSettlement. # noqa: E501
  151. :type: str
  152. """
  153. self._strike_price = strike_price
  154. @property
  155. def settle_price(self):
  156. """Gets the settle_price of this OptionsSettlement. # noqa: E501
  157. Settlement price (quote currency) # noqa: E501
  158. :return: The settle_price of this OptionsSettlement. # noqa: E501
  159. :rtype: str
  160. """
  161. return self._settle_price
  162. @settle_price.setter
  163. def settle_price(self, settle_price):
  164. """Sets the settle_price of this OptionsSettlement.
  165. Settlement price (quote currency) # noqa: E501
  166. :param settle_price: The settle_price of this OptionsSettlement. # noqa: E501
  167. :type: str
  168. """
  169. self._settle_price = settle_price
  170. def to_dict(self):
  171. """Returns the model properties as a dict"""
  172. result = {}
  173. for attr, _ in six.iteritems(self.openapi_types):
  174. value = getattr(self, attr)
  175. if isinstance(value, list):
  176. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  177. elif hasattr(value, "to_dict"):
  178. result[attr] = value.to_dict()
  179. elif isinstance(value, dict):
  180. result[attr] = dict(
  181. map(
  182. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  183. value.items(),
  184. )
  185. )
  186. else:
  187. result[attr] = value
  188. return result
  189. def to_str(self):
  190. """Returns the string representation of the model"""
  191. return pprint.pformat(self.to_dict())
  192. def __repr__(self):
  193. """For `print` and `pprint`"""
  194. return self.to_str()
  195. def __eq__(self, other):
  196. """Returns true if both objects are equal"""
  197. if not isinstance(other, OptionsSettlement):
  198. return False
  199. return self.to_dict() == other.to_dict()
  200. def __ne__(self, other):
  201. """Returns true if both objects are not equal"""
  202. if not isinstance(other, OptionsSettlement):
  203. return True
  204. return self.to_dict() != other.to_dict()