Metropolis Best Practices

Jupiter aims to offer an intuitive developer experience while integrating Jupiter via APIs/SDKs. Coupled with the guides available, we are sharing our best practices that alternate frontends can implement to provide a safe and seamless user experience across the ecosystem.

❗️

Jupiter do not take responsibility for any issues when using Jupiter API Routing. Utilize these safeguards & best practices to help keep your users safe.

Swap API

Quote API searches for a route between the two token inputs and optimises for maximum token received for users. This means that Quote API has no reference of what is a “correct” price per how a human understands it. On Jupiter, guardrails on the frontend to perform extra checks before a user clicks trade.

If you are building a frontend using /Quote , please following the following practices or implement checks on the interface to keep users safe.

Price Impact check

Price impact warning occurs when users’ trade size affects the underlying liquidity of the pool. Quoted Rate (from /Quote) and Market Rate are shown and compared side-by-side. We recommend users to reduce their trade size or split it up into multiple smaller orders using DCA to reduce price impact.### Price Reference checkWithin the summary section below the swap widget, Jupiter adds price reference check for users to check when the quoted price deviates from the market price (Birdeye in this case) to reduce user errors or accidental bad trades.### Minimum ReceivedMinimum received, alongside the fees that the user will pay, is shown in the summary section. This manages user expectations and help them better understand the transaction before executing .# Tokens API### 3-tiered Search OptimisationJupiter pre-bundles the top 100 tokens by volume to load whenever a user selects the search bar to ensure fast response time. When a user keys in a token symbol or contract address, we first query our ecosystem master list using TypeSense before on-chain query of contract address if it’s not in the list. When a user connects their wallet, tokens are sorted by account balance and then volume.### Essential Metadata InformationJupiter supports trading of Token2022 tokens and shows essential metadata information (freeze authority, mint authority, transfer tax). This gives the user a comprehensive view regarding the tokens.### Verification check[block:image]{"images":[{"image":["https://files.readme.io/9bb00ccab2c29994d67f063bcc4e9bf73c21680e10746029790e0e2f6d20028e-image.png",null,null],"align":"center","sizing":"px"}]}[/block]Jup.ag checks if the selected tokens are verified in the ecosystem master list with a ✅ and produces a warning if they are not verified. Users are encouraged to check the contract address of the unverified tokens before trading.# Limit Order API (Coming soon)It’s important to understand that limit orders at Jupiter are filled exactly as created. It is possible to create an order “Sell SOL at $1” and get it filled by an arbitrage bot.

Price API check

Jupiter’s frontend allows the user to compare their target rate with the market rate and shows the percentage difference. The warning will recommend the user to use Jupiter swap instead.

Confirmation Modal

In a case where Price API is down, the frontend implements a confirmation model to ensure that users can check their order summary before proceeding.