-
-
Notifications
You must be signed in to change notification settings - Fork 279
chore: add OHLCVService for real-time candlestick WebSocket streaming #8695
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
Open
sahar-fehri
wants to merge
29
commits into
main
Choose a base branch
from
chore/add-ohlcv-websocket
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 21 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
f2e425e
chore: add ohlcv websocket
sahar-fehri 42bfec7
chore: lint
sahar-fehri ab85cc5
chore: lint
sahar-fehri bd0d4d2
chore: changelog
sahar-fehri 4a8a3cf
fix: re-organize code
sahar-fehri 01237ea
fix: lint
sahar-fehri 3569042
Merge branch 'main' into chore/add-ohlcv-websocket
sahar-fehri 8324143
fix: fix messenger actions
sahar-fehri 9f2e1de
fix: lint
sahar-fehri 181ae75
fix: unit tests
sahar-fehri f3d53de
Merge branch 'main' into chore/add-ohlcv-websocket
sahar-fehri 5b1b3c4
fix: lint
sahar-fehri 1f601d6
fix: cleanup
sahar-fehri 510d33d
fix: add debug logs
sahar-fehri c064480
fix: add grace period flush logic and log cleanup
sahar-fehri 094d56f
fix: lint
sahar-fehri dbcc5ba
fix: handle rejection
sahar-fehri 9676545
fix: do not resubscribe channels in grace period
sahar-fehri b806268
fix: add channel lock logic to handle concurrent sub/unsub
sahar-fehri c7e5841
fix: jsdoc
sahar-fehri bb01736
fix: add channel lock for performunsub
sahar-fehri 6a86401
fix: fix unsub condition
sahar-fehri 5b75ca1
fix: use mutex for ohlcv lock
sahar-fehri e365bff
Merge branch 'main' into chore/add-ohlcv-websocket
sahar-fehri f098394
fix: lint
sahar-fehri 68f5cc7
fix: add mutex on concurrent resubscrible
sahar-fehri 01e0180
fix: resubscribe after disconnect
sahar-fehri 337abd9
fix: lint
sahar-fehri 150787a
fix: fix refCount pump in subscribe
sahar-fehri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Prithpal-Sooriya marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
packages/core-backend/src/ws/ohlcv/OHLCVService-method-action-types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| /** | ||
| * This file is auto generated. | ||
| * Do not edit manually. | ||
| */ | ||
|
|
||
| import type { OHLCVService } from './OHLCVService'; | ||
|
|
||
| /** | ||
| * 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. | ||
| * | ||
| * @param options - The subscription parameters. | ||
| * @returns A promise that resolves once the subscription is established. | ||
| */ | ||
| export type OHLCVServiceSubscribeAction = { | ||
| type: `OHLCVService:subscribe`; | ||
| handler: OHLCVService['subscribe']; | ||
| }; | ||
|
|
||
| /** | ||
| * 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. | ||
| * | ||
| * @param options - The subscription parameters to unsubscribe from. | ||
| * @returns A promise that resolves once the unsubscription is processed. | ||
| */ | ||
| export type OHLCVServiceUnsubscribeAction = { | ||
| type: `OHLCVService:unsubscribe`; | ||
| handler: OHLCVService['unsubscribe']; | ||
| }; | ||
|
|
||
| /** | ||
| * Union of all OHLCVService action types. | ||
| */ | ||
| export type OHLCVServiceMethodActions = | ||
| | OHLCVServiceSubscribeAction | ||
| | OHLCVServiceUnsubscribeAction; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.