TradeTech API Documentation
Welcome to the TradeTech API! Built with the powerful combination of Flask and yfinance, our API offers you seamless access to comprehensive financial data for stocks. Whether you're an analyst, developer, or enthusiast, you’ll find our endpoints intuitive and robust for fetching real-time and historical stock information. Dive in and explore the endless possibilities with TradeTech API—your gateway to smarter financial insights.
Ready to get started? Check out our detailed endpoints documentation below!
Parameters
While using the TradeTech API, you'll need to specify several parameters for each request. Below are the key parameters required for different endpoints:
- ticker: Ticker symbol of the stock. (This parameter is mandatory and must be provided by the user.)
- download_period: The period for downloading stock data (default is
"1mo"
for one month). - window: The window period for various calculations (default is
14
days). - smooth_window: The smoothing window for indicators like the Stochastic Oscillator (default is
3
days). - step: The acceleration factor used for Parabolic SAR (default is
0.02
). - max_step: The maximum value allowed for the acceleration factor in Parabolic SAR (default is
0.2
).
You can override these defaults by specifying your own values in the API requests. Refer to the endpoints documentation below for more details on available parameters and their usage.
Endpoints Documentation
General
Real-time Stock Data
Fetch real-time data for a stock.
GET /realtime?ticker=<ticker>&period=<period>&interval=<interval>
Example: /realtime?ticker=AAPL&period=1d&interval=1m
Parameters:
ticker
: Ticker symbol of the stock.period
: Time period for real-time data (1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max).interval
: Interval for real-time data (1m, 2m, 5m, 15m, 30m, 60m, 90m, 1d, 1wk, 1mo).
Example JSON Output
{
"timestamp": "2024-05-28 12:45:00",
"open": 135.0,
"high": 137.5,
"low": 134.8,
"close": 136.2,
"volume": 10000
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/realtime?ticker=AAPL&period=1d&interval=1m")
data = response.json()
print(data)
fetch("https://apitradetech.com/realtime?ticker=AAPL&period=1d&interval=1m")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/realtime?ticker=AAPL&period=1d&interval=1m");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/realtime?ticker=AAPL&period=1d&interval=1m'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/realtime?ticker=AAPL&period=1d&interval=1m';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Stock Information
Fetch general information about a stock.
GET /stockinfo?ticker=<ticker>
Example: /stockinfo?ticker=AAPL
Parameters:
ticker
: Ticker symbol of the stock.
Example JSON Output
{
"ticker": "AAPL",
"marketCap": 2235170000000,
"beta": 1.21,
"PE Ratio": 28.44,
...
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/stockinfo?ticker=AAPL")
data = response.json()
print(data)
fetch("https://apitradetech.com/stockinfo?ticker=AAPL")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/stockinfo?ticker=AAPL");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/stockinfo?ticker=AAPL'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/stockinfo?ticker=AAPL';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Stock History
Fetch historical data for a stock.
GET /stockhist?ticker=<ticker>&download_period=<download_period>
Example: /stockhist?ticker=AAPL&download_period=1mo
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Time period for downloading historical data (1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max).
Example JSON Output
[
{
"Date": "2024-04-18",
"Open": 150.0,
"High": 155.0,
"Low": 149.0,
"Close": 154.0,
"Volume": 100000
},
...
]
Request Examples
import requests
response = requests.get("https://apitradetech.com/stockhist?ticker=AAPL&download_period=1mo")
data = response.json()
print(data)
fetch("https://apitradetech.com/stockhist?ticker=AAPL&download_period=1mo")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/stockhist?ticker=AAPL&download_period=1mo");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/stockhist?ticker=AAPL&download_period=1mo'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/stockhist?ticker=AAPL&download_period=1mo';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Stock Actions
Learn more about dividends and stock splits
Fetch stock actions such as dividends and splits.
GET /actions?ticker=<ticker>
Example: /actions?ticker=AAPL
Parameters:
ticker
: Ticker symbol of the stock.
Example JSON Output
[
{
"Date": "2024-04-18",
"Action": "Dividend",
"Value": 0.22
},
...
]
Request Examples
import requests
response = requests.get("https://apitradetech.com/actions?ticker=AAPL")
data = response.json()
print(data)
fetch("https://apitradetech.com/actions?ticker=AAPL")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/actions?ticker=AAPL");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/actions?ticker=AAPL'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/actions?ticker=AAPL';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Earnings Dates
Learn more about earnings dates
Fetch earnings dates for a stock.
GET /earnings?ticker=<ticker>
Example: /earnings?ticker=AAPL
Parameters:
ticker
: Ticker symbol of the stock.
Example JSON Output
[
{
"Earnings Date": "2024-04-18"
},
...
]
Request Examples
import requests
response = requests.get("https://apitradetech.com/earnings?ticker=AAPL")
data = response.json()
print(data)
fetch("https://apitradetech.com/earnings?ticker=AAPL")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/earnings?ticker=AAPL");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/earnings?ticker=AAPL'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/earnings?ticker=AAPL';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get News
Fetch the latest news for a stock.
GET /news?ticker=<ticker>
Example: /news?ticker=AAPL
Parameters:
ticker
: Ticker symbol of the stock.
Example JSON Output
[
{
"title": "Apple releases new product",
"link": "https://finance.yahoo.com/news/apple-releases-new-product-123456789.html"
},
...
]
Request Examples
import requests
response = requests.get("https://apitradetech.com/news?ticker=AAPL")
data = response.json()
print(data)
fetch("https://apitradetech.com/news?ticker=AAPL")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/news?ticker=AAPL");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/news?ticker=AAPL'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/news?ticker=AAPL';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Options
Get Options Expiration Dates
Learn more about options expiration dates
Fetch options expiration dates for a stock.
GET /optionsexpiration?ticker=<ticker>
Example: /optionsexpiration?ticker=AAPL
Parameters:
ticker
: Ticker symbol of the stock.
Example JSON Output
[
"2024-05-24",
"2024-05-31",
...
]
Request Examples
import requests
response = requests.get("https://apitradetech.com/optionsexpiration?ticker=AAPL")
data = response.json()
print(data)
fetch("https://apitradetech.com/optionsexpiration?ticker=AAPL")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/optionsexpiration?ticker=AAPL");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/optionsexpiration?ticker=AAPL'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/optionsexpiration?ticker=AAPL';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Option Chain for a Specific Date
Learn more about option chains
Fetch the option chain for a stock on a specific date.
GET /optionchain?ticker=<ticker>&date=<date>
Example: /optionchain?ticker=AAPL&date=2024-05-24
Parameters:
ticker
: Ticker symbol of the stock.date
: Expiration date (YYYY-MM-DD).
Example JSON Output
{
"calls": [
{
"contractSymbol": "AAPL240524C00125000",
"strike": 125.0,
...
},
...
],
"puts": [
{
"contractSymbol": "AAPL240524P00125000",
"strike": 125.0,
...
},
...
]
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/optionchain?ticker=AAPL&date=2024-05-24")
data = response.json()
print(data)
fetch("https://apitradetech.com/optionchain?ticker=AAPL&date=2024-05-24")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/optionchain?ticker=AAPL&date=2024-05-24");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/optionchain?ticker=AAPL&date=2024-05-24'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/optionchain?ticker=AAPL&date=2024-05-24';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Moving Averages
Get Simple Moving Average (SMA)
Fetch the Simple Moving Average for a stock.
GET /sma?ticker=<ticker>&download_period=<download_period>&window=<window>
Example: /sma?ticker=AAPL&download_period=1mo&window=20
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Time period for downloading historical data (1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max).window
: The window size for the SMA calculation.
Example JSON Output
{
"Date": "2024-04-18",
"SMA": 150.0
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/sma?ticker=AAPL&download_period=1mo&window=20")
data = response.json()
print(data)
fetch("https://apitradetech.com/sma?ticker=AAPL&download_period=1mo&window=20")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/sma?ticker=AAPL&download_period=1mo&window=20");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/sma?ticker=AAPL&download_period=1mo&window=20'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/sma?ticker=AAPL&download_period=1mo&window=20';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Exponential Moving Average (EMA)
Fetch the Exponential Moving Average for a stock.
GET /ema?ticker=<ticker>&download_period=<download_period>&window=<window>
Example: /ema?ticker=AAPL&download_period=1mo&window=20
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Time period for downloading historical data (1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max).window
: The window size for the EMA calculation.
Example JSON Output
{
"Date": "2024-04-18",
"EMA": 150.0
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/ema?ticker=AAPL&download_period=1mo&window=20")
data = response.json()
print(data)
fetch("https://apitradetech.com/ema?ticker=AAPL&download_period=1mo&window=20")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/ema?ticker=AAPL&download_period=1mo&window=20");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/ema?ticker=AAPL&download_period=1mo&window=20'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/ema?ticker=AAPL&download_period=1mo&window=20';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Kaufman’s Adaptive Moving Average (KAMA) Information
Learn more about Kaufman’s Adaptive Moving Average (KAMA)
Fetch the Kaufman’s Adaptive Moving Average (KAMA) indicators of a stock.
GET /kama?ticker=<ticker>&download_period=<download_period>&window=<window>&pow1=<pow1>&pow2=<pow2>
Example: /kama?ticker=AAPL&download_period=1mo&window=10&pow1=2&pow2=30
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: Number of periods for the efficiency ratio.pow1
: Number of periods for the fastest EMA constant.pow2
: Number of periods for the slowest EMA constant.
Example JSON Output
{
"kama": [
{
"date": "2024-05-01",
"kama": 130.55
},
{
"date": "2024-05-02",
"kama": 131.73
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/kama?ticker=AAPL&download_period=1mo&window=10&pow1=2&pow2=30")
data = response.json()
print(data)
fetch("http://apitradetech.com/kama?ticker=AAPL&download_period=1mo&window=10&pow1=2&pow2=30")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/kama?ticker=AAPL&download_period=1mo&window=10&pow1=2&pow2=30");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/kama?ticker=AAPL&download_period=1mo&window=10&pow1=2&pow2=30'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/kama?ticker=AAPL&download_period=1mo&window=10&pow1=2&pow2=30';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Weighted Moving Average (WMA) Information
Learn more about Weighted Moving Average (WMA)
Fetch the Weighted Moving Average (WMA) of a stock.
GET /wma?ticker=<ticker>&period=<period>&window=<window>
Example: /wma?ticker=AAPL&period=1mo&window=14
Parameters:
ticker
: Ticker symbol of the stock.period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: Window period for the WMA calculation.
Example JSON Output
{
"wma": [
{
"date": "2024-05-01",
"wma": 170.55
},
{
"date": "2024-05-02",
"wma": 170.73
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/wma?ticker=AAPL&period=1mo&window=14")
data = response.json()
print(data)
fetch("http://apitradetech.com/wma?ticker=AAPL&period=1mo&window=14")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/wma?ticker=AAPL&period=1mo&window=14");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/wma?ticker=AAPL&period=1mo&window=14'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/wma?ticker=AAPL&period=1mo&window=14';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Momentum Indicators
Get Relative Strength Index (RSI)
Fetch the Relative Strength Index for a stock.
GET /rsi?ticker=<ticker>&download_period=<download_period>&window=<window>
Example: /rsi?ticker=AAPL&download_period=1mo&window=14
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Time period for downloading historical data (1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max).window
: The window size for the RSI calculation.
Example JSON Output
{
"Date": "2024-04-18",
"RSI": 70.12
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/rsi?ticker=AAPL&download_period=1mo&window=14")
data = response.json()
print(data)
fetch("https://apitradetech.com/rsi?ticker=AAPL&download_period=1mo&window=14")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/rsi?ticker=AAPL&download_period=1mo&window=14");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/rsi?ticker=AAPL&download_period=1mo&window=14'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/rsi?ticker=AAPL&download_period=1mo&window=14';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Moving Average Convergence Divergence (MACD)
Fetch the MACD values for a stock.
GET /macd?ticker=<ticker>&download_period=<download_period>&window_slow=<window_slow>&window_fast=<window_fast>&window_sign=<window_sign>
Example: /macd?ticker=AAPL&download_period=1mo&window_slow=12&window_fast=26&window_sign=9
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Time period for downloading historical data (e.g., '1d', '1mo', etc.).window_slow
: Slow window for MACD.window_fast
: Fast window for MACD.window_sign
: Signal window for MACD.
Example JSON Output
[
{
"Date": "2024-04-25",
"Histogram": 0.0,
"MACD Line": 0.0,
"Signal Line": 0.0
},
{
"Date": "2024-04-26",
"Histogram": 0.03765218794515022,
"MACD Line": 0.04706523493143777,
"Signal Line": 0.009413046986287555
},
{
"Date": "2024-04-29",
"Histogram": -0.20884175023498303,
"MACD Line": -0.2516391408074412,
"Signal Line": -0.0427973905724582
}
...
]
Request Examples
import requests
response = requests.get("https://apitradetech.com/macd?ticker=AAPL&download_period=1mo&window_slow=12&window_fast=26&window_sign=9")
data = response.json()
print(data)
fetch("https://apitradetech.com/macd?ticker=AAPL&download_period=1mo&window_slow=12&window_fast=26&window_sign=9")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/macd?ticker=AAPL&download_period=1mo&window_slow=12&window_fast=26&window_sign=9");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/macd?ticker=AAPL&download_period=1mo&window_slow=12&window_fast=26&window_sign=9'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/macd?ticker=AAPL&download_period=1mo&window_slow=12&window_fast=26&window_sign=9';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Rate of Change (ROC) Information
Learn more about Rate of Change (ROC)
Fetch the Rate of Change (ROC) indicator of a stock.
GET /roc?ticker=<ticker>&download_period=<download_period>&window=<window>
Example: /roc?ticker=AAPL&download_period=1mo&window=14
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: Period for the ROC calculation.
Example JSON Output
{
"roc": [
{
"date": "2024-05-01",
"roc": 2.45
},
{
"date": "2024-05-02",
"roc": 2.47
},
...
]
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/roc?ticker=AAPL&download_period=1mo&window=14")
data = response.json()
print(data)
fetch("https://apitradetech.com/roc?ticker=AAPL&download_period=1mo&window=14")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/roc?ticker=AAPL&download_period=1mo&window=14");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/roc?ticker=AAPL&download_period=1mo&window=14'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/roc?ticker=AAPL&download_period=1mo&window=14';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Stochastic RSI (StochRSI) Information
Learn more about Stochastic RSI (StochRSI)
Fetch the Stochastic RSI (StochRSI), StochRSI %k, and StochRSI %d indicators of a stock.
GET /stochrsi?ticker=<ticker>&download_period=<download_period>&window=<window>&smooth_k=<smooth_k>&smooth_d=<smooth_d>
Example: /stochrsi?ticker=AAPL&download_period=1mo&window=14&smooth_k=3&smooth_d=3
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: Period for the StochRSI calculation.smooth_k
: Smoothing factor for StochRSI %k.smooth_d
: Smoothing factor for StochRSI %d.
Example JSON Output
{
"stochrsi": [
{
"date": "2024-05-01",
"stochrsi": 0.85,
"stochrsi_k": 0.80,
"stochrsi_d": 0.75
},
{
"date": "2024-05-02",
"stochrsi": 0.87,
"stochrsi_k": 0.82,
"stochrsi_d": 0.77
},
...
]
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/stochrsi?ticker=AAPL&download_period=1mo&window=14&smooth_k=3&smooth_d=3")
data = response.json()
print(data)
fetch("https://apitradetech.com/stochrsi?ticker=AAPL&download_period=1mo&window=14&smooth_k=3&smooth_d=3")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/stochrsi?ticker=AAPL&download_period=1mo&window=14&smooth_k=3&smooth_d=3");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/stochrsi?ticker=AAPL&download_period=1mo&window=14&smooth_k=3&smooth_d=3'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/stochrsi?ticker=AAPL&download_period=1mo&window=14&smooth_k=3&smooth_d=3';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get CCI Information
Fetch the Commodity Channel Index (CCI) of a stock.
GET /cci?ticker=<ticker>&download_period=<download_period>&window=<window>&constant=<constant>
Example: /cci?ticker=AAPL&download_period=1mo&window=20&constant=0.015
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: Number of periods.constant
: Constant factor used in the calculation.
Example JSON Output
{
"cci": [
{"date": "2024-05-01", "cci": 100.55},
{"date": "2024-05-02", "cci": 101.73},
{"date": "2024-05-03", "cci": 98.60},
...
]
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/cci?ticker=AAPL&download_period=1mo&window=20&constant=0.015")
data = response.json()
print(data)
fetch("https://apitradetech.com/cci?ticker=AAPL&download_period=1mo&window=20&constant=0.015")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/cci?ticker=AAPL&download_period=1mo&window=20&constant=0.015");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/cci?ticker=AAPL&download_period=1mo&window=20&constant=0.015'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/cci?ticker=AAPL&download_period=1mo&window=20&constant=0.015';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Schaff Trend Cycle (STC) Information
Learn more about Schaff Trend Cycle
Fetch the Schaff Trend Cycle indicators of a stock.
GET /stc?ticker=<ticker>&download_period=<download_period>&window_slow=<window_slow>&window_fast=<window_fast>&cycle=<cycle>
Example: /stc?ticker=AAPL&download_period=1mo&window_slow=50&window_fast=23&cycle=10
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window_slow
: Slow window period for the STC calculation.window_fast
: Fast window period for the STC calculation.cycle
: Cycle period for the STC calculation.
Example JSON Output
{
"stc": [
{
"date": "2024-05-01",
"stc": 73.25
},
{
"date": "2024-05-02",
"stc": 74.58
},
...
]
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/stc?ticker=AAPL&download_period=1mo&window_slow=50&window_fast=23&cycle=10")
data = response.json()
print(data)
fetch("https://apitradetech.com/stc?ticker=AAPL&download_period=1mo&window_slow=50&window_fast=23&cycle=10")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/stc?ticker=AAPL&download_period=1mo&window_slow=50&window_fast=23&cycle=10");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/stc?ticker=AAPL&download_period=1mo&window_slow=50&window_fast=23&cycle=10'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/stc?ticker=AAPL&download_period=1mo&window_slow=50&window_fast=23&cycle=10';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Aroon Indicator Information
Learn more about Aroon Indicator
Fetch the Aroon Indicator of a stock.
GET /aroon?ticker=<ticker>&download_period=<download_period>&window=<window>
Example: /aroon?ticker=AAPL&download_period=1mo&window=14
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: Window period for the Aroon Indicator calculation.
Example JSON Output
{
"aroon": [
{
"date": "2024-05-01",
"aroon_down": 28.57,
"aroon_up": 71.43
},
{
"date": "2024-05-02",
"aroon_down": 28.57,
"aroon_up": 64.29
},
...
]
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/aroon?ticker=AAPL&download_period=1mo&window=14")
data = response.json()
print(data)
fetch("https://apitradetech.com/aroon?ticker=AAPL&download_period=1mo&window=14")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/aroon?ticker=AAPL&download_period=1mo&window=14");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/aroon?ticker=AAPL&download_period=1mo&window=14'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/aroon?ticker=AAPL&download_period=1mo&window=14';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get True Strength Index (TSI) Information
Learn more about True Strength Index (TSI)
Fetch the True Strength Index (TSI) indicators of a stock.
GET /tsi?ticker=<ticker>&download_period=<download_period>&window_slow=<window_slow>&window_fast=<window_fast>&fillna=<fillna>
Example: /tsi?ticker=AAPL&download_period=1mo&window_slow=25&window_fast=13&fillna=1
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window_slow
: Window period for the slow TSI.window_fast
: Window period for the fast TSI.fillna
: Whether to fill NaN values (1 for True, 0 for False).
Example JSON Output
{
"tsi": [
{
"date": "2024-05-01",
"tsi": 15.32
},
{
"date": "2024-05-02",
"tsi": 16.45
},
...
]
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/tsi?ticker=AAPL&download_period=1mo&window_slow=25&window_fast=13&fillna=1")
data = response.json()
print(data)
fetch("https://apitradetech.com/tsi?ticker=AAPL&download_period=1mo&window_slow=25&window_fast=13&fillna=1")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/tsi?ticker=AAPL&download_period=1mo&window_slow=25&window_fast=13&fillna=1");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/tsi?ticker=AAPL&download_period=1mo&window_slow=25&window_fast=13&fillna=1'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/tsi?ticker=AAPL&download_period=1mo&window_slow=25&window_fast=13&fillna=1';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Ultimate Oscillator Information
Learn more about Ultimate Oscillator
Fetch the Ultimate Oscillator indicators of a stock.
GET /ultimate?ticker=<ticker>&download_period=<download_period>&window1=<window1>&window2=<window2>&window3=<window3>&fillna=<fillna>
Example: /ultimate?ticker=AAPL&download_period=1mo&window1=7&window2=14&window3=28&fillna=1
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window1
: First window period for the Ultimate Oscillator.window2
: Second window period for the Ultimate Oscillator.window3
: Third window period for the Ultimate Oscillator.fillna
: Whether to fill NaN values (1 for True, 0 for False).
Example JSON Output
{
"ultimate_oscillator": [
{
"date": "2024-05-01",
"ultimate_oscillator": 55.32
},
{
"date": "2024-05-02",
"ultimate_oscillator": 56.45
},
...
]
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/ultimate?ticker=AAPL&download_period=1mo&window1=7&window2=14&window3=28&fillna=1")
data = response.json()
print(data)
fetch("https://apitradetech.com/ultimate?ticker=AAPL&download_period=1mo&window1=7&window2=14&window3=28&fillna=1")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/ultimate?ticker=AAPL&download_period=1mo&window1=7&window2=14&window3=28&fillna=1");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/ultimate?ticker=AAPL&download_period=1mo&window1=7&window2=14&window3=28&fillna=1'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/ultimate?ticker=AAPL&download_period=1mo&window1=7&window2=14&window3=28&fillna=1';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Williams %R Information
Fetch the Williams %R indicators of a stock.
GET /williams?ticker=<ticker>&download_period=<download_period>&lbp=<lbp>&fillna=<fillna>
Example: /williams?ticker=AAPL&download_period=1mo&lbp=14&fillna=1
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).lbp
: Lookback period for Williams %R calculation.fillna
: Whether to fill NaN values (1 for True, 0 for False).
Example JSON Output
{
"williams_r": [
{
"date": "2024-05-01",
"williams_r": -20.45
},
{
"date": "2024-05-02",
"williams_r": -18.67
},
...
]
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/williams?ticker=AAPL&download_period=1mo&lbp=14&fillna=1")
data = response.json()
print(data)
fetch("https://apitradetech.com/williams?ticker=AAPL&download_period=1mo&lbp=14&fillna=1")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/williams?ticker=AAPL&download_period=1mo&lbp=14&fillna=1");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/williams?ticker=AAPL&download_period=1mo&lbp=14&fillna=1'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/williams?ticker=AAPL&download_period=1mo&lbp=14&fillna=1';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Volume Indicators
Get On-Balance Volume (OBV)
Fetch the OBV values for a stock.
GET /obv?ticker=<ticker>&download_period=<download_period>
Example: /obv?ticker=AAPL&download_period=6mo
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Time period for downloading historical data (e.g., '1d', '1mo', etc.).
Example JSON Output
{
"2024-04-25": 12345678,
"2024-04-26": 12356789,
...
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/obv?ticker=AAPL&download_period=6mo")
data = response.json()
print(data)
fetch("https://apitradetech.com/obv?ticker=AAPL&download_period=6mo")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/obv?ticker=AAPL&download_period=6mo");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/obv?ticker=AAPL&download_period=6mo'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/obv?ticker=AAPL&download_period=6mo';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Accumulation/Distribution Index (ADI) Information
Learn more about Accumulation/Distribution Index
Fetch the Accumulation/Distribution Index (ADI) of a stock.
GET /adi?ticker=<ticker>&download_period=<download_period>
Example: /adi?ticker=AAPL&download_period=1mo
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).
Example JSON Output
{
"adi": [
{
"date": "2024-05-01",
"adi": 123456.78
},
{
"date": "2024-05-02",
"adi": 123789.01
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/adi?ticker=AAPL&download_period=1mo")
data = response.json()
print(data)
fetch("http://apitradetech.com/adi?ticker=AAPL&download_period=1mo")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/adi?ticker=AAPL&download_period=1mo");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/adi?ticker=AAPL&download_period=1mo'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/adi?ticker=AAPL&download_period=1mo';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Chaikin Money Flow (CMF) Information
Learn more about Chaikin Money Flow
Fetch the Chaikin Money Flow (CMF) of a stock.
GET /cmf?ticker=<ticker>&download_period=<download_period>&window=<window>
Example: /cmf?ticker=AAPL&download_period=1mo&window=20
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: The window period for CMF calculation.
Example JSON Output
{
"cmf": [
{
"date": "2024-05-01",
"cmf": 0.23
},
{
"date": "2024-05-02",
"cmf": 0.19
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/cmf?ticker=AAPL&download_period=1mo&window=20")
data = response.json()
print(data)
fetch("http://apitradetech.com/cmf?ticker=AAPL&download_period=1mo&window=20")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/cmf?ticker=AAPL&download_period=1mo&window=20");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/cmf?ticker=AAPL&download_period=1mo&window=20'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/cmf?ticker=AAPL&download_period=1mo&window=20';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Ease of Movement (EoM, EMV) Information
Learn more about Ease of Movement (EoM, EMV)
Fetch the Ease of Movement (EoM, EMV) indicators of a stock.
GET /eom?ticker=<ticker>&period=<period>&window=<window>
Example: /eom?ticker=AAPL&period=1mo&window=14
Parameters:
ticker
: Ticker symbol of the stock.period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: Length for computing the Ease of Movement.
Example JSON Output
{
"ease_of_movement": [
{
"date": "2024-05-01",
"ease_of_movement": 0.23,
"sma_ease_of_movement": 0.18
},
{
"date": "2024-05-02",
"ease_of_movement": 0.25,
"sma_ease_of_movement": 0.20
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/eom?ticker=AAPL&period=1mo&window=14")
data = response.json()
print(data)
fetch("http://apitradetech.com/eom?ticker=AAPL&period=1mo&window=14")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/eom?ticker=AAPL&period=1mo&window=14");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/eom?ticker=AAPL&period=1mo&window=14'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/eom?ticker=AAPL&period=1mo&window=14';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Force Index (FI) Information
Learn more about Force Index (FI)
Fetch the Force Index (FI) of a stock.
GET /fi?ticker=<ticker>&period=<period>&window=<window>
Example: /fi?ticker=AAPL&period=1mo&window=14
Parameters:
ticker
: Ticker symbol of the stock.period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: Length for computing the Force Index.
Example JSON Output
{
"force_index": [
{
"date": "2024-05-01",
"force_index": 12345.67
},
{
"date": "2024-05-02",
"force_index": 12378.90
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/fi?ticker=AAPL&period=1mo&window=14")
data = response.json()
print(data)
fetch("http://apitradetech.com/fi?ticker=AAPL&period=1mo&window=14")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/fi?ticker=AAPL&period=1mo&window=14");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/fi?ticker=AAPL&period=1mo&window=14'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/fi?ticker=AAPL&period=1mo&window=14';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Money Flow Index (MFI) Information
Learn more about Money Flow Index (MFI)
Fetch the Money Flow Index (MFI) of a stock.
GET /mfi?ticker=<ticker>&period=<period>&window=<window>
Example: /mfi?ticker=AAPL&period=1mo&window=14
Parameters:
ticker
: Ticker symbol of the stock.period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: Length for computing the Money Flow Index.
Example JSON Output
{
"money_flow_index": [
{
"date": "2024-05-01",
"money_flow_index": 65.34
},
{
"date": "2024-05-02",
"money_flow_index": 66.78
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/mfi?ticker=AAPL&period=1mo&window=14")
data = response.json()
print(data)
fetch("http://apitradetech.com/mfi?ticker=AAPL&period=1mo&window=14")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/mfi?ticker=AAPL&period=1mo&window=14");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/mfi?ticker=AAPL&period=1mo&window=14'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/mfi?ticker=AAPL&period=1mo&window=14';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Negative Volume Index (NVI) Information
Learn more about Negative Volume Index (NVI)
Fetch the Negative Volume Index (NVI) of a stock.
GET /nvi?ticker=<ticker>&period=<period>&window=<window>
Example: /nvi?ticker=AAPL&period=1mo&window=14
Parameters:
ticker
: Ticker symbol of the stock.period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: Length for computing the Negative Volume Index.
Example JSON Output
{
"negative_volume_index": [
{
"date": "2024-05-01",
"negative_volume_index": 12345.67
},
{
"date": "2024-05-02",
"negative_volume_index": 12378.90
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/nvi?ticker=AAPL&period=1mo&window=14")
data = response.json()
print(data)
fetch("http://apitradetech.com/nvi?ticker=AAPL&period=1mo&window=14")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/nvi?ticker=AAPL&period=1mo&window=14");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/nvi?ticker=AAPL&period=1mo&window=14'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/nvi?ticker=AAPL&period=1mo&window=14';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Volume Price Trend (VPT) Information
Learn more about Volume Price Trend (VPT)
Fetch the Volume Price Trend (VPT) of a stock.
GET /vpt?ticker=<ticker>&period=<period>
Example: /vpt?ticker=AAPL&period=1mo
Parameters:
ticker
: Ticker symbol of the stock.period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).
Example JSON Output
{
"volume_price_trend": [
{
"date": "2024-05-01",
"volume_price_trend": 12345.67
},
{
"date": "2024-05-02",
"volume_price_trend": 12378.90
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/vpt?ticker=AAPL&period=1mo")
data = response.json()
print(data)
fetch("http://apitradetech.com/vpt?ticker=AAPL&period=1mo")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/vpt?ticker=AAPL&period=1mo");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/vpt?ticker=AAPL&period=1mo'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/vpt?ticker=AAPL&period=1mo';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Percentage Volume Oscillator (PVO) Information
Learn more about Percentage Volume Oscillator (PVO)
Fetch the Percentage Volume Oscillator (PVO) indicators of a stock, including PVO Line, PVO Histogram, and PVO Signal Line.
GET /pvo?ticker=<ticker>&download_period=<download_period>&window_slow=<window_slow>&window_fast=<window_fast>&window_sign=<window_sign>
Example: /pvo?ticker=AAPL&download_period=1mo&window_slow=26&window_fast=12&window_sign=9
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window_slow
: Long-term period.window_fast
: Short-term period.window_sign
: Period to signal.
Example JSON Output
{
"pvo": [
{
"date": "2024-05-01",
"pvo_line": 2.34,
"pvo_hist": 0.23,
"pvo_signal": 2.11
},
{
"date": "2024-05-02",
"pvo_line": 2.35,
"pvo_hist": 0.25,
"pvo_signal": 2.13
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/pvo?ticker=AAPL&download_period=1mo&window_slow=26&window_fast=12&window_sign=9")
data = response.json()
print(data)
fetch("http://apitradetech.com/pvo?ticker=AAPL&download_period=1mo&window_slow=26&window_fast=12&window_sign=9")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/pvo?ticker=AAPL&download_period=1mo&window_slow=26&window_fast=12&window_sign=9");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/pvo?ticker=AAPL&download_period=1mo&window_slow=26&window_fast=12&window_sign=9'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/pvo?ticker=AAPL&download_period=1mo&window_slow=26&window_fast=12&window_sign=9';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Volatility Indicators
Get Bollinger Bands
Learn more about Bollinger Bands
Fetch the Bollinger Bands values for a stock.
GET /bollinger_bands?ticker=<ticker>&download_period=<download_period>&window=<window>&window_dev=<window_dev>
Example: /bollinger_bands?ticker=AAPL&download_period=6mo&window=20&window_dev=2
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Time period for downloading historical data (e.g., '1d', '1mo', etc.).window
: Window period for Bollinger Bands.window_dev
: Standard deviation factor for Bollinger Bands.
Example JSON Output
{
"2024-04-25": {
"High Band": 154.28,
"Low Band": 145.12,
"Middle Band": 149.70,
"Percentage Band": 0.0613,
"Width Band": 9.16,
"High Band Indicator": 0,
"Low Band Indicator": 0
},
"2024-04-26": {
"High Band": 155.34,
"Low Band": 146.45,
"Middle Band": 150.90,
"Percentage Band": 0.0589,
"Width Band": 8.89,
"High Band Indicator": 0,
"Low Band Indicator": 0
},
...
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/bollinger_bands?ticker=AAPL&download_period=6mo&window=20&window_dev=2")
data = response.json()
print(data)
fetch("https://apitradetech.com/bollinger_bands?ticker=AAPL&download_period=6mo&window=20&window_dev=2")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/bollinger_bands?ticker=AAPL&download_period=6mo&window=20&window_dev=2");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/bollinger_bands?ticker=AAPL&download_period=6mo&window=20&window_dev=2'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/bollinger_bands?ticker=AAPL&download_period=6mo&window=20&window_dev=2';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Average True Range (ATR) Information
Learn more about Average True Range (ATR)
Fetch the Average True Range (ATR) of a stock.
GET /atr?ticker=<ticker>&period=<period>&window=<window>
Example: /atr?ticker=AAPL&period=1mo&window=14
Parameters:
ticker
: Ticker symbol of the stock.period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: Window period for the ATR calculation.
Example JSON Output
{
"average_true_range": [
{
"date": "2024-05-01",
"average_true_range": 3.56
},
{
"date": "2024-05-02",
"average_true_range": 3.42
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/atr?ticker=AAPL&period=1mo&window=14")
data = response.json()
print(data)
fetch("http://apitradetech.com/atr?ticker=AAPL&period=1mo&window=14")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/atr?ticker=AAPL&period=1mo&window=14");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/atr?ticker=AAPL&period=1mo&window=14'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/atr?ticker=AAPL&period=1mo&window=14';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Ulcer Index Information
Fetch the Ulcer Index indicators of a stock.
GET /ulcer_index?ticker=<ticker>&period=<period>&window=<window>
Example: /ulcer_index?ticker=AAPL&period=1mo&window=14
Parameters:
ticker
: Ticker symbol of the stock.period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: Window period for the Ulcer Index calculation.
Example JSON Output
{
"ulcer_index": [
{
"date": "2024-05-01",
"ulcer_index": 2.45
},
{
"date": "2024-05-02",
"ulcer_index": 2.50
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/ulcer_index?ticker=AAPL&period=1mo&window=14")
data = response.json()
print(data)
fetch("http://apitradetech.com/ulcer_index?ticker=AAPL&period=1mo&window=14")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/ulcer_index?ticker=AAPL&period=1mo&window=14");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/ulcer_index?ticker=AAPL&period=1mo&window=14'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/ulcer_index?ticker=AAPL&period=1mo&window=14';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Trend Following Indicators
Get Average Directional Index (ADX)
Fetch the ADX values for a stock.
GET /adx?ticker=<ticker>&download_period=<download_period>&window=<window>
Example: /adx?ticker=AAPL&download_period=6mo&window=14
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Time period for downloading historical data (e.g., '1d', '1mo', etc.).window
: Window period for ADX calculation.
Example JSON Output
{
"2024-04-25": {
"Average Directional Index": 25.32,
"Minus Directional Indicator": 20.45,
"Plus Directional Indicator": 30.12
},
"2024-04-26": {
"Average Directional Index": 26.45,
"Minus Directional Indicator": 21.30,
"Plus Directional Indicator": 31.56
},
...
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/adx?ticker=AAPL&download_period=6mo&window=14")
data = response.json()
print(data)
fetch("https://apitradetech.com/adx?ticker=AAPL&download_period=6mo&window=14")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/adx?ticker=AAPL&download_period=6mo&window=14");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/adx?ticker=AAPL&download_period=6mo&window=14'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/adx?ticker=AAPL&download_period=6mo&window=14';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get PSAR Information
Learn more about Parabolic SAR
Fetch the Parabolic SAR indicators of a stock.
GET /psar?ticker=<ticker>&download_period=<download_period>&step=<step>&max_step=<max_step>
Example: /psar?ticker=AAPL&download_period=1mo&step=0.02&max_step=0.2
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).step
: Acceleration Factor used to compute the SAR.max_step
: Maximum value allowed for the Acceleration Factor.
Example JSON Output
{
"psar": [
{
"date": "2024-05-01",
"psar": 170.55,
"psar_down": 170.55,
"psar_down_indicator": 0,
"psar_up": null,
"psar_up_indicator": 1
},
{
"date": "2024-05-02",
"psar": 170.73,
"psar_down": 170.73,
"psar_down_indicator": 0,
"psar_up": null,
"psar_up_indicator": 1
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/psar?ticker=AAPL&download_period=1mo&step=0.02&max_step=0.2")
data = response.json()
print(data)
fetch("http://apitradetech.com/psar?ticker=AAPL&download_period=1mo&step=0.02&max_step=0.2")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/psar?ticker=AAPL&download_period=1mo&step=0.02&max_step=0.2");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/psar?ticker=AAPL&download_period=1mo&step=0.02&max_step=0.2'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/psar?ticker=AAPL&download_period=1mo&step=0.02&max_step=0.2';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get KST Oscillator and Signal Information
Learn more about KST Oscillator
Fetch the KST Oscillator and KST Signal of a stock.
GET /kst_combined?ticker=<ticker>&download_period=<download_period>&roc1=<roc1>&roc2=<roc2>&roc3=<roc3>&roc4=<roc4>&window1=<window1>&window2=<window2>&window3=<window3>&window4=<window4>&nsig=<nsig>
Example: /kst_combined?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).roc1
: ROC1 period.roc2
: ROC2 period.roc3
: ROC3 period.roc4
: ROC4 period.window1
: Window1 period.window2
: Window2 period.window3
: Window3 period.window4
: Window4 period.nsig
: Number of periods to signal.
Example JSON Output
{
"kst_combined": [
{"date": "2024-05-01", "kst": 169.55, "kst_sig": 169.60},
{"date": "2024-05-02", "kst": 169.73, "kst_sig": 169.78},
{"date": "2024-05-03", "kst": 171.60, "kst_sig": 171.70},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/kst_combined?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9")
data = response.json()
print(data)
fetch("http://apitradetech.com/kst_combined?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/kst_combined?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/kst_combined?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/kst_combined?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get KST Oscillator Information
Learn more about KST Oscillator
Fetch the KST Oscillator of a stock.
GET /kst_oscillator?ticker=<ticker>&download_period=<download_period>&roc1=<roc1>&roc2=<roc2>&roc3=<roc3>&roc4=<roc4>&window1=<window1>&window2=<window2>&window3=<window3>&window4=<window4>&nsig=<nsig>
Example: /kst_oscillator?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).roc1
: ROC1 period.roc2
: ROC2 period.roc3
: ROC3 period.roc4
: ROC4 period.window1
: Window1 period.window2
: Window2 period.window3
: Window3 period.window4
: Window4 period.nsig
: Number of periods to signal.
Example JSON Output
{
"kst_oscillator": [
{"date": "2024-05-01", "kst": 169.55},
{"date": "2024-05-02", "kst": 169.73},
{"date": "2024-05-03", "kst": 171.60},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/kst_oscillator?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9")
data = response.json()
print(data)
fetch("http://apitradetech.com/kst_oscillator?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/kst_oscillator?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/kst_oscillator?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/kst_oscillator?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get KST Signal Information
Fetch the KST Signal of a stock.
GET /kst_signal?ticker=<ticker>&download_period=<download_period>&roc1=<roc1>&roc2=<roc2>&roc3=<roc3>&roc4=<roc4>&window1=<window1>&window2=<window2>&window3=<window3>&window4=<window4>&nsig=<nsig>
Example: /kst_signal?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).roc1
: ROC1 period.roc2
: ROC2 period.roc3
: ROC3 period.roc4
: ROC4 period.window1
: Window1 period.window2
: Window2 period.window3
: Window3 period.window4
: Window4 period.nsig
: Number of periods to signal.
Example JSON Output
{
"kst_signal": [
{"date": "2024-05-01", "kst_sig": 169.60},
{"date": "2024-05-02", "kst_sig": 169.78},
{"date": "2024-05-03", "kst_sig": 171.70},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/kst_signal?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9")
data = response.json()
print(data)
fetch("http://apitradetech.com/kst_signal?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/kst_signal?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/kst_signal?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/kst_signal?ticker=AAPL&download_period=1mo&roc1=10&roc2=15&roc3=20&roc4=30&window1=10&window2=10&window3=10&window4=15&nsig=9';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Awesome Oscillator Information
Learn more about Awesome Oscillator
Fetch the Awesome Oscillator indicators of a stock.
GET /awesome_oscillator?ticker=<ticker>&download_period=<download_period>&short_period=<short_period>&long_period=<long_period>
Example: /awesome_oscillator?ticker=AAPL&download_period=1mo&short_period=5&long_period=34
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).short_period
: Short period for the simple moving average.long_period
: Long period for the simple moving average.
Example JSON Output
{
"awesome_oscillator": [
{
"date": "2023-04-01",
"awesome_oscillator": 1.5
},
{
"date": "2023-04-02",
"awesome_oscillator": 2.0
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/awesome_oscillator?ticker=AAPL&download_period=1mo&short_period=5&long_period=34")
data = response.json()
print(data)
fetch("http://apitradetech.com/awesome_oscillator?ticker=AAPL&download_period=1mo&short_period=5&long_period=34")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/awesome_oscillator?ticker=AAPL&download_period=1mo&short_period=5&long_period=34");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/awesome_oscillator?ticker=AAPL&download_period=1mo&short_period=5&long_period=34'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/awesome_oscillator?ticker=AAPL&download_period=1mo&short_period=5&long_period=34';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Donchian Channel Information
Learn more about Donchian Channel
Fetch the Donchian Channel indicators of a stock.
GET /donchian_channel?ticker=<ticker>&period=<period>&window=<window>
Example: /donchian_channel?ticker=AAPL&period=1mo&window=20
Parameters:
ticker
: Ticker symbol of the stock.period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: Window period for the Donchian Channel calculation.
Example JSON Output
{
"donchian_channel": [
{
"date": "2024-05-01",
"high_band": 135.67,
"low_band": 130.23,
"middle_band": 132.95,
"percentage_band": 0.04,
"width": 5.44
},
{
"date": "2024-05-02",
"high_band": 136.15,
"low_band": 131.10,
"middle_band": 133.62,
"percentage_band": 0.05,
"width": 5.05
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/donchian_channel?ticker=AAPL&period=1mo&window=20")
data = response.json()
print(data)
fetch("http://apitradetech.com/donchian_channel?ticker=AAPL&period=1mo&window=20")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/donchian_channel?ticker=AAPL&period=1mo&window=20");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/donchian_channel?ticker=AAPL&period=1mo&window=20'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/donchian_channel?ticker=AAPL&period=1mo&window=20';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Keltner Channel Information
Learn more about Keltner Channel
Fetch the Keltner Channel indicators of a stock.
GET /keltner_channel?ticker=<ticker>&period=<period>&window=<window>
Example: /keltner_channel?ticker=AAPL&period=1mo&window=20
Parameters:
ticker
: Ticker symbol of the stock.period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: Window period for the Keltner Channel calculation.
Example JSON Output
{
"keltner_channel": [
{
"date": "2024-05-01",
"high_band": 135.67,
"low_band": 130.23,
"middle_band": 132.95,
"percentage_band": 0.04,
"width": 5.44
},
{
"date": "2024-05-02",
"high_band": 136.15,
"low_band": 131.10,
"middle_band": 133.62,
"percentage_band": 0.05,
"width": 5.05
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/keltner_channel?ticker=AAPL&period=1mo&window=20")
data = response.json()
print(data)
fetch("http://apitradetech.com/keltner_channel?ticker=AAPL&period=1mo&window=20")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/keltner_channel?ticker=AAPL&period=1mo&window=20");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/keltner_channel?ticker=AAPL&period=1mo&window=20'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/keltner_channel?ticker=AAPL&period=1mo&window=20';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Vortex Indicator Information
Learn more about Vortex Indicator
Fetch the Vortex Indicator (both Positive and Negative) of a stock.
GET /vortex?ticker=<ticker>&period=<period>&window=<window>
Example: /vortex?ticker=AAPL&period=1mo&window=14
Parameters:
ticker
: Ticker symbol of the stock.period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: Window period for the Vortex calculation.
Example JSON Output
{
"vortex": [
{
"date": "2024-05-01",
"vortex_pos": 1.23,
"vortex_neg": 0.76
},
{
"date": "2024-05-02",
"vortex_pos": 1.25,
"vortex_neg": 0.74
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/vortex?ticker=AAPL&period=1mo&window=14")
data = response.json()
print(data)
fetch("http://apitradetech.com/vortex?ticker=AAPL&period=1mo&window=14")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/vortex?ticker=AAPL&period=1mo&window=14");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/vortex?ticker=AAPL&period=1mo&window=14'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/vortex?ticker=AAPL&period=1mo&window=14';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Stochastic Oscillator
Learn more about Stochastic Oscillator
Fetch the Stochastic Oscillator values for a stock.
GET /stochastic_oscillator?ticker=<ticker>&download_period=<download_period>&window=<window>&smooth_window=<smooth_window>
Example: /stochastic_oscillator?ticker=AAPL&download_period=6mo&window=14&smooth_window=3
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Time period for downloading historical data (e.g., '1d', '1mo', etc.).window
: Window period for Stochastic Oscillator.smooth_window
: Smoothing window for Stochastic Oscillator.
Example JSON Output
{
"2024-04-25": {
"Stochastic Oscillator": 80.23,
"Signal Stochastic Oscillator": 78.45
},
"2024-04-26": {
"Stochastic Oscillator": 81.15,
"Signal Stochastic Oscillator": 79.30
},
...
}
Request Examples
import requests
response = requests.get("https://apitradetech.com/stochastic_oscillator?ticker=AAPL&download_period=6mo&window=14&smooth_window=3")
data = response.json()
print(data)
fetch("https://apitradetech.com/stochastic_oscillator?ticker=AAPL&download_period=6mo&window=14&smooth_window=3")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://apitradetech.com/stochastic_oscillator?ticker=AAPL&download_period=6mo&window=14&smooth_window=3");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'https://apitradetech.com/stochastic_oscillator?ticker=AAPL&download_period=6mo&window=14&smooth_window=3'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'https://apitradetech.com/stochastic_oscillator?ticker=AAPL&download_period=6mo&window=14&smooth_window=3';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get DPO Information
Fetch the Detrended Price Oscillator (DPO) of a stock.
GET /dpo?ticker=<ticker>&download_period=<download_period>&window=<window>
Example: /dpo?ticker=AAPL&download_period=1mo&window=20
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: Number of periods.
Example JSON Output
{
"dpo": [
{"date": "2024-05-01", "dpo": 1.55},
{"date": "2024-05-02", "dpo": 1.73},
{"date": "2024-05-03", "dpo": 0.60},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/dpo?ticker=AAPL&download_period=1mo&window=20")
data = response.json()
print(data)
fetch("http://apitradetech.com/dpo?ticker=AAPL&download_period=1mo&window=20")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/dpo?ticker=AAPL&download_period=1mo&window=20");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/dpo?ticker=AAPL&download_period=1mo&window=20'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/dpo?ticker=AAPL&download_period=1mo&window=20';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Ichimoku Information
Learn more about Ichimoku Kinko Hyo (Ichimoku Cloud)
Fetch all Ichimoku Cloud indicators of a stock.
GET /ichimoku?ticker=<ticker>&download_period=<download_period>&window1=<window1>&window2=<window2>&window3=<window3>&visual=<visual>
Example: /ichimoku?ticker=AAPL&download_period=1mo&window1=9&window2=26&window3=52&visual=0
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window1
: Number of periods for the first window.window2
: Number of periods for the second window.window3
: Number of periods for the third window.visual
: Set to 1 to shift values for visualization, 0 otherwise.
Example JSON Output
{
"ichimoku": [
{
"date": "2024-05-01",
"ichimoku_a": 169.55,
"ichimoku_b": 170.55,
"ichimoku_base_line": 169.80,
"ichimoku_conversion_line": 169.90
},
{
"date": "2024-05-02",
"ichimoku_a": 169.73,
"ichimoku_b": 170.73,
"ichimoku_base_line": 169.95,
"ichimoku_conversion_line": 170.05
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/ichimoku?ticker=AAPL&download_period=1mo&window1=9&window2=26&window3=52&visual=0")
data = response.json()
print(data)
fetch("http://apitradetech.com/ichimoku?ticker=AAPL&download_period=1mo&window1=9&window2=26&window3=52&visual=0")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/ichimoku?ticker=AAPL&download_period=1mo&window1=9&window2=26&window3=52&visual=0");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/ichimoku?ticker=AAPL&download_period=1mo&window1=9&window2=26&window3=52&visual=0'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/ichimoku?ticker=AAPL&download_period=1mo&window1=9&window2=26&window3=52&visual=0';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Percentage Price Oscillator (PPO) Information
Learn more about Percentage Price Oscillator (PPO)
Fetch the Percentage Price Oscillator (PPO) indicators of a stock, including PPO Line, PPO Histogram, and PPO Signal Line.
GET /ppo?ticker=<ticker>&download_period=<download_period>&window_slow=<window_slow>&window_fast=<window_fast>&window_sign=<window_sign>
Example: /ppo?ticker=AAPL&download_period=1mo&window_slow=26&window_fast=12&window_sign=9
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window_slow
: Long-term period.window_fast
: Short-term period.window_sign
: Period to signal.
Example JSON Output
{
"ppo": [
{
"date": "2024-05-01",
"ppo_line": 1.23,
"ppo_hist": 0.12,
"ppo_signal": 1.11
},
{
"date": "2024-05-02",
"ppo_line": 1.25,
"ppo_hist": 0.14,
"ppo_signal": 1.13
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/ppo?ticker=AAPL&download_period=1mo&window_slow=26&window_fast=12&window_sign=9")
data = response.json()
print(data)
fetch("http://apitradetech.com/ppo?ticker=AAPL&download_period=1mo&window_slow=26&window_fast=12&window_sign=9")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/ppo?ticker=AAPL&download_period=1mo&window_slow=26&window_fast=12&window_sign=9");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/ppo?ticker=AAPL&download_period=1mo&window_slow=26&window_fast=12&window_sign=9'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/ppo?ticker=AAPL&download_period=1mo&window_slow=26&window_fast=12&window_sign=9';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Mass Index Information
Fetch the Mass Index of a stock.
GET /mass_index?ticker=<ticker>&download_period=<download_period>&window_fast=<window_fast>&window_slow=<window_slow>
Example: /mass_index?ticker=AAPL&download_period=1mo&window_fast=9&window_slow=25
Parameters:
ticker
: Ticker symbol of the stock.download_period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window_fast
: Fast window value.window_slow
: Slow window value.
Example JSON Output
{
"mass_index": [
{"date": "2024-05-01", "mass_index": 27.43},
{"date": "2024-05-02", "mass_index": 27.56},
{"date": "2024-05-03", "mass_index": 27.68},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/mass_index?ticker=AAPL&download_period=1mo&window_fast=9&window_slow=25")
data = response.json()
print(data)
fetch("http://apitradetech.com/mass_index?ticker=AAPL&download_period=1mo&window_fast=9&window_slow=25")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/mass_index?ticker=AAPL&download_period=1mo&window_fast=9&window_slow=25");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/mass_index?ticker=AAPL&download_period=1mo&window_fast=9&window_slow=25'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/mass_index?ticker=AAPL&download_period=1mo&window_fast=9&window_slow=25';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get TRIX Information
Fetch the TRIX (Trix) indicator of a stock.
GET /trix?ticker=<ticker>&period=<period>&window=<window>
Example: /trix?ticker=AAPL&period=1mo&window=15
Parameters:
ticker
: Ticker symbol of the stock.period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).window
: Window period for the TRIX calculation.
Example JSON Output
{
"trix": [
{
"date": "2024-05-01",
"trix": 0.0023
},
{
"date": "2024-05-02",
"trix": 0.0024
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/trix?ticker=AAPL&period=1mo&window=15")
data = response.json()
print(data)
fetch("http://apitradetech.com/trix?ticker=AAPL&period=1mo&window=15")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/trix?ticker=AAPL&period=1mo&window=15");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/trix?ticker=AAPL&period=1mo&window=15'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/trix?ticker=AAPL&period=1mo&window=15';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Returns
Get Cumulative Return (CR) Information
Learn more about Cumulative Return (CR)
Fetch the Cumulative Return (CR) of a stock.
GET /cr?ticker=<ticker>&period=<period>
Example: /cr?ticker=AAPL&period=1mo
Parameters:
ticker
: Ticker symbol of the stock.period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).
Example JSON Output
{
"cr": [
{
"date": "2024-05-01",
"cumulative_return": 0.055
},
{
"date": "2024-05-02",
"cumulative_return": 0.073
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/cr?ticker=AAPL&period=1mo")
data = response.json()
print(data)
fetch("http://apitradetech.com/cr?ticker=AAPL&period=1mo")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/cr?ticker=AAPL&period=1mo");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/cr?ticker=AAPL&period=1mo'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/cr?ticker=AAPL&period=1mo';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Daily Log Return (DLR) Information
Learn more about Daily Log Return (DLR)
Fetch the Daily Log Return (DLR) of a stock.
GET /dlr?ticker=<ticker>&period=<period>
Example: /dlr?ticker=AAPL&period=1mo
Parameters:
ticker
: Ticker symbol of the stock.period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).
Example JSON Output
{
"dlr": [
{
"date": "2024-05-01",
"daily_log_return": 0.0055
},
{
"date": "2024-05-02",
"daily_log_return": 0.0073
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/dlr?ticker=AAPL&period=1mo")
data = response.json()
print(data)
fetch("http://apitradetech.com/dlr?ticker=AAPL&period=1mo")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/dlr?ticker=AAPL&period=1mo");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/dlr?ticker=AAPL&period=1mo'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/dlr?ticker=AAPL&period=1mo';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Get Daily Return (DR) Information
Learn more about Daily Return (DR)
Fetch the Daily Return (DR) of a stock.
GET /dr?ticker=<ticker>&period=<period>
Example: /dr?ticker=AAPL&period=1mo
Parameters:
ticker
: Ticker symbol of the stock.period
: Period for downloading stock data (e.g., 1d, 5d, 1mo, etc.).
Example JSON Output
{
"dr": [
{
"date": "2024-05-01",
"daily_return": 0.0055
},
{
"date": "2024-05-02",
"daily_return": 0.0073
},
...
]
}
Request Examples
import requests
response = requests.get("http://apitradetech.com/dr?ticker=AAPL&period=1mo")
data = response.json()
print(data)
fetch("http://apitradetech.com/dr?ticker=AAPL&period=1mo")
.then(response => response.json())
.then(data => console.log(data));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("http://apitradetech.com/dr?ticker=AAPL&period=1mo");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
conn.disconnect();
System.out.println(content.toString());
}
}
require 'net/http'
require 'json'
url = 'http://apitradetech.com/dr?ticker=AAPL&period=1mo'
uri = URI(url)
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data
<?php
$url = 'http://apitradetech.com/dr?ticker=AAPL&period=1mo';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
Use Cases
This API can be used for a variety of purposes, including:
- Building financial dashboards and visualizations.
- Automating stock market data retrieval for analysis.
- Creating custom stock market applications.
- Integrating financial data into existing applications.
Example Use Cases
Real-Time Stock Data Retrieval
Learn how to retrieve real-time stock prices for a given company using the Stock Market API.
import requests
def get_stock_info(symbol):
url = f"https://apitradetech.com/stockinfo/{symbol}"
response = requests.get(url)
data = response.json()
return data
# Example usage
symbol = "AAPL"
stock_data = get_stock_info(symbol)
print(f"Stock Information for {symbol}: {stock_data}")
Historical Data Analysis
Fetch and analyze historical stock data for trend analysis.
import requests
def get_historical_stock_data(symbol, period):
url = f"https://apitradetech.com/stockhist/{symbol}/{period}"
response = requests.get(url)
data = response.json()
return data
# Example usage
symbol = "AAPL"
period = "1mo"
historical_data = get_historical_stock_data(symbol, period)
print(f"Historical Stock Data for {symbol}: {historical_data}")
Technical Indicators Implementation
Using the API to calculate and visualize moving averages, RSI, or other indicators.
import requests
def get_technical_indicator(symbol, indicator, period, window):
url = f"https://apitradetech.com/{indicator}/{symbol}/{period}/{window}"
response = requests.get(url)
data = response.json()
return data
# Example usage
symbol = "AAPL"
indicator = "sma"
period = "1mo"
window = 20
sma_data = get_technical_indicator(symbol, indicator, period, window)
print(f"SMA Data for {symbol}: {sma_data}")
Automated Trading
Integrating the API into an automated trading system.
import requests
def get_stock_price(symbol):
url = f"https://apitradetech.com/stockinfo/{symbol}"
response = requests.get(url)
data = response.json()
return data['price']
def trading_strategy():
symbol = "AAPL"
price = get_stock_price(symbol)
# Example trading strategy: Buy if price is below a threshold
if price < 150:
print(f"Buying {symbol} at {price}")
else:
print(f"Holding {symbol}")
# Example usage
trading_strategy()
Portfolio Management
Using the API to monitor and manage a stock portfolio.
import requests
def get_portfolio_value(portfolio):
total_value = 0
for symbol, shares in portfolio.items():
price = get_stock_price(symbol)
total_value += price * shares
return total_value
def get_stock_price(symbol):
url = f"https://apitradetech.com/stockinfo/{symbol}"
response = requests.get(url)
data = response.json()
return data['price']
# Example usage
portfolio = {"AAPL": 10, "MSFT": 5}
portfolio_value = get_portfolio_value(portfolio)
print(f"Total Portfolio Value: {portfolio_value}")
Market Research
Leveraging the API for market research and stock comparison.
import requests
def compare_stocks(symbols):
stock_data = {}
for symbol in symbols:
price = get_stock_price(symbol)
stock_data[symbol] = price
return stock_data
def get_stock_price(symbol):
url = f"https://apitradetech.com/stockinfo/{symbol}"
response = requests.get(url)
data = response.json()
return data['price']
# Example usage
symbols = ["AAPL", "MSFT", "GOOGL"]
comparison = compare_stocks(symbols)
print(f"Stock Comparison: {comparison}")
Disclaimer
The TradeTech API is provided on an "as is" and "as available" basis. While we strive to ensure the accuracy and reliability of the data, we do not guarantee that the API will produce the most accurate or up-to-date information. Users are solely responsible for any decisions made based on the data retrieved from this API.
By using this API, you agree that we are not liable for any direct, indirect, incidental, or consequential damages resulting from the use or inability to use the API, even if we have been advised of the possibility of such damages.
This API may become a paid service in the future. We reserve the right to change the terms of service, pricing, and availability at any time without prior notice. Continued use of the API after any such changes constitutes your acceptance of the new terms.
Always verify the data with official sources before making any financial decisions. We are not responsible for any losses or damages incurred as a result of reliance on the information provided by this API.