Accounts
3 operations under accounts. Examples read $API and $KEY from your shell.
GET /v1/accounts
Responses
200 Default Response
object
dataarray requiredEach item:
idstring requiredassetstring requiredasset_issuerstring requiredcurrencystring requiredbalancesobject requiredavailablestring requiredpending_instring requiredpending_outstring requiredheldstring requiredavailable_to_convertstring required
has_moreboolean required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
"$API/v1/accounts" \
-H "authorization: Bearer $KEY"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");GET /v1/accounts/{id}
Parameters
idstring required in path
Responses
200 Default Response
object
idstring requiredassetstring requiredasset_issuerstring requiredcurrencystring requiredbalancesobject requiredavailablestring requiredpending_instring requiredpending_outstring requiredheldstring requiredavailable_to_convertstring required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
"$API/v1/accounts/$ID" \
-H "authorization: Bearer $KEY"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>" } },
});GET /v1/accounts/{id}/entries
Parameters
limitinteger optional in querystarting_afterstring optional in queryidstring required in path
Responses
200 Default Response
object
dataarray requiredEach item:
idstring requiredjournal_entry_idstring requiredkindstring requiredtransfer_idstring required (nullable)ledger_accountstring required one ofcustomer_tokens,frozen,customer_fiatassetstring requiredamountdecimal string requireddirectionstring required one ofdebit,creditcreated_atstring required
has_moreboolean required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
"$API/v1/accounts/$ID/entries" \
-H "authorization: Bearer $KEY"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>" } },
});