mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-27 13:35:17 +00:00
Merge branch 'start_trades'
This commit is contained in:
commit
3dae24c16f
|
@ -29,6 +29,14 @@
|
||||||
>
|
>
|
||||||
Forcebuy
|
Forcebuy
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
v-if="botState.runmode === 'webserver'"
|
||||||
|
:disabled="isTrading"
|
||||||
|
class="btn-primary col-md-5 m-1"
|
||||||
|
@click="startTrade()"
|
||||||
|
>
|
||||||
|
Start Trading
|
||||||
|
</button>
|
||||||
<ForceBuyForm :modal-show="forcebuyShow" @close="this.$bvModal.hide('forcebuy-modal')" />
|
<ForceBuyForm :modal-show="forcebuyShow" @close="this.$bvModal.hide('forcebuy-modal')" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -56,6 +64,8 @@ export default class BotControls extends Vue {
|
||||||
|
|
||||||
@ftbot.Action reloadConfig;
|
@ftbot.Action reloadConfig;
|
||||||
|
|
||||||
|
@ftbot.Action startTrade;
|
||||||
|
|
||||||
get isTrading(): boolean {
|
get isTrading(): boolean {
|
||||||
return this.botState.runmode === RunModes.LIVE || this.botState.runmode === RunModes.DRY_RUN;
|
return this.botState.runmode === RunModes.LIVE || this.botState.runmode === RunModes.DRY_RUN;
|
||||||
}
|
}
|
||||||
|
|
|
@ -424,6 +424,14 @@ export default {
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async startTrade() {
|
||||||
|
try {
|
||||||
|
const res = await api.post('/start_trade', {});
|
||||||
|
return Promise.resolve(res);
|
||||||
|
} catch (error) {
|
||||||
|
return Promise.reject(error);
|
||||||
|
}
|
||||||
|
},
|
||||||
async forcesell({ dispatch }, tradeid: string) {
|
async forcesell({ dispatch }, tradeid: string) {
|
||||||
if (tradeid) {
|
if (tradeid) {
|
||||||
const payload = { tradeid };
|
const payload = { tradeid };
|
||||||
|
|
Loading…
Reference in New Issue
Block a user