TGStat
TGStat
Type to search
Advanced channel search
  • flag English
    Site language
    flag Russian flag English flag Uzbek
  • Sign In
  • Catalog
    Channels and groups catalog Regional compilations Thematic compilations Платные каналы Search for channels
    Add a channel/group
  • Ratings
    Rating of channels Rating of groups Posts rating
    Ratings of brands and people
  • Analytics
  • Search by posts
  • Telegram monitoring
  • Promotion
    Advertising through Yandex Business Advertising in channels through TGStat Agency Advertising on TGStat.ru website
Thor w3

12 Sep 2023, 17:05

Open in Telegram Share Report

Как бесплатно оценивать стоимость токенов?

Нашел нормальную API, которая позволяет получать актуальную стоимость токенов.

Ограничений у API нет. В запросе нужно отправлять ID токена (конечной точки для получения ID нет 🧠), но можно спарсить инфу и найти.

Запрос на python может выглядеть примерно так:

def get_token_price(token_id):
url = f"https://api.coinlore.net/api/ticker/?id={token_id}"
response = requests.get(url)
if response.status_code == 200:
data = response.json()
if data and isinstance(data, list) and isinstance(data[0], dict):
price_usd = data[0].get("price_usd")
if price_usd is not None:
return Decimal(price_usd)
else:
logging.error(f"Ключ 'price_usd' отсутствует в данных: {data}")
return None
else:
logging.error(f"Неожиданный формат ответа: {data}")
return None
else:
logging.error(f"Статус ответа сервера: {response.status_code}")
return None

1.6k 0 41 18
Catalog
Channels and groups catalog Channels compilations Search for channels Add a channel/group
Ratings
Rating of Telegram channels Rating of Telegram groups Posts rating Ratings of brands and people
API
API statistics Search API of posts API Callback
Our channels
@TGStat @TGStat_Chat @telepulse @TGStatAPI
Read
Академия TGStat Telegram Research 2019 Telegram Research 2021 Telegram Research 2023
Contacts
Справочный центр Support Email Jobs
Miscellaneous
Terms and conditions Privacy policy Public offer
Our bots
@TGStat_Bot @SearcheeBot @TGAlertsBot @tg_analytics_bot @TGStatChatBot