exchange.IO("dexes", ...)
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
| Type | Description |
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 |
Arguments
| Name | Type | Required | Description |
k | string | Yes | Selects what the |
sources | string | No | Comma-separated list of sources. It can use the group shorthands |
See Also
Jupiter exchange.IO exchange.IO("route") exchange.IO("slippage") exchange.IO("priorityFee") exchange.CreateOrder
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.