Commit Graph

521 Commits (b743230f7f92c4be27ff7ca191a4e2199f2b4621)

Author SHA1 Message Date
Tyler Goodlet b743230f7f Add a couple more deps 2020-08-01 22:24:51 -04:00
Tyler Goodlet b872696d9f Set tractor loglevel in cli config 2020-08-01 22:23:19 -04:00
Tyler Goodlet 4e9057621c Drop "pipfiles"; pipenv is getting the hard boot 2020-08-01 22:22:12 -04:00
Tyler Goodlet fad58d18c9 Make ws loop restart on connection failures 2020-08-01 22:12:26 -04:00
Tyler Goodlet 06f03c690c Begin to wrap marketstore as a data feed
Wrap the sync client in an async interface in anticipation of an actual
async client. This starts support for the `open_fee()`/`stream_quotes()`
api though the tick normalization isn't correct yet.
2020-08-01 20:08:05 -04:00
Tyler Goodlet fa899c3979 Generate tick data correctly using .etime 2020-08-01 16:52:51 -04:00
Tyler Goodlet e2dab3977e Support new normalized ticks format with kraken
Generate tick datums in a list under a `ticks` field in each quote
kinda like how IB does it.
2020-07-31 00:11:17 -04:00
Tyler Goodlet bcd17d0bb6 Also log the payload 2020-07-31 00:10:47 -04:00
Tyler Goodlet e49417a4b8 Add normalization step for ticks
Start a draft normalization format for (sampled) tick data.
Ideally we move toward the dense tick format (DFT) enforced by
techtonicDB, but for now let's just get a dict of something simple
going: `{'type': 'trade', 'price': <price}` kind of thing. This
gets us started being able to real-time chart from all data feed
back-ends. Oh, and hack in support for XAUUSD..and get subactor
logging workin.
2020-07-31 00:03:17 -04:00
Tyler Goodlet 307bc87738 Fix typo 2020-07-28 14:45:18 -04:00
Tyler Goodlet 80b656e2ab Add startup logic to handle market closure 2020-07-28 14:44:32 -04:00
Tyler Goodlet b16bc9b42d Define "packetizer" in specific broker mod
Allows for formatting published quotes using a broker specific
formatting callback.
2020-07-28 14:27:51 -04:00
Tyler Goodlet 12655f87fd Support the `stream_quotes()` api in questrade backend 2020-07-20 16:58:40 -04:00
Tyler Goodlet a59497c949 Always just look up the current plot on mouse handling 2020-07-17 10:43:03 -04:00
Tyler Goodlet b97286d7f5 Allow for dynamically added plots
Add `ChartPlotWidget.add_plot()` to add sub charts for indicators which
can be updated independently. Clean up rt bar update code and drop some
legacy ohlc loading cruft.
2020-07-17 09:06:20 -04:00
Tyler Goodlet a1032a0cd7 Massively simplify the cross-hair monstrosity
Stop with all this "main chart" special treatment.
Manage all lines in the same way across all referenced plots.
Add `CrossHair.add_plot()` for adding new plots dynamically.

Just, smh.
2020-07-16 21:54:24 -04:00
Tyler Goodlet d6bd964fac Raise errors, fix module script entry 2020-07-15 13:26:48 -04:00
Tyler Goodlet 5513d48c11 Use array of names for lookup 2020-07-15 10:59:29 -04:00
Tyler Goodlet ce1c98463c Change name to qtractor 2020-07-15 09:55:09 -04:00
Tyler Goodlet 7ea6f25993 Pass broker name 2020-07-15 09:54:47 -04:00
Tyler Goodlet d431ec20a8 Override annoying stuff in ib_insync 2020-07-15 09:54:24 -04:00
Tyler Goodlet c6b4b62228 Standardize ohlc dtype 2020-07-15 08:42:01 -04:00
Tyler Goodlet 4a1bcf7626 Fix import error 2020-07-15 08:41:29 -04:00
Tyler Goodlet 8fa569787d Port to new streaming api, yield whole tickers 2020-07-15 08:40:20 -04:00
Tyler Goodlet 50f903d7c5 Handle overloaded arg 2020-07-15 08:28:50 -04:00
Tyler Goodlet d0a9afbb36 Port to new data apis 2020-07-15 08:28:13 -04:00
Tyler Goodlet b05a205d1b Start enforcing a common stream setup api
Add routines for brokerd spawning and quote stream creation.
2020-07-15 08:22:09 -04:00
Tyler Goodlet f9dcb9a984 Add kraken to backend list 2020-07-15 08:20:29 -04:00
Tyler Goodlet 7395b22e3d Add historical bars retreival 2020-07-15 08:20:03 -04:00
Tyler Goodlet cf8a5d04ce Store lines graphics in struct array to simplify indexing 2020-07-09 08:37:30 -04:00
Tyler Goodlet 93fed5ec28 Drop kivy stuff from docs 2020-07-08 15:42:51 -04:00
Tyler Goodlet 5d0f4bf112 Deps bump 2020-07-08 15:42:32 -04:00
Tyler Goodlet 9dc3bdf273 Add WIP real-time 5s bar charting 2020-07-08 15:42:05 -04:00
Tyler Goodlet ee4b3a327c Always convert to posix time 2020-07-08 15:41:14 -04:00
Tyler Goodlet ac5e9de1b3 Make run_qtrio invoke tractor at top level 2020-07-08 15:40:35 -04:00
Tyler Goodlet 7bc49eac9f Move bar generation into func; support bar appends
There's really nothing coupling it to the graphics class (which frankly
also seems like it doesn't need to be a class.. Qt).

Add support to `.update_from_array()` for diffing with the input array
and creating additional bar-lines where necessary. Note, there are still
issues with the "correctness" here in terms of bucketing open/close
values in the time frame / bar range. Also, this jamming of each bar's 3
lines into a homogeneous array seems like it could be better done with
struct arrays and avoid all this "index + 3" stuff.
2020-07-08 15:06:39 -04:00
Tyler Goodlet 4aa526f400 Use structure array indexing syntax 2020-07-08 14:56:45 -04:00
Tyler Goodlet db76443389 Handle flat bar updates
Flat bars have a rendering issue we work around by hacking values in `QLineF`
but we have to revert those on any last bar that is being updated in
real-time. Comment out candle implementations for now; we can get back
to it if/when the tinas unite. Oh, and make bars have a little space
between them.
2020-07-07 10:44:55 -04:00
Tyler Goodlet 52e258fe83 Docs the ui pkg mod 2020-07-07 10:39:22 -04:00
Tyler Goodlet 27a20c8535 Add better contract search/lookup
Add a `Client.find_contract()` which internally takes
a <symbol>.<exchange> str as input and uses `IB.qualifyContractsAsync()`
internally to try and validate the most likely contract. Make the module
script call this using `asyncio.run()` for console testing.
2020-07-07 10:33:47 -04:00
Tyler Goodlet 4fbb41a978 Convert to stream, parse into dataclass 2020-07-05 11:43:58 -04:00
Tyler Goodlet a852292563 Start kraken backend 2020-07-04 18:59:02 -04:00
Tyler Goodlet 36303f0770 Fix a bunch of scrolling / panning logic
Don't allow zooming to less then a min number of data points. Allow
panning "outside" the data set (i.e. moving one of the sequence "ends"
to the middle of the view. Start adding logging.
2020-07-04 17:48:31 -04:00
Tyler Goodlet a4658ac990 Add ib 2020-07-03 19:09:57 -04:00
Tyler Goodlet 13caf821fe Use msgpack-numpy 2020-07-03 18:32:40 -04:00
Tyler Goodlet ccaedfae3f Handle high = low bars
For whatever reason if the `QLineF` high/low values are the same a weird
little rectangle is drawn (my guess is a `float` precision error of some
sort). Instead, if they're the same just use one of the values.
Also, store local vars to avoid so many lookups.
2020-07-03 18:08:03 -04:00
Tyler Goodlet 4ca4ced6e8 Make search work with ib backend 2020-07-02 16:02:58 -04:00
Tyler Goodlet f216d1f922 Add a mostly actor aware API to IB backend
Infected `asyncio` support is being added to `tractor` in
goodboy/tractor#121 so delegate to all that new machinery.

Start building out an "actor-aware" api which takes care of all the
`trio`-`asyncio` interaction for data streaming and request handling.
Add a little (shudder) method proxy system which can be used to invoke
client methods from another actor. Start on a streaming api in
preparation for real-time charting.
2020-07-02 12:54:34 -04:00
Tyler Goodlet 72a3149dc7 Allow passing in tbk keys to query 2020-06-24 14:23:37 -04:00
Tyler Goodlet 56132d1fcc Use new method name 2020-06-24 14:13:56 -04:00