MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / get_json_data

Function get_json_data

bmtools/tools/stock/api.py:25–29  ·  view source on GitHub ↗
(function, symbol, interval = '5min', adjusted='true', outputsize='compact', datatype='json')

Source from the content-addressed store, hash-verified

23 BASE_URL = 'https://www.alphavantage.co/query?'
24
25 def get_json_data(function, symbol, interval = '5min', adjusted='true', outputsize='compact', datatype='json'):
26 url = BASE_URL + 'function=' + function + '&symbol=' + symbol + '&apikey=' + KEY
27 r = requests.get(url)
28 data = json.loads(r.text)
29 return data
30
31 @tool.get("/get_today_date")
32 def get_today_date():

Callers 1

get_daily_pricesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected