Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user guides reset using versioning #555

Open
wants to merge 73 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
2636447
docs version to old
0xYankee-Raccoons Nov 21, 2024
841d413
update
0xYankee-Raccoons Nov 21, 2024
aff0b1c
fix docusaurus config
0xYankee-Raccoons Nov 21, 2024
11e2330
checkpoint: add get started docs
0xYankee-Raccoons Nov 22, 2024
dbcc4bb
checkpoint: add swap api folder and get quote doc
0xYankee-Raccoons Nov 22, 2024
0fc6f33
checkpoint: redo folder order and addd build/send swap transaction docs
0xYankee-Raccoons Nov 22, 2024
ac022df
fix: build swap tx tab item codeblock syntax
0xYankee-Raccoons Nov 24, 2024
a851f96
Merge branch 'main' into developer-version
0xYankee-Raccoons Nov 24, 2024
b310db3
Merge branch 'main' into developer-version
0xYankee-Raccoons Nov 24, 2024
b7868e8
checkpoint: add send swap transaction doc
0xYankee-Raccoons Nov 24, 2024
70e258a
checkpoint: apply custom docs sidebar (bug: applied on all sidebar li…
0xYankee-Raccoons Nov 25, 2024
fd6d117
checkpoint: add add fees to swap doc
0xYankee-Raccoons Nov 26, 2024
92375b7
checkpoint: add payments through swap doc
0xYankee-Raccoons Nov 26, 2024
31f740b
checkpoint: add solana unity sdk doc
0xYankee-Raccoons Nov 27, 2024
8b64a67
checkpoint: add limit order api
0xYankee-Raccoons Nov 27, 2024
10e0782
checkpoint: add price v2 api doc
0xYankee-Raccoons Nov 27, 2024
3c2db48
checkpoint: structure other tools section and add perp api teaser
0xYankee-Raccoons Nov 27, 2024
64f80fd
checkpoint: add terminal overview and walkthrough
0xYankee-Raccoons Nov 27, 2024
643d2bc
checkpoint: structure tool kits category and add wallet kit
0xYankee-Raccoons Nov 28, 2024
34a342c
checkpoint: custom navbar by url path
0xYankee-Raccoons Nov 28, 2024
fb036fb
fix tab titles
0xYankee-Raccoons Nov 28, 2024
5e2fe9a
checkpoint: rework docs mini landing page
0xYankee-Raccoons Nov 28, 2024
0817081
force light theme
0xYankee-Raccoons Nov 29, 2024
531bdef
checkpoint: navbar mobile sidebar
0xYankee-Raccoons Nov 30, 2024
d97ceb4
add links to terminal
0xYankee-Raccoons Nov 30, 2024
452428f
checkpoint: fix docslanding and add more items
0xYankee-Raccoons Nov 30, 2024
86b1232
rename other tools to more
0xYankee-Raccoons Dec 2, 2024
10c87d4
add more to price api and dev basics
0xYankee-Raccoons Dec 2, 2024
58f78e2
checkpoint: add api usage page
0xYankee-Raccoons Dec 2, 2024
e0df7fc
checkpoint: display api reference docs (not updated)
0xYankee-Raccoons Dec 4, 2024
8f23247
fix openapi/api.yaml
0xYankee-Raccoons Dec 4, 2024
c8ad81a
checkpoint: update api docs for quote, swap
0xYankee-Raccoons Dec 5, 2024
70bd669
checkpoint: add forceful redirects for /docs/old/** to /docs
0xYankee-Raccoons Dec 5, 2024
2e79301
remove duplicate redirect
0xYankee-Raccoons Dec 5, 2024
1da0074
checkpoint: fix broken redirects
0xYankee-Raccoons Dec 5, 2024
d43047b
add library versions
0xYankee-Raccoons Dec 5, 2024
2e09989
add api reference to quote and swap
0xYankee-Raccoons Dec 8, 2024
ba7daf8
add spot product to swap section and renamed more to utility
0xYankee-Raccoons Dec 8, 2024
1ddf5bb
checkpoint: add token api guide and api reference
0xYankee-Raccoons Dec 8, 2024
1734f5a
add date to api-usage doc
0xYankee-Raccoons Dec 8, 2024
14977fe
add limit and offset notes to token api doc
0xYankee-Raccoons Dec 8, 2024
997fb8c
correct token api info
0xYankee-Raccoons Dec 9, 2024
66b7b23
checkpoint: version guides to OLD
0xYankee-Raccoons Dec 9, 2024
c44986f
checkpoint: fix all broken links in old version and redirect
0xYankee-Raccoons Dec 9, 2024
68b2d65
checkpoint: navbar and sidebar structure
0xYankee-Raccoons Dec 9, 2024
5c0ef68
Merge branch 'main' into guides-version
0xYankee-Raccoons Dec 9, 2024
594200d
add skeleton content in spot/dca and nest spot products
0xYankee-Raccoons Dec 9, 2024
acd35bf
checkpoint: dynamically generate product section links during build time
0xYankee-Raccoons Dec 9, 2024
493a0d0
fix dynamic ordering
0xYankee-Raccoons Dec 9, 2024
76978c3
checkpoint: add /guides/old/ redirects
0xYankee-Raccoons Dec 10, 2024
b5d6b25
synx fix for sidebar linebreak
0xYankee-Raccoons Dec 12, 2024
19f9be8
checkpoint: add vish dca guides part 1
0xYankee-Raccoons Dec 16, 2024
1b2f872
checkpoint: add vish dca guides part 2
0xYankee-Raccoons Dec 16, 2024
db4e52c
update image
0xYankee-Raccoons Dec 16, 2024
0c995b0
add dca faq
0xYankee-Raccoons Dec 17, 2024
33ee8b4
fix navbar font size
0xYankee-Raccoons Dec 17, 2024
c81e3f7
update dca price strategy
0xYankee-Raccoons Dec 17, 2024
de34dcb
minor changes to dca sidebar layout
0xYankee-Raccoons Dec 17, 2024
55dab20
fix broken link
0xYankee-Raccoons Dec 17, 2024
0c6de2b
adjust css
0xYankee-Raccoons Dec 18, 2024
062168b
add small fixes and swap skeleton files
0xYankee-Raccoons Dec 18, 2024
9d1fa90
fix link
0xYankee-Raccoons Dec 26, 2024
bba9c60
checkpoint: add swap quickstart
0xYankee-Raccoons Dec 26, 2024
308fb8b
checkpoint: add swap how to's
0xYankee-Raccoons Dec 30, 2024
9939614
checkpoint: add jupiverse content
0xYankee-Raccoons Dec 30, 2024
1c3455d
fix link
0xYankee-Raccoons Dec 30, 2024
29bff15
fix typo
0xYankee-Raccoons Dec 30, 2024
5d67f89
checkpoint: add limit order content
0xYankee-Raccoons Jan 2, 2025
af159c8
checkpoint: add djj lo video and move img to static
0xYankee-Raccoons Jan 2, 2025
101a147
add stop loss caution to limit order
0xYankee-Raccoons Jan 3, 2025
547b875
add how swap works and faq
0xYankee-Raccoons Jan 10, 2025
4bf4043
fix link
0xYankee-Raccoons Jan 10, 2025
f4e6670
checkpoint: spot navbar dropdown and fixes
0xYankee-Raccoons Jan 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Moved/1-limit-order-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
5 changes: 1 addition & 4 deletions Moved/2-how-swap-works/2-how-swap-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ The Jupiter Swap is a decentralized exchange aggregator designed to provide the
Jupiter V3 introduced multiple improvements to the swap experience!

The Metropolis upgrade introduced Instant Routing, Dynamic Slippage, Smart Token Filtering, Ecosystem Token List and new Safety features.
[Dive into these new features in detail here! ->](/guides/2-jupiter-spot/2-jupiter-swap/2-how-swap-works/1-metropolis-features.md)

Metis, a routing protocol, was also introduced to improve route discovery, reducing slippage and scalability in V3.
[Dive into key features of the Metis routing protocol here! ->](/guides/2-jupiter-spot/2-jupiter-swap/2-how-swap-works/3-metis-routing.md)


### Token Ledger For Increased Swap Success Rates

Expand All @@ -46,7 +43,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
Expand Down
2 changes: 1 addition & 1 deletion Moved/blog-v1/2023-09-18-dca-out-of-beta/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)

Expand All @@ -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.

Expand All @@ -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.
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Moved/blog-v2/2023-09-18-dca-out-of-beta/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)

Expand All @@ -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.

Expand All @@ -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.
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Moved/legacy/2-how-does-jupiter-work.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
35 changes: 35 additions & 0 deletions docs/0-api-usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
sidebar_label: "API Usage"
description: "Know how to use Jupiter API to build world class apps."
title: "API Usage"
---

<head>
<title>API Usage</title>
<meta name="twitter:card" content="summary" />
</head>

In 1 December 2024, Jupiter have introduced new hostnames and the usage of our APIs through API keys to facilitate better developer support.

## What's New?

*Last updated: 1 December 2024*
- API will now be served through new hostnames.
- API will now be served through API keys.
- The new service willl comprise of 3 service types.

| Service Types | Description |
| --- | --- |
| Free with no API key | New rate limits, however, will gradually decrease. |
| Paid plan with API key | Fixed rate limits, self served through an API dashboard. |
| Custom with API key | Custom rate limitsk, mainly for partner usage. |

## 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.

## Help us help you

- If you need have increasing demand and growth in your app, please reach out to us.
- If you need higher rate limits than the free access, please fill up this form.
86 changes: 86 additions & 0 deletions docs/1-get-started.md
Original file line number Diff line number Diff line change
@@ -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"
---

<head>
<title>Get Started</title>
<meta name="twitter:card" content="summary" />
</head>

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!
Loading