📊 コントロット
Go、HTML、 JavaScriptなしで作成された、セルフホスト型の損益トラッカーです。Controttoは、トランザクションを追跡してSQLiteファイルに保存し、以下のような様々な計算結果を返します。
平均購入価格
現在の資産価値
取引履歴
輸入/輸出取引(サンプル参照)
損益
資産の価格を取得するために、Controtto は主に 4 つの API に依存しています (コードを参照)。
Binance - パブリック API、トークンは不要です。
BingX - パブリック API、トークンは必要ありません。
Alpha Vantage - 株式、無料ですがレート制限が短いです。(トークンを取得して
CONTROTTO_AVANTAGE_TOKENを設定してください)Tiingo - 株式、暗号通貨、外国為替。(アカウント/トークンを作成し、
CONTROTTO_TIINGO_TOKENを設定してください)
デモ
また、 demo.contre.ioでデモを確認することもできます。データベースは 1 時間ごとにリセットされます。
https://github.com/user-attachments/assets/28bf8782-6118-47c0-a94b-085e1a7045b2
すべての設定は.envファイルで設定され、環境変数として渡されます。変数CONTROTTO_PORTとCONTROTTO_DB_PATHが利用可能です。
# Install the dependencies
go mod tidy
# Set the .env
mv .env.example .env
# Source the env variables
. <(cat .env | grep -v -e '^$' | grep -v "#" | awk '{}')Related MCP server: gopls-mcp
ビルドと実行
go run ./cmd/main.go # go build ./cmd/main.go to just build it開発環境
go install github.com/cosmtrek/air@latest # Download air
air -c air.tomlそしてlocalhost:3000にアクセスします
ポッドマンで走る
コンテナイメージはDockerのパブリックレジストリから入手できます。Dockerを使用する場合は、 podmanをdockerに置き換えるだけです。
mkdir data
podman container run --rm -p 8000:8000 -v $(pwd)/data:/data contre95/controttoテストを実行する
go test -cover ./...
# Expected result
# ? controtto/cmd [no test files]
# ? controtto/src/app/managing [no test files]
# ? controtto/src/domain/pnl [no test files]
# ? controtto/src/gateways/markets [no test files]
# ? controtto/src/gateways/sqlite [no test files]
# ? controtto/src/presenters [no test files]
# ok controtto/src/app/querying 0.003s coverage: 40.7% of statementsやるべきこと
さらなるテスト
ログとメトリックのラッパーも便利です。
総純資産を追跡するためにアカウントを追加します。
すべての CSS を削除し、カスタム
style.css+ Tailwind CDN を使用します。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Appeared in Searches
- Information about the Go programming language
- Gin web framework for Go programming language
- Tips for Naming Variables and Functions in Go Programming Language
- Using separate agents for schema validation, code standards, and directory structure enforcement in development workflows
- How to compile code in Visual Studio
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/contre95/controtto'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
