iPredict

Live Traders: 12
Login to your iPredict account
New announcement. Please read.

iPredict Resources

API Developer Google Group

We have used a Google group to collectivly assemble our developer documentation.
The implications for this are many, however we hope that this will provide a more developer friendly atmosphere allowing accelerated development with 3rd party applications.

Embed Stock Charts

How To Embed Flash Stock Charts

You can use the following code to easily embed a flash stock chart into your own webpage.
Replace the STOCK_SYMBOL & DAYS_OF_DATA keywords in the code below with the ‘stock symbol’ and
‘no of days of data’ you want to display in the stock chart.

The following code is required to be placed in a properly formed HTML document. This means <html> & <body> tags.
The code can be placed anywhere within the <body> tag.

    <div id="stock-chart-div"></div>
    <script type="text/javascript"
    src="http://ipredict.co.nz/includes/js/mootools-core-yc.js"></script>
    <script type="text/javascript">
    /* <![CDATA[ */
    window.addEvent('domready', function() {
      var stockChart = new Swiff(
        '/includes/flash/stock-chart.swf', {
          id: 'stock-chart',
          width: 500,
          height: 340,
          container: $('stock-chart-div'),
          params: {
            allowFullScreen: 'false',
           allowScriptAccess: 'sameDomain',
            quality: 'high'
          },
          vars: {
            symbol: "STOCK_SYMBOL",
            days: 'DAYS_OF_DATA'
          }
      });
    });
    /* ]]> */
    </script>
How To Embed Image Stock Charts

Embed live iPredict market data on your own site by using the forms below to generate the HTML, then copy the HTML and paste it into any webpage on your own site.

Single Stock Charts

Choose your stock and chart size then copy / paste the HTML code below to display a single stock chart.

Single Stock Chart

Multi-Stock Charts

Choose up to 3 stocks and then copy the code below to display a multi-stock chart.

Multi-Stock Chart

Advanced Settings

There is a wide range of variables available for use. These variables each represent a different part of the URL string to generate a graph. To use these variables, generate a graph from above, and add them into the "src" part of the HTML tag, using the value you’d like. These are used just like most common HTML variables.

sym or sym[]
Symbol Name
col or col[]
Color (ex. darkblue or teal)
kgs or kgs[]
line Weight (n > 0)
val or val[]
Variable to plot (price, pairs, people, value)
size
Size Preset (sml, med, lrg, xlg)
width
Width (60 <= n <= 1960)
height
Height (60 <= n <= 1960)
title
Custom Title
count
How many days to go back (n > 0)
end
End Date (GNU Date format)
leg
Legend Display (true/false)
rd
Right Side Axis (true/false)
format
Date Format (GNU Date format)
vmin
Y-Axis minimum (n >= 0)
vmax
Y-Axis maximum (vmin < vmax <= 1)
hp
Horizontal Points (n >= 0)