Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 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
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
9 changes: 5 additions & 4 deletions docs/docs/03-Solve/02-solve-quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,7 +39,7 @@ 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`
Expand Down Expand Up @@ -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
280 changes: 280 additions & 0 deletions docs/docs/03-Solve/get-route-v-1.api.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,280 @@
---
id: solve-get-route-v1
title: "Get Route V1 API"
description: "Calculate the optimal swap route and generate execution parameters for a token exchange"
sidebar_label: "Get Route API V1 "
hide_title: true
hide_table_of_contents: true
api: eJztWEtvGzcQ/isEkaJOu5bWrn2obnLitj60DeykF0MFRtyRlskuuSaHilRh/3sx5OplKc4LAVI3N4mcnfnmmwfJWUrboAPS1lwVciCnSNc2EP51IjNZoFdON7wpB/IZVCpUQCioRGEb0jVUwr+FRjj+RIApxBQNq0OBc1SBvxQNOKiR0HkxsU6AIPsGjcC5KsFMUWZyIyEHt0up2dpdQLeQmTRQoxxIqG0wdGX2UL0sUaRNYSdCmyZQMuAF2YTuSJu09L0XvoaqQk8iGE1PZSa9KrEGOVje0ztc6wQjLq+fneYdbvACRIEqeU9Om6k4MlZ4pdGQnmgljKXIKOunRcP4k2D0lQgdW/j7Nj/+efTjExbSVLHUS7aQLMs2kw7vgnZYyAG5gG12mJoI6wAzz6whB4oEFIVD79kXjtwWR5EirKoHeLikEh2GWqj76o5OczFeEPqnAo2yBRbMTYlzWLHzVlMp8rloHE70/GEy8vktHE+Gx78wKcuzvN3mZZhMfiQnfwb6YFJsoB1WxmHx6EjxlW4amOJF4w+W0WpfkK3QgVGcK2IMXnvRWG3IiyPsTXuZOM9jKee98+92a6jzRRvCKTqZyYl1NVBa+ulUZrLWRtehloM8kzXM0++TPM9zhjSBUJEcnOc7Tk2g8tiOeMk31nj0bOs0z/cjcxOUQu8noaoWQq06VrHdpmIANu2pQAJdMSMlQhF70FJe411AT8dXz/dNvDL6LqBwSUToIpV9dHePiXVU10SUOH8oyKdn7RPZtm0mObfQECuDpqm0ij2l/9oziuU7c3OXAYfR/fd43oG149eouGY21N92nTfVUq277pT+Ergp8g8FVfUcCOQok43jE4V0CtLm66+yw+449FUi7Dj+6lvQOgX2kP6G8zUQliqAILYP7rtclx8B4Idt6xfspORSWa10V5frrk1wHbWZPDvUKC6gWJdwEbjnCW1mUOli68LyaJrCpXPWiVX7TAnwYeXPcZOZRFawX95x9x3WeE9oU0SMZhrDzZa4npK67P550a4MvUNljd5DvDLuMrmdA1FyHfmTQ6GCQKV1+h+ujNgs72cAm9LeM2rlMMYSHtER8b/NhrN9VX9YMdMwrnD7ijCxwRTrHjXVMzTfusKjyYPzQ+fBlWGS+ThHN0O3xvIt0v/ZSPP9Dqm03VwjEVzKgezPTvqx0Dk4Mdxp8BBcxbEgavyg3+d+4Hu+cYzO9QhV2a9BG4P7z8rf07q44R4yfHEl+Q32fnVj8Lin6wI8bikaMUYVnKZFBHkBXqthYEduR9u7Nxz7FJYtmXXSMY5VMvJ/ftepyJw2ExsFOwaj7fFCXFRg1B684YsrETwWa4mIVWaSaUwiJ728lx+PkYAj2lhPNcT07B6iUyQRr2pif8y03KT4F5w4dZwQzqnfVKANA43xWnZJcitnjC2lySiTpfXEq8slB+2Vq9qWl9MTm+NSaM/HyOq5+oBbR9ddfT0Vnzu9OujHG1zsTsxmUAUWi1n5STg/bpb0AKrNsOrLgTo8y3kfqPSk/URUnzU+eQDZ7shmA27Ef1y8t8Q2sDqnYiamT4dKYbPt0t55wVrWDfLXy5eybf8FfAyYow==
sidebar_class_name: "get api-method"
info_path: ../src/api/generated/solve/swap-by-blanc
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
as={"h1"}
className={"openapi__heading"}
children={"Get the executable swap route"}
></Heading>

<MethodEndpoint method={"get"} path={"/v1/route"} context={"endpoint"}></MethodEndpoint>

Get the **finalized execution package** returned by `/v1/route` which contains all necessary data to execute a transaction. It builds on a quote by including calldata, selected liquidity paths, slippage tolerances, and chain-specific details.

Routes are consumed directly by solvers or smart contracts to simulate and execute cross-chain swaps or intent fills.

<Heading
id={"request"}
as={"h2"}
className={"openapi-tabs__heading"}
children={"Request"}
></Heading>

<ParamsDetails
parameters={[
{
in: "query",
name: "amountIn",
description: "The amount of tokens to sell in decimal notation",
schema: {
description: "Amount of an ERC20 token as a decimal string (no scientific notation)",
type: "string",
pattern: "^[0-9]+$",
example: "1000000000000000000",
title: "TokenAmount",
},
required: true,
example: "1000000000000000000",
},
{
in: "query",
name: "tokenIn",
description: "Contract address of the input token to sell",
schema: {
description: "Ethereum contract address (20 bytes) encoded as hexadecimal with 0x prefix",
type: "string",
pattern: "^0x[a-fA-F0-9]{40}$",
example: "0x6B175474E89094C44Da98b954EedeAC495271d0F",
title: "Address",
},
required: true,
example: "0x6B175474E89094C44Da98b954EedeAC495271d0F",
},
{
in: "query",
name: "tokenOut",
description: "Contract address of the output token to buy",
schema: {
description: "Ethereum contract address (20 bytes) encoded as hexadecimal with 0x prefix",
type: "string",
pattern: "^0x[a-fA-F0-9]{40}$",
title: "Address",
},
required: true,
example: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
},
{
in: "query",
name: "slippageBps",
description: "The slippage tolerance in basis points (e.g., 50 for 0.5%)",
schema: {
type: "integer",
format: "int32",
minimum: 0,
maximum: 10000,
default: 50,
},
required: false,
example: 50,
},
]}
></ParamsDetails>

<RequestSchema title={"Body"} body={undefined}></RequestSchema>

<StatusCodes
id={undefined}
label={undefined}
responses={{
"200": {
description: "Successfully calculated swap route with execution details",
headers: {
"Request-ID": {
description: "Unique request identifier",
schema: {
type: "string",
format: "hex",
pattern: "^0x[a-fA-F0-9]{24}$",
},
},
},
content: {
"application/json": {
schema: {
description: "Successfully created route with execution details",
type: "object",
required: ["amountOut", "minAmountOut", "target", "callData"],
properties: {
amountOut: {
description:
"Amount of an ERC20 token as a decimal string (no scientific notation)",
type: "string",
pattern: "^[0-9]+$",
title: "TokenAmount",
},
minAmountOut: {
description:
"Amount of an ERC20 token as a decimal string (no scientific notation)",
type: "string",
pattern: "^[0-9]+$",
title: "TokenAmount",
},
target: {
description:
"Ethereum contract address (20 bytes) encoded as hexadecimal with 0x prefix",
type: "string",
pattern: "^0x[a-fA-F0-9]{40}$",
title: "Address",
},
callData: {
description: "Hex encoded calldata for the swap",
type: "string",
pattern: "^0x[a-fA-F0-9]*$",
title: "Bytes",
},
},
title: "RouteV1Response",
},
},
},
},
"400": {
description: "Bad request due to invalid parameters",
headers: {
"Request-ID": {
description: "Unique request identifier",
schema: {
type: "string",
format: "hex",
pattern: "^0x[a-fA-F0-9]{24}$",
},
},
},
content: {
"application/json": {
schema: {
description: "Error response with details",
type: "object",
required: ["code", "error"],
properties: {
code: {
description: "Error code indicating the type of error",
type: "integer",
},
error: { description: "Error message", type: "string" },
},
title: "Error",
},
},
},
},
"401": {
description: "Unauthorized access due to invalid or missing credentials",
headers: {
"Request-ID": {
description: "Unique request identifier",
schema: {
type: "string",
format: "hex",
pattern: "^0x[a-fA-F0-9]{24}$",
},
},
},
content: {
"application/json": {
schema: {
description: "Error response with details",
type: "object",
required: ["code", "error"],
properties: {
code: {
description: "Error code indicating the type of error",
type: "integer",
},
error: { description: "Error message", type: "string" },
},
title: "Error",
},
},
},
},
"404": {
description: "No viable swap route found for the given parameters",
headers: {
"Request-ID": {
description: "Unique request identifier",
schema: {
type: "string",
format: "hex",
pattern: "^0x[a-fA-F0-9]{24}$",
},
},
},
content: {
"application/json": {
schema: {
description: "Error response with details",
type: "object",
required: ["code", "error"],
properties: {
code: {
description: "Error code indicating the type of error",
type: "integer",
},
error: { description: "Error message", type: "string" },
},
title: "Error",
},
},
},
},
"500": {
description: "Internal server error",
headers: {
"Request-ID": {
description: "Unique request identifier",
schema: {
type: "string",
format: "hex",
pattern: "^0x[a-fA-F0-9]{24}$",
},
},
},
content: {
"application/json": {
schema: {
description: "Error response with details",
type: "object",
required: ["code", "error"],
properties: {
code: {
description: "Error code indicating the type of error",
type: "integer",
},
error: { description: "Error message", type: "string" },
},
title: "Error",
},
},
},
},
}}
></StatusCodes>
Loading