Sui
Every product of the yolo API runs on Sui: market data, wallets and P/L, swaps, launchpads, perps, lending, research, streams and MCP. History reaches back to the start of Sui mainnet.
What works here
Base path and chain
One base URL for every chain. No chain parameter (or chain=sui).
https://yolo.casa/api/v1https://yolo.casa/api/v1/token?type=0x2::sui::SUIAuthorization: Bearer $YOLO_API_KEYAddresses and amounts
| What | Format | Example |
|---|---|---|
| Coin | Full Move coin type: package::module::NAME | 0x2::sui::SUI |
| Wallet | 0x plus 64 hex characters | 0x0000000000000000000000000000000000000000000000000000000000000001 |
| Amounts | Strings in the coin's base units. SUI has 9 decimals; a coin's decimals are in its token data. USD values are numbers. | |
Venues
| Aggregated swaps | Best of Aftermath, Cetus and yolo's own router across Sui DEXes |
| Launchpads | SuiPump, PopularSui, Amped, Cetus direct, Perpsplexity, Blast |
| Lending | Current, Navi, Suilend, Scallop, Abyss |
| Perps | Perpsplexity markets |
Sign and send
swap/build and lending/build return an unsigned transaction kind. Your wallet adds gas, signs and executes it on Sui mainnet; keep its commands exactly as returned. Each build aborts on chain below its minimum out.
import { Transaction } from '@mysten/sui/transactions';
const yolo = (path, body) =>
fetch(`https://yolo.casa/api/v1/${path}`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.YOLO_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify(body),
}).then((r) => r.json());
// 1. Quote 1 SUI into USDC for this wallet.
const { data: quote } = await yolo('swap/quote', {
coinIn: '0x2::sui::SUI',
coinOut: USDC_COIN_TYPE,
amountIn: '1000000000',
owner: OWNER,
});
// 2. Build the unsigned transaction kind.
const { data: built } = await yolo('swap/build', {
id: quote.id,
slippageBps: 100,
owner: OWNER,
});
// 3. Your wallet adds gas, signs and executes it.
const tx = Transaction.fromKind(built.kind);
tx.setSender(OWNER);
// then sign and execute tx with your wallet or SDK clientFees
Swap quotes and builds are free to call. Each swap pays a 20 bps yolo fee on chain, and the quote's amountOut is net of it. Other API calls cost credits past the free allowance.
Coverage and freshness
Live from GET /status.
Endpoints
Every endpoint that works on Sui. Open one for its parameters, examples, a live response and a runner.
/discovery
Discover capabilities and current prices
/auth/challenge
Request a wallet ownership challenge
/auth/keys
Sign the challenge and create an API key
/account
Read credit balance, payment recipient and pricing
/keys
List your keys with a wallet session; bearer authentication lists only its own key
/keys
Create a key from your signed-in account
/keys/{id}
Revoke a key
/credits/intent
Build an unsigned USDC top-up transaction
/credits/deposit
Verify a completed payment and credit your account once
/tokens
List Sui tokens: trending, new, top, gainers, bonding, graduated
/search
Search tokens by symbol, name or coin type
/trending
Trending tokens ranked by real traders, each with the reason it ranks
/pulse
Launchpad coins in three columns: new, about to bond, and bonded
/launches
Newest launches, optionally for one launchpad
/token
One token's market data, and whether it is a CTO (community takeover) with its CTO score
/candles
OHLCV candles. Page back with before; history reaches mid 2023 where the coin existed
/trades
A token's trades, newest first
/token/security
Risk checks: mint, freeze and metadata control, dev, insiders, snipers, bundles, top 10 share, liquidity
/token/holders
Holders by size with labels, cost basis and P/L
/token/bubbles
Bubble map of the top 100 holders: funding clusters, bundles, snipers, insiders
/token/top-traders
A token's top traders in a window
/token/pnl
All-time winners and losers of a token by realized, unrealized or total P/L
/token/cost-basis
Where holders bought: cost basis distribution of a token
/wallet/portfolio
A wallet's coins, value, cost basis, perps account and DeFi positions
/wallet/pnl
A wallet's realized and unrealized P/L, win rate, volume and per-coin results in a window
/wallet/pnl-series
A wallet's P/L over time, for charts
/wallet/trades
A wallet's trades, newest first, back to mid 2023
/wallet/labels
Names and labels for up to 50 wallets: KOL, exchange, smart money, whale, SuiNS
/wallet/search
Find traders by username, SuiNS name or address
/wallet/xray
A wallet's trading style and history at a glance
/wallet/flows
What a wallet received and sent in transfers, per coin, or its top counterparties
/wallet/copy-backtest
What copying a wallet's trades would have returned
/dev/report
A developer wallet's launch record
/smart-money
Trades by smart money, whales and KOLs, newest first
/leaderboard
Top wallets or teams by realized P/L. A launchpad filter ranks traders of that launchpad's coins
/launchpads
Launchpads with fees, status and listed coin counts
/launchpads/league
Launchpads compared over 7 days, 30 days and all time
/perps/markets
Perps markets with mark price, open interest, funding rate and next funding time
/perps/market
One perps market by id or symbol
/perps/candles
A perps market's candles
/status
Service status: API, stream, indexer lag and the time each dataset is complete through
/usage
This key's tier, limits, free requests used today and credits spent today
/lending/markets
Compare available lending markets
/lending/positions
Read a wallet's lending positions
/swap/quote
Get an aggregated swap quote. amountOut is what the wallet receives after every fee; feeBps, fee and partnerFee show the fees
/swap/build
Build an unsigned swap, or its route commands, for a wallet
/route-commands.ts
TypeScript helper with no dependencies: addYoloRoute(tx, plan, coinIn) appends a commands-mode plan to your Transaction and returns the output coin
/lending/build
Build an unsigned lending deposit or withdrawal
/credits/funding-policy
Read account-wide automatic funding limits and usage
/credits/funding-policy
Enable or disable durable funding limits from a wallet session
/activity
Read request and research receipts; bearer keys see only their own activity
/research/estimate
Preview coverage and pricing without scanning history; actual charge is unknown until execution
/research/jobs
Reserve a spending cap and enqueue scoped historical research
/research/jobs/{id}
Read research status, result, evidence coverage and usage receipt
/research/jobs/{id}
Request cancellation of a research job
/research/jobs/{id}/cancel
Request cancellation of a research job
/research/jobs/{id}/events
Stream status events for up to 55 seconds; reconnect or poll status