Skip to main content
Glama
Kuco-dev

tossinvest-api-mcp

by Kuco-dev

createConditionalOrder

Destructive

Monitor stock prices and automatically execute buy or sell orders when trigger prices are reached, supporting single, OCO, and OTO conditional order types.

Instructions

조건주문 생성

특정 종목의 가격을 감시해 조건 충족 시 자동으로 매매(매수/매도)하는 조건주문을 생성합니다.

감시가와 매매 방향(매수/매도)을 설정한 후 가격이 감시가에 도달하면 조건이 발동되어 주문이 생성됩니다.

타입(type) — 조건의 개수와 관계를 정합니다:

  • SINGLE: first 한 조건만 감시합니다.

  • OCO (One-Cancels-the-Other): 두 조건(first·second)을 동시에 감시하다, 하나의 조건이 충족되면 나머지 조건은 자동 취소됩니다. first/second 모두 매도(SELL) 이며 first 감시가 > 현재가 > second 감시가 여야 합니다. 호가유형은 지정가(LIMIT)만 지원합니다.

  • OTO (One-Triggers-the-Other): first 조건이 체결되면 그때부터 second 조건 감시가 시작됩니다. first매수(BUY), second매도(SELL) 입니다. 호가유형은 지정가(LIMIT)만 지원합니다.

Rate Limits Group: CONDITIONAL_ORDER

[POST /api/v1/conditional-orders]

tags: Conditional Order

⚠️ 실제 자산에 영향을 주는 조건주문 API 입니다. 기본값은 dryRun=true 이며 실행하려면 TOSSINVEST_ENABLE_CONDITIONAL_ORDERS=true 와 confirmation 이 필요합니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes조건주문 생성 요청. "이 가격(triggerPrice)에 닿으면 매수/매도(orderSide) 주문" 만 입력하면 됩니다. 가격이 감시가(triggerPrice)에 닿으면 트리거됩니다. 타입은 `type`(SINGLE/OCO/OTO)으로 지정합니다.
dryRunNo기본값 true. true 이면 토스증권 서버로 어떤 네트워크 요청도 보내지 않고 실행 계획만 반환합니다. 실제 주문을 내려면 false 로 명시해야 합니다.
accountNo요청에 사용할 계좌의 accountSeq. getAccounts 응답의 accountSeq 값을 사용합니다. 미지정 시 TOSSINVEST_DEFAULT_ACCOUNT 환경변수를 사용하며, 둘 다 없으면 호출하지 않고 오류를 반환합니다.
confirmationNo실주문 확인 문자열. TOSSINVEST_MUTATION_CONFIRMATION 환경변수 값과 정확히 일치해야 실제 주문이 실행됩니다.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already mark destructiveHint=true and readOnlyHint=false. The description adds context about real asset impact, dryRun safety, confirmation requirement, rate limit group, and type-specific behaviors (e.g., OCO/OTO only LIMIT). No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is detailed but well-structured with headings and bullet points. It front-loads the core purpose and type explanations. Some redundancy exists (e.g., repeating trigger behavior), but overall efficient for a complex tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (nested objects, multiple types), the description covers key aspects: types, constraints, real-asset impact, safety features (dryRun, confirmation), and rate limits. No output schema exists, so return values are not explained; but the description is fairly complete for usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds meaning beyond schema by explaining type-specific constraints (e.g., OCO first/second both SELL, OTO first BUY second SELL) and clarifying that quantity is shared across conditions in OCO/OTO.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool creates conditional orders that monitor prices for specific stocks and automatically execute trades when conditions are met. It distinguishes itself from siblings like `createOrder` by focusing on conditional order creation, and explains the three types (SINGLE, OCO, OTO).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides guidance on when to use each type (SINGLE, OCO, OTO) with specific side and price constraints. It also mentions the default dryRun behavior and required confirmation for real execution. However, it does not explicitly contrast with `createOrder` for immediate orders.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/Kuco-dev/tossinvest-api-mcp'

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