Update managing api client
This commit is contained in:
@@ -337,46 +337,6 @@ export class BacktestClient extends AuthorizedApiBase {
|
||||
return Promise.resolve<Backtest>(null as any);
|
||||
}
|
||||
|
||||
backtest_DeleteBacktests(): Promise<FileResponse> {
|
||||
let url_ = this.baseUrl + "/Backtest/deleteAll";
|
||||
url_ = url_.replace(/[?&]$/, "");
|
||||
|
||||
let options_: RequestInit = {
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
"Accept": "application/octet-stream"
|
||||
}
|
||||
};
|
||||
|
||||
return this.transformOptions(options_).then(transformedOptions_ => {
|
||||
return this.http.fetch(url_, transformedOptions_);
|
||||
}).then((_response: Response) => {
|
||||
return this.processBacktest_DeleteBacktests(_response);
|
||||
});
|
||||
}
|
||||
|
||||
protected processBacktest_DeleteBacktests(response: Response): Promise<FileResponse> {
|
||||
const status = response.status;
|
||||
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
||||
if (status === 200 || status === 206) {
|
||||
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
||||
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
||||
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
||||
if (fileName) {
|
||||
fileName = decodeURIComponent(fileName);
|
||||
} else {
|
||||
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
||||
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
||||
}
|
||||
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
||||
} else if (status !== 200 && status !== 204) {
|
||||
return response.text().then((_responseText) => {
|
||||
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
||||
});
|
||||
}
|
||||
return Promise.resolve<FileResponse>(null as any);
|
||||
}
|
||||
|
||||
backtest_Run(accountName: string | null | undefined, botType: BotType | undefined, ticker: Ticker | undefined, scenarioName: string | null | undefined, timeframe: Timeframe | undefined, watchOnly: boolean | undefined, balance: number | undefined, moneyManagementName: string | null | undefined, startDate: Date | undefined, endDate: Date | undefined, save: boolean | undefined, moneyManagement: MoneyManagement | undefined): Promise<Backtest> {
|
||||
let url_ = this.baseUrl + "/Backtest/Run?";
|
||||
if (accountName !== undefined && accountName !== null)
|
||||
@@ -2542,6 +2502,52 @@ export enum Ticker {
|
||||
SHIB = "SHIB",
|
||||
STX = "STX",
|
||||
ORDI = "ORDI",
|
||||
APT = "APT",
|
||||
BOME = "BOME",
|
||||
MEME = "MEME",
|
||||
FLOKI = "FLOKI",
|
||||
MEW = "MEW",
|
||||
TAO = "TAO",
|
||||
BONK = "BONK",
|
||||
WLD = "WLD",
|
||||
TBTC = "tBTC",
|
||||
WBTC_b = "WBTC_b",
|
||||
EIGEN = "EIGEN",
|
||||
SUI = "SUI",
|
||||
SEI = "SEI",
|
||||
USDC_e = "USDC_e",
|
||||
DAI = "DAI",
|
||||
TIA = "TIA",
|
||||
TRX = "TRX",
|
||||
TON = "TON",
|
||||
PENDLE = "PENDLE",
|
||||
WstETH = "wstETH",
|
||||
USDe = "USDe",
|
||||
SATS = "SATS",
|
||||
POL = "POL",
|
||||
XLM = "XLM",
|
||||
BCH = "BCH",
|
||||
ICP = "ICP",
|
||||
RENDER = "RENDER",
|
||||
INJ = "INJ",
|
||||
TRUMP = "TRUMP",
|
||||
MELANIA = "MELANIA",
|
||||
ENA = "ENA",
|
||||
FARTCOIN = "FARTCOIN",
|
||||
AI16Z = "AI16Z",
|
||||
ANIME = "ANIME",
|
||||
BERA = "BERA",
|
||||
VIRTUAL = "VIRTUAL",
|
||||
PENGU = "PENGU",
|
||||
ONDO = "ONDO",
|
||||
FET = "FET",
|
||||
AIXBT = "AIXBT",
|
||||
CAKE = "CAKE",
|
||||
S = "S",
|
||||
JUP = "JUP",
|
||||
HYPE = "HYPE",
|
||||
OM = "OM",
|
||||
DOLO = "DOLO",
|
||||
Unknown = "Unknown",
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user