mirror of https://github.com/ghostfolio/ghostfolio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
748 B
27 lines
748 B
import { LookupItem } from '@ghostfolio/api/app/symbol/interfaces/lookup-item.interface';
|
|
import { Granularity } from '@ghostfolio/common/types';
|
|
import { DataSource } from '@prisma/client';
|
|
|
|
import {
|
|
IDataProviderHistoricalResponse,
|
|
IDataProviderResponse
|
|
} from '../../interfaces/interfaces';
|
|
|
|
export interface DataProviderInterface {
|
|
canHandle(symbol: string): boolean;
|
|
|
|
get(aSymbols: string[]): Promise<{ [symbol: string]: IDataProviderResponse }>;
|
|
|
|
getHistorical(
|
|
aSymbols: string[],
|
|
aGranularity: Granularity,
|
|
from: Date,
|
|
to: Date
|
|
): Promise<{
|
|
[symbol: string]: { [date: string]: IDataProviderHistoricalResponse };
|
|
}>;
|
|
|
|
getName(): DataSource;
|
|
|
|
search(aSymbol: string): Promise<{ items: LookupItem[] }>;
|
|
}
|
|
|