cURL
curl -X POST https://api.relayer.fi/v1/action/builders/transfer-native \
-H "Authorization: ApiKey $RELAYER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chain": "base",
"to": "0xRecipient...",
"amount": "0.05"
}'const response = await fetch("https://api.relayer.fi/v1/action/builders/transfer-native", {
method: "POST",
headers: {
Authorization: `ApiKey ${process.env.RELAYER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ chain: "base", to: recipientAddress, amount: "0.05" }),
});
// Returns metadata for a native-token transfer widget (ETH, MATIC, etc.).import requests
url = "https://testnet.relayer.fi/v1/action/builders/transfer-native"
payload = {
"title": "Transfer AVAX",
"description": "Send AVAX to another address on Avalanche network",
"icon": "https://example.com/avax-icon.png",
"url": "https://example.com/transfer",
"address": "0xb00D916688FEE4aB6646994104E1441446947fc9",
"chainId": 43114
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Transfer AVAX',
description: 'Send AVAX to another address on Avalanche network',
icon: 'https://example.com/avax-icon.png',
url: 'https://example.com/transfer',
address: '0xb00D916688FEE4aB6646994104E1441446947fc9',
chainId: 43114
})
};
fetch('https://testnet.relayer.fi/v1/action/builders/transfer-native', 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://testnet.relayer.fi/v1/action/builders/transfer-native",
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([
'title' => 'Transfer AVAX',
'description' => 'Send AVAX to another address on Avalanche network',
'icon' => 'https://example.com/avax-icon.png',
'url' => 'https://example.com/transfer',
'address' => '0xb00D916688FEE4aB6646994104E1441446947fc9',
'chainId' => 43114
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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://testnet.relayer.fi/v1/action/builders/transfer-native"
payload := strings.NewReader("{\n \"title\": \"Transfer AVAX\",\n \"description\": \"Send AVAX to another address on Avalanche network\",\n \"icon\": \"https://example.com/avax-icon.png\",\n \"url\": \"https://example.com/transfer\",\n \"address\": \"0xb00D916688FEE4aB6646994104E1441446947fc9\",\n \"chainId\": 43114\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://testnet.relayer.fi/v1/action/builders/transfer-native")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Transfer AVAX\",\n \"description\": \"Send AVAX to another address on Avalanche network\",\n \"icon\": \"https://example.com/avax-icon.png\",\n \"url\": \"https://example.com/transfer\",\n \"address\": \"0xb00D916688FEE4aB6646994104E1441446947fc9\",\n \"chainId\": 43114\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.relayer.fi/v1/action/builders/transfer-native")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Transfer AVAX\",\n \"description\": \"Send AVAX to another address on Avalanche network\",\n \"icon\": \"https://example.com/avax-icon.png\",\n \"url\": \"https://example.com/transfer\",\n \"address\": \"0xb00D916688FEE4aB6646994104E1441446947fc9\",\n \"chainId\": 43114\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"metadata": {}
}{
"success": true,
"message": "<string>",
"statusCode": 123,
"timestamp": "<string>",
"data": {},
"path": "<string>",
"traceId": "<string>"
}{
"success": true,
"message": "<string>",
"statusCode": 123,
"timestamp": "<string>",
"data": {},
"path": "<string>",
"traceId": "<string>"
}{
"success": true,
"message": "<string>",
"statusCode": 123,
"timestamp": "<string>",
"data": {},
"path": "<string>",
"traceId": "<string>"
}{
"success": true,
"message": "<string>",
"statusCode": 123,
"timestamp": "<string>",
"data": {},
"path": "<string>",
"traceId": "<string>"
}Widget Actions
Generate metadata for Native Token Transfer application
Creates metadata configuration for transferring native tokens (like AVAX, ETH, MATIC) on a single blockchain network.
POST
/
action
/
builders
/
transfer-native
cURL
curl -X POST https://api.relayer.fi/v1/action/builders/transfer-native \
-H "Authorization: ApiKey $RELAYER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chain": "base",
"to": "0xRecipient...",
"amount": "0.05"
}'const response = await fetch("https://api.relayer.fi/v1/action/builders/transfer-native", {
method: "POST",
headers: {
Authorization: `ApiKey ${process.env.RELAYER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ chain: "base", to: recipientAddress, amount: "0.05" }),
});
// Returns metadata for a native-token transfer widget (ETH, MATIC, etc.).import requests
url = "https://testnet.relayer.fi/v1/action/builders/transfer-native"
payload = {
"title": "Transfer AVAX",
"description": "Send AVAX to another address on Avalanche network",
"icon": "https://example.com/avax-icon.png",
"url": "https://example.com/transfer",
"address": "0xb00D916688FEE4aB6646994104E1441446947fc9",
"chainId": 43114
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Transfer AVAX',
description: 'Send AVAX to another address on Avalanche network',
icon: 'https://example.com/avax-icon.png',
url: 'https://example.com/transfer',
address: '0xb00D916688FEE4aB6646994104E1441446947fc9',
chainId: 43114
})
};
fetch('https://testnet.relayer.fi/v1/action/builders/transfer-native', 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://testnet.relayer.fi/v1/action/builders/transfer-native",
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([
'title' => 'Transfer AVAX',
'description' => 'Send AVAX to another address on Avalanche network',
'icon' => 'https://example.com/avax-icon.png',
'url' => 'https://example.com/transfer',
'address' => '0xb00D916688FEE4aB6646994104E1441446947fc9',
'chainId' => 43114
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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://testnet.relayer.fi/v1/action/builders/transfer-native"
payload := strings.NewReader("{\n \"title\": \"Transfer AVAX\",\n \"description\": \"Send AVAX to another address on Avalanche network\",\n \"icon\": \"https://example.com/avax-icon.png\",\n \"url\": \"https://example.com/transfer\",\n \"address\": \"0xb00D916688FEE4aB6646994104E1441446947fc9\",\n \"chainId\": 43114\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://testnet.relayer.fi/v1/action/builders/transfer-native")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Transfer AVAX\",\n \"description\": \"Send AVAX to another address on Avalanche network\",\n \"icon\": \"https://example.com/avax-icon.png\",\n \"url\": \"https://example.com/transfer\",\n \"address\": \"0xb00D916688FEE4aB6646994104E1441446947fc9\",\n \"chainId\": 43114\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.relayer.fi/v1/action/builders/transfer-native")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Transfer AVAX\",\n \"description\": \"Send AVAX to another address on Avalanche network\",\n \"icon\": \"https://example.com/avax-icon.png\",\n \"url\": \"https://example.com/transfer\",\n \"address\": \"0xb00D916688FEE4aB6646994104E1441446947fc9\",\n \"chainId\": 43114\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"metadata": {}
}{
"success": true,
"message": "<string>",
"statusCode": 123,
"timestamp": "<string>",
"data": {},
"path": "<string>",
"traceId": "<string>"
}{
"success": true,
"message": "<string>",
"statusCode": 123,
"timestamp": "<string>",
"data": {},
"path": "<string>",
"traceId": "<string>"
}{
"success": true,
"message": "<string>",
"statusCode": 123,
"timestamp": "<string>",
"data": {},
"path": "<string>",
"traceId": "<string>"
}{
"success": true,
"message": "<string>",
"statusCode": 123,
"timestamp": "<string>",
"data": {},
"path": "<string>",
"traceId": "<string>"
}Authorizations
Use this format: ApiKey <your_api_key>
Body
application/json
Parameters for generating native token transfer metadata
The name of the blockchain network (e.g., ethereum, polygon).
The name of the blockchain network (e.g., ethereum, polygon).
The name of the blockchain network (e.g., ethereum, polygon).
The name of the blockchain network (e.g., ethereum, polygon).
The name of the blockchain network (e.g., ethereum, polygon).
The Twitter handle of the recipient (without @).
⌘I