Create Account
curl --request POST \
--url https://access.utgl.io/v1/accounts \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"assets": [
"HKD",
"USD",
"BTC",
"ETH",
"BUSD",
"USDT",
"USDC"
],
"name": "Acme Inc Treasury",
"xmetadata": "<unknown>",
"xid": "<string>",
"idempotencyKey": "xeev1she5eegh9daiviethahchoo1muW"
}
'import requests
url = "https://access.utgl.io/v1/accounts"
payload = {
"assets": ["HKD", "USD", "BTC", "ETH", "BUSD", "USDT", "USDC"],
"name": "Acme Inc Treasury",
"xmetadata": "<unknown>",
"xid": "<string>",
"idempotencyKey": "xeev1she5eegh9daiviethahchoo1muW"
}
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({
assets: ['HKD', 'USD', 'BTC', 'ETH', 'BUSD', 'USDT', 'USDC'],
name: 'Acme Inc Treasury',
xmetadata: '<unknown>',
xid: '<string>',
idempotencyKey: 'xeev1she5eegh9daiviethahchoo1muW'
})
};
fetch('https://access.utgl.io/v1/accounts', 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",
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([
'assets' => [
'HKD',
'USD',
'BTC',
'ETH',
'BUSD',
'USDT',
'USDC'
],
'name' => 'Acme Inc Treasury',
'xmetadata' => '<unknown>',
'xid' => '<string>',
'idempotencyKey' => 'xeev1she5eegh9daiviethahchoo1muW'
]),
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"
payload := strings.NewReader("{\n \"assets\": [\n \"HKD\",\n \"USD\",\n \"BTC\",\n \"ETH\",\n \"BUSD\",\n \"USDT\",\n \"USDC\"\n ],\n \"name\": \"Acme Inc Treasury\",\n \"xmetadata\": \"<unknown>\",\n \"xid\": \"<string>\",\n \"idempotencyKey\": \"xeev1she5eegh9daiviethahchoo1muW\"\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")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"assets\": [\n \"HKD\",\n \"USD\",\n \"BTC\",\n \"ETH\",\n \"BUSD\",\n \"USDT\",\n \"USDC\"\n ],\n \"name\": \"Acme Inc Treasury\",\n \"xmetadata\": \"<unknown>\",\n \"xid\": \"<string>\",\n \"idempotencyKey\": \"xeev1she5eegh9daiviethahchoo1muW\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://access.utgl.io/v1/accounts")
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 \"assets\": [\n \"HKD\",\n \"USD\",\n \"BTC\",\n \"ETH\",\n \"BUSD\",\n \"USDT\",\n \"USDC\"\n ],\n \"name\": \"Acme Inc Treasury\",\n \"xmetadata\": \"<unknown>\",\n \"xid\": \"<string>\",\n \"idempotencyKey\": \"xeev1she5eegh9daiviethahchoo1muW\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"xid": "<string>",
"xmetadata": {},
"name": "<string>",
"accountNumber": "<string>",
"description": "<string>"
}{
"code": "ACCOUNT_EXISTS",
"message": "Account with the supplied xid or id already exists"
}Accounts
Create Account
Create Account
POST
/
accounts
Create Account
curl --request POST \
--url https://access.utgl.io/v1/accounts \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"assets": [
"HKD",
"USD",
"BTC",
"ETH",
"BUSD",
"USDT",
"USDC"
],
"name": "Acme Inc Treasury",
"xmetadata": "<unknown>",
"xid": "<string>",
"idempotencyKey": "xeev1she5eegh9daiviethahchoo1muW"
}
'import requests
url = "https://access.utgl.io/v1/accounts"
payload = {
"assets": ["HKD", "USD", "BTC", "ETH", "BUSD", "USDT", "USDC"],
"name": "Acme Inc Treasury",
"xmetadata": "<unknown>",
"xid": "<string>",
"idempotencyKey": "xeev1she5eegh9daiviethahchoo1muW"
}
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({
assets: ['HKD', 'USD', 'BTC', 'ETH', 'BUSD', 'USDT', 'USDC'],
name: 'Acme Inc Treasury',
xmetadata: '<unknown>',
xid: '<string>',
idempotencyKey: 'xeev1she5eegh9daiviethahchoo1muW'
})
};
fetch('https://access.utgl.io/v1/accounts', 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",
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([
'assets' => [
'HKD',
'USD',
'BTC',
'ETH',
'BUSD',
'USDT',
'USDC'
],
'name' => 'Acme Inc Treasury',
'xmetadata' => '<unknown>',
'xid' => '<string>',
'idempotencyKey' => 'xeev1she5eegh9daiviethahchoo1muW'
]),
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"
payload := strings.NewReader("{\n \"assets\": [\n \"HKD\",\n \"USD\",\n \"BTC\",\n \"ETH\",\n \"BUSD\",\n \"USDT\",\n \"USDC\"\n ],\n \"name\": \"Acme Inc Treasury\",\n \"xmetadata\": \"<unknown>\",\n \"xid\": \"<string>\",\n \"idempotencyKey\": \"xeev1she5eegh9daiviethahchoo1muW\"\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")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"assets\": [\n \"HKD\",\n \"USD\",\n \"BTC\",\n \"ETH\",\n \"BUSD\",\n \"USDT\",\n \"USDC\"\n ],\n \"name\": \"Acme Inc Treasury\",\n \"xmetadata\": \"<unknown>\",\n \"xid\": \"<string>\",\n \"idempotencyKey\": \"xeev1she5eegh9daiviethahchoo1muW\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://access.utgl.io/v1/accounts")
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 \"assets\": [\n \"HKD\",\n \"USD\",\n \"BTC\",\n \"ETH\",\n \"BUSD\",\n \"USDT\",\n \"USDC\"\n ],\n \"name\": \"Acme Inc Treasury\",\n \"xmetadata\": \"<unknown>\",\n \"xid\": \"<string>\",\n \"idempotencyKey\": \"xeev1she5eegh9daiviethahchoo1muW\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"xid": "<string>",
"xmetadata": {},
"name": "<string>",
"accountNumber": "<string>",
"description": "<string>"
}{
"code": "ACCOUNT_EXISTS",
"message": "Account with the supplied xid or id already exists"
}Authorizations
BasicBearer
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
The list of assets to be associated with the account. Assets are used to determine the account balance.
Example:
[ "HKD", "USD", "BTC", "ETH", "BUSD", "USDT", "USDC" ]
A human-friendly non unique name for a account
Maximum string length:
128Example:
"Acme Inc Treasury"
External identifier, unique across all resources created under this account.
Unique idempotency key for ensuring exactly-once execution of mutating requests.
Example:
"xeev1she5eegh9daiviethahchoo1muW"
Was this page helpful?
⌘I

