nft-tracker · diff

git:20260214.4214ad5 to git:20260730.f25155f

49 added, 55 removed. Audit A to A.

---
name: nft-tracker
description: "Track NFT collection prices, floor prices, and sales data. Supports Ethereum collections including BAYC, MAYC, CryptoPunks, and more."
homepage: https://docs.opensea.io/reference/api-overview
metadata:
{
"openclaw":
{
"emoji": "🖼️",
"requires": { "bins": ["curl", "jq"] },
"credentials":
[
{
"id": "opensea-api-key",
"name": "OpenSea API Key",
"description": "API key from https://docs.opensea.io/reference/api-keys",
"env": "OPENSEA_API_KEY",
},
],
},
}
---
# NFT Price Tracker
- Track NFT collection stats, floor prices, and recent sales using free APIs.
-
- ## Free APIs (No Key Required)
+ Track NFT collection stats, floor prices, and recent sales using the OpenSea API.
- ### Reservoir API (Recommended)
+ ## Setup
- Get collection floor price:
+ Export your OpenSea API key (free tier available):
```bash
- curl -s "https://api.reservoir.tools/collections/v6?slug=boredapeyachtclub" | jq '.collections[0] | {name, floorAsk: .floorAsk.price.amount.native, volume24h: .volume["1day"], volumeChange: .volumeChange["1day"]}'
+ export OPENSEA_API_KEY="your-key"
```
- ### Popular Collection Slugs
+ ## Popular Collection Slugs
- `boredapeyachtclub` - Bored Ape Yacht Club (BAYC)
- `mutant-ape-yacht-club` - Mutant Ape Yacht Club (MAYC)
- `cryptopunks` - CryptoPunks
- `azuki` - Azuki
- `pudgypenguins` - Pudgy Penguins
- `doodles-official` - Doodles
- `clonex` - CloneX
## Collection Stats
- Get detailed collection stats:
+ Get collection floor and volume stats:
```bash
- curl -s "https://api.reservoir.tools/collections/v6?slug=mutant-ape-yacht-club" | jq '.collections[0] | {
- name: .name,
- floor_eth: .floorAsk.price.amount.native,
- floor_usd: .floorAsk.price.amount.usd,
- volume_24h: .volume["1day"],
- volume_7d: .volume["7day"],
- volume_30d: .volume["30day"],
- owners: .ownerCount,
- supply: .tokenCount
+ curl -s "https://api.opensea.io/api/v2/collections/mutant-ape-yacht-club/stats" \
+ -H "X-API-KEY: $OPENSEA_API_KEY" | jq '{
+ floor: .total.floor_price,
+ volume: .total.volume,
+ sales: .total.sales,
+ num_owners: .total.num_owners,
+ average_price: .total.average_price
}'
```
- ## Recent Sales
-
- Get recent sales for a collection:
+ BAYC example:
```bash
- curl -s "https://api.reservoir.tools/sales/v6?collection=0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d&limit=10" | jq '.sales[] | {token_id: .token.tokenId, price_eth: .price.amount.native, timestamp: .timestamp, marketplace: .orderSource}'
+ curl -s "https://api.opensea.io/api/v2/collections/boredapeyachtclub/stats" \
+ -H "X-API-KEY: $OPENSEA_API_KEY" | jq '.'
```
- Contract addresses:
- - BAYC: `0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d`
- - MAYC: `0x60e4d786628fea6478f785a6d7e704777c86a7c6`
- - CryptoPunks: `0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb`
-
- ## Floor Price History
-
- Get floor price over time:
+ ## Collection Metadata
```bash
- curl -s "https://api.reservoir.tools/collections/daily-volumes/v1?collection=0x60e4d786628fea6478f785a6d7e704777c86a7c6&limit=30" | jq '.[] | {date: .timestamp, floor: .floorAskPrice, volume: .volume}'
+ curl -s "https://api.opensea.io/api/v2/collections/mutant-ape-yacht-club" \
+ -H "X-API-KEY: $OPENSEA_API_KEY" | jq '{
+ name: .name,
+ description: .description,
+ image_url: .image_url,
+ contracts: .contracts
+ }'
```
- ## Top Collections
-
- Get top collections by volume:
+ ## Recent Events / Sales
```bash
- curl -s "https://api.reservoir.tools/collections/v6?sortBy=1DayVolume&limit=10" | jq '.collections[] | {name: .name, floor: .floorAsk.price.amount.native, volume_24h: .volume["1day"]}'
+ curl -s "https://api.opensea.io/api/v2/events/collection/boredapeyachtclub?event_type=sale&limit=10" \
+ -H "X-API-KEY: $OPENSEA_API_KEY" | jq '.asset_events[] | {
+ event_type: .event_type,
+ order_hash: .order_hash,
+ chain: .chain
+ }'
```
- ## Token Lookup
+ Contract addresses:
+ - BAYC: `0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d`
+ - MAYC: `0x60e4d786628fea6478f785a6d7e704777c86a7c6`
+ - CryptoPunks: `0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb`
- Get details for a specific NFT:
+ ## NFT Lookup
+ Get details for a specific token (MAYC #1234):
+
```bash
- # MAYC #1234
- curl -s "https://api.reservoir.tools/tokens/v7?tokens=0x60e4d786628fea6478f785a6d7e704777c86a7c6:1234" | jq '.tokens[0] | {name: .token.name, image: .token.image, lastSale: .token.lastSale.price.amount.native, owner: .token.owner}'
+ curl -s "https://api.opensea.io/api/v2/chain/ethereum/contract/0x60e4d786628fea6478f785a6d7e704777c86a7c6/nfts/1234" \
+ -H "X-API-KEY: $OPENSEA_API_KEY" | jq '.nft | {name, image_url, owners, traits}'
```
## Price Alerts (Script Example)
Monitor floor price and alert when below threshold:
```bash
#!/bin/bash
COLLECTION="mutant-ape-yacht-club"
- THRESHOLD=5 # ETH
+ THRESHOLD=5 # ETH (or collection floor units)
- FLOOR=$(curl -s "https://api.reservoir.tools/collections/v6?slug=$COLLECTION" | jq -r '.collections[0].floorAsk.price.amount.native')
+ FLOOR=$(curl -s "https://api.opensea.io/api/v2/collections/$COLLECTION/stats" \
+ -H "X-API-KEY: $OPENSEA_API_KEY" | jq -r '.total.floor_price // empty')
- if (( $(echo "$FLOOR < $THRESHOLD" | bc -l) )); then
- echo "ALERT: $COLLECTION floor is $FLOOR ETH (below $THRESHOLD ETH)"
+ if [ -n "$FLOOR" ] && (( $(echo "$FLOOR < $THRESHOLD" | bc -l) )); then
+ echo "ALERT: $COLLECTION floor is $FLOOR (below $THRESHOLD)"
fi
```
- ## OpenSea API (With Key)
-
- If you have an OpenSea API key:
-
- ```bash
- curl -s "https://api.opensea.io/api/v2/collections/mutant-ape-yacht-club/stats" \
- -H "X-API-KEY: $OPENSEA_API_KEY" | jq '.'
- ```
-
## Tips
- - Reservoir API is free and doesn't require authentication for basic queries
- - Rate limits apply - cache responses when possible
- - Prices are in ETH unless specified otherwise
- - Use contract addresses for precise lookups, slugs for convenience
+ - OpenSea requires an API key for most endpoints — get one at https://docs.opensea.io/reference/api-keys
+ - Rate limits apply — cache responses when possible
+ - Use collection slugs for stats; use chain + contract + token id for precise NFT lookups
+ - The old Reservoir `api.reservoir.tools` host no longer resolves; prefer OpenSea