Current collected state Current
Observed since 21 Oct, 11:39 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Asynchronous Python wrapper for the Bittrex API.
This package is used by the Bittrex integration of Home Assistant.
The following functions are available:
from aiobittrexapi import Bittrex
api = Bittrex(api_key, api_secret)
api.get_account()
api.get_balances()
api.get_closed_orders()
api.get_markets()
api.get_open_orders()
api.get_tickers()
from aiobittrexapi import Bittrex
from aiobittrexapi.errors import (
BittrexApiError,
BittrexResponseError,
BittrexInvalidAuthentication,
)
import asyncio
from typing import Optional
API_KEY = ""
API_SECRET = ""
async def main(api_key: Optional[str] = None, api_secret: Optional[str] = None):
if api_key and api_secret:
api = Bittrex(api_key, api_secret)
else:
api = Bittrex()
try:
# Get the active markets from Bittrex - works without secret & key
markets = await api.get_markets()
print(markets)
# Get the tickers
tickers = await api.get_tickers()
print(tickers)
# Get your account data - requires secret & key
account = await api.get_account()
except BittrexApiError as e:
print(e)
except BittrexResponseError as e:
print("Invalid response:", e)
except BittrexInvalidAuthentication:
print("Invalid authentication. Please provide a correct API Key and Secret")
else:
print(account)
finally:
await api.close()
if __name__ == "__main__":
loop = asyncio.get_event_loop()
if API_KEY and API_SECRET:
loop.run_until_complete(main(API_KEY, API_SECRET))
else:
loop.run_until_complete(main())
All feedback and Pull Requests are welcome!
Don't forget to create your venv
python3 -m venv venv
source venv/bin/activate
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.4.0 | 4 Jan 2021 | 2 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 11:39 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:0f2363d4ef991b811ffce1dfd17ad5a642c97cb6c964ec381ef3e46d8f1bb475