diff --git a/apps/api/src/app/endpoints/market-data/market-data.controller.ts b/apps/api/src/app/endpoints/market-data/market-data.controller.ts index d1cbb73cd..4843536da 100644 --- a/apps/api/src/app/endpoints/market-data/market-data.controller.ts +++ b/apps/api/src/app/endpoints/market-data/market-data.controller.ts @@ -5,7 +5,8 @@ import { HasPermissionGuard } from '@ghostfolio/api/guards/has-permission.guard' import { MarketDataService } from '@ghostfolio/api/services/market-data/market-data.service'; import { SymbolProfileService } from '@ghostfolio/api/services/symbol-profile/symbol-profile.service'; import { - ghostfolioFearAndGreedIndexDataSource, + ghostfolioFearAndGreedIndexDataSourceCryptocurrencies, + ghostfolioFearAndGreedIndexDataSourceStocks, ghostfolioFearAndGreedIndexSymbolCryptocurrencies, ghostfolioFearAndGreedIndexSymbolStocks } from '@ghostfolio/common/config'; @@ -59,14 +60,14 @@ export class MarketDataController { this.symbolService.get({ includeHistoricalData, dataGatheringItem: { - dataSource: 'MANUAL', + dataSource: ghostfolioFearAndGreedIndexDataSourceCryptocurrencies, symbol: ghostfolioFearAndGreedIndexSymbolCryptocurrencies } }), this.symbolService.get({ includeHistoricalData, dataGatheringItem: { - dataSource: ghostfolioFearAndGreedIndexDataSource, + dataSource: ghostfolioFearAndGreedIndexDataSourceStocks, symbol: ghostfolioFearAndGreedIndexSymbolStocks } }) diff --git a/apps/api/src/app/info/info.service.ts b/apps/api/src/app/info/info.service.ts index 6b6c40fbb..c31f601e3 100644 --- a/apps/api/src/app/info/info.service.ts +++ b/apps/api/src/app/info/info.service.ts @@ -14,7 +14,7 @@ import { PROPERTY_DEMO_USER_ID, PROPERTY_IS_READ_ONLY_MODE, PROPERTY_SLACK_COMMUNITY_USERS, - ghostfolioFearAndGreedIndexDataSource + ghostfolioFearAndGreedIndexDataSourceStocks } from '@ghostfolio/common/config'; import { DATE_FORMAT, @@ -54,10 +54,11 @@ export class InfoService { if (this.configurationService.get('ENABLE_FEATURE_FEAR_AND_GREED_INDEX')) { if (this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION')) { info.fearAndGreedDataSource = encodeDataSource( - ghostfolioFearAndGreedIndexDataSource + ghostfolioFearAndGreedIndexDataSourceStocks ); } else { - info.fearAndGreedDataSource = ghostfolioFearAndGreedIndexDataSource; + info.fearAndGreedDataSource = + ghostfolioFearAndGreedIndexDataSourceStocks; } globalPermissions.push(permissions.enableFearAndGreedIndex); diff --git a/apps/api/src/services/twitter-bot/twitter-bot.service.ts b/apps/api/src/services/twitter-bot/twitter-bot.service.ts index a17585c5b..ee951820d 100644 --- a/apps/api/src/services/twitter-bot/twitter-bot.service.ts +++ b/apps/api/src/services/twitter-bot/twitter-bot.service.ts @@ -2,7 +2,7 @@ import { SymbolService } from '@ghostfolio/api/app/symbol/symbol.service'; import { BenchmarkService } from '@ghostfolio/api/services/benchmark/benchmark.service'; import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; import { - ghostfolioFearAndGreedIndexDataSource, + ghostfolioFearAndGreedIndexDataSourceStocks, ghostfolioFearAndGreedIndexSymbol } from '@ghostfolio/common/config'; import { @@ -44,7 +44,7 @@ export class TwitterBotService { try { const symbolItem = await this.symbolService.get({ dataGatheringItem: { - dataSource: ghostfolioFearAndGreedIndexDataSource, + dataSource: ghostfolioFearAndGreedIndexDataSourceStocks, symbol: ghostfolioFearAndGreedIndexSymbol } }); diff --git a/libs/common/src/lib/config.ts b/libs/common/src/lib/config.ts index d4b2c2a6f..4f3bbd77c 100644 --- a/libs/common/src/lib/config.ts +++ b/libs/common/src/lib/config.ts @@ -4,7 +4,9 @@ import ms from 'ms'; export const ghostfolioPrefix = 'GF'; export const ghostfolioScraperApiSymbolPrefix = `_${ghostfolioPrefix}_`; -export const ghostfolioFearAndGreedIndexDataSource = DataSource.RAPID_API; +export const ghostfolioFearAndGreedIndexDataSourceCryptocurrencies = + DataSource.MANUAL; +export const ghostfolioFearAndGreedIndexDataSourceStocks = DataSource.RAPID_API; export const ghostfolioFearAndGreedIndexSymbol = `${ghostfolioScraperApiSymbolPrefix}FEAR_AND_GREED_INDEX`; export const ghostfolioFearAndGreedIndexSymbolCryptocurrencies = `${ghostfolioPrefix}_FEAR_AND_GREED_INDEX_CRYPTOCURRENCIES`; export const ghostfolioFearAndGreedIndexSymbolStocks = `${ghostfolioPrefix}_FEAR_AND_GREED_INDEX_STOCKS`;