Two ways in: the Python SDK — which verifies and signs locally — or direct REST from any backend. Either way, the seed stays on your server.
Current version: 0.1.0 · Uses https://fragment-api.mboxcommunity.org by default.
The SDK is part of the public repository — read it before you run it; it is the component that signs.
pip install fragment-api-sdk # Requires: Python 3.10+, Node 18+ (TON signing helper)
No published TypeScript SDK. Use the standard fetch API against the REST service from Node.js or any server-side language.
https://fragment-api.mboxcommunity.org
If you sign without our SDK, your signer must implement the same verification checklist — pinned addresses, fee cap, spend limits, short expiry.
from fragment_api_sdk import FragmentAPI
api = FragmentAPI(api_key="mfrag_…",
cookies={"stel_ssid": "…", "stel_dt": "…", "stel_token": "…"},
seed="<24 words — never leaves this machine>",
max_ton_per_order=5_000_000_000) # mandatory spend limit
order = api.buy_stars("@durov", 100) # verify → sign locally → submit
print(order["status"]) # success
order = api.buy_premium("@durov", 12) # 3 | 6 | 12 months
# Python print(api.get_order(order["id"])) # REST equivalents curl https://fragment-api.mboxcommunity.org/health curl https://fragment-api.mboxcommunity.org/api/v1/commission/rates curl https://fragment-api.mboxcommunity.org/api/v1/prices
buy_stars(username, amount, currency, idempotency_key)buy_premium(username, months, currency, idempotency_key)get_order(order_id)GET /healthGET /api/v1/pricesGET /api/v1/commission/ratesPOST /api/v1/premium/check-eligibilityGET /api/v1/ordersStart with the full REST reference, browse the engine source, or read how the purchase flow works end to end.