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.7.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

velodata-1.7.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for velodata-1.7.1.tar.gz
Algorithm Hash digest
SHA256 6fc349ec0d9dd325a11308aaacb8a11b0abe6d4e77f965f68f96eb0788ee756f
MD5 a151aa2279c3aa93a889d8fcf02a48d0
BLAKE2b-256 3c72efc413247b85104ab53077bc496de8fa8d87c47821c999c91b0c11b9a573

See more details on using hashes here.

File details

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

File metadata

  • Download URL: velodata-1.7.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 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.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 846855369bcc4970ab046f473cc8eee6f35d838a62946feb64b87589e8bd39d2
MD5 dd4e48cce8406435cdabf7c48a8c5c89
BLAKE2b-256 71d229c9a905da5f5fca27ed16956583aaa37ce2128e8b3d4349313dfaf45f2e

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