Test FIX Protocol with curl

The short answer is yes. You can send raw FIX messages over HTTP using curl via the FIXSIM REST API. No FIX engine required, no socket connection, no session handshake. Just an HTTP POST with a FIX message string in the body and an execution report comes back on the FIXSIM side.

This is useful for smoke tests, regression suites in CI/CD pipelines, and any situation where you want to inject a specific FIX message without spinning up a full FIX session.


What You Need

  • A FIXSIM account (free 7-day trial, no credit card)
  • Your instance name
  • Your session name
  • Your API key (available in the FIXSIM portal)

Sending a FIX Message with curl

The endpoint accepts a JSON body with a fixMessages array containing raw FIX strings. Use a pipe character | as the SOH delimiter -- the API handles the conversion.

Send a New Order Single (35=D):

curl -X POST "https://portal.fixsim.com/v1/RawMessages/{instance}/{session}" \
  -H "Content-Type: application/json" \
  -H "apiKey: YOUR_API_KEY" \
  -d '{
    "fixMessages": [
      "8=FIX.4.4|9=148|35=D|34=1|49=OMS|52=20240115-14:30:01.000|56=BROKER|11=ORD-001|21=1|38=500|40=2|44=150.25|54=1|55=AAPL|60=20240115-14:30:01.000|10=088|"
    ]
  }'

Replace {instance}, {session}, and YOUR_API_KEY with your account values from the portal.


Sending Multiple Messages in One Call

The fixMessages field is an array, so you can replay an entire sequence in a single POST. Useful for testing how your system handles a full order lifecycle:

curl -X POST "https://portal.fixsim.com/v1/RawMessages/{instance}/{session}" \
  -H "Content-Type: application/json" \
  -H "apiKey: YOUR_API_KEY" \
  -d '{
    "fixMessages": [
      "8=FIX.4.4|9=148|35=D|34=1|49=OMS|52=20240115-14:30:01.000|56=BROKER|11=ORD-001|21=1|38=500|40=2|44=150.25|54=1|55=AAPL|60=20240115-14:30:01.000|10=088|",
      "8=FIX.4.4|9=130|35=F|34=2|49=OMS|52=20240115-14:31:00.000|56=BROKER|11=ORD-002|37=BRKR-001|38=500|41=ORD-001|54=1|55=AAPL|60=20240115-14:31:00.000|10=134|"
    ]
  }'

Messages are processed in order. FIXSIM responds to each one according to your session's rule configuration.


Plugging it into CI/CD

The curl approach works well as a post-deploy smoke test. After pushing a build, hit the endpoint with a known set of messages and verify the responses match expectations. No FIX session to manage, no ports to open in your test environment, just an HTTP call you can run from any CI runner.

A basic shell script pattern:

#!/bin/bash
INSTANCE="your-instance"
SESSION="your-session"
API_KEY="your-api-key"

RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" \
  -X POST "https://portal.fixsim.com/v1/RawMessages/$INSTANCE/$SESSION" \
  -H "Content-Type: application/json" \
  -H "apiKey: $API_KEY" \
  -d '{"fixMessages": ["8=FIX.4.4|9=148|35=D|34=1|49=OMS|52=20240115-14:30:01.000|56=BROKER|11=ORD-001|21=1|38=500|40=2|44=150.25|54=1|55=AAPL|60=20240115-14:30:01.000|10=088|"]}')

if [ "$RESPONSE" -eq 200 ]; then
  echo "FIX smoke test passed"
else
  echo "FIX smoke test failed: HTTP $RESPONSE"
  exit 1
fi

When to Use curl vs a Full FIX Session

The REST API and a live FIX session test different things. Neither replaces the other.

Use curl when... Use a full FIX session when...
You need a quick smoke test after a deploy You need to test logon/logout workflows
You're running automated regression in CI/CD You need to test sequence number handling and gap detection
You want to inject a specific message without session overhead You need to test heartbeat and session recovery behavior
You're testing application layer logic only You're certifying a full FIX implementation end-to-end

Ready to try it?

Start a free FIXSIM trial and get your API key in minutes. No credit card required.

Start Free Trial →

Full API reference is available in the FIXSIM API docs (login required).


Test and Simulate FIX Order Flow Before Production

99.9% Uptime Web Based Fully Responsive Monthly Subscriptions