-
Notifications
You must be signed in to change notification settings - Fork 452
feat(info): add 9 missing Info API methods #203
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
Merged
traderben
merged 9 commits into
hyperliquid-dex:master
from
smypmsa:feat/add-missing-info-methods
Aug 31, 2025
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
335ab96
feat(info): add 9 missing Info API methods
smypmsa 33dbed7
chore: update .gitignore to exclude testing folder
smypmsa 8594a63
fix: resolve linting and code style issues
smypmsa 9be6ff9
test: update Info API test parameters to match Chainstack examples
smypmsa cf3854e
fix: restore cassettes
smypmsa 2c66254
Merge branch 'master' into feat/add-missing-info-methods
smypmsa 30d18f5
style: apply pre-commit formatting fixes
smypmsa 9c88ca0
fix: remove batch_clearinghouse_states endpoint and optimize test cas…
smypmsa 2bff40a
fix: update userNonFundingLedgerUpdates cassette to include endTime=null
smypmsa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
tests/cassettes/info_test/test_batch_clearinghouse_states.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| interactions: | ||
smypmsa marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - request: | ||
| body: '{"type": "batchClearinghouseStates", "users": ["0x31ca8395cf837de08b24da3f660e77761dfb974b", | ||
| "0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036"], "dex": ""}' | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '150' | ||
| Content-Type: | ||
| - application/json | ||
| User-Agent: | ||
| - python-requests/2.32.3 | ||
| method: POST | ||
| uri: https://api.hyperliquid.xyz/info | ||
| response: | ||
| body: | ||
| string: 'null' | ||
| headers: | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '4' | ||
| Content-Type: | ||
| - application/json | ||
| Date: | ||
| - Fri, 22 Aug 2025 11:45:21 GMT | ||
| Server: | ||
| - nginx/1.22.1 | ||
| Via: | ||
| - 1.1 bd96095bb3c15c742ab4d72d1fecba6c.cloudfront.net (CloudFront) | ||
| X-Amz-Cf-Id: | ||
| - 716oMhKaZxZC9dod6b-3otnwwlDnfV8G-vBOT-qZ9zkZPZQzpy2YpQ== | ||
| X-Amz-Cf-Pop: | ||
| - FRA60-P5 | ||
| X-Cache: | ||
| - Error from cloudfront | ||
| access-control-allow-origin: | ||
| - '*' | ||
| access-control-expose-headers: | ||
| - '*' | ||
| vary: | ||
| - origin | ||
| - access-control-request-method | ||
| - access-control-request-headers | ||
| status: | ||
| code: 500 | ||
| message: Internal Server Error | ||
| version: 1 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| interactions: | ||
| - request: | ||
| body: '{"type": "delegatorHistory", "user": "0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036"}' | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '82' | ||
| Content-Type: | ||
| - application/json | ||
| User-Agent: | ||
| - python-requests/2.32.3 | ||
| method: POST | ||
| uri: https://api.hyperliquid.xyz/info | ||
| response: | ||
| body: | ||
| string: '[{"time":1751382238782,"hash":"0xaea14981ae79c88826b104269e1e61020161008a69327e1bd0716a870eb0032e","delta":{"delegate":{"validator":"0xb8f45222a3246a2b0104696a1df26842007c5bc5","amount":"89968.0","isUndelegate":false}}},{"time":1751382217852,"hash":"0xa41a74f16345b8b0ba4e04269e1d5d018200756676283eee1bbc9d4e86d0d942","delta":{"cDeposit":{"amount":"89968.0"}}},{"time":1746636092325,"hash":"0x1520bf77c0dae738c8130422ff52cf01cc00f7c6f145792f2eeca62d178cd048","delta":{"delegate":{"validator":"0xb8f45222a3246a2b0104696a1df26842007c5bc5","amount":"10000.1","isUndelegate":false}}},{"time":1746636051729,"hash":"0x88f45bda40a6b572ef230422ff50cf01e20075ab01e3a48566ea9979a7ac6313","delta":{"cDeposit":{"amount":"10000.1"}}}]' | ||
| headers: | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '721' | ||
| Content-Type: | ||
| - application/json | ||
| Date: | ||
| - Fri, 22 Aug 2025 11:45:24 GMT | ||
| Server: | ||
| - nginx/1.22.1 | ||
| Via: | ||
| - 1.1 628e5146add9b3daeb91ab8792398818.cloudfront.net (CloudFront) | ||
| X-Amz-Cf-Id: | ||
| - B6JLp5pY_ZwV5Maq5tZMTGwlfJSngY7VdiQZMSn9iMwnWap6HroQEg== | ||
| X-Amz-Cf-Pop: | ||
| - FRA60-P5 | ||
| X-Cache: | ||
| - Miss from cloudfront | ||
| access-control-allow-origin: | ||
| - '*' | ||
| access-control-expose-headers: | ||
| - '*' | ||
| vary: | ||
| - origin | ||
| - access-control-request-method | ||
| - access-control-request-headers | ||
| status: | ||
| code: 200 | ||
| message: OK | ||
| version: 1 |
smypmsa marked this conversation as resolved.
Show resolved
Hide resolved
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
53 changes: 53 additions & 0 deletions
53
tests/cassettes/info_test/test_user_non_funding_ledger_updates_with_end_time.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| interactions: | ||
| - request: | ||
| body: '{"type": "userNonFundingLedgerUpdates", "user": "0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036", | ||
| "startTime": 1681923833000, "endTime": 1682010233000}' | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '147' | ||
| Content-Type: | ||
| - application/json | ||
| User-Agent: | ||
| - python-requests/2.32.3 | ||
| method: POST | ||
| uri: https://api.hyperliquid.xyz/info | ||
| response: | ||
| body: | ||
| string: '[]' | ||
| headers: | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '2' | ||
| Content-Type: | ||
| - application/json | ||
| Date: | ||
| - Fri, 22 Aug 2025 11:45:20 GMT | ||
| Server: | ||
| - nginx/1.22.1 | ||
| Via: | ||
| - 1.1 bc841916063a49c638b48e73f77a28e8.cloudfront.net (CloudFront) | ||
| X-Amz-Cf-Id: | ||
| - D8Oa1RQKRIe6INTVcGG14k0D09p8YP-IFdUOAeppzsojGT-ojYedOA== | ||
| X-Amz-Cf-Pop: | ||
| - FRA60-P5 | ||
| X-Cache: | ||
| - Miss from cloudfront | ||
| access-control-allow-origin: | ||
| - '*' | ||
| access-control-expose-headers: | ||
| - '*' | ||
| vary: | ||
| - origin | ||
| - access-control-request-method | ||
| - access-control-request-headers | ||
| status: | ||
| code: 200 | ||
| message: OK | ||
| version: 1 |
53 changes: 53 additions & 0 deletions
53
tests/cassettes/info_test/test_user_non_funding_ledger_updates_without_end_time.yaml
smypmsa marked this conversation as resolved.
Show resolved
Hide resolved
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| interactions: | ||
| - request: | ||
| body: '{"type": "userRateLimit", "user": "0x31ca8395cf837de08b24da3f660e77761dfb974b"}' | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '79' | ||
| Content-Type: | ||
| - application/json | ||
| User-Agent: | ||
| - python-requests/2.32.3 | ||
| method: POST | ||
| uri: https://api.hyperliquid.xyz/info | ||
| response: | ||
| body: | ||
| string: '{"cumVlm":"170043721737.450012207","nRequestsUsed":36589831368,"nRequestsCap":170043731737}' | ||
| headers: | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '91' | ||
| Content-Type: | ||
| - application/json | ||
| Date: | ||
| - Fri, 22 Aug 2025 11:45:23 GMT | ||
| Server: | ||
| - nginx/1.22.1 | ||
| Via: | ||
| - 1.1 76f18545659f3cecc2213d8e93d15fb2.cloudfront.net (CloudFront) | ||
| X-Amz-Cf-Id: | ||
| - lXzwL1ejqdnvtapMPFADHuF-H134yuDqjaHhGTI0xiueITWcLuT_xw== | ||
| X-Amz-Cf-Pop: | ||
| - FRA60-P5 | ||
| X-Cache: | ||
| - Miss from cloudfront | ||
| access-control-allow-origin: | ||
| - '*' | ||
| access-control-expose-headers: | ||
| - '*' | ||
| vary: | ||
| - origin | ||
| - access-control-request-method | ||
| - access-control-request-headers | ||
| status: | ||
| code: 200 | ||
| message: OK | ||
| version: 1 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.