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

996 lines
31 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 Order(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. 'id': 'str',
  26. 'text': 'str',
  27. 'create_time': 'str',
  28. 'update_time': 'str',
  29. 'create_time_ms': 'int',
  30. 'update_time_ms': 'int',
  31. 'status': 'str',
  32. 'currency_pair': 'str',
  33. 'type': 'str',
  34. 'account': 'str',
  35. 'side': 'str',
  36. 'amount': 'str',
  37. 'price': 'str',
  38. 'time_in_force': 'str',
  39. 'iceberg': 'str',
  40. 'auto_borrow': 'bool',
  41. 'auto_repay': 'bool',
  42. 'left': 'str',
  43. 'fill_price': 'str',
  44. 'filled_total': 'str',
  45. 'avg_deal_price': 'str',
  46. 'fee': 'str',
  47. 'fee_currency': 'str',
  48. 'point_fee': 'str',
  49. 'gt_fee': 'str',
  50. 'gt_maker_fee': 'str',
  51. 'gt_taker_fee': 'str',
  52. 'gt_discount': 'bool',
  53. 'rebated_fee': 'str',
  54. 'rebated_fee_currency': 'str',
  55. }
  56. attribute_map = {
  57. 'id': 'id',
  58. 'text': 'text',
  59. 'create_time': 'create_time',
  60. 'update_time': 'update_time',
  61. 'create_time_ms': 'create_time_ms',
  62. 'update_time_ms': 'update_time_ms',
  63. 'status': 'status',
  64. 'currency_pair': 'currency_pair',
  65. 'type': 'type',
  66. 'account': 'account',
  67. 'side': 'side',
  68. 'amount': 'amount',
  69. 'price': 'price',
  70. 'time_in_force': 'time_in_force',
  71. 'iceberg': 'iceberg',
  72. 'auto_borrow': 'auto_borrow',
  73. 'auto_repay': 'auto_repay',
  74. 'left': 'left',
  75. 'fill_price': 'fill_price',
  76. 'filled_total': 'filled_total',
  77. 'avg_deal_price': 'avg_deal_price',
  78. 'fee': 'fee',
  79. 'fee_currency': 'fee_currency',
  80. 'point_fee': 'point_fee',
  81. 'gt_fee': 'gt_fee',
  82. 'gt_maker_fee': 'gt_maker_fee',
  83. 'gt_taker_fee': 'gt_taker_fee',
  84. 'gt_discount': 'gt_discount',
  85. 'rebated_fee': 'rebated_fee',
  86. 'rebated_fee_currency': 'rebated_fee_currency',
  87. }
  88. def __init__(
  89. self,
  90. id=None,
  91. text=None,
  92. create_time=None,
  93. update_time=None,
  94. create_time_ms=None,
  95. update_time_ms=None,
  96. status=None,
  97. currency_pair=None,
  98. type='limit',
  99. account='spot',
  100. side=None,
  101. amount=None,
  102. price=None,
  103. time_in_force='gtc',
  104. iceberg=None,
  105. auto_borrow=None,
  106. auto_repay=None,
  107. left=None,
  108. fill_price=None,
  109. filled_total=None,
  110. avg_deal_price=None,
  111. fee=None,
  112. fee_currency=None,
  113. point_fee=None,
  114. gt_fee=None,
  115. gt_maker_fee=None,
  116. gt_taker_fee=None,
  117. gt_discount=None,
  118. rebated_fee=None,
  119. rebated_fee_currency=None,
  120. local_vars_configuration=None,
  121. ): # noqa: E501
  122. # type: (str, str, str, str, int, int, str, str, str, str, str, str, str, str, str, bool, bool, str, str, str, str, str, str, str, str, str, str, bool, str, str, Configuration) -> None
  123. """Order - a model defined in OpenAPI""" # noqa: E501
  124. if local_vars_configuration is None:
  125. local_vars_configuration = Configuration()
  126. self.local_vars_configuration = local_vars_configuration
  127. self._id = None
  128. self._text = None
  129. self._create_time = None
  130. self._update_time = None
  131. self._create_time_ms = None
  132. self._update_time_ms = None
  133. self._status = None
  134. self._currency_pair = None
  135. self._type = None
  136. self._account = None
  137. self._side = None
  138. self._amount = None
  139. self._price = None
  140. self._time_in_force = None
  141. self._iceberg = None
  142. self._auto_borrow = None
  143. self._auto_repay = None
  144. self._left = None
  145. self._fill_price = None
  146. self._filled_total = None
  147. self._avg_deal_price = None
  148. self._fee = None
  149. self._fee_currency = None
  150. self._point_fee = None
  151. self._gt_fee = None
  152. self._gt_maker_fee = None
  153. self._gt_taker_fee = None
  154. self._gt_discount = None
  155. self._rebated_fee = None
  156. self._rebated_fee_currency = None
  157. self.discriminator = None
  158. if id is not None:
  159. self.id = id
  160. if text is not None:
  161. self.text = text
  162. if create_time is not None:
  163. self.create_time = create_time
  164. if update_time is not None:
  165. self.update_time = update_time
  166. if create_time_ms is not None:
  167. self.create_time_ms = create_time_ms
  168. if update_time_ms is not None:
  169. self.update_time_ms = update_time_ms
  170. if status is not None:
  171. self.status = status
  172. self.currency_pair = currency_pair
  173. if type is not None:
  174. self.type = type
  175. if account is not None:
  176. self.account = account
  177. self.side = side
  178. self.amount = amount
  179. if price is not None:
  180. self.price = price
  181. if time_in_force is not None:
  182. self.time_in_force = time_in_force
  183. if iceberg is not None:
  184. self.iceberg = iceberg
  185. if auto_borrow is not None:
  186. self.auto_borrow = auto_borrow
  187. if auto_repay is not None:
  188. self.auto_repay = auto_repay
  189. if left is not None:
  190. self.left = left
  191. if fill_price is not None:
  192. self.fill_price = fill_price
  193. if filled_total is not None:
  194. self.filled_total = filled_total
  195. if avg_deal_price is not None:
  196. self.avg_deal_price = avg_deal_price
  197. if fee is not None:
  198. self.fee = fee
  199. if fee_currency is not None:
  200. self.fee_currency = fee_currency
  201. if point_fee is not None:
  202. self.point_fee = point_fee
  203. if gt_fee is not None:
  204. self.gt_fee = gt_fee
  205. if gt_maker_fee is not None:
  206. self.gt_maker_fee = gt_maker_fee
  207. if gt_taker_fee is not None:
  208. self.gt_taker_fee = gt_taker_fee
  209. if gt_discount is not None:
  210. self.gt_discount = gt_discount
  211. if rebated_fee is not None:
  212. self.rebated_fee = rebated_fee
  213. if rebated_fee_currency is not None:
  214. self.rebated_fee_currency = rebated_fee_currency
  215. @property
  216. def id(self):
  217. """Gets the id of this Order. # noqa: E501
  218. Order ID # noqa: E501
  219. :return: The id of this Order. # noqa: E501
  220. :rtype: str
  221. """
  222. return self._id
  223. @id.setter
  224. def id(self, id):
  225. """Sets the id of this Order.
  226. Order ID # noqa: E501
  227. :param id: The id of this Order. # noqa: E501
  228. :type: str
  229. """
  230. self._id = id
  231. @property
  232. def text(self):
  233. """Gets the text of this Order. # noqa: E501
  234. User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 # noqa: E501
  235. :return: The text of this Order. # noqa: E501
  236. :rtype: str
  237. """
  238. return self._text
  239. @text.setter
  240. def text(self, text):
  241. """Sets the text of this Order.
  242. User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 # noqa: E501
  243. :param text: The text of this Order. # noqa: E501
  244. :type: str
  245. """
  246. self._text = text
  247. @property
  248. def create_time(self):
  249. """Gets the create_time of this Order. # noqa: E501
  250. Creation time of order # noqa: E501
  251. :return: The create_time of this Order. # noqa: E501
  252. :rtype: str
  253. """
  254. return self._create_time
  255. @create_time.setter
  256. def create_time(self, create_time):
  257. """Sets the create_time of this Order.
  258. Creation time of order # noqa: E501
  259. :param create_time: The create_time of this Order. # noqa: E501
  260. :type: str
  261. """
  262. self._create_time = create_time
  263. @property
  264. def update_time(self):
  265. """Gets the update_time of this Order. # noqa: E501
  266. Last modification time of order # noqa: E501
  267. :return: The update_time of this Order. # noqa: E501
  268. :rtype: str
  269. """
  270. return self._update_time
  271. @update_time.setter
  272. def update_time(self, update_time):
  273. """Sets the update_time of this Order.
  274. Last modification time of order # noqa: E501
  275. :param update_time: The update_time of this Order. # noqa: E501
  276. :type: str
  277. """
  278. self._update_time = update_time
  279. @property
  280. def create_time_ms(self):
  281. """Gets the create_time_ms of this Order. # noqa: E501
  282. Creation time of order (in milliseconds) # noqa: E501
  283. :return: The create_time_ms of this Order. # noqa: E501
  284. :rtype: int
  285. """
  286. return self._create_time_ms
  287. @create_time_ms.setter
  288. def create_time_ms(self, create_time_ms):
  289. """Sets the create_time_ms of this Order.
  290. Creation time of order (in milliseconds) # noqa: E501
  291. :param create_time_ms: The create_time_ms of this Order. # noqa: E501
  292. :type: int
  293. """
  294. self._create_time_ms = create_time_ms
  295. @property
  296. def update_time_ms(self):
  297. """Gets the update_time_ms of this Order. # noqa: E501
  298. Last modification time of order (in milliseconds) # noqa: E501
  299. :return: The update_time_ms of this Order. # noqa: E501
  300. :rtype: int
  301. """
  302. return self._update_time_ms
  303. @update_time_ms.setter
  304. def update_time_ms(self, update_time_ms):
  305. """Sets the update_time_ms of this Order.
  306. Last modification time of order (in milliseconds) # noqa: E501
  307. :param update_time_ms: The update_time_ms of this Order. # noqa: E501
  308. :type: int
  309. """
  310. self._update_time_ms = update_time_ms
  311. @property
  312. def status(self):
  313. """Gets the status of this Order. # noqa: E501
  314. Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled # noqa: E501
  315. :return: The status of this Order. # noqa: E501
  316. :rtype: str
  317. """
  318. return self._status
  319. @status.setter
  320. def status(self, status):
  321. """Sets the status of this Order.
  322. Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled # noqa: E501
  323. :param status: The status of this Order. # noqa: E501
  324. :type: str
  325. """
  326. allowed_values = ["open", "closed", "cancelled"] # noqa: E501
  327. if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
  328. raise ValueError(
  329. "Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values) # noqa: E501
  330. )
  331. self._status = status
  332. @property
  333. def currency_pair(self):
  334. """Gets the currency_pair of this Order. # noqa: E501
  335. Currency pair # noqa: E501
  336. :return: The currency_pair of this Order. # noqa: E501
  337. :rtype: str
  338. """
  339. return self._currency_pair
  340. @currency_pair.setter
  341. def currency_pair(self, currency_pair):
  342. """Sets the currency_pair of this Order.
  343. Currency pair # noqa: E501
  344. :param currency_pair: The currency_pair of this Order. # noqa: E501
  345. :type: str
  346. """
  347. if self.local_vars_configuration.client_side_validation and currency_pair is None: # noqa: E501
  348. raise ValueError("Invalid value for `currency_pair`, must not be `None`") # noqa: E501
  349. self._currency_pair = currency_pair
  350. @property
  351. def type(self):
  352. """Gets the type of this Order. # noqa: E501
  353. Order Type - limit : Limit Order - market : Market Order # noqa: E501
  354. :return: The type of this Order. # noqa: E501
  355. :rtype: str
  356. """
  357. return self._type
  358. @type.setter
  359. def type(self, type):
  360. """Sets the type of this Order.
  361. Order Type - limit : Limit Order - market : Market Order # noqa: E501
  362. :param type: The type of this Order. # noqa: E501
  363. :type: str
  364. """
  365. allowed_values = ["limit", "market"] # noqa: E501
  366. if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501
  367. raise ValueError(
  368. "Invalid value for `type` ({0}), must be one of {1}".format(type, allowed_values) # noqa: E501
  369. )
  370. self._type = type
  371. @property
  372. def account(self):
  373. """Gets the account of this Order. # noqa: E501
  374. Account type. spot - use spot account; margin - use margin account; cross_margin - use cross margin account. Portfolio margin account must set to `cross-margin` # noqa: E501
  375. :return: The account of this Order. # noqa: E501
  376. :rtype: str
  377. """
  378. return self._account
  379. @account.setter
  380. def account(self, account):
  381. """Sets the account of this Order.
  382. Account type. spot - use spot account; margin - use margin account; cross_margin - use cross margin account. Portfolio margin account must set to `cross-margin` # noqa: E501
  383. :param account: The account of this Order. # noqa: E501
  384. :type: str
  385. """
  386. allowed_values = ["spot", "margin", "cross_margin"] # noqa: E501
  387. if self.local_vars_configuration.client_side_validation and account not in allowed_values: # noqa: E501
  388. raise ValueError(
  389. "Invalid value for `account` ({0}), must be one of {1}".format(account, allowed_values) # noqa: E501
  390. )
  391. self._account = account
  392. @property
  393. def side(self):
  394. """Gets the side of this Order. # noqa: E501
  395. Order side # noqa: E501
  396. :return: The side of this Order. # noqa: E501
  397. :rtype: str
  398. """
  399. return self._side
  400. @side.setter
  401. def side(self, side):
  402. """Sets the side of this Order.
  403. Order side # noqa: E501
  404. :param side: The side of this Order. # noqa: E501
  405. :type: str
  406. """
  407. if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501
  408. raise ValueError("Invalid value for `side`, must not be `None`") # noqa: E501
  409. allowed_values = ["buy", "sell"] # noqa: E501
  410. if self.local_vars_configuration.client_side_validation and side not in allowed_values: # noqa: E501
  411. raise ValueError(
  412. "Invalid value for `side` ({0}), must be one of {1}".format(side, allowed_values) # noqa: E501
  413. )
  414. self._side = side
  415. @property
  416. def amount(self):
  417. """Gets the amount of this Order. # noqa: E501
  418. When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency`BTC_USDT` means `BTC` # noqa: E501
  419. :return: The amount of this Order. # noqa: E501
  420. :rtype: str
  421. """
  422. return self._amount
  423. @amount.setter
  424. def amount(self, amount):
  425. """Sets the amount of this Order.
  426. When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency`BTC_USDT` means `BTC` # noqa: E501
  427. :param amount: The amount of this Order. # noqa: E501
  428. :type: str
  429. """
  430. if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501
  431. raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501
  432. self._amount = amount
  433. @property
  434. def price(self):
  435. """Gets the price of this Order. # noqa: E501
  436. Price can't be empty when `type`= `limit` # noqa: E501
  437. :return: The price of this Order. # noqa: E501
  438. :rtype: str
  439. """
  440. return self._price
  441. @price.setter
  442. def price(self, price):
  443. """Sets the price of this Order.
  444. Price can't be empty when `type`= `limit` # noqa: E501
  445. :param price: The price of this Order. # noqa: E501
  446. :type: str
  447. """
  448. self._price = price
  449. @property
  450. def time_in_force(self):
  451. """Gets the time_in_force of this Order. # noqa: E501
  452. Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` # noqa: E501
  453. :return: The time_in_force of this Order. # noqa: E501
  454. :rtype: str
  455. """
  456. return self._time_in_force
  457. @time_in_force.setter
  458. def time_in_force(self, time_in_force):
  459. """Sets the time_in_force of this Order.
  460. Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` # noqa: E501
  461. :param time_in_force: The time_in_force of this Order. # noqa: E501
  462. :type: str
  463. """
  464. allowed_values = ["gtc", "ioc", "poc", "fok"] # noqa: E501
  465. if self.local_vars_configuration.client_side_validation and time_in_force not in allowed_values: # noqa: E501
  466. raise ValueError(
  467. "Invalid value for `time_in_force` ({0}), must be one of {1}".format( # noqa: E501
  468. time_in_force, allowed_values
  469. )
  470. )
  471. self._time_in_force = time_in_force
  472. @property
  473. def iceberg(self):
  474. """Gets the iceberg of this Order. # noqa: E501
  475. Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501
  476. :return: The iceberg of this Order. # noqa: E501
  477. :rtype: str
  478. """
  479. return self._iceberg
  480. @iceberg.setter
  481. def iceberg(self, iceberg):
  482. """Sets the iceberg of this Order.
  483. Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501
  484. :param iceberg: The iceberg of this Order. # noqa: E501
  485. :type: str
  486. """
  487. self._iceberg = iceberg
  488. @property
  489. def auto_borrow(self):
  490. """Gets the auto_borrow of this Order. # noqa: E501
  491. Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501
  492. :return: The auto_borrow of this Order. # noqa: E501
  493. :rtype: bool
  494. """
  495. return self._auto_borrow
  496. @auto_borrow.setter
  497. def auto_borrow(self, auto_borrow):
  498. """Sets the auto_borrow of this Order.
  499. Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501
  500. :param auto_borrow: The auto_borrow of this Order. # noqa: E501
  501. :type: bool
  502. """
  503. self._auto_borrow = auto_borrow
  504. @property
  505. def auto_repay(self):
  506. """Gets the auto_repay of this Order. # noqa: E501
  507. Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` cannot be both set to true in one order. # noqa: E501
  508. :return: The auto_repay of this Order. # noqa: E501
  509. :rtype: bool
  510. """
  511. return self._auto_repay
  512. @auto_repay.setter
  513. def auto_repay(self, auto_repay):
  514. """Sets the auto_repay of this Order.
  515. Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` cannot be both set to true in one order. # noqa: E501
  516. :param auto_repay: The auto_repay of this Order. # noqa: E501
  517. :type: bool
  518. """
  519. self._auto_repay = auto_repay
  520. @property
  521. def left(self):
  522. """Gets the left of this Order. # noqa: E501
  523. Amount left to fill # noqa: E501
  524. :return: The left of this Order. # noqa: E501
  525. :rtype: str
  526. """
  527. return self._left
  528. @left.setter
  529. def left(self, left):
  530. """Sets the left of this Order.
  531. Amount left to fill # noqa: E501
  532. :param left: The left of this Order. # noqa: E501
  533. :type: str
  534. """
  535. self._left = left
  536. @property
  537. def fill_price(self):
  538. """Gets the fill_price of this Order. # noqa: E501
  539. Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501
  540. :return: The fill_price of this Order. # noqa: E501
  541. :rtype: str
  542. """
  543. return self._fill_price
  544. @fill_price.setter
  545. def fill_price(self, fill_price):
  546. """Sets the fill_price of this Order.
  547. Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501
  548. :param fill_price: The fill_price of this Order. # noqa: E501
  549. :type: str
  550. """
  551. self._fill_price = fill_price
  552. @property
  553. def filled_total(self):
  554. """Gets the filled_total of this Order. # noqa: E501
  555. Total filled in quote currency # noqa: E501
  556. :return: The filled_total of this Order. # noqa: E501
  557. :rtype: str
  558. """
  559. return self._filled_total
  560. @filled_total.setter
  561. def filled_total(self, filled_total):
  562. """Sets the filled_total of this Order.
  563. Total filled in quote currency # noqa: E501
  564. :param filled_total: The filled_total of this Order. # noqa: E501
  565. :type: str
  566. """
  567. self._filled_total = filled_total
  568. @property
  569. def avg_deal_price(self):
  570. """Gets the avg_deal_price of this Order. # noqa: E501
  571. Average fill price # noqa: E501
  572. :return: The avg_deal_price of this Order. # noqa: E501
  573. :rtype: str
  574. """
  575. return self._avg_deal_price
  576. @avg_deal_price.setter
  577. def avg_deal_price(self, avg_deal_price):
  578. """Sets the avg_deal_price of this Order.
  579. Average fill price # noqa: E501
  580. :param avg_deal_price: The avg_deal_price of this Order. # noqa: E501
  581. :type: str
  582. """
  583. self._avg_deal_price = avg_deal_price
  584. @property
  585. def fee(self):
  586. """Gets the fee of this Order. # noqa: E501
  587. Fee deducted # noqa: E501
  588. :return: The fee of this Order. # noqa: E501
  589. :rtype: str
  590. """
  591. return self._fee
  592. @fee.setter
  593. def fee(self, fee):
  594. """Sets the fee of this Order.
  595. Fee deducted # noqa: E501
  596. :param fee: The fee of this Order. # noqa: E501
  597. :type: str
  598. """
  599. self._fee = fee
  600. @property
  601. def fee_currency(self):
  602. """Gets the fee_currency of this Order. # noqa: E501
  603. Fee currency unit # noqa: E501
  604. :return: The fee_currency of this Order. # noqa: E501
  605. :rtype: str
  606. """
  607. return self._fee_currency
  608. @fee_currency.setter
  609. def fee_currency(self, fee_currency):
  610. """Sets the fee_currency of this Order.
  611. Fee currency unit # noqa: E501
  612. :param fee_currency: The fee_currency of this Order. # noqa: E501
  613. :type: str
  614. """
  615. self._fee_currency = fee_currency
  616. @property
  617. def point_fee(self):
  618. """Gets the point_fee of this Order. # noqa: E501
  619. Points used to deduct fee # noqa: E501
  620. :return: The point_fee of this Order. # noqa: E501
  621. :rtype: str
  622. """
  623. return self._point_fee
  624. @point_fee.setter
  625. def point_fee(self, point_fee):
  626. """Sets the point_fee of this Order.
  627. Points used to deduct fee # noqa: E501
  628. :param point_fee: The point_fee of this Order. # noqa: E501
  629. :type: str
  630. """
  631. self._point_fee = point_fee
  632. @property
  633. def gt_fee(self):
  634. """Gets the gt_fee of this Order. # noqa: E501
  635. GT used to deduct fee # noqa: E501
  636. :return: The gt_fee of this Order. # noqa: E501
  637. :rtype: str
  638. """
  639. return self._gt_fee
  640. @gt_fee.setter
  641. def gt_fee(self, gt_fee):
  642. """Sets the gt_fee of this Order.
  643. GT used to deduct fee # noqa: E501
  644. :param gt_fee: The gt_fee of this Order. # noqa: E501
  645. :type: str
  646. """
  647. self._gt_fee = gt_fee
  648. @property
  649. def gt_maker_fee(self):
  650. """Gets the gt_maker_fee of this Order. # noqa: E501
  651. GT used to deduct maker fee # noqa: E501
  652. :return: The gt_maker_fee of this Order. # noqa: E501
  653. :rtype: str
  654. """
  655. return self._gt_maker_fee
  656. @gt_maker_fee.setter
  657. def gt_maker_fee(self, gt_maker_fee):
  658. """Sets the gt_maker_fee of this Order.
  659. GT used to deduct maker fee # noqa: E501
  660. :param gt_maker_fee: The gt_maker_fee of this Order. # noqa: E501
  661. :type: str
  662. """
  663. self._gt_maker_fee = gt_maker_fee
  664. @property
  665. def gt_taker_fee(self):
  666. """Gets the gt_taker_fee of this Order. # noqa: E501
  667. GT used to deduct taker fee # noqa: E501
  668. :return: The gt_taker_fee of this Order. # noqa: E501
  669. :rtype: str
  670. """
  671. return self._gt_taker_fee
  672. @gt_taker_fee.setter
  673. def gt_taker_fee(self, gt_taker_fee):
  674. """Sets the gt_taker_fee of this Order.
  675. GT used to deduct taker fee # noqa: E501
  676. :param gt_taker_fee: The gt_taker_fee of this Order. # noqa: E501
  677. :type: str
  678. """
  679. self._gt_taker_fee = gt_taker_fee
  680. @property
  681. def gt_discount(self):
  682. """Gets the gt_discount of this Order. # noqa: E501
  683. Whether GT fee discount is used # noqa: E501
  684. :return: The gt_discount of this Order. # noqa: E501
  685. :rtype: bool
  686. """
  687. return self._gt_discount
  688. @gt_discount.setter
  689. def gt_discount(self, gt_discount):
  690. """Sets the gt_discount of this Order.
  691. Whether GT fee discount is used # noqa: E501
  692. :param gt_discount: The gt_discount of this Order. # noqa: E501
  693. :type: bool
  694. """
  695. self._gt_discount = gt_discount
  696. @property
  697. def rebated_fee(self):
  698. """Gets the rebated_fee of this Order. # noqa: E501
  699. Rebated fee # noqa: E501
  700. :return: The rebated_fee of this Order. # noqa: E501
  701. :rtype: str
  702. """
  703. return self._rebated_fee
  704. @rebated_fee.setter
  705. def rebated_fee(self, rebated_fee):
  706. """Sets the rebated_fee of this Order.
  707. Rebated fee # noqa: E501
  708. :param rebated_fee: The rebated_fee of this Order. # noqa: E501
  709. :type: str
  710. """
  711. self._rebated_fee = rebated_fee
  712. @property
  713. def rebated_fee_currency(self):
  714. """Gets the rebated_fee_currency of this Order. # noqa: E501
  715. Rebated fee currency unit # noqa: E501
  716. :return: The rebated_fee_currency of this Order. # noqa: E501
  717. :rtype: str
  718. """
  719. return self._rebated_fee_currency
  720. @rebated_fee_currency.setter
  721. def rebated_fee_currency(self, rebated_fee_currency):
  722. """Sets the rebated_fee_currency of this Order.
  723. Rebated fee currency unit # noqa: E501
  724. :param rebated_fee_currency: The rebated_fee_currency of this Order. # noqa: E501
  725. :type: str
  726. """
  727. self._rebated_fee_currency = rebated_fee_currency
  728. def to_dict(self):
  729. """Returns the model properties as a dict"""
  730. result = {}
  731. for attr, _ in six.iteritems(self.openapi_types):
  732. value = getattr(self, attr)
  733. if isinstance(value, list):
  734. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  735. elif hasattr(value, "to_dict"):
  736. result[attr] = value.to_dict()
  737. elif isinstance(value, dict):
  738. result[attr] = dict(
  739. map(
  740. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  741. value.items(),
  742. )
  743. )
  744. else:
  745. result[attr] = value
  746. return result
  747. def to_str(self):
  748. """Returns the string representation of the model"""
  749. return pprint.pformat(self.to_dict())
  750. def __repr__(self):
  751. """For `print` and `pprint`"""
  752. return self.to_str()
  753. def __eq__(self, other):
  754. """Returns true if both objects are equal"""
  755. if not isinstance(other, Order):
  756. return False
  757. return self.to_dict() == other.to_dict()
  758. def __ne__(self, other):
  759. """Returns true if both objects are not equal"""
  760. if not isinstance(other, Order):
  761. return True
  762. return self.to_dict() != other.to_dict()