Chilkat Online Tools

C# / Trader v2 API / All Positions

Back to Collection Items

System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
   at System.Runtime.InteropServices.Marshal.StringToHGlobalUni(String s)
   at Chilkat.CkMarshal.StringToX(String s, XString* x)
   at Chilkat.Xml.LoadXml(String xmlData)
   at ChilkatApi.XClass.LoadClass(String className, Log log)
   at ChilkatApi.ApiCache.getApiClass(String className, Log log)
   at ChilkatApi.ApiCache.methodExists(String className, String methodName)
   at ChilkatCode.CodeGen.checkMethodCall(Xml xml)
   at ChilkatCode.Parser.fnCall(Xml xml)
   at ChilkatCode.Parser.subCall()
   at ChilkatCode.Parser.statement()
   at ChilkatCode.Parser.Chilkat()
   at ChilkatCode.Parser.Parse()
   at ChilkatCode.Compile.CompileForToolsIO(String srcCode, String langHashKey, StringBuilder sbHtmlOut)

Curl Command

curl -X DELETE
	-H "Apca-Api-Key-Id: {{APCA_API_KEY_ID}}"
	-H "Apca-Api-Secret-Key: {{APCA_API_SECRET_KEY}}"

Postman Collection Item JSON

  "name": "All Positions",
  "request": {
    "method": "DELETE",
    "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"
    "url": {
      "raw": "{{HOST}}/v2/positions",
      "host": [
      "path": [
      "query": [
          "key": "cancel_orders",
          "value": "true",
          "description": "If true is specified, cancel all open orders before liquidating all positions.",
          "disabled": true
  "response": [