Skip to content

Commit f93259c

Browse files
authored
Merge pull request #260 from 0xProject/solana-spec-sync
2 parents b929831 + 80b2f0c commit f93259c

6 files changed

Lines changed: 306 additions & 437 deletions

File tree

fern/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ ai-search:
1010
location:
1111
- docs
1212

13+
ai-examples:
14+
enabled: false
15+
1316
layout:
1417
searchbar-placement: header
1518
page-width: full

fern/docs/pages/api-reference-overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Endpoints for EVM-compatible chains (Ethereum, Arbitrum, Base, Polygon, and more
2222

2323
Endpoints for Solana (SVM):
2424

25-
- **[Swap Instructions](/api-reference/solana-swap-ap-is/solana-swap/solana-swap-swap-instructions)**: Generate swap instructions for Solana tokens, returning versioned transaction data ready to sign and submit.
25+
- **[Swap Instructions](/api-reference/solana-swap-ap-is/swap/instructions)**: Generate swap instructions for Solana tokens, returning versioned transaction data ready to sign and submit.
2626

2727
## Cross-Chain API
2828

fern/docs/pages/introduction/faq.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ https://api.0x.org/gasless/quote # Request a firm quote
595595

596596
**For an integrator fee address:** No. You should assume the fee recipient ATA must already exist. If it may not exist, add a `createAssociatedTokenAccountIdempotent` instruction for the fee recipient + fee token mint yourself, **before** the swap/fee transfer path. See the [Integrator Byte Costs](/svm/solana-swap-api/guides/integrator-byte-costs) guide for how to account for the extra bytes this adds.
597597

598-
The relevant field is [`swap_fee_recipient`](/api-reference/solana-swap-ap-is/solana-swap/solana-swap-swap-instructions#swap_fee_recipient) — it accepts either a wallet address (for native SOL output) or a valid token account address (for token outputs).
598+
The relevant field is [`swap_fee_recipient`](/api-reference/solana-swap-ap-is/swap/instructions#swap_fee_recipient) — it accepts either a wallet address (for native SOL output) or a valid token account address (for token outputs).
599599

600600
</Accordion>
601601
</AccordionGroup>

fern/docs/pages/solana-swap-api/guides/get-started.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Whether you're building a Solana-native experience or expanding an EVM-first pro
1616

1717
## Steps to Swap Token
1818

19-
This guide will walk you through using the `/solana/swap-instructions` endpoint on 0x’s Solana API to:
19+
This guide will walk you through using the `/swap-instructions` endpoint on 0x’s Solana API to:
2020

2121
1. Fetch a quote
2222
2. Build the swap instructions
@@ -26,7 +26,7 @@ This guide will walk you through using the `/solana/swap-instructions` endpoint
2626

2727
Make sure you have:
2828

29-
- [0x API key](https://docs.0x.org/docs/introduction/quickstart/getting-started)
29+
- [0x API key](/docs/introduction/quickstart/getting-started)
3030
- A funded Solana keypair (see details below)
3131
- A RPC Connection (see details below)
3232

@@ -60,7 +60,7 @@ const connection = new Connection("https://api.mainnet-beta.solana.com");
6060

6161
## 1. Fetch a Quote
6262

63-
Start by sending a POST request to the 0x `/solana/swap-instructions` endpoint to get swap instructions for a specific token pair and input amount.
63+
Start by sending a POST request to the 0x `/swap-instructions` endpoint to get swap instructions for a specific token pair and input amount.
6464

6565
This endpoint returns everything needed to construct and execute a swap transaction.
6666

@@ -87,11 +87,11 @@ const quote = await quoteResponse.json();
8787

8888
### Required Request Parameters
8989

90-
For the complete list of required request parameters, see the [API Reference](https://docs.0x.org/api-reference/api-overview).
90+
For the complete list of required request parameters, see the [API Reference](/api-reference/api-overview).
9191

9292
### Example Response
9393

94-
For a sample response, complete schema, and detailed field descriptions, see the [API Reference](https://docs.0x.org/api-reference/api-overview).
94+
For a sample response, complete schema, and detailed field descriptions, see the [API Reference](/api-reference/api-overview).
9595

9696
## 2. Build Swap Instructions
9797

@@ -138,7 +138,7 @@ const instructions = buildInstructions(quote.instructions);
138138

139139
## 3. Resolve Address Lookup Tables
140140

141-
Before you compile and sign a **v0 (VersionedTransaction)**, you need to resolve any **Address Lookup Tables (ALTs)** returned by the 0x `/solana/swap-instructions `endpoint.
141+
Before you compile and sign a **v0 (VersionedTransaction)**, you need to resolve any **Address Lookup Tables (ALTs)** returned by the 0x `/swap-instructions` endpoint.
142142

143143
ALTs let Solana v0 transactions reference more accounts than can fit in the static account list by “looking up” additional addresses on-chain. If the quote response includes `address_lookup_tables`, you must:
144144

fern/docs/pages/solana-swap-api/guides/important-integration-notes.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ We currently return **a single flat array of instructions.** Here's what’s cur
2424
- **Setup Instructions (N):**
2525
- These create associated token accounts (ATAs) for the user (`taker`) as needed. This uses `createIdempotent`, so instructions won’t fail if an ATA already exists.
2626
- The number of instructions (`N`) depends on how many tokens the route involves, sometimes there may be 1 extra instruction for native SOL support (for certain DEXs).
27-
- **Integrator fee recipient ATAs are not created automatically.** The [`swap_fee_recipient`](/api-reference/solana-swap-ap-is/solana-swap/solana-swap-swap-instructions#swap_fee_recipient) field accepts either a wallet address (for native SOL output) or a valid token account address (for token outputs). If you're collecting fees on a token output, the token account you pass must already exist — 0x will not create it. If it may not exist, add a `createAssociatedTokenAccountIdempotent` instruction for the fee recipient + fee token mint **before** the swap/fee transfer path. See the [Integrator Byte Costs](/svm/solana-swap-api/guides/integrator-byte-costs) guide for how to account for those extra bytes.
27+
- **Integrator fee recipient ATAs are not created automatically.** The [`swap_fee_recipient`](/api-reference/solana-swap-ap-is/swap/instructions#swap_fee_recipient) field accepts either a wallet address (for native SOL output) or a valid token account address (for token outputs). If you're collecting fees on a token output, the token account you pass must already exist — 0x will not create it. If it may not exist, add a `createAssociatedTokenAccountIdempotent` instruction for the fee recipient + fee token mint **before** the swap/fee transfer path. See the [Integrator Byte Costs](/svm/solana-swap-api/guides/integrator-byte-costs) guide for how to account for those extra bytes.
2828
- **Swap Instruction (1):**
2929
- A single instruction on our [**Settler**](https://github.com/0xProject/0x-settler) program to perform the actual swap.
3030
- **Cleanup Instructions (as required):**

0 commit comments

Comments
 (0)