Skip to content
This repository has been archived by the owner on Sep 9, 2023. It is now read-only.

Gemini include l2 heartbeat event for sequenceId #244

Merged
merged 3 commits into from
Jan 12, 2021

Conversation

evan-coygo
Copy link
Contributor

@bmancini55 please lmk if you have any other ideas around this. You need access to the sequenceId in the heartbeat event to validate order book data, so I figured the easiest backwards-compatible solution was to just emit an l2update event without any ask or bids changes that only includes the sequenceId

@evan-coygo evan-coygo changed the title include l2 heartbeat event for sequenceId Gemini include l2 heartbeat event for sequenceId Jan 8, 2021
Copy link
Member

@bmancini55 bmancini55 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evan-coygo, thanks for the PR!

I think this is a decent approach. I'm concerned that it will result in flaky tests however. IIRC, the test suite looks for at least one bid/ask to verify information. You'll need to modify the test spec's l2update property with a custom done method with the signature done(spec, result, update, market) which checks the update argument and returns true if a bid or an ask is present. Refer to

(!spec.l2update.done || spec.l2update.done(spec, result, update, market)) &&

Otherwise: minors/nits inlined below

src/exchanges/gemini-client.js Show resolved Hide resolved
src/exchanges/gemini-client.js Show resolved Hide resolved
src/exchanges/gemini-client.js Outdated Show resolved Hide resolved
@evan-coygo
Copy link
Contributor Author

@bmancini55 I've added further comments and fixed test runner

Copy link
Member

@bmancini55 bmancini55 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evan-coygo thanks for making those changes. Found an issue while dev testing that needs to be addressed. Also run formatting, then this should be good to merge!

src/exchanges/gemini-client.js Outdated Show resolved Hide resolved
@evan-coygo
Copy link
Contributor Author

@bmancini55 alright should be good

Copy link
Member

@bmancini55 bmancini55 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for making the changes!

@bmancini55 bmancini55 merged commit 1dd0775 into altangent:master Jan 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants