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
Release history Release notifications | RSS feed
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)
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9deacadcedbde58e8ac1e632138fcfaf66f96a2bbaecf8aa47005d7ef1158f38 |
|
MD5 | e82f845744172e6438fffbab71da9368 |
|
BLAKE2b-256 | 8ac5489ea837ea46a3e69af8ea3864ef6f3410d8789a506693f49e910546bc88 |
Provenance
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fc9f91a7a378130eeeffc579eb8c1e2ce7d167814f620e063fd5f527a2cc501 |
|
MD5 | 3d85dbbf6726d749fd67cbfb6fd46d7d |
|
BLAKE2b-256 | 7374055babcf4594370b8d858d79e8b6bb7a3a73232ecae9b79ab62b4bb9fddf |