Open-source Go follower bot for BitBank forecasts on Alpaca Markets.
The bot polls BitBank public signals, filters them by configured pairs and confidence, and places market orders on Alpaca when live trading is explicitly enabled. It starts in dry-run mode and is intended as a small auditable example, not as financial advice or a profit guarantee.
BITBANK_DRY_RUN=trueby default.- Live trading requires
BITBANK_DRY_RUN=false,BITBANK_ALLOW_LIVE_TRADING=true, andBITBANK_CONFIRM_LIVE_TRADING=I_UNDERSTAND. - Sell orders are disabled unless
BITBANK_ALLOW_SELL=trueand a base quantity is configured. This avoids accidental full-position liquidation. - Duplicate signals are persisted in
BITBANK_STATE_FILEso a restart does not immediately repeat the same order.
go run ./cmd/bitbank-alpaca-bot -onceExample dry run:
export BITBANK_PAIRS=BTC_USDT,ETH_USDT,SOL_USDT
export BITBANK_ORDER_QUOTE_AMOUNT=25
export BITBANK_MIN_CONFIDENCE=0.60
go run ./cmd/bitbank-alpaca-botLive trading, after reviewing the code and exchange permissions:
export ALPACA_API_KEY=...
export ALPACA_API_SECRET=...
export BITBANK_DRY_RUN=false
export BITBANK_ALLOW_LIVE_TRADING=true
export BITBANK_CONFIRM_LIVE_TRADING=I_UNDERSTAND
go run ./cmd/bitbank-alpaca-bot| Variable | Default | Description |
|---|---|---|
BITBANK_API_URL |
https://bitbank.nz |
BitBank API base URL. |
BITBANK_PAIRS |
BTC_USDT,ETH_USDT,SOL_USDT |
Comma-separated BitBank pairs. |
BITBANK_POLL_INTERVAL |
1m |
Poll loop interval. |
BITBANK_MIN_CONFIDENCE |
0.55 |
Minimum signal confidence. |
BITBANK_ORDER_QUOTE_AMOUNT |
25 |
Quote amount for buy orders. |
BITBANK_ORDER_BASE_AMOUNT |
empty | Base quantity for sell orders. |
BITBANK_ALLOW_SELL |
false |
Enable market sells when a sell signal appears. |
BITBANK_STATE_FILE |
state/bitbank-alpaca-bot.json |
Signal de-duplication state. |
ALPACA_BASE_URL |
https://paper-api.alpaca.markets |
Alpaca REST API base URL. Use https://api.alpaca.markets only after live-trading review. |
ALPACA_API_KEY |
empty | Alpaca API key. |
ALPACA_API_SECRET |
empty | Alpaca API secret. |
BitBank pairs use BASE_QUOTE format such as BTC_USDT. Alpaca crypto order
symbols use slash notation, for example BTC/USDT.
This project intentionally keeps the strategy simple: it follows BitBank's latest
public buy and sell signals rather than training local models. Add exchange
filters, minimum notional checks, and portfolio-aware sizing before using it with
meaningful capital.