tossinvest-cli
AGENTS.md524 starsChanged 7 months agoMITView on GitHub
tossctl 자동화를 셋업하려는 AI 에이전트 (OpenClaw / Claude Code / Codex / Cursor / 기타) 가 참고할 짧은 recipe. auth status 가 active 가 아니면 사용자가 직접 tossctl auth login 으로 QR + 폰 2차 인증을 마쳐야 합니다 (에이전트가 대신 못 함). Every leaf command carries machine-readable annotations: - source: official (official Open API only), wts (WTS internal endpoint only), both (official preferred, WTS fallback), or local (no remote API call). wts endpoints are unofficial and may change without notice.…
- Sends data out
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- tossctlSkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Every leaf command carries machine-readable annotations:
- Very specific: line 37
Preview before placing: Use order preview to validate a canonical order intent, then let a human run order place.
- Very specific: line 49
Prefer --output json for machine-readable output.
- Very specific: line 50
Treat source: wts results as best-effort.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agents
tossctl 자동화를 셋업하려는 AI 에이전트 (OpenClaw / Claude Code / Codex / Cursor / 기타) 가 참고할 짧은 recipe.
전제
tossctl version # 0.4.9+
tossctl auth status # Session: active / Live Check: valid 여야 함auth status 가 active 가 아니면 사용자가 직접 tossctl auth login 으로 QR + 폰 2차 인증을 마쳐야 합니다 (에이전트가 대신 못 함).
Command taxonomy & safety
Every leaf command carries machine-readable annotations:
source:official(official Open API only),wts(WTS internal endpoint only),both(official preferred, WTS fallback), orlocal(no remote API call).wtsendpoints are unofficial and may change without notice.mutating: true: the command can change account state (live trading). It is attached toorder place,order cancel,order amend,order conditional place|cancel|modify, andops call(because that generic dispatcher can invoke write operations).writes_state: true: a non-trading command changes a preference or resource.writes_state: possibleonops callmeans the selected operation decides; inspect itsmutationpolicy before calling it.environment:liveorpaperwhen the target ledger matters. It is independent of productdomainand credentialsource.experimental: the opt-in feature gate.paper-tradingis hidden and blocked unlessexperimental.paper_trading=true.
Rules for agents:
- Never auto-invoke
mutating: truecommands. A human must approve every live order. Trading is also gated inconfig.json(disabled by default). - Preview before placing. Use
order previewto validate a canonical order intent, then let a human runorder place. writes_state: true명령도 먼저 preview합니다. 사용자의 현재 요청이 그 정확한 변경을 승인한 경우에만 방금 조회한 영향 상태·intent에 결합된confirm_token으로 실행하고, 불가역 작업은 별도 acknowledgement까지 확인합니다. Open API IP 교체·목표가 알림·숨김 종목·관심종목 폴더/종목 관리가 이 범주입니다.- paper 명령은 실거래
mutating: true가 아니라writes_state: true,mutation_risk: simulation,authorization: simulation_execute입니다. 그래도--execute는 사용자가 현재 요청에서 모의 원장 변경을 명시적으로 허용한 경우에만 사용합니다. paper 승인을 live 승인으로 재사용하지 말고,paper order live-preview가 만든 결과도 사람이 일반 live confirm 경계를 다시 통과하게 둡니다. - Open API IP 교체는 새 IP 추가와 검증을 먼저 하고, 실패하면 기존 목록을 복구합니다.
- Prefer
--output jsonfor machine-readable output. - Treat
source: wtsresults as best-effort; add amonitor apiprobe when you build automation on top of them. - Don't auto-run
tossctl update. It changes the tossctl binary itself (not account state), but an agent silently switching versions mid-task can surprise the human running it — let a human trigger it, or runtossctl update --check(read-only) if you need to know whether an update exists.
API 회귀 감지 → 알림
monitor api 는 exit 0/1 만 반환합니다. 알림 채널은 cron 라인의 || 우항에서 자유롭게 합성합니다.
# Discord
0 * * * * /usr/local/bin/tossctl monitor api --quiet || \
curl -sS -X POST -H 'Content-Type: application/json' \
-d '{"content":"⚠️ tossctl regression"}' \
"$YOUR_DISCORD_WEBHOOK"
# Slack
0 * * * * /usr/local/bin/tossctl monitor api --quiet || \
curl -sS -X POST -H 'Content-Type: application/json' \
-d '{"text":"⚠️ tossctl regression"}' \
"$YOUR_SLACK_WEBHOOK"
# ntfy.sh (push to phone, no signup)
0 * * * * /usr/local/bin/tossctl monitor api --quiet || \
curl -sS -d "tossctl regression" "https://ntfy.sh/$YOUR_NTFY_TOPIC"
# macOS native notification (when the cron runs on your laptop)
0 * * * * /usr/local/bin/tossctl monitor api --quiet || \
osascript -e 'display notification "tossctl regression" with title "tossctl"'
# Email (requires mailx/msmtp configured)
0 * * * * /usr/local/bin/tossctl monitor api --quiet || \
echo "tossctl regression $(date)" | mail -s "tossctl regression" you@example.com에이전트가 해야 할 일
crontab -e를 열어 위 라인 중 하나를 사용자 환경에 맞게 추가.- 사용자 머신의 실제
tossctl경로 확인 (which tossctl) 후 라인 경로 교체. - webhook URL · ntfy topic · 이메일 주소 등 user-specific 값은 사용자에게 묻거나 환경변수로 분리.
- 설치 직후 한 번
tossctl monitor api수동 실행해서 통과 확인. - (선택) 실패 시뮬레이션: 본인 머신에서
monitor api && false같은 변형을 한 번 시험 발사해 알림 채널 도달 확인.
Probe 목록
현재 monitor api 는 91개 read-only endpoint 를 감시합니다. 단일 진실 소스는
internal/monitor.Probes() 런타임 결과입니다. 대부분은 internal/ops
레지스트리의 오퍼레이션 옆 ProbeSpec과 공용 ProbeRefs에서 파생되고, 카탈로그
오퍼레이션이 없는 CLI 전용 6개만 internal/monitor/probes.go 에 직접 선언됩니다.
experimental.paper_trading=true인 사용자는 여기에 paper 잔고·교육 요약·대기 주문·완료
주문 4개 probe가 더해집니다. 실험 기능 실패가 옵트인하지 않은 사용자의 안정 표면 장애로
보이지 않도록 기본 목록과 분리합니다.
실험 기능은 endpoint 구현 여부와 별도로 docs/reverse-engineering/wts-endpoints.json의
rolling_features에서 UI flag, 활성 WTS build, critical endpoint, live 관측과 stable 승격
심사를 추적합니다. 최소 3개 연속 build, 7일·7회 연속 probe, 공식 UI 일반 공개, 상태
일관성, 미해결 5xx 없음이 모두 확인되기 전에는 experimental 표기를 제거하지 않습니다.
market-index—GET /api/v1/dashboard/wts/overview/indicator/indexindex-prices—GET /api/v1/index-prices/KGG01Pindex-info—GET /api/v2/index-infos/KGG01Pstock-ranking—GET /api/v1/rankings/realtime/stockinvestor-rankings—GET /api/v1/dashboard/wts/overview/rankings/by-investorstheme-rankings—GET /api/v1/tics/rankingssectors-tics—GET /api/v1/tics/allsector-detail-simple—GET /api/v2/dashboard/wts/overview/tics/1/simplesector-detail-overview—GET /api/v2/dashboard/wts/overview/tics/1/overviewsector-detail-stocks—POST /api/v2/dashboard/wts/overview/tics/1/stockssector-detail-etfs—POST /api/v2/dashboard/wts/overview/tics/1/etfssector-detail-news—GET /api/v2/dashboard/wts/overview/tics/1/newsai-signals—GET /api/v2/reasoning-contents/interestai-signal-detail—GET /api/v1/dashboard/wts/overview/ai-signals/detail?productCode=A005930&productType=STOCKSscreener-presets—GET /api/v2/screener/presets/commonstock-search—POST /api/v2/search/stockstrading-flows—GET /api/v1/stock-infos/trade/trend/trading-trendearning-call—GET /api/v1/earning-call/upcomingearning-call-transcript—GET /api/v1/company-events/228692/transcripts/paragraph-inferencesearning-call-report—GET /api/v2/company-events/228692/reportai-index-detail—GET /api/v1/reasoning/indices/KGG01P/detailwatchlist-news—GET /api/v1/new-watchlists/recommend/news?watchlistId=<first-user-folder-id>earning-call-detail—GET /api/v1/earning-call/events/228692/infoholdings-news—POST /api/v1/dashboard/wts/news(PERSONALIZE_HOLD)transactions-kr—GET /api/v3/my-assets/transactions/markets/kr(today,size=1)transactions-us—GET /api/v3/my-assets/transactions/markets/us(today,size=1)news-briefing—GET /api/v2/reasoning/personalizedmarket-news-briefing—GET /api/v1/dashboard/wts/overview/ai-signals/latest?nationCode=KORcommunity-rankings—GET /api/v1/community/top-rankings/INFLUENCERlending-expected—GET /api/v1/lending/revenue/account/expectedlending-top-revenue—GET /api/v1/lending/revenue/account/top-revenueaccumulation-plans—GET /api/v2/autotrade/plan/findprofit-overview—POST /api/v1/profit/overviewmarket-issues—GET /api/v1/lens/issuesauto-trades—GET /api/v3/trading/auto-trading/historiesmarket-calendar—POST /api/v4/calendar/monthly/<YYYY-MM>market-key-events—GET /api/v1/calendar/ai-summary/key-eventsquote-charts—POST /api/v1/dashboard/common/stocks/mini-chartquote-reasons—POST /api/v1/dashboard/wts/overview/ai-signalsmarket-halt—GET /api/v4/dashboard/wts/overview/indicatorquote-crypto—GET /api/v1/crypto-pricesquote-stock-signals—GET /api/v1/dashboard/wts/overview/signalsaccount-receivable—GET /api/v1/margin/cert/notice/receivablescreener-filter-range—POST /api/v1/screener/filters/rangeoption-expiries—GET /api/v1/option-maturity-date/get-allorder-funding—GET /api/v2/trading/order/buy-control/required-deposit-amountria-report—GET /api/v1/ria-calculator/reportaccount-interest-years—GET /api/v1/interest/accounts/annual/history/yearsaccount-commission-info—GET /api/v2/trading/commission-infoaccount-last-login—GET /api/v1/user/last-login-infoaccount-margin-frozen—GET /api/v1/margin/cert/frozen-account(accountKey)account-accident-count—GET /api/v2/account/unlock/accident-account/count(accountKey)account-summary-overview—GET /api/v3/my-assets/summaries/markets/all/overviewaccount-all-overview—POST /api/v1/dashboard/all-accountsasset-performance-all—GET /api/v1/asset-snapshot/all-accounts/chart/ONE_MONTH/DAYasset-performance-account—GET /api/v1/asset-snapshot/chart/ONE_MONTH/DAY(accountKey)asset-snapshots-all—GET /api/v1/asset-snapshot/all-accounts/page?pageSize=1asset-snapshots-account—GET /api/v1/asset-snapshot/page?pageSize=1(accountKey)asset-snapshot-detail-all—GET /api/v1/asset-snapshot/all-accounts/detail-by-date?baseDate=<today>asset-snapshot-detail-account—GET /api/v1/asset-snapshot/detail-by-date?baseDate=<today>(accountKey)portfolio-folders—POST /api/v2/dashboard/asset/sections/all(FOLDER_OVERVIEW_V2,accountKey)open-banking-status—GET /api/v1/autotrade/open-banking/info/findopen-banking-creatable—GET /api/v1/autotrade/open-banking/creatableopen-banking-registration—GET /api/v1/autotrade/open-banking/need-registrationauto-trading-open-banking—GET /api/v1/trading/open-banking/auto-tradingtrading-simple-trade—GET /api/v1/trading/settings/simple-tradetrading-exchange-choice—GET /api/v2/trading/settings/investor-exchange-choice-typetrading-ats-notification—GET /api/v1/users/settings/me/ats-notificationoption-real-time-tick—GET /api/v1/member-subscriptions/get-option-real-time-ticksecurities-transfer-my-accounts—GET /api/v1/securities-transfer/my-accountssecurities-transfer-recent-accounts—GET /api/v1/securities-transfer/recent-accountsnotification-settings—GET /api/v1/user-alimiesnotification-inbox-unread—GET /api/v1/inbox-alimies/has-unreadnotification-reasoning-agreement—GET /api/v1/reasoning/agreementnotification-reasoning-news-count—GET /api/v1/reasoning-news/countprice-alerts—GET /api/v1/user-price-alimy/A005930hidden-holdings—GET /api/v2/hidden-stocksportfolio-positions—POST /api/v2/dashboard/asset/sections/allpending-orders—GET /api/v1/trading/orders/histories/all/pendingcompleted-orders-all-dates—GET /api/v3/trading/my-orders/completed?executedOnly=false&size=1&number=1(accountKey)watchlist—GET /api/v1/new-watchlistswatchlist-groups—GET /api/v1/new-watchlists/groups/simplewatchlist-group—GET /api/v1/new-watchlists/groups?ids=<first-user-folder-id>&includePrice=trueearning-call-home—GET /api/v1/earning-call/homeaccount-list—GET /api/v1/account/listquote-product-prices—GET /api/v1/product/stock-prices?meta=true&productCodes=A005930quote-stock-infos—GET /api/v2/stock-infos/A005930quote-trades—GET /api/v2/stock-prices/A005930/ticksquote-orderbook—GET /api/v3/stock-prices/A005930/quotesquote-price-limits—GET /api/v2/stock-prices/A005930/upper-lowermarket-trading-hours—GET /api/v2/system/trading-hours/integrated
옵트인 전용 paper probe:
paper-cash-balance—GET /api/v1/paper/cash-balancepaper-education-summary—GET /api/v1/paper/education/summarypaper-pending-orders—GET /api/v1/paper/trading/orders/histories/all/pendingpaper-completed-orders—GET /api/v2/paper/trading/my-orders/markets/us-opt/by-date/completed
새 카탈로그 endpoint 의존이 생기면 해당 internal/ops 오퍼레이션에 ProbeSpec을
붙입니다. 한 기능이 여러 endpoint를 합치면 나머지는 ExtraProbes에 모두 선언하고,
여러 오퍼레이션이 같은 요청을 공유하면 공용 probe 하나를 ProbeRefs로 참조합니다.
AccountScoped probe는 monitor가 account-list에서 확인한 기본 accountKey를 넣습니다.
CLI 전용 의존성만 internal/monitor/probes.go 에 추가합니다. 가이드:
docs/operations.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

