Human-written demonstration (OpenAssistant volunteers)· OpenAssistant (human-written)
OpenAssistant Conversations (oasst2)
Write me an API query for the Alpha Vantage API which returns the bollinger bands…
In OpenAssistant data, “assistant” turns were written by human volunteers as demonstrations. They are not model outputs.
- User
Write me an API query for the Alpha Vantage API which returns the bollinger bands calculated over a week and returns the last 5 data points.
- Assistant
Here's an example API query for the Alpha Vantage API that returns the Bollinger Bands calculated over a week and returns the last 5 data points for the symbol "IBM":
import requests url = "https://www.alphavantage.co/query" params = { "function": "BBANDS", "symbol": "IBM", "interval": "weekly", "time_period": 7, "series_type": "close", "apikey": "YOUR_API_KEY" } response = requests.get(url, params=params) if response.status_code == 200: data = response.json() last_five_data_points = data["Technical Analysis: BBANDS"] last_five_data_points = list(last_five_data_points.items())[:5] print(last_five_data_points) else: print("Error: ", response.status_code)Note that you will need to replace "YOUR_API_KEY" with your actual Alpha Vantage API key. Also, make sure to install the
requestslibrary before running this code.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.