naftiko: 1.0.0-alpha2 info: label: Binance Portfolio Margin API — Account description: 'Binance Portfolio Margin API — Account. 2 operations. Lead operation: Query portfolio margin account info. Self-contained Naftiko capability covering one Binance business surface.' tags: - Binance - Account created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: BINANCE_API_KEY: BINANCE_API_KEY capability: consumes: - type: http namespace: portfolio-margin-account baseUri: https://papi.binance.com description: Binance Portfolio Margin API — Account business capability. Self-contained, no shared references. resources: - name: papi-v1-account path: /papi/v1/account operations: - name: getaccountinfo method: GET description: Query portfolio margin account info 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: papi-v1-balance path: /papi/v1/balance operations: - name: getbalance method: GET description: Query portfolio margin balance outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: asset in: query type: string description: Asset to query. If not sent, returns all assets. - 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: portfolio-margin-account-rest port: 8080 description: REST adapter for Binance Portfolio Margin API — Account. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/papi/v1/account name: papi-v1-account description: REST surface for papi-v1-account. operations: - method: GET name: getaccountinfo description: Query portfolio margin account info call: portfolio-margin-account.getaccountinfo with: recvWindow: rest.recvWindow timestamp: rest.timestamp signature: rest.signature outputParameters: - type: object mapping: $. - path: /v1/papi/v1/balance name: papi-v1-balance description: REST surface for papi-v1-balance. operations: - method: GET name: getbalance description: Query portfolio margin balance call: portfolio-margin-account.getbalance with: asset: rest.asset recvWindow: rest.recvWindow timestamp: rest.timestamp signature: rest.signature outputParameters: - type: object mapping: $. - type: mcp namespace: portfolio-margin-account-mcp port: 9090 transport: http description: MCP adapter for Binance Portfolio Margin API — Account. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: query-portfolio-margin-account-info description: Query portfolio margin account info hints: readOnly: true destructive: false idempotent: true call: portfolio-margin-account.getaccountinfo with: recvWindow: tools.recvWindow timestamp: tools.timestamp signature: tools.signature outputParameters: - type: object mapping: $. - name: query-portfolio-margin-balance description: Query portfolio margin balance hints: readOnly: true destructive: false idempotent: true call: portfolio-margin-account.getbalance with: asset: tools.asset recvWindow: tools.recvWindow timestamp: tools.timestamp signature: tools.signature outputParameters: - type: object mapping: $.