Repository Analysis

freqtrade/freqtrade

Free, open source crypto trading bot

18.3 Moderate AI signal View on GitHub
18.3
Adjusted Score
18.3
Raw Score
100%
Time Factor
2026-05-30
Last Push
50,909
Stars
Python
Language
164,035
Lines of Code
631
Files
2175
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 182MEDIUM 94LOW 1899

Pattern Findings

2175 matches across 13 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers1314 hits · 1190 pts
SeverityFileLineSnippet
LOWft_client/freqtrade_client/ft_rest_client.py268 def list_open_trades_custom_data(self, key=None, limit=100, offset=0):
LOWft_client/test_client/test_rest_client.py196def test_ft_client_argparsing(mocker, params, expected_args, expected_kwargs, caplog):
LOWtests/conftest.py94def pytest_xdist_make_scheduler(config, log):
LOWtests/conftest.py234def patched_configuration_load_config_file(mocker, config) -> None:
LOWtests/conftest.py420def create_mock_trades_with_leverage(fee, use_db: bool = True):
LOWtests/conftest.py507def fixture_set_mp_start_method():
LOWtests/conftest.py1827def limit_buy_order_old_partial():
LOWtests/conftest.py1845def limit_buy_order_old_partial_canceled(limit_buy_order_old_partial):
LOWtests/conftest.py1853def limit_buy_order_canceled_empty(request):
LOWtests/conftest.py2741def limit_buy_order_usdt_open():
LOWtests/conftest.py2769def limit_sell_order_usdt_open():
LOWtests/conftest.py2813def market_buy_order_usdt_doublefee(market_buy_order_usdt):
LOWtests/conftest.py2903def funding_rate_history_hourly():
LOWtests/conftest.py2993def funding_rate_history_octohourly():
LOWtests/test_plotting.py207def test_generate_candlestick_graph_no_signals_no_trades(default_conf, mocker, testdatadir, caplog):
LOWtests/test_plotting.py251def test_generate_candlestick_graph_no_trades(default_conf, mocker, testdatadir):
LOWtests/test_plotting.py342def test_generate_profit_graph(testdatadir):
LOWtests/test_plotting.py398def test_start_plot_dataframe(mocker):
LOWtests/test_plotting.py415def test_load_and_plot_trades(default_conf, mocker, caplog, testdatadir):
LOWtests/test_plotting.py460def test_start_plot_profit_error(mocker):
LOWtests/test_misc.py213def test_parse_db_uri_for_logging(conn_url, expected) -> None:
LOWtests/test_configuration.py655def test_validate_default_conf(default_conf) -> None:
LOWtests/test_configuration.py661def test_validate_fiat_currency_options(default_conf, fiat) -> None:
LOWtests/test_configuration.py670def test_validate_max_open_trades(default_conf):
LOWtests/test_configuration.py49def test_load_config_missing_attributes(default_conf) -> None:
LOWtests/test_configuration.py63def test_load_config_incorrect_stake_amount(default_conf) -> None:
LOWtests/test_configuration.py83def test_load_config_file_error(default_conf, mocker, caplog) -> None:
LOWtests/test_configuration.py96def test_load_config_file_error_range(default_conf, mocker, caplog) -> None:
LOWtests/test_configuration.py157def test_load_config_max_open_trades_zero(default_conf, mocker, caplog) -> None:
LOWtests/test_configuration.py169def test_load_config_combine_dicts(default_conf, mocker, caplog) -> None:
LOWtests/test_configuration.py230def test_from_recursive_files(testdatadir) -> None:
LOWtests/test_configuration.py276def test_load_config_max_open_trades_minus_one(default_conf, mocker, caplog) -> None:
LOWtests/test_configuration.py290def test_load_config_file_exception(mocker) -> None:
LOWtests/test_configuration.py312def test_load_config_with_params(default_conf, mocker) -> None:
LOWtests/test_configuration.py407def test_load_custom_strategy(default_conf, mocker, tmp_path) -> None:
LOWtests/test_configuration.py443def test_setup_configuration_without_arguments(mocker, default_conf, caplog) -> None:
LOWtests/test_configuration.py475def test_setup_configuration_with_arguments(mocker, default_conf, caplog, tmp_path) -> None:
LOWtests/test_configuration.py532def test_setup_configuration_with_stratlist(mocker, default_conf, caplog) -> None:
LOWtests/test_configuration.py577def test_hyperopt_with_arguments(mocker, default_conf, caplog) -> None:
LOWtests/test_configuration.py605def test_cli_verbose_with_params(default_conf, mocker, caplog) -> None:
LOWtests/test_configuration.py643def test_load_config_warn_forcebuy(default_conf, mocker, caplog) -> None:
LOWtests/test_configuration.py793def test_validate_ask_orderbook(default_conf, caplog) -> None:
LOWtests/test_configuration.py811def test_validate_time_in_force(default_conf, caplog) -> None:
LOWtests/test_configuration.py835def test__validate_order_types(default_conf, caplog) -> None:
LOWtests/test_configuration.py872def test__validate_unfilledtimeout(default_conf, caplog) -> None:
LOWtests/test_configuration.py898def test__validate_pricing_rules(default_conf, caplog) -> None:
LOWtests/test_configuration.py935def test__validate_freqai_include_timeframes(default_conf, caplog) -> None:
LOWtests/test_configuration.py1048def test__validate_demo_trading(default_conf_usdt) -> None:
LOWtests/test_configuration.py1064def test_validate_edge_removal(default_conf):
LOWtests/test_configuration.py1075def test_load_config_test_comments() -> None:
LOWtests/test_configuration.py1085def test_load_config_default_exchange(all_conf) -> None:
LOWtests/test_configuration.py1098def test_load_config_default_exchange_name(all_conf) -> None:
LOWtests/test_configuration.py1111def test_load_config_stoploss_exchange_limit_ratio(all_conf) -> None:
LOWtests/test_configuration.py1126def test_load_config_default_subkeys(all_conf, keys) -> None:
LOWtests/test_configuration.py1159def test_pairlist_resolving_with_config(mocker, default_conf):
LOWtests/test_configuration.py1194def test_pairlist_resolving_with_config_pl(mocker, default_conf):
LOWtests/test_configuration.py1215def test_pairlist_resolving_with_config_pl_not_exists(mocker, default_conf):
LOWtests/test_configuration.py1233def test_pairlist_resolving_fallback(mocker, tmp_path):
LOWtests/test_configuration.py1268def test_process_temporary_deprecated_settings(mocker, default_conf, setting, caplog):
LOWtests/test_configuration.py1314def test_process_removed_settings(mocker, default_conf, setting):
1254 more matches not shown…
Cross-File Repetition138 hits · 690 pts
SeverityFileLineSnippet
HIGHtests/optimize/test_backtesting.py0buy every xth candle - sell every other xth -2 (hold on to pairs a bit)
HIGHtests/optimize/test_backtesting.py0buy every xth candle - sell every other xth -2 (hold on to pairs a bit)
HIGHtests/optimize/test_backtesting.py0buy every xth candle - sell every other xth -2 (hold on to pairs a bit)
HIGHtests/optimize/test_backtesting.py0buy every xth candle - sell every other xth -2 (hold on to pairs a bit)
HIGHtests/persistence/test_migrations.py0test database migration (starting with new pairformat)
HIGHtests/persistence/test_migrations.py0test database migration (starting with new pairformat)
HIGHtests/persistence/test_migrations.py0test database migration (starting with new pairformat)
HIGHtests/data/test_historic_precision.py0test the get_tick_size_over_time function with predefined data
HIGHtests/data/test_historic_precision.py0test the get_tick_size_over_time function with predefined data
HIGHtests/data/test_historic_precision.py0test the get_tick_size_over_time function with predefined data
HIGHtests/strategy/strats/freqai_test_classifier.py0test strategy - used for testing freqai functionalities. do not use in production.
HIGHtests/strategy/strats/freqai_rl_test_strat.py0test strategy - used for testing freqai functionalities. do not use in production.
HIGHtests/strategy/strats/freqai_test_strat.py0test strategy - used for testing freqai functionalities. do not use in production.
HIGHtests/strategy/strats/strategy_test_v2.py0adds several different ta indicators to the given dataframe performance note: for the best performance be frugal on the
HIGHdocs/strategy-customization.md0adds several different ta indicators to the given dataframe performance note: for the best performance be frugal on the
HIGHfreqtrade/templates/sample_strategy.py0adds several different ta indicators to the given dataframe performance note: for the best performance be frugal on the
HIGHdocs/freqai-configuration.md0user sets up the training and test data to fit their desired model here :param data_dictionary: the dictionary holding a
HIGH…eqai/prediction_models/LightGBMRegressorMultiTarget.py0user sets up the training and test data to fit their desired model here :param data_dictionary: the dictionary holding a
HIGHfreqtrade/freqai/prediction_models/XGBoostRegressor.py0user sets up the training and test data to fit their desired model here :param data_dictionary: the dictionary holding a
HIGH…qai/prediction_models/LightGBMClassifierMultiTarget.py0user sets up the training and test data to fit their desired model here :param data_dictionary: the dictionary holding a
HIGH…qtrade/freqai/prediction_models/XGBoostRFClassifier.py0user sets up the training and test data to fit their desired model here :param data_dictionary: the dictionary holding a
HIGH…reqai/prediction_models/XGBoostRegressorMultiTarget.py0user sets up the training and test data to fit their desired model here :param data_dictionary: the dictionary holding a
HIGHfreqtrade/freqai/prediction_models/XGBoostClassifier.py0user sets up the training and test data to fit their desired model here :param data_dictionary: the dictionary holding a
HIGH…eqtrade/freqai/prediction_models/LightGBMClassifier.py0user sets up the training and test data to fit their desired model here :param data_dictionary: the dictionary holding a
HIGH…reqai/prediction_models/PyTorchTransformerRegressor.py0user sets up the training and test data to fit their desired model here :param data_dictionary: the dictionary holding a
HIGH…eqtrade/freqai/prediction_models/XGBoostRFRegressor.py0user sets up the training and test data to fit their desired model here :param data_dictionary: the dictionary holding a
HIGHfreqtrade/freqai/prediction_models/LightGBMRegressor.py0user sets up the training and test data to fit their desired model here :param data_dictionary: the dictionary holding a
HIGH…qai/prediction_models/SKLearnRandomForestClassifier.py0user sets up the training and test data to fit their desired model here :param data_dictionary: the dictionary holding a
HIGH…qtrade/freqai/prediction_models/PyTorchMLPRegressor.py0user sets up the training and test data to fit their desired model here :param data_dictionary: the dictionary holding a
HIGHfreqtrade/exchange/okx.py0additional exchange initialization logic. .api will be available at this point. must be overridden in child methods if r
HIGHfreqtrade/exchange/bybit.py0additional exchange initialization logic. .api will be available at this point. must be overridden in child methods if r
HIGHfreqtrade/exchange/exchange.py0additional exchange initialization logic. .api will be available at this point. must be overridden in child methods if r
HIGHfreqtrade/exchange/bitget.py0additional exchange initialization logic. .api will be available at this point. must be overridden in child methods if r
HIGHfreqtrade/exchange/gate.py0additional exchange initialization logic. .api will be available at this point. must be overridden in child methods if r
HIGHfreqtrade/exchange/binance.py0additional exchange initialization logic. .api will be available at this point. must be overridden in child methods if r
HIGHfreqtrade/exchange/bybit.py0check if the pair gonna be delisted. by default, it returns none. :param pair: market symbol :return: datetime if the pa
HIGHfreqtrade/exchange/bitget.py0check if the pair gonna be delisted. by default, it returns none. :param pair: market symbol :return: datetime if the pa
HIGHfreqtrade/exchange/binance.py0check if the pair gonna be delisted. by default, it returns none. :param pair: market symbol :return: datetime if the pa
HIGH…eqai/prediction_models/LightGBMRegressorMultiTarget.py0user created prediction model. the class inherits ifreqaimodel, which means it has full access to all frequency ai funct
HIGHfreqtrade/freqai/prediction_models/XGBoostRegressor.py0user created prediction model. the class inherits ifreqaimodel, which means it has full access to all frequency ai funct
HIGH…qai/prediction_models/LightGBMClassifierMultiTarget.py0user created prediction model. the class inherits ifreqaimodel, which means it has full access to all frequency ai funct
HIGH…qtrade/freqai/prediction_models/XGBoostRFClassifier.py0user created prediction model. the class inherits ifreqaimodel, which means it has full access to all frequency ai funct
HIGHfreqtrade/freqai/prediction_models/XGBoostClassifier.py0user created prediction model. the class inherits ifreqaimodel, which means it has full access to all frequency ai funct
HIGH…eqtrade/freqai/prediction_models/LightGBMClassifier.py0user created prediction model. the class inherits ifreqaimodel, which means it has full access to all frequency ai funct
HIGH…eqtrade/freqai/prediction_models/XGBoostRFRegressor.py0user created prediction model. the class inherits ifreqaimodel, which means it has full access to all frequency ai funct
HIGHfreqtrade/freqai/prediction_models/LightGBMRegressor.py0user created prediction model. the class inherits ifreqaimodel, which means it has full access to all frequency ai funct
HIGH…qai/prediction_models/SKLearnRandomForestClassifier.py0user created prediction model. the class inherits ifreqaimodel, which means it has full access to all frequency ai funct
HIGH…qtrade/freqai/prediction_models/XGBoostRFClassifier.py0filter the prediction features data and predict with it. :param unfiltered_df: full dataframe for the current backtest p
HIGHfreqtrade/freqai/prediction_models/XGBoostClassifier.py0filter the prediction features data and predict with it. :param unfiltered_df: full dataframe for the current backtest p
HIGH…reqai/prediction_models/PyTorchTransformerRegressor.py0filter the prediction features data and predict with it. :param unfiltered_df: full dataframe for the current backtest p
HIGH…qai/prediction_models/SKLearnRandomForestClassifier.py0filter the prediction features data and predict with it. :param unfiltered_df: full dataframe for the current backtest p
HIGHfreqtrade/freqai/base_models/BasePyTorchRegressor.py0filter the prediction features data and predict with it. :param unfiltered_df: full dataframe for the current backtest p
HIGHfreqtrade/freqai/base_models/BaseRegressionModel.py0filter the prediction features data and predict with it. :param unfiltered_df: full dataframe for the current backtest p
HIGHfreqtrade/freqai/base_models/BaseClassifierModel.py0filter the prediction features data and predict with it. :param unfiltered_df: full dataframe for the current backtest p
HIGH…trade/freqai/prediction_models/ReinforcementLearner.py0an example reward function. this is the one function that users will likely wish to inject their own creativity into. wa
HIGHfreqtrade/freqai/RL/BaseEnvironment.py0an example reward function. this is the one function that users will likely wish to inject their own creativity into. wa
HIGHfreqtrade/freqai/RL/BaseReinforcementLearningModel.py0an example reward function. this is the one function that users will likely wish to inject their own creativity into. wa
HIGHfreqtrade/freqai/RL/Base5ActionRLEnv.py0logic for a single step (incrementing one candle in time) by the agent :param: action: int = the action type that the ag
HIGHfreqtrade/freqai/RL/Base3ActionRLEnv.py0logic for a single step (incrementing one candle in time) by the agent :param: action: int = the action type that the ag
HIGHfreqtrade/freqai/RL/Base4ActionRLEnv.py0logic for a single step (incrementing one candle in time) by the agent :param: action: int = the action type that the ag
78 more matches not shown…
Unused Imports314 hits · 273 pts
SeverityFileLineSnippet
LOWft_client/freqtrade_client/__init__.py1
LOWtests/strategy/strats/failing_strategy.py3
LOWfreqtrade/configuration/__init__.py3
LOWfreqtrade/configuration/__init__.py3
LOWfreqtrade/configuration/__init__.py4
LOWfreqtrade/configuration/__init__.py5
LOWfreqtrade/configuration/__init__.py6
LOWfreqtrade/configuration/__init__.py7
LOWfreqtrade/configuration/__init__.py8
LOWfreqtrade/ft_types/__init__.py2
LOWfreqtrade/ft_types/__init__.py2
LOWfreqtrade/ft_types/__init__.py2
LOWfreqtrade/ft_types/__init__.py2
LOWfreqtrade/ft_types/__init__.py2
LOWfreqtrade/ft_types/__init__.py2
LOWfreqtrade/ft_types/__init__.py10
LOWfreqtrade/ft_types/__init__.py11
LOWfreqtrade/ft_types/__init__.py11
LOWfreqtrade/exchange/__init__.py3
LOWfreqtrade/exchange/__init__.py4
LOWfreqtrade/exchange/__init__.py7
LOWfreqtrade/exchange/__init__.py7
LOWfreqtrade/exchange/__init__.py7
LOWfreqtrade/exchange/__init__.py8
LOWfreqtrade/exchange/__init__.py9
LOWfreqtrade/exchange/__init__.py10
LOWfreqtrade/exchange/__init__.py11
LOWfreqtrade/exchange/__init__.py12
LOWfreqtrade/exchange/__init__.py13
LOWfreqtrade/exchange/__init__.py14
LOWfreqtrade/exchange/__init__.py15
LOWfreqtrade/exchange/__init__.py16
LOWfreqtrade/exchange/__init__.py16
LOWfreqtrade/exchange/__init__.py16
LOWfreqtrade/exchange/__init__.py16
LOWfreqtrade/exchange/__init__.py16
LOWfreqtrade/exchange/__init__.py16
LOWfreqtrade/exchange/__init__.py16
LOWfreqtrade/exchange/__init__.py16
LOWfreqtrade/exchange/__init__.py16
LOWfreqtrade/exchange/__init__.py16
LOWfreqtrade/exchange/__init__.py16
LOWfreqtrade/exchange/__init__.py16
LOWfreqtrade/exchange/__init__.py16
LOWfreqtrade/exchange/__init__.py16
LOWfreqtrade/exchange/__init__.py32
LOWfreqtrade/exchange/__init__.py32
LOWfreqtrade/exchange/__init__.py32
LOWfreqtrade/exchange/__init__.py32
LOWfreqtrade/exchange/__init__.py32
LOWfreqtrade/exchange/__init__.py32
LOWfreqtrade/exchange/__init__.py32
LOWfreqtrade/exchange/__init__.py41
LOWfreqtrade/exchange/__init__.py42
LOWfreqtrade/exchange/__init__.py43
LOWfreqtrade/exchange/__init__.py44
LOWfreqtrade/exchange/__init__.py45
LOWfreqtrade/exchange/__init__.py46
LOWfreqtrade/exchange/__init__.py47
LOWfreqtrade/exchange/__init__.py48
254 more matches not shown…
Cross-Language Confusion42 hits · 251 pts
SeverityFileLineSnippet
HIGHtests/optimize/test_lookahead_analysis.py365 assert expected_data1.equals(saved_data1)
HIGHtests/optimize/test_lookahead_analysis.py393 assert expected_data2.equals(saved_data2)
HIGHtests/optimize/test_lookahead_analysis.py423 assert expected_data3.equals(saved_data3)
HIGHtests/optimize/test_hyperopt.py713 '{"params":{"mfi-value":null,"sell-mfi-value":null},"minimal_roi"'
HIGHtests/optimize/test_hyperopt.py714 ':{},"stoploss":null,"trailing_stop":null,"max_open_trades":null}'
HIGHtests/optimize/test_hyperopt.py771 '{"params":{"mfi-value":null,"sell-mfi-value":null},"minimal_roi":{},"stoploss":null}'
HIGHtests/optimize/test_hyperopt.py828 assert '{"minimal_roi":{},"stoploss":null}' in out
HIGHtests/plugins/test_pairlist.py1238 assert not df1.equals(df2)
HIGHtests/freqtradebot/test_stoploss_on_exchange.py102 # should do nothing and return false
HIGHtests/freqtradebot/test_freqtradebot.py4349 # delta is 100 which is impossible to reach. hence function will return false
HIGHtests/persistence/test_trade_fromjson.py66 "liquidation_price": null,
HIGHtests/persistence/test_trade_fromjson.py74 "open_order_id": null,
HIGHtests/data/test_metrics.py503 assert df.equals(df1)
HIGHtests/data/test_metrics.py555 assert df.equals(df1)
HIGHtests/data/test_datahandler.py130 assert df.columns.equals(df1.columns)
HIGHtests/data/test_datahandler.py357 assert ohlcv.equals(ohlcv1)
HIGHtests/data/test_btanalysis.py101 assert bt_data.equals(bt_data2)
HIGHtests/data/test_btanalysis.py105 assert bt_data.equals(bt_data3)
HIGHtests/data/test_btanalysis.py124 assert bt_data.equals(bt_data2)
HIGHtests/data/test_converter.py367 assert not data_modify.equals(data)
HIGHtests/data/test_converter.py377 assert not data_modify.equals(data)
HIGHtests/data/test_converter.py387 assert not data_modify.equals(data)
HIGHtests/data/test_converter.py397 assert not data_modify.equals(data)
HIGHtests/data/test_converter.py411 assert res.equals(trades_history_df)
HIGHtests/data/test_converter.py206 assert data.equals(df1)
HIGHtests/data/test_converter.py234 assert dfs.equals(dfm)
HIGHtests/data/test_converter.py235 assert dfs.equals(df1)
HIGHtests/data/test_dataprovider.py32 assert ohlcv_history.equals(dp.ohlcv("UNITTEST/BTC", timeframe, candle_type=candletype))
HIGHtests/data/test_dataprovider.py144 assert ohlcv_history.equals(
HIGHtests/data/test_dataprovider.py147 assert ohlcv_history.equals(
HIGHtests/data/test_dataprovider.py198 assert ohlcv_history.equals(
HIGHtests/data/test_dataprovider.py204 assert ohlcv_history.equals(
HIGHtests/data/test_dataprovider.py420 assert ohlcv_history.equals(dataframe)
HIGHtests/data/test_dataprovider.py424 assert ohlcv_history.equals(dataframe)
HIGHtests/data/test_history.py924 assert stored_data.equals(expected_result)
HIGHtests/data/test_history.py1002 assert stored_data.equals(existing_data)
HIGHfreqtrade/exchange/exchange_utils.py182 # true then it's true. If it's undefined, then it's most likely true, but not 100% )"
HIGH…trade/freqai/prediction_models/PyTorchMLPClassifier.py33 "n_epochs": null,
HIGH…qtrade/freqai/prediction_models/PyTorchMLPRegressor.py34 "n_epochs": null,
HIGHfreqtrade/loggers/ft_rich_handler.py33 # Handles pythonw, where stdout/stderr are null, and we return NullFile
HIGHfreqtrade/plugins/pairlist/VolatilityFilter.py53 "either None (undefined), 'asc' or 'desc'"
HIGHfreqtrade/plugins/pairlist/rangestabilityfilter.py47 "either None (undefined), 'asc' or 'desc'"
AI Slop Vocabulary39 hits · 134 pts
SeverityFileLineSnippet
MEDIUMtests/conftest.py3198 "minNotional": 0, # stake(before leverage) = 0
MEDIUMtests/conftest.py3199 "maxNotional": 100000, # max stake(before leverage) = 5000
MEDIUMtests/exchange/test_exchange.py6110 # limit leverage tiers
MEDIUMtests/exchange/test_binance.py684 # Assert if conftest leverage tiers have less or equal tiers than the exchange
MEDIUMtests/optimize/test_backtesting.py630 # leverage = 5
MEDIUMtests/optimize/test_backtest_detail.py567# Test 27: (copy of test26 with leverage)
MEDIUMtests/optimize/test_backtest_detail.py589# Test 28: (copy of test26 with leverage and as short)
MEDIUMtests/freqtradebot/test_freqtradebot.py1027 # leverage=1.0, open_rate=10.00000000, open_since=...)
MEDIUMtests/freqtradebot/test_freqtradebot.py1029 # leverage=3.0, open_rate=10.00000000, open_since=...)
MEDIUMtests/persistence/test_persistence.py796 # 10 minute limit trade on Binance/Kraken at 1x, 3x leverage
MEDIUMtests/strategy/strats/strategy_test_v3.py192 # Bot-logic must make sure it's an allowed leverage and eventually adjust accordingly.
MEDIUMfreqtrade/freqtradebot.py1156 # Cap leverage between 1.0 and max_leverage.
MEDIUMfreqtrade/freqtradebot.py1159 # Changing leverage currently not possible
MEDIUMfreqtrade/freqtradebot.py1164 # We do however also need min-stake to determine leverage, therefore this is ignored as
MEDIUMfreqtrade/freqtradebot.py1960 # Filled val is in quote currency (after leverage)
MEDIUMfreqtrade/exchange/hyperliquid.py213 # There are no leverage tiers
MEDIUMfreqtrade/exchange/hyperliquid.py221 # Hyperliquid expects leverage to be an int
MEDIUMfreqtrade/exchange/hyperliquid.py223 # Hyperliquid needs the parameter leverage.
MEDIUMfreqtrade/exchange/hyperliquid.py261 # Docs: The maintenance margin is half of the initial margin at max leverage,
MEDIUMfreqtrade/exchange/hyperliquid.py263 # (for 50x max leverage assets) and 16.7% (for 3x max leverage assets)
MEDIUMfreqtrade/exchange/hyperliquid.py265 # The key thing here is 'Half of the initial margin at max leverage'.
MEDIUMfreqtrade/exchange/hyperliquid.py268 # 2. Assume max leverage, calculate the initial margin by dividing the position value
MEDIUMfreqtrade/exchange/hyperliquid.py269 # by the max leverage
MEDIUMfreqtrade/exchange/hyperliquid.py282 # Docs: The maintenance margin is half of the initial margin at max leverage
MEDIUMfreqtrade/exchange/hyperliquid.py283 # The docs don't explicitly specify maintenance leverage, but this works.
MEDIUMfreqtrade/exchange/hyperliquid.py284 # Double because of the statement 'half of the initial margin at max leverage'
MEDIUMfreqtrade/exchange/exchange.py3560 # Fetch all leverage tiers at once
MEDIUMfreqtrade/exchange/exchange.py3563 # Must fetch the leverage tiers for each market separately
MEDIUMfreqtrade/exchange/exchange.py3703 # Adjust notional by leverage to do a proper comparison
MEDIUMfreqtrade/exchange/exchange.py3738 return 1.0 # Default if max leverage cannot be found
MEDIUMfreqtrade/freqai/freqai_interface.py296 # Loop enforcing the sliding window training/backtesting paradigm
MEDIUMfreqtrade/optimize/backtesting.py1035 # Cap leverage between 1.0 and max_leverage.
MEDIUMfreqtrade/persistence/trade_model.py488 """Returns true if this is a non-leverage, non-short trade"""
MEDIUMfreqtrade/persistence/trade_model.py1303 # Leverage not updated, as we don't allow changing leverage through DCA at the moment.
MEDIUMfreqtrade/persistence/wallet_history.py33 # Total position value in `quote_currency` - including leverage
MEDIUMfreqtrade/rpc/rpc.py906 # est_stake = rate * pos.position - pos.collateral * (pos.leverage - 1)
MEDIUMfreqtrade/rpc/rpc.py909 # = collateral + (pos.collateral * pos.leverage)
MEDIUMfreqtrade/rpc/api_server/api_v1.py47# 2.17: Forceentry - leverage, partial force_exit
MEDIUMfreqtrade/strategy/interface.py66 # Version 3 - First version with short and leverage support
Deep Nesting124 hits · 112 pts
SeverityFileLineSnippet
LOWtests/conftest.py172
LOWtests/optimize/test_backtesting.py2563
LOWtests/plugins/test_pairlist.py768
LOWtests/plugins/test_pairlist.py1020
LOWtests/exchange_online/test_ccxt_compat.py128
LOWtests/exchange_online/test_ccxt_compat.py212
LOWtests/rpc/test_rpc_apiserver.py910
LOWtests/strategy/test_strategy_helpers.py253
LOWscripts/ws_client.py197
LOWfreqtrade/freqtradebot.py79
LOWfreqtrade/freqtradebot.py449
LOWfreqtrade/freqtradebot.py516
LOWfreqtrade/freqtradebot.py1298
LOWfreqtrade/freqtradebot.py1379
LOWfreqtrade/freqtradebot.py1585
LOWfreqtrade/freqtradebot.py1788
LOWfreqtrade/freqtradebot.py2369
LOWfreqtrade/configuration/config_validation.py296
LOWfreqtrade/configuration/configuration.py189
LOWfreqtrade/configuration/timerange.py125
LOWfreqtrade/configuration/environment_vars.py14
LOWfreqtrade/exchange/hyperliquid.py163
LOWfreqtrade/exchange/binance_public_data.py108
LOWfreqtrade/exchange/binance_public_data.py232
LOWfreqtrade/exchange/binance_public_data.py388
LOWfreqtrade/exchange/binance_public_data.py442
LOWfreqtrade/exchange/exchange.py649
LOWfreqtrade/exchange/exchange.py1241
LOWfreqtrade/exchange/exchange.py2102
LOWfreqtrade/exchange/exchange.py2509
LOWfreqtrade/exchange/exchange.py2611
LOWfreqtrade/exchange/exchange.py3126
LOWfreqtrade/exchange/exchange.py3339
LOWfreqtrade/exchange/exchange.py3393
LOWfreqtrade/exchange/exchange.py3557
LOWfreqtrade/exchange/exchange.py3627
LOWfreqtrade/exchange/exchange_ws.py234
LOWfreqtrade/exchange/krakenfutures.py61
LOWfreqtrade/exchange/krakenfutures.py142
LOWfreqtrade/exchange/exchange_utils.py305
LOWfreqtrade/exchange/common.py120
LOWfreqtrade/exchange/common.py121
LOWfreqtrade/exchange/bitget.py104
LOWfreqtrade/exchange/gate.py109
LOWfreqtrade/freqai/utils.py94
LOWfreqtrade/freqai/freqai_interface.py273
LOWfreqtrade/freqai/freqai_interface.py871
LOWfreqtrade/freqai/data_drawer.py440
LOWfreqtrade/freqai/data_drawer.py572
LOWfreqtrade/freqai/data_drawer.py636
LOWfreqtrade/freqai/data_drawer.py711
LOWfreqtrade/freqai/torch/PyTorchModelTrainer.py71
LOWfreqtrade/freqai/RL/Base5ActionRLEnv.py32
LOWfreqtrade/freqai/RL/Base3ActionRLEnv.py30
LOWfreqtrade/freqai/RL/Base4ActionRLEnv.py31
LOWfreqtrade/loggers/__init__.py126
LOWfreqtrade/optimize/backtesting.py470
LOWfreqtrade/optimize/backtesting.py807
LOWfreqtrade/optimize/backtesting.py1573
LOWfreqtrade/optimize/backtesting.py1697
64 more matches not shown…
Self-Referential Comments29 hits · 88 pts
SeverityFileLineSnippet
MEDIUMtests/test_misc.py52 # Create a temporary directory and file
MEDIUMtests/test_wallets.py567 # Create a trade and verify the new currency is added to the wallets
MEDIUMtests/util/test_historic_wallets_migration.py262 # Create a trade with a pair that won't be in markets
MEDIUMtests/util/test_historic_wallets_migration.py293 # Create a trade
MEDIUMtests/util/test_historic_wallets_migration.py353 # Create a trade
MEDIUMtests/util/test_historic_wallets_migration.py395 # Create a trade
MEDIUMtests/rpc/test_rpc_apiserver.py3236 # Create a temporary directory and file
MEDIUMtests/rpc/test_rpc_apiserver.py3267 # Create a temporary directory and file
MEDIUMtests/rpc/test_rpc_apiserver.py3356 # Create a temporary directory and file
MEDIUMtests/rpc/test_rpc_apiserver.py3394 # Create a temporary directory and file
MEDIUMtests/rpc/test_rpc.py866 # Create a short and a long position wallet directly to avoid depending on position parsing
MEDIUMtests/data/test_converter_orderflow.py91 # Define the configuration for order flow calculation
MEDIUMtests/data/test_converter_orderflow.py320 # Define the bin size for the first test
MEDIUMtests/data/test_converter_orderflow.py576 # Create a sample DataFrame with known imbalances
MEDIUMtests/data/test_trade_parallelism.py30 # Create a minimal trades DataFrame with 4 trades over time
MEDIUMtests/data/test_history.py463 # Create the Json file
MEDIUMfreqtrade/exchange/exchange.py268 # Initialize ccxt objects
MEDIUMfreqtrade/freqai/torch/PyTorchTransformerModel.py43 # Define the encoder block of the Transformer
MEDIUMfreqtrade/optimize/backtesting.py503 # Create a copy of the dataframe before shifting, that way the entry signal/tag
MEDIUMfreqtrade/optimize/analysis/lookahead_helpers.py97 # Create a new empty DataFrame with the desired column names and set the index
MEDIUM…ptimize/hyperopt_loss/hyperopt_loss_short_trade_dur.py55# Create an alias for This to allow the legacy Method to work as well.
MEDIUMfreqtrade/plot/plotting.py460 # Define the graph
MEDIUMfreqtrade/plot/plotting.py703 # Create an average close price of all the pairs that were involved.
MEDIUMfreqtrade/templates/sample_strategy.py39# This class is a sample. Feel free to customize it.
MEDIUMfreqtrade/commands/optimize_commands.py59 # Initialize backtesting object
MEDIUMfreqtrade/commands/optimize_commands.py109 # Initialize backtesting object
MEDIUMfreqtrade/rpc/external_message_consumer.py156 # Create a connection to each producer
MEDIUMfreqtrade/rpc/external_message_consumer.py204 # Create the message stream for this channel
MEDIUMfreqtrade/rpc/api_server/api_backtest.py164 # Initialize backtesting object
Redundant / Tautological Comments55 hits · 82 pts
SeverityFileLineSnippet
LOWsetup.sh284# Verify if 3.11+ is installed
LOWtests/test_pip_audit.py59 # Check if pip-audit found any vulnerabilities
LOWtests/test_pip_audit.py64 # Check if it's an actual vulnerability vs an error
LOWtests/optimize/test_hyperopt.py495 # Check if some indicators are generated. We will not test all of them
LOWtests/plugins/test_pairlist.py810 # Set whitelist_result to None if pairlist is invalid and should produce exception
LOWtests/plugins/test_pairlist.py2211 # Set max_open_trades to 4, the filter should empty the whitelist
LOWtests/plugins/test_pairlist.py2231 # Set max_open_trades to 3, the filter should empty the whitelist
LOWtests/exchange_online/conftest.py711 # Set proxy to test in CI.
LOWtests/exchange_online/test_ccxt_compat.py268 # Check if last-timeframe is within the last 2 intervals
LOWtests/exchange_online/test_ccxt_compat.py286 # Check if last-timeframe is within the last 2 intervals
LOWtests/exchange_online/test_ccxt_compat.py323 # Check if first-timeframe is either the start, or start + 1
LOWtests/persistence/test_migrations.py26 # Check if init create a session
LOWfreqtrade/freqtradebot.py300 # Check if we need to adjust our current positions before attempting to enter new trades.
LOWfreqtrade/freqtradebot.py1331 # Check if we can exit our current position for this trade
LOWfreqtrade/freqtradebot.py1694 # Check if new candle
LOWfreqtrade/configuration/configuration.py114 # Check if the exchange set by the user is supported
LOWfreqtrade/configuration/environment_vars.py56 # Check if any ccxt config key is in the key parts
LOWfreqtrade/exchange/bybit.py266 # Set acknowledged to True to avoid ccxt exception
LOWfreqtrade/exchange/exchange.py358 # Check if timeframe is available
LOWfreqtrade/exchange/exchange.py361 # Check if all pairs are available
LOWfreqtrade/exchange/exchange.py732 # Set markets to avoid reloading on websocket api
LOWfreqtrade/exchange/exchange.py1553 # Verify if stopPrice works for your exchange, else configure stop_price_param
LOWfreqtrade/exchange/exchange.py2278 # Check if cache has been invalidated
LOWfreqtrade/exchange/exchange.py2733 # Check if 1 call can get us updated candles without hole in the data.
LOWfreqtrade/exchange/exchange_ws.py160 # Check if they're already scheduled
LOWfreqtrade/exchange/common.py123 kucoin = args[0].name == "KuCoin" # Check if the exchange is KuCoin.
LOWfreqtrade/loggers/__init__.py148 # Check if we have the module available
LOWfreqtrade/optimize/backtesting.py296 # Set stoploss_on_exchange to false for backtesting,
LOWfreqtrade/optimize/backtesting.py601 # Set close_rate to stoploss
LOWfreqtrade/optimize/backtesting.py692 # Check if we should increase our position
LOWfreqtrade/optimize/backtesting.py938 # Check if we need to adjust our current positions
LOWfreqtrade/optimize/optimize_reports/bt_output.py539 # Print results
LOW…ptimize/hyperopt_loss/hyperopt_loss_short_trade_dur.py14# Set TARGET_TRADES to suit your number concurrent trades so its realistic
LOWfreqtrade/optimize/hyperopt/hyperopt_interface.py40 # Assign timeframe to be used in hyperopt
LOWfreqtrade/plot/plotting.py57 # Set timerange to use
LOWfreqtrade/plugins/pairlist/IPairList.py274 # Check if market is active
LOWfreqtrade/plugins/pairlist/CrossMarketPairList.py82 # Check if pair quote currency equals to the stake currency.
LOWfreqtrade/plugins/pairlist/VolumePairList.py187 # Check if pair quote currency equals to the stake currency.
LOWfreqtrade/plugins/pairlist/PercentChangePairList.py182 # Check if pair quote currency equals to the stake currency.
LOWfreqtrade/plugins/pairlist/MarketCapPairList.py146 # Check if pair quote currency equals to the stake currency.
LOWfreqtrade/resolvers/strategy_resolver.py56 # Check if we need to override configuration
LOWfreqtrade/resolvers/hyperopt_resolver.py47 # Assign timeframe to be used in hyperopt
LOWfreqtrade/persistence/migrations.py431 # Check if migration necessary
LOWfreqtrade/rpc/telegram.py750 # Check if there's at least one numerical ID provided.
LOWfreqtrade/rpc/rpc.py1032 # Check if there is there are open orders
LOWfreqtrade/rpc/rpc.py1148 # Check if pair quote currency equals to the stake currency.
LOWfreqtrade/rpc/fiat_convert.py135 # Check if the fiat conversion you want is supported
LOWfreqtrade/rpc/fiat_convert.py165 # Check if the fiat conversion you want is supported
LOWfreqtrade/rpc/api_server/api_auth.py64 # Check if ws_token is/in secret_ws_token
LOWfreqtrade/rpc/api_server/api_auth.py77 # Check if ws_token is a JWT
LOWfreqtrade/data/converter/orderflow.py28 # Set columns to object type
LOWfreqtrade/data/converter/orderflow.py126 # Check if the trades are already in the cache
LOWfreqtrade/data/history/datahandlers/idatahandler.py204 # Check if regex found something and only return these results to avoid exceptions.
LOWfreqtrade/strategy/interface.py1302 # Check if dataframe is out of date
LOWfreqtrade/strategy/interface.py1702 # Check if time matches and current rate is above threshold
Excessive Try-Catch Wrapping75 hits · 82 pts
SeverityFileLineSnippet
LOWft_client/freqtrade_client/ft_client.py114 except Exception as e:
LOWft_client/freqtrade_client/__init__.py27 except Exception: # pragma: no cover
LOWft_client/freqtrade_client/__init__.py34 except Exception: # noqa: S110
LOWtests/conftest.py87 except Exception as e:
LOWtests/test_configuration.py639 except Exception:
LOWtests/optimize/test_hyperopt.py267 except Exception:
LOWdocs/strategy-callbacks.md1053 except Exception as exception:
LOWscripts/ws_client.py273 except Exception as e:
LOWfreqtrade/wallets.py513 except Exception as e:
LOWfreqtrade/freqtradebot.py191 except Exception as e:
LOWfreqtrade/freqtradebot.py216 except Exception as e:
LOWfreqtrade/freqtradebot.py232 except Exception:
LOWfreqtrade/freqtradebot.py604 except Exception:
LOWfreqtrade/__init__.py26 except Exception: # pragma: no cover
LOWfreqtrade/__init__.py33 except Exception: # noqa: S110
LOWfreqtrade/main.py75 except Exception:
LOWfreqtrade/configuration/deploy_config.py19 except Exception:
LOWfreqtrade/configuration/deploy_config.py27 except Exception:
MEDIUMfreqtrade/configuration/deploy_config.py15def validate_is_int(val):
MEDIUMfreqtrade/configuration/deploy_config.py23def validate_is_float(val):
LOWfreqtrade/configuration/directory_operations.py43 except Exception:
LOWfreqtrade/exchange/hyperliquid.py190 except Exception as e:
LOWfreqtrade/exchange/hyperliquid.py206 except Exception as e:
LOWfreqtrade/exchange/binance_public_data.py86 except Exception as e:
LOWfreqtrade/exchange/binance_public_data.py163 except Exception as e:
LOWfreqtrade/exchange/binance_public_data.py299 except Exception as e:
LOWfreqtrade/exchange/binance_public_data.py330 except Exception as e:
LOWfreqtrade/exchange/binance_public_data.py434 except Exception as e:
LOWfreqtrade/exchange/binance_public_data.py494 except Exception as e:
LOWfreqtrade/exchange/exchange.py3191 except Exception:
LOWfreqtrade/exchange/exchange.py3648 except Exception:
LOWfreqtrade/exchange/exchange_ws.py89 except Exception:
LOWfreqtrade/exchange/exchange_ws.py98 except Exception:
LOWfreqtrade/exchange/exchange_ws.py205 except Exception:
LOWfreqtrade/exchange/exchange_ws.py220 except Exception:
MEDIUMfreqtrade/exchange/exchange_ws.py92def _cleanup_async(self) -> None:
LOWfreqtrade/freqai/freqai_interface.py258 except Exception as msg:
LOWfreqtrade/freqai/freqai_interface.py376 except Exception as msg:
LOWfreqtrade/loggers/ft_rich_handler.py48 except Exception:
MEDIUMfreqtrade/loggers/ft_rich_handler.py19def emit(self, record):
LOWfreqtrade/loggers/std_err_stream_handler.py25 except Exception:
MEDIUMfreqtrade/loggers/std_err_stream_handler.py17def emit(self, record):
LOWfreqtrade/plugins/pairlist/RemotePairList.py178 except Exception as e:
LOWfreqtrade/plugins/pairlist/RemotePairList.py232 except Exception as e:
LOWfreqtrade/plugins/pairlist/RemotePairList.py273 except Exception as e:
LOWfreqtrade/commands/list_commands.py278 except Exception as e:
LOWfreqtrade/rpc/telegram.py353 except Exception as ex:
LOWfreqtrade/rpc/fiat_convert.py75 except Exception as exception:
LOWfreqtrade/rpc/fiat_convert.py188 except Exception as exception:
MEDIUMfreqtrade/rpc/fiat_convert.py58def _load_cryptomap(self) -> None:
LOWfreqtrade/rpc/external_message_consumer.py234 except Exception as e:
LOWfreqtrade/rpc/external_message_consumer.py270 except Exception as e:
LOWfreqtrade/rpc/external_message_consumer.py283 except Exception as e:
LOWfreqtrade/rpc/rpc_manager.py83 except Exception:
LOWfreqtrade/rpc/api_server/webserver.py329 except Exception:
LOWfreqtrade/rpc/api_server/api_pair_history.py43 except Exception as e:
LOWfreqtrade/rpc/api_server/api_pair_history.py77 except Exception as e:
LOWfreqtrade/rpc/api_server/api_v1.py129 except Exception as e:
LOWfreqtrade/rpc/api_server/api_v1.py174 except Exception:
LOWfreqtrade/rpc/api_server/ws/channel.py189 except Exception:
15 more matches not shown…
Decorative Section Separators17 hits · 52 pts
SeverityFileLineSnippet
MEDIUMtests/strategy/strats/strategy_test_v2.py75 # ------------------------------------
MEDIUMtests/strategy/strats/strategy_test_v3.py105 # ------------------------------------
MEDIUMdocs/includes/strategy-imports.md41# --------------------------------
MEDIUMscripts/ws_client.py27# ---------------------------------------------------------------------------
MEDIUMscripts/ws_client.py88# ----------------------------------------------------------------------------
MEDIUMscripts/ws_client.py120# ---------------------------------------------------------------------------
MEDIUMscripts/ws_client.py282# ---------------------------------------------------------------------------
MEDIUMfreqtrade/templates/sample_strategy.py33# --------------------------------
MEDIUMfreqtrade/templates/sample_strategy.py159 # ------------------------------------
MEDIUMfreqtrade/templates/sample_strategy.py240 # ------------------------------------
MEDIUMfreqtrade/templates/sample_strategy.py293 # ------------------------------------
MEDIUMfreqtrade/templates/sample_strategy.py300 # ------------------------------------
MEDIUMfreqtrade/templates/sample_strategy.py315 # ------------------------------------
MEDIUMfreqtrade/templates/sample_strategy.py330 # ------------------------------------
MEDIUMfreqtrade/templates/sample_strategy.py345 # # ------------------------------------
MEDIUMfreqtrade/templates/sample_strategy.py354 # ------------------------------------
MEDIUMfreqtrade/rpc/api_server/ws_schemas.py73# --------------------------------------------------------------------------
Over-Commented Block23 hits · 22 pts
SeverityFileLineSnippet
LOWdocker-compose.yml1---
LOWdocker/docker-compose-freqai.yml1---
LOWtests/exchange/test_binance.py1081 exchange = get_patched_exchange(mocker, default_conf_usdt, exchange="binance")
LOWtests/optimize/test_backtesting.py621 0, # exit_hsort
LOWtests/optimize/test_backtesting.py641 # = ((wb + cum_b) - (side_1 * position * ep1)) / ((position * mmr_b) - (side_1 * position))
LOWdocs/producer-consumer.md121 producer_pairs = self.dp.get_producer_pairs()
LOWdocs/advanced-setup.md61services:
LOWfreqtrade/exchange/hyperliquid.py261 # Docs: The maintenance margin is half of the initial margin at max leverage,
LOWfreqtrade/freqai/RL/BaseEnvironment.py381 initialized env for tensorboard callback
LOWfreqtrade/freqai/RL/BaseEnvironment.py401 # previous_price = self.add_entry_fee(previous_price)
LOWfreqtrade/optimize/hyperopt/hyperopt_interface.py81 # to adjust resulting ranges of the ROI tables.
LOWfreqtrade/templates/FreqaiExampleStrategy.py201 # Classifiers are typically set up with strings as targets:
LOWfreqtrade/templates/sample_strategy.py161 # ADX
LOWfreqtrade/templates/sample_strategy.py181 # # Keltner Channel
LOWfreqtrade/templates/sample_strategy.py201 dataframe["rsi"] = ta.RSI(dataframe)
LOWfreqtrade/templates/sample_strategy.py221 # Please read https://github.com/freqtrade/freqtrade/issues/2961 before using this.
LOWfreqtrade/templates/sample_strategy.py261 # dataframe["wbb_percent"] = (
LOWfreqtrade/templates/sample_strategy.py281 # dataframe['sma10'] = ta.SMA(dataframe, timeperiod=10)
LOWfreqtrade/templates/sample_strategy.py301 # # Hammer: values [0, 100]
LOWfreqtrade/templates/sample_strategy.py321 # dataframe['CDLGRAVESTONEDOJI'] = ta.CDLGRAVESTONEDOJI(dataframe)
LOWfreqtrade/templates/sample_strategy.py341 # # Three Inside Up/Down: values [0, -100, 100]
LOWfreqtrade/rpc/api_server/api_v1.py41# 1.12: add blacklist delete endpoint
LOWfreqtrade/rpc/api_server/api_v1.py61# 2.33: Additional weekly/monthly metrics
Synthetic Comment Markers2 hits · 15 pts
SeverityFileLineSnippet
HIGHbuild_helpers/create_command_partials.py92 # freqtrade-client still uses subprocess as requested
HIGHfreqtrade/freqai/data_kitchen.py369 # ensure we are predicting on exactly same amount of data as requested by user defined
Slop Phrases3 hits · 8 pts
SeverityFileLineSnippet
LOWsetup.sh167 echo_block "Don't forget to activate your virtual environment with 'source .venv/bin/activate'!"
MEDIUMfreqtrade/freqai/RL/BaseReinforcementLearningModel.py431 # you can use feature values from dataframe
MEDIUMfreqtrade/templates/sample_strategy.py39# This class is a sample. Feel free to customize it.