tailwind #9
42
main.py
42
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())
|
||||
# asyncio.run(main())
|
||||
app.run()
|
7
templates/index.html
Normal file
7
templates/index.html
Normal file
@ -0,0 +1,7 @@
|
||||
<!doctype html>
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
|
||||
<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
|
||||
|
||||
<title>Hello world!</title>
|
||||
|
||||
<h1>Rustico - Approved Salento Bot</h1>
|
Loading…
Reference in New Issue
Block a user