or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

coins.mdexchanges.mdglobal.mdindex.mdnfts.mdprice-market.mdsearch.mdsystem-utils.md

nfts.mddocs/

0

# NFTs & Digital Assets

1

2

NFT collection data, market information, historical charts, and marketplace tickers for digital collectibles. This module provides comprehensive information about Non-Fungible Token collections and their market performance across various NFT marketplaces.

3

4

## Capabilities

5

6

### NFT Collection Listings

7

8

Get comprehensive lists of supported NFT collections with market data and metadata.

9

10

```python { .api }

11

def get_nfts_list(**kwargs):

12

"""

13

List all supported NFT collection IDs, paginated by 100 items per page.

14

15

Parameters:

16

- order (str): Sort order ('h24_volume_native_asc', 'h24_volume_native_desc', 'floor_price_native_asc', 'floor_price_native_desc', 'market_cap_native_asc', 'market_cap_native_desc', 'market_cap_usd_asc', 'market_cap_usd_desc')

17

- asset_platform_id (str): Filter by blockchain platform (e.g., 'ethereum')

18

- per_page (int): Results per page (1-100, default: 100)

19

- page (int): Page number (default: 1)

20

21

Returns:

22

list: List of NFT collections with basic information (id, name, symbol, asset_platform_id)

23

"""

24

25

def get_nfts_markets(**kwargs):

26

"""

27

Query all supported NFT collections with floor price, market cap, volume and market related data.

28

29

Parameters:

30

- vs_currency (str): Target currency for market data (default: 'usd')

31

- order (str): Sort order ('market_cap_usd_desc', 'market_cap_usd_asc', 'floor_price_usd_desc', 'floor_price_usd_asc', 'h24_volume_usd_desc', 'h24_volume_usd_asc')

32

- asset_platform_id (str): Filter by blockchain platform

33

- per_page (int): Results per page (1-100, default: 100)

34

- page (int): Page number (default: 1)

35

36

Returns:

37

list: List of NFT collections with comprehensive market data including floor prices and volumes

38

"""

39

```

40

41

**Usage Examples:**

42

43

```python

44

# Get all NFT collections sorted by volume

45

nfts = cg.get_nfts_list(order='h24_volume_native_desc')

46

47

# Get NFT market data sorted by market cap

48

nft_markets = cg.get_nfts_markets(

49

vs_currency='usd',

50

order='market_cap_usd_desc',

51

per_page=50

52

)

53

54

# Get Ethereum-based NFT collections only

55

ethereum_nfts = cg.get_nfts_list(asset_platform_id='ethereum')

56

```

57

58

### Individual NFT Collection Data

59

60

Get detailed information about specific NFT collections.

61

62

```python { .api }

63

def get_nfts_by_id(id, **kwargs):

64

"""

65

Get comprehensive data for an NFT collection including floor price, volume, and metadata.

66

67

Parameters:

68

- id (str): NFT collection ID (e.g., 'cryptopunks')

69

70

Returns:

71

dict: Comprehensive NFT collection data including description, floor price, volume, and social links

72

"""

73

74

def get_nfts_by_asset_platform_id_and_contract_address(asset_platform_id, contract_address, **kwargs):

75

"""

76

Get NFT collection data by blockchain platform and contract address.

77

78

Parameters:

79

- asset_platform_id (str): Blockchain platform ID (e.g., 'ethereum')

80

- contract_address (str): NFT contract address

81

82

Returns:

83

dict: NFT collection data identified by contract address

84

"""

85

```

86

87

**Usage Examples:**

88

89

```python

90

# Get CryptoPunks collection data

91

cryptopunks = cg.get_nfts_by_id(id='cryptopunks')

92

93

# Get NFT collection by contract address

94

nft_by_contract = cg.get_nfts_by_asset_platform_id_and_contract_address(

95

asset_platform_id='ethereum',

96

contract_address='0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb'

97

)

98

```

99

100

### NFT Market Charts

101

102

Access historical market data for NFT collections including floor prices and trading volumes.

103

104

```python { .api }

105

def get_nfts_market_chart_by_id(id, days, **kwargs):

106

"""

107

Query historical market data of an NFT collection including floor price, market cap, and 24h volume.

108

109

Parameters:

110

- id (str): NFT collection ID (e.g., 'cryptopunks')

111

- days (str or int): Data range ('1', '7', '14', '30', '90', '180', '365', 'max')

112

113

Returns:

114

dict: Contains 'floor_price_usd', 'floor_price_native', 'h24_volume_usd', 'h24_volume_native', 'market_cap_usd', 'market_cap_native' arrays with [timestamp, value] pairs

115

"""

116

117

def get_nfts_market_chart_by_asset_platform_id_and_contract_address(asset_platform_id, contract_address, days, **kwargs):

118

"""

119

Query historical market data by contract address including floor price, market cap, and volume.

120

121

Parameters:

122

- asset_platform_id (str): Blockchain platform ID (e.g., 'ethereum')

123

- contract_address (str): NFT contract address

124

- days (str or int): Data range ('1', '7', '14', '30', '90', '180', '365', 'max')

125

126

Returns:

127

dict: Historical market data arrays for the NFT collection

128

"""

129

```

130

131

**Usage Examples:**

132

133

```python

134

# Get CryptoPunks price chart for last 30 days

135

punks_chart = cg.get_nfts_market_chart_by_id(id='cryptopunks', days=30)

136

137

# Get NFT market chart by contract address

138

nft_chart = cg.get_nfts_market_chart_by_asset_platform_id_and_contract_address(

139

asset_platform_id='ethereum',

140

contract_address='0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb',

141

days=7

142

)

143

```

144

145

### NFT Marketplace Tickers

146

147

Get floor price and volume data from individual NFT marketplaces.

148

149

```python { .api }

150

def get_nfts_tickers_by_id(id, **kwargs):

151

"""

152

Query the latest floor price and 24h volume of an NFT collection on each marketplace.

153

154

Parameters:

155

- id (str): NFT collection ID (e.g., 'cryptopunks')

156

157

Returns:

158

dict: Contains 'tickers' array with marketplace-specific floor prices, volumes, and last updated timestamps

159

"""

160

```

161

162

**Usage Examples:**

163

164

```python

165

# Get CryptoPunks marketplace tickers

166

punks_tickers = cg.get_nfts_tickers_by_id(id='cryptopunks')

167

168

# Access individual marketplace data

169

for ticker in punks_tickers['tickers']:

170

marketplace = ticker['nft_marketplace']['name'] # e.g., 'OpenSea', 'LooksRare'

171

floor_price = ticker['floor_price_in_usd']

172

volume_24h = ticker['h24_volume_in_usd']

173

print(f"{marketplace}: Floor ${floor_price}, 24h Volume ${volume_24h}")

174

```

175

176

## Data Structures

177

178

### NFT Collection Data Format

179

NFT collection information includes:

180

181

```python

182

{

183

"id": "cryptopunks",

184

"contract_address": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb",

185

"asset_platform_id": "ethereum",

186

"name": "CryptoPunks",

187

"symbol": "PUNK",

188

"image": {

189

"small": "https://assets.coingecko.com/nft_contracts/images/28/small/cryptopunks.png",

190

"large": "https://assets.coingecko.com/nft_contracts/images/28/large/cryptopunks.png"

191

},

192

"description": "CryptoPunks launched as a fixed set of 10,000 items...",

193

"native_currency": "ethereum",

194

"native_currency_symbol": "eth",

195

"floor_price": {

196

"native_currency": 45.5,

197

"usd": 123456.78

198

},

199

"market_cap": {

200

"native_currency": 455000.0,

201

"usd": 1234567890.12

202

},

203

"volume_24h": {

204

"native_currency": 123.45,

205

"usd": 334455.67

206

},

207

"floor_price_in_usd_24h_percentage_change": 2.5,

208

"number_of_unique_addresses": 3840,

209

"number_of_unique_addresses_24h_percentage_change": -0.8,

210

"volume_in_usd_24h_percentage_change": 15.3,

211

"total_supply": 10000,

212

"links": {

213

"homepage": "https://www.larvalabs.com/cryptopunks",

214

"twitter": {

215

"handle": "larvalabs",

216

"followers": 123456

217

},

218

"discord": "https://discord.gg/tQp4pSE"

219

}

220

}

221

```

222

223

### NFT Market Chart Format

224

Historical NFT data includes multiple metrics:

225

226

```python

227

{

228

"floor_price_usd": [[timestamp1, price1], [timestamp2, price2], ...],

229

"floor_price_native": [[timestamp1, native_price1], [timestamp2, native_price2], ...],

230

"h24_volume_usd": [[timestamp1, volume1], [timestamp2, volume2], ...],

231

"h24_volume_native": [[timestamp1, native_vol1], [timestamp2, native_vol2], ...],

232

"market_cap_usd": [[timestamp1, cap1], [timestamp2, cap2], ...],

233

"market_cap_native": [[timestamp1, native_cap1], [timestamp2, native_cap2], ...]

234

}

235

```

236

237

### NFT Ticker Data Format

238

Marketplace-specific ticker data:

239

240

```python

241

{

242

"tickers": [

243

{

244

"nft_marketplace": {

245

"name": "OpenSea",

246

"identifier": "opensea"

247

},

248

"floor_price_in_native_currency": 45.5,

249

"floor_price_24h_percentage_change": {

250

"native_currency": 2.5,

251

"usd": 3.2

252

},

253

"floor_price_in_usd": 123456.78,

254

"h24_volume_in_native_currency": 123.45,

255

"h24_volume_in_usd": 334455.67,

256

"h24_average_sale_price_in_native_currency": 50.2,

257

"h24_average_sale_price_in_usd": 136000.50,

258

"updated_at": "2023-12-01T10:00:00.000Z"

259

}

260

]

261

}

262

```

263

264

## Native Currency

265

266

NFT collections have a `native_currency` field that indicates the blockchain's native token:

267

- Ethereum NFTs: `native_currency` = "ethereum" (ETH)

268

- Polygon NFTs: `native_currency` = "polygon" (MATIC)

269

- Solana NFTs: `native_currency` = "solana" (SOL)

270

271

Floor prices and volumes are provided in both native currency and USD equivalent.

272

273

## Marketplace Coverage

274

275

The API covers major NFT marketplaces including:

276

- OpenSea

277

- LooksRare

278

- Magic Eden

279

- Foundation

280

- SuperRare

281

- Async Art

282

- And others

283

284

Each marketplace provides independent floor price and volume data, allowing for comprehensive market analysis across platforms.