feat: expose index_price, margin_borrow, liquidation.stats SDK methods (#126)#127
Merged
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #126
Follow-up to #123/#125. The registry-param coverage audit surfaced 4 endpoints in
_endpoints.pywith no SDK exposure. Per maintainer decisions, this exposes 3 of them and intentionally excludes the 4th.Exposed surfaces
liquidation.stats()→GET /api/v1/liquidation/stats. NewLiquidation.stats(window="1h", exchange=None, min_volume_usd=None); validateswindow∈ {1h,4h,24h}.margin_borrow→GET /api/v1/margin-borrow. New top-level callable clientMarginBorrow, reached viamaxi.margin_borrow(asset="BTC").index_price→GET /api/v1/index-price. New top-level callable clientIndexPrice, reached viamaxi.index_price(asset="BTC", from_=..., to=..., interval="5m").from_/tofollow the existing**{"from": ...}splat convention (open_interest).All dispatch via
request_endpoint(op_id, ...); no hand-built URLs.Intentionally excluded
listings_historical— NOT surfaced (not in the public data-api). Its_ALLOWLISTentry is kept with an updated rationale, and the audit block comment no longer claims all four are pending.Docs
docs/margin-borrow.md,docs/index-price.md(+ nav inmkdocs.yml).docs/liquidation.mdupdated with astats()usage snippet + note.Test plan
black --check datamaxi tests— clean (51 files unchanged).flake8 datamaxi tests— no findings.python -m pytest -m "not integration"— 134 passed, 11 skipped, 107 deselected.test_endpoint_param_coverage.pynow asserts the 3 exposed endpoints' params are forwarded (allowlist entries removed); passes.