diff --git a/main.py b/main.py index 2a135f0..6aeb1a2 100755 --- a/main.py +++ b/main.py @@ -494,25 +494,35 @@ from bfxbot.currency import Symbol from bfxbot.models import PositionState from strategy import TrailingStopStrategy -dotenv.load_dotenv() -API_KEY = os.getenv("API_KEY") -API_SECRET = os.getenv("API_SECRET") - -bot = BfxBot(api_key=API_KEY, api_secret=API_SECRET) -strategy = TrailingStopStrategy() -bot.set_strategy(Symbol.BTC, strategy) -eh = bot.event_handler(Symbol.BTC) +from flask import Flask, render_template +app = Flask(__name__) -@eh.on_state(PositionState.PROFIT) -def on_min_profit(ss, pw): - print("Minimum profit!") +@app.route('/') +def entry(): + return render_template('index.html') -async def main(): - await bot.start() +# dotenv.load_dotenv() - while True: - await bot.update() +# API_KEY = os.getenv("API_KEY") +# API_SECRET = os.getenv("API_SECRET") + +# bot = BfxBot(api_key=API_KEY, api_secret=API_SECRET) +# strategy = TrailingStopStrategy() +# bot.set_strategy(Symbol.BTC, strategy) +# eh = bot.event_handler(Symbol.BTC) + + +# @eh.on_state(PositionState.PROFIT) +# def on_min_profit(ss, pw): +# print("Minimum profit!") + +# async def main(): +# await bot.start() + +# while True: +# await bot.update() if __name__ == '__main__': - asyncio.run(main()) \ No newline at end of file + # asyncio.run(main()) + app.run() \ No newline at end of file diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..803fd39 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,7 @@ + + + + +Hello world! + +

Rustico - Approved Salento Bot

\ No newline at end of file