PDA

View Full Version : Api vertex issue



Vikas
07-24-2013, 11:47 AM
We are using Vertex API 10 for connecting to Vertex Server.
We have developed Vertex Adatpter based on API provided by you. (We are following C# .Net)

we have registered following callbacks/events

_vertexFXAPI.MarketOrderAccepted += new __CVertexFXClientAPI_MarketOrderAcceptedEventHandl er(OnMarketOrderAccepted);
_vertexFXAPI.MarketOrderRejected += new __CVertexFXClientAPI_MarketOrderRejectedEventHandl er(OnMarketOrderRejected);
_vertexFXAPI.NewOrderResult += new __CVertexFXClientAPI_NewOrderResultEventHandler(On MarketOrderResult);

from which we are getting callback for OnMarketOrderResult.
but we are not receiving OnMarketOrderAccepted.


when we send a market order from client side using vertex api we can see the acceptance on the dealer side but vertex does not give any order acceptance to client api application due to which the order at client side stays in open state.

plz see the issue and solve it asap and provide solution.


api id is 219253


regs
rahul
+919911111153

b_morar
07-24-2013, 12:13 PM
Dear Sir;

I'm studying your case, I will update your soon

b_morar
07-24-2013, 12:32 PM
Dear Sir,

Please check this event to know the result of the accepted position :

NewOpenPosition
You can find a detailed description for this event in the following link :
http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/2006

Vikas
07-24-2013, 06:44 PM
Thanks for your quick reply.

We have analysed NewOpenPosition event. But we are not relate it with OrderID.

Firstly we are sending new order at that time we are sending some OrderInfo in TransFlag which we are getting back on OnMarketOrderResult.
In OnMarketOrderResult, we received new ExchangeOrderID, Which we was relate in OnMarketOrderAccepted event, But now we are not receiving this event, Our Adapter is not processing Trade execution now.

And in NewOpenPosition Event We don't find any link with previously generated order.

Please lets know order event flow, and each event relation.

Hassan-HS
07-24-2013, 08:06 PM
Welcome Vikas,
1-Check if AllDataAreLoaded event has fired.
2- Please make sure if you are already selected an account before use NewOpenPosition().
3- Check if the returend value of NewOpenPosition of type CallingResultsEnum equal SuccessResult.
4-Now you have to wait one of this events A- MarketOrderRejected B-MarketOrderAccepted C-NewOpenPosition.
Please check this notes and update me.

Vikas
07-25-2013, 08:12 AM
Thanks for your quick reply.

As per your question:
1) Yes we are receiving AllDataLoaded event
2) Yes we have call API for SelectAccount.
3) We haven't checked the CallingResultsEnum in NewOpenPosition Event as of now. But We have received acceptance on dealer side.
4) We are keep waiting for MarketOrderRejectedand MarketOrderAccepted, but we are not getting any callback from this two, but we are receiving NewOpenPosition

Now if you tell me why either of this MarketOrderRejectedorMarketOrderAccepted is raised?
And if you want us to check NewOpenPosition event, that CallingResultsEnum is equal SuccessResult or not, we think whatever it will be, we must get either MarketOrderRejectedorMarketOrderAccepted event.

Please confirm my understanding according to you CHM is Right or not?

b_morar
07-25-2013, 09:53 AM
Dear Sir,
Let's make it clear.

The NewOrderResult is raised when the client sends an order successfully( It is an indication that my order has been received at the dealer side ).
The NewOpenPosition is raised when the order is accepted automatically or manually by the dealer, If order is accepted manually, Also you will received MarketOrderAccepted .
The MarketOrderRejected is raised in case that the rejection has been done manually.
I hope that it is clear now, please let us know if you need further assistance.:D

Vikas
07-25-2013, 10:14 AM
Thanks.

That is very much clear from your CHM.

But currently we are not receiving MarketOrderAcceptedevent, Which we were able to receive till last friday.

I hope you understood our major problem.

b_morar
07-25-2013, 10:22 AM
Dear Sir,

The dealer can make the acceptance manually; In this case MarketOrderAccepted event will rise,
However he can use software to do the acceptance automatically then this event will not rise.
Please let us know if everything is clear now.

Vikas
07-25-2013, 10:36 AM
Yes.

In this case (acceptance automatically) please explain which event will be raised, and how we can track the Order Execution.

Please provide detailed information or market order sending...

b_morar
07-25-2013, 01:15 PM
1- NewOpenPosition: Fired when a new market order has been opened.



Please see the following file to understand market order cycle.


274

Hassan-HS
07-25-2013, 03:56 PM
Dear Sir,

NewOpenPosition event is fired in all online sessions that selected the same account
(If Multi-Sessions is allowed in your trading company), To reflect the changes that happening in open positions.

Vikas
08-06-2013, 10:34 AM
Hi

As in same thread,
We are facing issue like, we are calling the Method NewMarketOrder which return CallingResultsEnum.SuccessResult, After that we received NewOpenPosition, but after that we haven't received any events....

Please see the log file that we have recorded for each order...

05-08-2013 15:01:42.275 Info OnOpenPositionsLoaded
05-08-2013 15:01:42.837 Info OnPendingOrdersLoaded
05-08-2013 15:01:44.225 Info OnOpenPositionsLoaded
05-08-2013 15:01:44.787 Info OnPendingOrdersLoaded
================================================== =============> Till this point our adapter is on Started Mode

05-08-2013 18:19:15.691 Info OnMarketOrderResult ====> Received Event on Order 1
05-08-2013 18:19:16.424 Info OnMarketOrderResult ====> Received Event on Order 2
05-08-2013 18:19:17.968 Info OnNewOpenPosition ====> Received Event on Order 1
05-08-2013 18:19:17.984 Info OnMarketOrderAccepted ====> Received Event on Order 1
05-08-2013 18:19:18.998 Info OnNewOpenPosition ====> Received Event on Order 2
05-08-2013 18:19:18.998 Info OnMarketOrderAccepted ====> Received Event on Order 2
05-08-2013 18:22:07.353 Info OnMarketOrderResult ====> Received Event on Order 3
05-08-2013 18:22:10.380 Info OnNewOpenPosition ====> Received Event on Order 3
05-08-2013 18:22:10.395 Info OnMarketOrderAccepted ====> Received Event on Order 3
05-08-2013 18:22:41.408 Info OnMarketOrderResult ====> Received Event on Order 4
05-08-2013 18:22:43.452 Info OnNewOpenPosition ====> Received Event on Order 4
05-08-2013 18:22:43.452 Info OnMarketOrderAccepted ====> Received Event on Order 4
05-08-2013 18:22:54.388 Info OnMarketOrderResult ====> Received Event on Order 5
05-08-2013 18:22:56.868 Info OnNewOpenPosition ====> Received Event on Order 5
05-08-2013 18:22:56.884 Info OnMarketOrderAccepted ====> Received Event on Order 5
05-08-2013 18:23:02.858 Info OnMarketOrderResult ====> Received Event on Order 6
05-08-2013 18:23:03.810 Info OnNewOpenPosition ====> Received Event on Order 6
05-08-2013 18:23:03.810 Info OnMarketOrderAccepted ====> Received Event on Order 6
05-08-2013 18:23:26.882 Info OnMarketOrderResult ====> Received Event on Order 7
05-08-2013 18:23:29.410 Info OnNewOpenPosition ====> Received Event on Order 7
05-08-2013 18:23:29.410 Info OnMarketOrderAccepted ====> Received Event on Order 7
05-08-2013 18:23:51.874 Info OnMarketOrderResult ====> Received Event on Order 8
05-08-2013 18:23:53.870 Info OnNewOpenPosition ====> Received Event on Order 8
05-08-2013 18:23:53.870 Info OnMarketOrderAccepted ====> Received Event on Order 8
05-08-2013 19:18:09.378 Info OnMarketOrderResult ====> Received Event on Order 9
05-08-2013 19:18:10.454 Info OnMarketOrderResult ====> Received Event on Order 10
05-08-2013 19:18:11.952 Info OnNewOpenPosition ====> Received Event on Order 9
05-08-2013 19:18:11.952 Info OnMarketOrderAccepted ====> Received Event on Order 9
05-08-2013 19:18:13.106 Info OnNewOpenPosition ====> Received Event on Order 10
05-08-2013 19:18:13.106 Info OnMarketOrderAccepted ====> Received Event on Order 10
05-08-2013 19:31:15.260 Info OnMarketOrderResult ====> Received Event on Order 11
05-08-2013 19:31:16.025 Info OnMarketOrderResult ====> Received Event on Order 12
05-08-2013 19:31:18.458 Info OnNewOpenPosition ====> Received Event on Order 11
05-08-2013 19:31:18.708 Info OnMarketOrderAccepted ====> Received Event on Order 11
05-08-2013 19:31:18.724 Info OnNewOpenPosition ====> Received Event on Order 12
05-08-2013 19:31:18.724 Info OnMarketOrderAccepted ====> Received Event on Order 12
05-08-2013 19:32:50.030 Info OnUpdateOpenPosition
05-08-2013 19:32:50.514 Info OnDeleteOpenPosition
05-08-2013 19:32:52.558 Info OnDeleteOpenPosition
05-08-2013 19:32:52.558 Info OnUpdateOpenPosition
05-08-2013 19:32:56.723 Info OnDeleteOpenPosition
05-08-2013 19:32:56.723 Info OnUpdateOpenPosition
05-08-2013 19:32:57.862 Info OnUpdateOpenPosition
05-08-2013 19:32:59.157 Info OnDeleteOpenPosition
05-08-2013 19:33:05.256 Info OnDeleteOpenPosition
05-08-2013 19:33:05.724 Info OnDeleteOpenPosition
05-08-2013 19:36:39.569 Info OnMarketOrderResult ====> Received Event on Order 13
05-08-2013 19:36:40.303 Info OnMarketOrderResult ====> Received Event on Order 14
05-08-2013 19:36:44.577 Info OnNewOpenPosition ====> Received Event on Order 13
05-08-2013 19:36:44.577 Info OnMarketOrderAccepted ====> Received Event on Order 13
05-08-2013 19:36:44.577 Info OnNewOpenPosition ====> Received Event on Order 14
05-08-2013 19:36:44.577 Info OnMarketOrderAccepted ====> Received Event on Order 14
05-08-2013 19:37:26.494 Info OnMarketOrderResult ====> Received Event on Order 15
05-08-2013 19:37:27.227 Info OnMarketOrderResult ====> Received Event on Order 16
05-08-2013 19:38:37.225 Info OnMarketOrderResult ====> Received Event on Order 17
05-08-2013 19:38:37.521 Info OnMarketOrderResult ====> Received Event on Order 18
05-08-2013 19:41:40.135 Info OnMarketOrderResult ====> Received Event on Order 19
05-08-2013 19:41:43.146 Info OnNewOpenPosition ====> Received Event on Order 15
05-08-2013 19:41:43.146 Info OnMarketOrderAccepted ====> Received Event on Order 15
05-08-2013 19:43:52.127 Info OnMarketOrderResult ====> Received Event on Order 20
05-08-2013 19:43:52.439 Info OnMarketOrderResult ====> Received Event on Order 21
05-08-2013 19:43:54.529 Info OnNewOpenPosition ====> Received Event on Order 16
05-08-2013 19:43:54.529 Info OnMarketOrderAccepted ====> Received Event on Order 16
05-08-2013 19:43:54.997 Info OnNewOpenPosition ====> Received Event on Order 17
05-08-2013 19:43:54.997 Info OnMarketOrderAccepted ====> Received Event on Order 17
05-08-2013 20:20:20.452 Info OnDeleteOpenPosition
05-08-2013 20:20:20.982 Info OnDeleteOpenPosition
05-08-2013 20:24:54.685 Info OnDeleteOpenPosition
05-08-2013 20:24:54.700 Info OnDeleteOpenPosition
05-08-2013 20:25:32.702 Info OnUpdateOpenPosition
05-08-2013 20:25:32.702 Info OnUpdateOpenPosition
05-08-2013 20:25:47.694 Info OnDeleteOpenPosition
05-08-2013 20:25:48.177 Info OnDeleteOpenPosition
05-08-2013 20:26:12.607 Info OnDeleteOpenPosition
05-08-2013 20:26:12.638 Info OnDeleteOpenPosition
05-08-2013 20:26:31.233 Info OnDeleteOpenPosition
05-08-2013 20:26:31.233 Info OnDeleteOpenPosition
05-08-2013 20:27:04.321 Info OnDeleteOpenPosition
05-08-2013 20:27:04.321 Info OnDeleteOpenPosition
05-08-2013 20:27:27.549 Info OnDeleteOpenPosition
05-08-2013 20:27:27.549 Info OnDeleteOpenPosition
05-08-2013 20:28:23.242 Info OnDeleteOpenPosition
05-08-2013 20:28:23.242 Info OnDeleteOpenPosition
05-08-2013 20:28:54.707 Info OnDeleteOpenPosition
05-08-2013 20:28:54.707 Info OnDeleteOpenPosition
05-08-2013 20:29:39.510 Info OnDeleteOpenPosition
05-08-2013 20:29:40.025 Info OnDeleteOpenPosition
05-08-2013 20:30:03.706 Info OnDeleteOpenPosition
05-08-2013 20:30:04.174 Info OnDeleteOpenPosition
05-08-2013 20:31:53.280 Info OnNewOpenPosition ====> Received Event on Order 18
05-08-2013 20:33:03.168 Info OnNewOpenPosition ====> Received Event on Order 19
05-08-2013 22:33:50.021 Info OnDeleteOpenPosition
05-08-2013 22:33:50.504 Info OnDeleteOpenPosition
05-08-2013 22:33:57.150 Info OnDeleteOpenPosition
05-08-2013 22:33:57.150 Info OnUpdateOpenPosition
05-08-2013 22:34:00.925 Info OnDeleteOpenPosition
05-08-2013 22:34:01.393 Info OnDeleteOpenPosition

As per the log Up to order 17 we have received all three event OnMarketOrderResult, OnNewOpenPosition, OnMarketOrderAccepted

For order 18 and 19 we have received only OnMarketOrderResult, OnNewOpenPosition. So in our order book having this two order are in Open state.

but for order 20 and 21 we have received only OnMarketOrderResult, so in our order book this two order is in Pending State.

For all above order we have received CallingResultsEnum.SuccessResult as return value for method NewMarketOrder

Please update on this.
How could we get all the events for all order which we have raised from our system.

VIBHS
08-06-2013, 12:32 PM
Hi,

Mr. Vikas is our client. kindly handle this case on urgent basis.

Regards,
VIBHS

Hassan-HS
08-06-2013, 01:47 PM
Dear Sir,


This link (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/3713)will assist you with tracing the market order cycle.

Please let me know if you need further assistance.

Hassan-HS
08-07-2013, 05:49 PM
Dear Sir,

I hope every thing is clear, please let me know if you need further help.:D