From c61b986c3d7638640ed9b682db42a91f2c8ffe72 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 27 Aug 2022 10:30:38 +0200 Subject: [PATCH] FTX - support time_in_force (and PO ordertype) closes #7175 --- docs/configuration.md | 9 ++++++++- freqtrade/exchange/ftx.py | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index 851bbcd82..940d5e8b0 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -525,6 +525,13 @@ It means if the order is not executed immediately AND fully then it is cancelled It is the same as FOK (above) except it can be partially fulfilled. The remaining part is automatically cancelled by the exchange. +**PO (Post only):** + +Post only order. The order is either placed as a maker order, or it is canceled. +This means the order must be placed on orderbook for at at least time in an unfilled state. + +#### time_in_force config + The `order_time_in_force` parameter contains a dict with entry and exit time in force policy values. This can be set in the configuration file or in the strategy. Values set in the configuration file overwrites values set in the strategy. @@ -539,7 +546,7 @@ The possible values are: `GTC` (default), `FOK` or `IOC`. ``` !!! Warning - This is ongoing work. For now, it is supported only for binance and kucoin. + This is ongoing work. For now, it is supported only for binance, gate, ftx and kucoin. Please don't change the default value unless you know what you are doing and have researched the impact of using different values for your particular exchange. ### What values can be used for fiat_display_currency? diff --git a/freqtrade/exchange/ftx.py b/freqtrade/exchange/ftx.py index b3c219542..6a43ab302 100644 --- a/freqtrade/exchange/ftx.py +++ b/freqtrade/exchange/ftx.py @@ -19,6 +19,7 @@ logger = logging.getLogger(__name__) class Ftx(Exchange): _ft_has: Dict = { + "order_time_in_force": ['GTC', 'IOC', 'PO'], "stoploss_on_exchange": True, "ohlcv_candle_limit": 1500, "ohlcv_require_since": True,