⛔ Old “GRFQ” Workflow

Successful Quote Creation

  1. API Request Returns 200 OK with status: OPEN
  2. Event is sent to quote channel with kind: NEW
  3. Event is sent to quote_book channel with kind: ADDED

Error Quote Creation

  1. API Returns 400
  2. No Websockets Messages

✅ New “OB” Workflow

Successful Quote Creation

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

Error Quote Creation - API Validations Fail

  1. API Returns 400

Error Quote Creation - Order Book Validations Fail

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

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

💬 Sample Messages

  • [POST] /rfqs/{rfq_id}/quotes/ API Response, Pending Quote Creation

    1{
    2 "id": "q_2YpMiJJRxTl6N66lGF5LOPsTdJY",
    3 "rfq_id": 50126520,
    4 "action_id": "538da55e-2617-418b-a60f-0fae2413ebdb",
    5 "client_order_id": "a823e52e-9238-4ca2-ac78-13ff96cdd732",
    6 "description": "Call 30 Nov 23 35000",
    7 "maker": "PDGM",
    8 "price": "0.053",
    9 "side": "BUY",
    10 "type": "LIMIT",
    11 "product_codes": [
    12 "DO"
    13 ],
    14 "created": 1701218193752.5461,
    15 "status": "PENDING"
    16}
  • quote Channel, Successfully Created Quote

    1{
    2 "jsonrpc": "2.0",
    3 "method": "subscription",
    4 "params": {
    5 "channel": "quote",
    6 "data": {
    7 "kind": "NEW",
    8 "quote": {
    9 "status": "OPEN",
    10 "side": "BUY",
    11 "maker": "JAMMN",
    12 "original_quantity": "25.3",
    13 "client_order_id": "d62f11b5-e7a7-42c4-b28f-bef368de2d22",
    14 "legacy_id": 72983001,
    15 "price": "0.053",
    16 "id": "q_2Ym0K4wTjVfLEkditbWH5tFQ9ZW",
    17 "legs": [
    18 {
    19 "side": "BUY",
    20 "price": "0.053"
    21 }
    22 ],
    23 "remaining_quantity": "25.3",
    24 "filled_quantity": "0",
    25 "rfq_id": 50126134,
    26 "product_codes": [
    27 "DO"
    28 ],
    29 "type": "LIMIT",
    30 "created": 1701115380798.1218,
    31 "last_activity": 1701115380856.506,
    32 "description": "Call 30 Nov 23 35000"
    33 }
    34 },
    35 "meta": {
    36 "seq_group": 605630333,
    37 "seq_num": 10
    38 }
    39 }
    40}
  • quote_book Channel, Successfully Created Quote

    1{
    2 "jsonrpc": "2.0",
    3 "method": "subscription",
    4 "params": {
    5 "channel": "quote_book",
    6 "data": {
    7 "kind": "ADDED",
    8 "quote": {
    9 "status": "OPEN",
    10 "side": "BUY",
    11 "legacy_id": 72983001,
    12 "price": "0.053",
    13 "created": 1701115380798.1218,
    14 "last_activity": 1701115380856.506,
    15 "id": "q_2Ym0K4wTjVfLEkditbWH5tFQ9ZW",
    16 "legs": [
    17 {
    18 "side": "BUY",
    19 "price": "0.053"
    20 }
    21 ],
    22 "remaining_quantity": "25.3",
    23 "rfq_id": 50126134
    24 }
    25 },
    26 "meta": {
    27 "seq_group": 80552588,
    28 "seq_num": 3324
    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": "71561c1f-f43b-4fb0-abc5-d7dcfbc81b0c",
    8 "kind": "create",
    9 "success": true
    10 },
    11 "meta": {
    12 "seq_group": 4113064136,
    13 "seq_num": 3
    14 }
    15 }
    16}
  • quote_status Channel, Error API Request

    1{
    2 "jsonrpc": "2.0",
    3 "method": "subscription",
    4 "params": {
    5 "channel": "quote_status",
    6 "data": {
    7 "action_id": "71561c1f-f43b-4fb0-abc5-d7dcfbc81b0c",
    8 "kind": "create",
    9 "success": false,
    10 "error_code": 3303,
    11 "error_message": "Limit of 2 for BUY-side quote reached. Please cancel an active quote before submitting a new one."
    12 },
    13 "meta": {
    14 "seq_group": 4113064136,
    15 "seq_num": 3
    16 }
    17 }
    18}