Pivot points
This indicator calculates the traditional pivot points or so called support and resistance levels. For best results, we recommend setting the interval
to 1d
or 1w
– this will give you useful daily or weekly support and resistance levels. This indicator matches the “Pivot Points Standard” built-in implementation on Trading View.
Get started with the pivotpoints
Simply make an HTTPS [GET] request or call in your browser:
[GET] https://api.taapi.io/pivotpoints?secret=MY_SECRET&exchange=binance&symbol=BTC/USDT&interval=1h
The pivotpoints
endpoint returns a JSON response like this:
{
"r3": 37026.763333333336,
"r2": 35852.596666666665,
"r1": 33803.333333333336,
"p": 32629.166666666668,
"s1": 30579.903333333335,
"s2": 29405.736666666668,
"s3": 27356.473333333335
}
Example response from TAAPI.IO when querying pivotpoints endpoint.
API parameters
binance
, binancefutures
or one of our supported exchanges. For other crypto / stock exchanges, please refer to our Client or Manual integration methods.
BTC/USDT
Bitcoin to Tether, or LTC/BTC
Litecoin to Bitcoin...
1m
, 5m
, 15m
, 30m
, 1h
, 2h
, 4h
, 12h
, 1d
, 1w
. So if you're interested in values on hourly candles, use interval=1h
, for daily values use interval=1d
, etc.
backtrack
parameter removes candles from the data set and calculates the pivotpoints value X amount of candles back. So, if you’re fetching the pivotpoints on the hourly and you want to know what the pivotpoints was 5 hours ago, set backtrack=5
. The default is 0
and a maximum is 50
.
backtracks
parameter returns the pivotpoints value calculated on every candle for the past X candles. For example, if you want to know what the pivotpoints was every hour for the past 12 hours, you use backtracks=12
. As a result, you will get 12 values back.
chart
parameter accepts one of two values: candles
or heikinashi
. candles
is the default, but if you set this to heikinashi
, the indicator values will be calculated using Heikin Ashi candles. Note: Pro & Expert Plans only.
true
or false
. Defaults to false
. By setting to true
the API will return a timestamp with every result (real-time and backtracked) to which candle the value corresponds. This is helpful when requesting multiple backtracks.
More examples
Let's say you want to know the pivotpoints
value on the last closed candle on the 30m
timeframe. You are not interest in the real-time value, so you use the backtrack=1
optional parameter to go back 1 candle in history to the last closed candle.
[GET] https://api.taapi.io/pivotpoints?secret=MY_SECRET&exchange=binance&symbol=BTC/USDT&interval=30m&backtrack=1
Get pivotpoints values on each of the past X candles in one call
Let's say you want to know what the pivotpoints
daily value was each day for the previous 10 days. You can get this returned by our API easily and efficiently in one call using the backtracks=10
parameter:
[GET] https://api.taapi.io/pivotpoints?secret=MY_SECRET&exchange=binance&symbol=BTC/USDT&interval=1d&backtracks=10
Here's the example response:
[
{
"r3": 37021.643333333326,
"r2": 35850.03666666667,
"r1": 33798.213333333326,
"p": 32626.606666666663,
"s1": 30574.783333333326,
"s2": 29403.176666666663,
"s3": 27351.353333333325,
"backtrack": 0
},
{
"r3": 38892.95999999999,
"r2": 37093.369999999995,
"r1": 35676.17999999999,
"p": 33876.59,
"s1": 32459.399999999994,
"s2": 30659.809999999998,
"s3": 29242.619999999995,
"backtrack": 1
},
{
"r3": 40925.67333333334,
"r2": 38762.83666666667,
"r1": 37024.67333333334,
"p": 34861.83666666667,
"s1": 33123.67333333334,
"s2": 30960.83666666667,
"s3": 29222.67333333334,
"backtrack": 2
},
{
"r3": 44310.22666666667,
"r2": 40030.11333333334,
"r1": 37365.22666666667,
"p": 33085.113333333335,
"s1": 30420.22666666667,
"s2": 26140.113333333335,
"s3": 23475.22666666667,
"backtrack": 3
},
{
"r3": 48168.77333333333,
"r2": 44749.38666666666,
"r1": 40174.77333333333,
"p": 36755.386666666665,
"s1": 32180.77333333333,
"s2": 28761.386666666665,
"s3": 24186.77333333333,
"backtrack": 4
},
{
"r3": 50313.71333333333,
"r2": 44846.85666666666,
"r1": 41933.71333333333,
"p": 36466.85666666667,
"s1": 33553.71333333333,
"s2": 28086.856666666667,
"s3": 25173.713333333333,
"backtrack": 5
},
{
"r3": 44119.08666666667,
"r2": 41797.543333333335,
"r1": 38796.926666666666,
"p": 36475.38333333333,
"s1": 33474.76666666666,
"s2": 31153.223333333328,
"s3": 28152.60666666666,
"backtrack": 6
},
{
"r3": 47323.846666666665,
"r2": 44082.42333333334,
"r1": 39861.846666666665,
"p": 36620.42333333333,
"s1": 32399.846666666665,
"s2": 29158.423333333332,
"s3": 24937.846666666665,
"backtrack": 7
},
{
"r3": 60913.5,
"r2": 53799.75,
"r1": 44227.5,
"p": 37113.75,
"s1": 27541.5,
"s2": 20427.75,
"s3": 10855.5,
"backtrack": 8
},
{
"r3": 71687.14666666668,
"r2": 65593.57333333335,
"r1": 56012.53666666668,
"p": 49918.96333333334,
"s1": 40337.92666666668,
"s2": 34244.35333333334,
"s3": 24663.31666666668,
"backtrack": 9
}
]
Looking for even more integration examples in different languages like NodeJS, PHP, Python, Curl or Ruby? Continue to [GET] REST - Direct documentation.