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:
parent
9d9d0bbbbd
commit
235555dfe9
3 changed files with 0 additions and 11 deletions
|
@ -11,5 +11,4 @@ STRIPE_PUBLIC_KEY=
|
||||||
STRIPE_PRIVATE_KEY=
|
STRIPE_PRIVATE_KEY=
|
||||||
STRIPE_SIGNING_SECRET=
|
STRIPE_SIGNING_SECRET=
|
||||||
STRIPE_PRICE_ID=
|
STRIPE_PRICE_ID=
|
||||||
POLYGON_KEY=
|
|
||||||
SCRAPING_BEE_KEY=
|
SCRAPING_BEE_KEY=
|
|
@ -65,7 +65,6 @@ Currently the app relies on a few external services:
|
||||||
- [Ntropy](https://www.ntropy.com) for transaction enrichment
|
- [Ntropy](https://www.ntropy.com) for transaction enrichment
|
||||||
- [OpenAI](https://openai.com) for natural language processing
|
- [OpenAI](https://openai.com) for natural language processing
|
||||||
- [TwelveData](https://twelvedata.com) for stock market data
|
- [TwelveData](https://twelvedata.com) for stock market data
|
||||||
- [Polygon](https://polygon.io) for stock market data
|
|
||||||
- [ScrapingBee](https://www.scrapingbee.com) for web scraping
|
- [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.
|
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.
|
||||||
|
|
|
@ -40,7 +40,6 @@ class SyncSecurityDetailsJob
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_logo(symbol, website, name)
|
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_twelvedata_logo(symbol) unless logo_url
|
||||||
logo_url, logo_source = fetch_clearbit_logo(website) 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
|
logo_url, logo_source = fetch_gpt_clearbit_logo(symbol, name) unless logo_url
|
||||||
|
@ -48,14 +47,6 @@ class SyncSecurityDetailsJob
|
||||||
[logo_url, logo_source]
|
[logo_url, logo_source]
|
||||||
end
|
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)
|
def fetch_twelvedata_logo(symbol)
|
||||||
response = Faraday.get("https://api.twelvedata.com/logo?symbol=#{symbol}&apikey=#{ENV['TWELVEDATA_KEY']}")
|
response = Faraday.get("https://api.twelvedata.com/logo?symbol=#{symbol}&apikey=#{ENV['TWELVEDATA_KEY']}")
|
||||||
url = JSON.parse(response.body)['url']
|
url = JSON.parse(response.body)['url']
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue