exchange.IO("token", ...)
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
| Type | Description |
object / array / null value | When registering, returns |
Arguments
| Name | Type | Required | Description |
k | string | Yes | Selects what the |
name | string | No | Token name used in trading pairs. It must not contain |
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.