-
Notifications
You must be signed in to change notification settings - Fork 1
/
crypto_alerts.py
26 lines (21 loc) · 1.04 KB
/
crypto_alerts.py
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 configparser
from binance.client import Client
from candle_fetcher import BinanceFetcher
from candle_fetcher import BitstampFetcher
from candle_notifier import BinanceCandleNotifier
from alerts.signal_listener import SignalListener
from alerts.heiken_ashi_mtfa import HeikenAshiMTFA
from alerts.high_of_low_bar import HighOfLowBar
from alerts.oversold_bounce import OversoldBounce
# Loading keys from config file
config = configparser.ConfigParser()
config.read_file(open("secret.cfg"))
actual_api_key = config.get("BINANCE", "ACTUAL_API_KEY")
actual_secret_key = config.get("BINANCE", "ACTUAL_SECRET_KEY")
client = Client(api_key=actual_api_key, api_secret=actual_secret_key, tld="us")
candle_fetcher = BinanceFetcher(client)
candle_notifier = BinanceCandleNotifier(client, "btcusdt")
signal_listener = SignalListener()
HeikenAshiMTFA("BTCUSD", candle_fetcher, candle_notifier, signal_listener)
OversoldBounce("BTCUSD", "5m", candle_fetcher, candle_notifier, signal_listener)
HighOfLowBar("ADABTC", "1h", candle_fetcher, candle_notifier, signal_listener)