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

opencode-plugin-mercado

v0.1.0

Published

Plugin opencode para dados de mercado cripto: cotação Binance, orderbook L2, spread/half-spread em bps.

Readme

opencode-plugin-mercado

Plugin do opencode com tools de dados de mercado cripto para uso em análise/robôs de trading. Pacote npm publicável, compilado para dist/ (ESM), roda em Node e em Bun.

Tools

| Tool | Função | |------|--------| | spread_bps | Cálculo puro (offline): bid/ask → mid, spread absoluto, spread e half-spread em bps | | cotacao_binance | Ticker 24h da Binance spot (preço, variação %, máx/mín, volume) via REST público | | orderbook_binance | Book L2 da Binance: best bid/ask, spread em bps, mid e order-book imbalance dos top N níveis |

Hook incluído: chat.params fixa temperature ≤ 0,1 (decisão de trading = precisão).

Configuração (opção do plugin)

O 2º argumento do plugin aceita { base } para trocar o endpoint (ex.: testnet ou espelho). Default: https://api.binance.com.

{
  "plugin": [
    ["D:/Documentos/Tecnologia/IA/Claude/Claude Code/Robos/opencode-plugin-mercado", { "base": "https://api.binance.com" }]
  ]
}

Desenvolvimento

npm install
npm run typecheck   # tsc --noEmit  (passa limpo)
npm run build       # tsc → dist/index.js + index.d.ts

Instalação no opencode

A) Por diretório (dev local): "plugin": ["D:/.../opencode-plugin-mercado"] B) Por npm (após npm publish): "plugin": ["opencode-plugin-mercado"]

Notas

  • Usa fetch global (Node 18+ / Bun). As tools de rede têm timeout de 8 s e retornam string de erro ao modelo em vez de derrubar a execução.
  • Tools de plugin recebem args sem os defaults do Zod — reaplicados no execute.
  • Half-spread é a métrica central de viabilidade do robô maker (fee vs spread).