Skip to content

SDKs & examples

Official TypeScript, Python, and Rust SDKs, plus community integrations and runnable examples.

Updated Nov 4, 2026Builders1 min read
On this page

The SDKs wrap signing, nonces, retries, and typed responses. Use them instead of hand-rolling the wire format.

Official SDKs

LanguagePackageInstall
TypeScript@nexwest/sdknpm install @nexwest/sdk
Pythonnexwest-sdkpip install nexwest-sdk
Rustnexwest-rscargo add nexwest-rs

Testnet first

Every SDK accepts network: "testnet". Point new integrations at testnet until the signing and reconciliation flows are stable.

TypeScript

code
import { Nexwest } from "@nexwest/sdk";
 
const nx = new Nexwest({
  network: "mainnet",
  wallet: apiWallet,
});
 
const book = await nx.info.l2Book({ coin: "BTC-PERP" });
const order = await nx.exchange.placeOrder({
  asset: 0,
  isBuy: true,
  limitPx: "104000",
  sz: "0.01",
  reduceOnly: false,
  tif: "Gtc",
});
 
console.log(book.levels[0][0], order.statuses[0]);

Python

code
from nexwest import Nexwest
 
nx = Nexwest(network="mainnet", private_key=api_key)
book = nx.info.l2_book(coin="BTC-PERP")
order = nx.exchange.place_order(
    asset=0,
    is_buy=True,
    limit_px="104000",
    sz="0.01",
    reduce_only=False,
    tif="Gtc",
)
print(book["levels"][0][0], order["statuses"][0])

Rust

code
use nexwest::{Client, Network};
 
#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let client = Client::new(Network::Mainnet, signer)?;
    let book = client.info().l2_book("BTC-PERP").await?;
    println!("{:?}", book.levels[0][0]);
    Ok(())
}

Community integrations

  • CCXT — a unified exchange interface with Nexwest support.
  • Hummingbot — connector for market making.
  • Vector — example order-book indexer.

Community integrations are maintained by their authors. Nexwest does not guarantee compatibility with unreleased API changes.

Examples repository

The examples repository includes:

  • a signed order round trip,
  • a WebSocket book subscriber,
  • a dead-man's switch,
  • a simple market-making loop,
  • a fill reconciler.

Was this page helpful?