We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents edaa377 + b496bc3 commit a1cafd5Copy full SHA for a1cafd5
1 file changed
src/utils/instrument.utils.ts
@@ -5,8 +5,10 @@ export const getSymbolKey = (contract: Contract | Instrument): string => {
5
if (!contract) {
6
return "";
7
}
8
+ const isCrypto = contract?.secType === 'CRYPTO';
9
+ const exchange = isCrypto && contract?.exchange ? `-${contract.exchange}` : "";
10
const lastTradeDate = contract?.lastTradeDate || contract?.lastTradeDateOrContractMonth;
- return `${contract.symbol}${!!contract?.secType? `-${contract.secType}` : ""}${!!lastTradeDate? `-${lastTradeDate}`: ''}`;
11
+ return `${contract.symbol}${!!contract?.secType ? `-${contract.secType}` : ""}${!!lastTradeDate ? `-${lastTradeDate}` : ''}${exchange}`;
12
};
13
14
export interface GetHistoricalData {
0 commit comments