Skip to main content
Glama
Mofesto

ctbcsec-api-mcp-server

by Mofesto

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

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

Tools

Functions exposed to the LLM to take actions

NameDescription
initializeB

Initialize the CTS Trading API with server configuration.

Args: trade_das_url: Trading DAS server endpoint (e.g., "apsit.ectest.ctbcsec.com/tradedas")

Returns: Initialization result with success status and error details

set_lot_sizeA

Set lot size data for specific stocks.

Args: lot_size_data: Lot size configuration (e.g., "0050=1000|0028=1000")

Returns: Operation result

loginB

Authenticate user with the trading system.

Args: user_id: User account ID password: User password

Returns: Login result with account information

connectB

Connect to the trading server.

Returns: Connection status

disconnectA

Disconnect from the trading server.

Returns: Status confirmation

logoutC

Logout from the trading system.

Args: user_id: User account ID

Returns: Logout confirmation

get_accountsA

Retrieve all available trading accounts.

Returns: List of account information objects

get_connection_statusB

Get current connection and authentication status.

Returns: Current connection status

stock_new_orderB

Place a new stock order.

Args: account_id: Account ID stock_id: Stock symbol (e.g., "2330") quantity: Number of shares price: Order price ("0" for market orders) buy_sell: Buy (1) or Sell (2) trade_date: Trading date in YYYYMMDD format (defaults to today) trade_type: Trade type (default: REGULAR) order_type: Order type (default: CASH) price_type: Price type (default: LIMIT) condition: Order condition (default: ROD) broker: Broker code (default: empty) pay_type: Payment type (default: 0)

Returns: Order confirmation or error message

stock_modify_orderB

Modify an existing stock order.

Args: account_id: Account ID order_id: Original order ID order_number: Order number stock_id: Stock symbol buy_sell: Buy (1) or Sell (2) current_quantity: Current remaining quantity matched_quantity: Matched quantity new_price: New price trade_date: Trading date (defaults to today) new_quantity: New quantity (0 to keep unchanged) trade_type: Trade type order_type: Order type price_type: Price type condition: Order condition modify_type: Modification type (0=Quantity, 2=Price) pre_order: Pre-order flag

Returns: Modification result

stock_cancel_orderB

Cancel an existing stock order.

Args: account_id: Account ID order_id: Original order ID order_number: Order number stock_id: Stock symbol buy_sell: Buy (1) or Sell (2) quantity: Order quantity current_quantity: Current remaining quantity matched_quantity: Matched quantity price: Order price trade_date: Trading date (defaults to today) trade_type: Trade type order_type: Order type price_type: Price type condition: Order condition pre_order: Pre-order flag

Returns: Cancellation confirmation

stock_query_orderA

Query stock orders.

Args: account_id: Account ID force_query: True to force refresh from server, False to use cache

Returns: List of current orders

stock_query_matchB

Query stock trade matches.

Args: account_id: Account ID force_query: True to force refresh from server, False to use cache

Returns: List of matched trades

stock_query_positionA

Query stock positions.

Args: account_id: Account ID trade_date: Trading date in YYYYMMDD format (defaults to today) force_query: True to force refresh from server, False to use cache

Returns: Current positions with P&L data

futopt_new_orderA

Place a new futures or options order.

Args: account_id: Account ID contract_id: Contract ID (e.g., "TXFJ4") quantity: Number of contracts price: Order price ("0" for market orders) buy_sell: Buy (1) or Sell (2) product_type: Product type (0=Futures, 1=Options) trade_date: Trading date (defaults to today) price_type: Price type (default: LIMIT) offset: Offset flag (0=Open, 1=Close) condition: Order condition (default: ROD) contract_id2: Second leg contract ID for complex orders buy_sell2: Second leg buy/sell pre_order: Pre-order flag

Returns: Order confirmation

futopt_modify_orderA

Modify an existing futures/options order.

Args: account_id: Account ID order_id: Original order ID order_number: Order number contract_id: Contract ID new_quantity: New quantity current_quantity: Current remaining quantity matched_quantity: Matched quantity new_price: New price product_type: Product type trade_date: Trading date (defaults to today) modify_type: Modification type price_type: Price type condition: Order condition contract_id2: Second leg contract ID pre_order: Pre-order flag

Returns: Modification result

futopt_cancel_orderB

Cancel an existing futures/options order.

Args: account_id: Account ID order_id: Original order ID order_number: Order number contract_id: Contract ID quantity: Order quantity current_quantity: Current remaining quantity matched_quantity: Matched quantity product_type: Product type trade_date: Trading date (defaults to today) contract_id2: Second leg contract ID pre_order: Pre-order flag

Returns: Cancellation confirmation

futopt_query_orderA

Query futures/options orders.

Args: account_id: Account ID product_type: Product type (0=Futures, 1=Options) force_query: True to force refresh, False to use cache

Returns: List of orders

futopt_query_matchA

Query futures/options trade matches.

Args: account_id: Account ID force_query: True to force refresh, False to use cache

Returns: List of matched trades

futopt_query_oiA

Query futures/options open interest.

Args: account_id: Account ID trade_date: Trading date (defaults to today) force_query: True to force refresh, False to use cache

Returns: Open interest positions

futopt_query_equityB

Query futures/options account equity.

Args: account_id: Account ID trade_date: Trading date (empty string for current, defaults to today)

Returns: Account equity details

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
get_config_resourceGet current server configuration from appsetting.json if it exists.
get_status_resourceGet current connection and authentication status.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mofesto/ctbcsec-api-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server