Python SDK for the Cardanoscan API, supporting both async and sync usage for accessing Cardano blocks, addresses, transactions, governance, analytics and more.
Installation • Usage • API Documentation
Install SDK from PyPi
python3 -m pip install cardanoscan-pythonfrom cardanoscan import Cardanoscan
client = Cardanoscan(api_key="YOUR_API_KEY")from cardanoscan import Cardanoscan
client = Cardanoscan(api_key="YOUR_API_KEY")
params = {
"address": "addr1qxmj3a04rlp95k7428zznkq5ha4ccxwtf5gxught8ykh68l5pfacpmrk44mrauz57eak8m0aes2ywykct2puns9dzj7swe9z76"
}
data = client.get_address_balance_sync(params=params)
print(data)import asyncio
from cardanoscan import Cardanoscan
async def main():
client = Cardanoscan(api_key="YOUR_API_KEY")
params = {
"address": "addr1qxmj3a04rlp95k7428zznkq5ha4ccxwtf5gxught8ykh68l5pfacpmrk44mrauz57eak8m0aes2ywykct2puns9dzj7swe9z76"
}
data = await client.get_address_balance(params=params)
print(data)
await client.aclose()
asyncio.run(main())All optional parameters are passed via params and sent as query parameters.
params = {
"address": "addr1...",
"limit": 50,
"pageNo": 100
}
data = client.get_transaction_list_by_address_sync(params=params)Install Dependencies
python3 -m pip install -e .[tests]Run Tests
python3 -m pytestor with logs
python3 -m pytest -s