twsScannerSubscription {IBrokers}R Documentation

Create ScannerSubscription

Description

Create an object for use with reqScannerSubscription and .reqScannerSubscription.

Usage

twsScannerSubscription(numberOfRows = -1, 
                       instrument = "", 
                       locationCode = "", 
                       scanCode = "", 
                       abovePrice = "", 
                       belowPrice = "", 
                       aboveVolume = "",
                       averageOptionVolumeAbove = "",
                       marketCapAbove = "", 
                       marketCapBelow = "", 
                       moodyRatingAbove = "", 
                       moodyRatingBelow = "", 
                       spRatingAbove = "", 
                       spRatingBelow = "", 
                       maturityDateAbove = "", 
                       maturityDateBelow = "", 
                       couponRateAbove = "", 
                       couponRateBelow = "", 
                       excludeConvertible = "", 
                       scannerSettingPairs = "", 
                       stockTypeFilter = "")

Arguments

numberOfRows

Number of rows of scanner results returned

instrument

A character string of STK, ...

locationCode

A character string of STK.NA, STK.US, STK.US.MAJOR, ...

scanCode

One of the available scans. See details

abovePrice

Price to filter above

belowPrice

Price to filter below

aboveVolume

Volume to filter above

averageOptionVolumeAbove

Average option volume above this

marketCapAbove

Market cap to filter above

marketCapBelow

Market cap to filter below

moodyRatingAbove

Moody rating to filter above

moodyRatingBelow

Moody rating to filter below

spRatingAbove

S&P rating to filter above

spRatingBelow

S&P rating to filter below

maturityDateAbove

Maturity date to filter above

maturityDateBelow

Maturity date to filter below

couponRateAbove

Coupon rate to filter above

couponRateBelow

Coupon rate to filter below

excludeConvertible

?

scannerSettingPairs

?

stockTypeFilter

"ALL"?

Details

By necessity, design, or otherwise - scanner data is difficult to correctly use at the API level. The valid values and some small examples are returned by the API using the related reqScannerParameters function. The XML returned by that call isn't very clear in its value or purpose though.

Value

A (potentially) valid twsScannerSubscription object for reqScannerSubscription calls.

Note

Further documentation will be forthcoming. Users are encouraged to email use cases to make for better documentation.

Author(s)

Jeffrey A. Ryan

References

https://interactivebrokers.github.io/tws-api/classIBApi_1_1ScannerSubscription.html

See Also

reqScannerSubscription,

Examples

scnr <- twsScannerSubscription(numberOfRows=10,
                               instrument="STK",
                               locationCode="STK.US.MAJOR",
                               scanCode="TOP_PERC_GAIN",
                               aboveVolume=0,
                               marketCapAbove=1e8,
                               scannerSettingPairs="Annual,true",
                               stockTypeFilter="ALL")
scnr

[Package IBrokers version 0.10-2 Index]