1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "treasuryInput": {
9 "company": "Example Food Distribution Ltd.",
10 "reportDate": "2026-10-07",
11 "rates": {
12 "source": "CBRT FX buying",
13 "date": "2026-10-06",
14 "USD": 49.0918,
15 "EUR": 55.1853,
16 },
17 "accounts": [
18 {
19 "bank": "Bank A",
20 "account": "TRY current",
21 "type": "current",
22 "currency": "TRY",
23 "balance": 3850000,
24 },
25 {
26 "bank": "Bank A",
27 "account": "USD current",
28 "type": "current",
29 "currency": "USD",
30 "balance": 48000,
31 },
32 {
33 "bank": "Bank B",
34 "account": "32-day TRY deposit",
35 "type": "deposit",
36 "currency": "TRY",
37 "balance": 9000000,
38 "startDate": "2026-09-10",
39 "maturity": "2026-10-12",
40 "interestRate": 39.5,
41 },
42 {
43 "bank": "Bank C",
44 "account": "Money market fund",
45 "type": "fund",
46 "currency": "TRY",
47 "fundCode": "ABC",
48 "units": 2400000,
49 "unitPrice": 2.6815,
50 "priceDate": "2026-10-06",
51 "settlementDays": 1,
52 },
53 {
54 "bank": "Bank D",
55 "account": "Guarantee collateral",
56 "type": "deposit",
57 "currency": "TRY",
58 "balance": 2000000,
59 "maturity": "2027-01-15",
60 "blocked": True,
61 },
62 ],
63 "fxLiabilities": [{
64 "item": "Import supplier invoice",
65 "type": "supplier",
66 "currency": "USD",
67 "amount": 85000,
68 "due": "2026-10-27",
69 }],
70 "fxReceivables": [{
71 "item": "Export receivable",
72 "currency": "EUR",
73 "amount": 45000,
74 "due": "2026-11-10",
75 }],
76 "paymentsNext30Days": 11500000,
77 "fxScenarios": [
78 -10,
79 10,
80 20,
81 30,
82 ],
83 } }
84
85
86run = client.actor("bloom-consulting/cash-fx-position").call(run_input=run_input)
87
88
89print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
90for item in client.dataset(run.default_dataset_id).iterate_items():
91 print(item)
92
93