deposit
Record cash credits in any currency into the OpenInvest ledger for bookkeeping only, using an idempotency key to avoid duplicate entries on retries. No real payment system is connected.
Instructions
Record a cash deposit into the ledger, in any currency. Bookkeeping only — no real payment system is connected.
Args: currency: ISO-style currency code, e.g. "CNY", "USD", "AUD". amount: Amount to add; must be > 0. idempotency_key: Reuse the same key when retrying this exact call; recorded once.
Returns: Updated cash balances, or {"status": "error", "error": ...}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount to add; must be > 0. | |
| currency | Yes | ISO-style currency code, e.g. 'CNY', 'USD', 'AUD'. | |
| idempotency_key | No | Optional client-generated key (e.g. a UUID4). When retrying this SAME call after a timeout or an unknown result, reuse the same key: the ledger records it once and later calls return {"status": "duplicate"} without touching cash or holdings. Only the key is compared, not the arguments — a different order (other symbol/units/price/amount) needs a new key, or it is silently treated as the retry. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |