Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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.8](https://github.com/sprintertech/sprinter-sdk/compare/docs-v0.3.7...docs-v0.3.8) (2025-06-30)


### Bug Fixes

* update solve api example ([#175](https://github.com/sprintertech/sprinter-sdk/issues/175)) ([9dbfbd8](https://github.com/sprintertech/sprinter-sdk/commit/9dbfbd8763e13b050e0bc3ca33414f6016a48cb4))
- update solve api example ([#175](https://github.com/sprintertech/sprinter-sdk/issues/175)) ([9dbfbd8](https://github.com/sprintertech/sprinter-sdk/commit/9dbfbd8763e13b050e0bc3ca33414f6016a48cb4))

## [0.3.7](https://github.com/sprintertech/sprinter-sdk/compare/docs-v0.3.6...docs-v0.3.7) (2025-06-26)


### Bug Fixes

* broken links solve v1 ([#169](https://github.com/sprintertech/sprinter-sdk/issues/169)) ([34be02b](https://github.com/sprintertech/sprinter-sdk/commit/34be02b69ef86a3b7cb9d27ec1bb24f69889be40))
- broken links solve v1 ([#169](https://github.com/sprintertech/sprinter-sdk/issues/169)) ([34be02b](https://github.com/sprintertech/sprinter-sdk/commit/34be02b69ef86a3b7cb9d27ec1bb24f69889be40))

## [0.3.6](https://github.com/sprintertech/sprinter-sdk/compare/docs-v0.3.5...docs-v0.3.6) (2025-06-12)


### Bug Fixes

* update to solve-openapi.yaml to match updated OpenAPI spec ([#167](https://github.com/sprintertech/sprinter-sdk/issues/167)) ([b79e4cc](https://github.com/sprintertech/sprinter-sdk/commit/b79e4cc7ce82df46bb8a6894b11f379dd6536dbb))
- update to solve-openapi.yaml to match updated OpenAPI spec ([#167](https://github.com/sprintertech/sprinter-sdk/issues/167)) ([b79e4cc](https://github.com/sprintertech/sprinter-sdk/commit/b79e4cc7ce82df46bb8a6894b11f379dd6536dbb))

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

Expand Down
109 changes: 77 additions & 32 deletions docs/docs/03-Solve/get-route-v-1.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,11 @@ 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>
<Heading as={"h1"} className={"openapi__heading"} children={"getRouteV1"}></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.
Calculate the optimal swap route and generate execution parameters for a token exchange

<Heading
id={"request"}
Expand All @@ -43,43 +37,40 @@ Routes are consumed directly by solvers or smart contracts to simulate and execu
{
in: "query",
name: "amountIn",
description: "The amount of tokens to sell in decimal notation",
description: "The amount of input tokens to swap (in token's smallest unit)",
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",
description:
"Contract address of the input token to sell. The zero address (0x00…00) represents the native currency ETH.",
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",
description:
"Contract address of the output token to buy. The zero address (0x00…00) represents the native currency ETH.",
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",
Expand All @@ -93,7 +84,6 @@ Routes are consumed directly by solvers or smart contracts to simulate and execu
default: 50,
},
required: false,
example: 50,
},
]}
></ParamsDetails>
Expand All @@ -108,11 +98,14 @@ Routes are consumed directly by solvers or smart contracts to simulate and execu
description: "Successfully calculated swap route with execution details",
headers: {
"Request-ID": {
description: "Unique request identifier",
description: "Unique request identifier (16 bytes) encoded as hexadecimal with 0x prefix",
schema: {
description:
"Unique request identifier (16 bytes) encoded as hexadecimal with 0x prefix",
type: "string",
format: "hex",
pattern: "^0x[a-fA-F0-9]{24}$",
pattern: "^0x[a-fA-F0-9]{32}$",
title: "RequestID",
},
},
},
Expand All @@ -121,8 +114,16 @@ Routes are consumed directly by solvers or smart contracts to simulate and execu
schema: {
description: "Successfully created route with execution details",
type: "object",
required: ["amountOut", "minAmountOut", "target", "callData"],
required: ["requestId", "amountOut", "minAmountOut", "target", "callData"],
properties: {
requestId: {
description:
"Unique request identifier (16 bytes) encoded as hexadecimal with 0x prefix",
type: "string",
format: "hex",
pattern: "^0x[a-fA-F0-9]{32}$",
title: "RequestID",
},
amountOut: {
description:
"Amount of an ERC20 token as a decimal string (no scientific notation)",
Expand Down Expand Up @@ -160,11 +161,14 @@ Routes are consumed directly by solvers or smart contracts to simulate and execu
description: "Bad request due to invalid parameters",
headers: {
"Request-ID": {
description: "Unique request identifier",
description: "Unique request identifier (16 bytes) encoded as hexadecimal with 0x prefix",
schema: {
description:
"Unique request identifier (16 bytes) encoded as hexadecimal with 0x prefix",
type: "string",
format: "hex",
pattern: "^0x[a-fA-F0-9]{24}$",
pattern: "^0x[a-fA-F0-9]{32}$",
title: "RequestID",
},
},
},
Expand All @@ -173,12 +177,20 @@ Routes are consumed directly by solvers or smart contracts to simulate and execu
schema: {
description: "Error response with details",
type: "object",
required: ["code", "error"],
required: ["code", "requestId", "error"],
properties: {
code: {
description: "Error code indicating the type of error",
type: "integer",
},
requestId: {
description:
"Unique request identifier (16 bytes) encoded as hexadecimal with 0x prefix",
type: "string",
format: "hex",
pattern: "^0x[a-fA-F0-9]{32}$",
title: "RequestID",
},
error: { description: "Error message", type: "string" },
},
title: "Error",
Expand All @@ -190,11 +202,14 @@ Routes are consumed directly by solvers or smart contracts to simulate and execu
description: "Unauthorized access due to invalid or missing credentials",
headers: {
"Request-ID": {
description: "Unique request identifier",
description: "Unique request identifier (16 bytes) encoded as hexadecimal with 0x prefix",
schema: {
description:
"Unique request identifier (16 bytes) encoded as hexadecimal with 0x prefix",
type: "string",
format: "hex",
pattern: "^0x[a-fA-F0-9]{24}$",
pattern: "^0x[a-fA-F0-9]{32}$",
title: "RequestID",
},
},
},
Expand All @@ -203,12 +218,20 @@ Routes are consumed directly by solvers or smart contracts to simulate and execu
schema: {
description: "Error response with details",
type: "object",
required: ["code", "error"],
required: ["code", "requestId", "error"],
properties: {
code: {
description: "Error code indicating the type of error",
type: "integer",
},
requestId: {
description:
"Unique request identifier (16 bytes) encoded as hexadecimal with 0x prefix",
type: "string",
format: "hex",
pattern: "^0x[a-fA-F0-9]{32}$",
title: "RequestID",
},
error: { description: "Error message", type: "string" },
},
title: "Error",
Expand All @@ -220,11 +243,14 @@ Routes are consumed directly by solvers or smart contracts to simulate and execu
description: "No viable swap route found for the given parameters",
headers: {
"Request-ID": {
description: "Unique request identifier",
description: "Unique request identifier (16 bytes) encoded as hexadecimal with 0x prefix",
schema: {
description:
"Unique request identifier (16 bytes) encoded as hexadecimal with 0x prefix",
type: "string",
format: "hex",
pattern: "^0x[a-fA-F0-9]{24}$",
pattern: "^0x[a-fA-F0-9]{32}$",
title: "RequestID",
},
},
},
Expand All @@ -233,12 +259,20 @@ Routes are consumed directly by solvers or smart contracts to simulate and execu
schema: {
description: "Error response with details",
type: "object",
required: ["code", "error"],
required: ["code", "requestId", "error"],
properties: {
code: {
description: "Error code indicating the type of error",
type: "integer",
},
requestId: {
description:
"Unique request identifier (16 bytes) encoded as hexadecimal with 0x prefix",
type: "string",
format: "hex",
pattern: "^0x[a-fA-F0-9]{32}$",
title: "RequestID",
},
error: { description: "Error message", type: "string" },
},
title: "Error",
Expand All @@ -250,11 +284,14 @@ Routes are consumed directly by solvers or smart contracts to simulate and execu
description: "Internal server error",
headers: {
"Request-ID": {
description: "Unique request identifier",
description: "Unique request identifier (16 bytes) encoded as hexadecimal with 0x prefix",
schema: {
description:
"Unique request identifier (16 bytes) encoded as hexadecimal with 0x prefix",
type: "string",
format: "hex",
pattern: "^0x[a-fA-F0-9]{24}$",
pattern: "^0x[a-fA-F0-9]{32}$",
title: "RequestID",
},
},
},
Expand All @@ -263,12 +300,20 @@ Routes are consumed directly by solvers or smart contracts to simulate and execu
schema: {
description: "Error response with details",
type: "object",
required: ["code", "error"],
required: ["code", "requestId", "error"],
properties: {
code: {
description: "Error code indicating the type of error",
type: "integer",
},
requestId: {
description:
"Unique request identifier (16 bytes) encoded as hexadecimal with 0x prefix",
type: "string",
format: "hex",
pattern: "^0x[a-fA-F0-9]{32}$",
title: "RequestID",
},
error: { description: "Error message", type: "string" },
},
title: "Error",
Expand Down