getMomentum
The getMomentum API provides a daily summary on the number of advancing, declining and unchanged stocks, as well as the percentage of stocks above moving averages of different lengths.
All APIsA country code identifying a group of stocks listed in a country.
The code for the exchange a group of financial instruments are listed on.
GET
GET https://ondemand.websol.barchart.com/getMomentum.json?apikey=YOUR_API_KEY&country=US&exchanges=NASDAQ
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getMomentum.json
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&country=US&exchanges=NASDAQ
Response
{
"status": {
"code": 200,
"message": "Success."
},
"results": [
{
"country": "US",
"advancesToday": 2081,
"advancesYesterday": 2999,
"advancesLastWeek": 2943,
"advancesLastMonth": 3067,
"unchgToday": 146,
"unchgYesterday": 146,
"unchgLastWeek": 275,
"unchgLastMonth": 192,
"declinesToday": 2560,
"declinesYesterday": 1648,
"declinesLastWeek": 1569,
"declinesLastMonth": 1548,
"percentAbove20dMAtoday": 6432,
"percentAbove20dMAyesterday": 671,
"percentAbove20dMALastWeek": 6343,
"percentAbove20dMALastMonth": 4445,
"percentAbove50dMAtoday": 6764,
"percentAbove50dMAyesterday": 6865,
"percentAbove50dMALastWeek": 5611,
"percentAbove50dMALastMonth": 5009,
"percentAbove100dMAtoday": 6688,
"percentAbove100dMAyesterday": 6697,
"percentAbove100dMALastWeek": 6012,
"percentAbove100dMALastMonth": 5825,
"percentAbove150dMAtoday": 6384,
"percentAbove150dMAyesterday": 636,
"percentAbove150dMALastWeek": 6066,
"percentAbove150dMALastMonth": 5798,
"percentAbove200dMAtoday": 6111,
"percentAbove200dMAyesterday": 6129,
"percentAbove200dMALastWeek": 6049,
"percentAbove200dMALastMonth": 5805
}
]
}
GET
GET https://ondemand.websol.barchart.com/getMomentum.xml?apikey=YOUR_API_KEY&country=US&exchanges=NASDAQ
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getMomentum.xml
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&country=US&exchanges=NASDAQ
Response
<?xml version="1.0" encoding="utf-8"?>
<getMomentum>
<status>
<code>200</code>
<message>Success.</message>
</status>
<item>
<country>US</country>
<advancesToday>2081</advancesToday>
<advancesYesterday>2999</advancesYesterday>
<advancesLastWeek>2943</advancesLastWeek>
<advancesLastMonth>3067</advancesLastMonth>
<unchgToday>146</unchgToday>
<unchgYesterday>146</unchgYesterday>
<unchgLastWeek>275</unchgLastWeek>
<unchgLastMonth>192</unchgLastMonth>
<declinesToday>2560</declinesToday>
<declinesYesterday>1648</declinesYesterday>
<declinesLastWeek>1569</declinesLastWeek>
<declinesLastMonth>1548</declinesLastMonth>
<percentAbove20dMAtoday>6432</percentAbove20dMAtoday>
<percentAbove20dMAyesterday>671</percentAbove20dMAyesterday>
<percentAbove20dMALastWeek>6343</percentAbove20dMALastWeek>
<percentAbove20dMALastMonth>4445</percentAbove20dMALastMonth>
<percentAbove50dMAtoday>6764</percentAbove50dMAtoday>
<percentAbove50dMAyesterday>6865</percentAbove50dMAyesterday>
<percentAbove50dMALastWeek>5611</percentAbove50dMALastWeek>
<percentAbove50dMALastMonth>5009</percentAbove50dMALastMonth>
<percentAbove100dMAtoday>6688</percentAbove100dMAtoday>
<percentAbove100dMAyesterday>6697</percentAbove100dMAyesterday>
<percentAbove100dMALastWeek>6012</percentAbove100dMALastWeek>
<percentAbove100dMALastMonth>5825</percentAbove100dMALastMonth>
<percentAbove150dMAtoday>6384</percentAbove150dMAtoday>
<percentAbove150dMAyesterday>636</percentAbove150dMAyesterday>
<percentAbove150dMALastWeek>6066</percentAbove150dMALastWeek>
<percentAbove150dMALastMonth>5798</percentAbove150dMALastMonth>
<percentAbove200dMAtoday>6111</percentAbove200dMAtoday>
<percentAbove200dMAyesterday>6129</percentAbove200dMAyesterday>
<percentAbove200dMALastWeek>6049</percentAbove200dMALastWeek>
<percentAbove200dMALastMonth>5805</percentAbove200dMALastMonth>
</item>
</getMomentum>
GET
GET https://ondemand.websol.barchart.com/getMomentum.csv?apikey=YOUR_API_KEY&country=US&exchanges=NASDAQ
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getMomentum.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&country=US&exchanges=NASDAQ
Response
country,advancesToday,advancesYesterday,advancesLastWeek,advancesLastMonth,unchgToday,unchgYesterday,unchgLastWeek,unchgLastMonth,declinesToday,declinesYesterday,declinesLastWeek,declinesLastMonth,percentAbove20dMAtoday,percentAbove20dMAyesterday,percentAbove20dMALastWeek,percentAbove20dMALastMonth,percentAbove50dMAtoday,percentAbove50dMAyesterday,percentAbove50dMALastWeek,percentAbove50dMALastMonth,percentAbove100dMAtoday,percentAbove100dMAyesterday,percentAbove100dMALastWeek,percentAbove100dMALastMonth,percentAbove150dMAtoday,percentAbove150dMAyesterday,percentAbove150dMALastWeek,percentAbove150dMALastMonth,percentAbove200dMAtoday,percentAbove200dMAyesterday,percentAbove200dMALastWeek,percentAbove200dMALastMonth
"US","2081","2999","2943","3067","146","146","275","192","2560","1648","1569","1548","6432","671","6343","4445","6764","6865","5611","5009","6688","6697","6012","5825","6384","636","6066","5798","6111","6129","6049","5805"
<?php
$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');
$params = [
'apikey' => 'YOUR_API_KEY',
'country' => 'US',
'exchanges' => 'NASDAQ',
];
$result = $ondemand->getMomentum($params);
var_dump($result);
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.getMomentum("YOUR_API_KEY", "US", "NASDAQ")
use SOAP::Lite;
use SOAP::WSDL;
my $ondemand = SOAP::Lite
-> service('https://ondemand.websol.barchart.com/service?wsdl');
my $result = $ondemand->getMomentum('YOUR_API_KEY', 'US', 'NASDAQ');
print $result;
from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')
result = client.service.getMomentum('YOUR_API_KEY', 'US', 'NASDAQ')
print result
require 'savon'
ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')
response = ondemand.call(
:getMomentum,
message: {
apikey: 'YOUR_API_KEY',
country: 'US',
exchanges: 'NASDAQ',
}
)
response.body