fix: normalize netLpPosition to netLpPos for API consistency#161
fix: normalize netLpPosition to netLpPos for API consistency#1610x-SquidSol wants to merge 1 commit intodcccrypto:mainfrom
Conversation
The same logical field (net LP position) was exposed under two different names: `netLpPosition` in /funding/global and /funding/:slab top-level responses, but `netLpPos` everywhere else (/markets, /open-interest, and all funding history arrays — including the last24hHistory array nested *inside* the /funding/:slab response). Standardizes on `netLpPos` (6 of 8 existing occurrences, matches the DB column `net_lp_pos`, aligns with the abbreviated convention used throughout the API). Changes: - funding.ts: rename field in /funding/global and /funding/:slab responses - openapi.yaml: update FundingRateSummary and FundingRateDetails schemas - funding.test.ts: update assertion Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 22 minutes and 10 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
netLpPositionin/funding/globaland/funding/:slabtop-level, butnetLpPosin/markets,/open-interest, and all funding history arrays. Most notably, a single/funding/:slabresponse contained both names —netLpPositionat the top level andnetLpPosinsidelast24hHistoryentries.netLpPoseverywhere.Why
netLpPos?netLpPosnet_lp_pos(natural camelCase translation)netLpPos,lpSumAbs, etc.)Changes
src/routes/funding.tsnetLpPosition→netLpPosin/funding/global(L82) and/funding/:slab(L143, L192) responses + commentsopenapi.yamlFundingRateSummary(L888) andFundingRateDetails(L905) schemastests/routes/funding.test.tsTest plan
tsc --noEmitpassesvitest runpasses (186/186 tests)netLpPosis now used consistently across all endpoints🤖 Generated with Claude Code