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

169 lines
5.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 OptionsUnderlyingTicker(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 = {'trade_put': 'int', 'trade_call': 'int', 'index_price': 'str'}
  25. attribute_map = {'trade_put': 'trade_put', 'trade_call': 'trade_call', 'index_price': 'index_price'}
  26. def __init__(self, trade_put=None, trade_call=None, index_price=None, local_vars_configuration=None): # noqa: E501
  27. # type: (int, int, str, Configuration) -> None
  28. """OptionsUnderlyingTicker - a model defined in OpenAPI""" # noqa: E501
  29. if local_vars_configuration is None:
  30. local_vars_configuration = Configuration()
  31. self.local_vars_configuration = local_vars_configuration
  32. self._trade_put = None
  33. self._trade_call = None
  34. self._index_price = None
  35. self.discriminator = None
  36. if trade_put is not None:
  37. self.trade_put = trade_put
  38. if trade_call is not None:
  39. self.trade_call = trade_call
  40. if index_price is not None:
  41. self.index_price = index_price
  42. @property
  43. def trade_put(self):
  44. """Gets the trade_put of this OptionsUnderlyingTicker. # noqa: E501
  45. Total put options trades amount in last 24h # noqa: E501
  46. :return: The trade_put of this OptionsUnderlyingTicker. # noqa: E501
  47. :rtype: int
  48. """
  49. return self._trade_put
  50. @trade_put.setter
  51. def trade_put(self, trade_put):
  52. """Sets the trade_put of this OptionsUnderlyingTicker.
  53. Total put options trades amount in last 24h # noqa: E501
  54. :param trade_put: The trade_put of this OptionsUnderlyingTicker. # noqa: E501
  55. :type: int
  56. """
  57. self._trade_put = trade_put
  58. @property
  59. def trade_call(self):
  60. """Gets the trade_call of this OptionsUnderlyingTicker. # noqa: E501
  61. Total call options trades amount in last 24h # noqa: E501
  62. :return: The trade_call of this OptionsUnderlyingTicker. # noqa: E501
  63. :rtype: int
  64. """
  65. return self._trade_call
  66. @trade_call.setter
  67. def trade_call(self, trade_call):
  68. """Sets the trade_call of this OptionsUnderlyingTicker.
  69. Total call options trades amount in last 24h # noqa: E501
  70. :param trade_call: The trade_call of this OptionsUnderlyingTicker. # noqa: E501
  71. :type: int
  72. """
  73. self._trade_call = trade_call
  74. @property
  75. def index_price(self):
  76. """Gets the index_price of this OptionsUnderlyingTicker. # noqa: E501
  77. Index price (quote currency) # noqa: E501
  78. :return: The index_price of this OptionsUnderlyingTicker. # noqa: E501
  79. :rtype: str
  80. """
  81. return self._index_price
  82. @index_price.setter
  83. def index_price(self, index_price):
  84. """Sets the index_price of this OptionsUnderlyingTicker.
  85. Index price (quote currency) # noqa: E501
  86. :param index_price: The index_price of this OptionsUnderlyingTicker. # noqa: E501
  87. :type: str
  88. """
  89. self._index_price = index_price
  90. def to_dict(self):
  91. """Returns the model properties as a dict"""
  92. result = {}
  93. for attr, _ in six.iteritems(self.openapi_types):
  94. value = getattr(self, attr)
  95. if isinstance(value, list):
  96. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  97. elif hasattr(value, "to_dict"):
  98. result[attr] = value.to_dict()
  99. elif isinstance(value, dict):
  100. result[attr] = dict(
  101. map(
  102. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  103. value.items(),
  104. )
  105. )
  106. else:
  107. result[attr] = value
  108. return result
  109. def to_str(self):
  110. """Returns the string representation of the model"""
  111. return pprint.pformat(self.to_dict())
  112. def __repr__(self):
  113. """For `print` and `pprint`"""
  114. return self.to_str()
  115. def __eq__(self, other):
  116. """Returns true if both objects are equal"""
  117. if not isinstance(other, OptionsUnderlyingTicker):
  118. return False
  119. return self.to_dict() == other.to_dict()
  120. def __ne__(self, other):
  121. """Returns true if both objects are not equal"""
  122. if not isinstance(other, OptionsUnderlyingTicker):
  123. return True
  124. return self.to_dict() != other.to_dict()