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

Kucoin perpetuals - history displays incorrect fees paid #6163

Closed
rapcmia opened this issue Mar 23, 2023 · 4 comments · Fixed by #6235
Closed

Kucoin perpetuals - history displays incorrect fees paid #6163

rapcmia opened this issue Mar 23, 2023 · 4 comments · Fixed by #6235

Comments

@rapcmia
Copy link
Contributor

rapcmia commented Mar 23, 2023

Describe the bug
While checking kucoin_perpetual trade data we notice that the fees paid does not match between client and kucoin's exchange trade history. Based on kucoin future trading fees default 0.02%/0.06% (maker/taker) which is correct on kucoin_perpetual_utils.py however this is not the case for the client when tested on different markets {XRP-USDT, LINK-USDT} For calculating the fees we assume this calculation (price * order_amount) * fees rate

image

Sample scenario on the attached CSV
The price is 0.419 with order_amount of 20XRP and fee is 0.02% on trade history in which we expect should be around 0.001676 however on the CSV file its returning value is 0.20

{'fee_type': 'DeductedFromReturns', 'percent': '0', 'percent_token': 'USDT', 'flat_fees': [{'token': 'USDT', 'amount': '0.20'}]}

Steps To Reproduce

  1. Setup simple perpetual market making strategy
  2. Setup spreads enough for trade
  3. Check history, CSV and kucoin trade history

Release version
Development branch

trades_perp-kucoin1.csv

@rapcmia rapcmia changed the title kucoin perpetuals - history displays incorrect fees paid Kucoin perpetuals - history displays incorrect fees paid Apr 3, 2023
@cardosofede
Copy link
Contributor

@yancong001 do you want to work in this issue?

@yancong001
Copy link
Contributor

@yancong001 do you want to work in this issue?

OK, you can give it to me

@nikspz
Copy link
Contributor

nikspz commented Apr 14, 2023

Severity: P3
Bounty: 10,000 (https://hummingbot.org/maintenance/bugs/)
Rationale: Bug related to Kucoin perpetual connector

@rapcmia rapcmia linked a pull request Apr 19, 2023 that will close this issue
2 tasks
@nikspz
Copy link
Contributor

nikspz commented Apr 24, 2023

Closing issue as paid, thank you @yancong001 for contribution

@nikspz nikspz closed this as completed Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Paid
Development

Successfully merging a pull request may close this issue.

4 participants