Skip to main content

🧩 Simple API client wrapper for Fragment, purchase of Telegram Stars & Premium

Project description

⚡️ fragment-api-lib ⚡️

✨ Simple Python library for fast integration with Fragment (fragment.com) ✨

Fragment API

Fragment API

🚀 Info

fragment-api-lib is a simple API client wrapper for Fragment, which uses fragment-api.net under the hood. It supports:

  • 💸 Purchase Telegram Stars & Premium

  • ✅ Works with or without KYC

  • 🔂 Bypass Fragment purchase limits

  • 🔐 End-to-end encryption supported

  • 🧩 No API key or registration required

  • 💙 No need to use the TON API directly

  • 📦 Built-in request models for clean integration

  • 📈 Supports multi-order transactions

  • 🧠 Lightweight & developer-friendly

📌 Requirements (without KYC)

  • ✅ TON Wallet v4r2 🪙

  • ✅ TON Wallet should be Active (send any transaction from it) 🪙

📌 Requirements (with KYC)

  • ✅ Fragment account with linked TON wallet and Telegram account 🔗

  • ✅ KYC verification on Fragment 🆔

  • ✅ Export cookies from Fragment 🍪 (as Header String using Cookie Editor extension)

Installation

pip install fragment-api-lib

☑️ Usage examples

from fragment_api.client import FragmentAPIClient
from fragment_api.models import *

client = FragmentAPIClient()

# Ping
print("API ping:", client.ping())

# Get balance
res = client.get_balance(seed="your_24_words_seed_phrase")
print("Balance:", res)

# Get user info
res = client.get_user_info(
    username="durov", # or "@durov", or "https://t.me/durov"
    fragment_cookies="your_fragment_cookies"
)
print("User info:", res)

# Buy stars without KYC
res = client.buy_stars_without_kyc(
    username="durov", # or "@durov", or "https://t.me/durov"
    amount=100,
    seed="your_24_words_seed_phrase"
)
print("Buy stars without KYC response:", res)

# Buy stars
res = client.buy_stars(
    username="durov", # or "@durov", or "https://t.me/durov"
    amount=100,
    show_sender=False,
    fragment_cookies="your_fragment_cookies",
    seed="your_24_words_seed_phrase"
)
print("Buy stars response:", res)

# Buy Telegram Premium without KYC
res = client.buy_premium_without_kyc(
    username="durov", # or "@durov", or "https://t.me/durov"
    duration=3, # 3 or 6 or 12 months
    fragment_cookies="your_fragment_cookies",
    seed="your_24_words_seed_phrase"
)
print("Buy Telegram Premium without KYC response:", res)

# Buy Telegram Premium
res = client.buy_premium(
    username="durov", # or "@durov", or "https://t.me/durov"
    duration=3, # 3 or 6 or 12 months
    show_sender=False,
    fragment_cookies="your_fragment_cookies",
    seed="your_24_words_seed_phrase"
)

🎉 Like it? Star it!

Please rate this repository by giving it a star rating in the top right corner of the GitHub page (you must be logged in to your account). Thank you ❤️

📄 License

This repository is licensed under GNU GENERAL PUBLIC LICENSE.

Made with ❤️ by NightStrang6r

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fragment_api_lib-1.0.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fragment_api_lib-1.0.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file fragment_api_lib-1.0.0.tar.gz.

File metadata

  • Download URL: fragment_api_lib-1.0.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for fragment_api_lib-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b40d142f35255a4b91dbd25b4fa1fbe7eb05adcf91b48a260b54a0f1c1d6e5bb
MD5 4349208a4abee11b822b3265ff05b7c1
BLAKE2b-256 3a1a1d7399dd91cd3551cea9e999cd0561242a1012e9b9eff52c1536108ca29c

See more details on using hashes here.

File details

Details for the file fragment_api_lib-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fragment_api_lib-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d8cb5bf873be8ad75ee28da76bb4f9cde297828d7ba9363d4578eea66120b922
MD5 489d3d2216802c5e901dcf8b7142aaa3
BLAKE2b-256 10a25887c4d9c9b23de2a31cab2a948c49ada34db4e53738d0ea6c13f0d5b4dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page