Skip to content

πŸ“ˆ Get real-time stocks from TradingView

getting id of market in searchMarketV3 fix

piotrwoj242244d01926
diff --git a/src/miscRequests.js b/src/miscRequests.js
index 424bf37..cfb8334 100644
--- a/src/miscRequests.js
+++ b/src/miscRequests.js
@@ -160,7 +160,7 @@ module.exports = {
return data.symbols.map((s) => {
const exchange = s.exchange.split(' ')[0];
- const id = `${exchange.toUpperCase()}:${s.symbol}`;
+ const id = s.prefix ? `${s.prefix}:${s.symbol}` : `${exchange.toUpperCase()}:${s.symbol}`;
return {
id,