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.

Source Distribution

crix-1.8.2.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crix-1.8.2-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file crix-1.8.2.tar.gz.

File metadata

  • Download URL: crix-1.8.2.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.7

File hashes

Hashes for crix-1.8.2.tar.gz
Algorithm Hash digest
SHA256 f8420359ce58dbcc38b301e382dd3e2f0ce38f24d94a01f2de00c050688c38e0
MD5 75e1f210517c5ef1d4e30186cfb70a1e
BLAKE2b-256 6a1810fdea4389eb5e90f555b33a4ab10d1944ad9aa9be3685c3d34bff06a0d5

See more details on using hashes here.

File details

Details for the file crix-1.8.2-py3-none-any.whl.

File metadata

  • Download URL: crix-1.8.2-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.7

File hashes

Hashes for crix-1.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 492bbb721d9693924d99b0d1dabc61b505f2cac5f0df026d824d259f329cfb37
MD5 d888bb2481c82c9b5ec060236819c5b0
BLAKE2b-256 604132b88b1f98bb8c4014d705c26c8a856a55753147004bdbab2f959b8f5892

See more details on using hashes here.

Supported by

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