Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "orderbook/types"

Index

Type aliases

Currency

Currency: object

Type declaration

  • decimalPlaces: number

    The number of places to the right of the decimal point of the smallest subunit of the currency, For example, BTC, LTC, and others where the smallest subunits (satoshis) are 0.00000001 full units (bitcoins) have 8 decimal places. ETH has 18. This can be thought of as the base 10 exponent of the smallest subunit expressed as a positive integer.

  • id: string

    The ticker symbol for this currency such as BTC, LTC, ETH, etc...

  • swapClient: SwapClientType

    The payment channel network client to use for executing swaps.

  • Optional tokenAddress?: undefined | string

    The contract address for layered tokens such as ERC20.

IncomingOrder

IncomingOrder: OutgoingOrder & Remote

An outgoing version of a local own order without fields that are not useful for peers.

LimitOrder

LimitOrder: MarketOrder & object

A limit order with a specified price that will enter the order book if it is not immediately matched.

Local

Local: object

Properties that apply only to orders placed by the local xud.

Type declaration

  • hold: number

    The amount of an order that is on hold pending swap execution.

  • localId: string

    A local identifier for the order.

MarketOrder

MarketOrder: object

An order without a price that is intended to match against any available orders on the opposite side of the book for its trading pair.

Type declaration

  • isBuy: boolean

    Whether the order is a buy (if true) or a sell (if false).

  • pairId: string

    A trading pair symbol with the base currency first followed by a '/' separator and the quote currency

  • quantity: number

    The number of currently satoshis (or equivalent) for the order.

MatchingResult

MatchingResult: object

Type declaration

Order

OrderBookThresholds

OrderBookThresholds: object

Type declaration

  • minQuantity: number

OrderIdentifier

OrderIdentifier: Pick<MarketOrder, "pairId"> & object

Properties that can be used to uniquely identify and fetch an order within an order book.

OrderMatch

OrderMatch: object

Type declaration

OrderPortion

OrderPortion: OrderIdentifier & object

A reference to a portion of an existing order.

OutgoingOrder

OutgoingOrder: Pick<OwnOrder, Exclude<keyof OwnOrder, "localId" | "createdAt" | "hold" | "initialQuantity">>

An outgoing version of a local own order without fields that are not useful for peers.

OwnLimitOrder

OwnLimitOrder: LimitOrder & Local

OwnMarketOrder

OwnMarketOrder: MarketOrder & Local

OwnOrder

OwnOrder: OwnLimitOrder & Stamp

Pair

Pair: object

Type declaration

  • baseCurrency: string
  • quoteCurrency: string

PeerOrder

PeerOrder: LimitOrder & Stamp & Remote

PlaceOrderEvent

PlaceOrderEvent: object

Type declaration

PlaceOrderResult

PlaceOrderResult: object

Type declaration

Remote

Remote: object

Properties that apply only to orders placed by remote peers.

Type declaration

  • peerPubKey: string

    The nodePubKey of the node which created this order.

Stamp

Stamp: OrderIdentifier & object

Properties that uniquely identify an order and make it ready to enter the order book.

Functions

isOwnOrder

  • isOwnOrder(order: Order): boolean

isPeerOrder

  • isPeerOrder(order: Order): boolean

Generated using TypeDoc