Skip to main content

All-In-One Sellers API

English | Русский

Asynchronous Python clients for FunPay, PlayerOK, and GGsel, with a multi-account event stream and persistent listener state.

CI CodeQL PyPI Tested Python versions License

Contents

Stack: Python 3.12+, asyncio, Pydantic v2, TLS requests, websockets and SQLite. The library connects to the platforms directly: FunPay over HTTP forms and HTML parsing, PlayerOK over GraphQL and WebSocket subscriptions, GGsel over the official Seller API V1. The library does not collect telemetry or require a separate server or proxy service.

Status: pre-1.0. Tests cover the core, transports, and event listeners. Coverage of the high-level API is incomplete. Behavior may change in minor releases. See CHANGELOG.md.

Installation

Requires Python 3.12+. Install the published fork from PyPI:

pip install aiosellers-nechel12
# or, in a uv project:
uv add aiosellers-nechel12

Import the library as aiosellers. pip install aiosellers installs the upstream distribution, not this fork. Use separate environments for the two distributions because they install the same import package.

To try changes from GitHub before a PyPI release:

pip install "git+https://github.com/nechel12/aiosellers.git"

Append @<tag-or-commit> to pin a GitHub install.

Documentation

Configuration

Tokens can be passed to the constructor or through environment variables:

export PLAYEROK_ACCESS_TOKEN="your_token_here"
export FUNPAY_GOLDEN_KEY="your_golden_key"
export GGSEL_API_KEY="your_api_key"
export GGSEL_SELLER_ID="123456"

Playerok(), FunPay() and GGsel() read these variables. Credentials can also be passed directly: Playerok("token"), FunPay("golden-key") or GGsel(GGselClientConfig(api_key="key", seller_id=123456)).

Set bot_mark=False in FunPayClientConfig to stop adding the invisible bot marker to outgoing messages and reviews.

Media arguments (image, photo) accept bytes, an uploaded-file id, a URL where the platform supports one, and a local path — which is read from the disk of the running process. A host that lets less-trusted code build those arguments can confine the read target with AIOSELLERS_MEDIA_ROOTS:

# colon-separated (os.pathsep) list of allowed directories
export AIOSELLERS_MEDIA_ROOTS="/srv/app/media"
# empty value: no local path is opened at all
export AIOSELLERS_MEDIA_ROOTS=""

The variable is optional: unset keeps the historical behaviour of opening any readable path. With it set, paths outside the listed roots raise MediaPathNotAllowedError before anything is read.

All adapters accept an optional proxy URL:

FunPay(FunPayClientConfig(golden_key="...", proxy="http://user:pass@proxy:8080"))
Playerok(PlayerokClientConfig(access_token="...", proxy="http://proxy:8080"))
GGsel(GGselClientConfig(api_key="...", seller_id=123456, proxy="http://proxy:8080"))

PlayerOK uses it for HTTP requests, uploads, downloads, and WebSocket subscriptions. GGsel uses it for ApiLogin and all Seller API requests. Proxy credentials are omitted from configuration representations (repr).

PlayerOK skips the seller's own messages by default. Set include_own=True in PlayerokClientConfig or pass it to listen() or start_polling() to see them. Each entity cache has a per-client limit of 5,000 entries by default (identity_map_limit); None removes the limit. listen() and start_polling() accept listener-specific options such as order_page_limit, chat_history_batches (FunPay) and page/history limits (GGsel).

Quick Start: PlayerOK

import asyncio
from aiosellers.playerok import Playerok

async def main():
    async with Playerok() as client:
        me = await client.account.me()
        profile = await client.account.profile()
        print(f"{me.username} | {me.email}")
        print(f"Rating: {profile.rating} ({profile.reviews_count} reviews)")
        print(f"Available: {profile.balance.available}")
        print(f"Pending: {profile.balance.pending_income}")

asyncio.run(main())

Quick Start: FunPay

import asyncio
from aiosellers.funpay import FunPay

async def main():
    async with FunPay() as client:
        me = await client.account.profile()
        balance = await client.finance.balance()
        print(f"{me.username} id={me.id}")
        print(f"RUB {balance.rub} | USD {balance.usd} | EUR {balance.eur}")

asyncio.run(main())

Quick Start: GGsel

The GGsel adapter uses the official Seller API V1: the client signs a login request with the API key, keeps the access token and polls chats, sales and reviews because GGsel has no webhooks.

import asyncio
from aiosellers.ggsel import GGsel

async def main() -> None:
    # Or pass GGselClientConfig(api_key="...", seller_id=123456)
    async with GGsel() as client:
        balance = await client.account.balance()
        print(f"Seller {client.seller_id}: free={balance.free} locked={balance.locked}")

        chats = await client.chats.list()
        for chat in chats:
            print(chat.id, chat.buyer_email, chat.unread_count)

        products = await client.products.my(limit=5)
        for product in products:
            print(product.id, product.name, product.price, product.currency)

asyncio.run(main())

GGsel() reads GGSEL_API_KEY and GGSEL_SELLER_ID; pass GGselClientConfig explicitly to override either value. client.seller_id is populated after the client starts, and client.products.update_price() / update_prices() return a task id that can be checked with client.products.task_status().

Multi-account hub

SellerHub runs several FunPay, PlayerOK, and GGsel sessions together and merges their events into one stream. Every item carries the platform and session id, while the payload stays the original typed event.

import asyncio

from aiosellers import (
    FunPay,
    GGsel,
    GGselClientConfig,
    Platform,
    Playerok,
    SellerHub,
)

async def main():
    hub = SellerHub()
    hub.add(FunPay("golden-key"), platform=Platform.FUNPAY, session_id="funpay-main")
    hub.add(
        Playerok("access-token"),
        platform=Platform.PLAYEROK,
        session_id="playerok-main",
        listen_options={"reviews": True},
    )
    hub.add(
        GGsel(GGselClientConfig(api_key="api-key", seller_id=123456)),
        platform=Platform.GGSEL,
        session_id="ggsel-main",
    )

    await hub.start()
    try:
        async for item in hub.stream():
            print(item.platform, item.session_id, item.kind, item.event)
    finally:
        await hub.close()

asyncio.run(main())

item.kind is a portable EventKind (MESSAGE, REVIEW, ORDER, DEAL, ...). Session.capabilities tells what a platform supports, so shared code can branch without hardcoding platform names. Clients also expose stop() to end start_polling() from another task.

Durable listener state

Pass a StateStore in the client config to keep chat cursors, processed message IDs and order statuses across process restarts. Without a store, listeners still emit live events but rebuild their starting state on every launch. Recovery is bounded by the adapter's history and polling limits; keep event handlers idempotent.

import asyncio

from aiosellers import (
    FunPay,
    FunPayClientConfig,
    GGsel,
    GGselClientConfig,
    Playerok,
    PlayerokClientConfig,
    SQLiteStateStore,
)

async def main():
    store = SQLiteStateStore("sellers.db")
    funpay = FunPay(FunPayClientConfig(golden_key="...", state=store))
    playerok = Playerok(PlayerokClientConfig(access_token="...", state=store))
    ggsel = GGsel(
        GGselClientConfig(api_key="...", seller_id=123456, state=store)
    )

    # Run the clients here.

    await store.close()

asyncio.run(main())

MemoryStateStore keeps the same semantics in process memory, which is handy for tests. State keys are funpay:{account_id}:listener, playerok:{user_id}:listener and ggsel:{seller_id}:listener; a malformed snapshot is ignored with a warning, and a failed write never stops polling.

Examples

Runnable samples are in examples/.

Script What it does
playerok_account.py Profile and balance
playerok_chats.py Unread chats and latest messages
playerok_deals.py Paid and sent deals
playerok_market.py Search items and average price
playerok_bot.py Commands and deal events
transactions.py Pending transactions and cards
funpay_account.py Profile, balance, transactions
funpay_orders.py Sales and an order card
funpay_chats.py Chats and message history
funpay_lots.py Lots
funpay_bot.py New order and a chat reply
funpay_reviews.py Reply to a new review
funpay_backtest.py Replay saved chat history
ggsel_account.py Balance and receipts
ggsel_bot.py Chat replies and new sales
uv run python examples/playerok_account.py
uv run python examples/funpay_account.py
uv run python examples/ggsel_account.py

Development Status: PlayerOK

Module Raw API High-level
Account ✅ ✅
Games / Categories ✅ ✅
Items ✅ ✅
Deals ✅ ✅
Chats ✅ ✅
Transactions ✅ ✅
Event Feed ✅ ✅

Development Status: FunPay

Module Raw API High-level
Account ✅ ✅
Balance ✅ ✅
Orders / Sales ✅ ✅
Chats ✅ ✅
Lots ✅ ✅
Reviews ✅ ✅
Event Feed ✅ ✅

Development Status: GGsel

GGsel is covered through the official Seller API V1 (https://seller.ggsel.com/). There are no webhooks, so the listener polls chats, sales and reviews with durable cursors when a StateStore is configured.

Module Raw API High-level
Account / Balance ✅ ✅
Receipts ✅ ✅
Categories ✅ ✅
Products / Prices ✅ ✅
Sales / Purchases ✅ ✅
Chats ✅ ✅
Reviews ✅ ✅
Event Feed ✅ ✅

The adapter does not support Offer API V2 (creating and editing offers) or the legacy XML endpoint /xml/shop_search.asp.

Limitations

  • The FunPay and PlayerOK adapters rely on unofficial website interfaces: HTTP forms, GraphQL, and WebSocket feeds. Changes to these interfaces may affect compatibility. See the CHANGELOG.
  • GGsel is implemented against Seller API V1 only.
  • The library does not deploy, schedule, scale, or supervise bots.
  • Platform operators set their terms of use, rate limits, and account enforcement policies.

Security

Use GitHub's private vulnerability form rather than a public issue. See the security policy for scope and handling advice. Use only trusted custom endpoints and proxies. Redact logs before sharing and protect state databases, which may contain chat IDs and, for FunPay, message previews.

Development

Requires Python 3.12+ and uv.

uv sync --locked
uv run ruff check .
uv run ruff format --check .
uv run mypy aiosellers
uv run pytest -q --cov=aiosellers --cov-fail-under=65

uv run python examples/funpay_account.py
uv build

Structure: aiosellers/core (platforms, events, hub, state stores), aiosellers/funpay, aiosellers/playerok, aiosellers/ggsel (each with api, raw, schemas, entities, transport and listener), tests/ and examples/.

Contributing

Use the issue forms for public bug reports and feature requests. See CONTRIBUTING.md for local checks and pull requests, and the Code of Conduct for participation guidelines. Maintainers can follow RELEASING.md.

License

The code is licensed under Apache-2.0; see LICENSE and NOTICE, which lists what this fork adds relative to upstream. The upstream copyright and license notices are preserved. The PyPI package aiosellers is maintained by the upstream project and is not associated with this distribution.


Support the project

All-In-One Sellers API is an open-source project. Financial support is optional:

Donate via Boosty

Crypto

Network Address
TRON TMM2Cdm4tJx1nKRRq5RCBcdwfn9cHuJZy9
TON UQBlVvOfTleWn4pkY384mYWiGyhdHBryoC_N1Si1OSWAxPKl
Bitcoin bc1qagjtnutjya2rss3u3ls8ur7qk0u7zutc6t6fwc
BNB Smart Chain 0x423aF840f67355371bf32480744A84069dfab5ff

Metadata

Release files for aiosellers-nechel12 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiosellers-nechel12 0.5.0
File Size Uploaded Provenance Actions
aiosellers_nechel12-0.5.0.tar.gz 286.4 kB With provenance Details for aiosellers_nechel12-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiosellers-nechel12 0.5.0
File Interpreter ABI Platform Actions
aiosellers_nechel12-0.5.0-py3-none-any.whl Python 3 none any Details for aiosellers_nechel12-0.5.0-py3-none-any.whl

Total release size: 493.6 kB

Release files / aiosellers_nechel12-0.5.0.tar.gz

Download URL aiosellers_nechel12-0.5.0.tar.gz
Size 286.4 kB
Tags Source
SHA-256 checksum
How to use checksums
95e448ed13668c7fd404d94b6086504a5082d98cae2e8f457b419087d40e9e9e
BLAKE2b-256 checksum
How to use checksums
499cc8649ef137d8950b36a1759f6a2027efbe6349e47dc5618054bd8d6f6654
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / aiosellers_nechel12-0.5.0-py3-none-any.whl

Download URL aiosellers_nechel12-0.5.0-py3-none-any.whl
Size 207.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
009944e3cbed0ebb8e8f9b6f03b9ee05ef106aab3baa92832c10f3b464adaf93
BLAKE2b-256 checksum
How to use checksums
501b0f6c4b6fcb71b072f727b492bc672f3936d7491edda7fc990ed6db116a1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for aiosellers-nechel12 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aiosellers_nechel12-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page