OPTIONORDER.GetExchangeCount() returns no exchanges
Hi, ORDER.GetExchangeCount() returns a full count of destinations for me but OPTIONORDER.GetExchangeCount() does not. NOTE: I can see the destinations for options orders in the UI. The actual return value of these functions is Empty for ORDER and False for OPTIONORDER. Permissions issue? Thanks
Best Answer
-
Hi @DDALY ,
Have you checked out the sample code in this sheet? Here, you're setting the order object with the symbol, type, date, etc for the option order, then retrieving the values.
Here, I return a value of 201 (on my test ID).
-Brian
Sub LoadDestList()
Dim I As Integer
Dim NamedRng As String
Dim cnt As Variant
Dim Dest As Variant
Dim DestTemp As Variant
Dim RetVal As Variant
Dim RetVal2 As Variant
Dim RNGSort As String
Dim obj As Object
Dim FindDest As String
Dim COL As Long
Dim RNGCut As String
Dim MSG As String
Dim exch As Variant
Dim objRegExp As New RegExp
Dim strPattern As String: strPattern = "[ ][A-Z]"
Dim regEx As New RegExp
Dim Myrange As Range
Dim inputMatches As Object
Dim Count As Integer: Count = 0
Dim hOrder As New OPTIONORDER
hOrder.symbol = UCase(Worksheets("REDIOptionOrderEntry").Cells(2, "C").Value)
hOrder.Type = Worksheets("REDIOptionOrderEntry").Cells(3, "C").Value
hOrder.Date = Worksheets("REDIOptionOrderEntry").Cells(4, "C").Value
hOrder.Strike = Worksheets("REDIOptionOrderEntry").Cells(5, "C").Value
RetVal = hOrder.GetExchangeCount(cnt)
Worksheets("REDISettings").Range("D3:D1000").Clear
Worksheets("REDISettings").Range("D3:D1000").Interior.Color = RGB(242, 242, 242)
For I = 0 To cnt - 1
exch = hOrder.GetExchangeAt(I)
'Debug.Print exch & " " & I
With regEx
.Global = True
.MultiLine = True
.IgnoreCase = False
.Pattern = strPattern
End With
If regEx.Test(exch) Then
Set inputMatches = regEx.Execute(exch)
'Debug.Print exch & " " & inputMatches.Count
If inputMatches.Count = 1 Then
Worksheets("REDISettings").Cells(Count + 3, "D").Interior.Color = RGB(255, 255, 255)
Worksheets("REDISettings").Cells(Count + 3, "D").Borders.Color = RGB(234, 234, 234)
Worksheets("REDISettings").Cells(Count + 3, "D").Value = exch
Count = Count + 1
End If
End If
Next I
Worksheets("REDISettings").Range("D3:D" & Count + 2).Sort Key1:=Worksheets("REDISettings").Range("D3:D" & Count + 2), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
NamedRng = "=REDISettings!R3C4:R" & Count + 2 & "C4"
Names.Add Name:="Destinations", RefersToR1C1:=NamedRng
End Sub0
Answers
-
Hi @brian.mullane, Ok so the order object needed more details. That's working for me now. Thanks a lot!
0 -
Hi @brian.mullane, I'm having a problem with data for one of our production users. The destination he uses on the UI is "IBCO DMA" as per screenshot.
However if I try to get destinations in code (below) using the same order details, I only get "IBO2 DMA". Any ideas?
Sub GetOptionDest()
Dim hOrder As New OPTIONORDER
Dim RetVal, I, cnt, exch
hOrder.Symbol = "VICI"
hOrder.Type = "Put"
hOrder.Date = "Jan '23"
hOrder.Strike = 30
RetVal = hOrder.GetExchangeCount(cnt)
For I = 0 To cnt - 1
exch = hOrder.GetExchangeAt(I)
Cells(I + 2, 5).Value = exch
Next I
End Sub0 -
Hello @DDALY ,
I would try to populate as in example
hOrder.Symbol = "SPX"
hOrder.Type = "Call"
hOrder.Date = "Dec '21"
hOrder.Strike = "3800"
hOrder.OptionSymbol = "SPX"let us know if this makes a difference?
0 -
Hi @zoya faberov, No unfortunately that didn't help. Also I get the same problem listing the destination for equity orders. If I set up the basic order details in the ORDER object and retrieve the exchanges I can't see "IBCO DMA" which is what the user selects for equity orders via the UI. Please let me know if you have any other ideas, otherwise I might just set up the desired destinations in the application config. Thanks!
[Also I saw you comment - NOTED - in future I'll create a new question]
0 -
Hi @DDALY ,
I think I understand what is going on. At first I thought the user was not able to populate the destinations correctly, so I have approached from that assumption.
Please refer to REDI Destination Name Mappings doc.
See below:
"IBCO DMA" is "IBO2 DMA", per programmatic interface.
0 -
Hi @zoya faberov, Yes this makes sense now. I confirmed that an order entered with "IBO2 DMA" via the API shows up on the UI as "IBCO DMA" so we're all set. Thanks so much!
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛