Class CoingeckoPricing

MVP implementation of sourcing prices from coingecko

Hierarchy

  • CoingeckoPricing

Constructors

Properties

assets: {
    [assetTicker: string]: string;
} = {}

Maps ticker to coingecko ID

Type declaration

  • [assetTicker: string]: string
debugFlag: boolean

Flag for finishing tests when debuging

endpoint: string

Where to get the prices from

prices: {
    [assetTicker: string]: BehaviorSubject<number>;
} = {}

Stores price in USD as a subject

Type declaration

  • [assetTicker: string]: BehaviorSubject<number>
updateFrequency: number

How often to update the values. 0 disables updating

Methods

  • Read the config file to initialize the list of assets we want to track

    Returns void

  • Update the price of all assets we are tracking every 30 seconds

    Returns Promise<void>

Generated using TypeDoc