Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/core-backend/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Add `OHLCVService` for real-time OHLCV (candlestick) data streaming via WebSocket ([#8695](https://github.com/MetaMask/core/pull/8695))
- Wraps `BackendWebSocketService` through the messenger pattern to provide subscribe/unsubscribe semantics for market-data OHLCV channels
- Includes reference counting, grace-period unsubscribe, idempotency checks, chain-status forwarding, and automatic resubscription on reconnect
- Export new types `OHLCVBar`, `OHLCVSubscriptionOptions`, `OHLCVSystemNotificationData`, `OHLCVServiceOptions`, `OHLCVServiceActions`, `OHLCVServiceAllowedActions`, `OHLCVServiceBarUpdatedEvent`, `OHLCVServiceChainStatusChangedEvent`, `OHLCVServiceSubscriptionErrorEvent`, `OHLCVServiceEvents`, `OHLCVServiceAllowedEvents`, and `OHLCVServiceMessenger` ([#8695](https://github.com/MetaMask/core/pull/8695))
- Export new constants `OHLCV_SERVICE_ALLOWED_ACTIONS` and `OHLCV_SERVICE_ALLOWED_EVENTS` for configuring the messenger ([#8695](https://github.com/MetaMask/core/pull/8695))

### Changed

- Bump `@metamask/accounts-controller` from `^37.1.0` to `^38.0.0` ([#8325](https://github.com/MetaMask/core/pull/8325), [#8363](https://github.com/MetaMask/core/pull/8363), [#8665](https://github.com/MetaMask/core/pull/8665))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* This file is auto generated.
* Do not edit manually.
*/

import type { OHLCVService } from './OHLCVService';

/**
* Subscribe to an OHLCV channel for real-time candlestick data.
*
* @param options - The subscription parameters (assetId, interval, currency).
*/
export type OHLCVServiceSubscribeAction = {
type: `OHLCVService:subscribe`;
handler: OHLCVService['subscribe'];
};

/**
* Unsubscribe from an OHLCV channel.
*
* @param options - The subscription parameters to unsubscribe from.
*/
export type OHLCVServiceUnsubscribeAction = {
type: `OHLCVService:unsubscribe`;
handler: OHLCVService['unsubscribe'];
};

/**
* Union of all OHLCVService action types.
*/
export type OHLCVServiceMethodActions =
| OHLCVServiceSubscribeAction
| OHLCVServiceUnsubscribeAction;
Loading
Loading