Bugfix/fix data gathering of fear and greed index (#505)
* Fix data gathering of fear and greed index * Update changelog
This commit is contained in:
parent
fe4013830d
commit
4908e6d35d
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed the data gathering of the _Fear & Greed Index_ (market mood)
|
||||
|
||||
## 1.84.0 - 30.11.2021
|
||||
|
||||
### Added
|
||||
|
@ -2,12 +2,7 @@ import { LookupItem } from '@ghostfolio/api/app/symbol/interfaces/lookup-item.in
|
||||
import { ConfigurationService } from '@ghostfolio/api/services/configuration.service';
|
||||
import { PrismaService } from '@ghostfolio/api/services/prisma.service';
|
||||
import { ghostfolioFearAndGreedIndexSymbol } from '@ghostfolio/common/config';
|
||||
import {
|
||||
DATE_FORMAT,
|
||||
getToday,
|
||||
getYesterday,
|
||||
isRakutenRapidApiSymbol
|
||||
} from '@ghostfolio/common/helper';
|
||||
import { DATE_FORMAT, getToday, getYesterday } from '@ghostfolio/common/helper';
|
||||
import { Granularity } from '@ghostfolio/common/types';
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { DataSource } from '@prisma/client';
|
||||
@ -31,10 +26,7 @@ export class RakutenRapidApiService implements DataProviderInterface {
|
||||
) {}
|
||||
|
||||
public canHandle(symbol: string) {
|
||||
return (
|
||||
isRakutenRapidApiSymbol(symbol) &&
|
||||
!!this.configurationService.get('RAKUTEN_RAPID_API_KEY')
|
||||
);
|
||||
return !!this.configurationService.get('RAKUTEN_RAPID_API_KEY');
|
||||
}
|
||||
|
||||
public async get(
|
||||
|
@ -85,10 +85,6 @@ export function isGhostfolioScraperApiSymbol(aSymbol = '') {
|
||||
return aSymbol.startsWith(ghostfolioScraperApiSymbolPrefix);
|
||||
}
|
||||
|
||||
export function isRakutenRapidApiSymbol(aSymbol = '') {
|
||||
return aSymbol === 'GF.FEAR_AND_GREED_INDEX';
|
||||
}
|
||||
|
||||
export function resetHours(aDate: Date) {
|
||||
const year = getYear(aDate);
|
||||
const month = getMonth(aDate);
|
||||
|
Loading…
x
Reference in New Issue
Block a user