getSignal API

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

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 <root_symbol*0> for the active contract or <root_symbol*1> for the first nearby is supported, as is <root_symbol^F> for all futures contracts for a given root symbol, as is <root_symbol^O> 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)
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)
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)
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)
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)

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": "Strengthening",
            "shortTermAverageSignal": "Hold",
            "shortTermAveragePercent": 0,
            "parabolic50DaySignal": "Sell",
            "mediumTermAverageSignal": "Buy",
            "mediumTermAveragePercent": 25,
            "longTermAverageSignal": "Buy",
            "longTermAveragePercent": 100,
            "overallAverageSignal": "Buy",
            "overallAveragePercent": 40
        },
        {
            "symbol": "GOOG",
            "name": "Alphabet Class C",
            "trendspotterOpinion": "Buy",
            "trendspotterStrength": "Weak",
            "trendspotterDirection": "Strongest",
            "shortTermAverageSignal": "Buy",
            "shortTermAveragePercent": 80,
            "parabolic50DaySignal": "Buy",
            "mediumTermAverageSignal": "Buy",
            "mediumTermAveragePercent": 75,
            "longTermAverageSignal": "Buy",
            "longTermAveragePercent": 100,
            "overallAverageSignal": "Buy",
            "overallAveragePercent": 88
        }
    ]
}

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>Strengthening</trendspotterDirection>
   <shortTermAverageSignal>Hold</shortTermAverageSignal>
   <shortTermAveragePercent>0</shortTermAveragePercent>
   <parabolic50DaySignal>Sell</parabolic50DaySignal>
   <mediumTermAverageSignal>Buy</mediumTermAverageSignal>
   <mediumTermAveragePercent>25</mediumTermAveragePercent>
   <longTermAverageSignal>Buy</longTermAverageSignal>
   <longTermAveragePercent>100</longTermAveragePercent>
   <overallAverageSignal>Buy</overallAverageSignal>
   <overallAveragePercent>40</overallAveragePercent>
  </item>
  <item>
   <symbol>GOOG</symbol>
   <name>Alphabet Class C</name>
   <trendspotterOpinion>Buy</trendspotterOpinion>
   <trendspotterStrength>Weak</trendspotterStrength>
   <trendspotterDirection>Strongest</trendspotterDirection>
   <shortTermAverageSignal>Buy</shortTermAverageSignal>
   <shortTermAveragePercent>80</shortTermAveragePercent>
   <parabolic50DaySignal>Buy</parabolic50DaySignal>
   <mediumTermAverageSignal>Buy</mediumTermAverageSignal>
   <mediumTermAveragePercent>75</mediumTermAveragePercent>
   <longTermAverageSignal>Buy</longTermAverageSignal>
   <longTermAveragePercent>100</longTermAveragePercent>
   <overallAverageSignal>Buy</overallAverageSignal>
   <overallAveragePercent>88</overallAveragePercent>
  </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
"AAPL","Apple Inc","Buy","Average","Strengthening","Hold","0","Sell","Buy","25","Buy","100","Buy","40"
"GOOG","Alphabet Class C","Buy","Weak","Strongest","Buy","80","Buy","Buy","75","Buy","100","Buy","88"


PHP

<?php

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

$params = [
    '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("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('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('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: {
        symbols: 'AAPL,GOOG',
        fields: 'trendspotterOpinion,adi7DayOpinion,parabolic50DaySignal',
        maxRecords: '10',
    }
)

response.body