naftiko: 1.0.0-alpha2 info: label: StoneX Clearing API — Trading description: 'StoneX Clearing API — Trading. 3 operations. Lead operation: Submit Trade. Self-contained Naftiko capability covering one Stonex business surface.' tags: - Stonex - Trading created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: STONEX_API_KEY: STONEX_API_KEY capability: consumes: - type: http namespace: clearing-trading baseUri: https://api.clearing.stonex.com description: StoneX Clearing API — Trading business capability. Self-contained, no shared references. resources: - name: trades path: /trades operations: - name: submittrade method: POST description: Submit Trade outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: listtrades method: GET description: List Trades outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: account_id in: query type: string description: Filter by account ID. - name: status in: query type: string description: Filter by trade status. - name: from_date in: query type: string description: Start date filter. - name: to_date in: query type: string description: End date filter. - name: trades-tradeId path: /trades/{tradeId} operations: - name: gettrade method: GET description: Get Trade outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: tradeId in: path type: string description: Trade identifier. required: true authentication: type: bearer token: '{{env.STONEX_API_KEY}}' exposes: - type: rest namespace: clearing-trading-rest port: 8080 description: REST adapter for StoneX Clearing API — Trading. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/trades name: trades description: REST surface for trades. operations: - method: POST name: submittrade description: Submit Trade call: clearing-trading.submittrade with: body: rest.body outputParameters: - type: object mapping: $. - method: GET name: listtrades description: List Trades call: clearing-trading.listtrades with: account_id: rest.account_id status: rest.status from_date: rest.from_date to_date: rest.to_date outputParameters: - type: object mapping: $. - path: /v1/trades/{tradeid} name: trades-tradeid description: REST surface for trades-tradeId. operations: - method: GET name: gettrade description: Get Trade call: clearing-trading.gettrade with: tradeId: rest.tradeId outputParameters: - type: object mapping: $. - type: mcp namespace: clearing-trading-mcp port: 9090 transport: http description: MCP adapter for StoneX Clearing API — Trading. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: submit-trade description: Submit Trade hints: readOnly: false destructive: false idempotent: false call: clearing-trading.submittrade with: body: tools.body outputParameters: - type: object mapping: $. - name: list-trades description: List Trades hints: readOnly: true destructive: false idempotent: true call: clearing-trading.listtrades with: account_id: tools.account_id status: tools.status from_date: tools.from_date to_date: tools.to_date outputParameters: - type: object mapping: $. - name: get-trade description: Get Trade hints: readOnly: true destructive: false idempotent: true call: clearing-trading.gettrade with: tradeId: tools.tradeId outputParameters: - type: object mapping: $.