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

vara-trading-skill

v0.1.4

Published

Local CLI and agent skill pack for CEX spot trading with VARA-first examples

Downloads

670

Readme

Spot Trading Skill

Local TypeScript CLI and skill package for CEX spot trading routes and exchange execution. VARA remains a default example, but trading commands can use any active spot pair supported by the selected exchange.

Install

Install from npm without cloning the repository:

npm install -g vara-trading-skill

Install the agent skill pack from GitHub:

npx skills add https://github.com/gear-foundation/vara-trading-skill/tree/master/skill-pack -g --all -y

The GitHub skill pack lives in skill-pack/. The repository root is the npm/TypeScript CLI project.

Then restart your agent session if it does not pick up newly installed skills immediately.

Start With An Agent

After installation, ask your agent:

Use vara-trading-skill and set up local trading.

The agent should run the local setup commands:

vara-agent init-config
vara-agent onboarding interactive

The agent should keep the interactive wizard running and answer its prompts from the user's choices. It should not turn onboarding into separate one-command-per-step messages unless interactive terminal control is unavailable.

init-config creates ~/.vara-trading-agent/.env if it does not exist. The agent may create the file, start onboarding, and validate setup, but it must never ask the user to paste API keys into chat. When credentials are needed, the user edits ~/.vara-trading-agent/.env locally.

npm install -g installs the executable CLI. npx skills add ... installs SKILL.md and the recipe files into supported agent runtimes so the agent can discover vara-trading-skill.

If the user installed only the npm package and their agent supports Codex-style local skill directories, they can also run:

vara-agent install-skills

Restart the agent session after installing skills if the runtime does not pick up new skills immediately.

Configure

The setup starts with the step-by-step onboarding wizard. The agent must explain setup choices before live trading:

vara-agent onboarding interactive

For non-interactive current-step output only when needed:

vara-agent onboarding

Continue through the wizard:

vara-agent onboarding understand
vara-agent onboarding choose-integration --integration mexc
vara-agent onboarding choose-integration --integration gateio
vara-agent onboarding choose-integration --integration coinbase
vara-agent onboarding choose-integration --integration mexc,coinbase
vara-agent onboarding choose-integration --integration gateio,coinbase
vara-agent onboarding choose-integration --integration all

For machine-readable output:

vara-agent onboarding --json

Active onboarding supports CEX trading on MEXC, Gate.io, Coinbase, custom comma-separated selections, or all active exchanges. CEX live trading requires completing the full wizard, including checklist, local credentials, risk limits, validation, dry-run, and final confirmation. Crypto.com, Exolix, Banxa, and DEX/on-chain flows remain planned future integrations.

For custom exchange selection, use comma-separated exchange IDs such as mexc,coinbase, gateio,coinbase, or mexc,gateio.

Coinbase VARA note: VARA/USDC and VARA/USD are useful Coinbase market examples. VARA/USDT was not observed during testing, so run check-market before adding a Coinbase pair to live risk limits.

CEX local credential setup:

vara-agent init-config

init-config creates ~/.vara-trading-agent/.env if it does not exist. If the file already exists, it leaves it unchanged.

Edit:

~/.vara-trading-agent/.env

Trading API keys must have read + trade permissions only.

After CEX setup is complete:

vara-agent onboarding connect --credentials-local
vara-agent onboarding configure-risk --max-trade-size-usd 50 --allowed-assets VARA,USDT,USDC,USD --allowed-pairs VARA/USDT,USDC/USDT,VARA/USDC,VARA/USD --max-slippage-percent 1
vara-agent onboarding validate
vara-agent onboarding dry-run
vara-agent onboarding final-confirm --confirm

--allowed-assets is a comma-separated list of asset tickers, for example VARA,USDT,USDC,USD. --allowed-pairs is a comma-separated list of market symbols, for example VARA/USDT,USDC/USDT,VARA/USDC,VARA/USD. onboarding validate loads markets and fetches balances to test the configured API credentials.

Run

vara-agent init-config
vara-agent onboarding
vara-agent routes --side buy --asset VARA --quote USDT --amount 20
vara-agent check-market --provider mexc --symbol VARA/USDT
vara-agent check-market --provider coinbase --symbol VARA/USD
vara-agent ticker --provider mexc --symbol VARA/USDT
vara-agent ticker --provider coinbase --symbol VARA/USD
vara-agent orderbook --provider mexc --symbol VARA/USDT --limit 10
vara-agent balance --provider mexc
vara-agent open-orders --provider mexc
vara-agent orders --provider mexc
vara-agent watch --orders --provider mexc --symbols VARA/USDT --interval 5m --limit 50
vara-agent watch --orders --provider mexc --symbols VARA/USDT --order-id "<order-id>" --interval 30s --limit 50
vara-agent withdrawal-guide --provider mexc --asset USDT --network TRC20 --amount 10 --address-confirmed
vara-agent buy --provider mexc --symbol VARA/USDT --quote-amount 10 --mode dry-run
vara-agent limit-buy --provider mexc --symbol VARA/USDT --quote-amount 2 --price 0.000605 --mode dry-run
vara-agent limit-sell --provider mexc --symbol VARA/USDT --base-amount 1000 --price 0.000604 --mode dry-run
vara-agent sell --provider mexc --symbol USDC/USDT --base-amount 10 --mode dry-run

balance returns a compact summary of non-zero balances only.

Withdrawal Flow

Withdrawals are supported as an explicit high-risk capability. They are disabled by default and require dedicated withdrawal API keys plus local allowlists.

Withdrawal commands currently support MEXC and Gate.io. Coinbase is active for CEX trading and read-only order workflows, not withdrawal automation.

Use withdrawal-guide to see the setup and risk checklist:

vara-agent withdrawal-guide --provider mexc --asset USDT --network TRC20 --amount 10 --address-confirmed

Use withdrawal-check before submitting anything:

vara-agent withdrawal-check --provider mexc --asset USDT --network TRC20 --amount 10 --address "<address>"

Dry-run a withdrawal:

vara-agent withdraw --provider mexc --asset USDT --network TRC20 --amount 10 --address "<address>" --mode dry-run

Live API withdrawal requires all of the following:

  • VARA_AGENT_ENABLE_WITHDRAWALS=true
  • dedicated withdrawal API key and secret, for example MEXC_WITHDRAW_API_KEY and MEXC_WITHDRAW_API_SECRET
  • VARA_AGENT_ALLOWED_WITHDRAW_ASSETS
  • VARA_AGENT_ALLOWED_WITHDRAW_NETWORKS
  • VARA_AGENT_ALLOWED_WITHDRAW_ADDRESSES
  • positive per-asset limit, for example VARA_AGENT_MAX_WITHDRAW_USDT=25
  • explicit command flags --mode live --address-confirmed --confirm-withdrawal

Example live command:

vara-agent withdraw --provider mexc --asset USDT --network TRC20 --amount 10 --address "<address>" --mode live --address-confirmed --confirm-withdrawal

Withdrawals are irreversible once accepted by the exchange. Use address allowlists and a small test withdrawal first.

Order Management

Use open-orders to see currently active exchange orders. Use orders to fetch recent order history and grouped counts for open, closed, canceled, and other statuses. Use watch --orders to poll orders and print fill/status-change events as JSON lines.

If --symbols is omitted, the CLI uses the allowed pairs configured in onboarding risk limits.

vara-agent open-orders --provider mexc --symbols VARA/USDT,USDC/USDT --limit 50
vara-agent orders --provider mexc --symbols VARA/USDT,USDC/USDT --limit 50
vara-agent watch --orders --provider mexc --symbols VARA/USDT,USDC/USDT --interval 5m --limit 50
vara-agent watch --orders --provider mexc --symbols VARA/USDT --order-id "<order-id>" --interval 30s --limit 50
vara-agent watch --orders --provider mexc --symbols VARA/USDT --interval 30s --limit 50 --once

The watcher is read-only polling. It does not run a backend, daemon, or automatic trading strategy. When --order-id is provided, the watcher stops automatically after that tracked order becomes closed, filled, canceled, cancelled, expired, or rejected. Use --keep-running only when you explicitly want polling to continue after the tracked order is finished.

Canceling an order is a real exchange action and requires the exact order id plus --confirm:

vara-agent cancel-order --provider mexc --symbol VARA/USDT --order-id "<order-id>" --confirm

Live Mode

Live mode sends real orders to the exchange.

Use only after onboarding and dry-run testing:

vara-agent onboarding final-confirm --confirm
vara-agent buy --provider mexc --symbol VARA/USDT --quote-amount 10 --mode live

Live orders are allowed only for pairs and assets configured in onboarding risk limits.

CEX API Key Safety

Create the key in the exchange API key section.

Gate.io setup:

  • Open Security and set a Fund Password first
  • It protects fund security; trading does not require fund password input by default
  • Open API Key Management to create the Gate.io API key
  • Create a dedicated API key for this agent
  • Enable Read / View account data
  • Enable Spot Trading
  • IP whitelist is optional
  • Copy the API Key and Secret Key shown by Gate.io
  • Open ~/.vara-trading-agent/.env and fill these exact lines:
GATEIO_API_KEY=<paste Gate.io API Key here>
GATEIO_API_SECRET=<paste Gate.io Secret Key here>
  • Secret Key may be shown only once; never paste it into chat
  • Withdrawal permission is not part of normal trading setup. API withdrawals are high risk; enable them only with a separate dedicated withdrawal key if you explicitly want withdrawal automation.

MEXC setup:

  • Click the account icon
  • Select API Management
  • Create a dedicated API key for this agent
  • Enable Account Details
  • Enable Trade
  • Enable View Order Details
  • Link IP Address is optional
  • Copy the API Key / Access Key and Secret Key shown by MEXC
  • Open ~/.vara-trading-agent/.env and fill these exact lines:
MEXC_API_KEY=<paste MEXC API Key / Access Key here>
MEXC_API_SECRET=<paste MEXC Secret Key here>
  • Secret Key may be shown only once; never paste it into chat

Coinbase setup:

  • Open Coinbase Developer Platform / Advanced Trade API key management
  • Create a dedicated API key for this agent
  • Scope the key to the portfolio this agent should trade from
  • Enable View
  • Enable Trade
  • Do not enable Transfer permissions for normal trading setup
  • IP whitelist is optional
  • Copy the API Key name and API Secret shown by Coinbase
  • Open ~/.vara-trading-agent/.env and fill these exact lines:
COINBASE_API_KEY=<paste Coinbase API Key name here>
COINBASE_API_SECRET=<paste Coinbase API Secret here>
  • Secret may be shown only once; never paste it into chat
  • Coinbase withdrawal/transfer automation is not part of normal trading setup

Required permissions:

  • Read / View account data
  • Trade / Spot trading

Withdrawal API key permissions:

  • Enable withdrawal permission only on a dedicated withdrawal key if the user explicitly wants API withdrawals.
  • Use exchange address allowlists and IP restrictions whenever available.
  • Keep withdrawal keys separate from trading keys.

Create a separate API key only for this agent. Never paste API keys or secrets into chat. If the exchange supports IP whitelist and the agent platform provides a fixed IP, enable it. If there is no fixed IP, leave the whitelist disabled only if you understand the risk.

Use trading limits, a separate subaccount, and only funds you are willing to trade.

Release Scope

The active release supports MEXC, Gate.io, and Coinbase CEX trading, local onboarding, read-only market/account checks, order placement, order management, tracked-order watching, withdrawal checks, and explicitly confirmed API withdrawals for supported withdrawal providers. Crypto.com, Exolix real swap execution, Banxa checkout creation, Vara wallet validation, DEX trading, 24/7 autonomous monitoring, conditional orders, arbitrage, and automatic route optimization remain future plans.