Skip to content

Typescript not working for replayNormalized #22

@cyri113

Description

@cyri113

Hi - I am using typescript with tsdx, a zero-config CLI for TypeScript package development.

I have re-created the basic replayNormalized example from the documentation.

For some reason, the function is continuously returning undefined instead of the message. Any best guesses as to why?

// single.ts
import { replayNormalized, normalizeTrades, ReplayNormalizedOptions } from 'tardis-dev'

const messages = replayNormalized(
  {
    exchange: 'bitmex',
    symbols: ['XBTUSD'],
    from: '2019-05-01',
    to: '2019-05-02'
  } as ReplayNormalizedOptions<'bitmex'>,
  normalizeTrades
)

async function run () {
  for await (const message of messages) {
    console.log(message);
  }
}

run()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions