REDI API cancel order by OrderRefKey
I have the following code but it throws type mismatch.
object err = null;
rediCache.Submit("Message", "Status==0 || Status==1 || Status==2 || Status==3", ref err);
rediCache.CancelByKey(redi_user_id, "gS01568314", ref err);
System.Runtime.InteropServices.COMException: 'Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))'
Could you also explain whether .submt() is necessary and what those status denotes?
Additionally, is there anything I must do when stopping application? Sometimes I noticed REDI hangs after I abruptly terminate redi api application.
Thank you!
Best Answer
-
@39783854-26aa-4fea-bc93-00b2ec21f8bb_deprecated_3a75f99c-5134-4b2b-ba84-37662f80bc56
I got the same exception if CancelByKey is called immediately after Submit. It works fine if I call CancelByKey in the CacheEvent handler.
However, from my test, the CancelByKey can be called without Submit.
object err = null;
rediCache.CancelByKey(redi_user_id, "gS01568314", ref err);The meanings of status codes and where options are mentioned in Appendix A REDI Data Fields in the REDI API SPECIFICATION.
'======= REDI ORDER STATUS TABLE (status) =============
' 0: Open 1: Partial 2: Complete 3: Canceled 4: Reject
' 5: Deleted 6: Failed 7: Pending Reroute 8: Pending
'======================================================For the hang issue, we need more information. Could you please share the application and steps to replicate the problem?
0
Answers
-
it worked with just submit as you had stated.
I got the example from REDI API pdf
1.10 Order Cancellation
Cancelling an Order By ‘OrderRefKey
Sub CancelOrder() Set OrderQuery = New CacheControl
Public WithEvents OrderQuery As CacheControl
Dim verr, table, where
table = “Message”
where = “Status==0 || Status==1 || Status==2 || Status==3”
OrderQuery.Submit table, where, verr
‘ Cancel Order
OrderQuery.CancelByKey “parkmm”, “YSJ1069332”, verr End Sub
0 -
it worked with just submit as you had stated.
I got the example from REDI API pdf
1.10 Order Cancellation
Cancelling an Order By ‘OrderRefKey
Sub CancelOrder() Set OrderQuery = New CacheControl
Public WithEvents OrderQuery As CacheControl
Dim verr, table, where
table = “Message”
where = “Status==0 || Status==1 || Status==2 || Status==3”
OrderQuery.Submit table, where, verr
‘ Cancel Order
OrderQuery.CancelByKey “parkmm”, “YSJ1069332”, verr End Sub
0 -
it worked with just submit as you had stated.
I got the example from REDI API pdf
1.10 Order Cancellation
Cancelling an Order By ‘OrderRefKey
Sub CancelOrder() Set OrderQuery = New CacheControl
Public WithEvents OrderQuery As CacheControl
Dim verr, table, where
table = “Message”
where = “Status==0 || Status==1 || Status==2 || Status==3”
OrderQuery.Submit table, where, verr
‘ Cancel Order
OrderQuery.CancelByKey “parkmm”, “YSJ1069332”, verr End Sub
0 -
sorry about duplicate posts. My browser hung...
link to redi doc.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 280 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 720 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛