Commit Graph

422 Commits (9eddfa7b3bbf2b1746130c334204d5f3f0843f8a)

Author SHA1 Message Date
Tyler Goodlet cabc616b85 Port option api to new backend broker api 2018-11-30 08:14:36 -05:00
Tyler Goodlet c7cf0cde9c Add options streaming
Well that was a doozy; had to rejig pretty much all of it.

The deats:
- Track broker components in a new `DataFeed` namedtuple
- port to new list based batch quotes (not dicts any more)
- lock access to cached broker-client / data-feed instantiation
- respawn tasks that fail due to the network
2018-11-30 08:13:30 -05:00
Tyler Goodlet cd7d8d024d Add option quoter support for streaming
So much changed to get this working for both stocks and options:
- Index contracts by a new `ContractsKey` named tuple
- Move to pushing lists of quotes instead of dicts since option
  subscriptions are often not identified by their "symbol" key and
  this makes it difficult at fan out time to know how a quote should
  be indexed and delivered. Instead add a special `key` entry to each
  quote dict which is the quote's subscription key.
2018-11-30 00:33:40 -05:00
Tyler Goodlet 75d22c6058 An explicit name is prolly better 2018-11-25 19:23:07 -05:00
Tyler Goodlet 714c203c3e Cache symbol ids where possible
Cache both in the client and at the function call level inside the
quoter context using a `@afifo_cache`.
2018-11-25 15:00:08 -05:00
Tyler Goodlet af464b45ff Add an async function cache with a LIFO policy
Relates to #59
2018-11-25 14:55:55 -05:00
goodboy 84f357b7eb
Merge pull request #58 from pikers/monitor_polish
Monitor polish
2018-11-24 17:52:42 -05:00
Tyler Goodlet a8a5e836b9 Use static instruction for highlighted row
Instead of all this adding/removing of canvas instructions nonsense
simple add a static "highlighted" rectangle to each row and make its
size very small when there's no mouse over.

Mad props to @tshirtman for showing me the light :D
2018-11-24 16:17:06 -05:00
Tyler Goodlet 488bdb34be Add mouse-over row highlighting 2018-11-23 22:21:53 -05:00
Tyler Goodlet 3ea28f04a4 Mention 3.7 in Readme 2018-11-23 11:22:44 -05:00
Tyler Goodlet a7f3008d34 Match the author's general apparel
It's still a bit of a shit show, and I've left a lot of commented tweaks
that need to be further played with, but I think this is a much
better look for what I'm considering to be one of the main "entry point"
apps for `piker`. To get any more serious fine tuning the way I want
I may have to talk to some kivy experts as I'm having some headaches
with button borders, padding, and the header row height..

Some of the new changes include:
- port to the new `brokers.data` module
- much darker theme with a stronger terminal vibe
- last trade price and volume amount flash on each trade
- fixed the symbol search bar to be a static height; before it was
  getting squashed oddly when using stacked windows
- make all the cells transparent (for now) such that I can just use
  a row color (relates to cell padding/spacing - can't seem to ditch it)
- start adding type annotations
2018-11-23 10:50:40 -05:00
Tyler Goodlet 0f3faec35d Reduce the scroll boundary bounce 2018-11-22 19:39:40 -05:00
goodboy 0f53cbbd95
Merge pull request #56 from pikers/options_chain
Options chain (backend support)
2018-11-22 19:24:54 -05:00
Tyler Goodlet e1d6edb3ee Skip qt tests on missing brokers.ini entry 2018-11-22 19:12:14 -05:00
Tyler Goodlet eaa2a9b05d Port streaming test to new `data` module 2018-11-22 16:31:53 -05:00
Tyler Goodlet d102b82566 Don't add more then one stderr handler 2018-11-22 16:31:01 -05:00
Tyler Goodlet b9a9b7a9a3 Add options query and data feed recording commands
Add `contracts` and `optsquote` commands for querying option contracts
info and market quotes respectively. Add a `record` command for
streaming real-time data feed quotes to disk. Port `monitor` to the
new `piker.brokers.data` module. Forward loglevel flags through to
`tractor` for relevant commands.
2018-11-22 16:21:15 -05:00
Tyler Goodlet c23982393d Allow recording data feeds to disk
Add a couple functions for storing and retrieving live json data feed
recordings to disk using a very rudimentary character + newline delimited
format.

Also, split out the pub-sub logic from `stream_quotes()` into a new
func, `fan_out_to_chans()`. Eventually I want to formalize this pattern
into a decorator exposed through `tractor`.
2018-11-22 15:56:02 -05:00
Tyler Goodlet f038fdd42f Add a `contracts()` query
Makes it easy to request all the option contracts for a particular symbol.
Also, let `option_chain()` accept a `date` arg which can be used to only
retrieve quotes for a single expiry date (much faster then getting all
of them).
2018-11-22 15:53:00 -05:00
Tyler Goodlet 7b2ab504f9 Adjust tests to match 2018-11-22 09:44:47 -05:00
Tyler Goodlet 247bcb48c0 Tweak options query API method names 2018-11-22 09:19:04 -05:00
Tyler Goodlet 8fe0c40dde Move data feed machinery to separate module 2018-11-14 22:58:12 -05:00
Tyler Goodlet 31c69a5fae Allow specifying number of displayed digits 2018-11-13 18:42:34 -05:00
Tyler Goodlet 0c3bfb9e9e Stack the mktcap + volumes 2018-11-13 18:41:58 -05:00
Tyler Goodlet 6a66b056c8 Compact the look a bit 2018-11-13 18:41:40 -05:00
Tyler Goodlet 5961e458cf Add a option quote latency test 2018-11-13 14:59:49 -05:00
Tyler Goodlet 19ea7bd7aa Add option-chain cmd 2018-11-13 12:58:05 -05:00
Tyler Goodlet 36cf68dc0f Update tests to match 2018-11-13 12:57:46 -05:00
Tyler Goodlet d145a5a219 Rejig option chain schema to capture all contracts 2018-11-13 12:57:21 -05:00
Tyler Goodlet 368f21d8d6 Update Pipfiles 2018-11-12 00:30:55 -05:00
Tyler Goodlet f8d619b183 Go GPLv3 2018-11-12 00:29:43 -05:00
Tyler Goodlet 94012b05c3 Screw it; go 3.7 for ``datetime.fromisoformat()`` 2018-11-11 23:12:13 -05:00
Tyler Goodlet ab8008ad61 Repair quote streaming test 2018-11-11 21:59:41 -05:00
Tyler Goodlet 773457ac91 Drop stale import 2018-11-11 21:45:51 -05:00
Tyler Goodlet 2b1818ba33 Drop old stream test, rename stock quote func 2018-11-11 21:45:11 -05:00
Tyler Goodlet c8cb5a2fdc Remove duplicate fixture (now in conftest) 2018-11-11 21:07:34 -05:00
Tyler Goodlet 21eb68148c Add option contract and chain quote test 2018-11-11 21:06:46 -05:00
Tyler Goodlet a5afa0f1c3 Fix typo 2018-11-11 21:06:25 -05:00
Tyler Goodlet 6bef365fd4 Add conftest 2018-11-11 21:05:44 -05:00
Tyler Goodlet f9d9d7c1ba Add option chain quote support! 2018-11-11 21:05:30 -05:00
Tyler Goodlet 666228d82e Add initial QT stock quoting tests 2018-11-11 18:53:45 -05:00
Tyler Goodlet 82c8fca983 Use tractor.run_daemon() for pikerd 2018-10-18 13:49:20 -04:00
Tyler Goodlet e108bc4521 Must pass a main async func to tractor 2018-09-05 18:31:10 -04:00
Tyler Goodlet 2349de8314 Rename watchlist app to 'monitor' 2018-08-23 23:12:39 -04:00
goodboy 73b153b6fd
Merge pull request #55 from pikers/mktcap_sorting
Fix mktcap sorting
2018-08-23 11:31:43 -04:00
Tyler Goodlet 421cc4731f Face palm - fix mktcap sorting
Yuh think maybe the default "null" value shouldn't be a string...?

Fixes #46
2018-08-22 23:02:08 -04:00
Tyler Goodlet b2acfdaf42 Fix `pairs` type annotation 2018-08-22 23:01:34 -04:00
Tyler Goodlet 96b17e16ac Handle stale token case on network outage reconnect 2018-08-22 23:01:14 -04:00
goodboy e9921949af
Merge pull request #54 from pikers/tractor_updates
Tractor updates
2018-08-10 11:09:31 -04:00
Tyler Goodlet cbc1052bfe Update tests for new tractor api 2018-08-09 22:43:50 -04:00