Skip to content

Develop fee#33

Merged
shanu516516 merged 5 commits into
mainfrom
develop-fee
Jun 28, 2025
Merged

Develop fee#33
shanu516516 merged 5 commits into
mainfrom
develop-fee

Conversation

@shanu516516
Copy link
Copy Markdown
Collaborator

Title: Add Fee History Tracking and Fee Columns to Orders

Description:

This pull request introduces comprehensive support for order and settlement fee tracking, including:

  • Database migrations to add fee_filled and fee_settled columns to trader_order and trader_order_funding_updated tables, and a new fee_history table to record all fee changes with timestamps.
  • Rust model and schema updates to support the new columns and fee_history table.
  • Logic to batch and commit fee history records in the archiver.
  • Conversion support for fee_filled and fee_settled fields in trader order and funding update models.
  • New JSON-RPC public API methods: get_fee_rate and historical_fee_rate for retrieving current and historical fee rates.
  • WebSocket logic to handle and log real-time fee update events.
  • Dependency update to use twilight-relayer-rust from the develop-fee branch.
  • Migration helper SQL scripts and a new database trigger to keep available_margin and fee columns in sync during updates.

Impact:
These changes enable the system to accurately track, store, and query fee data for all trader orders, improving transparency and operational analytics. They also provide API access for current and historical fee rates.

@shanu516516 shanu516516 merged commit 013210d into main Jun 28, 2025
0 of 3 checks passed
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.

1 participant