cURL
curl --request GET \
--url 'https://api.coinstats.app/v1/rwa/assets/gold' \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.coinstats.app/v1/rwa/assets/gold"
headers = {"X-API-KEY": "<api-key>"}
response = requests.request("GET", url, headers=headers)
print(response.json())const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.coinstats.app/v1/rwa/assets/gold', options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coinstats.app/v1/rwa/assets/gold",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.coinstats.app/v1/rwa/assets/gold"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
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.coinstats.app/v1/rwa/assets/gold")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinstats.app/v1/rwa/assets/{rwaId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"currency": "USD",
"updatedAt": "2023-11-07T05:31:56Z",
"isStale": true,
"asset": {
"rwaId": "gold",
"rank": 1,
"name": "Gold",
"symbol": "XAU",
"assetType": "stock",
"imageUrl": "<string>",
"tokenized": {
"price": 123,
"marketCap": 123,
"volume24h": 123,
"high24h": 123,
"low24h": 123,
"priceChange24h": 123,
"marketCapChange24h": 123,
"changePercentage": {
"h1": 123,
"h24": 123,
"d7": 123,
"d14": 123,
"d30": 123,
"d200": 123,
"y1": 123
},
"sparkline7d": [
123
],
"sourceUpdatedAt": "2023-11-07T05:31:56Z",
"marketCapChangePercentage24h": 123
}
},
"metadata": {
"available": true,
"updatedAt": "2023-11-07T05:31:56Z",
"isStale": true,
"tokenCount": 123,
"issuerCount": 123,
"issuers": [
{
"id": "<string>",
"name": "<string>"
}
],
"networks": [
"<string>"
]
},
"markets": {
"available": true,
"updatedAt": "2023-11-07T05:31:56Z",
"isStale": true,
"count": 123
},
"history": {
"completed": true,
"updatedAt": "2023-11-07T05:31:56Z"
},
"source": {
"provider": "coingecko"
}
}{
"statusCode": 400,
"message": "Bad Request",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 401,
"message": "Unauthorized",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 403,
"message": "Forbidden",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 404,
"message": "Not Found",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 409,
"message": "Transactions not synced",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 503,
"message": "Service Unavailable. Please Contact Support"
}Real-world Assets
Get Rwa Asset
Get a real-world asset and its section availability
GET
/
v1
/
rwa
/
assets
/
{rwaId}
cURL
curl --request GET \
--url 'https://api.coinstats.app/v1/rwa/assets/gold' \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.coinstats.app/v1/rwa/assets/gold"
headers = {"X-API-KEY": "<api-key>"}
response = requests.request("GET", url, headers=headers)
print(response.json())const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.coinstats.app/v1/rwa/assets/gold', options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coinstats.app/v1/rwa/assets/gold",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.coinstats.app/v1/rwa/assets/gold"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
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.coinstats.app/v1/rwa/assets/gold")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinstats.app/v1/rwa/assets/{rwaId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"currency": "USD",
"updatedAt": "2023-11-07T05:31:56Z",
"isStale": true,
"asset": {
"rwaId": "gold",
"rank": 1,
"name": "Gold",
"symbol": "XAU",
"assetType": "stock",
"imageUrl": "<string>",
"tokenized": {
"price": 123,
"marketCap": 123,
"volume24h": 123,
"high24h": 123,
"low24h": 123,
"priceChange24h": 123,
"marketCapChange24h": 123,
"changePercentage": {
"h1": 123,
"h24": 123,
"d7": 123,
"d14": 123,
"d30": 123,
"d200": 123,
"y1": 123
},
"sparkline7d": [
123
],
"sourceUpdatedAt": "2023-11-07T05:31:56Z",
"marketCapChangePercentage24h": 123
}
},
"metadata": {
"available": true,
"updatedAt": "2023-11-07T05:31:56Z",
"isStale": true,
"tokenCount": 123,
"issuerCount": 123,
"issuers": [
{
"id": "<string>",
"name": "<string>"
}
],
"networks": [
"<string>"
]
},
"markets": {
"available": true,
"updatedAt": "2023-11-07T05:31:56Z",
"isStale": true,
"count": 123
},
"history": {
"completed": true,
"updatedAt": "2023-11-07T05:31:56Z"
},
"source": {
"provider": "coingecko"
}
}{
"statusCode": 400,
"message": "Bad Request",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 401,
"message": "Unauthorized",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 403,
"message": "Forbidden",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 404,
"message": "Not Found",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 409,
"message": "Transactions not synced",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 503,
"message": "Service Unavailable. Please Contact Support"
}1 credit per request
Required
Required
- rwaId: Asset ID from /rwa/assets, for example gold.
You will get
You will get
- Asset market data, token and issuer counts, network options, and metadata, markets, and history status.
Optional
Optional
- currency: Defaults to USD.
Known assets awaiting enrichment still return their prices with unavailable sections. Unknown assets return HTTP 404.
Authorizations
API key required to access the endpoints. Generate one from your dashboard at https://openapi.coinstats.app and pass it in the X-API-KEY request header. Never expose your key in client-side code.
Path Parameters
RWA asset ID returned by /rwa/assets. This is separate from a cryptocurrency coinId.
Example:
"gold"
Query Parameters
Uppercase currency code from /currencies. Monetary values use this currency; percentages and quantities are unchanged.
Response
Example:
"USD"
Publication/section update time, never request time.
Whether the upstream publication/section has exceeded its freshness threshold.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
{ "provider": "coingecko" }
Was this page helpful?