trading-bot

Installation
SKILL.md

Trading Bot — Signal-Driven Architecture

Build a trading bot that consumes live signals from SignalNGN via sn signals, executes trades via ledger trades add, and enforces risk management locally.

Architecture

sn signals --json  →  Bot Process  →  ledger trades add (trade recording)
     ↑                    ↓                    ↓
  NATS stream     Risk Management Loop    ledger positions (state queries)
                  (periodic price check)

The bot is a single long-running process with two concurrent concerns:

  1. Signal loop — reads JSON lines from sn signals --json stdout, decides whether to act, executes trades
  2. Risk loop — periodically checks open positions against SL/TP/trailing stop/max hold time, closes positions that hit limits

Prerequisites: sn and ledger CLIs installed and configured. See the sn and ledger skills for setup. No other dependencies needed — sn provides signals AND live prices, ledger provides trade recording AND position queries.

Installs
7
Repository
spot-canvas/sn
First Seen
Feb 26, 2026
trading-bot — spot-canvas/sn