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. Jupiter

route-swap

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

Previousswap-instructionsNextOpenbook

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.

Request

Method:

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

The tip parameter is currently not supported. You can create an additional transaction with an tip instruction and submit the swap & tip transactions as a .

Parameters:

Parameter
Type
Description

ownerAddress

string

Solana address which is placing swap.

steps

[]JupiterRouteStep

Route definition for each swap step.

slippage

double

The maximum slippage tolerance in percentage.

computePrice

uint64

OPTIONAL. Specifies compute price in Lamport (0.000001 SOL = 1,000 Lamport) to overwrite default Jupiter compute price.

JupiterRouteStep

Parameter
Type
Description

inToken

string

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

outToken

string

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

inAmount

double

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

outAmount

double

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

fee

Fee

Fee information. See fee for detail.

project

StepProject

See StepProject below

StepProject

Parameter
Type
Description

label

string

Cosmetic label describing containing project. Not necessary for this usage.

id

string

Pool address to swap through for this step. Mandatory for Jupiter swaps, to distinguish between different AMM projects available in Jupiter.

Fee

Parameter
Type
Description

amount

float

Amount of the fee being charged off.

mint

string

Token mint address of the token being charged off.

percent

float

Percentage of the swap was charged as fee.

Request example:

curl --header "Authorization: $AUTH_HEADER" -X 'POST' \
  'https://ny.solana.dex.blxrbdn.com/api/v2/jupiter/route-swap' \
  -H 'Content-Type: application/json' \
  -d '{
    "ownerAddress": "AFT8...UDfQ",
    "steps": [
        {
            "project": {
                "label": "Invariant",
                "id": "2SgUGxYDczrB6wUzXHPJH65pNhWkEzNMEx3km4xTYUTC"
            },
            "inToken": "So11111111111111111111111111111111111111112",
            "outToken": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
            "inAmount": 0.1,
            "outAmount": 0.000099274,
            "fee": {
                "amount": 0.000001,
                "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
                "percent": 0.0001
            }
        }
    ]
}'

Response:

Fields:

Field
Type
Description

transactions

[] TransactionMessage

See TransactionMesasge below below for details.

outAmount

double

Amount of tokens expected from the swap

outAmountMin

double

Minimum amount of tokens allowed from swap given slippage

priceImpact

PriceImpactV2

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

fee

[]Fee

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

TransactionMessage

Parameter
Description

content

txbase64Payload

Raw bytes of signed transaction.

PriceImpactV2

Field
Type
Description

percent

double

Percentage impact on price.

infinity

string

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

Fee

Field
Type
Description

amount

float

Amount paid to AMM project

mint

string

Token currency the fee is paid in

percent

float

Percentage of the swap consumed by the fee

Example:

Get Quotes
Bundle