ethfinex-python
![License](http://img.shields.io/badge/license-MIT-blue.svg)
The unofficial Python client for the Ethfinex and Ethfinex Trustless APIs.
Provided under MIT License by Shane Fontaine.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
I am in no way affiliated with or funded by Ethfinex, Ethfinex Trustless, Ethfinex Inc., Bitfinex, iFinex Inc., Tether, Tether Limited, or any subsidiaries or affiliates of any of the previously mentioned entities.
Functionality
Under Development
- Better error handling
- Tests
Getting Started
This README is documentation on the syntax of the python client presented in this repository. See function docstrings for full syntax details.
This API attempts to present a clean interface to Ethfinex, but in order to use it to its full potential, you must familiarize yourself with the official Ethfinex documentation.
You may manually install the project or use pip:
pip install ethfinex-python
pip install git+git://github.com/shanefontaine/ethfinex-python.git
Public Client
Only some endpoints in the API are available to everyone. The public endpoints can be reached using PublicClient
import ethfinex
public_client = ethfinex.PublicClient()
PublicClient Methods
public_client.get_platform_status()
public_client.get_ticker('tBTCUSD')
public_client.get_trades('tBTCUSD')
public_client.get_trades('tBTCUSD', start=1514764800000, end=1514765700000)
public_client.get_trades('tBTCUSD', start=1514764800000, end=1514765700000, sort=1)
public_client.get_books('tBTCUSD')
public_client.get_books('tBTCUSD', precision='P1')
public_client.get_stats('tBTCUSD', 'funding.size', 'long', 'hist')
public_client.get_stats('tBTCUSD', 'funding.size', 'long', 'hist', sort=1)
public_client.get_candles('tBTCUSD', '1m', 'hist')
public_client.get_candles('tBTCUSD', '1m', 'hist', start=1514764800000, end=1514765700000)
Testing
Unit tests are under development using the pytest framework. Contributions are welcome!
To run the full test suite, in the project directory run:
python -m pytest
Changelog
0.1.2
0.1.1
- Add CI
- Add
public_client
tests
0.1.0
- Fully functional public client.
0.0.1