Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Refactor backfill for unit testing #1279

Merged
merged 21 commits into from
Feb 5, 2018

Conversation

haxwell
Copy link
Contributor

@haxwell haxwell commented Feb 3, 2018

  • An 'id' and '_id' attribute are set on the resume marker object. This is to match pre-refactor behavior.
  • If an exchange uses time as opposed to trade_id in its API queries for trades, the tradeService will get the correct trade from the DB, and pass in its time. backfill not working on binance, slow/not working on gdax #1267

… Mongo collection from the database is returned. -- I investigated the SOSA Mongo module that db.trades and db.resume_markers wrapped. I couldn't determine a real benefit to SOSA, as opposed to going directly to the Mongo DB object. SOSA seems to be one abstraction too many. If I am wrong, it is easy enough to add it back. For now, simple wins.
…t-one test/_specs/commands/backfill/backfill.process.function.test.js' for example. To run all tests 'npm test'.
…e needs its getTrades() arguments as milliseconds, as opposed to a trade ID. If yes to milliseconds, it gets the trade specified by the ID, and passes its time to the exchange. Ideally, this would be handled by the exchange, but I'm trying to not touch those in this refactor, for now.
… uses time as opposed to trade ID in the API queries which return the trades.
@station384
Copy link
Contributor

I was working around this in bittrex it uses a combo of numeric and time depending on where it is getting its backfill data. I was converting it to numeric only (converting both sources to use ms from 1970) is this still needed?

@station384
Copy link
Contributor

field selector is missing in the trade dataset after backfill refactor.
this field was present in the prior version.

…ed tests for it. Added some functionality to the collection and exchange service mocks, too.
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