setting up more logic
This commit is contained in:
parent
7883ce031c
commit
34bf5195a9
2
run.py
2
run.py
|
@ -4,4 +4,4 @@ from totrader.factory import create_app
|
||||||
app = create_app()
|
app = create_app()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run()
|
app.run(debug=True)
|
||||||
|
|
|
@ -2,10 +2,14 @@
|
||||||
from quart import Blueprint, render_template
|
from quart import Blueprint, render_template
|
||||||
|
|
||||||
from totrader.models import *
|
from totrader.models import *
|
||||||
|
from totrader.tasks import trader
|
||||||
|
|
||||||
|
|
||||||
bp = Blueprint('meta', 'meta')
|
bp = Blueprint('meta', 'meta')
|
||||||
|
|
||||||
@bp.route('/')
|
@bp.route('/')
|
||||||
async def index():
|
async def index():
|
||||||
return await render_template('index.html')
|
return await render_template(
|
||||||
|
'index.html',
|
||||||
|
trade_currency=trader.trade_currency
|
||||||
|
)
|
||||||
|
|
|
@ -19,15 +19,19 @@
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
store_market_data: false
|
looping: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return(
|
return(
|
||||||
<div>
|
<div>
|
||||||
<h1>sup shitbird</h1>
|
<h1>we trade a lil {{ trade_currency }}</h1>
|
||||||
<p>literally nobody likes you</p>
|
{
|
||||||
|
this.state.looping && <p>market making is started</p>
|
||||||
|
||
|
||||||
|
<p>market making is paused</p>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -46,4 +50,11 @@
|
||||||
// setInterval(function() {
|
// setInterval(function() {
|
||||||
// fetch('{{ url_for("tasks.store_ticker_data") }}');
|
// fetch('{{ url_for("tasks.store_ticker_data") }}');
|
||||||
// }, 10000)
|
// }, 10000)
|
||||||
|
|
||||||
|
// store market data - 10s
|
||||||
|
// update balances - 30s
|
||||||
|
// update bitcoin price - 120s
|
||||||
|
// update order status - 30s
|
||||||
|
// get trade history - 60s
|
||||||
|
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue