Socket
Socket
Sign inDemoInstall

py-opensea-sdk

Package Overview
Dependencies
1
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    py-opensea-sdk

Python SDK for the Opensea API


Maintainers
1

Readme

Python SDK for the OpenSea API

PyPI version python

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

# Create API instance
api = OpenSeaAPI('OPTIONAL-API-KEY')

# Examples
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
# Note: datetime objects are automatically converted to the UTC timezone
api.orders('0x8a90cab2b38dba80c64b7734e58ee1db38b8992e',
           listedAfter=datetime(2022, 7, 5))

api.events(occurredAfter=1658423412, occurredBefore=1658425412,
           limit=1, eventType='successful')
# Note: datetime objects are automatically converted to the UTC timezone
api.events(occurredAfter=datetime(2022, 7, 3), occurredBefore=datetime(2022, 7, 5),
           limit=1, eventType='successful')

# And more api endpoints supported...

Contributing

  1. Fork it (https://github.com/FastestMolasses/PyOpensea/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc