-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
26 lines (21 loc) · 750 Bytes
/
main.py
File metadata and controls
26 lines (21 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import argparse
import os
import sys
# Delay import of Orchestrator until after config is set
import argparse
import yaml
from pathlib import Path
def main():
"""Main function to run the trading bot."""
parser = argparse.ArgumentParser(description='Run the trading bot.')
parser.add_argument('--test', action='store_true', help='Run in test mode')
args = parser.parse_args()
if args.test:
print("Running in TEST mode")
os.environ['CONFIG_PATH'] = os.path.abspath('config.test.yaml')
# Import Orchestrator after setting env var
from trading_bot.orchestrator import Orchestrator
orchestrator = Orchestrator(backtesting=args.test)
orchestrator.run()
if __name__ == "__main__":
main()