npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

openbroker-extended

v0.3.1

Published

Extended Exchange (extended.exchange) trading CLI + library - sibling of openbroker (Hyperliquid). Signs orders with Stark-curve signatures via @scure/starknet.

Downloads

162

Readme

openbroker-extended

Trading CLI + library for Extended Exchange (the Starknet-based perpetuals DEX, formerly x10). Sibling of openbroker (Hyperliquid) and openbroker-lighter (zkLighter) — same structure and conventions.

  • Read-only by default — market data / info commands need no credentials.
  • Trading signs orders, cancels and withdrawals with a Stark-curve signature (via @scure/starknet), using the API key + Stark key + vault id from your Extended account.
  • ESM + tsx, no build step for local use. npm run build emits dist/ for library consumers.

Install

cd openbroker-extended
npm install
npm run test:cli      # prints CLI help

Configure

Market-data commands work with no config. To trade, run setup once with your Ethereum key (it derives the Stark key and registers an API key — the ETH key is never stored):

npx tsx scripts/setup/onboard.ts --eth-key 0xYOUR_ETH_KEY

…or paste credentials straight from the Extended app's API-management page into .env (see config/example.env). Lookup priority: process env → local ./.env~/.openbroker-extended/.env.

| Var | Meaning | | --- | --- | | EXTENDED_API_KEY | Public API key, sent as the X-Api-Key header | | EXTENDED_STARK_PRIVATE_KEY | Stark-curve key that signs orders/cancels | | EXTENDED_VAULT_ID | Your account's vault / position id | | EXTENDED_NETWORK | mainnet (default) or testnet | | EXTENDED_BUILDER_ID | Builder clientId to earn builder fees (optional) | | EXTENDED_BUILDER_FEE | Builder fee fraction (default 0.0001 = 1 bps) |

Builder codes

Like the Hyperliquid CLI's auto-injected builder fee, openbroker-extended attaches a builder code to every order when a builder id is configured. Extended adds the builder fee into the order's signed fee and settles it to the builder's account daily.

  • Set EXTENDED_BUILDER_ID to your builder account's clientId (from the Extended API page), or hardcode DEFAULT_BUILDER_ID in scripts/core/types.ts to make it on-by-default for all CLI users (the analog of openbroker's hardcoded Hyperliquid builder address).
  • Default fee is 0.0001 (1 bps); override per-process with EXTENDED_BUILDER_FEE or per-order with --builder-fee.
  • Per-order overrides: --builder-id <id>, --builder-fee <fraction>, --no-builder (disable). The max allowed builder fee per market is visible via client.getFees(market, builderId).

Commands

openbroker-ex markets                                        # list perp markets
openbroker-ex orderbook --symbol ETH-USD                     # order book
openbroker-ex funding  --symbol ETH-USD                      # funding rate + history
openbroker-ex account                                        # balance + positions
openbroker-ex orders                                         # open orders
openbroker-ex buy  --symbol ETH-USD --size 0.01              # market buy
openbroker-ex limit --symbol ETH-USD --side sell --size 0.01 --price 4000 --tif POST_ONLY
openbroker-ex cancel --id <ORDER_ID>
openbroker-ex cancel-all [--symbol ETH-USD]

Every operation supports --dry (preview, no submit) and --verbose (debug logging).

Library usage

import { getClient } from 'openbroker-extended';

const ex = getClient();
const markets = await ex.loadMarkets();
await ex.marketOrder('ETH-USD', true, 0.01);   // needs trading config

Anything re-exported from scripts/lib.ts is the public, semver-stable surface.

License

MIT