Metadata-Version: 2.1
Name: velodata
Version: 0.1.1.9
Summary: Python library for interacting with the Velo Data API
Author-Email: Velo Data <support@velodata.app>
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Project-URL: Github, https://github.com/velodataorg/velo-python
Project-URL: Docs, https://velodata.gitbook.io/velo-data-api/nodejs
Requires-Python: >=3.0
Description-Content-Type: text/markdown

# velo-python
Python library for Velo API access see full documentation [here](https://velodata.gitbook.io/velo-data-api/nodejs).

## Install
```
pip install velodata
```

## Usage
```python
import time, math
from velodata import lib as velo

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

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

# last 10 minutes in 1 minute resolution
params = {
      'type': 'futures',
      'columns': ['open_price', 'close_price'],
      'exchanges': [future['exchange']],
      'products': [future['product']],
      'begin': math.floor(time.time() * 1000) - 1000 * 60 * 11,
      'end': math.floor(time.time() * 1000),
      '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:


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

## License
Copyright 2023 Velo Data, license MIT
