add history interface

This commit is contained in:
hackerESQ
2024-09-09 20:50:18 -05:00
parent 23047d976e
commit 3284a31bb1
4 changed files with 62 additions and 0 deletions
@@ -63,4 +63,19 @@ class FakeMarketData implements MarketDataInterface
],
]);
}
public function history($symbol, $startDate, $endDate): Collection
{
for ($i = 0; $i < 14; $i++) {
$series[] = [
'symbol' => $symbol,
'date' => now()->subDays($i)->format('Y-m-d'),
'close' => (float) rand(1, 100),
];
}
return collect($series);
}
}