Skip to content

Commit 242244d

Browse files
authored
getting id of market in searchMarketV3 fix
In some cases, the market id not equals to the concatenation of exchange name and symbol, but a special prefix is ​​also returned. For example, EURUSD from the FXCM exchange is FX:EURSD.
1 parent d60fc3e commit 242244d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/miscRequests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ module.exports = {
160160

161161
return data.symbols.map((s) => {
162162
const exchange = s.exchange.split(' ')[0];
163-
const id = `${exchange.toUpperCase()}:${s.symbol}`;
163+
const id = s.prefix ? `${s.prefix}:${s.symbol}` : `${exchange.toUpperCase()}:${s.symbol}`;
164164

165165
return {
166166
id,

0 commit comments

Comments
 (0)