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

Bitfinex: WS cancel stuck waiting for confirmation #1288

Closed
gbjk opened this issue Jul 30, 2023 · 1 comment · Fixed by #1292
Closed

Bitfinex: WS cancel stuck waiting for confirmation #1288

gbjk opened this issue Jul 30, 2023 · 1 comment · Fixed by #1292
Assignees

Comments

@gbjk
Copy link
Collaborator

gbjk commented Jul 30, 2023

Given a cancellation request such as:

[[0,"oc",null,{"id":123642403113}]]

And an ack:

[0,"n",[1690698879385,"oc-req",null,null,[123642403113,null,136725840,"tBTCUST",1690698868393,169
0698868394,0.0008,0.0008,"EXCHANGE LIMIT",null,null,null,0,"ACTIVE",null,null,29145,0,0,0,null,null,null,0,0,null,null,null,"API>BFX",null,null,{}],null,"SUCCESS","Submitted for cancellation; waiting for confirmation (ID: 123642403113)."]]

and confirmation

[0,"oc",[123642403113,null,136725840,"tBTCUST",1690698868393,1690698879386,0.0008,0.0008,"EXCHANG
E LIMIT",null,null,null,0,"CANCELED",null,null,29145,0,0,0,null,null,null,0,0,null,null,null,"API>BFX",null,null,{}]]

We eventually get a response to cancelOrder:
Bitfinex websocket connection: timeout waiting for response with signature: 123642403113"
Where the signature is the order number.

It seems to not be accepting the cancellation ack/conf.

@gbjk
Copy link
Collaborator Author

gbjk commented Jul 30, 2023

Can't self-assign this but I'm working on it 🛠️

gbjk added a commit to gbjk/gocryptotrader that referenced this issue Aug 1, 2023
shazbert pushed a commit to shazbert/gocryptotrader that referenced this issue Nov 10, 2023
…ts (thrasher-corp#1317)

* Bitfinex: Fix cancel/update order WS ack not seen

Fixes thrasher-corp#1288

* Bitfinex: Fix ws Unsubscribe and Resubscribe

Unsubscribe needed to use the channel id.
Resubscribe needs to have the original subscription params.

* Bitfinex: Fix ws Trades Fees on te

The ws channel for authenticated Trades sends two types of update:
* te, Trade Executed
* tu, Trade Execution Update

Only the second one contains fee information.
[See the docs](https://docs.bitfinex.com/reference/ws-auth-trades)

This commit fixes:
`exchange Bitfinex websocket error - unable to type assert trade fee`
after an executed market trade on the te update

* Bitfinex: Fix error on ws auth ok

This fixes:
`Bitfinex Could not find an existing channel subscription: account Pair:
ChannelID: 0`
It's not clear from history why we'd want to store a reference to the
ubiquitous 0 channel like this, but it's definitely wrong, and anything
that attempts to get channel information about 0 chan needs to be fixed
anyway.

* Bitfinex: Refactor wsUpdate handling

This commit doesn't break out all the sub-updater, but attempts to do
something about the unmanagable size of ws update handling

* Binfinex: Fix linter issue on chanId casing

* Bitfinex: Fix linter outdent complaint

* Bitfinex: Fix linter issues on test

* Bitfinex: Fix TestWsTradingPairSnapshot chan lookup

* Bitfinex: Remove unnecessary WsAddSubs in test

* Bitfinex: Fix TestWsSubscribedResponse chan

* Bitfinex: Throw a specific error for bad event

* Bitfinex: WS Type assertions for positionSnapshots

* Bitfinex: tradeUpdate type assertion

* Bitfinex: Reinstate default subscriptions

* Bitfinex: Assert chan assetType is the same

* Bitfinex: Lowercase error string

* Bitfinex: Refactor WS eventType/chanId handling

* Bitfinex: Fix linter issues

* Bitfinex: Fix delimiter for pairs with more than 6 chars

* Bitfinex: Fix WS handling of subscribed symbols

This simplifies the handling of subscription symbols.
Now that we know the channel up front from handling the subscribed
response we can limit the parsing forms needed

* Bitfinex: Placate the linter

* Bitfinex: Disable margin assets for WS

Margin WS Currently not fully implemented and causes subscription collisions with spot

* Bitfinex: Fix parsing of 4 part funding keys

This improves overall handling and errors on a few current assumptions
about key structure

* Bitfinex: Linter fixes

* Bitfinex: Remove key parsing from assetPairFromSymbol

* Bitfinex: Use native error wrapping

* Bitfinex: Skip disabled assets in default ws subs
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

Successfully merging a pull request may close this issue.

1 participant