Git Product home page Git Product logo

mindsdb2024's Introduction

Quick Start Guide for the OpenBB Data API

This guide is intended to provide some starting points for querying data from the OpenBB API. Please refer to the API documentation page here for more detail.

Some of the uses for the available data are:

  • Training a model
  • Testing a hypothesis
  • Building trading strategies
  • Market and macroeconomic forecasting
  • Due diligence of individual companies
  • Interactive dashboards and reports

API Authorization

The API requires encoding the username and password as a Base64 string, added to the headers in every request. Adjust the Python syntax below for your specific system.

User: openbb Password: mindsdb2024

import base64
import requests

msg = "openbb:mindsdb2024"
msg_bytes = msg.encode("ascii")
base64_bytes = base64.b64encode(msg_bytes)
base64_msg = base64_bytes.decode("ascii")

symbol="SPY"
url = f"http://mindsdb2024.openbb.dev/api/v1/equity/price/quote?provider=intrinio&symbol={symbol}&source=intrinio_mx"
headers = {"accept": "application/json", "Authorization": f"Basic {base64_msg}"}

response = requests.get(url=url, headers=headers)

response.json()

Curl Request

! curl -X 'GET' \
  'https://mindsdb2024.openbb.dev/api/v1/economy/cpi?provider=fred&countries=australia&countries=china&units=growth_same&frequency=annual&harmonized=false' \
  -H 'accept: application/json' \
  -H 'Authorization: Basic b3BlbmJiOm1pbmRzZGIyMDI0'

Swagger Docs and Parameters

  • The API has Swagger documention that is available at this url: http://mindsdb2024.openbb.dev/docs

  • The docs page shows all avaialble endpoints and their parameters.

  • The openapi.json file is located here

  • Requests made with invalid parameter names will be ignored.

  • Data sources (provider) are entered as a choice of: ["benzinga", "intrinio", "fmp", "fred", "sec"] to the provider parameter of any endpoint.

  • Parameters with only one choice do not need to be defined.

  • Supply lists of symbols as a string - symbols = "AAPL,MSFT,NFLX,GOOG,AMZN" - but not every function is equipped for multi-ticker requests.

  • Date parameters should be defined as: "YYYY-MM-DD"

  • Functions with a limit or page_size parameter may have a default state that does not return all results. Set this parameter as an integer.

Example Endpoints

mindsdb2024's People

Contributors

deeleeramone avatar

Watchers

James Maslek avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.