Commit Graph

24 Commits (588770d0346baad93d4e4fda634639ae8af9363a)

Author SHA1 Message Date
Tyler Goodlet c6da09f3c6 Add fast(er), time-sorted ledger records
Turns out that reading **and** writing with `tomlkit` is just wayya slow
for large documents like ledger files so move to using the `tomli`
sibling pkg `tomli-w` which seems to much improve on the latency, though
obviously longer run we're likely going to want:
- a better algorithm for only back loading records using as little
  history as possible
- a different serialization format for production maybe something
  like apache parquet?

The only issue with using a non-style-preserving writer is that we don't
necessarily get TOML conf ordering for free (without first ordering it
ourselves), and thus this patch also adds much more general date-time
sorting machinery which is now **required** when using
`open_trades_ledger()` via a `tx_sort: Callable`. By default we now
provide `.accounting._ledger.iter_by_dt()` (exposed in the subpkg mod)
which conducts dynamic "datetime key detection" based parsing of records
based on a `parsers: dict[str, Callabe]` input table. The default should
handle most use cases including all currently supported live backends
(kraken, ib) as well as our paper engine ledger-records format.

Granulars:
- adjust `Position.iter_clears()` to use new `iter_by_dt(key=lambda ..)`
  signature.
- add `tomli-w` to setup and our `tomlkit` fork to requirements file.
- move `.write_config()` to bottom of class defn.
- fix closed pos popping to not error if pp was already popped..
2023-05-18 18:27:54 -04:00
Tyler Goodlet ccfafeeec2 Drop `cryptofeed`, what a mess XD 2023-05-09 14:49:26 -04:00
Tyler Goodlet 166f99b3d1 setup: reorg some deps drop unused ones 2023-05-08 13:30:09 -04:00
Tyler Goodlet ddbba76095 Use (a new) `piker_pin` branch in `tractor` (again) 2023-01-10 11:09:19 -05:00
Tyler Goodlet 5d4929db9c Pin to our `pyqtgraph` fork's master branch 2022-10-31 15:00:38 -04:00
Tyler Goodlet fda1c5b554 Pin back to `tractor` master branch 2022-10-03 13:48:58 -04:00
Guillermo Rodriguez e97dd1cbdb
Stop using as much closures
Use a custom tractor branch that fixes a `maybe_open_context` re entrant related bug
2022-08-24 18:09:35 -03:00
Guillermo Rodriguez 2c2e43d8ac
Add comments and update cryptofeed fork url in requirements 2022-08-24 18:08:31 -03:00
Guillermo Rodriguez 28e025d02e
Finally get a chart going! lots of fixes to streaming machinery and custom cryptofeed fork with fixes 2022-08-23 15:18:43 -03:00
Tyler Goodlet eda6ecd529 Pin to `asyncvnc@main` after upstream fixes
We helped drive a bunch of fixes in
https://github.com/barneygale/asyncvnc/pull/4

This pins to our forked but matched `main` branch to get those fixes
until such a time as upstream makes another release.
2022-08-22 11:58:40 -04:00
Tyler Goodlet bff625725e Implement reset hacks via our patched `asyncvnc` client 2022-06-04 20:44:03 -04:00
Tyler Goodlet ed85079d0f Add `trimeter` dep.. that we forgot 2022-05-11 13:19:47 -04:00
Tyler Goodlet 71416f5752 Add `anyio-marketstore` client as dev dep 2022-05-09 11:15:13 -04:00
Tyler Goodlet 6324624811 Try https? 2022-04-12 17:29:25 -04:00
Tyler Goodlet 289a69bf41 Stop using unecrypted git prot for edit deps 2022-04-12 17:29:25 -04:00
Tyler Goodlet 20a24283a1 Link to `tractor`'s master branch instead of pin 2022-01-30 12:52:46 -05:00
Tyler Goodlet 4f899edcef Use a `pyqtgraph` dev branch pin (again)
There's lotsa movement on the project these days with stuff getting
improved, borked, fixed, rinse repeat. Might as well use a pin on our
fork so we can more easily hack on it and pull in latest features
piece-wise for testing.
2021-12-07 15:11:00 -05:00
Tyler Goodlet 37723235ca Pin to specific branch made for us 2021-10-23 12:25:16 -04:00
Tyler Goodlet 7786a8567e Go back to mainline pyqtgraph 2021-03-19 12:07:00 -04:00
Tyler Goodlet aade0e5ea1 Pin to our pyqtgraph branch; fixes transform invert performance 2020-10-28 15:12:13 -04:00
Tyler Goodlet 934de1d40a Switch to asyncio support branch in tractor 2020-10-02 10:40:50 -04:00
Tyler Goodlet 2d36b9372f Drop requirements.txt 2018-03-29 12:50:53 -04:00
Tyler Goodlet 9667042fe2 Drop NUU it's now just APH 2018-03-28 14:00:17 -04:00
Tyler Goodlet 42f48c82fc Update readme; use async kivy branch 2018-02-12 10:55:04 -05:00