Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • OrderbookRepository

Index

Constructors

constructor

Properties

Private models

models: Models

Methods

addCurrencies

  • addCurrencies(currencies: db.CurrencyFactory[]): Bluebird<db.CurrencyInstance[]>

addCurrency

  • addCurrency(currency: db.CurrencyFactory): Bluebird<db.CurrencyInstance>

addOrderIfNotExists

  • addOrderIfNotExists(order: db.OrderFactory): Promise<undefined | false | true>
  • Adds an order to the database if it doesn't already exist.

    Parameters

    • order: db.OrderFactory

      order to persist

    Returns Promise<undefined | false | true>

    the created order instance, or undefined if it already existed

addPair

  • addPair(pair: db.PairFactory): Bluebird<db.PairInstance>

addPairs

  • addPairs(pairs: db.PairFactory[]): Bluebird<db.PairInstance[]>

addTrade

  • addTrade(trade: db.TradeFactory): Bluebird<object & Instance<object> & object>

getCurrencies

  • getCurrencies(): Bluebird<db.CurrencyInstance[]>

getPairs

  • getPairs(): Bluebird<db.PairInstance[]>

getTrades

  • getTrades(limit?: undefined | number): Bluebird<db.TradeInstance[]>

Generated using TypeDoc