Skip to main content
POST
/
v2
/
farcaster
/
fungible
/
send
Send fungibles
curl --request POST \
  --url https://api.neynar.com/v2/farcaster/fungible/send/ \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-wallet-id: <x-wallet-id>' \
  --data '
{
  "network": "base",
  "recipients": [
    {
      "fid": 3,
      "amount": 1.00000001
    }
  ],
  "fungible_contract_address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
}
'
{
  "send_receipts": [
    {
      "fid": 3,
      "amount": 123,
      "status": "sent",
      "reason": "<string>"
    }
  ],
  "transactions": [
    {
      "network": "base",
      "transaction_hash": "<string>",
      "gas_used": "<string>",
      "approval_hash": "<string>"
    }
  ]
}

Understanding Wallet ID for Fungible Transfers

This endpoint allows you to send fungible tokens (ERC-20, SPL tokens, etc.) in bulk to multiple Farcaster users. You can send tokens using their FID (Farcaster ID) instead of wallet addresses.

Wallet ID (REQUIRED)

The x-wallet-id header is REQUIRED for this endpoint. You must provide a funded wallet that will execute the token transfers on your behalf.
New to Wallet IDs? See Managing Onchain Wallets to create your app wallet in the developer portal and obtain your x-wallet-id value.

Code Examples

Basic Token Transfer

const response = await fetch('https://api.neynar.com/v2/farcaster/fungible/send', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_NEYNAR_API_KEY',
    'x-wallet-id': 'your-wallet-id',  // REQUIRED
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    token_address: '0x...',  // ERC-20 contract address
    network: 'base',
    recipients: [
      { fid: 12345, amount: '1.5' },
      { fid: 67890, amount: '2.0' }
    ]
  })
});

const result = await response.json();
console.log('Transfers:', result);

Supported Networks

You can send fungibles on:
NetworkToken StandardNative Token
BaseERC-20ETH
OptimismERC-20ETH
Base SepoliaERC-20 (testnet)ETH
SolanaSPLSOL

What You’re Paying For

When you send fungibles with a wallet_id:
  • Services Included:
    • FID to wallet address resolution
    • Transaction execution and monitoring
    • Gas estimation and optimization
    • Retry logic for failed transactions
    • Batch processing support

Batch Transfers

Send to multiple recipients in a single API call:
const recipients = [
  { fid: 12345, amount: '1.0' },
  { fid: 23456, amount: '2.5' },
  { fid: 34567, amount: '0.5' },
  { fid: 45678, amount: '1.5' }
];

const response = await fetch('https://api.neynar.com/v2/farcaster/fungible/send', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_NEYNAR_API_KEY',
    'x-wallet-id': 'your-wallet-id',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    token_address: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', // USDC on Base
    network: 'base',
    recipients: recipients
  })
});

const result = await response.json();
console.log(`Sent to ${result.transactions.length} recipients`);
Batch Processing: The API processes transfers in parallel for better efficiency. Each recipient gets their own transaction.

Error Handling

Error: Missing Wallet ID

{
  "code": "RequiredField",
  "message": "x-wallet-id header is required"
}
Solution: Add the x-wallet-id header. See Managing Onchain Wallets for setup.

Error: Invalid Wallet ID

{
  "code": "InvalidWalletId",
  "message": "The provided wallet_id is invalid or not found."
}
Solution: Verify your wallet_id in the Developer Portal or contact support.

Error: Insufficient Wallet Balance

{
  "code": "InsufficientFunds",
  "message": "Wallet does not have enough balance to complete this transaction."
}
Solution: Fund your wallet with more tokens (and gas tokens) on the target network.

Error: Insufficient Token Balance

{
  "code": "InsufficientTokenBalance",
  "message": "Wallet does not have enough of the specified token to complete transfers."
}
Solution: Ensure your wallet has enough of the token you’re trying to send, plus gas tokens for fees.

Use Cases

Reward Community Members

// Reward top contributors with USDC
const topContributors = [
  { fid: 12345, amount: '100' },  // $100 USDC
  { fid: 23456, amount: '50' },   // $50 USDC
  { fid: 34567, amount: '25' }    // $25 USDC
];

await sendFungibles({
  token_address: USDC_ADDRESS,
  network: 'base',
  recipients: topContributors
});

Airdrop Custom Tokens

// Airdrop your custom token to holders
const airdropList = users.map(user => ({
  fid: user.fid,
  amount: calculateAirdropAmount(user)
}));

await sendFungibles({
  token_address: YOUR_TOKEN_ADDRESS,
  network: 'base',
  recipients: airdropList
});

Pay for Services

// Pay creators for their work
await sendFungibles({
  token_address: USDC_ADDRESS,
  network: 'base',
  recipients: [
    { fid: artistFid, amount: paymentAmount }
  ]
});

Node.js SDK

πŸ”— SDK Method: sendFungiblesToUsers Use the Neynar Node.js SDK for typed responses and better developer experience:
import { NeynarAPIClient } from "@neynar/nodejs-sdk";

const client = new NeynarAPIClient({ apiKey: "YOUR_API_KEY" });

const result = await client.sendFungiblesToUsers({
  walletId: "your-wallet-id",
  tokenAddress: "0x...",
  network: "base",
  recipients: [
    { fid: 12345, amount: "1.0" }
  ]
});

Best Practices

Security

  • βœ… Validate recipients - Verify FIDs before sending
  • βœ… Set reasonable limits - Implement transfer caps
  • βœ… Monitor transactions - Track all transfers
  • βœ… Handle errors gracefully - Implement retry logic

Operations

  • βœ… Fund wallet adequately - Ensure sufficient token and gas balance
  • βœ… Batch when possible - More efficient for multiple recipients
  • βœ… Test on testnet first - Use Base Sepolia before mainnet
  • βœ… Monitor wallet balance - Set up low balance alerts

Cost Optimization

  • βœ… Batch transfers - Reduce per-recipient costs
  • βœ… Choose right network - Base often has lower gas costs than Optimism
  • βœ… Monitor gas prices - Send during low-traffic periods when possible
  • βœ… Use efficient tokens - Some ERC-20s are more gas-efficient than others

Next Steps

Authorizations

x-api-key
string
header
default:NEYNAR_API_DOCS
required

API key to authorize requests

Headers

x-wallet-id
string
required

Wallet ID to use for transactions

Body

application/json
network
enum<string>
required
Available options:
base,
optimism,
base-sepolia
recipients
TransactionSendFungiblesRecipient Β· object[]
required
Required array length: 1 - 200 elements
fungible_contract_address
string

Contract address of the fungible token to send. If not provided, the default is the native token of the network.

Example:

"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"

Response

Success

send_receipts
TransactionSendFungiblesReceipt Β· object[]
required
transactions
TransactionSendTxInfo Β· object[]
required