naftiko: 1.0.0-alpha2 info: label: Binance Algo Trading API — Spot Algo description: 'Binance Algo Trading API — Spot Algo. 4 operations. Lead operation: Query historical spot algo orders. Self-contained Naftiko capability covering one Binance business surface.' tags: - Binance - Spot Algo created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: BINANCE_API_KEY: BINANCE_API_KEY capability: consumes: - type: http namespace: algo-trading-spot-algo baseUri: https://api.binance.com description: Binance Algo Trading API — Spot Algo business capability. Self-contained, no shared references. resources: - name: sapi-v1-algo-spot-historicalOrders path: /sapi/v1/algo/spot/historicalOrders operations: - name: getspothistoricalalgoorders method: GET description: Query historical spot algo orders outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: symbol in: query type: string - name: side in: query type: string - name: startTime in: query type: integer - name: endTime in: query type: integer - name: page in: query type: integer - name: pageSize in: query type: integer - name: recvWindow in: query type: integer - name: timestamp in: query type: integer required: true - name: signature in: query type: string required: true - name: sapi-v1-algo-spot-newOrderTwap path: /sapi/v1/algo/spot/newOrderTwap operations: - name: createspottwaporder method: POST description: Spot TWAP new order outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: symbol in: query type: string required: true - name: side in: query type: string required: true - name: quantity in: query type: string required: true - name: duration in: query type: integer description: Duration in seconds. Min 300, max 86400. required: true - name: clientAlgoId in: query type: string - name: limitPrice in: query type: string - name: recvWindow in: query type: integer - name: timestamp in: query type: integer required: true - name: signature in: query type: string required: true - name: sapi-v1-algo-spot-openOrders path: /sapi/v1/algo/spot/openOrders operations: - name: getspotopenalgoorders method: GET description: Query current spot algo open orders outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: recvWindow in: query type: integer - name: timestamp in: query type: integer required: true - name: signature in: query type: string required: true - name: sapi-v1-algo-spot-order path: /sapi/v1/algo/spot/order operations: - name: cancelspotalgoorder method: DELETE description: Cancel spot algo order outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: algoId in: query type: integer required: true - name: recvWindow in: query type: integer - name: timestamp in: query type: integer required: true - name: signature in: query type: string required: true authentication: type: apikey key: X-MBX-APIKEY value: '{{env.BINANCE_API_KEY}}' placement: header exposes: - type: rest namespace: algo-trading-spot-algo-rest port: 8080 description: REST adapter for Binance Algo Trading API — Spot Algo. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/sapi/v1/algo/spot/historicalorders name: sapi-v1-algo-spot-historicalorders description: REST surface for sapi-v1-algo-spot-historicalOrders. operations: - method: GET name: getspothistoricalalgoorders description: Query historical spot algo orders call: algo-trading-spot-algo.getspothistoricalalgoorders with: symbol: rest.symbol side: rest.side startTime: rest.startTime endTime: rest.endTime page: rest.page pageSize: rest.pageSize recvWindow: rest.recvWindow timestamp: rest.timestamp signature: rest.signature outputParameters: - type: object mapping: $. - path: /v1/sapi/v1/algo/spot/newordertwap name: sapi-v1-algo-spot-newordertwap description: REST surface for sapi-v1-algo-spot-newOrderTwap. operations: - method: POST name: createspottwaporder description: Spot TWAP new order call: algo-trading-spot-algo.createspottwaporder with: symbol: rest.symbol side: rest.side quantity: rest.quantity duration: rest.duration clientAlgoId: rest.clientAlgoId limitPrice: rest.limitPrice recvWindow: rest.recvWindow timestamp: rest.timestamp signature: rest.signature outputParameters: - type: object mapping: $. - path: /v1/sapi/v1/algo/spot/openorders name: sapi-v1-algo-spot-openorders description: REST surface for sapi-v1-algo-spot-openOrders. operations: - method: GET name: getspotopenalgoorders description: Query current spot algo open orders call: algo-trading-spot-algo.getspotopenalgoorders with: recvWindow: rest.recvWindow timestamp: rest.timestamp signature: rest.signature outputParameters: - type: object mapping: $. - path: /v1/sapi/v1/algo/spot/order name: sapi-v1-algo-spot-order description: REST surface for sapi-v1-algo-spot-order. operations: - method: DELETE name: cancelspotalgoorder description: Cancel spot algo order call: algo-trading-spot-algo.cancelspotalgoorder with: algoId: rest.algoId recvWindow: rest.recvWindow timestamp: rest.timestamp signature: rest.signature outputParameters: - type: object mapping: $. - type: mcp namespace: algo-trading-spot-algo-mcp port: 9090 transport: http description: MCP adapter for Binance Algo Trading API — Spot Algo. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: query-historical-spot-algo-orders description: Query historical spot algo orders hints: readOnly: true destructive: false idempotent: true call: algo-trading-spot-algo.getspothistoricalalgoorders with: symbol: tools.symbol side: tools.side startTime: tools.startTime endTime: tools.endTime page: tools.page pageSize: tools.pageSize recvWindow: tools.recvWindow timestamp: tools.timestamp signature: tools.signature outputParameters: - type: object mapping: $. - name: spot-twap-new-order description: Spot TWAP new order hints: readOnly: false destructive: false idempotent: false call: algo-trading-spot-algo.createspottwaporder with: symbol: tools.symbol side: tools.side quantity: tools.quantity duration: tools.duration clientAlgoId: tools.clientAlgoId limitPrice: tools.limitPrice recvWindow: tools.recvWindow timestamp: tools.timestamp signature: tools.signature outputParameters: - type: object mapping: $. - name: query-current-spot-algo-open description: Query current spot algo open orders hints: readOnly: true destructive: false idempotent: true call: algo-trading-spot-algo.getspotopenalgoorders with: recvWindow: tools.recvWindow timestamp: tools.timestamp signature: tools.signature outputParameters: - type: object mapping: $. - name: cancel-spot-algo-order description: Cancel spot algo order hints: readOnly: false destructive: true idempotent: true call: algo-trading-spot-algo.cancelspotalgoorder with: algoId: tools.algoId recvWindow: tools.recvWindow timestamp: tools.timestamp signature: tools.signature outputParameters: - type: object mapping: $.