Skip to main content
All reference implementations live in InjectiveLabs/injective-rfq-toolkit. Start there before copying snippets from the docs into a production service.
git clone https://github.com/InjectiveLabs/injective-rfq-toolkit.git
cd injective-rfq-toolkit
python3 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -e ".[dev]"

Which example to use

GoalEntry pointNotes
Prove full WebSocket RFQ settlementexamples/test_settlement.pyCanonical E2E test: TakerStream request, MakerStream auth, quote, AcceptQuote.
Prove full native gRPC RFQ settlementexamples/test_settlement_grpc.pySame path using native gRPC transport.
Run a reusable Python WebSocket makerexamples/python-mm/mark_quote_loop.pyQuotes mark +/- edge bps, supports fixed-price tests, handles MakerStream auth, logs quote and settlement updates.
Inspect the simpler Python maker loopexamples/python-mm/main.pyUseful for understanding the WebSocket client shape.
Run a Python native gRPC makerexamples/python-mm/main-grpc.pyNative gRPC maker reference.
Run a TypeScript native gRPC makerexamples/ts-mm/main-grpc.tsUses ethers signing helpers for EIP-712 v2.
Run a Go native gRPC makerexamples/go-mm/main-grpc/main.goGo transport and quote loop reference.

Python WebSocket / gRPC-web

AreaStatusImplementation detail
TransportProduction-compatiblegRPC-web framed over WebSocket using the public injective_rfq_rpc.InjectiveRfqRPC service path.
MakerStream authImplementedMakerStreamClient signs MakerChallenge when configured with auth_private_key, auth_evm_chain_id, and auth_contract_address.
Quote signingImplementedrfq_test.crypto.eip712.sign_quote_v2 signs the exact SignQuote typed-data schema.
Signed intentsImplementedsign_conditional_order_v2 plus TakerStream sign_mode="v2" and evm_chain_id.
Ping/pongImplementedClient handles periodic stream liveness.
Recommended validation command:
set -a
. ./.env
set +a
python examples/test_settlement.py

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.
python examples/test_settlement_grpc.py
Maker entry point:
python examples/python-mm/main-grpc.py

TypeScript

The TypeScript reference focuses on native gRPC transport and EIP-712 v2 signing with ethers.
npx tsx examples/ts-mm/main-grpc.ts
Use it as a signing and stream-shape reference. The Python toolkit remains the most complete executable harness for full testnet validation.

Go

The Go reference demonstrates native gRPC maker connectivity and quote submission.
go run ./examples/go-mm/main-grpc
Use the Go example for transport and protobuf wiring, then cross-check signature fields against Building and signing quotes.

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 SignQuote field order exactly.
  • Send the exact decimal strings that were signed.
  • Answer the MakerStream auth challenge before expecting RFQ requests.
  • Treat quote_ack as routing confirmation, not a fill.
  • Filter maker requests by taker address plus the ACK-returned rfq_id; taker quote collection can use the ACK-returned rfq_id within a single-taker stream.
  • Log rfq_id, client_id, quote expiry, maker subaccount nonce, quote ACKs, and settlement updates.
For endpoint values, see Testnet configuration. For operational validation, see Runbook.
Last modified on June 2, 2026