Python SDK for the OpenSea API
An unofficial Python SDK for the OpenSea API.
Features
- Typing
- All endpoints supported
- Optional API key
- WebSocket support
Installation
pip install py-opensea-sdk
Upgrade
pip install py-opensea-sdk -U
Usage
from pyopensea import OpenSeaAPI
api = OpenSeaAPI('OPTIONAL-API-KEY')
api.assets(owner='0x20481b79a4F03b624D214d23aDf5bF5f33bEB4aA')
api.contract('0x8a90cab2b38dba80c64b7734e58ee1db38b8992e')
api.listings('0x8a90cab2b38dba80c64b7734e58ee1db38b8992e', tokenID=10)
api.offers('0x8a90cab2b38dba80c64b7734e58ee1db38b8992e', tokenID=10, limit=5)
api.orders()
from datetime import datetime
api.orders('0x8a90cab2b38dba80c64b7734e58ee1db38b8992e',
listedAfter=datetime(2022, 7, 5))
api.events(occurredAfter=1658423412, occurredBefore=1658425412,
limit=1, eventType='successful')
api.events(occurredAfter=datetime(2022, 7, 3), occurredBefore=datetime(2022, 7, 5),
limit=1, eventType='successful')
Contributing
- Fork it (https://github.com/FastestMolasses/PyOpensea/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request