Symbol Search
The Symbol Search is used to search and display instruments that match a full or partial instrument name entered in the search field.
Setting data
If you have a short list of symbols, the easiest way to display them in the symbol search is to implement the symbols group request API.
Otherwise, you can use a single symbol search requests.
If you are using a custom Datafeed API, you need to implement searchSymbols.
Filters
The search window has predefined UI to filter symbols based on symbol types and exchanges.
Both filters are optional. You can use any string as a symbol type.
Grouping of symbols
The search window can display symbols grouped by a root string. To enable grouping you need to provide a object with regular expressions to parse symbol names.
Hiding the Symbol Search
If your use of the library doesn't involve changing the displayed instrument by users, then you can hide the search box using header_symbol_search featureset.
Displaying Logos
If you would like to display logos for the symbols and/or the exchanges within the search results then you need to:
- Enable the corresponding featureset/s:
show_symbol_logos
,show_exchange_logos
. - Provide the urls for symbol, and/or the exchange within the search result items provided by your datafeed when the searchSymbols method is evoked. See the exchange_logo and logo_urls properties of the
SearchSymbolResultItem
.