Skip to content

fix: use relativeFundingRate for paper trading funding calculation#28

Merged
agent-smith-k merged 1 commit into
mainfrom
fix/paper-funding-rate
Apr 14, 2026
Merged

fix: use relativeFundingRate for paper trading funding calculation#28
agent-smith-k merged 1 commit into
mainfrom
fix/paper-funding-rate

Conversation

@agent-smith-k

@agent-smith-k agent-smith-k commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Paper trading was using the absolute/annualized fundingRate field from the historical-funding-rates API instead of relativeFundingRate (the actual per-interval rate), overcharging by ~7,000x per funding interval
  • Adds wiremock regression test to prevent field selection from regressing

Origin

Signed squash of #27 by @Ashok93 to satisfy branch protection signature requirements. Regression test added on top.

Closes #26

Paper trading was using the absolute/annualized fundingRate field from
the historical-funding-rates API instead of relativeFundingRate (the
actual per-interval rate), overcharging ~7000x per funding interval.

Adds wiremock regression test to prevent field selection from regressing.

Signed squash of #27 by @Ashok93 to satisfy branch protection signature
requirements.

Closes #26

Co-authored-by: Ashok <ashok.kannan93@gmail.com>
@agent-smith-k agent-smith-k merged commit 910a4d6 into main Apr 14, 2026
12 checks passed
@agent-smith-k agent-smith-k deleted the fix/paper-funding-rate branch April 14, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Paper trading funding uses fundingRate instead of relativeFundingRate — overcharges ~7000x

1 participant