Skip to main content
Glama

Controtto

by contre95

📊 コントロット

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_PORTCONTROTTO_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 '{}')

ビルドと実行

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を使用する場合は、 podmandockerに置き換えるだけです。

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 を使用します。
-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Golang コードを解釈し、最も厳格な DDD とクリーン アーキテクチャ パラギドムに基づいて判断することができます。

  1. デモ
    1. ビルドと実行
      1. 開発環境
        1. ポッドマンで走る
          1. テストを実行する
            1. やるべきこと

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            Go server implementing Model Context Protocol (MCP) for filesystem operations.
            Last updated -
            410
            Go
            MIT License
          • -
            security
            A
            license
            -
            quality
            godoc-mcp is a Model Context Protocol (MCP) server that provides efficient access to Go documentation. It helps LLMs understand Go projects by providing direct access to package documentation without needing to read entire source files.
            Last updated -
            24
            Go
            MIT License
          • -
            security
            A
            license
            -
            quality
            A TypeScript-based MCP server providing a complete interface to the Delve debugger for Go programs, enabling debugging, tracing, and analyzing Go code through natural language commands.
            Last updated -
            1
            TypeScript
            MIT License
            • Linux
            • Apple
          • -
            security
            -
            license
            -
            quality
            A Model Context Protocol (MCP) server that allows AI assistants like Claude to interact with Go's Language Server Protocol (LSP) and benefit from advanced Go code analysis features.
            Last updated -
            Go
            Apache 2.0

          View all related MCP servers

          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