Skip to main content

CRIX.IO official client

Project description

CRIX.io official client

PyPI - License PyPI PyPI - Wheel Documentation Status

This official client of CRIX.io crypto exchange. Supports both synchronous and asynchronous approach

Environment requirements:

  • python 3.6+
  • requests 2.*

For several operations like create/cancel orders you should also be registered in the exchange and got BOT API token and secret.

To access historical data you should get explicit permission by exchange support.

Installation

  • over pip: pip install crix
  • manually (dev): pip install git+https://github.com/blockwise/crix-client-py.git#egg=crix

Sample usage

Unauthorized (public) access

import crix

client = crix.Client(env='prod')

# get all symbols
for symbol in client.fetch_markets():
    print(symbol)

# get some order book
depth = client.fetch_order_book('BTC_BCH')
print(depth)

Authorized (clients-only) access

BOT API token and secret are required

import crix
from crix.models import NewOrder

client = crix.AuthorizedClient(
    env='prod',
    token='xxyyzz',
    secret='aabbcc'
) # replace token and secret value for your personal API credentials


# list all open orders
for order in client.fetch_open_orders('BTC_BCH'):
    print(order)

# prepare order
new_order = NewOrder.market('BTC_BCH', is_buy=True, quantity=0.1) # or use NewOrder constructor
# place order
order = client.create_order(new_order)
print(order)

Project details


Download files

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

Files for crix, version 1.5
Filename, size File type Python version Upload date Hashes
Filename, size crix-1.5-py3-none-any.whl (12.8 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size crix-1.5.tar.gz (9.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page