-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbot.py
More file actions
31 lines (22 loc) · 822 Bytes
/
Copy pathbot.py
File metadata and controls
31 lines (22 loc) · 822 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
27
28
29
30
31
# -*- coding: utf-8 -*-
import argparse
import config
from htxbot.app import HtxFuturesBot
from htxbot.combined import CombinedHtxFuturesBot
from htxbot.models import TradeState
__all__ = ["CombinedHtxFuturesBot", "HtxFuturesBot", "TradeState", "config", "main"]
def parse_args():
parser = argparse.ArgumentParser(description="Run HTX long and short futures profiles in one process.")
parser.add_argument(
"--profiles",
default="",
help="Comma-separated profile names to run. Default is BOT_PROFILES or long,short.",
)
return parser.parse_args()
def main():
args = parse_args()
profiles = tuple(item.strip() for item in args.profiles.split(",") if item.strip())
bot = CombinedHtxFuturesBot(profiles=profiles)
bot.run()
if __name__ == "__main__":
main()