Trade Workflow.

5 messages Options
Embed this post
Permalink
Luis

Trade Workflow.

Reply Threaded More More options
Print post
Permalink
Hello,
I hope posting 3 questions is not a breach of etiquette.

Question 1) Is there a document out there that describes the platform's trade workflow? I am trying to figure out how to show trade status by reading the database. I do not see any indications that trade status is persisted. It looks like records get created in the trade table after the trade request has been consummated. I can see that photon knows what trades are filled and what trades are still pending (Open Orders). Is this only because photon is watching all messages to the ors and knows which fix messages have not been responded to?

Question 2) I have been trying to submit trades via tradebase. This creates records in the trade table but i do not see any messages flowing through the ors. Something configured wrong?

Question 3) Is there any way to get photon to submit market orders? My broker's development connection will only auto process fix market orders where the price is left blank.
toli

Re: Trade Workflow.

Reply Threaded More More options
Print post
Permalink
Luis,

No worries at all - happy to answer any questions.

On Mon, Jan 5, 2009 at 6:08 PM, Luis <[hidden email]> wrote:
>
> Question 1) Is there a document out there that describes the platform's
> trade workflow? I am trying to figure out how to show trade status by
> reading the database. I do not see any indications that trade status is
> persisted. It looks like records get created in the trade table after the
> trade request has been consummated. I can see that photon knows what trades
> are filled and what trades are still pending (Open Orders). Is this only
> because photon is watching all messages to the ors and knows which fix
> messages have not been responded to?

This is a great request - I don't believe we currently have a diagram
showing the workflow of an order. We have a brief
architectural/workflow overview at
http://repo.marketcetera.org/images/diagrams/ and at
http://www.marketcetera.org/confluence/display/MPIC/Marketcetera+Architecture
 I'll work on putting one together, but here's what's happening so far:

Photon (or StrategyAgent) sends order out to ORS
ORS immediately sends back a PENDING_NEW ExecutionReport ack on the
ors-messages topic,  echoing all the fields, and forward the initial
order to FIX destination
ORS persists the initial PENDING_NEW ack
ORS persists all the ExecutionReports coming from brokers and forwards
it on to the ors-messages topic (which Photon and StartegyAgent read),
and also posts a copy of any FILL/PARTIAL_FILL on to the
trade-recorder queue for Tradebase to pick up.
See the old 0.9 documentation of Traderecorder at
http://www.marketcetera.org/confluence/display/MPIC090/Tradebase+Trade+Recorder+Configuration
and the architecture graphic at
http://repo.marketcetera.org/images/screenshots/ors-spring.png

We'll need to update this to reflect the new web services data flow we
added (for Photon restart recovery, and strategy agent queries), but
it should give you an overview of the JMS traffic.

> Question 2) I have been trying to submit trades via tradebase. This creates
> records in the trade table but i do not see any messages flowing through the
> ors. Something configured wrong?

No, the Tradebase is not designed to send orders, only to view and
edit existing trades, and to capture out-of-band (ie phone) orders.

> Question 3) Is there any way to get photon to submit market orders? My
> broker's development connection will only auto process fix market orders
> where the price is left blank.

Absolutely - just use MKT for price instead of a number in the Stock
Order ticket. The ORS then sends an OrdType.MARKET order in that case.
http://www.marketcetera.org/confluence/display/PN/Photon+Guide#PhotonGuide-StockOrderTicket

Alternatively, you can do "O B 100 IBM MKT auto day" from the command
line in Photon:
http://www.marketcetera.org/confluence/display/PN/Photon+Guide#PhotonGuide-CommandEntryArea

--
Toli Kuznets
http://www.marketcetera.com: Open-Source Trading Platform
download.run.trade.

_______________________________________________
m-etc-dev mailing list
[hidden email]
http://lists.marketcetera.org/mailman/listinfo/m-etc-dev_lists.marketcetera.org
toli

Re: Trade Workflow.

Reply Threaded More More options
Print post
Permalink
Luis,

> 2) Orders can only be submitted to the broker via the ORS. Which in
> turns receives orders vis ORS Client, a Java component embedded inside
> Photon (our GUI) and Strategy Agent (our headless client), but which you
> can also use directly to write your own front-end order generator.

You can also look at the code for the OrderLoader component which also
uses the ORS Client to communicate with the ORS.
http://code.marketcetera.org/root/trunk/source/orderloader/
http://www.marketcetera.org/confluence/display/MPIC/OrderLoader%20Configuration


--
Toli Kuznets
http://www.marketcetera.com: Open-Source Trading Platform
download.run.trade.

_______________________________________________
m-etc-dev mailing list
[hidden email]
http://lists.marketcetera.org/mailman/listinfo/m-etc-dev_lists.marketcetera.org
Luis

Re: Trade Workflow.

Reply Threaded More More options
Print post
Permalink
In reply to this post by toli
Toli,
In you answer to my question regarding trade workflow, you stated: ORS persists the initial PENDING_NEW ack.
Where does the ORS persist this to? I would like to persist it to some pending trade table in the marketcetera database if not there in some form already.


toli wrote:
Trade workflow:

Photon (or StrategyAgent) sends order out to ORS
ORS immediately sends back a PENDING_NEW ExecutionReport ack on the
ors-messages topic,  echoing all the fields, and forward the initial
order to FIX destination
ORS persists the initial PENDING_NEW ack
ORS persists all the ExecutionReports coming from brokers and forwards
it on to the ors-messages topic (which Photon and StartegyAgent read),
and also posts a copy of any FILL/PARTIAL_FILL on to the
trade-recorder queue for Tradebase to pick up.
See the old 0.9 documentation of Traderecorder at
http://www.marketcetera.org/confluence/display/MPIC090/Tradebase+Trade+Recorder+Configuration
and the architecture graphic at
http://repo.marketcetera.org/images/screenshots/ors-spring.png
toli

Re: Trade Workflow.

Reply Threaded More More options
Print post
Permalink
Luis,

The ORS persists it to 2 tables, reports and execreports.
"reports" is just a wrapper around the FIX message, and "execreports"
contains all of the extracted fields that make up the ExecutionReport
POJO that we use internally.

You are welcome to add to the code to persist it into an additional
table if you find the need, but I would advise against messing with
teh persistence layer too much, as it's not one of our "exposed public
APIs" so that the underlying schemas and  behaviour is not guaranteed
to be backwards compatible in subsequent releases.

See the org.marketcetera.org.history.ExecutionReportSummary and
...PersistentReport for more info on how persistence is done.

On Thu, Jan 8, 2009 at 3:42 AM, Luis <[hidden email]> wrote:

>
> Toli,
> In you answer to my question regarding trade workflow, you stated: ORS
> persists the initial PENDING_NEW ack.
> Where does the ORS persist this to? I would like to persist it to some
> pending trade table in the marketcetera database if not there in some form
> already.
>
>
>
> toli wrote:
>>
>> Trade workflow:
>>
>> Photon (or StrategyAgent) sends order out to ORS
>> ORS immediately sends back a PENDING_NEW ExecutionReport ack on the
>> ors-messages topic,  echoing all the fields, and forward the initial
>> order to FIX destination
>> ORS persists the initial PENDING_NEW ack
>> ORS persists all the ExecutionReports coming from brokers and forwards
>> it on to the ors-messages topic (which Photon and StartegyAgent read),
>> and also posts a copy of any FILL/PARTIAL_FILL on to the
>> trade-recorder queue for Tradebase to pick up.
>> See the old 0.9 documentation of Traderecorder at
>> http://www.marketcetera.org/confluence/display/MPIC090/Tradebase+Trade+Recorder+Configuration
>> and the architecture graphic at
>> http://repo.marketcetera.org/images/screenshots/ors-spring.png
>>
>
> --
> View this message in context: http://n2.nabble.com/Trade-Workflow.-tp2115951p2127452.html
> Sent from the m-etc-dev mailing list archive at Nabble.com.
>
>
> _______________________________________________
> m-etc-dev mailing list
> [hidden email]
> http://lists.marketcetera.org/mailman/listinfo/m-etc-dev_lists.marketcetera.org
>



--
Toli Kuznets
http://www.marketcetera.com: Open-Source Trading Platform
download.run.trade.

_______________________________________________
m-etc-dev mailing list
[hidden email]
http://lists.marketcetera.org/mailman/listinfo/m-etc-dev_lists.marketcetera.org