Skip to main content
Glama
shioaji-mcp

shioaji-mcp

by xianyuntang

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SJ_API_KEYYesAPI key from Sinopac API management
SJ_CA_PATHNoAbsolute path to the certificate file (.pfx); optional, only needed for ca_status
SJ_SEC_KEYYesSecret key paired with SJ_API_KEY
SJ_CA_PASSWDNoCertificate password (usually your national ID); optional, only needed for ca_status
SJ_PRODUCTIONNoSet to true to log in to the real account; otherwise the simulation environment is usedfalse

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
ca_statusC

Certificate (SJ_CA_PATH) activation result and expiry time.

get_contractB

Contract details: name, reference, limit up/down, unit, day-trade, margin/short info... code: stock '2330', continuous futures 'TXFR1'/'TXFR2', option 'TXO31200G6', index 'IX0001' (TAIEX).

get_snapshotsA

Latest snapshot (open/high/low/close, change, volume, best bid/ask) for up to 500 codes.

get_kbarsA

1-minute K bars, dates YYYY-MM-DD. ts is nanoseconds since epoch. History from 2020-03-02 (stocks/index), 2020-03-22 (futures). Use TXFR1 for expired futures.

get_ticksA

Ticks of one trading day (YYYY-MM-DD). Give last_count for the last N ticks, or time_start/time_end ('HH:MM:SS') for a range; otherwise the whole day.

scanC

Stock ranking (top gainers, volume, amount...). ascending=False gives the top; date YYYY-MM-DD, default today.

credit_enquiresC

Margin purchase / short sale balances (資券餘額) for stocks.

short_stock_sourcesC

Shares available for short selling (借券賣出餘額) for stocks.

disposition_stocksC

Disposition stocks (處置股) currently under trading restrictions.

attention_stocksC

Attention stocks (注意股) announced by the exchange.

usageA

API connections and daily traffic used/limit/remaining (bytes). Quota resets 08:00 on trading days.

list_accountsB

Stock / futures accounts available after login.

account_balanceB

Settlement bank account balance (Sinopac bank, sub-account, LINE Bank only).

settlementsB

Upcoming stock settlement amounts (T, T+1, T+2).

trading_limitsC

Stock account trading, margin and short limits.

futures_marginC

Futures/options account equity, margin, risk indicator.

list_positionsB

Open positions with unrealized PnL. unit applies to stocks: Common = lots, Share = shares. Each row's id can be passed to list_position_detail.

list_position_detailB

Per-lot breakdown of one position (detail_id = position id from list_positions).

list_profit_lossB

Realized PnL records between dates (YYYY-MM-DD). Each row's id works with list_profit_loss_detail.

list_profit_loss_detailB

Breakdown of one realized PnL record (detail_id = id from list_profit_loss).

list_profit_loss_summaryB

Realized PnL summarized per instrument plus totals, dates YYYY-MM-DD.

list_tradesC

Today's orders and fills across all accounts.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

C2.8/5.0

Scored across 22 tools

Disambiguation4/5

Most tools target clearly distinct resources or time granularities, such as snapshots vs. K-bars vs. ticks, and positions vs. position detail. The main overlap is the profit/loss family (records, detail, summary) and several account/status tools, but descriptions provide enough cues to select correctly.

Naming Consistency3/5

Names are all snake_case, but conventions are mixed: get_* for market data, list_* for account/portfolio records, and bare nouns for status/reference tools. It remains readable but does not follow a single predictable verb_noun pattern, and the typo 'credit_enquires' adds inconsistency.

Tool Count3/5

22 tools is on the heavy side for a single server, especially with three profit/loss variants and separate detail lookups. The breadth reflects covering market data, account status, positions, and PnL, but it lands in the 16–25 heavy range.

Completeness2/5

Read-only monitoring is extensive: contracts, market data, accounts, positions, PnL, and trades are covered. However, there are no order placement, cancellation, or modification tools, which is a significant gap for a Shioaji trading server and blocks core trading workflows.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues