nhplug-sdk: Instructions file for Codex

AGENTS.md

nhplug-sdk AGENTS.md is an instructions file for Codex, OpenCode from PLUG-OpenAPI/nhplug-sdk. It costs 5,699 tokens per session, scanned A, original, MIT.

Repository-specific instructions for building with nhplug-sdk, a Python package for the NH Investment & Securities Open API, including its files, installation, and source documentation.

In plain words
What is it for?
Adding REST API calls, handling response codes and repeated requests, using WebSocket subscriptions, applying rate limits, and working with instrument master data.
Why use it?
They explain which code and domain documents are authoritative and prevent agents from using the wrong package paths, examples, or API conventions.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code; mentions AGENTS.md.

This is PLUG-OpenAPI/nhplug-sdk's own configuration. It tells Codex and OpenCode how to work on nhplug-sdk itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything nhplug-sdk configures →

Reuse

Borrowing it

Nothing to install: this file belongs to PLUG-OpenAPI/nhplug-sdk. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/PLUG-OpenAPI/nhplug-sdk/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/PLUG-OpenAPI/nhplug-sdk

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nhplug-sdk AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/plug-openapi/nhplug-sdk/agents-md/github.svg)](https://agentmods.dev/instructions/plug-openapi/nhplug-sdk/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/plug-openapi/nhplug-sdk/agents-md"><img src="https://agentmods.dev/badge/instructions/plug-openapi/nhplug-sdk/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nhplug-sdk AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/plug-openapi/nhplug-sdk/agents-md"><img src="https://agentmods.dev/badge/instructions/plug-openapi/nhplug-sdk/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,699 This file is loaded in full into every session.
When invoked 5,699 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.05699 $0.05699
Opus 5.5 $0.02280 $0.02280
Sonnet 5.5 $0.01140 $0.01140
Haiku 4.5 $0.00570 $0.00570

Measured yesterday against content hash cd7a68269961, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nhplug-sdk AGENTS.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| **SDK 없이** 원시 호출(urllib·requests) | [snippets/standalone/README.md](https://github.com/PLUG-OpenAPI/nhplug-sdk/blob/main/snippets/standalone/README.md) |
AGENTS.md · 196 lines

How it starts

The opening of the file, as written. The whole thing — 196 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md — NH투자증권 Open API 개발 규칙 (AI 에이전트용)

이 저장소로 개발하는 AI 코딩 에이전트(Antigravity·Cursor·Claude Code 등)는 아래 규칙을 따른다.

설치 — pip install nhplug (패키지명 nhplug, 저장소명 nhplug-sdk)

  • 배포되는 것: nhplug(코어) · nhplug.realtime(WebSocket) · nhplug.instruments(종목마스터 파서 + .h 28종).
  • 배포되지 않는 것: snippets/ examples/ pipeline/ guides/ — 저장소를 clone 해서 참고한다.
  • pip install "nhplug[instruments]" 로 pandas 를 함께 설치하면 마스터가 DataFrame 으로 온다.
  • ⚠️ 저장소 경로 instruments/ 는 설치 시에만 nhplug/instruments/ 로 매핑된다(package-dir). 헤더 .h 의 GitHub 링크가 포털에 게시돼 있어 저장소 경로를 옮기면 안 된다.

저장소 개요

  • nhplug/ : 공용 클라이언트(토큰 발급·캐시, Input_0 봉투, 헤더 자동) + realtime.py. 새 코드는 이걸 재사용한다.
  • snippets/ : 기능 단위 실행 샘플(기능당 폴더 = 호출.py + chk_검증.py). 특정 기능 구현 시 참고.
  • examples/ : 카테고리 통합 예제.
  • pipeline/ : 설계→검증→실행 파이프라인 골격.
  • docs/ : 도메인 명세의 로컬 사본 위치(scripts/fetch_docs.py 로 받음, 커밋 안 함). 정본은 도메인 URL(아래).

🗺️ 파일 지도 — 무엇을 알고 싶을 때 어디를 여는가

⚠️ GitHub 은 폴더 목록(/tree/)을 크롤러에 막아 둔다. 아래 링크로 직접 열어야 한다. 파일 목록이 필요하면 이 표와 README 「구성」 절을 본다.

알고 싶은 것 열어볼 파일
REST 호출 · rsp_cd 판정 · 연속조회 · 유량 스로틀 nhplug/client.py
WebSocket 구독 · 포트 라우팅 · 서버 한도 · TLS nhplug/realtime.py
토큰 발급·캐시 · 호스트 가드 · 브랜드 판정 nhplug/auth.py
오류 분류(config·auth·rate_limit·network·http) nhplug/errors.py
.env 탐색 순서 nhplug/_env.py
실시간 채널 27종 · tr_key 대응표 docs/realtime_channels.md
종목마스터 28종 목록 · 파서 사용법 instruments/README.md
.mst 파싱 구현 instruments/master.py
SDK 없이 원시 호출(urllib·requests) snippets/standalone/README.md
계좌구분(acct_type) 판정 예제 snippets/common/list_accounts
실시간 구독 예제·검증 snippets/krstock/realtime_execution
AI IDE 규칙 파일(고객 배포용) templates/README.md
설치부터 첫 실행까지 절차 guides/antigravity.md
대화로 조회(MCP 서버) nhplug-mcp

Read the full file on GitHub · 196 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +4 tokens per session cd7a68269961
  2. 1mo ago Changed · +25 lines · +615 tokens per session 58864b9f02a3
  3. 1mo ago Changed · +15 lines · +307 tokens per session 984313afe8dd
  4. 2mo ago Changed · +9 lines · +140 tokens per session 8a4f9daeeaac
  5. 2mo ago First seen · 147 lines · 4,633 tokens per session scan A 43a947d8bcb6

Subscribe to this mod's changes

nhplug-sdk AGENTS.md is an instructions file published in the GitHub repository PLUG-OpenAPI/nhplug-sdk (15 stars, last pushed 2d ago), licensed MIT. It adds 5,699 tokens to every session, about $0.0228 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

nhplug-sdk AGENTS.md compared with instructions from other repositories

nhplug-sdk AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nhplug-sdk AGENTS.mdPLUG-OpenAPI/nhplug-sdkInstructions file152d agoMITA5,699Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot