Executions Endpoints¶
-
class
quoine.client.
Quoinex
(api_token_id, api_secret, vendor_id=None, language=None)[source] -
get_executions
(product_id, limit=None, page=None) Get a list of recent executions from a product (Executions are sorted in DESCENDING order - Latest first)
https://developers.quoine.com/#executions
Parameters: - product_id (int) – required
- limit (int) – How many executions should be returned. Must be <= 1000. Default is 20
- page (int) – From what page the executions should be returned, e.g if limit=20 and page=2, the response would start from the 21st execution. Default is 1
executions = client.get_executions( product_id=1, limit=200)
Returns: API response { "models": [ { "id": 1011880, "quantity": "6.118954", "price": "409.78", "taker_side": "sell", "created_at": 1457370745 }, { "id": 1011791, "quantity": "1.15", "price": "409.12", "taker_side": "sell", "created_at": 1457365585 } ], "current_page": 2, "total_pages": 1686 }
Raises: QuoineResponseException, QuoineAPIException
-
get_executions_since_time
(product_id, timestamp, limit=None) Get a list of executions after a particular time (Executions are sorted in ASCENDING order)
Note this call has an optional limit parameter but no paging.
https://developers.quoine.com/#get-executions-by-timestamp
Parameters: - product_id (int) – required
- timestamp (int (Unix timestamps in seconds)) – Only show executions at or after this timestamp
- limit (int) – How many executions should be returned. Must be <= 1000. Default is 20
import time since = int(time.time()) executions = client.get_executions_since_time( product_id=1, timestamp=since, limit=50)
Returns: API response [ { "id": 960598, "quantity": "5.6", "price": "431.89", "taker_side": "buy", "created_at": 1456705487 }, { "id": 960603, "quantity": "0.06", "price": "431.74", "taker_side": "buy", "created_at": 1456705564 } ]
Raises: QuoineResponseException, QuoineAPIException
-
get_my_executions
(product_id, limit=None, page=None) Get list of your executions by product with pagination
https://developers.quoine.com/#get-your-executions
Parameters: - product_id (int) – required
- limit (int) – Limit execution per request
- page (int) – Page
executions = client.get_my_executions(product_id=1)
Returns: API response { "models": [ { "id": 1001232, "quantity": "0.37153179", "price": "390.0", "taker_side": "sell", "my_side": "sell", "created_at": 1457193798 } ], "current_page": 1, "total_pages": 2 }
Raises: QuoineResponseException, QuoineAPIException
-