jupiter-exchange
v1.1.4
Published
Jupiter Exchange wrapper for Node.js
Readme
jupiter-exchange
Jupiter Exchange wrapper for Node.js
npm i jupiter-exchangeUsage
const Jupiter = require('jupiter-exchange')
const jup = new Jupiter()
// Tokens
const found = await jup.tokens.search('something')
const newTokens = await jup.tokens.new({ limit: 500 })
const tagged1 = await jup.tokens.tagged('verified')
const tagged2 = await jup.tokens.tagged('lst')
const tagged3 = await jup.tokens.tagged('token-2022')
const tagged4 = await jup.tokens.tagged('moonshot')
const tagged5 = await jup.tokens.tagged('pump')
const tradableTokens = await jup.tokens.tradable()
const allTokens = await jup.tokens.all()List pools
const listPools = await jup.pools.list()
// => { pools, total, next }
const nextPage = await jup.pools.list({ offset: list.next })Top pools
const organic = await jup.pools.topOrganic()
const traded = await jup.pools.topTraded()
const newer = await jup.pools.topNew()
// => { pools }Top holders
const listHolders = await jup.holders('<address...>')
// => { holders, count }Transactions (buy, sell, etc)
const transactions = await jup.txs('<address...>')
// => { txs, next }
const txsNextPage = await jup.txs('<address...>', { offset: list.next })API
jup = new Jupiter()
Create jup.ag instance.
found = await jup.tokens.search(input)
Search tokens by words. Returns { tokens: [...] }.
newTokens = await jup.tokens.new([options])
Get all of the new tokens. Returns an array.
Options:
{
offset,
limit
}tagged = await jup.tokens.tagged(tag)
Get tagged tokens. Returns an array.
Possible tags:
verifiedCommunity-verified via catdetlist.jup.ag and Jupiter Strict.lstLiquid staked tokens, with Sanctumtoken-2022moonshotmoonshoot.moneypumppump.fun
tradableTokens = await jup.tokens.tradable()
Get all tradable tokens. Returns an array.
allTokens = await jup.tokens.all([options])
Get all tokens. Returns an array.
Note: This takes +350MB.
Options:
{
offset,
limit
}list = await jup.pools.list([options])
Get pools. Returns { pools, total, next }.
Options:
{
createdAt, // In milliseconds
sortBy, // E.g. 'listedTime'
sortDir, // E.g. 'desc'
offset,
limit
}Paging example:
const page1 = await jup.pools.list()
const page2 = await jup.pools.list({ offset: page1.next })list = await jup.pools.topOrganic()
Get top organic pools by 24h timeframe. Returns { pools }.
list = await jup.pools.topTraded(timeframe)
Get top traded pools. Returns { pools }.
Timeframe can be: 5m, 1h, 6h, and 24h.
list = await jup.pools.new([options])
Get new pools. Returns { pools }.
Options:
{
createdAt: Date.now() - 86400 * 1000
}list = await jup.holders(tokenAddress)
Get top holders addresses. Returns { holders, count }.
list = await jup.txs(tokenAddress)
Get transactions. Returns { txs, next }.
Paging example:
const page1 = await jup.txs()
const page2 = await jup.txs({ offset: page1.next })portfolio = await jup.portfolio(address[, options])
Get holding reports about an account.
Options:
{
turnstile: String // Header x-turnstile-token
}License
MIT
