market-api

market.csgo.com api v2 wrapper


Keywords
csgo_market, market, api
License
MIT
Install
pip install market-api==1.0.0

Documentation

market-api

PyPI PyPI - Python Version GitHub Downloads

Получение токена

market.csgo.com

Использование

import datetime
import pprint
from market_api import MarketConfig, MarketClient, MarketException, models

config = MarketConfig(api_key="...")
client = MarketClient(config)

pprint.pprint(await client.account.get_my_steam_id())
pprint.pprint(await client.account.change_currency(models.Currency.EUR))
pprint.pprint(
    await client.trades.history(
        datetime.datetime.now() - datetime.timedelta(days=1),
        datetime.datetime.now()
    )
)
async for message in client.wss.listen_raw(
    [models.WSSChannel.HISTORY_GO],
    need_auth=True
):
    pprint.pprint(message)