Market data
Public reads. Prices, rules, depth, the tape, funding and rankings.
Nothing on this page needs a key. Every route here is cached server-side and shared across callers, so the answer you get is the answer the app's own screens are rendering.
GET/api/prep/markets
The moving half of the market data: prices, 24h statistics, funding and open interest. Active markets only, sorted by 24h quote volume, descending. Cached for five seconds.
{
"markets": [
{
"symbol": "PERP_ETH_USDC",
"display_symbol_name": "ETH",
"status": "ACTIVE",
"index_price": 2412.55,
"mark_price": 2412.61,
"sum_unitary_funding": 12.4471,
"est_funding_rate": 0.0000125,
"last_funding_rate": 0.0000098,
"next_funding_time": 1717174800000,
"open_interest": 18422.4,
"24h_open": 2380.1,
"24h_close": 2412.61,
"24h_high": 2440.0,
"24h_low": 2361.2,
"24h_volume": 91422.5,
"24h_amount": 220144821.3,
"base": "ETH",
"change24hPct": 1.3659
}
]
}base and change24hPct are computed here; everything else is the upstream row. change24hPct is a percentage, not a fraction, and is zero when the open was zero.
GET/api/prep/market-rules
The static half: tick sizes, notional limits, precision and maximum leverage. Cached for an hour, because these change when a market is relisted and almost never otherwise. Join it to the prices on your side rather than re-downloading it on a poll.
{
"rules": [
{
"symbol": "PERP_ETH_USDC",
"maxLeverage": 50,
"info": {
"symbol": "PERP_ETH_USDC",
"display_symbol_name": "ETH",
"quote_min": 0,
"quote_max": 100000,
"quote_tick": 0.01,
"base_min": 0.001,
"base_max": 1000,
"base_tick": 0.0001,
"min_notional": 10,
"price_range": 0.03,
"price_scope": 0.4,
"funding_period": 8,
"cap_funding": 0.0075,
"floor_funding": -0.0075,
"base_imr": 0.02,
"base_mmr": 0.01
}
}
]
}- base_tick is the quantity step. An order size that is not a multiple of it is rejected.
- quote_tick is the price step for a limit order.
- min_notional is the smallest order value. Size times price must clear it.
- maxLeverage is derived here as the reciprocal of base_imr, rounded, because the leverage is not published directly.
GET/api/prep/orderbook
| Parameter | Type | Required | Notes |
|---|---|---|---|
| symbol | string | yes | PERP_<BASE>_USDC. Anything else is invalid_request. |
Never cached: a stale book is worse than no book. Prices and quantities are strings, not numbers.
{
"symbol": "PERP_ETH_USDC",
"mid_price": "2412.58",
"spread": "0.06",
"asks": [{ "price": "2412.61", "quantity": "4.2" }],
"bids": [{ "price": "2412.55", "quantity": "6.8" }],
"ts": 1717171717171
}GET/api/prep/candles
| Parameter | Type | Required | Notes |
|---|---|---|---|
| symbol | string | yes | PERP_<BASE>_USDC. |
| interval | string | no | One of 1m, 5m, 15m, 30m, 1h, 4h, 12h, 1d, 1w. Defaults to 1h. Anything else is invalid_request. |
| limit | number | no | Clamped to 1 to 500. Defaults to 100. |
{
"rows": [
{
"open": "2380.10",
"high": "2440.00",
"low": "2361.20",
"close": "2412.61",
"volume": "91422.5",
"timestamp": 1717171200000
}
]
}GET/api/prep/trades
| Parameter | Type | Required | Notes |
|---|---|---|---|
| symbol | string | yes | PERP_<BASE>_USDC. |
| limit | number | no | Clamped to 1 to 200. Defaults to 50. |
{
"trades": [
{
"symbol": "PERP_ETH_USDC",
"side": "BUY",
"executed_price": 2412.61,
"executed_quantity": 0.4,
"executed_timestamp": 1717171717171
}
]
}The public tape. It carries no identity: there is no address on a fill and no way to attribute one.
GET/api/prep/funding
| Parameter | Type | Required | Notes |
|---|---|---|---|
| symbol | string | yes | PERP_<BASE>_USDC. |
{
"symbol": "PERP_ETH_USDC",
"est_funding_rate": 0.0000125,
"last_funding_rate": 0.0000098,
"next_funding_time": 1717174800000,
"sum_unitary_funding": 12.4471
}A positive rate means longs pay shorts. Every market carries est_funding_rate on /api/prep/markets too, so ranking the whole board takes one call rather than one per symbol.
GET/api/prep/config
No parameters. The account-level leverage ladder, parsed into numbers and cached for an hour.
{ "leverageSteps": [1, 2, 3, 4, 5, 10, 20, 50] }GET/api/prep/tokens
No parameters. Collateral assets and their per-chain details, cached for an hour.
{
"rows": [
{
"token": "USDC",
"decimals": 6,
"chain_details": [
{ "chain_id": "42161", "withdraw_fee": 1.0, "decimals": 6 }
]
}
]
}GET/api/prep/deposit-chains
No parameters. Chains this venue accepts settlement-asset deposits on, joined with the USDC address on each. A chain with no USDC address is dropped, because it cannot be deposited from whatever the vault list says.
{
"rows": [
{
"chainId": 42161,
"name": "Arbitrum",
"vault": "0x<20 byte address>",
"usdc": "0x<20 byte address>",
"explorer": "https://arbiscan.io",
"nativeSymbol": "ETH",
"withdrawalFee": 1.0,
"decimals": 6
}
]
}GET/api/prep/insurance-fund
No parameters. The balance of the fund that backstops liquidations. The handler forwards the upstream object without reshaping it and the code declares it only as an object, so the field names are not documented here rather than guessed at. Call it once and read what comes back.
GET/api/prep/liquidations
| Parameter | Type | Required | Notes |
|---|---|---|---|
| size | number | no | Clamped to 1 to 100. Defaults to 20. |
The exchange-wide liquidation feed, as { "rows": [...] }. The row shape is the upstream's and the code declares it only as an object, so it is not written out here.
GET/api/prep/leaderboard
| Parameter | Type | Required | Notes |
|---|---|---|---|
| window | string | no | 24h, 7d or 30d. Anything else falls back to 24h. |
| sort | string | no | volume, pnl or notional. Anything else falls back to volume. |
| limit | number | no | Defaults to 50, clamped to 1 to 200. |
An invalid parameter falls back rather than failing: a leaderboard is a browsing surface, and refusing to render one because a query string was mistyped serves nobody. window applies to volume and pnl only — open notional is the book as it stands now, so sorting by notional ignores the window rather than quietly meaning something by it.
{
"rows": [
{
"address": "0x1234…abcd",
"rank": 1,
"volume": 91422533.1,
"pnl": 184221.7,
"notional": 4210044.9
}
],
"total": 50,
"updatedAt": 1717171717171
}total is how many ranked rows this response carries, not how many traders the platform has. There is no grand total to report, so none is invented.
GET/api/prep/whales
| Parameter | Type | Required | Notes |
|---|---|---|---|
| limit | number | no | Defaults to 25, clamped to 1 to 200. |
The same rows and the same shape as the leaderboard, fixed to a 24h window and sorted by open notional. Size is what moves a market, and it is the one of the two that a lucky week cannot fake.
GET/api/prep/points
| Parameter | Type | Required | Notes |
|---|---|---|---|
| address | string | yes | 0x and 40 hex characters. Anything else is invalid_address. |
Merits earned by one address, plus the epoch dates. The rewards module is enabled per operator and is not switched on for this one, so this answers 200 with enabled false rather than an error: a feature that is off is a configuration state, not a fault.
{ "enabled": false, "merits": null, "epochs": null }When it is switched on, merits and epochs carry the upstream payloads and enabled becomes true. A timeout or a rate limit still surfaces as an error, because reporting an outage as a feature flag would hide it.
GET/api/prep/op/{id}
One dispatcher for every catalogued read. Path parameters are supplied in the query string, substituted into the upstream path and encoded, so a value cannot escape its segment. Only the parameters listed for an operation are forwarded; anything else is dropped rather than passed along.
- An unknown id is not_found, because the catalogue is published and asking for something absent from it is a stale client.
- A missing required parameter is invalid_request naming the parameter.
- broker_id, where an operation takes one, is always set to this operator's. A caller cannot ask about another.
- Named routes win over this one. /api/prep/markets keeps its own shaped response; everything else falls through to here.
curl 'https://swapmos.com/api/prep/op/funding.history?symbol=PERP_ETH_USDC&size=50'The response is the upstream payload for that operation, scrubbed, at the top level. These are pass-throughs, so their field names are the upstream's and are not restated here. Cache-control is set from the operation's own cache lifetime, or no-store when it is zero.
markets
| id | Parameters | Cache |
|---|---|---|
markets.listEvery listed market with its 24h statistics. | None | 5s |
markets.getOne market's current statistics. | symbolRequired | 5s |
markets.rulesOrder rules and precision limits for every market. | None | 3600s |
markets.rulesForOrder rules and precision limits for one market. | symbolRequired | 3600s |
markets.priceChangesPrice change over several windows for every market. | None | 15s |
markets.openInterestTrader open interest across every market. | None | 30s |
markets.historyChartsHistorical price series for every market. | time_intervalRequired | 60s |
markets.tradesRecent public fills for one market. | symbolRequiredlimitOptional | No store |
markets.indexSourcesWhich exchanges feed each index price. | None | 3600s |
markets.leverageMaximum leverage available per market. | None | 3600s |
funding
| id | Parameters | Cache |
|---|---|---|
funding.predictedPredicted funding rate for every market. | None | 30s |
funding.getPredicted funding rate for one market. | symbolRequired | 30s |
funding.historyHistorical funding rates for one market. | symbolRequiredstart_tOptionalend_tOptionalpageOptionalsizeOptional | 60s |
funding.marketHistoryFunding rate history across every market. | None | 60s |
platform
| id | Parameters | Cache |
|---|---|---|
platform.statusWhether the exchange is in maintenance. | None | 30s |
platform.tokensCollateral assets and their per-chain addresses. | None | 3600s |
platform.chainsNetworks deposits and withdrawals are supported on. | broker_idOptional | 3600s |
platform.leverageConfigThe account-level leverage ladder. | None | 3600s |
platform.insuranceFundBalance of the fund backing liquidations. | None | 60s |
platform.vaultBalanceCollateral held in settlement vaults per chain. | None | 60s |
platform.announcementsExchange-wide notices. | None | 300s |
platform.tvlTotal value locked. | None | 300s |
platform.volumeTraded volume over time. | None | 300s |
platform.announcementsV2Active platform notices with localized translations. | None | 30s |
platform.ipInfoDetected IP address and coarse location of the caller. | None | No store |
liquidations
| id | Parameters | Cache |
|---|---|---|
liquidations.openPositions currently being liquidated. | symbolOptionalpageOptionalsizeOptional | 5s |
liquidations.historyPositions that have been liquidated. | symbolOptionalstart_tOptionalend_tOptionalpageOptionalsizeOptional | 30s |
charts
| id | Parameters | Cache |
|---|---|---|
charts.configCharting library configuration. | None | 3600s |
charts.symbolsCharting symbol metadata. | groupRequired | 3600s |
charts.historyCharting history bars. | symbolRequiredresolutionRequiredfromOptionaltoOptionalcountbackOptional | 10s |
charts.klineHistoryCandle history for one market. | symbolRequiredtypeOptionalresolutionRequiredfromRequiredtoRequired | 10s |
rewards
| id | Parameters | Cache |
|---|---|---|
rewards.epochsStart and end dates of every epoch. | None | 3600s |
rewards.stagesReward stages and their status. | broker_idOptionalstage_idOptionalstatusOptional | 300s |
rewards.rankingsRankings within a reward stage. | broker_idOptionalstageRequiredperiodRequiredpageOptionalsizeOptional | 60s |
rewards.userMeritsMerits earned by one address. | addressRequired | 60s |
referral
| id | Parameters | Cache |
|---|---|---|
referral.verifyWhether a referral code exists. | referral_codeRequired | 60s |
referral.checkWhether an account already holds a referral code. | account_idRequired | 60s |
campaigns
| id | Parameters | Cache |
|---|---|---|
campaigns.listTrading campaigns that have run. | None | 300s |
campaigns.statsStatistics for one campaign. | campaign_idRequired | 60s |
campaigns.rankingStandings within one campaign. | campaign_idRequiredpageOptionalsizeOptionalsort_byOptional | 60s |
campaigns.userOne address's standing in a campaign. | campaign_idRequiredaddressRequired | 60s |
campaigns.statsDetailsTrading volume and participant counts for one campaign, optionally grouped. | campaign_idRequiredbroker_idOptionalsymbolsOptionalgroup_byOptional | 60s |
campaigns.checkChecks whether a wallet meets a campaign metric threshold. | campaign_idRequiredtypeRequiredaddressRequiredlower_boundaryRequiredcmpOptional | 30s |
staking
| id | Parameters | Cache |
|---|---|---|
staking.overviewStaking totals and current rates. | None | 300s |
staking.poolInfoReward pool details. | None | 300s |
staking.batchInfoReward distribution batches. | None | 300s |
staking.buybackRevenue directed to buybacks. | None | 300s |
staking.balanceTotal staked balance for one wallet, split by liquid and escrowed token. | addressRequired | 30s |
staking.unstakeDetailsPending unstake amount and unlock time for one wallet. | addressRequired | 30s |
staking.vestingListVesting schedule entries for escrowed rewards held by one wallet. | addressRequiredis_vestingRequired | 30s |
staking.valorBatchInfoSettlement batch windows for the revenue-share program. | None | 30s |
staking.valorPoolInfoTreasury pool size, point price and next settlement date for revenue share. | None | 30s |
staking.valorRedeemPending and available USDC redemption amounts per chain for one wallet. | addressRequired | 30s |
staking.valorRedeemV2Per-batch redemption amounts and escrowed token balance for one wallet. | addressRequired | 30s |
account
| id | Parameters | Cache |
|---|---|---|
account.existsWhether an account has been created for an address. | addressRequiredbroker_idOptionalchain_typeOptional | No store |
account.keyInfoWhether a trading key is still active on an account. | account_idRequiredkeyRequiredaddressOptionalbroker_idOptionalkey_statusOptional | No store |
account.existsByAccountIdCheck whether an account id is registered and which builder owns it. | account_idOptional | No store |
account.registeredBuildersWhich builders a wallet address is already registered with. | addressRequiredchain_typeOptional | 30s |
builder
| id | Parameters | Cache |
|---|---|---|
builder.dailyRevenueDaily fee revenue settlement history for a builder. | broker_idRequiredstart_dateRequiredend_dateRequired | 60s |
builder.listList onboarded builders, or look up one by id. | broker_idOptional | 3600s |
builder.statsPer-builder statistics including connected user counts. | broker_idOptional | 60s |
builder.marketVolumeMarket-level volume and stats, filterable by market or builder. | symbolOptionalbroker_idOptional | 30s |
builder.listOrderTagsList the order tag configurations for a broker | broker_idRequiredsymbolOptionalenum_idOptionalinclude_archivedOptional | 30s |
builder.getOrderTagOne order tag configuration for a broker | broker_idRequiredenum_idRequired | 30s |
vault
| id | Parameters | Cache |
|---|---|---|
vault.strategyNonceFetch the next nonce for a strategy vault operation | None | No store |
vault.infoDetails for one strategy vault, or all of them | vault_idOptionalstatusOptionalbroker_idsOptional | 30s |
vault.overallStatsAggregate statistics across all strategy vaults | broker_idsOptional | 30s |
vault.userOverallStatsOne wallet's combined position across every strategy vault | wallet_addressRequired | 30s |
vault.performancePerformance metrics for one strategy vault across standard time ranges | vault_idRequired | 60s |
vault.performanceChartTVL or PnL history series for one strategy vault | vault_idRequiredtypeRequiredtime_rangeRequired | 60s |
vault.positionsOpen positions currently held by one strategy vault | vault_idRequired | No store |
vault.openOrdersOpen orders, standard and algo, for one strategy vault | vault_idRequiredsymbolOptionalsort_byOptionalpageOptionalsizeOptional | No store |
vault.orderHistoryPaginated order history for one strategy vault, including algo orders | vault_idRequiredsymbolOptionalsort_byOptionalpageOptionalsizeOptional | 60s |
vault.tradeHistoryPaginated executed-trade history for one strategy vault | vault_idRequiredsymbolOptionalsort_byOptionalpageOptionalsizeOptional | 60s |
vault.liquidatorHistoryPaginated liquidation events assigned to one strategy vault | vault_idRequiredsymbolOptionalpageOptionalsizeOptional | 60s |
vault.lpInfoLiquidity provider holdings and share balances for a wallet, per vault | wallet_addressRequiredvault_idOptional | 30s |
vault.lpPerformanceLiquidity provider PnL and drawdown over 24h, 7d, 30d and all time | vault_idRequiredwallet_addressRequired | 60s |
vault.lpPerformanceChartLiquidity provider TVL or PnL time series for a chart | vault_idRequiredwallet_addressRequiredtypeRequiredtime_rangeRequired | 60s |
vault.lpTransactionHistoryPaginated deposit and withdrawal history for a liquidity provider | vault_idRequiredwallet_addressRequiredtypeOptionalchain_idOptionalsourceOptionalpageOptionalsizeOptional | 60s |
vault.lpClaimInfoAmount a liquidity provider can currently claim on one chain | vault_idRequiredwallet_addressRequiredchain_idRequired | 30s |
vault.lpFeesHistoryPaginated performance-fee charges against a liquidity provider | vault_idRequiredwallet_addressRequiredpageOptionalsizeOptional | 60s |
vault.strategyProviderInfoStrategy provider NAV, share split, reserved collateral and lifetime PnL | vault_idRequiredwallet_addressRequired | 30s |
vault.providerTransactionHistoryPaged deposit/withdrawal history for one strategy provider in a vault | vault_idRequiredwallet_addressRequiredtypeOptionalchain_idOptionalsourceOptionalpageOptionalsizeOptional | 60s |
vault.providerClaimInfoClaimable amount for one strategy provider on a given chain | vault_idRequiredwallet_addressRequiredchain_idRequired | 30s |
vault.providerFeesHistoryPaged performance-fee history for one strategy provider in a vault | vault_idRequiredwallet_addressRequiredpageOptionalsizeOptional | 60s |
vault.fundInfoStrategy fund details: NAV, lifetime PnL, share price, current period, fee rate | vault_idRequiredwallet_addressRequired | 30s |
vault.fundPeriodInfoPaged period history and per-period instructions for a strategy fund | vault_idRequiredwallet_addressRequiredperiod_numberOptionalpageOptionalsizeOptional | 60s |
vault.fundPendingTransactionsPreview of pending user deposits and withdrawals for a strategy fund | vault_idRequiredwallet_addressRequired | 30s |