Tyler Goodlet
47cf4aa4f7
Error log brokerd msgs that have `.reqid == None`
...
Relates to the bug discovered in #310 , this should avoid out-of-order
msgs which do not have a `.reqid` set to be error logged to console.
Further, add `pformat()` to kraken logging of ems msging.
2022-06-05 22:13:08 -04:00
Tyler Goodlet
b44786e5b7
Support async-batched ohlc queries in all backends
...
Expect each backend to deliver a `config: dict[str, Any]` which provides
concurrency controls to `trimeter`'s batch task scheduler such that
backends can define their own concurrency limits.
The dirty deats in this patch include handling history "gaps" where
a query returns a history-frame-result which spans more then the typical
frame size (in seconds). In such cases we reset the target frame index
(datetime index sequence implemented with a `pendulum.Period`) using
a generator protocol `.send()` such that the sequence can be dynamically
re-indexed starting at the new (possibly) pre-gap datetime. The new gap
logic also allows us to detect out of order frames easier and thus wait
for the next-in-order to arrive before making more requests.
2022-05-09 11:15:14 -04:00
Tyler Goodlet
49509d55d2
Implement `open_history_client()` correctly for `kraken`
2022-05-09 11:15:14 -04:00
Konstantine Tsafatinos
773ed5e7ad
update to merge syntax in submit_limit, fix non_master push mistake
2022-04-16 15:01:31 -04:00
Konstantine Tsafatinos
59434b9a8a
refactor submit
...
_limit and expore the 'paper' like feature
2022-04-16 14:54:25 -04:00
Konstantine Tsafatinos
250d9cbc03
fix kraken bug, allow for live order edits
2022-04-16 14:38:03 -04:00
Tyler Goodlet
72ec34ffd2
Port to `pendulum` equivalent apis throughout
2022-04-16 13:23:42 -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
832e4c97d2
Drop shm: ShmArray` to `stream_quotes()` endpoint
2022-02-28 08:23:16 -05:00
Tyler Goodlet
95b31cbc0f
Drop references to deprecated `tractor.msg.pub`
2022-01-29 12:44:45 -05:00
Tyler Goodlet
6be6f25797
Add "crypto" type to binance and kraken symbols
2021-09-06 09:28:10 -04:00
Tyler Goodlet
a0660e553f
Start top level cacheing apis module
2021-08-26 17:04:59 -04:00
Konstantine Tsafatinos
90e5a10a66
modify error string to format: <name>.<provider>
2021-06-09 12:02:05 -04:00
Konstantine Tsafatinos
099bf260f5
fix unknown kraken symbol raised error
2021-06-01 18:01:45 -04:00
Tyler Goodlet
9792b9aa7d
Drop search pause config; use default
2021-05-28 14:11:02 -04:00
Tyler Goodlet
ff856a6ee3
Woops, make unsub pairs a list
2021-05-28 14:11:02 -04:00
Tyler Goodlet
d0e3f5a51c
Port binance and kraken to "reliable" ws API
2021-05-28 14:11:02 -04:00
Tyler Goodlet
7fa9f3f542
Add `Client.search_symbols()` to all backends, use it in `piker search`
2021-05-28 12:29:58 -04:00