Introduction

All that is needed is to send a [GET] request to https://api.taapi.io with at least the required parameters.

Example

[GET] https://api.taapi.io/rsi?secret=MY_SECRET&exchange=binance&symbol=BTCUSDT&interval=1h

A JSON Response is returned:

{
  "value": 69.8259211745199
}

Below you’ll find some examples, how to connect, authenticate and query the API:

NodeJS

var axios = require('axios');

axios.get('https://api.taapi.io/rsi', {
  params: {
    secret: MY_SECRET,
    exchange: "binance",
    symbol: "BTCUSDT",
    interval: "1h",
    period: 14
  }
})
.then(function (response) {
  console.log(response.data);
})
.catch(function (error) {
  console.log(error);
});

PHP

<?php

$query = http_build_query(array(
  'secret' => MY_SECRET,
  'exchange' => 'binance',
  'symbol' => 'BTCUSDT',
  'interval' => '1h'
));

// Define endpoint
$url = "https://api.taapi.io/rsi?{$query}";

// create curl resource 
$ch = curl_init(); 

// set url 
curl_setopt($ch, CURLOPT_URL, $url); 

//return the transfer as a string 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 

// $output contains the output string 
$output = curl_exec($ch); 

// close curl resource to free up system resources 
curl_close($ch);

// View result
print_r(json_decode($output));

Python

import urllib.request
url = "https://api.taapi.io/rsi?secret= MY_SECRET&exchange=binance&symbol=BTCUSDT&interval=1h&period=14"
print(urllib.request.urlopen(url).read())

Ruby

require 'net/http'
uri = URI("https://api.taapi.io/rsi?secret= MY_SECRET&exchange=binance&symbol=BTCUSDT&interval=1h&period=14")
puts Net::HTTP.get(uri)

Curl

curl "https://api.taapi.io/rsi?secret= MY_SECRET&exchange=binance&symbol=BTCUSDT&interval=1h&period=14"