Add Assets to Account
curl --request POST \
--url https://access.utgl.io/v1/accounts/add-assets \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "5f2b5c7c-7f1c-4f9a-9a49-5f7f89d2b2c9",
"asset": [
"HKD",
"USD",
"BTC",
"ETH",
"BUSD",
"USDT",
"USDC"
]
}
'import requests
url = "https://access.utgl.io/v1/accounts/add-assets"
payload = {
"accountId": "5f2b5c7c-7f1c-4f9a-9a49-5f7f89d2b2c9",
"asset": ["HKD", "USD", "BTC", "ETH", "BUSD", "USDT", "USDC"]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accountId: '5f2b5c7c-7f1c-4f9a-9a49-5f7f89d2b2c9',
asset: ['HKD', 'USD', 'BTC', 'ETH', 'BUSD', 'USDT', 'USDC']
})
};
fetch('https://access.utgl.io/v1/accounts/add-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://access.utgl.io/v1/accounts/add-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([
'accountId' => '5f2b5c7c-7f1c-4f9a-9a49-5f7f89d2b2c9',
'asset' => [
'HKD',
'USD',
'BTC',
'ETH',
'BUSD',
'USDT',
'USDC'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://access.utgl.io/v1/accounts/add-assets"
payload := strings.NewReader("{\n \"accountId\": \"5f2b5c7c-7f1c-4f9a-9a49-5f7f89d2b2c9\",\n \"asset\": [\n \"HKD\",\n \"USD\",\n \"BTC\",\n \"ETH\",\n \"BUSD\",\n \"USDT\",\n \"USDC\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://access.utgl.io/v1/accounts/add-assets")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"5f2b5c7c-7f1c-4f9a-9a49-5f7f89d2b2c9\",\n \"asset\": [\n \"HKD\",\n \"USD\",\n \"BTC\",\n \"ETH\",\n \"BUSD\",\n \"USDT\",\n \"USDC\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://access.utgl.io/v1/accounts/add-assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountId\": \"5f2b5c7c-7f1c-4f9a-9a49-5f7f89d2b2c9\",\n \"asset\": [\n \"HKD\",\n \"USD\",\n \"BTC\",\n \"ETH\",\n \"BUSD\",\n \"USDT\",\n \"USDC\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"xid": "<string>",
"xmetadata": {},
"name": "<string>",
"accountNumber": "<string>",
"description": "<string>"
}{
"code": "ACCOUNT_NOT_FOUND",
"message": "Account not found"
}Accounts
Add Assets to Account
This endpoint is used to add one or more assets to an existing account. Assets that already exist in the given account will be ignored.
POST
/
accounts
/
add-assets
Add Assets to Account
curl --request POST \
--url https://access.utgl.io/v1/accounts/add-assets \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "5f2b5c7c-7f1c-4f9a-9a49-5f7f89d2b2c9",
"asset": [
"HKD",
"USD",
"BTC",
"ETH",
"BUSD",
"USDT",
"USDC"
]
}
'import requests
url = "https://access.utgl.io/v1/accounts/add-assets"
payload = {
"accountId": "5f2b5c7c-7f1c-4f9a-9a49-5f7f89d2b2c9",
"asset": ["HKD", "USD", "BTC", "ETH", "BUSD", "USDT", "USDC"]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accountId: '5f2b5c7c-7f1c-4f9a-9a49-5f7f89d2b2c9',
asset: ['HKD', 'USD', 'BTC', 'ETH', 'BUSD', 'USDT', 'USDC']
})
};
fetch('https://access.utgl.io/v1/accounts/add-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://access.utgl.io/v1/accounts/add-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([
'accountId' => '5f2b5c7c-7f1c-4f9a-9a49-5f7f89d2b2c9',
'asset' => [
'HKD',
'USD',
'BTC',
'ETH',
'BUSD',
'USDT',
'USDC'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://access.utgl.io/v1/accounts/add-assets"
payload := strings.NewReader("{\n \"accountId\": \"5f2b5c7c-7f1c-4f9a-9a49-5f7f89d2b2c9\",\n \"asset\": [\n \"HKD\",\n \"USD\",\n \"BTC\",\n \"ETH\",\n \"BUSD\",\n \"USDT\",\n \"USDC\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://access.utgl.io/v1/accounts/add-assets")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"5f2b5c7c-7f1c-4f9a-9a49-5f7f89d2b2c9\",\n \"asset\": [\n \"HKD\",\n \"USD\",\n \"BTC\",\n \"ETH\",\n \"BUSD\",\n \"USDT\",\n \"USDC\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://access.utgl.io/v1/accounts/add-assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountId\": \"5f2b5c7c-7f1c-4f9a-9a49-5f7f89d2b2c9\",\n \"asset\": [\n \"HKD\",\n \"USD\",\n \"BTC\",\n \"ETH\",\n \"BUSD\",\n \"USDT\",\n \"USDC\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"xid": "<string>",
"xmetadata": {},
"name": "<string>",
"accountNumber": "<string>",
"description": "<string>"
}{
"code": "ACCOUNT_NOT_FOUND",
"message": "Account not found"
}Authorizations
BasicBearer
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
Was this page helpful?
⌘I

