ninjabot
A fast trading bot platform for cryptocurrency in Go (Binance)
시스템 구조
저장소별 전략/실행 조건 확인 필요
거래소 API 기반 자동 주문 실행
에디터 요약저장소 설명과 공개 메타데이터 기준으로 암호화폐 거래 봇, 거래소 API/프레임워크, 백테스트, 기술적 분석 성격의 프로젝트로 파악했습니다. 확인 근거는 README, 저장소 토픽, 저장소 설명, GitHub 지표, 파이프라인 필드이며, 주요 데이터는 Binance, OHLCV/호가/체결 데이터입니다. 전략/실행 조건은 저장소별 문서와 코드 확인이 필요하며, 실행 방식은 "거래소 API 기반 자동 주문 실행"라고 보수적으로 기록했습니다. GitHub 지표는 별 1618개, 포크 196개입니다.
| 저장소 | rodrigo-brito/ninjabot |
|---|---|
| 제작자 | rodrigo-brito |
| 스타 / 포크 | ★ 1618 / 196 |
| 라이선스 | MIT |
| 최근 업데이트 | 2026-01-01 |
| 스냅샷 시점 | 2026-07-08 (아래 README는 이 시점의 사본입니다) |
아래는 제3자가 작성·공개한 오픈소스 코드입니다. QuantField는 해당 코드의 동작과 안전성을 보증하지 않으며, 설치·실행 전 코드를 직접 검토하시기 바랍니다.
README

A fast cryptocurrency trading bot framework implemented in Go. Ninjabot permits users to create and test custom strategies for spot and futures market.
Docs: https://rodrigo-brito.github.io/ninjabot/
| DISCLAIMER |
|---|
| This software is for educational purposes only. Do not risk money which you are afraid to lose. USE THE SOFTWARE AT YOUR OWN RISK. THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR TRADING RESULTS |
Installation
go get -u github.com/rodrigo-brito/ninjabot/...
Examples of Usage
Check examples directory:
- Paper Wallet (Live Simulation)
- Backtesting (Simulation with historical data)
- Real Account (Binance)
CLI
To download historical data you can download ninjabot CLI from:
- Pre-build binaries in release page
- Or with
go install github.com/rodrigo-brito/ninjabot/cmd/ninjabot@latest
Example of usage
# Download candles of BTCUSDT to btc.csv file (Last 30 days, timeframe 1D)
ninjabot download --pair BTCUSDT --timeframe 1d --days 30 --output ./btc.csv
Backtesting Example
- Backtesting a custom strategy from examples directory:
go run examples/backtesting/main.go
Output:
INFO[2023-03-25 13:54] [SETUP] Using paper wallet
INFO[2023-03-25 13:54] [SETUP] Initial Portfolio = 10000.000000 USDT
---------+--------+-----+------+--------+--------+-----+----------+-----------+
| PAIR | TRADES | WIN | LOSS | % WIN | PAYOFF | SQN | PROFIT | VOLUME |
+---------+--------+-----+------+--------+--------+-----+----------+-----------+
| ETHUSDT | 9 | 6 | 3 | 66.7 % | 3.407 | 1.3 | 21748.41 | 407769.64 |
| BTCUSDT | 14 | 6 | 8 | 42.9 % | 5.929 | 1.5 | 13511.66 | 448030.05 |
+---------+--------+-----+------+--------+--------+-----+----------+-----------+
| TOTAL | 23 | 12 | 11 | 52.2 % | 4.942 | 1.4 | 35260.07 | 855799.68 |
+---------+--------+-----+------+--------+--------+-----+----------+-----------+
-- FINAL WALLET --
0.0000 BTC = 0.0000 USDT
0.0000 ETH = 0.0000 USDT
45260.0735 USDT
----- RETURNS -----
START PORTFOLIO = 10000.00 USDT
FINAL PORTFOLIO = 45260.07 USDT
GROSS PROFIT = 35260.073493 USDT (352.60%)
MARKET CHANGE (B&H) = 407.09%
------ RISK