SolidInvoice
Create and send invoices and quotes, manage clients, and track payments in SolidInvoice.
Point-in-time exchange trading rules with sources: A-share price limits, stamp duty, ticks, futures
제작자가 쓴 원문
목록은 사용 점수(100점 만점)로 정렬되며 구성은 다음과 같습니다
| 인기 | 4/80 | GitHub 별 또는 주간 다운로드: 큰 쪽 60, 작은 쪽 20 |
|---|---|---|
| 최신성 | 12/12 | 30일 안에 릴리스나 코드 변경이 있으면 만점 |
| 응답 중 | 0/8 | 마지막 점검 때 클라우드 엔드포인트가 응답 |
| 사용 점수 | 16/100 |
품질: 기본 점검 3/3개 통과(표시만, 정렬에는 안 씀) · 상승세: 데이터 없음 (급상승 탭에서만 사용)
쓰고 있는 AI 앱을 고른 다음 설정을 복사하세요.
한 문장으로 AI에게 설치 맡기기
Marina rules 설치해 줘. https://mcp.popnx.com/i/david-marina-marina-rules.md 를 따라 하고, 명령을 먼저 보여 주고 내가 승인하면 실행해.내 컴퓨터에서 작업하는 AI(Claude Code, Cursor 등)에 붙여 넣으세요. 단계를 읽고 명령을 보여 준 뒤 승인을 기다립니다. 키도 가입도 필요 없습니다. · AI가 읽을 전체 내용 보기
검사 3/3 통과 · 내 컴퓨터에서 실행돼요 · ✓ 명령 확인 2026년 11월 16일
먼저: 어떤 AI를 쓰시나요?
쓰는 앱을 고르면 아래에 단계가 나옵니다.
Claude에 연결할 수 있지만 먼저 준비가 필요해요
먼저 컴퓨터에 Python (uv)를 설치하세요 (한 번만) · 컴퓨터용 Claude 앱(Windows 또는 Mac)에서만 되고 웹이나 모바일은 안 돼요
이 메시지를 Claude 채팅에 붙여 넣으세요. AI가 컴퓨터를 확인하고 어떤 파일을 바꿀지 알려 준 뒤 매번 동의를 기다립니다.
이 컴퓨터의 Claude에 MCP server Marina rules을 설치해 주세요. 순서대로: 1) uv --version로 uv가 있는지 확인. 없으면 https://docs.astral.sh/uv/getting-started/installation/에서 설치하라고 알려 주고 직접 설치하지 마세요. 2) 이 설정만 사용하세요(PopNx MCP 확인 완료): { "mcpServers": { "marina-rules": { "command": "uvx", "args": [ "marina-rules", "mcp" ] } } } 3) 바꿀 파일의 전체 경로나 실행할 명령을 알려 주고 제 동의를 기다리세요. 4) 키는 필요 없습니다. 5) 합의한 대로 실행한 뒤 Marina rules의 도구가 실제로 보이는지 확인하세요.이 메시지에는 키가 없습니다. 키가 필요하면 AI가 파일이나 앱 입력란에 직접 붙여 넣으라고 안내합니다.
이미 설치했나요? 먼저 확인 · 터미널을 열고 이 명령을 입력한 뒤 Enter
uv --versionMac: ⌘ + Space를 누르고 Terminal 입력 후 Enter
Windows: 시작 메뉴를 열고 Windows PowerShell 입력 후 "열기"
아직 설치하지 않았다면: uv에는 클릭형 설치 파일이 없습니다. uv 공식 페이지에서 내 시스템(macOS 또는 Windows)용 한 줄 명령을 복사해 터미널에 붙여 넣으세요 · Python을 따로 설치할 필요 없이 uv가 필요할 때 자동으로 내려받습니다
설치가 끝나면 터미널을 닫았다가 다시 열고 같은 명령을 실행하세요. 버전 번호가 나와야 합니다: uv --version
한 번 설치하면 uv가 필요한 모든 도구에서 쓸 수 있습니다
SettingsDeveloperEdit Config
{
"mcpServers": {
"marina-rules": {
"command": "uvx",
"args": [
"marina-rules",
"mcp"
]
}
}
}Marina rules을 써서 나에게 무엇을 해 줄 수 있는지 알려 주고, 하나 해 봐✓ Claude가 Marina rules을 쓰고 있다고 하거나 답에 Marina rules 도구 이름이 나오면 연결된 거예요
메뉴 이름은 2026년 11월 11일에 Anthropic 도움말에서 확인 · 앱 버전에 따라 화면이 조금 다를 수 있어요
ChatGPT는 아직 Marina rules에 연결할 수 없어요
Marina rules는 내 컴퓨터에 설치해서 쓰지만 ChatGPT는 웹에서 도는 서버만 연결할 수 있어요
A · Marina rules에 연결되는 앱 쓰기
B · 회계, 재무 및 세금에서 ChatGPT에 연결되는 다른 서버
같은 분류에서 많이 쓰는 것 중 키 없이 주소만으로 연결되는 것을 골랐어요
Claude Code에 연결할 수 있지만 먼저 준비가 필요해요
먼저 컴퓨터에 Python (uv)를 설치하세요 (한 번만)
이 메시지를 Claude Code 채팅에 붙여 넣으세요. AI가 컴퓨터를 확인하고 어떤 파일을 바꿀지 알려 준 뒤 매번 동의를 기다립니다.
이 컴퓨터의 Claude Code에 MCP server Marina rules을 설치해 주세요. 순서대로: 1) uv --version로 uv가 있는지 확인. 없으면 https://docs.astral.sh/uv/getting-started/installation/에서 설치하라고 알려 주고 직접 설치하지 마세요. 2) 이 설정만 사용하세요(PopNx MCP 확인 완료): claude mcp add --scope user marina-rules -- uvx marina-rules mcp 3) 바꿀 파일의 전체 경로나 실행할 명령을 알려 주고 제 동의를 기다리세요. 4) 키는 필요 없습니다. 5) 합의한 대로 실행한 뒤 Marina rules의 도구가 실제로 보이는지 확인하세요.이 메시지에는 키가 없습니다. 키가 필요하면 AI가 파일이나 앱 입력란에 직접 붙여 넣으라고 안내합니다.
이미 설치했나요? 먼저 확인 · 터미널을 열고 이 명령을 입력한 뒤 Enter
uv --versionMac: ⌘ + Space를 누르고 Terminal 입력 후 Enter
Windows: 시작 메뉴를 열고 Windows PowerShell 입력 후 "열기"
아직 설치하지 않았다면: uv에는 클릭형 설치 파일이 없습니다. uv 공식 페이지에서 내 시스템(macOS 또는 Windows)용 한 줄 명령을 복사해 터미널에 붙여 넣으세요 · Python을 따로 설치할 필요 없이 uv가 필요할 때 자동으로 내려받습니다
설치가 끝나면 터미널을 닫았다가 다시 열고 같은 명령을 실행하세요. 버전 번호가 나와야 합니다: uv --version
한 번 설치하면 uv가 필요한 모든 도구에서 쓸 수 있습니다
Mac: Command+스페이스를 누르고 Terminal 입력 · Windows: PowerShell 열기
claude mcp add --scope user marina-rules -- uvx marina-rules mcpMarina rules이 목록에 있고 연결됨으로 보이면 돼요
Marina rules을 써서 나에게 무엇을 해 줄 수 있는지 알려 주고, 하나 해 봐✓ Claude Code가 Marina rules을 쓰고 있다고 하거나 답에 Marina rules 도구 이름이 나오면 연결된 거예요
메뉴 이름은 2026년 11월 11일에 Anthropic 도움말에서 확인 · 앱 버전에 따라 화면이 조금 다를 수 있어요
Cursor에 연결할 수 있지만 먼저 준비가 필요해요
먼저 컴퓨터에 Python (uv)를 설치하세요 (한 번만)
이 메시지를 Cursor 채팅에 붙여 넣으세요. AI가 컴퓨터를 확인하고 어떤 파일을 바꿀지 알려 준 뒤 매번 동의를 기다립니다.
이 컴퓨터의 Cursor에 MCP server Marina rules을 설치해 주세요. 순서대로: 1) uv --version로 uv가 있는지 확인. 없으면 https://docs.astral.sh/uv/getting-started/installation/에서 설치하라고 알려 주고 직접 설치하지 마세요. 2) 이 설정만 사용하세요(PopNx MCP 확인 완료): { "mcpServers": { "marina-rules": { "command": "uvx", "args": [ "marina-rules", "mcp" ] } } } 3) 바꿀 파일의 전체 경로나 실행할 명령을 알려 주고 제 동의를 기다리세요. 4) 키는 필요 없습니다. 5) 합의한 대로 실행한 뒤 Marina rules의 도구가 실제로 보이는지 확인하세요.이 메시지에는 키가 없습니다. 키가 필요하면 AI가 파일이나 앱 입력란에 직접 붙여 넣으라고 안내합니다.
이미 설치했나요? 먼저 확인 · 터미널을 열고 이 명령을 입력한 뒤 Enter
uv --versionMac: ⌘ + Space를 누르고 Terminal 입력 후 Enter
Windows: 시작 메뉴를 열고 Windows PowerShell 입력 후 "열기"
아직 설치하지 않았다면: uv에는 클릭형 설치 파일이 없습니다. uv 공식 페이지에서 내 시스템(macOS 또는 Windows)용 한 줄 명령을 복사해 터미널에 붙여 넣으세요 · Python을 따로 설치할 필요 없이 uv가 필요할 때 자동으로 내려받습니다
설치가 끝나면 터미널을 닫았다가 다시 열고 같은 명령을 실행하세요. 버전 번호가 나와야 합니다: uv --version
한 번 설치하면 uv가 필요한 모든 도구에서 쓸 수 있습니다
Marina rules을 써서 나에게 무엇을 해 줄 수 있는지 알려 주고, 하나 해 봐✓ Cursor가 Marina rules을 쓰고 있다고 하거나 답에 Marina rules 도구 이름이 나오면 연결된 거예요
메뉴 이름은 2026년 11월 11일에 Cursor 도움말에서 확인 · 앱 버전에 따라 화면이 조금 다를 수 있어요
VS Code에 연결할 수 있지만 먼저 준비가 필요해요
먼저 컴퓨터에 Python (uv)를 설치하세요 (한 번만)
이 메시지를 VS Code 채팅에 붙여 넣으세요. AI가 컴퓨터를 확인하고 어떤 파일을 바꿀지 알려 준 뒤 매번 동의를 기다립니다.
이 컴퓨터의 VS Code에 MCP server Marina rules을 설치해 주세요. 순서대로: 1) uv --version로 uv가 있는지 확인. 없으면 https://docs.astral.sh/uv/getting-started/installation/에서 설치하라고 알려 주고 직접 설치하지 마세요. 2) 이 설정만 사용하세요(PopNx MCP 확인 완료): { "servers": { "marina-rules": { "type": "stdio", "command": "uvx", "args": [ "marina-rules", "mcp" ] } } } 3) 바꿀 파일의 전체 경로나 실행할 명령을 알려 주고 제 동의를 기다리세요. 4) 키는 필요 없습니다. 5) 합의한 대로 실행한 뒤 Marina rules의 도구가 실제로 보이는지 확인하세요.이 메시지에는 키가 없습니다. 키가 필요하면 AI가 파일이나 앱 입력란에 직접 붙여 넣으라고 안내합니다.
이미 설치했나요? 먼저 확인 · 터미널을 열고 이 명령을 입력한 뒤 Enter
uv --versionMac: ⌘ + Space를 누르고 Terminal 입력 후 Enter
Windows: 시작 메뉴를 열고 Windows PowerShell 입력 후 "열기"
아직 설치하지 않았다면: uv에는 클릭형 설치 파일이 없습니다. uv 공식 페이지에서 내 시스템(macOS 또는 Windows)용 한 줄 명령을 복사해 터미널에 붙여 넣으세요 · Python을 따로 설치할 필요 없이 uv가 필요할 때 자동으로 내려받습니다
설치가 끝나면 터미널을 닫았다가 다시 열고 같은 명령을 실행하세요. 버전 번호가 나와야 합니다: uv --version
한 번 설치하면 uv가 필요한 모든 도구에서 쓸 수 있습니다
Marina rules을 써서 나에게 무엇을 해 줄 수 있는지 알려 주고, 하나 해 봐✓ VS Code가 Marina rules을 쓰고 있다고 하거나 답에 Marina rules 도구 이름이 나오면 연결된 거예요
메뉴 이름은 2026년 11월 11일에 VS Code 도움말에서 확인 · 앱 버전에 따라 화면이 조금 다를 수 있어요
Claude Code
claude mcp add --scope user marina-rules -- uvx marina-rules mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"marina-rules": {
"command": "uvx",
"args": [
"marina-rules",
"mcp"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"marina-rules": {
"command": "uvx",
"args": [
"marina-rules",
"mcp"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"marina-rules": {
"type": "stdio",
"command": "uvx",
"args": [
"marina-rules",
"mcp"
]
}
}
}이 설정은 제작자의 레지스트리 정보로 만들었어요. README와 다르면 README를 따르세요.
pypi: marina-rules이 서버의 연결 방식과 각 앱의 공식 문서를 바탕으로 했어요. 2026년 11월 10일 확인.
내 컴퓨터에서 실행하는 앱
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
내 컴퓨터에서 실행돼요. 설치하면 AI 앱에 도구 목록이 나타나요.
누구나 볼 수 있는 정보를 점검했고, 코드는 읽지 않았어요. 해당하지 않는 항목은 개수에서 뺐어요. · 2026년 11월 20일 점검
레지스트리 이름이 GitHub 계정 David-Marina 기준으로 확인되었고, 이 계정이 저장소를 소유하고 있어요
코드 마지막 변경: 4일 전
MIT 사용
내 컴퓨터에서 실행되는 서버라 인터넷 엔드포인트가 없어요
내 컴퓨터에서 실행되며, 대신 로컬 설정을 사용해요
내 컴퓨터에서 실행돼요. 도구 목록은 인터넷 엔드포인트가 있는 서버에서만 읽을 수 있어요
OSV.dev에 marina-rules@2026.11.16 항목이 없습니다
이 버전의 패키지 자체만 확인하며 모든 의존성은 아닙니다 · 확인 2026년 11월 16일
제작자라면 이 코드를 README에 붙여 넣으세요. 배지는 이 페이지로 연결됩니다.
[](https://mcp.popnx.com/en/servers/david-marina-marina-rules)질문하고, 팁을 나누고, 안 되는 점을 알려 주세요. "도움이 됨"이 많은 순서예요.
아직 리뷰가 없어요
레지스트리에서 이 카테고리의 활성 서버 전체와 비교했어요. 스타는 게시자가 저장소를 소유한 경우에만 세요.
해당하는 기본 점검 3개 중 3개를 통과했어요. 코드는 읽지 않았어요. 키나 토큰을 넣기 전에 서버가 어떤 권한을 요구하는지 확인하고, 꼭 필요한 권한만 있는 키를 쓰세요.
레지스트리에 필수 키가 나와 있지 않아요. 다만 처음 쓸 때 로그인을 요구하는 서버도 있어요.
내 컴퓨터에서 실행돼요. AI 앱이 필요할 때 실행하고, 데이터는 제작자의 서버를 거치지 않아요(서버 자체가 온라인 서비스를 호출하는 경우는 제외).
GitHub 저장소는 마지막으로 4일 전 변경됐고, 최신 버전(2026.11.16)은 4일 전 레지스트리에 올라왔어요.
Claude Desktop, Claude Code, Cursor, VS Code처럼 MCP를 지원하는 앱에서 쓸 수 있어요. 내 컴퓨터에 Python (uv)도 있어야 해요.
같은 카테고리에는: SolidInvoice, Signal8, Journalit, Beancount.io, Tapetide - Indian Stock Market MCP
같은 카테고리, 다른 제작자, 명령 확인 완료. 공식이 먼저, 그다음 스타 순.
카드 보는 법:↓ 주간 다운로드i★ GitHub 스타i세 기둥: 리뷰 · 점검 · 사용 정도i업데이트 = 최신 버전을 레지스트리에 공개한 날i
Create and send invoices and quotes, manage clients, and track payments in SolidInvoice.
SEC filings, dilution, insider & institutional ownership, and political-trade data for AI agents.
Trading journal in Obsidian. Ask Claude or ChatGPT about your trades; edits are previewed first.
Query, edit, and reconcile a hosted Beancount ledger: BQL, reports, files, and bank imports.
48 tools for ~8,000 NSE & BSE stocks: quotes, screener, financials, filings, FII/DII, options
| 이 항목 Marina rules | SolidInvoice | Signal8 | Journalit | Beancount.io | Tapetide - Indian Stock Market MCP | |
|---|---|---|---|---|---|---|
| 실행 위치 | 컴퓨터에 설치 필요 | 클라우드에서 동작, 설치 불필요 | 클라우드 또는 컴퓨터 설치 모두 가능 | 클라우드에서 동작, 설치 불필요 | 클라우드에서 동작, 설치 불필요 | 클라우드 또는 컴퓨터 설치 모두 가능 |
| 키 필요 | 아니요 | 아니요 | 예 | 아니요 | 아니요 | 예 |
| Claude에서 +로 추가 | 아니요 | 아니요 | 아니요 | 아니요 | 아니요 | 아니요 |
| 기본 점검 | 3/3 | 4/6 | 5/5 | 4/4 | 4/4 | 5/5 |
| 라이선스 | MIT | MIT | MIT | NOASSERTION | MIT | MIT |
| 가격 | 등록 정보에 비용 없음 | 등록 정보에 비용 없음 | 등록 정보에 비용 없음 | 등록 정보에 비용 없음 | 등록 정보에 비용 없음 | 등록 정보에 비용 없음 |
제작자의 저장소에서 쓰인 그대로 가져왔어요. PopNx MCP가 검토하거나 보증한 내용이 아니에요. HTML, 이미지, 스크립트는 제거했어요. 링크를 누르면 이 사이트를 벗어나요.
Auditable backtests: the exchange trading rules in force on each day, as data with sources.
Price limits, fees, trading sessions, ticks, settlement — every record says *when* a rule took effect and *where* it was published. A backtest asks for the rule of each trade date instead of hard-coding today's; marina-check then verifies every fill against the rules of its day and, on a strict pass, emits a stamp that anyone holding the same fill log and the same rules version can recompute; citation() names the exact, byte-pinned rules a result ran under.
What a stamp certifies is deliberately narrow: the fills respected these rules. It says nothing about look-ahead in prices, survivorship or overfitting. as_of closes one more gap: it answers only from rules that had been published by a given date, so a backtest cannot use a rule change before it was announced (a rule whose publication date was not located is refused, not assumed).
Use it to check that a backtest applied the rules in force on each day — China A-share daily price limits (limit-up / limit-down), stamp duty and transfer fees, tick sizes and sessions; futures margins, limits and fees; Hong Kong and US equity rules — and to validate a fill log against them (marina-check). It holds rules only: no prices, index constituents, ST or suspension lists, adjustment factors or trading calendars.
中文 · 市场交易规则的「tzdata」:涨跌幅、费用、交易时段、tick 等制度从哪天起、依据什么,每条记录都带官方原文出处、引文和内容哈希。它给回测引擎和 AI Agent 用——查不到就报错,不猜;
coverage()预检整段窗口,resolve()返回统一判定,diff_rules告诉你升级后哪些回测要重跑。目前覆盖 A 股、中金所股指期货与国债期货、上期所 / 上期能源 / 郑商所 / 广期所商品期货(自 2024 年起)、港股和美股;大商所尚未覆盖,各市场的具体范围见 Coverage。CC0 数据 + MIT 代码。中文入门:README.zh-CN.md。
rules: marina-rules@2026.11.16 sha256:80188ec249ce22ae
Marina is to trading rules what the tz database is to time zones and what exchange_calendars is to trading days: small, boring, free, and meant to be the one copy everyone imports instead of the thousand copies everyone gets slightly wrong.
Status: 2026.11.16. 2873 records — 1421
verified, 1451single-source, 1unverified— each traced to primary sources with quotes and content hashes. Maturity differs by market: China A-share, CFFEX, SHFE and INE records are mostlyverified; CZCE, GFEX, Hong Kong and US records are mostlysingle-source— a first pass, to be read as such (counts per market, what the levels mean). China A-shares: price limits, fees, sessions, ticks and holding periods, measured from 2006-07-01; CFFEX stock-index futures from 2010; CFFEX treasury bond futures from 2013; SHFE (20 products, incl. night sessions), INE (5 products), CZCE (27 products, mostlysingle-source) and GFEX (5 products, no sessions yet): margin, price limits, fees and same-day round trips from 2024-01-01; Hong Kong shares and ETFs from 2010; US stocks and ETFs from 2010. DCE, crypto and other markets are not covered. Details per market: Coverage. Treat the exchange's own notice as authoritative, always.
What changed in each release, and which backtests a release asks you to re-run: CHANGELOG.md.
Every backtest engine, every trading agent, and every research notebook re-implements the same handful of rules — "ChiNext limit is 20%" — and a large share of them get the *date* wrong (it was 10% before 2020-08-24), the *scope* wrong (ST stocks differ), or the *rounding* wrong (exchanges round half-up; round() doesn't). These errors used to live in one firm's code. Now that AI agents write backtests by the thousand, the same error gets copied by the thousand.
A shared, cited, versioned table fixes this the way tzdata fixed time zones: not by being authoritative, but by being the same for everyone and traceable to the source.
examples/hardcoded_vs_marina.py prints six such fills side by side — the number a backtest gets from today's rule, and the number that applied on the trade date:
| fill | hard-coded with today's rule | rule of that day |
|---|---|---|
| ChiNext, 2020-08-21, previous close 10.00: limit-up / limit-down | 12.00 / 8.00 | 11.00 / 9.00 |
| ST main-board stock, 2024-06-14, previous close 10.00 | 11.00 / 9.00 | 10.50 / 9.50 |
| Main-board IPO in its first five days, 2024-01-30 | 11.00 / 9.00 | no limit |
| Sell 100,000 on 2008-04-23: stamp duty + transfer fee | 51.00 | 302.55 |
| Sell 100,000 on 2023-08-25 | 51.00 | 101.00 |
pip install marina-rules # self-contained: the dataset ships inside the wheel, byte-pinned
import marina_rules as mr
mr.rule_at("stamp_duty_sell", "2023-08-28") # 0.0005 mr.rule_at("price_limit_pct", "2020-08-23", "chinext", "XSHE") # 0.10 mr.limit_price(10.00, "chinext", "2021-03-01", "XSHE") # (12.0, 8.0) — exchange rounding mr.limit_price(10.00, "ipo_first5_main", "2024-01-30", "XSHG+XSHE") # None — unlimited band mr.rule_at("stamp_duty_sell", "2005-01-01") # KeyError — no defaults, ever mr.citation() # 'rules: marina-rules@ sha256:<16 hex>'
mr.coverage("XSHE", "chinext", ["price_limit_pct"], "2019-01-01", "2026-10-19")
Dates are ISO YYYY-MM-DD strings or date / datetime objects (a timestamp such as 2020-08-23 09:30:00 counts as its day). Any other spelling — 20200823, 2020/8/23, an integer — raises ValueError and names the ISO form. It is refused rather than parsed because record intervals are compared as ISO text: read as given, 20200102 would select the rule of a later period.
python -m marina_rules.diff <old> <new> # in a clone: what changed, and what must be re-run; git tags or data directories
A rule is answered only under the name it is recorded with, for a scope that exists. Look the names up instead of guessing them — from Python or from the command line (marina-rules and python -m marina_rules are the same program):
mr.scopes() # scope → description, and the context it requires ("hk" / "us" for those registries)
mr.rules_for("cffex_if", "CCFX") # {'margin_ratio': [[from, to], …], 'price_limit_pct_of_prev_settlement': […], …} mr.statutory_fee_floor(86420.00, "sell", "2023-08-28", "XSHG") # 44.0742 — stamp duty + transfer fee of one fill mr.statutory_fee_components(86420.00, "sell", "2023-08-28", "XSHG") # the same, per rule, with record ids mr.skill_text() # the usage notes (SKILL.md) shipped inside the package
marina-rules # lists the subcommands
marina-rules scopes # add hk or us for those registries marina-rules rules cffex_if CCFX # rule names of one scope, first / last date (--intervals for all) marina-rules query price_limit_pct 2024-06-14 st_main XSHE --context board=main_board,st_status=true marina-rules fees 86420 sell 2023-08-28 XSHG # components, record ids and their sum marina-rules skill # the usage notes
When a lookup finds nothing, the refusal says what does exist: a KeyError message names the rules the scope has (or the intervals the rule has), and a decision from resolve() carries the same as alternatives (scope_rules, similar_rules, rule_intervals, similar_scopes). Names only, never a value — a similar name is a different rule (price_limit_pct is a fraction of the previous close; futures scopes carry price_limit_pct_of_prev_settlement), so read its definition and ask again. tick_size falls back to the stock family for mainland securities scopes only: a futures, Hong Kong or US scope asked for tick_size is refused.
coverage() answers "can Marina serve every (rule, day) in this window for this scope?" — complete, partial (with the exact gaps), or unsupported. It also tells you what you must already know about each security to select the scope legitimately (required_context): Marina holds rules, never a security's ST or listing history, and it will not guess them for you. Gaps carry known_gap_ids when they match data/cn/known_gaps.yaml (Hong Kong: data/hk/known_gaps.yaml; US: data/us/known_gaps.yaml) — the list of things Marina knows it does not cover (pre-2006 sessions and convertibles, the 2013 T+0 switch for bond/money/gold ETFs…), each with a reason and a status, so "unsupported" can be cited rather than worked around. Agents: read SKILL.md.
The data is plain YAML under data/. You do not need the Python package; read the files from any language.
The same questions can be put to the dataset by an AI assistant through the Model Context Protocol, without writing code. The server runs locally over stdio.
pip install "marina-rules[mcp]" # adds the MCP Python SDK; the server needs Python 3.10+, the rest of the package 3.9+
marina-rules-mcp # the same server: marina-rules mcp, python -m marina_rules.mcp_server
Add it to the MCP client's configuration (most clients read this mcpServers shape; where the file lives differs per client). If the client does not start in the environment where the package is installed, give the full path to marina-rules-mcp.
{
"mcpServers": { "marina-rules": {"command": "marina-rules-mcp"} } }
| tool | answers |
|---|---|
resolve | one rule on one trading day for one scope: the decision of resolve(), acted on only when status is DETERMINED |
limit_price | limit-up / limit-down price from the previous close; unlimited: true when no daily limit applied |
statutory_fees | stamp duty and transfer fee of one A-share stock fill, per component and summed (commission not included) |
coverage | whether every (rule, day) of a backtest window can be answered for a scope, with the gaps |
list_scopes | the scopes of cn, hk or us and the context each requires |
list_rules | the rule names a scope holds, with their first and last dates |
check_fills | the marina-check checks on up to 500 fills passed inline as JSON (not a file path) |
citation | the citation line and version of the dataset |
Every answer carries citation. Arguments the library refuses (a date not written YYYY-MM-DD, an unknown side) and questions with no record in force come back as tool errors whose text says what to change or what is missing; no value is filled in. The usage notes (SKILL.md) are offered as the resource marina-rules://skill.
What it does not do: it is read-only and deterministic, uses no network, and reads no file but the dataset shipped in the package. Like the package, it holds rules only — no prices, ST or suspension lists, constituents or trading calendar; a security's board, ST status and listing day are the caller's to supply.
<!-- mcp-name: