FIX protocol through PHP

Helo, I’m currently working on a project of OTC trading plateform for low frequency delta one products. I developped all the plateforn in PHP using client/server infrastructure and web services in Json to communicate with traders. But one of our participant would like to connect to our system and send/receive orders and data through FIX protocol.

could you please help me in that stuff? I’m newbie in FIX world.

I would like to know how to send fix message to this trader, how he would be able to send us a FIX message and how I could read such fix message sent.

many thanks for your help

Jonathan

1 Like

There is an upcoming standard to encode FIX with JSON. Please see https://www.fixtrading.org/standards/json/ for details and revert back if you need more information.

thanks hanno

let me check that.

best

Dear hanno.klein,

this userguide is a json/FIX tag transcription but I also need a guide or a sample of code to explain the way to use these json message structure. how to receive and read a FIX message and how to send a fix message using this json/Fix vocable

thks a lot

j

So I guess you are talking about the session layer and not the encoding of FIX messages. There is interest in FIX regarding web services but no guideline that I am aware of. I am not an expert in this area and do not know how much of that is FIX-specific and would really require standardisation. With other session protocols such as AMQP, FIX is just the payload of AMQP messages and the AMQP standard defines how to connect and exchange payloads.

thks a lot i will see that

The JSON Encoding Working Group published Release Candidate 1 of a standard to translate FIX tag value encoding to JSON. As Hanno said, the rules for exchange of messages is at the session layer while message encoding is at the presentation layer of a protocol stack. We are striving to keep a separation of concerns by creating independent protocols for each layer.

FIX has two session layer protocols. .The session layer of the original FIX protocol was codified as FIXT and a new high performance session layer is under development as FIXP.

A third choice is under consideration–web based protocols including REST API over HTTP, and asynchronous protocols WebSocket and HTTP/2. A demonstration of JSON Encoding of FIX over WebSocket is in project Timpani.

The High Performance Working Group would welcome your input about your requirements.

2 Likes

I have implemented JSON encoding based on RC1 specification based on Jackson and quickfix and an example message for QuoteRequest (35=R) looks like this:

{
  "Header": {
    "BeginString": "FIX.4.4",
    "BodyLength": "795",
    "MsgSeqNum": "3",
    "MsgType": "R",
    "SenderCompID": "XXXXX",
    "SendingTime": "20170731-06:16:26.000",
    "TargetCompID": "YYYYY",
    "OnBehalfOfCompID": "ZZZZZ",
    "DeliverToCompID": "YYYYY",
    "MessageEncoding": "UTF-8"
  },
  "Body": {
    "ExecInst": "G",
    "QuoteReqID": "7db51c7e-7220-468c-9749-13036b992b1c:MDLTRFQU:20170731",
    "QuoteRespType": "I",
    "RFQType": "1",
    "RFQStatus": "1",
    "NoRelatedSym": [
      {
        "Symbol": "N/A",
        "SecurityID": "AMZN.O",
        "SecurityIDSource": "RIC",
        "SecurityType": "CALL",
        "SecurityXMLLen": "470",
        "SecurityXML": "<?xml version=\"1.0\"?>",
        "Side": "1",
        "Currency": "USD",
        "OrderQty": "500",
        "ExpireTime": "20190718-18:00:00.000",
        "TransactTime": "20170731-03:16:04.196"
      }
    ]
  },
  "Trailer": {
    "CheckSum": "53"
  }
}

Since I am using Jackson library, it is as simple as implementing a serializer and deserializer.

Hi all,

Does anyone could help me ? I am trying to connect to FIX with PHP? Somebody with a sample code I could use? I have been trying for 2 days without any success.

Thanks in advance for your help.

Best,

G.

Did you manage to do FIX in php?