Prevent using market-orders on gateio

GateIo does not support market orders on spot markets
This commit is contained in:
Matthias
2021-10-03 14:14:16 +02:00
parent f5e5203388
commit 1c63d01cec
2 changed files with 36 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
import logging
from typing import Dict
from freqtrade.exceptions import OperationalException
from freqtrade.exchange import Exchange
@@ -23,3 +24,10 @@ class Gateio(Exchange):
}
_headers = {'X-Gate-Channel-Id': 'freqtrade'}
def validate_ordertypes(self, order_types: Dict) -> None:
super().validate_ordertypes(order_types)
if any(v == 'market' for k, v in order_types.items()):
raise OperationalException(
f'Exchange {self.name} does not support market orders.')