Skip to main content
POST
/
api
/
v1
/
instructions
Get raw swap instructions
curl --request POST \
  --url https://api.argyros.xyz/api/v1/instructions \
  --header 'Content-Type: application/json' \
  --data '
{
  "userWallet": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
  "inputMint": "So11111111111111111111111111111111111111112",
  "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "amount": "1000000000",
  "swapMode": "ExactIn",
  "slippageBps": 50
}
'
{
  "success": true,
  "data": {
    "amountIn": "1000000000",
    "amountOut": "145320000",
    "otherAmountThreshold": "144593400",
    "feeAmount": "100005",
    "route": [
      "<string>"
    ],
    "hopCount": 1,
    "pools": [
      "<string>"
    ],
    "instructions": [
      {
        "programId": "<string>",
        "data": "<string>",
        "accounts": [
          {
            "publicKey": "<string>",
            "isSigner": true,
            "isWritable": true
          }
        ]
      }
    ],
    "addressLookupTableAddresses": [
      "<string>"
    ]
  }
}

Body

application/json

Parameters for getting raw swap instructions. Same as SwapRequest without skipSimulation.

userWallet
string
required

User's wallet address (signer).

Example:

"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"

inputMint
string
required
Example:

"So11111111111111111111111111111111111111112"

outputMint
string
required
Example:

"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

amount
string
required
Example:

"1000000000"

swapMode
enum<string>
required
Available options:
ExactIn,
ExactOut
Example:

"ExactIn"

slippageBps
integer
default:50
Example:

50

Response

Instructions generated successfully.

success
boolean
Example:

true

data
object

Raw swap instructions for custom transaction composition.