naftiko: 1.0.0-alpha2 info: label: Capital.com REST API — Accounts description: 'Capital.com REST API — Accounts. 4 operations. Lead operation: List Accounts. Self-contained Naftiko capability covering one Capital Com Public Api business surface.' tags: - Capital Com Public Api - Accounts created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: CAPITAL_COM_PUBLIC_API_API_KEY: CAPITAL_COM_PUBLIC_API_API_KEY capability: consumes: - type: http namespace: capital-com-rest-accounts baseUri: https://api-capital.backend-capital.com description: Capital.com REST API — Accounts business capability. Self-contained, no shared references. resources: - name: api-v1-accounts path: /api/v1/accounts operations: - name: listaccounts method: GET description: List Accounts outputRawFormat: json outputParameters: - name: result type: object value: $. - name: api-v1-accounts-preferences path: /api/v1/accounts/preferences operations: - name: getaccountpreferences method: GET description: Get Account Preferences outputRawFormat: json outputParameters: - name: result type: object value: $. - name: updateaccountpreferences method: PUT description: Update Account Preferences outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: api-v1-accounts-topUp path: /api/v1/accounts/topUp operations: - name: topupdemoaccount method: POST description: Adjust Demo Account Balance outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true authentication: type: apikey key: X-CAP-API-KEY value: '{{env.CAPITAL_COM_PUBLIC_API_API_KEY}}' placement: header exposes: - type: rest namespace: capital-com-rest-accounts-rest port: 8080 description: REST adapter for Capital.com REST API — Accounts. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/v1/accounts name: api-v1-accounts description: REST surface for api-v1-accounts. operations: - method: GET name: listaccounts description: List Accounts call: capital-com-rest-accounts.listaccounts outputParameters: - type: object mapping: $. - path: /v1/api/v1/accounts/preferences name: api-v1-accounts-preferences description: REST surface for api-v1-accounts-preferences. operations: - method: GET name: getaccountpreferences description: Get Account Preferences call: capital-com-rest-accounts.getaccountpreferences outputParameters: - type: object mapping: $. - method: PUT name: updateaccountpreferences description: Update Account Preferences call: capital-com-rest-accounts.updateaccountpreferences with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/v1/accounts/topup name: api-v1-accounts-topup description: REST surface for api-v1-accounts-topUp. operations: - method: POST name: topupdemoaccount description: Adjust Demo Account Balance call: capital-com-rest-accounts.topupdemoaccount with: body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: capital-com-rest-accounts-mcp port: 9090 transport: http description: MCP adapter for Capital.com REST API — Accounts. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-accounts description: List Accounts hints: readOnly: true destructive: false idempotent: true call: capital-com-rest-accounts.listaccounts outputParameters: - type: object mapping: $. - name: get-account-preferences description: Get Account Preferences hints: readOnly: true destructive: false idempotent: true call: capital-com-rest-accounts.getaccountpreferences outputParameters: - type: object mapping: $. - name: update-account-preferences description: Update Account Preferences hints: readOnly: false destructive: false idempotent: true call: capital-com-rest-accounts.updateaccountpreferences with: body: tools.body outputParameters: - type: object mapping: $. - name: adjust-demo-account-balance description: Adjust Demo Account Balance hints: readOnly: false destructive: false idempotent: false call: capital-com-rest-accounts.topupdemoaccount with: body: tools.body outputParameters: - type: object mapping: $.