⛔ Old “GRFQ” Workflow

Successful Quote Cancellation

  1. API Request Returns 204 OK, no Response Body
  2. Event is sent to quote channel with kind: CANCELED
  3. Event is sent to quote_book channel with kind: REMOVED

Error Quote Cancellation

  1. API Returns 400
  2. No Websockets Messages

✅ New “OB” Workflow

Successful Quote Cancellation

  1. API Request Returns 202 OK, including action_id field with status: PENDING
  2. Event is sent to quote channel with kind: CANCELED
  3. Event is sent to quote_book channel with kind: REMOVED
  4. Event is sent to quote_status channel with matching action_id and success: true

Error Quote Cancellation - Quote Unavailable

  1. API Returns HTTP 400, Error 3308 “Unavailable Quote”
  2. No Websockets Messages

Error Quote Cancellation - Too Late to Cancel (Fails API Validation)

  1. API Returns HTTP 400, Error 3306 “Too late to cancel”
  2. No Websockets Messages

Error Quote Cancellation - Too Late to Cancel (API validation success, fails OrderBook Validation)

  1. API Returns HTTP 202 Accepted
  2. Event is sent to quote_status WebSocket Channel with Error 3306 “Too late to cancel”

💡 No WebSocket message is sent with the details of the pending quote, these details are only returned in the API Response

💬 Sample Messages

  • [DELETE] /quotes/{quote_id}/ API Response, Pending Quote Cancellation

    1{
    2 "action_id": "7a27eaf2-fbb0-4163-8d23-e1a571df13cc"
    3}
  • quote Channel, Successfully Cancelled Quote

    1{
    2 "jsonrpc": "2.0",
    3 "method": "subscription",
    4 "params": {
    5 "channel": "quote",
    6 "data": {
    7 "kind": "CANCELED",
    8 "quote": {
    9 "side": "BUY",
    10 "status": "CLOSED",
    11 "maker": "PARA0",
    12 "product_codes": [
    13 "DO"
    14 ],
    15 "remaining_quantity": "25.3",
    16 "created": 1701395244088.892,
    17 "last_activity": 1701395290853.689,
    18 "legs": [
    19 {
    20 "side": "BUY",
    21 "price": "0.053"
    22 }
    23 ],
    24 "price": "0.053",
    25 "description": "Call 15 Dec 23 35000",
    26 "original_quantity": "25.3",
    27 "type": "LIMIT",
    28 "legacy_id": 50070251,
    29 "filled_quantity": "0",
    30 "id": "q_2Yv9ZpWB3Xg5tqClUyMx6Esjdlh",
    31 "rfq_id": 50000631,
    32 "client_order_id": "bcbb0fdf-3af6-4db7-9b04-00b133f3f803"
    33 }
    34 },
    35 "meta": {
    36 "seq_group": 2490988106,
    37 "seq_num": 12
    38 }
    39 }
    40}
  • quote_book Channel, Successfully Cancelled Quote

    1{
    2 "jsonrpc": "2.0",
    3 "method": "subscription",
    4 "params": {
    5 "channel": "quote_book",
    6 "data": {
    7 "kind": "REMOVED",
    8 "quote": {
    9 "legs": [
    10 {
    11 "side": "BUY",
    12 "price": "0.053"
    13 }
    14 ],
    15 "remaining_quantity": "25.3",
    16 "price": "0.053",
    17 "side": "BUY",
    18 "status": "CLOSED",
    19 "legacy_id": 50070251,
    20 "id": "q_2Yv9ZpWB3Xg5tqClUyMx6Esjdlh",
    21 "rfq_id": 50000631,
    22 "created": 1701395244088.892,
    23 "last_activity": 1701395290853.689
    24 }
    25 },
    26 "meta": {
    27 "seq_group": 80552588,
    28 "seq_num": 459
    29 }
    30 }
    31}
  • quote_status Channel, Successful API Request

    1{
    2 "jsonrpc": "2.0",
    3 "method": "subscription",
    4 "params": {
    5 "channel": "quote_status",
    6 "data": {
    7 "action_id": "4ce0a024-712b-4431-83a5-db28460c82c7",
    8 "kind": "cancel",
    9 "success": true
    10 },
    11 "meta": {
    12 "seq_group": 768255716,
    13 "seq_num": 6
    14 }
    15 }
    16}