Commit Graph

2096 Commits (15d3f994103859de71c30798a6b9f0b7c6308db1)

Author SHA1 Message Date
Tyler Goodlet 811dbaab4e Add pipenv cmd for installing async kivy branch 2019-04-26 00:26:14 -04:00
Tyler Goodlet 1cc33abca0 Don't bail when a sub-optschain crashes 2019-03-24 12:09:17 -04:00
goodboy 8964b7a5fb
Merge pull request #76 from pikers/optschain_as_subactor
Spawn optschain from monitor via keybinding
2019-03-21 22:55:49 -04:00
Tyler Goodlet 4e2d32d425 Readme bump 2019-03-21 22:46:20 -04:00
Tyler Goodlet b2252e5762 Fix bad import 2019-03-21 22:18:09 -04:00
Tyler Goodlet 8bf82a2f76 Allow spawning an optschain UI from monitor using the `o` keybinding 2019-03-21 22:15:08 -04:00
Tyler Goodlet d59283d36d Update optschain cli entrypoint to pass primitive arg types 2019-03-21 22:14:22 -04:00
Tyler Goodlet 884fcaa88e A slew of tiny pager improvements
- stop displaying search bar widget on <ctrl-c>
- if there's existing search bar content highlight it automatically
  to allow user to start typing new content right away
- when activated allow search bar to insert its own set of keybinding
  controls; restore prior bindings on exit
2019-03-21 22:01:50 -04:00
Tyler Goodlet 3bbb1db2b4 Make option chain spawnable as a subactor
Look up the broker module and set up the loglevel locally.
Ask the arbiter for a portal to the data daemon since we can't
pass one to a subactor by reference.
2019-03-21 21:50:55 -04:00
Tyler Goodlet fc1e63b2c1 Spawn keyboard functions in new tasks 2019-03-18 22:39:21 -04:00
Tyler Goodlet c8da096126 Track table's last clicked row 2019-03-18 22:38:32 -04:00
goodboy 124b533150
Merge pull request #75 from pikers/use_toml
Use toml
2019-03-18 07:28:02 -04:00
Tyler Goodlet 44eb9aa9ff Create a blank config if none exists 2019-03-18 00:04:34 -04:00
Tyler Goodlet 6746037784 Deps bump 2019-03-17 23:22:10 -04:00
Tyler Goodlet 88bb5b9f05 Handle file not found 2019-03-17 23:22:00 -04:00
Tyler Goodlet 25b6c4667f Deploy flag is no longer supported I guess? 2019-03-17 23:09:08 -04:00
Tyler Goodlet b99c5d2abe Use confdir if provided even when in CI 2019-03-17 23:04:04 -04:00
Tyler Goodlet 3a439fc99d Fix ask use logic for testing/CI 2019-03-17 23:03:45 -04:00
Tyler Goodlet 6857713adf Deps bump now with toml 2019-03-15 19:38:17 -04:00
Tyler Goodlet 6a50049af7 Use toml instead of ini for broker config 2019-03-15 19:37:04 -04:00
Tyler Goodlet 2d688668ff Questrade is default for now 2019-03-03 11:02:06 -05:00
Tyler Goodlet d0b1d0954f Catch multi-errors too? 2019-03-03 11:01:34 -05:00
goodboy c3651da112
Merge pull request #72 from pikers/readme_bump
Update cli cmds and description
2019-02-26 22:00:43 -05:00
Tyler Goodlet 6cbea10b83 Forgot an error 2019-02-26 19:15:53 -05:00
Tyler Goodlet dfe6197e2e Update cli cmds and description 2019-02-26 01:14:58 -05:00
goodboy dfacf8d338
Merge pull request #71 from pikers/fix_ci
Fix ci
2019-02-26 00:53:04 -05:00
Tyler Goodlet 2306799110 Speed bump quoter a slight bit 2019-02-25 22:40:19 -05:00
Tyler Goodlet 5e9c38039c Move brokerd spawner to `brokers.core` 2019-02-25 22:29:48 -05:00
Tyler Goodlet 1fd033d351 Token should always be from a practice account 2019-02-25 22:12:33 -05:00
Tyler Goodlet e40e18dd5c Cache the piker config dir in CI 2019-02-25 22:07:27 -05:00
Tyler Goodlet 414734f803 Add travisCI specific test suite integration
Questrade is the default broker backend (for now) so the CI
can run using a practice account token handed down through an
env variable. If we add a cached directory to the build then the token
should remain persistent in the brokers config and will only need to be
updated if something goes wrong.

Also, add a `--confdir` flag for pytest much in the same way as for
the `piker` cli.
2019-02-25 20:23:20 -05:00
Tyler Goodlet d3fae00e74 Add a `configdir` cli option 2019-02-25 20:22:29 -05:00
Tyler Goodlet 747d703d92 Add hack-fix to avoid leaking cmdline flags to kivy 2019-02-25 20:14:36 -05:00
Tyler Goodlet 77548d2ee6 Add token-from-user toggles to token auth methods 2019-02-25 20:11:45 -05:00
Tyler Goodlet 130553b8df Accept a path arg to `write()` 2019-02-25 19:29:54 -05:00
Tyler Goodlet 295ccbbe64 Name the data what it is 2019-02-24 10:55:52 -05:00
Tyler Goodlet c1a398d826 Use click context to factor cmd options 2019-02-23 16:13:04 -05:00
Tyler Goodlet bc518b992d Deps bump 2019-02-23 00:01:04 -05:00
Tyler Goodlet 1a0427db08 Use `DataFeed` api in streaming tests 2019-02-21 23:10:24 -05:00
Tyler Goodlet 7ee731faac Use trio memory channels throughout UIs 2019-02-21 23:09:19 -05:00
Tyler Goodlet cbb973ae9d Drop internal nursery from option chain 2019-02-21 23:07:44 -05:00
Tyler Goodlet 462c419970 Add basic practice account support 2019-02-21 17:24:50 -05:00
Tyler Goodlet 435b2a56e8 Remove stream opening lock on `DataFeed`
Fixes to `tractor` that resolve issues with async generators being
non-task safe make the need for the mutex lock in
`DataFeed.open_stream()` unnecessary. Also, don't bother pushing empty
quotes from the publisher; avoids hitting the network when possible.
2019-02-20 21:39:57 -05:00
goodboy b2322d885c
Merge pull request #66 from pikers/tractor_contexts
Tractor pub-sub
2019-02-10 19:30:39 -05:00
Tyler Goodlet 3a6efd451d Don't bother ensuring all symbols in data 2019-02-10 19:09:54 -05:00
Tyler Goodlet 57bef52438 Capture the right logger 2019-02-10 17:29:08 -05:00
Tyler Goodlet 308ceb1772 Use search method for `piker api` test 2019-02-10 17:28:43 -05:00
Tyler Goodlet ea289540b3 Add a test to verify auth endpoint "locking" 2019-02-09 21:58:49 -05:00
Tyler Goodlet 3ab9e28ddb Use brokerd's client to get all contracts 2019-02-09 21:58:27 -05:00
Tyler Goodlet 395f0c8e4a Synchronize Questrade token refreshing per client
Questrade's API is half baked and can't handle concurrency.
It allows multiple concurrent requests to most endpoints *except*
for the auth endpoint used to refresh tokens:

    https://www.questrade.com/api/documentation/security

I've gone through extensive dialogue with their API team and despite
making what I think are very good arguments for doing the request
serialization on the server side, they decided that I should instead
do the "locking" on the client side. Frankly it doesn't seem like they
have that competent an engineering department as it took me a long time
to explain the issue even though it's rather trivial and probably not
that hard to fix; maybe it's better this way.

This adds a few things to ensure more reliable token refreshes on
expiry:

- add a `@refresh_token_on_err` decorator which can be used on `_API`
  methods that should refresh tokens on failure
- decorate most endpoints with this *except* for the auth ep
- add locking logic for the troublesome scenario as follows:
  * every time a request is sent out set a "request in progress" event
    variable that can be used to determine when no requests are currently
    outstanding
  * every time the auth end point is hit in order to refresh tokens set
    an event that locks out other tasks from making requests
  * only allow hitting the auth endpoint when there are no "requests in
    progress" using the first event
  * mutex all auth endpoint requests; there can only be one outstanding

- don't hit the accounts endpoint at client startup; we want to
  eventually support keys from multiple accounts and you can disable
  account info per key and just share the market data function
2019-02-09 21:39:22 -05:00