You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
library(rib)
ew<-IBWrapSimple$new()
ic<-IBClient$new(ew)
ic$connect(port=4002, clientId=1)
reqId<-123ss<-ScannerSubscriptionss$numberOfRows<-10ss$instrument<-"STK"ss$locationCode<-"STK.US.MAJOR"ss$scanCode<-"MOST_ACTIVE"filters<- c(avgVolumeAbove="1000000", marketCapAbove1e6="100")
ic$reqScannerSubscription(reqId, ss, character(), filters)
ic$checkMsg()
# Results are received and continuously updated# Finally to cancel the subscriptionic$cancelScannerSubscription(reqId)
# To request the available scanner parametersic$reqScannerParameters()
ic$checkMsg()
# Result is a big XML blob found at ew$context$scannerParameters
Few observations:
filters are set in two places: fields of the ScannerSubscription structure and tag-value pairs in the last argument of ic$reqScannerSubscription()
to find out which codes and filters are available use reqScannerParameters() which returns what's available in XML format via scannerParameters()
this is a subscription: i.e. results are periodically updated until cancelScannerSubscription() is sent
Thank you so much for this library. It has helped me tremendously.
I am a bit stuck on how to set-up market scanners. Could you kindly point me to any resource that will help me.
Thanks in advance.
Kind regards
Joe
The text was updated successfully, but these errors were encountered: