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

feat(htx): implement deposit, withdrawal, and trade queries #8135

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

moxw
Copy link
Contributor

@moxw moxw commented Jun 20, 2024

Closes #2323

@moxw moxw requested a review from yabirgb June 20, 2024 15:17
@moxw moxw added the ready for peer review Backend PR ready to be reviewed by colleagues label Jun 20, 2024
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 12.50000% with 98 lines in your changes missing coverage. Please review.

Project coverage is 71.04%. Comparing base (f2b51c3) to head (7411881).
Report is 20 commits behind head on develop.

Files Patch % Lines
rotkehlchen/exchanges/htx.py 12.50% 98 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8135      +/-   ##
===========================================
- Coverage    80.41%   71.04%   -9.37%     
===========================================
  Files         1225     1248      +23     
  Lines       107881   109320    +1439     
  Branches     13129    13360     +231     
===========================================
- Hits         86750    77665    -9085     
- Misses       18817    29658   +10841     
+ Partials      2314     1997     -317     
Flag Coverage Δ
backend 62.46% <12.50%> (-18.27%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@yabirgb yabirgb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the last PR? if so add the changelog entry

rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/tests/exchanges/test_htx.py Outdated Show resolved Hide resolved
@yabirgb yabirgb added PR review work work on PR review comments and removed ready for peer review Backend PR ready to be reviewed by colleagues labels Jun 20, 2024
@moxw moxw force-pushed the huobi-trades-deposits branch 2 times, most recently from 7c58de9 to 30e89d9 Compare June 20, 2024 20:45
@moxw moxw added ready for peer review Backend PR ready to be reviewed by colleagues and removed PR review work work on PR review comments labels Jun 20, 2024
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
@moxw moxw requested a review from yabirgb June 21, 2024 09:10
@moxw moxw force-pushed the huobi-trades-deposits branch 2 times, most recently from 30a9b82 to b5baabc Compare June 21, 2024 10:40
@yabirgb
Copy link
Member

yabirgb commented Jun 21, 2024

Querying the trades with the API key that we have I got:

Error response from HTX. URL: https://api.huobi.pro/v1/order/matchresults, Response: {"status":"error","err-code":"invalid-start-time","err-msg":"invalid.start.time (NT)","data":null}

rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
@moxw moxw force-pushed the huobi-trades-deposits branch 3 times, most recently from 4b0957b to 5774656 Compare June 21, 2024 17:23
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
@moxw moxw force-pushed the huobi-trades-deposits branch 4 times, most recently from 5e7051a to 04f12cf Compare June 21, 2024 18:09
@yabirgb yabirgb added ready for final review Backend PR ready to be reviewed by great Lefteris and removed ready for peer review Backend PR ready to be reviewed by colleagues labels Jun 21, 2024
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
@LefterisJP LefterisJP added PR review work work on PR review comments and removed ready for final review Backend PR ready to be reviewed by great Lefteris labels Jun 22, 2024
@moxw moxw added ready for final review Backend PR ready to be reviewed by great Lefteris and removed PR review work work on PR review comments labels Jun 24, 2024
Copy link
Member

@LefterisJP LefterisJP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still things not addressed from last PR review...

rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Outdated Show resolved Hide resolved
rotkehlchen/exchanges/htx.py Show resolved Hide resolved
Copy link
Member

@LefterisJP LefterisJP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as what I asked is there.

One TODO that comes out of it is what I wrote in discord:

But you can do better and also check that the request to the CEX matches what you
expect. So test the request part too. Cause right now the app can send a ping to the > CEX and the test would happily pass.
Please fix this in another PR. If this is green.

@yabirgb yabirgb merged commit b1a0588 into rotki:develop Jun 24, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for final review Backend PR ready to be reviewed by great Lefteris
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Huobi exchange
3 participants