-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: TAT-1662 trade fee does not adjust for market or limit order maker or taker #21428
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
feat: TAT-1662 trade fee does not adjust for market or limit order maker or taker #21428
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
…market-or-limit-order-maker-or-taker
…market-or-limit-order-maker-or-taker
…market-or-limit-order-maker-or-taker
…market-or-limit-order-maker-or-taker
|
|
Missing release label release-7.58.0 on PR. Adding release label release-7.58.0 on PR and removing other release labels(release-7.59.0), as PR was added to branch 7.58.0 when release was cut. |




Description
Adds
determineMakerStatusfunction inusePerpsOrderFeesto accurately display order fees based on maker/taker status.Changelog
CHANGELOG entry: added accurate market or taker status for order fee calculations
Related issues
Fixes: TAT-1662: Trade fee does not adjust for market or limit order maker or taker
Manual testing steps
Screenshots/Recordings
Before
After
tat-1662-trade-fee-does-not-adjust-for-market-or-limit-order-maker-or-taker-after-demo.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Derives maker/taker status in
usePerpsOrderFeesfrom limit price and live bid/ask, updates order/close views to pass required data, enables order book in streams, and adds comprehensive tests.determineMakerStatusand computeisMakerinusePerpsOrderFeesusingorderType,limitPrice,direction, and L2bestBid/Ask.limitPrice,direction,currentAskPrice,currentBidPrice; remove externalisMakerusage; minor fix informatFeeRate(useNumber.isNaN).PerpsOrderView: passlimitPrice,direction,currentAskPrice/bidtousePerpsOrderFees; restore fee/rewards computation block at new location.PerpsClosePositionView: passlimitPrice, inferreddirectionand livebestBid/AsktousePerpsOrderFeesfor closing fees.PerpsStreamManager: includeincludeOrderBook: trueinsubscribeToPrices(main and prewarm) to supply bid/ask to fee logic.usePerpsOrderFees.test.tsto cover maker/taker determination, edge cases, loading, recalculation, rewards/discounts, caching, and points estimation; update expectations for new params and logic.PerpsStreamManager.test.tsxto expectincludeOrderBook: trueon price subscriptions.Written by Cursor Bugbot for commit 3e0dda8. This will update automatically on new commits. Configure here.