Create, import, and manage DAS Trader hotkeys with a clean, version-friendly workflow in VS Code. This extension turns Hotkey.htk into readable .das scripts plus a canonical keymap.yaml, and compiles them back into deterministic Hotkey.htk output.
DAS Trader Hotkey Tools helps active DAS Trader users manage complex hotkeys without editing Hotkey.htk by hand. It exists to address limitations of the built-in DAS Trader editor when managing large, complex script libraries. You can import legacy Hotkey.htk files, edit scripts with language support and linting, analyze dependencies, and rebuild output safely and deterministically.
Serious about day trading? You can find me on Discord here: https://discord.gg/UvZYTEGrvh
This extension is provided "as is" and is used at your own risk. It does not guarantee trading outcomes, and the author is not responsible for any losses or damages resulting from its use. Users are solely responsible for reviewing and validating all hotkeys and scripts before use in DAS Trader.
- Compile
.das+keymap.yamlinto deterministic Hotkey.htk - Import Hotkey.htk into editable scripts and a canonical keymap
- Advisory linting for risky patterns (non-blocking)
- Dependency navigation (callers/callees, cycles, unused scripts)
- Optional account placeholder substitution for safer sharing
- VS Code 1.107 or newer
- A workspace containing
.dasscripts andkeymap.yaml(for build) - A Hotkey.htk file (for import)
- Example .das script repository: https://github.com/madiver/DASTraderScripts
If you want a ready-to-run sample, open examples/sample-workspace from this repository. It includes:
keymap.yamlwith a single example entryhotkeys/example.das, a no-op script that returns immediately
- Open a workspace containing
.dasfiles. - Create
keymap.yamlat the workspace root withid,key,label, andscriptPath. - Set
dasHotkeyTools.outputPathin workspace settings. - Run
DAS: Build Hotkey File. - Confirm the output file is created at the configured path.
- Open the destination workspace in VS Code.
- Run
DAS: Import Hotkey File. - Select the source Hotkey.htk and destination folder.
- Follow prompts for conflict handling and optional round-trip verification.
- Confirm
keymap.yamlappears at the destination root and.dasfiles are inhotkeys/.
You can keep account numbers out of shared scripts by using exact tokens:
%%LIVE%%%%SIMULATED%%
During builds, these tokens are replaced in script bodies when user-level settings are provided. If a setting is missing, the build warns and leaves the token unchanged.
To prevent invalid output (and potential DAS Trader crashes), enable dasHotkeyTools.placeholders.failOnMissing so builds fail when placeholders are unresolved.
To exclude a script from builds, add this tag anywhere in the script:
// Ignore: True
The // Ignore: True tag is case-insensitive. Ignored scripts are skipped during builds even if they appear in keymap.yaml.
To preserve grouping during import, you can add a group tag in the top comment block of each .das file:
// Group: Buy orders: Ask+ SL
The // Group: tag is case-insensitive and used by the importer to group entries in the generated keymap.yaml.
When you manually replace the Hotkey.htk file in DAS Trader, close DAS Trader Pro first, replace the file, then restart the application so the new hotkeys are loaded.
| Command | Description |
|---|---|
| DAS: Build Hotkey File | Compile .das + keymap.yaml into Hotkey.htk |
| DAS: Import Hotkey File | Import Hotkey.htk into hotkeys/ + keymap.yaml |
| DAS: Lint Scripts | Run advisory linting for .das scripts |
| DAS: Analyze Dependencies | Build a dependency graph and summarize cycles/unused scripts |
| DAS: Show Callers | Show scripts that call the current .das file |
| DAS: Show Callees | Show scripts called by the current .das file |
Use the Settings UI:
- Open Settings (Ctrl+, / Cmd+,).
- Search for DAS Trader Hotkey Tools.
- Set workspace settings:
- Output Path
- Append Timestamp To Output (optional)
- Placeholders: Fail On Missing (recommended)
- Linting: Enabled
- Linting: Lint On Build (optional)
- Set user settings (placeholders):
- Live Account
- Simulated Account
If you prefer editing settings.json directly, use:
Workspace settings:
{
"dasHotkeyTools.outputPath": "C:\\temp\\Hotkey.htk",
"dasHotkeyTools.appendTimestampToOutput": false,
"dasHotkeyTools.placeholders.failOnMissing": true,
"dasHotkeyTools.linting.enabled": true,
"dasHotkeyTools.linting.debounceMs": 400,
"dasHotkeyTools.linting.maxFiles": 200,
"dasHotkeyTools.linting.maxChainDepth": 8,
"dasHotkeyTools.linting.lintOnBuild": false,
"dasHotkeyTools.linting.ruleOverrides": {}
}User settings (account placeholders):
{
"dasHotkeyTools.liveAccount": "LIVE-ACCOUNT-ID",
"dasHotkeyTools.simulatedAccount": "SIM-ACCOUNT-ID"
}Notes:
outputPathmay be absolute or workspace-relative (default:output.htk).appendTimestampToOutputappends a local timestamp inYYYYMMDD-HHmmssformat before the file extension.
keymap.yamlat the workspace root defines hotkey metadata..dasscripts can live anywhere, referenced byscriptPath.- Imports place scripts under
hotkeys/by default.
keymap.yamlis the source of truth for hotkey metadata.- Source scripts are never rewritten during build.
- Duplicate ids or key combinations fail compilation with actionable errors.
- Unreferenced
.dasfiles emit warnings but do not block output. - Linting is advisory only and never blocks compilation.
All workflows run locally and continue to work offline after installation.
This extension does not place trades, connect to DAS Trader APIs, or validate trading outcomes. Users retain responsibility for trading logic and account safety.
Licensed under the Apache License, Version 2.0. See LICENSE and NOTICE.
Report issues or request enhancements at: https://github.com/madiver/dasVSide/issues