Implemented availability
This commit is contained in:
parent
ba8c95ff67
commit
2a36a9a6ce
1 changed files with 1 additions and 2 deletions
|
@ -5,7 +5,7 @@ from urllib.request import urlopen
|
||||||
import json
|
import json
|
||||||
import math
|
import math
|
||||||
|
|
||||||
api_test_url = "https://www.coingecko.com"
|
api_test_url = "https://api.coingecko.com/api/v3/ping"
|
||||||
api_url = "https://api.coingecko.com/api/v3/"
|
api_url = "https://api.coingecko.com/api/v3/"
|
||||||
api_metadata_url = api_url + "coins/list"
|
api_metadata_url = api_url + "coins/list"
|
||||||
api_price_url = api_url + "simple/price"
|
api_price_url = api_url + "simple/price"
|
||||||
|
@ -19,7 +19,6 @@ class GeckoCrypto(CryptoInterface):
|
||||||
super(GeckoCrypto, self).__init__()
|
super(GeckoCrypto, self).__init__()
|
||||||
|
|
||||||
def is_available(self):
|
def is_available(self):
|
||||||
return True
|
|
||||||
try:
|
try:
|
||||||
urlopen(api_test_url)
|
urlopen(api_test_url)
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue