API Client Overview

Interact with the Stacks blockchain using a Javascript client library.

The @stacks/blockchain-api-client library provides a robust interface for interacting with the Stacks Blockchain API by offering type-safe methods to access REST and WebSocket endpoints.

The client includes automatically generated HTTP API methods, comprehensive TypeScript definitions for Clarity smart contract values, and a WebSocket client for real-time data streaming.

import { AccountsApi } from '@stacks/blockchain-api-client';

const accounts = new AccountsApi(apiConfig);

await accounts.getAccountTransactions({
  principal: 'ST000000000000000000002AMW42H',
});

Last updated on