OHLCVService Actions
2 actions registered.
| Name | Deprecated |
|---|---|
subscribe | |
unsubscribe |
OHLCVService:subscribe
Package: @metamask/core-backend
Subscribe to an OHLCV channel. If this is the first subscriber for the given asset/interval/currency combination a WebSocket subscription is created. Additional calls for the same combination only bump the reference count.
Parameters:
| Name | Description |
|---|---|
options | The subscription parameters. |
Returns: A promise that resolves once the subscription is established.
Handler signature:
(options: OHLCVSubscriptionOptions) => Promise<void>
OHLCVService:unsubscribe
Package: @metamask/core-backend
Unsubscribe from an OHLCV channel. Decrements the reference count and, when it reaches zero, starts a grace-period timer before actually unsubscribing from the WebSocket to absorb rapid navigation patterns.
Parameters:
| Name | Description |
|---|---|
options | The subscription parameters to unsubscribe from. |
Returns: A promise that resolves once the unsubscription is processed.
Handler signature:
(options: OHLCVSubscriptionOptions) => Promise<void>