Skip to content

Send a text message and receive a phone call with the latest stock information

Notifications You must be signed in to change notification settings

talaniz/nexmo-stock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nexmo-stock

Send a text message to your registered Vonage phone number and receive a text-to-voice call with the latest stock information. Handles webhooks to receive incoming text messages and outgoing phone call events.

Prerequisites

Before installing, you will need the following:

A new application from developer.nexmo.com with voice capabilities.

Configure a new number and link it to your application.

An Alpha Advantage free API key.

A running instance of redis.

$ redis-server

For local development, ngrok running locally

$ ngrok http 5000

Set up

Fill in the .env-example file with the API information, private key, phone number and application ID, rename to .env.

Add event and answer URLs to your Vonage application:

  • Add the ${NGROK_URL}/inbound and ${NGROK_URL}/delivery urls to your account in the Default SMS Setting.

  • Add the ${NGROK_URL}/answer and ${NGROK_URL}/event urls to your application settings under voice capabilities.

Clone the repository

$ git clone [email protected]:talaniz/vonage-stock.git && cd vonage-stock

Create a virtualenv and install requirements

$ virtualenv -p $(which python3) nexmo-stock && source nexmo-stock/bin/activate
...created virtual environment
$ pip install -r requirements.txt

Start the rq worker application

$ rq worker
14:13:41 Worker rq:worker:afb23ac5ea4e4b129e8a9aea55c0a83f: started, version 1.4.2
...

In another terminal, start the application

$ cd /path/to/nexmo-stock && source bin/activate
$ export FLASK_APP=app.py
$ export FLASK_ENV=development
$ flask run
* Serving Flask app "app.py" (lazy loading)
...

Usage

Send a text to your configured number with a company name or publicly traded stock symbol and answer the call.

About

Send a text message and receive a phone call with the latest stock information

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages