{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/moment/json-schema/moment-list-response-schema.json",
  "title": "ListResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/moment-rfq-api-openapi.yml#/components/schemas/ListResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GetRFQResponse"
      }
    }
  },
  "required": [
    "data"
  ],
  "$defs": {
    "ClientOrderID": {
      "description": "Client-provided unique ID for the order.",
      "type": "string",
      "title": "Client Order ID"
    },
    "ClientRFQID": {
      "description": "The ID of the RFQ as provided by the client.",
      "type": "string",
      "title": "Client RFQ ID"
    },
    "ContraQuoteID": {
      "description": "The ID of the quote that is being traded against.",
      "type": "string",
      "title": "Contra Quote ID"
    },
    "ContraQuoteIDNullable": {
      "type": [
        "object",
        "null"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/ContraQuoteID"
        }
      ]
    },
    "CounterHistory": {
      "description": "History of counter offers for an RFQ quote response.",
      "type": "object",
      "properties": {
        "counter_type": {
          "$ref": "#/$defs/CounterType"
        },
        "created_at": {
          "description": "The time at which the counter was created in RFC-3339 format.",
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "expires_at": {
          "description": "The time at which the counter expires in RFC-3339 format.",
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "price": {
          "description": "The price of the counter offer represented as a percentage of par.",
          "type": "number",
          "x-go-type": "decimal.Decimal",
          "x-go-type-import": {
            "path": "github.com/shopspring/decimal"
          }
        },
        "price_value": {
          "description": "An object to represent the price value. This can be a percent price, spread price, discount yield, money market yield.",
          "type": "object",
          "x-go-type": "prices.Price",
          "x-go-type-import": {
            "path": "github.com/moment-technology/warren-protobuffett/types/go/prices"
          }
        },
        "quantity": {
          "$ref": "#/$defs/Size"
        },
        "quote_response_id": {
          "description": "The ID of the quote response this counter is associated with.",
          "type": "string"
        },
        "settlement_date": {
          "description": "The settlement date of the counter quote as a Unix timestamp.",
          "type": [
            "integer",
            "null"
          ],
          "format": "int64"
        },
        "venue_price_type": {
          "description": "The type of price used by the venue for this quote.",
          "$ref": "#/$defs/PriceValueType"
        }
      }
    },
    "CounterType": {
      "description": "The current status of the counter.\nquoted: original quoted price\ninitiated: counter offer initiated by the client\nnegotiated: counter offer negotiated by dealer to client",
      "type": "string",
      "enum": [
        "quoted",
        "initiated",
        "negotiated"
      ],
      "x-enum-varnames": [
        "CounterTypeQuoted",
        "CounterTypeInitiated",
        "CounterTypeNegotiated"
      ]
    },
    "CreatedAt": {
      "description": "The time the RFQ was created in RFC-3339 format.",
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "CreatedAtNullable": {
      "type": [
        "object",
        "null"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/CreatedAt"
        }
      ]
    },
    "Disclosure": {
      "description": "The disclosure for the RFQ. Currently, only `disclosed` is supported.",
      "type": "string",
      "enum": [
        "disclosed",
        "anonymous"
      ],
      "x-go-type": "rfq.Disclosure",
      "x-go-type-import": {
        "path": "github.com/moment-technology/core-api/pkg/rfq"
      }
    },
    "DueTime": {
      "description": "The time at which quotes for this RFQ are due.",
      "type": "string",
      "format": "date-time"
    },
    "DueTimeNullable": {
      "type": [
        "object",
        "null"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DueTime"
        }
      ]
    },
    "ExpireTime": {
      "description": "The time at which the RFQ will expire.",
      "type": "string",
      "format": "date-time"
    },
    "ExpireTimeNullable": {
      "type": [
        "object",
        "null"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/ExpireTime"
        }
      ]
    },
    "FirmUntilTime": {
      "description": "The time until which the quotes for this RFQ are firm.",
      "type": "string",
      "format": "date-time"
    },
    "FirmUntilTimeNullable": {
      "type": [
        "object",
        "null"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/FirmUntilTime"
        }
      ]
    },
    "GetRFQResponse": {
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/RFQ"
        },
        {
          "type": "object",
          "required": [
            "latest_msg_num"
          ],
          "properties": {
            "latest_msg_num": {
              "description": "The `msg_number` for the most recent RFQ event corresponding to this RFQ. This is a string representation of a 64-bit unsigned integer `YYYYMMDDxxxxxxxxxx`.",
              "type": "string"
            }
          }
        }
      ]
    },
    "ISIN": {
      "description": "The ISIN of the instrument being traded.",
      "type": "string"
    },
    "IntroducingBrokerID_2": {
      "description": "The ID of the introducing broker placing the RFQ.",
      "type": "string",
      "title": "Introducing Broker ID",
      "x-go-type": "ulid.ULID",
      "x-go-type-import": {
        "path": "github.com/moment-technology/go-shiny/pkg/ulid"
      }
    },
    "OrderID": {
      "description": "Unique, Moment-generated ID for the order.",
      "type": "string",
      "title": "Order ID",
      "x-go-type": "ulid.ULID",
      "x-go-type-import": {
        "path": "github.com/moment-technology/go-shiny/pkg/ulid"
      }
    },
    "Price": {
      "description": "The price of the RFQ represented as a percentage of par.",
      "type": "number",
      "x-go-type": "decimal.Decimal",
      "x-go-type-import": {
        "path": "github.com/shopspring/decimal"
      }
    },
    "PriceValueType": {
      "description": "The method used to represent the price value.",
      "type": "string",
      "default": "percent",
      "enum": [
        "percent",
        "discount_yield",
        "spread",
        "money_market_yield"
      ],
      "title": "Price Value Type",
      "x-enumNames": [
        "PriceValueTypePercent",
        "PriceValueTypeDiscountYield",
        "PriceValueTypeSpread",
        "PriceValueTypeMMYield"
      ]
    },
    "RFQ": {
      "type": "object",
      "properties": {
        "amount": {
          "$ref": "#/$defs/Size"
        },
        "client_rfq_id": {
          "$ref": "#/$defs/ClientRFQID"
        },
        "contra_quote_id": {
          "$ref": "#/$defs/ContraQuoteIDNullable"
        },
        "created_at": {
          "$ref": "#/$defs/CreatedAtNullable"
        },
        "disclosure": {
          "$ref": "#/$defs/Disclosure"
        },
        "due_time": {
          "$ref": "#/$defs/DueTimeNullable"
        },
        "expire_time": {
          "$ref": "#/$defs/ExpireTimeNullable"
        },
        "firm_until_time": {
          "$ref": "#/$defs/FirmUntilTimeNullable"
        },
        "ib_id": {
          "$ref": "#/$defs/IntroducingBrokerID_2"
        },
        "id": {
          "$ref": "#/$defs/RFQID"
        },
        "isin": {
          "$ref": "#/$defs/ISIN"
        },
        "list_id": {
          "description": "The ID of the list this RFQ belongs to, if any.",
          "type": "string",
          "title": "List id"
        },
        "list_name": {
          "description": "The name of the list this RFQ belongs to, if any.",
          "type": "string",
          "title": "List name"
        },
        "quote_responses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RFQQuoteResponse"
          }
        },
        "quotes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RFQQuote"
          }
        },
        "risk_group_id": {
          "$ref": "#/$defs/RiskGroupID_2"
        },
        "settlement_date": {
          "description": "The date on which the trade for this RFQ is to be settled.",
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "x-go-type": "date.Date",
          "x-go-type-import": {
            "path": "github.com/moment-technology/core-api/pkg/date"
          }
        },
        "side": {
          "$ref": "#/$defs/Side"
        },
        "skip_fees": {
          "description": "Whether to skip fees for this RFQ. If true, the quotes will not include fees.",
          "type": "boolean"
        },
        "status": {
          "$ref": "#/$defs/Status"
        },
        "type": {
          "$ref": "#/$defs/Type"
        },
        "venue_mpid": {
          "$ref": "#/$defs/VenueMPID"
        },
        "venue_trader_info": {
          "$ref": "#/$defs/VenueTraderInfo_2"
        }
      },
      "required": [
        "id",
        "client_rfq_id",
        "contra_quote_id",
        "ib_id",
        "risk_group_id",
        "isin",
        "type",
        "side",
        "amount",
        "venue_mpid",
        "disclosure",
        "expire_time",
        "due_time",
        "firm_until_time",
        "settlement_date",
        "created_at",
        "status",
        "quotes",
        "quote_responses",
        "skip_fees"
      ]
    },
    "RFQID": {
      "description": "Unique, Moment-generated identifier for the RFQ.",
      "type": "string",
      "x-go-type": "ulid.ULID",
      "x-go-type-import": {
        "path": "github.com/moment-technology/go-shiny/pkg/ulid"
      }
    },
    "RFQQuote": {
      "type": "object",
      "properties": {
        "amount": {
          "$ref": "#/$defs/Size"
        },
        "counter_history": {
          "description": "History of counter offers for this quote.",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/CounterHistory"
          }
        },
        "counterable": {
          "description": "Whether the quote is counterable.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "counterparty": {
          "description": "The Market Participant Identifier (MPID) of the counterparty providing the quote.",
          "type": [
            "string",
            "null"
          ]
        },
        "created_at": {
          "description": "The time at which the quote was created in RFC-3339 format.",
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "expire_time": {
          "$ref": "#/$defs/ExpireTimeNullable"
        },
        "firm_until_time": {
          "$ref": "#/$defs/FirmUntilTimeNullable"
        },
        "is_subject": {
          "description": "Whether the quote is subject rather than firm.",
          "type": "boolean"
        },
        "price": {
          "$ref": "#/$defs/Price"
        },
        "side": {
          "$ref": "#/$defs/Side"
        },
        "spread_price": {
          "$ref": "#/$defs/SpreadPrice"
        },
        "updated_at": {
          "description": "The time at which the quote was last updated in RFC-3339 format.",
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "venue_mpid": {
          "$ref": "#/$defs/VenueMPID"
        },
        "venue_price_type": {
          "$ref": "#/$defs/PriceValueType"
        },
        "venue_quote_id": {
          "description": "The quote ID as provided by the venue.",
          "type": "string"
        },
        "ytm": {
          "description": "The yield to maturity of the quote.",
          "type": [
            "number",
            "null"
          ],
          "x-go-type": "decimal.Decimal",
          "x-go-type-import": {
            "path": "github.com/shopspring/decimal"
          }
        },
        "ytw": {
          "description": "The yield to worst of the quote.",
          "type": [
            "number",
            "null"
          ],
          "x-go-type": "decimal.Decimal",
          "x-go-type-import": {
            "path": "github.com/shopspring/decimal"
          }
        }
      },
      "required": [
        "venue_quote_id",
        "side",
        "amount",
        "price",
        "ytw",
        "ytm",
        "firm_until_time",
        "expire_time",
        "counterparty",
        "is_subject",
        "venue_mpid",
        "created_at",
        "updated_at"
      ]
    },
    "RFQQuoteResponse": {
      "type": "object",
      "properties": {
        "client_order_id": {
          "$ref": "#/$defs/ClientOrderID"
        },
        "contra_quote_id": {
          "$ref": "#/$defs/ContraQuoteID"
        },
        "created_at": {
          "description": "The time at which the quote response was created in RFC-3339 format.",
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "id": {
          "$ref": "#/$defs/OrderID"
        },
        "status": {
          "$ref": "#/$defs/RFQQuoteResponseStatus"
        }
      },
      "required": [
        "id",
        "client_order_id",
        "contra_quote_id",
        "status",
        "created_at"
      ]
    },
    "RFQQuoteResponseStatus": {
      "description": "The status of the quote response.",
      "type": "string",
      "enum": [
        "open",
        "filled",
        "canceled",
        "rejected",
        "approved"
      ],
      "x-go-type": "rfq.QuoteResponseStatus",
      "x-go-type-import": {
        "path": "github.com/moment-technology/core-api/pkg/rfq"
      }
    },
    "RiskGroupID_2": {
      "description": "The ID of the risk group placing the RFQ.",
      "type": "string",
      "title": "Risk Group ID",
      "x-go-type": "ulid.ULID",
      "x-go-type-import": {
        "path": "github.com/moment-technology/go-shiny/pkg/ulid"
      }
    },
    "Side": {
      "description": "Represents which side this RFQ is on:\n- buy (offers wanted)\n- sell (bids wanted)",
      "type": "string",
      "enum": [
        "buy",
        "sell"
      ],
      "x-go-type": "parentorder.Side",
      "x-go-type-import": {
        "path": "github.com/moment-technology/core-api/pkg/parentorder"
      }
    },
    "Size": {
      "type": "object",
      "properties": {
        "type": {
          "description": "The size of an RFQ, with a specified type indicating how the size is represented. Par sizes represent the size of the RFQ in face value; most corporate bonds have a face value of $1000, so an order with par $3000 would represent an order for 3 bonds. Notional sizes represent the size of the RFQ in current dollar value, so an RFQ with notional $3000 would represent an RFQ to buy or sell $3000 worth of the bond at the current market prices. Currently, only `par` sizes are supported.",
          "type": "string",
          "default": "par",
          "enum": [
            "par",
            "notional"
          ]
        },
        "value": {
          "description": "The size of the RFQ.",
          "type": "integer"
        }
      },
      "required": [
        "value",
        "type"
      ],
      "x-go-type": "parentorder.Size",
      "x-go-type-import": {
        "path": "github.com/moment-technology/core-api/pkg/parentorder"
      }
    },
    "SpreadPrice": {
      "description": "The spread price of the RFQ represented as a percentage of par.",
      "type": "object",
      "x-go-type": "prices.SpreadPrice",
      "x-go-type-import": {
        "path": "github.com/moment-technology/warren-protobuffett/types/go/prices"
      }
    },
    "Status": {
      "type": "string",
      "enum": [
        "open",
        "validating",
        "order_placed",
        "rejected",
        "expired",
        "canceled",
        "filled"
      ],
      "x-go-type": "rfq.Status",
      "x-go-type-import": {
        "path": "github.com/moment-technology/core-api/pkg/rfq"
      }
    },
    "Type": {
      "description": "The type of the RFQ.",
      "type": "string",
      "enum": [
        "bin",
        "asap"
      ],
      "x-go-type": "rfq.Type",
      "x-go-type-import": {
        "path": "github.com/moment-technology/core-api/pkg/rfq"
      }
    },
    "VenueMPID": {
      "description": "The Market Participant Identifier (MPID) of the venue.",
      "type": "string"
    },
    "VenueTraderInfo_2": {
      "description": "Trader information for a venue.",
      "x-go-type": "parentorder.VenueTraderInfo",
      "x-go-type-import": {
        "path": "github.com/moment-technology/core-api/pkg/parentorder"
      }
    }
  }
}