summaryrefslogtreecommitdiff
path: root/test/ledger-response.json
diff options
context:
space:
mode:
authorDan Rostovtsev <dan@rostovtsev.org>2026-04-06 15:48:14 -0400
committerDan Rostovtsev <dan@rostovtsev.org>2026-04-06 15:48:14 -0400
commit0716a22d1fab76a18606ec031d33914ccbc56633 (patch)
treed63cc7ee4fd73bac935a776d09dc0ec78c8335e2 /test/ledger-response.json
parent2c6cf786c151118232533a6cfbc769ce1514aa9e (diff)
First working IBKR API implementation.HEADmain
* 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.
Diffstat (limited to 'test/ledger-response.json')
-rw-r--r--test/ledger-response.json65
1 files changed, 65 insertions, 0 deletions
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
+ }
+}