{"record":{"id":"f3794d4bdd48839e","repo":"freqtrade/freqtrade","slug":"time-in-force-policies-are-not-supported-for-self","errorCode":null,"errorMessage":"Time in force policies are not supported for {self.name} yet.","messagePattern":"Time in force policies are not supported for (.+?) yet\\.","errorType":"exception","errorClass":"ConfigurationError","httpStatus":null,"severity":"error","filePath":"freqtrade/exchange/exchange.py","lineNumber":853,"sourceCode":"                )\n\n    def validate_pricing(self, pricing: dict) -> None:\n        if pricing.get(\"use_order_book\", False) and not self.exchange_has(\"fetchL2OrderBook\"):\n            raise ConfigurationError(f\"Orderbook not available for {self.name}.\")\n        if not pricing.get(\"use_order_book\", False) and (\n            not self.exchange_has(\"fetchTicker\") or not self._ft_has[\"tickers_have_price\"]\n        ):\n            raise ConfigurationError(f\"Ticker pricing not available for {self.name}.\")\n\n    def validate_order_time_in_force(self, order_time_in_force: dict) -> None:\n        \"\"\"\n        Checks if order time in force configured in strategy/config are supported\n        \"\"\"\n        if any(\n            v.upper() not in self._ft_has[\"order_time_in_force\"]\n            for k, v in order_time_in_force.items()\n        ):\n            raise ConfigurationError(\n                f\"Time in force policies are not supported for {self.name} yet.\"\n            )\n\n    def validate_orderflow(self, exchange: dict) -> None:\n        if exchange.get(\"use_public_trades\", False) and (\n            not self.exchange_has(\"fetchTrades\") or not self._ft_has[\"trades_has_history\"]\n        ):\n            raise ConfigurationError(\n                f\"Trade data not available for {self.name}. Can't use orderflow feature.\"\n            )\n\n    def validate_freqai(self, config: Config) -> None:\n        freqai_enabled = config.get(\"freqai\", {}).get(\"enabled\", False)\n        override = config.get(\"freqai\", {}).get(\"override_exchange_checks\", False)\n        if not override and freqai_enabled and not self._ft_has[\"ohlcv_has_history\"]:\n            raise ConfigurationError(\n                f\"Historic OHLCV data not available for {self.name}. Can't use freqAI.\"\n            )","sourceCodeStart":835,"sourceCodeEnd":871,"githubUrl":"https://github.com/freqtrade/freqtrade/blob/1c8edfe4d1e8d11bd4b40e8fc3237c26c3a60e15/freqtrade/exchange/exchange.py#L835-L871","documentation":"Raised in validate_order_time_in_force() when any configured time-in-force value (uppercased) is not in the exchange subclass's _ft_has['order_time_in_force'] list. That list defines which policies (GTC, IOC, FOK, etc.) the exchange accepts; an unknown policy cannot be mapped to the exchange's API values.","triggerScenarios":"Config \"order_time_in_force\": {\"entry\": \"PO\", \"exit\": \"PO\"} on an exchange whose ft_has only allows e.g. ['GTC','IOC','FOK']; using 'PO' (post-only) on exchanges without it; lowercase or malformed values are uppercased, but wrong policy names still fail.","commonSituations":"Copy-pasting binance-specific config (PO support) onto kraken/bybit variants; policy naming differences between exchanges; typos like 'GtC' work but 'GTC ' does not.","solutions":["Use only the time-in-force values the exchange subclass declares (commonly 'GTC'; futures exchanges often add 'IOC'/'FOK').","Remove custom order_time_in_force to accept the default ('GTC').","If post-only is desired, switch to an exchange/implementation that supports 'PO'."],"exampleFix":"# config.json - before\n\"order_time_in_force\": { \"entry\": \"PO\", \"exit\": \"PO\" }\n\n# after\n\"order_time_in_force\": { \"entry\": \"GTC\", \"exit\": \"GTC\" }","handlingStrategy":"validation","validationCode":"allowed = exchange._ft_has['order_time_in_force']\nbad = {k: v for k, v in config['order_time_in_force'].items() if v.upper() not in allowed}\nif bad:\n    raise SystemExit(f\"Unsupported time in force {bad}; allowed: {allowed}\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check _ft_has['order_time_in_force'] per exchange before customizing the policy.","Omit order_time_in_force entirely unless a strategy requires non-default behavior."],"tags":["exchange","time-in-force","configuration","startup"],"backgroundTag":null,"analyzedSha":"1c8edfe4d1e8d11bd4b40e8fc3237c26c3a60e15","analyzedAt":"2026-08-15T05:09:08.096Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}