pip install jettonpriceapi
Mainnet:
from jettonpriceapi import *
api = Jettonapi(testnet=False)
Testnet:
from jettonpriceapi import *
api = Jettonapi(testnet=True)
Getting the current status of the TON API Пример:
api.get_status()
Getting the current token price or TON price
Parameter | Information |
---|---|
tokens | Token or TON |
currencies | Fiat or TON |
Пример:
price = api.get_price('TON', 'USD')
print(price)
Getting the change in token price or TON price
Parameter | Information |
---|---|
tokens | Token or TON |
diff | 24h, 7d, 30d |
currencies | Fiat or TON |
Пример:
diff = api.get_diff('TON', '30d', 'USD')
print(diff)