Skip to main content

A tiny python API wrapper for onvista.de financial website.

Project description

pyonvista

A tiny python wrapper to the non-public onvista.de REST-Api.

As the API is not public user shall assume that the usage of this package harms the website user agreements. However, this version now avoids any web scrapping for metadata.

You can search for an instrument and get its quote data. The quote data can be limit by resolution and date.

The wrapper now also works with instruments other than stocks. Also for example data from ETF can be requested.

Im not planing to add other API Endpoints at the moment as long as nobody gives me a good reason for this.

Additionally the wrapper now is asynchronous. User should be aware of asyncio or async programming.

Installation

pip install pyonvista

Usage

import asyncio
import aiohttp
import pprint

from pyonvista import PyOnVista

async def main():
    client = aiohttp.ClientSession()
    api = PyOnVista()
    await api.install_client(client)
    async with client:
        instruments = await api.search_instrument("VW")
        instrument = await api.request_instrument(instruments[0])
        quotes = await api.request_quotes(instrument, )
        pprint.pprint(instrument)
        pprint.pprint(quotes[:3])
        # prints a lot of information of VW Stonk
        # try a etf
        instruments = await api.search_instrument(key="IE00B42NKQ00")
        quotes = await api.request_quotes(instruments[0])
    pprint.pprint(quotes[0].instrument)

    await client.close()
    await asyncio.sleep(.1)

if __name__ == '__main__':
    asyncio.run(main())

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

pyonvista-0.8.4.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyonvista-0.8.4-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file pyonvista-0.8.4.tar.gz.

File metadata

  • Download URL: pyonvista-0.8.4.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.10

File hashes

Hashes for pyonvista-0.8.4.tar.gz
Algorithm Hash digest
SHA256 0fbfa5f9428ce44431bbef6a4813466a4f6c46f2558eae6e37e4077136d27eab
MD5 8e3903bf578bbcd9aa5da8f9729e4aa3
BLAKE2b-256 dbc8ad0bdaef48638c04c4dde1d91564ac6d76324a45e4352a71fae39e14e452

See more details on using hashes here.

File details

Details for the file pyonvista-0.8.4-py3-none-any.whl.

File metadata

  • Download URL: pyonvista-0.8.4-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.10

File hashes

Hashes for pyonvista-0.8.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8a5fcad6b3f3bbd1b5e01451a697e9c80aeee8fd726d41e21d41827f51f6e839
MD5 14cab8d969df8ee5a2d4bd10c94943ea
BLAKE2b-256 cdde629e9f7a8a74f5293925a9580784a889c927f6433f9aa0143710327d6bda

See more details on using hashes here.

Supported by

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