@hydro-protocol/hydro-client-js
Version:
Javascript SDK for the Hydro API
33 lines (32 loc) • 917 B
TypeScript
import { Order } from './Order';
import { PriceLevel } from './PriceLevel';
export declare class Orderbook {
/**
* The market this orderbook exists on, e.g. "HOT-WETH"
*/
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 type OrderbookLevel = 1 | 2 | 3;