Chilkat Online Tools

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

Back to Collection Items

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

    http := chilkat.NewHttp()
    var success bool

    http.SetRequestHeader("Content-Type","application/json")

    sbResponseBody := chilkat.NewStringBuilder()
    success = http.QuickGetSb("https://domain.com/api/v3/ticker/24hr",sbResponseBody)
    if success == false {
        fmt.Println(http.LastErrorText())
        http.DisposeHttp()
        sbResponseBody.DisposeStringBuilder()
        return
    }

    fmt.Println("Response status code = ", http.LastStatus())
    fmt.Println(*sbResponseBody.GetAsString())

    http.DisposeHttp()
    sbResponseBody.DisposeStringBuilder()

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": [
  ]
}