{"library":"powerbot-client","title":"PowerBot Client","description":"The powerbot-client library provides an asynchronous Python client for interacting with the PowerBot API. It allows users to fetch market data, manage orders, and access other platform functionalities. The current version is 2.30.6 and it maintains a relatively frequent release cadence, often aligning with API updates.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install powerbot-client"],"cli":null},"imports":["from powerbot_client.client import PowerBotClient","from powerbot_client.models import Market"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import asyncio\nimport os\nfrom powerbot_client.client import PowerBotClient\nfrom powerbot_client.models import Market\n\nasync def main():\n    api_key = os.environ.get('POWERBOT_API_KEY', '')\n    if not api_key:\n        print(\"Error: POWERBOT_API_KEY environment variable not set.\")\n        return\n\n    client = PowerBotClient(api_key=api_key)\n    try:\n        print(\"Fetching markets...\")\n        markets = await client.get_markets()\n        for m in markets[:3]: # Print first 3 markets\n            print(Market.model_dump(m, exclude_unset=True))\n    except Exception as e:\n        print(f\"An error occurred: {e}\")\n    finally:\n        await client.close()\n        print(\"Client closed.\")\n\nif __name__ == \"__main__\":\n    # Ensure the event loop is run properly\n    asyncio.run(main())\n","lang":"python","description":"This quickstart initializes the PowerBotClient with an API key from an environment variable, fetches a list of markets, prints the first three, and ensures the client connection is properly closed. It demonstrates the basic asynchronous usage pattern required by the library.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}