Example #1
0
def test_edge_start(mocker, edge_conf) -> None:
    mock_calculate = mocker.patch('freqtrade.edge.edge_positioning.Edge.calculate',
                                  return_value=True)
    table_mock = mocker.patch('freqtrade.optimize.edge_cli.generate_edge_table')

    patch_exchange(mocker)
    edge_conf['stake_amount'] = 20

    edge_cli = EdgeCli(edge_conf)
    edge_cli.start()
    assert mock_calculate.call_count == 1
    assert table_mock.call_count == 1
Example #2
0
def start_edge(args: Dict[str, Any]) -> None:
    """
    Start Edge script
    :param args: Cli args from Arguments()
    :return: None
    """
    from freqtrade.optimize.edge_cli import EdgeCli
    # Initialize configuration
    config = setup_configuration(args, RunMode.EDGE)
    logger.info('Starting freqtrade in Edge mode')

    # Initialize Edge object
    edge_cli = EdgeCli(config)
    edge_cli.start()