Introducing the Horizon Market Client

TL;DR
@unspendablelabs/horizon-market-clientis live on npm — the official open-source client for Horizon's atomic swap engine- List, buy, and delist in a few lines of code, across every asset family Horizon supports: Counterparty (XCP & tokens), Ordinals Inscriptions, Kontor (KOR & NFTs), and ZELD
- Three ways to build: a headless TypeScript SDK, drop-in React & React Native components, and a scriptable
horizonCLI - Non-custodial: your private key never leaves the client. MIT-licensed and fully open source
From API to SDK
Last week we opened the Horizon Atomic Swap API and called it the first of three steps. This is step two.
The raw API is powerful, but wiring up PSBTs, signatures, and quote flows by hand is real work. The Horizon Market Client does all of it for you — it turns the entire quote → sign → submit lifecycle into three method calls that run everywhere JavaScript runs: Node, the browser, and React Native. And the server never touches your private key: every action is authorized by a client-side signature, so your users get real ownership and you build on Bitcoin's security model, not an exchange's.
What you can build
A trustless, multi-asset marketplace as a library unlocks a whole class of products:
- In-game marketplaces — a game studio embeds a live market for artifacts, skins, and items directly in the game. Each becomes a real Bitcoin asset the player owns and trades for BTC, with a royalty to the studio on every resale.
- Tradeable loyalty & rewards — a brand issues loyalty points as a token and gives them a real secondary market, with price discovery and value that transfers between customers.
- Trading bots & automation — headless SDK, no React required: market-making, arbitrage, sniping underpriced drops, or portfolio rebalancing in a Node process or cron job.
- White-label marketplaces — a collectible project or community stands up its own branded marketplace in a day.
- ...and whatever else you build.
The point of a library is that we don't have to imagine every use case — you do.
Simple by design
Quote, sign, submit — one call:
import { HorizonMarketClient } from "@unspendablelabs/horizon-market-client";
const client = new HorizonMarketClient({ privateKey: "...", network: "mainnet" });
const { swap } = await client.openSellOrder({
assetName: "RAREPEPE",
assetQuantity: 1n,
priceSats: 250_000,
listingType: "counterparty",
});
The same three methods — openSellOrder, fillSwaps, delistSwap — work identically across all asset types. Building a UI? A browsable, buyable marketplace is a few lines of JSX with SwapList and SellOrderForm, which handle login, signing, and progress out of the box — or use the matching headless hooks to build your own.
Scriptable from the terminal
The client ships a complete command-line wallet and marketplace as its bin — perfect for bots, CI, and back-office scripts:
npm install -g @unspendablelabs/horizon-market-client
horizon init # create an encrypted wallet keystore
horizon list # browse open listings
horizon sell # open a sell order
horizon buy # fill a swap
It's proof that the whole marketplace works without a single line of React. See it in action:
Coming next: open-source mobile apps
Step three is already in motion: native iOS and Android apps, released fully open source. Built on this library, with an embedded wallet for one-tap onboarding. Because a wallet is only as trustworthy as it is auditable, the source will be public from day one — anyone can verify exactly how keys are handled and confirm nothing sensitive ever leaves the device. More soon.
Available now
npm install @unspendablelabs/horizon-market-client
- Package: npmjs.com/package/@unspendablelabs/horizon-market-client
- Source & docs: github.com/UnspendableLabs/Horizon-Market-Client
- API reference: horizon.market/openapi
Trustless liquidity, four asset families, one library. We can't wait to see what you build with it.
Building something with it, or have questions? Come talk to us on Telegram and X — we'd love to see what you're working on.