GaiaExGaiaEx
API

Institutional FIX API (4.2 / 4.4 / 5.0 / 5.2)

Institutional FIX 4.2, 4.4, 5.0, and 5.2 connectivity: Order Entry (:9878), Real-Time Drop Copy (797=Y / 9406=Y), Market Data (:9879), and QuickFIX XML schema.

AI AGENT READYEquip Claude Code, OpenAI Codex & Antigravity (`agy`) with Official GaiaEx Skills
CLAUDE CODESKILL.md
Claude SKILL.md

Drop-in Claude Code skill with HMAC-SHA256 signing, /fapi/v1 & /fapi/v2 schemas, and secret-redaction guardrails.

Raw ↗
OPENAI CODEXAGENTS.md
Codex AGENTS.md

Drop-in repository AGENTS.md for OpenAI Codex CLI — tick-size rules, rate-limit budgets, and self-custody boundaries.

Raw ↗
ANTIGRAVITYAGY.md
Antigravity AGY.md

Google Antigravity (agy) & Gemini agent spec with verified async Python WebSocket + REST execution templates.

Raw ↗
UNIVERSAL LLMllms.txt
/llms.txt Index

Single-URL machine-readable index of all GaiaEx documentation pages, OpenAPI 3.0 schema, and Postman collection.

Raw ↗

1. Architecture & Multi-Version Overview

The GaiaEx Native C++26 Institutional FIX Gateway provides deterministic, ultra-low-latency Order Entry, Real-Time Drop Copy, Position & Order Inquiry, and L1/L2 Market Data streaming over persistent TCP/TLS sessions.

Download QuickFIX / OnixS XML Schema: /fix-dictionary.xml — compatible with QuickFIX (C++/Python/Go), QuickFIX/J, OnixS, OneZero, and institutional OMS platforms. Configure your client engine with ValidateUserDefinedFields=N and ValidateFieldsOutOfOrder=N for forward compatibility.

Gateway Session TypePortSupported VersionsCapabilitiesAccess Policy
Order Management (OE)9878FIX.4.2, FIX.4.4, FIX.5.0, FIX.5.2Order entry (35=D), Cancel (35=F), Amend (35=G), Mass Cancel (35=q), Order Status (35=H), Positions (35=AN), Rate Limits (35=XLQ), Instruments (35=x)Read + Trade API Key
Drop Copy (DC)9878FIX.4.2, FIX.4.4, FIX.5.0, FIX.5.2Real-time consolidated ExecutionReport (35=8) stream tagged with 797=Y and 9406=Y across all FIX and REST/HTTP ordersRead-Only Enforced (35=j rejects orders)
Market Data (MD)9879FIX.4.2, FIX.4.4, FIX.5.0, FIX.5.2Real-time L1/L2 Snapshot (35=W), IncrementalRefresh (35=X), and MarketDataRequestReject (35=Y)Read-Only Enforced (35=j rejects orders)

Version Negotiation & Wire Rules

FIX VersionBeginString (8)Logon Tag (35=A)App Header TagTrade ExecType (150)ExecTransType (20) Rule
FIX 4.28=FIX.4.2NoneNone150=1 (Partial), 150=2 (Fill)Mandatory (20=0 New, 20=3 Status)
FIX 4.48=FIX.4.4NoneNone150=F (Trade) w/ 39=1/2Forbidden (rejected via 35=3, 371=20, 373=2)
FIX 5.08=FIXT.1.11137=71128=7150=F (Trade) w/ 39=1/2Forbidden (rejected via 35=3, 371=20, 373=2)
FIX 5.2 (5.0 SP2)8=FIXT.1.11137=91128=9150=F (Trade) w/ 39=1/2Forbidden (rejected via 35=3, 371=20, 373=2)

2. Session Management & HMAC-SHA256 Logon (35=A)

Every FIX session begins with a Logon (35=A) frame authenticated via your GaiaEx API Key (Tag 553), API Secret (Tag 554), and a lowercase hex HMAC-SHA256 signature in RawData (Tag 96).

import hmac, hashlib

def sign_fix_logon(api_secret: str, sending_time: str, seq_num: int, sender_comp_id: str, target_comp_id: str) -> str:
    # Canonical prehash string: SendingTime(52) | MsgType(35) | MsgSeqNum(34) | SenderCompID(49) | TargetCompID(56)
    payload = f"{sending_time}|A|{seq_num}|{sender_comp_id}|{target_comp_id}"
    return hmac.new(api_secret.encode("utf-8"), payload.encode("utf-8"), hashlib.sha256).hexdigest()
TagField NameReqDescription
98EncryptMethodY0 = None / TLS transport encryption
108HeartBtIntYHeartbeat interval in seconds (recommended: 30)
141ResetSeqNumFlagNY = Reset sequence numbers to 1; N = Resume intraday sequence state
553UsernameYGaiaEx API Key
554PasswordYGaiaEx API Secret
96RawDataY64-char hex HMAC-SHA256 signature over 52|A|34|49|56
797 / 9406CopyMsgIndicator / DropCopyFlagNSet 797=Y, 9406=Y, or 50=DROPCOPY to register a read-only Drop Copy session
1409SessionStatusOutReturned in 35=A / 35=5: 0=Active, 4=Logout Complete, 5=Bad Auth, 6=Seq Too Low, 101=100M Seq Cap

Gap Recovery (35=2 & 35=4) & Cancel-on-Disconnect (CoD)

  • Inbound Gap Detection: If an incoming message carries MsgSeqNum (34) > ExpectedSeqNum, the gateway immediately emits ResendRequest (35=2, 7=ExpectedSeqNum, 16=0). If MsgSeqNum (34) < ExpectedSeqNum without PossDupFlag (43=Y), the gateway emits Logout (35=5, 1409=6) and closes the socket.
  • Outbound Replay: When the client sends ResendRequest (35=2), the gateway replays all application messages (including Drop Copy 35=8 reports) with 43=Y and 122=OrigSendingTime, and coalesces administrative frames into SequenceReset-GapFill (35=4, 123=Y).
  • Automatic Cancel-on-Disconnect (CoD): When an Order Management session disconnects, all open resting orders (OrdStatus 39=0) placed on that session are automatically cancelled (150=4, 39=4, 103=3020) and broadcasted in real time to any active Drop Copy session.

3. Order Entry, Modification, Cancellation & Inquiry (35=D, G, F, q, H, AN, XLQ)

NewOrderSingle (35=D)

TagField NameReqSupported Values & Notes
11ClOrdIDYClient-assigned unique order identifier (up to 31 chars)
1AccountNSelf-custody vault address (0x...) or sub-account identifier
50SenderSubIDNTrader or strategy ID; echoed back in TargetSubID (57) on 35=8
55SymbolYUSDC Perps (BTCUSDC, ETHUSDC, SOLUSDC), USDT Perps (BTCUSDT, ETHUSDT), RWA Perps (xyz:GOLD / GOLDUSDC, xyz:NVDA, xyz:TSLA)
54SideY1 = Buy, 2 = Sell
38OrderQtyYOrder quantity in base asset (supports 4-decimal fractional precision, e.g. 0.0050)
40OrdTypeY1 = Market, 2 = Limit, 4 = Stop Limit (requires 99=StopPx), p = Post-Only (or 18=6)
44PriceCLimit price (required for 40=2, 40=4, 40=p)
59TimeInForceN1 = GTC (default), 3 = IOC, 4 = FOK, 5 = GTX
544CashMarginN1 = Cash (default), 2 = Margin Open, 3 = Margin Close

Amend (35=G), Cancel (35=F), Mass Cancel (35=q), Status (35=H), Positions (35=AN) & Limits (35=XLQ)

MsgTypeMessage NameKey Request TagsGateway Response
35=GOrderCancelReplaceRequest11=ClOrdID, 41=OrigClOrdID, 55=Symbol, 54=Side, 38=OrderQty, 44=Price35=8 with 150=5, 39=5 (Replaced) or 35=9 (434=2)
35=FOrderCancelRequest11=ClOrdID, 41=OrigClOrdID, 55=Symbol, 54=SideTwo-step 35=8: 150=6, 39=6 (Pending Cancel) → 150=4, 39=4 (Canceled), or 35=9 (434=1)
35=qOrderMassCancelRequest11=ClOrdID, 530=7 (Cancel all orders)35=r (1369=MassActionReportID, 531=7) + one 35=8 (150=4, 39=4) per cancelled order
35=HOrderStatusRequest11=ClOrdID (or 37=OrderID), 790=OrdStatusReqID35=8 with 150=I (Order Status) or 150=8, 103=5 (Unknown order)
35=ANRequestForPositions710=PosReqID, 724=0 (Positions), 1=Account, 55=SymbolPositionReport (35=AP) with 721=PosMaintRptID, 728=0, 704=LongQty, 705=ShortQty, 730=SettlePrice
35=XLQLimitQuery25003=ReqIDLimitResponse (35=XLR) with 25005=ORDERS (500/s) and 25005=CONNECTIONS (20/account)

4. Real-Time Drop Copy & Reconciliation (797=Y / 9406=Y)

Drop Copy provides prime brokers, risk engines, and back-office reconciliation systems with a real-time, read-only stream of all ExecutionReport (35=8) events across both FIX Order Entry sessions and REST/HTTP API orders.

  • Universal Subscription Flags: Connect to port 9878 and send Logon (35=A) with 797=Y (CopyMsgIndicator), 9406=Y (DropCopyFlag), or 50=DROPCOPY (SenderSubID).
  • Dual-Tag Outbound Stamping: Every Drop Copy 35=8 frame carries 57=DROPCOPY, 797=Y, and 9406=Y, plus full fee/rebate breakdown (381=GrossTradeAmt, 1057=AggressorIndicator, 136=1|137=MiscFeeAmt|138=MiscFeeCurr|139=4, 20000=TradeFeeRebateAmt).
  • Strict Read-Only Protection: Any attempt to submit 35=D, 35=F, 35=G, or 35=q on a Drop Copy session is immediately rejected via BusinessMessageReject (35=j, 380=4).
  • Sequence Gap Recovery: Outbound Drop Copy reports are persisted in the session sequence store and can be replayed via ResendRequest (35=2) with PossDupFlag (43=Y).

5. Market Data (35=V, W, X, Y) & Reference Data (35=x, y, h)

Connect to port 9879 for dedicated Market Data streaming or query instrument specifications via SecurityListRequest (35=x).

  • MarketDataRequest (35=V): Send 262=MDReqID, 263=1 (Snapshot + Updates) or 0 (Snapshot), 264=1 (Top of Book) or 20 (Full Depth), and 55=Symbol. Returns MarketDataSnapshotFullRefresh (35=W) followed by MarketDataIncrementalRefresh (35=X). Unknown symbols return MarketDataRequestReject (35=Y, 281=0).
  • SecurityListRequest (35=x): Send 320=SecurityReqID and 559=0 (single symbol in 55) or 559=4 (all instruments). Returns SecurityList (35=y) with tick size (969=MinPriceIncrement), min/max order quantity (8000/8001), and decimal precision (8002/8003).
  • TradingSessionStatus (35=h): Returns 340=2 (Open 24x7x365) or 340=1 (Halted).

QuickFIX Client Configuration Template (gaiaex_fix.cfg)

[DEFAULT]
ConnectionType=initiator
ReconnectInterval=5
FileStorePath=./store
FileLogPath=./log
StartTime=00:00:00
EndTime=00:00:00
UseDataDictionary=Y
DataDictionary=./fix-dictionary.xml
ValidateUserDefinedFields=N
ValidateFieldsOutOfOrder=N
HeartBtInt=30

[SESSION]
BeginString=FIX.4.4
SenderCompID=INST_CLIENT_OE
TargetCompID=GAIAEX_PROD
SocketConnectHost=10.10.0.51
SocketConnectPort=9878
ResetOnLogon=N

[SESSION]
BeginString=FIX.4.4
SenderCompID=INST_CLIENT_DC
TargetCompID=GAIAEX_PROD
SenderSubID=DROPCOPY
SocketConnectHost=10.10.0.51
SocketConnectPort=9878
ResetOnLogon=N