From 34bf5195a95b2a2bae5b62b3e8fdaeead3fe6a90 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Thu, 23 Feb 2023 17:06:28 -0800 Subject: [PATCH] setting up more logic --- run.py | 2 +- totrader/routes/meta.py | 6 +++++- totrader/templates/index.html | 17 ++++++++++++++--- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/run.py b/run.py index ec5ba12..ff50033 100644 --- a/run.py +++ b/run.py @@ -4,4 +4,4 @@ from totrader.factory import create_app app = create_app() if __name__ == '__main__': - app.run() + app.run(debug=True) diff --git a/totrader/routes/meta.py b/totrader/routes/meta.py index a891b19..95bfb3f 100644 --- a/totrader/routes/meta.py +++ b/totrader/routes/meta.py @@ -2,10 +2,14 @@ from quart import Blueprint, render_template from totrader.models import * +from totrader.tasks import trader bp = Blueprint('meta', 'meta') @bp.route('/') async def index(): - return await render_template('index.html') + return await render_template( + 'index.html', + trade_currency=trader.trade_currency + ) diff --git a/totrader/templates/index.html b/totrader/templates/index.html index 2fae02f..a9e4a37 100644 --- a/totrader/templates/index.html +++ b/totrader/templates/index.html @@ -19,15 +19,19 @@ constructor(props) { super(props); this.state = { - store_market_data: false + looping: false } } render() { return(
-

sup shitbird

-

literally nobody likes you

+

we trade a lil {{ trade_currency }}

+ { + this.state.looping &&

market making is started

+ || +

market making is paused

+ }
) } @@ -46,4 +50,11 @@ // setInterval(function() { // fetch('{{ url_for("tasks.store_ticker_data") }}'); // }, 10000) + + // store market data - 10s + // update balances - 30s + // update bitcoin price - 120s + // update order status - 30s + // get trade history - 60s + \ No newline at end of file