@ignore :param str type: Order type :param boolean exchangeSpecificBoolean: exchange specific postOnly :param dict [params]: exchange specific params :returns Array:
(self, isMarketOrder: bool, exchangeSpecificPostOnlyOption: bool, params: Any = {})
| 7211 | return False |
| 7212 | |
| 7213 | def handle_post_only(self, isMarketOrder: bool, exchangeSpecificPostOnlyOption: bool, params: Any = {}): |
| 7214 | """ |
| 7215 | @ignore |
| 7216 | :param str type: Order type |
| 7217 | :param boolean exchangeSpecificBoolean: exchange specific postOnly |
| 7218 | :param dict [params]: exchange specific params |
| 7219 | :returns Array: |
| 7220 | """ |
| 7221 | timeInForce = self.safe_string_upper(params, 'timeInForce') |
| 7222 | postOnly = self.safe_bool(params, 'postOnly', False) |
| 7223 | ioc = timeInForce == 'IOC' |
| 7224 | fok = timeInForce == 'FOK' |
| 7225 | po = timeInForce == 'PO' |
| 7226 | postOnly = postOnly or po or exchangeSpecificPostOnlyOption |
| 7227 | if postOnly: |
| 7228 | if ioc or fok: |
| 7229 | raise InvalidOrder(self.id + ' postOnly orders cannot have timeInForce equal to ' + timeInForce) |
| 7230 | elif isMarketOrder: |
| 7231 | raise InvalidOrder(self.id + ' market orders cannot be postOnly') |
| 7232 | else: |
| 7233 | if po: |
| 7234 | params = self.omit(params, 'timeInForce') |
| 7235 | params = self.omit(params, 'postOnly') |
| 7236 | return [True, params] |
| 7237 | return [False, params] |
| 7238 | |
| 7239 | def fetch_last_prices(self, symbols: Strings = None, params={}): |
| 7240 | raise NotSupported(self.id + ' fetchLastPrices() is not supported yet') |
no test coverage detected