> For the complete documentation index, see [llms.txt](https://halfmoon.gitbook.io/halfmoon-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://halfmoon.gitbook.io/halfmoon-docs/products/pmm-rfq.md).

# PMM RFQ

HalfMoon PMM RFQ is an institutional request-for-quote service for spot trading on EVM-compatible networks. It enables deterministic execution through professional market makers and supports both aggregated routing and direct per-market-maker integrations.

This documentation is organized for external release and integration. Endpoint-specific request and response tables are the authoritative source for API field definitions.

This documentation is intended for:

* Enterprise API consumers
* Third-party aggregators
* Implementation and joint-testing teams

***

## Integration Modes

HalfMoon currently supports two integration models.

### Aggregated API Mode

This is the recommended model for most integrations. HalfMoon handles market-maker selection, routing, and quote orchestration on your behalf.

Your application only needs to:

1. Request an indicative quote
2. Request a firm quote
3. Submit the returned calldata on-chain

This model does not require:

* WebSocket depth subscription
* Protobuf decoding
* Direct handling of RFQ quote signatures

### Aggregator Mode

This model is intended for advanced partners that want direct access to per-market-maker liquidity.

Your application is responsible for:

1. Subscribing to per-MM orderbook depth over WebSocket
2. Selecting the market maker to trade with
3. Requesting a single-MM firm quote
4. Decoding `rfq_quote_data`
5. Constructing and submitting the on-chain transaction to the Settlement or Router contract
6. Reporting the `quote_id` to `tx_hash` mapping after broadcast

***

## Service Boundary

The following integration inputs must be provided by HalfMoon and must not be mixed with values from any other service:

* HTTP gateway domain
* WebSocket orderbook domain
* `business` API key
* Returned `calldata`
* Settlement and Router contract addresses

Reusing credentials, quote payloads, or execution parameters across services is not supported.

***

## Supported Networks

The following networks are currently supported in production:

| Chain ID | Network          |
| -------- | ---------------- |
| `1`      | Ethereum Mainnet |
| `56`     | BSC Mainnet      |
| `8453`   | Base Mainnet     |

***

## Contract Addresses

| Contract   | Ethereum (`1`)                               | BSC (`56`)                                   | Base (`8453`)                                |
| ---------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
| Settlement | `0x203e67c384Dbf42aD0556EfFebA30cb2Bda488f9` | `0x5F86475d57e9B488500d3CdA6F6Cb3938B192077` | `0x5F86475d57e9B488500d3CdA6F6Cb3938B192077` |
| Router     | `0x5cDCD41a8aAC737f78B2B2e7E4A8cdaE25Dbd02d` | `0xC9f8Faab4708F498942aa9a18Ad1AF857e59A3D7` | `0xEC462c303970BD8175Ef8A43aCE23241359175f9` |
| Permit2    | `0x000000000022D473030F116dDEE9F6B43aC78BA3` | `0x000000000022D473030F116dDEE9F6B43aC78BA3` | `0x000000000022D473030F116dDEE9F6B43aC78BA3` |

***

## External Entry Points

| Entry                                         | Purpose                                                                |
| --------------------------------------------- | ---------------------------------------------------------------------- |
| `https://rfq.halfmoondex.com`                 | HTTP gateway for listing, aggregated quotes, and single-MM firm quotes |
| `wss://qe.halfmoondex.com/v1/quote/orderbook` | WebSocket endpoint for per-MM depth subscription                       |

Before requesting quotes, call the Listing Endpoints to confirm the supported tokens, pairs, and network coverage for your integration.

***

## Rate Limits

Rate limits are enforced at multiple levels:

| Tier         | Limit      | Description                                           |
| ------------ | ---------- | ----------------------------------------------------- |
| Per-IP       | `100 QPS`  | Up to 100 requests per second per IP, burst limit 120 |
| Per-Instance | `1000 QPS` | Global limit per service instance                     |
| Global       | `5000 QPS` | Combined limit across all service instances           |

When exceeded, HTTP 429 is returned:

```json
{
  "code": 429,
  "message": "Rate limit exceeded",
  "data": {}
}
```
