Tyler Goodlet
b26b66cc66
Add context-styled `asyncio` client proxy for ib
...
This adds a new client manager-factory: `open_client_proxy()` which uses
the newer `tractor.to_asyncio.open_channel_from()` (and thus the
inter-loop-task-channel style) a `aio_client_method_relay()` and
a re-implemented `MethodProxy` wrapper to allow transparently calling
`asyncio` client methods from `trio` tasks. Use this proxy in the
history backfiller task and add a new (prototype)
`open_history_client()` which will be used in the new storage management
layer. Drop `get_client()` which was the portal wrapping equivalent of
the same proxy but with a one-task-per-call approach. Oh, and
`Client.bars()` can take `datetime`, so let's use it B)
2022-04-13 00:39:15 -04:00
Tyler Goodlet
7936dcafbf
Make linux timeout the same
2022-04-13 00:39:15 -04:00
Tyler Goodlet
d32c26c5d7
Add flag to avoid logging json to console
2022-04-13 00:39:15 -04:00
Tyler Goodlet
d2d3286fb8
Use `asyncio` in `Client.get_quote()`
2022-04-13 00:39:15 -04:00
Tyler Goodlet
f604437897
Remove symbol key from first quote from ib feed
2022-04-10 17:33:02 -04:00
Tyler Goodlet
998a5acd92
Crypto$ backend updates
...
- move to 3.9+ type annots
- add initial draft `open_history_client()` endpoints
- deliver `'fqsn'` keys in quote-stream init msgs
2022-04-10 17:33:00 -04:00
Tyler Goodlet
58517295d2
Disable kraken orders due to #299
2022-04-10 17:27:15 -04:00
Tyler Goodlet
c39fa825d0
More explicit order-cancel errors handling
2022-04-10 17:07:08 -04:00
Tyler Goodlet
88306a6c1e
Drop invalid status msg, linting cleanups
2022-04-09 16:56:05 -04:00
Konstantine Tsafatinos
cb970cef46
dark order gui patch, add filled status message
2022-04-08 19:25:24 -04:00
Konstantine Tsafatinos
c2e654aae2
change logic order for handling no config case
2022-04-07 13:03:53 -04:00
Konstantine Tsafatinos
2baa1b4605
fix hang when kraken is not in config
2022-03-28 18:28:19 -04:00
Konstantine Tsafatinos
cb8e97a142
address latest comments, refactor the pack position function
2022-03-23 10:34:53 -04:00
Konstantine Tsafatinos
1525c645ce
refactor get_positions into get_trades, and refactor pack_position with postion calc logic
2022-03-20 13:52:45 -04:00
Konstantine Tsafatinos
fd0acd21fb
refactory based on github comments, change doc string style
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
617bf3e0da
fix typo and get rid of pprint of ws stream
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
a3345dbba2
cleaned up code and added loop to grab all trades for position calcs
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
ee0be13af1
repurpose ws code for ownTrades stream, get trade authentication going
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
b1bff1be85
remove ws support for orders, use rest api instead for easy oid association
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
46948e0a8b
add order cancel support over websockets
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
d826a66c8c
use a mapping from userref to oid for order ack
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
6c54c81f01
get stashed changes
2022-03-06 15:17:26 -05:00
Tyler Goodlet
0122669dd4
Factor out ws msg hearbeat and error handling
...
Move the core ws message handling into `stream_messages()` and call that
from 2 new stream processors: `process_data_feed_msgs()` and
`process_order_msgs()`. Add comments for hints on how to implement the
order msg parsing as well as `pprint` received msgs to console for now.
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
0c905920e2
connect to krakens openOrders websocket
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
03d2eddce3
order submission and cancellation working
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
96dd5c632f
basic order submission and cancelling with kraken
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
b21bbf5031
valdiate and ack order requests from ems
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
66da58525d
mock orders validated from kraken
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
b55debbe95
get basic order request loop receiving msgs
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
1fe1f88806
added the bones for the handle_order_requests func
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
3d2be3674e
save progress on kraken to test out unit_select_fixes
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
48c7b5262c
get positions working for kraken
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
ef598444c4
get positions from trades
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
0285a847d8
Store changes for rebase, positions prototype
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
88061d8799
Add balance to the ledger
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
e12af8aa4c
Add get_ledger function; parses raw ledger from kraken api
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
184edb2a90
wrap api method calls with uri and nonce value
2022-03-06 15:17:26 -05:00
Konstantine Tsafatinos
b88dd380a3
get kraken authentication and retrieve balances
2022-03-06 15:17:26 -05:00
Tyler Goodlet
01f5f2d015
Don't require a rt quote, increase client connect timeout
2022-03-03 17:49:21 -05:00
Tyler Goodlet
832e4c97d2
Drop shm: ShmArray` to `stream_quotes()` endpoint
2022-02-28 08:23:16 -05:00
Tyler Goodlet
ca1c1cf415
Annoying doc strings
2022-02-11 10:30:30 -05:00
wattygetlood
cc87508fd9
Only load 4 ib requests worth of bars on windows...
2022-02-10 10:26:52 -05:00
Tyler Goodlet
e3c46a5d4d
Add draft, commented tickbytick for ib
2022-02-07 12:53:30 -05:00
Tyler Goodlet
26b0071471
Subscribe for rate calcs from IB in default tick set
2022-02-07 12:53:30 -05:00
Tyler Goodlet
9bfad86c29
Drop timeout-cancel block
2022-02-07 09:49:45 -05:00
Tyler Goodlet
a9d42b374f
ib: Allow history backfilling even when markets are closed
2022-02-07 09:49:45 -05:00
Tyler Goodlet
bb8fade16f
Update `msgpub` import from `tractor.experimental`
2022-01-30 12:46:54 -05:00
Tyler Goodlet
95b31cbc0f
Drop references to deprecated `tractor.msg.pub`
2022-01-29 12:44:45 -05:00
Tyler Goodlet
55cfe6082b
Re-key ib's 'unreportable trades' (tick 48) as
2022-01-26 13:48:21 -05:00
Tyler Goodlet
d27214621d
Update some typing and add latency checks for binance
2022-01-25 07:57:01 -05:00