filecoin-saturn / homepage

The saturn.tech homepage
https://saturn.tech
Other
3 stars 2 forks source link

update the real-time fil price API used; https://api.binance.com/api/v3/avgPrice?symbol=FILUSDT now fails #171

Open gruns opened 1 year ago

gruns commented 1 year ago
% curl -i 'https://api.binance.com/api/v3/avgPrice?symbol=FILUSDT'
HTTP/1.1 451 
Server: CloudFront
Date: Mon, 19 Dec 2022 08:29:19 GMT
Content-Length: 224
Connection: keep-alive
Content-Type: application/json
X-Cache: Error from cloudfront
Via: 1.1 bfad77da64cd65a36fcbbe44acb655e8.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: SFO53-P2
X-Amz-Cf-Id: 7AS3azuV_3DrDwUIPXvdUNCdutZ65rxfP4cl5BUsXXsYRxBf1ByevQ==

{
  "code": 0,
  "msg": "Service unavailable from a restricted location according to 'b. Eligibility' in https://www.binance.com/en/terms. Please contact customer service if you believe you received this message in error."
}

this results in 1) errors in the console image 2) an old, default FIL price of $5 to be used instead of the most up-to-date price, which is $3 as i type this

gruns commented 1 year ago

i just found https://tldr.filecoin.io/, which also loads fil's price dynamically

the api https://tldr.filecoin.io/ uses? coingecko's:

is this endpoint a suitable replacement for binance's?