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 '
{
"recipients": [
{
"amount": 1.00000001,
"fid": 3
}
],
"fungible_contract_address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
}
'import requests
url = "https://api.neynar.com/v2/farcaster/fungible/send/"
payload = {
"recipients": [
{
"amount": 1.00000001,
"fid": 3
}
],
"fungible_contract_address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
}
headers = {
"x-wallet-id": "<x-wallet-id>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-wallet-id': '<x-wallet-id>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
recipients: [{amount: 1.00000001, fid: 3}],
fungible_contract_address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
})
};
fetch('https://api.neynar.com/v2/farcaster/fungible/send/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.neynar.com/v2/farcaster/fungible/send/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'recipients' => [
[
'amount' => 1.00000001,
'fid' => 3
]
],
'fungible_contract_address' => '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-wallet-id: <x-wallet-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.neynar.com/v2/farcaster/fungible/send/"
payload := strings.NewReader("{\n \"recipients\": [\n {\n \"amount\": 1.00000001,\n \"fid\": 3\n }\n ],\n \"fungible_contract_address\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-wallet-id", "<x-wallet-id>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.neynar.com/v2/farcaster/fungible/send/")
.header("x-wallet-id", "<x-wallet-id>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"recipients\": [\n {\n \"amount\": 1.00000001,\n \"fid\": 3\n }\n ],\n \"fungible_contract_address\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neynar.com/v2/farcaster/fungible/send/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-wallet-id"] = '<x-wallet-id>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipients\": [\n {\n \"amount\": 1.00000001,\n \"fid\": 3\n }\n ],\n \"fungible_contract_address\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\"\n}"
response = http.request(request)
puts response.read_body{
"send_receipts": [
{
"amount": 123,
"fid": 3,
"status": "sent",
"reason": "<string>"
}
],
"transactions": [
{
"approval_hash": "<string>",
"gas_used": "<string>",
"network": "base",
"transaction_hash": "<string>"
}
]
}{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"status": 123
}{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"status": 123
}Onchain
Send fungibles
Send fungibles in bulk to several farcaster users. A funded wallet is to required use this API. React out to us on the Neynar channel on farcaster to get your wallet address.
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 '
{
"recipients": [
{
"amount": 1.00000001,
"fid": 3
}
],
"fungible_contract_address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
}
'import requests
url = "https://api.neynar.com/v2/farcaster/fungible/send/"
payload = {
"recipients": [
{
"amount": 1.00000001,
"fid": 3
}
],
"fungible_contract_address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
}
headers = {
"x-wallet-id": "<x-wallet-id>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-wallet-id': '<x-wallet-id>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
recipients: [{amount: 1.00000001, fid: 3}],
fungible_contract_address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
})
};
fetch('https://api.neynar.com/v2/farcaster/fungible/send/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.neynar.com/v2/farcaster/fungible/send/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'recipients' => [
[
'amount' => 1.00000001,
'fid' => 3
]
],
'fungible_contract_address' => '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-wallet-id: <x-wallet-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.neynar.com/v2/farcaster/fungible/send/"
payload := strings.NewReader("{\n \"recipients\": [\n {\n \"amount\": 1.00000001,\n \"fid\": 3\n }\n ],\n \"fungible_contract_address\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-wallet-id", "<x-wallet-id>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.neynar.com/v2/farcaster/fungible/send/")
.header("x-wallet-id", "<x-wallet-id>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"recipients\": [\n {\n \"amount\": 1.00000001,\n \"fid\": 3\n }\n ],\n \"fungible_contract_address\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neynar.com/v2/farcaster/fungible/send/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-wallet-id"] = '<x-wallet-id>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipients\": [\n {\n \"amount\": 1.00000001,\n \"fid\": 3\n }\n ],\n \"fungible_contract_address\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\"\n}"
response = http.request(request)
puts response.read_body{
"send_receipts": [
{
"amount": 123,
"fid": 3,
"status": "sent",
"reason": "<string>"
}
],
"transactions": [
{
"approval_hash": "<string>",
"gas_used": "<string>",
"network": "base",
"transaction_hash": "<string>"
}
]
}{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"status": 123
}{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"status": 123
}Related documentation:
- Managing Onchain Wallets - Wallet setup guide
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)
Thex-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);
curl -X POST 'https://api.neynar.com/v2/farcaster/fungible/send' \
-H 'x-api-key: YOUR_NEYNAR_API_KEY' \
-H 'x-wallet-id: your-wallet-id' \
-H 'Content-Type: application/json' \
-d '{
"token_address": "0x...",
"network": "base",
"recipients": [
{"fid": 12345, "amount": "1.5"},
{"fid": 67890, "amount": "2.0"}
]
}'
import requests
headers = {
'x-api-key': 'YOUR_NEYNAR_API_KEY',
'x-wallet-id': 'your-wallet-id', # REQUIRED
'Content-Type': 'application/json'
}
payload = {
'token_address': '0x...',
'network': 'base',
'recipients': [
{'fid': 12345, 'amount': '1.5'},
{'fid': 67890, 'amount': '2.0'}
]
}
response = requests.post(
'https://api.neynar.com/v2/farcaster/fungible/send',
headers=headers,
json=payload
)
result = response.json()
print('Transfers:', result)
Supported Networks
You can send fungibles on:| Network | Token Standard | Native Token |
|---|---|---|
| Base | ERC-20 | ETH |
| Optimism | ERC-20 | ETH |
| Base Sepolia | ERC-20 (testnet) | ETH |
| Solana | SPL | SOL |
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"
}
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."
}
Error: Insufficient Wallet Balance
{
"code": "InsufficientFunds",
"message": "Wallet does not have enough balance to complete this transaction."
}
Error: Insufficient Token Balance
{
"code": "InsufficientTokenBalance",
"message": "Wallet does not have enough of the specified token to complete transfers."
}
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
Manage Your Wallet
Set up and fund your wallet for token transfers
Fetch User Balance
Check token balances for Farcaster users
Mint NFTs
Mint NFTs to Farcaster users
Contact Support
Need help? Reach out to our team
Authorizations
API key to authorize requests
Headers
Wallet ID to use for transactions
Body
application/json
Available options:
base, optimism, base-sepolia Required array length:
1 - 200 elementsShow child attributes
Show child attributes
Contract address of the fungible token to send. If not provided, the default is the native token of the network.
Pattern:
^0x[a-fA-F0-9]{40}$Example:
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
Was this page helpful?