Assets Lending Endpoints¶
-
class
quoine.client.
Quoinex
(api_token_id, api_secret, vendor_id=None, language=None)[source] -
close_loan_bid
(loan_bid_id) Close loan bid
https://developers.quoine.com/#close-loan-bid
Parameters: loan_bid_id (int) – load bid Id Returns: API response Raises: QuoineResponseException, QuoineAPIException { "id": 3580, "bidask_type": "limit", "quantity": "50.0", "currency": "USD", "side": "bid", "filled_quantity": "0.0", "status": "closed", "rate": "0.0007", "user_id": 3020 }
-
create_loan_bid
(rate, quantity, currency) Create a loan bid
https://developers.quoine.com/#create-a-loan-bid
Parameters: - rate (string) – daily interest rate, e.g 0.0002 (0.02%), must be <= 0.07%
- quantity (string) – amount to lend
- currency (string) – lending currency (all available in the system except JPY)
Returns: API response
Raises: QuoineResponseException, QuoineAPIException
{ "id": 3580, "bidask_type": "limit", "quantity": "50.0", "currency": "USD", "side": "bid", "filled_quantity": "0.0", "status": "live", "rate": "0.0002", "user_id": 3020 }
-
get_loan_bid
(currency, limit=None, page=None) Get loan bids
https://developers.quoine.com/#get-loan-bids
Parameters: - currency (string) – lending currency (all available in the system except JPY)
- limit (int) – Limit execution per request
- page (int) – Page
Returns: API response
Raises: QuoineResponseException, QuoineAPIException
{ "id": 3580, "bidask_type": "limit", "quantity": "50.0", "currency": "USD", "side": "bid", "filled_quantity": "0.0", "status": "live", "rate": "0.0002", "user_id": 3020 }
-
get_loans
(currency, limit=None, page=None) Get loans
https://developers.quoine.com/#get-loans
Parameters: - currency (string) – lending currency (all available in the system except JPY)
- limit (int) – Limit execution per request
- page (int) – Page
Returns: API response
Raises: QuoineResponseException, QuoineAPIException
{ "models": [ { "id": 144825, "quantity": "495.1048", "rate": "0.0005", "created_at": 1464168246, "lender_id": 312, "borrower_id": 5712, "status": "open", "currency": "JPY", "fund_reloaned": true } ], "current_page": 1, "total_pages": 1 }
-
update_loan
(loan_id, fund_reloaned=None) Update a loan
https://developers.quoine.com/#update-a-loan
TODO: work out what else we can update
Parameters: - loan_id (int) – Loan Id
- fund_reloaned (bool) – optional
Returns: API response
Raises: QuoineResponseException, QuoineAPIException
{ "id": 144825, "quantity": "495.1048", "rate": "0.0005", "created_at": 1464168246, "lender_id": 312, "borrower_id": 5712, "status": "open", "currency": "JPY", "fund_reloaned": false }
-