Skip to main content

Python library for interacting with the Velo Data API

Project description

velo-python

Python library for Velo API access. See full documentation here.

Install

pip install velodata

Usage

from velodata import lib as velo

# new velo client
client = velo.client('api_key')

# get futures and pick one
future = client.get_futures()[0] 

# get futures columns and pick two
columns = client.get_futures_columns()[:2]

# last 10 minutes in 1 minute resolution
params = {
      'type': 'futures',
      'columns': columns,
      'exchanges': [future['exchange']],
      'products': [future['product']],
      'begin': client.timestamp() - 1000 * 60 * 11,
      'end': client.timestamp(),
      'resolution': '1m'
    }
    
# returns dataframe
print(client.get_rows(params))

Streaming rows

Row requests are broken up into batches past a certain size. If you don't want to wait for all your requests to finish before receiving any data, you can use this:

batches = client.batch_rows(params)  
for df in client.stream_rows(batches):
  print(df)

License

Copyright 2023 Velo Data, license MIT

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

velodata-1.5.5.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

velodata-1.5.5-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file velodata-1.5.5.tar.gz.

File metadata

  • Download URL: velodata-1.5.5.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for velodata-1.5.5.tar.gz
Algorithm Hash digest
SHA256 9deacadcedbde58e8ac1e632138fcfaf66f96a2bbaecf8aa47005d7ef1158f38
MD5 e82f845744172e6438fffbab71da9368
BLAKE2b-256 8ac5489ea837ea46a3e69af8ea3864ef6f3410d8789a506693f49e910546bc88

See more details on using hashes here.

File details

Details for the file velodata-1.5.5-py3-none-any.whl.

File metadata

  • Download URL: velodata-1.5.5-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for velodata-1.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4fc9f91a7a378130eeeffc579eb8c1e2ce7d167814f620e063fd5f527a2cc501
MD5 3d85dbbf6726d749fd67cbfb6fd46d7d
BLAKE2b-256 7374055babcf4594370b8d858d79e8b6bb7a3a73232ecae9b79ab62b4bb9fddf

See more details on using hashes here.

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