Snippets??

  • task I need code snippets for all market API so I get comfortable with them.
import yfinance as yf
import pandas as pd
 
class YahooFinanceAdaptor:
 
    def __init__(self, sym: str):
        self.symbol = sym
        pass
 
    def get_history(self):
 
        data = yf.Ticker(self.symbol)
        return data.history(period="2y", interval="1h")