Example Assignment

In this article we walk through a situation where a trader on Crypto Facilities is liquidated and the new Position Assignment System (PAS) allocates the unfilled liquidation to liquidity providers in PAS. We go through all the response examples that a participant will receive for this.

Let's assume that there is a user whose current positions are:

- LONG 205,000 Contracts on FI_ETHUSD_180727 (ETHUSD Month)

- LONG 207,800 Contracts on FI_ETHUSD_180928 (ETHUSD Quarter)

Both these positions are using the main FI_ETHUSD margin account, which measures the risk in realtime, valuing the collateral vs position value, to determine whether to liquidate.

Once the margin account for the contract type is below the maintenance margin, liquidation occurs and the system sells those positions into the orderbook at the 0-equity imputed price for each contract.

In this case, the user's liquidation plays out as follows:

Position Size Amount Liquidated Amount Assigned
FI_ETHUSD_180727 205000 205000 0
FI_ETHUSD_180928 207800 51600 156200


This means the entire FI_ETHUSD_180727 position of 205,000 Contracts was successfully sold into the orderbook to new counterparties who had existing bids.

However, the FI_ETHUSD_180928 position of 207,800 Contracts was only able to liquidate 51,600 successfully into the orderbook, with the remaining 156,200 unable to find a new counterparty.

As a result, this unfilled liqiudation remainder is handled in the PAS by routing the Long position to liquidity providers participating in the program based on individual preferences.
In this example, four liquidity providers who participate in PAS received Assignments:




Below is the notifications for the Assignment of 104,132 Contracts allocated to "liquidityprovider@testuser.com". He receives the following email (note that this format may change so do not rely on this formatting, we will likely include more info on it actually):

The liquidity provider immediately receives the notification over WebSocket feed alerting him to the Assignment. The message takes this format:

{
   "feed": "fills",
   "username": "liquidityprovider@testuser.com",
   "fills": [
      {
         "instrument": "FI_ETHUSD_180928",
         "time": 1528974027919,
         "price": 489.1,
         "seq": 103,
         "buy": true,
         "order_id": "87755b99-bfb7-4f51-a72b-70f542f793a5",
         "fill_id": "7be7e33c-e733-49c2-98e0-34bd4ad96bf3",
         "fill_type": "assignee",
         "qty": 104132
      }
   ]
}

Additionally, the user may poll the REST API endpoint for fills to see:

{
   "result": "success",
   "fills": [
      {
         "fill_id": "7be7e33c-e733-49c2-98e0-34bd4ad96bf3",
         "symbol": "fi_ethusd_180928",
         "side": "buy",
         "order_id": "87755b99-bfb7-4f51-a72b-70f542f793a5",
         "size": 104132,
         "price": 489.1,
         "fillTime": "2018-06-14T11:00:28.000Z",
         "fillType": "assignee"
      }
      ...
   ]
}

The key fields in the responses are fill_type and fillType (for WebSocket and REST, respectfully), which both take the value "assignee". This is the indication that should be used to programmatically handle the assignment.

Note:

- The preferences for Max Assignment and Max Position Post-Assignment may only be handled manually over email. If you would like to update any of your preferences just send us an email.

- You will not receive an Assignment that your available margin for the contract type can not handle.