A full snapshot of the order book depth.

const depth = await client.getDepth("fFUEL/fUSDC");
console.log(`Best bid: ${depth.bids[0]?.price}`);
console.log(`Best ask: ${depth.asks[0]?.price}`);
interface DepthSnapshot {
    asks: DepthLevel[];
    bids: DepthLevel[];
}

Properties

Properties

asks: DepthLevel[]

Ask side of the order book, sorted by price ascending.

bids: DepthLevel[]

Bid side of the order book, sorted by price descending.