> For the complete documentation index, see [llms.txt](https://learn.sanctum.so/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.sanctum.so/docs/for-developers/sanctum-api.md).

# Sanctum API

## GET /lsts

>

```json
{"openapi":"3.0.0","info":{"title":"Sanctum API","version":"1.0.0"},"servers":[{"url":"https://sanctum-api.ironforge.network","description":"prod"}],"paths":{"/lsts":{"get":{"parameters":[{"schema":{"type":"string","description":"API key"},"required":true,"name":"apiKey","in":"query"}],"responses":{"200":{"description":"Returns all LST metadatas","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/LstWithStats"},{"type":"object","properties":{"slug":{"type":"string","description":"Mint address or symbol of the LST"}},"required":["slug"]}]}}},"required":["data"]}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"418":{"description":"UNUSED. Entry here used to document error message schema. In the case of Sanctum programs SDKs errors, `error.message` will start with `${SanctumErrorCode}:`","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"$ref":"#/components/schemas/SanctumErrorCode"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["TOO_MANY_REQUESTS"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"Refers to a temporary condition which is expected to be alleviated after some delay. Currently used to suggest a Pool is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}}}}}},"components":{"schemas":{"LstWithStats":{"allOf":[{"$ref":"#/components/schemas/LstMetadata"},{"type":"object","properties":{"tvl":{"type":"number","nullable":true,"description":"TVL"},"latestApy":{"type":"number","nullable":true,"description":"Latest APY"},"avgApy":{"type":"number","nullable":true,"description":"Average APY"},"solValue":{"type":"number","nullable":true,"description":"SOL value"}},"required":["tvl","latestApy","avgApy","solValue"]}]},"LstMetadata":{"type":"object","properties":{"symbol":{"type":"string","description":"Token symbol"},"mint":{"type":"string","description":"Mint address"},"tokenProgram":{"type":"string","description":"Token program address"},"name":{"type":"string","description":"Token name"},"logoUri":{"type":"string","description":"URL to token logo"},"decimals":{"type":"number","description":"Token decimals"},"pool":{"oneOf":[{"type":"object","properties":{"program":{"type":"string","enum":["Lido"]}},"required":["program"]},{"type":"object","properties":{"program":{"type":"string","enum":["Marinade"]}},"required":["program"]},{"type":"object","properties":{"program":{"type":"string","enum":["ReservePool"]}},"required":["program"]},{"type":"object","properties":{"program":{"type":"string","enum":["SanctumSpl"]},"pool":{"type":"string"},"validatorList":{"type":"string"},"voteAccount":{"type":"string"}},"required":["program","pool","validatorList","voteAccount"]},{"type":"object","properties":{"program":{"type":"string","enum":["SanctumSplMulti"]},"pool":{"type":"string"},"validatorList":{"type":"string"},"voteAccount":{"type":"string"}},"required":["program","pool","validatorList"]},{"type":"object","properties":{"program":{"type":"string","enum":["Spl"]},"pool":{"type":"string"},"validatorList":{"type":"string"},"voteAccount":{"type":"string"}},"required":["program","pool","validatorList"]},{"type":"object","properties":{"program":{"type":"string","enum":["SPool"]},"programId":{"type":"string"}},"required":["program","programId"]}],"description":"Pool associated with the LST"},"holders":{"type":"number","nullable":true,"description":"Number of holders"},"launchDate":{"type":"string","nullable":true,"description":"Launch date of the LST"},"mainValueProposition":{"type":"string","nullable":true,"description":"Primary value proposition"},"oneLiner":{"type":"string","nullable":true,"description":"Short description"},"bulletPoints":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Key features"},"twitter":{"type":"string","nullable":true,"description":"Twitter URL"},"website":{"type":"string","nullable":true,"description":"Website URL"},"telegramGroupLink":{"type":"string","nullable":true,"description":"Telegram group URL"},"categories":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Categories"},"featureId":{"type":"number","nullable":true,"description":"Feature identifier"},"sanctumAutomated":{"type":"boolean","nullable":true,"description":"Whether the LST is Sanctum automated"},"managerFeeConfig":{"$ref":"#/components/schemas/ManagerFeeConfig"}},"required":["symbol","mint","tokenProgram","name","logoUri","decimals","pool","holders","launchDate","mainValueProposition","oneLiner","bulletPoints","twitter","website","telegramGroupLink","categories","featureId","sanctumAutomated","managerFeeConfig"]},"ManagerFeeConfig":{"type":"object","nullable":true,"properties":{"dst":{"type":"string","description":"Destination address"},"withholdRate":{"type":"number","description":"Withhold rate"}},"required":["dst","withholdRate"],"description":"Manager fee configuration"},"ErrorCode":{"type":"string","enum":["BAD_REQUEST","FORBIDDEN","INTERNAL_SERVER_ERROR","NOT_FOUND","TOO_MANY_REQUESTS","UNAUTHORIZED","CONFLICT","SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"SanctumErrorCode":{"type":"string","enum":["UserErr","UnsupportedUpdateErr","UnsupportedMintErr","PoolErr"],"description":"User-facing error codes that may be raised by Sanctum programs SDKs."}}}}
```

## GET /lsts/{mintOrSymbol}

>

```json
{"openapi":"3.0.0","info":{"title":"Sanctum API","version":"1.0.0"},"servers":[{"url":"https://sanctum-api.ironforge.network","description":"prod"}],"paths":{"/lsts/{mintOrSymbol}":{"get":{"parameters":[{"schema":{"type":"string"},"required":true,"description":"Mint address or symbol of the LST","name":"mintOrSymbol","in":"path"},{"schema":{"type":"string","description":"API key"},"required":true,"name":"apiKey","in":"query"}],"responses":{"200":{"description":"Returns specific LST metadata","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/LstWithStats"},{"type":"object","properties":{"slug":{"type":"string","description":"Mint address or symbol of the LST"}},"required":["slug"]}]}}},"required":["data"]}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"418":{"description":"UNUSED. Entry here used to document error message schema. In the case of Sanctum programs SDKs errors, `error.message` will start with `${SanctumErrorCode}:`","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"$ref":"#/components/schemas/SanctumErrorCode"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["TOO_MANY_REQUESTS"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"Refers to a temporary condition which is expected to be alleviated after some delay. Currently used to suggest a Pool is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}}}}}},"components":{"schemas":{"LstWithStats":{"allOf":[{"$ref":"#/components/schemas/LstMetadata"},{"type":"object","properties":{"tvl":{"type":"number","nullable":true,"description":"TVL"},"latestApy":{"type":"number","nullable":true,"description":"Latest APY"},"avgApy":{"type":"number","nullable":true,"description":"Average APY"},"solValue":{"type":"number","nullable":true,"description":"SOL value"}},"required":["tvl","latestApy","avgApy","solValue"]}]},"LstMetadata":{"type":"object","properties":{"symbol":{"type":"string","description":"Token symbol"},"mint":{"type":"string","description":"Mint address"},"tokenProgram":{"type":"string","description":"Token program address"},"name":{"type":"string","description":"Token name"},"logoUri":{"type":"string","description":"URL to token logo"},"decimals":{"type":"number","description":"Token decimals"},"pool":{"oneOf":[{"type":"object","properties":{"program":{"type":"string","enum":["Lido"]}},"required":["program"]},{"type":"object","properties":{"program":{"type":"string","enum":["Marinade"]}},"required":["program"]},{"type":"object","properties":{"program":{"type":"string","enum":["ReservePool"]}},"required":["program"]},{"type":"object","properties":{"program":{"type":"string","enum":["SanctumSpl"]},"pool":{"type":"string"},"validatorList":{"type":"string"},"voteAccount":{"type":"string"}},"required":["program","pool","validatorList","voteAccount"]},{"type":"object","properties":{"program":{"type":"string","enum":["SanctumSplMulti"]},"pool":{"type":"string"},"validatorList":{"type":"string"},"voteAccount":{"type":"string"}},"required":["program","pool","validatorList"]},{"type":"object","properties":{"program":{"type":"string","enum":["Spl"]},"pool":{"type":"string"},"validatorList":{"type":"string"},"voteAccount":{"type":"string"}},"required":["program","pool","validatorList"]},{"type":"object","properties":{"program":{"type":"string","enum":["SPool"]},"programId":{"type":"string"}},"required":["program","programId"]}],"description":"Pool associated with the LST"},"holders":{"type":"number","nullable":true,"description":"Number of holders"},"launchDate":{"type":"string","nullable":true,"description":"Launch date of the LST"},"mainValueProposition":{"type":"string","nullable":true,"description":"Primary value proposition"},"oneLiner":{"type":"string","nullable":true,"description":"Short description"},"bulletPoints":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Key features"},"twitter":{"type":"string","nullable":true,"description":"Twitter URL"},"website":{"type":"string","nullable":true,"description":"Website URL"},"telegramGroupLink":{"type":"string","nullable":true,"description":"Telegram group URL"},"categories":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Categories"},"featureId":{"type":"number","nullable":true,"description":"Feature identifier"},"sanctumAutomated":{"type":"boolean","nullable":true,"description":"Whether the LST is Sanctum automated"},"managerFeeConfig":{"$ref":"#/components/schemas/ManagerFeeConfig"}},"required":["symbol","mint","tokenProgram","name","logoUri","decimals","pool","holders","launchDate","mainValueProposition","oneLiner","bulletPoints","twitter","website","telegramGroupLink","categories","featureId","sanctumAutomated","managerFeeConfig"]},"ManagerFeeConfig":{"type":"object","nullable":true,"properties":{"dst":{"type":"string","description":"Destination address"},"withholdRate":{"type":"number","description":"Withhold rate"}},"required":["dst","withholdRate"],"description":"Manager fee configuration"},"ErrorCode":{"type":"string","enum":["BAD_REQUEST","FORBIDDEN","INTERNAL_SERVER_ERROR","NOT_FOUND","TOO_MANY_REQUESTS","UNAUTHORIZED","CONFLICT","SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"SanctumErrorCode":{"type":"string","enum":["UserErr","UnsupportedUpdateErr","UnsupportedMintErr","PoolErr"],"description":"User-facing error codes that may be raised by Sanctum programs SDKs."}}}}
```

## GET /validators/apy

>

```json
{"openapi":"3.0.0","info":{"title":"Sanctum API","version":"1.0.0"},"servers":[{"url":"https://sanctum-api.ironforge.network","description":"prod"}],"paths":{"/validators/apy":{"get":{"parameters":[{"schema":{"type":"string","description":"API key"},"required":true,"name":"apiKey","in":"query"}],"responses":{"200":{"description":"Returns all validators' APYs","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ValidatorApyRecord"}}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"418":{"description":"UNUSED. Entry here used to document error message schema. In the case of Sanctum programs SDKs errors, `error.message` will start with `${SanctumErrorCode}:`","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"$ref":"#/components/schemas/SanctumErrorCode"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["TOO_MANY_REQUESTS"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"Refers to a temporary condition which is expected to be alleviated after some delay. Currently used to suggest a Pool is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}}}}}},"components":{"schemas":{"ValidatorApyRecord":{"type":"object","properties":{"avgApy":{"type":"number","description":"Average APY"},"timeseries":{"type":"array","items":{"$ref":"#/components/schemas/EpochApy"},"description":"Timeseries of APYs"}},"required":["avgApy","timeseries"]},"EpochApy":{"type":"object","properties":{"epoch":{"type":"number","description":"Epoch"},"epochEndTs":{"type":"number","description":"Epoch end timestamp"},"apy":{"type":"number","description":"APY"}},"required":["epoch","epochEndTs","apy"]},"ErrorCode":{"type":"string","enum":["BAD_REQUEST","FORBIDDEN","INTERNAL_SERVER_ERROR","NOT_FOUND","TOO_MANY_REQUESTS","UNAUTHORIZED","CONFLICT","SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"SanctumErrorCode":{"type":"string","enum":["UserErr","UnsupportedUpdateErr","UnsupportedMintErr","PoolErr"],"description":"User-facing error codes that may be raised by Sanctum programs SDKs."}}}}
```

## GET /lsts/{mintOrSymbol}/apys

>

```json
{"openapi":"3.0.0","info":{"title":"Sanctum API","version":"1.0.0"},"servers":[{"url":"https://sanctum-api.ironforge.network","description":"prod"}],"paths":{"/lsts/{mintOrSymbol}/apys":{"get":{"parameters":[{"schema":{"type":"string"},"required":true,"description":"Mint address or symbol of the LST","name":"mintOrSymbol","in":"path"},{"schema":{"type":"string"},"required":false,"description":"Limit the number of apys to return","name":"limit","in":"query"},{"schema":{"type":"string","description":"API key"},"required":true,"name":"apiKey","in":"query"}],"responses":{"200":{"description":"Returns LST apys","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EpochApy"}}},"required":["data"]}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"418":{"description":"UNUSED. Entry here used to document error message schema. In the case of Sanctum programs SDKs errors, `error.message` will start with `${SanctumErrorCode}:`","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"$ref":"#/components/schemas/SanctumErrorCode"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["TOO_MANY_REQUESTS"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"Refers to a temporary condition which is expected to be alleviated after some delay. Currently used to suggest a Pool is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}}}}}},"components":{"schemas":{"EpochApy":{"type":"object","properties":{"epoch":{"type":"number","description":"Epoch"},"epochEndTs":{"type":"number","description":"Epoch end timestamp"},"apy":{"type":"number","description":"APY"}},"required":["epoch","epochEndTs","apy"]},"ErrorCode":{"type":"string","enum":["BAD_REQUEST","FORBIDDEN","INTERNAL_SERVER_ERROR","NOT_FOUND","TOO_MANY_REQUESTS","UNAUTHORIZED","CONFLICT","SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"SanctumErrorCode":{"type":"string","enum":["UserErr","UnsupportedUpdateErr","UnsupportedMintErr","PoolErr"],"description":"User-facing error codes that may be raised by Sanctum programs SDKs."}}}}
```

## GET /swap/token/order

>

```json
{"openapi":"3.0.0","info":{"title":"Sanctum API","version":"1.0.0"},"servers":[{"url":"https://sanctum-api.ironforge.network","description":"prod"}],"paths":{"/swap/token/order":{"get":{"parameters":[{"schema":{"type":"string","description":"API key"},"required":true,"name":"apiKey","in":"query"},{"schema":{"type":"string","description":"Mint of the LST to swap from or Voter pubkey of the stake account to deposit/swap from"},"required":true,"name":"inp","in":"query"},{"schema":{"type":"string","description":"Mint of the LST to swap to or a vote account/stake program pubkey to indicate no preference for validator (delayed unstake)"},"required":true,"name":"out","in":"query"},{"schema":{"type":"string","enum":["ExactIn","ExactOut"],"default":"ExactIn","description":"ExactIn provides an exact input amount and receive a variable output amount quote. ExactOut provides an exact output amount and receive a variable input amount quote. Ignored and treated as ExactIn if input is a stake account. Some swap sources do not support ExactOut."},"required":false,"name":"mode","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Signer of the swap transaction. Optional. If omitted, response's `tx` field will be `undefined` and this endpoint will act like a quoting endpoint.","name":"signer","in":"query"},{"schema":{"type":"string"},"required":false,"description":"The inp LST token account paying the input LST, or the stake account to deposit. Must be provided if input is a stake account. Defaults to `signer`'s ATA if not provided","name":"inpAcc","in":"query"},{"schema":{"type":"string"},"required":false,"description":"The out LST token account to receive the output LST. Defaults to `signer`'s ATA if not provided","name":"outAcc","in":"query"},{"schema":{"type":"string"},"required":true,"description":"Amount of LST to swap from or to, in token atomics","name":"amt","in":"query"},{"schema":{"type":"number","nullable":true,"default":30},"required":false,"description":"Slippage tolerance in basis points. Defaults to 30 if not provided","name":"slippageBps","in":"query"},{"schema":{"$ref":"#/components/schemas/SwapSrcs"},"required":false,"description":"If provided, only quote routes using the provided `SwapSrc`s. Otherwise, returns the best quote across all of them. Defaults to all swap sources if not provided","name":"swapSrc","in":"query"}],"responses":{"200":{"description":"Returns order details with unsigned tx to perform a swap","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenOrderResponse"}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"418":{"description":"UNUSED. Entry here used to document error message schema. In the case of Sanctum programs SDKs errors, `error.message` will start with `${SanctumErrorCode}:`","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"$ref":"#/components/schemas/SanctumErrorCode"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["TOO_MANY_REQUESTS"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"Refers to a temporary condition which is expected to be alleviated after some delay. Currently used to suggest a Pool is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}}}}}},"components":{"schemas":{"SwapSrcs":{"type":"array","items":{"$ref":"#/components/schemas/SwapSrc"},"default":["Inf","SanctumRouter","Jup"]},"SwapSrc":{"type":"string","enum":["Inf","SanctumRouter","Jup"]},"TokenOrderResponse":{"type":"object","properties":{"inp":{"type":"string","description":"Mint of the LST to swap from or Voter pubkey of the stake account to deposit/swap from"},"out":{"type":"string","description":"Mint of the LST to swap to or a vote account/stake program pubkey to indicate no preference for validator (delayed unstake)"},"mode":{"type":"string","enum":["ExactIn","ExactOut"],"default":"ExactIn","description":"ExactIn provides an exact input amount and receive a variable output amount quote. ExactOut provides an exact output amount and receive a variable input amount quote. Ignored and treated as ExactIn if input is a stake account. Some swap sources do not support ExactOut."},"tx":{"type":"string","description":"Unsigned base-64 encoded transaction to be signed and used in /execute. `undefined` if request was made with `signer=undefined`"},"swapSrcData":{"$ref":"#/components/schemas/SwapSrcData"},"inpAmt":{"type":"string","description":"Input LST amount the user will pay after fees, in token atomics. If input is a stake account, this should be the stake account's total lamports. Should be same as the one provided in the query params if mode = ExactIn"},"outAmt":{"type":"string","description":"Output LST amount the user will receive after fees, in token atomics. If output is a stake account, this should be the stake account's total lamports. Should be the same as the one provided in the query params if mode = ExactOut"}},"required":["inp","out","swapSrcData","inpAmt","outAmt"]},"SwapSrcData":{"oneOf":[{"type":"object","properties":{"swapSrc":{"type":"string","enum":["Jup"]},"data":{"$ref":"#/components/schemas/JupiterOrderResponse"}},"required":["swapSrc","data"]},{"type":"object","properties":{"swapSrc":{"type":"string","enum":["Inf"]},"data":{"$ref":"#/components/schemas/InfSrcData"}},"required":["swapSrc","data"]},{"type":"object","properties":{"swapSrc":{"type":"string","enum":["SanctumRouter"]},"data":{"$ref":"#/components/schemas/SanctumRouterSrcData"}},"required":["swapSrc","data"]}],"description":"Data needed according to the swap source"},"JupiterOrderResponse":{"type":"object","properties":{"mode":{"type":"string","enum":["manual","ultra"],"description":"Mode of the swap"},"router":{"type":"string","description":"Router used for the swap"},"swapType":{"type":"string"},"requestId":{"type":"string","description":"Required to make a request to /execute"},"inputMint":{"type":"string","description":"Input token mint address"},"inAmount":{"type":"string","description":"Input amount in token atomics"},"outputMint":{"type":"string","description":"Output token mint address"},"feeMint":{"type":"string","description":"Fee token mint address"},"outAmount":{"type":"string","description":"Calculated output amount from routing engine"},"otherAmountThreshold":{"type":"string","description":"Calculated minimum output amount after accounting for slippageBps on the outAmount value"},"swapMode":{"type":"string","enum":["ExactIn","ExactOut"]},"slippageBps":{"type":"number","description":"Slippage tolerance in basis points"},"platformFee":{"type":"object","properties":{"amount":{"type":"string"},"feeBps":{"type":"number"}},"description":"Platform fee information"},"priceImpact":{"type":"number","description":"Price impact percentage"},"priceImpactPct":{"type":"string","description":"Price impact percentage (string)"},"routePlan":{"type":"array","items":{"type":"object","properties":{"swapInfo":{"type":"object","properties":{"ammKey":{"type":"string","description":"AMM key"},"label":{"type":"string","description":"AMM label"},"inputMint":{"type":"string","description":"Input token mint address"},"outputMint":{"type":"string","description":"Output token mint address"},"inAmount":{"type":"string","description":"Input amount in token atomics"},"outAmount":{"type":"string","description":"Output amount in token atomics"},"feeAmount":{"type":"string","description":"Fee amount in token atomics"},"feeMint":{"type":"string","description":"Fee token mint address"}},"required":["ammKey","label","inputMint","outputMint","inAmount","outAmount","feeAmount","feeMint"]},"percent":{"type":"number","description":"Percentage of total swap for this route"},"bps":{"type":"number","description":"BPS of total swap for this route"}},"required":["swapInfo","percent","bps"]},"description":"Array of route plan steps"},"feeBps":{"type":"number","description":"Fee in basis points"},"taker":{"type":"string","nullable":true,"description":"Taker wallet address"},"gasless":{"type":"boolean","description":"Whether the transaction is gasless"},"transaction":{"type":"string","nullable":true,"description":"Base64 encoded transaction"},"prioritizationType":{"type":"string","enum":["ComputeBudget","None"]},"prioritizationFeeLamports":{"type":"number","description":"Prioritization fee in lamports"},"inUsdValue":{"type":"number","description":"Input amount in USD"},"outUsdValue":{"type":"number","description":"Output amount in USD"},"swapUsdValue":{"type":"number","description":"Swap amount in USD"},"dynamicSlippageReport":{"type":"object","properties":{"slippageBps":{"type":"number","description":"Slippage in basis points"},"otherAmount":{"type":"number","nullable":true,"description":"Other amount in token atomics"},"simulatedIncurredSlippageBps":{"type":"number","nullable":true,"description":"Simulated incurred slippage in basis points"},"amplificationRatio":{"type":"number","nullable":true,"description":"Amplification ratio"},"categoryName":{"type":"string","description":"Token category name"},"heuristicMaxSlippageBps":{"type":"number","description":"Heuristic maximum slippage in basis points"},"rtseSlippageBps":{"type":"number","description":"Real-time slippage estimation in basis points"},"failedTxnEstSlippage":{"type":"number","description":"Failed transaction estimated slippage"},"emaEstSlippage":{"type":"number","description":"EMA estimated slippage"},"useIncurredSlippageForQuoting":{"type":"boolean","nullable":true,"description":"Whether to use incurred slippage"}},"required":["slippageBps","otherAmount","simulatedIncurredSlippageBps","amplificationRatio","categoryName","heuristicMaxSlippageBps","rtseSlippageBps","failedTxnEstSlippage","emaEstSlippage","useIncurredSlippageForQuoting"],"description":"Dynamic slippage details"},"errorMessage":{"type":"string","description":"Error message that is present if transaction is the empty string"},"totalTime":{"type":"number","description":"Time taken to generate order in milliseconds"}},"description":"Jupiter's complete order response object"},"InfSrcData":{"type":"object","properties":{"fees":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["StakePoolWithdrawStake","StakePoolDepositSol","StakePoolDepositStake","SanctumRouterGlobal","InfProtocolFee","InfLpFee","InstantUnstakeFlash","StakePoolWithdrawSol"]},"rate":{"type":"number"},"amount":{"type":"string"},"mint":{"type":"string"}},"required":["code","rate","amount","mint"]}}},"required":["fees"],"description":"Array of fees applied"},"SanctumRouterSrcData":{"type":"object","properties":{"fees":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["StakePoolWithdrawStake","StakePoolDepositSol","StakePoolDepositStake","SanctumRouterGlobal","InfProtocolFee","InfLpFee","InstantUnstakeFlash","StakePoolWithdrawSol"]},"rate":{"type":"number"},"amount":{"type":"string"},"mint":{"type":"string"}},"required":["code","rate","amount","mint"]}},"lstToSolType":{"type":"string","enum":["WithdrawWrappedSol","SwapViaStake"]}},"required":["fees"],"description":"Fees applied and swap type"},"ErrorCode":{"type":"string","enum":["BAD_REQUEST","FORBIDDEN","INTERNAL_SERVER_ERROR","NOT_FOUND","TOO_MANY_REQUESTS","UNAUTHORIZED","CONFLICT","SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"SanctumErrorCode":{"type":"string","enum":["UserErr","UnsupportedUpdateErr","UnsupportedMintErr","PoolErr"],"description":"User-facing error codes that may be raised by Sanctum programs SDKs."}}}}
```

## POST /swap/token/execute

>

```json
{"openapi":"3.0.0","info":{"title":"Sanctum API","version":"1.0.0"},"servers":[{"url":"https://sanctum-api.ironforge.network","description":"prod"}],"paths":{"/swap/token/execute":{"post":{"parameters":[{"schema":{"type":"string","description":"API key"},"required":true,"name":"apiKey","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenExecuteRequest"}}}},"responses":{"200":{"description":"Executes signed transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenExecuteResponse"}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"418":{"description":"UNUSED. Entry here used to document error message schema. In the case of Sanctum programs SDKs errors, `error.message` will start with `${SanctumErrorCode}:`","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"$ref":"#/components/schemas/SanctumErrorCode"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["TOO_MANY_REQUESTS"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"Refers to a temporary condition which is expected to be alleviated after some delay. Currently used to suggest a Pool is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}}}}}},"components":{"schemas":{"TokenExecuteRequest":{"type":"object","properties":{"signedTx":{"type":"string","description":"Base64 encoded signed transaction to execute"},"orderResponse":{"type":"object","properties":{"swapSrcData":{"oneOf":[{"type":"object","properties":{"swapSrc":{"type":"string","enum":["Jup"]},"data":{"allOf":[{"$ref":"#/components/schemas/JupiterOrderResponse"},{"required":["requestId"]}]}},"required":["swapSrc","data"]},{"type":"object","properties":{"swapSrc":{"type":"string","enum":["Inf"]},"data":{"$ref":"#/components/schemas/InfSrcData"}},"required":["swapSrc","data"]},{"type":"object","properties":{"swapSrc":{"type":"string","enum":["SanctumRouter"]},"data":{"$ref":"#/components/schemas/SanctumRouterSrcData"}},"required":["swapSrc","data"]}]}},"required":["swapSrcData"],"description":"JSON response returned by GET /swap/token/order "}},"required":["signedTx","orderResponse"]},"JupiterOrderResponse":{"type":"object","properties":{"mode":{"type":"string","enum":["manual","ultra"],"description":"Mode of the swap"},"router":{"type":"string","description":"Router used for the swap"},"swapType":{"type":"string"},"requestId":{"type":"string","description":"Required to make a request to /execute"},"inputMint":{"type":"string","description":"Input token mint address"},"inAmount":{"type":"string","description":"Input amount in token atomics"},"outputMint":{"type":"string","description":"Output token mint address"},"feeMint":{"type":"string","description":"Fee token mint address"},"outAmount":{"type":"string","description":"Calculated output amount from routing engine"},"otherAmountThreshold":{"type":"string","description":"Calculated minimum output amount after accounting for slippageBps on the outAmount value"},"swapMode":{"type":"string","enum":["ExactIn","ExactOut"]},"slippageBps":{"type":"number","description":"Slippage tolerance in basis points"},"platformFee":{"type":"object","properties":{"amount":{"type":"string"},"feeBps":{"type":"number"}},"description":"Platform fee information"},"priceImpact":{"type":"number","description":"Price impact percentage"},"priceImpactPct":{"type":"string","description":"Price impact percentage (string)"},"routePlan":{"type":"array","items":{"type":"object","properties":{"swapInfo":{"type":"object","properties":{"ammKey":{"type":"string","description":"AMM key"},"label":{"type":"string","description":"AMM label"},"inputMint":{"type":"string","description":"Input token mint address"},"outputMint":{"type":"string","description":"Output token mint address"},"inAmount":{"type":"string","description":"Input amount in token atomics"},"outAmount":{"type":"string","description":"Output amount in token atomics"},"feeAmount":{"type":"string","description":"Fee amount in token atomics"},"feeMint":{"type":"string","description":"Fee token mint address"}},"required":["ammKey","label","inputMint","outputMint","inAmount","outAmount","feeAmount","feeMint"]},"percent":{"type":"number","description":"Percentage of total swap for this route"},"bps":{"type":"number","description":"BPS of total swap for this route"}},"required":["swapInfo","percent","bps"]},"description":"Array of route plan steps"},"feeBps":{"type":"number","description":"Fee in basis points"},"taker":{"type":"string","nullable":true,"description":"Taker wallet address"},"gasless":{"type":"boolean","description":"Whether the transaction is gasless"},"transaction":{"type":"string","nullable":true,"description":"Base64 encoded transaction"},"prioritizationType":{"type":"string","enum":["ComputeBudget","None"]},"prioritizationFeeLamports":{"type":"number","description":"Prioritization fee in lamports"},"inUsdValue":{"type":"number","description":"Input amount in USD"},"outUsdValue":{"type":"number","description":"Output amount in USD"},"swapUsdValue":{"type":"number","description":"Swap amount in USD"},"dynamicSlippageReport":{"type":"object","properties":{"slippageBps":{"type":"number","description":"Slippage in basis points"},"otherAmount":{"type":"number","nullable":true,"description":"Other amount in token atomics"},"simulatedIncurredSlippageBps":{"type":"number","nullable":true,"description":"Simulated incurred slippage in basis points"},"amplificationRatio":{"type":"number","nullable":true,"description":"Amplification ratio"},"categoryName":{"type":"string","description":"Token category name"},"heuristicMaxSlippageBps":{"type":"number","description":"Heuristic maximum slippage in basis points"},"rtseSlippageBps":{"type":"number","description":"Real-time slippage estimation in basis points"},"failedTxnEstSlippage":{"type":"number","description":"Failed transaction estimated slippage"},"emaEstSlippage":{"type":"number","description":"EMA estimated slippage"},"useIncurredSlippageForQuoting":{"type":"boolean","nullable":true,"description":"Whether to use incurred slippage"}},"required":["slippageBps","otherAmount","simulatedIncurredSlippageBps","amplificationRatio","categoryName","heuristicMaxSlippageBps","rtseSlippageBps","failedTxnEstSlippage","emaEstSlippage","useIncurredSlippageForQuoting"],"description":"Dynamic slippage details"},"errorMessage":{"type":"string","description":"Error message that is present if transaction is the empty string"},"totalTime":{"type":"number","description":"Time taken to generate order in milliseconds"}},"description":"Jupiter's complete order response object"},"InfSrcData":{"type":"object","properties":{"fees":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["StakePoolWithdrawStake","StakePoolDepositSol","StakePoolDepositStake","SanctumRouterGlobal","InfProtocolFee","InfLpFee","InstantUnstakeFlash","StakePoolWithdrawSol"]},"rate":{"type":"number"},"amount":{"type":"string"},"mint":{"type":"string"}},"required":["code","rate","amount","mint"]}}},"required":["fees"],"description":"Array of fees applied"},"SanctumRouterSrcData":{"type":"object","properties":{"fees":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["StakePoolWithdrawStake","StakePoolDepositSol","StakePoolDepositStake","SanctumRouterGlobal","InfProtocolFee","InfLpFee","InstantUnstakeFlash","StakePoolWithdrawSol"]},"rate":{"type":"number"},"amount":{"type":"string"},"mint":{"type":"string"}},"required":["code","rate","amount","mint"]}},"lstToSolType":{"type":"string","enum":["WithdrawWrappedSol","SwapViaStake"]}},"required":["fees"],"description":"Fees applied and swap type"},"TokenExecuteResponse":{"type":"object","properties":{"signature":{"type":"string","description":"Transaction signature"}},"required":["signature"]},"ErrorCode":{"type":"string","enum":["BAD_REQUEST","FORBIDDEN","INTERNAL_SERVER_ERROR","NOT_FOUND","TOO_MANY_REQUESTS","UNAUTHORIZED","CONFLICT","SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"SanctumErrorCode":{"type":"string","enum":["UserErr","UnsupportedUpdateErr","UnsupportedMintErr","PoolErr"],"description":"User-facing error codes that may be raised by Sanctum programs SDKs."}}}}
```

## GET /swap/depositStake/order

>

```json
{"openapi":"3.0.0","info":{"title":"Sanctum API","version":"1.0.0"},"servers":[{"url":"https://sanctum-api.ironforge.network","description":"prod"}],"paths":{"/swap/depositStake/order":{"get":{"parameters":[{"schema":{"type":"string","description":"API key"},"required":true,"name":"apiKey","in":"query"},{"schema":{"type":"string","description":"Mint of the LST to swap to or a vote account/stake program pubkey to indicate no preference for validator (delayed unstake)"},"required":true,"name":"out","in":"query"},{"schema":{"type":"string","enum":["ExactIn","ExactOut"],"default":"ExactIn","description":"ExactIn provides an exact input amount and receive a variable output amount quote. ExactOut provides an exact output amount and receive a variable input amount quote. Ignored and treated as ExactIn if input is a stake account. Some swap sources do not support ExactOut."},"required":false,"name":"mode","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Signer of the swap transaction. Optional. If omitted, response's `tx` field will be `undefined` and this endpoint will act like a quoting endpoint.","name":"signer","in":"query"},{"schema":{"type":"string"},"required":true,"description":"The stake account to deposit","name":"inpAcc","in":"query"},{"schema":{"type":"string"},"required":false,"description":"The out LST token account to receive the output LST. Defaults to `signer`'s ATA if not provided","name":"outAcc","in":"query"}],"responses":{"200":{"description":"Returns order details with unsigned tx for deposit stake","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositStakeOrderResponse"}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"418":{"description":"UNUSED. Entry here used to document error message schema. In the case of Sanctum programs SDKs errors, `error.message` will start with `${SanctumErrorCode}:`","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"$ref":"#/components/schemas/SanctumErrorCode"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["TOO_MANY_REQUESTS"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"Refers to a temporary condition which is expected to be alleviated after some delay. Currently used to suggest a Pool is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}}}}}},"components":{"schemas":{"DepositStakeOrderResponse":{"type":"object","properties":{"inp":{"type":"string","description":"Mint of the LST to swap from or Voter pubkey of the stake account to deposit/swap from"},"out":{"type":"string","description":"Mint of the LST to swap to or a vote account/stake program pubkey to indicate no preference for validator (delayed unstake)"},"mode":{"type":"string","enum":["ExactIn","ExactOut"],"default":"ExactIn","description":"ExactIn provides an exact input amount and receive a variable output amount quote. ExactOut provides an exact output amount and receive a variable input amount quote. Ignored and treated as ExactIn if input is a stake account. Some swap sources do not support ExactOut."},"tx":{"type":"string","description":"Unsigned base-64 encoded transaction to be signed and used in /execute. `undefined` if request was made with `signer=undefined`"},"swapSrcData":{"$ref":"#/components/schemas/SwapSrcData"},"inpAmt":{"$ref":"#/components/schemas/StakeAccountLamports"},"outAmt":{"type":"string","description":"Output LST amount the user will receive after fees, in token atomics. Should be the same as the one provided in the query params if mode = ExactOut"}},"required":["inp","out","swapSrcData","inpAmt","outAmt"]},"SwapSrcData":{"oneOf":[{"type":"object","properties":{"swapSrc":{"type":"string","enum":["Jup"]},"data":{"$ref":"#/components/schemas/JupiterOrderResponse"}},"required":["swapSrc","data"]},{"type":"object","properties":{"swapSrc":{"type":"string","enum":["Inf"]},"data":{"$ref":"#/components/schemas/InfSrcData"}},"required":["swapSrc","data"]},{"type":"object","properties":{"swapSrc":{"type":"string","enum":["SanctumRouter"]},"data":{"$ref":"#/components/schemas/SanctumRouterSrcData"}},"required":["swapSrc","data"]}],"description":"Data needed according to the swap source"},"JupiterOrderResponse":{"type":"object","properties":{"mode":{"type":"string","enum":["manual","ultra"],"description":"Mode of the swap"},"router":{"type":"string","description":"Router used for the swap"},"swapType":{"type":"string"},"requestId":{"type":"string","description":"Required to make a request to /execute"},"inputMint":{"type":"string","description":"Input token mint address"},"inAmount":{"type":"string","description":"Input amount in token atomics"},"outputMint":{"type":"string","description":"Output token mint address"},"feeMint":{"type":"string","description":"Fee token mint address"},"outAmount":{"type":"string","description":"Calculated output amount from routing engine"},"otherAmountThreshold":{"type":"string","description":"Calculated minimum output amount after accounting for slippageBps on the outAmount value"},"swapMode":{"type":"string","enum":["ExactIn","ExactOut"]},"slippageBps":{"type":"number","description":"Slippage tolerance in basis points"},"platformFee":{"type":"object","properties":{"amount":{"type":"string"},"feeBps":{"type":"number"}},"description":"Platform fee information"},"priceImpact":{"type":"number","description":"Price impact percentage"},"priceImpactPct":{"type":"string","description":"Price impact percentage (string)"},"routePlan":{"type":"array","items":{"type":"object","properties":{"swapInfo":{"type":"object","properties":{"ammKey":{"type":"string","description":"AMM key"},"label":{"type":"string","description":"AMM label"},"inputMint":{"type":"string","description":"Input token mint address"},"outputMint":{"type":"string","description":"Output token mint address"},"inAmount":{"type":"string","description":"Input amount in token atomics"},"outAmount":{"type":"string","description":"Output amount in token atomics"},"feeAmount":{"type":"string","description":"Fee amount in token atomics"},"feeMint":{"type":"string","description":"Fee token mint address"}},"required":["ammKey","label","inputMint","outputMint","inAmount","outAmount","feeAmount","feeMint"]},"percent":{"type":"number","description":"Percentage of total swap for this route"},"bps":{"type":"number","description":"BPS of total swap for this route"}},"required":["swapInfo","percent","bps"]},"description":"Array of route plan steps"},"feeBps":{"type":"number","description":"Fee in basis points"},"taker":{"type":"string","nullable":true,"description":"Taker wallet address"},"gasless":{"type":"boolean","description":"Whether the transaction is gasless"},"transaction":{"type":"string","nullable":true,"description":"Base64 encoded transaction"},"prioritizationType":{"type":"string","enum":["ComputeBudget","None"]},"prioritizationFeeLamports":{"type":"number","description":"Prioritization fee in lamports"},"inUsdValue":{"type":"number","description":"Input amount in USD"},"outUsdValue":{"type":"number","description":"Output amount in USD"},"swapUsdValue":{"type":"number","description":"Swap amount in USD"},"dynamicSlippageReport":{"type":"object","properties":{"slippageBps":{"type":"number","description":"Slippage in basis points"},"otherAmount":{"type":"number","nullable":true,"description":"Other amount in token atomics"},"simulatedIncurredSlippageBps":{"type":"number","nullable":true,"description":"Simulated incurred slippage in basis points"},"amplificationRatio":{"type":"number","nullable":true,"description":"Amplification ratio"},"categoryName":{"type":"string","description":"Token category name"},"heuristicMaxSlippageBps":{"type":"number","description":"Heuristic maximum slippage in basis points"},"rtseSlippageBps":{"type":"number","description":"Real-time slippage estimation in basis points"},"failedTxnEstSlippage":{"type":"number","description":"Failed transaction estimated slippage"},"emaEstSlippage":{"type":"number","description":"EMA estimated slippage"},"useIncurredSlippageForQuoting":{"type":"boolean","nullable":true,"description":"Whether to use incurred slippage"}},"required":["slippageBps","otherAmount","simulatedIncurredSlippageBps","amplificationRatio","categoryName","heuristicMaxSlippageBps","rtseSlippageBps","failedTxnEstSlippage","emaEstSlippage","useIncurredSlippageForQuoting"],"description":"Dynamic slippage details"},"errorMessage":{"type":"string","description":"Error message that is present if transaction is the empty string"},"totalTime":{"type":"number","description":"Time taken to generate order in milliseconds"}},"description":"Jupiter's complete order response object"},"InfSrcData":{"type":"object","properties":{"fees":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["StakePoolWithdrawStake","StakePoolDepositSol","StakePoolDepositStake","SanctumRouterGlobal","InfProtocolFee","InfLpFee","InstantUnstakeFlash","StakePoolWithdrawSol"]},"rate":{"type":"number"},"amount":{"type":"string"},"mint":{"type":"string"}},"required":["code","rate","amount","mint"]}}},"required":["fees"],"description":"Array of fees applied"},"SanctumRouterSrcData":{"type":"object","properties":{"fees":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["StakePoolWithdrawStake","StakePoolDepositSol","StakePoolDepositStake","SanctumRouterGlobal","InfProtocolFee","InfLpFee","InstantUnstakeFlash","StakePoolWithdrawSol"]},"rate":{"type":"number"},"amount":{"type":"string"},"mint":{"type":"string"}},"required":["code","rate","amount","mint"]}},"lstToSolType":{"type":"string","enum":["WithdrawWrappedSol","SwapViaStake"]}},"required":["fees"],"description":"Fees applied and swap type"},"StakeAccountLamports":{"type":"object","properties":{"amtStaked":{"type":"string","description":"Portion of total stake account lamports that are staked, in lamports"},"amtUnstaked":{"type":"string","description":"Portion of total stake account lamports that are unstaked, in lamports"}},"required":["amtStaked","amtUnstaked"]},"ErrorCode":{"type":"string","enum":["BAD_REQUEST","FORBIDDEN","INTERNAL_SERVER_ERROR","NOT_FOUND","TOO_MANY_REQUESTS","UNAUTHORIZED","CONFLICT","SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"SanctumErrorCode":{"type":"string","enum":["UserErr","UnsupportedUpdateErr","UnsupportedMintErr","PoolErr"],"description":"User-facing error codes that may be raised by Sanctum programs SDKs."}}}}
```

## POST /swap/depositStake/execute

>

```json
{"openapi":"3.0.0","info":{"title":"Sanctum API","version":"1.0.0"},"servers":[{"url":"https://sanctum-api.ironforge.network","description":"prod"}],"paths":{"/swap/depositStake/execute":{"post":{"parameters":[{"schema":{"type":"string","description":"API key"},"required":true,"name":"apiKey","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositStakeExecuteRequest"}}}},"responses":{"200":{"description":"Executes signed transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositStakeExecuteResponse"}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"418":{"description":"UNUSED. Entry here used to document error message schema. In the case of Sanctum programs SDKs errors, `error.message` will start with `${SanctumErrorCode}:`","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"$ref":"#/components/schemas/SanctumErrorCode"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["TOO_MANY_REQUESTS"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"Refers to a temporary condition which is expected to be alleviated after some delay. Currently used to suggest a Pool is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}}}}}},"components":{"schemas":{"DepositStakeExecuteRequest":{"type":"object","properties":{"signedTx":{"type":"string","description":"Base64 encoded signed transaction to execute"}},"required":["signedTx"]},"DepositStakeExecuteResponse":{"type":"object","properties":{"signature":{"type":"string","description":"Transaction signature"}},"required":["signature"]},"ErrorCode":{"type":"string","enum":["BAD_REQUEST","FORBIDDEN","INTERNAL_SERVER_ERROR","NOT_FOUND","TOO_MANY_REQUESTS","UNAUTHORIZED","CONFLICT","SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"SanctumErrorCode":{"type":"string","enum":["UserErr","UnsupportedUpdateErr","UnsupportedMintErr","PoolErr"],"description":"User-facing error codes that may be raised by Sanctum programs SDKs."}}}}
```

## GET /swap/withdrawStake/order

>

```json
{"openapi":"3.0.0","info":{"title":"Sanctum API","version":"1.0.0"},"servers":[{"url":"https://sanctum-api.ironforge.network","description":"prod"}],"paths":{"/swap/withdrawStake/order":{"get":{"parameters":[{"schema":{"type":"string","description":"API key"},"required":true,"name":"apiKey","in":"query"},{"schema":{"type":"string","description":"Mint of the LST to swap from or Voter pubkey of the stake account to deposit/swap from"},"required":true,"name":"inp","in":"query"},{"schema":{"type":"string","description":"Mint of the LST to swap to or a vote account/stake program pubkey to indicate no preference for validator (delayed unstake)"},"required":false,"name":"out","in":"query"},{"schema":{"type":"string","enum":["ExactIn","ExactOut"],"default":"ExactIn","description":"ExactIn provides an exact input amount and receive a variable output amount quote. ExactOut provides an exact output amount and receive a variable input amount quote. Ignored and treated as ExactIn if input is a stake account. Some swap sources do not support ExactOut."},"required":false,"name":"mode","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Signer of the swap transaction. Optional. If omitted, response's `tx` field will be `undefined` and this endpoint will act like a quoting endpoint.","name":"signer","in":"query"},{"schema":{"type":"string"},"required":false,"description":"The inp LST token account paying the input LST. Defaults to `signer`'s ATA if not provided","name":"inpAcc","in":"query"},{"schema":{"type":"number"},"required":false,"description":"Seed for generating the bridge stake account address. Defaults to a random available seed that doesn't conflict with existing accounts if not provided","name":"bridgeStakeSeed","in":"query"},{"schema":{"type":"string"},"required":true,"description":"Amount of LST to withdraw, in token atomics","name":"amt","in":"query"},{"schema":{"$ref":"#/components/schemas/YOrN"},"required":false,"description":"Whether to deactivate the withdrawn stake account or not","name":"deactivate","in":"query"}],"responses":{"200":{"description":"Returns order details with unsigned tx for withdraw stake","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawStakeOrderResponse"}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"418":{"description":"UNUSED. Entry here used to document error message schema. In the case of Sanctum programs SDKs errors, `error.message` will start with `${SanctumErrorCode}:`","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"$ref":"#/components/schemas/SanctumErrorCode"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["TOO_MANY_REQUESTS"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"Refers to a temporary condition which is expected to be alleviated after some delay. Currently used to suggest a Pool is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}}}}}},"components":{"schemas":{"YOrN":{"type":"string","enum":["y","n"],"default":"y","description":"y - yes. n - no."},"WithdrawStakeOrderResponse":{"type":"object","properties":{"inp":{"type":"string","description":"Mint of the LST to swap from or Voter pubkey of the stake account to deposit/swap from"},"out":{"type":"string","description":"Mint of the LST to swap to or a vote account/stake program pubkey to indicate no preference for validator (delayed unstake)"},"mode":{"type":"string","enum":["ExactIn","ExactOut"],"default":"ExactIn","description":"ExactIn provides an exact input amount and receive a variable output amount quote. ExactOut provides an exact output amount and receive a variable input amount quote. Ignored and treated as ExactIn if input is a stake account. Some swap sources do not support ExactOut."},"tx":{"type":"string","description":"Unsigned base-64 encoded transaction to be signed and used in /execute. `undefined` if request was made with `signer=undefined`"},"swapSrcData":{"$ref":"#/components/schemas/SwapSrcData"},"inpAmt":{"type":"string","description":"Input LST amount the user will pay after fees, in token atomics. If input is a stake account, this should be the stake account's total lamports. Should be same as the one provided in the query params if mode = ExactIn"},"outAmt":{"$ref":"#/components/schemas/StakeAccountLamports"}},"required":["inp","out","swapSrcData","inpAmt","outAmt"]},"SwapSrcData":{"oneOf":[{"type":"object","properties":{"swapSrc":{"type":"string","enum":["Jup"]},"data":{"$ref":"#/components/schemas/JupiterOrderResponse"}},"required":["swapSrc","data"]},{"type":"object","properties":{"swapSrc":{"type":"string","enum":["Inf"]},"data":{"$ref":"#/components/schemas/InfSrcData"}},"required":["swapSrc","data"]},{"type":"object","properties":{"swapSrc":{"type":"string","enum":["SanctumRouter"]},"data":{"$ref":"#/components/schemas/SanctumRouterSrcData"}},"required":["swapSrc","data"]}],"description":"Data needed according to the swap source"},"JupiterOrderResponse":{"type":"object","properties":{"mode":{"type":"string","enum":["manual","ultra"],"description":"Mode of the swap"},"router":{"type":"string","description":"Router used for the swap"},"swapType":{"type":"string"},"requestId":{"type":"string","description":"Required to make a request to /execute"},"inputMint":{"type":"string","description":"Input token mint address"},"inAmount":{"type":"string","description":"Input amount in token atomics"},"outputMint":{"type":"string","description":"Output token mint address"},"feeMint":{"type":"string","description":"Fee token mint address"},"outAmount":{"type":"string","description":"Calculated output amount from routing engine"},"otherAmountThreshold":{"type":"string","description":"Calculated minimum output amount after accounting for slippageBps on the outAmount value"},"swapMode":{"type":"string","enum":["ExactIn","ExactOut"]},"slippageBps":{"type":"number","description":"Slippage tolerance in basis points"},"platformFee":{"type":"object","properties":{"amount":{"type":"string"},"feeBps":{"type":"number"}},"description":"Platform fee information"},"priceImpact":{"type":"number","description":"Price impact percentage"},"priceImpactPct":{"type":"string","description":"Price impact percentage (string)"},"routePlan":{"type":"array","items":{"type":"object","properties":{"swapInfo":{"type":"object","properties":{"ammKey":{"type":"string","description":"AMM key"},"label":{"type":"string","description":"AMM label"},"inputMint":{"type":"string","description":"Input token mint address"},"outputMint":{"type":"string","description":"Output token mint address"},"inAmount":{"type":"string","description":"Input amount in token atomics"},"outAmount":{"type":"string","description":"Output amount in token atomics"},"feeAmount":{"type":"string","description":"Fee amount in token atomics"},"feeMint":{"type":"string","description":"Fee token mint address"}},"required":["ammKey","label","inputMint","outputMint","inAmount","outAmount","feeAmount","feeMint"]},"percent":{"type":"number","description":"Percentage of total swap for this route"},"bps":{"type":"number","description":"BPS of total swap for this route"}},"required":["swapInfo","percent","bps"]},"description":"Array of route plan steps"},"feeBps":{"type":"number","description":"Fee in basis points"},"taker":{"type":"string","nullable":true,"description":"Taker wallet address"},"gasless":{"type":"boolean","description":"Whether the transaction is gasless"},"transaction":{"type":"string","nullable":true,"description":"Base64 encoded transaction"},"prioritizationType":{"type":"string","enum":["ComputeBudget","None"]},"prioritizationFeeLamports":{"type":"number","description":"Prioritization fee in lamports"},"inUsdValue":{"type":"number","description":"Input amount in USD"},"outUsdValue":{"type":"number","description":"Output amount in USD"},"swapUsdValue":{"type":"number","description":"Swap amount in USD"},"dynamicSlippageReport":{"type":"object","properties":{"slippageBps":{"type":"number","description":"Slippage in basis points"},"otherAmount":{"type":"number","nullable":true,"description":"Other amount in token atomics"},"simulatedIncurredSlippageBps":{"type":"number","nullable":true,"description":"Simulated incurred slippage in basis points"},"amplificationRatio":{"type":"number","nullable":true,"description":"Amplification ratio"},"categoryName":{"type":"string","description":"Token category name"},"heuristicMaxSlippageBps":{"type":"number","description":"Heuristic maximum slippage in basis points"},"rtseSlippageBps":{"type":"number","description":"Real-time slippage estimation in basis points"},"failedTxnEstSlippage":{"type":"number","description":"Failed transaction estimated slippage"},"emaEstSlippage":{"type":"number","description":"EMA estimated slippage"},"useIncurredSlippageForQuoting":{"type":"boolean","nullable":true,"description":"Whether to use incurred slippage"}},"required":["slippageBps","otherAmount","simulatedIncurredSlippageBps","amplificationRatio","categoryName","heuristicMaxSlippageBps","rtseSlippageBps","failedTxnEstSlippage","emaEstSlippage","useIncurredSlippageForQuoting"],"description":"Dynamic slippage details"},"errorMessage":{"type":"string","description":"Error message that is present if transaction is the empty string"},"totalTime":{"type":"number","description":"Time taken to generate order in milliseconds"}},"description":"Jupiter's complete order response object"},"InfSrcData":{"type":"object","properties":{"fees":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["StakePoolWithdrawStake","StakePoolDepositSol","StakePoolDepositStake","SanctumRouterGlobal","InfProtocolFee","InfLpFee","InstantUnstakeFlash","StakePoolWithdrawSol"]},"rate":{"type":"number"},"amount":{"type":"string"},"mint":{"type":"string"}},"required":["code","rate","amount","mint"]}}},"required":["fees"],"description":"Array of fees applied"},"SanctumRouterSrcData":{"type":"object","properties":{"fees":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["StakePoolWithdrawStake","StakePoolDepositSol","StakePoolDepositStake","SanctumRouterGlobal","InfProtocolFee","InfLpFee","InstantUnstakeFlash","StakePoolWithdrawSol"]},"rate":{"type":"number"},"amount":{"type":"string"},"mint":{"type":"string"}},"required":["code","rate","amount","mint"]}},"lstToSolType":{"type":"string","enum":["WithdrawWrappedSol","SwapViaStake"]}},"required":["fees"],"description":"Fees applied and swap type"},"StakeAccountLamports":{"type":"object","properties":{"amtStaked":{"type":"string","description":"Portion of total stake account lamports that are staked, in lamports"},"amtUnstaked":{"type":"string","description":"Portion of total stake account lamports that are unstaked, in lamports"}},"required":["amtStaked","amtUnstaked"]},"ErrorCode":{"type":"string","enum":["BAD_REQUEST","FORBIDDEN","INTERNAL_SERVER_ERROR","NOT_FOUND","TOO_MANY_REQUESTS","UNAUTHORIZED","CONFLICT","SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"SanctumErrorCode":{"type":"string","enum":["UserErr","UnsupportedUpdateErr","UnsupportedMintErr","PoolErr"],"description":"User-facing error codes that may be raised by Sanctum programs SDKs."}}}}
```

## POST /swap/withdrawStake/execute

>

```json
{"openapi":"3.0.0","info":{"title":"Sanctum API","version":"1.0.0"},"servers":[{"url":"https://sanctum-api.ironforge.network","description":"prod"}],"paths":{"/swap/withdrawStake/execute":{"post":{"parameters":[{"schema":{"type":"string","description":"API key"},"required":true,"name":"apiKey","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawStakeExecuteRequest"}}}},"responses":{"200":{"description":"Executes signed transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawStakeExecuteResponse"}}}},"400":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"418":{"description":"UNUSED. Entry here used to document error message schema. In the case of Sanctum programs SDKs errors, `error.message` will start with `${SanctumErrorCode}:`","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"$ref":"#/components/schemas/SanctumErrorCode"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["TOO_MANY_REQUESTS"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"Refers to a temporary condition which is expected to be alleviated after some delay. Currently used to suggest a Pool is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"message":{"type":"string","description":"A human readable explanation of what went wrong"}},"required":["code","message"]}},"required":["error"]}}}}}}}},"components":{"schemas":{"WithdrawStakeExecuteRequest":{"type":"object","properties":{"signedTx":{"type":"string","description":"Base64 encoded signed transaction to execute"}},"required":["signedTx"]},"WithdrawStakeExecuteResponse":{"type":"object","properties":{"signature":{"type":"string","description":"Transaction signature"}},"required":["signature"]},"ErrorCode":{"type":"string","enum":["BAD_REQUEST","FORBIDDEN","INTERNAL_SERVER_ERROR","NOT_FOUND","TOO_MANY_REQUESTS","UNAUTHORIZED","CONFLICT","SERVICE_UNAVAILABLE"],"description":"A machine readable error code."},"SanctumErrorCode":{"type":"string","enum":["UserErr","UnsupportedUpdateErr","UnsupportedMintErr","PoolErr"],"description":"User-facing error codes that may be raised by Sanctum programs SDKs."}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.sanctum.so/docs/for-developers/sanctum-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
