Vector overview¶
Vector is Edith's routing engine: one API that turns "swap X for Y" into ranked, executable routes. You ask for a quote, pick a route, and Vector hands back calldata you can submit — or, for gasless swaps, executes it for you through Photon so the user pays no gas at all.
On Hyperliquid, Vector quotes against HyperCore's Core order book and executes the fill as a gasless order through Photon — see HyperCore spot swap and Hyperliquid on Edith.
What Vector does¶
Quoting. Get quote routes returns route
candidates for a token pair, ranked by your chosen routeMode — best output,
fastest, or a balanced suggestion. Each route carries its full economics:
amountOut, minAmountOut after slippage, fee breakdown, gas estimate, the
path of legs it will execute, and the providers involved.
Building. Every quoted route has a quoteId. Exchange it for an executable
transaction with Build path by ID — or go
straight from parameters to transaction with
Build path or
Build best path (quote + build in a single
call). The response is {to, data, value, gasLimit, …} plus an
allowanceTarget when the input token needs an approval first.
Gasless execution. With
Get gasless quote the user signs a Permit2
message instead of sending a transaction. Vector pulls the input token with that
signature, swaps, and forwards the output — relayed and gas-paid via Photon. The
response links the two systems: every submission returns a photonTxId you can
follow in the Photon API.
The quote lifecycle¶
GET /quote ──▶ route candidates (each with a quoteId)
│ quoteId valid for a limited window (expiry on the route)
▼
POST /build-path-by-id ──▶ {to, data, value, gasLimit}
│
▼
you submit it ── or ── POST /gasless/submit-swap (Vector executes via Photon)
Quotes are deterministic snapshots: the quoteId pins the route, amounts, and
fee at quote time. After expiry, building fails and you re-quote.
Where to go next¶
- Run the Quickstart — quote to executed swap in minutes.
- Understand routes, modes, and acquisition.
- Go gasless with Permit2 swaps.