Chilkat Online Tools

Unicode C++ / Trader v2 API / Watchlist

Back to Collection Items

void ChilkatSample(void)
    {
    json.UpdateString(L"name",L"my first watchlist");    json.UpdateString(L"symbols[0]",L"AAPL");    json.UpdateString(L"symbols[1]",L"LMND");    json.UpdateString(L"symbols[2]",L"PLTR");    json.UpdateString(L"symbols[3]",L"AMZN");    json.UpdateString(L"symbols[4]",L"CSCO");    json.UpdateString(L"symbols[5]",L"A");
    }

Curl Command

curl -X POST
	-H "Apca-Api-Key-Id: {{APCA_API_KEY_ID}}"
	-H "Apca-Api-Secret-Key: {{APCA_API_SECRET_KEY}}"
	-d '{
  "name": "my first watchlist",
  "symbols": ["AAPL","LMND","PLTR","AMZN","CSCO","A"]
}'
https://domain.com/v2/watchlists

Postman Collection Item JSON

{
  "name": "Watchlist",
  "request": {
    "method": "POST",
    "header": [
      {
        "key": "Apca-Api-Key-Id",
        "value": "{{APCA_API_KEY_ID}}",
        "type": "text"
      },
      {
        "key": "Apca-Api-Secret-Key",
        "value": "{{APCA_API_SECRET_KEY}}",
        "type": "text"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \"name\": \"my first watchlist\",\n  \"symbols\": [\"AAPL\",\"LMND\",\"PLTR\",\"AMZN\",\"CSCO\",\"A\"]\n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{HOST}}/v2/watchlists",
      "host": [
        "{{HOST}}"
      ],
      "path": [
        "v2",
        "watchlists"
      ]
    },
    "description": "| Parameter   | Type          | Requirement |\n|-------------|---------------|:-----------:|\n| `name`      | string        | Required    |\n| `symbols`   | array[string] | Optional    |"
  },
  "response": [
  ]
}