GET /partner/v1/{chainId}/quote for both price display and transaction construction. The endpoint returns the payer checks, approval target, expiry, simulation status, and transaction together.
Install and configure
config.ts
Protect the API key
Do not put the partner API key inNEXT_PUBLIC_* variables. Add the backend proxy and fetchPartnerQuote helper from the React Hooks guide. Your UI calls /api/akka/quote; only your server calls AKKA with the apikey header.
Complete swap component
The reusable hook handles fresh quoting, exact-target approval, EIP-1559 versus legacy fees, and receipt confirmation.SwapPage.tsx
The execution hook intentionally obtains a new quote when the button is
clicked. Never broadcast a debounced display quote after user delay, and never
retry a reverted transaction with old calldata.
Production checks
- Confirm the connected wallet is on the requested chain.
- Treat non-empty
issuesas blocking until resolved. - Independently validate any check whose status is
UNKNOWN. - Preserve
tx.to,tx.data, andtx.valueexactly. - Report
SUBMITTED, thenCONFIRMEDorREVERTED, throughPOST /partner/v1/executionsfrom your backend.
