A Luno API for Python
Project description
pyluno
Luno API for python
Installation
pip install pyluno
Usage
See the tests for detailed usage examples, but basically:
API object creation
from pyluno.api import Luno api = Luno(key, secret, options)
Where options is dictions and can have any of the following keys and associated values:
option key |
description |
default |
---|---|---|
hostname |
the API host |
api.mybitx .com |
port |
the TCP port to attach to |
443 |
pair |
The currency pair to provide results for |
XBTZAR |
ca |
The root certificate |
None |
timeout |
The maximum time to wait for requests |
30 (s) |
maxRate |
The maximum number of calls per second. Set to None to deactivate |
1 |
maxBurst |
Number of call that can be made without being rate limited. After this number is exceeded the accumulated time is waited. Set to 1 to deactivate bursts. Irrelevant if maxRate is None |
5 |
API calls
Latest ticker
api.get_ticker()
Returns: dictionary containing the latest ticker values
All tickers
api.get_all_tickers()
Returns: dictionary containing the latest ticker values for all currency pairs
Known Issues
Rates published on the Luno website aren’t accurate- your milliage may vary
Not all error handling has been handled
Acknowledgements
This repo was called pybitc and made by @CjS77. It has since been updated and adapted and gone though a name change
To Do
Tests for some of the endpoints needing dynamic reponses
Tests for the rate limiter
Contribute
Fork it
Contribute
Be Awesome
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
Built Distribution
Hashes for pyluno-0.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b8707db445be756816e7f336eecb3bfe7317ff8f0a01aea1a72b2c981b4ca01 |
|
MD5 | fa9dcae10dcc5184d29fc519f71a3dda |
|
BLAKE2b-256 | 5ecebdd47f928bd75a363d70b05e90c9705e718b7a632e2909a76b289b368393 |