Sem descrição

Lukas Goldschmidt 69b2228c1f fix há 3 semanas atrás
src 69b2228c1f fix há 3 semanas atrás
tests 484485ccee Add short-lived Bitstamp caches há 1 mês atrás
.gitignore 4819fc5395 Initial exec-mcp scaffold há 1 mês atrás
CHANGELOG.md 8d4012c315 Document v0.5.0 exec milestone há 1 mês atrás
DB_SCHEME.md 804ca8ec2d Add Bitstamp order and websocket flow há 1 mês atrás
ORDER_PROTOCOL.md 804ca8ec2d Add Bitstamp order and websocket flow há 1 mês atrás
PROJECT.md 4819fc5395 Initial exec-mcp scaffold há 1 mês atrás
README.md 8d4012c315 Document v0.5.0 exec milestone há 1 mês atrás
app.py 4819fc5395 Initial exec-mcp scaffold há 1 mês atrás
bitstamp_api_docs.md 2599530764 websocket, get_account_info há 1 mês atrás
bitstamp_websocket_api.md 2599530764 websocket, get_account_info há 1 mês atrás
killserver.sh 4819fc5395 Initial exec-mcp scaffold há 1 mês atrás
pyproject.toml 8d4012c315 Document v0.5.0 exec milestone há 1 mês atrás
requirements.txt 49b43ec541 Stabilize exec-mcp schema and dashboard há 1 mês atrás
restart.sh 4819fc5395 Initial exec-mcp scaffold há 1 mês atrás
run.sh 4819fc5395 Initial exec-mcp scaffold há 1 mês atrás
test_stress.sh 273606c115 Cache Bitstamp clients per account há 1 mês atrás
tests.sh 13c3041b0a stable há 1 mês atrás

README.md

exec-mcp v0.5.0

Release notes

This release reflects the execution layer becoming stable and production-usable:

  • nonce handling no longer produces the earlier 403 auth failures
  • exchange communication is stable again
  • real fee data is used for sizing on the trader side
  • order placement, query, and cancel paths are reliable
  • account and order recovery behaviour is more robust after reconnects and restarts

Execution MCP for Trader27.

This service is the order-and-account layer of the stack. It owns exchange access, account metadata, balances, fee schedules, precision/step rules, and the actual order lifecycle.

Role in the stack

  • Crypto MCP: market data, indicators, technical context
  • News MCP: sentiment, events, background context
  • Trader / Strategy client: strategy logic, UI, internal loop, decision making
  • Exec MCP: authenticated execution, account routing, order placement, query, cancel, metadata

What this server should do

  • List configured accounts, optionally filtered by exchange
  • Expose account metadata, balances, commissions, and exchange-specific limits
  • Expose read-only market/currency discovery helpers
  • Keep the public MCP surface read-only for discovery, with execution tools for orders
  • Use the dashboard for adding, updating, enabling, disabling, and deleting accounts
  • Store credentials separately from account metadata
  • Record balance snapshots over time internally
  • Support multiple exchanges and subaccounts
  • Keep credentials isolated from strategy and UI layers
  • Provide a stable API for strategy engines and operator UIs

Current capabilities

  • FastMCP-based service
  • clear separation from strategy logic
  • safe credential handling
  • exchange-agnostic account abstraction
  • paper-trading friendly architecture
  • observability, auditability, and restart safety

Implemented pieces

  • account CRUD in the dashboard
  • Bitstamp market/currency metadata cache
  • account info lookup
  • order placement, query, and cancel
  • client-scoped open-order recovery via client_id
  • bulk cancel that skips stale exchange-missing rows and marks them locally

Dashboard shape

  • GET / shows a minimal landing page with links
  • GET /dashboard shows the HTML dashboard
  • the dashboard creates, updates, and deletes accounts with forms
  • the add-account section starts collapsed, since it is only used occasionally
  • the visible account reference is the exchange-side identifier, for example the Bitstamp numeric user id
  • the internal database primary key is separate and hidden from the web UI
  • the name field is the arbitrary label you choose for that account

Notes

This project is intended to stay lightweight at the FastMCP boundary and push exchange-specific details into adapter modules.

Bitstamp reference docs

A local copy of the Bitstamp WebSocket API docs lives at bitstamp_websocket_api.md in the project root. Use that as the primary reference for live market data, private streams, and reconnect behavior.

The older REST reference file is still present too, but the websocket doc is the one to follow for the next integration step.

Bitstamp metadata cache

The app now persists Bitstamp metadata tables and refreshes them on startup, then once a day in the background:

  • GET /api/v2/currencies/
  • GET /api/v2/markets/

These are stored in SQLite for reuse across restarts.

Bitstamp websocket prices

exec-mcp no longer owns public live-price streaming. Price lookup is expected to come from crypto MCP's cached get_price path when needed.

exec-mcp keeps only the Bitstamp private websocket needed for order state updates.

Order recovery notes

  • client_id is optional on place_order and is stored on the local order record.
  • get_open_orders(account_id, client_id=None) filters by client_id when supplied.
  • cancel_all_orders(account_id, client_id=None) cancels all open orders for the account, and if an exchange order is already missing it is marked locally so it no longer appears open.
  • expire_time is optional, no expire_time means a normal order, and expire_time means a GTD order.