Chilkat Online Tools

phpExt / Binance delivery futures API / Continuous Contract Kline/Candlestick Data

Back to Collection Items

<?php

include("chilkat.php");
// Use "chilkat_9_5_0.php" for versions of Chilkat < 10.0.0

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

$http = new CkHttp();

$queryParams = new CkJsonObject();
$queryParams->UpdateString('pair','');
$queryParams->UpdateString('contractType','');
$queryParams->UpdateString('interval','');

$http->SetRequestHeader('Content-Type','application/json');

// resp is a CkHttpResponse
$resp = $http->QuickRequestParams('GET','https://domain.com/dapi/v1/continuousKlines',$queryParams);
if ($http->get_LastMethodSuccess() == false) {
    print $http->lastErrorText() . "\n";
    exit;
}

print $resp->get_StatusCode() . "\n";
print $resp->bodyStr() . "\n";


?>

Curl Command

curl -G -d "pair="
	-d "contractType="
	-d "interval="
	-H "Content-Type: application/json"
https://domain.com/dapi/v1/continuousKlines

Postman Collection Item JSON

{
  "name": "Continuous Contract Kline/Candlestick Data",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Content-Type",
        "type": "text",
        "value": "application/json"
      }
    ],
    "url": {
      "raw": "{{url}}/dapi/v1/continuousKlines?pair=&contractType=&interval=",
      "host": [
        "{{url}}"
      ],
      "path": [
        "dapi",
        "v1",
        "continuousKlines"
      ],
      "query": [
        {
          "key": "pair",
          "value": ""
        },
        {
          "key": "contractType",
          "value": ""
        },
        {
          "key": "interval",
          "value": ""
        },
        {
          "key": "startTime",
          "value": null,
          "disabled": true
        },
        {
          "key": "endTime",
          "value": null,
          "disabled": true
        },
        {
          "key": "limit",
          "value": null,
          "disabled": true
        }
      ]
    }
  },
  "response": [
  ]
}