Syntax
Function AcceptOrder(ByRef vOrderID As Integer,Optional ByRef AcceptPrice As Double = 0.0) As VertexFXBOAPI.CallingResultsEnum
Description
This function used to accept client order by giving the order number.After AcceptOrder method executes the AcceptResultRecieved event fires.
Parameters
Part |
Description |
vOrderID |
The order number to be accepted ,value of type Integer. |
AcceptPrice |
Order will be accepted at this price,optional value of type Double. |
Remarks
Orders are received as ChatOrderReceived event; you can use this method to accept these orders.
Sample
Public WithEvents API As CVertexFXBOAPI
Private Sub API_ChatOrderRecieved1(ByRef MarketOrLimitOrder As VertexGeneral10.MarketOrLimitOrderEnum, ByRef AccountID As Integer, ByRef OrderId As Integer, ByRef NewOrLiq As VertexGeneral10.NewOrLiquidateEnum, ByRef BuySell As VertexGeneral10.OperationTypeEnum, ByRef Lots As Double, ByRef SymbolID As Integer, ByRef Price As Double, ByRef OpenPrice As Double, ByRef HitPrice As Double, ByRef RefHitPrice As Double, ByRef OrderTime As String, ByRef FromSystem As Boolean, ByRef OpenTicket As Integer, ByRef OpenLots As Double) Handles API.ChatOrderRecieved
Dim result As VertexFXBOAPI10.CallingResultsEnum
If MarketOrLimitOrder = MarketOrLimitOrderEnum.MarketOrderType Then
result = API.AcceptOrder(OrderId, Price)
MsgBox(result.ToString)
End If
End Sub
See Also
VertexFX Backoffice API Index
|