HeaderSIS.jpg

IS480 Team wiki: 2016T1 Ingenium Documentation

From IS480
Jump to navigation Jump to search
Ingenium-logo.png

Home-icon.png Home

Team-icon.png About Us

Overview-icon.png Project Overview

Mgmt-icon.png Project Management

Doc--icon.png Documentation

Technical Diagrams Testing Documents Milestone Documents

Architecture Diagram

Ign-architecturediagram.png

Interaction Diagram

Ign-interaction.png
S/N Interaction QuickFIX Message Explanation
1 Logon Request to Broker <20160928-03:49:33, FIX.4.2:NPG->BROKER, outgoing> (8=FIX.4.2 9=85 35=A 34=1 49=NPG 52=20160928-03:49:33.818 56=BROKER 98=0 108=30 141=Y 10=160 )

<20160928-03:49:33, FIX.4.2:NPG->BROKER, event> (Initiated logon request)

To be able to logon to another server’s FIX service, they have to follow this logon protocol specifying the same settings as the target server and must have the correct sender’s ID.

Top 4 tag numbers that are on the logon request:

  • 35 = A (Message Type: Login Request)
  • 49 = NPG (Sender’s ID)
  • 52 = The time message is being sent out
  • 56 = BROKER (Target’s ID)
  • 98 = 0 (Encryption method)
2 Logon Confirmation from Broker <20160928-03:49:33, FIX.4.2:NPG->BROKER, incoming> (8=FIX.4.2 9=81 35=A 49=BROKER 56=NPG 34=1 52=20160928-03:49:34 98=0 108=30 141=Y 10=206 )

<20160928-03:49:33, FIX.4.2:NPG->BROKER, event> (Logon contains ResetSeqNumFlag=Y, resetting sequence numbers to 1) <20160928-03:49:34, FIX.4.2:NPG->BROKER, event> (Received logon)

On receiving our logon request, the broker’s server responds with the same targetID and senderID and encryption method as specified previously.
3 Buy Order Request to Broker <20160928-03:58:04, FIX.4.2:NPG->BROKER, outgoing> (8=FIX.4.2 9=223 35=D 34=18 49=NPG 52=20160928-03:58:04.248 56=BROKER 1=<ACC-NUMBER> 11=28091600001 15=SGD 21=1 22=4 38=1000 40=2 44=3.45 48=SG1V12936232 54=1 55=CC3 59=0 60=20160928-03:58:02.085 100=SI 107=StarHub 8000=RY 8020=N 10=141 ) Now when we want to send a broker message after receiving user input through the web interface. We will need to convert the user input into FIX format which the broker’s system understand.
  • 35 = D (Message Type - New Single Order)
  • 11 = 28091600001 (Order ID generated by our application)
  • 15 = SGD (currency used)
  • 38 = 1000 (order quantity)
  • 44 = 3.45 (Price of the stock)
  • 48 = SG1V12936232 (ISIN number. ISO standard for stocks which is internationally unique and used to identify a security)
  • 55 = CC3 (Starhub Stock Symbol)
  • 59 = 0 (To specify Day order for validity for the stocks. Other options include: FAK , FOK and GTD)
  • 60 = transaction time
  • 100 = SI (Exchange destination for SGX)
  • 8000 = RY (Ready markets, there are also buy in and unit share markets)
  • 8020 = Force tag (Used when you want to put in a stock price for your order that is very far from the last transacted price. In financial terms, they call it ticks.)

*tick is a measure of the minimum upward or downward movement in the price of a security. A tick can also refer to the change in the price of a security from trade to trade. So in this case, for Starhub whose price is 3.42, the price per tick is 0.1 and the price limit will be +/- 20 ticks range. This means the lower limit is 3.22 and upper limit is 3.62. Anything more than that would need to use the force tag.

4 Confirmation of Order from Broker <20160928-03:58:04, FIX.4.2:NPG->BROKER, incoming> (8=FIX.4.2 9=280 35=8 49=BROKER 56=NPG 34=19 52=20160928-03:58:04 1=<ACC-NUMBER> 6=0 11=28091600001 14=0 15=SGD 17=UL14750350845200 20=0 22=4 31=0 32=0 37=5dc6f90100002616 38=1000 39=0 40=2 44=3.42 48=SG1V12936232 54=1 55=CC3 59=0 60=20160928-03:58:04 110=0 150=0 151=1000 167=CS 207=SI 10=222 ) Broker confirms the order with transactionTime.
  • 14 = 0 (Cumulative Qty - Total executed quantity of the stock in the market for this order)
  • 151 = 1000 (Leaves Qty - Total Open stocks quantity in the stock market for this order which other people can take up)
  • 167 = CS (Common stocks)
5 Partial Fill of Orders from Broker <20160928-05:45:38, FIX.4.2:NPG->BROKER, incoming> (8=FIX.4.2 9=303 35=8 49=BROKER 56=NPG 34=260 52=20160928-05:45:38 1=<ACC-NUMBER> 6=3.45 11=28091600001 14=500 15=SGD 17=UL14750415382950 20=0 22=4 31=3.45 32=500 37=5dc6f90100002a9d 38=1000 39=1 40=2 44=3.45 48=SG1V12936232 54=1 55=CC3 59=0 60=20160928-05:45:38 76=28U 110=0 150=1 151=500 167=CS 207=SI 10=203 ) Now that someone has taken up our stock order by 500, the broker sends a quickfix message to our server .
  • 11 – OrderID of the stock
  • 14 = 500 (Cumulative Qty - Total executed quantity of the stock in the market for this order. This means 500 stocks has been executed or bought from another party.)
  • 31 = 3.45 (Last Price of the filled orders)
  • 32 = 500 (Last Shares which is the quantity for last fill for this order)
  • 38 = 1000 (Order quantity)
  • 39 = 1 (Order Status: Partial Fill)
  • 44 = 3.45 (Price in which we key in the stock order)
  • 151 = 500 (Leaves Qty - Total Open stocks quantity in the stock market for this order which other people can take up. Since 500 was filled now we have 500 left.)
6 Order Modification Request to Broker <20160928-06:10:02, FIX.4.2:NPG->BROKER, outgoing> (8=FIX.4.2 9=310 35=G 34=19 49=NPG 52=20160928-06:10:02.680 56=BROKER 11=28091600002 15=SGD 21=1 22=4 38=1500 40=2 41=28091600001 44=3.45 48=SG1V12936232 54=2 55=CC3 59=0 60=20160928-06:10:02.679 100=SI 107=StarHub 8000=RY 8020=N 10=096 ) To modify the stocks:
  • 35 = G (Mesasge Type = order replacement)
  • 11 = Order Id
  • 38 = New Order Quantity (from 1000 increment to 1500)
  • 41 = Original Order ID
  • 44 = 3.45 Stock Price
7 Confirmation of Order Modification from Broker <20160928-06:10:02, FIX.4.2:NPG->BROKER, incoming> (8=FIX.4.2 9=312 35=8 49=BROKER 56=NPG 34=19 52=20160928-06:10:02 1=<ACC-NUMBER> 6=3.43 11=28091600002 14=500 15=SGD 17=UL14750430028320 20=0 22=4 31=0 32=0 37=5dc6f90100002aed 38=1500 39=1 40=2 41=28091600001 44=3.45 48=SG1V12936232 54=2 55=CC3 59=0 60=20160928-06:10:02 110=0 150=5 151=1000 167=CS 207=SI 10=219 ) Broker receive message and confirms that order has been modified.
  • 11 – Order ID realize that is 28091600002 instead of 28091600001 . This means that any future updates with this stock info will be identified by 002 instead of 001.
  • 14 = 500 (Last Shares which is the quantity for last fill for this order)
  • 39 – Order Status (Partial Fill)
  • 41- Original Order ID
  • 38 – Order Quantity (Now 1500 instead of 1000)
  • 44 = 3.45 (Price still remains at 3.45)
  • 55= CC3 StarHub
  • 151 = Leaves Qty

*Leaves Qty which is the total Open stocks quantity in the stock market for this order which other people can take up in this case it’s 1000 since we have increased the stock order quantity from 1000 to 1500 and 500 was filled up previously.

Use Case Diagram

Ign-usecase.PNG

Market Making Business Process Diagram

Ign-marketmaking.png