시스템자가 보고크립토TypeScriptbitcoincryptocurrencynodejstrading-bottypescript

magic8bot

Magic8bot is a cryptocurrency trading bot using Node.js and MongoDB.

시스템 구조

활용 데이터
BinanceCoinbaseccxt 지원 거래소OHLCV/호가/체결 데이터
규칙 / 전략

저장소별 전략/실행 조건 확인 필요

실행

거래소 API 기반 자동 주문 실행

에디터 요약

저장소 설명과 공개 메타데이터 기준으로 암호화폐 거래 봇, 거래소 API/프레임워크, 백테스트, 기술적 분석 성격의 프로젝트로 파악했습니다. 확인 근거는 README, 저장소 토픽, 저장소 설명, GitHub 지표, 파이프라인 필드이며, 주요 데이터는 Binance, Coinbase, ccxt 지원 거래소, OHLCV/호가/체결 데이터입니다. 전략/실행 조건은 저장소별 문서와 코드 확인이 필요하며, 실행 방식은 "거래소 API 기반 자동 주문 실행"라고 보수적으로 기록했습니다. GitHub 지표는 별 405개, 포크 78개입니다.

저장소magic8bot/magic8bot
제작자magic8bot
스타 / 포크★ 405 / 78
라이선스MIT
최근 업데이트2023-03-04
스냅샷 시점2026-07-08 (아래 README는 이 시점의 사본입니다)

아래는 제3자가 작성·공개한 오픈소스 코드입니다. QuantField는 해당 코드의 동작과 안전성을 보증하지 않으며, 설치·실행 전 코드를 직접 검토하시기 바랍니다.

README

Build Status codecov

logo

How To Use

The master branch is unstable. Do not depend on it working correctly or even running at all.

checkout stable

Requirements

The only 2 supported exchanges are coinbasepro and binance although the bot is capable of supporting any exchange that ccxt supports with the addition of small adapter file, found in./src/exchange/adapters.

There are a minimal amount of strategies and technical indicators implemented as well.

*The UI is not required to run. It just makes things easier.

If you have questions, just ask on discord. The invite link is below.

Magic8Bot Installation

There are 2 repos (magic8bot and ui) that need to be installed. To do that, you will need to clone them. Let's go!

Clone the magic8bot repo:

git clone https://github.com/magic8bot/magic8bot.git

Clone the UI repo:

git clone https://github.com/magic8bot/ui.git

Go to /magic8bot folder and run:

npm install

Go to /ui folder and run:

npm install

You also need a .env inside the /magic8bot folder. You can just copy .env-sample and rename it .env

Once you're done you need to run this command in both the magic8bot and ui folders:

npm run start:dev

you'll need to open 2 terminals

Development

M8bot is entering stage 2 of development. I'm separating out all the moving parts into stateless microservices. The idea is to be able to auto-scale individual parts of the bot as load increases on each part.

The parts:

  • ui
    • Is the UI/control panel for the bot
  • web-server
    • This is the layer that sits between the UI and the bot
  • smq
    • Not a micro-service but a critical shared library
    • Used for communication between micro-services
  • db
    • Not a micro-service but a critical shared library
    • Used for establishing a connectio to the database
    • Provides shared data models for the micro-services
  • pub/sub
    • Not yet implemented
    • Publishes events for mass consumption
    • Might be integrated into smq
  • trade
    • Currently part of core but will be a micro-service
    • Handles syncing data from the exchange to the database
  • period
    • Currently part of core but will be a micro-service
    • Generates candle (OHLCv) data
    • Emits candle data events via pub/sub
  • strategy
    • Currently part of core but will be a micro-service
    • Listens to candle events
    • Calculates signals
    • Sends signals via simple message queue
  • order
    • Currently part of core but will be a micro-service
    • Handles opening and closing positions
    • Consumes signal via simple message queue

Disclaimer

  • This bot is NOT a sure-fire profit machine. Use it AT YOUR OWN RISK.
  • Crypto-currency is still an experiment, and therefore so is this bot. Meaning, both may fail at any time.
  • Running a bot, and trading in general requires careful study of the risks and paramet