Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "cli/commands/orderbook"

Index

Type aliases

Bucket

Bucket: { price: number; quantity: number }

Type declaration

  • price: number
  • quantity: number

FormattedOrderbook

FormattedOrderbook: { pairId: string; rows: string[][] }

Type declaration

  • pairId: string
  • rows: string[][]

OrderbookJson

OrderbookJson: { buy: Bucket[]; pairId: string; sell: Bucket[] }

Type declaration

Variables

Const COLUMNS

COLUMNS: number[] = [19, 19, 19, 19]

Const COLUMNS_IN_ORDER_SIDE

COLUMNS_IN_ORDER_SIDE: number = COLUMNS.length / 2

Const HEADER

HEADER: { colSpan: number; content: string }[] = [{ content: colors.green('Buy'), colSpan: 2 },{ content: colors.red('Sell'), colSpan: 2 },]

Const SECONDARY_HEADER

SECONDARY_HEADER: string[] = [colors.green('Quantity'),colors.green('Price'),colors.red('Price'),colors.red('Quantity'),]

Const command

command: "orderbook [pair_id] [precision]" = "orderbook [pair_id] [precision]"

Const describe

describe: "display the order book, with orders aggregated per price point" = "display the order book, with orders aggregated per price point"

Functions

Const addSide

  • addSide(buckets: Bucket[], isBuy?: boolean): string[]

Const builder

  • builder(argv: Argv): Argv<{} & {}>

Const createOrderbook

  • createOrderbook(orders: ListOrdersResponse.AsObject, precision: number): { pairId: string; rows: string[][] }[]

Const createOrderbookSide

  • createOrderbookSide(orders: Order.AsObject[], precision?: number): { price: number; quantity: number }[]

Const createTable

  • createTable(): GenericTable<(undefined | null | string | number | false | true | CellOptions)[]>

Const displayJson

  • displayJson(orders: ListOrdersResponse.AsObject, argv: Arguments<any>): void

Const displayOrderbook

Const displayTables

  • displayTables(orders: ListOrdersResponse.AsObject, argv: Arguments<any>): void

Const getPriceBuckets

  • getPriceBuckets(orders: Order.AsObject[], count?: number): number[]

Const getQuantityForBuckets

  • getQuantityForBuckets(orders: Order.AsObject[], priceBuckets: number[], filledBuckets?: Bucket[]): Bucket[]

Const handler

  • handler(argv: Arguments<any>): Promise<void>

Generated using TypeDoc