Chilkat Online Tools

TCL / Binance spot API / 24hr Ticker Price Change Statistics

Back to Collection Items

load ./chilkat.dll

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

set http [new_CkHttp]

CkHttp_SetRequestHeader $http "Content-Type" "application/json"

set sbResponseBody [new_CkStringBuilder]

set success [CkHttp_QuickGetSb $http "https://domain.com/api/v3/ticker/24hr" $sbResponseBody]
if {$success == 0} then {
    puts [CkHttp_lastErrorText $http]
    delete_CkHttp $http
    delete_CkStringBuilder $sbResponseBody
    exit
}

puts "Response status code = [CkHttp_get_LastStatus $http]"
puts [CkStringBuilder_getAsString $sbResponseBody]

delete_CkHttp $http
delete_CkStringBuilder $sbResponseBody

Curl Command

curl -X GET
	-H "Content-Type: application/json"
https://domain.com/api/v3/ticker/24hr

Postman Collection Item JSON

{
  "name": "24hr Ticker Price Change Statistics",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Content-Type",
        "type": "text",
        "value": "application/json"
      }
    ],
    "url": {
      "raw": "{{url}}/api/v3/ticker/24hr",
      "host": [
        "{{url}}"
      ],
      "path": [
        "api",
        "v3",
        "ticker",
        "24hr"
      ],
      "query": [
        {
          "key": "symbol",
          "value": "BNBUSDT",
          "description": "Trading symbol, e.g. BNBUSDT",
          "disabled": true
        },
        {
          "key": "symbols",
          "value": "",
          "disabled": true
        },
        {
          "key": "type",
          "value": "BNBUSDT",
          "description": "Supported values: FULL or MINI.\nIf none provided, the default is FULL",
          "disabled": true
        }
      ]
    },
    "description": "24 hour rolling window price change statistics. Careful when accessing this with no symbol.\n\n- If the symbol is not sent, tickers for all symbols will be returned in an array.\n\nWeight(IP):\n- `1` for a single symbol;\n- `40` when the symbol parameter is omitted;"
  },
  "response": [
  ]
}