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

Register a token on a Jupiter exchange object, or list the token table.

exchange.IO(k)
exchange.IO(k, name, mint)

Examples

Register a token and then query its market data.

javascript
function main() { var t = exchange.IO("token", "MEW", "MEW1gQWJ3nEXg2qgERiKu7FAFj79PHvQVREQUzScPP5") Log("Registered:", t) Log(exchange.GetTicker("MEW_USDC")) }

Returns

TypeDescription

object / array / null value

When registering, returns {symbol, mint, decimals}. Without arguments, returns the token table as an array of {symbol, mint, decimals, native} (native is true for the native coin SOL). A null value is returned when the mint address is not a token or the node fails.

Arguments

NameTypeRequiredDescription

k

string

Yes

Selects what the exchange.IO() function does. Set it to token to register a token.

name

string

No

Token name used in trading pairs. It must not contain _ or , and must not be the name of a built-in token.

mint

string

No

Token's mint address; its decimals are read from the chain.

See Also

Remarks

A registration lasts only for the current run. Without registering, a token can also be written in a pair by name (resolved against Jupiter's verified token list) or by mint address; when several tokens share a name, you must register it or use the mint address.