API
Last updated
Last updated
At the heart of the order book are the following simple operations, exposed by our clearing house contract:
PlaceOrder:
The supported time-in-force options are as follows:
(a) IOC (immediate or cancel): The order is treated as a taker order and is immediately executed against the book. Partial executions are allowed. Any remaining order size is ignored.
(b) FOK (fill or kill): Similar to IOC, the order is immediately executed against the book. However, only full executions are allowed. If the order is not able to be completely filled, it will be rejected.
(c) GTC (good till cancel): The order is sent to rest on the book until the user explicitly cancels the order.
If the postOnly flag is set to false, then the order is allowed to be first executed against the book. Any remaining order size will then rest on the book.
(d) GTD (good till date): This is similar to GTC, but a user also specifies a deadline. When the deadline is exceeded, the order becomes expired and no longer participates in order matching.
The user can set stop-loss and take-profit trigger prices.
CancelOrder
Cancel or remove orders from the book.