Skip to main content

quoinex-client is a python client (sync/async) library for liquid(quoinex) api.

Project description

PyPI version License: MIT

quoinex-client is a python client (sync/async) library for liquid(quoinex) api

Installation

$ pip install quoinex-client

Usage

#
# sync
#
from quoinex_client.sync import Client

client = Client(public_key='your api key', private_key='your api secret')
response = client.get_products()
print(response.status_code, response.json())

#
# async
#
import grequests
from quoinex_client.async import Async

client = Async(public_key='your api key', private_key='your api secret')
reqs = [client.get_products(), client.get_product(id=1), ...]
response = grequests.map(reqs)
for r in response:
    print(r.status_code, r.json())


client.get_products() # GET /products
client.get_product(id=1) # GET /products/:id
client.get_order_book(id=1) # GET /products/:id/price_levels
client.get_executions(product_id=1) # GET /executions?product_id=1&limit=2&page=2
client.get_executions(currency_pair_code='BTCJPY',timestamp=1526012797) # GET /executions?product_id=1&timestamp=1430630863&limit=2
client.get_interest_rate_ladder(currency='USD') # GET /ir_ladders/USD
client.create_order(order_type='limit', product_id=1, side='sell', quantity=0.01, price=500.0) # POST /orders
client.get_order(id=1) # GET /orders/:id
client.get_orders() # GET /orders?funding_currency=:currency&product_id=:product_id&status=:status&with_details=1
client.cancel_order(id=1) # PUT /orders/:id/cancel
client.edit_live_order(id=1) # PUT /orders/:id
client.get_order_trades(id=1) # GET /orders/:id/trades
client.get_your_executions(product_id=1) # GET /executions/me?product_id=:product_id
client.get_fiat_accounts() # GET /fiat_accounts
client.create_fiat_account(currency='USD') # POST /fiat_accounts
client.get_crypto_accounts() # GET /crypto_accounts
client.get_account_balances() # GET /accounts/balance
client.create_loan_bid(quantity=50, currency='USD', rate=0.0002) # POST /loan_bids
client.get_loan_bids(currency='USD') # GET /loan_bids?currency=:currency
client.close_loan_bid(id=1) # PUT /loan_bids/:id/close
client.get_loans(currency='JPY') # GET /loans?currency=JPY
client.update_loan(id=1) # PUT /loans/144825
client.get_trading_accounts() # GET /trading_accounts
client.get_trading_account(id=1) # GET /trading_accounts/:id
client.update_leverage_level(id=1) # PUT /trading_accounts/:id
client.get_trades() # GET /trades?funding_currency=:funding_currency&status=:status
client.close_trade(id=1) # PUT /trades/:id/close
client.close_all_trades() # PUT /trades/close_all
client.update_trade(id=1, stop_loss=300, take_profit=600) # PUT /trades/:id
client.get_trade_loans(id=1) # GET /trades/:id/loans

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

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 quoinex-client, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size quoinex-client-0.1.1.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page