Skip to content

API reference

Base URL:

https://vector.example.com

Every endpoint requires your key in the api-key header — see Get API access. A missing or invalid key returns 401:

{ "code": 401, "message": "missing api-key header", "data": null }

The envelope

Successful responses wrap the payload as:

{ "code": 0, "data": , "message": "success" }

Errors reuse the HTTP status as the numeric code with data: null. This differs from Photon's and Meadow's {success, data, timestamp} envelope — keep the parsers separate.

Conventions

  • Amounts are base-10 integer strings in the token's smallest unit ("25000000" = 25 USDC). Never floats.
  • Slippage is a percentage (1 = 1%); fee rates are basis points.
  • Field casing: Build path takes capitalized Amount and Sender; Build best path returns the transaction under a capital-T Tx key; List tokens takes chain_id while Search tokens takes chainId. These are part of the wire contract — copy the examples exactly.
  • quoteId pins a quoted route until its expiry; building an expired quote fails and you should re-quote.

Endpoints

Each page below renders the full request/response schema from the OpenAPI spec and is interactive — you can call your deployment directly from the page.

Endpoint Purpose
List supported chains Chains, features, Vector contract per chain.
List tokens · Search tokens The token catalog.
Get quote routes Ranked route candidates for a pair.
Build path · Build path by ID · Build best path Executable calldata.
Get transaction status Cross-chain tracking by source tx hash.
Get gasless quote · Submit gasless swap · Get gasless swap status The gasless Permit2 flow.
Get portfolio A wallet's balances across configured chains.