How to send Stop Market entry order from Excel VBA to REDI Plus
Hello, I am trying to send a Stop Market entry order from excel VBA to REDI Plus, the code is like below,
Dim hOrder As New Order
hOrder.Symbol ='SQQQ
hOrder.Side = "Buy"
hOrder.Quantity = 100
hOrder.Exchange = "GSDE Algo"
hOrder.PriceType = "SOR GSDE"
hOrder.StopPrice = 26.88
hOrder.TIF = TIF
hOrder.Account = AccountID
hOrder.Ticket = "Bypass"
It filled as a market order immediately without waiting for he price breakout the StopPrice. I checked the variable, hOrder.IsStopPriceEnabled which is false in this case. My question is that how can I enable it?
Also I tried some other PriceTypes from the API, like the "Stop", it will pop up "PriceType invalid" error.
By the way, I am able to send the stop market entry order in REDI plus without problem. it just need to set the DESINATION as GSCO NA Eq Algo, the PRICE TYPE as SOR, the ORDER TYPE as Stop, and fill out the price in the "STOP" field instead of "PRICE" field. But in the API, there is only one property to set the "Price Type" and "Order Type", the options are:
• Market
• Limit
• Stop
• Stop Limit
• Peg Ask
• Peg Bid
• Peg Mid
• Market Close
• Limit Close
So how can I set them from VBA code to match the fields in REDI Plus?
Best Answer
-
Hello @Gerry Z,
If you are running a REDI Order Entry example (?), try:
1. Modifying generic order creation code to set StopPrice similar to:
hOrder.Side = Side
hOrder.Quantity = Quantity
hOrder.Symbol = Symbol
hOrder.Exchange = Exchange
hOrder.PriceType = PriceType
hOrder.Price = Price
hOrder.StopPrice = Price
hOrder.TIF = TIF
hOrder.Account = Account
hOrder.Warning = False
hOrder.Ticket = "Bypass"2.Selecting Stop from the Order Type drop-down:
3. Verifying via RediPLus if the order submitted is, in fact, a stop order next:
Hope this helps
0
Answers
-
Zoya,
Thank you for the quick response, that's exactly what I am looking for. But unfortunately the examples I downloaded from github
https://github.com/TR-API-Samples/Example.REDI.VB.ExcelExamplesdoes not include the one you showed here, could you let me know where to find it or share it with me if possible?
Best,
Gerry
0 -
Hello @Gerry Z,
I tested with Order Entry - PT Batch Load (Global Equities & Futures) example on
GitHub: Refinitiv-API-Samples /Example.REDI.VB.ExcelExamples.
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 中文论坛