21 lines
462 B
Python
21 lines
462 B
Python
from abc import ABC, abstractmethod
|
|
import pandas as pd
|
|
|
|
class DataProvider(ABC):
|
|
@abstractmethod
|
|
def get_ticker(self, ticker: str):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def get_historical(self, ticker: str, start: str, end: str) -> pd.DataFrame:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def get_current(self, ticker: str) -> float:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def convert_ticker_symbol_to_gsheets_header(self, ticker: str) -> str:
|
|
pass
|
|
|