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

WebSocket Generic Callback Architecture #130

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Authenticated trade convenience methods for callbacks
michaelwilner committed Sep 14, 2018
commit 396ba15b0b4ce0eba537a03f1bb79cb9b781828f
8 changes: 8 additions & 0 deletions v2/websocket/util.go
Original file line number Diff line number Diff line change
@@ -33,3 +33,11 @@ func (c *Client) OnPositionUpdate(callback ClientCallback) {
func (c *Client) OnPositionCancel(callback ClientCallback) {
c.RegisterCallback(bitfinex.PositionCancel{}, callback)
}

func (c *Client) OnTradeExecution(callback ClientCallback) {
c.RegisterCallback(bitfinex.TradeExecution{}, callback)
}

func (c *Client) OnTradeExecutionUpdate(callback ClientCallback) {
c.RegisterCallback(bitfinex.TradeExecutionUpdate{}, callback)
}