Freeze historical datasets and qualify backtest instrument identities
This commit is contained in:
parent
63c3856797
commit
d6b09eb635
43 changed files with 2249 additions and 1230 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { Hono, type Handler } from 'hono';
|
||||
import { z } from 'zod';
|
||||
import { defined } from '@stock-bot/invariants';
|
||||
import { HistoricalDataRequestError } from '@stock-bot/types';
|
||||
import { parseBacktestRequest } from '../../backtest/BacktestRunner';
|
||||
import { BacktestCancelledError } from '../../backtest/execution-engine';
|
||||
import { BacktestConflictError } from '../../backtest/run-repository';
|
||||
|
|
@ -43,6 +44,9 @@ export function createBacktestRoutes(container: IServiceContainer): Hono {
|
|||
400
|
||||
);
|
||||
}
|
||||
if (error instanceof HistoricalDataRequestError) {
|
||||
return c.json({ error: error.message }, 400);
|
||||
}
|
||||
|
||||
container.logger.error('Error running backtest:', error);
|
||||
return c.json(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue