Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ go.work.sum

# Project specific
tmp/
# 公式APIドキュメントのローカルキャッシュ(make docs-sync で取得)
docs/v2/

# IDE specific files
.idea/
Expand Down
5 changes: 3 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ J-Quants API v2(日本の株式市場データを提供するAPI)のGoクラ

**重要**: J-Quants APIの仕様を確認する際は、以下の順序で参照してください:

1. **最初に必ず`docs/v2/`ディレクトリを確認** - このリポジトリ内のv2 APIドキュメント
1. **最初に必ず`docs/v2/`ディレクトリを確認** - 公式ドキュメントのローカルキャッシュ(gitignore対象)。存在しない・古い場合は `make docs-sync` で取得
2. **不明な点がある場合のみ**: https://jpx-jquants.com/ja/spec/ - 公式APIリファレンス(各ページはURL末尾に`.md`を付けるとMarkdownで直接取得可能。例: https://jpx-jquants.com/ja/spec/eq-bars-daily.md )

## 開発コマンド
Expand All @@ -23,12 +23,13 @@ make test-cover # カバレッジ付きテスト
make lint # リント
make test-e2e # E2Eテスト(JQUANTS_API_KEY が必要)
make test-run TEST=TestQuotesService_GetDailyQuotes # 特定のテスト
make docs-sync # 公式APIドキュメントを docs/v2/ に同期
```

## 新しいAPIサービスの追加時の注意

- `jquants.go`の`JQuantsAPI`構造体への登録を忘れない(忘れてもコンパイルは通る)
- `docs/v2/`ディレクトリにドキュメントを追加する
- `make docs-sync` で対象APIの最新ドキュメントを取得して参照する

## 実装上の注意点

Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help test test-v test-cover test-e2e test-e2e-v lint clean install-tools check
.PHONY: help test test-v test-cover test-e2e test-e2e-v lint clean install-tools check docs-sync

# デフォルトターゲット
help:
Expand All @@ -12,6 +12,7 @@ help:
@echo " make lint - golangci-lintでコードをチェック"
@echo " make clean - テスト成果物をクリーン"
@echo " make install-tools - 開発ツールをインストール"
@echo " make docs-sync - 公式APIドキュメントを docs/v2/ に同期"

# コンパイルチェック(ビルドはしない)
check:
Expand Down Expand Up @@ -78,4 +79,8 @@ mod-tidy:

# 依存関係のダウンロード
mod-download:
go mod download
go mod download

# 公式APIドキュメントを docs/v2/ に同期(ローカルキャッシュ。コミットしない)
docs-sync:
./scripts/sync-docs.sh
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ make test-e2e
jquants/
├── client/ # HTTPクライアント(認証含む)
├── types/ # カスタム型定義
├── docs/ # APIドキュメント
│ └── v2/ # v2 APIドキュメント
├── docs/v2/ # 公式APIドキュメントのローカルキャッシュ(make docs-sync で取得)
├── scripts/ # 開発用スクリプト
├── test/e2e/ # E2Eテスト
├── *.go # 各APIサービス実装
└── Makefile # ビルドタスク
Expand Down Expand Up @@ -295,7 +295,7 @@ quote.Open, quote.High, quote.Low, quote.Close
quote.O, quote.H, quote.L, quote.C
```

詳細は `docs/v2/migration-v1-v2.md` を参照してください。
詳細は[公式の移行ガイド](https://jpx-jquants.com/ja/spec/migration-v1-v2)を参照してください。

## エラーハンドリング

Expand Down
98 changes: 0 additions & 98 deletions docs/v1/announcement.md

This file was deleted.

147 changes: 0 additions & 147 deletions docs/v1/breakdown.md

This file was deleted.

Loading
Loading