Skip to main content

A small example package

Project description

liquid-python

CircleCI PyPI PyPI - Python Version

Client library for Liquid. Liquid API reference is here.

Supported API

End point Impl
Public
GET /products/
GET /products/:id
GET /products/:id/price_levels
GET /executions o
GET /ir_ladders
GET /fees
Private
POST /orders
GET /orders/:id
GET /orders
PUT /orders/:id/cancel
PUT /orders/:id
GET /orders/:id/trades
GET /executions/me
GET /fiat_accounts o
POST /fiat_accounts
GET /crypto_accounts
GET /accounts/balance
GET /accounts/:currency
GET /accounts/:currency/reserved_balance_details
POST /loan_bids
GET /loan_bids
PUT /loan_bids/:id/close
GET /loans
PUT /loans
GET /trading_accounts
GET /trading_accounts/:id
GET /trades
PUT /trades/:id/close
PUT /trades/close_all
PUT /trades/:id/adjust_margin
GET /trades/:id/loans
...etc...

Usage

Insatall

pip install liquid-python

Use

from liquidcli.client import Client
from liquidcli.data import Page

cli = Client(
    baseUrl='https://api.liquid.com',
    apiTokenId='<API_TOKEN_ID>',
    apiSecret='<API_SECRET>',
)
cli.postOrders(5, 'market', 'buy', 1)

page: Page = cli.getExecutions(5, 1, 1)
for e in page.models:
    print(e)

Development

# Installation of dependencies
pipenv install --dev
# Run
pipenv python run main.py

Run test

# Execute unit test
pipenv run python -m pytest --cov=liquidcli --cov-report=html --cov-report=term ./tests
# Check coverage in HTML
open htmlcov/index.html

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

liquidcli-0.0.25.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

liquidcli-0.0.25-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file liquidcli-0.0.25.tar.gz.

File metadata

  • Download URL: liquidcli-0.0.25.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for liquidcli-0.0.25.tar.gz
Algorithm Hash digest
SHA256 27ada1124ad86ce876fb3b7f71faae78eecf92012ae66f934afaeec4a95a785f
MD5 e78f1b20aa84ec195abf8ca5d85042d6
BLAKE2b-256 32b82a28cd5a8a1b472b62fc2f80c29e51dee255113d3122ad8d1f58461c043d

See more details on using hashes here.

File details

Details for the file liquidcli-0.0.25-py3-none-any.whl.

File metadata

  • Download URL: liquidcli-0.0.25-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for liquidcli-0.0.25-py3-none-any.whl
Algorithm Hash digest
SHA256 748465a08ba0ee6c3cf7dd51b4bd2af8aea2703a4e21945ff6f558f239c13aee
MD5 ebd45acad64c7f46a51b05c3ce2ee514
BLAKE2b-256 e0369ffd3b1fb30d2c6ceed62115b18c7b22e7fc817d2a327edfe6a4374736ef

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