diff --git a/Moved/1-limit-order-api.md b/Moved/1-limit-order-api.md
index 0df8d05a..d545e408 100644
--- a/Moved/1-limit-order-api.md
+++ b/Moved/1-limit-order-api.md
@@ -525,4 +525,4 @@ The Jupiter Limit Order's project account for the Referral Program is `45ruCyfdR
## Referral
-Check out the [referral program](/docs/apis/adding-fees) for Limit Order.
+Check out the [referral program](/docs/old//apis/adding-fees) for Limit Order.
diff --git a/Moved/2-how-swap-works/2-how-swap-works.md b/Moved/2-how-swap-works/2-how-swap-works.md
index 71e831e6..5bd44834 100644
--- a/Moved/2-how-swap-works/2-how-swap-works.md
+++ b/Moved/2-how-swap-works/2-how-swap-works.md
@@ -46,7 +46,7 @@ The Token Ledger caters to a wide range of use cases, which include but are not
- Facilitating the exchange of NFTs for tokens other than SOL.
Read more about the Token Ledger:
-https://station.jup.ag/docs/apis/swap-api#using-token-ledger-instruction
+https://station.jup.ag/docs/old/apis/swap-api#using-token-ledger-instruction
## Safety Notifications
diff --git a/Moved/blog-v1/2023-09-18-dca-out-of-beta/index.md b/Moved/blog-v1/2023-09-18-dca-out-of-beta/index.md
index 1d99e696..f27ccf4f 100644
--- a/Moved/blog-v1/2023-09-18-dca-out-of-beta/index.md
+++ b/Moved/blog-v1/2023-09-18-dca-out-of-beta/index.md
@@ -60,7 +60,7 @@ So in this scenario, if the **SOL price is within $19-$20**, the DCA will execut
## Expanded Tradable Token Selection
-Additionally, we've significantly broadened our range of supported tokens, expanding from the **top 20 traded tokens on Jupiter's list to encompass over 600 tokens**. This expansion is backed by the community-verified [Jupiter Strict Token List](/docs/token-list/token-list-api).
+Additionally, we've significantly broadened our range of supported tokens, expanding from the **top 20 traded tokens on Jupiter's list to encompass over 600 tokens**. This expansion is backed by the community-verified [Jupiter Strict Token List](/docs/old/token-list/token-list-api).
![DCAcomment4](DCAcomment4.jpg)
diff --git a/Moved/blog-v1/2023-10-23-jupiter-planetary-developer-week/index.md b/Moved/blog-v1/2023-10-23-jupiter-planetary-developer-week/index.md
index 0cbe7771..b42c7735 100644
--- a/Moved/blog-v1/2023-10-23-jupiter-planetary-developer-week/index.md
+++ b/Moved/blog-v1/2023-10-23-jupiter-planetary-developer-week/index.md
@@ -91,7 +91,7 @@ The Token Ledger caters to a wide range of use cases, which include but are not
- Facilitating the exchange of NFTs for tokens other than SOL.
Read more about the Token Ledger:
-https://station.jup.ag/docs/apis/swap-api#using-token-ledger-instruction
+https://station.jup.ag/docs/old/apis/swap-api#using-token-ledger-instruction
### Referral Fees Program to Simplify Fee Collection
In our pursuit of making life easier for our partners, we've streamlined the process of charging referral fees with the new referral fees program.
@@ -109,9 +109,9 @@ The partner journey is now hyper easy - They head over to Jupiter, create a refe
Give our dashboard a spin here: https://referral.jup.ag
-Read here on how to add your platform fees to Jupiter Swap : https://station.jup.ag/docs/apis/adding-fees
+Read here on how to add your platform fees to Jupiter Swap : https://station.jup.ag/docs/old/apis/adding-fees
-More info on Jupiter Referral Program: https://station.jup.ag/docs/additional-topics/referral-program
+More info on Jupiter Referral Program: https://station.jup.ag/docs/old/additional-topics/referral-program
![Referral](referral1.jpg)
@@ -131,7 +131,7 @@ For CPI to work, the transaction will be composed of these instructions:
4. The program then transfers the SOL back to the user.
-Read more here: https://station.jup.ag/docs/apis/cpi
+Read more here: https://station.jup.ag/docs/old/apis/cpi
The CPI approach is not without its limitations - because of Solana’s transaction limit of 1232 byte size, lookup tables cannot be used within a CPI call, swaps via CPI can fail at runtime since Jupiter routes may involve multiple DEXes in order to reduce price impact. Instead, we recommend taking the “flash-fil” approach to utilizing Jupiter Swap.
@@ -149,7 +149,7 @@ For Flash Fill to work, the transaction will be composed of these instructions:
This approach entirely bypasses the need for CPI calls, effectively sidestepping the constraints imposed by CPI.
-To delve deeper into these two approaches, check out our documentation here: https://station.jup.ag/docs/apis/flash-fill
+To delve deeper into these two approaches, check out our documentation here: https://station.jup.ag/docs/old/apis/flash-fill
## Partners Using v6 API
A big shout out to our key early adopters for running our v6 API and helping us improve our stability and features. Check out how they are using Jupiter to power their use cases.
@@ -194,7 +194,7 @@ ExactOut is particularly useful in scenarios involving the purchase of NFTs, all
The good news is that since the NFT Marketplace has integrated ExactOut into its interface, you can simply purchase the 40 SOL NFT and Jupiter swap would automatically calculate the most optimal amount of BONK required to purchase the 40 SOL NFT. This is achieved in a single click, eliminating the need to leave the site or perform additional calculations, while ensuring that you receive the best possible price through Jupiter.
This is extremely important to Solana as payments are a crucial part of bridging crypto with real-life applications, ultimately contributing to the mainstream adoption of the Solana ecosystem.
-Read more about ExactOut here: https://station.jup.ag/docs/apis/payments-api
+Read more about ExactOut here: https://station.jup.ag/docs/old/apis/payments-api
### ExactOut Showcase #1 - Sollinked
diff --git a/Moved/blog-v2/2023-09-18-dca-out-of-beta/index.md b/Moved/blog-v2/2023-09-18-dca-out-of-beta/index.md
index 1d99e696..26705492 100644
--- a/Moved/blog-v2/2023-09-18-dca-out-of-beta/index.md
+++ b/Moved/blog-v2/2023-09-18-dca-out-of-beta/index.md
@@ -60,7 +60,7 @@ So in this scenario, if the **SOL price is within $19-$20**, the DCA will execut
## Expanded Tradable Token Selection
-Additionally, we've significantly broadened our range of supported tokens, expanding from the **top 20 traded tokens on Jupiter's list to encompass over 600 tokens**. This expansion is backed by the community-verified [Jupiter Strict Token List](/docs/token-list/token-list-api).
+Additionally, we've significantly broadened our range of supported tokens, expanding from the **top 20 traded tokens on Jupiter's list to encompass over 600 tokens**. This expansion is backed by the community-verified [Jupiter Strict Token List](/docs/old//token-list/token-list-api).
![DCAcomment4](DCAcomment4.jpg)
diff --git a/Moved/blog-v2/2023-10-23-jupiter-planetary-developer-week/index.md b/Moved/blog-v2/2023-10-23-jupiter-planetary-developer-week/index.md
index 0cbe7771..8ac555eb 100644
--- a/Moved/blog-v2/2023-10-23-jupiter-planetary-developer-week/index.md
+++ b/Moved/blog-v2/2023-10-23-jupiter-planetary-developer-week/index.md
@@ -91,7 +91,7 @@ The Token Ledger caters to a wide range of use cases, which include but are not
- Facilitating the exchange of NFTs for tokens other than SOL.
Read more about the Token Ledger:
-https://station.jup.ag/docs/apis/swap-api#using-token-ledger-instruction
+https://station.jup.ag/docs/old/apis/swap-api#using-token-ledger-instruction
### Referral Fees Program to Simplify Fee Collection
In our pursuit of making life easier for our partners, we've streamlined the process of charging referral fees with the new referral fees program.
@@ -109,9 +109,9 @@ The partner journey is now hyper easy - They head over to Jupiter, create a refe
Give our dashboard a spin here: https://referral.jup.ag
-Read here on how to add your platform fees to Jupiter Swap : https://station.jup.ag/docs/apis/adding-fees
+Read here on how to add your platform fees to Jupiter Swap : https://station.jup.ag/docs/old/apis/adding-fees
-More info on Jupiter Referral Program: https://station.jup.ag/docs/additional-topics/referral-program
+More info on Jupiter Referral Program: https://station.jup.ag/docs/old/additional-topics/referral-program
![Referral](referral1.jpg)
@@ -131,7 +131,7 @@ For CPI to work, the transaction will be composed of these instructions:
4. The program then transfers the SOL back to the user.
-Read more here: https://station.jup.ag/docs/apis/cpi
+Read more here: https://station.jup.ag/docs/old/apis/cpi
The CPI approach is not without its limitations - because of Solana’s transaction limit of 1232 byte size, lookup tables cannot be used within a CPI call, swaps via CPI can fail at runtime since Jupiter routes may involve multiple DEXes in order to reduce price impact. Instead, we recommend taking the “flash-fil” approach to utilizing Jupiter Swap.
@@ -149,7 +149,7 @@ For Flash Fill to work, the transaction will be composed of these instructions:
This approach entirely bypasses the need for CPI calls, effectively sidestepping the constraints imposed by CPI.
-To delve deeper into these two approaches, check out our documentation here: https://station.jup.ag/docs/apis/flash-fill
+To delve deeper into these two approaches, check out our documentation here: https://station.jup.ag/docs/old/apis/flash-fill
## Partners Using v6 API
A big shout out to our key early adopters for running our v6 API and helping us improve our stability and features. Check out how they are using Jupiter to power their use cases.
@@ -194,7 +194,7 @@ ExactOut is particularly useful in scenarios involving the purchase of NFTs, all
The good news is that since the NFT Marketplace has integrated ExactOut into its interface, you can simply purchase the 40 SOL NFT and Jupiter swap would automatically calculate the most optimal amount of BONK required to purchase the 40 SOL NFT. This is achieved in a single click, eliminating the need to leave the site or perform additional calculations, while ensuring that you receive the best possible price through Jupiter.
This is extremely important to Solana as payments are a crucial part of bridging crypto with real-life applications, ultimately contributing to the mainstream adoption of the Solana ecosystem.
-Read more about ExactOut here: https://station.jup.ag/docs/apis/payments-api
+Read more about ExactOut here: https://station.jup.ag/docs/old//apis/payments-api
### ExactOut Showcase #1 - Sollinked
diff --git a/Moved/legacy/2-how-does-jupiter-work.md b/Moved/legacy/2-how-does-jupiter-work.md
index a27a97cd..1ee6c6d2 100644
--- a/Moved/legacy/2-how-does-jupiter-work.md
+++ b/Moved/legacy/2-how-does-jupiter-work.md
@@ -25,7 +25,7 @@ Jupiter will split your trade into smaller trade sizes. For example, if you want
### Automatically lists new tokens
-The number of new tokens being added is increasing at an ever faster pace. Jupiter automatically lists any tokens as long as their have [reached enough liquidity](/docs/get-your-token-onto-jup). This means you can be assured that you'll be able to trade new tokens as they launch on Solana.
+The number of new tokens being added is increasing at an ever faster pace. Jupiter automatically lists any tokens as long as their have [reached enough liquidity](/docs/old//get-your-token-onto-jup). This means you can be assured that you'll be able to trade new tokens as they launch on Solana.
### Automatically lists new markets
diff --git a/docs/0-api-setup.md b/docs/0-api-setup.md
new file mode 100644
index 00000000..2a36503a
--- /dev/null
+++ b/docs/0-api-setup.md
@@ -0,0 +1,109 @@
+---
+sidebar_label: "API Setup"
+description: "Guide to setting up API Keys to access Jupiter APIs."
+title: "API Setup"
+---
+
+
+ API Setup
+
+
+
+Get started by setting up an account on the dashboard to generate API Keys and managing payments via Sphere.
+
+Then, to use the API Key in our APIs, simply add the key to the header.
+
+```js
+headers: {
+ 'Content-Type': 'application/json',
+ 'x-api-key': '' // enter api key here
+},
+```
+
+## 1. Open Portal
+
+Navigate to https://portal.jup.ag
+
+## 2. Connect via email
+
+To enter the portal, simply connect via email account. This allows us to keep track of your account tagged to your API Keys.
+
+![Connect](./img/connect.png)
+
+## 3. Browse and Select Plan
+
+To decide on a suitable plan by gauging requests required by your project size and user needs.
+
+:::note Change of plans
+You can always change your plans later.
+
+Plan changing by yourself is a work in progress. Please reach out to the team in the meantime.
+:::
+
+![Plans](./img/plans.png)
+
+## 4. Payment
+
+Before you set up your keys, you will need to make the payment upfront via Sphere.
+
+1. Redirected to Sphere payment page.
+2. Enter the required details.
+3. Connect wallet to pay via Solana blockchain
+4. Click the **Subscribe** button to proceed.
+
+:::note other payment methods
+New payment methods is a work in progress.
+:::
+
+:::caution Payment delegation
+Do note that the Sphere payment is set up as a [delegation payment method](https://docs.spherepay.co/api/subscription).
+
+This means that you have delegated the total billable to be deducted/withdrawn from your wallet automatically per month.
+
+For example, in the image, 2.4 USDC is total billable which will mean your wallet will be delegated to be billed every month, while 0.2 USDC is to be paid upfront upon signing.
+:::
+
+:::caution Out of funds
+If your delegated wallet has insufficient funds to pay for the new month, your API Key will be disregarded, and your requests will fallback as a typical call via the free plan.
+:::
+
+![Payment](./img/payment.png)
+
+## 5. Processing Screen
+
+Yes, please wait.
+
+![Processing](./img/processing.png)
+
+## 6. Setup API Keys
+
+Click on the **"+ Generate Key"** button to generate an API Key.
+
+:::caution Generating multiple keys
+The rate limits are imposed on a **PER ACCOUNT** basis, not per API Key.
+
+If you need more requests, you can upgrade the plan, or create a completely new account and subscribe to a plan, (this means you will have 2 separate accounts, each has its own plans).
+:::
+
+![Generate](./img/generate.png)
+
+## 7. Have a Question?
+
+Please reach out to us.
+- If you have increasing demand and growth in your app, and need additional support.
+- If you have questions or need support.
+- Join the [Telegram channel](https://t.me/jup_dev) or [Discord channel](https://discord.com/channels/897540204506775583/1115543693005430854) to subsribe to updates.
+
+## 8. Get Started!
+
+With your API Key, you can gain higher request access to `/quote`, `/swap` and other endpoints to build world class applications.
+
+If you are new to development, do take a look at
+- [Get Started](./get-started)
+- [Development Basics](./development-basics)
+
+Dive right in!
+- [Swap API](./swap-api/get-quote)
+- [Price API](./utility/price-api)
+- [Token API](./utility/token-api)
+- [API Reference](./api)
diff --git a/docs/1-get-started.md b/docs/1-get-started.md
new file mode 100644
index 00000000..4cc956a2
--- /dev/null
+++ b/docs/1-get-started.md
@@ -0,0 +1,86 @@
+---
+sidebar_label: "Get Started"
+description: "Get Started with setting up libraries, connection and local wallet to build with Jupiter API."
+title: "Get Started"
+---
+
+
+ Get Started
+
+
+
+To use Jupiter and interact with the Solana network, you need to install the necessary libraries and set up a connection to the network via an RPC endpoint.
+
+:::note about the guide
+In this guide, we'll be using the most used library, `web3.js` to get you started. Do note that there are other libraries using Rust instead of Javascript.
+:::
+
+## 1. Install required libraries
+
+Running this example requires a minimum of [NodeJS 16](https://nodejs.org/en/). In your command line terminal, install the libraries.
+
+The current documentation walkthrough was developed with
+- `"@solana/web3.js": "^1.95.4"`
+- `"@coral-xyz/anchor": "^0.30.1"`
+- `"@solana/spl-token": "^0.4.9"`
+- `"@jup-ag/referral-sdk": "^0.1.7"`
+
+```bash
+npm i @solana/web3.js@1
+npm i @coral-xyz/anchor
+npm i cross-fetch
+npm i bs58
+```
+
+## 2. Import from libraries
+
+Next, create a new Javascript/Typescript file and import these interfaces and functions.
+
+```jsx
+import { Connection, Keypair, VersionedTransaction } from '@solana/web3.js';
+import { Wallet } from '@coral-xyz/anchor';
+import bs58 from 'bs58';
+import fetch from 'cross-fetch';
+```
+
+## 3. Set up Connection
+
+Solana provides a [default RPC endpoint](https://solana.com/docs/core/clusters) to get started and in the example code, we will be using that. However, as your application grows, we recommend you to always use your own or provision a 3rd party provider’s RPC endpoint such as [Helius](https://helius.dev/) or [Triton](https://triton.one/).
+
+```jsx
+const connection = new Connection('https://api.mainnet-beta.solana.com');
+```
+
+## 4. Set up your Wallet
+
+You can paste in your private key for testing purposes but this is not recommended for production applications.
+
+If you want to store your private key in the project directly, you can do it via a `.env` file.
+
+```jsx
+// index.js
+import dotenv from 'dotenv';
+
+const wallet = new Wallet(Keypair.fromSecretKey(bs58.decode(process.env.PRIVATE_KEY || '')));
+
+console.log(wallet.publicKey.toBase58());
+```
+
+```
+// .env
+PRIVATE_KEY=""
+```
+
+If you have [created a wallet via Solana CLI](https://solana.com/docs/intro/installation#solana-cli-basics) and your private key is stored outside of your project, you can do it this way instead.
+
+```jsx
+import fs from 'fs';
+
+const privateKeyArray = JSON.parse(fs.readFileSync('/Users/user/.config/solana/id.json', 'utf8').trim());
+
+const wallet = new Wallet(Keypair.fromSecretKey(new Uint8Array(privateKeyArray)));
+
+console.log(wallet.publicKey.toBase58());
+```
+
+Now, you are all set up and ready to use one of our product’s APIs and send a transaction to the Solana network!
diff --git a/docs/100-swap-api/1-get-quote.md b/docs/100-swap-api/1-get-quote.md
new file mode 100644
index 00000000..908a97db
--- /dev/null
+++ b/docs/100-swap-api/1-get-quote.md
@@ -0,0 +1,129 @@
+---
+sidebar_label: "Get Quote"
+description: "Start using Jupiter Swap API by getting a Quote."
+title: "Get Quote"
+---
+
+
+ Get Quote
+
+
+
+:::warning Please use the Swap API at your own discretion.
+
+The Jupiter UI at https://jup.ag/ contains multiple safeguards, warnings and default settings to guide our users to trade safer. Jupiter is not liable for lesses incurred by users on other platforms.
+
+If you need clarification or support, please reach out to us in [Discord](https://discord.gg/jup).
+:::
+
+The Quote API enables you to tap into the Jupiter routing engine, which accesses the deep liquidity available within the DEXes of Solana's DeFi ecosystem. In this guide, we will walkthrough how you can get a quote for a specific token pair and other related parameters.
+
+## Let’s Get Started
+
+In this guide, we will be using the Solana web3.js package.
+
+If you have not set up your environment to use the necessary libraries and the connection to the Solana network, please head over to [get started](../1-get-started.md).
+
+:::tip API Reference
+To fully utilize the Quote API, check out the [Quote API Reference](/docs/api/quote).
+:::
+
+## Quote API
+
+The root URL of the Quote API is as such.
+
+```
+https://api.jup.ag/quote/v1
+```
+
+The most common trading pair on Solana is SOL and USDC, in order to get a quote for this specific token pair, you need to pass in the required parameters such as:
+
+| Parameters | Description |
+| --- | --- |
+| inputMint | The pubkey or token mint address e.g. So11111111111111111111111111111111111111112 |
+| outputMint | The pubkey or token mint address e.g. EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
+| amount | The number of **input** tokens before the decimal is applied, also known as the “raw amount” or “integer amount” in lamports for SOL or atomic units for all other tokens. |
+| slippageBps | The number of basis points you can tolerate to lose during time of execution. e.g. 1% = 100bps |
+
+## Get Quote
+
+Using the root URL and parameters to pass in, it is as simple as the example code below!
+
+```jsx
+const quoteResponse = await (
+ await fetch(
+ 'https://api.jup.ag/quote/v1?inputMint=So11111111111111111111111111111111111111112&outputMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount=100000000&slippageBps=50&restrictIntermediateTokens=true'
+ )
+ ).json();
+
+console.log(JSON.stringify(quoteResponse, null, 2));
+```
+
+From the above example, you should see this response.
+
+```json
+{
+ "inputMint": "So11111111111111111111111111111111111111112",
+ "inAmount": "100000000",
+ "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
+ "outAmount": "16198753",
+ "otherAmountThreshold": "16117760",
+ "swapMode": "ExactIn",
+ "slippageBps": 50,
+ "platformFee": null,
+ "priceImpactPct": "0",
+ "routePlan": [
+ {
+ "swapInfo": {
+ "ammKey": "5BKxfWMbmYBAEWvyPZS9esPducUba9GqyMjtLCfbaqyF",
+ "label": "Meteora DLMM",
+ "inputMint": "So11111111111111111111111111111111111111112",
+ "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
+ "inAmount": "100000000",
+ "outAmount": "16198753",
+ "feeAmount": "24825",
+ "feeMint": "So11111111111111111111111111111111111111112"
+ },
+ "percent": 100
+ }
+ ],
+ "contextSlot": 299283763,
+ "timeTaken": 0.015257836
+}
+```
+
+:::tip
+`outAmount` refers to the best possible output amount based on the route at time of quote, this means that `slippageBps` does not affect.
+:::
+
+## What’s Next
+
+Now, you are able to get a quote, next steps is to submit a transaction to execute the swap based on the quote given. Let’s go!
+
+---
+
+## Additional Resources
+
+### Restrict Intermediate Tokens
+
+`restrictIntermediateTokens` can be set to `true` . If your route is routed through random intermediate tokens, it will fail more frequently. With this, we make sure that your route is only routed through highly liquid intermediate tokens to give you the best price and more stable route.
+
+### Legacy Transactions
+
+All Jupiter swaps are using Versioned Transactions and Address Lookup Tables. However, not all wallets support Versioned Transactions yet, so if you detect a wallet that does not support versioned transactions, you will need to set the `asLegacyTransaction` parameter to `true`.
+
+### Adding Fees
+
+By using the Quote API in your app, you can add a fee to charge your users. You can refer to the `platformFeeBps` parameter and to add it, you will need to set up a Referral Account through our Referral Program, read here to get started.
+
+:::note
+If you choose to set up platform fees on your app to charge your users, Jupiter will take 2.5% of the fee.
+:::
+
+### Direct Routes and Max Accounts
+
+These 2 parameters can be useful for those who are building your own programs or apps. `onlyDirectRoutes` essentially restricts the routing to only go through 1 market; whereas `maxAccounts` can provide you with flexibility to utilize other accounts in your transaction.
+
+:::warning unfavorable trades
+Please be aware that using these 2 parameters can often yield unfavorable trades or outcomes.
+:::
diff --git a/docs/100-swap-api/100-limit-order-api.md b/docs/100-swap-api/100-limit-order-api.md
new file mode 100644
index 00000000..f06aea2f
--- /dev/null
+++ b/docs/100-swap-api/100-limit-order-api.md
@@ -0,0 +1,383 @@
+---
+sidebar_label: "Limit Order API"
+description: "Use the Jupiter Limit Order API to create/cancel orders or view open/historical orders."
+title: "Limit Order API"
+---
+
+
+ Limit Order API
+
+
+
+In this guide, we will walkthrough integrating our Limit Order (LO) program through our Limit Order API. LO can be useful if you are building a trading bot, integrating into existing apps or for buying into tokens.
+
+Before you get started, you might want to understand how our LO product works in this guide and get yourself set up in [Get Started](../1-get-started.md) guide with the necessary libraries and RPC connection.
+
+## Let’s Get Started
+
+The root URL of the LO API is as such.
+
+```markdown
+https://api.jup.ag/limit/v2
+```
+
+## Create Limit Order Transaction
+
+This is a POST request to `/createOrder` endpoint. Similar to Swap API, you pass in the necessary parameters and our backend will create the Limit Order transaction for you to sign and send to the network seamlessly.
+
+:::tip Optional Parameters
+Do note that there are a few optional parameters that you can use, such as:
+
+- Setting an expiry date on the order.
+- Adding fees through our referral program, please ensure that your `referralAccount` has the necessary `referralTokenAccount`s of the output mint of the limit order for it to work, you can learn more about creating them dynamically in the [Add Fees To Swap](../100-swap-api/4-add-fees-to-swap.md) guide.
+
+This is another parameter that is optional but it is important to check if you support all tokens.
+
+- Specifying the token program if input or output mint is a Token2022 token.
+:::
+
+#### Define the mints and programs of these mints.
+
+```jsx
+const inputMint = new PublicKey("So11111111111111111111111111111111111111112");
+const outputMint = new PublicKey("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v");
+
+const inputMintTokenProgram = (await connection.getAccountInfo(inputMint)).owner.toString();
+const outputMintTokenProgram = (await connection.getAccountInfo(outputMint)).owner.toString();
+
+console.log(inputMintTokenProgram);
+console.log(outputMintTokenProgram);
+```
+
+#### Create a POST request to the `/createOrder` endpoint.
+
+```jsx
+const createOrderResponse = await (
+ await fetch('https://api.jup.ag/limit/v2/createOrder', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ // 'x-api-key': '' // enter api key here
+ },
+ body: JSON.stringify({
+ inputMint: inputMint.toString(),
+ outputMint: outputMint.toString(),
+ maker: "5dMXLJ8GYQxcHe2fjpttVkEpRrxcajRXZqJHCiCbWS4H",
+ payer: "5dMXLJ8GYQxcHe2fjpttVkEpRrxcajRXZqJHCiCbWS4H",
+ params: {
+ makingAmount: "1000000",
+ takingAmount: "300000",
+ // expiredAt: "", // In unix seconds (e.g. Date.now()/1_000) or optional
+ // feeBps: "", // Requires referral account or optional
+ },
+ computeUnitPrice: "auto",
+ // referral: "", // Optional but if specified it is the referral token account of the output mint
+ inputTokenProgram: inputMintTokenProgram, // Default to token program if empty or specify e.g. token2022 program
+ outputTokenProgram: outputMintTokenProgram, // same as above
+ // wrapAndUnwrapSol: true, // Default true or optional
+ })
+ })
+).json();
+
+console.log(createOrderResponse);
+```
+
+From the above example, you should see this sample response.
+
+```json
+{
+ order: 'CFG9Bmppz7eZbna96UizACJPYT3UgVgps3KkMNNo6P4k',
+ tx: 'AQAAAAAAAAAAAAAAAAAAAAAA......AgAKCAkBAQsPAAADBAEMCwcKCQkIBg0LIoVuSq9wn/WfdskdmHlfUulAQg8AAAAAAICpAwAAAAAAAAAJAwEAAAEJAA=='
+}
+```
+
+## Send Limit Order Transaction
+
+This step is the same as what we do in Swap API, you can read more about how to reformat the serialized create order response, sign and send to the network.
+
+[We recommend you to read that walkthrough to understand better.](../100-swap-api/3-send-swap-transaction.md)
+
+```jsx
+const transactionBase64 = createOrderResponse.tx
+const transaction = VersionedTransaction.deserialize(Buffer.from(transactionBase64, 'base64'));
+
+transaction.sign([wallet.payer]);
+
+const transactionBinary = transaction.serialize();
+
+const signature = await connection.sendRawTransaction(transactionBinary, {
+ maxRetries: 2,
+ skipPreflight: true
+});
+
+const confirmation = await connection.confirmTransaction({ signature }, "finalized");
+
+if (confirmation.value.err) {
+ throw new Error(`Transaction failed: ${JSON.stringify(confirmation.value.err)}\n\nhttps://solscan.io/tx/${signature}/`);
+} else console.log(`Transaction successful: https://solscan.io/tx/${signature}/`);
+```
+
+## View Open Orders
+
+This is a GET request to `/openOrders` endpoint. Underneath it, we are proxying the [getProgramAccounts](https://solana.com/docs/rpc/http/getprogramaccounts) RPC method and returning all order accounts associated to the specified wallet account.
+
+:::tip
+You can optionally pass in the input and output token mint addresses to filter the open orders.
+:::
+
+```jsx
+const openOrderResponse = await (
+ await fetch(
+ 'https://api.jup.ag/limit/v2/openOrders?wallet=ReplaceWithWallet'
+ )
+).json();
+
+console.log(openOrderResponse);
+```
+
+An example response is as such.
+
+```json
+[
+ {
+ account: {
+ borrowMakingAmount: '0',
+ createdAt: '2024-11-20T07:40:56.000Z',
+ expiredAt: null,
+ makingAmount: '1000000',
+ oriMakingAmount: '1000000',
+ oriTakingAmount: '240000',
+ takingAmount: '240000',
+ uniqueId: '18070363443762671260',
+ updatedAt: '1732088456',
+ feeAccount: 'APWoLnZc8g8iXLA8qLdHJ4w42ybRrq2Vm8UGQhH7TJ3r',
+ inputMint: 'So11111111111111111111111111111111111111112',
+ inputMintReserve: 'HGeoc1bAvfSCWjMZi3brwv9t76J9s8GBWAL1a9SQ4qgk',
+ inputTokenProgram: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
+ maker: ...,
+ outputMint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
+ outputTokenProgram: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
+ feeBps: 10,
+ bump: 255
+ },
+ publicKey: AccountOrderPublicKey
+ },
+ {
+ account: {
+ borrowMakingAmount: '0',
+ createdAt: '2024-11-20T07:48:29.000Z',
+ expiredAt: null,
+ makingAmount: '1000000',
+ oriMakingAmount: '1000000',
+ oriTakingAmount: '240000',
+ takingAmount: '240000',
+ uniqueId: '17052427428481482637',
+ updatedAt: '1732088909',
+ feeAccount: 'APWoLnZc8g8iXLA8qLdHJ4w42ybRrq2Vm8UGQhH7TJ3r',
+ inputMint: 'So11111111111111111111111111111111111111112',
+ inputMintReserve: '6oQUyifngb4tgZ1gEmirw4keFB1LeEE2tkoVEj3tu7Ee',
+ inputTokenProgram: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
+ maker: ...,
+ outputMint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
+ outputTokenProgram: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
+ feeBps: 10,
+ bump: 254
+ },
+ publicKey: AccountOrderPublicKey
+ }
+]
+```
+
+## Cancel Limit Order Transaction
+
+This is a POST request to `/cancelOrder` endpoint. This will also return with the serialized transaction to be signed by the order account owner and then sent to the network. You will need to pass in the exact public keys of your open orders to cancel them, so you might need to use the `/openOrders` endpoint to get the public keys or other methods if you have a user interface.
+
+:::tip
+If no orders are specified, the API would return the serialized transactions to cancel **ALL** open orders, batched in groups of 5 orders.
+:::
+
+#### Fetch open orders data to get pubkeys
+
+```jsx
+const openOrderResponse = await (
+ await fetch(
+ 'https://api.jup.ag/limit/v2/openOrders?wallet=ReplaceWithWallet'
+ )
+).json();
+```
+
+#### Choose what orders to cancel
+If you have a user interface, you will need to have the user choose the order to cancel and then pass its pubkey in here. For example sake, we will just slice the array of pubkeys to take the first in the array.
+
+```jsx
+// To CANCEL ALL orders, pass in the entire array of public keys or do not pass in any
+const publicKeys = openOrderResponse.map(item => item.publicKey);
+
+// To CANCEL SPECIFIC orders, select specific public keys but keep it as an array to be passed in
+const publicKeyToCancelArray = publicKeys.slice(0, 1);
+
+console.log(publicKeyToCancelArray);
+```
+
+#### Build cancel order transaction(s)
+
+```jsx
+const cancelOrderResponse = await (
+ await fetch('https://api.jup.ag/limit/v2/cancelOrders', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ // 'x-api-key': '' // enter api key here
+ },
+ body: JSON.stringify({
+ maker: "5dMXLJ8GYQxcHe2fjpttVkEpRrxcajRXZqJHCiCbWS4H",
+ computeUnitPrice: "auto",
+ orders: publicKeyToCancelArray, // a list of order accounts, if non are passed in, it will attempt to cancel ALL
+ })
+ })
+).json();
+
+console.log(cancelOrderResponse);
+```
+
+An example response is as such. Then take the serialized transaction response and follow the steps to [sign and send to the network](#send-limit-order-transaction).
+
+```json
+// Open orders response
+[
+ {
+ account: {
+ borrowMakingAmount: '0',
+ createdAt: '2024-11-20T10:32:20.000Z',
+ expiredAt: null,
+ makingAmount: '1000000',
+ oriMakingAmount: '1000000',
+ oriTakingAmount: '300000',
+ takingAmount: '300000',
+ uniqueId: '12459093665923607188',
+ updatedAt: '1732098740',
+ feeAccount: 'APWoLnZc8g8iXLA8qLdHJ4w42ybRrq2Vm8UGQhH7TJ3r',
+ inputMint: 'So11111111111111111111111111111111111111112',
+ inputMintReserve: 'HbaSeXEBMDsdHz7GtNoMjRZVN8nZ9CAdjhgBAngBhZhX',
+ inputTokenProgram: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
+ maker: Wallet,
+ outputMint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
+ outputTokenProgram: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
+ feeBps: 10,
+ bump: 255
+ },
+ publicKey: AccountOrderPublicKey0
+ },
+ {
+ account: {
+ borrowMakingAmount: '0',
+ createdAt: '2024-11-20T10:37:36.000Z',
+ expiredAt: null,
+ makingAmount: '1000000',
+ oriMakingAmount: '1000000',
+ oriTakingAmount: '300000',
+ takingAmount: '300000',
+ uniqueId: '11785358119410645298',
+ updatedAt: '1732099056',
+ feeAccount: 'APWoLnZc8g8iXLA8qLdHJ4w42ybRrq2Vm8UGQhH7TJ3r',
+ inputMint: 'So11111111111111111111111111111111111111112',
+ inputMintReserve: 'ARnUVsGURQMvkmQ684Uko8U2pFhC4dXjw8fNZt7fLQ6G',
+ inputTokenProgram: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
+ maker: Wallet,
+ outputMint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
+ outputTokenProgram: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
+ feeBps: 10,
+ bump: 255
+ },
+ publicKey: AccountOrderPublicKey1
+ }
+]
+
+// Console log publicKeys
+[
+ 'AccountOrderPublicKey0',
+ 'AccountOrderPublicKey1'
+]
+
+// Console log publicKeyToCancelArray
+[ 'AccountOrderPublicKey0' ]
+
+// Console log cancelOrderResponse
+{
+ txs: [
+ 'AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA......FWPqnIQMDAAkDvRcoAAAAAAADAAUCY10AAAQJAAABAgQFBgcECF+B7fAIMd+EAA=='
+ ]
+}
+```
+
+## View Order History
+
+This is a GET request to `/orderHistory` endpoint. The response is paginated for every 10 orders and you can view different pages using the `page` parameter. The `hasMoreData` boolean will indicate if you have more data in the next page.
+
+```jsx
+const orderHistoryResponse = await (
+ await fetch(
+ 'https://api.jup.ag/limit/v2/orderHistory?wallet=ReplaceWithWallet&page=1'
+ )
+).json();
+
+console.log(orderHistoryResponse);
+```
+
+An example response is as such.
+
+```json
+{
+ orders: [
+ {
+ userPubkey: 'Wallet',
+ orderKey: 'AccountOrderPublicKey',
+ inputMint: 'So11111111111111111111111111111111111111112',
+ outputMint: '6SUryVEuDz5hqAxab6QrGfbzWvjN8dC7m29ezSvDpump',
+ makingAmount: '3.599980699',
+ takingAmount: '119999.356633',
+ remainingMakingAmount: '0',
+ remainingTakingAmount: '0',
+ expiredAt: null,
+ createdAt: '2024-07-18T12:01:02Z',
+ updatedAt: '2024-07-21T03:07:19Z',
+ status: 'Completed',
+ openTx: 'OpenTransaction',
+ closeTx: 'CloseTransaction',
+ programVersion: 'j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X',
+ trades: [Array]
+ },
+ ... 8 other in between ...
+ {
+ userPubkey: 'Wallet',
+ orderKey: 'AccountOrderPublicKey',
+ inputMint: 'EKEWAk7hfnwfR8DBb1cTayPPambqyC7pwNiYkaYQKQHp',
+ outputMint: 'So11111111111111111111111111111111111111112',
+ makingAmount: '65007.744521',
+ takingAmount: '25.650235771',
+ remainingMakingAmount: '65007.744521',
+ remainingTakingAmount: '25.650235771',
+ expiredAt: null,
+ createdAt: '2024-06-30T23:23:51Z',
+ updatedAt: '2024-07-22T07:31:27Z',
+ status: 'Cancelled',
+ openTx: 'OpenTransaction',
+ closeTx: 'CloseTransaction',
+ programVersion: 'j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X',
+ trades: []
+ }
+ ],
+ hasMoreData: true,
+ page: 1
+}
+```
+
+## Best Practices
+
+The Limit Order program has some caveats.
+
+| Item | Recommendation |
+| --- | --- |
+| The LO program will accept any value to create an order. | On jup.ag, our frontend enforces a minimum of 5 USD per order to be created, this will ensure our keepers can accommodate for no loss in transaction fees coverage. However, programatically, if you do not enforce this, the user can still create an order. |
+| The LO program does not check the price or rate of the order, and the keeper will execute as instructed. | On our frontend, when user attempts to set the rate to buy above market price, we provide warnings and disable the execution if above 5%.
If the order is created with such rates, the keeper will execute as instructed. For example, if user sets to Sell 1000 USDC to Buy 1 SOL at the rate of 1000 SOL/USDC, the keeper will execute as instructed and the additional funds will be lost. |
+| Tokens with transfer tax extension are disabled. | Our frontend informs the user if the token has transfer tax. |
\ No newline at end of file
diff --git a/docs/100-swap-api/2-build-swap-transaction.mdx b/docs/100-swap-api/2-build-swap-transaction.mdx
new file mode 100644
index 00000000..8f241f52
--- /dev/null
+++ b/docs/100-swap-api/2-build-swap-transaction.mdx
@@ -0,0 +1,337 @@
+---
+sidebar_label: "Build Swap Transaction"
+description: "Jupiter Swap API helps you to build your swap transaction using the quote."
+title: "Build Swap Transaction"
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+
+ Build Swap Transaction
+
+
+
+The Swap API is one of the ways for you to interact with the Jupiter Swap Aggregator program. Before you send a transaction to the network, you will need to build the transaction that defines the instructions to execute and accounts to read/write to.
+
+It can be complex to handle this yourself, but good news! Most of our APIs and SDKs just handles it for you, so you get a response with the transaction to be prepared and sent to the network.
+
+:::tip Use Swap API to handle it for you or ...
+
+If you are looking to interact with the Jupiter Swap Aggregator program in a different way, check out the other guides:
+
+#### Swap Instructions
+To compose with instructions and build your own transaction, [read how to use the `/swap-instructions` in this section](#build-your-own-transaction-with-instructions).
+
+#### Flash Fill or Cross Program Invocation (CPI)
+To interact with your own Solana program, [read how to use the **Flash Fill method** or **CPI** in this section](#build-your-own-transaction-with-flash-fill-or-cpi).
+:::
+
+## Let’s Get Started
+
+In this guide, we will pick up from where [**Get Quote**](./1-get-quote.md) guide has left off.
+
+If you have not set up your environment to use the necessary libraries, the RPC connection to the network and successfully get a quote from the Quote API, please start at [get started](../1-get-started.md) or [get quote](./1-get-quote.md).
+
+:::tip API Reference
+To fully utilize the Swap API, check out the [Swap API Reference](/docs/api/swap) or [Swap Instructions Reference](/docs/api/swap-instructions).
+:::
+
+## Swap API
+
+The root URL of the Swap API is as such.
+
+```markdown
+https://api.jup.ag/swap/v1
+```
+
+From the previous guide on getting a quote, now using the quote response and your wallet, you can receive a **serialized swap transaction** that can be needs to be prepared and signed before sending to the network.
+
+## Get Serialized Transaction
+
+Using the root URL and parameters to pass in, it is as simple as the example code below!
+
+:::tip Optimizing for Transaction Landing is super super important!
+This code block includes additional parameters that our Swap API supports, such as estimating compute units, priority fees and slippage, to optimize for transaction landing.
+
+To understand how these parameters help, the next step, [Send Swap Transaction guide](./3-send-swap-transaction.md) will discuss them.
+:::
+
+```jsx
+const swapResponse = await (
+await fetch('https://api.jup.ag/swap/v1', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ // 'x-api-key': '' // enter api key here
+ },
+ body: JSON.stringify({
+ quoteResponse,
+ userPublicKey: wallet.publicKey.toString(),
+
+ // ADDITIONAL PARAMETERS TO OPTIMIZE FOR TRANSACTION LANDING
+ // See next guide to optimize for transaction landing
+ dynamicComputeUnitLimit: true,
+ dynamicSlippage: true,
+ prioritizationFeeLamports: {
+ priorityLevelWithMaxLamports: {
+ maxLamports: 1000000,
+ priorityLevel: "veryHigh"
+ }
+ }
+ })
+})
+).json();
+
+console.log(swapResponse);
+```
+
+From the above example, you should see this response.
+
+```json
+{
+ swapTransaction: 'AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQAGDkS+3LuGTbs......+/oD9qb31dH6i0QZ2IHELXUX3Y1YeW79p9Stkqk12z4yvZFJiQ4GCQwLBwYQBgUEDggNTQ==',
+ lastValidBlockHeight: 279632475,
+ prioritizationFeeLamports: 9999,
+ computeUnitLimit: 388876,
+ prioritizationType: {
+ computeBudget: {
+ microLamports: 25715,
+ estimatedMicroLamports: 785154
+ }
+ },
+ dynamicSlippageReport: {
+ slippageBps: 50,
+ otherAmount: 20612318,
+ simulatedIncurredSlippageBps: -18,
+ amplificationRatio: '1.5',
+ categoryName: 'lst',
+ heuristicMaxSlippageBps: 100
+ },
+ simulationError: null
+}
+```
+
+## What’s Next
+
+Now, you are able to get a quote and use our Swap API to build the swap transaction for you. Next steps is to proceed to prepare and sign the transaction and send the signed transaction to the network.
+
+**[Let’s go sign and send!](./3-send-swap-transaction.md)**
+
+---
+
+## Additional Resources
+
+### Build Your Own Transaction With Instructions
+
+If you may prefer to compose with instructions instead of the provided transaction that is returned from the `/swap` endpoint (like the above example). You can post to `/swap-instructions` instead, it takes the same parameters as the `/swap` endpoint but returns you the instructions rather than the serialized transaction.
+
+
+
+
+
+ /swap-instructions code snippet
+
+
+
+Example code snippet of using `/swap-instruction`
+
+```jsx
+const instructions = await (
+ await fetch('https://api.jup.ag/swap-instructions/v1', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify({
+ quoteResponse,
+ userPublicKey: wallet.publicKey.toString(),
+ })
+ })
+).json();
+
+if (instructions.error) {
+ throw new Error("Failed to get swap instructions: " + instructions.error);
+}
+
+const {
+ tokenLedgerInstruction, // If you are using `useTokenLedger = true`.
+ computeBudgetInstructions, // The necessary instructions to setup the compute budget.
+ setupInstructions, // Setup missing ATA for the users.
+ swapInstruction: swapInstructionPayload, // The actual swap instruction.
+ cleanupInstruction, // Unwrap the SOL if `wrapAndUnwrapSol = true`.
+ addressLookupTableAddresses, // The lookup table addresses that you can use if you are using versioned transaction.
+} = instructions;
+
+const deserializeInstruction = (instruction) => {
+ return new TransactionInstruction({
+ programId: new PublicKey(instruction.programId),
+ keys: instruction.accounts.map((key) => ({
+ pubkey: new PublicKey(key.pubkey),
+ isSigner: key.isSigner,
+ isWritable: key.isWritable,
+ })),
+ data: Buffer.from(instruction.data, "base64"),
+ });
+};
+
+const getAddressLookupTableAccounts = async (
+ keys: string[]
+): Promise => {
+ const addressLookupTableAccountInfos =
+ await connection.getMultipleAccountsInfo(
+ keys.map((key) => new PublicKey(key))
+ );
+
+ return addressLookupTableAccountInfos.reduce((acc, accountInfo, index) => {
+ const addressLookupTableAddress = keys[index];
+ if (accountInfo) {
+ const addressLookupTableAccount = new AddressLookupTableAccount({
+ key: new PublicKey(addressLookupTableAddress),
+ state: AddressLookupTableAccount.deserialize(accountInfo.data),
+ });
+ acc.push(addressLookupTableAccount);
+ }
+
+ return acc;
+ }, new Array());
+};
+
+const addressLookupTableAccounts: AddressLookupTableAccount[] = [];
+
+addressLookupTableAccounts.push(
+ ...(await getAddressLookupTableAccounts(addressLookupTableAddresses))
+);
+
+const blockhash = (await connection.getLatestBlockhash()).blockhash;
+const messageV0 = new TransactionMessage({
+ payerKey: payerPublicKey,
+ recentBlockhash: blockhash,
+ instructions: [
+ // uncomment if needed: ...setupInstructions.map(deserializeInstruction),
+ deserializeInstruction(swapInstructionPayload),
+ // uncomment if needed: deserializeInstruction(cleanupInstruction),
+ ],
+}).compileToV0Message(addressLookupTableAccounts);
+const transaction = new VersionedTransaction(messageV0);
+```
+
+
+### Build Your Own Transaction With Flash Fill Or CPI
+
+If you may prefer to interact with the Jupiter Swap Aggregator program with your own on-chain program. There are 2 ways to do it, typically on-chain program call **Cross Program Invocation (CPI)** to interact with each other, but we recommend using the **Flash Fill method** built by Jupiter.
+
+:::tip Why Flash Fill?
+
+With Jupiter's complex routing, best prices comes at a cost. It often means more compute resources and accounts are required as it would route across multiple DEXes in one transaction.
+
+Solana transactions are limited to 1232 bytes, Jupiter is using Address Lookup Tables (ALTs) to include more accounts in one transaction. However, the CPI method cannot use ALTs, which means when you add more accounts to a Jupiter Swap transaction, it will likely fail if it exceeds the transaction size limits.
+
+**Flash Fill allows the use of Versioned Transaction and ALTs**, hence, reducing the total accounts used for a Jupiter Swap transaction.
+:::
+
+
+
+
+
+ Flash Fill and CPI references
+
+
+
+
+
+ A Flash Fill transaction will be composed of these instructions:
+
+
Borrow enough SOL for opening the wSOL account from this program.
+
Create the wSOL account for the borrower.
+
Swap X token to wSOL.
+
Close the wSOL account and send it to the borrower.
+
Repay the SOL for opening the wSOL account back to this program.
+
+
+
+
diff --git a/docs/100-swap-api/200-dca-sdk.md b/docs/100-swap-api/200-dca-sdk.md
new file mode 100644
index 00000000..6e3ce4be
--- /dev/null
+++ b/docs/100-swap-api/200-dca-sdk.md
@@ -0,0 +1,14 @@
+---
+sidebar_label: "DCA SDK"
+description: "Use the Jupiter DCA SDK to create/cancel orders."
+title: "DCA SDK"
+---
+
+
+ DCA SDK
+
+
+
+:::warning
+We are working on improving the DCA program and the documentation will be improved in the future too. If you plan to or still use the current DCA SDK, [please refer to the documentation here](../../docs_versioned_docs/version-old/4-dca/1-integration.md)
+:::
diff --git a/docs/100-swap-api/3-send-swap-transaction.md b/docs/100-swap-api/3-send-swap-transaction.md
new file mode 100644
index 00000000..10643f88
--- /dev/null
+++ b/docs/100-swap-api/3-send-swap-transaction.md
@@ -0,0 +1,276 @@
+---
+sidebar_label: "Send Swap Transaction"
+description: "Jupiter Swap API helps you to optimize sending transaction to the network."
+title: "Send Swap Transaction"
+---
+
+
+ Send Swap Transaction
+
+
+
+Transaction sending can be very simple but optimizing for transaction landing can be challenging. This is critical in periods of network congestion when many users and especially bots are competing for block space to have their transactions processed.
+
+:::tip Improve Transaction Landing Tip
+By using Jupiter Swap API, you can enable Dynamic Slippage, Priority Fee estimation and Compute Unit estimation, all supported on our backend and served directly to you through our API.
+:::
+
+## Let’s Get Started
+
+In this guide, we will pick up from where [**Get Quote**](./1-get-quote.md) and [**Build Swap Transaction**](./2-build-swap-transaction.mdx) guide has left off.
+
+If you have not set up your environment to use the necessary libraries, the RPC connection to the network and successfully get a quote from the Quote API, please start at [get started](../1-get-started.md) or [get quote](./1-get-quote.md).
+
+## Prepare Transaction
+
+:::info Who is the signer?
+The most important part of this step is to sign the transaction. For the sake of the guide, you will be using the file system wallet you have set up to sign and send yourself.
+
+However, for other production scenarios such as building your own program or app on top of the Swap API, you will need the user to be the signer which is often through a third party wallet provider, so do account for it.
+:::
+
+In the previous guide, we are able to get the `swapTransaction` from the Swap API response. However, you will need to reformat it to sign and send the transaction, here are the formats to note of.
+
+| Formats | Description |
+|---------|-------------|
+| Serialized Uint8array format | The correct format to send to the network. |
+| Serialized base64 format | This is a text encoding of the Uint8array data, meant for transport like our Swap API or storage. You should not sign this directly. |
+| Deserialized format | This is the human-readable, object-like format before serialization. This is the state you will sign the transaction. |
+
+Here's the code to deserialize and sign, then serialize.
+1. `swapTransaction` from the Swap API is a serialized transaction in the **base64 format**.
+2. Convert it to **Uint8array (binary buffer) format**.
+3. Deserialize it to a **VersionedTransaction** object to sign.
+4. Finally, convert it back to **Uint8array** format to send the transaction.
+
+```jsx
+const transactionBase64 = swapResponse.swapTransaction
+const transaction = VersionedTransaction.deserialize(Buffer.from(transactionBase64, 'base64'));
+console.log(transaction);
+
+transaction.sign([wallet.payer]);
+
+const transactionBinary = transaction.serialize();
+console.log(transactionBinary);
+```
+
+:::tip Blockhash Validity
+If you look at the response of `console.log(transaction);`, you can see that our backend has already handled the blockhash and last valid block height in your transaction.
+
+The validity of a blockhash typically lasts for 150 slots, but you can manipulate this to reduce the validity of a transaction, resulting in faster failures which could be useful in certain scenarios.
+
+[Read more about transaction expiry here.](https://solana.com/docs/advanced/confirmation#transaction-expiration)
+:::
+
+## Send Transaction
+
+### Transaction Sending Options
+
+Finally, there are a 2 [transaction sending options](https://solana.com/docs/advanced/retry#an-in-depth-look-at-sendtransaction) that we should take note of. Depending on your use case, these options can make a big difference to you or your users. For example, if you are using the Swap API as a payment solution, setting higher `maxRetries` allows the transaction to have more retries as it is not as critical compared to a bot that needs to catch fast moving markets.
+
+
+
+
+
+ Transaction Sending Options
+
+
+
+
+| Options | Description |
+|---------|-------------|
+| [maxRetries](https://solana.com/docs/advanced/retry) | Maximum number of times for the RPC node to retry sending the transaction to the leader. If this parameter is not provided, the RPC node will retry the transaction until it is finalized or until the blockhash expires. |
+| [skipPreflight](https://solana.com/docs/advanced/retry#the-cost-of-skipping-preflight) | If true, skip the preflight transaction checks (default: false).
Verify that all signatures are valid.
Check that the referenced blockhash is within the last 150 blocks.
Simulate the transaction against the bank slot specified by the preflightCommitment.
|
+
+
+
+
+```jsx
+const signature = await connection.sendRawTransaction(transactionBinary, {
+ maxRetries: 2,
+ skipPreflight: true
+});
+```
+
+### Transaction Confirmation
+
+In addition, after sending the transaction, it is always a best practice to check the transaction confirmation state, and if not, log the error for debugging or communicating with your users on your interface. [Read more about transaction confirmation tips here.](https://solana.com/docs/advanced/confirmation#transaction-confirmation-tips)
+
+```jsx
+const confirmation = await connection.confirmTransaction({signature,}, "finalized");
+
+if (confirmation.value.err) {
+ throw new Error(`Transaction failed: ${JSON.stringify(confirmation.value.err)}\nhttps://solscan.io/tx/${signature}/`);
+} else console.log(`Transaction successful: https://solscan.io/tx/${signature}/`);
+```
+
+## Swap Transaction Executed!
+
+If you have followed the guides step by step without missing a beat, your transaction *should* theoretically land and you can view the link in console log to see the [transaction](https://solscan.io/tx/zEWGsd5tSyxUdsTn27hUzaJBadQSiFxF2X1CxVdQzdtgc3BpqyDPf5VQCFUScidhHJP5PchY33oJ3tZJLK5KXrf).
+
+## Oh? Transaction Not Landing?
+
+As the Solana network grew and increased in activty over the years, it has become more challenging to land transactions. There are several factors that can drastically affect the success of your transaction:
+
+- Setting competitive priority fee
+- Setting accurate amount of compute units
+- Managing slippage effectively
+- Broadcasting transaction efficiently
+- Other tips
+
+### How Jupiter Estimates Priority Fee?
+
+You can pass in `prioritizationFeeLamports` to Swap API where our backend will estimate the Priority Fee for you.
+
+We are using [Triton’s `getRecentPrioritizationFees`](https://docs.triton.one/chains/solana/improved-priority-fees-api) to estimate using the local fee market in writable accounts of the transaction (comparing to the global fee market), across the past 20 slots and categorizing them into different percentiles.
+
+[Read more about Priority Fee here.](https://solana.com/docs/core/fees#prioritization-fees)
+
+| Parameters | Description |
+|------------|-------------|
+| `maxLamports` | A maximum cap applied if the estimated priority fee is too high. This is helpful when you have users using your application and can be a safety measure to prevent overpaying. |
+| `global` | A boolean to decide between to use global or local fee market to estimate. If `global` is set to `false`, the estimation focuses on fees relevant to the **writable accounts** involved in the instruction. |
+| `priorityLevel` | A setting to choose between the different percentile levels. Higher percentile will have better transaction landing but also incur higher fees.
`medium`: 25th percentile
`high`: 50th percentile
`veryHigh`: 75th percentile
|
+
+```jsx
+const swapResponse = await (
+ await fetch('https://api.jup.ag/swap/v1', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify({
+ quoteResponse,
+ userPublicKey: wallet.publicKey.toBase58(),
+ prioritizationFeeLamports: {
+ priorityLevelWithMaxLamports: {
+ maxLamports: 10000000,
+ global: false,
+ priorityLevel: "veryHigh"
+ }
+ }
+ })
+ })
+).json();
+```
+
+### How Jupiter Estimates Compute Unit Limit?
+
+You can pass in `dynamicComputeUnitLimit` to Swap API where our backend will estimate the Compute Unit Limit for you.
+
+When `true`, it allows the transaction to utilize a dynamic compute unit rather than using incorrect compute units which can be detrimental to transaction prioritization. Additionally, the amount of compute unit used and the compute unit limit requested to be used are correlated to the amount of priority fees you pay.
+
+[Read more about Compute Budget, Compute Unit, etc here.](https://solana.com/docs/core/fees#compute-budget)
+
+```jsx
+const swapTransaction = await (
+ await fetch('https://api.jup.ag/swap/v1', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify({
+ quoteResponse,
+ userPublicKey: wallet.publicKey.toBase58(),
+ dynamicComputeUnitLimit: true
+ })
+ })
+).json();
+```
+
+### How Jupiter Estimates Slippage?
+
+You can pass in `dynamicSlippage` to Swap API where our backend will estimate the a dynamic slippage to be used for this specific quote and transaction for you.
+
+When `true` is passed in, it allows our backend to simulate slippage closer to execution and calculate an optimal value based on the token category, heuristics.
+
+:::note
+To understand Dynamic Slippage better, you can read here:
+- [Jupresearch](https://www.jupresear.ch/t/dynamic-slippage/21946#p-37444-introducing-dynamic-slippage-1)
+- [Dynamic Slippage Config](https://github.com/jup-ag/dynamic-slippage-config)
+:::
+
+```jsx
+const swapTransaction = await (
+ await fetch('https://api.jup.ag/swap/v1', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify({
+ quoteResponse,
+ userPublicKey: wallet.publicKey.toBase58(),
+ dynamicSlippage: true,
+ })
+ })
+).json();
+```
+
+The Swap API response will return the serialized transaction which will be using the dynamic slippage value and a `dynamicSlippageReport` for visibility/error catching.
+
+```json
+{
+ "swapTransaction": "...",
+ "dynamicSlippageReport": {
+ "slippageBps": 12, // The final optimized slippage bps used in the serialized transaction
+ "otherAmount": 8759842, // The incurred out amount observed from simulating the transaction
+ "simulatedIncurredSlippageBps": -8, // The simulated incurred slippage during optimization (negative integer refers to the loss in bps while positive refers to the gain)
+ "amplificationRatio": "1.5" // An amplifcation ratio we use to add a buffer to the estimated slippage
+ },
+ "simulationError": null
+}
+```
+
+### How Jupiter Broadcast Transactions?
+
+Transaction broadcasting is the process of submitting a signed transaction to the network so that validators can verify, process, and include it in a block.
+
+#### Broadcasting Through RPCs
+
+After you’ve built and signed your transaction, the signed transaction is serialized into a binary format and sent to the network via a Solana RPC node. The RPC node will verify and relay the transaction to the leader validator responsible for producing the next block.
+
+[Read more about how RPC nodes broadcast transactions.](https://solana.com/docs/advanced/retry#how-rpc-nodes-broadcast-transactions)
+
+This is the most typical method to send transactions to the network to get executed. It is simple but you need to make sure the transactions are:
+- Send in the serialized transaction format.
+- Use fresh blockhash and last valid blockheight.
+- Use optimal amount of priority fees and compute unit limit.
+- Free of error.
+- Utilize retries.
+- Configure your RPCs
+ - Optional but you can send your transaction to a staked RPC endpoint also known as [Stake-Weighted Quality of Service (SWQoS)](https://solana.com/developers/guides/advanced/stake-weighted-qos).
+ - Used dedicated RPC services versus free or shared, depending on how critical your usage is.
+ - Propagate to multiple RPC rather than reliant on one.
+
+
+#### Broadcasting Through Jito
+
+To include Jito Tips in your Swap transaction, you can do specify in the Swap API parameters. However, please take note of these when sending your transaction to Jito and [you can find thsese information in their documentation](https://docs.jito.wtf/):
+- You need to submit to a Jito RPC endpoint for it to work.
+- You need to send an appropriate amount of Jito Tip to be included to be processed.
+
+:::note More about Jito
+You can leverage [Jito](https://www.jito.wtf/) to send transactions via tips for faster inclusion and better outcomes. Similar to Priority Fees, Jito Tips incentivize the inclusion of transaction bundles during block production, enhancing users' chances of securing critical transactions in competitive scenarios.
+
+Additionally, Jito enables bundling transactions to ensure they execute together or not at all, helping protect against front-running and other MEV risks through “revert protection” if any part of the sequence fails, all while reducing transaction latency for timely execution.
+
+[Read more about how Jito works and other details here.](https://docs.jito.wtf/lowlatencytxnsend/#system-overview)
+:::
+
+```jsx
+const swapTransaction = await (
+ await fetch('https://api.jup.ag/swap/v1', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify({
+ quoteResponse,
+ userPublicKey: wallet.publicKey.toBase58(),
+ prioritizationFeeLamports: {
+ jitoTipLamports: 1000000 // note that this is FIXED LAMPORTS not a max cap
+ }
+ })
+ })
+).json();
+```
\ No newline at end of file
diff --git a/docs/100-swap-api/4-add-fees-to-swap.md b/docs/100-swap-api/4-add-fees-to-swap.md
new file mode 100644
index 00000000..4143008a
--- /dev/null
+++ b/docs/100-swap-api/4-add-fees-to-swap.md
@@ -0,0 +1,143 @@
+---
+sidebar_label: "Add Fees To Swap"
+description: "Jupiter Swap API allows you to add fees."
+title: "Add Fees To Swap"
+---
+
+
+ Add Fees To Swap
+
+
+
+The Referral Program is an open source program by Jupiter to provide referral fees for integrators who are integrating Jupiter Swap and Jupiter Limit Order. You can check out the code [here](https://github.com/TeamRaccoons/referral) to gain a better understanding of how it works.
+
+## Use Case
+
+By default, there are **zero** protocol fees on Jupiter Swap. Integrators have the option to introduce a platform fee denoted in basis points, e.g. **20 bps** for **0.2%** of the token input or output. If a platform fee is set by an integrator, Jupiter will **take 2.5%** of the platform fee charged by the integrators.
+
+:::note
+If you use our APIs heavily and consider taking fees, please reach out to us.
+:::
+
+### Important Notes
+
+- This is useful if you are an end user application such as wallets, payments, merchants, etc.
+- The Jupiter Swap project account for the Referral Program is `45ruCyfdRkWpRNGEqWzjCiXRHkZs8WXCLQ67Pnpye7Hp`.
+- The `referralTokenAccount` can either be:
+ - **Input mint or the output mint** on the swap for ExactIn.
+ - **Input mint ONLY** on the swap for ExactOut.
+- You can use the [Dashboard](https://referral.jup.ag/dashboard), [SDK](https://github.com/TeamRaccoons/referral/blob/main/example/src/createReferralAccount.ts) or [API](https://referral.jup.ag/api) to set up the `referralAccount` and `referralTokenAccount` in this guide.
+- It does not support Token2022 tokens.
+
+## Let’s Get Started
+
+### 1. Set up
+
+You will need to complete the prerequisites and understanding of [Get Started](../1-get-started.md) and [Get Quote and Swap](1-get-quote.md) guide as this is reliant on the Swap API.
+
+**Obtain `referralAccount` and `referralTokenAccount`**
+
+There are 3 ways you can set up a referral account.
+
+1. Use our [referral dashboard](https://referral.jup.ag/dashboard) to create them. After creating, remember to find your `Referral Key` on the page and the associated token accounts.
+2. Use our SDK to create them. You can use the [example scripts](https://github.com/TeamRaccoons/referral/tree/main/example/src) to create.
+3. Use our API to create them. You can use this [API reference](https://referral.jup.ag/api) to create.
+
+**Obtain `mintAccount`**
+
+As for the mint account, assuming you have an interface where a user swaps, you will know up front what are the input or output mints. For the sake of example, we will use a hardcoded mint public key.
+
+```jsx
+const referralAccount = new Publickey('ReplaceWithPubkey');
+const mintAccount = new Publickey('So11111111111111111111111111111111111111112');
+```
+
+### 3. Set your referral fee in Quote
+
+Setting your referral fee is simple, just add `platformFeeBps` parameter to the `/quote` endpoint.
+
+In this example, we set `platformFeeBps` to `20` which equates to 0.2%.
+
+```jsx
+const quoteResponse = await (
+ await fetch(
+ 'https://api.jup.ag/quote/v1?inputMint=So11111111111111111111111111111111111111112&outputMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount=100000&slippageBps=50&restrictIntermediateTokens=true&platformFeeBps=20'
+ )
+ ).json();
+
+console.log(JSON.stringify(quoteResponse, null, 2));
+```
+
+### 3. Set your referral token account in Swap
+
+In order to refer and receive fees from all types of tokens, you will need to have already initialize `referralTokenAccount`s (owned by your `referralAccount`) for the mint in the swap. By calling the Swap API with the parameter `feeAccount`, which is the `referralTokenAccount`, you will receive the serialized swap transaction that will set a fee to be taken from the referred and sent to that token account.
+
+In this code block, we will be using the SDK to try to find the `referralTokenAccount` based on our previously defined `referralAccount` and `mintAccount`.
+- If the token account is found, it will proceed to the Swap API.
+- If the token account is not found, it will send a transaction to the network to attempt to initialize one for the mint. **Do note that transactions may fail due to various reasons like Priority Fees.**
+
+```jsx
+import { ReferralProvider } from "@jup-ag/referral-sdk";
+
+const { tx, referralTokenAccountPubKey } = await provider.initializeReferralTokenAccount({
+ payerPubKey: wallet.publicKey,
+ referralAccountPubKey: referralAccount,
+ mint: mintAccount,
+});
+
+const referralTokenAccount = await connection.getAccountInfo(referralTokenAccountPubKey);
+
+// Attempt to initialize a token account
+if (!referralTokenAccount) {
+ const signature = await sendAndConfirmTransaction(connection, tx, [wallet]);
+ console.log({ signature, referralTokenAccountPubKey: referralTokenAccountPubKey.toBase58() });
+
+// Since initialized, it will carry on
+} else {
+ console.log(`referralTokenAccount ${referralTokenAccountPubKey.toBase58()} for mint ${mintAccount.toBase58()} already exists`);
+};
+
+const feeAccount = referralTokenAccountPubKey;
+console.log(feeAccount);
+```
+
+However, if you are confident that the `referralTokenAccount` for specific mints have been created, you can use this method to get it. **Do note that, even if the token account is not intialized, it will return a pubkey as it is a Program Derived Address. [Read more here.](https://solana.com/docs/core/pda#findprogramaddress)**
+
+```jsx
+const [feeAccount] = PublicKey.findProgramAddressSync(
+ [
+ Buffer.from("referral_ata"), // A string that signifies the account type, here "referral_ata."
+ referralAccount.toBuffer(), // The public key of the referral account converted into a buffer.
+ mintAccount.toBuffer(), // The mint public key, converted into a buffer.
+ ],
+ new PublicKey("REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3") // The public key of the Referral Program
+);
+```
+
+Using the above, we will now know the `feeAccount` to be passed in as the parameter in Swap API. You can refer to the [Build Swap Transaction](2-build-swap-transaction.mdx) guide to add any parameters where necessary to help transaction sending, etc.
+
+```jsx
+const swapResponse = await (
+ await fetch('https://api.jup.ag/swap/v1', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify({
+ quoteResponse,
+ userPublicKey: wallet.publicKey.toBase58(), // Pass in actual referred user in production
+ feeAccount: feeAccount,
+ })
+ })
+).json();
+
+console.log(swapResponse);
+```
+
+### 4. Sign and send transaction
+
+Finally, the referred can sign the transaction and it can be submitted to the network to be executed. You can refer to the [Send Swap Transaction](3-send-swap-transaction.md) guide to complete this step.
+
+## Additional Resources
+
+Now you have set up and added fees to the swaps you provide to the end users. The fees are collected and stored in the `referralTokenAccount`. In order to claim them, you can use the SDK or API to claim them all at once.
\ No newline at end of file
diff --git a/docs/100-swap-api/5-payments-through-swap.md b/docs/100-swap-api/5-payments-through-swap.md
new file mode 100644
index 00000000..f91a9820
--- /dev/null
+++ b/docs/100-swap-api/5-payments-through-swap.md
@@ -0,0 +1,180 @@
+---
+sidebar_label: "Payments Through Swap"
+description: "Jupiter Swap API allows you to set up payments solutions for your products."
+title: "Payments Through Swap"
+---
+
+
+ Payments Through Swap
+
+
+
+The Jupiter Swap API can be utilized such that you, a merchant can allow your customer to pay in any tokens while you still receive in your preferred token payment at the end of the transaction.
+
+## Use Case
+
+Let’s set the stage. You are selling a **jupcake!!!** to your customer and merchant might only accept in 1 USDC, but Alice only has 1 SOL for various reasons. Well, you’re at the right place! By using the Swap API, merchant can let customer pay in SOL while merchant still receive USDC in order to complete the payment for a jupcake.
+
+- Customer has 1,000,000 SOL.
+- Merchant sells 1 jupcake for 1 USDC.
+- Use the Swap API to swap exactly 1 USDC output from Customer's SOL.
+- Merchant receives the 1 USDC, as planned!
+
+## Let’s Get Started
+
+### 1. Setup
+
+You will need slightly different imports and also remember to set up connection to an RPC. If you have not set up the other typical libraries or are familiar with the Swap API, please follow this [Get Started](../1-get-started.md) and [Get Quote and Swap](./1-get-quote.md) guide.
+
+```bash
+npm i @solana/spl-token
+```
+
+```jsx
+import { PublicKey, Connection, Keypair, VersionedTransaction } from '@solana/web3.js';
+import { getAssociatedTokenAddress, TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID } from '@solana/spl-token';
+import { Wallet } from '@coral-xyz/anchor';
+import fetch from 'cross-fetch';
+```
+
+Before we start getting a quote and swap transaction, for example sake, we will need to prepare your and Alice's accounts. In production scenario, you will need to dynamically pass this in and allow users to sign in their device interfaces.
+
+Do note that you will need to have already set up:
+- A wallet in your machine to simulate yourself as the customer as the customer is the signer of the transaction (similar to how we set up in [Get Started - Set Up Your Wallet](../1-get-started.md#4-set-up-your-wallet)).
+- `trackingAccount` is basically an additional Solana Account you can pass in to track only Jupiter transactions easily.
+
+#### Set Up Accounts
+
+```jsx
+const customerAccount = new Wallet(...); // Follow the method in #get-started
+
+console.log("customerAccount:", customerAccount.publicKey.toBase58());
+
+const USDC_MINT = new PublicKey('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'); // Your preferred token payment
+
+const merchantAccount = new PublicKey('ReplaceWithMerchantPubkey');
+// const trackingAccount = new PublicKey('ReplaceWithPubkey');
+
+console.log("USDC_MINT:", USDC_MINT.toBase58());
+console.log("merchantAccount:", merchantAccount.toBase58());
+// console.log("trackingAccount:", trackingAccount.toBase58());
+```
+
+#### Set Up `destinationTokenAccount`
+
+One more thing you will need to set up! Later on, you will need to pass in `destinationTokenAccount` which will be your token account for your preferred token payment mint. **Do note that it is the merchant's token account and it needs to be initialized.**
+
+```jsx
+// Get the associated token account for the merchant wallet
+const merchantUSDCTokenAccount = await getAssociatedTokenAddress(
+ USDC_MINT,
+ merchantAccount,
+ true,
+ TOKEN_PROGRAM_ID,
+ ASSOCIATED_TOKEN_PROGRAM_ID
+);
+
+console.log("merchantUSDCTokenAccount:", merchantUSDCTokenAccount.toBase58());
+```
+
+### 2. Set `swapMode` to `ExactOut` in Quote
+
+Next, the merchant have to [Get Quote](./1-get-quote.md) for the customer. We are using the `ExactOut` mode because we know exactly how much output amount (1 USDC) the merchant want to receive but not sure how much input amount the customer should pay with.
+
+By getting a quote first, the customer can know upfront the specific amount of input token before they approve and sign the transaction.
+
+:::warning Limitations of `ExactOut`
+Currently, there are some limitations as `ExactOut` is not widely supported across all DEXes.
+- Supported DEXes are only Orca Whirlpool, Raydium CLMM, and Raydium CPMM.
+- NOT ALL token pairs may not be available.
+:::
+
+```jsx
+const quoteResponse = await (
+ await fetch(
+ 'https://api.jup.ag/quote/v1?inputMint=So11111111111111111111111111111111111111112&outputMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount=100000&slippageBps=50&restrictIntermediateTokens=true&swapMode=ExactOut'
+ )
+ ).json();
+
+console.log(JSON.stringify(quoteResponse, null, 2));
+```
+
+From the this quote, you should get part of the response like this, where `amount` specified in the query parameter represents the `outAmount` in the response and of course, `swapMode: ExactOut`.
+
+```json
+{
+ "inputMint": "So11111111111111111111111111111111111111112",
+ "inAmount": "4434914",
+ "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
+ "outAmount": "1000000",
+ "otherAmountThreshold": "4434914",
+ "swapMode": "ExactOut",
+ ...
+}
+```
+
+### 3. Set `destinationTokenAccount` in Swap
+
+The merchant then retrieves the serialized swap transaction, but the merchant need to specify the `destinationTokenAccount` in the parameters — this will build the swap transaction to swap but send to the [merchant's specified token account which we defined earlier](#set-up-destinationtokenaccount).
+
+The `destinationTokenAccount` should be the merchant’s token account to receive the payment in. Also do note that `customerAccount` should be accounted for. **You can refer to the [Build Swap Transaction](./2-build-swap-transaction.mdx) guide for other parameters to be passed in.**
+
+```jsx
+const swapResponse = await (
+ await fetch('https://api.jup.ag/swap/v1', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify({
+ quoteResponse,
+ userPublicKey: customerAccount.publicKey.toBase58(),
+ destinationTokenAccount: merchantUSDCTokenAccount.toBase58(),
+ // trackingAccount: trackingAccount.toBase58(),
+ })
+ })
+).json();
+
+console.log(swapResponse);
+```
+
+### 4. Prepare Transaction
+
+We have walked through the steps here and explained some of the code, you can refer to [Send Swap Transaction - Prepare Transaction](./3-send-swap-transaction.md#prepare-transaction). The main difference for payments is to ensure that the customer is the fee payer (the merchant can be generous and be the fee payer too!) and the signer.
+
+```jsx
+const transactionBase64 = swapResponse.swapTransaction
+const transaction = VersionedTransaction.deserialize(Buffer.from(transactionBase64, 'base64'));
+
+transaction.feePayer = customerAccount.publicKey;
+
+transaction.sign([customerAccount.payer]);
+
+const transactionBinary = transaction.serialize();
+```
+
+### 5. Send Transaction
+
+We have walked through the steps here and explained some of the code, you can refer to [Send Swap Transaction - Send Transaction](./3-send-swap-transaction.md#send-transaction). The main difference for payments is, you might want to try adjusting `maxRetries` to a higher count as it is not time sensitive and ideally this is used with tighter slippage and ensuring the `inputMint` is not too unstable.
+
+Do note that more retries will cause the user to wait slightly longer, so find the balance between the two. Read more here: https://solana.com/docs/advanced/retry.
+
+```jsx
+const signature = await connection.sendRawTransaction(transactionBinary, {
+ maxRetries: 10,
+ preflightCommitment: "finalized",
+});
+
+const confirmation = await connection.confirmTransaction({ signature }, "finalized");
+
+if (confirmation.value.err) {
+ throw new Error(`Transaction failed: ${JSON.stringify(confirmation.value.err)}\nhttps://solscan.io/${signature}/`);
+} else console.log(`Transaction successful: https://solscan.io/tx/${signature}/`);
+```
+
+The suceeded Swap Transaction should show:
+- Token A swaps from the customer's token account
+- Token A swap to Token B
+- Token B sends to the merchant's token account
+
+[If transactions are not landing well, you can refer to this section.](./3-send-swap-transaction.md#oh-transaction-not-landing)
diff --git a/docs/100-swap-api/6-solana-unity-sdk.md b/docs/100-swap-api/6-solana-unity-sdk.md
new file mode 100644
index 00000000..5b782ce5
--- /dev/null
+++ b/docs/100-swap-api/6-solana-unity-sdk.md
@@ -0,0 +1,25 @@
+---
+sidebar_label: "Swap In Solana Unity SDK"
+description: "Use Jupiter Swap API with Solana Unity SDK (C#) to add Swap into your game."
+title: "Swap In Solana Unity SDK (C#)"
+---
+
+
+ Solana Unity SDK (C#)
+
+
+
+Jupiter is fully supported within the [Solana.Unity-SDK](https://github.com/magicblock-labs/Solana.Unity-Core/tree/master/src/Solana.Unity.Dex). The core library is independent of Unity and can be incorporated into Unreal Engine using the UnrealCLR library or in a C# backend.
+
+Using the Solana.Unity-SDK, game developers can effortlessly incorporate Jupiter swaps into their games and achieve cross-platform compatibility without the need to modify a single line of code.
+
+Within the SDK, the Jupiter Swap API can also be used as a [payment method](./5-payments-through-swap.md), enabling you to utilize Jupiter + SolanaPay for facilitating user payments with any SPL token, allowing pricing in USDC or other tokens.
+
+## Documentation
+
+For the detailed documentation, please visit: [Solana Unity SDK Jupiter Documentation](https://solana.unity-sdk.gg/docs/jupiter)
+
+## Demos
+
+- Watch this demo video showcasing an in-game swap powered by the Jupiter integration: [Watch Demo Video](https://youtu.be/nCceV53thjY)
+- Explore a live game demo here: [Live Demo](https://magicblock-labs.github.io/Solana.Unity-SDK/)
\ No newline at end of file
diff --git a/docs/2-development-basics.md b/docs/2-development-basics.md
new file mode 100644
index 00000000..78b79400
--- /dev/null
+++ b/docs/2-development-basics.md
@@ -0,0 +1,112 @@
+---
+sidebar_label: "Development Basics"
+description: "Under development basics on Solana to build with Jupiter API."
+title: "Development Basics"
+---
+
+
+ Development Basics
+
+
+
+:::tip where is jupiter?
+Jupiter is built on Solana MAINNET only!
+:::
+
+Solana uses an account-based architecture where data are stored in accounts. However, Solana keeps Programs (also known as smart contracts on other blockchains) and Accounts distinct. In order to mutate the data in Accounts, you will need to send transactions to the network which execute Instructions defined by Programs.
+
+- [Programs](https://solana.com/docs/core/programs) on Solana are executable code deployed on-chain. They are designed to execute instructions, process transactions and interact with accounts.
+- [Instructions](https://solana.com/docs/core/transactions#instruction) on Solana are defined by the Program, similar to API endpoints exposesd by a program.
+- [Accounts](https://solana.com/docs/core/accounts) store data and are mutable, meaning they can be updated by the program who interacts with them.
+- [Transactions](https://solana.com/docs/core/transactions#transaction) is what we send to interact with the network which can include one or more instructions to execute what is needed.
+
+## Interacting with Solana
+
+The Solana Web3.js and Rust client libraries serve as essential interfaces for interacting with Solana in JavaScript/TypeScript and Rust environments, respectively. They abstract complex interactions with the network, providing easier and more accessible functions for developers building on Solana. Here’s an overview of what each library offers and some of the most common functions they simplify:
+
+1. Connecting to the network via RPC (Remote Procedure Call) endpoints
+2. Building Transactions
+3. Interfacing with Solana Programs and Accounts
+
+:::note links
+Explore the rich features and detailed documentation of these libraries in the official Solana Developer Documentation: [Web3.js](https://solana.com/docs/clients/javascript) and [Rust client](https://solana.com/docs/clients/rust)
+:::
+
+## Interacting with Jupiter Programs
+
+To interact with the Jupiter Swap Aggregator Program, there are a few ways to do it:
+
+| Method | Description |
+| --- | --- |
+| Swap API | Simply call the Quote API to get a quote based on Jupiter’s routing engine and call the Swap API to get a serialized transaction to send to the network. |
+| Flash Fill method | If you are building your own on-chain program, we recommend this method — an alternative method from CPI, using Versioned Transaction and Address Lookup Tables, thus reducing the size of each account (a limitation of using CPI method). |
+| Cross Program Invocation (CPI) | https://solana.com/docs/core/cpi |
+
+## Building Transactions
+
+Before you send a transaction to the network, you will need to build the transaction that defines the instructions to execute and accounts to read/write to. It can be complex to handle this yourself when building with Jupiter, you can [read more about it here](https://solana.com/docs/core/transactions).
+
+However, good news! Most of our APIs and SDKs just handles it for you, so you get a response with the transaction to be prepared and sent to the network.
+
+:::tip swap api tip
+The Swap API returns you the serialized transaction which you can directly send it to your RPC endpoint to execute on Solana. Alternatively, if you plan to manipulate the instructions and build your own custom transactions, you can request from the `/swap-instructions` endpoint.
+:::
+
+## Sending Transactions
+
+Transactions on Solana can only be sent to the network through an RPC (Remote Procedure Call) endpoint. The Solana network operates with a client-server model where RPC nodes handle transactions and interact with the validators of the blockchain. We recommend using 3rd party RPC providers like [Triton](https://triton.one/) or [Helius](https://helius.dev/) for production applications.
+
+There are a few key points to note when sending transactions to the Solana network. At Jupiter, we do our best to help you optimize transaction sending and make it easier for you.
+
+1. Solana transaction base fee
+2. Priority fee
+3. Compute units
+4. Transaction broadcasting methods
+5. Slippage (100% slippage will always work but also mean you can possibly get the worst outcome, so we need to find the balance between success optimizations and best output price)
+
+## More about these factors?
+
+### What is Priority Fee?
+
+Transactions submitted to the blockchain are prioritized based on a fee-bidding process. The higher the priority fee, the higher your transaction will be placed in the execution queue.
+
+:::info Overpaying Priority Fee
+It is important to note that overpaying for priority fee can be detrimental in the long run. If transactions continuously outbid each other, the overall fees required to process across the network will increase over time.
+:::
+
+**Priority Fee** is an optional fee you can pay additionally to improve the chance of landing your transactions faster.
+
+- Priority Fee = **Compute Budget * Compute Unit Price**
+- This is excluding the base transaction fee (5,000 lamports or 0.000005 SOL) that you always need to pay.
+- You not only need to outbid other transactions trying to be included in the block, but also outbid those trying to write to the same account.
+
+| Terminologies | |
+| --- | --- |
+| Global Priority Fee | The Priority Fee estimation across the entire network. |
+| Local Fee Market | The Priority Fee estimation when modifying a writable account (or hot account). |
+| Priority Fee | Compute Budget * Compute Unit Price |
+| Compute Budget | How much compute unit the transaction is supposed to consume |
+| Compute Unit Price | Micro lamports per compute unit the transaction will use
+
+When querying the micro-lamport per compute unit for a particular program or account, it will contain both the Global and Local Fee markets.
+
+### What is Compute Unit?
+
+Compute Unit (CU) is a standardizded metric for evaluating how much "work" or "resource" is required by the transaction to execute. Different operations on Solana has varying amounts of CUs. In order to keep the blockchain efficient yet fast, each transaction, the Solana runtime has an absolute max compute unit limit of 1.4 million CU and sets a default requested max limit of 200k CU per instruction.
+
+:::tip Set custom Compute Unit Limit
+A transaction can request a more specific and optimal compute unit limit by including a single `SetComputeUnitLimit` instruction. Either a higher or lower limit. But it may never request higher than the absolute max limit per transaction.
+:::
+
+However, we must note that higher CU also means higher Priority Fee it might need to help prioritize it.
+
+### What are some transaction broadcasting methods?
+1. Typical RPCs
+2. RPCs with SWQoS
+3. Jito RPC
+
+### What is Slippage?
+
+A percentage or bps threshold the user specify and if the actual executed output is less than quoted output by the percentage/bps, the transaction will fail.
+
+It is more like a safeguard but the tighter threshold you go, the harder it can become to land the transaction as markets can move rapidly.
\ No newline at end of file
diff --git a/docs/200-perp-api/1-perp-api.md b/docs/200-perp-api/1-perp-api.md
new file mode 100644
index 00000000..62475b94
--- /dev/null
+++ b/docs/200-perp-api/1-perp-api.md
@@ -0,0 +1,14 @@
+---
+sidebar_label: "Perp API"
+description: "Use the Jupiter Perp API to trade or analyze."
+title: "Coming Soon!"
+---
+
+
+ Coming Soon!
+
+
+
+:::warning
+The Perp API for trading and analyzing is still a **work in progress**, stay tuned!
+:::
\ No newline at end of file
diff --git a/docs/200-perp-api/201-position-account.md b/docs/200-perp-api/201-position-account.md
new file mode 100644
index 00000000..76794312
--- /dev/null
+++ b/docs/200-perp-api/201-position-account.md
@@ -0,0 +1,59 @@
+---
+sidebar_label: "Position Account"
+description: "Understand and integrate the Jupiter Perp Program."
+title: "Position Account"
+---
+
+
+ Position Account
+
+
+
+This page contains an overview of the **Solana account types** used in the Jupiter Perpetuals Program, and specifically the `Position` account.
+
+The `Position` account is a struct which represents a set of parameters and states associated to trade position data for a given token.
+
+:::note `Position` account derivation
+The `Position` account's address is derived from the trader's wallet address / public key, the custody account, the collateral custody account, and a few other constant seeds. This means traders will always have the same Position account address for their open positions.
+
+This also means that traders only have nine positions available at one time:
+
+- Long SOL
+- Long wETH
+- Long wBTC
+- Short SOL (USDC as collateral)
+- Short SOL (USDT as collateral)
+- Short wETH (USDC as collateral)
+- Short wETH (USDT as collateral)
+- Short wBTC (USDC as collateral)
+- Short wBTC (USDT as collateral)
+
+This is an example [`Position` account](https://solscan.io/account/FBLzd5VM67MEKkoWerXu7Nu1ksbLXQvJDx63y5aeLEvt).
+:::
+
+:::tip Example Typescript Repository
+This [repository](https://github.com/julianfssen/jupiter-perps-anchor-idl-parsing) contains Typescript code samples on interacting with the Jupiter Perpetuals program IDL with `anchor` and `@solana/web3.js`
+
+You can also find the [Custody Account fields in the repository](https://github.com/julianfssen/jupiter-perps-anchor-idl-parsing/blob/1a0b5dc71081958895691047a9aa8ba51d2a8765/src/idl/jupiter-perpetuals-idl.ts#L2699) or on a [blockchain explorer](https://solscan.io/account/PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu#anchorProgramIdl).
+:::
+
+## Account Details
+
+Each `Position` account contains the following data:
+
+| Field | Description |
+| --- | --- |
+| `owner` | **Type:** `publicKey`
The public key of the trader's account. |
+| `pool` | **Type:** `publicKey`
The public key of the [JLP pool account](./pool-account). |
+| `custody` | **Type:** `publicKey`
The public key of the position's [`custody` account](./custody-account). |
+| `collateralCustody` | **Type:** `publicKey`
The public key of the position's collateral custody account.
Like the `custody` account, a `collateralCustody` account contains information for the token that's used as collateral for the position (SOL / wETH / wBTC for long positions, USDC / USDT for short positions). The borrow rates for the position will also be calculated based on the position's `collateralCustody`. |
+| `openTime` | **Type:** `i64`
The open time of the position in UNIX timestamp format. |
+| `updateTime` | **Type:** `i64`
The last updated time of the position in UNIX timestamp format. |
+| `side` | **Type:** `Side`
The position's side, either `long` or `short`. |
+| `price` | **Type:** `u64`
The entry price of the position when it was opened. The entry price is an integer in the atomic value (before decimals), a USDC (6 decimals) value of `158225872` is equivalent to $158.22. |
+| `sizeUsd` | **Type:** `u64`
The position size after leverage in USD in the atomic value (before decimals). A position with `sizeUsd = 0` is treated as a closed position. |
+| `collateralUsd` | **Type:** `u64`
The position's collateral size after fees in USD in the atomic value (before decimals). |
+| `realisedPnlUsd` | **Type:** `i64`
The position's realized PNL when closing the position partially.
When a position is closed completely, the position's `realisedPnlUsd` will be `0` as the position is considered closed (as described in `sizeUsd`). |
+| `cumulativeInterestSnapshot` | **Type:** `u128`
Stores the position's interest rate snapshot when it was last updated.
- The `collateralCustody` account for the respective collateral token stores a monotonically increasing counter in `collateralCustody .fundingRateState .cumulativeInterestRate`.
The difference between the `collateralCustody .fundingRateState .cumulativeInterestRate` and the position's `cumulativeInterestSnapshot` is used to calculate the borrow fees for the position. |
+| `lockedAmount` | **Type:** `u64`
The amount of tokens (SOL / wETH / wBTC for long positions, USDC / USDT for short positions) locked to pay off the position's max potential profit. It acts as a cap on the maximum potential profit of the position. This amount is locked in the collateral custody to ensure the platform has sufficient tokens to pay out profitable trades. |
+| `bump` | **Type:** `u8`
The bump seed used to derive the PDA for the `Position` account. |
diff --git a/docs/200-perp-api/202-position-request-account.md b/docs/200-perp-api/202-position-request-account.md
new file mode 100644
index 00000000..f1471722
--- /dev/null
+++ b/docs/200-perp-api/202-position-request-account.md
@@ -0,0 +1,70 @@
+---
+sidebar_label: "PositionRequest Account"
+description: "Understand and integrate the Jupiter Perp Program."
+title: "PositionRequest Account"
+---
+
+
+ PositionRequest Account
+
+
+
+This page contains an overview of the **Solana account types** used in the Jupiter Perpetuals Program, and specifically the `PositionRequest` account.
+
+The `PositionRequest` account is a struct which represents a set of parameters and states associated to a request to open or close a position, the `PositionRequest` account consists of mostly similar properties as [`Position` account](./position-account).
+
+:::note `PositionRequest` Account Derivation
+It is a Program-Derived Address (PDA) derived from the underlying `Position` account's address, several constant seeds, and a random integer seed which makes each `PositionRequest` account unique.
+
+The is an example [`PositionRequest` account](https://solscan.io/account/DNnX2B1oiYqKLrbLLod1guuaZA28DQwJ8HuHsgDafoQK).
+:::
+
+:::info `PositionRequestATA` account
+A `PositionRequestATA` account is created for each `PositionRequest` account.
+
+The `PositionRequestATA` account is an [associated token account](https://spl.solana.com/associated-token-account) derived from the `PositionRequest` that contains the tokens from the trader's deposits or withdrawals from withdrawing collateral or closing positions.
+
+The tokens are then transferred to the position token's custody token account or returned to the trader's wallet when the `PositionRequestATA` account is closed.
+:::
+
+:::info Take Profit / Stop Loss Requests
+`PositionRequest` accounts for non TP / SL requests are closed as soon as the request is executed or rejected.
+
+TP / SL requests are also stored onchain via `PositionRequest` accounts. However, they will only be closed when the TP / SL request is triggered and executed.
+
+Active TP / SL requests can be fetched onchain (through blockchain explorers like Solscan or SolanaFM) by searching for the `PositionRequest` address or public key associated with the TP / SL request.
+:::
+
+:::tip Example Typescript Repository
+This [repository](https://github.com/julianfssen/jupiter-perps-anchor-idl-parsing) contains Typescript code samples on interacting with the Jupiter Perpetuals program IDL with `anchor` and `@solana/web3.js`
+
+You can also find the [Custody Account fields in the repository](https://github.com/julianfssen/jupiter-perps-anchor-idl-parsing/blob/1a0b5dc71081958895691047a9aa8ba51d2a8765/src/idl/jupiter-perpetuals-idl.ts#L2583) or on a [blockchain explorer](https://solscan.io/account/PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu#anchorProgramIdl).
+:::
+
+## Account Details
+
+Each `PositionRequest` account contains the following data:
+
+| Field | Description |
+| --- | --- |
+| `owner` | **Type:** `publicKey`
The public key of the trader's account. |
+| `pool` | **Type:** `publicKey`
The public key of the [JLP pool account](./pool-account). |
+| `custody` | **Type:** `publicKey`
The public key of the position's [`custody` account](./custody-account). |
+| `collateralCustody` | **Type:** `publicKey`
The public key of the position's collateral custody account.
Like the `custody` account, a `collateralCustody` account contains information for the token that's used as collateral for the position (SOL / wETH / wBTC for long positions, USDC / USDT for short positions). The borrow rates for the position will also be calculated based on the position's `collateralCustody`. |
+| `mint` | **Type:** `publicKey`
For opening positions and collateral deposits, mint refers to the input mint requested by the trader.
For example, if a trader opens a position by providing the initial margin with SOL, then mint will be equal to SOL's mint address. If the trader deposits collateral in USDC, then mint will be equal to USDC's mint address.
For closing positions and collateral withdrawals, mint is equal the to position collateral token's mint address. For example, if a trader closes a long SOL position, mint will be equal to SOL's mint address. If a trader closes a short SOL position, mint is equal to USDC or USDT's mint address depending on the position's collateral. |
+| `openTime` | **Type:** `i64`
The time when the request of position is created in UNIX timestamp format. |
+| `updateTime` | **Type:** `i64`
The time when the request of position is last updated in UNIX timestamp format. |
+| `sizeUsdDelta` | **Type:** `u64`
The USD amount to increase or decrease the position size by. The amount is an integer in the atomic value (before decimals which is 6 for USDC / UST mints).
For example, a position request to increase an open position's size by 10 USDC will have a `sizeUsdDelta = 10000000`. |
+| `collateralDelta` | **Type:** `u64`
For opening positions and collateral deposits, `collateralDelta` is the token amount to increase or decrease the position collateral size by. The token amount is represented in atomic values (before decimals). |
+| `requestChange` | **Type:** `RequestChange`
`requestChange` will be equal to `Increase` for open position and collateral deposit requests, and `Decrease` for close position and collateral withdrawal requests. |
+| `requestType` | **Type:** `RequestType`
`Market` for all position requests except for TP / SL requests, which have a different `requestType` known as `Trigger`. |
+| `side` | **Type:** `Side`
`Long` for long positions, `Short` for short positions |
+| `priceSlippage` | **Type:** `u64`
The maximum price with slippage for position requests when opening, closing, or updating the position size.
- When increasing the size of a long position or decreasing the size of a short position, the request will fail if the current price of the position's token is greater than `priceSlippage`.
- When decreasing the size of a long position or increasing the size of a short position, the request will fail if `priceSlippage` is greater than the current price of the position's token. |
+| `jupiterMinimumOut` | **Type:** `u64`
For requests that require token swaps, the output amount of the token swap must be greater than or equal to `jupiterMinimumOut`, else the request will fail. |
+| `preSwapAmount` | **Type:** `u64`
This is an internal attribute used by the program to calculate the `collateralDelta` for position requests that require token swaps. |
+| `triggerPrice` | **Type:** `u64`
The price (USD) used for TP / SL position requests. |
+| `triggerAboveThreshold` | **Type:** `bool`
When `triggerAboveThreshold` is true, the TP / SL position request will be triggered when the position's token price is greater than or equal to `triggerPrice`. When `triggerAboveThreshold` is false, the TP / SL position request will be triggered when the position's token price is less than or equal to `triggerPrice`. |
+| `entirePosition` | **Type:** `bool`
This attribute is only checked when closing or decreasing position sizes. When `entirePosition` is true, the entire position will be closed (i.e. a close position request). When `entirePosition` is false, the position size will be reduced according to sizeUsdDelta. |
+| `executed` | **Type:** `bool`
Determines whether the position request is executed or not. |
+| `counter` | **Type:** `u64`
The random integer seed used to derive the position request address. |
+| `bump` | **Type:** `u8`
The bump seed used to derive the position request address. |
diff --git a/docs/200-perp-api/203-pool-account.md b/docs/200-perp-api/203-pool-account.md
new file mode 100644
index 00000000..b452938a
--- /dev/null
+++ b/docs/200-perp-api/203-pool-account.md
@@ -0,0 +1,66 @@
+---
+sidebar_label: "Pool Account"
+description: "Understand and integrate the Jupiter Perp Program."
+title: "Pool Account"
+---
+
+
+ Pool Account
+
+
+
+This page contains an overview of the **Solana account types** used in the Jupiter Perpetuals Program, and specifically the `Pool` account.
+
+The `Pool` account is a struct which represents a set of parameters and states associated to the data for JLP pool, including AUM and [`Custody`](./custody-account) data.
+
+:::note only one pool account
+There is only one [`Pool` account](https://solscan.io/account/5BUwFW4nRbftYTDMbgxykoFWqWHPzahFSNAaaaJtVKsq).
+:::
+
+:::tip Example Typescript Repository
+This [repository](https://github.com/julianfssen/jupiter-perps-anchor-idl-parsing) contains Typescript code samples on interacting with the Jupiter Perpetuals program IDL with `anchor` and `@solana/web3.js`
+
+You can also find the [Custody Account fields in the repository](https://github.com/julianfssen/jupiter-perps-anchor-idl-parsing/blob/1a0b5dc71081958895691047a9aa8ba51d2a8765/src/idl/jupiter-perpetuals-idl.ts#L2699) or on a [blockchain explorer](https://solscan.io/account/PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu#anchorProgramIdl).
+:::
+
+## Account Details
+
+Each `Pool` account contains the following data:
+
+| Field | Description |
+| --- | --- |
+| `name` | **Type:** `string`
The name for the account. |
+| `custodies` | **Type:** `publicKey`
An array containing the public keys for the custodies (tokens) managed by the JLP pool. |
+| `aumUsd` | **Type:** `u128`
The current AUM value (USD) for the JLP pool. The `aumUsd` value's calculation can be summarized by getting the USD value of the tokens managed by the pool minus the USD value reserved to pay off trader profits.
Refer to the [Custody account](./custody-account) details for more details on AUM calculation. |
+| `limit` | **Type:** [`Limit`](#limit)
Contains values for the pool's limits. |
+| `fees` | **Type:** [`Fees`](#fees)
Sets the fee amounts or percentages for the Jupiter Perpetuals exchange. |
+| `poolApr` | **Type:** [`PoolApr`](#poolapr)
Contains data related to the pool's APR / APY calculations. |
+
+### `Limit`
+
+| Field | Description |
+| --- | --- |
+| `maxAumUsd` | **Type:** `u128`
The max AUM for the JLP pool. This acts as a max cap / ceiling as the JLP will not accept deposits when the cap is hit. |
+| `tokenWeightageBufferBps` | **Type:** `u128`
The token weightage buffer (in basis points) to calculate the token's maximum or minimum current weightage based on the target weightage.
Currently, `tokenWeightageBufferBps` is set to `2000` which means the the current weightage cannot be lower or higher than + / - 20% of the token's target weightage.
For example, if SOL's target weightage for the JLP pool is 50%, the current weightage cannot be less than 40% or exceed 60%. The pool will not allow deposits or withdrawals if the action causes the token to exceed its target weightage. |
+| `maxPositionUsd` | **Type:** `u64`
Sets the maximum position size. The current `maxPositionUsd` value is `2_500_000_000_000` which means a position's max size is $2,500,000. |
+
+### `Fees`
+
+| Field | Description |
+| --- | --- |
+| `increasePositionBps` | **Type:** `string`
A fixed fee of 6 BPS (0.06%) is charged for opening or increasing a position. |
+| `decreasePositionBps` | **Type:** `publicKey`
A fixed fee of 6 BPS (0.06%) is charged for closing or decreasing a position. |
+| `addRemoveLiquidityBps` | **Type:** `u128`
Fee charged when adding or removing liquidity to/from the pool. |
+| `swapBps` | **Type:** `Limit`
Swap fee for exchanging non-stablecoin tokens routed through the liquidity pool.
Tax fee for non-stablecoins, determined based on the difference between the current and target weightage. A larger difference results in a higher tax fee, encouraging liquidity providers to rebalance the pool to the target weightage. |
+| `stableSwapBps` | **Type:** `Limit`
Swap fee for exchanges involving stablecoins, routed through the liquidity pool.
Tax fee for stablecoin swaps. Similar to taxBps, this fee is determined by the difference between the current and target weightage. |
+| `protocolShareBps` | **Type:** `PoolApr`
Jupiter takes a share of 2500 BPS (25%) from the fees collected by the pool. |
+
+### `PoolApr`
+
+| Field | Description |
+| --- | --- |
+| `lastUpdated` | **Type:** `i64`
The UNIX timestamp when the pool's APR data was last updated. |
+| `feeAprBps` | **Type:** `u64`
The pool's APR in BPS format. The APR is calculated weekly by dividing the pool's realized fees (minus the 25% collected by the protocol) by the total pool value, adjusting for the 1 week time period to annualize the rate. |
+| `realizedFeeUsd` | **Type:** `u64`
The fees collected by the pool so far. This fee is reinvested back into the pool and is also used to calculate the APR as mentioned above. realizedFeeUsd resets to zero when the fee is reinvested into the pool hence causing the APR value to fluctuate weekly. |
diff --git a/docs/200-perp-api/204-custody-account.md b/docs/200-perp-api/204-custody-account.md
new file mode 100644
index 00000000..fc2f1360
--- /dev/null
+++ b/docs/200-perp-api/204-custody-account.md
@@ -0,0 +1,79 @@
+---
+sidebar_label: "Custody Account"
+description: "Understand and integrate the Jupiter Perp Program."
+title: "Custody Account"
+---
+
+
+ Custody Account
+
+
+
+This page contains an overview of the **Solana account types** used in the Jupiter Perpetuals Program, and specifically the `Custody` account.
+
+The `Custody` account is a struct which represents a set of parameters and states associated to custodies (tokens) managed by the JLP pool which consists of the following custodies.
+
+
+
+:::tip Example Typescript Repository
+This [repository](https://github.com/julianfssen/jupiter-perps-anchor-idl-parsing) contains Typescript code samples on interacting with the Jupiter Perpetuals program IDL with `anchor` and `@solana/web3.js`
+
+You can also find the [Custody Account fields in the repository](https://github.com/julianfssen/jupiter-perps-anchor-idl-parsing/blob/1a0b5dc71081958895691047a9aa8ba51d2a8765/src/idl/jupiter-perpetuals-idl.ts#L2397) or on a [blockchain explorer](https://solscan.io/account/PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu#anchorProgramIdl).
+:::
+
+## Account Details
+
+Each `Custody` account contains the following data:
+
+| Field | Description |
+| --- | --- |
+| `pool` | **Type:** `publicKey`
The public key for the pool that this custody belongs to (i.e. the JLP pool). |
+| `mint` | **Type:** `publicKey`
The public key for the custody's token mint account. |
+| `tokenAccount` | **Type:** `publicKey`
The associated token account of the custody which holds the tokens under management for the pool. |
+| `decimals` | **Type:** `u8`
The number of decimals used for the token which is the same as the number of decimals specified in the token mint account. This is stored for convenience. |
+| `isStable` | **Type:** `bool`
A boolean flag indicating if the token in custody is a stable asset. |
+| `oracle` | **Type:** `OracleParams`
Contains data for the price oracle used for the custody. |
+| `pricing` | **Type:** [`PricingParams`](#pricingparams)
Contains data for the custody's price-related logic. |
+| `permissions` | **Type:** `Permissions`
A set of global flags that can be set by the protocol's administrator to enable or disable trade actions which is useful during program upgrades or black swan events. |
+| `targetRatioBps` | **Type:** `u64`
The target weightage (in basis points) for the custody in the JLP pool. |
+| `assets` | **Type:** [`Assets`](#assets)
Contains data used to calculate PNL, AUM, and core business logic for the program. |
+| `fundingRateState` | **Type:** [`FundingRateState`](#fundingratestate)
Contains data used to calculate borrow fees for open positions. |
+
+### `PricingParams`
+
+| Field | Description |
+| --- | --- |
+| `tradeImpactFeeScalar` | **Type:** `u64`
Sets the base value when calculating price impact fees when opening or closing positions. |
+| `maxLeverage` | **Type:** `u64`
Sets the max leverage for this custody's positions. The max leverage for all custodies is 500x at the time of writing. |
+| `maxGlobalLongSizes` | **Type:** `u64`
The maximum total position size (USD) for long positions. |
+| `maxGlobalShortSizes` | **Type:** `u64`
The maximum total position size (USD) for short positions. |
+
+### `Assets`
+
+| Field | Description |
+| --- | --- |
+| `feesReserves` | **Type:** `u64`
The fees collected by all open positions for the custody. `feesReserves` resets to zero when the fees are distributed to the pool and protocol. |
+| `owned` | **Type:** `u64`
The number of tokens owned by the pool for the custody. - The owned value is increased either by providing liquidity to the pool or depositing collateral when opening or updating positions. - Conversely, the owned value decreases when liquidity is removed from the pool or collateral is withdrawn from closing positions. |
+| `locked` | **Type:** `u64`
The number of tokens locked by the pool for the custody to pay off potential profits for open positions. |
+| `guaranteedUsd` | **Type:** `u64`
This value represents the total amount borrowed in USD (position size - collateral) across all long positions.
It is updated whenever traders modify their collateral through deposits or withdrawals. The system uses this aggregated figure to efficiently calculate the total profit and loss (PNL) for all long positions, which in turn is used to calculate the AUM of the JLP pool. |
+| `globalShortSizes` | **Type:** `u64`
Stores the total amount (USD) position sizes for all short positions. |
+| `globalShortAveragePrices` | **Type:** `u64`
Stores the average price (USD) for all short positions.
This value and `globalShortSizes` are used to calculate the PNL for all short positions efficiently, and is again used to calculate the AUM of the JLP pool. |
+
+### `FundingRateState`
+
+| Field | Description |
+| --- | --- |
+| `cumulativeInterestRate` | **Type:** `u128`
Traders are required to pay hourly borrow fees for opening leveraged positions. This fee is calculated based on two primary factors: the size of the trader's position and the current utilization of the pool for the custody.
To calculate borrow fees more efficiently, each custody account contains a value called `cumulativeInterestRate`.
Correspondingly, each position account stores a `cumulativeInterestSnapshot` which captures the value of `cumulativeInterestRate` at the time of the position's last update. Whenever there's a change in either the borrowed assets or the total assets within a custody, the `cumulativeInterestRate` for the custody is updated.
The difference between the custody's `cumulativeInterestRate` and the position's `cumulativeInterestSnapshot` is then used to calculate the position's borrow fees. |
+| `lastUpdate` | **Type:** `i64`
The UNIX timestamp for when the custody's borrow fee data was last updated. |
+| `hourlyFundingDbps` | **Type:** `u64`
A constant used to calculate the hourly borrow fees for the custody. The Jupiter Perpetuals exchange works with Gauntlet and Chaos Labs to update and fine tune the `hourlyFundingDbps` to respond to traders' feedback and market conditions. |
diff --git a/docs/300-tool-kits/1-swap-terminal.md b/docs/300-tool-kits/1-swap-terminal.md
new file mode 100644
index 00000000..f5b9c7da
--- /dev/null
+++ b/docs/300-tool-kits/1-swap-terminal.md
@@ -0,0 +1,147 @@
+---
+sidebar_label: "Swap Terminal"
+description: "An overview of Jupiter Swap Terminal and its core features."
+title: "Swap Terminal"
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+import Highlight from '@theme/CodeBlock';
+
+
+ Swap Terminal
+
+
+
+Jupiter Terminal is an open-sourced, lite version of Jupiter. This terminal provides end-to-end swap functionality by linking it in your HTML with just a few lines of code.
+
+:::tip Jupiter Terminal References
+- [Terminal Playground](https://terminal.jup.ag/): To play with different settings,features and styling.
+- [Open Source Repository](https://github.com/jup-ag/terminal): To understand and make use of the Jupiter Terminal better.
+- [API Type Reference](https://github.com/jup-ag/terminal/blob/main/src/types/index.d.ts): To utilize the different references.
+:::
+
+
+
+## Core Features
+
+| **Feature** | **Details** |
+|---|---|
+| **Lightweight** | -`main-v3.js` bundle (~70KB gzippped) - App bundle (~1.1 MB gzipped) loads on-demand when `init()` is called. - Preload app bundle with `data-preload` attributes. |
+| **Agnostic** | - Works with any application in Integrated, Widget, or Modal format. - Compatible with frameworks like React, Plain HTML, etc. - Responsive to all screen sizes. |
+| **Customization** | - Supports Swap, Payment, or Ape tokens use cases. - Allows fixed input/output amounts or mint. - Offers ExactIn or ExactOut swap modes. |
+| **Built-in Wallets** | - Wallet Standard support, powered by Unified Wallet Kit. - Passthrough wallet from your app. |
+| **Fees Support** | - Customizable fees and trackable via [Referral Dashboard](https://referral.jup.ag/dashboard). |
+
+## API References
+
+
+
+ Typescript Support
+
+Since Jupiter Terminal is only importable via CDN, to get proper typing, you can create a typing declaration jupiter-terminal.d.ts file in your project, and copy the contents in src/types/index.d.ts.
+
+```jsx
+declare global {
+ interface Window {
+ Jupiter: JupiterTerminal;
+ }
+}
+// ...
+// ...
+// ...
+```
+
+
+
+
+ Fee Support
+
+There are no protocol fees on Jupiter, but integrators can introduce a platform fee on through the Swap Terminal as underlying, it is using the Swap API which allows you to take fees.
+
+Refer to the [Add Fees To Swap](../100-swap-api/4-add-fees-to-swap.md) guide to get the accounts and add it.
+
+```jsx
+window.Jupiter.init({
+ // ...
+ platformFeeAndAccounts,
+});
+```
+
+
+
+
+ Resuming / Closing Activity
+
+- Every time `init()` is called, it will create a new activity.
+- If you want to resume from previous activity, you can use `resume()` instead.
+- `close()` function to hide the widget.
+
+```jsx
+if (window.Jupiter._instance) {
+ window.Jupiter.resume();
+}
+
+window.Jupiter.close();
+```
+
+
+
+
+ Token List
+
+The Jupiter Token List API is an open, collaborative and dynamic token list to make trading on Solana more transparent and safer for all. It is default to `true` to ensure that only validated tokens are shown.
+
+- `strictTokenList?: boolean;`
+
+
+
+
+
+ onSuccess / onSwapError Callback
+
+`onSuccess()` and `onSwapError()` reference can be provided, when swap is successful or errored respectively.
+
+```jsx
+window.Jupiter.init({
+ onSuccess: ({ txid, swapResult }) => {
+ console.log({ txid, swapResult });
+ },
+ onSwapError: ({ error }) => {
+ console.log('onSwapError', error);
+ },
+});
+```
+
+
+
+
+ Customizing Styles
+
+
+**CSS Properties**
+
+Any CSS-in-JS can be injected to the outer-most container via `containerStyles` API.
+
+```jsx
+window.Jupiter.init({
+ // ...
+ containerStyles: { zIndex: 100 },
+ containerStyles: { maxHeight: '90vh' },
+});
+```
+
+**className (Tailwind)**
+
+Tailwind classes can be injected to the outer-most container via `containerClassName` API.
+
+```jsx
+window.Jupiter.init({
+ // ...
+ containerClassName: 'max-h-[90vh] lg:max-h-[600px]',
+});
+```
+
diff --git a/docs/300-tool-kits/2-terminal-walkthrough.md b/docs/300-tool-kits/2-terminal-walkthrough.md
new file mode 100644
index 00000000..989ff0fc
--- /dev/null
+++ b/docs/300-tool-kits/2-terminal-walkthrough.md
@@ -0,0 +1,135 @@
+---
+sidebar_label: "Terminal Walkthrough"
+description: "Step by step walkthrough of integrating Jupiter Swap Terminal into your website with minimal code."
+title: "Terminal Walkthrough"
+---
+
+
+ Terminal Walkthrough
+
+
+
+In this step by step walkthrough, we will utilize the Solana Dapp Scaffold codebase to demonstrate integrating Jupiter Swap Terminal!
+
+You can also [watch the tutorial on YouTube](https://youtu.be/T-3KN3k1e5Y)!
+
+
+
+
+## Let's Get Started
+
+Since we are building on top of the Solana Dapp Scaffold, we'll start by setting up the necessary codebase and dependencies.
+
+:::tip Jupiter Terminal References
+- [Terminal Playground](https://terminal.jup.ag/): To play with different settings,features and styling.
+- [Open Source Repository](https://github.com/jup-ag/terminal): To understand and make use of the Jupiter Terminal better.
+- [API Type Reference](https://github.com/jup-ag/terminal/blob/main/src/types/index.d.ts): To utilize the different references.
+:::
+
+## Set up
+
+Clone the repository to local machine or working environment.
+```bash
+git clone https://github.com/solana-labs/dapp-scaffold.git
+```
+
+Install the dependencies.
+```bash
+pnpm install
+```
+
+Load the site in your localhost.
+```bash
+pnpm dev
+```
+
+## Modify files
+
+### Change network configuration
+
+Next, navigate to `dapp-scaffold/src/contexts/NetworkConfigurationProvider.tsx` file and change your network configuration from `devnet` to `mainnet-beta`.
+
+```jsx
+const [networkConfiguration, setNetworkConfiguration] = useLocalStorage("network", "mainnet-beta");
+```
+
+### Add Jupiter Terminal script
+
+In the `dapp-scaffold/src/pagers/_document.tsx` file, include your Jupiter Terminal script.
+
+```jsx
+...
+
+
+
+
+
+
+
+
+
+
+...
+```
+
+### Add necessary imports
+
+In the `dapp-scaffold/src/views/home/index.tsx` file, include these imports.
+
+```jsx
+...
+import useUserSOLBalanceStore from '../../stores/useUserSOLBalanceStore';
+
+import { Connection, PublicKey, Transaction } from '@solana/web3.js';
+import { notify } from 'utils/notifications';
+
+export const HomeView: FC = ({ }) => {
+...
+```
+
+## Use Jupiter Terminal Playground
+
+Here comes the fun part, this is where you can customize the settings and configurations that best fit your app or site in [Jupiter Terminal Playground](https://terminal.jup.ag/)!
+
+After playing around with what you deem fit best, at the bottom of the playground, the `code snippet` will be readily generated.
+
+All you need to do is copy the code in the code snippet section and paste it directly in the `dapp-scaffold/src/views/home/index.tsx` file (remember to add an `OnClick` to be able to interact with the Terminal).
+
+```jsx
+...
+ return (
+
+
+
+
+
+...
+```
+
+:::tip Please reach out in Discord
+If you need assistance or have questions, feel free to reach out to us on [Discord](https://discord.gg/jup)!
+:::
\ No newline at end of file
diff --git a/docs/300-tool-kits/900-unified-wallet-kit.md b/docs/300-tool-kits/900-unified-wallet-kit.md
new file mode 100644
index 00000000..f52d954e
--- /dev/null
+++ b/docs/300-tool-kits/900-unified-wallet-kit.md
@@ -0,0 +1,95 @@
+---
+sidebar_label: "Unified Wallet Kit"
+description: An open source, streamlined Unified Wallet Kit adapter designed to simplify development on Solana.
+title: Unified Wallet Kit
+---
+
+
+ Unified Wallet Kit
+
+
+
+The Unified Wallet Kit is an open-source, Swiss Army Knife wallet adapter designed to streamline your development on Solana. Integrating multiple wallets into a single interface can be cumbersome, the Unified Wallet Kit aims to eliminates redundancies by providing these building blocks in a simple, plug-and-play package. This allows developers to focus on what matters most: building innovative features for your users.
+
+The Unified Wallet Kit will help you reduce repetitive tasks within your development process, including:
+- Creating a wallet notification system.
+- Managing wallet states (connected, disconnected, etc.).
+- Implementing a mobile-friendly wallet connector .
+
+:::tip Unified Wallet Kit References
+- [Wallet Kit Playground](https://unified.jup.ag/): To play with different settings,features and styling.
+- [Open Source Repository](https://github.com/TeamRaccoons/Unified-Wallet-Kit): To understand and make use of the wallet adapter better.
+- [Quick Examples](https://github.com/TeamRaccoons/Unified-Wallet-Kit/tree/main/src/components/examples): To reference code snippets and examples.
+:::
+
+## Core Features
+
+| Feature | Description |
+|---|---|
+| **Compact Bundle** | Main ESM bundle is a lightweight 94KB (20KB gzipped). |
+| **Built-in Support** | Comes with Wallet Standard and Mobile Wallet Adapter support. |
+| **Abstracted Wallet Adapter** | Use the Bring Your Own Wallet (BYOW) approach to select custom and legacy wallets. |
+| **Mobile Responsive** | Designed to be mobile-first. |
+| **Smart Notification System** | Integrates seamlessly with your existing notification system or can be used independently. |
+| **Internationalization** | Supports multiple languages including English, Chinese, Vietnamese, French, Japanese, Bahasa Indonesia, and Russian. |
+| **Theming Options** | Choose from light, dark, and Jupiter modes, with more customization options coming soon. |
+| **New User Onboarding** | Simplifies the onboarding process for new users. |
+
+## Let's Get Started
+
+#### TLDR Steps
+1. Adjust the Theme Selector to your desired version.
+2. Select your appropriate Language
+3. Expand the "Show Snippet" box for the wallet configuration you would like in your app and
+4. Select the `Copy to Clipboard` button for easy code insertion into your app.
+1. Install the Unified Wallet Kit to your project dependencies.
+
+#### Install the wallet adapter depenency
+
+```bash
+npm i @jup-ag/wallet-adapter
+```
+
+#### Wrap your app with ``
+
+```jsx
+const ExampleBaseOnly = () => {
+ return (
+
+
+
+ );
+};
+
+export default ExampleBaseOnly;
+```
+
+:::info
+This kit also supports the attachment of custom elements to specific wallets
+:::
+
+```jsx
+config={{
+ walletAttachments: {
+ 'Phantom': {
+ attachment:
Auto Confirm
+ }
+ }
+}}
+```
diff --git a/docs/500-utility/0-price-api.md b/docs/500-utility/0-price-api.md
new file mode 100644
index 00000000..33cd01f6
--- /dev/null
+++ b/docs/500-utility/0-price-api.md
@@ -0,0 +1,225 @@
+---
+sidebar_label: "Price API"
+description: "Use the Jupiter Price API for all tokens tradable or traded on Jupiter."
+title: "Price API"
+---
+
+
+ Price API
+
+
+
+Price API V2 aims to enhance accuracy by incorporating both **buy** and **sell-side liquidity** to derive the **average price** of the two. This provides more reliable real-time data for SPL tokens. Additionally, V2 provides extra help information like depth and confidence to aid you or your users with decisions.
+
+:::tip
+The prices are derived **from Jupiter Swap**, which is an aggregate of most markets on Solana.
+:::
+
+## Let’s Get Started
+
+In this guide, we will be going through the simple price responses and the extra help information.
+
+The root URL of the Price API is as such.
+
+```
+https://api.jup.ag/price/v2
+```
+
+## Get Price (Only Price)
+
+Using the root URL and parameters to pass in, it is as simple as the example code below!
+
+Notice the `ids` parameter with the public key or token address of a token mint, you can also input more than 1 address by comma-separating them.
+
+#### Price vs USDC by default
+
+```jsx
+const priceResponse = await fetch(
+ 'https://api.jup.ag/price/v2?ids=JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN,So11111111111111111111111111111111111111112'
+);
+
+const priceData = await priceResponse.json();
+
+console.log(priceData);
+```
+
+#### Price vsToken
+
+```jsx
+console.log(JSON.stringify(priceData, null, 2));
+
+const priceResponseWithVsToken = await fetch(
+ 'https://api.jup.ag/price/v2?ids=JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN,So11111111111111111111111111111111111111112&vsToken=So11111111111111111111111111111111111111112'
+);
+
+const priceDataWithVsToken = await priceResponseWithVsToken.json();
+
+console.log(JSON.stringify(priceDataWithVsToken, null, 2));
+```
+
+From the above example, you should see this response.
+
+Notice 2 details here:
+
+- Usage of `vsToken`: The first set of data shows price denoted in USDC while the second set of data denotes in the price of SOL.
+- With no `showExtraInfo`: There is only 1 price, the derived price is the buy price.
+
+```json
+{
+ "data": {
+ "So11111111111111111111111111111111111111112": {
+ "id": "So11111111111111111111111111111111111111112",
+ "type": "derivedPrice",
+ "price": "210.195311500"
+ },
+ "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN": {
+ "id": "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN",
+ "type": "derivedPrice",
+ "price": "1.084247"
+ }
+ },
+ "timeTaken": 0.00488491
+}
+{
+ "data": {
+ "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN": {
+ "id": "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN",
+ "type": "derivedPrice",
+ "price": "0.005158283466279884"
+ },
+ "So11111111111111111111111111111111111111112": {
+ "id": "So11111111111111111111111111111111111111112",
+ "type": "derivedPrice",
+ "price": "1"
+ }
+ },
+ "timeTaken": 0.00203215
+}
+```
+
+## Get Price (with Extra Info)
+
+To get extra help information such as confidence level or depth, you will need to pass in `showExtraInfo=true`. However, do note that if this is set to `true`, you will not be able to apply `vsToken`.
+
+```jsx
+const priceResponseShowExtraInfo = await fetch(
+ 'https://api.jup.ag/price/v2?ids=JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN,So11111111111111111111111111111111111111112&showExtraInfo=true'
+);
+
+const priceDataShowExtraInfo = await priceResponseShowExtraInfo.json();
+
+console.log(JSON.stringify(priceDataShowExtraInfo, null, 2));
+```
+
+Here is the sample response.
+
+Notice a few details here:
+- You can see both last swap and current quote prices.
+- You can see both buy and sell prices of the different types.
+- You can see the unix timestamps.
+- You can see the confidence and depth information.
+
+```json
+{
+ "data": {
+ "So11111111111111111111111111111111111111112": {
+ "id": "So11111111111111111111111111111111111111112",
+ "type": "derivedPrice",
+ "price": "210.734462500",
+ "extraInfo": {
+ "lastSwappedPrice": {
+ "lastJupiterSellAt": 1731599242,
+ "lastJupiterSellPrice": "210.52136418853988",
+ "lastJupiterBuyAt": 1731599242,
+ "lastJupiterBuyPrice": "210.5553945976539"
+ },
+ "quotedPrice": {
+ "buyPrice": "210.578367000",
+ "buyAt": 1731599236,
+ "sellPrice": "210.890558000",
+ "sellAt": 1731599236
+ },
+ "confidenceLevel": "high",
+ "depth": {
+ "buyPriceImpactRatio": {
+ "depth": {
+ "10": 0.08186978526745424,
+ "100": 0.1154072102743595,
+ "1000": 0.13766677800178445
+ },
+ "timestamp": 1731599207
+ },
+ "sellPriceImpactRatio": {
+ "depth": {
+ "10": 0.1211367007033883,
+ "100": 0.059088081285986374,
+ "1000": 0.16445602954342006
+ },
+ "timestamp": 1731599207
+ }
+ }
+ }
+ },
+ "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN": {
+ "id": "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN",
+ "type": "derivedPrice",
+ "price": "1.088080",
+ "extraInfo": {
+ "lastSwappedPrice": {
+ "lastJupiterSellAt": 1731599239,
+ "lastJupiterSellPrice": "1.0857748923629837",
+ "lastJupiterBuyAt": 1731599241,
+ "lastJupiterBuyPrice": "1.0879206578017573"
+ },
+ "quotedPrice": {
+ "buyPrice": "1.088085",
+ "buyAt": 1731599236,
+ "sellPrice": "1.088076",
+ "sellAt": 1731599236
+ },
+ "confidenceLevel": "high",
+ "depth": {
+ "buyPriceImpactRatio": {
+ "depth": {
+ "10": 0.05662764967204097,
+ "100": 0.17463135504551536,
+ "1000": 0.7379832960897882
+ },
+ "timestamp": 1731599207
+ },
+ "sellPriceImpactRatio": {
+ "depth": {
+ "10": 0.03504801758790863,
+ "100": 0.16858843747627028,
+ "1000": 3.0578377037958586
+ },
+ "timestamp": 1731599207
+ }
+ }
+ }
+ }
+ },
+ "timeTaken": 0.003665979
+}
+```
+
+## Limitations
+
+#### Query limits
+1. You can query up to 100 `id`s at once.
+
+#### If the price for a token cannot be found, it is either because
+1. The token is not tradable on Jupiter - it does not fit Jupiter’s routing criteria.
+2. There is no route for this token to SOL.
+ 1. `sellPrice`, `sellAt` & `lastSwappedPrice` might be null in cases
+3. If `sellPrice` & `sellAt` is not cached and cannot be retrieved the provided information will be `buyPrice`.
+4. `lastSwappedPrice` might be null if the token has not been traded recently or cannot be retrieved.
+ 1. Tokens that have not been traded via USDC in the last 3 days.
+ 2. Note that this is only for swaps done via Jupiter, it will not be done for swaps done e.g. directly on Raydium’s platform
+
+#### `buyPriceImpactRatio` & `sellPriceImpactRatio` in the depth field might be null in cases
+1. We are to get the respective price impacts for the 10, 100 and 1000 SOL buys or sells
+ 1. It could be because the token’s liquidity does not have enough liquidity for larger values
+2. We cannot find the sell quote for the respective token and the buy/sell values
+
+[Read about how we derive confidenceLevel or depth in Price API V2 here.](https://www.jupresear.ch/t/introducing-the-price-v2-api/22175)
\ No newline at end of file
diff --git a/docs/500-utility/1-token-api.md b/docs/500-utility/1-token-api.md
new file mode 100644
index 00000000..f1b2cfec
--- /dev/null
+++ b/docs/500-utility/1-token-api.md
@@ -0,0 +1,294 @@
+---
+sidebar_label: "Token API"
+description: "Use the Jupiter Token API for all tokens tradable or tagged via Jupiter."
+title: "Token API"
+---
+
+
+ Token API
+
+
+
+Token API aims to provide accessibility to all Solana tokens that are tradable on Jupiter. The Token API is built with a tagging system which consists of tokens from [Jupiter's community verification system](https://www.jupresear.ch/t/get-your-token-a-community-tag-beta/18963), LSTs and also the ability to support partner token tags.
+
+Through the Token API, you can query by tags, mints, markets to get a list of tokens and also to get more on the token information.
+
+:::info Token API Links and Resources
+- [Background and History](https://www.jupresear.ch/t/ecosystem-master-token-list/19786)
+- [Token API and Standard](https://www.jupresear.ch/t/introducing-the-ecosystem-token-api-and-standard/20601)
+- [How to get your token verified](https://www.jupresear.ch/t/get-your-token-a-community-tag-beta/18963)
+- [API Reference](/docs/api/token-information)
+:::
+
+## Let's Get Started
+
+In this guide, we will be going through a few examples of what Token API endpoints you can call to get the information you need.
+
+The root URL of the Token API is as such.
+
+```
+https://api.jup.ag/tokens/v1
+```
+
+---
+
+## Get Token Information
+
+Using this endpoint, you can get the token information of the specific mint address. In the following example, we are looking at getting the token information of the JUP token.
+
+:::tip Helpful Information
+In the response, you can see that we have identified the `tags`, [`freeze_authority`](https://spl.solana.com/token#freezing-accounts) and [`permanent_delegate`](https://spl.solana.com/token#authority-delegation) to help you or your users make informed decisions.
+:::
+
+```jsx
+const tokenInfoResponse = await (
+ await fetch('https://api.jup.ag/tokens/v1/token/JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN')
+).json();
+
+console.log(tokenInfoResponse);
+```
+
+From the above example, you should see this response.
+
+```
+{
+ address: 'JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN',
+ name: 'Jupiter',
+ symbol: 'JUP',
+ decimals: 6,
+ logoURI: 'https://static.jup.ag/jup/icon.png',
+ tags: [ 'verified', 'strict', 'community', 'birdeye-trending' ],
+ daily_volume: 79535977.0513354,
+ created_at: '2024-04-26T10:56:58.893768Z',
+ freeze_authority: null,
+ mint_authority: null,
+ permanent_delegate: null,
+ minted_at: '2024-01-25T08:54:23Z',
+ extensions: { coingeckoId: 'jupiter-exchange-solana' }
+}
+```
+
+---
+
+## Get Tokens In Market
+
+Using this endpoint, you can get a list of token mints that belong to a market/pool address. In the following example, we use a [Meteora SOL-USDC market](https://solscan.io/account/BVRbyLjjfSBcoyiYFuxbgKYnWuiFaF9CSXEa5vdSZ9Hh).
+
+```jsx
+const marketTokensResponse = await (
+ await fetch('https://api.jup.ag/tokens/v1/market/BVRbyLjjfSBcoyiYFuxbgKYnWuiFaF9CSXEa5vdSZ9Hh/mints')
+).json();
+
+console.log(marketTokensResponse);
+```
+
+From the above example, you should see this response.
+
+```
+[
+ 'So11111111111111111111111111111111111111112',
+ 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
+]
+```
+
+---
+
+## Get All Tradable Tokens
+
+Using this endpoint, you can get a list of all token mints that are tradable on Jupiter.
+- A new token (before market liquidity checks)
+- Or tokens that has past the market liquidity checks
+- These tokens should return a quote from the `/quote` endpoint and is able to swap.
+
+```jsx
+const allTradableResponse = await (
+ await fetch('https://api.jup.ag/tokens/v1/mints/all')
+).json();
+
+console.log(allTradableResponse);
+```
+
+From the above example, you should see this response.
+
+```
+[
+ ...
+
+ 'So11111111111111111111111111111111111111112',
+ 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
+ 'jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v',
+ 'JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN',
+ '27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4',
+
+ ...
+]
+```
+
+---
+
+## Get Tagged Tokens
+
+Using this endpoint, you can get a list of token mints (with information) that are tagged according to the tag you pass in. In the following example, we use the `lst` tag.
+
+:::tip
+A list of useful tags are:
+
+| **Token List Name** | **Description** |
+|---|---|
+| **verified** | A list of verified tokens, consisting of community-verified tokens via [catdetlist.jup.ag](https://catdetlist.jup.ag) and the previous standard of Jupiter Strict. |
+| **lst** | A list of liquid staked tokens, maintained with Sanctum. |
+| **token-2022** | A list of all token-2022 tokens. |
+| **moonshot** | A list of tokens minted via Moonshot. |
+| **pump** | A list of tokens minted via Pump.fun. |
+
+
+You can pass in multiple tags using a comma separated list, refer to the API Reference for more details.
+:::
+
+```jsx
+const lstTaggedResponse = await (
+ await fetch('https://api.jup.ag/tokens/v1/tagged/lst')
+).json();
+
+console.log(lstTaggedResponse);
+```
+
+From the above example, you should see this response.
+
+```
+...
+
+{
+ address: 'jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v',
+ name: 'Jupiter Staked SOL',
+ symbol: 'JupSOL',
+ decimals: 9,
+ logoURI: 'https://static.jup.ag/jupSOL/icon.png',
+ tags: [ 'verified', 'community', 'strict', 'lst' ],
+ daily_volume: 24017778.687489692,
+ created_at: '2024-04-26T10:57:45.759228Z',
+ freeze_authority: null,
+ mint_authority: 'EMjuABxELpYWYEwjkKmQKBNCwdaFAy4QYAs6W9bDQDNw',
+ permanent_delegate: null,
+ minted_at: '2024-03-25T09:28:04Z',
+ extensions: { coingeckoId: 'jupiter-staked-sol' }
+},
+
+...
+```
+
+---
+
+## Get New Tokens
+
+Using this endpoint, you can get a list of token mints (with information) **sorted by `created_at` their timestamps**.
+
+:::tip Paginate Large Response
+The `/new` endpoint will return a large sized payload as response, you can utilize the `limit` and `offset` query parameters to help paginate the responses.
+
+- `limit`: Refers to how many counts of data to be in the output.
+- `offset`: Refers to how many counts of data to offset into the result set.
+ - Used in conjunction with `limit` to page through the data.
+
+Refer to the [API Reference](/docs/api/all) for more information.
+:::
+
+```jsx
+const newTokensReponse = await (
+ await fetch('https://api.jup.ag/tokens/v1/new')
+).json();
+
+console.log(newTokensReponse);
+```
+
+From the above example, you should see this response.
+
+```
+{
+ mint: 'penguin',
+ created_at: '1733481083',
+ metadata_updated_at: 1733481087,
+ name: 'cool penguin',
+ symbol: 'penguin',
+ decimals: 6,
+ logo_uri: 'https://jup.ag',
+ known_markets: [ 'market' ],
+ mint_authority: null,
+ freeze_authority: null
+},
+{
+ mint: 'cat',
+ created_at: '1733481083',
+ metadata_updated_at: 1733481087,
+ name: 'cat moon',
+ symbol: 'cat',
+ decimals: 6,
+ logo_uri: 'https://jup.ag',
+ known_markets: [ 'market' ],
+ mint_authority: null,
+ freeze_authority: null
+},
+```
+
+---
+
+## Get All Tokens
+
+Using the endpoint, you can simply query with the `all` resource to get all tokens that Jupiter has indexed through our infrastructure.
+
+:::warning
+Do note that calling this endpoint's resource will return **a large payload of 300+MB**, which would introduce some latency in the call. Please use carefully and intentionally, else utilize the other endpoints.
+
+This endpoint does not support `limit` or `offset`.
+:::
+
+:::tip
+To index your own tokens, you can use RPC API like [Helius DAS](https://docs.helius.dev/compression-and-das-api/digital-asset-standard-das-api) to do it yourself.
+:::
+
+```jsx
+const allResponse = await (
+ await fetch('https://api.jup.ag/tokens/v1/all')
+).json();
+
+console.log(allResponse);
+```
+
+From the above example, you should see this response.
+
+```
+...
+
+{
+ address: 'So11111111111111111111111111111111111111112',
+ name: 'Wrapped SOL',
+ symbol: 'SOL',
+ decimals: 9,
+ logoURI: 'https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/So11111111111111111111111111111111111111112/logo.png',
+ tags: [ 'verified', 'community', 'strict' ],
+ daily_volume: 2873455332.377303,
+ created_at: '2024-04-26T10:56:58.893768Z',
+ freeze_authority: null,
+ mint_authority: null,
+ permanent_delegate: null,
+ minted_at: null,
+ extensions: { coingeckoId: 'wrapped-solana' }
+},
+{
+ address: 'JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN',
+ name: 'Jupiter',
+ symbol: 'JUP',
+ decimals: 6,
+ logoURI: 'https://static.jup.ag/jup/icon.png',
+ tags: [ 'verified', 'strict', 'community', 'birdeye-trending' ],
+ daily_volume: 79535977.0513354,
+ created_at: '2024-04-26T10:56:58.893768Z',
+ freeze_authority: null,
+ mint_authority: null,
+ permanent_delegate: null,
+ minted_at: '2024-01-25T08:54:23Z',
+ extensions: { coingeckoId: 'jupiter-exchange-solana' }
+},
+
+...
+```
diff --git a/docs/img/connect.png b/docs/img/connect.png
new file mode 100644
index 00000000..8dfe91aa
Binary files /dev/null and b/docs/img/connect.png differ
diff --git a/docs/img/generate.png b/docs/img/generate.png
new file mode 100644
index 00000000..73eb99eb
Binary files /dev/null and b/docs/img/generate.png differ
diff --git a/docs/img/payment.png b/docs/img/payment.png
new file mode 100644
index 00000000..353257be
Binary files /dev/null and b/docs/img/payment.png differ
diff --git a/docs/img/plans.png b/docs/img/plans.png
new file mode 100644
index 00000000..8877c592
Binary files /dev/null and b/docs/img/plans.png differ
diff --git a/docs/img/processing.png b/docs/img/processing.png
new file mode 100644
index 00000000..a0d4d597
Binary files /dev/null and b/docs/img/processing.png differ
diff --git a/docs/index.md b/docs/index.md
index 31be812e..84c4e0d0 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,36 +1,61 @@
---
-sidebar_position: 1
-title: Welcome
-description: "Unlock superior trading with Jupiter Documentation. Integrate APIs for swaps, payments, and more effortlessly. Explore robust tools now!"
+sidebar_label: "API Usage"
+description: "Introduction to Jupiter APIs"
+title: "API Usage"
---
- Jupiter APIs and Documentation
+ API Usage
-# Welcome Catdet-veloper!
+Since beginning of 2025, Jupiter have introduced new hostnames and the usage of our APIs through API keys to facilitate better developer support.
-![cat_at_computer.png](../static/img/cat_at_computer.png)
+## What's New?
-## Build World Class Swap Experiences Now!
+*Last updated: 1 December 2024*
+- API will now be served through new hostnames.
+- API will now be served through API keys.
+- API Keys will be distributed via https://portal.jup.ag (Refer to [API Setup](./api-setup) to get started).
-Jupiter's goal is simple: Help you provide world class experiences for your users. We aim to do this with as little work as possible on your end, regardless of use case or need.
+| Service Types | Description |
+| --- | --- |
+| Free with no API key | Decreased rate limits to only accommodate for testing. |
+| Paid plan with API key | Fixed rate limits, self served through an API dashboard. |
+| Custom with API key | Custom rate limits, mainly for partner usage. |
-**Jupiter offers a wide range of tools to make your life easy. Some of these tools include:**
+#### Swap
-- [Swaps](/docs/APIs/swap-api): One of the Fastest Swap APIs on Solana. Simply put in your desired pairs, amount, and slippage and receive your serialized transaction from the API to execute your swap.
-- [Payments API](/docs/APIs/payments-api): Quickly swap any token to USDC. Using this, you can specify an exact output token amount in any token (not just USDC).
-- [Limit Orders](/docs/limit-order/): Place limit orders quickly and easily with Jupiter Limit Orders.
-- [DCA](/docs/dca/): DCA into any SPL token with Jupiter's DCA program. Integrating into your use case is fast and simple!
+| Old Hostnames | New Hostnames |
+|---|---|
+|`https://quote-api.jup.ag/v6/quote`|`https://api.jup.ag/quote/v1`|
+|`https://quote-api.jup.ag/v6/swap`|`https://api.jup.ag/swap/v1`|
+|`https://quote-api.jup.ag/v6/swap-instructions`|`https://api.jup.ag/swap-instructions/v1`|
+|`https://quote-api.jup.ag/v6/program-id-to-label`|`https://api.jup.ag/program-id-to-label`|
-For DEXes looking to integrate with Jupiter products, check out these resources:
-- [Jupiter Terminal](/docs/jupiter-terminal/jupiter-terminal) Jupiter Terminal provides an easy way to integrate an open-source and easy-to-use terminal in your app.
+#### Price
-For projects who wants to make your token visible on the Strict list, see:
+| Old Hostnames | New Hostnames |
+|---|---|
+|`https://price.jup.ag/v6`|`https://api.jup.ag/price/v2`|
-- [Get your Token onto Jupiter](/docs/get-your-token-onto-jup)
+#### Token
-Learn how to use Jupiter products with our in-depth [User guides.](/guides)
+| Old Hostnames | New Hostnames |
+|---|---|
+|`https://tokens.jup.ag/token/:mint`|`https://api.jup.ag/tokens/v1/token/:mint`|
+|`https://tokens.jup.ag/tokens?tags=:tags`|`https://api.jup.ag/tokens/v1/tagged/:tag`|
+|`https://tokens.jup.ag/tokens_with_markets`|`https://api.jup.ag/tokens/v1/mints/tradable`|
-For technical questions or partnership requests, please reach out to us in our discord: https://discord.gg/jup.
+## What's Old?
+
+- Old hostnames will be fully deprecated in the next 6 months on **1 June 2025**.
+- Old hostnames during this period will have reduced rate limits to facilitate migration to the new API.
+- Self hosted API will not be maintained moving forward.
+
+## Help us help you
+
+Please reach out to us
+- If you need have increasing demand and growth in your app.
+- If you have questions or need support.
+- Join the [Telegram channel](https://t.me/jup_dev) or [Discord channel](https://discord.com/channels/897540204506775583/1115543693005430854) to subsribe to updates.
\ No newline at end of file
diff --git a/docs/sample.md b/docs/sample.md
new file mode 100644
index 00000000..42d392e4
--- /dev/null
+++ b/docs/sample.md
@@ -0,0 +1,15 @@
+---
+sidebar_label: "Welcome"
+description: "Welcome to the Jupiter Documentation. Integrate APIs for swaps, payments, and more effortlessly. Explore robust tools now!"
+hide_table_of_contents: true
+title: Welcome to Jupiter Developer Documentation
+---
+
+
+ Developer Documentation
+
+
+
+import DocsLanding from '@site/src/components/DocsLanding';
+
+
diff --git a/docs/10-legal/1-sdk-api-license-agreement.md b/docs_versioned_docs/version-old/10-legal/1-sdk-api-license-agreement.md
similarity index 100%
rename from docs/10-legal/1-sdk-api-license-agreement.md
rename to docs_versioned_docs/version-old/10-legal/1-sdk-api-license-agreement.md
diff --git a/docs/10-legal/2-terms-of-use.md b/docs_versioned_docs/version-old/10-legal/2-terms-of-use.md
similarity index 100%
rename from docs/10-legal/2-terms-of-use.md
rename to docs_versioned_docs/version-old/10-legal/2-terms-of-use.md
diff --git a/docs/10-legal/3-privacy-policy.md b/docs_versioned_docs/version-old/10-legal/3-privacy-policy.md
similarity index 100%
rename from docs/10-legal/3-privacy-policy.md
rename to docs_versioned_docs/version-old/10-legal/3-privacy-policy.md
diff --git a/docs/10-legal/_category_.json b/docs_versioned_docs/version-old/10-legal/_category_.json
similarity index 100%
rename from docs/10-legal/_category_.json
rename to docs_versioned_docs/version-old/10-legal/_category_.json
diff --git a/docs/2-apis/1-swap-api.md b/docs_versioned_docs/version-old/2-apis/1-swap-api.md
similarity index 97%
rename from docs/2-apis/1-swap-api.md
rename to docs_versioned_docs/version-old/2-apis/1-swap-api.md
index d6666e05..abc26f29 100644
--- a/docs/2-apis/1-swap-api.md
+++ b/docs_versioned_docs/version-old/2-apis/1-swap-api.md
@@ -9,7 +9,7 @@ title: "V6 Swap API"
:::info
-If you have problems landing transactions, read [Landing Transactions on Solana](/docs/apis/landing-transactions).
+If you have problems landing transactions, read [Landing Transactions on Solana](/docs/old/apis/landing-transactions).
:::
Jupiter APIs is the easiest way for developers to access liquidity on Solana. Simply pass in the desired pairs, amount, and slippage, and the API will return the serialized transactions needed to execute the swap, which can then be passed into the Solana blockchain with the required signatures.
@@ -22,10 +22,10 @@ Jupiter APIs is the easiest way for developers to access liquidity on Solana. Si
All Jupiter swaps are using versioned transactions and address lookup tables. But not all wallets support Versioned Transactions yet, so if you detect a wallet that does not support versioned transactions, you will need to use the `asLegacyTransaction` parameter.
-Learn more about the Jupiter API Documentation at the [OpenAPI documentation](/api-v6). This documentation has a REST request list and a built in API Playground. Use the API Playground to try API calls now!
+Learn more about the Jupiter API Documentation at the OpenAPI documentation. This documentation has a REST request list and a built in API Playground. Use the API Playground to try API calls now!
:::tip API Documentation
- [OpenAPI Documentation](/api-v6)
+OpenAPI Documentation
:::
### Guide for V6 Swap API (code example)
@@ -57,7 +57,7 @@ const connection = new Connection('https://neat-hidden-sanctuary.solana-mainnet.
```
:::tip
-Always make sure that you are using your own RPC endpoint. The RPC endpoint used by the connection object in the above example may not work anymore. For more information about RPC endpoints see the [official Solana Documentation](https://solana.com/docs/core/clusters) to learn more about their public RPC endpoints.
+Always make sure that you are using your own RPC endpoint. The RPC endpoint used by the connection object in the above example may not work anymore. For more information about RPC endpoints see the [official Solana Documentation](https://solana.com/docs/oldcore/clusters) to learn more about their public RPC endpoints.
:::
#### 3. Setup your wallet
@@ -576,4 +576,4 @@ The backend returns a response with a serialized transaction that is already usi
* Javascript/Typescript: [https://github.com/jup-ag/jupiter-quote-api-node](https://github.com/jup-ag/jupiter-quote-api-node)
* Rust: [https://github.com/jup-ag/jupiter-api-rust-example](https://github.com/jup-ag/jupiter-api-rust-example)
-Having issues? Head to the [Troubleshooting](/docs/apis/troubleshooting) section for some help.
+Having issues? Head to the [Troubleshooting](/docs/old/apis/troubleshooting) section for some help.
diff --git a/docs/2-apis/10-troubleshooting.md b/docs_versioned_docs/version-old/2-apis/10-troubleshooting.md
similarity index 98%
rename from docs/2-apis/10-troubleshooting.md
rename to docs_versioned_docs/version-old/2-apis/10-troubleshooting.md
index e29fc4d8..e2e54b4e 100644
--- a/docs/2-apis/10-troubleshooting.md
+++ b/docs_versioned_docs/version-old/2-apis/10-troubleshooting.md
@@ -64,7 +64,7 @@ const { swapTransaction } = await (
* `dynamicComputeUnitLimit` on `/swap`: By default, the Jupiter API assumes that each swap will take up 1.4m compute units. By setting this to `true` it will adjust the compute unit to be dynamic. Jupiter runs a simulation to estimate the compute units the swap will take then we add an extra 40% margin. By having lower compute units used we can set a higher priority fee. This will help to get a transaction through since now you are bidding with a higher priority fee.
* `maxRetries` on `sendRawTransaction`: This can be useful to retry sending your transaction and increase the chance of your transaction landing.
* You can check out how we send transaction on https://jup.ag [here](https://github.com/jup-ag/jupiter-quote-api-node/blob/main/example/index.ts#L73).
-* Also, the Solana documentation has some [very good tips](https://solana.com/docs/core/transactions/confirmation#transaction-confirmation-tips).
+* Also, the Solana documentation has some [very good tips](https://solana.com/docs/oldcore/transactions/confirmation#transaction-confirmation-tips).
```
const txid = await connection.sendRawTransaction(rawTransaction, {
diff --git a/docs/2-apis/11-landing-transactions.md b/docs_versioned_docs/version-old/2-apis/11-landing-transactions.md
similarity index 100%
rename from docs/2-apis/11-landing-transactions.md
rename to docs_versioned_docs/version-old/2-apis/11-landing-transactions.md
diff --git a/docs/2-apis/2-payments-api.md b/docs_versioned_docs/version-old/2-apis/2-payments-api.md
similarity index 94%
rename from docs/2-apis/2-payments-api.md
rename to docs_versioned_docs/version-old/2-apis/2-payments-api.md
index 01b51047..795749dd 100644
--- a/docs/2-apis/2-payments-api.md
+++ b/docs_versioned_docs/version-old/2-apis/2-payments-api.md
@@ -48,7 +48,7 @@ Payments or interaction with a protocol can require an exact amount of token B.
Bob is selling a delicious latte for 5 USDC. Alice wants to buy Bob's latte. The problem is, Alice only holds mSOL. Luckily, Bob can use the Jupiter Payments API to let Alice swap for exactly 5 USDC then transfer 5 USDC to his payment wallet.
-First, we need to show Alice how much mSOL she will have to spend for the latte. To do this we use the [`GET /quote`](/api-v6/get-quote) endpoint.
+First, we need to show Alice how much mSOL she will have to spend for the latte. To do this we use the `GET /quote` endpoint.
### 1. Get Quote
Retrieve a quote for swapping a specific amount of tokens.
@@ -175,13 +175,13 @@ curl -s 'https://quote-api.jup.ag/v6/quote?inputMint=mSoLzYCxHdYgdzU16g5QSh3i5K3
Currently, only Orca Whirlpool, Raydium CLMM, and Raydium CPMM support ExactOut mode. All token pairs may not be available in this mode. To see more price options use ExactIn mode.
:::
-Then Bob creates the transaction with the [`POST /swap`](/api-v6/post-swap) endpoint, and adds a 5 USDC token transfer from Alice to his payment wallet using the `destinationTokenAccount` argument, which Alice will verify, sign and send.
+Then Bob creates the transaction with the `POST /swap` endpoint, and adds a 5 USDC token transfer from Alice to his payment wallet using the `destinationTokenAccount` argument, which Alice will verify, sign and send.
### 2. Post Swap
Returns a transaction that you can use from the quote you get from `GET /quote`.
**Try it live in the playground:**
-[`POST https://quote-api.jup.ag/v6/swap`](/api-v6/post-swap)
+`POST https://quote-api.jup.ag/v6/swap`
:::info
In the example below, we assume the associated token account exists on `destinationTokenAccount`.
@@ -268,7 +268,7 @@ async function sendTransaction(swapTransaction, swapUserKeypair, lastValidBlockH
// Get the recent blockhash
// Using 'finalized' commitment to ensure the blockhash is final and secure
// You may experiment with 'processed' or 'confirmed' for fetching blockhash to increase speed
- // Reference: https://solana.com/docs/rpc/http/getlatestblockhash
+ // Reference: https://solana.com/docs/oldrpc/http/getlatestblockhash
const bhInfo = await connection.getLatestBlockhashAndContext({ commitment: "finalized" });
transaction.recentBlockhash = bhInfo.value.blockhash;
transaction.feePayer = swapUserKeypair.publicKey;
@@ -279,7 +279,7 @@ async function sendTransaction(swapTransaction, swapUserKeypair, lastValidBlockH
// Simulate the transaction to ensure it will succeed
// Using 'finalized' commitment for the simulation to match the security level of the actual send
// You may experiment with 'confirmed' or 'processed' to simulate faster, but keep in mind the risks
- // Reference: https://solana.com/docs/core/transactions#commitment
+ // Reference: https://solana.com/docs/oldcore/transactions#commitment
const simulation = await connection.simulateTransaction(transaction, { commitment: "finalized" });
if (simulation.value.err) {
throw new Error(`Simulation failed: ${simulation.value.err.toString()}`);
@@ -290,7 +290,7 @@ async function sendTransaction(swapTransaction, swapUserKeypair, lastValidBlockH
const signature = await connection.sendTransaction(transaction, {
// NOTE: Adjusting maxRetries to a lower value for trading, as 20 retries can be too much
// Experiment with different maxRetries values based on your tolerance for slippage and speed
- // Reference: https://solana.com/docs/core/transactions#retrying-transactions
+ // Reference: https://solana.com/docs/oldcore/transactions#retrying-transactions
maxRetries: 5,
skipPreflight: true,
preflightCommitment: "finalized",
@@ -298,7 +298,7 @@ async function sendTransaction(swapTransaction, swapUserKeypair, lastValidBlockH
// Confirm the transaction
// Using 'finalized' commitment to ensure the transaction is fully confirmed
- // Reference: https://solana.com/docs/core/transactions#confirmation
+ // Reference: https://solana.com/docs/oldcore/transactions#confirmation
const confirmation = await connection.confirmTransaction({
signature,
blockhash: bhInfo.value.blockhash,
@@ -340,5 +340,5 @@ async function sendTransaction(swapTransaction, swapUserKeypair, lastValidBlockH
```
:::tip
-If you want to add your own fees, check out: [Adding Your Own Fees](/docs/APIs/adding-fees)
+If you want to add your own fees, check out: [Adding Your Own Fees](/docs/old/APIs/adding-fees)
:::
diff --git a/docs/2-apis/3-adding-fees.md b/docs_versioned_docs/version-old/2-apis/3-adding-fees.md
similarity index 96%
rename from docs/2-apis/3-adding-fees.md
rename to docs_versioned_docs/version-old/2-apis/3-adding-fees.md
index e4255cee..7a5818be 100644
--- a/docs/2-apis/3-adding-fees.md
+++ b/docs_versioned_docs/version-old/2-apis/3-adding-fees.md
@@ -54,7 +54,7 @@ Go to the [referral dashboard](https://referral.jup.ag/dashboard) to create your
#### 2. Set your referral fee
-Setting your referral fee with the Jupiter API is simple. You just add in the `platformFeeBps` parameter to the [`GET /quote`](/api-v6/get-quote) endpoint:
+Setting your referral fee with the Jupiter API is simple. You just add in the `platformFeeBps` parameter to the `GET /quote` endpoint:
@@ -83,7 +83,7 @@ curl -G "https://quote-api.jup.ag/v6/quote" \
-[See this for a guide on how to get the route for a swap!](/docs/apis/swap-api#5-get-the-route-for-a-swap)
+[See this for a guide on how to get the route for a swap!](/docs/old/apis/swap-api#5-get-the-route-for-a-swap)
```js
// Function to swap SOL to USDC with input 0.1 SOL and 0.5% slippage
@@ -141,7 +141,7 @@ getQuote();
#### 3. Set your fee token account
-On the [`POST /swap`](/api-v6/post-swap) endpoint, remember to add your `feeAccount` parameter.
+On the `POST /swap` endpoint, remember to add your `feeAccount` parameter.
@@ -173,7 +173,7 @@ curl -X POST "https://quote-api.jup.ag/v6/swap" \
-[Guide for getting the serialized transactions to perform the swap](/docs/apis/swap-api#6-get-the-serialized-transactions-to-perform-the-swap)
+[Guide for getting the serialized transactions to perform the swap](/docs/old/apis/swap-api#6-get-the-serialized-transactions-to-perform-the-swap)
```js
// Function to find the fee account and get serialized transactions for the swap
diff --git a/docs/2-apis/4-price-api.md b/docs_versioned_docs/version-old/2-apis/4-price-api.md
similarity index 99%
rename from docs/2-apis/4-price-api.md
rename to docs_versioned_docs/version-old/2-apis/4-price-api.md
index a03a10f4..d6b833b4 100644
--- a/docs/2-apis/4-price-api.md
+++ b/docs_versioned_docs/version-old/2-apis/4-price-api.md
@@ -39,7 +39,7 @@ title: "(Deprecated) Price API: Get On-Chain Price For Any Token"
`}
:::warning
-This endpoint is no longer maintained. Use [Pricing API V2](/docs/apis/price-api-v2) instead.
+This endpoint is no longer maintained. Use [Pricing API V2](/docs/old/apis/price-api-v2) instead.
:::
Utilizing the powerful Jupiter Price API makes getting precise and real-time pricing for all SPL tokens simple. With the ability to fetch prices for up to 100 tokens, you'll never need another price API again!
diff --git a/docs/2-apis/5-price-api-v2.md b/docs_versioned_docs/version-old/2-apis/5-price-api-v2.md
similarity index 100%
rename from docs/2-apis/5-price-api-v2.md
rename to docs_versioned_docs/version-old/2-apis/5-price-api-v2.md
diff --git a/docs/2-apis/6-flash-fill.md b/docs_versioned_docs/version-old/2-apis/6-flash-fill.md
similarity index 96%
rename from docs/2-apis/6-flash-fill.md
rename to docs_versioned_docs/version-old/2-apis/6-flash-fill.md
index ac1c4bb3..96aa6951 100644
--- a/docs/2-apis/6-flash-fill.md
+++ b/docs_versioned_docs/version-old/2-apis/6-flash-fill.md
@@ -11,7 +11,7 @@ title: Jupiter Swap via Flash-Fill
-Use Flash Fill to integrate your program with Jupiter Swap. This allows you to avoid the limitations of Cross Program Invocation (CPI) via the "Flash-Fill" approach. Flash-Fill is one of two approaches to integrate Jupiter swap with your protocol. The other approach is Cross Program Invocation [CPI](/docs/APIs/cpi).
+Use Flash Fill to integrate your program with Jupiter Swap. This allows you to avoid the limitations of Cross Program Invocation (CPI) via the "Flash-Fill" approach. Flash-Fill is one of two approaches to integrate Jupiter swap with your protocol. The other approach is Cross Program Invocation [CPI](/docs/old/APIs/cpi).
The Jupiter team engineered "flash-fill" to allow developers and integrators to utilize the full potential of Jupiter swap with their programs.
@@ -20,7 +20,7 @@ To achieve the best prices and highest returns on swaps, Jupiter divides and rou
Flash-filling allows the use of [Versioned Transaction](https://docs.solana.com/developing/versioned-transactions) in combination with [Address Lookup Tables](https://docs.solana.com/developing/lookup-tables), thus, reducing the "size" of each account - something we can't do via the CPI approach.
-_Note: when using Jupiter's API, you can set [maxAccounts](/docs/APIs/swap-api#using-maxaccounts) to reduce the number of accounts._
+_Note: when using Jupiter's API, you can set [maxAccounts](/docs/old/APIs/swap-api#using-maxaccounts) to reduce the number of accounts._
:::
## Example
diff --git a/docs/2-apis/7-cpi.md b/docs_versioned_docs/version-old/2-apis/7-cpi.md
similarity index 85%
rename from docs/2-apis/7-cpi.md
rename to docs_versioned_docs/version-old/2-apis/7-cpi.md
index 435557e9..c9f4965c 100644
--- a/docs/2-apis/7-cpi.md
+++ b/docs_versioned_docs/version-old/2-apis/7-cpi.md
@@ -11,16 +11,16 @@ title: Jupiter Swap via CPI
-To integrate your program with Jupiter Swap you can take two approaches. One is [Flash Filling](/docs/APIs/flash-fill) or you can utilize Cross Program Invocation (CPI).
+To integrate your program with Jupiter Swap you can take two approaches. One is [Flash Filling](/docs/old/APIs/flash-fill) or you can utilize Cross Program Invocation (CPI).
:::danger CPI Limitations
As of August 2023, taking the CPI approach has some tradeoffs. Due to Solana's transaction limit of 1232 bytes, swaps via CPI will likely fail at runtime since Jupiter routes may involve multiple DEXes in order to reduce price impact. You could set a limit to the number of accounts used for swaps via Jupiter's swap API to fit it within your needs. However, limiting the accounts will likely incur greater price impact.
-_Note: when using Jupiter's API, you can set [maxAccounts](/docs/APIs/swap-api#using-maxaccounts) to reduce the number of accounts._
+_Note: when using Jupiter's API, you can set [maxAccounts](/docs/old/APIs/swap-api#using-maxaccounts) to reduce the number of accounts._
:::
:::info Use Flash-Fill
-Instead, we recommend taking the [flash-fill](/docs/APIs/flash-fill) approach. The flash-fill approach takes advantage of [Versioned Transaction](https://docs.solana.com/developing/versioned-transactions) in combination with [Address Lookup Tables](https://docs.solana.com/developing/lookup-tables) to allow for more accounts per transaction while keeping within the 1232 bytes limit.
+Instead, we recommend taking the [flash-fill](/docs/old/APIs/flash-fill) approach. The flash-fill approach takes advantage of [Versioned Transaction](https://docs.solana.com/developing/versioned-transactions) in combination with [Address Lookup Tables](https://docs.solana.com/developing/lookup-tables) to allow for more accounts per transaction while keeping within the 1232 bytes limit.
:::
## Example
diff --git a/docs/2-apis/8-c-sharp-example.md b/docs_versioned_docs/version-old/2-apis/8-c-sharp-example.md
similarity index 95%
rename from docs/2-apis/8-c-sharp-example.md
rename to docs_versioned_docs/version-old/2-apis/8-c-sharp-example.md
index 4195d071..62cca2f0 100644
--- a/docs/2-apis/8-c-sharp-example.md
+++ b/docs_versioned_docs/version-old/2-apis/8-c-sharp-example.md
@@ -18,7 +18,7 @@ Using the Solana.Unity-SDK, game developers can effortlessly incorporate Jupiter
Within the SDK, the Jupiter Payments API is also available, enabling you to utilize Jupiter + SolanaPay for facilitating user payments with any SPL token, allowing pricing in USDC or other tokens.
## Documentation
-For detailed documentation, please visit: [Solana Unity SDK Jupiter Documentation](https://solana.unity-sdk.gg/docs/jupiter)
+For detailed documentation, please visit: [Solana Unity SDK Jupiter Documentation](https://solana.unity-sdk.gg/docs/oldjupiter)
## Demos
- Explore this demo video showcasing an in-game swap powered by the Jupiter integration: [Watch Demo Video](https://youtu.be/nCceV53thjY)
diff --git a/docs/2-apis/9-self-hosted.md b/docs_versioned_docs/version-old/2-apis/9-self-hosted.md
similarity index 94%
rename from docs/2-apis/9-self-hosted.md
rename to docs_versioned_docs/version-old/2-apis/9-self-hosted.md
index af892c99..21c9a643 100644
--- a/docs/2-apis/9-self-hosted.md
+++ b/docs_versioned_docs/version-old/2-apis/9-self-hosted.md
@@ -46,7 +46,7 @@ For others options, use `--help`:
Once the API server is ready, it will open a HTTP server at `0.0.0.0:8080`.
-The jupiter-swap-api is identical to the public Jupiter Swap API so all the documentation applies [Swap API](/docs/apis/swap-api), replacing the api URL `https://quote-api.jup.ag/v6` with `http://127.0.0.1:8080`.
+The jupiter-swap-api is identical to the public Jupiter Swap API so all the documentation applies [Swap API](/docs/old/apis/swap-api), replacing the api URL `https://quote-api.jup.ag/v6` with `http://127.0.0.1:8080`.
## Market Cache
@@ -86,7 +86,7 @@ On MacOS you will see this error message:
Go to System Settings and click on "Open Anyway":
-![](../../static/img/docs/jupiter-swap-api-open-anyway.png)
+![](@site/static/img/docs/jupiter-swap-api-open-anyway.png)
## Advanced
@@ -110,4 +110,4 @@ This will start the API server without Openbook as part of routing. You can also
We are working with some Solana RPC partners in the ecosystem as well so that you can get a paid hosted API ran by them.
- QuickNode: https://marketplace.quicknode.com/add-on/metis-jupiter-v6-swap-api
-- Reach out to Triton: [Triton](https://forms.gle/rT6nPbUE4toyPfbb7)
+- Reach out to Triton: [Triton](https://t.me/SteveCleanBrook)
diff --git a/docs/2-apis/_category_.json b/docs_versioned_docs/version-old/2-apis/_category_.json
similarity index 100%
rename from docs/2-apis/_category_.json
rename to docs_versioned_docs/version-old/2-apis/_category_.json
diff --git a/docs/2-apis/cat_flying_money.png b/docs_versioned_docs/version-old/2-apis/cat_flying_money.png
similarity index 100%
rename from docs/2-apis/cat_flying_money.png
rename to docs_versioned_docs/version-old/2-apis/cat_flying_money.png
diff --git a/docs/3-limit-order/1-limit-order.md b/docs_versioned_docs/version-old/3-limit-order/1-limit-order.md
similarity index 99%
rename from docs/3-limit-order/1-limit-order.md
rename to docs_versioned_docs/version-old/3-limit-order/1-limit-order.md
index 909b7153..bfb5052e 100644
--- a/docs/3-limit-order/1-limit-order.md
+++ b/docs_versioned_docs/version-old/3-limit-order/1-limit-order.md
@@ -37,7 +37,7 @@ We recommend **NodeJS >= 18** for native `fetch` support.
You can use any of these package managers:
-- **bun** — [bun automatically reads `.env` files](https://bun.sh/docs/runtime/env)
+- **bun** — [bun automatically reads `.env` files](https://bun.sh/docs/oldruntime/env)
- **npm**
- **pnpm**
- **yarn**
diff --git a/docs/3-limit-order/2-limit-order-api.md b/docs_versioned_docs/version-old/3-limit-order/2-limit-order-api.md
similarity index 98%
rename from docs/3-limit-order/2-limit-order-api.md
rename to docs_versioned_docs/version-old/3-limit-order/2-limit-order-api.md
index 0b107603..c15dcfae 100644
--- a/docs/3-limit-order/2-limit-order-api.md
+++ b/docs_versioned_docs/version-old/3-limit-order/2-limit-order-api.md
@@ -135,7 +135,7 @@ If no orders are specified, the API would return the unsigned transactions to ca
## View open orders
-This proxies the [getProgramAccounts](https://solana.com/docs/rpc/http/getprogramaccounts) RPC method and returns all order (accounts) associated to the specified wallet.
+This proxies the [getProgramAccounts](https://solana.com/docs/oldrpc/http/getprogramaccounts) RPC method and returns all order (accounts) associated to the specified wallet.
diff --git a/docs/3-limit-order/_category_.json b/docs_versioned_docs/version-old/3-limit-order/_category_.json
similarity index 100%
rename from docs/3-limit-order/_category_.json
rename to docs_versioned_docs/version-old/3-limit-order/_category_.json
diff --git a/docs/4-dca/1-integration.md b/docs_versioned_docs/version-old/4-dca/1-integration.md
similarity index 97%
rename from docs/4-dca/1-integration.md
rename to docs_versioned_docs/version-old/4-dca/1-integration.md
index 86b6ee9c..9fe2fad6 100644
--- a/docs/4-dca/1-integration.md
+++ b/docs_versioned_docs/version-old/4-dca/1-integration.md
@@ -40,9 +40,7 @@ title: Integrating Jupiter DCA
Jupiter Dollar Cost Average (DCA) provides users with the quickest and easiest way to place DCA orders on Solana! DCA allows users to receive tokens directly in their wallet as each order is filled!
-This page will serve as a general guide on integrating DCA into your use case. whether you are building a bot for yourself or looking to integrate with existing (d)apps, Jupiter's DCA program will work regardless of programming language used. If you are trying to build a DCA bot in Typescript / Javascript, look at [DCA SDK](/docs/dca/dca-sdk).
-
-You can learn more about the mechanics of Jupiter's DCA here: [How DCA Works](../../guides/dca/how-dca-work)
+This page will serve as a general guide on integrating DCA into your use case. whether you are building a bot for yourself or looking to integrate with existing (d)apps, Jupiter's DCA program will work regardless of programming language used. If you are trying to build a DCA bot in Typescript / Javascript, look at [DCA SDK](/docs/old/dca/dca-sdk).
## Address
@@ -59,7 +57,7 @@ There are 2 key instructions that can be executed
### 1. Setting up a DCA
-A DCA Account is a Program Derived Address (PDA) account. In order to start dollar cost averaging, you will need to construct and send a Transaction containing an Instruction to open this DCA account. _(if you are not familiar with constructing a transaction on Solana, take a look at using [DCA SDK](/docs/dca/dca-sdk). This guide provides more thorough code examples)_.
+A DCA Account is a Program Derived Address (PDA) account. In order to start dollar cost averaging, you will need to construct and send a Transaction containing an Instruction to open this DCA account. _(if you are not familiar with constructing a transaction on Solana, take a look at using [DCA SDK](/docs/old/dca/dca-sdk). This guide provides more thorough code examples)_.
Each DCA account has unique parameters. If you want to have different parameters, you can create any number of DCA accounts.
@@ -94,7 +92,7 @@ pub fn open_dca_v2(
| Accounts | Description | isSigner? | isWritable? |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------- |
-| dca | You will need to derive a DCA PDA here. The 4 buffers used to generate the PDA are seed -> 'dca', user public key, input token public key, output token public key and a uid (use a unix timestamp). See [code example](/docs/dca/integration#getting-a-dca-pda) below | false | true |
+| dca | You will need to derive a DCA PDA here. The 4 buffers used to generate the PDA are seed -> 'dca', user public key, input token public key, output token public key and a uid (use a unix timestamp). See [code example](/docs/old/dca/integration#getting-a-dca-pda) below | false | true |
| user | This is the user's pubkey. Needs to be a signer of the transaction. | true | false |
| payer | This is the payer's pubkey. Needs to be a signer of the transaction. Pays for the rent to open token accounts needed as well as user's DCA (PDA) account. This can be the same as user. | true | true |
| inputMint | Token to sell | false | false |
diff --git a/docs/4-dca/2-dca-sdk.md b/docs_versioned_docs/version-old/4-dca/2-dca-sdk.md
similarity index 100%
rename from docs/4-dca/2-dca-sdk.md
rename to docs_versioned_docs/version-old/4-dca/2-dca-sdk.md
diff --git a/docs/4-dca/3-lock-dca-campaign.md b/docs_versioned_docs/version-old/4-dca/3-lock-dca-campaign.md
similarity index 100%
rename from docs/4-dca/3-lock-dca-campaign.md
rename to docs_versioned_docs/version-old/4-dca/3-lock-dca-campaign.md
diff --git a/docs/4-dca/_category_.json b/docs_versioned_docs/version-old/4-dca/_category_.json
similarity index 100%
rename from docs/4-dca/_category_.json
rename to docs_versioned_docs/version-old/4-dca/_category_.json
diff --git a/docs/4-dca/ldca.png b/docs_versioned_docs/version-old/4-dca/ldca.png
similarity index 100%
rename from docs/4-dca/ldca.png
rename to docs_versioned_docs/version-old/4-dca/ldca.png
diff --git a/docs/5-jupiter-terminal/1-jupiter-terminal.md b/docs_versioned_docs/version-old/5-jupiter-terminal/1-jupiter-terminal.md
similarity index 98%
rename from docs/5-jupiter-terminal/1-jupiter-terminal.md
rename to docs_versioned_docs/version-old/5-jupiter-terminal/1-jupiter-terminal.md
index 2fd7f30f..baddb21f 100644
--- a/docs/5-jupiter-terminal/1-jupiter-terminal.md
+++ b/docs_versioned_docs/version-old/5-jupiter-terminal/1-jupiter-terminal.md
@@ -211,7 +211,7 @@ Similar to Jupiter, Jupiter Terminal supports fee for integrators.
There are no protocol fees on Jupiter, but integrators can introduce a platform fee on swaps. The platform fee is provided in basis points, e.g. 20 bps for 0.2% of the token output.
-Refer to [Adding your own fees](/docs/APIs/adding-fees) docs for more details.
+Refer to [Adding your own fees](/docs/old/APIs/adding-fees) docs for more details.
_Note: You will need to create the Token fee accounts to collect the platform fee._
@@ -260,7 +260,7 @@ window.Jupiter.close();
The Jupiter Token List API is an open, collaborative, and dynamic token list to make trading on Solana more transparent and safer for users and developers.
It is true by default to ensure that only validated tokens are shown.
-Learn more at: https://station.jup.ag/docs/token-list/token-list-api
+Learn more at: https://station.jup.ag/docs/old/token-list/token-list-api
---
diff --git a/docs/5-jupiter-terminal/2-terminal-integration-guide.md b/docs_versioned_docs/version-old/5-jupiter-terminal/2-terminal-integration-guide.md
similarity index 97%
rename from docs/5-jupiter-terminal/2-terminal-integration-guide.md
rename to docs_versioned_docs/version-old/5-jupiter-terminal/2-terminal-integration-guide.md
index c64a90ff..8946df50 100644
--- a/docs/5-jupiter-terminal/2-terminal-integration-guide.md
+++ b/docs_versioned_docs/version-old/5-jupiter-terminal/2-terminal-integration-guide.md
@@ -14,7 +14,7 @@ Jupiter Terminal is an open-sourced, lite version of Jupiter that provides end-t
:::tip Jupiter Terminal Links
- [Demo](https://terminal.jup.ag/): See all available modes
-- [Developer Docs](/docs/jupiter-terminal/jupiter-terminal): Jupiter Terminal in detail
+- [Developer Docs](/docs/old/jupiter-terminal/jupiter-terminal): Jupiter Terminal in detail
- [Repo](https://github.com/jup-ag/terminal)
:::
diff --git a/docs/5-jupiter-terminal/3-unified-wallet-kit.md b/docs_versioned_docs/version-old/5-jupiter-terminal/3-unified-wallet-kit.md
similarity index 98%
rename from docs/5-jupiter-terminal/3-unified-wallet-kit.md
rename to docs_versioned_docs/version-old/5-jupiter-terminal/3-unified-wallet-kit.md
index 965e77c1..d080f804 100644
--- a/docs/5-jupiter-terminal/3-unified-wallet-kit.md
+++ b/docs_versioned_docs/version-old/5-jupiter-terminal/3-unified-wallet-kit.md
@@ -74,7 +74,7 @@ const ExampleBaseOnly = () => {
},
notificationCallback: WalletNotification,
walletlistExplanation: {
- href: 'https://station.jup.ag/docs/additional-topics/wallet-list',
+ href: 'https://station.jup.ag/docs/old/additional-topics/wallet-list',
},
}}
>
diff --git a/docs/5-jupiter-terminal/_category_.json b/docs_versioned_docs/version-old/5-jupiter-terminal/_category_.json
similarity index 100%
rename from docs/5-jupiter-terminal/_category_.json
rename to docs_versioned_docs/version-old/5-jupiter-terminal/_category_.json
diff --git a/docs/5-jupiter-terminal/integrated-mode.jpg b/docs_versioned_docs/version-old/5-jupiter-terminal/integrated-mode.jpg
similarity index 100%
rename from docs/5-jupiter-terminal/integrated-mode.jpg
rename to docs_versioned_docs/version-old/5-jupiter-terminal/integrated-mode.jpg
diff --git a/docs/5-jupiter-terminal/modal-mode.jpg b/docs_versioned_docs/version-old/5-jupiter-terminal/modal-mode.jpg
similarity index 100%
rename from docs/5-jupiter-terminal/modal-mode.jpg
rename to docs_versioned_docs/version-old/5-jupiter-terminal/modal-mode.jpg
diff --git a/docs/5-jupiter-terminal/terminal.jpeg b/docs_versioned_docs/version-old/5-jupiter-terminal/terminal.jpeg
similarity index 100%
rename from docs/5-jupiter-terminal/terminal.jpeg
rename to docs_versioned_docs/version-old/5-jupiter-terminal/terminal.jpeg
diff --git a/docs/5-jupiter-terminal/terminal/example1.jpg b/docs_versioned_docs/version-old/5-jupiter-terminal/terminal/example1.jpg
similarity index 100%
rename from docs/5-jupiter-terminal/terminal/example1.jpg
rename to docs_versioned_docs/version-old/5-jupiter-terminal/terminal/example1.jpg
diff --git a/docs/5-jupiter-terminal/terminal/example2.jpg b/docs_versioned_docs/version-old/5-jupiter-terminal/terminal/example2.jpg
similarity index 100%
rename from docs/5-jupiter-terminal/terminal/example2.jpg
rename to docs_versioned_docs/version-old/5-jupiter-terminal/terminal/example2.jpg
diff --git a/docs/5-jupiter-terminal/terminal/example3.jpg b/docs_versioned_docs/version-old/5-jupiter-terminal/terminal/example3.jpg
similarity index 100%
rename from docs/5-jupiter-terminal/terminal/example3.jpg
rename to docs_versioned_docs/version-old/5-jupiter-terminal/terminal/example3.jpg
diff --git a/docs/5-jupiter-terminal/terminal/example4.jpg b/docs_versioned_docs/version-old/5-jupiter-terminal/terminal/example4.jpg
similarity index 100%
rename from docs/5-jupiter-terminal/terminal/example4.jpg
rename to docs_versioned_docs/version-old/5-jupiter-terminal/terminal/example4.jpg
diff --git a/docs/5-jupiter-terminal/terminal/example5.jpg b/docs_versioned_docs/version-old/5-jupiter-terminal/terminal/example5.jpg
similarity index 100%
rename from docs/5-jupiter-terminal/terminal/example5.jpg
rename to docs_versioned_docs/version-old/5-jupiter-terminal/terminal/example5.jpg
diff --git a/docs/5-jupiter-terminal/terminal/example6.jpg b/docs_versioned_docs/version-old/5-jupiter-terminal/terminal/example6.jpg
similarity index 100%
rename from docs/5-jupiter-terminal/terminal/example6.jpg
rename to docs_versioned_docs/version-old/5-jupiter-terminal/terminal/example6.jpg
diff --git a/docs/5-jupiter-terminal/terminal/example7.jpg b/docs_versioned_docs/version-old/5-jupiter-terminal/terminal/example7.jpg
similarity index 100%
rename from docs/5-jupiter-terminal/terminal/example7.jpg
rename to docs_versioned_docs/version-old/5-jupiter-terminal/terminal/example7.jpg
diff --git a/docs/5-jupiter-terminal/terminal/terminal-demo.gif b/docs_versioned_docs/version-old/5-jupiter-terminal/terminal/terminal-demo.gif
similarity index 100%
rename from docs/5-jupiter-terminal/terminal/terminal-demo.gif
rename to docs_versioned_docs/version-old/5-jupiter-terminal/terminal/terminal-demo.gif
diff --git a/docs/5-jupiter-terminal/terminal/terminal-demo2.gif b/docs_versioned_docs/version-old/5-jupiter-terminal/terminal/terminal-demo2.gif
similarity index 100%
rename from docs/5-jupiter-terminal/terminal/terminal-demo2.gif
rename to docs_versioned_docs/version-old/5-jupiter-terminal/terminal/terminal-demo2.gif
diff --git a/docs/5-jupiter-terminal/unified-wallet-1.jpg b/docs_versioned_docs/version-old/5-jupiter-terminal/unified-wallet-1.jpg
similarity index 100%
rename from docs/5-jupiter-terminal/unified-wallet-1.jpg
rename to docs_versioned_docs/version-old/5-jupiter-terminal/unified-wallet-1.jpg
diff --git a/docs/5-jupiter-terminal/unified-wallet-2.jpg b/docs_versioned_docs/version-old/5-jupiter-terminal/unified-wallet-2.jpg
similarity index 100%
rename from docs/5-jupiter-terminal/unified-wallet-2.jpg
rename to docs_versioned_docs/version-old/5-jupiter-terminal/unified-wallet-2.jpg
diff --git a/docs/5-jupiter-terminal/unified-wallet-2.png b/docs_versioned_docs/version-old/5-jupiter-terminal/unified-wallet-2.png
similarity index 100%
rename from docs/5-jupiter-terminal/unified-wallet-2.png
rename to docs_versioned_docs/version-old/5-jupiter-terminal/unified-wallet-2.png
diff --git a/docs/5-jupiter-terminal/widget-mode.jpg b/docs_versioned_docs/version-old/5-jupiter-terminal/widget-mode.jpg
similarity index 100%
rename from docs/5-jupiter-terminal/widget-mode.jpg
rename to docs_versioned_docs/version-old/5-jupiter-terminal/widget-mode.jpg
diff --git a/docs/6-projects-and-dexes/1-rust-integration.md b/docs_versioned_docs/version-old/6-projects-and-dexes/1-rust-integration.md
similarity index 95%
rename from docs/6-projects-and-dexes/1-rust-integration.md
rename to docs_versioned_docs/version-old/6-projects-and-dexes/1-rust-integration.md
index 40b2a547..8272dee7 100644
--- a/docs/6-projects-and-dexes/1-rust-integration.md
+++ b/docs_versioned_docs/version-old/6-projects-and-dexes/1-rust-integration.md
@@ -24,13 +24,12 @@ Our top priority is securing the best prices and the best token selection for ou
### Minimum DEX TVL of $500k
- Given the amount of integration work involved, a DEX must have enough liquidity to be useful for trading and to attract volume.
-- Each market/pool must have a minimum liquidity of $500 to show up on Jupiter. You can keep up to date on how we list tokens [here](/docs/get-your-token-onto-jup)
-
+- Each market/pool must have a minimum liquidity of $500 to show up on Jupiter. You can keep up to date on how we list tokens [here](/docs/old/token-list/token-list-api)
### An API for listing/delisting pools on the DEX
- This will allow us to automatically track new markets as you add them to your DEX.
### Provide a Rust SDK
-- Your SDK should implement this interface: [DEX Integration](/docs/projects-and-dexes/rust-integration).
+- Your SDK should implement this interface: [DEX Integration](/docs/old/projects-and-dexes/rust-integration).
- We are soon migrating to a Rust SDK and so are asking all integrated DEXes to create a Rust SDK version or give access to the code for us to include.
### Security Audit
diff --git a/docs/6-projects-and-dexes/2-integration-guidelines.md b/docs_versioned_docs/version-old/6-projects-and-dexes/2-integration-guidelines.md
similarity index 100%
rename from docs/6-projects-and-dexes/2-integration-guidelines.md
rename to docs_versioned_docs/version-old/6-projects-and-dexes/2-integration-guidelines.md
diff --git a/docs/6-projects-and-dexes/_category_.json b/docs_versioned_docs/version-old/6-projects-and-dexes/_category_.json
similarity index 100%
rename from docs/6-projects-and-dexes/_category_.json
rename to docs_versioned_docs/version-old/6-projects-and-dexes/_category_.json
diff --git a/docs/6-projects-and-dexes/limit-order.jpeg b/docs_versioned_docs/version-old/6-projects-and-dexes/limit-order.jpeg
similarity index 100%
rename from docs/6-projects-and-dexes/limit-order.jpeg
rename to docs_versioned_docs/version-old/6-projects-and-dexes/limit-order.jpeg
diff --git a/docs/6-projects-and-dexes/thinking_cat.png b/docs_versioned_docs/version-old/6-projects-and-dexes/thinking_cat.png
similarity index 100%
rename from docs/6-projects-and-dexes/thinking_cat.png
rename to docs_versioned_docs/version-old/6-projects-and-dexes/thinking_cat.png
diff --git a/docs/7-token-list/1-token-list-api.md b/docs_versioned_docs/version-old/7-token-list/1-token-list-api.md
similarity index 100%
rename from docs/7-token-list/1-token-list-api.md
rename to docs_versioned_docs/version-old/7-token-list/1-token-list-api.md
diff --git a/docs/7-token-list/2-partner-tags.md b/docs_versioned_docs/version-old/7-token-list/2-partner-tags.md
similarity index 100%
rename from docs/7-token-list/2-partner-tags.md
rename to docs_versioned_docs/version-old/7-token-list/2-partner-tags.md
diff --git a/docs/7-token-list/_category_.json b/docs_versioned_docs/version-old/7-token-list/_category_.json
similarity index 100%
rename from docs/7-token-list/_category_.json
rename to docs_versioned_docs/version-old/7-token-list/_category_.json
diff --git a/docs/7-token-list/cat_list.png b/docs_versioned_docs/version-old/7-token-list/cat_list.png
similarity index 100%
rename from docs/7-token-list/cat_list.png
rename to docs_versioned_docs/version-old/7-token-list/cat_list.png
diff --git a/docs/7-token-list/cat_list2.png b/docs_versioned_docs/version-old/7-token-list/cat_list2.png
similarity index 100%
rename from docs/7-token-list/cat_list2.png
rename to docs_versioned_docs/version-old/7-token-list/cat_list2.png
diff --git a/docs/7-token-list/token-list.jpg b/docs_versioned_docs/version-old/7-token-list/token-list.jpg
similarity index 100%
rename from docs/7-token-list/token-list.jpg
rename to docs_versioned_docs/version-old/7-token-list/token-list.jpg
diff --git a/docs/8-additional-topics/1-composing-with-versioned-transaction.md b/docs_versioned_docs/version-old/8-additional-topics/1-composing-with-versioned-transaction.md
similarity index 97%
rename from docs/8-additional-topics/1-composing-with-versioned-transaction.md
rename to docs_versioned_docs/version-old/8-additional-topics/1-composing-with-versioned-transaction.md
index 6a9ed84c..302e68be 100644
--- a/docs/8-additional-topics/1-composing-with-versioned-transaction.md
+++ b/docs_versioned_docs/version-old/8-additional-topics/1-composing-with-versioned-transaction.md
@@ -130,7 +130,7 @@ addressLookupTableAccounts.push(yourAddressLookupTableAccounts)
```
:::tip Resources for creating and using Address Lookup Tables
-- [Github docs on versioned transactions](https://github.com/solana-labs/solana/blob/master/docs/src/developing/versioned-transactions.md)
-- [Github docs on address lookup tables](https://github.com/solana-labs/solana/blob/master/docs/src/developing/lookup-tables.md)
+- [Github docs on versioned transactions](https://github.com/solana-labs/solana/blob/master/docs/oldsrc/developing/versioned-transactions.md)
+- [Github docs on address lookup tables](https://github.com/solana-labs/solana/blob/master/docs/oldsrc/developing/lookup-tables.md)
- [Phantom's guide for sending a versioned transaction](https://docs.phantom.app/getting-started-with-solana/sending-a-transaction-1)
:::
\ No newline at end of file
diff --git a/docs/8-additional-topics/2-displaying-jup-stats.md b/docs_versioned_docs/version-old/8-additional-topics/2-displaying-jup-stats.md
similarity index 100%
rename from docs/8-additional-topics/2-displaying-jup-stats.md
rename to docs_versioned_docs/version-old/8-additional-topics/2-displaying-jup-stats.md
diff --git a/docs/8-additional-topics/3-links-and-contract-addresses.md b/docs_versioned_docs/version-old/8-additional-topics/3-links-and-contract-addresses.md
similarity index 62%
rename from docs/8-additional-topics/3-links-and-contract-addresses.md
rename to docs_versioned_docs/version-old/8-additional-topics/3-links-and-contract-addresses.md
index 08e2db00..79eee1bd 100644
--- a/docs/8-additional-topics/3-links-and-contract-addresses.md
+++ b/docs_versioned_docs/version-old/8-additional-topics/3-links-and-contract-addresses.md
@@ -17,9 +17,9 @@ title: Helpful Links and Contract Addresses
## SDKs & APIs
- Jupiter API
- - [v6 API](/api-v6) uses JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 with versioned transactions & address lookup tables so all swap routes take just 1 transaction. Also, no intermediate token accounts and open order accounts are needed anymore.
- - [v4 API](https://quote-api.jup.ag/v4/docs/static/index.html) uses JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB with versioned transactions & address lookup tables so all swap routes take just 1 transaction.
- - [v3 API](https://quote-api.jup.ag/v3/docs/static/index.html) uses JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB which uses legacy transactions so some swap routes can take up to 3 transactions.
+ - v6 API uses JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 with versioned transactions & address lookup tables so all swap routes take just 1 transaction. Also, no intermediate token accounts and open order accounts are needed anymore.
+ - [v4 API](https://quote-api.jup.ag/v4/docs/oldstatic/index.html) uses JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB with versioned transactions & address lookup tables so all swap routes take just 1 transaction.
+ - [v3 API](https://quote-api.jup.ag/v3/docs/oldstatic/index.html) uses JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB which uses legacy transactions so some swap routes can take up to 3 transactions.
- Jupiter Core Library [NPM](https://www.npmjs.com/package/@jup-ag/core)
- 4.x.x uses JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB with versioned transactions & address lookup tables.
- 3.x.x uses JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB
diff --git a/docs/8-additional-topics/4-builder-tips.md b/docs_versioned_docs/version-old/8-additional-topics/4-builder-tips.md
similarity index 100%
rename from docs/8-additional-topics/4-builder-tips.md
rename to docs_versioned_docs/version-old/8-additional-topics/4-builder-tips.md
diff --git a/docs/8-additional-topics/5-wallet-list.md b/docs_versioned_docs/version-old/8-additional-topics/5-wallet-list.md
similarity index 100%
rename from docs/8-additional-topics/5-wallet-list.md
rename to docs_versioned_docs/version-old/8-additional-topics/5-wallet-list.md
diff --git a/docs/8-additional-topics/6-audits.md b/docs_versioned_docs/version-old/8-additional-topics/6-audits.md
similarity index 100%
rename from docs/8-additional-topics/6-audits.md
rename to docs_versioned_docs/version-old/8-additional-topics/6-audits.md
diff --git a/docs/8-additional-topics/_category_.json b/docs_versioned_docs/version-old/8-additional-topics/_category_.json
similarity index 100%
rename from docs/8-additional-topics/_category_.json
rename to docs_versioned_docs/version-old/8-additional-topics/_category_.json
diff --git a/docs/8-additional-topics/jup_vt.jpeg b/docs_versioned_docs/version-old/8-additional-topics/jup_vt.jpeg
similarity index 100%
rename from docs/8-additional-topics/jup_vt.jpeg
rename to docs_versioned_docs/version-old/8-additional-topics/jup_vt.jpeg
diff --git a/docs/9-legacy/1-apis/1-swap-api.md b/docs_versioned_docs/version-old/9-legacy/1-apis/1-swap-api.md
similarity index 97%
rename from docs/9-legacy/1-apis/1-swap-api.md
rename to docs_versioned_docs/version-old/9-legacy/1-apis/1-swap-api.md
index 6a997639..72acc016 100644
--- a/docs/9-legacy/1-apis/1-swap-api.md
+++ b/docs_versioned_docs/version-old/9-legacy/1-apis/1-swap-api.md
@@ -10,7 +10,7 @@ title: "V4 Swap API"
:::tip
-We recommend checking out our [v6 API](/docs/APIs/swap-api) for more reliability, performance and better pricing.
+We recommend checking out our [v6 API](/docs/old/APIs/swap-api) for more reliability, performance and better pricing.
:::
We offer an API and an SDK, but, we recommend that integrators use our API. The API offers several benefits:
@@ -38,7 +38,7 @@ All Jupiter swaps are now only a single transaction. Not all wallets support Ver
:::
:::info API Documentation
- [Swagger](https://quote-api.jup.ag/v4/docs/static/index.html)
+ [Swagger](https://quote-api.jup.ag/v4/docs/oldstatic/index.html)
:::
### Guide
@@ -113,7 +113,7 @@ const swappableOutputForSol = generatedRouteMap['So11111111111111111111111111111
### Retrieve an indexed route map for the possible token pairs you can swap between.
- See Swagger for more details: https://quote-api.jup.ag/v4/docs/static/index.html
+ See Swagger for more details: https://quote-api.jup.ag/v4/docs/oldstatic/index.html
@@ -172,7 +172,7 @@ const routes = data;
### Get the top 3 swap routes for a token trade pair sorted by largest output token amount
- See Swagger for more details: https://quote-api.jup.ag/v4/docs/static/index.html
+ See Swagger for more details: https://quote-api.jup.ag/v4/docs/oldstatic/index.html
### Request Parameters
@@ -234,7 +234,7 @@ const { swapTransaction } = transactions;
### Get the serialized swap transactions for the swap route provided.
- See Swagger for more details: https://quote-api.jup.ag/v4/docs/static/index.html
+ See Swagger for more details: https://quote-api.jup.ag/v4/docs/oldstatic/index.html
### Request Parameters
diff --git a/docs/9-legacy/1-apis/2-payments-api.md b/docs_versioned_docs/version-old/9-legacy/1-apis/2-payments-api.md
similarity index 99%
rename from docs/9-legacy/1-apis/2-payments-api.md
rename to docs_versioned_docs/version-old/9-legacy/1-apis/2-payments-api.md
index 97ef7888..36d10b85 100644
--- a/docs/9-legacy/1-apis/2-payments-api.md
+++ b/docs_versioned_docs/version-old/9-legacy/1-apis/2-payments-api.md
@@ -124,5 +124,5 @@ transaction.message = message.compileToV0Message(addressLookupTableAccounts);
```
:::tip
-If you want to add your own fees, check out: [Adding Your Own Fees](/docs/legacy/apis/adding-fees)
+If you want to add your own fees, check out: [Adding Your Own Fees](/docs/old/legacy/apis/adding-fees)
:::
\ No newline at end of file
diff --git a/docs/9-legacy/1-apis/3-adding-fees.md b/docs_versioned_docs/version-old/9-legacy/1-apis/3-adding-fees.md
similarity index 93%
rename from docs/9-legacy/1-apis/3-adding-fees.md
rename to docs_versioned_docs/version-old/9-legacy/1-apis/3-adding-fees.md
index 205114b3..c3b389c1 100644
--- a/docs/9-legacy/1-apis/3-adding-fees.md
+++ b/docs_versioned_docs/version-old/9-legacy/1-apis/3-adding-fees.md
@@ -23,7 +23,7 @@ Jupiter doesn't take any fees.
With the Jupiter API, you can just add in the `feeBps` parameter to the Quote API:
-[# 5. Get the routes for a swap](/docs/legacy/apis/adding-fees#adding-your-own-platform-fee-to-jupiter-swap)
+[# 5. Get the routes for a swap](/docs/old/legacy/apis/adding-fees#adding-your-own-platform-fee-to-jupiter-swap)
**Jupiter SDK**
diff --git a/docs/9-legacy/1-apis/_category_.json b/docs_versioned_docs/version-old/9-legacy/1-apis/_category_.json
similarity index 100%
rename from docs/9-legacy/1-apis/_category_.json
rename to docs_versioned_docs/version-old/9-legacy/1-apis/_category_.json
diff --git a/docs/9-legacy/1-apis/cat_flying_money.png b/docs_versioned_docs/version-old/9-legacy/1-apis/cat_flying_money.png
similarity index 100%
rename from docs/9-legacy/1-apis/cat_flying_money.png
rename to docs_versioned_docs/version-old/9-legacy/1-apis/cat_flying_money.png
diff --git a/docs/9-legacy/_category_.json b/docs_versioned_docs/version-old/9-legacy/_category_.json
similarity index 100%
rename from docs/9-legacy/_category_.json
rename to docs_versioned_docs/version-old/9-legacy/_category_.json
diff --git a/docs/assets/2022-08-09_Jupiter_Swap_Sec3.pdf b/docs_versioned_docs/version-old/assets/2022-08-09_Jupiter_Swap_Sec3.pdf
similarity index 100%
rename from docs/assets/2022-08-09_Jupiter_Swap_Sec3.pdf
rename to docs_versioned_docs/version-old/assets/2022-08-09_Jupiter_Swap_Sec3.pdf
diff --git a/docs/assets/Jupiter-Aggregator-Apr-2024.pdf b/docs_versioned_docs/version-old/assets/Jupiter-Aggregator-Apr-2024.pdf
similarity index 100%
rename from docs/assets/Jupiter-Aggregator-Apr-2024.pdf
rename to docs_versioned_docs/version-old/assets/Jupiter-Aggregator-Apr-2024.pdf
diff --git a/docs/assets/Jupiter-LimitOrderV2-Apr-2024.pdf b/docs_versioned_docs/version-old/assets/Jupiter-LimitOrderV2-Apr-2024.pdf
similarity index 100%
rename from docs/assets/Jupiter-LimitOrderV2-Apr-2024.pdf
rename to docs_versioned_docs/version-old/assets/Jupiter-LimitOrderV2-Apr-2024.pdf
diff --git a/docs/assets/Jupiter-Perpetuals-Feb-2024.pdf b/docs_versioned_docs/version-old/assets/Jupiter-Perpetuals-Feb-2024.pdf
similarity index 100%
rename from docs/assets/Jupiter-Perpetuals-Feb-2024.pdf
rename to docs_versioned_docs/version-old/assets/Jupiter-Perpetuals-Feb-2024.pdf
diff --git a/docs/assets/JupiterDAO-Mar-2024.pdf b/docs_versioned_docs/version-old/assets/JupiterDAO-Mar-2024.pdf
similarity index 100%
rename from docs/assets/JupiterDAO-Mar-2024.pdf
rename to docs_versioned_docs/version-old/assets/JupiterDAO-Mar-2024.pdf
diff --git a/docs/assets/jupiter_lock_audit_final.pdf b/docs_versioned_docs/version-old/assets/jupiter_lock_audit_final.pdf
similarity index 100%
rename from docs/assets/jupiter_lock_audit_final.pdf
rename to docs_versioned_docs/version-old/assets/jupiter_lock_audit_final.pdf
diff --git a/docs/assets/ottersec_perpetual_audit_report.pdf b/docs_versioned_docs/version-old/assets/ottersec_perpetual_audit_report.pdf
similarity index 100%
rename from docs/assets/ottersec_perpetual_audit_report.pdf
rename to docs_versioned_docs/version-old/assets/ottersec_perpetual_audit_report.pdf
diff --git a/docs/assets/sec3_perpetual_audit_report.pdf b/docs_versioned_docs/version-old/assets/sec3_perpetual_audit_report.pdf
similarity index 100%
rename from docs/assets/sec3_perpetual_audit_report.pdf
rename to docs_versioned_docs/version-old/assets/sec3_perpetual_audit_report.pdf
diff --git a/docs_versioned_docs/version-old/index.md b/docs_versioned_docs/version-old/index.md
new file mode 100644
index 00000000..c7599e20
--- /dev/null
+++ b/docs_versioned_docs/version-old/index.md
@@ -0,0 +1,36 @@
+---
+sidebar_position: 1
+title: Welcome
+description: "Unlock superior trading with Jupiter Documentation. Integrate APIs for swaps, payments, and more effortlessly. Explore robust tools now!"
+---
+
+
+ Jupiter APIs and Documentation
+
+
+
+# Welcome Catdet-veloper!
+
+![cat_at_computer.png](@site/static/img/cat_at_computer.png)
+
+## Build World Class Swap Experiences Now!
+
+Jupiter's goal is simple: Help you provide world class experiences for your users. We aim to do this with as little work as possible on your end, regardless of use case or need.
+
+**Jupiter offers a wide range of tools to make your life easy. Some of these tools include:**
+
+- [Swaps](/docs/old/APIs/swap-api): One of the Fastest Swap APIs on Solana. Simply put in your desired pairs, amount, and slippage and receive your serialized transaction from the API to execute your swap.
+- [Payments API](/docs/old/APIs/payments-api): Quickly swap any token to USDC. Using this, you can specify an exact output token amount in any token (not just USDC).
+- Limit Orders: Place limit orders quickly and easily with Jupiter Limit Orders.
+- DCA: DCA into any SPL token with Jupiter's DCA program. Integrating into your use case is fast and simple!
+
+For DEXes looking to integrate with Jupiter products, check out these resources:
+- [Jupiter Terminal](/docs/old/jupiter-terminal/jupiter-terminal) Jupiter Terminal provides an easy way to integrate an open-source and easy-to-use terminal in your app.
+
+For projects who wants to make your token visible on the Strict list, see:
+
+- [Get your Token onto Jupiter](/docs/old/token-list/token-list-api)
+
+Learn how to use Jupiter products with our in-depth [User guides.](/guides)
+
+For technical questions or partnership requests, please reach out to us in our discord: https://discord.gg/jup.
diff --git a/docs_versioned_sidebars/version-old-sidebars-docs.json b/docs_versioned_sidebars/version-old-sidebars-docs.json
new file mode 100644
index 00000000..2782dc0f
--- /dev/null
+++ b/docs_versioned_sidebars/version-old-sidebars-docs.json
@@ -0,0 +1,8 @@
+{
+ "sidebar": [
+ {
+ "type": "autogenerated",
+ "dirName": "."
+ }
+ ]
+}
diff --git a/docs_versions.json b/docs_versions.json
new file mode 100644
index 00000000..95598e1d
--- /dev/null
+++ b/docs_versions.json
@@ -0,0 +1,3 @@
+[
+ "old"
+]
diff --git a/docusaurus.config.js b/docusaurus.config.js
index 95b72663..e31c02e7 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -3,6 +3,8 @@
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
+const redirects = require('./redirects.json');
+const { UnfoldHorizontal } = require("lucide-react");
require("dotenv").config();
/** @type {import('@docusaurus/types').Config} */
@@ -81,20 +83,39 @@ const config = {
/** @type {import('docusaurus-preset-openapi').Options} */
({
api: {
- path: "openapi/quoteV6.yaml",
- routeBasePath: "api-v6",
+ path: "openapi/api.yaml",
+ routeBasePath: "docs/api",
+ sidebarCollapsible: false,
+ sidebarCollapsed: false,
},
docs: {
- sidebarPath: require.resolve("./sidebars.js"),
+ id: 'docs',
+ lastVersion: 'current',
+ versions: {
+ current: {
+ label: 'Latest',
+ path: '',
+ badge: false,
+ },
+ old: {
+ label: 'Old',
+ path: 'old',
+ banner: 'unmaintained',
+ }
+ },
+ sidebarPath: require.resolve("./sidebars-docs.js"),
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
- sidebarCollapsed: true,
editUrl: "https://github.com/jup-ag/space-station/tree/main/",
// docLayoutComponent: "@theme/DocPage",
// docItemComponent: "@theme/ApiItem", // Derived from docusaurus-theme-openapi-docs
},
theme: {
- customCss: require.resolve("./src/css/custom.css"),
+ customCss: [
+ require.resolve("./src/css/custom.css"),
+ require.resolve("./src/css/navbar.css"),
+ require.resolve("./src/css/sidebar.css"),
+ ],
},
proxy: {
"/proxy": {
@@ -120,98 +141,7 @@ const config = {
],
[
"@docusaurus/plugin-client-redirects",
- {
- redirects: [
- {
- to: "/guides/swap/how-swap-works",
- from: "/guides/jupiter-swap/how-swap-works/metropolis-features",
- },
- {
- to: "/guides/swap/how-swap-works",
- from: "/guides/jupiter-swap/how-swap-works/how-swap-works",
- },
- {
- to: "/guides/swap/how-swap-works",
- from: "/guides/jupiter-swap/how-swap-works/metis-routing",
- },
- {
- to: "/guides/swap/how-swap-works",
- from: "/guides/jupiter-swap/swap",
- },
- {
- to: "/guides/swap/tutorials/earn-referral-fees",
- from: "/guides/jupiter-swap/how-referral-works",
- },
- {
- to: "/guides/swap/how-swap-works",
- from: "/guides/jupiter-swap/how-swap-works/metropolis",
- },
- {
- to: "/guides/perpetual-exchange/overview",
- from: "/labs/perpetual-exchange/overview",
- },
- {
- to: "/guides/perpetual-exchange/how-it-works",
- from: "/guides/perpetual-exchange/trading",
- },
- {
- to: "/guides/perpetual-exchange/overview",
- from: "/labs",
- },
- {
- to: "/guides/perpetual-exchange/how-it-works",
- from: "/labs/perpetual-exchange/trading",
- },
- {
- to: "/guides/jlp/JLP",
- from: "/labs/perpetual-exchange/jlp-pool",
- },
- {
- to: "/guides/jlp/How-JLP-Works",
- from: "/labs/perpetual-exchange/how-it-works",
- },
- {
- to: "/guides/jlp/How-JLP-Works",
- from: "/labs/faq/faq",
- },
- {
- to: "/guides/general/get-your-token-on-jupiter",
- from: "/docs/get-your-token-onto-jup",
- },
- {
- to: "/docs/limit-order",
- from: "/docs/limit-order/limit-order-with-sdk",
- },
- {
- to: "/guides/general/get-your-token-on-jupiter",
- from: "/guides/general/new-token-guide",
- },
- {
- to: "/guides/jlp/How-JLP-Works",
- from: "/labs/perps-faq",
- },
- {
- to: "/blog-redirect",
- from: "/blog",
- },
- {
- to: "/guides/onboard",
- from: "/guides/bridge-comparator",
- },
- {
- to: "/guides/onboard",
- from: "/guides/bridge/comparator",
- },
- {
- to: "/guides/onboard/bridge",
- from: "/guides/bridge/bridging",
- },
- {
- to: "/guides/onboard/onramp",
- from: "/guides/bridge/onramp",
- },
- ],
- },
+ { redirects }
],
async function myPlugin() {
return {
@@ -246,53 +176,19 @@ const config = {
colorMode: {
defaultMode: "light",
disableSwitch: true,
- respectPrefersColorScheme: true,
+ respectPrefersColorScheme: false,
},
navbar: {
- title: "Jupiter Station",
+ title: "",
logo: {
alt: "Jupiter Logo",
src: "img/jupiter-logo.svg",
- width: 33,
- height: 33,
+ width: 28,
+ height: 28,
},
items: [
- {
- to: "/guides",
- label: "Guides",
- position: "left",
- },
- {
- to: "/docs",
- position: "left",
- label: "Docs",
- },
- {
- to: "/api-v6",
- position: "left",
- label: "API Playground",
- },
- {
- to: "https://dune.com/ilemi/jupiter-aggregator-solana",
- label: "Stats",
- position: "left",
- },
- {
- type: "search",
- position: "right",
- className: "search",
- },
- {
- type: "html",
- position: "right",
- value: `
-
-
- Launch App
-
-
- `,
- },
+ { to: 'guides', label: 'Guides', position: 'left' },
+ { to: 'docs/index', label: 'Docs', position: 'left' },
],
},
algolia: {
diff --git a/guides/12-general/6-faq.md b/guides/12-general/6-faq.md
index 1db522c8..fa7b9881 100644
--- a/guides/12-general/6-faq.md
+++ b/guides/12-general/6-faq.md
@@ -34,7 +34,7 @@ description: "Discover FAQs on Jupiter Swap, DCA, and more. Get quick answers an
### How do I integrate Jupiter swap into my protocol / dApp?
-Protocols / Projects are free to integrate Jupiter swap with [Swap API](/docs/apis/swap-api), Jupiter operates in a decentralized way. That said, we encourage protocols/ projects to reach out to our team when the integration is done and live, we are happy to work together on co-marketing and getting the words out.
+Protocols / Projects are free to integrate Jupiter swap with [Swap API](/docs/old/apis/swap-api), Jupiter operates in a decentralized way. That said, we encourage protocols/ projects to reach out to our team when the integration is done and live, we are happy to work together on co-marketing and getting the words out.
----
@@ -99,7 +99,7 @@ A few scenarios or cases where the order is not being fulfill
### How do I get my new token to the strict list / remove the unknown tag?
-- To get on to the Jupiter Strict Token List/ removing the `unknown` token tag through our public [Token verification](/docs/token-list/token-list-api#community-validation-for-strict-mode-beta) process in [Jupiter Token List Public Repo](https://github.com/jup-ag/token-list).
+- To get on to the Jupiter Strict Token List/ removing the `unknown` token tag through our public [Token verification](/docs/old/token-list/token-list-api#community-validation-for-strict-mode-beta) process in [Jupiter Token List Public Repo](https://github.com/jup-ag/token-list).
----
diff --git a/guides/2-spot/1-swap/2-tutorials/2-how-to-configure-settings.md b/guides/2-spot/1-swap/2-tutorials/2-how-to-configure-settings.md
index 04543126..92dd07f3 100644
--- a/guides/2-spot/1-swap/2-tutorials/2-how-to-configure-settings.md
+++ b/guides/2-spot/1-swap/2-tutorials/2-how-to-configure-settings.md
@@ -91,7 +91,7 @@ You can decide 3 levels of settings:
1. **Language:** Pick your preferred language to navigate [jup.ag](http://jup.ag).
2. **Preferred Explorer:** Pick your preferred explorer from Solscan, SolanaFM, Solana Beach, Solana Explorer, XRAY, and OKLink.
-3. **Versioned Transaction:** Enabling [Versioned Transaction](https://station.jup.ag/docs/additional-topics/composing-with-versioned-transaction) improves composability so Jupiter will be able to fit in more routes and get even better pricing all in a single transaction.
+3. **Versioned Transaction:** Enabling [Versioned Transaction](https://station.jup.ag/docs/old/additional-topics/composing-with-versioned-transaction) improves composability so Jupiter will be able to fit in more routes and get even better pricing all in a single transaction.
4. **RPC Endpoint:** Pick your preferred public RPC endpoint or use your own custom RPC endpoint. Each RPC Endpoint displays its active end-point latency.
1. Due to network traffic loads, RPC endpoints can get overloaded, which can lead to latency issues that will directly impact your trade executions. Selecting the lowest latency option is a best practice to ensure the fastest trade execution.
diff --git a/guides/2-spot/3-limit-order/2-how-lo-work.md b/guides/2-spot/3-limit-order/2-how-lo-work.md
index f1f54e8a..e9a7d67d 100644
--- a/guides/2-spot/3-limit-order/2-how-lo-work.md
+++ b/guides/2-spot/3-limit-order/2-how-lo-work.md
@@ -18,7 +18,7 @@ This is not an order book system. The limit order system utilizes a keeper to mo
**Scenario**
- If a Limit Order is placed to buy 1 $SOL with 10 USDC at a rate of 10 USDC per $SOL.
-- The keeper will monitor the price on-chain using Jupiter [Price API](/docs/apis/price-api).
+- The keeper will monitor the price on-chain using Jupiter [Price API](/docs/old/apis/price-api).
- If the keeper detects that the on-chain price of $SOL reaches 10 USDC, it will proceed to execute and fulfill the order.
- If the order size is too large, and there is insufficient liquidity on-chain, the keeper will attempt to execute the order in smaller chunks. It will aim for partial fulfillment to ensure the best price with minimal price impact, continuing until the order is fully filled.
- The executed order, whether fully or partially fulfilled, will be automatically transferred to your wallet.
diff --git a/guides/8-perpetual-exchange/5-faq.md b/guides/8-perpetual-exchange/5-faq.md
index 9231e969..e1760886 100644
--- a/guides/8-perpetual-exchange/5-faq.md
+++ b/guides/8-perpetual-exchange/5-faq.md
@@ -122,7 +122,7 @@ For example, if a trader deposits $100 USD worth of SOL to open a position, thei
### 8. Why do long and short positions use different collateral tokens?
-Traders can deposit any [SPL token supported by Jupiter Swap](https://station.jup.ag/docs/token-list) as the initial margin to open a position or to deposit collateral for an existing open position.
+Traders can deposit any [SPL token supported by Jupiter Swap](https://station.jup.ag/docs/old/token-list) as the initial margin to open a position or to deposit collateral for an existing open position.
The deposited tokens will then be converted to the collateral tokens for the position (SOL / wETH / wBTC for long positions, USDC / USDT stablecoin for short positions).
diff --git a/openapi/api.yaml b/openapi/api.yaml
new file mode 100644
index 00000000..50896f53
--- /dev/null
+++ b/openapi/api.yaml
@@ -0,0 +1,803 @@
+openapi: '3.0.2'
+info:
+ title: Jupiter API
+ version: 1.0.0
+ description: |
+ The heart and soul of Jupiter lies in the Quote and Swap API.
+ - Refer to this API Reference documentation to learn about the parameters, types and descriptions.
+ - The API Reference also includes other products and tools built on top or for Swap, such as Limit Order, DCA, Price, Tokens, etc.
+
+ ### API Rate Limit
+ Since 1 December 2024, we have updated our API structure. Please refer to [API Usage](/docs/) for further details on usage and rate limits.
+
+ ### API Usage
+ - API Wrapper Typescript [@jup-ag/api](https://github.com/jup-ag/jupiter-quote-api-node)
+
+ ### Data Types To Note
+ - Public keys are base58 encoded strings
+ - Raw data such as Vec are base64 encoded strings
+
+servers:
+ - url: https://api.jup.ag/
+
+tags:
+ - name: Swap
+ description: Endpoints related to Quote and Swap API
+ - name: Token
+ description: Endpoints related to Tokens
+ - name: Price
+ description: Endpoints related to Price
+paths:
+ /quote/v1:
+ get:
+ tags:
+ - Swap
+ summary: quote
+ description: Retrieve a quote to be used in `POST /swap`.
+ parameters:
+ - $ref: '#/components/parameters/InputMintParameter'
+ - $ref: '#/components/parameters/OutputMintParameter'
+ - $ref: '#/components/parameters/AmountParameter'
+ - $ref: '#/components/parameters/SlippageParameter'
+ - $ref: '#/components/parameters/SwapModeParameter'
+ - $ref: '#/components/parameters/DexesParameter'
+ - $ref: '#/components/parameters/ExcludeDexesParameter'
+ - $ref: '#/components/parameters/RestrictIntermediateTokensParameter'
+ - $ref: '#/components/parameters/OnlyDirectRoutesParameter'
+ - $ref: '#/components/parameters/AsLegacyTransactionParameter'
+ - $ref: '#/components/parameters/PlatformFeeBpsParameter'
+ - $ref: '#/components/parameters/MaxAccountsParameter'
+ responses:
+ '200':
+ description: "Successful response\n- To be used in /swap"
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/QuoteResponse'
+ /swap/v1:
+ post:
+ tags:
+ - Swap
+ summary: swap
+ description: Returns a transaction that you can use from the quote you get from `/quote`.
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SwapRequest'
+ responses:
+ '200':
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SwapResponse'
+ /swap-instructions/v1:
+ post:
+ tags:
+ - Swap
+ summary: swap-instructions
+ description: Returns instructions that you can use from the quote you get from `/quote`.
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SwapRequest'
+ responses:
+ '200':
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SwapInstructionsResponse'
+ /program-id-to-label:
+ get:
+ tags:
+ - Swap
+ summary: program-id-to-label
+ description: Returns a hash, which key is the program id and value is the label. This is used to help map error from transaction by identifying the fault program id. With that, we can use the `excludeDexes` or `dexes` parameter.
+ responses:
+ '200':
+ description: Default response
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ /tokens/v1/token/{mint_address}:
+ get:
+ tags:
+ - Token
+ summary: token information
+ description: Returns the specified mint addresse's token information and metadata
+ parameters:
+ - name: address
+ in: path
+ description: The token's mint address
+ required: true
+ schema:
+ type: string
+ example: So11111111111111111111111111111111111111112
+ responses:
+ '200':
+ description: More information about a particular token
+ content:
+ application/json:
+ schema:
+ "$ref": "#/components/schemas/MintIncludingDuplicates"
+ /tokens/v1/market/{mareket_address}/mints:
+ get:
+ tags:
+ - Token
+ summary: mints in market
+ description: Returns the mints involved in a market
+ parameters:
+ - name: address
+ in: path
+ description: Market address
+ required: true
+ schema:
+ type: string
+ example: RhSZfkW5SwYxyFdrktQ9hV4ScR7by3rcTk1a5drFpZy
+ responses:
+ '200':
+ description: Returns the mints involved in a market
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ "$ref": "#/components/schemas/Mint"
+ /tokens/v1/mints/tradable:
+ get:
+ tags:
+ - Token
+ summary: tradable
+ description: Returns a list of all mints tradable via Jupiter routing
+ responses:
+ '200':
+ description: List of mints which are tradable
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ type: string
+ /tokens/v1/tagged/{tag}:
+ get:
+ tags:
+ - Token
+ summary: tagged
+ description: Returns a list of mints with specified tag(s) along with their metadata
+ parameters:
+ - name: tag_list
+ in: path
+ description: A list of one or more tags, comma separated. The list is the
+ union of tokens with these tags.
+ required: true
+ schema:
+ type: string
+ example: strict,lst
+ responses:
+ '200':
+ description: The list of tokens with the tags given
+ content:
+ application/json:
+ schema:
+ "$ref": "#/components/schemas/MintIncludingDuplicates"
+ /tokens/v1/new:
+ get:
+ tags:
+ - Token
+ summary: new
+ description: Returns new tokens with metadata, created at timestamp and markets
+ parameters:
+ - name: limit
+ in: query
+ description: how many records to output in the JSON
+ required: false
+ schema:
+ type:
+ - integer
+ - 'null'
+ format: int64
+ example: '10'
+ - name: offset
+ in: query
+ description: |-
+ the offset into the result set. Used in conjunction with
+ `limit` to page through the data. Defaults to 0
+ required: false
+ schema:
+ type:
+ - integer
+ - 'null'
+ format: int64
+ example: '20'
+ responses:
+ '200':
+ description: List of new tokens which are tradable with SOL
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ "$ref": "#/components/schemas/MintWithCreationTimeAndMarkets"
+ /tokens/v1/all:
+ get:
+ tags:
+ - Token
+ summary: all
+ description: Returns all tokens with all metadata
+ responses:
+ '200':
+ description: List of tokens which are tradable
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ "$ref": "#/components/schemas/Mint"
+ /price/v2/ids:
+ get:
+ tags:
+ - Price
+ summary: price
+ description: Returns prices of specified tokens
+ parameters:
+ - name: ids
+ in: query
+ description: "- The token mint address(es) to get price(s) on\n- Comma separate to pass in multiple"
+ required: true
+ schema:
+ type:
+ - string
+ example: 'So11111111111111111111111111111111111111112'
+ - name: vsToken
+ in: query
+ description: "- A token mint address to compare the prices against\n- By default, prices are denominated by USD\n- If parameter is used with SOL mint address, denominates in the price in SOL"
+ required: false
+ schema:
+ type:
+ - string
+ - name: showExtraInfo
+ in: query
+ description: "- Get more details such as\n - Unix timestamp\n - Buy price for Jupiter last swap and quote\n - Sell price for Jupiter last swap and quote\n - Confidence and depth information\n- Cannot use `vsToken` with this parameter"
+ required: false
+ schema:
+ type:
+ - string
+
+components:
+ schemas:
+ Instruction:
+ type: object
+ properties:
+ programId:
+ type: string
+ accounts:
+ type: array
+ items:
+ $ref: '#/components/schemas/AccountMeta'
+ data:
+ type: string
+ required:
+ - programId
+ - accounts
+ - data
+
+ AccountMeta:
+ type: object
+ properties:
+ pubkey:
+ type: string
+ isSigner:
+ type: boolean
+ isWritable:
+ type: boolean
+ required:
+ - pubkey
+ - isSigner
+ - isWritable
+
+ QuoteResponse:
+ type: object
+ required:
+ - inputMint
+ - outputMint
+ - inAmount
+ - outAmount
+ - otherAmountThreshold
+ - swapMode
+ - slippageBps
+ - priceImpactPct
+ - routePlan
+ properties:
+ inputMint:
+ type: string
+ inAmount:
+ type: string
+ outputMint:
+ type: string
+ outAmount:
+ type: string
+ description: "- Calculated output amount from routing algorithm\n- Exlcuding network fees, slippage or platform fees"
+ otherAmountThreshold:
+ type: string
+ description: "- Calculated minimum output amount after accounting for `slippageBps` and `platformFeeBps`\n- Not used by build transaction"
+ swapMode:
+ $ref: '#/components/schemas/SwapMode'
+ required: true
+ slippageBps:
+ type: integer
+ format: int32
+ platformFee:
+ $ref: '#/components/schemas/PlatformFee'
+ priceImpactPct:
+ type: string
+ routePlan:
+ type: array
+ items:
+ $ref: '#/components/schemas/RoutePlanStep'
+ contextSlot:
+ type: number
+ timeTaken:
+ type: number
+ description: Time taken to determine quote
+
+ SwapMode:
+ type: string
+ enum:
+ - ExactIn
+ - ExactOut
+
+ PlatformFee:
+ type: object
+ properties:
+ amount:
+ type: string
+ feeBps:
+ type: integer
+ format: int32
+
+ RoutePlanStep:
+ type: object
+ properties:
+ swapInfo:
+ $ref: '#/components/schemas/SwapInfo'
+ percent:
+ type: integer
+ format: int32
+ required:
+ - swapInfo
+ - percent
+
+ SwapInfo:
+ type: object
+ required:
+ - ammKey
+ - inputMint
+ - outputMint
+ - inAmount
+ - outAmount
+ - feeAmount
+ - feeMint
+ properties:
+ ammKey:
+ type: string
+ label:
+ type: string
+ inputMint:
+ type: string
+ outputMint:
+ type: string
+ inAmount:
+ type: string
+ outAmount:
+ type: string
+ feeAmount:
+ type: string
+ feeMint:
+ type: string
+
+ SwapRequest:
+ type: object
+ required:
+ - userPublicKey
+ - quoteResponse
+ properties:
+ userPublicKey:
+ description: The user public key
+ type: string
+ wrapAndUnwrapSol:
+ description: "Default: true\n- To automatically wrap/unwrap SOL in the transaction\nIf false, it will use wSOL token account\n- Parameter be ignored if `destinationTokenAccount` is set because the `destinationTokenAccount` may belong to a different user that we have no authority to close."
+ type: boolean
+ default: true
+ useSharedAccounts:
+ description: "Default: true\n- This enables the usage of shared program accounts\n- If true, no intermediate token accounts or open orders accounts need to be created for user\n- If you are using `destinationTokenAccount`, you must set this to `true`. If this is not set, this will be set to `false` in the case that the route plan is just through one simple AMM that isn't Openbook or Serum. Otherwise, it will be set to `true`"
+ type: boolean
+ default: true
+ feeAccount:
+ description: "- The referral account's token account of specific mints depending on `SwapMode` to collect fees\n- See [Add Fees](/docs/swap-api/add-fees-to-swap) guide for more details"
+ type: string
+ trackingAccount:
+ description: "- Specify any public key that belongs to you to track the transactions\n- Useful for integrators to get all the swap transactions from this public key\n- Query the data using a block explorer like Solscan/SolanaFM or query like Dune/Flipside."
+ type: string
+ prioritizationFeeLamports:
+ description: "- To specify a level or amount of additional fees to prioritize the transaction\n- It can be used for both priority fee and jito tip"
+ type: integer
+ properties:
+ priorityLevelWithMaxLamports:
+ properties:
+ prorityLevel:
+ description: Either `medium`, `high` or `veryHigh`
+ type: string
+ maxLamports:
+ description: Maximum lamports to cap the priority fee estimation, to prevent overpaying
+ jitoTipLamports:
+ properties:
+ jitoTipLamports:
+ description: "- Exact amount of tip to use in a tip instruction\n- Estimate how much to set using Jito tip endpoint, [see their docs](https://docs.jito.wtf/)"
+ type: integer
+
+ asLegacyTransaction:
+ description: "Default: false\n- Request a legacy transaction rather than the default versioned transaction\n- Used together with `asLegacyTransaction` in /quote, otherwise the transaction might be too large"
+ type: boolean
+ default: false
+ useTokenLedger:
+ description: "Default: false\n- This is useful when the instruction before the swap has a transfer that increases the input token amount\n- Then, the swap will use the difference between the token ledger token amount and post token amount"
+ type: boolean
+ default: false
+ destinationTokenAccount:
+ description: "- Public key of a token account that will be used to receive the token out of the swap\n- If not provided, the signer's ATA will be used\n- If provided, we assume that the token account is already initialized"
+ type: string
+ dynamicComputeUnitLimit:
+ description: "Default: false\n- When enabled, it will do a swap simulation to get the compute unit used and set it in ComputeBudget's compute unit limit\n- This will increase latency slightly since there will be one extra RPC call to simulate this\n- This can be useful to estimate compute unit correctly and reduce priority fees needed or have higher chance to be included in a block"
+ type: boolean
+ skipUserAccountsRpcCalls:
+ description: "Default: false\n- When enabled, it will not do any additional RPC calls to check on user's accounts\n- Enable it only when you already setup all the accounts needed for the trasaction, like wrapping or unwrapping sol, or destination account is already created"
+ type: boolean
+ dynamicSlippage:
+ description: "Default: false\n- When enabled, it will use a set of categories and math to calculate a dynamic slippage threshold to use\n- See [dynamic slippage notes](/docs/swap-api/send-swap-transaction#how-jupiter-estimates-slippage)"
+ type: boolean
+ computeUnitPriceMicroLamports:
+ description: "- To specify a compute unit price to calculate priority fee\n- `computeUnitLimit (1400000) * computeUnitPriceMicroLamports`\n- If `auto` is used, Jupiter will automatically set a priority fee and it will be capped at 5,000,000 lamports / 0.005 SOL\n- We recommend using `prioritizationFeeLamports` and `dynamicComputeUnitLimit` instead of passing in a compute unit price"
+ type: integer
+ quoteResponse:
+ $ref: '#/components/schemas/QuoteResponse'
+
+ SwapResponse:
+ type: object
+ properties:
+ swapTransaction:
+ type: string
+ lastValidBlockHeight:
+ type: number
+ prioritizationFeeLamports:
+ type: number
+ dynamicSlippageReport:
+ type: object
+ properties:
+ slippageBps:
+ type: integer
+ format: int32
+ otherAmount:
+ type: integer
+ format: int32
+ simulatedIncurredSlippageBps:
+ type: integer
+ format: int32
+ amplificationRatio:
+ type: string
+
+ required:
+ - swapTransaction
+ - lastValidBlockHeight
+
+ SwapInstructionsResponse:
+ type: object
+ properties:
+ tokenLedgerInstruction:
+ description: If you are using `useTokenLedger = true`.
+ $ref: '#/components/schemas/Instruction'
+ otherInstructions:
+ description: "If you set `{\"prioritizationFeeLamports\": {\"jitoTipLamports\": 5000}}`, you will see a custom tip instruction to Jito here."
+ $ref: '#/components/schemas/Instruction'
+ computeBudgetInstructions:
+ description: The necessary instructions to setup the compute budget.
+ type: array
+ items:
+ $ref: '#/components/schemas/Instruction'
+ setupInstructions:
+ description: Setup missing ATA for the users.
+ type: array
+ items:
+ $ref: '#/components/schemas/Instruction'
+ swapInstruction:
+ description: The actual swap instruction.
+ $ref: '#/components/schemas/Instruction'
+ cleanupInstruction:
+ description: Unwrap the SOL if `wrapAndUnwrapSol = true`.
+ $ref: '#/components/schemas/Instruction'
+ addressLookupTableAddresses:
+ description: The lookup table addresses that you can use if you are using versioned transaction.
+ type: array
+ items:
+ type: string
+ required:
+ - computeBudgetInstructions
+ - otherInstructions
+ - setupInstructions
+ - swapInstruction
+ - addressLookupTableAddresses
+
+ IndexedRouteMapResponse:
+ type: object
+ required:
+ - mintKeys
+ - indexedRouteMap
+ properties:
+ mintKeys:
+ type: array
+ items:
+ type: string
+ description: All the mints that are indexed to match in indexedRouteMap
+ indexedRouteMap:
+ type: object
+ description: All the possible route and their corresponding output mints
+ additionalProperties:
+ type: array
+ items:
+ type: number
+ example:
+ '1':
+ - 2
+ - 3
+ - 4
+ '2':
+ - 1
+ - 3
+ - 4
+ Mint:
+ type: object
+ required:
+ - address
+ - name
+ - symbol
+ - decimals
+ - tags
+ - created_at
+ - extensions
+ properties:
+ address:
+ type: string
+ created_at:
+ type: string
+ format: date-time
+ daily_volume:
+ type:
+ - number
+ - 'null'
+ format: double
+ decimals:
+ type: integer
+ format: int32
+ extensions: {}
+ freeze_authority:
+ type:
+ - string
+ - 'null'
+ logoURI:
+ type:
+ - string
+ - 'null'
+ mint_authority:
+ type:
+ - string
+ - 'null'
+ minted_at:
+ type:
+ - string
+ - 'null'
+ format: date-time
+ name:
+ type: string
+ permanent_delegate:
+ type:
+ - string
+ - 'null'
+ symbol:
+ type: string
+ tags:
+ type: array
+ items:
+ type:
+ - string
+ - 'null'
+ MintIncludingDuplicates:
+ type: object
+ required:
+ - address
+ - name
+ - symbol
+ - decimals
+ - tags
+ - created_at
+ - extensions
+ properties:
+ address:
+ type: string
+ created_at:
+ type: string
+ format: date-time
+ daily_volume:
+ type:
+ - number
+ - 'null'
+ format: double
+ decimals:
+ type: integer
+ format: int32
+ extensions: {}
+ freeze_authority:
+ type:
+ - string
+ - 'null'
+ logoURI:
+ type:
+ - string
+ - 'null'
+ mint_authority:
+ type:
+ - string
+ - 'null'
+ minted_at:
+ type:
+ - string
+ - 'null'
+ format: date-time
+ name:
+ type: string
+ permanent_delegate:
+ type:
+ - string
+ - 'null'
+ symbol:
+ type: string
+ tags:
+ type: array
+ items:
+ type:
+ - string
+ - 'null'
+ MintWithCreationTimeAndMarkets:
+ type: object
+ required:
+ - mint
+ - created_at
+ - metadata_updated_at
+ - name
+ - symbol
+ - decimals
+ - known_markets
+ properties:
+ created_at:
+ type: string
+ format: date-time
+ decimals:
+ type: integer
+ format: int32
+ freeze_authority:
+ type:
+ - string
+ - 'null'
+ known_markets:
+ type: array
+ items:
+ type: string
+ logo_uri:
+ type:
+ - string
+ - 'null'
+ metadata_updated_at:
+ type: string
+ format: date-time
+ mint:
+ type: string
+ mint_authority:
+ type:
+ - string
+ - 'null'
+ name:
+ type: string
+ symbol:
+ type: string
+
+
+ parameters:
+ InputMintParameter:
+ name: inputMint
+ description: Input token mint address
+ in: query
+ required: true
+ schema:
+ type: string
+ OutputMintParameter:
+ name: outputMint
+ description: Output token mint address
+ in: query
+ required: true
+ schema:
+ type: string
+ AmountParameter:
+ name: amount
+ description: "Atomic value to swap (Before applying decimals)\n- Input Amount if `SwapMode=ExactIn`\n- Output Amount if `SwapMode=ExactOut`"
+ in: query
+ required: true
+ schema:
+ type: integer
+ SlippageParameter:
+ name: slippageBps
+ description: "Default: 50\n- This is threshold denoted in basis points.\n- If the output amount exceeds the threshold, then the swap transaction will fail."
+ in: query
+ schema:
+ type: integer
+ default: 50
+ SwapModeParameter:
+ name: swapMode
+ description: "Default: ExactIn\n- ExactOut is for supporting use cases where you need an exact output amount, like [payments](../swap-api/payments-through-swap)\n- In this case the slippage is on the input token."
+ in: query
+ schema:
+ type: string
+ enum:
+ - ExactIn
+ - ExactOut
+ DexesParameter:
+ name: dexes
+ description: "Default: Include ALL DEXes\n- If a DEX is indicated, the route will **only use** that DEX\n- Multiple DEXes can be pass in by comma separating them\n- [Full list of DEXes here](https://api.jup.ag/swap/v1/program-id-to-label)"
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ ExcludeDexesParameter:
+ name: excludeDexes
+ description: "Default: Exclude NONE of the DEXes\n- If a DEX is indicated, the route will **not use** that DEX\n- Multiple DEXes can be pass in by comma separating them\n- [Full list of DEXes here](https://api.jup.ag/swap/v1/program-id-to-label)"
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ RestrictIntermediateTokensParameter:
+ name: restrictIntermediateTokens
+ description: "- Restrict intermediate tokens within a route to a set of more stable tokens\n- This will help to reduce exposure to potential high slippage routes"
+ in: query
+ schema:
+ type: boolean
+ OnlyDirectRoutesParameter:
+ name: onlyDirectRoutes
+ description: "Default: false\n- Limits the routeDirect Routes limits Jupiter routing to single hop routes only"
+ in: query
+ schema:
+ type: boolean
+ AsLegacyTransactionParameter:
+ name: asLegacyTransaction
+ description: "Default: false\n- Instead of using versioned transaction, this will use the legacy transaction"
+ in: query
+ schema:
+ type: boolean
+ MaxAccountsParameter:
+ name: maxAccounts
+ description: "- Rough estimate of the max accounts to be used for the quote\n- Useful if composing with your own accounts or to be more precise in resource accounting resulting in better routes\n- Jupiter Frontend uses a maxAccounts of 64"
+ in: query
+ schema:
+ type: integer
+ PlatformFeeBpsParameter:
+ name: platformFeeBps
+ description: "- Take fees in basis points from signer\n- Used together with `feeAccount` in /swap, see [Adding Fees](/docs/swap-api/add-fees-to-swap) guide"
+ in: query
+ schema:
+ type: integer
\ No newline at end of file
diff --git a/openapi/quoteV6.yaml b/openapi/quoteV6.yaml
deleted file mode 100644
index 5ab220f6..00000000
--- a/openapi/quoteV6.yaml
+++ /dev/null
@@ -1,495 +0,0 @@
-openapi: '3.0.2'
-info:
- title: Jupiter API v6
- version: 6.0.0
- description: |
- The core of [jup.ag](https://jup.ag). Easily get a quote and swap through Jupiter API.
-
- ### Rate Limit
- We update our rate limit from time to time depending on the load of our servers. We recommend running your own instance of the API if you want to have high rate limit, here to learn how to run the [self-hosted API](https://station.jup.ag/docs/apis/self-hosted).
-
- ### API Wrapper
- - Typescript [@jup-ag/api](https://github.com/jup-ag/jupiter-quote-api-node)
-
- ### Data types
- - Public keys are base58 encoded strings
- - raw data such as Vec are base64 encoded strings
-
-servers:
- - url: https://quote-api.jup.ag/v6
-
-paths:
- /quote:
- get:
- summary: GET /quote
- description: Sends a GET request to the Jupiter API to get the best priced quote.
- parameters:
- - $ref: '#/components/parameters/InputMintParameter'
- - $ref: '#/components/parameters/OutputMintParameter'
- - $ref: '#/components/parameters/AmountParameter'
- - $ref: '#/components/parameters/SlippageParameter'
- - $ref: '#/components/parameters/SwapModeParameter'
- - $ref: '#/components/parameters/DexesParameter'
- - $ref: '#/components/parameters/ExcludeDexesParameter'
- - $ref: '#/components/parameters/RestrictIntermediateTokensParameter'
- - $ref: '#/components/parameters/OnlyDirectRoutesParameter'
- - $ref: '#/components/parameters/AsLegacyTransactionParameter'
- - $ref: '#/components/parameters/PlatformFeeBpsParameter'
- - $ref: '#/components/parameters/MaxAccountsParameter'
- - $ref: '#/components/parameters/AutoSlippageParameter'
- - $ref: '#/components/parameters/MaxAutoSlippageParameter'
- - $ref: '#/components/parameters/AutoSlippageCollisionUsdValueParameter'
- responses:
- '200':
- description: Successful response
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/QuoteResponse'
- /swap:
- post:
- summary: POST /swap
- description: Returns a transaction that you can use from the quote you get from `/quote`.
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SwapRequest'
- responses:
- '200':
- description: Successful response
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SwapResponse'
- /swap-instructions:
- post:
- summary: POST /swap-instructions
- description: Returns instructions that you can use from the quote you get from `/quote`.
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SwapRequest'
- responses:
- '200':
- description: Successful response
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SwapInstructionsResponse'
- /program-id-to-label:
- get:
- summary: GET /program-id-to-label
- description: Returns a hash, which key is the program id and value is the label. This is used to help map error from transaction by identifying the fault program id. With that, we can use the `excludeDexes` or `dexes` parameter.
- responses:
- '200':
- description: Default response
- content:
- application/json:
- schema:
- type: object
- additionalProperties:
- type: string
- /tokens:
- get:
- summary: GET /tokens
- description: Returns a list of all the tradable mints
- responses:
- '200':
- description: Default response
- content:
- application/json:
- schema:
- type: array
- items:
- type: string
- example:
- - 'So11111111111111111111111111111111111111112'
- - 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
- - 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB'
-
-components:
- schemas:
- Instruction:
- type: object
- properties:
- programId:
- type: string
- accounts:
- type: array
- items:
- $ref: '#/components/schemas/AccountMeta'
- data:
- type: string
- required:
- - programId
- - accounts
- - data
-
- AccountMeta:
- type: object
- properties:
- pubkey:
- type: string
- isSigner:
- type: boolean
- isWritable:
- type: boolean
- required:
- - pubkey
- - isSigner
- - isWritable
-
- QuoteResponse:
- type: object
- required:
- - inputMint
- - outputMint
- - inAmount
- - outAmount
- - otherAmountThreshold
- - swapMode
- - slippageBps
- - priceImpactPct
- - routePlan
- properties:
- inputMint:
- type: string
- inAmount:
- type: string
- outputMint:
- type: string
- outAmount:
- type: string
- otherAmountThreshold:
- type: string
- swapMode:
- $ref: '#/components/schemas/SwapMode'
- required: true
- slippageBps:
- type: integer
- format: int32
- platformFee:
- $ref: '#/components/schemas/PlatformFee'
- priceImpactPct:
- type: string
- routePlan:
- type: array
- items:
- $ref: '#/components/schemas/RoutePlanStep'
- contextSlot:
- type: number
- timeTaken:
- type: number
-
- SwapMode:
- type: string
- enum:
- - ExactIn
- - ExactOut
-
- PlatformFee:
- type: object
- properties:
- amount:
- type: string
- feeBps:
- type: integer
- format: int32
-
- RoutePlanStep:
- type: object
- properties:
- swapInfo:
- $ref: '#/components/schemas/SwapInfo'
- percent:
- type: integer
- format: int32
- required:
- - swapInfo
- - percent
-
- SwapInfo:
- type: object
- required:
- - ammKey
- - inputMint
- - outputMint
- - inAmount
- - outAmount
- - feeAmount
- - feeMint
- properties:
- ammKey:
- type: string
- label:
- type: string
- inputMint:
- type: string
- outputMint:
- type: string
- inAmount:
- type: string
- outAmount:
- type: string
- feeAmount:
- type: string
- feeMint:
- type: string
-
- SwapRequest:
- type: object
- required:
- - userPublicKey
- - quoteResponse
- properties:
- userPublicKey:
- description: The user public key.
- type: string
- wrapAndUnwrapSol:
- description: Default is true. If true, will automatically wrap/unwrap SOL. If false, it will use wSOL token account. Will be ignored if `destinationTokenAccount` is set because the `destinationTokenAccount` may belong to a different user that we have no authority to close.
- type: boolean
- default: true
- useSharedAccounts:
- description: This enables the usage of shared program accounts. That means no intermediate token accounts or open orders accounts need to be created for the users. If you are using `destinationTokenAccount`, you must set this to `true`. If this is not set, this will be set to `false` in the case that the route plan is just through one simple AMM that isn't Openbook or Serum. Otherwise, it will be set to `true`.
- type: boolean
- default: true
- feeAccount:
- description: Fee token account, it can be either the input mint or the output mint for ExactIn and only the input mint for ExactOut, it is derived using the seeds = ["referral_ata", referral_account, mint] and the `REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3` referral contract (only pass in if you set a feeBps and make sure that the feeAccount has been created). It doesn't support Token2022 tokens.
- type: string
- trackingAccount:
- description: Tracking account, this can be any public key that you can use to track the transactions, especially useful for integrator. Then, you can use the `https://stats.jup.ag/tracking-account/:public-key/YYYY-MM-DD/HH` endpoint to get all the swap transactions from this public key.
- type: string
- computeUnitPriceMicroLamports:
- description: The compute unit price to prioritize the transaction, the additional fee will be `computeUnitLimit (1400000) * computeUnitPriceMicroLamports`. If `auto` is used, Jupiter will automatically set a priority fee and it will be capped at 5,000,000 lamports / 0.005 SOL.
- type: integer
- prioritizationFeeLamports:
- description: "Prioritization fee lamports paid for the transaction in addition to the signatures fee. Mutually exclusive with compute_unit_price_micro_lamports. If `auto` is used, Jupiter will automatically set a priority fee and it will be capped at 5,000,000 lamports / 0.005 SOL. If `autoMultiplier` (`{\"autoMultiplier\"}: 3}`) is used, the priority fee will be a multplier on the `auto` fee. If `jitoTipLamports` (`{\"jitoTipLamports\": 5000}`) is used, a tip intruction will be included to Jito and no priority fee will be set. If `priorityLevelWithMaxLamports` (`{\"priorityLevelWithMaxLamports\": {\"priorityLevel\": \"high\", \"maxLamports\": 123423}}`) is used, it will suggest a priority fee based on `medium`, `high`, or `veryHigh` automatically with a cap set by `maxLamports`."
- type: integer
- asLegacyTransaction:
- description: Default is false. Request a legacy transaction rather than the default versioned transaction, needs to be paired with a quote using asLegacyTransaction otherwise the transaction might be too large.
- type: boolean
- default: false
- useTokenLedger:
- description: Default is false. This is useful when the instruction before the swap has a transfer that increases the input token amount. Then, the swap will just use the difference between the token ledger token amount and post token amount.
- type: boolean
- default: false
- destinationTokenAccount:
- description: Public key of the token account that will be used to receive the token out of the swap. If not provided, the user's ATA will be used. If provided, we assume that the token account is already initialized.
- type: string
- dynamicComputeUnitLimit:
- description: When enabled, it will do a swap simulation to get the compute unit used and set it in ComputeBudget's compute unit limit. This will increase latency slightly since there will be one extra RPC call to simulate this. Default is `false`.
- type: boolean
- skipUserAccountsRpcCalls:
- description: When enabled, it will not do any rpc calls check on user's accounts. Enable it only when you already setup all the accounts needed for the trasaction, like wrapping or unwrapping sol, destination account is already created.
- type: boolean
- dynamicSlippage:
- description: A dynamic slippage estimation based on a set of heuristics that accounts for the type of token traded and user's max slippage tolerance, providing an optimal value that safeguards the user while ensuring success rate.
- type: object
- properties:
- minBps:
- description: The user min slippage.
- type: integer
- format: int32
- maxBps:
- description: The user max slippage, note that jup.ag UI defaults to 300bps (3%).
- type: integer
- format: int32
- quoteResponse:
- $ref: '#/components/schemas/QuoteResponse'
-
- SwapResponse:
- type: object
- properties:
- swapTransaction:
- type: string
- lastValidBlockHeight:
- type: number
- prioritizationFeeLamports:
- type: number
- dynamicSlippageReport:
- type: object
- properties:
- slippageBps:
- type: integer
- format: int32
- otherAmount:
- type: integer
- format: int32
- simulatedIncurredSlippageBps:
- type: integer
- format: int32
- amplificationRatio:
- type: string
-
- required:
- - swapTransaction
- - lastValidBlockHeight
-
- SwapInstructionsResponse:
- type: object
- properties:
- tokenLedgerInstruction:
- description: If you are using `useTokenLedger = true`.
- $ref: '#/components/schemas/Instruction'
- otherInstructions:
- description: "If you set `{\"prioritizationFeeLamports\": {\"jitoTipLamports\": 5000}}`, you will see a custom tip instruction to Jito here."
- $ref: '#/components/schemas/Instruction'
- computeBudgetInstructions:
- description: The necessary instructions to setup the compute budget.
- type: array
- items:
- $ref: '#/components/schemas/Instruction'
- setupInstructions:
- description: Setup missing ATA for the users.
- type: array
- items:
- $ref: '#/components/schemas/Instruction'
- swapInstruction:
- description: The actual swap instruction.
- $ref: '#/components/schemas/Instruction'
- cleanupInstruction:
- description: Unwrap the SOL if `wrapAndUnwrapSol = true`.
- $ref: '#/components/schemas/Instruction'
- addressLookupTableAddresses:
- description: The lookup table addresses that you can use if you are using versioned transaction.
- type: array
- items:
- type: string
- required:
- - computeBudgetInstructions
- - otherInstructions
- - setupInstructions
- - swapInstruction
- - addressLookupTableAddresses
-
- IndexedRouteMapResponse:
- type: object
- required:
- - mintKeys
- - indexedRouteMap
- properties:
- mintKeys:
- type: array
- items:
- type: string
- description: All the mints that are indexed to match in indexedRouteMap
- indexedRouteMap:
- type: object
- description: All the possible route and their corresponding output mints
- additionalProperties:
- type: array
- items:
- type: number
- example:
- '1':
- - 2
- - 3
- - 4
- '2':
- - 1
- - 3
- - 4
-
- parameters:
- InputMintParameter:
- name: inputMint
- description: Input token mint address
- in: query
- required: true
- schema:
- type: string
- OutputMintParameter:
- name: outputMint
- description: Output token mint address
- in: query
- required: true
- schema:
- type: string
- AmountParameter:
- name: amount
- description: The amount to swap, have to factor in the token decimals.
- in: query
- required: true
- schema:
- type: integer
- SlippageParameter:
- name: slippageBps
- description: Default is 50 unless `autoSlippage` is set to `true`. The slippage % in BPS. If the output token amount exceeds the slippage then the swap transaction will fail.
- in: query
- schema:
- type: integer
- SwapModeParameter:
- name: swapMode
- description: (ExactIn or ExactOut) Defaults to ExactIn. ExactOut is for supporting use cases where you need an exact token amount, like payments. In this case the slippage is on the input token.
- in: query
- schema:
- type: string
- enum: ['ExactIn', 'ExactOut']
- DexesParameter:
- name: dexes
- description: Default is that all DEXes are included. You can pass in the DEXes that you want to include only and separate them by `,`. You can check out the full list [here](https://quote-api.jup.ag/v6/program-id-to-label).
- in: query
- schema:
- type: array
- items:
- type: string
- ExcludeDexesParameter:
- name: excludeDexes
- description: Default is that all DEXes are included. You can pass in the DEXes that you want to exclude and separate them by `,`. You can check out the full list [here](https://quote-api.jup.ag/v6/program-id-to-label).
- in: query
- schema:
- type: array
- items:
- type: string
- RestrictIntermediateTokensParameter:
- name: restrictIntermediateTokens
- description: Restrict intermediate tokens to a top token set that has stable liquidity. This will help to ease potential high slippage error rate when swapping with minimal impact on pricing.
- in: query
- schema:
- type: boolean
- OnlyDirectRoutesParameter:
- name: onlyDirectRoutes
- description: Default is false. Direct Routes limits Jupiter routing to single hop routes only.
- in: query
- schema:
- type: boolean
- AsLegacyTransactionParameter:
- name: asLegacyTransaction
- description: Default is false. Instead of using versioned transaction, this will use the legacy transaction.
- in: query
- schema:
- type: boolean
- MaxAccountsParameter:
- name: maxAccounts
- description: Rough estimate of the max accounts to be used for the quote, so that you can compose with your own accounts
- in: query
- schema:
- type: integer
- PlatformFeeBpsParameter:
- name: platformFeeBps
- description: If you want to charge the user a fee, you can specify the fee in BPS. Fee % is taken out of the output token.
- in: query
- schema:
- type: integer
- AutoSlippageParameter:
- name: autoSlippage
- description: Default is false. By setting this to `true`, our API will suggest smart slippage info that you can use. `computedAutoSlippage` is the computed result, and `slippageBps` is what we suggest you to use. Additionally, you should check out `maxAutoSlippageBps` and `autoSlippageCollisionUsdValue`.
- in: query
- schema:
- type: boolean
- MaxAutoSlippageParameter:
- name: maxAutoSlippageBps
- description: In conjunction with `autoSlippage=true`, the maximum `slippageBps` returned by the API will respect this value. It is recommended that you set something here.
- in: query
- schema:
- type: integer
- AutoSlippageCollisionUsdValueParameter:
- name: autoSlippageCollisionUsdValue
- description: If `autoSlippage` is set to `true`, our API will use a default `1000` USD value as way to calculate the slippage impact for the smart slippage. You can set a custom USD value using this parameter.
- in: query
- schema:
- type: integer
\ No newline at end of file
diff --git a/redirects.json b/redirects.json
new file mode 100644
index 00000000..5a93c914
--- /dev/null
+++ b/redirects.json
@@ -0,0 +1,121 @@
+[
+ {"to":"/docs/old/additional-topics/audits","from":"/docs/additional-topics/audits"},
+ {"to":"/docs/old/additional-topics/builder-tips","from":"/docs/additional-topics/builder-tips"},
+ {"to":"/docs/old/additional-topics/composing-with-versioned-transaction","from":"/docs/additional-topics/composing-with-versioned-transaction"},
+ {"to":"/docs/old/additional-topics/displaying-jup-stats","from":"/docs/additional-topics/displaying-jup-stats"},
+ {"to":"/docs/old/additional-topics/links-and-contract-addresses","from":"/docs/additional-topics/links-and-contract-addresses"},
+ {"to":"/docs/old/additional-topics/wallet-list","from":"/docs/additional-topics/wallet-list"},
+ {"to":"/docs/old/apis/adding-fees","from":"/docs/apis/adding-fees"},
+ {"to":"/docs/old/apis/c-sharp-example","from":"/docs/apis/c-sharp-example"},
+ {"to":"/docs/old/apis/cpi","from":"/docs/apis/cpi"},
+ {"to":"/docs/old/apis/flash-fill","from":"/docs/apis/flash-fill"},
+ {"to":"/docs/old/apis/landing-transactions","from":"/docs/apis/landing-transactions"},
+ {"to":"/docs/old/apis/payments-api","from":"/docs/apis/payments-api"},
+ {"to":"/docs/old/apis/price-api","from":"/docs/apis/price-api"},
+ {"to":"/docs/old/apis/price-api-v2","from":"/docs/apis/price-api-v2"},
+ {"to":"/docs/old/apis/self-hosted","from":"/docs/apis/self-hosted"},
+ {"to":"/docs/old/apis/swap-api","from":"/docs/apis/swap-api"},
+ {"to":"/docs/old/apis/troubleshooting","from":"/docs/apis/troubleshooting"},
+ {"to":"/docs/old/dca/dca-sdk","from":"/docs/dca/dca-sdk"},
+ {"to":"/docs/old/dca/integration","from":"/docs/dca/integration"},
+ {"to":"/docs/old/dca/lock-dca-campaign","from":"/docs/dca/lock-dca-campaign"},
+ {"to":"/docs/old/jupiter-terminal/jupiter-terminal","from":"/docs/jupiter-terminal/jupiter-terminal"},
+ {"to":"/docs/old/jupiter-terminal/terminal-integration-guide","from":"/docs/jupiter-terminal/terminal-integration-guide"},
+ {"to":"/docs/old/jupiter-terminal/unified-wallet-kit","from":"/docs/jupiter-terminal/unified-wallet-kit"},
+ {"to":"/docs/old/legacy/apis/adding-fees","from":"/docs/legacy/apis/adding-fees"},
+ {"to":"/docs/old/legacy/apis/payments-api","from":"/docs/legacy/apis/payments-api"},
+ {"to":"/docs/old/legacy/apis/swap-api","from":"/docs/legacy/apis/swap-api"},
+ {"to":"/docs/old/legal/privacy-policy","from":"/docs/legal/privacy-policy"},
+ {"to":"/docs/old/legal/sdk-api-license-agreement","from":"/docs/legal/sdk-api-license-agreement"},
+ {"to":"/docs/old/legal/terms-of-use","from":"/docs/legal/terms-of-use"},
+ {"to":"/docs/old/limit-order/limit-order","from":"/docs/limit-order/limit-order"},
+ {"to":"/docs/old/limit-order/limit-order-api","from":"/docs/limit-order/limit-order-api"},
+ {"to":"/docs/old/projects-and-dexes/integration-guidelines","from":"/docs/projects-and-dexes/integration-guidelines"},
+ {"to":"/docs/old/projects-and-dexes/rust-integration","from":"/docs/projects-and-dexes/rust-integration"},
+ {"to":"/docs/old/token-api-standard","from":"/docs/token-api-standard"},
+ {"to":"/docs/old/token-list/token-list-api","from":"/docs/token-list/token-list-api"},
+ {
+ "to": "/guides/swap/how-swap-works",
+ "from": "/guides/jupiter-swap/how-swap-works/metropolis-features"
+ },
+ {
+ "to": "/guides/swap/how-swap-works",
+ "from": "/guides/jupiter-swap/how-swap-works/how-swap-works"
+ },
+ {
+ "to": "/guides/swap/how-swap-works",
+ "from": "/guides/jupiter-swap/how-swap-works/metis-routing"
+ },
+ {
+ "to": "/guides/swap/how-swap-works",
+ "from": "/guides/jupiter-swap/swap"
+ },
+ {
+ "to": "/guides/swap/tutorials/earn-referral-fees",
+ "from": "/guides/jupiter-swap/how-referral-works"
+ },
+ {
+ "to": "/guides/swap/how-swap-works",
+ "from": "/guides/jupiter-swap/how-swap-works/metropolis"
+ },
+ {
+ "to": "/guides/perpetual-exchange/overview",
+ "from": "/labs/perpetual-exchange/overview"
+ },
+ {
+ "to": "/guides/perpetual-exchange/how-it-works",
+ "from": "/guides/perpetual-exchange/trading"
+ },
+ {
+ "to": "/guides/perpetual-exchange/overview",
+ "from": "/labs"
+ },
+ {
+ "to": "/guides/perpetual-exchange/how-it-works",
+ "from": "/labs/perpetual-exchange/trading"
+ },
+ {
+ "to": "/guides/jlp/JLP",
+ "from": "/labs/perpetual-exchange/jlp-pool"
+ },
+ {
+ "to": "/guides/jlp/How-JLP-Works",
+ "from": "/labs/perpetual-exchange/how-it-works"
+ },
+ {
+ "to": "/guides/jlp/How-JLP-Works",
+ "from": "/labs/faq/faq"
+ },
+ {
+ "to": "/guides/general/get-your-token-on-jupiter",
+ "from": "/docs/get-your-token-onto-jup"
+ },
+ {
+ "to": "/guides/general/get-your-token-on-jupiter",
+ "from": "/guides/general/new-token-guide"
+ },
+ {
+ "to": "/guides/jlp/How-JLP-Works",
+ "from": "/labs/perps-faq"
+ },
+ {
+ "to": "/blog-redirect",
+ "from": "/blog"
+ },
+ {
+ "to": "/guides/onboard",
+ "from": "/guides/bridge-comparator"
+ },
+ {
+ "to": "/guides/onboard",
+ "from": "/guides/bridge/comparator"
+ },
+ {
+ "to": "/guides/onboard/bridge",
+ "from": "/guides/bridge/bridging"
+ },
+ {
+ "to": "/guides/onboard/onramp",
+ "from": "/guides/bridge/onramp"
+ }
+]
\ No newline at end of file
diff --git a/sidebars-docs.js b/sidebars-docs.js
new file mode 100644
index 00000000..80b002c3
--- /dev/null
+++ b/sidebars-docs.js
@@ -0,0 +1,202 @@
+// @ts-check
+
+/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
+const sidebars = {
+ docs: [
+ {
+ type: 'doc',
+ id: 'index',
+ },
+ {
+ type: 'doc',
+ id: 'api-setup',
+ },
+ {
+ type: 'html',
+ value: '',
+ },
+ {
+ type: 'doc',
+ id: 'get-started',
+ },
+ {
+ type: 'doc',
+ id: 'development-basics',
+ },
+ {
+ type: 'html',
+ value: '',
+ },
+ ],
+ swap: [
+ {
+ type: 'category',
+ label: 'Swap API',
+ collapsible: false,
+ collapsed: false,
+ items: [
+ {
+ type: 'doc',
+ id: 'swap-api/get-quote',
+ },
+ {
+ type: 'doc',
+ id: 'swap-api/build-swap-transaction',
+ },
+ {
+ type: 'doc',
+ id: 'swap-api/send-swap-transaction',
+ },
+ ],
+ },
+ {
+ type: 'html',
+ value: '',
+ },
+ {
+ type: 'category',
+ label: 'Swap API Guides',
+ collapsible: false,
+ collapsed: false,
+ items: [
+ {
+ type: 'doc',
+ id: 'swap-api/add-fees-to-swap',
+ },
+ {
+ type: 'doc',
+ id: 'swap-api/payments-through-swap',
+ },
+ {
+ type: 'doc',
+ id: 'swap-api/solana-unity-sdk',
+ },
+ {
+ type: 'doc',
+ id: 'tool-kits/swap-terminal',
+ label: 'Integrate Swap Terminal',
+ },
+ ],
+ },
+ {
+ type: 'html',
+ value: '',
+ },
+ {
+ type: 'category',
+ label: 'Spot Products',
+ collapsible: false,
+ collapsed: false,
+ items: [
+ {
+ type: 'doc',
+ id: 'swap-api/limit-order-api',
+ },
+ {
+ type: 'doc',
+ id: 'swap-api/dca-sdk',
+ },
+ ],
+ },
+ {
+ type: 'html',
+ value: '',
+ },
+ ],
+ perp: [
+ {
+ type: 'category',
+ label: 'Perp API',
+ collapsible: false,
+ collapsed: false,
+ items: [
+ {
+ type: 'doc',
+ id: 'perp-api/perp-api',
+ },
+ ],
+ },
+ {
+ type: 'html',
+ value: '',
+ },
+ {
+ type: 'category',
+ label: 'Perp Program',
+ collapsible: false,
+ collapsed: false,
+ items: [
+ {
+ type: 'doc',
+ id: 'perp-api/position-account',
+ },
+ {
+ type: 'doc',
+ id: 'perp-api/position-request-account',
+ },
+ {
+ type: 'doc',
+ id: 'perp-api/pool-account',
+ },
+ {
+ type: 'doc',
+ id: 'perp-api/custody-account',
+ },
+ ],
+ },
+ {
+ type: 'html',
+ value: '',
+ },
+ ],
+ toolkit: [
+ {
+ type: 'category',
+ label: 'Jupiter Tool Kits',
+ collapsible: false,
+ collapsed: false,
+ items: [
+ {
+ type: 'doc',
+ id: 'tool-kits/swap-terminal',
+ },
+ {
+ type: 'doc',
+ id: 'tool-kits/terminal-walkthrough',
+ },
+ {
+ type: 'doc',
+ id: 'tool-kits/unified-wallet-kit',
+ },
+ ],
+ },
+ {
+ type: 'html',
+ value: '',
+ },
+ ],
+ other: [
+ {
+ type: 'category',
+ label: 'Utility',
+ collapsible: false,
+ collapsed: false,
+ items: [
+ {
+ type: 'doc',
+ id: 'utility/price-api',
+ },
+ {
+ type: 'doc',
+ id: 'utility/token-api',
+ },
+ ],
+ },
+ {
+ type: 'html',
+ value: '',
+ },
+ ],
+};
+
+module.exports = sidebars;
diff --git a/sidebars.js b/sidebars.js
deleted file mode 100644
index ecbc8b5d..00000000
--- a/sidebars.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * Creating a sidebar enables you to:
- - create an ordered group of docs
- - render a sidebar for each doc of that group
- - provide next/previous navigation
-
- The sidebars can be generated from the filesystem, or explicitly defined here.
-
- Create as many sidebars as you want.
- */
-
-// @ts-check
-
-/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
-const sidebars = {
- // By default, Docusaurus generates a sidebar from the docs folder structure
- sidebar: [{ type: "autogenerated", dirName: "." }],
-};
-
-module.exports = sidebars;
diff --git a/src/components/DocsLanding.tsx b/src/components/DocsLanding.tsx
new file mode 100644
index 00000000..f33af03d
--- /dev/null
+++ b/src/components/DocsLanding.tsx
@@ -0,0 +1,199 @@
+import React, { useState } from 'react';
+
+interface ProductCardProps {
+ image: React.ReactNode;
+ title: string;
+ description: string;
+};
+
+const Subtitle = () => (
+
+ Learn how to integrate Jupiter in various methods and leverage the power of our products.
+
+ }
+ title="Swap Terminal"
+ description="Bring Swap Terminal interface directly into your app."
+ link="/docs/tool-kits/swap-terminal"
+ />
+
+
+ }
+ title="Limit Order API"
+ description="Integrate Jupiter Limit Order program built on top of Jupiter Swap."
+ link="/docs/swap-api/limit-order-api"
+ />
+
+
+ }
+ title="DCA SDK"
+ description="Integrate Dollar Cost Average program built on top of Jupiter Swap."
+ link="/docs/swap-api/dca-sdk"
+ />
+