Esempio n. 1
0
    def paper(debug: bool, dev: bool) -> None:
        """
        trades in real-time on exchange with PAPER money
        """
        validate_cwd()

        # set trading mode
        from jesse.config import config
        config['app']['trading_mode'] = 'papertrade'

        register_custom_exception_handler()

        # debug flag
        config['app']['debug_mode'] = debug

        from jesse_live import init
        from jesse.services.selectors import get_exchange
        live_config = locate('live-config.config')

        # validate that the "live-config.py" file exists
        if live_config is None:
            jh.error(
                'You\'re either missing the live-config.py file or haven\'t logged in. Run "jesse login" to fix it.',
                True)
            jh.terminate_app()

        # inject live config
        init(config, live_config)

        # execute live session
        from jesse_live.live_mode import run
        run(dev)
Esempio n. 2
0
    def paper(debug: bool, dev: bool) -> None:
        """
        trades in real-time on exchange with PAPER money
        """
        validate_cwd()

        # set trading mode
        from jesse.config import config
        config['app']['trading_mode'] = 'papertrade'

        register_custom_exception_handler()

        # debug flag
        config['app']['debug_mode'] = debug

        from jesse_live import init
        from jesse.services.selectors import get_exchange
        live_config = locate('live-config.config')

        # inject live config
        init(config, live_config)

        # execute live session
        from jesse_live.live_mode import run
        run(dev)