Chilkat Online Tools

TCL / Broker API / Non Trading Activities Events

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_put_BasicAuth $http 1
CkHttp_put_Login $http "{{api_key}}"
CkHttp_put_Password $http "{{api_secret}}"

set sbResponseBody [new_CkStringBuilder]

set success [CkHttp_QuickGetSb $http "https://domain.com/v1/events/nta" $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
	-u '{{api_key}}:{{api_secret}}'
https://domain.com/v1/events/nta

Postman Collection Item JSON

{
  "name": "Non Trading Activities Events",
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{HOST}}/v1/events/nta",
      "host": [
        "{{HOST}}"
      ],
      "path": [
        "v1",
        "events",
        "nta"
      ],
      "query": [
        {
          "key": "since",
          "value": "2021-09-01",
          "description": "Format: YYYY-MM-DD",
          "disabled": true
        },
        {
          "key": "until",
          "value": "2021-09-13",
          "description": "Format: YYYY-MM-DD",
          "disabled": true
        },
        {
          "key": "since_id",
          "value": "",
          "description": "Type: int",
          "disabled": true
        },
        {
          "key": "until_id",
          "value": "",
          "description": "Type: int",
          "disabled": true
        }
      ]
    }
  },
  "response": [
  ]
}