Agustin Alexander
3 years ago
No known key found for this signature in database
GPG Key ID: 8CE7A1BA5D60D7EF
2 changed files with
24 additions and
24 deletions
-
.env
-
apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts
|
@ -14,3 +14,6 @@ ACCESS_TOKEN_SALT=<INSERT_RANDOM_STRING> |
|
|
ALPHA_VANTAGE_API_KEY= |
|
|
ALPHA_VANTAGE_API_KEY= |
|
|
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/${POSTGRES_DB}?sslmode=prefer |
|
|
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/${POSTGRES_DB}?sslmode=prefer |
|
|
JWT_SECRET_KEY=<INSERT_RANDOM_STRING> |
|
|
JWT_SECRET_KEY=<INSERT_RANDOM_STRING> |
|
|
|
|
|
|
|
|
|
|
|
# If TZ different than US change it so that Yahoo finance query does not fail |
|
|
|
|
|
# TZ='America/New_York' |
|
|
|
@ -140,8 +140,7 @@ export class YahooFinanceService implements DataProviderInterface { |
|
|
if (code) { |
|
|
if (code) { |
|
|
response.countries = [{ code, weight: 1 }]; |
|
|
response.countries = [{ code, weight: 1 }]; |
|
|
} |
|
|
} |
|
|
} catch { |
|
|
} catch {} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (assetProfile.summaryProfile?.sector) { |
|
|
if (assetProfile.summaryProfile?.sector) { |
|
|
response.sectors = [ |
|
|
response.sectors = [ |
|
@ -563,8 +562,6 @@ export class YahooFinanceService implements DataProviderInterface { |
|
|
case 'utilities': |
|
|
case 'utilities': |
|
|
sector = 'Utilities'; |
|
|
sector = 'Utilities'; |
|
|
break; |
|
|
break; |
|
|
default: |
|
|
|
|
|
sector = aString; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return sector; |
|
|
return sector; |
|
|