Skip to main content

The Bavest Finance Python SDK

Project description

posthoglogo

Bavest Finance SDK

The Bavest Finance SDK is an open-source library to create finance products in weeks. Bavest offers:

  • Financial api with 99.999% uptime
  • Easy to integrate and use
  • Free for open-source projects

Get started for free

Personal API key

First, you need to create an account on Bavest. After registration, you will find your api key in the dashboard.

Open-Source projects

If you are working on an open-source project, you can use the SDK for free. Just send us an email to support@bavest.co with the following information:

  • Your GitHub username
  • The name of your project
  • The link to your project on GitHub
  • A description of your project

Install the package

First install the python package:

pip install bavest 

Usage

  1. Now, use the package in your project:
from bavest import BavestRESTClient
  1. Create a finance client:
client = BavestRestClient(apiKey)
  1. Now you can use it to get data from the api:
quote = client.quote("AAPL")

Examples

to = datetime.now()
frm = to + dateutil.relativedelta.relativedelta(days=-20)
resolution = Resolution.MONTHLY
candles = client.candles(symbol, frm, to, resolution)
news = client.news(symbol)
search = client.search(symbol)
forex = client.forex(frm, to)

# ETF
etfSector = client.etf.sector(symbol)
etfCountry = client.etf.country(symbol)
etfHoldings = client.etf.holdings(symbol)
etfProfile = client.etf.profile(symbol)

# Portfolio Items
transactionItem = TransactionItem("MSFT", 2, frm).get()
transactionList = [transactionItem]

portfolioRegion = client.portfolio.region(transactionList)
portfolioStats = client.portfolio.stats(frm, to, resolution, transactionList, "USD")
portfolioChart = client.portfolio.chart(frm, to, resolution, transactionList)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bavest-1.0.0.tar.gz (15.3 kB view hashes)

Uploaded Source

Built Distribution

bavest-1.0.0-py3-none-any.whl (35.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page