Add Assets to Account
curl --request POST \
--url https://sandbox-api.borderless.xyz/v1/accounts/{id}/assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"asset": "ETH",
"address": "0xE79a68B87544ed42Cc5aA805bb056201e7942D3A"
}
]
'import requests
url = "https://sandbox-api.borderless.xyz/v1/accounts/{id}/assets"
payload = [
{
"asset": "ETH",
"address": "0xE79a68B87544ed42Cc5aA805bb056201e7942D3A"
}
]
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([{asset: 'ETH', address: '0xE79a68B87544ed42Cc5aA805bb056201e7942D3A'}])
};
fetch('https://sandbox-api.borderless.xyz/v1/accounts/{id}/assets', 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://sandbox-api.borderless.xyz/v1/accounts/{id}/assets",
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([
[
'asset' => 'ETH',
'address' => '0xE79a68B87544ed42Cc5aA805bb056201e7942D3A'
]
]),
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://sandbox-api.borderless.xyz/v1/accounts/{id}/assets"
payload := strings.NewReader("[\n {\n \"asset\": \"ETH\",\n \"address\": \"0xE79a68B87544ed42Cc5aA805bb056201e7942D3A\"\n }\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://sandbox-api.borderless.xyz/v1/accounts/{id}/assets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"asset\": \"ETH\",\n \"address\": \"0xE79a68B87544ed42Cc5aA805bb056201e7942D3A\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.borderless.xyz/v1/accounts/{id}/assets")
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 {\n \"asset\": \"ETH\",\n \"address\": \"0xE79a68B87544ed42Cc5aA805bb056201e7942D3A\"\n }\n]"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"address": "<string>"
}Accounts
Add Assets to Account
Add Assets to Account using the data provided in the request body.
POST
/
v1
/
accounts
/
{id}
/
assets
Add Assets to Account
curl --request POST \
--url https://sandbox-api.borderless.xyz/v1/accounts/{id}/assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"asset": "ETH",
"address": "0xE79a68B87544ed42Cc5aA805bb056201e7942D3A"
}
]
'import requests
url = "https://sandbox-api.borderless.xyz/v1/accounts/{id}/assets"
payload = [
{
"asset": "ETH",
"address": "0xE79a68B87544ed42Cc5aA805bb056201e7942D3A"
}
]
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([{asset: 'ETH', address: '0xE79a68B87544ed42Cc5aA805bb056201e7942D3A'}])
};
fetch('https://sandbox-api.borderless.xyz/v1/accounts/{id}/assets', 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://sandbox-api.borderless.xyz/v1/accounts/{id}/assets",
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([
[
'asset' => 'ETH',
'address' => '0xE79a68B87544ed42Cc5aA805bb056201e7942D3A'
]
]),
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://sandbox-api.borderless.xyz/v1/accounts/{id}/assets"
payload := strings.NewReader("[\n {\n \"asset\": \"ETH\",\n \"address\": \"0xE79a68B87544ed42Cc5aA805bb056201e7942D3A\"\n }\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://sandbox-api.borderless.xyz/v1/accounts/{id}/assets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"asset\": \"ETH\",\n \"address\": \"0xE79a68B87544ed42Cc5aA805bb056201e7942D3A\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.borderless.xyz/v1/accounts/{id}/assets")
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 {\n \"asset\": \"ETH\",\n \"address\": \"0xE79a68B87544ed42Cc5aA805bb056201e7942D3A\"\n }\n]"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"address": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
- Standalone Account Assets
- Utila Account Assets
- Dfns Account Assets
The token tied to a specific blockchain. See the list of supported Assets.
Available options:
POL, USDT_POLYGON, USDC_POLYGON, SBC_POLYGON, ETH, USDT_ETHEREUM, USDC_ETHEREUM, PYUSD_ETHEREUM, DAI_ETHEREUM, SBC_ETHEREUM, TRX, USDT_TRON, SBC_TRON, ETH_BASE, USDC_BASE, USDB_BASE, EURC_BASE, SBC_BASE, ETH_OPTIMISM, USDT_OPTIMISM, USDC_OPTIMISM, BTC, CELO, CUSD_CELO, USDC_CELO, SBC_CELO, SOL, USDC_SOLANA, USDT_SOLANA, PYUSD_SOLANA, USDP_SOLANA, EURC_SOLANA, SBC_SOLANA Example:
"ETH"
The blockchain address for the account
Example:
"0xE79a68B87544ed42Cc5aA805bb056201e7942D3A"
Response
Successfully created account Assets data.
Available options:
POL, USDT_POLYGON, USDC_POLYGON, SBC_POLYGON, ETH, USDT_ETHEREUM, USDC_ETHEREUM, PYUSD_ETHEREUM, DAI_ETHEREUM, SBC_ETHEREUM, TRX, USDT_TRON, SBC_TRON, ETH_BASE, USDC_BASE, USDB_BASE, EURC_BASE, SBC_BASE, ETH_OPTIMISM, USDT_OPTIMISM, USDC_OPTIMISM, BTC, CELO, CUSD_CELO, USDC_CELO, SBC_CELO, SOL, USDC_SOLANA, USDT_SOLANA, PYUSD_SOLANA, USDP_SOLANA, EURC_SOLANA, SBC_SOLANA Was this page helpful?
⌘I