Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ankushkun/opensea
python wrapper for opensea api
https://github.com/ankushkun/opensea
nft opensea python3 wrapper-library
Last synced: 6 days ago
JSON representation
python wrapper for opensea api
- Host: GitHub
- URL: https://github.com/ankushkun/opensea
- Owner: ankushKun
- Created: 2021-09-29T12:07:47.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-30T06:45:42.000Z (about 3 years ago)
- Last Synced: 2024-04-14T01:55:31.519Z (9 months ago)
- Topics: nft, opensea, python3, wrapper-library
- Language: Python
- Homepage:
- Size: 296 KB
- Stars: 39
- Watchers: 1
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Opensea API
An API wrapper library for opensea api.
## Installation
```bash
pip3 install opensea
```## Usage
Retrieving assets:
```python
from opensea import get_assets# This will return a list of assets which you can iterate and get the needed data
asset_list = get_assets(limit=10, verified_only=False)asset = asset_list[0] # Get the first asset obejct from the list
print(asset.name)
print(asset.description)
print(asset.asset_url)
print(asset.get_floor_price()) # Floor price of the collection
```Retrieving bundles:
```python
from opensea import get_bundles# This will return a list of assets which you can iterate and get the needed data
bundles_list = get_bundles(limit=10)bundle = bundles_list[0] # Get the first asset obejct from the list
print(bundle.slug)
print(bundle.assets[0].name)
```Retrieving stats from specific collection:
```python
from opensea import get_collection_stats# This will return a CollectionStats Object
stats = get_collection_stats(collection="doodles-official")print(stats.count)
print(stats.num_owners)
print(stats.floor_price)
```