From ac04d5852a8d413676eb7576348cf5ee370b7a7d Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 2 Feb 2022 06:41:42 +0100 Subject: [PATCH] change to margin_mode also in documentation --- docs/configuration.md | 2 +- docs/leverage.md | 7 ++++--- freqtrade/constants.py | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 4cb09eb08..7ca910431 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -100,7 +100,7 @@ Mandatory parameters are marked as **Required**, which means that they are requi | `trailing_only_offset_is_reached` | Only apply trailing stoploss when the offset is reached. [stoploss documentation](stoploss.md). [Strategy Override](#parameters-in-the-strategy).
*Defaults to `false`.*
**Datatype:** Boolean | `fee` | Fee used during backtesting / dry-runs. Should normally not be configured, which has freqtrade fall back to the exchange default fee. Set as ratio (e.g. 0.001 = 0.1%). Fee is applied twice for each trade, once when buying, once when selling.
**Datatype:** Float (as ratio) | `trading_mode` | Specifies if you want to trade regularly, trade with leverage, or trade contracts whose prices are derived from matching cryptocurrency prices. [leverage documentation](leverage.md).
*Defaults to `"spot"`.*
**Datatype:** String -| `collateral` | When trading with leverage, this determines if the collateral owned by the trader will be shared or isolated to each trading pair [leverage documentation](leverage.md).
**Datatype:** String +| `margin_mode` | When trading with leverage, this determines if the collateral owned by the trader will be shared or isolated to each trading pair [leverage documentation](leverage.md).
**Datatype:** String | `unfilledtimeout.buy` | **Required.** How long (in minutes or seconds) the bot will wait for an unfilled buy order to complete, after which the order will be cancelled and repeated at current (new) price, as long as there is a signal. [Strategy Override](#parameters-in-the-strategy).
**Datatype:** Integer | `unfilledtimeout.sell` | **Required.** How long (in minutes or seconds) the bot will wait for an unfilled sell order to complete, after which the order will be cancelled and repeated at current (new) price, as long as there is a signal. [Strategy Override](#parameters-in-the-strategy).
**Datatype:** Integer | `unfilledtimeout.unit` | Unit to use in unfilledtimeout setting. Note: If you set unfilledtimeout.unit to "seconds", "internals.process_throttle_secs" must be inferior or equal to timeout [Strategy Override](#parameters-in-the-strategy).
*Defaults to `minutes`.*
**Datatype:** String diff --git a/docs/leverage.md b/docs/leverage.md index 7813c3836..e8810fbb2 100644 --- a/docs/leverage.md +++ b/docs/leverage.md @@ -48,7 +48,7 @@ In addition to the gains/losses from the change in price of the futures contract "trading_mode": "futures" ``` -### Collateral +### Margin mode The possible values are: `isolated`, or `cross`(*currently unavailable*) @@ -57,15 +57,16 @@ The possible values are: `isolated`, or `cross`(*currently unavailable*) Each market(trading pair), keeps collateral in a separate account ``` json -"collateral": "isolated" +"margin_mode": "isolated" ``` #### CROSS + *currently unavailable* One account is used to share collateral between markets (trading pairs). Margin is taken from total account balance to avoid liquidation when needed. ``` json -"collateral": "cross" +"margin_mode": "cross" ``` ### Developer diff --git a/freqtrade/constants.py b/freqtrade/constants.py index 7d3f9e2c1..fcf78c0e9 100644 --- a/freqtrade/constants.py +++ b/freqtrade/constants.py @@ -46,7 +46,7 @@ DEFAULT_DATAFRAME_COLUMNS = ['date', 'open', 'high', 'low', 'close', 'volume'] # it has wide consequences for stored trades files DEFAULT_TRADES_COLUMNS = ['timestamp', 'id', 'type', 'side', 'price', 'amount', 'cost'] TRADING_MODES = ['spot', 'margin', 'futures'] -COLLATERAL_TYPES = ['cross', 'isolated'] +MARGIN_MODES = ['cross', 'isolated'] LAST_BT_RESULT_FN = '.last_result.json' FTHYPT_FILEVERSION = 'fthypt_fileversion' @@ -155,7 +155,7 @@ CONF_SCHEMA = { 'ignore_roi_if_buy_signal': {'type': 'boolean'}, 'ignore_buying_expired_candle_after': {'type': 'number'}, 'trading_mode': {'type': 'string', 'enum': TRADING_MODES}, - 'margin_mode': {'type': 'string', 'enum': COLLATERAL_TYPES}, + 'margin_mode': {'type': 'string', 'enum': MARGIN_MODES}, 'backtest_breakdown': { 'type': 'array', 'items': {'type': 'string', 'enum': BACKTEST_BREAKDOWNS}