Get started with the kdj

Simply make an HTTPS [GET] request or call in your browser:

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

The kdj endpoint returns a JSON response like this:

  "valueK": 19.376560460490623,
  "valueD": 25.758775280254376,
  "valueJ": 6.612130820963117
Example response from TAAPI.IO when querying kdj endpoint.

API parameters

Required String
The secret which is emailed to you when you request an API key.
Required String
The exchange you want to calculate the indicator from: binance, binancefutures or one of our supported exchanges. For other crypto / stock exchanges, please refer to our Client or Manual integration methods.
Required String
Symbol names are always uppercase, with the coin separated by a forward slash and the market: COIN/MARKET. For example: BTC/USDT Bitcoin to Tether, or LTC/BTC Litecoin to Bitcoin...
Required String
Interval or time frame: We support the following time frames: 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.
Optional Integer
The backtrack parameter removes candles from the data set and calculates the kdj value X amount of candles back. So, if you’re fetching the kdj on the hourly and you want to know what the kdj was 5 hours ago, set backtrack=5. The default is 0 and a maximum is 50.
Optional Integer
The backtracks parameter returns the kdj value calculated on every candle for the past X candles. For example, if you want to know what the kdj was every hour for the past 12 hours, you use backtracks=12. As a result, you will get 12 values back.
Optional String
The 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.
Optional Boolean
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.
Optional Integer

Sets the number of candles used in the indicator calculation.

Default: 14

Optional Integer

Default: 3

More examples

Let's say you want to know the kdj 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/kdj?secret=MY_SECRET&exchange=binance&symbol=BTC/USDT&interval=30m&backtrack=1
Get kdj values on each of the past X candles in one call

Let's say you want to know what the kdj 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/kdj?secret=MY_SECRET&exchange=binance&symbol=BTC/USDT&interval=1d&backtracks=10

Here's the example response:

    "valueK": 16.673112713333463,
    "valueD": 22.45622306461014,
    "valueJ": 5.106892010780108,
    "backtrack": 0
    "valueK": 20.00550202836497,
    "valueD": 25.347778240248473,
    "valueJ": 9.320949604597956,
    "backtrack": 1
    "valueK": 23.685109723704215,
    "valueD": 28.018916346190224,
    "valueJ": 15.017496478732198,
    "backtrack": 2
    "valueK": 25.95982631420324,
    "valueD": 30.18581965743323,
    "valueJ": 17.507839627743266,
    "backtrack": 3
    "valueK": 25.78788686389449,
    "valueD": 32.29881632904822,
    "valueJ": 12.766027933587026,
    "backtrack": 4
    "valueK": 33.435753556050386,
    "valueD": 35.55428106162509,
    "valueJ": 29.198698544900978,
    "backtrack": 5
    "valueK": 36.696904958820994,
    "valueD": 36.61354481441244,
    "valueJ": 36.8636252476381,
    "backtrack": 6
    "valueK": 34.17913468195966,
    "valueD": 36.57186474220816,
    "valueJ": 29.39367456146266,
    "backtrack": 7
    "valueK": 32.50422145734877,
    "valueD": 37.76822977233242,
    "valueJ": 21.97620482738148,
    "backtrack": 8
    "valueK": 34.75288017468239,
    "valueD": 40.40023392982424,
    "valueJ": 23.45817266439869,
    "backtrack": 9
    "valueK": 37.2680486156838,
    "valueD": 43.22391080739516,
    "valueJ": 25.3563242322611,
    "backtrack": 10
    "valueK": 44.22950604728511,
    "valueD": 46.20184190325082,
    "valueJ": 40.28483433535371,
    "backtrack": 11
    "valueK": 39.058759931512796,
    "valueD": 47.18800983123368,
    "valueJ": 22.80026013207103,
    "backtrack": 12
    "valueK": 37.39214161843954,
    "valueD": 51.252634781094116,
    "valueJ": 9.671155293130383,
    "backtrack": 13
    "valueK": 46.28593187688476,
    "valueD": 58.182881362421405,
    "valueJ": 22.492032905811456,
    "backtrack": 14
    "valueK": 53.027004527891656,
    "valueD": 64.13135610518972,
    "valueJ": 30.818301373295526,
    "backtrack": 15
    "valueK": 62.41335532884265,
    "valueD": 69.68353189383876,
    "valueJ": 47.87300219885043,
    "backtrack": 16
    "valueK": 66.01332042872001,
    "valueD": 73.31862017633682,
    "valueJ": 51.402720933486364,
    "backtrack": 17
    "valueK": 72.40350673186201,
    "valueD": 76.97127005014522,
    "valueJ": 63.26798009529557,
    "backtrack": 18
    "valueK": 76.3017370625627,
    "valueD": 79.25515170928682,
    "valueJ": 70.39490776911444,
    "backtrack": 19

Looking for even more integration examples in different languages like NodeJS, PHP, Python, Curl or Ruby? Continue to [GET] REST - Direct documentation.