Async Python · mrkt marketplace

The typed async client for the mrkt gift market.

A fast, fully type-safe library with automatic authentication — token refresh, TLS fingerprinting and User-Agent rotation handled for you. Search, buy, sell and stream the live feed in a few lines of code.

$ pip install amrkt
Read the docs →
PyPIv1.6.0
python3.9 – 3.13
licenseMIT
typingtyped
frameworkAsyncIO
snipe.py async / await
1import asyncio
2from amrkt import MarketClient, InsufficientBalanceError
3
4async def snipe():
5    # auth + token refresh handled automatically
6    async with MarketClient(
7        api_id=2040, api_hash="7e9f…b1",
8        session_name="trader", impersonate="chrome124",
9    ) as client:
10        bal = await client.get_balance()
11        print(f"Balance: {bal.hard_ton:.2f} TON")
12
13        gifts = await client.search_gifts(
14            collection_names=["Lunar Snake"],
15            ordering="Price", low_to_high=True, count=20,
16        )
17        cheapest = gifts.items[0]
18
19        try:
20            res = await client.buy_gifts([cheapest.id])
21            print(f"Bought {res[0].user_gift.name}")
22        except InsufficientBalanceError:
23            print("Not enough TON 💸")
24
25asyncio.run(snipe())
stdout · search_gifts() → GiftList (total 312)
Vice Cream
Vice Cream · Unicone
#362928 · symbol Gift Box 0.4% · backdrop Black
9.40 TON
Kissed Frog
Kissed Frog · Void Hopper
#8215 · symbol Knight · backdrop Light Olive
14.10 TON
Trapped Heart
Trapped Heart · Blue Whisper
#8166 · symbol Chili · backdrop Onyx Black
11.75 TON
17async methods
20+pydantic models
4dependencies
100%type coverage
// why amrkt

Built for high-throughput trading bots.

Everything you need to automate the mrkt marketplace — without writing a single line of auth, retry, or anti-bot boilerplate.

Fully async

Every call is awaitable, built on AsyncIO with a pooled HTTP client for parallel sniping and bulk operations.

🔐

Auto-authentication

Kurigram session login and token refresh happen transparently — zero auth boilerplate, no manual token juggling.

Type-safe models

Pydantic v2 models with full hints and py.typed — autocomplete and static checks everywhere.

🛡

Anti-detection

curl_cffi TLS fingerprint impersonation, browser headers & UA rotation, with HTTP / SOCKS5 proxy support.

// api reference

17 async methods, grouped by domain.

One intuitive client surface covering the whole marketplace — from profile and balance to gifts, sales, offers and the live activity feed.

👤 User & Balance

get_user_info()UserInfo
Current profile: id, wallet, VIP status, referral config.
get_balance()Balance
Soft / hard / stars balance with TON helper properties.
get_deposit_await()List[…]
Pending deposits awaiting confirmation.
claim_transaction(id)List[…]
Claim a pending deposit by transaction ID.

🎁 Gifts

search_gifts(…)GiftList
Filter by collection, model, backdrop, price; sorted & paginated.
get_gift(id)Gift
Full detail for a single gift, including rarity %.
get_collections()List[…]
Collections with floor price, volume, craftable flags.
buy_gifts(ids)List[…]
Purchase one or many gifts by ID.

📦 Inventory & Sale

get_inventory(…)GiftList
Your owned gifts — same filters as search.
return_gifts(ids)bool
Return gifts back to Telegram.
sell_gifts(ids, prices)SaleResult
List gifts for sale at given nanoTON prices.
cancel_sale(ids)List[str]
Remove listings from the market.
change_price(ids, prices)SaleResult
Reprice gifts already on sale.

📡 Offers · Feed · Activity

create_offer(sale_id, price)bool
Make an offer on a gift on sale.
cancel_offer(offer_id)bool
Cancel an existing offer.
get_feed()FeedResponse
Live listings, sales and price changes.
get_activities(…)List[…]
Your activity history with offers and dates.
// data models

Typed all the way down.

Every response is a Pydantic v2 model with editor autocomplete, validation and convenient nanoTON → TON helper properties.

UserInfo
Wallet
Balance
ConfigItem
RefCoefsDto
DepositAwaitTransaction
ClaimTransactionResult
Gift
GiftList
GiftCollection
PurchaseResult
SaleResult
FeedItem
FeedResponse
ActivityItem

Getting started

Two credentials and three lines of code — auth is handled for you on first run.

1Install with pip install amrkt (Python 3.9+).
2Grab your api_id and api_hash from my.telegram.org.
3Open a MarketClient — the Kurigram session logs in once and refreshes automatically.
4Optionally route through an HTTP / SOCKS5 proxy and pick a TLS impersonate profile.
kurigram 2.2.6
pydantic ≥2.0
curl_cffi ≥0.5
tgcrypto ≥1.2

Typed exceptions

Catch exactly what you need — every error inherits from MarketError.

MarketErrorBase exception
AuthenticationErrorAuth / token issues
APIErrorHas status_code & response_text
NotFoundErrorResource not found
NotForSaleErrorGift not on sale
InsufficientBalanceErrorNot enough TON

Ship your mrkt bot today.

Install in seconds, snipe in minutes. Open source under the MIT license.