> This page is for Taurus PRIME.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://taurushq.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://taurushq.ferndocs.com/_mcp/server.

# RFQ (Request for Quote)

# RFQ (Request for Quote)

RFQ is the primary workflow for OTC trading on PRIME. It allows clients to request real-time quotes from external dealers, with PRIME acting as intermediary.

## Overview

The RFQ workflow operates over WebSocket and consists of three phases:

1. **Request quotes** - Client requests quotes for a specific pair and quantity
2. **Receive streaming quotes** - Dealers stream bid/ask quotes in real-time
3. **Accept or stop** - Client accepts a quote to execute the trade, or stops the session

## Important Notes

> **Field naming convention:** Unlike other WebSocket messages, RFQ messages use **PascalCase** field names (e.g., `RfqID`, `Quantity`, `Token`) rather than camelCase. This applies to both requests and responses.

## WebSocket Topics

| Topic Pattern           | Purpose                                 |
| ----------------------- | --------------------------------------- |
| `{subAccountId}@quotes` | Start quoting, receive streaming quotes |
| `{subAccountId}@accept` | Accept a quote                          |
| `{subAccountId}@stop`   | Cancel an RFQ session                   |

All RFQ topics require authentication.

---

## Start Quoting

Request quotes for a trade.

**Topic:** `{subAccountId}@quotes`

### Request

```json
{
  "e": "tdx:rfq",
  "t": "7376524e-6b6b-4137-9719-7e07a7709804@quotes",
  "a": "jwt_token",
  "d": {
    "Pair": "BTC/USD",
    "Quantity": "1.0",
    "RequestID": "optional-request-uuid"
  }
}
```

| Field       | Type   | Required | Description                                |
| ----------- | ------ | -------- | ------------------------------------------ |
| `Pair`      | string | Yes      | Trading pair symbol                        |
| `Quantity`  | string | Yes      | Quantity to trade                          |
| `RequestID` | string | No       | Client-provided request ID for correlation |

### Quotes Event

Streaming quotes from dealers. These arrive continuously while the RFQ session is active.

```json
{
  "e": "tdx:quotes",
  "t": "7376524e-6b6b-4137-9719-7e07a7709804@quotes",
  "d": {
    "RfqID": "rfq-123",
    "RequestID": "req-456",
    "Bid": {
      "Token": "encrypted_token_1",
      "Amount": "50000.00"
    },
    "Ask": {
      "Token": "encrypted_token_2",
      "Amount": "50100.00"
    }
  }
}
```

| Field        | Type   | Description                              |
| ------------ | ------ | ---------------------------------------- |
| `RfqID`      | string | RFQ session identifier                   |
| `RequestID`  | string | Client-provided request ID (if provided) |
| `Bid`        | object | Best bid quote                           |
| `Bid.Token`  | string | Encrypted token to accept this bid       |
| `Bid.Amount` | string | Bid price                                |
| `Ask`        | object | Best ask quote                           |
| `Ask.Token`  | string | Encrypted token to accept this ask       |
| `Ask.Amount` | string | Ask price                                |

### Termination Event

Sent when the RFQ session ends (timeout, no dealers available, etc.).

```json
{
  "e": "tdx:termination",
  "t": "7376524e-6b6b-4137-9719-7e07a7709804@quotes",
  "d": {
    "RfqID": "rfq-123",
    "Reason": "TIMEOUT"
  }
}
```

| Field    | Type   | Description            |
| -------- | ------ | ---------------------- |
| `RfqID`  | string | RFQ session identifier |
| `Reason` | string | Termination reason     |

---

## Accept Quote

Accept a received quote to execute the trade.

**Topic:** `{subAccountId}@accept`

### Request

```json
{
  "e": "tdx:rfq",
  "t": "7376524e-6b6b-4137-9719-7e07a7709804@accept",
  "a": "jwt_token",
  "d": {
    "RfqID": "rfq-123",
    "QuoteToken": "encrypted_token_1",
    "Comment": "optional comment"
  }
}
```

| Field        | Type   | Required | Description                    |
| ------------ | ------ | -------- | ------------------------------ |
| `RfqID`      | string | Yes      | RFQ session identifier         |
| `QuoteToken` | string | Yes      | Token from the quote to accept |
| `Comment`    | string | No       | Optional comment for the trade |

### Confirmation Event

Sent when the quote is successfully accepted and trade executed.

```json
{
  "e": "tdx:confirmation",
  "t": "7376524e-6b6b-4137-9719-7e07a7709804@accept",
  "d": {"RfqID": "rfq-123"}
}
```

### Rejection Event

Sent when the quote acceptance fails (quote expired, insufficient balance, etc.).

```json
{
  "e": "tdx:rejection",
  "t": "7376524e-6b6b-4137-9719-7e07a7709804@accept",
  "d": {"RfqID": "rfq-123"}
}
```

---

## Stop Quoting

Cancel an active RFQ session without accepting any quote.

**Topic:** `{subAccountId}@stop`

### Request

```json
{
  "e": "tdx:rfq",
  "t": "7376524e-6b6b-4137-9719-7e07a7709804@stop",
  "a": "jwt_token",
  "d": "rfq-123"
}
```

The `d` field contains just the RFQ ID as a string.

---

## RFQ Workflow Example

```
Client                          PRIME                         Dealers
   │                              │                              │
   │──── tdx:rfq @quotes ────────>│                              │
   │     (Pair, Quantity)         │──── Request quotes ─────────>│
   │                              │                              │
   │<──── tdx:quotes ─────────────│<──── Stream quotes ──────────│
   │      (RfqID, Bid, Ask)       │                              │
   │<──── tdx:quotes ─────────────│<──── Stream quotes ──────────│
   │      (updated quotes)        │                              │
   │                              │                              │
   │──── tdx:rfq @accept ────────>│                              │
   │     (RfqID, QuoteToken)      │──── Execute trade ──────────>│
   │                              │                              │
   │<──── tdx:confirmation ───────│<──── Trade confirmed ────────│
   │                              │                              │
```

## Related

* [Trading Domain Overview](/prime/docs/api-doma-trad-trading)
* [OTC Trading Use Case](/prime/docs/api-usec-05-otc-trading)
* [WebSocket Topics Reference](/prime/docs/api-webs-topics)