Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
04214a4
staging changes to docs
Apr 7, 2025
0b336b2
update to format
Apr 7, 2025
43a85ac
docs refresh to v2
Apr 14, 2025
aa9694c
docs v2 update
Apr 14, 2025
c9b9804
change to re run
Apr 14, 2025
3ceb91f
update yarn lock
MakMuftic Apr 14, 2025
8b7be2c
resolve first broken links
MakMuftic Apr 14, 2025
d2f0d80
fix last broken link
MakMuftic Apr 14, 2025
9bc82b9
fix linter
MakMuftic Apr 14, 2025
e6d3e6a
minor copy changes
Apr 24, 2025
a39e576
different provider
BeroBurny Apr 24, 2025
49f15ff
fix
BeroBurny Apr 24, 2025
28e20cd
solver yaml fix
BeroBurny Apr 24, 2025
a3d5919
final draft update to docsupgrade v2
Apr 25, 2025
46548cb
run lint
Apr 25, 2025
07ca7d4
ran prettier
Apr 25, 2025
cb5803a
restructure docs api starter kit
Apr 30, 2025
abbe5d2
fix yarn lock
BeroBurny May 1, 2025
680e5c6
fix links
BeroBurny May 1, 2025
1821564
lit fix
BeroBurny May 1, 2025
3ff9a8a
updates to docs with api starter kits
May 1, 2025
c2d81b3
final draft updates with api payloads
May 8, 2025
1e7a344
fix broken links on glossary
May 8, 2025
6b14f16
minor updates to example payloads
May 9, 2025
d293d28
Merge branch 'master' into docsupgrade
itsbobbyzzz168 May 9, 2025
29f2419
lint
May 9, 2025
4db02eb
type fixes
May 9, 2025
53cea03
fix to types
May 9, 2025
ddd7c4e
.
May 9, 2025
0c9161d
Merge branch 'master' into docsupgrade
itsbobbyzzz168 May 9, 2025
f20300f
lint
May 9, 2025
9840505
update to standard usdcpool address
May 16, 2025
af2dafa
fix: add MPC details to sprinter pools
May 16, 2025
dc8b044
Merge branch 'master' into docsupgrade
itsbobbyzzz168 May 16, 2025
6da8e7b
lint / prettier
May 16, 2025
a52b5ad
run lint
May 19, 2025
4309864
added liq mining contract
May 21, 2025
3c0356c
spelling fix
May 27, 2025
2b85ee6
adding sprinter solve router address
May 28, 2025
f8b0963
adding router execution address
May 28, 2025
da253bc
lint
May 28, 2025
5cb8973
update to the solve openapi yaml
Jun 11, 2025
d0185fc
remove original v2 as superceded by new v1
Jun 11, 2025
85ac9ce
Merge branch 'master' into docsupgrade
itsbobbyzzz168 Jun 11, 2025
684cbf6
linter + update to audits to include latest
Jun 11, 2025
aaf322b
fixed broken links
Jun 11, 2025
8e0abaa
minor update typo
Jun 12, 2025
b0ad2eb
fix broken links
Jun 26, 2025
be09cb4
fix links
Jun 26, 2025
c26453a
update solve api example
Jun 30, 2025
ad8c942
updated solve open API with request ID
Jul 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,21 @@

## [0.3.5](https://github.com/sprintertech/sprinter-sdk/compare/docs-v0.3.4...docs-v0.3.5) (2025-05-28)


### Bug Fixes

* **docs:** adding router addresses ([#163](https://github.com/sprintertech/sprinter-sdk/issues/163)) ([ff7f939](https://github.com/sprintertech/sprinter-sdk/commit/ff7f939bf87b6730fb5cdf409f1541c2c4aa95b7))
- **docs:** adding router addresses ([#163](https://github.com/sprintertech/sprinter-sdk/issues/163)) ([ff7f939](https://github.com/sprintertech/sprinter-sdk/commit/ff7f939bf87b6730fb5cdf409f1541c2c4aa95b7))

## [0.3.4](https://github.com/sprintertech/sprinter-sdk/compare/docs-v0.3.3...docs-v0.3.4) (2025-05-27)


### Bug Fixes

* **docs:** typos ([#161](https://github.com/sprintertech/sprinter-sdk/issues/161)) ([9f5c2f0](https://github.com/sprintertech/sprinter-sdk/commit/9f5c2f09d873bff398fa350d91f36829c9ba6220))
- **docs:** typos ([#161](https://github.com/sprintertech/sprinter-sdk/issues/161)) ([9f5c2f0](https://github.com/sprintertech/sprinter-sdk/commit/9f5c2f09d873bff398fa350d91f36829c9ba6220))

## [0.3.3](https://github.com/sprintertech/sprinter-sdk/compare/docs-v0.3.2...docs-v0.3.3) (2025-05-21)


### Bug Fixes

* added MPC details ([#159](https://github.com/sprintertech/sprinter-sdk/issues/159)) ([16fc0a2](https://github.com/sprintertech/sprinter-sdk/commit/16fc0a28ff7925c2643a313d572773d10f1b4619))
- added MPC details ([#159](https://github.com/sprintertech/sprinter-sdk/issues/159)) ([16fc0a2](https://github.com/sprintertech/sprinter-sdk/commit/16fc0a28ff7925c2643a313d572773d10f1b4619))

## [0.3.2](https://github.com/sprintertech/sprinter-sdk/compare/docs-v0.3.1...docs-v0.3.2) (2025-05-16)

Expand Down
43 changes: 22 additions & 21 deletions docs/docs/03-Solve/02-solve-quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Sprinter Solve enables your dApp, aggregator or protocol integration to **optimi

This guide covers:

1. Recap of the [Sprinter Solve Lifecycle](solve-api-quick-start#1-solve-lifecycle)
2. Geting the [finalized route and call data execution package](solve-api-quick-start#2-geting-the-finalized-route-and-call-data-execution-package)
3. Send transaction using [`swap_call_data`](solve-api-quick-start#3-send-transaction-using-swap_call_data)
4. Sprinter Solve [Execution Tips](solve-api-quick-start#4-sprinter-solve-execution-tips)
1. Recap of the [Sprinter Solve Lifecycle](#1-solve-lifecycle)
2. Geting the [finalized route and call data execution package](#2-geting-the-finalized-route-and-call-data-execution-package)
3. Send transaction using [`swap_call_data`](#3-send-transaction-using-swap_call_data)
4. Sprinter Solve [Execution Tips](#4-sprinter-solve-execution-tips)

## 1. Solve Lifecycle

Expand All @@ -29,7 +29,8 @@ flowchart TD
F --> G[Send Transaction & Finalize Fill]


click E "solve-get-route-v2" "Borrow Quote"

click E "solve-get-route-v1" "Borrow Quote"
style E fill:#FF9B43,stroke:#333,stroke-width:2px,color:#000,font-weight:bold

```
Expand All @@ -38,28 +39,28 @@ style E fill:#FF9B43,stroke:#333,stroke-width:2px,color:#000,font-weight:bold

## 2. Geting the finalized route and call data execution package

Calling the [**Get Route API**](solve-get-route-v2) returns the finalized route, including call data, gas estimates and token out amounts. Use this executable call data `swap_call_data` after verifying a quote.
Calling the [**Get Route API**](solve-get-route-v1) returns the finalized route, including call data, gas estimates and token out amounts. Use this executable call data `swap_call_data` after verifying a quote.

- **Mainnet:** `https://swaps.sprinter.tech/mainnet`
- **Base:** `https://swaps.sprinter.tech/base`

```ts title="Example Fetch Quote Request Payload"
const AMOUNT_IN; // the amount of token that you want exchange in their decimals denomination
const TOKEN_IN_ADDRESS; // token_in_address
const TOKEN_OUT_ADDRESS; // token_out_addres - tokens that you want to receieve
const SLIPPAGE; // the slipapge that you want to allow for the swap ( 0.5 - 2%)
const TARGET_DURATION;
const AMOUNT_IN = "100000000"; // the amount of token you want to exchange, in its smallest unit (as a string)
const TOKEN_IN_ADDRESS = "0x..."; // address of the token you want to sell
const TOKEN_OUT_ADDRESS = "0x..."; // address of the token you want to buy
const SLIPPAGE_BPS = 50; // slippage in basis points (e.g., 50 = 0.5%)
const API_USER = "your_api_user";
const API_PASS = "your_api_pass";

const fetchRoute = async () => {
const response = await fetch(
"https://swaps.sprinter.tech/mainnet/v2/route?amount_in=[AMOUNT_IN]&token_in=[TOKEN_IN_ADDRESS]&token_out=[TOKEN_OUT_ADDRESS]&slippage=[SLIPPAGE]&target_duration_ms=[TARGET_DURATION]",
{
method: "GET",
headers: {
"X-API-Key": "your_api_key_here",
},
const url = `https://swaps.sprinter.tech/mainnet/v1/route?amountIn=${AMOUNT_IN}&tokenIn=${TOKEN_IN_ADDRESS}&tokenOut=${TOKEN_OUT_ADDRESS}&slippageBps=${SLIPPAGE_BPS}`;

const response = await fetch(url, {
method: "GET",
headers: {
Authorization: "Basic " + btoa(`${API_USER}:${API_PASS}`),
},
);
});

const data = await response.json();
return data;
Expand All @@ -68,7 +69,7 @@ const fetchRoute = async () => {

## 3. Send transaction using `swap_call_data`

Once you've received a valid route from `/v2/route`, you'll use the `swap_call_data` in a transaction to execute the intent on-chain.
Once you've received a valid route from `/v1/route`, you'll use the `swap_call_data` in a transaction to execute the intent on-chain.

Below is a simplified example using `ethers.js` to send the transaction from a connected signer:

Expand All @@ -78,7 +79,7 @@ import { ethers } from "ethers";
const provider = new ethers.JsonRpcProvider("https://mainnet.base.org"); // or OP/Arbitrum
const signer = new ethers.Wallet("<PRIVATE_KEY>", provider);

const routeResponse = await fetch("https://swaps.sprinter.tech/base/v2/route", {
const routeResponse = await fetch("https://swaps.sprinter.tech/base/1/route", {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down
Loading
Loading