Skip to main content

SatsTerminal SDK

The SDK is modular. You can install the all-in-one package or pick individual products:
  • satsterminal-sdk (suite): exports the legacy swaps client (SatsTerminal) and factories for swaps/borrow (bridge coming soon).
  • @satsterminal-sdk/swaps: swaps-only package.
  • @satsterminal-sdk/borrow: borrow-only package.

Installation options

# Suite (recommended for multiple products)
npm install satsterminal-sdk

# Swaps only
npm install @satsterminal-sdk/swaps

# Borrow only
npm install @satsterminal-sdk/borrow

Minimal examples

Suite with shared apiKey:
import { createClient } from "satsterminal-sdk";
import { ChainType } from "@satsterminal-sdk/borrow";

const { swaps, borrow } = createClient({
  apiKey: process.env.API_KEY!,
  borrow: { chain: ChainType.BASE, wallet }
});
Swaps-only (legacy surface):
import { SatsTerminal } from "satsterminal-sdk";
const swaps = new SatsTerminal({ apiKey: process.env.API_KEY! });
Borrow-only:
import { BorrowSDK, ChainType } from "@satsterminal-sdk/borrow";
const borrow = new BorrowSDK({ apiKey: process.env.API_KEY!, chain: ChainType.ARBITRUM, wallet });