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': 1
    }
    
# 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.3.1.tar.gz (4.4 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.3.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: velodata-1.3.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for velodata-1.3.1.tar.gz
Algorithm Hash digest
SHA256 c82861fb680151da87ce22dfbe002cc4e567f77c3c7f16146029a033ec83e1f9
MD5 be65b39b916d21a01248b5e9e3d717a4
BLAKE2b-256 f8d8fec795faf4bc7a5f92b7339aa948213fabb69bf39b2bea38e44187d0de60

See more details on using hashes here.

File details

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

File metadata

  • Download URL: velodata-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for velodata-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 60abf7c49d3c1c82ecbdf88032208455c878e5ee169c18f7a55ff3d432f58497
MD5 178447c024473fcfa906c67239e34be3
BLAKE2b-256 1bdc7dbd8d90b98958ad21acc0de7ed31c8213a30b789616f81377cda913dd2d

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