About Gokub MCP
Gokub MCP is an MCP server published by dvgamerr-app in the Finance category: 🚀 Model Context Protocol (MCP) server for Bitkub Cryptocurrency Exchange API - Connect Claude Desktop with Bitkub trading platform using Go. Conduid read 42 tools from its source: analyze_chart, analyze_market_trades, backtest_signals, calculate_atr, calculate_capm, calculate_ema and 36 more. No package is published for it, so it installs from a source checkout.
The repository has 4 stars and 2 forks, is licensed MIT, and its last commit was on 30 Nov 2026. The latest release is v1.2.0 (5 Aug 2026): Changelog New Features 34e0a527e5928c812b9041e6af44d4f6bf6783f9: feat: implement GetFloat64ArrayArg utility function and refactor price argument handling in EMA, RSI, an… It follows v1.1.2 (3 Jul 2026), and the 5 most recent releases go back to v1.0.2 (17 Jun 2026). It passes 5 of the 6 static checks Conduid ran on the repository; it does not pass Scoped permissions. Its topics include finance, bitkub-api, bitkub, cryptocurrency, go-bitkub and open-source.
Install
git clone https://github.com/dvgamerr-app/gokub-mcpTools (42)
analyze_chartRead a completed OHLCV chart with EMA20/50/200, RSI14, ATR14, DMI14/14, MACD12/26/9, Bollinger20/2, Supertrend10/3 and anchored HLC3 VWAP. Descriptive readings, not a probability or trading authorization. No API credentials required.| Parameter | Type | Description |
|---|---|---|
| as_of * | number | Fixed Unix cutoff in seconds; every candle must have closed by this time. |
| candles * | array | 220-10000 regular-grid completed OHLCV candles with Unix timestamp, open and volume on every row. |
| resolution * | number | Candle timeframe in minutes: 1, 5, 15, 60, 240, 1440. |
| vwap_anchor | number | Optional Unix candle-open timestamp for anchored VWAP. Default latest candle's UTC midnight; not an exchange-specific session. Incomplete coverage returns an unavailable VWAP. |
analyze_market_tradesAnalyze ALL liquid exchange-only THB pairs using closed, fresh candles. Runs screening, wallet/fees, relative strength, regime/EMA, daily ATR filter, breakout/pullback, open-order checks, fee-aware sizing, net-profit targets and validation. Read-only: never places orders. Returns every pair and explicit rejection reasons; no candle arrays.| Parameter | Type | Description |
|---|---|---|
| entry_resolution | number | Entry timeframe in minutes (default 15) |
| risk_percent | number | Maximum loss including both-leg fees and spread as percentage of available THB (0-2, default 2) |
| target_net_percent | number | Net target on position value after fees and spread allowance (1-2, default 2) |
| trend_resolution | number | Trend timeframe in minutes (default 240 = 4H) |
backtest_signalsEvaluate fixed entry rules chronologically with expanding history, fees and adverse slippage. Includes sample size, approximate win-rate intervals, net R, equal-notional profit factor and hypothetical full-notional closed-trade return/drawdown. Not a multi-symbol portfolio backtest or a probability forecast. No API credentials required.| Parameter | Type | Description |
|---|---|---|
| as_of * | number | Unix cutoff in seconds; every supplied candle must be closed by this time. |
| candles * | array | 221-10000 completed OHLCV candles with increasing regular-grid Unix timestamps; supply open and volume on every row. |
| fee_percent | number | Fee per side in percentage points, default 0.25; applies to both entries and exits. |
| folds | number | Chronological evaluation blocks after 220 warmup candles, 1-10 (default up to 3, limited by available candles). Fixed parameters; no fitting or optimization. |
| resolution * | number | Candle timeframe in minutes. |
| reward_risk | number | Gross target distance divided by stop distance, default 2. |
| slippage_percent | number | Adverse slippage per side in percentage points, default 0.1; spread is included in this assumption. |
| strategy | string | breakout (default), pullback, macd_cross (12/26/9), supertrend_flip (10/3), bollinger_breakout (20/2), ema_crossover (20/50). New chart rules use 1.5x ATR14 initial stops; no automatic live entries. |
calculate_atrCalculate Average True Range (ATR) and ATR% from OHLC data| Parameter | Type | Description |
|---|---|---|
| candles * | array | Array of OHLC objects with high, low, close properties |
| period * | number | ATR period (default: 14) |
calculate_capmCalculate Capital Asset Pricing Model (CAPM) expected return from caller-supplied assumptions. This is not a chart indicator, a fitted forecast, an entry signal or a probability of profit. All return inputs must refer to the same horizon. CAPM Formula: E(Ri) = Rf + β * (E(Rm) - Rf) Where: - E(Ri) = Expected return of the asset - Rf = Risk-free rate - β = Beta (sensitivity to market movements) - E(Rm) = Expected market return - E(Rm) - Rf = Market risk premium| Parameter | Type | Description |
|---|---|---|
| beta * | number | Beta coefficient (asset's sensitivity to market risk, 1.0 = market average) |
| market_return * | number | Expected market return (as decimal: 0.08 for 8%) |
| risk_free_rate * | number | Risk-free rate of return (e.g., government bond yield, as decimal: 0.02 for 2%) |
calculate_emaCalculate Exponential Moving Average (EMA) from price data| Parameter | Type | Description |
|---|---|---|
| period * | number | EMA period (e.g., 9, 12, 20, 26, 50, 200) |
| prices * | array | Array of price values (close prices) for EMA calculation |
calculate_expectancyCompute trading expectancy from closed journal trades: E = win% * avgWinR - (1-win%) * avgLossR.calculate_liquidity_depthCalculate total bid/ask liquidity value (THB) within a percentage range from mid price| Parameter | Type | Description |
|---|---|---|
| range_percent | number | Percentage range from mid price (default: 1.0 = ±1%) |
| symbol * | string | Trading pair symbol (e.g., btc_thb, eth_thb) |
calculate_position_sizeCalculate position size based on risk management. Formula: stop_frac = (entry - stop)/entry, position = risk_thb/stop_frac| Parameter | Type | Description |
|---|---|---|
| balance * | number | Total available balance in THB |
| entry * | number | Entry price |
| maker_fee | number | Maker fee percentage (optional, default 0.25%) |
| risk_percent * | number | Risk percentage per trade (e.g. 2 for 2%) |
| stop * | number | Stop loss price |
| taker_fee | number | Taker fee percentage (optional, default 0.25%) |
calculate_relative_strength_rankCalculate and rank symbols by their Relative Strength (ROC) compared to benchmark| Parameter | Type | Description |
|---|---|---|
| benchmark | string | Benchmark symbol for comparison |
| period | number | ROC period for calculation (default: 14) |
| symbols * | object | Object with symbol names as keys and price arrays as values |
calculate_rocCalculate Rate of Change (ROC) percentage from price data| Parameter | Type | Description |
|---|---|---|
| period * | number | ROC period (default: 14 for 14-day rate of change) |
| prices * | array | Array of price values (close prices) for ROC calculation |
calculate_rsiCalculate Relative Strength Index (RSI) from price data| Parameter | Type | Description |
|---|---|---|
| period * | number | RSI period (default: 14) |
| prices * | array | Array of price values (close prices) for RSI calculation |
calculate_spreadCalculate bid-ask spread percentage and mid price for a symbol| Parameter | Type | Description |
|---|---|---|
| symbol * | string | Trading pair symbol (e.g., btc_thb, eth_thb) |
calculate_trailing_stopCalculate an ATR-based trailing stop for a long position from OHLC candles. trailing_stop = current - atr_multiplier * ATR.| Parameter | Type | Description |
|---|---|---|
| atr_multiplier | number | ATR multiplier for stop distance (default 2) |
| candles * | array | Array of OHLC objects (high, low, close, optional volume) |
| current_price | number | Current price; defaults to the last candle close |
| entry | number | Entry price (optional, for break-even recommendation) |
| period | number | ATR period (default 14) |
cancel_orderCancel an open order on Bitkub.| Parameter | Type | Description |
|---|---|---|
| order_id * | string | Order id to cancel |
| side * | string | Order side: buy or sell |
| symbol * | string | Trading pair symbol (e.g., btc_thb) |
check_exit_signalsCheck emergency exit signals from OHLCV candles: STRUCTURE_BREAK (close below recent swing low), VOLUME_DRY (<0.5x avg volume), REJECTION_AT_RESISTANCE (upper-wick rejection near recent high).| Parameter | Type | Description |
|---|---|---|
| candles * | array | Array of OHLCV objects (high, low, close, open, volume) |
| lookback | number | Number of prior candles for swing/volume reference (default 20) |
check_market_regimeAnalyze market regime from close prices or candles. Returns UPTREND, DOWNTREND, or SIDEWAYS with reasons and score.| Parameter | Type | Description |
|---|---|---|
| candles | array | Preferred: completed OHLCV candles for Wilder ADX. Do not supply both prices and candles. |
| lookback | number | Lookback period for analysis. Default: 20 |
| prices | array | Array of close prices for market regime analysis. Close-only fallback; ADX is unavailable without OHLC candles. |
check_trade_pnlCheck current PnL of an open long position, net of both-leg fees. Returns pnl_thb, pnl_pct and R-multiple (if stop provided).| Parameter | Type | Description |
|---|---|---|
| current_price | number | Current price; fetched from ticker if omitted |
| entry * | number | Entry price |
| maker_fee | number | Maker fee %% (default 0.25) |
| qty * | number | Position quantity (coins) |
| stop | number | Stop price (for R-multiple; optional) |
| symbol * | string | Trading pair symbol (e.g., btc_thb) |
| taker_fee | number | Taker fee %% (default 0.25) |
client_side_stop_workerSingle-shot client-side stop check (Bitkub has no native stop). Checks current price against the trigger; if reached, places the protective limit order. Poll repeatedly (e.g. via a loop) until triggered=true.| Parameter | Type | Description |
|---|---|---|
| current_price | number | Optional current price; fetched from ticker if omitted |
| limit_price * | number | Limit price for the order placed when triggered |
| qty * | number | Order amount (sell: coin qty; buy: THB to spend) |
| side | string | Order side when triggered: sell (protect long, default) or buy (breakout entry) |
| symbol * | string | Trading pair symbol (e.g., btc_thb) |
| trigger * | number | Trigger price. sell fires when price <= trigger; buy fires when price >= trigger |
detect_breakout_signalDetect breakout signal when price makes new high with volume confirmation| Parameter | Type | Description |
|---|---|---|
| atr_multiplier | number | ATR multiplier for stop loss (default: 1.5) |
| candles * | array | Array of OHLCV candles (need at least lookback+1 candles) |
| lookback | number | Number of periods to check for new high (default: 20) |
| volume_threshold | number | Volume multiplier threshold (default: 1.5 = 150% of average) |
detect_pullback_signalDetect pullback signal when price touches EMA20 with RSI bounce and reversal candle| Parameter | Type | Description |
|---|---|---|
| candles * | array | Array of OHLCV candles (need at least 20+ for EMA and RSI calculation) |
| ema_period | number | EMA period for pullback detection (default: 20) |
| rsi_max | number | Maximum RSI for bounce zone (default: 50) |
| rsi_min | number | Minimum RSI for bounce zone (default: 40) |
| rsi_period | number | RSI period (default: 14) |
extract_close_pricesExtract close prices array from candles data (for use with EMA, RSI, ROC tools)| Parameter | Type | Description |
|---|---|---|
| candles * | array | Array of OHLCV candle objects |
get_fee_scheduleGet trading fee schedule (maker/taker rates) based on user's trading level and creditsget_historical_candlesGet historical candlestick/OHLCV data for symbols with specified timeframe and limit. Supports single or multiple symbols.| Parameter | Type | Description |
|---|---|---|
| as_of | number | Optional Unix timestamp in seconds; fixed cutoff for aligned historical analysis, never in the future. |
| closed_only | boolean | Return completed candles on a regular grid, filling no-trade gaps with previous close and zero volume, marked synthetic. Includes source timestamps; unavailable history still errors. Default true. Use false explicitly for forming candles. |
| format | string | Output format: 'ohlcv' (default), 'close' (close prices only), 'csv' (CSV format) |
| limit | number | Number of candles to retrieve (1-1000). Default: 220. Bumped up to 220 automatically so ATR/RSI/EMA200/breakout/pullback have enough candles. |
| resolution | number | Timeframe resolution in minutes (1, 5, 15, 60, 240, 1440). Default: 60 |
| symbols * | array | Array of trading pair symbols (e.g., ['btc_thb', 'eth_thb']) or single symbol ['btc_thb'] |
get_market_depthGet market depth (order book) showing bids and asks for a symbol| Parameter | Type | Description |
|---|---|---|
| limit | number | Number of orders to return (default: 10, max: 100) |
| symbol * | string | Trading pair symbol (e.g., btc_thb, eth_thb) |
get_market_overviewOne-shot market overview: BTC trend, top gainers, top volume pairs, and breadth-based sentiment across the THB board.| Parameter | Type | Description |
|---|---|---|
| top_n | number | How many movers to list per category (default 5) |
get_market_screenerScreen and rank trading pairs by volume, spread, and liquidity depth. Returns top pairs suitable for trading| Parameter | Type | Description |
|---|---|---|
| exchange_only | boolean | Exclude broker coins and frozen/non-THB pairs using exchange metadata (default false) |
| limit | number | Number of top results to return (default: 10, max: 20). Use 0 to return ALL passing pairs. |
| max_spread | number | Maximum allowed spread percentage (default: 2.0%) |
| min_depth | number | Minimum liquidity depth in THB within ±1% (default: 50000 THB) |
| min_volume_24h | number | Minimum 24h volume in THB (default: 1000000 = 1M THB) |
get_my_open_ordersGet open orders for one Bitkub Exchange pair. For entry scans, screen with get_market_screener(exchange_only=true) first. Broker pairs (source=broker) are unsupported. If you receive Bitkub error 61, skip the pair and do not retry; its order status is unknown.| Parameter | Type | Description |
|---|---|---|
| symbol * | string | Lowercase Exchange pair in coin_thb format (e.g., btc_thb, eth_thb) |
get_order_statusGet the life-cycle status of an order (unfilled | partial_fill | filled | cancelled).| Parameter | Type | Description |
|---|---|---|
| order_id * | string | Order id |
| side * | string | Order side: buy or sell |
| symbol * | string | Trading pair symbol (e.g., btc_thb) |
get_symbol_rulesGet exchange trading rules for a symbol (price step/scale, quantity step/scale, min order size in THB). Use before rounding or placing orders.| Parameter | Type | Description |
|---|---|---|
| symbol * | string | Trading pair symbol (e.g., btc_thb, eth_thb) |
get_symbolsGet list of available trading pairs sorted by 24h volume (descending), limited to top N symbols| Parameter | Type | Description |
|---|---|---|
| limit | number | Maximum number of top symbols to return (default: 40, sorted by 24h volume) |
get_tickerGet current market ticker/price for a cryptocurrency symbol (e.g., btc_thb, eth_thb)| Parameter | Type | Description |
|---|---|---|
| symbol * | string | Trading pair symbol (e.g., btc_thb, eth_thb, ada_thb). Use lowercase with underscore. |
get_trade_historyGet journal trade records, most recent first. Optionally filter by status (open|closed) and limit the count.| Parameter | Type | Description |
|---|---|---|
| limit | number | Max records to return (default 50) |
| status_filter | string | Filter by status: open or closed (default all) |
get_wallet_balanceGet wallet balance from Bitkub account - returns available and reserved balance for all currencieslog_trade_entryRecord a new trade entry in the journal. Returns the trade_id used later by log_trade_exit.| Parameter | Type | Description |
|---|---|---|
| entry_date | string | Entry datetime (RFC3339); defaults to now (UTC) |
| entry_price * | number | Entry price |
| qty * | number | Position quantity (coins) |
| reason | string | Reason for entry |
| stop * | number | Stop price. Required — every trade must have a stop (client_side_stop_worker has no resting exchange stop to fall back on), and an unset stop silently folds a 0R trade into calculate_expectancy's averages. |
| strategy | string | Strategy used (e.g., breakout, pullback) |
| symbol * | string | Trading pair symbol (e.g., btc_thb) |
| timeframe | string | Chart timeframe used (e.g., 15m, 1h, 4h, 1d) |
| tp_2r | number | Take-profit (2R) price |
log_trade_exitRecord the exit of a logged trade. Computes net PnL (both-leg fees) and R-multiple from the stored entry, then closes the record.| Parameter | Type | Description |
|---|---|---|
| exit_date | string | Exit datetime (RFC3339); defaults to now (UTC) |
| exit_price * | number | Exit price |
| exit_reason | string | Reason for exit (e.g., target, stop, structure_break) |
| maker_fee | number | Maker fee %% (default 0.25) |
| taker_fee | number | Taker fee %% (default 0.25) |
| trade_id * | number | trade_id returned by log_trade_entry |
place_limit_orderPlace a LIVE limit order on Bitkub. For side=buy, amount is THB to spend; for side=sell, amount is the coin quantity. Places a real order — validate the setup first.| Parameter | Type | Description |
|---|---|---|
| amount * | number | buy: THB amount to spend; sell: coin quantity to sell |
| rate * | number | Limit price (THB) |
| side * | string | Order side: buy or sell |
| symbol * | string | Trading pair symbol (e.g., btc_thb, eth_thb) |
place_stop_limit_orderPlace a stop-limit order. Bitkub has no native stop, so this runs a client-side check: if the trigger is already reached it places the limit order now, otherwise it reports monitoring (poll again or use client_side_stop_worker).| Parameter | Type | Description |
|---|---|---|
| current_price | number | Optional current price; fetched from ticker if omitted |
| limit_price * | number | Limit price placed when triggered |
| qty * | number | Order amount (sell: coin qty; buy: THB to spend) |
| side | string | Order side: sell (default) or buy |
| symbol * | string | Trading pair symbol (e.g., btc_thb) |
| trigger * | number | Stop trigger price. sell fires when price <= trigger; buy fires when price >= trigger |
pnl_with_feesCalculate net PnL of a long position including both-leg fees, given explicit entry and exit prices. Pure calculator (no ticker fetch).| Parameter | Type | Description |
|---|---|---|
| entry * | number | Entry price |
| exit * | number | Exit price |
| maker_fee | number | Maker fee %% (default 0.25) |
| qty * | number | Position quantity (coins) |
| stop | number | Stop price (for R-multiple; optional) |
| taker_fee | number | Taker fee %% (default 0.25) |
round_to_exchange_rulesRound a price and quantity to a symbol's tick/step rules before sending an order. Price rounds to nearest tick; qty rounds down to step (never exceeds intended size). Flags if notional is below the exchange minimum.| Parameter | Type | Description |
|---|---|---|
| price * | number | Order price to round |
| qty * | number | Order quantity (in base asset) to round |
| symbol * | string | Trading pair symbol (e.g., btc_thb, eth_thb) |
simulate_tradeSimulate a long setup before entering: returns R:R ratio and net win/loss PnL (both-leg fees). Uses a 2R target if none is given.| Parameter | Type | Description |
|---|---|---|
| entry * | number | Entry price |
| maker_fee | number | Maker fee %% (default 0.25) |
| qty * | number | Position quantity (coins) |
| stop * | number | Stop price (must be below entry) |
| taker_fee | number | Taker fee %% (default 0.25) |
| target | number | Target price (default: 2R) |
validate_trade_setupValidate a pre-trade checklist from metrics produced by the other tools. Returns checklist, score, can_trade, and warnings. can_trade is true only when ALL checks pass.| Parameter | Type | Description |
|---|---|---|
| atr_max | number | Upper bound of acceptable daily ATR%% zone (default 6) |
| atr_min | number | Lower bound of acceptable daily ATR%% zone (default 2) |
| atr_percent * | number | ATR% from daily (1440-minute) candles; do not mix timeframes |
| balance * | number | Available balance in THB |
| has_signal * | boolean | Did a breakout/pullback entry signal fire? |
| position_value_thb * | number | position_value_thb from calculate_position_size |
| regime * | string | Market regime from check_market_regime (UPTREND|DOWNTREND|SIDEWAYS) |
| rs_top * | boolean | Is the symbol in the top relative-strength rank and outperforming the benchmark (or the benchmark itself)? |
| volume_ok * | boolean | Is volume confirming the signal (e.g. >=1.5x average)? |
Security checks
Static checks derived from the repository a month ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 1.6K words.
- ✓License declaredThe repository declares the MIT license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedA lockfile pins dependency versions.
- ✓No dynamic code executionScanned 48 source files and found no eval, dynamic Function or shell execution.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
Releases
README
The repository's README runs to about 1.6K words, fetched a month ago. The original in the repository is authoritative.
Read full README