mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-23 11:35:14 +00:00
Implement botApi in botstate
This commit is contained in:
parent
2891146673
commit
fc4a266b58
|
@ -75,6 +75,7 @@ export enum BotStoreGetters {
|
||||||
stakeCurrencyDecimals = 'stakeCurrencyDecimals',
|
stakeCurrencyDecimals = 'stakeCurrencyDecimals',
|
||||||
strategyPlotConfig = 'strategyPlotConfig',
|
strategyPlotConfig = 'strategyPlotConfig',
|
||||||
version = 'version',
|
version = 'version',
|
||||||
|
botApiVersion = 'botApiVersion',
|
||||||
sysinfo = 'sysinfo',
|
sysinfo = 'sysinfo',
|
||||||
profit = 'profit',
|
profit = 'profit',
|
||||||
botState = 'botState',
|
botState = 'botState',
|
||||||
|
@ -252,6 +253,9 @@ export function createBotSubStore(botId: string, botName: string) {
|
||||||
[BotStoreGetters.version](state: FtbotStateType): string {
|
[BotStoreGetters.version](state: FtbotStateType): string {
|
||||||
return state.botState?.version || state.version;
|
return state.botState?.version || state.version;
|
||||||
},
|
},
|
||||||
|
[BotStoreGetters.botApiVersion](state: FtbotStateType): number {
|
||||||
|
return state.botState?.api_version || 1.0;
|
||||||
|
},
|
||||||
[BotStoreGetters.sysinfo](state: FtbotStateType): SysInfoResponse | {} {
|
[BotStoreGetters.sysinfo](state: FtbotStateType): SysInfoResponse | {} {
|
||||||
return state.sysinfo;
|
return state.sysinfo;
|
||||||
},
|
},
|
||||||
|
|
|
@ -78,6 +78,8 @@ export interface BidStrategy extends PriceBase {
|
||||||
|
|
||||||
export interface BotState {
|
export interface BotState {
|
||||||
version: string;
|
version: string;
|
||||||
|
/** Api version - was not provided prior to 1.1 (or 2021.11) */
|
||||||
|
api_version?: number;
|
||||||
dry_run: boolean;
|
dry_run: boolean;
|
||||||
trading_mode?: string;
|
trading_mode?: string;
|
||||||
short_allowed?: boolean;
|
short_allowed?: boolean;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user