From 0716a22d1fab76a18606ec031d33914ccbc56633 Mon Sep 17 00:00:00 2001 From: Dan Rostovtsev Date: Mon, 6 Apr 2026 15:48:14 -0400 Subject: First working IBKR API implementation. * doc/ibkr.org: Docs for using the IBKR API. * manifest.scm: Guix Manifest of all project dependencies. * scripts/run-gateway.bash: A script for building and deploying the IBKR Client Gateway. * src/ibkr/api.scm: Support for specific endpoints, and generic tools for using the IBKR API. * src/ibkr/types.scm: Basic types for the IBKR endpoints. Orders, positions, securities, etc. * test/*.json: IBKR response and request examples for testing. * test/api.scm: Response handling and endpoint construction. * test/types.scm: Tests JSON parsing of IBKR requests and responses. --- test/ledger-response.json | 65 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 test/ledger-response.json (limited to 'test/ledger-response.json') diff --git a/test/ledger-response.json b/test/ledger-response.json new file mode 100644 index 0000000..a44b040 --- /dev/null +++ b/test/ledger-response.json @@ -0,0 +1,65 @@ +{ + "USD": { + "commoditymarketvalue": 0.0, + "futuremarketvalue": -1051.0, + "settledcash": 214716688.0, + "exchangerate": 1, + "sessionid": 1, + "cashbalance": 214716688.0, + "corporatebondsmarketvalue": 0.0, + "warrantsmarketvalue": 0.0, + "netliquidationvalue": 215335840.0, + "interest": 305569.94, + "unrealizedpnl": 39695.82, + "stockmarketvalue": 314123.88, + "moneyfunds": 0.0, + "currency": "USD", + "realizedpnl": 0.0, + "funds": 0.0, + "acctcode": "U1234567", + "issueroptionsmarketvalue": 0.0, + "key": "LedgerList", + "timestamp": 1702582321, + "severity": 0, + "stockoptionmarketvalue": -2.88, + "futuresonlypnl": -1051.0, + "tbondsmarketvalue": 0.0, + "futureoptionmarketvalue": 0.0, + "cashbalancefxsegment": 0.0, + "secondkey": "USD", + "tbillsmarketvalue": 0.0, + "endofbundle": 1, + "dividends": 0.0 + }, + "BASE": { + "commoditymarketvalue": 0.0, + "futuremarketvalue": -1051.0, + "settledcash": 215100080.0, + "exchangerate": 1, + "sessionid": 1, + "cashbalance": 215100080.0, + "corporatebondsmarketvalue": 0.0, + "warrantsmarketvalue": 0.0, + "netliquidationvalue": 215721776.0, + "interest": 305866.88, + "unrealizedpnl": 39907.37, + "stockmarketvalue": 316365.38, + "moneyfunds": 0.0, + "currency": "BASE", + "realizedpnl": 0.0, + "funds": 0.0, + "acctcode": "U1234567", + "issueroptionsmarketvalue": 0.0, + "key": "LedgerList", + "timestamp": 1702582321, + "severity": 0, + "stockoptionmarketvalue": -2.88, + "futuresonlypnl": -1051.0, + "tbondsmarketvalue": 0.0, + "futureoptionmarketvalue": 0.0, + "cashbalancefxsegment": 0.0, + "secondkey": "BASE", + "tbillsmarketvalue": 0.0, + "dividends": 0.0 + } +} -- cgit v1.3