# Gemini Clearing workflow

Gemini Clearing allows two parties to settle a trade off the order book. The initiator enters the trade details for any supported [symbol](/market-data/symbols-and-minimums) and generates a `trade_id`. If a `counterparty_id` is supplied, only the specified counterparty can confirm the order. If a counterparty_id is not supplied, the ticket will generate a `trade_id` that can filled by any counterparty.

---

### Bilateral Trade

1. Initiator places a [New Order Cross `<s>`](/trading/fix/order-entry/gemini-clearing/initiate-a-clearing-order) message with the order details
2. Did the initiator use a `counterparty_id`?
   - Yes, only the Gemini account associated with the `counterparty_id` will be able to complete the order.
   - No, anybody with the `clearing_id` will be able to confirm the order.
3. The counterparty will be able to confirm the order on the [web interface](https://www.gemini.com/clearing), via [FIX](), or via [REST]()
   - The order initiator can cancel the order if the counterparty has not yet confirmed. Cancellation can be performed on the [web interface](https://www.gemini.com/clearing), via [FIX](), and [REST]().
4. Once confirmed, Gemini will attempt settlement. Settlement can only occur when both parties have the funds required in their account to fill the trade.
   - If any party does not post the funds required to settle the trade before the expiration time, then the order will expire.

---

### Broker Trade

1. The broker submits a [New Order Cross `<s>`](/trading/fix/order-entry/gemini-clearing/initiate-a-clearing-order) message with the order details and both `counterparty_id`s of the buyer and seller.
2. The buyer and seller can both review the trade details and confirm the order on the [web interface](https://www.gemini.com/clearing), via [FIX](), or via [REST]()
   - Either side can cancel the trade if both the buyer and seller have yet to confirm the order. Cancellation can be done via the [web interface](https://www.gemini.com/clearing), [FIX](), and [REST]()
   - The broker will be able to see the status of the order on the [web interface](https://www.gemini.com/clearing) and over the [/v1/clearing/status](/rest/clearing#get-clearing-order-status) endpoint on the REST API
3. Once confirmed, Gemini will attempt settlement. Settlement can only occur when both parties have the funds required in their account to fill the trade.
   - If any party does not post the funds required to settle the trade before the expiration time, then the order will expire.
