Skip to main content

Simple to use wrappers for the Bitfinex web socket api

Project description

btfx-trader

https://img.shields.io/pypi/v/btfx_trader.svg https://travis-ci.org/sentrip/btfx-trader.svg?branch=master Documentation Status https://codecov.io/gh/sentrip/btfx-trader/branch/master/graph/badge.svg Updates

Simple to use wrappers for Bitfinex’s web socket api

Features

  • Access to cryptocurrency data with an API similar to queue.Queue

  • Simple trading API that responds to account data

Installation

To install btfx-trader, run this command in your terminal:

pip install btfx-trader

Usage

To use public data:

from btfx_trader import PublicData

q = PublicData(types=['tickers'], symbols=['BTCUSD'])
q.connect()

while True:
    data = q.get('tickers', 'BTCUSD')

To make an order:

from btfx_trader import Trader

trader = Trader('YOUR_BITFINEX_KEY', 'YOUR_BITFINEX_SECRET')
trader.connect()
# Order 0.01 BTC at $10000 per bitcoin
order_id = trader.order('BTCUSD', 10000, dollar_amount=100)

To cancel an order:

# for a single order
trader.cancel(order_id)
# for multiple orders
trader.cancel_all(older_than=10)

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.6 (2018-10-15)

  • Fix btfxwss dependency update error

0.1.5 (2018-06-04)

  • Fix rendering of docs

0.1.4 (2018-06-04)

  • Updated README

0.1.3 (2018-05-28)

  • Updated codecov config to only run with travis-ci builds.

0.1.2 (2018-05-27)

  • Added codecov to docs.

0.1.1 (2018-05-27)

  • Fixed rendering of readme on pypi.

0.1.0 (2018-05-25)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

btfx_trader-0.1.6.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

btfx_trader-0.1.6-py2.py3-none-any.whl (9.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file btfx_trader-0.1.6.tar.gz.

File metadata

  • Download URL: btfx_trader-0.1.6.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

File hashes

Hashes for btfx_trader-0.1.6.tar.gz
Algorithm Hash digest
SHA256 6f4b6b926123a9bbe910bdf7f6be4e555bbd28e647dbe4b940c70022d659797c
MD5 ee78fb4408e41f655cb8d752ba096d75
BLAKE2b-256 caa02af92f292837db5091041b50b4b8c83b9b4433ddf93ed22d38284a7b147f

See more details on using hashes here.

File details

Details for the file btfx_trader-0.1.6-py2.py3-none-any.whl.

File metadata

  • Download URL: btfx_trader-0.1.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

File hashes

Hashes for btfx_trader-0.1.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 00f448f827af91c49b98690ac236dd0bf067309cc668c6639c3182a1add4c442
MD5 712530b9f36e753689905aa852a1d730
BLAKE2b-256 789ed33c93c14d965eecb547e6347c3f82fdd3181b2f9cd98a6873c825383bc9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page