Transfer tokens as a delegate
curl --request POST \
--url https://api.portalhq.io/api/v3/clients/me/chains/{chain}/assets/{token}/delegations/transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fromAddress": "0x54968898742c08da211a1cd355447cd1f37f0649",
"toAddress": "0xdFd8302f44727A6348F702fF7B594f127dE3A902",
"amount": "50"
}
'import requests
url = "https://api.portalhq.io/api/v3/clients/me/chains/{chain}/assets/{token}/delegations/transfers"
payload = {
"fromAddress": "0x54968898742c08da211a1cd355447cd1f37f0649",
"toAddress": "0xdFd8302f44727A6348F702fF7B594f127dE3A902",
"amount": "50"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fromAddress: '0x54968898742c08da211a1cd355447cd1f37f0649',
toAddress: '0xdFd8302f44727A6348F702fF7B594f127dE3A902',
amount: '50'
})
};
fetch('https://api.portalhq.io/api/v3/clients/me/chains/{chain}/assets/{token}/delegations/transfers', 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.portalhq.io/api/v3/clients/me/chains/{chain}/assets/{token}/delegations/transfers",
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([
'fromAddress' => '0x54968898742c08da211a1cd355447cd1f37f0649',
'toAddress' => '0xdFd8302f44727A6348F702fF7B594f127dE3A902',
'amount' => '50'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.portalhq.io/api/v3/clients/me/chains/{chain}/assets/{token}/delegations/transfers"
payload := strings.NewReader("{\n \"fromAddress\": \"0x54968898742c08da211a1cd355447cd1f37f0649\",\n \"toAddress\": \"0xdFd8302f44727A6348F702fF7B594f127dE3A902\",\n \"amount\": \"50\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.portalhq.io/api/v3/clients/me/chains/{chain}/assets/{token}/delegations/transfers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fromAddress\": \"0x54968898742c08da211a1cd355447cd1f37f0649\",\n \"toAddress\": \"0xdFd8302f44727A6348F702fF7B594f127dE3A902\",\n \"amount\": \"50\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portalhq.io/api/v3/clients/me/chains/{chain}/assets/{token}/delegations/transfers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fromAddress\": \"0x54968898742c08da211a1cd355447cd1f37f0649\",\n \"toAddress\": \"0xdFd8302f44727A6348F702fF7B594f127dE3A902\",\n \"amount\": \"50\"\n}"
response = http.request(request)
puts response.read_body{
"transactions": [
{
"from": "0x54968898742c08da211a1cd355447cd1f37f0649",
"to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"data": "0x23b872dd000000000000000000000000..."
}
],
"metadata": {
"amount": "50",
"amountRaw": "50000000",
"chainId": "eip155:1",
"delegateAddress": "0x54968898742c08da211a1cd355447cd1f37f0649",
"ownerAddress": "0x54968898742c08da211a1cd355447cd1f37f0649",
"recipientAddress": "0xdFd8302f44727A6348F702fF7B594f127dE3A902",
"tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"tokenSymbol": "USDC",
"tokenDecimals": 6
}
}Delegations
Transfer tokens as a delegate
Builds a transaction to transfer tokens from one address to another using the delegate’s approval. The response format differs between EVM and Solana chains.
POST
/
clients
/
me
/
chains
/
{chain}
/
assets
/
{token}
/
delegations
/
transfers
Transfer tokens as a delegate
curl --request POST \
--url https://api.portalhq.io/api/v3/clients/me/chains/{chain}/assets/{token}/delegations/transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fromAddress": "0x54968898742c08da211a1cd355447cd1f37f0649",
"toAddress": "0xdFd8302f44727A6348F702fF7B594f127dE3A902",
"amount": "50"
}
'import requests
url = "https://api.portalhq.io/api/v3/clients/me/chains/{chain}/assets/{token}/delegations/transfers"
payload = {
"fromAddress": "0x54968898742c08da211a1cd355447cd1f37f0649",
"toAddress": "0xdFd8302f44727A6348F702fF7B594f127dE3A902",
"amount": "50"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fromAddress: '0x54968898742c08da211a1cd355447cd1f37f0649',
toAddress: '0xdFd8302f44727A6348F702fF7B594f127dE3A902',
amount: '50'
})
};
fetch('https://api.portalhq.io/api/v3/clients/me/chains/{chain}/assets/{token}/delegations/transfers', 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.portalhq.io/api/v3/clients/me/chains/{chain}/assets/{token}/delegations/transfers",
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([
'fromAddress' => '0x54968898742c08da211a1cd355447cd1f37f0649',
'toAddress' => '0xdFd8302f44727A6348F702fF7B594f127dE3A902',
'amount' => '50'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.portalhq.io/api/v3/clients/me/chains/{chain}/assets/{token}/delegations/transfers"
payload := strings.NewReader("{\n \"fromAddress\": \"0x54968898742c08da211a1cd355447cd1f37f0649\",\n \"toAddress\": \"0xdFd8302f44727A6348F702fF7B594f127dE3A902\",\n \"amount\": \"50\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.portalhq.io/api/v3/clients/me/chains/{chain}/assets/{token}/delegations/transfers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fromAddress\": \"0x54968898742c08da211a1cd355447cd1f37f0649\",\n \"toAddress\": \"0xdFd8302f44727A6348F702fF7B594f127dE3A902\",\n \"amount\": \"50\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portalhq.io/api/v3/clients/me/chains/{chain}/assets/{token}/delegations/transfers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fromAddress\": \"0x54968898742c08da211a1cd355447cd1f37f0649\",\n \"toAddress\": \"0xdFd8302f44727A6348F702fF7B594f127dE3A902\",\n \"amount\": \"50\"\n}"
response = http.request(request)
puts response.read_body{
"transactions": [
{
"from": "0x54968898742c08da211a1cd355447cd1f37f0649",
"to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"data": "0x23b872dd000000000000000000000000..."
}
],
"metadata": {
"amount": "50",
"amountRaw": "50000000",
"chainId": "eip155:1",
"delegateAddress": "0x54968898742c08da211a1cd355447cd1f37f0649",
"ownerAddress": "0x54968898742c08da211a1cd355447cd1f37f0649",
"recipientAddress": "0xdFd8302f44727A6348F702fF7B594f127dE3A902",
"tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"tokenSymbol": "USDC",
"tokenDecimals": 6
}
}Authorizations
Client API Key or Client Session Token (CST). Pass as a Bearer token in the Authorization header.
Path Parameters
The blockchain chain identifier. Use either a friendly name or CAIP-2 format.
When using CAIP-2 format in URLs, ensure the colon (:) is URI-encoded as %3A.
Supported chains:
ethereum(eip155:1)sepolia(eip155:11155111)base(eip155:8453)base-sepolia(eip155:84532)polygon(eip155:137)polygon-mumbai(eip155:80001)celo(eip155:42220)celo-alfajores(eip155:44787)monad(eip155:143)monad-testnet(eip155:10143)solana(solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp)solana-devnet(solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1)tron(tron:mainnet)tron-nile(tron:nile)tron-shasta(tron:shasta)stellar(stellar:pubnet)stellar-testnet(stellar:testnet)bitcoin-segwit(bip122:000000000019d6689c085ae165831e93-p2wpkh)bitcoin-segwit-testnet(bip122:000000000933ea01ad0ee984209779ba-p2wpkh)bitcoin-p2wpkh(bip122:000000000019d6689c085ae165831e93-p2wpkh)bitcoin-p2wpkh-testnet(bip122:000000000933ea01ad0ee984209779ba-p2wpkh)
The token symbol (e.g. USDC, ETH) or contract/mint address on the specified chain.
Body
application/json
Response
Delegated transfer transaction built successfully. Response format depends on the chain type.
Was this page helpful?