fixparser-plugin-cli
v9.4.11
Published
FIXParser CLI Plugin (Local/Remote)
Maintainers
Readme
FIXParser CLI Plugin
FIXParser CLI is a command-line plugin for the FIXParser ecosystem, designed to let AI agents, shell scripts, and terminal-based tools interact with the FIX Protocol via simple bash commands.
What is FIXParser CLI?
FIXParser CLI exposes the same capabilities as FIXParser MCP (parsing, order management, market data, technical analysis) but through a plain command-line interface. Any tool that can run a shell command can use it -- no special protocol required.
This means:
- Claude Code, terminal agents, and shell scripts can call it the same way they call
gitorcurl - CI/CD pipelines and cron jobs can parse FIX messages or automate trading workflows
- Any agent framework with shell access gets FIX Protocol support with zero integration effort
Installation
npm install -g fixparser-plugin-cliOr use it directly with npx:
npx fixparser-plugin-cli parse "8=FIX.4.4|9=148|35=D|..."Commands
Offline Commands (no FIX server needed)
# Parse a FIX message to human-readable description
fixparser-cli-local parse "8=FIX.4.4|9=148|35=D|49=SENDER|56=TARGET|11=ord1|55=AAPL|54=1|38=100|40=2|44=150.50|10=000|"
# Parse a FIX message to JSON
fixparser-cli-local to-json "8=FIX.4.4|9=148|35=D|49=SENDER|56=TARGET|11=ord1|55=AAPL|54=1|38=100|40=2|44=150.50|10=000|"Online Commands (require FIX server connection)
Set environment variables first:
export FIXPARSER_LICENSE_KEY="your-key"
export FIXPARSER_HOST="localhost"
export FIXPARSER_PORT="5001"
export FIXPARSER_SENDER="SENDER"
export FIXPARSER_TARGET="TARGET"Then run commands:
# Request market data
fixparser-cli-local market-data --symbols AAPL,GOOGL --mdReqID req1 --mdUpdateType 0 --subscriptionRequestType 1
# Verify an order (two-step safety: verify first, then execute)
fixparser-cli-local verify-order --clOrdID ord1 --symbol AAPL --side 1 --quantity 100 --price 150.50 --ordType 2 --handlInst 1 --timeInForce 0
# Execute the verified order
fixparser-cli-local execute-order --clOrdID ord1 --symbol AAPL --side 1 --quantity 100 --price 150.50 --ordType 2 --handlInst 1 --timeInForce 0
# Generate a price chart
fixparser-cli-local graph --symbol AAPL
# Get price history
fixparser-cli-local price-history --symbol AAPL
# Run comprehensive technical analysis (40+ indicators)
fixparser-cli-local analysis --symbol AAPLEach online command connects to the FIX server, logs on, runs the command, prints the result to stdout, and exits.
Usage with AI Agents
Claude Code / Terminal Agents
Claude Code has a bash tool and can call any CLI on the machine. A typical agent interaction:
User: "Parse this FIX message and tell me what it means: 8=FIX.4.4|9=148|35=D|..."
Agent runs:
fixparser-cli-local parse "8=FIX.4.4|9=148|35=D|..."Agent reads stdout, explains the result to the user.
For trading:
User: "Buy 100 shares of AAPL at 150.50 limit"
Agent runs:
fixparser-cli-local verify-order --clOrdID ord1 --symbol AAPL --side 1 --quantity 100 --price 150.50 --ordType 2 --handlInst 1 --timeInForce 0Agent shows verification to user, asks for confirmation
Agent runs:
fixparser-cli-local execute-order --clOrdID ord1 ...
The agent doesn't need MCP support, a special protocol, or a persistent connection. It just shells out.
Long-Running Mode (RemoteServer)
For agents that need to make many requests without reconnecting each time, use the long-running server:
npm start
# or
node -r dotenv/config build/esm/RemoteServer.mjsThen pipe newline-delimited JSON commands via stdin:
{"command": "marketDataRequest", "args": {"symbols": ["AAPL"], "mdReqID": "req1", "mdUpdateType": "0", "subscriptionRequestType": "1"}}
{"command": "technicalAnalysis", "args": {"symbol": "AAPL"}}Each line gets a JSON response on stdout. The connection stays alive, price history accumulates, and analysis/graph/price-history commands can use it.
Programmatic Usage
The CLI plugin can also be used as a library in your own Node.js code:
import { FIXParser, LicenseManager } from 'fixparser';
import { CLI } from 'fixparser-plugin-cli';
await LicenseManager.setLicenseKey('your-key');
const cliPlugin = new CLI({ onReady: () => console.log('Ready') });
const parser = new FIXParser({
plugins: [cliPlugin],
});
// Connect to FIX server...
// Then execute commands programmatically:
const result = await cliPlugin.executeCommand('parse', {
fixString: '8=FIX.4.4|9=148|35=D|...',
});
console.log(result.content[0].text);Command Reference
| Command | Description | Connection |
|---|---|---|
| parse <msg> | Parse FIX message to human-readable | Offline |
| to-json <msg> | Parse FIX message to JSON | Offline |
| verify-order [opts] | Verify order parameters | Online |
| execute-order [opts] | Execute a verified order | Online |
| market-data [opts] | Request market data | Online |
| graph --symbol <sym> | Generate price chart | Online |
| price-history --symbol <sym> | Get price history | Online |
| analysis --symbol <sym> | Technical analysis (40+ indicators) | Online |
| help | Show usage | -- |
Environment Variables
| Variable | Description | Default |
|---|---|---|
| FIXPARSER_LICENSE_KEY | FIXParser license key | (required for online) |
| FIXPARSER_HOST | FIX server host | localhost |
| FIXPARSER_PORT | FIX server port | 5001 |
| FIXPARSER_SENDER | SenderCompID | SENDER |
| FIXPARSER_TARGET | TargetCompID | TARGET |
MCP vs CLI -- When to Use Which
| Scenario | Use | |---|---| | Claude Desktop, Cursor, Windsurf | MCP -- they speak MCP natively | | Claude Code, terminal agents, shell scripts | CLI -- just bash | | CI/CD pipelines, cron jobs | CLI -- scriptable | | Custom agent frameworks with shell access | CLI -- no protocol dependency |
Same logic, same capabilities, different interface. Both plugins share the same underlying tool handlers, indicators, and analytics engine.
Learn More
Copyright
Copyright 2025 FIXParser Ltd. Released under Commercial license. Check LICENSE.md.
