Binance · Capability

Binance USD-S Margined Futures API — Account

Binance USD-S Margined Futures API — Account. 6 operations. Lead operation: Get income history. Self-contained Naftiko capability covering one Binance business surface.

Run with Naftiko BinanceAccount

What You Can Do

GET
Getincomehistory — Get income history
/v1/fapi/v1/income
POST
Changeleverage — Change initial leverage
/v1/fapi/v1/leverage
POST
Changemargintype — Change margin type
/v1/fapi/v1/margintype
GET
Getaccountinfo — Account information
/v1/fapi/v2/account
GET
Getbalance — Futures account balance
/v1/fapi/v2/balance
GET
Getpositionrisk — Position information
/v1/fapi/v2/positionrisk

MCP Tools

get-income-history

Get income history

read-only idempotent
change-initial-leverage

Change initial leverage

change-margin-type

Change margin type

account-information

Account information

read-only idempotent
futures-account-balance

Futures account balance

read-only idempotent
position-information

Position information

read-only idempotent

Capability Spec

usds-margined-futures-account.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Binance USD-S Margined Futures API — Account
  description: 'Binance USD-S Margined Futures API — Account. 6 operations. Lead operation: Get income history. 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: usds-margined-futures-account
    baseUri: https://fapi.binance.com
    description: Binance USD-S Margined Futures API — Account business capability. Self-contained, no shared references.
    resources:
    - name: fapi-v1-income
      path: /fapi/v1/income
      operations:
      - name: getincomehistory
        method: GET
        description: Get income history
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: incomeType
          in: query
          type: string
          description: Income type filter.
        - name: startTime
          in: query
          type: integer
          description: Start time in milliseconds.
        - name: endTime
          in: query
          type: integer
          description: End time in milliseconds.
        - name: limit
          in: query
          type: integer
          description: Number of results. Default 100, max 1000.
    - name: fapi-v1-leverage
      path: /fapi/v1/leverage
      operations:
      - name: changeleverage
        method: POST
        description: Change initial leverage
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: leverage
          in: query
          type: integer
          description: Target initial leverage. 1 to 125.
          required: true
    - name: fapi-v1-marginType
      path: /fapi/v1/marginType
      operations:
      - name: changemargintype
        method: POST
        description: Change margin type
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: marginType
          in: query
          type: string
          description: Margin type.
          required: true
    - name: fapi-v2-account
      path: /fapi/v2/account
      operations:
      - name: getaccountinfo
        method: GET
        description: Account information
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: fapi-v2-balance
      path: /fapi/v2/balance
      operations:
      - name: getbalance
        method: GET
        description: Futures account balance
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: fapi-v2-positionRisk
      path: /fapi/v2/positionRisk
      operations:
      - name: getpositionrisk
        method: GET
        description: Position information
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: apikey
      key: X-MBX-APIKEY
      value: '{{env.BINANCE_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: usds-margined-futures-account-rest
    port: 8080
    description: REST adapter for Binance USD-S Margined Futures API — Account. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/fapi/v1/income
      name: fapi-v1-income
      description: REST surface for fapi-v1-income.
      operations:
      - method: GET
        name: getincomehistory
        description: Get income history
        call: usds-margined-futures-account.getincomehistory
        with:
          incomeType: rest.incomeType
          startTime: rest.startTime
          endTime: rest.endTime
          limit: rest.limit
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/fapi/v1/leverage
      name: fapi-v1-leverage
      description: REST surface for fapi-v1-leverage.
      operations:
      - method: POST
        name: changeleverage
        description: Change initial leverage
        call: usds-margined-futures-account.changeleverage
        with:
          leverage: rest.leverage
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/fapi/v1/margintype
      name: fapi-v1-margintype
      description: REST surface for fapi-v1-marginType.
      operations:
      - method: POST
        name: changemargintype
        description: Change margin type
        call: usds-margined-futures-account.changemargintype
        with:
          marginType: rest.marginType
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/fapi/v2/account
      name: fapi-v2-account
      description: REST surface for fapi-v2-account.
      operations:
      - method: GET
        name: getaccountinfo
        description: Account information
        call: usds-margined-futures-account.getaccountinfo
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/fapi/v2/balance
      name: fapi-v2-balance
      description: REST surface for fapi-v2-balance.
      operations:
      - method: GET
        name: getbalance
        description: Futures account balance
        call: usds-margined-futures-account.getbalance
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/fapi/v2/positionrisk
      name: fapi-v2-positionrisk
      description: REST surface for fapi-v2-positionRisk.
      operations:
      - method: GET
        name: getpositionrisk
        description: Position information
        call: usds-margined-futures-account.getpositionrisk
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: usds-margined-futures-account-mcp
    port: 9090
    transport: http
    description: MCP adapter for Binance USD-S Margined Futures API — Account. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: get-income-history
      description: Get income history
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: usds-margined-futures-account.getincomehistory
      with:
        incomeType: tools.incomeType
        startTime: tools.startTime
        endTime: tools.endTime
        limit: tools.limit
      outputParameters:
      - type: object
        mapping: $.
    - name: change-initial-leverage
      description: Change initial leverage
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: usds-margined-futures-account.changeleverage
      with:
        leverage: tools.leverage
      outputParameters:
      - type: object
        mapping: $.
    - name: change-margin-type
      description: Change margin type
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: usds-margined-futures-account.changemargintype
      with:
        marginType: tools.marginType
      outputParameters:
      - type: object
        mapping: $.
    - name: account-information
      description: Account information
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: usds-margined-futures-account.getaccountinfo
      outputParameters:
      - type: object
        mapping: $.
    - name: futures-account-balance
      description: Futures account balance
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: usds-margined-futures-account.getbalance
      outputParameters:
      - type: object
        mapping: $.
    - name: position-information
      description: Position information
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: usds-margined-futures-account.getpositionrisk
      outputParameters:
      - type: object
        mapping: $.