Type/to search
Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
Capability Matrix
Centralized Exchanges
Decentralized Exchanges (DEX)
Prediction Markets
Securities and Futures
On-chain & Custom

When called as exchange.IO("dexes", ...), this function restricts the liquidity sources that swaps go through on a Jupiter exchange object, for example to trade only on pump.fun, Meteora or Raydium.

exchange.IO(k)
exchange.IO(k, sources)

Examples

Trade a new token on pump.fun only.

javascript
function main() { exchange.IO("dexes", "pump") exchange.IO("token", "POUT", "DB5QKorV9KHY54y73h5xWQqYyuD8P3jC1p5Ea8DBpump") var t = exchange.GetTicker("POUT_SOL") Log("Bid", t.Buy, "Ask", t.Sell, "via", t.Info.askRoute) }

Returns

TypeDescription

array / null value

Returns the array of source names currently in effect (groups expanded; an empty array means no restriction). If a source name is not in Jupiter's source table, a null value is returned, the setting is left unchanged, and GetLastError() lists the available source names.

Arguments

NameTypeRequiredDescription

k

string

Yes

Selects what the exchange.IO() function does. Set it to dexes to restrict the liquidity sources.

sources

string

No

Comma-separated list of sources. It can use the group shorthands pump (Pump.fun, Pump.fun Amm), meteora (Meteora, Meteora DAMM v2, Meteora DLMM), raydium (Raydium, Raydium CLMM, Raydium CP, Raydium Launchlab) and orca (Whirlpool, Orca V1, Orca V2), or Jupiter source names (case-sensitive). An empty string "" removes the restriction. Omit it to query the current setting.

See Also

Remarks

With a restriction in place, market data (exchange.GetTicker(), exchange.GetDepth()), quotes and orders all go through these sources only; when no route can be found the call reports that there is no route. The "Liquidity Sources" setting in the exchange configuration is the initial value of the same setting.