UNPKG

@crypdex/hydro-sdk

Version:

Javascript SDK for the Hydro API

37 lines (36 loc) 960 B
import { Order } from "./Order"; import { PriceLevel } from "./PriceLevel"; export declare class Orderbook { /** * The market this orderbook exists on, e.g. "ZRX-ETH" */ readonly marketId: string; /** * List of bids (buy orders) */ readonly bids: (PriceLevel | Order)[]; /** * List of asks (sell orders) */ readonly asks: (PriceLevel | Order)[]; constructor(json: any, level?: OrderbookLevel); } /** * Each level represents a different amount of detail returned in * the orderbook. * * Level 1 returns only the best bid/ask prices * * Level 2 returns the top 50 bids and asks, with orders at the * same price being aggregated together * * Level 3 returns the full non-aggregated orderbook, with each * individual order id, and it's price and amount. * * See https://docs.ddex.io/#get-orderbook */ export declare enum OrderbookLevel { "ONE" = "1", "TWO" = "2", "THREE" = "3", }