Spaces:
Running
Running
Update src/app.py
Browse files- src/app.py +1 -0
src/app.py
CHANGED
|
@@ -54,6 +54,7 @@ def generate_option_contract_id(ticker, exp_date, option_type, strike_price):
|
|
| 54 |
|
| 55 |
return contract_id # Ensure the total length does not exceed 11 characters
|
| 56 |
|
|
|
|
| 57 |
def extract_raw_data(contract , interval, timeframe, startdate ,enddate):
|
| 58 |
url = f"https://api.polygon.io/v2/aggs/ticker/O:{contract}/range/{interval}/{timeframe}/{startdate}/{enddate}?apiKey={Polygon_API_Key}"
|
| 59 |
|
|
|
|
| 54 |
|
| 55 |
return contract_id # Ensure the total length does not exceed 11 characters
|
| 56 |
|
| 57 |
+
@pn.cache
|
| 58 |
def extract_raw_data(contract , interval, timeframe, startdate ,enddate):
|
| 59 |
url = f"https://api.polygon.io/v2/aggs/ticker/O:{contract}/range/{interval}/{timeframe}/{startdate}/{enddate}?apiKey={Polygon_API_Key}"
|
| 60 |
|