Skip to content
Testnet only: a reference implementation, not a production service.Tokens and bank transfers here are simulated and have no value.

Assets

2 operations under assets. Examples read $API and $KEY from your shell.

GET /v1/assets

Responses

200 Default Response

object

  • data array required

    Each item:

    • code string required
    • asset_issuer string required
    • asset_contract string required
    • currency string required
    • decimals number required one of 7
  • has_more boolean required

Errors are RFC 9457 problem documents (application/problem+json).

curl

curl -s \
  "$API/v1/assets" \
  -H "authorization: Bearer $KEY"
Copied

SDK

import { createScrClient } from "@scr/sdk";

// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.GET("/v1/assets");
Copied

GET /v1/assets/{code}

Parameters

  • code string required in path

Responses

200 Default Response

object

  • code string required
  • asset_issuer string required
  • asset_contract string required
  • currency string required
  • decimals number required one of 7

Errors are RFC 9457 problem documents (application/problem+json).

curl

curl -s \
  "$API/v1/assets/$CODE" \
  -H "authorization: Bearer $KEY"
Copied

SDK

import { createScrClient } from "@scr/sdk";

// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.GET("/v1/assets/{code}", {
  params: { path: { code: "<code>" } },
});
Copied

Edit on GitHub