Skip to content

Quick Start

Build your first monetized data feed in minutes. Perfect for developers who want to sell API access, data subscriptions, or premium content.

Choose Your Method

Option 1: Using the SDK (Recommended)

The SDK handles authentication and payments automatically:

npm install @pinata/grapevine-sdk
import { GrapevineClient } from '@pinata/grapevine-sdk';
 
const grapevine = new GrapevineClient({
  network: 'testnet',
  privateKey: process.env.PRIVATE_KEY
});
 
// Create your data feed
const feed = await grapevine.feeds.create({
  name: 'My API Data Feed',
  description: 'Premium market data for developers'
});
 
// Add your first data entry
const entry = await grapevine.entries.create(feed.id, {
  content: JSON.stringify({
    data: 'your API response here',
    timestamp: Date.now()
  }),
  title: 'Latest Data Update',
  mime_type: 'application/json',
  is_free: false
});

Continue to SDK Documentation →

Option 2: Direct API Calls

For direct API integration without the SDK:

# Using Bun (recommended)
bun add viem
 
# Using npm
npm install viem

Continue to API Documentation →

Prerequisites

  • Bun or Node.js runtime
  • A wallet private key with ETH for gas fees (Base Sepolia for testing)

Configuration

Create a .env file with your credentials:

PRIVATE_KEY=0x_your_private_key_here
API_URL=https://api.grapevine.markets  # testnet
# API_URL=https://api.grapevine.fyi   # mainnet

The script automatically detects the network:

  • https://api.grapevine.markets → Base Sepolia (Chain ID: 84532)
  • https://api.grapevine.fyi → Base mainnet (Chain ID: 8453)

Getting Test Tokens

Base Sepolia ETH

Get test ETH from: Alchemy Faucet

Test USDC (Optional)

You only need test USDC if you want to access paid content created by others. Creating feeds and entries is free. Options:

  1. Bridge from Ethereum Sepolia
  2. Use a test token faucet
  3. Contact Grapevine support

Next Steps

Troubleshooting

"Missing or invalid PRIVATE_KEY"

Make sure your private key in .env starts with 0x and is valid.

"Low ETH balance"

You need ETH for gas fees. Get test ETH from the faucet linked above.

"401 Unauthorized" errors

Check that your private key is correct and properly formatted.

"403 Forbidden" errors

You may have reached the maximum feed limit (10 per wallet).

Network mismatch

The network is auto-detected from your API_URL. Ensure you're using the correct endpoint.