bloXroute Documentation
WebsiteBlogTwitterDiscord
  • Welcome to bloXroute
  • Introduction
    • Why Use bloXroute?
    • Products
    • Create An Account
    • Technical Support
  • SOLANA
    • Trader API
      • Introduction
        • Regions
        • Authorization
        • Rate Limits
        • Tip and Tipping Addresses
      • Quick Start
        • Transaction Submission
        • Front-Running Protection & Transaction Bundle
        • Go SDK
        • Python SDK
        • Typescript SDK
        • Rust SDK
      • API Endpoints
        • Core Endpoints
          • submit
          • submit-paladin
          • submit-batch
          • balance
          • rate-limit
          • transaction
          • priority-fee
          • GetPriorityFeeStream
          • GetBundleTipStream
          • submit-snipe
        • Pump.fun
          • quotes
          • swap
          • swap-sol
          • GetPumpFunNewTokensStream
          • GetPumpFunSwapsStream
          • GetPumpFunAMMSwapsStream
        • Raydium
          • quotes
          • pools
          • pool-reserves
          • swap
          • cpmm-swap
          • clmm-swap
          • route-swap
          • GetPoolReservesStream
          • GetSwapsStream
          • GetNewRaydiumPoolsStream
          • GetNewRaydiumPoolsByTransactionStream
        • Jupiter
          • quotes
          • swap
          • swap-instructions
          • route-swap
        • Openbook
          • markets
          • orderbooks/{market}
          • depth/{market}
          • tickers/{market}
          • open-orders/{market}
          • unsettled/{market}
          • place
          • replace
          • cancel
          • settle
          • GetOrderbooksStream
          • GetTickersStream
      • Best Performance for Landing Transactions
      • Support
        • API Health
        • Contact us
        • Suggestions
        • Wiki
          • Terms & Concepts
          • Resources
    • Optimized Feed Relay (OFR)
      • Transaction Streamer
      • Gateway and OFR Requirements
      • Gateway and OFR Setup
      • Gateway Startup Arguments
      • OFR performance
      • Logging
      • Submitting Transaction
      • Upgrading Gateway
      • Troubleshooting
  • BSC & ETH
    • EVM Blockchain Distribution Network (BDN)
      • How to Connect
      • The bloXroute Gateway
        • Local Gateway
          • Installation and Startup
            • Authentication & Certificates
            • Requirements
            • Supported Clients
            • GitHub repository option
            • Docker container option
            • Startup Script
            • Startup Arguments
          • General Connectivity Troubleshooting
          • Logging
          • Upgrading your Gateway
        • Add Your Gateway as a Trusted Peer to Your Execution Layer Client
        • Connecting Your Gateway with the Consensus Layer
      • IPs & Relays
        • Relays IPs
        • Private Relays
        • Cloud-API IPs
          • ⏩Reducing Latencies using the BDN
    • APIs
      • Authorization
      • Check Transaction Quota
      • Submit a Transaction
        • Raw Transaction Construction
        • Tx-Validation
        • Batch Transaction
      • Private Transactions
        • ETH Private Transactions
        • BSC Private Transactions
      • Transaction Bundles
        • Bundle Simulation
        • Bundle Validation
        • Bundle Submission
          • BSC Bundle Submission
            • List of BSC Validators
          • ETH Bundle Submission
          • Bundle Submission with Gateway
        • Bundle Tracking
          • BSC Bundle-Trace
          • ETH Bundle-Trace
          • ETH Bundle Inclusion Status
        • Bundle Refunds
          • Priority Fee Refund
          • Bundle Refund
          • Latest Bundle Refunds
      • Backrun Arbitrage
        • BackRunMe: Bundle Submission
          • BSC submit arbOnly
          • ETH submit arbOnly
            • blxr_info
            • ETH arbOnly Simulation
      • Token Launch Sniping
      • Other Utilities
        • List of bloXroute Builders
        • List of External Builders
        • Tx-Trace
        • Ping
    • Streams
      • Requirements
      • Subscription limits
      • Working With Streams
        • Creating a Subscription
          • Websocket
          • gRPC
        • Handling the Notification
          • Websocket
          • gRPC
        • Cancelling a Subscription
          • Websocket
          • gRPC
        • Local Node Validation
      • newTxs and pendingTxs
        • Filters
        • Raw TX Reconstruction
      • BackRunMe: arbOnlyMEV
        • ETH arbOnlyMEV
        • BSC arbOnlyMEV
      • transactionStatus
      • txReceipts
      • newBlocks
      • bdnBlocks
      • ethOnBlock
      • MEVBlockValue
      • MEVNextProposerInfo
    • Block Builders and Validators
      • Validator Gateway
      • MEV Relay (For Validators)
      • Block Submission
      • Proposer MEV-Protect
      • Compliance Lists
      • Preconfirmations
    • Protect RPCs
      • ETH Protect RPC
      • ETH Gas Protect RPC
      • BSC Protect RPC
      • SOL Protect RPC
  • Base Network
    • Submit Transactions
    • Streams
      • GetBdnBlockStream
  • TON NETWORK
    • TON Trader API
      • Quick Start
      • Fee Schedule
      • Connection
      • Submit Signed Transaction
  • Resources
    • BDN Explorer
    • Block Explorer
    • Guides
      • Algorithmic Trading
      • Setting Up a Local Gateway
      • Gateway as Web3 Bridge
    • Architecture
      • BDN Architecture
        • Network Components
        • Performance Techniques
          • Block Compression
          • Cut-through Routing
          • Optimized Topology
      • bloXroute Protocol
        • Versioning
        • Message Structure
        • Message Types
    • Contact Us
Powered by GitBook
On this page
  • Request
  • Response:
  1. SOLANA
  2. Trader API
  3. API Endpoints
  4. Raydium

route-swap

Creates an unsigned transaction for a swap along the provided route using Raydium.

Previousclmm-swapNextGetPoolReservesStream

This endpoint does not submit the transaction to the network.

This endpoint is intended for advanced usage. A simple application of this endpoint would be to use to compute several routes, and then use the best route to create the steps in this endpoint.

The endpoint allows you to specify priority fees and tips to later control the transaction inclusion and propagation. Refer to the& page for additional information about these parameters.

Request

Method:

POST ./api/v2/raydium/route-swap

Parameters:

Parameter
Type
Description

ownerAddress

string

Solana address which is placing swap.

steps

[] RaydiumRouteStep

Route definition for each swap step.

computeLimit

number

OPTIONAL. Specifies total compute limit to be allocated for all instructions within the created tx

computePrice

number

OPTIONAL. Specifies compute price in Lamport (0.000001 SOL = 1,000 Lamport) to be included as a part of instruction, known as priority fee.

tip

uint64

RaydiumRouteStep

Parameter
Type
Description

inToken

string

Symbol or token program address of the swap-in token for the current step.

outToken

string

Symbol or token program address of the swap-out token for the current step. Mutually exclusive with project.id

inAmount

number

Amount of the swap-in token for the current step.

outAmount

number

Amount of the swap-out token for the current step.

outAmountMin

number

Minimum swap-out token amount accepted

project

StepProject

StepProject

Parameter
Type
Description

label

string

label for project name (e.g Raydium)

id

string

id for specified pool

Request example:

curl --header "Authorization: $AUTH_HEADER" -X 'POST' \
  'https://ny.solana.dex.blxrbdn.com/api/v2/raydium/route-swap' \
  -H 'Content-Type: application/json' \
  -d '{
  "ownerAddress": "AFT8....UDfQ",
  "steps": [
    {
      "inToken": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "outToken": "So11111111111111111111111111111111111111112",
      "inAmount": 0.01,
      "outAmount": 0.010769,
      "outAmountMin": 0.010662
    },
    {
      "inToken": "So11111111111111111111111111111111111111112",
      "outToken": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
      "inAmount": 0.007505,
      "outAmount": 0.002497,
      "outAmountMin": 0.002472
    }
  ]
}'

Response:

Fields:

Field
Type
Description

transactions

array

See transactions below for details.

outAmountMin

number

Amount of tokens expected from the swap

minOutAmount

number

Minimum amount of tokens allowed from swap given slippage

priceImpact

object

Impact of swap upon the pool's liquidity. See priceImpact below for details.

fee

array

Fee paid to AMM project. See fee below for details.

priceImpact

Field
Type
Description

percent

number

Percentage impact on price.

infinity

string

Indicates possible infinity values: INF_NOT, INF_POSITIVE, INF_NEGATIVE. Usually INF_NOT.

fee

Field
Type
Description

amount

number

Amount paid to AMM project

mint

string

Token currency the fee is paid in

percent

number

Percentage of the swap consumed by the fee

Example:

{
  "transactions":[
    {
      "content":"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAghiWzbp+CkCcJi59TMOtcwykOMxiR/ZjYUe7GooT7b4isYMCheBFJRSX0HJMby9ZE+e34jiXrm6KnpL+Ox0Y/f9LlXFFGWLbo/H1aB5QdgwG6hUhGoMTtA6kyf5VxafJjKUmWLcB3CjJGm9D2TmvXTixOEV9QtjnIifGGZqREv8Wi1d34DJcGkbpBgYUEk9ecetETmxlYFxFwbIEvX9tRs44TFA+MCL5QSdHLCOmjy4r/0O/A1Bw41s0tbmdsFnwxpwXmb3tpHDP1X6IcHUAToM9mV4zMml18jdsCUH5F0ieZCOriB3q/T3b4ogYp2efEy7IfXXwHWH/V3A5GmeHGfUj1wfS8ERCQdk18D5wISsVPYBXyt1PlvjwM1Vyeik2yfhhdvMhWi2OSoukI9Fln/W8p0N7W+sKZ9zB0oE8754u7pV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FBUWFx8MGA0AAQE=",
      "isCleanup":false
    }
  ],
  "outAmount":0.002497,
  "outAmountMin":0.002472,
  "priceImpact":{
    "percent":0,
    "infinity":"INF_NOT"
  },
  "fees":[
    
  ]
}

OPTIONAL. Specifies a tip amount that will be used to pay for front-running protection or bundle submission services.

Get Quotes
Transaction Submission
Front-Running Protection & Transaction Bundle
What is tip?