Stock Signals API

getSignal

The getSignal API provides the Barchart Technical Opinion / Signal (buy, sell or hold) based on a variety of short, medium and long-term technical indicators based on a symbol.

All APIs

Contact Us to Get Access

By submitting this form you are opting in to receive email communications from Barchart for related product, service or company information, updates and announcements. You can unsubscribe at anytime. View our Privacy Policy.

Inputs

symbols required

A symbol or code that identifies a financial instrument. Multiple symbols separated by a comma may be used. For futures, notation such as for the active contract or for the first nearby is supported, as is for all futures contracts for a given root symbol, as is for all options contracts for a given underlying futures symbol.

Type
list (A comma or semi-colon delimited string.) 
Example
AAPL,GOOG 

fields optional

The fields requested.

Type
list (A comma or semi-colon delimited string.) 
Example
trendspotterOpinion,adi7DayOpinion,parabolic50DaySignal 

maxRecords optional

The maximum number of records to show in the return.

Type
int (A numeric type defining a whole number. (example: 2)) 
Example
10 
Default
30 

Outputs

Name / Requirement
Description
Type
symbol
always returned
A symbol or code that identifies a financial instrument.
string
A sequence of characters. (example: GOOG)
name
always returned
The full name of the instrument.
string
A sequence of characters. (example: GOOG)
trendspotterOpinion
as requested
The Trendspotter (composite indicator) buy, sell or hold opinion.
string
A sequence of characters. (example: GOOG)
trendspotterStrength
always returned
The Trendspotter Strength
string
A sequence of characters. (example: GOOG)
trendspotterDirection
always returned
The Trendspotter Direction
string
A sequence of characters. (example: GOOG)
adx7DayOpinion
as requested
7-day Average Directional Indicator (short-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
adx7DayStrength
as requested
7-Day Average Strengthal Indicator Strength
string
A sequence of characters. (example: GOOG)
adx7DayDirection
as requested
7 Day Average Directional Indicator Direction
string
A sequence of characters. (example: GOOG)
maHiLo10_8DayOpinion
as requested
10 - 8 Day Moving Average Hilo Channel (short-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
maHiLo10_8DayStrength
as requested
10 - 8 Day Moving Average Hilo Channel Strength
string
A sequence of characters. (example: GOOG)
maHiLo10_8DayDirection
as requested
10 - 8 Day Moving Average Hilo Channel Direction
string
A sequence of characters. (example: GOOG)
ma20DaySignal
as requested
20-Day Moving Average vs Price Indicator (short-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
ma20DayStrength
as requested
20-Day Moving Average vs Price Strength
string
A sequence of characters. (example: GOOG)
ma20DayDirection
as requested
20-Day Moving Average vs Price Direction
string
A sequence of characters. (example: GOOG)
macd20_50DaySignal
as requested
20-50 Day MACD Oscillator (short-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
macd20_50DayStrength
as requested
20-50 Day MACD Oscillator Strength
string
A sequence of characters. (example: GOOG)
macd20_50DayDirection
as requested
20-50 Day MACD Oscillator Direction
string
A sequence of characters. (example: GOOG)
macd20_200DaySignal
as requested
20-200 Day MACD Oscillator (short-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
macd20_200DayStrength
as requested
20-200 Day MACD Oscillator Strength
string
A sequence of characters. (example: GOOG)
macd20_200DayDirection
as requested
20-200 Day MACD Oscillator Direction
string
A sequence of characters. (example: GOOG)
bbands20DaySignal
as requested
20-Day Bollinger Bands (short-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
bbands20DayStrength
as requested
20-Day Bollinger Bands Strength
string
A sequence of characters. (example: GOOG)
bbands20DayDirection
as requested
20-Day Bollinger Bands Direction
string
A sequence of characters. (example: GOOG)
shortTermAverageSignal
always returned
Average signal based on all short-term indicators.
string
A sequence of characters. (example: GOOG)
shortTermAveragePercent
always returned
The percentage / weight of the average signal.
int
A numeric type defining a whole number. (example: 2)
cci40DaySignal
as requested
40-Day Commodity Channel Index (medium-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
cci40DayStrength
as requested
40-Day Commodity Channel Index Strength
string
A sequence of characters. (example: GOOG)
cci40DayDirection
as requested
40-Day Commodity Channel Index Direction
string
A sequence of characters. (example: GOOG)
ma50DaySignal
as requested
50-Day Moving Average vs Price (medium-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
ma50DayStrength
as requested
50-Day Moving Average vs Price Strength
string
A sequence of characters. (example: GOOG)
ma50DayDirection
as requested
50-Day Moving Average vs Price Direction
string
A sequence of characters. (example: GOOG)
macd20_100DaySignal
as requested
20 - 100 Day MACD Oscillator (medium-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
macd20_100DayStrength
as requested
20 - 100 Day MACD Oscillator Strength
string
A sequence of characters. (example: GOOG)
macd20_100DayDirection
as requested
20 - 100 Day MACD Oscillator Direction
string
A sequence of characters. (example: GOOG)
macd50_150DaySignal
as requested
50 - 150 Day MACD Oscillator (medium-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
macd50_150DayStrength
as requested
50 - 150 Day MACD Oscillator Strength
string
A sequence of characters. (example: GOOG)
macd50_150DayDirection
as requested
50 - 150 Day MACD Oscillator Direction
string
A sequence of characters. (example: GOOG)
macd50_200DaySignal
as requested
50 - 200 Day MACD Oscillator (medium-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
macd50_200DayStrength
as requested
50 - 200 Day MACD Oscillator Strength
string
A sequence of characters. (example: GOOG)
macd50_200DayDirection
as requested
50 - 200 Day MACD Oscillator Direction
string
A sequence of characters. (example: GOOG)
parabolic50DaySignal
as requested
50-Day Parabolic Time/Price (medium-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
parabolic50DayStrength
as requested
50-Day Parabolic Time/Price Strength
string
A sequence of characters. (example: GOOG)
parabolic50DayDirection
as requested
50-Day Parabolic Time/Price Direction
string
A sequence of characters. (example: GOOG)
mediumTermAverageSignal
always returned
Average signal based on all medium-term indicators.
string
A sequence of characters. (example: GOOG)
mediumTermAveragePercent
always returned
The percentage / weight of the average signal.
int
A numeric type defining a whole number. (example: 2)
cci60DaySignal
as requested
60-Day Commodity Channel Index (long-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
cci60DayStrength
as requested
60-Day Commodity Channel Index Strength
string
A sequence of characters. (example: GOOG)
cci60DayDirection
as requested
60-Day Commodity Channel Index Direction
string
A sequence of characters. (example: GOOG)
ma100DaySignal
as requested
100-Day Moving Average vs Price (long-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
ma100DayStrength
as requested
100-Day Moving Average vs Price Strength
string
A sequence of characters. (example: GOOG)
ma100DayDirection
as requested
100-Day Moving Average vs Price Direction
string
A sequence of characters. (example: GOOG)
ma150DaySignal
as requested
150-Day Moving Average vs Price (long-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
ma150DayStrength
as requested
150-Day Moving Average vs Price Strength
string
A sequence of characters. (example: GOOG)
ma150DayDirection
as requested
150-Day Moving Average vs Price Direction
string
A sequence of characters. (example: GOOG)
ma200DaySignal
as requested
200-Day Moving Average vs Price (long-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
ma200DayStrength
as requested
200-Day Moving Average vs Price Strength
string
A sequence of characters. (example: GOOG)
ma200DayDirection
as requested
200-Day Moving Average vs Price Direction
string
A sequence of characters. (example: GOOG)
macd50_100DaySignal
as requested
50 - 100 Day MACD Oscillator (long-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
macd50_100DayStrength
as requested
50 - 100 Day MACD Oscillator Strength
string
A sequence of characters. (example: GOOG)
macd50_100DayDirection
as requested
50 - 100 Day MACD Oscillator Direction
string
A sequence of characters. (example: GOOG)
macd100_200DaySignal
as requested
100 - 200 Day MACD Oscillator (long-term indicator) buy, sell or hold signal.
string
A sequence of characters. (example: GOOG)
macd100_200DayStrength
as requested
100 - 200 Day MACD Oscillator Strength
string
A sequence of characters. (example: GOOG)
macd100_200DayDirection
as requested
100 - 200 Day MACD Oscillator Direction
string
A sequence of characters. (example: GOOG)
longTermAverageSignal
always returned
Average signal based on all long-term indicators.
string
A sequence of characters. (example: GOOG)
longTermAveragePercent
always returned
The percentage / weight of the average signal.
int
A numeric type defining a whole number. (example: 2)
overallAverageSignal
always returned
Average signal based on all indicators.
string
A sequence of characters. (example: GOOG)
overallAveragePercent
always returned
The percentage / weight of the average signal.
int
A numeric type defining a whole number. (example: 2)
overallAverageStrength
always returned
string
A sequence of characters. (example: GOOG)
overallAverageDirection
always returned
string
A sequence of characters. (example: GOOG)
previousDaySignal
always returned
Signal based on previous business day's performance.
string
A sequence of characters. (example: GOOG)
previousDayPercent
always returned
The percentage / weight of previous business day's signal.
int
A numeric type defining a whole number. (example: 2)
lastWeekSignal
always returned
Average signal based on last week's performance.
string
A sequence of characters. (example: GOOG)
lastWeekPercent
always returned
The percentage / weight of last week's signal.
int
A numeric type defining a whole number. (example: 2)
lastMonthSignal
always returned
Average signal based on last month's performance.
string
A sequence of characters. (example: GOOG)
lastMonthPercent
always returned
The percentage / weight of last month's signal.
int
A numeric type defining a whole number. (example: 2)
trendspotterNewSignal
as requested
string
A sequence of characters. (example: GOOG)
adx7DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)
maHiLo10_8DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)
ma20DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)
macd20_50DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)
bbands20DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)
cci40DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)
ma50DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)
macd20_100DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)
parabolic50DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)
cci60DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)
ma100DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)
macd50_100DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)
macd20_200DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)
macd50_150DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)
macd50_200DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)
ma150DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)
ma200DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)
macd100_200DayNewSignal
as requested
string
A sequence of characters. (example: GOOG)

Status Code Responses

200
OK
Success
400
Bad Request
The request was invalid, please see the message for more information.
500
Internal Server Error
Something is not working correctly, please contact support.


JSON

GET

GET https://ondemand.websol.barchart.com/getSignal.json?apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=trendspotterOpinion%2Cadi7DayOpinion%2Cparabolic50DaySignal&maxRecords=10
Host: ondemand.websol.barchart.com

POST

POST https://ondemand.websol.barchart.com/getSignal.json
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length

apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=trendspotterOpinion%2Cadi7DayOpinion%2Cparabolic50DaySignal&maxRecords=10

Response

{
    "status": {
        "code": 200,
        "message": "Success."
    },
    "results": [
        {
            "symbol": "AAPL",
            "name": "Apple Inc",
            "trendspotterOpinion": "Buy",
            "trendspotterStrength": "Average",
            "trendspotterDirection": "Weakest",
            "shortTermAverageSignal": "Buy",
            "shortTermAveragePercent": 100,
            "parabolic50DaySignal": "Buy",
            "mediumTermAverageSignal": "Buy",
            "mediumTermAveragePercent": 100,
            "longTermAverageSignal": "Buy",
            "longTermAveragePercent": 100,
            "overallAverageSignal": "Buy",
            "overallAveragePercent": 100,
            "overallAverageStrength": "Top 1%",
            "overallAverageDirection": "Strongest",
            "previousDaySignal": "Buy",
            "previousDayPercent": 100,
            "lastWeekSignal": "Buy",
            "lastWeekPercent": 100,
            "lastMonthSignal": "Buy",
            "lastMonthPercent": 100
        },
        {
            "symbol": "GOOG",
            "name": "Alphabet Cl C",
            "trendspotterOpinion": "Buy",
            "trendspotterStrength": "Soft",
            "trendspotterDirection": "Strongest",
            "shortTermAverageSignal": "Buy",
            "shortTermAveragePercent": 100,
            "parabolic50DaySignal": "Buy",
            "mediumTermAverageSignal": "Buy",
            "mediumTermAveragePercent": 100,
            "longTermAverageSignal": "Buy",
            "longTermAveragePercent": 100,
            "overallAverageSignal": "Buy",
            "overallAveragePercent": 100,
            "overallAverageStrength": "Maximum",
            "overallAverageDirection": "Top 1%",
            "previousDaySignal": "Buy",
            "previousDayPercent": 100,
            "lastWeekSignal": "Buy",
            "lastWeekPercent": 100,
            "lastMonthSignal": "Buy",
            "lastMonthPercent": 80
        }
    ]
}

XML

GET

GET https://ondemand.websol.barchart.com/getSignal.xml?apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=trendspotterOpinion%2Cadi7DayOpinion%2Cparabolic50DaySignal&maxRecords=10
Host: ondemand.websol.barchart.com

POST

POST https://ondemand.websol.barchart.com/getSignal.xml
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length

apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=trendspotterOpinion%2Cadi7DayOpinion%2Cparabolic50DaySignal&maxRecords=10

Response


<?xml version="1.0" encoding="utf-8"?>
 <getSignal>
  <status>
   <code>200</code>
   <message>Success.</message>
  </status>
  <item>
   <symbol>AAPL</symbol>
   <name>Apple Inc</name>
   <trendspotterOpinion>Buy</trendspotterOpinion>
   <trendspotterStrength>Average</trendspotterStrength>
   <trendspotterDirection>Weakest</trendspotterDirection>
   <shortTermAverageSignal>Buy</shortTermAverageSignal>
   <shortTermAveragePercent>100</shortTermAveragePercent>
   <parabolic50DaySignal>Buy</parabolic50DaySignal>
   <mediumTermAverageSignal>Buy</mediumTermAverageSignal>
   <mediumTermAveragePercent>100</mediumTermAveragePercent>
   <longTermAverageSignal>Buy</longTermAverageSignal>
   <longTermAveragePercent>100</longTermAveragePercent>
   <overallAverageSignal>Buy</overallAverageSignal>
   <overallAveragePercent>100</overallAveragePercent>
   <overallAverageStrength>Top 1%</overallAverageStrength>
   <overallAverageDirection>Strongest</overallAverageDirection>
   <previousDaySignal>Buy</previousDaySignal>
   <previousDayPercent>100</previousDayPercent>
   <lastWeekSignal>Buy</lastWeekSignal>
   <lastWeekPercent>100</lastWeekPercent>
   <lastMonthSignal>Buy</lastMonthSignal>
   <lastMonthPercent>100</lastMonthPercent>
  </item>
  <item>
   <symbol>GOOG</symbol>
   <name>Alphabet Cl C</name>
   <trendspotterOpinion>Buy</trendspotterOpinion>
   <trendspotterStrength>Soft</trendspotterStrength>
   <trendspotterDirection>Strongest</trendspotterDirection>
   <shortTermAverageSignal>Buy</shortTermAverageSignal>
   <shortTermAveragePercent>100</shortTermAveragePercent>
   <parabolic50DaySignal>Buy</parabolic50DaySignal>
   <mediumTermAverageSignal>Buy</mediumTermAverageSignal>
   <mediumTermAveragePercent>100</mediumTermAveragePercent>
   <longTermAverageSignal>Buy</longTermAverageSignal>
   <longTermAveragePercent>100</longTermAveragePercent>
   <overallAverageSignal>Buy</overallAverageSignal>
   <overallAveragePercent>100</overallAveragePercent>
   <overallAverageStrength>Maximum</overallAverageStrength>
   <overallAverageDirection>Top 1%</overallAverageDirection>
   <previousDaySignal>Buy</previousDaySignal>
   <previousDayPercent>100</previousDayPercent>
   <lastWeekSignal>Buy</lastWeekSignal>
   <lastWeekPercent>100</lastWeekPercent>
   <lastMonthSignal>Buy</lastMonthSignal>
   <lastMonthPercent>80</lastMonthPercent>
  </item>
 </getSignal>

CSV

GET

GET https://ondemand.websol.barchart.com/getSignal.csv?apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=trendspotterOpinion%2Cadi7DayOpinion%2Cparabolic50DaySignal&maxRecords=10
Host: ondemand.websol.barchart.com

POST

POST https://ondemand.websol.barchart.com/getSignal.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length

apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=trendspotterOpinion%2Cadi7DayOpinion%2Cparabolic50DaySignal&maxRecords=10

Response

symbol,name,trendspotterOpinion,trendspotterStrength,trendspotterDirection,shortTermAverageSignal,shortTermAveragePercent,parabolic50DaySignal,mediumTermAverageSignal,mediumTermAveragePercent,longTermAverageSignal,longTermAveragePercent,overallAverageSignal,overallAveragePercent,overallAverageStrength,overallAverageDirection,previousDaySignal,previousDayPercent,lastWeekSignal,lastWeekPercent,lastMonthSignal,lastMonthPercent
"AAPL","Apple Inc","Buy","Average","Weakest","Buy","100","Buy","Buy","100","Buy","100","Buy","100","Top 1%","Strongest","Buy","100","Buy","100","Buy","100"
"GOOG","Alphabet Cl C","Buy","Soft","Strongest","Buy","100","Buy","Buy","100","Buy","100","Buy","100","Maximum","Top 1%","Buy","100","Buy","100","Buy","80"


PHP

<?php

$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');

$params = [
    'apikey' => 'YOUR_API_KEY',
    'symbols' => 'AAPL,GOOG',
    'fields' => 'trendspotterOpinion,adi7DayOpinion,parabolic50DaySignal',
    'maxRecords' => '10',
];

$result = $ondemand->getSignal($params);
var_dump($result);

Classic ASP

Dim ondemand
Dim result

Set ondemand = Server.CreateObject("MSSOAP.SoapClient30")
ondemand.ClientProperty("ServerHTTPRequest") = True
ondemand.MSSoapInit("https://ondemand.websol.barchart.com/service?wsdl")

Set result = ondemand.getSignal("YOUR_API_KEY", "AAPL,GOOG", "trendspotterOpinion,adi7DayOpinion,parabolic50DaySignal", "10")

Perl

use SOAP::Lite;
use SOAP::WSDL;

my $ondemand = SOAP::Lite
    -> service('https://ondemand.websol.barchart.com/service?wsdl');

my $result = $ondemand->getSignal('YOUR_API_KEY', 'AAPL,GOOG', 'trendspotterOpinion,adi7DayOpinion,parabolic50DaySignal', '10');

print $result;

Python

from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')

result = client.service.getSignal('YOUR_API_KEY', 'AAPL,GOOG', 'trendspotterOpinion,adi7DayOpinion,parabolic50DaySignal', '10')

print result

Ruby

require 'savon'

ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')

response = ondemand.call(
    :getSignal,
    message: {
        apikey: 'YOUR_API_KEY',
        symbols: 'AAPL,GOOG',
        fields: 'trendspotterOpinion,adi7DayOpinion,parabolic50DaySignal',
        maxRecords: '10',
    }
)

response.body