This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
Bitfinex WebSockets API + Fix postonly not triggering re-buy #458
Merged
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
7dda2d5
Really re-order on "post only" error
crubb 3458b7c
Initial commit to switch bitfinex to websockets
crubb 9d0b78f
Select pair on first getTrade()
crubb 43e720a
Fixed bitfinex buy and sell from commandline
crubb d62946a
Bitfinex: Trigger calc of wallet balances on getBalance over websocke…
crubb fb0fd3f
Bitfinex: Removed duplicate definition of symbol
crubb 00d29b9
Bitfinex: Now using only one websockets connection
crubb b917509
Bitfinex WS: Better error handling on connect/auth/sending messages
crubb a39ef82
Bitfinex WS: Further improving retries and error handling
crubb 1d142dc
Bitfinex WS: Not directly calling the websockets part of the bitfinex…
crubb af971ef
Fix bug with preroll when 0 volume (#464)
cmroche f68c6b6
Bitfinex WS: Fixed wallet recalc when asset or currency are 0
crubb 199758e
Really re-order on "post only" error
crubb 9c15ea8
Initial commit to switch bitfinex to websockets
crubb 016b60b
Select pair on first getTrade()
crubb cfc7c78
Fixed bitfinex buy and sell from commandline
crubb 9121fb7
Bitfinex: Trigger calc of wallet balances on getBalance over websocke…
crubb 9a0f484
Bitfinex: Removed duplicate definition of symbol
crubb 68f84de
Bitfinex: Now using only one websockets connection
crubb 88efa70
Bitfinex WS: Better error handling on connect/auth/sending messages
crubb 2268101
Bitfinex WS: Further improving retries and error handling
crubb a7b88c0
Bitfinex WS: Not directly calling the websockets part of the bitfinex…
crubb 36b9575
Bitfinex WS: Fixed wallet recalc when asset or currency are 0
crubb 4cdc4ad
Merge branch 'crubb/bitfinex.ws' of github.com:crubb/zenbot into crub…
crubb 667fed1
Bitfinex WS: New reconnect approach, honor "INSUFFICIENT MARGIN"
crubb 88b84d7
Bitfinex WS: Missing )
crubb 7822028
Bitfinex WS: Remove debug logging on "close"
crubb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate in line 352
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a duplicate. The symbol on trade needs a 't' prefix, and in case the trade function is ever called as the first function, we need to know the pair and set it globally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please pay more attention:
trade: function (action, opts, cb) {
if (!pair) { pair = joinProduct(opts.product_id) }
var symbol = 't' + pair //line 347
client = authedClientWs();
var cid = Math.round(((new Date()).getTime()).toString() * Math.random())
var symbol = 't' + joinProduct(opts.product_id) //line 352
var amount = action === 'buy' ? opts.size : opts.size * -1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry, misunderstood your comment.