1.2.3 • Published 3 years ago

wallstreetbets-scanner v1.2.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

wallstreetbets-scanner

The wallstreetbets-scanner collects statistical data from Reddit (r/wallstreetbets). It tells us how many times do symbols (e.g. TSLA) occurs in x times of API calls, and how many times do different types of flairs were tagged to the posts.

Installation

Install dependencies with npm

npm i wallstreetbets-scanner --save

Or with yarn

yarn add wallstreetbets-scanner --save

Example

const wsbScanner=require('wallstreetbets-scanner')

wsbScanner({
    pages:10,
    retryOnError:true,
    retryTimes:3,
    retryAfter:3,
    hideIfNotMentioned:true,
    sortMethod:"new",
    symbols:["XPEV"]
})
    .then(data=>{
        fs.writeFileSync('output.json',JSON.stringify(data,null,2))
    })

Sample output

{
"MVIS": {
    "occurrence_count": 1336,
        "flair": {
            "News": 85,
            "Discussion": 657,
            "Meme": 58,
            "Mods": 4,
            "Gain": 132,
            "DD": 126,
            "YOLO": 201,
            "Loss": 15,
            "Chart": 18,
            "Daily Discussion": 3
        }
    }
}

Options

Option nameTypeDescriptionDefault value
pagesnumberNumber of page the scanner is going to fetch.100
retryOnErrorbooleanIf "retryOnError" is set to "true", the scanner will call the API again if an error occurs. If will not retryOnError is set to "false".true
retryTimesnumberMaximum attempt to re-run the API call on error occurs.3
retryAfternumberNumber of seconds to wait for re-run the API call after error occurs.3
hideIfNotMentionedbooleanHide the result of a stock if occurrence_count=0.true
sortMethodstringReddit sorting method you want to use.hot
symbolsarrayAn array of symbol string you want to filter.[]
1.2.3

3 years ago

1.2.0

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago