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

[BUG] Filled order fees are not recorded correctly #2084

Closed
7 of 14 tasks
Nullably opened this issue Jul 21, 2020 · 7 comments · Fixed by #4847, #4860, #4881, #4896 or #4912
Closed
7 of 14 tasks

[BUG] Filled order fees are not recorded correctly #2084

Nullably opened this issue Jul 21, 2020 · 7 comments · Fixed by #4847, #4860, #4881, #4896 or #4912
Assignees
Labels

Comments

@Nullably
Copy link
Contributor

Nullably commented Jul 21, 2020

Describe the bug

Fees for orders that are filled are not recorded correctly for many connectors, instead of taking fees reported from exchange's API, the connectors call c_get_fee (which estimates fee). This results in incorrect fees stored on trades table (sqlite) and incorrect performance reported on history command.

This mistake was partly due to Binance connector had this bug which other connectors copied the code from. The bug was fixed on 29 December 2020 on Binance connector so connectors created after the date should not get affected.

Connectors which broadcast fee incorrectly on OrderFilledEvent:

  • Kucoin
  • Binance Perpetual Derivative
  • Bifinex
  • Coinbase Pro
  • Bittrex
  • OkEx
  • Huobi
  • Beaxy
  • FTX
  • Blocktane
  • Coinzoom
  • DigiFinex
  • Gate.io
  • Liquid

┆Issue is synchronized with this Clickup task by Unito

@Nullably Nullably added the bug label Jul 21, 2020
@Nullably Nullably changed the title [BUG] Filled order fees are not stored correctly. [BUG] Filled order fees are not recorded correctly. Jul 22, 2020
@dennisocana dennisocana added the P3 label Oct 20, 2020
@dennisocana dennisocana removed the bug label Mar 7, 2021
@phbrgnomo phbrgnomo added the bug label Jun 23, 2021
@dennisocana dennisocana added P1 and removed P3 labels Sep 22, 2021
@dennisocana dennisocana changed the title [BUG] Filled order fees are not recorded correctly. [BUG] Filled order fees are not recorded correctly Sep 23, 2021
@aarmoa aarmoa self-assigned this Nov 29, 2021
@aarmoa
Copy link
Contributor

aarmoa commented Nov 29, 2021

@aarmoa aarmoa linked a pull request Dec 1, 2021 that will close this issue
2 tasks
This was referenced Dec 2, 2021
@aarmoa
Copy link
Contributor

aarmoa commented Dec 6, 2021

OkEx does not provide trades (order fills) events through the websocket. The only alternative for this connector is to estimate fees (see https://www.okex.com/docs/en/#spot_ws-channel)

@aarmoa aarmoa mentioned this issue Dec 7, 2021
2 tasks
@aarmoa aarmoa linked a pull request Dec 7, 2021 that will close this issue
2 tasks
@aarmoa aarmoa mentioned this issue Dec 8, 2021
2 tasks
@aarmoa aarmoa linked a pull request Dec 8, 2021 that will close this issue
2 tasks
@aarmoa aarmoa mentioned this issue Dec 10, 2021
2 tasks
@aarmoa aarmoa linked a pull request Dec 10, 2021 that will close this issue
2 tasks
@aarmoa
Copy link
Contributor

aarmoa commented Dec 10, 2021

Cooper from Beaxy exchange confirmed that they don't have the possibility for the time being to include fees information in the order update events.

@aarmoa
Copy link
Contributor

aarmoa commented Dec 13, 2021

Blocktane does not provide fee information in the trade websocket channel. They don't include fee information in the websocket order update channel either. They do have a trades REST api that could be used to retrieve fees, but that would require modifying the current client logic to make this call every time a trade is completed, cancelled or failed.
For the time being we will have to keep estimating fees.

@aarmoa
Copy link
Contributor

aarmoa commented Dec 13, 2021

Coinzoom does not provide fees information in their order update websocket channel. We have to keep estimating fees for the exchange.

@aarmoa
Copy link
Contributor

aarmoa commented Dec 13, 2021

Digifinex does not provide fees information in the trades updates websocket endpoint (https://github.com/DigiFinex/api/blob/master/Websocket_API_en.md). It does not provide that information through the REST API interface, making it impossible to stop estimating fees for this exchange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment