-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdebug_bajaj.py
More file actions
30 lines (24 loc) Β· 828 Bytes
/
debug_bajaj.py
File metadata and controls
30 lines (24 loc) Β· 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from rover_tools.market_data import MarketDataFetcher
import pandas as pd
def test_ticker():
ticker = "BAJAJ-AUTO.NS"
print(f"Testing {ticker}...")
fetcher = MarketDataFetcher()
# 1. Fetch History
try:
hist = fetcher.fetch_full_history(ticker)
print(f"History: {len(hist)} rows")
if hist.empty:
print("β History is EMPTY")
else:
print("β
History OK")
except Exception as e:
print(f"β History Failed: {e}")
# 2. Fetch Option Chain (Just to see if it works, even though we removed dependency)
try:
oc = fetcher.fetch_option_chain(ticker)
print(f"Option Chain: {oc is not None}")
except Exception as e:
print(f"β Option Chain Failed: {e}")
if __name__ == "__main__":
test_ticker()