Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscribing to created events seems broken and LiquidTap docs likely wrong. #2

Open
scherrey opened this issue Jan 11, 2020 · 1 comment

Comments

@scherrey
Copy link

Am using liquid-tap-python to try to subscribe to executions_cash_btcusd events. The docs at https://developers.liquid.com/#public-channels claim I should be subscribing to "updated" events but logging shows that these events come across as "created" events. See the stderr log output:
$ python tap.py > data/executions_cash_btcusd.json
Connection: Connection opened
Connection: ping to pusher
Connection: Message - {"data":"{"activity_timeout":120,"socket_id":"8544629409.4799544661"}","event":"pusher:connection_established"}
Connection: Sending event - {"event": "pusher:subscribe", "data": {"channel": "executions_cash_btcusd"}}
Connection: Message - {"data":"","event":"pusher:pong"}
Connection: pong from pusher
Connection: Message - {"channel":"executions_cash_btcusd","data":{},"event":"pusher_internal:subscription_succeeded"}
Connection: Message - {"channel":"executions_cash_btcusd","data":"{"created_at":1578762435,"id":248693094,"price":8113.295,"quantity":0.068,"taker_side":"sell"}","event":"created"}
Connection: Message - {"channel":"executions_cash_btcusd","data":"{"created_at":1578762504,"id":248693385,"price":8113.2492,"quantity":0.728,"taker_side":"buy"}","event":"created"}

However, even though I change the bind to subscribe to 'created' events, my callback function is never called and so even though the log shows events are out there I cannot capture them.

Contrast this to the executions_cash_btcusd channel which does product 'updated' events and subscriptions to same are captured in my callback function. I've attached two versions of the source code to show the difference.

Also - is there any other documentation for what events and channels exist to subscribe to and what their behavior really means? It's difficult to completely understand what the difference is between the semantics of the channels.

executions_cash_btcusd.txt
product_cash_btcusd_1.txt

@scherrey
Copy link
Author

Update to this issue. After running executions_cash_btcusd for a while, I am getting some events but only a few. Also, I can't see anything about these events that are any different than the events that the library detects and shows in the logs but doesn't execute the callback for. Very strange.

Attached is executions_cash_btcusd.log.txt which shows an execution with a bunch of events logged, and executions_cash_btcusd.json.txt which shows the events that arrive at the callback function (far far fewer than the quantity logged). Strange.

executions_cash_btcusd.json.txt
executions_cash_btcusd.log.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant