Chilkat Online Tools

lianja / Broker API / Batch Journal Transaction

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.getApiProperty(String className, String propName, Log log)
   at ChilkatCode.CodeGen.getXProp(String className, String propName)
   at ChilkatCode.CodeGen.getPropType(String varName, String propName)
   at ChilkatCode.CodeGen.emitAssignment(String varName, String propName, String op, Xml xml)
   at ChilkatCode.Parser.assignment()
   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 POST
	-u '{{api_key}}:{{api_secret}}'
	-d '{
  "entry_type": "JNLC",
  "from_account": "7a9e91a4-ed56-44cf-8e10-f6c1aeed05d7",
  "entries": [
    {
      "to_account": "b8abc578-35ed-4bc0-bb55-6dc846f932eb",
      "amount": "10"
    },
    {
      "to_account": "fce64594-8d8c-4cda-97d5-3f9cdafbf4ef",
      "amount": "100"
    }
  ]
}'
https://domain.com/v1/journals/batch

Postman Collection Item JSON

{
  "name": "Batch Journal Transaction",
  "request": {
    "method": "POST",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \"entry_type\": \"JNLC\",\n  \"from_account\": \"7a9e91a4-ed56-44cf-8e10-f6c1aeed05d7\",\n  \"entries\": [\n    {\n      \"to_account\": \"b8abc578-35ed-4bc0-bb55-6dc846f932eb\",\n      \"amount\": \"10\"\n    },\n    {\n      \"to_account\": \"fce64594-8d8c-4cda-97d5-3f9cdafbf4ef\",\n      \"amount\": \"100\"\n    }\n  ]\n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{HOST}}/v1/journals/batch",
      "host": [
        "{{HOST}}"
      ],
      "path": [
        "v1",
        "journals",
        "batch"
      ]
    },
    "description": "| Attribute      | Type          | Requirement                           | Notes                                                           |\n| -------------- | ------------- | ------------------------------------- | --------------------------------------------------------------- |\n| `entry_type`   | string        | Required | ENUM: `JNLC` or `JNLS`                                          |\n| `from_account` | string        | Required | The originator of funds. Most likely is your Sweep Firm Account |\n| `to_account`   | string        | Required | The ID of the `to_account` that you want to journal into        |\n| `amount`       | string/number | Required | Journal amount in `USD`                                         |\n| `description`  | string        | Optional | Journal description, gets returned in the response              |"
  },
  "response": [
  ]
}