Category: API

Use-cases, tutorials, sample code and videos on the StockViz API

API Samples on GitHub

We will be posting sample code on how to use the StockViz API on our repository at GitHub. All samples use Python and the readme walks you through how you need to be setup on windows to use the samples.

Basic News Reader

As a first cut, we put together a very basic news reader that uses the StockViz API to download company and topic specific news items. It prints out the title and the source url for now. You can jump directly to the python code here.

Next: Your Own News Reading and Sentiment Analysis App

Related

Linking Your Mashape and StockViz Accounts

The StockViz API on Mashape allows programmers to not only build models, but also to place orders. These APIs are listed under the “Accounts” section. If you don’t have a trading account with us, these orders are “dummy” executed and your StockViz portfolio is kept in sync with your model trading activity. If you have a trading account with us, then we will call you first to confirm the order and then place the order for you. For this to work, you need to link your Mashape and StockViz accounts.

Linking Mashape and StockViz

Your Mashape user name can be found on the top-right corner of the page:

mashape username

In this case, the username is “drona”

Now, login to your StockViz account, and navigate to your portfolio.

mashape-stockviz

Under the “Accounts” tab, just enter your Mashape username (in our example, “drona” without the quotes) and hit “submit.”

That’s it. Now your Mashape and StockViz accounts are linked.

The StockViz API

The StockViz API is available on Mashape. We hope that programmers who want to get involved in quantitative trading/investing can make use of our API and build exciting models and strategies.

Why Mashape?

Rather than provide our own infrastructure for our APIs, we decided to host it on Mashape. Here are some the reasons why:

  1. You, as a programmer can “pipe” StockViz data through other APIs on Mashape – you can, for example, pipe our News API through a sentiment analysis API, or use an SMS API to send out alerts.
  2. You get a ready-made, transparent way of tracking your usage – metering for free.
  3. Your personal information is well protected – Mashape has been in this business for a while and have protection in place.
  4. Mashape comes with an issue tracker – you can post all of your problems/solutions/hacks/requests and get them answered in one place.
  5. You can consume the API in any programming language you like (there are 7 supported right out the gates.)

Why provide an API?

Increasingly, our users have been demanding increasing levels of customization. For instance, an alert whenever NIFTYBEES has a Golden Cross, and an alert based on option greeks have been our longest standing requests. Now, with a bit of computer savvy, you can build you own set of alerts to help guide your investing process.

Pricing

We have a “freemium” pricing model. Most users would be happy within the free tier. As your usage grows, you will be billed directly by Mashape.

Getting Started

  1. Register yourself on Mashape.
  2. Link your Mashape and StockViz accounts.
  3. Follow posts on our API section for tutorials, etc.