1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-08 06:55:21 +02:00

Removed polygon

It was only being used for logo fetching
This commit is contained in:
Josh Pigford 2024-01-04 13:55:50 -06:00
parent 9d9d0bbbbd
commit 235555dfe9
3 changed files with 0 additions and 11 deletions

View file

@ -11,5 +11,4 @@ STRIPE_PUBLIC_KEY=
STRIPE_PRIVATE_KEY=
STRIPE_SIGNING_SECRET=
STRIPE_PRICE_ID=
POLYGON_KEY=
SCRAPING_BEE_KEY=

View file

@ -65,7 +65,6 @@ Currently the app relies on a few external services:
- [Ntropy](https://www.ntropy.com) for transaction enrichment
- [OpenAI](https://openai.com) for natural language processing
- [TwelveData](https://twelvedata.com) for stock market data
- [Polygon](https://polygon.io) for stock market data
- [ScrapingBee](https://www.scrapingbee.com) for web scraping
The goal is to eventually move away from these services and bring everything in-house as much as possible, but for the app to fully function, you'll need API keys from those services.

View file

@ -40,7 +40,6 @@ class SyncSecurityDetailsJob
end
def fetch_logo(symbol, website, name)
logo_url, logo_source = fetch_polygon_logo(symbol)
logo_url, logo_source = fetch_twelvedata_logo(symbol) unless logo_url
logo_url, logo_source = fetch_clearbit_logo(website) unless logo_url
logo_url, logo_source = fetch_gpt_clearbit_logo(symbol, name) unless logo_url
@ -48,14 +47,6 @@ class SyncSecurityDetailsJob
[logo_url, logo_source]
end
def fetch_polygon_logo(symbol)
response = Faraday.get("https://api.polygon.io/v3/reference/tickers/#{symbol}?apiKey=#{ENV['POLYGON_KEY']}")
results = JSON.parse(response.body)['results']
return unless results.present? && results['branding'].present?
[results['branding']['logo_url'], 'polygon']
end
def fetch_twelvedata_logo(symbol)
response = Faraday.get("https://api.twelvedata.com/logo?symbol=#{symbol}&apikey=#{ENV['TWELVEDATA_KEY']}")
url = JSON.parse(response.body)['url']