Get Candlestick Data

URL for Candlestick Data: https://exchange.bartertrade.io/api/v1/getcandlestickdata

Attributes:

  • chartType: string

  • side - (string)

  • pair – (string)

  • reqtype – (string)

  • lastreqtime – unix time stamp of last reqest made

  • api_key: Your API key.

Header :

  • API-keys are passed into the Rest API via the 'Authorization' header.

  • API-keys and secret-keys are case sensitive.

  • SIGNED secret key, iat and exp with JWT signature.

How to create token?

Example :

let payload =

{ iat: seconds, //10 digit exp: seconds_exp, //10 digit secretkey: secretkey };

let token = jwt.sign( payload, secretkey );

headers: { 'Authorization': token, 'Content-Type': 'application/json', },

Body:

{
  "chartType": "month",
  "pair": "ETH_BTC",
  "side": "Buy",
  "reqtype": "all",
  "lastreqtime": "1604491200000",
  "api_key": "your api key"
}

Response:

{
  "status": true,
  "data": {
    "data": [
      [
        1575158400000,
        0,
        0,
        0,
        0,
        0
      ],
      [
        1577836800000,
        0.018186,
        0.01836,
        0.01814,
        0.018308,
        57611.945
      ],
      [
        1580515200000,
        0.018308,
        0.018308,
        0.018308,
        0.018308,
        0
      ],
      [
        1583020800000,
        0.018308,
        0.018308,
        0.018308,
        0.018308,
        0
      ],
      [
        1585699200000,
        10,
        10,
        1,
        1,
        70
      ],
      [
        1588291200000,
        1,
        1,
        1,
        1,
        0
      ],
      [
        1590969600000,
        1,
        1,
        1,
        1,
        0
      ],
      [
        1593561600000,
        1.1,
        1.2,
        0.9,
        1.2,
        210
      ],
      [
        1596240000000,
        1.2,
        1.2,
        1.2,
        1.2,
        0
      ],
      [
        1598918400000,
        1.2,
        1.2,
        1.2,
        1.2,
        0
      ],
      [
        1601510400000,
        1.2,
        1.2,
        1.2,
        1.2,
        0
      ],
      [
        1604188800000,
        1.2,
        1.2,
        1.2,
        1.2,
        0
      ],
      [
        1606780800000,
        1.2,
        1.2,
        1.2,
        1.2,
        0
      ]
    ]
  }
}

Last updated

Was this helpful?