Quickstart
This content is not available in your language yet.
This walkthrough takes you from a fresh install to a running paper bot, a triggered limit refusal, a daily report, and an offline-verified signed record — with no broker account and no real money involved.
1. Install and check the binary
Section titled “1. Install and check the binary”Install via pip (or unpack the standalone Go binary):
pip install geometer-marketsgeometer-markets --version2. Create a paper workspace
Section titled “2. Create a paper workspace”Create a clean directory and run geometer-markets init:
mkdir paper-demo && cd paper-demogeometer-markets initAnswer the four prompts:
- Broker:
paper - Limits: review the generic default caps, adjust any values you want, and confirm
- Target:
local - Language:
python
Copy the printed gm_paper_... local key and export it in your shell:
export GEOMETER_GUARD_KEY="gm_paper_a1b2c3d4_your_generated_secret"Keep note of the printed 64-character hex signer_pub_key as well.
3. Run a deterministic backtest
Section titled “3. Run a deterministic backtest”Run the generated starter strategy (bot.py) offline against bundled synthetic bars:
geometer-markets backtest \ --strategy "python3 bot.py" \ --limits ./limits.json \ --data ./synthetic_niftybees_5m.jsonlRun the exact same command a second time. Both runs print the identical SHA-256 backtest digest because the engine uses exact decimal math and a deterministic clock. Backtest uses the same risk gate and limits.json as live mode.
4. Start the local Order Guard in paper mode
Section titled “4. Start the local Order Guard in paper mode”In one terminal window, start the Order Guard:
geometer-markets guard --data-dir .The guard listens strictly on 127.0.0.1:7878 and connects to the local simulated paper venue. Confirm it is up:
curl -s http://127.0.0.1:7878/healthz# {"status":"ok"}5. Run the paper bot and watch a limit check
Section titled “5. Run the paper bot and watch a limit check”In a second terminal (with GEOMETER_GUARD_KEY exported), start your starter bot in paper mode:
geometer-markets paper --strategy "python3 bot.py" --guard http://127.0.0.1:7878Every target position from bot.py becomes a guarded order sent over http://127.0.0.1:7878/v1/orders.
You can also test a limit refusal directly using curl. The request below intentionally asks for an order value larger than the default max_order_value_inr (50000):
curl -s -X POST http://127.0.0.1:7878/v1/orders \ -H "Authorization: Bearer $GEOMETER_GUARD_KEY" \ -H "Content-Type: application/json" \ -d '{ "client_order_id": "demo_refusal_0001", "account_id": "default", "strategy_id": "example-bot", "instrument": "NSE:NIFTYBEES", "side": "buy", "order_type": "limit", "product": "delivery", "quantity": "1000", "price": "260.00" }'The guard refuses the order before it reaches the venue and responds with structured JSON naming the exact rule and a deterministic decision_id:
{ "refused": { "code": "order_notional_cap", "message": "Order value 260000 INR exceeds per-order limit 50000 INR.", "limit": "order_notional_cap", "decision_id": "dec_019b8c7d6e5f4a3b2c1d0e9f8a7b6c5d" }}Both approved orders and refused decisions are written to your signed record.
6. Test the human stop switch
Section titled “6. Test the human stop switch”Engage the stop switch from your terminal (this talks over the privileged local Unix socket guard-admin.sock, never the bot HTTP key):
geometer-markets kill --data-dir . --scope account --target default --mode no_new_risk --reason "quickstart drill"Any new opening order sent with $GEOMETER_GUARD_KEY is now refused with stop_switch_active, while cancellations and risk-reducing orders remain allowed. A bot key can never clear this switch; only you at the terminal can re-arm it:
geometer-markets kill --data-dir . --scope account --target default --mode normal --reason "drill complete"7. Generate the report and verify the record offline
Section titled “7. Generate the report and verify the record offline”Write a checkpoint (the guard also writes checkpoints automatically at daily close, on stop-switch changes, and on clean shutdown), generate a local report, and verify the chain offline:
geometer-markets record checkpoint --data-dir . --account default --mode papergeometer-markets report --data-dir . --account default --mode papergeometer-markets verify ./records/default/paper --expect-key <your-64-hex-signer-pub-key>geometer-markets verify exits 0 after checking canonical JSON, sequence continuity, every SHA-256 entry_hash and prev_hash, and every Ed25519 checkpoint signature. Change even one byte in records/default/paper/segments/*.jsonl and run verify again to watch it exit 1 with the exact failing sequence number.
Where to go next
Section titled “Where to go next”- Configure every rule in Limits and the Order Guard.
- Provision a dedicated Mumbai IPv6 address in Static IPv6 address.
- Connect a live Indian broker in Brokers and daily sessions.
- Write custom strategies in Strategies in Python.