Skip to main content

NFT market is in your hands.

Project description

nft-market

PyPI version test Downloads

What is it?

nft-market is a Python library by which current market information of NFTs on several famous NFT markets (OpenSea, Magic Eden, tofuNFT, PancakeSwap, etc) can be obtained.

Main features

nft-market provides simple APIs that return market information just by your giving the following arguments.

from nft_market import Market, Retriever

r = Retriever()
print(r.fetch(Market.OpenSea, 'boredapeyachtclub'))  # Bored Ape Yacht Club

# [Output]
# type: nft_market.NFTInfo
# NFTInfo(id='boredapeyachtclub', name='Bored Ape Yacht Club', num_items_all=None, num_listing=10000, num_owners=6400, floor=111.0, volume=487600.0)

Currently supported marketplaces

At this moment, the following marketplaces are supported in nft-market.

Other marketplaces will be added into the list in the future. You can, off course, request them in issues if needed immediately. Either PRs or issues are always welcome!

How to get the ID of a NFT?

Although it depends on which marketplace you use, you can basically find it in the URL.

Example 1: OpenSea

When you want to retrieve the information of the NFT of Bored Ape Yacht Club , the URL looks like https://opensea.io/collection/boredapeyachtclub . In this URL, what differs according to a NFT is the part of boredapeyachtclub, which is all you need to use ** nft-market**.

Example 2: tofuNFT

URLs look like https://tofunft.com/collection/astardegens/items. In this case, what nft-market requires is only the part of astardegens.

Other examples

We have several examples of the usage in samples.py for references.

Available information

What you can retrieve may change by a marketplace you specify, as follows. Other information may be provided in the future!

Market Name #Supply #Listing #Owners Floor Volume
OpenSea
Entrepot
tofuNFT
PancakeSwap
Rarible
GhostMarket
Crypto.com
Gem
LooksRare
NFTrade
Solanart
Magic Eden
XANALIA
CetoSwap
Coinbase
CCC ✓(*)
Nifty Gateway

"✓(*)" means it can return None value depending on items.

Installation

You can install nft-market by pip.

$ pip install nft-market

Also, as nft-market depends on Firefox and its driver, you need to install them.

[mac]
$ brew install firefox

[ubuntu]
$ sudo apt install firefox

Besides, all Python dependencies are listed up in requirements.txt. Please install them by $ pip install -r requirements.txt if you install nft-market not by pip but by cloning from GitHub.

For developers

You can run tests similarly as GitHub Actions in your local environment by using ACT. We highly recommend you try this for at least what you added before push.

Installation

# mac
$ brew install act

# Linux
$ curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash

# Windows Chocolatey
$ choco install act-cli

# Windows Scoop
$ scoop install act

How to use act?

Make sure that you're already running Docker Desktop, and then just run act!

$ act push --container-architecture linux/amd64

Note that when you see choices as for the default size of images, you need at least "Medium".

Default image and other options can be changed manually in ~/.actrc (please refer to https://github.com/nektos/act#configuration for additional information about file structure)  [Use arrows to move, type to filter, ? for more help]
  Large
> Medium
  Micro

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nft_market-1.12.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nft_market-1.12-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file nft_market-1.12.tar.gz.

File metadata

  • Download URL: nft_market-1.12.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.2

File hashes

Hashes for nft_market-1.12.tar.gz
Algorithm Hash digest
SHA256 5df69cc39538e475eca891e1f385e3b66890a3d414bf6aea3d3f71e7bfdb19dc
MD5 48cadc30141a3221462e2707b7cabf30
BLAKE2b-256 0cf5a8e4a97473000ed13679fc7bd0e7ed7f70b15724a87510d3a5c822ac2e11

See more details on using hashes here.

File details

Details for the file nft_market-1.12-py3-none-any.whl.

File metadata

  • Download URL: nft_market-1.12-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.2

File hashes

Hashes for nft_market-1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 63044a97e8cfa334b18c1b66a26aa5bb62f2c12bbc81acce1bc23c0dae9b79e9
MD5 41df2bf9e6593e31ec82ed380d2fa288
BLAKE2b-256 d637269f6130e4a17892f63057b6bd04b723ac638b75e6abdc1e0c6a69010724

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page