File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,16 @@ export class OpenFeedListeners {
123123 return this . onMessageWithMetadata ( message , uniqueSymbols , def ) ;
124124 } ;
125125
126+ public getInstrumentByMarketId = ( marketId : Long ) : InstrumentDefinition | undefined => {
127+ const [ definition ] = this . instrumentByMarketId . get ( marketId . toString ( ) ) ?? [ undefined ] ;
128+ return definition ;
129+ } ;
130+
131+ public getSymbolsByMarketId = ( marketId : Long ) : string [ ] => {
132+ const [ , symbols ] = this . instrumentByMarketId . get ( marketId . toString ( ) ) ?? [ undefined , undefined ] ;
133+ return symbols ?. map ( ( [ symbol ] ) => symbol ) ?? [ ] ;
134+ } ;
135+
126136 /* eslint-disable class-methods-use-this */
127137 public onCleanup : ( ) => void | Promise < void > = ( ) => { } ;
128138 public onConnected : ( connection : IOpenFeedConnection ) => void | Promise < void > = ( ) => { } ;
You can’t perform that action at this time.
0 commit comments