Jupiter
SDK reference for jupiter operations
Overview
Jupiter DEX integration for Solana token swaps and portfolio management
- Category:
crypto - Auth Required: No
- Supported Modes: standard, delegated
Operations
swap
Execute a token swap on Jupiter DEX. Returns normalized FLAT structure with transaction, signerWallet, inputMint, outputMint, inputAmount, expectedOutputAmount, priceImpact, slippageBps. No nested objects.
Arguments:
inputMint(string, required): Input token mint addressoutputMint(string, required): Output token mint addressamount(number, required): Amount to swap (in smallest unit)inputDecimals(number, required): Number of decimals for input tokenslippageBps(number, optional): Slippage tolerance in basis points (default: 50)
Returns:
AdapterOperationResult - Returns { type, transaction, requestId, signerWallet, expiresAt, inputMint, outputMint, inputAmount, inputDecimals, expectedOutputAmount, priceImpact, slippageBps, hasRoutePlan, routeStepCount }. FLAT structure.
Response Fields:
| Field | Type | Description |
|---|---|---|
type | 'pending_transaction' | Response type |
transaction | string | Base64 encoded serialized transaction |
requestId | string | Jupiter request ID (for execute endpoint) |
signerWallet | string | Wallet address that needs to sign |
expiresAt | string | Expiration timestamp (ISO 8601) |
inputMint | string | Input token mint address |
outputMint | string | Output token mint address |
inputAmount | string | Input amount as string |
inputDecimals | number | Input token decimals |
expectedOutputAmount | string | Expected output amount |
priceImpact | string | Price impact percentage |
slippageBps | number | Slippage tolerance in basis points |
hasRoutePlan | boolean | Whether swap has a route plan |
routeStepCount | number | Number of steps in route |
Example:
getHoldings
Get token holdings for a wallet. Returns normalized FLAT structure with owner, solBalance, totalValueUsd, tokenCount, and tokens array.
Arguments:
walletAddress(string, optional): Wallet address to check (uses actor wallet if not provided)
Returns:
AdapterOperationResult - Returns { owner, solBalance, totalValueUsd, tokenCount, tokens[] }. Each token has FLAT fields: mint, symbol, name, decimals, balance, uiBalance, logoURI, priceUsd, valueUsd, accountCount. No nested objects.
Response Fields:
| Field | Type | Description |
|---|---|---|
owner | string | Wallet owner address |
solBalance | number | Native SOL balance |
totalValueUsd | number | Total portfolio value in USD |
tokenCount | number | Number of tokens held |
tokens | JupiterTokenBalance[] | List of token balances |
tokens item fields (JupiterTokenBalance)
| Field | Type | Description |
|---|---|---|
mint | string | Token mint address |
symbol | string | Token symbol |
name | string | Token name |
decimals | number | Token decimals |
balance | string | Raw balance string |
uiBalance | number | Human-readable balance |
logoURI | string | Token logo URL (empty if not available) |
priceUsd | number | Token price in USD (0 if not available) |
valueUsd | number | Total value in USD (0 if not available) |
accountCount | number | Number of token accounts for this mint |
Example:
getTokenSecurity
Get token security information using Jupiter Shield. Returns normalized FLAT structure with riskLevel, warningCount, and security flags.
Arguments:
tokenMint(string, required): Token mint address to check security for
Returns:
AdapterOperationResult - Returns { mint, riskLevel, warningCount, hasCriticalWarning, hasFreezableWarning, hasMintableWarning, warnings[] }. Each warning has FLAT fields: type, message, severity, source. No nested objects.
Response Fields:
| Field | Type | Description |
|---|---|---|
mint | string | Token mint address |
riskLevel | ``'safe' | 'low' |
warningCount | number | Number of warnings |
hasCriticalWarning | boolean | Whether there are critical warnings |
hasFreezableWarning | boolean | Whether token can be frozen |
hasMintableWarning | boolean | Whether token can be minted |
warnings | JupiterSecurityWarning[] | List of security warnings |
warnings item fields (JupiterSecurityWarning)
| Field | Type | Description |
|---|---|---|
type | string | Warning type |
message | string | Warning message |
severity | ``'info' | 'warning' |
source | string | Warning source (empty if not available) |
Example:
searchTokens
Search for tokens by symbol, name, or mint address. Returns normalized FLAT token results with all fields flattened.
Arguments:
query(string, required): Search query (symbol, name, or mint address)
Returns:
AdapterOperationResult - Returns { query, count, results[] }. Each result has FLAT fields: mint, symbol, name, decimals, iconUrl, twitter, telegram, website, holderCount, circSupply, totalSupply, mintAuthorityDisabled, freezeAuthorityDisabled, organicScore, isVerified, fdv, marketCap, priceUsd, liquidity, dailyPriceChange, tags[]. No nested audit or stats objects.
Response Fields:
| Field | Type | Description |
|---|---|---|
query | string | Search query used |
count | number | Number of results |
results | JupiterTokenSearchResult[] | List of matching tokens |
results item fields (JupiterTokenSearchResult)
| Field | Type | Description |
|---|---|---|
mint | string | Token mint address |
symbol | string | Token symbol |
name | string | Token name |
decimals | number | Token decimals |
iconUrl | string | Token icon URL (empty if not available) |
twitter | string | Twitter handle (empty if not available) |
telegram | string | Telegram link (empty if not available) |
website | string | Website URL (empty if not available) |
holderCount | number | Number of token holders |
circSupply | number | Circulating supply |
totalSupply | number | Total supply |
tokenProgram | string | Token program ID |
launchpad | string | Launchpad name (empty if not available) |
mintAuthorityDisabled | boolean | Whether mint authority is disabled |
freezeAuthorityDisabled | boolean | Whether freeze authority is disabled |
topHoldersPercentage | number | Percentage held by top holders |
devBalancePercentage | number | Percentage held by dev |
isSuspicious | boolean | Whether token is flagged as suspicious |
highSingleOwnership | boolean | Whether there is high single ownership |
organicScore | number | Organic activity score |
organicScoreLabel | string | Organic score label |
isVerified | boolean | Whether token is verified |
fdv | number | Fully diluted valuation (0 if not available) |
marketCap | number | Market cap (0 if not available) |
priceUsd | number | Price in USD (0 if not available) |
liquidity | number | Liquidity (0 if not available) |
dailyPriceChange | number | 24h price change (0 if not available) |
dailyHolderChange | number | 24h holder change (0 if not available) |
dailyLiquidityChange | number | 24h liquidity change (0 if not available) |
dailyVolumeChange | number | 24h volume change (0 if not available) |
dailyBuyVolume | number | 24h buy volume (0 if not available) |
dailySellVolume | number | 24h sell volume (0 if not available) |
tags | string[] | Token tags |
Example:
refreshSwap
Refresh an expired swap with new quote and transaction. Returns normalized FLAT structure.
Arguments:
feedItemId(string, required): Feed item ID containing the swap to refreshswapId(string, required): Original swap IDinputMint(string, required): Input token mint addressoutputMint(string, required): Output token mint addressamount(number, required): Amount to swap (in UI units)inputDecimals(number, required): Input token decimalsslippageBps(number, optional): Slippage tolerance in basis points
Returns:
AdapterOperationResult - Returns { type, transaction, requestId, signerWallet, expiresAt, refreshedAt, inputMint, outputMint, inputAmount, inputDecimals, expectedOutputAmount, priceImpact, slippageBps, hasRoutePlan, routeStepCount }. FLAT structure.
Response Fields:
| Field | Type | Description |
|---|---|---|
type | 'pending_transaction' | Response type |
transaction | string | Base64 encoded serialized transaction |
requestId | string | Jupiter request ID (for execute endpoint) |
signerWallet | string | Wallet address that needs to sign |
expiresAt | string | Expiration timestamp (ISO 8601) |
refreshedAt | string | Refresh timestamp (ISO 8601) |
inputMint | string | Input token mint address |
outputMint | string | Output token mint address |
inputAmount | string | Input amount as string |
inputDecimals | number | Input token decimals |
expectedOutputAmount | string | Expected output amount |
priceImpact | string | Price impact percentage |
slippageBps | number | Slippage tolerance in basis points |
hasRoutePlan | boolean | Whether swap has a route plan |
routeStepCount | number | Number of steps in route |
Example:
launchToken
Launch a new token on Solana via Jupiter Studio. Creates a DBC (Dynamic Bonding Curve) pool. The user must have uploaded a token image in this conversation — pass the image URL provided in the chat. Returns a pending_transaction for the user to sign. FLAT structure.
Arguments:
tokenName(string, required): Name of the tokentokenSymbol(string, required): Token ticker symboltokenDescription(string, optional): Description for the token metadatatokenImageUrl(string, required): URL of the uploaded token image (from user message)quoteMint(string, optional): Quote token mint address. Defaults to USDC (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v). Can also use SOL or JUP mint.initialMarketCap(number, optional): Initial market cap in quote token units (default: 16000 for meme preset)migrationMarketCap(number, optional): Market cap threshold for graduation/migration (default: 69000 for meme preset)antiSniping(boolean, optional): Enable anti-sniping protection (default: false)feeBps(number, optional): Creator trading fee in basis points: 100 (1%) or 200 (2%). Default: 100isLpLocked(boolean, optional): Lock LP tokens (default: true)website(string, optional): Project website URL for token metadatatwitter(string, optional): Twitter/X URL for token metadatatelegram(string, optional): Telegram URL for token metadata
Returns:
AdapterOperationResult - Returns { type, transaction, mint, signerWallet, expiresAt, tokenName, tokenSymbol, imageUrl }. FLAT structure.
Response Fields:
| Field | Type | Description |
|---|---|---|
type | 'pending_transaction' | Response type |
transaction | string | Base64 encoded unsigned transaction |
mint | string | New token mint address |
signerWallet | string | Wallet that needs to sign |
expiresAt | string | Expiration timestamp (ISO 8601) |
tokenName | string | Token name |
tokenSymbol | string | Token symbol |
imageUrl | string | Onchain image URL (from Jupiter) |
Example: