Fragment.com API Library (TON - Telegram)
Nima Akbarzadeh
Posted on December 12, 2022
Fragment.com Library (TON - Telegram)
Last week, I was trying to scrape data from Fragment.com, But I didn't find any Official API.
After that, I decided to make my scripts open-source, and then suddenly I asked myself "Why not make a library?"
So, I made an UnOfficial Fragment (Telegram - Ton Coin) Python library, so everyone can easily scrape what he/she needs.
Today's markets use the power of AI and robot traders. Classic trading methods are going to be deprecated as soon as possible.
For making trader robots, firstly you need data from the target's auctions and prices, etc.
This library can help you to grab and scrape what you need.
You can install it easily via Pip python package manager
pip install ton-fragment
Let's see some examples.
For example, you need to get recently listed for-sale numbers
You get fetch this data like that:
from ton_fragment.numbers.numbers import Numbers
all_numbers = Numbers('sale', 'listed')
print(all_numbers.result)
Or you need to get the status of a username or a number to realize it's still on sale or what's the highest bid price for it or when the auction will end:
from ton_fragment.numbers.number import Number
my_number = Number('8888888')
print(my_number.data)
print(my_number.number)
print(my_number.status)
print(my_number.ends_in)
This library is still under development, and it's a little buggy.
Contributions are welcome and feel free to submit issues and enhancement requests.
Posted on December 12, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.