v0.1.0
Changelog for Spark Order Book
[v0.1.0] - 2024-09-06
Changes in Configuration for Spark Order Book (config.yaml)
- Added New Events:
- The following events were added to the configuration:
DepositEventWithdrawEvent
- The following events were added to the configuration:
Changes in GraphQL Schema (schema.graphql)
-
New Event Types:
- The following event types were added to the schema:
DepositEvent: Tracks asset deposits by users.WithdrawEvent: Tracks asset withdrawals by users.
- The following event types were added to the schema:
-
Updated Event Types:
- The
CancelOrderEventtype now includes theuserfield to track which user canceled the order. - The
TradeOrderEventtype now includessellerandbuyerfields to track participants in the trade.
- The
-
Removed Event Type:
- The
MatchOrderEventtype was removed, simplifying the schema by eliminating unused event types.
- The
-
New Balance Type:
- A
Balancetype was introduced to track user balances of assets within the system. This type includes fields:id: The unique identifier of the balance.amount: The amount of the asset the user holds.asset: The type of asset (base or quote).user: The user associated with the balance.timestamp: The last updated time of the balance.
- A
Changes in Handlers (OrderBookHandlers.ts)
-
Added Handlers for New Events:
DepositEventandWithdrawEventhandlers were added to handle user deposits and withdrawals, updating the user balances accordingly.
-
Balance Adjustments:
- Handlers for
CancelOrderEventandTradeOrderEventnow update user balances when orders are canceled or trades are executed.
- Handlers for
-
Removed Match Order Logic:
- The logic and handler for
MatchOrderEventwere removed as the event is no longer part of the schema.
- The logic and handler for
These changes bring improvements to the event tracking system and the management of user balances, while simplifying the schema by removing unused elements.
Full Changelog: v0.0.5...v0.1.0