Purchasing Data
How to find and purchase datasets on DataXchange.
Overview
DataXchange offers anonymized Web3 behavioral data for research, product development, and trading strategies.
Finding Data
Browse Marketplace
Visit app.priv.io/dataxchange to browse listings.
Filter Options
| Filter | Description |
|---|---|
| Category | DeFi, NFT, Governance, Gaming, Social |
| Price Range | Min/max PRIV |
| Data Points | Minimum dataset size |
| Time Range | Data coverage period |
| Quality Score | Minimum quality rating |
| Chains | Filter by blockchain |
Search
Search by keywords:
- Protocol names (e.g., "uniswap", "aave")
- Event types (e.g., "swap", "mint")
- Token names (e.g., "ETH", "USDC")
Evaluating Listings
Listing Details
Each listing shows:
┌─────────────────────────────────────────────────┐
│ DeFi Trading Activity - January 2024 │
├─────────────────────────────────────────────────┤
│ Price: 100 PRIV (~$30 USD) │
│ Data Points: 75,000 │
│ Time Range: Jan 1-31, 2024 │
│ Category: defi_trading │
│ Quality Score: 95/100 │
│ Purchases: 12 | Rating: 4.8/5 │
├─────────────────────────────────────────────────┤
│ Description: │
│ Comprehensive swap and LP data from major │
│ DEXs on Base including Uniswap, Aerodrome... │
├─────────────────────────────────────────────────┤
│ Events: swap, lp_add, lp_remove, stake │
│ Protocols: uniswap, aerodrome, balancer │
│ Chains: Base (8453) │
├─────────────────────────────────────────────────┤
│ [View Sample] [Purchase] │
└─────────────────────────────────────────────────┘Sample Data
Always review the sample before purchasing:
{
"sample": [
{
"timestamp": "2024-01-15T10:30:00Z",
"event": "swap",
"tokens": ["ETH", "USDC"],
"amounts": ["1-2", "2000-3000"],
"protocol": "uniswap",
"user_hash": "anon_abc123"
}
]
}Quality Indicators
| Indicator | Good | Caution |
|---|---|---|
| Quality Score | 80+ | Below 60 |
| Completeness | 95%+ | Below 90% |
| Purchases | 5+ with reviews | 0 purchases |
| Rating | 4.0+ | Below 3.0 |
| Seller History | Established | New seller |
Making a Purchase
Step 1: Ensure PRIV Balance
Check your wallet has enough PRIV:
const balance = await privToken.balanceOf(myAddress)
const price = listing.price
if (balance < price) {
// Buy PRIV on Uniswap or other DEX
}Step 2: Approve Spending
Approve the DataXchange contract to spend your PRIV:
await privToken.approve(dataXchangeAddress, price)Step 3: Complete Purchase
Click "Purchase" and sign the transaction:
const accessKey = await dataXchange.purchase(listingId)Step 4: Download Data
Use the access key to download:
curl "https://api.priv.io/v1/dataxchange/download/pur_abc123" \
-H "Authorization: Bearer your_api_key" \
-o dataset.jsonOr via the dashboard:
- Go to "My Purchases"
- Click the listing
- Click "Download"
Programmatic Purchasing
Using the API
import { PRIVToken, DataXchange } from '@priv/contracts'
async function purchaseData(listingId: bigint) {
// Get listing details
const listing = await dataXchange.getListing(listingId)
// Approve PRIV spend
await privToken.approve(dataXchangeAddress, listing.price)
// Purchase
const tx = await dataXchange.purchase(listingId)
const receipt = await tx.wait()
// Get access key from event
const event = receipt.logs.find(
log => log.topics[0] === dataXchange.interface.getEventTopic('DataPurchased')
)
const { accessKey } = dataXchange.interface.decodeEventLog(
'DataPurchased',
event.data,
event.topics
)
// Download data
const response = await fetch(
`https://api.priv.io/v1/dataxchange/download/${accessKey}`,
{
headers: { Authorization: `Bearer ${apiKey}` }
}
)
return response.json()
}Batch Purchases
Buy multiple datasets at once:
const listingIds = [1n, 2n, 3n]
const accessKeys = await dataXchange.purchaseBatch(listingIds)Data Formats
Standard Format
All datasets follow a consistent schema:
interface DataPoint {
timestamp: string // ISO 8601
event: string // Event type
user_hash: string // Anonymized user
properties: Record<string, unknown>
}Category-Specific Fields
DeFi Trading:
{
"timestamp": "2024-01-15T10:30:00Z",
"event": "swap",
"user_hash": "anon_abc123",
"properties": {
"token_in": "ETH",
"token_out": "USDC",
"amount_in_range": "1-2",
"amount_out_range": "2000-3000",
"protocol": "uniswap",
"pool": "0x..."
}
}NFT Activity:
{
"timestamp": "2024-01-15T10:30:00Z",
"event": "sale",
"user_hash": "anon_abc123",
"properties": {
"collection": "0x...",
"token_id_range": "1000-2000",
"price_range": "0.1-0.5",
"currency": "ETH",
"marketplace": "opensea"
}
}After Purchase
Data Storage
Store purchased data securely:
- Encrypt at rest
- Limit access to authorized users
- Follow your organization's data policies
Usage Rights
When you purchase data:
- You may use for any legal purpose
- You may not attempt to de-anonymize
- You may not resell raw data
- Attribution to PRIV Protocol appreciated
Leaving Reviews
Help the community by reviewing purchases:
- Go to "My Purchases"
- Click "Leave Review"
- Rate 1-5 stars
- Add optional comment
Disputes
Opening a Dispute
If data doesn't match description:
Step 1: Document the Issue
Note specific problems:
- Missing fields
- Incorrect date range
- Lower quality than claimed
Step 2: Open Dispute
- Go to "My Purchases"
- Click "Open Dispute"
- Select reason
- Provide evidence
- Submit
Step 3: Await Resolution
- PRIV arbitrators review within 7 days
- If valid, you receive a refund
- If invalid, no action taken
Dispute Reasons
| Reason | Example |
|---|---|
| Data mismatch | Listed 50k points, received 30k |
| Quality issues | 60% completeness, claimed 95% |
| Format problems | Unreadable or corrupted data |
| Missing events | Listed "swap" events not present |
Disputes are resolved by community arbitrators who earn PRIV for fair judgments.
Best Practices
- Review samples: Always check before buying
- Start small: Test sellers with smaller purchases first
- Check reviews: Learn from other buyers' experiences
- Verify schemas: Ensure data format meets your needs
- Keep records: Document purchases for your own tracking
Next Steps
- API Reference - Programmatic access
- Smart Contract - On-chain documentation