A small example package
Project description
liquid-python
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
Release history Release notifications | RSS feed
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.22.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for liquidcli-0.0.22-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ea5570155b4186568b22891651692279853837c9a86031f9c46f29afdf305ef |
|
MD5 | 30d35d5fb8d1c1127bac252f521e6885 |
|
BLAKE2b-256 | 113cfe6d16fddf40a55e1e2a17cd5bf685cc01ea02ad060b472c9613a372ef41 |