Commit Graph

2783 Commits

Author SHA1 Message Date
Sam Germain
c0a593280e test_exchange.test_cancel_order_dry_run pass leverage to create_order 2022-02-04 04:54:16 -06:00
Sam Germain
dc6cb445fd Merge branch 'feat/short' into max-amount 2022-02-04 04:42:38 -06:00
Matthias
6afad6c99f Small change to todo comment 2022-02-04 07:20:27 +01:00
Sam Germain
3ee2b7978c wallets.validate_stake_amount added param max_stake_available 2022-02-03 20:33:16 -06:00
Sam Germain
30c476e3c1 freqtradebot.get_valid_enter_price_and_stake gets min of stake_amount and max_stake_amount before calling wallets.validate_stake_amount 2022-02-03 20:33:16 -06:00
Sam Germain
a50f4d2c57 Exchange.createOrder added * as second param 2022-02-03 20:33:16 -06:00
Sam Germain
16c2d54482 updated margin_modes 2022-02-03 20:33:16 -06:00
Sam Germain
7465037906 freqtradebot.execute_entry test for too high stake amount 2022-02-03 20:33:16 -06:00
Sam Germain
c5cfd971f5 get_max_pair_stake_amount_tests 2022-02-03 20:33:16 -06:00
Sam Germain
6b6b35ac1c check for max stake limit in freqtradebot and backtesting 2022-02-03 20:33:04 -06:00
Sam Germain
55d91f018f exchange._get_stake_amount_limit (merged min_pair_stake_amount and get_max_tradeable amount) 2022-02-03 20:33:04 -06:00
Sam Germain
ff5fffefb4 exchange.get_max_amount_tradable looks at cost also 2022-02-03 20:33:03 -06:00
Sam Germain
64ad810445 Revert "moved get_max_leverage to get_min_pair_stake_amount"
This reverts commit 90e48d5b98bcfb1452aa818a3274745eac395712.
2022-02-03 20:33:03 -06:00
Sam Germain
73319a74d3 moved get_max_leverage to get_min_pair_stake_amount 2022-02-03 20:33:03 -06:00
Sam Germain
f3b42b0ef3 wrote exchange.get_max_amount_tradable 2022-02-03 20:33:03 -06:00
Sam Germain
99b8a8ca79 Revert "plot.generate_candlestick_graph Added short equivelent, separating plotting scatter creation to a function"
This reverts commit 0abba7f9b7299ba3c45df6a2ba6e35ad6a19c5a0.
2022-02-03 17:48:34 -06:00
Sam Germain
1f74cfe841 plot.generate_candlestick_graph Added short equivelent, separating plotting scatter creation to a function 2022-02-03 17:48:34 -06:00
Sam Germain
d5376c2c89 wrote freqtradebot.test_leverage_prep 2022-02-03 17:48:33 -06:00
Sam Germain
c47c54c16c removed strategy_test_v3.populate_sell_trend # TODO-lev: Add short logic, because it looked like the short logic was already there 2022-02-03 17:48:33 -06:00
Sam Germain
f58b92bb86 exchange.create_order removed default for leverage 2022-02-03 17:48:08 -06:00
Sam Germain
09f0e7149f test__fetch_and_calculate_funding_fees_datetime_called # TODO-lev: test for longs 2022-02-02 12:42:13 -06:00
Sam Germain
179947fa72
New config (#6333)
* updated new-config to add trading_mode and margin_mode

* added trading_mode and margin_mode to config examples

* added okex config example

* new file:   config_examples/config_binance_futures.example.json

* removed trading_mode and margin_mode from base_config and binance and okex example

* deleted okex and futures config files

* updated full config file

* updated new-config command to add trading_mode and margin_mode to config

* new file:   config_examples/config_okex_futures.example.json

* removed config_okex_futures.example.json

* added trading_mode to test_start_new_config

* new-config asks exchange before asking futures

* Simplify trading_mode selection

* margin_mode is empty string for spot new configs

* build_config_commands sorted exchanges

* isort

Co-authored-by: Matthias <xmatthias@outlook.com>
2022-02-02 14:46:44 +01:00
Sam Germain
30519aa3be Changed name Collateral -> MarginMode, collateral -> margin_mode, and _supported_trading_mode_margin_pairs -> _supported_trading_margin_pairs 2022-02-01 13:05:40 -06:00
Matthias
45e533fc3e Add leverage/short properties to api responses 2022-02-01 07:08:43 +01:00
Matthias
7dd50f78cf Small finetuning improving a comment 2022-02-01 06:37:13 +01:00
Sam Germain
fc15e14707 Merge branch 'feat/short' into isolated-liq 2022-01-31 14:22:01 -06:00
Sam Germain
9de63412c1 exchange.get_liquidation_price arguments are not optional 2022-01-31 14:00:52 -06:00
Sam Germain
6c4325b7a2 confest markets removed futures values from ETH/USDT 2022-01-31 13:44:57 -06:00
Matthias
d653d6bfc0
Merge pull request #6332 from samgermain/binance-max-lev
Binance max lev
2022-01-31 20:26:57 +01:00
Sam Germain
8b9abd0051 test_get_maintenance_ratio_and_amt_gateio removed commented test that returns None 2022-01-31 13:18:31 -06:00
Matthias
de17993705 Fix random test failure when local config is found 2022-01-31 20:09:25 +01:00
Sam Germain
08e4a4a6dd binance.get_max_leverage_fix 2022-01-31 12:21:12 -06:00
Sam Germain
43db4c34d1 added okex back to unsupported exchanges 2022-01-31 12:18:30 -06:00
Sam Germain
b8f4cebce7 exchange.liquidation_price methods combined, dry_run check on exchange for liquidation price 2022-01-31 12:18:25 -06:00
Sam Germain
143c37d36f cleaned up liquidation price methods 2022-01-31 12:17:07 -06:00
Sam Germain
ede9012fcc removed TODO-levs about okex liquidation price 2022-01-31 12:17:07 -06:00
Sam Germain
e91aaa7d64 removed isolated_liq= 2022-01-31 12:16:43 -06:00
Sam Germain
5cf54bee4d removed excess decimals in test_binance 2022-01-31 12:16:43 -06:00
Sam Germain
0c13e387fe moved liquidation_price method to exchange classes 2022-01-31 12:16:43 -06:00
Sam Germain
e4b37c6462 freqtradebot.leverage_prep minor fixes 2022-01-31 12:16:43 -06:00
Sam Germain
1f1ac8ce9d test_get_liquidation_price/test_get_maintenance_ratio_and_amt_binance/fill_leverage_brackets/test_validate_trading_mode_and_collateral TODO comments 2022-01-31 12:16:43 -06:00
Sam Germain
c2f9201512 Added get_liquidation_price check 2022-01-31 12:16:43 -06:00
Sam Germain
bb2b2211d0 exchange.fill_leverage_brackets/get_maintenance_ratio_and_amt docstring and type specification 2022-01-31 12:16:43 -06:00
Sam Germain
0c8205ab3b replace single quote docstrings with double quote docstrings 2022-01-31 12:16:43 -06:00
Sam Germain
387a9fbf36 test_execute_entry liquidation_price test test_get_maintenance_ratio_and_amt_gateio 2022-01-31 12:16:38 -06:00
Sam Germain
2d545a2def fixed breaking tests for liquidation price 2022-01-31 12:15:54 -06:00
Sam Germain
1eee5373b9 gateio.get_maintenance_ratio_and_amt 2022-01-31 12:15:54 -06:00
Sam Germain
69a6223ca0 implemented binance.get_maintenance_ratio_and_amt 2022-01-31 12:15:54 -06:00
Sam Germain
ba5fc21d84 added isolated futures to supported modes for binance,gateio 2022-01-31 12:15:54 -06:00
Sam Germain
ba02605d77 Isolated liq branch passes all tests and has the general structure that it is supposed to, but is patchy, and doesnt get the correct maintenance amt and maintenance margin rate yet 2022-01-31 12:15:54 -06:00