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

Accounts

3 operations under accounts. Examples read $API and $KEY from your shell.

GET /v1/accounts

Responses

200 Default Response

object

  • data array required

    Each item:

    • id string required
    • asset string required
    • asset_issuer string required
    • currency string required
    • balances object required
      • available string required
      • pending_in string required
      • pending_out string required
      • held string required
      • available_to_convert string required
  • has_more boolean required

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

curl

curl -s \
  "$API/v1/accounts" \
  -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/accounts");
Copied

GET /v1/accounts/{id}

Parameters

  • id string required in path

Responses

200 Default Response

object

  • id string required
  • asset string required
  • asset_issuer string required
  • currency string required
  • balances object required
    • available string required
    • pending_in string required
    • pending_out string required
    • held string required
    • available_to_convert string required

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

curl

curl -s \
  "$API/v1/accounts/$ID" \
  -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/accounts/{id}", {
  params: { path: { id: "<id>" } },
});
Copied

GET /v1/accounts/{id}/entries

Parameters

  • limit integer optional in query
  • starting_after string optional in query
  • id string required in path

Responses

200 Default Response

object

  • data array required

    Each item:

    • id string required
    • journal_entry_id string required
    • kind string required
    • transfer_id string required (nullable)
    • ledger_account string required one of customer_tokens, frozen, customer_fiat
    • asset string required
    • amount decimal string required
    • direction string required one of debit, credit
    • created_at string required
  • has_more boolean required

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

curl

curl -s \
  "$API/v1/accounts/$ID/entries" \
  -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/accounts/{id}/entries", {
  params: { path: { id: "<id>" } },
});
Copied

Edit on GitHub