https://github.com/karan/slashstock
Get stock quotes in Twitter. (@slashStock GOOG)
https://github.com/karan/slashstock
Last synced: 9 months ago
JSON representation
Get stock quotes in Twitter. (@slashStock GOOG)
- Host: GitHub
- URL: https://github.com/karan/slashstock
- Owner: karan
- License: apache-2.0
- Created: 2016-01-07T04:00:53.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-19T07:20:43.000Z (over 9 years ago)
- Last Synced: 2025-04-04T23:29:50.566Z (9 months ago)
- Language: Python
- Homepage: https://twitter.com/slashStock
- Size: 333 KB
- Stars: 9
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# slashStock
Get stock quotes in Twitter. (@slashStock GOOG)
[](https://twitter.com/slashStock/status/684970654714626052)
### Usage
The bot understand commands in this format:
@slashStock SYMBOL TIME_SPAN
* `SYMBOL` - Any stock symbol. Can contain `$` symbol. Can specify the exchange.
* `TIME_SPAN` (optional) - Time span to pull the chart for.
* Defaults to `1d` if not specifed
* Possible values: one of `1d`, `5d`, `3m`, `6m`, `1y`, `2y`, `5y`, `my` (max)
### Example
* Amazon - `@slashStock AMZN`
* Netflix - `Netflix is now in 190 countries. Damn! @slashStock $NFLX`
* S&P 500 - `@slashStock SPY 5y`
* Greece ETF - `@slashStock GREK 2y`
### Where is this bot running?
Currently I'm running this bot on a 1GB [DigitalOcean](https://www.digitalocean.com/?refcode=422889a8186d) instance (Use that link to get a free VPS for 2 months). The bot is not resource-intensive and uses a couple dozen MBs of RAM.
## Running
#### Requirements
- Python 2+
- pip
#### Instructions
Create a file called `config.py` that looks like `config_example.py`. Fill in the necessary values.
For Twitter config:
1. Register your app
2. Get your app's key and secret.
3. Create token and get the token and secret by running `oauth.py`
Then, to run the bot:
```bash
$ pip install -r requirements.txt
$ python bot.py
```
## License
Apache 2.0