API

Markets

The Montra price ladder, and where the app gets its other market data.

GET /markets/:id/ladder

What a trade of each size would really fill at in the token's Montra pool, from Montra's on-chain quoter. Only for the Montra market (MOTION-HYPE, case-insensitive); any other id answers 404 No Montra market <id>. Works without a database. Cache: 12 s.

ts
interface LadderView {
  market: string;
  token: string;
  midHype: number | null;
  feePips: number | null;
  levels: Array<{ hype: number; buyPx: number | null; sellPx: number | null;
                  buyImpactBps: number | null; sellImpactBps: number | null }>;
}
  • Sizes: 0.05, 0.25, 0.5, 1, 2, 5, 10 and 25 HYPE.
  • buyPx: HYPE per token when buying with that much HYPE. sellPx: HYPE per token when selling the same value of tokens (sized with Montra's last trade price).
  • midHype = √(buy × sell) at the smallest size, else the last trade price. Impacts are in bps against that mid.
  • feePips is Montra's totalFeePips for the pool.
  • Each quoter call is retried once after 250 ms if it fails.

There is no order book on a Montra pool, so the app's Markets page shows this ladder in the book's place.

bash
curl https://<your-site>/api/v1/markets/MOTION-HYPE/ladder

Other market data

HyperCore books, trades and candles, and Montra candles and trades, are read by the browser straight from the venues, not through this API. See Market data.