mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
add command line script
This commit is contained in:
parent
00499fa0d7
commit
998a887736
4
bin/freqtrade
Normal file
4
bin/freqtrade
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import freqtrade
|
||||||
|
freqtrade.main()
|
|
@ -1 +1,3 @@
|
||||||
__version__ = '0.10.0'
|
__version__ = '0.10.0'
|
||||||
|
|
||||||
|
from .main import main
|
||||||
|
|
|
@ -232,7 +232,7 @@ def init(config: dict, db_url: Optional[str] = None) -> None:
|
||||||
|
|
||||||
def app(config: dict) -> None:
|
def app(config: dict) -> None:
|
||||||
"""
|
"""
|
||||||
Main function which handles the application state
|
Main loop which handles the application state
|
||||||
:param config: config as dict
|
:param config: config as dict
|
||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
|
@ -263,8 +263,17 @@ def app(config: dict) -> None:
|
||||||
telegram.send_msg('*Status:* `Trader has stopped`')
|
telegram.send_msg('*Status:* `Trader has stopped`')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
def main():
|
||||||
|
"""
|
||||||
|
Loads and validates the config and starts the main loop
|
||||||
|
:return: None
|
||||||
|
"""
|
||||||
|
global _CONF
|
||||||
with open('config.json') as file:
|
with open('config.json') as file:
|
||||||
_CONF = json.load(file)
|
_CONF = json.load(file)
|
||||||
validate(_CONF, CONF_SCHEMA)
|
validate(_CONF, CONF_SCHEMA)
|
||||||
app(_CONF)
|
app(_CONF)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user