Skip to content

Conversation

@anywhy
Copy link
Contributor

@anywhy anywhy commented Oct 12, 2025

No description provided.

@anywhy anywhy requested a review from c9s as a code owner October 12, 2025 12:50
@anywhy anywhy marked this pull request as draft October 12, 2025 12:50
@anywhy anywhy changed the title FUTURE: [exchange][hyperliquid] init hyperliquid exchange WIP:FUTURE: [exchange][hyperliquid] init hyperliquid exchange Oct 12, 2025
@anywhy anywhy changed the title WIP:FUTURE: [exchange][hyperliquid] init hyperliquid exchange WIP:FEATURE: [exchange][hyperliquid] init hyperliquid exchange Oct 12, 2025
@codecov
Copy link

codecov bot commented Oct 12, 2025

Codecov Report

❌ Patch coverage is 50.32895% with 302 lines in your changes missing coverage. Please review.
✅ Project coverage is 20.07%. Comparing base (9650b8d) to head (4d96cbd).
⚠️ Report is 277 commits behind head on main.

Files with missing lines Patch % Lines
pkg/exchange/hyperliquid/exchange.go 18.34% 176 Missing and 11 partials ⚠️
pkg/exchange/hyperliquid/hyperapi/client.go 75.51% 23 Missing and 13 partials ⚠️
pkg/exchange/hyperliquid/convert.go 82.19% 24 Missing and 2 partials ⚠️
pkg/exchange/hyperliquid/futures.go 82.35% 3 Missing and 3 partials ⚠️
...hange/hyperliquid/hyperapi/cancel_order_request.go 0.00% 4 Missing ⚠️
...id/hyperapi/futures_get_account_balance_request.go 0.00% 4 Missing ⚠️
...e/hyperliquid/hyperapi/futures_get_meta_request.go 0.00% 4 Missing ⚠️
...yperliquid/hyperapi/get_account_balance_request.go 0.00% 4 Missing ⚠️
...change/hyperliquid/hyperapi/get_candles_request.go 0.00% 4 Missing ⚠️
...erliquid/hyperapi/get_historical_orders_request.go 0.00% 4 Missing ⚠️
... and 6 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2259      +/-   ##
==========================================
+ Coverage   19.12%   20.07%   +0.95%     
==========================================
  Files        1058     1084      +26     
  Lines       85297    71719   -13578     
==========================================
- Hits        16316    14401    -1915     
+ Misses      67755    56014   -11741     
- Partials     1226     1304      +78     
Files with missing lines Coverage Δ
pkg/exchange/hyperliquid/types.go 100.00% <100.00%> (ø)
pkg/types/exchange.go 52.38% <ø> (+0.38%) ⬆️
pkg/types/interval.go 54.02% <ø> (+2.93%) ⬆️
pkg/types/order.go 1.07% <ø> (-0.11%) ⬇️
pkg/exchange/factory.go 0.00% <0.00%> (ø)
...hange/hyperliquid/hyperapi/cancel_order_request.go 0.00% <0.00%> (ø)
...id/hyperapi/futures_get_account_balance_request.go 0.00% <0.00%> (ø)
...e/hyperliquid/hyperapi/futures_get_meta_request.go 0.00% <0.00%> (ø)
...yperliquid/hyperapi/get_account_balance_request.go 0.00% <0.00%> (ø)
...change/hyperliquid/hyperapi/get_candles_request.go 0.00% <0.00%> (ø)
... and 10 more

... and 894 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d58cfb...4d96cbd. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@anywhy anywhy force-pushed the feat_exchange_hyperliquid branch from 4fbb076 to ac09965 Compare October 14, 2025 05:29
@anywhy anywhy changed the title WIP:FEATURE: [exchange][hyperliquid] init hyperliquid exchange FEATURE: [exchange][hyperliquid] init hyperliquid exchange Oct 14, 2025
@anywhy anywhy marked this pull request as ready for review October 14, 2025 05:32
@anywhy anywhy force-pushed the feat_exchange_hyperliquid branch from ac09965 to 9ab74a6 Compare October 14, 2025 06:22
return data, nil
}

func (c *Client) newAuthenticatedRequest(
Copy link
Owner

Choose a reason for hiding this comment

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

perhaps just replace NewAuthenticatedRequest ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

size string `param:"s"`
price string `param:"p"`
reduceOnly bool `param:"r"`
clientOrderID *string `param:"c"`
Copy link
Owner

Choose a reason for hiding this comment

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

I think this is not supported -- param tag inside the field with slice

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it really doesn’t support that. Any idea how to deal with this kind of param?

Copy link
Owner

Choose a reason for hiding this comment

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

wrap it with a struct, and add String() method to marshal the internal payload into json string? I am not sure

is it a nested json data in the request?

@anywhy anywhy force-pushed the feat_exchange_hyperliquid branch 7 times, most recently from 0b17089 to 6dbf5f4 Compare October 15, 2025 16:59
@c9s c9s added exchange exchange related issues feature feature means adding new functionality for users from all perspective, e.g., web, cli, deployment labels Oct 27, 2025
@anywhy anywhy force-pushed the feat_exchange_hyperliquid branch from 679e825 to 6dbf5f4 Compare October 28, 2025 15:11
@anywhy anywhy force-pushed the feat_exchange_hyperliquid branch from 6dbf5f4 to b281b82 Compare October 29, 2025 14:38
@anywhy anywhy force-pushed the feat_exchange_hyperliquid branch from b281b82 to 5b1a689 Compare October 29, 2025 15:10
@anywhy anywhy force-pushed the feat_exchange_hyperliquid branch 2 times, most recently from cdfe99f to f54631d Compare November 9, 2025 03:56
@anywhy anywhy force-pushed the feat_exchange_hyperliquid branch from f54631d to d76bef3 Compare November 9, 2025 08:12

//go:generate GetRequest -url "/info" -type GetAccountBalanceRequest -responseDataType Account
type GetAccountBalanceRequest struct {
client requestgen.APIClient
Copy link
Owner

Choose a reason for hiding this comment

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

why not using requestgen.AuthenticatedAPIClient here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Hyperliquid /info API doesn't require any signatures to access; it's just public data on the chain.

@anywhy anywhy force-pushed the feat_exchange_hyperliquid branch from 09b7be7 to 379670f Compare November 10, 2025 10:10
@anywhy anywhy force-pushed the feat_exchange_hyperliquid branch from 379670f to 52e3317 Compare November 10, 2025 15:11
@anywhy anywhy force-pushed the feat_exchange_hyperliquid branch from bf7b6e9 to d98867d Compare November 14, 2025 14:21
@anywhy anywhy force-pushed the feat_exchange_hyperliquid branch from 4eecddb to 4d96cbd Compare November 17, 2025 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exchange exchange related issues feature feature means adding new functionality for users from all perspective, e.g., web, cli, deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants