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

1215 lines
38 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 DeliveryContract(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. 'name': 'str',
  26. 'underlying': 'str',
  27. 'cycle': 'str',
  28. 'type': 'str',
  29. 'quanto_multiplier': 'str',
  30. 'leverage_min': 'str',
  31. 'leverage_max': 'str',
  32. 'maintenance_rate': 'str',
  33. 'mark_type': 'str',
  34. 'mark_price': 'str',
  35. 'index_price': 'str',
  36. 'last_price': 'str',
  37. 'maker_fee_rate': 'str',
  38. 'taker_fee_rate': 'str',
  39. 'order_price_round': 'str',
  40. 'mark_price_round': 'str',
  41. 'basis_rate': 'str',
  42. 'basis_value': 'str',
  43. 'basis_impact_value': 'str',
  44. 'settle_price': 'str',
  45. 'settle_price_interval': 'int',
  46. 'settle_price_duration': 'int',
  47. 'expire_time': 'int',
  48. 'risk_limit_base': 'str',
  49. 'risk_limit_step': 'str',
  50. 'risk_limit_max': 'str',
  51. 'order_size_min': 'int',
  52. 'order_size_max': 'int',
  53. 'order_price_deviate': 'str',
  54. 'ref_discount_rate': 'str',
  55. 'ref_rebate_rate': 'str',
  56. 'orderbook_id': 'int',
  57. 'trade_id': 'int',
  58. 'trade_size': 'int',
  59. 'position_size': 'int',
  60. 'config_change_time': 'float',
  61. 'in_delisting': 'bool',
  62. 'orders_limit': 'int',
  63. }
  64. attribute_map = {
  65. 'name': 'name',
  66. 'underlying': 'underlying',
  67. 'cycle': 'cycle',
  68. 'type': 'type',
  69. 'quanto_multiplier': 'quanto_multiplier',
  70. 'leverage_min': 'leverage_min',
  71. 'leverage_max': 'leverage_max',
  72. 'maintenance_rate': 'maintenance_rate',
  73. 'mark_type': 'mark_type',
  74. 'mark_price': 'mark_price',
  75. 'index_price': 'index_price',
  76. 'last_price': 'last_price',
  77. 'maker_fee_rate': 'maker_fee_rate',
  78. 'taker_fee_rate': 'taker_fee_rate',
  79. 'order_price_round': 'order_price_round',
  80. 'mark_price_round': 'mark_price_round',
  81. 'basis_rate': 'basis_rate',
  82. 'basis_value': 'basis_value',
  83. 'basis_impact_value': 'basis_impact_value',
  84. 'settle_price': 'settle_price',
  85. 'settle_price_interval': 'settle_price_interval',
  86. 'settle_price_duration': 'settle_price_duration',
  87. 'expire_time': 'expire_time',
  88. 'risk_limit_base': 'risk_limit_base',
  89. 'risk_limit_step': 'risk_limit_step',
  90. 'risk_limit_max': 'risk_limit_max',
  91. 'order_size_min': 'order_size_min',
  92. 'order_size_max': 'order_size_max',
  93. 'order_price_deviate': 'order_price_deviate',
  94. 'ref_discount_rate': 'ref_discount_rate',
  95. 'ref_rebate_rate': 'ref_rebate_rate',
  96. 'orderbook_id': 'orderbook_id',
  97. 'trade_id': 'trade_id',
  98. 'trade_size': 'trade_size',
  99. 'position_size': 'position_size',
  100. 'config_change_time': 'config_change_time',
  101. 'in_delisting': 'in_delisting',
  102. 'orders_limit': 'orders_limit',
  103. }
  104. def __init__(
  105. self,
  106. name=None,
  107. underlying=None,
  108. cycle=None,
  109. type=None,
  110. quanto_multiplier=None,
  111. leverage_min=None,
  112. leverage_max=None,
  113. maintenance_rate=None,
  114. mark_type=None,
  115. mark_price=None,
  116. index_price=None,
  117. last_price=None,
  118. maker_fee_rate=None,
  119. taker_fee_rate=None,
  120. order_price_round=None,
  121. mark_price_round=None,
  122. basis_rate=None,
  123. basis_value=None,
  124. basis_impact_value=None,
  125. settle_price=None,
  126. settle_price_interval=None,
  127. settle_price_duration=None,
  128. expire_time=None,
  129. risk_limit_base=None,
  130. risk_limit_step=None,
  131. risk_limit_max=None,
  132. order_size_min=None,
  133. order_size_max=None,
  134. order_price_deviate=None,
  135. ref_discount_rate=None,
  136. ref_rebate_rate=None,
  137. orderbook_id=None,
  138. trade_id=None,
  139. trade_size=None,
  140. position_size=None,
  141. config_change_time=None,
  142. in_delisting=None,
  143. orders_limit=None,
  144. local_vars_configuration=None,
  145. ): # noqa: E501
  146. # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, int, int, str, str, str, int, int, str, str, str, int, int, int, int, float, bool, int, Configuration) -> None
  147. """DeliveryContract - a model defined in OpenAPI""" # noqa: E501
  148. if local_vars_configuration is None:
  149. local_vars_configuration = Configuration()
  150. self.local_vars_configuration = local_vars_configuration
  151. self._name = None
  152. self._underlying = None
  153. self._cycle = None
  154. self._type = None
  155. self._quanto_multiplier = None
  156. self._leverage_min = None
  157. self._leverage_max = None
  158. self._maintenance_rate = None
  159. self._mark_type = None
  160. self._mark_price = None
  161. self._index_price = None
  162. self._last_price = None
  163. self._maker_fee_rate = None
  164. self._taker_fee_rate = None
  165. self._order_price_round = None
  166. self._mark_price_round = None
  167. self._basis_rate = None
  168. self._basis_value = None
  169. self._basis_impact_value = None
  170. self._settle_price = None
  171. self._settle_price_interval = None
  172. self._settle_price_duration = None
  173. self._expire_time = None
  174. self._risk_limit_base = None
  175. self._risk_limit_step = None
  176. self._risk_limit_max = None
  177. self._order_size_min = None
  178. self._order_size_max = None
  179. self._order_price_deviate = None
  180. self._ref_discount_rate = None
  181. self._ref_rebate_rate = None
  182. self._orderbook_id = None
  183. self._trade_id = None
  184. self._trade_size = None
  185. self._position_size = None
  186. self._config_change_time = None
  187. self._in_delisting = None
  188. self._orders_limit = None
  189. self.discriminator = None
  190. if name is not None:
  191. self.name = name
  192. if underlying is not None:
  193. self.underlying = underlying
  194. if cycle is not None:
  195. self.cycle = cycle
  196. if type is not None:
  197. self.type = type
  198. if quanto_multiplier is not None:
  199. self.quanto_multiplier = quanto_multiplier
  200. if leverage_min is not None:
  201. self.leverage_min = leverage_min
  202. if leverage_max is not None:
  203. self.leverage_max = leverage_max
  204. if maintenance_rate is not None:
  205. self.maintenance_rate = maintenance_rate
  206. if mark_type is not None:
  207. self.mark_type = mark_type
  208. if mark_price is not None:
  209. self.mark_price = mark_price
  210. if index_price is not None:
  211. self.index_price = index_price
  212. if last_price is not None:
  213. self.last_price = last_price
  214. if maker_fee_rate is not None:
  215. self.maker_fee_rate = maker_fee_rate
  216. if taker_fee_rate is not None:
  217. self.taker_fee_rate = taker_fee_rate
  218. if order_price_round is not None:
  219. self.order_price_round = order_price_round
  220. if mark_price_round is not None:
  221. self.mark_price_round = mark_price_round
  222. if basis_rate is not None:
  223. self.basis_rate = basis_rate
  224. if basis_value is not None:
  225. self.basis_value = basis_value
  226. if basis_impact_value is not None:
  227. self.basis_impact_value = basis_impact_value
  228. if settle_price is not None:
  229. self.settle_price = settle_price
  230. if settle_price_interval is not None:
  231. self.settle_price_interval = settle_price_interval
  232. if settle_price_duration is not None:
  233. self.settle_price_duration = settle_price_duration
  234. if expire_time is not None:
  235. self.expire_time = expire_time
  236. if risk_limit_base is not None:
  237. self.risk_limit_base = risk_limit_base
  238. if risk_limit_step is not None:
  239. self.risk_limit_step = risk_limit_step
  240. if risk_limit_max is not None:
  241. self.risk_limit_max = risk_limit_max
  242. if order_size_min is not None:
  243. self.order_size_min = order_size_min
  244. if order_size_max is not None:
  245. self.order_size_max = order_size_max
  246. if order_price_deviate is not None:
  247. self.order_price_deviate = order_price_deviate
  248. if ref_discount_rate is not None:
  249. self.ref_discount_rate = ref_discount_rate
  250. if ref_rebate_rate is not None:
  251. self.ref_rebate_rate = ref_rebate_rate
  252. if orderbook_id is not None:
  253. self.orderbook_id = orderbook_id
  254. if trade_id is not None:
  255. self.trade_id = trade_id
  256. if trade_size is not None:
  257. self.trade_size = trade_size
  258. if position_size is not None:
  259. self.position_size = position_size
  260. if config_change_time is not None:
  261. self.config_change_time = config_change_time
  262. if in_delisting is not None:
  263. self.in_delisting = in_delisting
  264. if orders_limit is not None:
  265. self.orders_limit = orders_limit
  266. @property
  267. def name(self):
  268. """Gets the name of this DeliveryContract. # noqa: E501
  269. Futures contract # noqa: E501
  270. :return: The name of this DeliveryContract. # noqa: E501
  271. :rtype: str
  272. """
  273. return self._name
  274. @name.setter
  275. def name(self, name):
  276. """Sets the name of this DeliveryContract.
  277. Futures contract # noqa: E501
  278. :param name: The name of this DeliveryContract. # noqa: E501
  279. :type: str
  280. """
  281. self._name = name
  282. @property
  283. def underlying(self):
  284. """Gets the underlying of this DeliveryContract. # noqa: E501
  285. Underlying # noqa: E501
  286. :return: The underlying of this DeliveryContract. # noqa: E501
  287. :rtype: str
  288. """
  289. return self._underlying
  290. @underlying.setter
  291. def underlying(self, underlying):
  292. """Sets the underlying of this DeliveryContract.
  293. Underlying # noqa: E501
  294. :param underlying: The underlying of this DeliveryContract. # noqa: E501
  295. :type: str
  296. """
  297. self._underlying = underlying
  298. @property
  299. def cycle(self):
  300. """Gets the cycle of this DeliveryContract. # noqa: E501
  301. Cycle type, e.g. WEEKLY, QUARTERLY # noqa: E501
  302. :return: The cycle of this DeliveryContract. # noqa: E501
  303. :rtype: str
  304. """
  305. return self._cycle
  306. @cycle.setter
  307. def cycle(self, cycle):
  308. """Sets the cycle of this DeliveryContract.
  309. Cycle type, e.g. WEEKLY, QUARTERLY # noqa: E501
  310. :param cycle: The cycle of this DeliveryContract. # noqa: E501
  311. :type: str
  312. """
  313. allowed_values = ["WEEKLY", "BI-WEEKLY", "QUARTERLY", "BI-QUARTERLY"] # noqa: E501
  314. if self.local_vars_configuration.client_side_validation and cycle not in allowed_values: # noqa: E501
  315. raise ValueError(
  316. "Invalid value for `cycle` ({0}), must be one of {1}".format(cycle, allowed_values) # noqa: E501
  317. )
  318. self._cycle = cycle
  319. @property
  320. def type(self):
  321. """Gets the type of this DeliveryContract. # noqa: E501
  322. Futures contract type # noqa: E501
  323. :return: The type of this DeliveryContract. # noqa: E501
  324. :rtype: str
  325. """
  326. return self._type
  327. @type.setter
  328. def type(self, type):
  329. """Sets the type of this DeliveryContract.
  330. Futures contract type # noqa: E501
  331. :param type: The type of this DeliveryContract. # noqa: E501
  332. :type: str
  333. """
  334. allowed_values = ["inverse", "direct"] # noqa: E501
  335. if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501
  336. raise ValueError(
  337. "Invalid value for `type` ({0}), must be one of {1}".format(type, allowed_values) # noqa: E501
  338. )
  339. self._type = type
  340. @property
  341. def quanto_multiplier(self):
  342. """Gets the quanto_multiplier of this DeliveryContract. # noqa: E501
  343. Multiplier used in converting from invoicing to settlement currency # noqa: E501
  344. :return: The quanto_multiplier of this DeliveryContract. # noqa: E501
  345. :rtype: str
  346. """
  347. return self._quanto_multiplier
  348. @quanto_multiplier.setter
  349. def quanto_multiplier(self, quanto_multiplier):
  350. """Sets the quanto_multiplier of this DeliveryContract.
  351. Multiplier used in converting from invoicing to settlement currency # noqa: E501
  352. :param quanto_multiplier: The quanto_multiplier of this DeliveryContract. # noqa: E501
  353. :type: str
  354. """
  355. self._quanto_multiplier = quanto_multiplier
  356. @property
  357. def leverage_min(self):
  358. """Gets the leverage_min of this DeliveryContract. # noqa: E501
  359. Minimum leverage # noqa: E501
  360. :return: The leverage_min of this DeliveryContract. # noqa: E501
  361. :rtype: str
  362. """
  363. return self._leverage_min
  364. @leverage_min.setter
  365. def leverage_min(self, leverage_min):
  366. """Sets the leverage_min of this DeliveryContract.
  367. Minimum leverage # noqa: E501
  368. :param leverage_min: The leverage_min of this DeliveryContract. # noqa: E501
  369. :type: str
  370. """
  371. self._leverage_min = leverage_min
  372. @property
  373. def leverage_max(self):
  374. """Gets the leverage_max of this DeliveryContract. # noqa: E501
  375. Maximum leverage # noqa: E501
  376. :return: The leverage_max of this DeliveryContract. # noqa: E501
  377. :rtype: str
  378. """
  379. return self._leverage_max
  380. @leverage_max.setter
  381. def leverage_max(self, leverage_max):
  382. """Sets the leverage_max of this DeliveryContract.
  383. Maximum leverage # noqa: E501
  384. :param leverage_max: The leverage_max of this DeliveryContract. # noqa: E501
  385. :type: str
  386. """
  387. self._leverage_max = leverage_max
  388. @property
  389. def maintenance_rate(self):
  390. """Gets the maintenance_rate of this DeliveryContract. # noqa: E501
  391. Maintenance rate of margin # noqa: E501
  392. :return: The maintenance_rate of this DeliveryContract. # noqa: E501
  393. :rtype: str
  394. """
  395. return self._maintenance_rate
  396. @maintenance_rate.setter
  397. def maintenance_rate(self, maintenance_rate):
  398. """Sets the maintenance_rate of this DeliveryContract.
  399. Maintenance rate of margin # noqa: E501
  400. :param maintenance_rate: The maintenance_rate of this DeliveryContract. # noqa: E501
  401. :type: str
  402. """
  403. self._maintenance_rate = maintenance_rate
  404. @property
  405. def mark_type(self):
  406. """Gets the mark_type of this DeliveryContract. # noqa: E501
  407. Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501
  408. :return: The mark_type of this DeliveryContract. # noqa: E501
  409. :rtype: str
  410. """
  411. return self._mark_type
  412. @mark_type.setter
  413. def mark_type(self, mark_type):
  414. """Sets the mark_type of this DeliveryContract.
  415. Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501
  416. :param mark_type: The mark_type of this DeliveryContract. # noqa: E501
  417. :type: str
  418. """
  419. allowed_values = ["internal", "index"] # noqa: E501
  420. if self.local_vars_configuration.client_side_validation and mark_type not in allowed_values: # noqa: E501
  421. raise ValueError(
  422. "Invalid value for `mark_type` ({0}), must be one of {1}".format( # noqa: E501
  423. mark_type, allowed_values
  424. )
  425. )
  426. self._mark_type = mark_type
  427. @property
  428. def mark_price(self):
  429. """Gets the mark_price of this DeliveryContract. # noqa: E501
  430. Current mark price # noqa: E501
  431. :return: The mark_price of this DeliveryContract. # noqa: E501
  432. :rtype: str
  433. """
  434. return self._mark_price
  435. @mark_price.setter
  436. def mark_price(self, mark_price):
  437. """Sets the mark_price of this DeliveryContract.
  438. Current mark price # noqa: E501
  439. :param mark_price: The mark_price of this DeliveryContract. # noqa: E501
  440. :type: str
  441. """
  442. self._mark_price = mark_price
  443. @property
  444. def index_price(self):
  445. """Gets the index_price of this DeliveryContract. # noqa: E501
  446. Current index price # noqa: E501
  447. :return: The index_price of this DeliveryContract. # noqa: E501
  448. :rtype: str
  449. """
  450. return self._index_price
  451. @index_price.setter
  452. def index_price(self, index_price):
  453. """Sets the index_price of this DeliveryContract.
  454. Current index price # noqa: E501
  455. :param index_price: The index_price of this DeliveryContract. # noqa: E501
  456. :type: str
  457. """
  458. self._index_price = index_price
  459. @property
  460. def last_price(self):
  461. """Gets the last_price of this DeliveryContract. # noqa: E501
  462. Last trading price # noqa: E501
  463. :return: The last_price of this DeliveryContract. # noqa: E501
  464. :rtype: str
  465. """
  466. return self._last_price
  467. @last_price.setter
  468. def last_price(self, last_price):
  469. """Sets the last_price of this DeliveryContract.
  470. Last trading price # noqa: E501
  471. :param last_price: The last_price of this DeliveryContract. # noqa: E501
  472. :type: str
  473. """
  474. self._last_price = last_price
  475. @property
  476. def maker_fee_rate(self):
  477. """Gets the maker_fee_rate of this DeliveryContract. # noqa: E501
  478. Maker fee rate, where negative means rebate # noqa: E501
  479. :return: The maker_fee_rate of this DeliveryContract. # noqa: E501
  480. :rtype: str
  481. """
  482. return self._maker_fee_rate
  483. @maker_fee_rate.setter
  484. def maker_fee_rate(self, maker_fee_rate):
  485. """Sets the maker_fee_rate of this DeliveryContract.
  486. Maker fee rate, where negative means rebate # noqa: E501
  487. :param maker_fee_rate: The maker_fee_rate of this DeliveryContract. # noqa: E501
  488. :type: str
  489. """
  490. self._maker_fee_rate = maker_fee_rate
  491. @property
  492. def taker_fee_rate(self):
  493. """Gets the taker_fee_rate of this DeliveryContract. # noqa: E501
  494. Taker fee rate # noqa: E501
  495. :return: The taker_fee_rate of this DeliveryContract. # noqa: E501
  496. :rtype: str
  497. """
  498. return self._taker_fee_rate
  499. @taker_fee_rate.setter
  500. def taker_fee_rate(self, taker_fee_rate):
  501. """Sets the taker_fee_rate of this DeliveryContract.
  502. Taker fee rate # noqa: E501
  503. :param taker_fee_rate: The taker_fee_rate of this DeliveryContract. # noqa: E501
  504. :type: str
  505. """
  506. self._taker_fee_rate = taker_fee_rate
  507. @property
  508. def order_price_round(self):
  509. """Gets the order_price_round of this DeliveryContract. # noqa: E501
  510. Minimum order price increment # noqa: E501
  511. :return: The order_price_round of this DeliveryContract. # noqa: E501
  512. :rtype: str
  513. """
  514. return self._order_price_round
  515. @order_price_round.setter
  516. def order_price_round(self, order_price_round):
  517. """Sets the order_price_round of this DeliveryContract.
  518. Minimum order price increment # noqa: E501
  519. :param order_price_round: The order_price_round of this DeliveryContract. # noqa: E501
  520. :type: str
  521. """
  522. self._order_price_round = order_price_round
  523. @property
  524. def mark_price_round(self):
  525. """Gets the mark_price_round of this DeliveryContract. # noqa: E501
  526. Minimum mark price increment # noqa: E501
  527. :return: The mark_price_round of this DeliveryContract. # noqa: E501
  528. :rtype: str
  529. """
  530. return self._mark_price_round
  531. @mark_price_round.setter
  532. def mark_price_round(self, mark_price_round):
  533. """Sets the mark_price_round of this DeliveryContract.
  534. Minimum mark price increment # noqa: E501
  535. :param mark_price_round: The mark_price_round of this DeliveryContract. # noqa: E501
  536. :type: str
  537. """
  538. self._mark_price_round = mark_price_round
  539. @property
  540. def basis_rate(self):
  541. """Gets the basis_rate of this DeliveryContract. # noqa: E501
  542. Fair basis rate # noqa: E501
  543. :return: The basis_rate of this DeliveryContract. # noqa: E501
  544. :rtype: str
  545. """
  546. return self._basis_rate
  547. @basis_rate.setter
  548. def basis_rate(self, basis_rate):
  549. """Sets the basis_rate of this DeliveryContract.
  550. Fair basis rate # noqa: E501
  551. :param basis_rate: The basis_rate of this DeliveryContract. # noqa: E501
  552. :type: str
  553. """
  554. self._basis_rate = basis_rate
  555. @property
  556. def basis_value(self):
  557. """Gets the basis_value of this DeliveryContract. # noqa: E501
  558. Fair basis value # noqa: E501
  559. :return: The basis_value of this DeliveryContract. # noqa: E501
  560. :rtype: str
  561. """
  562. return self._basis_value
  563. @basis_value.setter
  564. def basis_value(self, basis_value):
  565. """Sets the basis_value of this DeliveryContract.
  566. Fair basis value # noqa: E501
  567. :param basis_value: The basis_value of this DeliveryContract. # noqa: E501
  568. :type: str
  569. """
  570. self._basis_value = basis_value
  571. @property
  572. def basis_impact_value(self):
  573. """Gets the basis_impact_value of this DeliveryContract. # noqa: E501
  574. Funding used for calculating impact bid, ask price # noqa: E501
  575. :return: The basis_impact_value of this DeliveryContract. # noqa: E501
  576. :rtype: str
  577. """
  578. return self._basis_impact_value
  579. @basis_impact_value.setter
  580. def basis_impact_value(self, basis_impact_value):
  581. """Sets the basis_impact_value of this DeliveryContract.
  582. Funding used for calculating impact bid, ask price # noqa: E501
  583. :param basis_impact_value: The basis_impact_value of this DeliveryContract. # noqa: E501
  584. :type: str
  585. """
  586. self._basis_impact_value = basis_impact_value
  587. @property
  588. def settle_price(self):
  589. """Gets the settle_price of this DeliveryContract. # noqa: E501
  590. Settle price # noqa: E501
  591. :return: The settle_price of this DeliveryContract. # noqa: E501
  592. :rtype: str
  593. """
  594. return self._settle_price
  595. @settle_price.setter
  596. def settle_price(self, settle_price):
  597. """Sets the settle_price of this DeliveryContract.
  598. Settle price # noqa: E501
  599. :param settle_price: The settle_price of this DeliveryContract. # noqa: E501
  600. :type: str
  601. """
  602. self._settle_price = settle_price
  603. @property
  604. def settle_price_interval(self):
  605. """Gets the settle_price_interval of this DeliveryContract. # noqa: E501
  606. Settle price update interval # noqa: E501
  607. :return: The settle_price_interval of this DeliveryContract. # noqa: E501
  608. :rtype: int
  609. """
  610. return self._settle_price_interval
  611. @settle_price_interval.setter
  612. def settle_price_interval(self, settle_price_interval):
  613. """Sets the settle_price_interval of this DeliveryContract.
  614. Settle price update interval # noqa: E501
  615. :param settle_price_interval: The settle_price_interval of this DeliveryContract. # noqa: E501
  616. :type: int
  617. """
  618. self._settle_price_interval = settle_price_interval
  619. @property
  620. def settle_price_duration(self):
  621. """Gets the settle_price_duration of this DeliveryContract. # noqa: E501
  622. Settle price update duration in seconds # noqa: E501
  623. :return: The settle_price_duration of this DeliveryContract. # noqa: E501
  624. :rtype: int
  625. """
  626. return self._settle_price_duration
  627. @settle_price_duration.setter
  628. def settle_price_duration(self, settle_price_duration):
  629. """Sets the settle_price_duration of this DeliveryContract.
  630. Settle price update duration in seconds # noqa: E501
  631. :param settle_price_duration: The settle_price_duration of this DeliveryContract. # noqa: E501
  632. :type: int
  633. """
  634. self._settle_price_duration = settle_price_duration
  635. @property
  636. def expire_time(self):
  637. """Gets the expire_time of this DeliveryContract. # noqa: E501
  638. Contract expiry timestamp # noqa: E501
  639. :return: The expire_time of this DeliveryContract. # noqa: E501
  640. :rtype: int
  641. """
  642. return self._expire_time
  643. @expire_time.setter
  644. def expire_time(self, expire_time):
  645. """Sets the expire_time of this DeliveryContract.
  646. Contract expiry timestamp # noqa: E501
  647. :param expire_time: The expire_time of this DeliveryContract. # noqa: E501
  648. :type: int
  649. """
  650. self._expire_time = expire_time
  651. @property
  652. def risk_limit_base(self):
  653. """Gets the risk_limit_base of this DeliveryContract. # noqa: E501
  654. Risk limit base # noqa: E501
  655. :return: The risk_limit_base of this DeliveryContract. # noqa: E501
  656. :rtype: str
  657. """
  658. return self._risk_limit_base
  659. @risk_limit_base.setter
  660. def risk_limit_base(self, risk_limit_base):
  661. """Sets the risk_limit_base of this DeliveryContract.
  662. Risk limit base # noqa: E501
  663. :param risk_limit_base: The risk_limit_base of this DeliveryContract. # noqa: E501
  664. :type: str
  665. """
  666. self._risk_limit_base = risk_limit_base
  667. @property
  668. def risk_limit_step(self):
  669. """Gets the risk_limit_step of this DeliveryContract. # noqa: E501
  670. Step of adjusting risk limit # noqa: E501
  671. :return: The risk_limit_step of this DeliveryContract. # noqa: E501
  672. :rtype: str
  673. """
  674. return self._risk_limit_step
  675. @risk_limit_step.setter
  676. def risk_limit_step(self, risk_limit_step):
  677. """Sets the risk_limit_step of this DeliveryContract.
  678. Step of adjusting risk limit # noqa: E501
  679. :param risk_limit_step: The risk_limit_step of this DeliveryContract. # noqa: E501
  680. :type: str
  681. """
  682. self._risk_limit_step = risk_limit_step
  683. @property
  684. def risk_limit_max(self):
  685. """Gets the risk_limit_max of this DeliveryContract. # noqa: E501
  686. Maximum risk limit the contract allowed # noqa: E501
  687. :return: The risk_limit_max of this DeliveryContract. # noqa: E501
  688. :rtype: str
  689. """
  690. return self._risk_limit_max
  691. @risk_limit_max.setter
  692. def risk_limit_max(self, risk_limit_max):
  693. """Sets the risk_limit_max of this DeliveryContract.
  694. Maximum risk limit the contract allowed # noqa: E501
  695. :param risk_limit_max: The risk_limit_max of this DeliveryContract. # noqa: E501
  696. :type: str
  697. """
  698. self._risk_limit_max = risk_limit_max
  699. @property
  700. def order_size_min(self):
  701. """Gets the order_size_min of this DeliveryContract. # noqa: E501
  702. Minimum order size the contract allowed # noqa: E501
  703. :return: The order_size_min of this DeliveryContract. # noqa: E501
  704. :rtype: int
  705. """
  706. return self._order_size_min
  707. @order_size_min.setter
  708. def order_size_min(self, order_size_min):
  709. """Sets the order_size_min of this DeliveryContract.
  710. Minimum order size the contract allowed # noqa: E501
  711. :param order_size_min: The order_size_min of this DeliveryContract. # noqa: E501
  712. :type: int
  713. """
  714. self._order_size_min = order_size_min
  715. @property
  716. def order_size_max(self):
  717. """Gets the order_size_max of this DeliveryContract. # noqa: E501
  718. Maximum order size the contract allowed # noqa: E501
  719. :return: The order_size_max of this DeliveryContract. # noqa: E501
  720. :rtype: int
  721. """
  722. return self._order_size_max
  723. @order_size_max.setter
  724. def order_size_max(self, order_size_max):
  725. """Sets the order_size_max of this DeliveryContract.
  726. Maximum order size the contract allowed # noqa: E501
  727. :param order_size_max: The order_size_max of this DeliveryContract. # noqa: E501
  728. :type: int
  729. """
  730. self._order_size_max = order_size_max
  731. @property
  732. def order_price_deviate(self):
  733. """Gets the order_price_deviate of this DeliveryContract. # noqa: E501
  734. deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501
  735. :return: The order_price_deviate of this DeliveryContract. # noqa: E501
  736. :rtype: str
  737. """
  738. return self._order_price_deviate
  739. @order_price_deviate.setter
  740. def order_price_deviate(self, order_price_deviate):
  741. """Sets the order_price_deviate of this DeliveryContract.
  742. deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501
  743. :param order_price_deviate: The order_price_deviate of this DeliveryContract. # noqa: E501
  744. :type: str
  745. """
  746. self._order_price_deviate = order_price_deviate
  747. @property
  748. def ref_discount_rate(self):
  749. """Gets the ref_discount_rate of this DeliveryContract. # noqa: E501
  750. Referral fee rate discount # noqa: E501
  751. :return: The ref_discount_rate of this DeliveryContract. # noqa: E501
  752. :rtype: str
  753. """
  754. return self._ref_discount_rate
  755. @ref_discount_rate.setter
  756. def ref_discount_rate(self, ref_discount_rate):
  757. """Sets the ref_discount_rate of this DeliveryContract.
  758. Referral fee rate discount # noqa: E501
  759. :param ref_discount_rate: The ref_discount_rate of this DeliveryContract. # noqa: E501
  760. :type: str
  761. """
  762. self._ref_discount_rate = ref_discount_rate
  763. @property
  764. def ref_rebate_rate(self):
  765. """Gets the ref_rebate_rate of this DeliveryContract. # noqa: E501
  766. Referrer commission rate # noqa: E501
  767. :return: The ref_rebate_rate of this DeliveryContract. # noqa: E501
  768. :rtype: str
  769. """
  770. return self._ref_rebate_rate
  771. @ref_rebate_rate.setter
  772. def ref_rebate_rate(self, ref_rebate_rate):
  773. """Sets the ref_rebate_rate of this DeliveryContract.
  774. Referrer commission rate # noqa: E501
  775. :param ref_rebate_rate: The ref_rebate_rate of this DeliveryContract. # noqa: E501
  776. :type: str
  777. """
  778. self._ref_rebate_rate = ref_rebate_rate
  779. @property
  780. def orderbook_id(self):
  781. """Gets the orderbook_id of this DeliveryContract. # noqa: E501
  782. Current orderbook ID # noqa: E501
  783. :return: The orderbook_id of this DeliveryContract. # noqa: E501
  784. :rtype: int
  785. """
  786. return self._orderbook_id
  787. @orderbook_id.setter
  788. def orderbook_id(self, orderbook_id):
  789. """Sets the orderbook_id of this DeliveryContract.
  790. Current orderbook ID # noqa: E501
  791. :param orderbook_id: The orderbook_id of this DeliveryContract. # noqa: E501
  792. :type: int
  793. """
  794. self._orderbook_id = orderbook_id
  795. @property
  796. def trade_id(self):
  797. """Gets the trade_id of this DeliveryContract. # noqa: E501
  798. Current trade ID # noqa: E501
  799. :return: The trade_id of this DeliveryContract. # noqa: E501
  800. :rtype: int
  801. """
  802. return self._trade_id
  803. @trade_id.setter
  804. def trade_id(self, trade_id):
  805. """Sets the trade_id of this DeliveryContract.
  806. Current trade ID # noqa: E501
  807. :param trade_id: The trade_id of this DeliveryContract. # noqa: E501
  808. :type: int
  809. """
  810. self._trade_id = trade_id
  811. @property
  812. def trade_size(self):
  813. """Gets the trade_size of this DeliveryContract. # noqa: E501
  814. Historical accumulated trade size # noqa: E501
  815. :return: The trade_size of this DeliveryContract. # noqa: E501
  816. :rtype: int
  817. """
  818. return self._trade_size
  819. @trade_size.setter
  820. def trade_size(self, trade_size):
  821. """Sets the trade_size of this DeliveryContract.
  822. Historical accumulated trade size # noqa: E501
  823. :param trade_size: The trade_size of this DeliveryContract. # noqa: E501
  824. :type: int
  825. """
  826. self._trade_size = trade_size
  827. @property
  828. def position_size(self):
  829. """Gets the position_size of this DeliveryContract. # noqa: E501
  830. Current total long position size # noqa: E501
  831. :return: The position_size of this DeliveryContract. # noqa: E501
  832. :rtype: int
  833. """
  834. return self._position_size
  835. @position_size.setter
  836. def position_size(self, position_size):
  837. """Sets the position_size of this DeliveryContract.
  838. Current total long position size # noqa: E501
  839. :param position_size: The position_size of this DeliveryContract. # noqa: E501
  840. :type: int
  841. """
  842. self._position_size = position_size
  843. @property
  844. def config_change_time(self):
  845. """Gets the config_change_time of this DeliveryContract. # noqa: E501
  846. Last changed time of configuration # noqa: E501
  847. :return: The config_change_time of this DeliveryContract. # noqa: E501
  848. :rtype: float
  849. """
  850. return self._config_change_time
  851. @config_change_time.setter
  852. def config_change_time(self, config_change_time):
  853. """Sets the config_change_time of this DeliveryContract.
  854. Last changed time of configuration # noqa: E501
  855. :param config_change_time: The config_change_time of this DeliveryContract. # noqa: E501
  856. :type: float
  857. """
  858. self._config_change_time = config_change_time
  859. @property
  860. def in_delisting(self):
  861. """Gets the in_delisting of this DeliveryContract. # noqa: E501
  862. Contract is delisting # noqa: E501
  863. :return: The in_delisting of this DeliveryContract. # noqa: E501
  864. :rtype: bool
  865. """
  866. return self._in_delisting
  867. @in_delisting.setter
  868. def in_delisting(self, in_delisting):
  869. """Sets the in_delisting of this DeliveryContract.
  870. Contract is delisting # noqa: E501
  871. :param in_delisting: The in_delisting of this DeliveryContract. # noqa: E501
  872. :type: bool
  873. """
  874. self._in_delisting = in_delisting
  875. @property
  876. def orders_limit(self):
  877. """Gets the orders_limit of this DeliveryContract. # noqa: E501
  878. Maximum number of open orders # noqa: E501
  879. :return: The orders_limit of this DeliveryContract. # noqa: E501
  880. :rtype: int
  881. """
  882. return self._orders_limit
  883. @orders_limit.setter
  884. def orders_limit(self, orders_limit):
  885. """Sets the orders_limit of this DeliveryContract.
  886. Maximum number of open orders # noqa: E501
  887. :param orders_limit: The orders_limit of this DeliveryContract. # noqa: E501
  888. :type: int
  889. """
  890. self._orders_limit = orders_limit
  891. def to_dict(self):
  892. """Returns the model properties as a dict"""
  893. result = {}
  894. for attr, _ in six.iteritems(self.openapi_types):
  895. value = getattr(self, attr)
  896. if isinstance(value, list):
  897. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  898. elif hasattr(value, "to_dict"):
  899. result[attr] = value.to_dict()
  900. elif isinstance(value, dict):
  901. result[attr] = dict(
  902. map(
  903. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  904. value.items(),
  905. )
  906. )
  907. else:
  908. result[attr] = value
  909. return result
  910. def to_str(self):
  911. """Returns the string representation of the model"""
  912. return pprint.pformat(self.to_dict())
  913. def __repr__(self):
  914. """For `print` and `pprint`"""
  915. return self.to_str()
  916. def __eq__(self, other):
  917. """Returns true if both objects are equal"""
  918. if not isinstance(other, DeliveryContract):
  919. return False
  920. return self.to_dict() == other.to_dict()
  921. def __ne__(self, other):
  922. """Returns true if both objects are not equal"""
  923. if not isinstance(other, DeliveryContract):
  924. return True
  925. return self.to_dict() != other.to_dict()