InjectiveLabs/injective-rfq-toolkit. Start there before copying snippets from the docs into a production service.
Which example to use
| Goal | Entry point | Notes |
|---|---|---|
| Prove full WebSocket RFQ settlement | examples/test_settlement.py | Canonical E2E test: TakerStream request, MakerStream auth, quote, AcceptQuote. |
| Prove full native gRPC RFQ settlement | examples/test_settlement_grpc.py | Same path using native gRPC transport. |
| Run a reusable Python WebSocket maker | examples/python-mm/mark_quote_loop.py | Quotes mark +/- edge bps, supports fixed-price tests, handles MakerStream auth, logs quote and settlement updates. |
| Inspect the simpler Python maker loop | examples/python-mm/main.py | Useful for understanding the WebSocket client shape. |
| Run a Python native gRPC maker | examples/python-mm/main-grpc.py | Native gRPC maker reference. |
| Run a TypeScript native gRPC maker | examples/ts-mm/main-grpc.ts | Uses ethers signing helpers for EIP-712 v2. |
| Run a Go native gRPC maker | examples/go-mm/main-grpc/main.go | Go transport and quote loop reference. |
Python WebSocket / gRPC-web
| Area | Status | Implementation detail |
|---|---|---|
| Transport | Production-compatible | gRPC-web framed over WebSocket using the public injective_rfq_rpc.InjectiveRfqRPC service path. |
| MakerStream auth | Implemented | MakerStreamClient signs MakerChallenge when configured with auth_private_key, auth_evm_chain_id, and auth_contract_address. |
| Quote signing | Implemented | rfq_test.crypto.eip712.sign_quote_v2 signs the exact SignQuote typed-data schema. |
| Signed intents | Implemented | sign_conditional_order_v2 plus TakerStream sign_mode="v2" and evm_chain_id. |
| Ping/pong | Implemented | Client handles periodic stream liveness. |
Python native gRPC
Use native gRPC when your runtime can keep long-lived gRPC streams open cleanly and you do not need WebSocket/gRPC-web framing.TypeScript
The TypeScript reference focuses on native gRPC transport and EIP-712 v2 signing withethers.
Go
The Go reference demonstrates native gRPC maker connectivity and quote submission.What to copy into production
Copy patterns, not test constants:- Load chain ID, EIP-712 chain ID, contract address, and endpoints from config.
- Reuse the
SignQuotefield order exactly. - Send the exact decimal strings that were signed.
- Answer the MakerStream auth challenge before expecting RFQ requests.
- Treat
quote_ackas routing confirmation, not a fill. - Filter maker requests by taker address plus the ACK-returned
rfq_id; taker quote collection can use the ACK-returnedrfq_idwithin a single-taker stream. - Log
rfq_id,client_id, quote expiry, maker subaccount nonce, quote ACKs, and settlement updates.

