Getting Started
1. Install
Install Velo's Python SDK
pip install velodata2. API Key
Before you can make a request, you need a Velo API key. Here are details on getting an API key:
- Velo API keys are available at $199/mo.
- Subscriptions are payable monthly (3 month history) or yearly (full data history).
- Please see the pricing page in the web app to get a key or send us an email to support@velo.xyz to request a trial.
3. Making a request
Create a client, select a futures product and columns, then request the rows as a dataframe.
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))