Skip to content
Daml

Get apitoken standardv0registrars registrymetadatav1instruments 1

GET
/
api
/
token-standard
/
v0
/
registrars
/
{registrarParty}
/
registry
/
metadata
/
v1
/
instruments
/
{instrumentId}
Try it
cURL

cURL

curl --request GET \
  --url https://api.utilities.digitalasset.com/api/token-standard/v0/registrars/{registrarParty}/registry/metadata/v1/instruments/{instrumentId}
import requests

url = "https://api.utilities.digitalasset.com/api/token-standard/v0/registrars/{registrarParty}/registry/metadata/v1/instruments/{instrumentId}"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.utilities.digitalasset.com/api/token-standard/v0/registrars/{registrarParty}/registry/metadata/v1/instruments/{instrumentId}', 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.utilities.digitalasset.com/api/token-standard/v0/registrars/{registrarParty}/registry/metadata/v1/instruments/{instrumentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.utilities.digitalasset.com/api/token-standard/v0/registrars/{registrarParty}/registry/metadata/v1/instruments/{instrumentId}"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.utilities.digitalasset.com/api/token-standard/v0/registrars/{registrarParty}/registry/metadata/v1/instruments/{instrumentId}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.utilities.digitalasset.com/api/token-standard/v0/registrars/{registrarParty}/registry/metadata/v1/instruments/{instrumentId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
200
404
500
{
  "id": "<string>",
  "name": "<string>",
  "symbol": "<string>",
  "decimals": 10,
  "supportedApis": {},
  "totalSupply": "<string>",
  "totalSupplyAsOf": "2023-11-07T05:31:56Z"
}
{
"error": "<string>"
}
{
"error": "<string>"
}

Path Parameters

registrarParty
string
required

The registrar party.

instrumentId
string
required

Response

200
application/json

ok

id
string
required

The unique identifier assigned by the admin to the instrument.

name
string
required

The display name for the instrument recommended by the instrument admin. This is not necessarily unique.

symbol
string
required

The symbol for the instrument recommended by the instrument admin. This is not necessarily unique.

decimals
integer<int8>
default:10
required

The number of decimal places used by the instrument.

Must be a number between 0 and 10, as the Daml interfaces represent holding amounts as Decimal values, which use 10 decimal places and are precise for 38 digits. Setting this to 0 means that the instrument can only be held in whole units.

This number SHOULD be used for display purposes in a wallet to decide how many decimal places to show and accept when displaying or entering amounts.

supportedApis
object
required

Map from token standard API name to the minor version of the API supported, e.g., splice-api-token-metadata-v1 -> 1 where the 1 corresponds to the minor version.

Show child attributes

totalSupply
string

Decimal encoded current total supply of the instrument.

totalSupplyAsOf
string<date-time>

The timestamp when the total supply was last computed.