Order Events
Workflow
- Client submits order to Gemini exchange
- Is the order accepted?
- Yes, order is accepted
- Gemini sends an
accepted
order event - Gemini sends zero or more initial
fill
events - Does the order have non-zero remaining quantity?
- Yes, the order has non-zero remaining quantity
- Gemini sends a
booked
event - the order rests until
- client sends a cancel request
- Is the order cancelled?
- Yes, the order is cancelled
- Gemini sends a
cancelled
event followed by aclosed
event - No further order events about this order
- Gemini sends a
- No, the cancel request could not be fulfilled
- Gemini sends a
cancel_rejected
event explaining why the order cancel request could not be fulfilled. - The order continues to rest on the books
- Gemini sends a
- Yes, the order is cancelled
- Is the order cancelled?
- a trade executes, partially or completely filling the order
- Gemini sends a
fill
event with details about the trade, including remaining quantity - Is the order completely filled?
-
Yes, the order is completely filled
- Gemini sends a
closed
event - No further order events about this order
- Gemini sends a
-
No, the order has remaining quantity
- The order continues to rest on the books
-
- Gemini sends a
- client sends a cancel request
- Gemini sends a
- No, the order has been completely filled
- Gemini sends a
closed
event - No further order events about this order
- Gemini sends a
- Yes, the order has non-zero remaining quantity
- Gemini sends an
- No, order is rejected
- Gemini responds with a
rejected
order event explaining why the order was rejected - No further order events about this order
- Gemini responds with a
- Yes, order is accepted