mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-23 11:35:14 +00:00
Merge branch 'start_trades'
This commit is contained in:
commit
3dae24c16f
|
@ -29,6 +29,14 @@
|
|||
>
|
||||
Forcebuy
|
||||
</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')" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -56,6 +64,8 @@ export default class BotControls extends Vue {
|
|||
|
||||
@ftbot.Action reloadConfig;
|
||||
|
||||
@ftbot.Action startTrade;
|
||||
|
||||
get isTrading(): boolean {
|
||||
return this.botState.runmode === RunModes.LIVE || this.botState.runmode === RunModes.DRY_RUN;
|
||||
}
|
||||
|
|
|
@ -424,6 +424,14 @@ export default {
|
|||
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) {
|
||||
if (tradeid) {
|
||||
const payload = { tradeid };
|
||||
|
|
Loading…
Reference in New Issue
Block a user