Automate issuer overlay creation from ticker searches
This commit is contained in:
@@ -3,12 +3,12 @@ const QUOTE_CACHE_TTL_MS = 1000 * 60;
|
||||
const PRICE_HISTORY_CACHE_TTL_MS = 1000 * 60 * 15;
|
||||
const FAILURE_CACHE_TTL_MS = 1000 * 30;
|
||||
|
||||
export type QuoteResult = {
|
||||
type QuoteResult = {
|
||||
value: number | null;
|
||||
stale: boolean;
|
||||
};
|
||||
|
||||
export type PriceHistoryResult = {
|
||||
type PriceHistoryResult = {
|
||||
value: Array<{ date: string; close: number }> | null;
|
||||
stale: boolean;
|
||||
};
|
||||
@@ -95,7 +95,7 @@ export async function getQuote(ticker: string): Promise<QuoteResult> {
|
||||
}
|
||||
}
|
||||
|
||||
export async function getQuoteOrNull(ticker: string): Promise<number | null> {
|
||||
async function getQuoteOrNull(ticker: string): Promise<number | null> {
|
||||
const result = await getQuote(ticker);
|
||||
return result.value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user