Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc brokerd backend repairs #442

Merged
merged 14 commits into from
Jan 23, 2023
Merged

Misc brokerd backend repairs #442

merged 14 commits into from
Jan 23, 2023

Conversation

goodboy
Copy link
Contributor

@goodboy goodboy commented Jan 13, 2023

Besides some topically chosen brokerd related fixes to multiple brokers this also adjusts our CI script to always run on any PRs.

Fixes by backend:

ib:

  • ignore api throttle events on .get_head_time() calls since it's not a necessary call during a throttle condition
  • add treasury yield futures fqsns to the ad-hoc set
  • change docker compose def to not auto-restart containers on system reboot

kraken:


binance:

  • always request an extra minute OHLC bar since by default they seem to always round down on time stamps in the request
  • also, fix ws subscribe() fixture to only do unsub msging when connected on reconnect/disconnect

deribit:

  • drop the legacy backfill_bars() history endpoint

Trying to send a message in the `NoBsWs.fixture()` exit when the ws is
not currently disconnected causes a double `._stack.close()` call which
will corrupt `trio`'s coro stack. Instead only do the unsub if we detect
the ws is still up.

Also drops the legacy `backfill_bars()` module endpoint.

Fixes #437
See more details in the GH comment:
#373 (comment)

More or less we need to pull and include the transfer fees for
withdrawals in our ledger tracking but this serves as a sloppy
workaround for the moment.
Seems that by default their history indexing rounds down/back to the
previous time step, so make sure we add a minute inside `Client.bars()`
when the `end_dt=None`, indicating "get the latest bar". Add
a breakpoint block that should trigger whenever the latest bar vs. the
latest epoch time is mismatched; we'll remove this after some testing
verifying the history bars issue is resolved.

Further this drops the legacy `backfill_bars()` endpoint which has been
deprecated and unused for a while.
@goodboy goodboy added testing broker-backend `brokerd`/`datad` related backend tech accounting prolly positioning: the accounting of "what/when (is) owned" labels Jan 13, 2023
@goodboy goodboy requested review from guilledk and esmegl and removed request for guilledk January 13, 2023 18:17
@goodboy goodboy merged commit 4833d56 into master Jan 23, 2023
@goodboy goodboy deleted the misc_brokerd_backend_repairs branch January 23, 2023 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accounting prolly positioning: the accounting of "what/when (is) owned" broker-backend `brokerd`/`datad` related backend tech testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants