diff --git a/.env.example b/.env.example index b74a1923..80c7b93b 100644 --- a/.env.example +++ b/.env.example @@ -11,5 +11,4 @@ STRIPE_PUBLIC_KEY= STRIPE_PRIVATE_KEY= STRIPE_SIGNING_SECRET= STRIPE_PRICE_ID= -POLYGON_KEY= SCRAPING_BEE_KEY= \ No newline at end of file diff --git a/README.md b/README.md index 3bf21b67..acef8a38 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/app/sidekiq/sync_security_details_job.rb b/app/sidekiq/sync_security_details_job.rb index cbdedf7f..524573af 100644 --- a/app/sidekiq/sync_security_details_job.rb +++ b/app/sidekiq/sync_security_details_job.rb @@ -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']