@ignore :param str type: Order type :param boolean exchangeSpecificParam: exchange specific postOnly :param dict [params]: exchange specific params :returns boolean: True if a post only order, False otherwise
(self, isMarketOrder: bool, exchangeSpecificParam, params={})
| 7186 | return self.handle_trigger_and_params(params) |
| 7187 | |
| 7188 | def is_post_only(self, isMarketOrder: bool, exchangeSpecificParam, params={}): |
| 7189 | """ |
| 7190 | @ignore |
| 7191 | :param str type: Order type |
| 7192 | :param boolean exchangeSpecificParam: exchange specific postOnly |
| 7193 | :param dict [params]: exchange specific params |
| 7194 | :returns boolean: True if a post only order, False otherwise |
| 7195 | """ |
| 7196 | timeInForce = self.safe_string_upper(params, 'timeInForce') |
| 7197 | postOnly = self.safe_bool_2(params, 'postOnly', 'post_only', False) |
| 7198 | # we assume timeInForce is uppercase from safeStringUpper(params, 'timeInForce') |
| 7199 | ioc = timeInForce == 'IOC' |
| 7200 | fok = timeInForce == 'FOK' |
| 7201 | timeInForcePostOnly = timeInForce == 'PO' |
| 7202 | postOnly = postOnly or timeInForcePostOnly or exchangeSpecificParam |
| 7203 | if postOnly: |
| 7204 | if ioc or fok: |
| 7205 | raise InvalidOrder(self.id + ' postOnly orders cannot have timeInForce equal to ' + timeInForce) |
| 7206 | elif isMarketOrder: |
| 7207 | raise InvalidOrder(self.id + ' market orders cannot be postOnly') |
| 7208 | else: |
| 7209 | return True |
| 7210 | else: |
| 7211 | return False |
| 7212 | |
| 7213 | def handle_post_only(self, isMarketOrder: bool, exchangeSpecificPostOnlyOption: bool, params: Any = {}): |
| 7214 | """ |
no test coverage detected