{"openapi":"3.1.0","info":{"title":"IDEALX API","version":"1.0.0","description":"\nUse your IDEALX accounts from your own code: read balances, holdings, orders and activity, download reports and\ndocuments, place orders, move money between your portfolios, convert currencies, and get webhooks when\nsomething happens. A personal key acts as you.\n\nWorking for clients as an advisory firm? Use the [IDEALX Firm API](https://docs.idealx.com/console/overview/). Want an AI assistant to read\nyour accounts? [Connect it over MCP](https://docs.idealx.com/mcp/). Guides and journeys: https://docs.idealx.com/public/overview/\n\n## Quickstart\n\n1. In the IDEALX app, open **Profile → API and webhooks** and make a key with the `read` scope. It is shown\n   once: keep it somewhere safe.\n2. List your accounts in the sandbox:\n\n```bash\ncurl https://api.staging.idealx.com/v1/accounts -H \"Authorization: Bearer idx_test_…\"\n```\n\n3. Take an account's `id` and read its holdings: `GET /v1/accounts/{id}/positions`.\n4. To place orders, make a key with `read` and `trade`, and send an `Idempotency-Key` with each order.\n\n## Environments\n\n| Environment | Address | Keys start with |\n|---|---|---|\n| Sandbox | `https://api.staging.idealx.com` | `idx_test_` |\n| Live | `https://api.idealx.com` | `idx_live_` |\n\nThe sandbox has made-up prices, banks and blockchains: build and test there freely. A key works only in the\nenvironment it was made in. \n\n## Authentication\n\nSend the key on every request:\n\n```\nAuthorization: Bearer idx_test_…\n```\n\nA key acts as you, never more than you may do in the app, and only within its scopes. It sees the accounts you\nare on. Revoke a key in the app the moment you no longer need it.\n\n## Scopes\n\n| Scope | What it allows |\n|---|---|\n| `read` | Every read in this reference: accounts, balances, holdings, orders, activity, reports and documents |\n| `trade` | Place, cancel and approve orders; start yield |\n| `move` | Move money and holdings between your portfolios; convert currencies; open and close portfolios |\n\nSome things are never possible with a key, by design: money leaving an account (withdrawals, crypto sends),\nadding recipients, changing identity or profile details, opening accounts, and managing keys or webhooks. Those\nneed you in the app with your code. A request outside a key's scopes, or for anything not in this reference,\nanswers `403`.\n\n## Requests\n\n- Send JSON with `Content-Type: application/json`.\n- Amounts are decimal strings with a currency: `{ \"amount\": \"1250.00\", \"currency\": \"GBP\" }`. Never numbers.\n- Ids are prefixed by kind (`acc_`, `ptf_`, `ord_`…). Treat them as opaque.\n- Lists of states and kinds can grow: handle a value you do not know.\n\n## Idempotency\n\nEvery write that places an order or moves money takes an `Idempotency-Key` header (16–128 characters, for\nexample a UUID). Sending the same key again returns the first answer instead of acting twice, so a timed-out\nrequest can be retried safely. Use a new key for each new action.\n\n## Errors\n\nErrors look the same everywhere. Switch on `code`, never on `message`; quote `requestId` when you ask us\nabout a request.\n\n```json\n{ \"error\": { \"code\": \"conflict\", \"message\": \"Not enough balance\", \"requestId\": \"req_…\", \"details\": { } } }\n```\n\n| Status | Code | Meaning |\n|---|---|---|\n| 400 | `invalid_id`, `invalid_idempotency_key` | The request is malformed |\n| 401 | `unauthenticated` | No key, or the key is not valid (revoked, expired, other environment) |\n| 403 | `forbidden` | Outside the key's scopes, or not possible with a key |\n| 404 | `not_found` | No such thing, or not one the key may see |\n| 409 | `conflict`, `invalid_transition` | Not possible in its current state (for example not enough balance) |\n| 422 | `validation_failed` | A field is missing or wrong; `details.issues` says which |\n| 429 | `rate_limited` | Too many requests; wait for `Retry-After` seconds |\n| 5xx | | Our side: retry later with the same `Idempotency-Key` |\n\n## Rate limits\n\nEach key may make **120 requests a minute**. Every answer carries `RateLimit-Limit`, `RateLimit-Remaining`\nand `RateLimit-Reset` (seconds). Past the limit the API answers `429` with `Retry-After`.\n\n## Webhooks\n\nAdd an endpoint (an `https://` address) and choose events in the app (Profile → API and webhooks). Each event is a POST with a JSON body:\n\n```json\n{ \"id\": \"whd_…\", \"type\": \"deposit.credited\", \"createdAt\": \"2026-11-20T09:30:00Z\",\n  \"data\": { \"accountId\": \"acc_…\", \"units\": \"25000\", \"currency\": \"AUD\" } }\n```\n\nEvents: `account.opened`, `deposit.credited`, `withdrawal.settled`, `withdrawal.failed`,\n`approval.waiting`, `order.updated`, `order.expired`, `crypto.received`, `crypto.sent`, `crypto.failed`.\nAn event reaches you when it happens on an account you are on.\n\n**Check the signature** on every delivery before trusting it. The `IDEALX-Signature` header is\n`t=<unix time>,v1=<hex>`, where `v1` is the HMAC-SHA256 of `<t>.<raw body>` with your endpoint's secret:\n\n```js\nimport { createHmac, timingSafeEqual } from \"node:crypto\";\n\nfunction verify(secret, rawBody, header) {\n  const { t, v1 } = Object.fromEntries(header.split(\",\").map((p) => p.split(\"=\")));\n  if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false; // older than five minutes\n  const want = createHmac(\"sha256\", secret).update(`${t}.${rawBody}`).digest();\n  const got = Buffer.from(v1, \"hex\");\n  return got.length === want.length && timingSafeEqual(got, want);\n}\n```\n\nAnswer `2xx` within ten seconds. Anything else is retried after 1, 2, 4, 8… minutes, up to ten times. The\nsame event may arrive more than once: use its `id` to ignore repeats. Each endpoint keeps a delivery log, and\nyou can send yourself a test event from the app (Profile → API and webhooks).\n\n## Versions and changes\n\nThe version is in the address (`/v1`). Within v1 we only add: new endpoints, new optional fields, new values\nin lists of states and kinds, new events. Build so that an unknown field or value does not break you. A change\nthat would break integrations comes as a new version, announced here ahead of time.\n\n**Changes**\n\n- 2026-11-25: Connect an AI assistant (Claude, ChatGPT or another MCP client) over MCP: see\n  [Connect an AI assistant](https://docs.idealx.com/mcp/).\n- 2026-11-24: The IDEALX API and the IDEALX Firm API have separate references. A key reaches only the\n  endpoints in its reference; anything else answers `403`.\n"},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"idx_live_… / idx_test_…","description":"Your personal API key, made in the IDEALX app under Profile → API and webhooks."}},"schemas":{"WebhookEvent":{"type":"object","properties":{"id":{"type":"string","description":"The delivery's id: the same event may arrive more than once"},"type":{"type":"string","enum":["account.opened","approval.waiting","crypto.failed","crypto.received","crypto.sent","deposit.credited","order.expired","order.updated","withdrawal.failed","withdrawal.settled"]},"createdAt":{"type":"string","example":"2026-11-20T09:30:00Z"},"data":{"type":"object","additionalProperties":{},"description":"What happened; always names the account (accountId)"}},"required":["id","type","createdAt","data"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","requestId"]}},"required":["error"]},"Health":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"environment":{"type":"string"},"version":{"type":"string"},"time":{"type":"string","format":"date-time"},"database":{"type":"string","enum":["ok","unavailable","not_configured"]},"minAppVersion":{"type":"object","properties":{"ios":{"type":["string","null"]},"android":{"type":["string","null"]}},"required":["ios","android"],"description":"Lowest native app versions (D162); null: no minimum"}},"required":["status","environment","version","time","database","minAppVersion"]},"Catalog":{"type":"object","properties":{"version":{"type":"integer"},"jurisdictions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"enabled":{"type":"boolean"}},"required":["code","name","currency","enabled"]}},"accountTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"AU.smsf"},"jurisdiction":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"holder":{"type":"object","additionalProperties":{}},"roleLabels":{"type":"object","additionalProperties":{"type":"string"}},"products":{"type":"array","items":{"type":"string"}},"retirement":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"description":"Set for retirement funds (D127): the rule set and its menu name"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/CatalogField"}}},"required":["id","title","fields"]}}},"required":["id","jurisdiction","type","label","description","holder","roleLabels","products","steps"]}}},"required":["version","jurisdictions","accountTypes"]},"CatalogField":{"type":"object","additionalProperties":{},"description":"A wizard field. Shape: packages/catalog/src/fields.ts (kind, id, label, required, …)."},"FollowedStrategy":{"type":"object","properties":{"assignmentId":{"type":"string"},"accountId":{"type":"string"},"portfolioId":{"type":"string"},"strategy":{"type":"object","additionalProperties":{}},"currency":{"type":"string"},"approximate":{"type":"boolean"},"total":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"driftBp":{"type":"number","description":"How much of the portfolio is away from target"},"outside":{"type":"boolean","description":"Some line is outside its band"},"lines":{"type":"array","items":{"type":"object","additionalProperties":{}}},"trades":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["assignmentId","accountId","portfolioId","strategy","currency","approximate","total","driftBp","outside","lines","trades"],"additionalProperties":{}},"RetirementSummary":{"type":"object","properties":{"ruleSet":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"beneficiaryLabel":{"type":"string"},"pensionLabel":{"type":"string"}},"required":["id","label","beneficiaryLabel","pensionLabel"]},"currency":{"type":"string"},"year":{"type":"object","properties":{"year":{"type":"number"},"label":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"current":{"type":"boolean"}},"required":["year","label","from","to","current"]},"years":{"type":"array","items":{"type":"object","properties":{"year":{"type":"number"},"label":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"current":{"type":"boolean"},"confirmed":{"type":"boolean"},"contributed":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"caps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"used":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]}},"required":["id","label","used"]}},"outsideCaps":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"unclassified":{"type":"object","properties":{"count":{"type":"number"},"amount":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]}},"required":["count","amount"]},"beneficiaries":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"caps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"explain":{"type":"string"},"used":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"limit":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"annual":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"left":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"usedBp":{"type":"number"},"over":{"type":"boolean"},"near":{"type":"boolean"},"note":{"type":["string","null"]}},"required":["id","label","explain","used","limit","annual","left","usedBp","over","near","note"]}}},"required":["personId","caps"]}},"pensions":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"lumpSums":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]}},"required":["year","label","from","to","current","confirmed","contributed","caps","outsideCaps","unclassified","beneficiaries","pensions","lumpSums"]}},"beneficiaries":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"age":{"type":["number","null"]},"phase":{"type":"string","enum":["accumulation","pension","both"]},"preservation":{"type":["object","null"],"properties":{"id":{"type":"string"},"label":{"type":"string"},"explain":{"type":"string"}},"required":["id","label","explain"]},"contributed":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"paidOut":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"shareBp":{"type":"number"},"pension":{"type":["object","null"],"properties":{"balanceAtStart":{"type":["object","null"],"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"startedOn":{"type":["string","null"]},"age":{"type":["number","null"]},"rateBp":{"type":["number","null"]},"minimum":{"type":["object","null"],"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"paid":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"left":{"type":["object","null"],"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"met":{"type":["boolean","null"]},"missing":{"type":["string","null"]}},"required":["balanceAtStart","startedOn","age","rateBp","minimum","paid","left","met","missing"]}},"required":["personId","name","age","phase","preservation","contributed","paidOut","shareBp","pension"]}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"personId":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["pension","lump_sum"]},"amount":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"paidOn":{"type":"string"}},"required":["id","personId","name","kind","amount","paidOn"]}}},"required":["ruleSet","currency","year","years","beneficiaries","payments"],"description":"A retirement fund at a glance (D141), read only: contributions by financial year against the caps, each beneficiary's phase, preservation stage and share, pension minimums and payments. A guide; the fund's accountant confirms the figures."},"RetirementYear":{"type":"object","properties":{"ruleSet":{"type":"object","additionalProperties":{}},"year":{"type":"object","additionalProperties":{}},"years":{"type":"array","items":{"type":"object","additionalProperties":{}}},"confirmed":{"type":"boolean"},"currency":{"type":"string"},"kinds":{"type":"array","items":{"type":"object","additionalProperties":{}}},"limits":{"type":"object","additionalProperties":{}},"members":{"type":"array","items":{"type":"object","additionalProperties":{}}},"contributions":{"type":"array","items":{"type":"object","additionalProperties":{}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":{}}},"toClassify":{"type":"array","items":{"type":"object","additionalProperties":{}}},"toTag":{"type":"array","items":{"type":"object","additionalProperties":{}}},"settings":{"type":"object","additionalProperties":{}},"strategy":{"type":["object","null"],"additionalProperties":{}},"checklist":{"type":"array","items":{"type":"object","additionalProperties":{}}},"canEdit":{"type":"boolean"}},"required":["ruleSet","year","years","confirmed","currency","kinds","limits","members","contributions","payments","toClassify","toTag","settings","strategy","checklist","canEdit"],"description":"A retirement fund's year (D127): its members, contributions against the caps, pension minimums and the trustees' checklist. Figures are a guide; the fund's accountant and auditor confirm them."},"AccountProfile":{"type":"object","properties":{"holder":{"type":"object","properties":{"kind":{"type":"string","enum":["person","organisation"]},"name":{"type":"string"},"verified":{"type":"boolean"}},"required":["kind","name","verified"]},"groups":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"facts":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"]}}},"required":["title","facts"]}},"tax":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"]}}},"required":["holder","groups","tax"],"description":"Who holds the account and what was given when it opened, in the account type's words (catalog). Tax numbers are masked."},"Account":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"nickname":{"type":["string","null"]},"accountTypeId":{"type":"string"},"accountTypeLabel":{"type":"string"},"jurisdiction":{"type":"string"},"currency":{"type":"string","description":"The account's main currency, from its country","example":"AUD"},"status":{"type":"string","enum":["open","frozen","closed"]},"myRoles":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"label":{"type":"string"}},"required":["role","label"]}},"portfolios":{"type":"array","items":{"$ref":"#/components/schemas/Portfolio"}},"openedAt":{"type":"string"}},"required":["id","name","nickname","accountTypeId","accountTypeLabel","jurisdiction","currency","status","myRoles","portfolios","openedAt"]},"Portfolio":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrimary":{"type":"boolean"},"status":{"type":"string","enum":["open","closed"]}},"required":["id","name","isPrimary","status"]},"AccountDetail":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"nickname":{"type":["string","null"]},"accountTypeId":{"type":"string"},"accountTypeLabel":{"type":"string"},"jurisdiction":{"type":"string"},"currency":{"type":"string","description":"The account's main currency, from its country","example":"AUD"},"status":{"type":"string","enum":["open","frozen","closed"]},"myRoles":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"label":{"type":"string"}},"required":["role","label"]}},"portfolios":{"type":"array","items":{"$ref":"#/components/schemas/PortfolioDetail"}},"totals":{"type":"array","items":{"$ref":"#/components/schemas/Balance"}},"value":{"$ref":"#/components/schemas/Value"},"breakdown":{"$ref":"#/components/schemas/ValueBreakdown"},"actions":{"type":"array","items":{"$ref":"#/components/schemas/AccountAction"},"description":"What you may do here, from your account role or your firm's role, kind and mandate. add_money, trade, transfer, withdraw, send_crypto, manage_payees, schedule, propose and decide_proposals move money or ask a client to; an approval policy may still apply when they run."},"openedAt":{"type":"string"}},"required":["id","name","nickname","accountTypeId","accountTypeLabel","jurisdiction","currency","status","myRoles","portfolios","totals","value","breakdown","actions","openedAt"]},"PortfolioDetail":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrimary":{"type":"boolean"},"status":{"type":"string","enum":["open","closed"]},"balances":{"type":"array","items":{"$ref":"#/components/schemas/Balance"}},"value":{"$ref":"#/components/schemas/Value"},"breakdown":{"$ref":"#/components/schemas/ValueBreakdown"},"actions":{"type":"array","items":{"$ref":"#/components/schemas/AccountAction"},"description":"What you may do here, from your account role or your firm's role, kind and mandate. add_money, trade, transfer, withdraw, send_crypto, manage_payees, schedule, propose and decide_proposals move money or ask a client to; an approval policy may still apply when they run."}},"required":["id","name","isPrimary","status","balances","value","breakdown","actions"]},"Balance":{"type":"object","properties":{"instrumentId":{"type":"string"},"amount":{"type":"string"},"currency":{"type":"string"}},"required":["instrumentId","amount","currency"]},"Value":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"},"approximate":{"type":"boolean"},"complete":{"type":"boolean"}},"required":["amount","currency","approximate","complete"]},"ValueBreakdown":{"type":"array","items":{"type":"object","properties":{"bucket":{"type":"string","enum":["cash","yield","markets","digital_assets","strategies"]},"amount":{"type":"string"},"count":{"type":"integer","description":"Currencies (cash) or positions counted"}},"required":["bucket","amount","count"]},"description":"The value in disjoint parts, in the main currency; they add up to value exactly (D138). Cash is uninvested cash in every currency; strategies holds the positions of portfolios that follow a strategy and is listed only when one does."},"AccountAction":{"type":"string","enum":["add_money","trade","transfer","withdraw","send_crypto","manage_payees","schedule","propose","decide_proposals","message","keep_records","manage_people","open_portfolio","close_account","documents","reports"]},"Money":{"type":"object","properties":{"amount":{"type":"string","example":"1250.00"},"currency":{"type":"string","example":"AUD"}},"required":["amount","currency"]},"Instruction":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["internal_transfer","withdrawal","crypto_withdrawal"]},"state":{"type":"string"},"fromPortfolioId":{"type":"string"},"toPortfolioId":{"type":["string","null"]},"payeeId":{"type":["string","null"]},"amount":{"$ref":"#/components/schemas/Money"},"reference":{"type":["string","null"]},"note":{"type":["string","null"],"description":"The customer's own words on why; kept with the record"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","name","contentType","size","createdAt"]},"description":"Files kept with it; download at /v1/instructions/{id}/files/{fileId}"},"approvalsRequired":{"type":"number"},"approvals":{"type":"number"},"approvedByMe":{"type":"boolean"},"position":{"type":["object","null"],"properties":{"instrumentId":{"type":"string"},"quantity":{"type":"string"}},"required":["instrumentId","quantity"],"description":"Set when units of an investment were moved instead of cash"},"createdAt":{"type":"string"}},"required":["id","kind","state","fromPortfolioId","toPortfolioId","payeeId","amount","reference","note","attachments","approvalsRequired","approvals","approvedByMe","position","createdAt"]},"FileUpload":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"contentType":{"type":"string"},"dataBase64":{"type":"string"}},"required":["name","contentType","dataBase64"],"description":"PDF, image, Word, Excel, CSV or text; up to 4 MB"},"Transaction":{"type":"object","properties":{"id":{"type":"string","description":"Open its details at /v1/accounts/{id}/transactions/{txId}"},"kind":{"type":"string","enum":["buy","sell","conversion","deposit","withdrawal","receive","send","transfer","income","yield","fee","other"]},"title":{"type":"string","example":"Bought 11 VAS"},"flow":{"type":"string","enum":["in","out","within"],"description":"Money or assets came in, went out, or moved between two portfolios both shown"},"amount":{"allOf":[{"$ref":"#/components/schemas/Money"},{"type":["object","null"],"description":"The cash it moved, signed (negative is out); for a conversion, what arrived"}]},"paid":{"allOf":[{"$ref":"#/components/schemas/Money"},{"type":["object","null"],"description":"For a conversion, what was paid (negative)"}]},"asset":{"type":["object","null"],"properties":{"instrumentId":{"type":"string"},"symbol":{"type":"string"},"quantity":{"type":"string"}},"required":["instrumentId","symbol","quantity"],"description":"Units of an investment it moved, signed"},"status":{"type":"string","enum":["waiting_approval","waiting_market","processing","sent","done","failed","cancelled","expired"]},"statusLabel":{"type":"string"},"portfolioIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"}},"required":["id","kind","title","flow","amount","paid","asset","status","statusLabel","portfolioIds","createdAt"]},"TransactionDetail":{"type":"object","properties":{"transaction":{"$ref":"#/components/schemas/Transaction"},"facts":{"type":"array","items":{"$ref":"#/components/schemas/TransactionFact"}},"documents":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"path":{"type":"string","description":"API path of the PDF"},"fileName":{"type":"string"}},"required":["label","path","fileName"]}}},"required":["transaction","facts","documents"]},"TransactionFact":{"type":"object","properties":{"label":{"type":"string"},"text":{"type":"string"},"money":{"$ref":"#/components/schemas/Money"},"at":{"type":"string","description":"A moment (ISO)"},"date":{"type":"string","description":"A day (YYYY-MM-DD)"}},"required":["label"],"description":"One line of details: a label and one value"},"CashStatement":{"type":"object","properties":{"currency":{"type":"string"},"mainCurrency":{"type":"string"},"currencies":{"type":"array","items":{"type":"string"},"description":"Every currency the scope has held, the main one first"},"accountName":{"type":"string"},"portfolio":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"from":{"type":"string"},"to":{"type":"string"},"opening":{"type":"string"},"closing":{"type":"string"},"moneyIn":{"type":"string"},"moneyOut":{"type":"string"},"reconciled":{"type":"boolean"},"transactions":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string"},"description":{"type":"string"},"reference":{"type":["string","null"],"description":"The short reference of the order, payment or deposit"},"counterparty":{"type":["string","null"],"description":"Who the money went to or came from (payee, investment, firm)"},"moneyIn":{"type":["string","null"]},"moneyOut":{"type":["string","null"]},"balance":{"type":"string"}},"required":["at","kind","description","reference","counterparty","moneyIn","moneyOut","balance"]}}},"required":["currency","mainCurrency","currencies","accountName","portfolio","from","to","opening","closing","moneyIn","moneyOut","reconciled","transactions"]},"Performance":{"type":"object","properties":{"currency":{"type":"string"},"since":{"type":"string"},"series":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"value":{"type":"string"}},"required":["day","value"]}},"returns":{"type":"object","properties":{"oneMonth":{"type":["number","null"]},"threeMonths":{"type":["number","null"]},"yearToDate":{"type":["number","null"]},"oneYear":{"type":["number","null"]},"sinceStart":{"type":["number","null"]}},"required":["oneMonth","threeMonths","yearToDate","oneYear","sinceStart"],"description":"Time-weighted returns in percent: money in and out left out; null until there are two days"},"sinceOpening":{"type":"object","properties":{"value":{"type":"string"},"netMoneyIn":{"type":"string"},"gain":{"type":"string"}},"required":["value","netMoneyIn","gain"]},"approximate":{"type":"boolean"}},"required":["currency","since","series","returns","sinceOpening","approximate"]},"Allocation":{"type":"object","properties":{"currency":{"type":"string"},"total":{"type":"string"},"byClass":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"},"percent":{"type":"number"}},"required":["key","value","percent"]}},"byCurrency":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"},"percent":{"type":"number"}},"required":["key","value","percent"]}}},"required":["currency","total","byClass","byCurrency"]},"Statement":{"type":"object","properties":{"currency":{"type":"string"},"accountName":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"portfolios":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"instrumentId":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"isCash":{"type":"boolean"},"opening":{"type":"string"},"closing":{"type":"string"},"reconciled":{"type":"boolean"},"movements":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string"},"description":{"type":"string"},"units":{"type":"string"},"balance":{"type":"string"}},"required":["at","kind","description","units","balance"]}}},"required":["instrumentId","symbol","name","isCash","opening","closing","reconciled","movements"]}}},"required":["id","name","lines"]}}},"required":["currency","accountName","from","to","portfolios"]},"TaxYear":{"type":"object","properties":{"jurisdiction":{"type":"string"},"currency":{"type":"string"},"estimated":{"type":"boolean","enum":[true]},"notice":{"type":"string"},"year":{"type":"number"},"label":{"type":"string"},"from":{"type":"string"},"to":{"type":"string","description":"The day after the tax year ends"},"capitalGains":{"type":"object","properties":{"method":{"type":"string","enum":["fifo","share_pooling","none"]},"holdingPeriodMonths":{"type":["number","null"]},"longTermLabel":{"type":["string","null"]}},"required":["method","holdingPeriodMonths","longTermLabel"],"description":"How the country works gains out (D175)"},"sales":{"type":"array","items":{"type":"object","properties":{"instrumentId":{"type":"string"},"quantity":{"type":"string"},"acquiredAt":{"type":"string"},"soldAt":{"type":"string"},"heldDays":{"type":"number"},"heldOver12Months":{"type":"boolean","description":"Sold after the country's holding period (12 months in Australia). Shown only; no discount is applied. False where the country has none"},"longTerm":{"type":["boolean","null"],"description":"Long term under the country's holding period; null where it has none (D175)"},"matching":{"type":"string","enum":["lot","same_day","bed_and_breakfast","pool"],"description":"What the sale was matched with: a lot (oldest first), or under the UK rules a buy the same day, a buy in the next 30 days, or the pool at average cost"},"cost":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"description":"What was paid, including the transaction fee"},"proceeds":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"description":"What the sale brought in, less the transaction fee"},"gain":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"inAccountCurrency":{"type":["object","null"],"properties":{"cost":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"proceeds":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"gain":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]}},"required":["cost","proceeds","gain"],"description":"In the account's currency: cost at the rate when bought, proceeds at the rate when sold. Null when not recorded"}},"required":["instrumentId","quantity","acquiredAt","soldAt","heldDays","heldOver12Months","longTerm","matching","cost","proceeds","gain","inAccountCurrency"]}},"income":{"type":"array","items":{"type":"object","properties":{"instrumentId":{"type":"string"},"kind":{"type":"string"},"payDate":{"type":"string"},"amount":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]}},"required":["instrumentId","kind","payDate","amount"]}},"interest":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"maturityDate":{"type":"string"},"amount":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]}},"required":["name","maturityDate","amount"]}},"fees":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"description":{"type":"string"},"amount":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]}},"required":["date","description","amount"]},"description":"Fees paid in the year, with any tax on them (D109)"}},"required":["jurisdiction","currency","estimated","notice","year","label","from","to","capitalGains","sales","income","interest","fees"]},"AnnualPack":{"type":"object","properties":{"label":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"statement":{"$ref":"#/components/schemas/Statement"},"closingValue":{"type":["string","null"],"description":"Value on the last day of the year; null when no value was recorded then"},"currency":{"type":"string"}},"required":["label","from","to","statement","closingValue","currency"]},"AccountingFormat":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"jurisdictions":{"type":"array","items":{"type":"string"},"description":"\"*\" serves every country"},"accountTypes":{"type":["array","null"],"items":{"type":"string"}},"usesMapping":{"type":"boolean"},"bestEffort":{"type":"boolean"},"assumptions":{"type":"array","items":{"type":"string"}},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"fileType":{"type":"string","enum":["csv","xlsx","zip"]},"columns":{"type":"array","items":{"type":"string"}}},"required":["id","label","fileType","columns"]}}},"required":["id","name","jurisdictions","accountTypes","usesMapping","bestEffort","assumptions","files"]},"AccountingRow":{"type":"object","properties":{"key":{"type":"string"},"date":{"type":"string"},"accountId":{"type":"string"},"accountName":{"type":"string"},"portfolioId":{"type":"string"},"portfolioName":{"type":"string"},"type":{"type":"string"},"typeLabel":{"type":"string"},"subtype":{"type":["string","null"]},"subtypeLabel":{"type":["string","null"]},"instrument":{"type":["object","null"],"properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"assetClass":{"type":"string"}},"required":["id","code","name","assetClass"]},"quantity":{"type":["string","null"]},"price":{"type":["string","null"]},"priceCurrency":{"type":["string","null"]},"currency":{"type":"string"},"gross":{"type":"string"},"fees":{"type":"string"},"taxWithheld":{"type":"string"},"net":{"type":"string"},"fxFrom":{"type":["object","null"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"}},"required":["currency","amount"]},"extras":{"type":"object","additionalProperties":{"type":"string"},"description":"Country facts keyed by the catalog's ids, e.g. AU.franking_credit"},"costBase":{"type":["string","null"]},"gain":{"type":["string","null"]},"lots":{"type":"array","items":{"type":"object","properties":{"lotId":{"type":"string"},"acquiredOn":{"type":"string"},"quantity":{"type":"string"},"cost":{"type":"string"},"proceeds":{"type":"string"},"gain":{"type":"string"},"heldDays":{"type":"number"},"longTerm":{"type":["boolean","null"]},"costEstimated":{"type":"boolean"}},"required":["lotId","acquiredOn","quantity","cost","proceeds","gain","heldDays","longTerm","costEstimated"]}},"counterparty":{"type":["string","null"]},"description":{"type":"string"},"reference":{"type":"string"},"source":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"]},"offLedger":{"type":"boolean"}},"required":["key","date","accountId","accountName","portfolioId","portfolioName","type","typeLabel","subtype","subtypeLabel","instrument","quantity","price","priceCurrency","currency","gross","fees","taxWithheld","net","fxFrom","extras","costBase","gain","lots","counterparty","description","reference","source","offLedger"]},"AccountingPreview":{"type":"object","properties":{"account":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"jurisdiction":{"type":"string"},"currency":{"type":"string"},"type":{"type":"string"},"variantId":{"type":"string"},"retirement":{"type":["object","null"],"properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"]}},"required":["id","name","jurisdiction","currency","type","variantId","retirement"]},"from":{"type":"string"},"to":{"type":"string"},"format":{"$ref":"#/components/schemas/AccountingFormat"},"profileId":{"type":["string","null"]},"rowCount":{"type":"number"},"byType":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"label":{"type":"string"},"count":{"type":"number"}},"required":["type","label","count"]}},"totals":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"moneyIn":{"type":"string"},"moneyOut":{"type":"string"},"fees":{"type":"string"},"taxWithheld":{"type":"string"},"rows":{"type":"number"}},"required":["currency","moneyIn","moneyOut","fees","taxWithheld","rows"]}},"holdings":{"type":"number"},"reconciled":{"type":"boolean"},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"count":{"type":"number"}},"required":["code","message","count"]}},"sample":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRow"}}},"required":["account","from","to","format","profileId","rowCount","byType","totals","holdings","reconciled","warnings","sample"]},"AccountingExport":{"type":"object","properties":{"id":{"type":"string"},"batchId":{"type":["string","null"]},"accountId":{"type":"string"},"accountName":{"type":"string"},"format":{"type":"string"},"profileId":{"type":["string","null"]},"from":{"type":"string"},"to":{"type":"string"},"status":{"type":"string","enum":["done","failed"]},"trigger":{"type":"string","enum":["manual","bulk","schedule"]},"scheduleId":{"type":["string","null"]},"rowCount":{"type":"number"},"reconciled":{"type":"boolean"},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"count":{"type":"number"}},"required":["code","message","count"]}},"totals":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"moneyIn":{"type":"string"},"moneyOut":{"type":"string"},"fees":{"type":"string"},"taxWithheld":{"type":"string"},"rows":{"type":"number"}},"required":["currency","moneyIn","moneyOut","fees","taxWithheld","rows"]}},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"contentType":{"type":"string"},"bytes":{"type":"number"},"label":{"type":"string"}},"required":["id","fileName","contentType","bytes","label"]}},"error":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","batchId","accountId","accountName","format","profileId","from","to","status","trigger","scheduleId","rowCount","reconciled","warnings","totals","files","error","createdAt"]},"AccountingProfile":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"format":{"type":"string"},"jurisdiction":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}},"settings":{"type":"object","additionalProperties":{"type":"string"}},"updatedAt":{"type":"string"}},"required":["id","name","format","jurisdiction","mapping","settings","updatedAt"]},"AccountingSchedule":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"accountIds":{"type":"array","items":{"type":"string"}},"format":{"type":"string"},"profileId":{"type":["string","null"]},"frequency":{"type":"string","enum":["daily","weekly","monthly","quarterly","yearly"]},"recipients":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","paused"]},"nextRunAt":{"type":"string"},"lastRunAt":{"type":["string","null"]},"lastBatchId":{"type":["string","null"]}},"required":["id","name","accountIds","format","profileId","frequency","recipients","status","nextRunAt","lastRunAt","lastBatchId"]},"FeeScheduleVersion":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"number"},"period":{"type":"string","enum":["monthly","quarterly","yearly"]},"lines":{"type":"array","items":{"$ref":"#/components/schemas/FeeLine"}},"summary":{"type":"string","description":"The words the client agrees to"},"createdAt":{"type":"string"}},"required":["id","version","period","lines","summary","createdAt"]},"FeeLine":{"type":"object","properties":{"kind":{"type":"string","enum":["management","fixed","performance","entry"]},"currency":{"type":["string","null"],"description":"Of the amounts and tier limits"},"tiers":{"type":["array","null"],"items":{"type":"object","properties":{"upTo":{"type":["string","null"]},"percent":{"type":"string"}},"required":["upTo","percent"]},"description":"Management: the percent a year up to each value (null: the rest)"},"amount":{"type":["string","null"]},"percent":{"type":["string","null"]},"hurdlePercent":{"type":["string","null"]}},"required":["kind","currency","tiers","amount","percent","hurdlePercent"]},"FeeAgreement":{"type":"object","properties":{"id":{"type":"string"},"accountId":{"type":"string"},"accountName":{"type":"string"},"engagementId":{"type":"string"},"firmName":{"type":"string"},"scheduleName":{"type":"string"},"status":{"type":"string","enum":["pending","agreed","declined","withdrawn","superseded","ended"]},"terms":{"$ref":"#/components/schemas/FeeScheduleVersion"},"tax":{"type":"object","properties":{"label":{"type":["string","null"]},"percent":{"type":"string"}},"required":["label","percent"]},"proposedAt":{"type":"string"},"agreedAt":{"type":["string","null"]},"agreedVia":{"type":["string","null"],"enum":["client","reduction",null]},"startsOn":{"type":["string","null"]},"endedOn":{"type":["string","null"]}},"required":["id","accountId","accountName","engagementId","firmName","scheduleName","status","terms","tax","proposedAt","agreedAt","agreedVia","startsOn","endedOn"]},"FeeCharge":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["management","fixed","performance","entry"]},"accountId":{"type":"string"},"portfolioId":{"type":"string"},"from":{"type":"string"},"to":{"type":"string","description":"Last day covered"},"fee":{"$ref":"#/components/schemas/Money"},"tax":{"$ref":"#/components/schemas/Money"},"collected":{"$ref":"#/components/schemas/Money"},"owed":{"$ref":"#/components/schemas/Money"},"status":{"type":"string","enum":["due","collected","waived"]},"createdAt":{"type":"string"}},"required":["id","kind","accountId","portfolioId","from","to","fee","tax","collected","owed","status","createdAt"]},"AccountFees":{"type":"object","properties":{"agreements":{"type":"array","items":{"$ref":"#/components/schemas/FeeAgreement"}},"charges":{"type":"array","items":{"$ref":"#/components/schemas/FeeCharge"}}},"required":["agreements","charges"]},"OrderFee":{"type":"object","properties":{"estimate":{"$ref":"#/components/schemas/Money"},"fee":{"$ref":"#/components/schemas/Money"}},"required":["estimate","fee"]},"CurrencyAccounts":{"type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"status":{"type":"string","enum":["active","requested"]},"since":{"type":"string"}},"required":["currency","status","since"]}},"available":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"instant":{"type":"boolean","description":"Issued at once; otherwise Ops issues it"}},"required":["currency","instant"]}}},"required":["accounts","available"]},"DepositDetails":{"type":"object","properties":{"currency":{"type":"string"},"accountName":{"type":"string"},"scheme":{"type":"string","description":"Bank details scheme (D96): au, nz, gb, iban, us, swift"},"details":{"type":"array","items":{"$ref":"#/components/schemas/BankDetailLine"},"description":"The usual way's details (the first of methods), labelled, in order"},"methods":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Payment method (bank scheme) id, D133"},"name":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/BankDetailLine"}}},"required":["id","name","details"]},"description":"Every way this account can receive the currency (e.g. BSB and PayID)"},"bsb":{"type":["string","null"],"deprecated":true,"description":"Australian accounts only; use details"},"accountNumber":{"type":["string","null"],"deprecated":true,"description":"Use details"},"payId":{"type":["string","null"],"deprecated":true,"description":"Use details"}},"required":["currency","accountName","scheme","details","methods","bsb","accountNumber","payId"],"description":"Where to send money. It always arrives in the Primary portfolio."},"BankDetailLine":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["key","label","value"]},"BankScheme":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"example":{"type":"string"},"optional":{"type":"boolean"},"hint":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"]},"description":"A choice instead of free text; the first is the usual one"}},"required":["key","label","example","optional","hint"]}},"short":{"type":"string","description":"The method in a word (BSB, PayID, BPAY, ACH, Wire)"},"nameLabel":{"type":"string","description":"What the recipient's name is called"}},"required":["id","name","fields","short","nameLabel"]},"RecurringPayment":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["active","paused","ended"]},"recipient":{"type":"object","properties":{"kind":{"type":"string","enum":["bank","wallet"]},"id":{"type":"string"},"name":{"type":"string"},"line":{"type":"string"},"removed":{"type":"boolean"}},"required":["kind","id","name","line","removed"]},"instrumentId":{"type":"string","description":"A currency code, or a coin (CRYPTO:USDC)"},"amount":{"type":"object","properties":{"kind":{"type":"string","enum":["fixed","percent","above"]},"amount":{"type":["string","null"],"description":"Fixed: sent each time"},"percent":{"type":["string","null"],"description":"Percent: share of the balance"},"keep":{"type":["string","null"],"description":"Above: the balance that stays"},"cap":{"type":["string","null"],"description":"The most one payment sends"}},"required":["kind","amount","percent","keep","cap"]},"schedule":{"type":"object","properties":{"startDate":{"type":"string"},"frequency":{"type":"string","enum":["weekly","fortnightly","monthly","quarterly","yearly"]},"dayOfMonth":{"type":["integer","null"]},"lastDay":{"type":"boolean"},"endDate":{"type":["string","null"]},"maxRuns":{"type":["integer","null"]}},"required":["startDate","frequency","dayOfMonth","lastDay","endDate","maxRuns"]},"timezone":{"type":"string"},"nextRunOn":{"type":["string","null"]},"paymentsMade":{"type":"integer"},"reference":{"type":["string","null"]},"lastRun":{"$ref":"#/components/schemas/RecurringRun"},"createdAt":{"type":"string"}},"required":["id","status","recipient","instrumentId","amount","schedule","timezone","nextRunOn","paymentsMade","reference","lastRun","createdAt"],"description":"A payment repeated on a schedule from the Primary portfolio (D134)"},"RecurringRun":{"type":["object","null"],"properties":{"id":{"type":"string"},"dueOn":{"type":"string","description":"The date it was for, local to the account"},"status":{"type":"string","enum":["running","created","skipped","failed"]},"amount":{"type":["string","null"],"description":"In the units of what is sent"},"reason":{"type":["string","null"],"description":"Why it was skipped or failed"},"instructionId":{"type":["string","null"]},"instructionState":{"type":["string","null"],"description":"The payment it made: pending_approval, settled…"}},"required":["id","dueOn","status","amount","reason","instructionId","instructionState"]},"ListedInvestment":{"allOf":[{"$ref":"#/components/schemas/Investment"},{"type":"object","properties":{"shown":{"type":["object","null"],"properties":{"currency":{"type":"string"},"last":{"type":"string"},"previousClose":{"type":["string","null"]}},"required":["currency","last","previousClose"],"description":"Prices in the asked currency at today's middle rate; an estimate"},"marketCap":{"allOf":[{"$ref":"#/components/schemas/Money"},{"type":["object","null"],"description":"Units in circulation × price, in the asked currency (or the trading one)"}]},"category":{"type":"string","enum":["cryptocurrency","tokenized_stock","tokenized_commodity","stablecoin","meme"],"description":"Digital assets: cryptocurrency, stablecoin, tokenized_stock…"},"rank":{"type":["number","null"],"description":"Digital assets: rank by market capitalisation; null when unranked"},"marketCapUsd":{"type":["string","null"],"description":"Digital assets: market capitalisation in US dollars (reference)"},"volume24hUsd":{"type":["string","null"],"description":"Digital assets: traded in the last 24 hours, in US dollars (reference)"},"change7d":{"type":["string","null"],"description":"Digital assets: change over seven days in percent (reference)"}},"required":["shown","marketCap"]}]},"Quote":{"type":["object","null"],"properties":{"bid":{"type":"string"},"ask":{"type":"string"},"last":{"type":"string"},"previousClose":{"type":["string","null"]},"asOf":{"type":"string","description":"When the price is from"},"freshness":{"type":"string","enum":["live","delayed","close"],"description":"live: minutes old; delayed: the usual 15–20 minute delay while the exchange trades; close: the exchange is shut or the price is from before today's open"}},"required":["bid","ask","last","previousClose","asOf","freshness"],"description":"Prices in the investment's currency; bonds per 100 of face value"},"Investment":{"type":"object","properties":{"id":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"assetClass":{"type":"string"},"market":{"type":"string"},"currency":{"type":"string"},"description":{"type":"string"},"quantityDecimals":{"type":"number"},"priceDecimals":{"type":"number","description":"Most decimals its prices carry (four, more for coins below a cent)"},"securityType":{"type":["string","null"],"description":"common, preferred, etf, fund, adr, warrant, bond, index, crypto…"},"logo":{"type":"string","description":"Its logo, a path on this API (an image)"},"tradable":{"type":"boolean","description":"On offer now: an active, tradable listing with a price (always true in lists)"},"accent":{"type":["string","null"],"description":"Its logo's colour (#rrggbb) for washes, lines and borders, never text; null without one","example":"#f7931a"},"priceUsd":{"type":["string","null"],"description":"Digital assets: the last price in US dollars, shown beside the price in the account's currency; null for others"},"quote":{"$ref":"#/components/schemas/Quote"},"bond":{"type":["object","null"],"properties":{"couponRate":{"type":"string","example":"4.50"},"couponsPerYear":{"type":"number"},"maturityDate":{"type":"string"},"accruedPer100":{"type":"string","description":"Accrued interest today per 100 of face value"}},"required":["couponRate","couponsPerYear","maturityDate","accruedPer100"]},"term":{"type":["object","null"],"properties":{"rate":{"type":"string","example":"4.60"},"termDays":{"type":"number"},"minAmount":{"type":"string"}},"required":["rate","termDays","minAmount"],"description":"Yield: rate a year, length and smallest amount"}},"required":["id","symbol","name","assetClass","market","currency","description","quantityDecimals","priceDecimals","securityType","logo","tradable","accent","priceUsd","quote","bond","term"]},"InvestmentHistory":{"type":"object","properties":{"simulated":{"type":"boolean"},"series":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"close":{"type":"string","description":"In the investment's currency; bonds per 100"}},"required":["day","close"]}}},"required":["id","points"]}}},"required":["simulated","series"]},"InvestmentDetail":{"allOf":[{"$ref":"#/components/schemas/ListedInvestment"},{"type":"object","properties":{"profile":{"$ref":"#/components/schemas/DigitalAssetProfile"}},"required":["profile"]}]},"DigitalAssetProfile":{"type":["object","null"],"properties":{"description":{"type":["string","null"]},"category":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"dateAdded":{"type":["string","null"]},"links":{"type":"object","properties":{"website":{"type":"array","items":{"type":"string"}},"whitepaper":{"type":"array","items":{"type":"string"}},"sourceCode":{"type":"array","items":{"type":"string"}},"explorers":{"type":"array","items":{"type":"string"}},"social":{"type":"object","properties":{"twitter":{"type":["string","null"]},"reddit":{"type":["string","null"]},"telegram":{"type":["string","null"]},"discord":{"type":["string","null"]},"facebook":{"type":["string","null"]},"forum":{"type":["string","null"]}},"required":["twitter","reddit","telegram","discord","facebook","forum"]}},"required":["website","whitepaper","sourceCode","explorers","social"]},"platform":{"type":["object","null"],"properties":{"name":{"type":"string"},"contract":{"type":"string"}},"required":["name","contract"],"description":"Tokens: the chain it is issued on and its contract address"},"metrics":{"type":"object","properties":{"rank":{"type":["number","null"]},"marketCapUsd":{"type":["string","null"]},"fdvUsd":{"type":["string","null"],"description":"Fully diluted market cap, US dollars"},"volume24hUsd":{"type":["string","null"]},"dominance":{"type":["string","null"],"description":"Share of all digital assets' market cap, percent"},"circulating":{"type":["string","null"]},"total":{"type":["string","null"]},"max":{"type":["string","null"]},"change":{"type":"object","properties":{"h1":{"type":["string","null"]},"d1":{"type":["string","null"]},"d7":{"type":["string","null"]},"d30":{"type":["string","null"]},"d60":{"type":["string","null"]},"d90":{"type":["string","null"]}},"required":["h1","d1","d7","d30","d60","d90"],"description":"Percent over 1 hour, 1, 7, 30, 60 and 90 days"},"ath":{"type":["object","null"],"properties":{"priceUsd":{"type":"string"},"at":{"type":["string","null"]}},"required":["priceUsd","at"],"description":"All-time high in US dollars, when known"},"atl":{"type":["object","null"],"properties":{"priceUsd":{"type":"string"},"at":{"type":["string","null"]}},"required":["priceUsd","at"],"description":"All-time low in US dollars, when known"},"updatedAt":{"type":["string","null"]}},"required":["rank","marketCapUsd","fdvUsd","volume24hUsd","dominance","circulating","total","max","change","ath","atl","updatedAt"]}},"required":["description","category","tags","dateAdded","links","platform","metrics"],"description":"Digital assets only; null for others"},"Order":{"type":"object","properties":{"id":{"type":"string"},"portfolioId":{"type":"string"},"instrumentId":{"type":"string"},"side":{"type":"string","enum":["buy","sell"]},"type":{"type":"string","enum":["market","limit"]},"quantity":{"type":"string"},"limitPrice":{"type":["string","null"]},"state":{"type":"string"},"filledQuantity":{"type":"string"},"filledValue":{"allOf":[{"$ref":"#/components/schemas/Money"},{"description":"Paid (buy) or received (sell), with any accrued interest"}]},"setAside":{"type":"string","description":"Still set aside: cash for buys, units for sells"},"approvalsRequired":{"type":"number"},"approvals":{"type":"number"},"approvedByMe":{"type":"boolean"},"rejectReason":{"type":["string","null"]},"reason":{"type":["string","null"],"description":"Why the firm placed it under its discretionary mandate"},"createdAt":{"type":"string"}},"required":["id","portfolioId","instrumentId","side","type","quantity","limitPrice","state","filledQuantity","filledValue","setAside","approvalsRequired","approvals","approvedByMe","rejectReason","reason","createdAt"]},"Position":{"type":"object","properties":{"portfolioId":{"type":"string"},"investment":{"$ref":"#/components/schemas/Investment"},"quantity":{"type":"string"},"quantityInOrders":{"type":"string"},"costBase":{"$ref":"#/components/schemas/Money"},"value":{"allOf":[{"$ref":"#/components/schemas/Money"},{"type":["object","null"]}]},"gain":{"allOf":[{"$ref":"#/components/schemas/Money"},{"type":["object","null"]}]},"valueInAccountCurrency":{"allOf":[{"$ref":"#/components/schemas/Money"},{"type":["object","null"],"description":"The value in the account's main currency at today's middle rate; null without a rate"}]},"gainInAccountCurrency":{"allOf":[{"$ref":"#/components/schemas/Money"},{"type":["object","null"]}]}},"required":["portfolioId","investment","quantity","quantityInOrders","costBase","value","gain","valueInAccountCurrency","gainInAccountCurrency"]},"Exchange":{"type":"object","properties":{"mic":{"type":"string"},"name":{"type":"string"},"shortName":{"type":"string"},"country":{"type":"string"},"currency":{"type":"string"},"timezone":{"type":"string"},"region":{"type":"string"},"days":{"type":"array","items":{"type":"number"},"description":"ISO weekdays it trades (1 = Monday)"},"sessions":{"type":"array","items":{"type":"object","properties":{"opens":{"type":"string"},"closes":{"type":"string"}},"required":["opens","closes"]}},"open":{"type":"boolean"},"changesAt":{"type":["string","null"],"description":"When it closes (open) or next opens (closed)"},"listings":{"type":"number","description":"What can be bought on it here"},"rate":{"type":["string","null"],"description":"1 of the asked currency in the exchange's, at today's middle rate"}},"required":["mic","name","shortName","country","currency","timezone","region","days","sessions","open","changesAt","listings","rate"]},"DigitalAssetCategory":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"count":{"type":"number"}},"required":["id","name","count"]},"MarketIndex":{"type":"object","properties":{"id":{"type":"string","example":"INDEX:SPX"},"name":{"type":"string"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 (EU for a euro-area index)"},"value":{"type":"string","description":"The latest level, decimal","example":"6650.25"},"change":{"type":["string","null"],"description":"Change since the previous close, decimal"},"changePct":{"type":["string","null"],"description":"Percentage change, two decimals"},"currency":{"type":"string"},"at":{"type":["string","null"],"description":"When the level is from (delayed)"},"open":{"type":"boolean","description":"Whether its exchange is trading now"}},"required":["id","name","country","value","change","changePct","currency","at","open"]},"IndexPoint":{"type":"object","properties":{"at":{"type":"string"},"value":{"type":"string"}},"required":["at","value"]},"YieldHolding":{"type":"object","properties":{"id":{"type":"string"},"portfolioId":{"type":"string"},"instrumentId":{"type":"string"},"name":{"type":"string"},"amount":{"$ref":"#/components/schemas/Money"},"rate":{"type":"string"},"startDate":{"type":"string"},"maturityDate":{"type":"string"},"state":{"type":"string","enum":["active","matured","refused"]},"interestSoFar":{"$ref":"#/components/schemas/Money"},"interestAtMaturity":{"$ref":"#/components/schemas/Money"}},"required":["id","portfolioId","instrumentId","name","amount","rate","startDate","maturityDate","state","interestSoFar","interestAtMaturity"]},"CryptoDepositAddress":{"type":"object","properties":{"coin":{"type":"string"},"network":{"type":"string","enum":["bitcoin","ethereum","base","polygon","solana"]},"networkName":{"type":"string"},"address":{"type":"string"},"confirmationsNeeded":{"type":"number"}},"required":["coin","network","networkName","address","confirmationsNeeded"],"description":"Send only this coin on this network. It always arrives in the Primary portfolio."},"CryptoCoin":{"type":"object","properties":{"coin":{"type":"string"},"name":{"type":"string"},"instrumentId":{"type":["string","null"],"description":"The instrument held, when there is exactly one; else match by coin"},"logo":{"type":["string","null"],"description":"The coin's logo, a path on this API (an image); null when IDEALX lists no such coin"},"networks":{"type":"array","items":{"$ref":"#/components/schemas/CryptoNetwork"},"description":"Popular networks first, then the rest by name"}},"required":["coin","name","instrumentId","logo","networks"]},"CryptoNetwork":{"type":"object","properties":{"id":{"type":"string","description":"The network to name in other calls"},"name":{"type":"string"},"confirmations":{"type":"number"},"canReceive":{"type":"boolean"},"canSend":{"type":"boolean"},"minimumDeposit":{"type":["string","null"]},"minimumSend":{"type":["string","null"]},"maximumSend":{"type":["string","null"]},"networkFee":{"type":["string","null"],"description":"Fixed network fee, in the coin"},"networkFeePercent":{"type":["string","null"]},"decimals":{"type":"number"},"logo":{"type":["string","null"],"description":"The network's logo, a path on this API (an image); null when there is none"}},"required":["id","name","confirmations","canReceive","canSend","minimumDeposit","minimumSend","maximumSend","networkFee","networkFeePercent","decimals","logo"]},"CryptoReceive":{"type":"object","properties":{"coin":{"type":"string"},"network":{"type":"string"},"networkName":{"type":"string"},"address":{"type":"string"},"memo":{"type":["string","null"],"description":"Send it with the transfer when present"},"confirmationsNeeded":{"type":"number"},"minimum":{"type":["string","null"]}},"required":["coin","network","networkName","address","memo","confirmationsNeeded","minimum"]},"CryptoIncoming":{"type":"object","properties":{"id":{"type":"string"},"coin":{"type":"string"},"network":{"type":"string"},"quantity":{"type":"string"},"status":{"type":"string","enum":["confirming","checking","ready","failed"]},"confirmations":{"type":"number"},"confirmationsNeeded":{"type":"number"},"txHash":{"type":"string"},"seenAt":{"type":"string"},"readyAt":{"type":["string","null"]}},"required":["id","coin","network","quantity","status","confirmations","confirmationsNeeded","txHash","seenAt","readyAt"]},"CryptoAddress":{"type":"object","properties":{"id":{"type":"string"},"network":{"type":"string"},"address":{"type":"string"},"memo":{"type":["string","null"]},"label":{"type":"string"},"ownership":{"type":"string","enum":["mine","someone_else"]},"hosting":{"type":"string","enum":["self_hosted","exchange"]},"exchangeName":{"type":["string","null"]},"beneficiaryName":{"type":["string","null"]},"usableFrom":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","network","address","memo","label","ownership","hosting","exchangeName","beneficiaryName","usableFrom","createdAt"]},"ActivityPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ActivityItem"}},"nextCursor":{"type":["string","null"]},"summary":{"type":["object","null"],"properties":{"count":{"type":"integer"},"inflow":{"$ref":"#/components/schemas/Money"},"outflow":{"allOf":[{"$ref":"#/components/schemas/Money"},{"description":"Positive"}]},"complete":{"type":"boolean","description":"False when the account has more history than one request reads (tens of thousands of records): the figures then cover the newest part only"}},"required":["count","inflow","outflow","complete"],"description":"Null only when asked for with summary=false"},"facets":{"$ref":"#/components/schemas/ActivityFacets"}},"required":["items","nextCursor","summary","facets"]},"ActivityItem":{"type":"object","properties":{"id":{"type":"string","description":"Unique in the feed: order:…, send:…, receive:…, ins:… or tx:…"},"at":{"type":"string"},"kind":{"type":"string","enum":["deposit","withdrawal","buy","sell","order","transfer","receive","send","convert","dividend","interest","fee","adjustment","professional"],"description":"order: an order that has not filled (open, waiting for approval, cancelled, expired, refused); convert: a currency conversion or a filled order on a stablecoin"},"title":{"type":"string","example":"Bought 11 VAS"},"titleParts":{"type":"object","properties":{"verb":{"type":"string","example":"Bought"},"quantity":{"type":["string","null"],"example":"11"},"symbol":{"type":["string","null"],"example":"VAS"},"rest":{"type":["string","null"],"description":"What follows, e.g. → AUD"}},"required":["verb","quantity","symbol","rest"]},"status":{"type":"string","enum":["pending","done","cancelled","failed","approval"]},"statusDetail":{"type":"string","description":"The owning module's own state: an order's (open, filled…), a receipt's (pending, credited), an instruction's (pending_approval, settled…) or the register's"},"statusLabel":{"type":"string"},"flow":{"type":"string","enum":["in","out","within","none"],"description":"Money or assets came in, went out, moved between two portfolios both shown, or nothing moved yet (an order)"},"amount":{"allOf":[{"$ref":"#/components/schemas/Money"},{"type":["object","null"],"description":"Signed, in the currency it moved in (negative is out); for a conversion, what arrived"}]},"amountInAccountCurrency":{"allOf":[{"$ref":"#/components/schemas/Money"},{"type":["object","null"],"description":"The amount in the account's currency, signed. Null without a rate"}]},"estimate":{"type":"boolean","description":"The amount is at today's price (coins moved, an order not filled)"},"asset":{"type":["object","null"],"properties":{"instrumentId":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"assetClass":{"type":"string"},"quantity":{"type":"string","description":"Units moved or ordered, signed"}},"required":["instrumentId","symbol","name","assetClass","quantity"]},"assetClass":{"type":"string","description":"cash when no investment moved"},"portfolioIds":{"type":"array","items":{"type":"string"}},"portfolioId":{"type":["string","null"],"description":"The first of portfolioIds"},"actor":{"type":["object","null"],"properties":{"personId":{"type":"string"},"name":{"type":"string"}},"required":["personId","name"]},"orderId":{"type":["string","null"]},"transferId":{"type":["string","null"]},"txId":{"type":["string","null"],"description":"Open its details at /v1/accounts/{id}/transactions/{txId}"},"network":{"type":["string","null"]},"networkName":{"type":["string","null"]},"txHash":{"type":["string","null"]},"explorerUrl":{"type":["string","null"]},"detail":{"anyOf":[{"$ref":"#/components/schemas/DigitalAssetActivity"},{"type":"null"}],"description":"For a digital asset order or transfer: the item as Digital Assets shows it"}},"required":["id","at","kind","title","titleParts","status","statusDetail","statusLabel","flow","amount","amountInAccountCurrency","estimate","asset","assetClass","portfolioIds","portfolioId","actor","orderId","transferId","txId","network","networkName","txHash","explorerUrl","detail"]},"DigitalAssetActivity":{"type":"object","properties":{"id":{"type":"string","description":"Unique in the timeline: order:…, receive:… or send:…"},"kind":{"type":"string","enum":["order","receive","send","convert"],"description":"convert: a filled order on a stablecoin (coin to cash or cash to coin)"},"at":{"type":"string"},"instrumentId":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"quantity":{"type":"string","description":"Coin units: ordered, received or sent"},"status":{"type":"string","description":"An order's state; a receipt's pending, credited or unmatched; a send's instruction state"},"amount":{"allOf":[{"$ref":"#/components/schemas/Money"},{"type":["object","null"],"description":"In the account's currency, signed: received +, sent −; orders unsigned. Null without a price or rate"}]},"estimate":{"type":"boolean","description":"The amount is at today's price or rate, not what was paid"},"side":{"type":["string","null"],"enum":["buy","sell",null]},"orderId":{"type":["string","null"]},"orderType":{"type":["string","null"],"enum":["market","limit",null]},"limitPrice":{"type":["string","null"],"description":"In the coin's trading currency"},"priceCurrency":{"type":["string","null"]},"filledQuantity":{"type":["string","null"]},"filledValue":{"allOf":[{"$ref":"#/components/schemas/Money"},{"type":["object","null"],"description":"In the coin's trading currency"}]},"transferId":{"type":["string","null"]},"network":{"type":["string","null"]},"networkName":{"type":["string","null"]},"address":{"type":["string","null"],"description":"Received: our deposit address. Sent: the saved address"},"addressLabel":{"type":["string","null"]},"txHash":{"type":["string","null"]},"explorerUrl":{"type":["string","null"]},"confirmations":{"type":["number","null"]},"confirmationsNeeded":{"type":["number","null"]}},"required":["id","kind","at","instrumentId","symbol","name","quantity","status","amount","estimate","side","orderId","orderType","limitPrice","priceCurrency","filledQuantity","filledValue","transferId","network","networkName","address","addressLabel","txHash","explorerUrl","confirmations","confirmationsNeeded"]},"ActivityFacets":{"type":["object","null"],"properties":{"kind":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"integer"}},"required":["value","count"]}},"assetClass":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"integer"}},"required":["value","count"]}},"status":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"integer"}},"required":["value","count"]}},"currency":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"integer"}},"required":["value","count"]}},"instruments":{"type":"array","items":{"type":"object","properties":{"instrumentId":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"assetClass":{"type":"string"},"count":{"type":"integer"}},"required":["instrumentId","symbol","name","assetClass","count"]}},"people":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"name":{"type":"string"},"count":{"type":"integer"}},"required":["personId","name","count"]}}},"required":["kind","assetClass","status","currency","instruments","people"],"description":"Counts for each filter's choices, with every other filter applied"},"InstructionEntry":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["trade","transfer","withdrawal","crypto_withdrawal","fx","term"]},"accountId":{"type":"string"},"portfolioId":{"type":["string","null"]},"summary":{"type":"string"},"amount":{"type":["object","null"],"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"]},"origin":{"type":"string","enum":["customer","firm","agent","proposal","system"]},"channel":{"type":"string","enum":["portal","console","ios","android","api","system"]},"status":{"type":"string","enum":["waiting_approval","waiting_market","processing","sent","done","failed","cancelled","expired"]},"statusLabel":{"type":"string"},"parentId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","accountId","portfolioId","summary","amount","origin","channel","status","statusLabel","parentId","createdAt","updatedAt"],"description":"One request to move money or assets, from any channel (D72)"},"Conversion":{"type":"object","properties":{"id":{"type":"string"},"portfolioId":{"type":"string"},"from":{"$ref":"#/components/schemas/Money"},"to":{"$ref":"#/components/schemas/Money"},"rate":{"type":"string"},"state":{"type":"string","enum":["placing","done","failed"]},"failureReason":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","portfolioId","from","to","rate","state","failureReason","createdAt"]}},"parameters":{}},"paths":{"/v1/health":{"get":{"tags":["system"],"operationId":"getHealth","summary":"Service health","description":"Liveness and database reachability. No authentication.","responses":{"200":{"description":"Healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"503":{"description":"Degraded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/v1/catalog":{"get":{"tags":["catalog"],"operationId":"getCatalog","summary":"Account types and their wizards","description":"Only jurisdictions switched on for the portal are listed. Public; cacheable.","responses":{"200":{"description":"Catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Catalog"}}}}}}},"/v1/accounts/{id}/strategies":{"get":{"tags":["accounts"],"operationId":"accountStrategies","summary":"The strategies this account's portfolios follow, and how close they are","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"strategies":{"type":"array","items":{"$ref":"#/components/schemas/FollowedStrategy"}}},"required":["strategies"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/retirement/summary":{"get":{"tags":["retirement"],"operationId":"getRetirementSummary","summary":"A retirement fund at a glance: contributions by year, beneficiaries, pensions","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetirementSummary"}}}},"404":{"description":"Not a retirement fund","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/retirement":{"get":{"tags":["retirement"],"operationId":"getRetirementYear","summary":"A retirement fund's year: members, contributions, pensions and checklist","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":["integer","null"],"description":"The year the financial year ends in"},"required":false,"description":"The year the financial year ends in","name":"year","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetirementYear"}}}},"404":{"description":"Not a retirement fund","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/retirement/pack.csv":{"get":{"tags":["retirement"],"operationId":"getRetirementPack","summary":"The year as a CSV for the fund's accountant","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":["integer","null"],"description":"The year the financial year ends in"},"required":false,"description":"The year the financial year ends in","name":"year","in":"query"}],"responses":{"200":{"description":"CSV","content":{"text/csv":{"schema":{"type":"string"}}}},"404":{"description":"Not a retirement fund","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/profile":{"get":{"tags":["accounts"],"operationId":"getAccountProfile","summary":"The account's holder, the details given when it opened, and its tax details","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountProfile"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts":{"get":{"tags":["accounts"],"operationId":"listAccounts","summary":"Accounts you have a role on","security":[{"apiKey":[]}],"responses":{"200":{"description":"Accounts","content":{"application/json":{"schema":{"type":"object","properties":{"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Account"}}},"required":["accounts"]}}}}}}},"/v1/accounts/{id}":{"get":{"tags":["accounts"],"operationId":"getAccount","summary":"One account","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/detail":{"get":{"tags":["accounts"],"operationId":"getAccountDetail","summary":"An account with its portfolios and balances","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["client"],"description":"Console's See as client: the actions are the client's, not yours (a team member only; logged each time)"},"required":false,"description":"Console's See as client: the actions are the client's, not yours (a team member only; logged each time)","name":"as","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDetail"}}}},"403":{"description":"See as client is for a firm's team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/portfolios":{"post":{"tags":["accounts"],"operationId":"openPortfolio","summary":"Open another portfolio","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"201":{"description":"Opened","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDetail"}}}},"409":{"description":"Name taken or limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/portfolios/{portfolioId}":{"patch":{"tags":["accounts"],"operationId":"renamePortfolio","summary":"Rename a portfolio","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"portfolioId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDetail"}}}}}}},"/v1/accounts/{id}/portfolios/{portfolioId}/close":{"post":{"tags":["accounts"],"operationId":"closePortfolio","summary":"Close an empty extra portfolio (never the Primary)","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"portfolioId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDetail"}}}},"409":{"description":"Primary, or not empty","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/portfolios/{portfolioId}/activity":{"get":{"tags":["accounts"],"operationId":"portfolioActivity","summary":"Movements on a portfolio, newest first","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"portfolioId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activity":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string"},"kind":{"type":"string"},"description":{"type":"string"},"amount":{"$ref":"#/components/schemas/Money"},"position":{"type":["object","null"],"properties":{"instrumentId":{"type":"string"},"symbol":{"type":"string"},"quantity":{"type":"string"}},"required":["instrumentId","symbol","quantity"],"description":"Set when units of an investment moved (amount is then zero)"},"createdAt":{"type":"string"}},"required":["entryId","kind","description","amount","position","createdAt"]}}},"required":["activity"]}}}}}}},"/v1/accounts/{id}/transfers":{"post":{"tags":["money"],"operationId":"transferBetweenPortfolios","summary":"Move cash, or units of an investment, between two portfolios of this account","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Idempotency-Key: 16-128 chars; repeat it to retry safely"},"required":true,"description":"Idempotency-Key: 16-128 chars; repeat it to retry safely","name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fromPortfolioId":{"type":"string"},"toPortfolioId":{"type":"string"},"amount":{"$ref":"#/components/schemas/Money"},"position":{"type":"object","properties":{"instrumentId":{"type":"string"},"quantity":{"type":"string"}},"required":["instrumentId","quantity"],"description":"Move units of an investment (cost base kept) instead of cash"},"reference":{"type":"string","maxLength":140},"note":{"type":"string","maxLength":1000,"description":"Why, in your words; kept with the record, not sent with the payment"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/FileUpload"},"maxItems":5}},"required":["fromPortfolioId","toPortfolioId"]}}}},"responses":{"200":{"description":"Settled, or waiting for approval","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Instruction"}}}},"409":{"description":"Not enough balance, closed portfolio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid amount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/instructions":{"get":{"tags":["money"],"operationId":"listInstructions","summary":"Transfers and withdrawals on this account","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"instructions":{"type":"array","items":{"$ref":"#/components/schemas/Instruction"}}},"required":["instructions"]}}}}}}},"/v1/accounts/{id}/transactions":{"get":{"tags":["accounts"],"operationId":"listTransactions","summary":"Account activity: one line per transaction, newest first (D138)","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"portfolioId","in":"query"},{"schema":{"type":"string","minLength":3,"maxLength":3,"description":"Only cash in this currency"},"required":false,"description":"Only cash in this currency","name":"currency","in":"query"},{"schema":{"type":"string","description":"Only this investment"},"required":false,"description":"Only this investment","name":"instrumentId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Transactions","content":{"application/json":{"schema":{"type":"object","properties":{"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}}},"required":["transactions"]}}}},"404":{"description":"No such account or portfolio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/transactions/{txId}":{"get":{"tags":["accounts"],"operationId":"getTransaction","summary":"One transaction in plain words: what, when, amounts, fees, rate, from and to, documents","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"txId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"portfolioId","in":"query"}],"responses":{"200":{"description":"The transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionDetail"}}}},"404":{"description":"No such transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/reports/cash-statement":{"get":{"tags":["reports"],"operationId":"getCashStatement","summary":"A cash statement for one currency, like a bank statement: opening, every transaction with money in, money out and the balance, closing","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string"},"required":false,"name":"portfolioId","in":"query"},{"schema":{"type":"string","minLength":3,"maxLength":3,"description":"Defaults to the account's main currency"},"required":false,"description":"Defaults to the account's main currency","name":"currency","in":"query"}],"responses":{"200":{"description":"The cash statement","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashStatement"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such account or portfolio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/reports/cash-statement.csv":{"get":{"tags":["reports"],"operationId":"getCashStatementCsv","summary":"The cash statement for bookkeeping: one row per transaction with its reference and counterparty (D138)","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string"},"required":false,"name":"portfolioId","in":"query"},{"schema":{"type":"string","minLength":3,"maxLength":3,"description":"Defaults to the account's main currency"},"required":false,"description":"Defaults to the account's main currency","name":"currency","in":"query"}],"responses":{"200":{"description":"CSV","content":{"text/csv":{"schema":{"type":"string"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such account or portfolio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/reports/performance":{"get":{"tags":["reports"],"operationId":"getPerformance","summary":"Value over time and time-weighted returns, for the account or one portfolio","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"portfolioId","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Performance"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/reports/allocation":{"get":{"tags":["reports"],"operationId":"getAllocation","summary":"How the account (or a portfolio) splits by kind of asset and by currency","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"portfolioId","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Allocation"}}}}}}},"/v1/accounts/{id}/reports/statement":{"get":{"tags":["reports"],"operationId":"getStatement","summary":"A statement for a period: opening, every movement, closing; ?format=csv for a spreadsheet","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string"},"required":false,"name":"portfolioId","in":"query"},{"schema":{"type":"string","enum":["json","csv"]},"required":false,"name":"format","in":"query"}],"responses":{"200":{"description":"The statement","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Statement"}},"text/csv":{"schema":{"type":"string"}}}}}}},"/v1/accounts/{id}/reports/tax":{"get":{"tags":["reports"],"operationId":"getTaxYear","summary":"The tax year in the account's country: sales lot by lot, and income; ?format=csv","description":"year is the year the tax year ends in (Australia 2026: 1 July 2025 to 30 June 2026). Default: the last full tax year.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":2000,"maximum":2100},"required":false,"name":"year","in":"query"},{"schema":{"type":"string","enum":["json","csv"]},"required":false,"name":"format","in":"query"}],"responses":{"200":{"description":"The tax year","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxYear"}},"text/csv":{"schema":{"type":"string"}}}}}}},"/v1/accounts/{id}/reports/annual":{"get":{"tags":["reports"],"operationId":"getAnnualPack","summary":"The annual pack for a tax year: performance, the statement for the year, and the tax year","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":2000,"maximum":2100},"required":false,"name":"year","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnualPack"}}}}}}},"/v1/accounts/{id}/documents/statement.pdf":{"get":{"tags":["documents"],"operationId":"getStatementPdf","summary":"The cash statement for a period and one currency as a PDF, like a bank statement (one per currency the account has held)","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string"},"required":false,"name":"portfolioId","in":"query"},{"schema":{"type":"string","minLength":3,"maxLength":3,"description":"Defaults to the account's main currency"},"required":false,"description":"Defaults to the account's main currency","name":"currency","in":"query"}],"responses":{"200":{"description":"The document as a PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/documents/confirmation.pdf":{"get":{"tags":["documents"],"operationId":"getAccountConfirmationPdf","summary":"A letter confirming the account and its details, as proof of account","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The document as a PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/documents/holdings.pdf":{"get":{"tags":["documents"],"operationId":"getHoldingsPdf","summary":"What the account holds now and what it is worth, by portfolio and asset class","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"portfolioId","in":"query"}],"responses":{"200":{"description":"The document as a PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/documents/holdings.csv":{"get":{"tags":["documents"],"operationId":"getHoldingsCsv","summary":"What the account holds now, line by line, as a spreadsheet (the holdings PDF's twin)","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"portfolioId","in":"query"}],"responses":{"200":{"description":"The holdings as CSV","content":{"text/csv":{"schema":{"type":"string"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/documents/tax.pdf":{"get":{"tags":["documents"],"operationId":"getTaxYearPdf","summary":"The tax year report as a PDF (estimated, not tax advice)","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":2000,"maximum":2100},"required":false,"name":"year","in":"query"}],"responses":{"200":{"description":"The document as a PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/documents/annual.pdf":{"get":{"tags":["documents"],"operationId":"getAnnualPackPdf","summary":"The annual pack as one PDF: the year's summary, the tax year and the statement","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":2000,"maximum":2100},"required":false,"name":"year","in":"query"}],"responses":{"200":{"description":"The document as a PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/documents/fees.pdf":{"get":{"tags":["documents"],"operationId":"getAccountFeesPdf","summary":"The fees charged on the account, as a PDF","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":2000,"maximum":2100},"required":false,"name":"year","in":"query"}],"responses":{"200":{"description":"The document as a PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/retirement/pack.pdf":{"get":{"tags":["documents"],"operationId":"getRetirementPackPdf","summary":"A retirement fund's year (My super) as a PDF for the fund's accountant","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":2000,"maximum":2100},"required":false,"name":"year","in":"query"}],"responses":{"200":{"description":"The document as a PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/instructions/{id}/receipt.pdf":{"get":{"tags":["documents"],"operationId":"getInstructionReceiptPdf","summary":"A receipt for a payment, a digital asset send or a transfer between portfolios","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The document as a PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}/confirmation.pdf":{"get":{"tags":["documents"],"operationId":"getTradeConfirmationPdf","summary":"The trade confirmation for an order that filled","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The document as a PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not filled yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounting/formats":{"get":{"tags":["accounting"],"operationId":"listAccountingFormats","summary":"Accounting software formats: the countries and account types each serves, its files and columns","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":2},"required":false,"name":"jurisdiction","in":"query"},{"schema":{"type":"string"},"required":false,"name":"accountType","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"formats":{"type":"array","items":{"$ref":"#/components/schemas/AccountingFormat"}}},"required":["formats"]}}}}}}},"/v1/accounting/mappings/defaults":{"get":{"tags":["accounting"],"operationId":"getAccountingMappingDefaults","summary":"The suggested chart of accounts mapping for a format in a country, and the country's tax fields","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"format","in":"query"},{"schema":{"type":"string","minLength":2,"maxLength":2},"required":true,"name":"jurisdiction","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string"},"jurisdiction":{"type":"string"},"entries":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"}},"required":["key","label","code","name"]}},"extras":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"appliesTo":{"type":"string"},"kind":{"type":"string"},"explain":{"type":"string"}},"required":["id","label","appliesTo","kind","explain"]}}},"required":["format","jurisdiction","entries","extras"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not possible now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/accounting/transactions":{"get":{"tags":["accounting"],"operationId":"getAccountingTransactions","summary":"The account's transactions for a period in the neutral accounting model, its holdings at the end, and whether the rows add up to the ledger","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string"},"required":false,"name":"portfolioId","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"jurisdiction":{"type":"string"},"currency":{"type":"string"},"type":{"type":"string"},"variantId":{"type":"string"},"retirement":{"type":["object","null"],"properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"]}},"required":["id","name","jurisdiction","currency","type","variantId","retirement"]},"from":{"type":"string"},"to":{"type":"string"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRow"}},"holdings":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"portfolioId":{"type":"string"},"portfolioName":{"type":"string"},"instrument":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"assetClass":{"type":"string"}},"required":["id","code","name","assetClass"]},"quantity":{"type":"string"},"price":{"type":["string","null"]},"currency":{"type":"string"},"value":{"type":["string","null"]},"costBase":{"type":["string","null"]},"approximate":{"type":"boolean"}},"required":["date","portfolioId","portfolioName","instrument","quantity","price","currency","value","costBase","approximate"]}},"reconciled":{"type":"boolean"},"reconciliation":{"type":"array","items":{"type":"object","properties":{"portfolioId":{"type":"string"},"instrumentId":{"type":"string"},"opening":{"type":"string"},"movements":{"type":"string"},"closing":{"type":"string"},"ok":{"type":"boolean"}},"required":["portfolioId","instrumentId","opening","movements","closing","ok"]}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"count":{"type":"number"}},"required":["code","message","count"]}}},"required":["account","from","to","rows","holdings","reconciled","reconciliation","warnings"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not possible now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/accounting/preview":{"get":{"tags":["accounting"],"operationId":"previewAccountingExport","summary":"What an export would hold: row counts, totals, warnings and the first rows","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"format","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string"},"required":false,"name":"profileId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"portfolioId","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingPreview"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not possible now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/accounting/exports":{"get":{"tags":["accounting"],"operationId":"listAccountExports","summary":"Exports you made of this account","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"exports":{"type":"array","items":{"$ref":"#/components/schemas/AccountingExport"}}},"required":["exports"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not possible now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounting/exports":{"get":{"tags":["accounting"],"operationId":"listAccountingExports","summary":"Your exports (a firm's for its clients), newest first; one batch with batchId","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"batchId","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"exports":{"type":"array","items":{"$ref":"#/components/schemas/AccountingExport"}}},"required":["exports"]}}}}}}},"/v1/accounting/exports/{exportId}":{"get":{"tags":["accounting"],"operationId":"getAccountingExport","summary":"One export and its files","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"exportId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingExport"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not possible now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounting/exports/{exportId}/files/{fileId}":{"get":{"tags":["accounting"],"operationId":"downloadAccountingExportFile","summary":"Download one file of an export","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"exportId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"fileId","in":"path"}],"responses":{"200":{"description":"The file (CSV, Excel or ZIP)","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not possible now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounting/profiles":{"get":{"tags":["accounting"],"operationId":"listAccountingProfiles","summary":"Your mapping profiles (a firm's with x-firm-id)","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"profiles":{"type":"array","items":{"$ref":"#/components/schemas/AccountingProfile"}}},"required":["profiles"]}}}}}}},"/v1/accounting/schedules":{"get":{"tags":["accounting"],"operationId":"listAccountingSchedules","summary":"Recurring exports","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"schedules":{"type":"array","items":{"$ref":"#/components/schemas/AccountingSchedule"}}},"required":["schedules"]}}}}}}},"/v1/accounts/{id}/fees":{"get":{"tags":["fees"],"operationId":"getAccountFees","summary":"Fees on an account: offers to answer, fees in force, and what was charged","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountFees"}}}},"401":{"description":"Not signed in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/orders/fee":{"get":{"tags":["investing"],"operationId":"previewOrderFee","summary":"The transaction fee an order would pay, before placing it","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"instrumentId","in":"query"},{"schema":{"type":"string","enum":["buy","sell"]},"required":true,"name":"side","in":"query"},{"schema":{"type":"string"},"required":true,"name":"quantity","in":"query"},{"schema":{"type":"string","enum":["market","limit"]},"required":false,"name":"type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limitPrice","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderFee"}}}},"401":{"description":"Not signed in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/currency-accounts":{"get":{"tags":["money"],"operationId":"listCurrencyAccounts","summary":"The account's currency accounts and the currencies it can ask for","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrencyAccounts"}}}}}}},"/v1/accounts/{id}/deposit-details":{"get":{"tags":["money"],"operationId":"getDepositDetails","summary":"The account details to pay into (issued on first request)","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Defaults to the account's main currency"},"required":false,"description":"Defaults to the account's main currency","name":"currency","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositDetails"}}}},"409":{"description":"No provider for this currency yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/bank-schemes":{"get":{"tags":["money"],"operationId":"listBankSchemes","summary":"The ways to pay a currency and the details each needs (the usual one first)","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":3},"required":true,"name":"currency","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"schemes":{"type":"array","items":{"$ref":"#/components/schemas/BankScheme"}}},"required":["schemes"]}}}}}}},"/v1/accounts/{id}/recurring-payments":{"get":{"tags":["money"],"operationId":"listRecurringPayments","summary":"Recurring Payments of the account, newest first","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"recurringPayments":{"type":"array","items":{"$ref":"#/components/schemas/RecurringPayment"}}},"required":["recurringPayments"]}}}}}}},"/v1/accounts/{id}/recurring-payments/{recurringId}":{"get":{"tags":["money"],"operationId":"getRecurringPayment","summary":"A recurring payment and its runs, newest first","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"recurringId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RecurringPayment"},{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/RecurringRun"}}},"required":["runs"]}],"description":"A payment repeated on a schedule from the Primary portfolio (D134)"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/investments":{"get":{"tags":["investing"],"operationId":"listInvestments","summary":"Shares, ETFs, bonds and digital assets you can buy","description":"Searched, filtered, sorted and paged on the server (D140). With `currency`, each price is also shown in it at today's middle rate (an estimate), and price and market cap sort in it.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["equity","etf","bond","yield_product","crypto"]},"required":false,"name":"assetClass","in":"query"},{"schema":{"type":"string","enum":["all","shares","funds","bonds","digital"],"description":"A kind of the brokerage catalog instead of assetClass and types: all, shares, funds (ETFs and listed funds), bonds or digital (every security type of it)"},"required":false,"description":"A kind of the brokerage catalog instead of assetClass and types: all, shares, funds (ETFs and listed funds), bonds or digital (every security type of it)","name":"kind","in":"query"},{"schema":{"type":"string","minLength":3,"maxLength":3,"description":"Only listings traded in this currency"},"required":false,"description":"Only listings traded in this currency","name":"listingCurrency","in":"query"},{"schema":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"Show this country's exchanges first (ISO 3166-1 alpha-2): an order only, nothing is left out"},"required":false,"description":"Show this country's exchanges first (ISO 3166-1 alpha-2): an order only, nothing is left out","name":"preferCountry","in":"query"},{"schema":{"type":"string","minLength":3,"maxLength":3,"description":"Show listings in this currency first: an order only"},"required":false,"description":"Show listings in this currency first: an order only","name":"preferCurrency","in":"query"},{"schema":{"type":"string","maxLength":60},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","maxLength":12,"description":"A market's MIC (XNYS), CRYPTO or OTC"},"required":false,"description":"A market's MIC (XNYS), CRYPTO or OTC","name":"market","in":"query"},{"schema":{"type":"string","minLength":3,"maxLength":3},"required":false,"name":"currency","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Security types, comma-separated (common, etf, fund, preferred, adr, warrant, bond, index, crypto…); default: common shares, ETFs and coins"},"required":false,"description":"Security types, comma-separated (common, etf, fund, preferred, adr, warrant, bond, index, crypto…); default: common shares, ETFs and coins","name":"types","in":"query"},{"schema":{"type":"string","enum":["name","price","change","marketCap","rank","relevance"],"description":"rank: digital assets by market rank, unranked last (the default when listing digital assets); relevance: closest matches to q first, then the preference (the default with preferCountry or preferCurrency)"},"required":false,"description":"rank: digital assets by market rank, unranked last (the default when listing digital assets); relevance: closest matches to q first, then the preference (the default with preferCountry or preferCurrency)","name":"sort","in":"query"},{"schema":{"type":"string","enum":["cryptocurrency","tokenized_stock","tokenized_commodity","stablecoin","meme"],"description":"Digital assets of this category only"},"required":false,"description":"Digital assets of this category only","name":"category","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"order","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"Only listings on this country's exchanges (ISO 3166-1 alpha-2)"},"required":false,"description":"Only listings on this country's exchanges (ISO 3166-1 alpha-2)","name":"country","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"true: only listings that moved today (a previous close and a change)"},"required":false,"description":"true: only listings that moved today (a previous close and a change)","name":"moved","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,4})?$","description":"Only listings priced at least this, in `currency` when given (else their own), e.g. 1.00"},"required":false,"description":"Only listings priced at least this, in `currency` when given (else their own), e.g. 1.00","name":"minPrice","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"investments":{"type":"array","items":{"$ref":"#/components/schemas/ListedInvestment"}},"total":{"type":"number","description":"How many match, across all pages"}},"required":["investments","total"]}}}}}}},"/v1/investments/history":{"get":{"tags":["investing"],"operationId":"investmentHistory","summary":"Closing prices for several investments at once (D126), for charts and sparklines","description":"Oldest first, one close per recorded day. `simulated` is true when any of it comes from the staging path, never market data.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","maxLength":2000,"description":"Investment ids, comma separated (at most 50)"},"required":true,"description":"Investment ids, comma separated (at most 50)","name":"ids","in":"query"},{"schema":{"type":"string","enum":["1m","3m","6m","1y","3y","5y","max"],"default":"1y"},"required":false,"name":"range","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestmentHistory"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/investments/{id}":{"get":{"tags":["investing"],"operationId":"getInvestment","summary":"One investment with its latest price","description":"With `currency`, its price in that currency too (`shown`, an estimate at today's middle rate).","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":3,"maxLength":3},"required":false,"name":"currency","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestmentDetail"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/orders":{"post":{"tags":["investing"],"operationId":"placeOrder","summary":"Buy or sell in a portfolio","description":"The cash (buy) or units (sell) are set aside at once. A market buy sets aside 3% above the price; what is not used comes back.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Idempotency-Key: 16-128 chars; repeat it to retry safely"},"required":true,"description":"Idempotency-Key: 16-128 chars; repeat it to retry safely","name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"portfolioId":{"type":"string"},"instrumentId":{"type":"string"},"side":{"type":"string","enum":["buy","sell"]},"type":{"type":"string","enum":["market","limit"]},"quantity":{"type":"string","example":"10"},"limitPrice":{"type":"string","example":"45.10"},"linkedTo":{"type":"string","description":"An instruction this belongs with, e.g. the currency conversion that funds it"},"reason":{"type":"string","maxLength":200,"description":"A firm's own trade under a discretionary mandate: why, in one line (required then; kept with the order and audited)"}},"required":["portfolioId","instrumentId","side","type","quantity"]}}}},"responses":{"200":{"description":"Filled, working, waiting for approval, or refused by the market","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"409":{"description":"Not enough cash or units, or no price","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid quantity or price","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["investing"],"operationId":"listOrders","summary":"Orders on this account, newest first","description":"Without filters: the latest 100. With any of `status`, `from`, `to`, `assetClass`, `q`, `portfolioId`, `limit` or `offset`: filtered and paged on the server (up to 5,000 matching), with `total`.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":200,"description":"open (still working), done (ended), or order states comma-separated (filled,cancelled…)"},"required":false,"description":"open (still working), done (ended), or order states comma-separated (filled,cancelled…)","name":"status","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Placed on or after this day (UTC)"},"required":false,"description":"Placed on or after this day (UTC)","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Placed on or before this day (UTC)"},"required":false,"description":"Placed on or before this day (UTC)","name":"to","in":"query"},{"schema":{"type":"string","enum":["equity","etf","bond","crypto"]},"required":false,"name":"assetClass","in":"query"},{"schema":{"type":"string","maxLength":60,"description":"Name or symbol"},"required":false,"description":"Name or symbol","name":"q","in":"query"},{"schema":{"type":"string","maxLength":80},"required":false,"name":"portfolioId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"total":{"type":"number","description":"How many match, across all pages"}},"required":["orders","total"]}}}}}}},"/v1/orders/{id}/approve":{"post":{"tags":["investing"],"operationId":"approveOrder","summary":"Approve an order waiting for you","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"409":{"description":"Wrong state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}/cancel":{"post":{"tags":["investing"],"operationId":"cancelOrder","summary":"Cancel an order that has not filled","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"409":{"description":"Wrong state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/positions":{"get":{"tags":["investing"],"operationId":"listPositions","summary":"What each portfolio owns beyond cash, with cost base and value","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"positions":{"type":"array","items":{"$ref":"#/components/schemas/Position"}}},"required":["positions"]}}}}}}},"/v1/accounts/{id}/realised-gains":{"get":{"tags":["investing"],"operationId":"listRealisedGains","summary":"Sales, lot by lot: cost, proceeds and gain","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sales":{"type":"array","items":{"type":"object","properties":{"portfolioId":{"type":"string"},"instrumentId":{"type":"string"},"quantity":{"type":"string"},"acquiredAt":{"type":"string"},"soldAt":{"type":"string"},"cost":{"$ref":"#/components/schemas/Money"},"proceeds":{"$ref":"#/components/schemas/Money"},"gain":{"$ref":"#/components/schemas/Money"}},"required":["portfolioId","instrumentId","quantity","acquiredAt","soldAt","cost","proceeds","gain"]}}},"required":["sales"]}}}}}}},"/v1/markets/exchanges":{"get":{"tags":["investing"],"operationId":"listExchanges","summary":"Stock exchanges: hours, open now, listings here, and the rate from a currency","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":3},"required":false,"name":"currency","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"exchanges":{"type":"array","items":{"$ref":"#/components/schemas/Exchange"}}},"required":["exchanges"]}}}}}}},"/v1/markets/digital-assets/categories":{"get":{"tags":["investing"],"operationId":"listDigitalAssetCategories","summary":"Digital asset categories with how many coins are offered in each","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/DigitalAssetCategory"}}},"required":["categories"]}}}},"401":{"description":"Not signed in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/markets/indices":{"get":{"tags":["investing"],"operationId":"listMarketIndices","summary":"Major market indices (view only), the person's country first, with delayed levels","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"indices":{"type":"array","items":{"$ref":"#/components/schemas/MarketIndex"}}},"required":["indices"]}}}},"401":{"description":"Not signed in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/markets/indices/{id}/history":{"get":{"tags":["investing"],"operationId":"marketIndexHistory","summary":"An index's line: the latest session's levels (1d), or daily closes over a month or a year","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":40},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["1d","1m","1y"],"default":"1d"},"required":false,"name":"range","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"points":{"type":"array","items":{"$ref":"#/components/schemas/IndexPoint"}}},"required":["points"]}}}},"401":{"description":"Not signed in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such index","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/logos/{instrumentId}":{"get":{"tags":["investing"],"operationId":"getLogo","summary":"An investment's logo, from IDEALX's own store (D143)","description":"An image (PNG, JPEG, WebP or SVG). A lettermark until a logo is stored. No authentication; cached long. With `format=png` the image comes as a square PNG `size` pixels wide (default 128), for apps that cannot draw SVG (D163).","parameters":[{"schema":{"type":"string","maxLength":80},"required":true,"name":"instrumentId","in":"path"},{"schema":{"type":"string","enum":["png"]},"required":false,"name":"format","in":"query"},{"schema":{"type":"string","enum":["64","128","256"]},"required":false,"name":"size","in":"query"}],"responses":{"200":{"description":"The image","content":{"image/png":{"schema":{"type":"string","format":"binary"}},"image/svg+xml":{"schema":{"type":"string","format":"binary"}}}},"304":{"description":"Not changed"},"404":{"description":"No such investment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/yield":{"post":{"tags":["investing"],"operationId":"startYield","summary":"Put cash from a portfolio into yield","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Idempotency-Key: 16-128 chars; repeat it to retry safely"},"required":true,"description":"Idempotency-Key: 16-128 chars; repeat it to retry safely","name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"portfolioId":{"type":"string"},"instrumentId":{"type":"string"},"amount":{"$ref":"#/components/schemas/Money"}},"required":["portfolioId","instrumentId","amount"]}}}},"responses":{"200":{"description":"Placed, or returned if the provider refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YieldHolding"}}}},"409":{"description":"Not enough cash, or not open","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Below the smallest amount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["investing"],"operationId":"listYield","summary":"Yield on this account, with interest so far","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"yield":{"type":"array","items":{"$ref":"#/components/schemas/YieldHolding"}}},"required":["yield"]}}}}}}},"/v1/accounts/{id}/income":{"get":{"tags":["investing"],"operationId":"listIncome","summary":"Dividends, interest, repayments and splits received","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"income":{"type":"array","items":{"type":"object","properties":{"portfolioId":{"type":"string"},"instrumentId":{"type":"string"},"kind":{"type":"string","enum":["dividend","coupon","redemption","split"]},"payDate":{"type":"string"},"units":{"type":"string"},"amount":{"allOf":[{"$ref":"#/components/schemas/Money"},{"type":["object","null"]}]},"unitsAdded":{"type":["string","null"]}},"required":["portfolioId","instrumentId","kind","payDate","units","amount","unitsAdded"]}}},"required":["income"]}}}}}}},"/v1/crypto/assets":{"get":{"tags":["crypto"],"operationId":"listCryptoAssets","summary":"The coins IDEALX holds and the networks (blockchains) each moves on, usual one first","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"assets":{"type":"array","items":{"type":"object","properties":{"instrumentId":{"type":"string"},"symbol":{"type":"string"},"networks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["bitcoin","ethereum","base","polygon","solana"]},"name":{"type":"string"},"confirmations":{"type":"number"}},"required":["id","name","confirmations"]}}},"required":["instrumentId","symbol","networks"]}}},"required":["assets"]}}}}}}},"/v1/accounts/{id}/crypto/deposit-address":{"get":{"tags":["crypto"],"operationId":"getCryptoDepositAddress","summary":"Where to send a coin (issued on first request)","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["BTC","ETH","USDC"]},"required":true,"name":"coin","in":"query"},{"schema":{"type":"string","enum":["bitcoin","ethereum","base","polygon","solana"],"description":"One of the coin's networks (GET /v1/crypto/assets); its usual one if left out"},"required":false,"description":"One of the coin's networks (GET /v1/crypto/assets); its usual one if left out","name":"network","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CryptoDepositAddress"}}}},"409":{"description":"Not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/crypto/deposits":{"get":{"tags":["crypto"],"operationId":"listCryptoDeposits","summary":"Coins received, including those still waiting for confirmations","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deposits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"coin":{"type":"string"},"quantity":{"type":"string"},"status":{"type":"string","enum":["pending","credited","unmatched"]},"confirmations":{"type":"number"},"confirmationsNeeded":{"type":"number"},"txHash":{"type":"string"},"receivedAt":{"type":"string"}},"required":["id","coin","quantity","status","confirmations","confirmationsNeeded","txHash","receivedAt"]}}},"required":["deposits"]}}}}}}},"/v1/accounts/{id}/crypto/coins":{"get":{"tags":["crypto"],"operationId":"listAccountCryptoCoins","summary":"Coins this account can receive and send, with each network's minimums and fees","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["all","listed"],"description":"all: every coin listed can be received, held or not, and addresses carry a memo; listed: the few coins IDEALX holds"},"coins":{"type":"array","items":{"$ref":"#/components/schemas/CryptoCoin"}}},"required":["scope","coins"]}}}}}}},"/v1/accounts/{id}/crypto/receive":{"get":{"tags":["crypto"],"operationId":"getCryptoReceive","summary":"Where to send a coin on a network, with its memo when the network needs one","description":"Any coin the account can receive, held or not. It arrives in the Primary portfolio.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9]{1,15}$"},"required":true,"name":"coin","in":"query"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{2,32}$"},"required":false,"name":"network","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CryptoReceive"}}}},"409":{"description":"Not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/crypto/incoming":{"get":{"tags":["crypto"],"operationId":"listCryptoIncoming","summary":"Coins on their way in and received, by coin and network","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"incoming":{"type":"array","items":{"$ref":"#/components/schemas/CryptoIncoming"}}},"required":["incoming"]}}}}}}},"/v1/accounts/{id}/crypto/addresses":{"get":{"tags":["crypto"],"operationId":"listCryptoAddresses","summary":"Saved addresses to send crypto to, with network and memo","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"addresses":{"type":"array","items":{"$ref":"#/components/schemas/CryptoAddress"}}},"required":["addresses"]}}}}}}},"/v1/accounts/{id}/activity":{"get":{"tags":["accounts"],"operationId":"listActivity","summary":"Everything that happened on an account in one list, newest first: money in and out, trades, orders, transfers, coins, income and fees (D150)","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":2000,"description":"Comma-separated: deposit, withdrawal, buy, sell, order, transfer, receive, send, convert, dividend, interest, fee, adjustment, professional"},"required":false,"description":"Comma-separated: deposit, withdrawal, buy, sell, order, transfer, receive, send, convert, dividend, interest, fee, adjustment, professional","name":"kind","in":"query"},{"schema":{"type":"string","maxLength":2000,"description":"Comma-separated: cash, equity, etf, fund, bond, crypto, yield_product"},"required":false,"description":"Comma-separated: cash, equity, etf, fund, bond, crypto, yield_product","name":"assetClass","in":"query"},{"schema":{"type":"string","maxLength":2000,"description":"Comma-separated instrument ids"},"required":false,"description":"Comma-separated instrument ids","name":"instrumentId","in":"query"},{"schema":{"type":"string","maxLength":80,"description":"Part of a name or symbol"},"required":false,"description":"Part of a name or symbol","name":"q","in":"query"},{"schema":{"type":"string","maxLength":2000,"description":"Comma-separated: pending, done, cancelled, failed, approval"},"required":false,"description":"Comma-separated: pending, done, cancelled, failed, approval","name":"status","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day (YYYY-MM-DD)"},"required":false,"description":"First day (YYYY-MM-DD)","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day, included"},"required":false,"description":"Last day, included","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","7d","30d","ytd","fy"],"description":"In the account's time zone. fy: the account's country's tax year (its catalog start day); ytd: since 1 January. With from/to, both apply"},"required":false,"description":"In the account's time zone. fy: the account's country's tax year (its catalog start day); ytd: since 1 January. With from/to, both apply","name":"period","in":"query"},{"schema":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Smallest amount in the account's currency, either sign"},"required":false,"description":"Smallest amount in the account's currency, either sign","name":"amountMin","in":"query"},{"schema":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Largest amount in the account's currency, either sign"},"required":false,"description":"Largest amount in the account's currency, either sign","name":"amountMax","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Comma-separated currencies"},"required":false,"description":"Comma-separated currencies","name":"currency","in":"query"},{"schema":{"type":"string","maxLength":2000,"description":"Comma-separated"},"required":false,"description":"Comma-separated","name":"portfolioId","in":"query"},{"schema":{"type":"string","maxLength":80,"description":"The person who asked (person id)"},"required":false,"description":"The person who asked (person id)","name":"actor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"nextCursor of a page"},"required":false,"description":"nextCursor of a page","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"false leaves out the facets (later pages need none)"},"required":false,"description":"false leaves out the facets (later pages need none)","name":"facets","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"false leaves out the summary (later pages need none). With facets=false too, the page is read with keyset paging, up to its cursor only"},"required":false,"description":"false leaves out the summary (later pages need none). With facets=false too, the page is read with keyset paging, up to its cursor only","name":"summary","in":"query"}],"responses":{"200":{"description":"A page of the feed, the totals of everything it matches and the facets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityPage"}}}},"404":{"description":"No such account or portfolio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/activity.csv":{"get":{"tags":["accounts"],"operationId":"getActivityCsv","summary":"The activity feed with the same filters as a spreadsheet, newest first (at most 10000 rows)","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":2000,"description":"Comma-separated: deposit, withdrawal, buy, sell, order, transfer, receive, send, convert, dividend, interest, fee, adjustment, professional"},"required":false,"description":"Comma-separated: deposit, withdrawal, buy, sell, order, transfer, receive, send, convert, dividend, interest, fee, adjustment, professional","name":"kind","in":"query"},{"schema":{"type":"string","maxLength":2000,"description":"Comma-separated: cash, equity, etf, fund, bond, crypto, yield_product"},"required":false,"description":"Comma-separated: cash, equity, etf, fund, bond, crypto, yield_product","name":"assetClass","in":"query"},{"schema":{"type":"string","maxLength":2000,"description":"Comma-separated instrument ids"},"required":false,"description":"Comma-separated instrument ids","name":"instrumentId","in":"query"},{"schema":{"type":"string","maxLength":80,"description":"Part of a name or symbol"},"required":false,"description":"Part of a name or symbol","name":"q","in":"query"},{"schema":{"type":"string","maxLength":2000,"description":"Comma-separated: pending, done, cancelled, failed, approval"},"required":false,"description":"Comma-separated: pending, done, cancelled, failed, approval","name":"status","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day (YYYY-MM-DD)"},"required":false,"description":"First day (YYYY-MM-DD)","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day, included"},"required":false,"description":"Last day, included","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","7d","30d","ytd","fy"],"description":"In the account's time zone. fy: the account's country's tax year (its catalog start day); ytd: since 1 January. With from/to, both apply"},"required":false,"description":"In the account's time zone. fy: the account's country's tax year (its catalog start day); ytd: since 1 January. With from/to, both apply","name":"period","in":"query"},{"schema":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Smallest amount in the account's currency, either sign"},"required":false,"description":"Smallest amount in the account's currency, either sign","name":"amountMin","in":"query"},{"schema":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Largest amount in the account's currency, either sign"},"required":false,"description":"Largest amount in the account's currency, either sign","name":"amountMax","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Comma-separated currencies"},"required":false,"description":"Comma-separated currencies","name":"currency","in":"query"},{"schema":{"type":"string","maxLength":2000,"description":"Comma-separated"},"required":false,"description":"Comma-separated","name":"portfolioId","in":"query"},{"schema":{"type":"string","maxLength":80,"description":"The person who asked (person id)"},"required":false,"description":"The person who asked (person id)","name":"actor","in":"query"}],"responses":{"200":{"description":"CSV","content":{"text/csv":{"schema":{"type":"string"}}}},"404":{"description":"No such account or portfolio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/activity/report":{"get":{"tags":["accounts"],"operationId":"getActivityReport","summary":"The filtered activity feed as a named file: a branded PDF (at most 10000 rows), CSV or Excel workbook (D152)","description":"Takes the feed's filters. The file name comes from the report's name and today's date (Content-Disposition). At most 20 reports a minute per person.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":2000,"description":"Comma-separated: deposit, withdrawal, buy, sell, order, transfer, receive, send, convert, dividend, interest, fee, adjustment, professional"},"required":false,"description":"Comma-separated: deposit, withdrawal, buy, sell, order, transfer, receive, send, convert, dividend, interest, fee, adjustment, professional","name":"kind","in":"query"},{"schema":{"type":"string","maxLength":2000,"description":"Comma-separated: cash, equity, etf, fund, bond, crypto, yield_product"},"required":false,"description":"Comma-separated: cash, equity, etf, fund, bond, crypto, yield_product","name":"assetClass","in":"query"},{"schema":{"type":"string","maxLength":2000,"description":"Comma-separated instrument ids"},"required":false,"description":"Comma-separated instrument ids","name":"instrumentId","in":"query"},{"schema":{"type":"string","maxLength":80,"description":"Part of a name or symbol"},"required":false,"description":"Part of a name or symbol","name":"q","in":"query"},{"schema":{"type":"string","maxLength":2000,"description":"Comma-separated: pending, done, cancelled, failed, approval"},"required":false,"description":"Comma-separated: pending, done, cancelled, failed, approval","name":"status","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day (YYYY-MM-DD)"},"required":false,"description":"First day (YYYY-MM-DD)","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day, included"},"required":false,"description":"Last day, included","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","7d","30d","ytd","fy"],"description":"In the account's time zone. fy: the account's country's tax year (its catalog start day); ytd: since 1 January. With from/to, both apply"},"required":false,"description":"In the account's time zone. fy: the account's country's tax year (its catalog start day); ytd: since 1 January. With from/to, both apply","name":"period","in":"query"},{"schema":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Smallest amount in the account's currency, either sign"},"required":false,"description":"Smallest amount in the account's currency, either sign","name":"amountMin","in":"query"},{"schema":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Largest amount in the account's currency, either sign"},"required":false,"description":"Largest amount in the account's currency, either sign","name":"amountMax","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Comma-separated currencies"},"required":false,"description":"Comma-separated currencies","name":"currency","in":"query"},{"schema":{"type":"string","maxLength":2000,"description":"Comma-separated"},"required":false,"description":"Comma-separated","name":"portfolioId","in":"query"},{"schema":{"type":"string","maxLength":80,"description":"The person who asked (person id)"},"required":false,"description":"The person who asked (person id)","name":"actor","in":"query"},{"schema":{"type":"string","enum":["pdf","csv","xlsx"],"description":"pdf (the default), csv or xlsx"},"required":false,"description":"pdf (the default), csv or xlsx","name":"format","in":"query"},{"schema":{"type":"string","maxLength":120,"description":"The report's name; by default one made from the filters"},"required":false,"description":"The report's name; by default one made from the filters","name":"name","in":"query"},{"schema":{"type":"string","maxLength":400,"description":"Comma-separated, in order: date, type, asset, quantity, price, amount, currency, accountAmount, status, portfolio, person, reference"},"required":false,"description":"Comma-separated, in order: date, type, asset, quantity, price, amount, currency, accountAmount, status, portfolio, person, reference","name":"columns","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"],"description":"Start with totals by currency and counts by type (PDF and Excel). Default 1"},"required":false,"description":"Start with totals by currency and counts by type (PDF and Excel). Default 1","name":"summary","in":"query"},{"schema":{"type":"string","enum":["day","month"],"description":"How the PDF groups rows; by default by day up to a month, else by month"},"required":false,"description":"How the PDF groups rows; by default by day up to a month, else by month","name":"group","in":"query"}],"responses":{"200":{"description":"The report","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"text/csv":{"schema":{"type":"string"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"No such account or portfolio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Unknown columns, or too many rows for the format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many reports in a minute","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/digital-assets/activity":{"get":{"tags":["crypto"],"operationId":"listDigitalAssetActivity","summary":"Orders on digital assets and wallet transfers, in one timeline, newest first","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["all","orders","transfers"],"description":"orders: placed, open, filled, cancelled; transfers: received, sent, converted"},"required":false,"description":"orders: placed, open, filled, cancelled; transfers: received, sent, converted","name":"type","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"nextCursor of a page"},"required":false,"description":"nextCursor of a page","name":"cursor","in":"query"},{"schema":{"type":"string","pattern":"^CRYPTO:[A-Za-z0-9._-]{1,40}$","description":"One coin's activity only (CRYPTO:BTC)"},"required":false,"description":"One coin's activity only (CRYPTO:BTC)","name":"instrumentId","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DigitalAssetActivity"}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/register":{"get":{"tags":["accounts"],"operationId":"listAccountInstructions","summary":"Every instruction on this account (trades, transfers, payments…), whoever made it","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"instructions":{"type":"array","items":{"$ref":"#/components/schemas/InstructionEntry"}}},"required":["instructions"]}}}}}}},"/v1/fx/pairs":{"get":{"tags":["money"],"operationId":"fxPairs","summary":"Which currencies convert into which, right now","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pairs":{"type":"array","items":{"type":"object","properties":{"base":{"type":"string"},"quote":{"type":"string"}},"required":["base","quote"]}}},"required":["pairs"]}}}}}}},"/v1/fx/quote":{"get":{"tags":["money"],"operationId":"fxQuote","summary":"What an amount converts to, or (with want) what it costs to receive an amount","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string"},"required":false,"name":"amount","in":"query"},{"schema":{"type":"string"},"required":false,"name":"want","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pay":{"$ref":"#/components/schemas/Money"},"receive":{"$ref":"#/components/schemas/Money"},"rate":{"type":"string"},"pair":{"type":"string"},"asOf":{"type":"string"},"marginIncluded":{"type":"boolean","description":"The rate includes IDEALX's margin (D109)"}},"required":["pay","receive","rate","pair","asOf","marginIncluded"]}}}},"409":{"description":"No rate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/fx":{"post":{"tags":["money"],"operationId":"convertCurrency","summary":"Convert cash in a portfolio from one currency to another","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"portfolioId":{"type":"string"},"from":{"$ref":"#/components/schemas/Money"},"to":{"type":"string"}},"required":["portfolioId","from","to"]}}}},"responses":{"200":{"description":"Converted, or returned if the provider refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversion"}}}},"409":{"description":"Not enough cash or no rate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["money"],"operationId":"listConversions","summary":"Currency conversions on this account","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"conversions":{"type":"array","items":{"$ref":"#/components/schemas/Conversion"}}},"required":["conversions"]}}}}}}}},"webhooks":{"account.opened":{"post":{"tags":["webhooks"],"summary":"account.opened","parameters":[{"schema":{"type":"string","description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>"},"required":true,"description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>","name":"idealx-signature","in":"header"},{"schema":{"type":"string","example":"account.opened"},"required":true,"name":"idealx-event","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received: answer 2xx within ten seconds"}}}},"approval.waiting":{"post":{"tags":["webhooks"],"summary":"approval.waiting","parameters":[{"schema":{"type":"string","description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>"},"required":true,"description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>","name":"idealx-signature","in":"header"},{"schema":{"type":"string","example":"approval.waiting"},"required":true,"name":"idealx-event","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received: answer 2xx within ten seconds"}}}},"crypto.failed":{"post":{"tags":["webhooks"],"summary":"crypto.failed","parameters":[{"schema":{"type":"string","description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>"},"required":true,"description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>","name":"idealx-signature","in":"header"},{"schema":{"type":"string","example":"crypto.failed"},"required":true,"name":"idealx-event","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received: answer 2xx within ten seconds"}}}},"crypto.received":{"post":{"tags":["webhooks"],"summary":"crypto.received","parameters":[{"schema":{"type":"string","description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>"},"required":true,"description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>","name":"idealx-signature","in":"header"},{"schema":{"type":"string","example":"crypto.received"},"required":true,"name":"idealx-event","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received: answer 2xx within ten seconds"}}}},"crypto.sent":{"post":{"tags":["webhooks"],"summary":"crypto.sent","parameters":[{"schema":{"type":"string","description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>"},"required":true,"description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>","name":"idealx-signature","in":"header"},{"schema":{"type":"string","example":"crypto.sent"},"required":true,"name":"idealx-event","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received: answer 2xx within ten seconds"}}}},"deposit.credited":{"post":{"tags":["webhooks"],"summary":"deposit.credited","parameters":[{"schema":{"type":"string","description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>"},"required":true,"description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>","name":"idealx-signature","in":"header"},{"schema":{"type":"string","example":"deposit.credited"},"required":true,"name":"idealx-event","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received: answer 2xx within ten seconds"}}}},"order.expired":{"post":{"tags":["webhooks"],"summary":"order.expired","parameters":[{"schema":{"type":"string","description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>"},"required":true,"description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>","name":"idealx-signature","in":"header"},{"schema":{"type":"string","example":"order.expired"},"required":true,"name":"idealx-event","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received: answer 2xx within ten seconds"}}}},"order.updated":{"post":{"tags":["webhooks"],"summary":"order.updated","parameters":[{"schema":{"type":"string","description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>"},"required":true,"description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>","name":"idealx-signature","in":"header"},{"schema":{"type":"string","example":"order.updated"},"required":true,"name":"idealx-event","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received: answer 2xx within ten seconds"}}}},"withdrawal.failed":{"post":{"tags":["webhooks"],"summary":"withdrawal.failed","parameters":[{"schema":{"type":"string","description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>"},"required":true,"description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>","name":"idealx-signature","in":"header"},{"schema":{"type":"string","example":"withdrawal.failed"},"required":true,"name":"idealx-event","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received: answer 2xx within ten seconds"}}}},"withdrawal.settled":{"post":{"tags":["webhooks"],"summary":"withdrawal.settled","parameters":[{"schema":{"type":"string","description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>"},"required":true,"description":"t=<unix time>,v1=<hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret>","name":"idealx-signature","in":"header"},{"schema":{"type":"string","example":"withdrawal.settled"},"required":true,"name":"idealx-event","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received: answer 2xx within ten seconds"}}}}}}