Skip to content
Fourohtwo

What a trade actually costs before it is placed

crypto-asistent.com/api/x402/data/orderbook-depth

What a trade actually costs before it is placed: live order book depth on Bybit and OKX, walked at your size. Give it a notional in dollars and it returns the average fill price, slippage against mid in basis points and dollars, the spread, the depth within 1% of mid, and which venue is cheaper for that exact size — separately for buying and selling. A size the book cannot absorb is reported as un

BaseAnswering
POSThttps://crypto-asistent.com/api/x402/data/orderbook-depth

Uptime100% of 3 checks in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://crypto-asistent.com/api/x402/data/orderbook-depth", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"coin":"BTC","sizesUsd":[10000,100000]}),
});
console.log(await res.json());

Example input

{
  "coin": "BTC",
  "sizesUsd": [
    10000,
    100000
  ]
}

More from Crypto Data & Market AnalysisProvider status