Submitting Files via Web-Service

-
Counterparty Public Key
-
Used by IBKR to encrypt files. This cannot be used to decrypt files.
-
- Counterparty Private Key
-
Counterparty will use the private key to decrypt response files provided by IBKR.
-
Used by Counterparty to signature sign XML files sent to IBKR
-
-
IBKR-Public Key
-
Used by Counterparty to encrypt the XML Request file AND Counterparty private key will be used to signature sign the file
-

Step 1:Prepare input XML file and create archive (archive is only required and accepted for requests submitted using ws/eca/create AND ws/eca/update)
Step 2:Encrypt and Sign the archive/file. Outcome will be in binary format
-
Make sure there is no --armor flag used for gpg as ASCII format will not be accepted by our system.
gpg -vv --default-key yourname@yourdomain.com --yes --output test_encrypted.zip --batch --passphrase YourPassPhraseHere --encrypt --sign -r qa_ibkey-1454@ibkr.com test.zip
Step 3:Encode binary PGP file from Step 2 in base64 (-w0 flag prevents new lines added to the output)
base64 -w0 test.zip.gpg > test.zip.gpg.b64
Step 4:Insert the base64-encoded payload (content of test.zip.gpg.b64) to test.json file and send it to IBKR via DAM Web Service
curl -H "Content-Type: application/json" -k -XPOST https://api.ibkr.com/ws/eca/create -d @test.json > response_test.json

-
User-Agent Header is required for all service calls.
-
Content-Type is required for all following calls wherein user submits a JSON payload to the service call.
-
CURL is required, input parameters are required in JSON format.
-
Maximum payload size 10MB.