{"record":{"id":"564b816e7fc37cb0","repo":"freqtrade/freqtrade","slug":"can-t-go-short-on-spot-markets","errorCode":null,"errorMessage":"Can't go short on Spot markets.","messagePattern":"Can't go short on Spot markets\\.","errorType":"exception","errorClass":"RPCException","httpStatus":null,"severity":"error","filePath":"freqtrade/rpc/rpc.py","lineNumber":1142,"sourceCode":"                logger.warning(\"force_exit: Invalid argument received\")\n                raise RPCException(\"invalid argument\")\n\n            result = self.__exec_force_exit(trade, ordertype, amount, price)\n            Trade.commit()\n            self._freqtrade.wallets.update()\n            if not result:\n                raise RPCException(\"Failed to exit trade.\")\n            return {\"result\": f\"Created exit order for trade {trade_id}.\"}\n\n    def _force_entry_validations(self, pair: str, order_side: SignalDirection):\n        if not self._freqtrade.config.get(\"force_entry_enable\", False):\n            raise RPCException(\"Force_entry not enabled.\")\n\n        if self._freqtrade.state != State.RUNNING:\n            raise RPCException(\"trader is not running\")\n\n        if order_side == SignalDirection.SHORT and self._freqtrade.trading_mode == TradingMode.SPOT:\n            raise RPCException(\"Can't go short on Spot markets.\")\n\n        if pair not in self._freqtrade.exchange.get_markets(tradable_only=True):\n            raise RPCException(\"Symbol does not exist or market is not active.\")\n        # Check if pair quote currency equals to the stake currency.\n        stake_currency = self._freqtrade.config.get(\"stake_currency\")\n        if not self._freqtrade.exchange.get_pair_quote_currency(pair) == stake_currency:\n            raise RPCException(\n                f\"Wrong pair selected. Only pairs with stake-currency {stake_currency} allowed.\"\n            )\n\n    def _rpc_force_entry(\n        self,\n        pair: str,\n        price: float | None,\n        *,\n        order_type: str | None = None,\n        order_side: SignalDirection = SignalDirection.LONG,\n        stake_amount: float | None = None,","sourceCodeStart":1124,"sourceCodeEnd":1160,"githubUrl":"https://github.com/freqtrade/freqtrade/blob/1c8edfe4d1e8d11bd4b40e8fc3237c26c3a60e15/freqtrade/rpc/rpc.py#L1124-L1160","documentation":"Error \"Can't go short on Spot markets.\" thrown in freqtrade/freqtrade.","triggerScenarios":"Thrown at freqtrade/rpc/rpc.py:1142 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Short positions require futures trading; set 'trading_mode': 'futures' with a supported exchange and margin mode.","On spot markets, only open long positions."],"exampleFix":"Block shorts on spot before entry:\nif side == 'short' and self._freqtrade.trading_mode == TradingMode.SPOT:\n    raise RPCException(\"Can't go short on Spot markets.\")","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1c8edfe4d1e8d11bd4b40e8fc3237c26c3a60e15","analyzedAt":"2026-08-15T05:09:08.096Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}