History

Bancor SDKGlobalsHistory

Class: History

The History module allows querying historical data in the bancor network

Hierarchy

  • SDKModule

    History

Index

Constructors

Properties

Methods

Constructors

constructor

+ new History(core: Core): History

Inherited from History.constructor

Parameters:

Name

Type

core

Core

Returns: History

Properties

core

core: any = null

Inherited from History.core

Methods

getConversionEvents

getConversionEvents(token: Token, fromBlock: number, toBlock: number): Promise‹ConversionEvent[]›

returns all Conversion events for a given liquidity pool / liquid token between two block numbers

Parameters:

Name

Type

Description

token

Token

smart token

fromBlock

number

start block number

toBlock

number

end block number

Returns: Promise‹ConversionEvent[]›

list of Conversion events

getConversionEventsByTimestamp

getConversionEventsByTimestamp(token: Token, fromTimestamp: number, toTimestamp: number): Promise‹ConversionEvent[]›

returns all Conversion events for a given liquidity pool / liquid token between two points in time

Parameters:

Name

Type

Description

token

Token

smart token

fromTimestamp

number

start time

toTimestamp

number

end time

Returns: Promise‹ConversionEvent[]›

list of Conversion events