Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More β†’
Socket
Book a DemoInstallSign in
Socket

fragment-api-lib

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fragment-api-lib

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

pipPyPI
Version
1.0.1
Maintainers
1

⚑️ 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_lib.client import FragmentAPIClient
from fragment_api_lib.models import *

client = FragmentAPIClient()

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

# Replace with your 24 words seed phrase from TON v4r2 Wallet
seed = "your_24_words_seed_phrase"

# Replace with your Fragment cookies exported from Cookie-Editor extension as Header String
# https://chromewebstore.google.com/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm
fragment_cookies = "your_fragment_cookies"

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

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

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

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

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

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

πŸŽ‰ 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 Apache Licence 2.0.

Made with ❀️ by NightStrang6r

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts