Binance · Capability

Binance Auto-Invest API — Auto-Invest

Binance Auto-Invest API — Auto-Invest. 6 operations. Lead operation: Query subscription transaction history. Self-contained Naftiko capability covering one Binance business surface.

Run with Naftiko BinanceAuto-Invest

What You Can Do

GET
Getsubscriptionhistory — Query subscription transaction history
/v1/sapi/v1/lending/auto-invest/history/list
POST
Createplan — Create auto-invest plan
/v1/sapi/v1/lending/auto-invest/plan/add
POST
Editplan — Edit auto-invest plan
/v1/sapi/v1/lending/auto-invest/plan/edit
GET
Listplans — List auto-invest plans
/v1/sapi/v1/lending/auto-invest/plan/list
GET
Getsourceassetlist — Get source asset list
/v1/sapi/v1/lending/auto-invest/source-asset/list
GET
Gettargetassetlist — Get target asset list
/v1/sapi/v1/lending/auto-invest/target-asset/list

MCP Tools

query-subscription-transaction-history

Query subscription transaction history

read-only idempotent
create-auto-invest-plan

Create auto-invest plan

edit-auto-invest-plan

Edit auto-invest plan

list-auto-invest-plans

List auto-invest plans

read-only idempotent
get-source-asset-list

Get source asset list

read-only idempotent
get-target-asset-list

Get target asset list

read-only idempotent

Capability Spec

auto-invest-auto-invest.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Binance Auto-Invest API — Auto-Invest
  description: 'Binance Auto-Invest API — Auto-Invest. 6 operations. Lead operation: Query subscription transaction history.
    Self-contained Naftiko capability covering one Binance business surface.'
  tags:
  - Binance
  - Auto-Invest
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    BINANCE_API_KEY: BINANCE_API_KEY
capability:
  consumes:
  - type: http
    namespace: auto-invest-auto-invest
    baseUri: https://api.binance.com
    description: Binance Auto-Invest API — Auto-Invest business capability. Self-contained, no shared references.
    resources:
    - name: sapi-v1-lending-auto-invest-history-list
      path: /sapi/v1/lending/auto-invest/history/list
      operations:
      - name: getsubscriptionhistory
        method: GET
        description: Query subscription transaction history
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: planId
          in: query
          type: integer
        - name: startTime
          in: query
          type: integer
        - name: endTime
          in: query
          type: integer
        - name: targetAsset
          in: query
          type: string
        - name: planType
          in: query
          type: string
        - name: size
          in: query
          type: integer
        - name: current
          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-lending-auto-invest-plan-add
      path: /sapi/v1/lending/auto-invest/plan/add
      operations:
      - name: createplan
        method: POST
        description: Create auto-invest plan
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: sourceType
          in: query
          type: string
          required: true
        - name: planType
          in: query
          type: string
          required: true
        - name: subscriptionAmount
          in: query
          type: string
          required: true
        - name: subscriptionCycle
          in: query
          type: string
          required: true
        - name: subscriptionStartTime
          in: query
          type: integer
        - name: sourceAsset
          in: query
          type: string
          required: true
        - name: flexibleAllowedToUse
          in: query
          type: boolean
        - name: details
          in: query
          type: string
          description: JSON array of target asset details.
        - 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-lending-auto-invest-plan-edit
      path: /sapi/v1/lending/auto-invest/plan/edit
      operations:
      - name: editplan
        method: POST
        description: Edit auto-invest plan
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: planId
          in: query
          type: integer
          required: true
        - name: subscriptionAmount
          in: query
          type: string
          required: true
        - name: subscriptionCycle
          in: query
          type: string
          required: true
        - name: sourceAsset
          in: query
          type: string
        - name: flexibleAllowedToUse
          in: query
          type: boolean
        - name: details
          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-lending-auto-invest-plan-list
      path: /sapi/v1/lending/auto-invest/plan/list
      operations:
      - name: listplans
        method: GET
        description: List auto-invest plans
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: planType
          in: query
          type: string
          required: true
        - 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-lending-auto-invest-source-asset-list
      path: /sapi/v1/lending/auto-invest/source-asset/list
      operations:
      - name: getsourceassetlist
        method: GET
        description: Get source asset list
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: usageType
          in: query
          type: string
          required: true
        - name: targetAsset
          in: query
          type: string
        - name: indexId
          in: query
          type: integer
        - name: flexibleAllowedToUse
          in: query
          type: boolean
        - 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-lending-auto-invest-target-asset-list
      path: /sapi/v1/lending/auto-invest/target-asset/list
      operations:
      - name: gettargetassetlist
        method: GET
        description: Get target asset list
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: targetAsset
          in: query
          type: string
        - name: size
          in: query
          type: integer
        - name: current
          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
    authentication:
      type: apikey
      key: X-MBX-APIKEY
      value: '{{env.BINANCE_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: auto-invest-auto-invest-rest
    port: 8080
    description: REST adapter for Binance Auto-Invest API — Auto-Invest. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/sapi/v1/lending/auto-invest/history/list
      name: sapi-v1-lending-auto-invest-history-list
      description: REST surface for sapi-v1-lending-auto-invest-history-list.
      operations:
      - method: GET
        name: getsubscriptionhistory
        description: Query subscription transaction history
        call: auto-invest-auto-invest.getsubscriptionhistory
        with:
          planId: rest.planId
          startTime: rest.startTime
          endTime: rest.endTime
          targetAsset: rest.targetAsset
          planType: rest.planType
          size: rest.size
          current: rest.current
          recvWindow: rest.recvWindow
          timestamp: rest.timestamp
          signature: rest.signature
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/sapi/v1/lending/auto-invest/plan/add
      name: sapi-v1-lending-auto-invest-plan-add
      description: REST surface for sapi-v1-lending-auto-invest-plan-add.
      operations:
      - method: POST
        name: createplan
        description: Create auto-invest plan
        call: auto-invest-auto-invest.createplan
        with:
          sourceType: rest.sourceType
          planType: rest.planType
          subscriptionAmount: rest.subscriptionAmount
          subscriptionCycle: rest.subscriptionCycle
          subscriptionStartTime: rest.subscriptionStartTime
          sourceAsset: rest.sourceAsset
          flexibleAllowedToUse: rest.flexibleAllowedToUse
          details: rest.details
          recvWindow: rest.recvWindow
          timestamp: rest.timestamp
          signature: rest.signature
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/sapi/v1/lending/auto-invest/plan/edit
      name: sapi-v1-lending-auto-invest-plan-edit
      description: REST surface for sapi-v1-lending-auto-invest-plan-edit.
      operations:
      - method: POST
        name: editplan
        description: Edit auto-invest plan
        call: auto-invest-auto-invest.editplan
        with:
          planId: rest.planId
          subscriptionAmount: rest.subscriptionAmount
          subscriptionCycle: rest.subscriptionCycle
          sourceAsset: rest.sourceAsset
          flexibleAllowedToUse: rest.flexibleAllowedToUse
          details: rest.details
          recvWindow: rest.recvWindow
          timestamp: rest.timestamp
          signature: rest.signature
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/sapi/v1/lending/auto-invest/plan/list
      name: sapi-v1-lending-auto-invest-plan-list
      description: REST surface for sapi-v1-lending-auto-invest-plan-list.
      operations:
      - method: GET
        name: listplans
        description: List auto-invest plans
        call: auto-invest-auto-invest.listplans
        with:
          planType: rest.planType
          recvWindow: rest.recvWindow
          timestamp: rest.timestamp
          signature: rest.signature
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/sapi/v1/lending/auto-invest/source-asset/list
      name: sapi-v1-lending-auto-invest-source-asset-list
      description: REST surface for sapi-v1-lending-auto-invest-source-asset-list.
      operations:
      - method: GET
        name: getsourceassetlist
        description: Get source asset list
        call: auto-invest-auto-invest.getsourceassetlist
        with:
          usageType: rest.usageType
          targetAsset: rest.targetAsset
          indexId: rest.indexId
          flexibleAllowedToUse: rest.flexibleAllowedToUse
          recvWindow: rest.recvWindow
          timestamp: rest.timestamp
          signature: rest.signature
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/sapi/v1/lending/auto-invest/target-asset/list
      name: sapi-v1-lending-auto-invest-target-asset-list
      description: REST surface for sapi-v1-lending-auto-invest-target-asset-list.
      operations:
      - method: GET
        name: gettargetassetlist
        description: Get target asset list
        call: auto-invest-auto-invest.gettargetassetlist
        with:
          targetAsset: rest.targetAsset
          size: rest.size
          current: rest.current
          recvWindow: rest.recvWindow
          timestamp: rest.timestamp
          signature: rest.signature
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: auto-invest-auto-invest-mcp
    port: 9090
    transport: http
    description: MCP adapter for Binance Auto-Invest API — Auto-Invest. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: query-subscription-transaction-history
      description: Query subscription transaction history
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: auto-invest-auto-invest.getsubscriptionhistory
      with:
        planId: tools.planId
        startTime: tools.startTime
        endTime: tools.endTime
        targetAsset: tools.targetAsset
        planType: tools.planType
        size: tools.size
        current: tools.current
        recvWindow: tools.recvWindow
        timestamp: tools.timestamp
        signature: tools.signature
      outputParameters:
      - type: object
        mapping: $.
    - name: create-auto-invest-plan
      description: Create auto-invest plan
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: auto-invest-auto-invest.createplan
      with:
        sourceType: tools.sourceType
        planType: tools.planType
        subscriptionAmount: tools.subscriptionAmount
        subscriptionCycle: tools.subscriptionCycle
        subscriptionStartTime: tools.subscriptionStartTime
        sourceAsset: tools.sourceAsset
        flexibleAllowedToUse: tools.flexibleAllowedToUse
        details: tools.details
        recvWindow: tools.recvWindow
        timestamp: tools.timestamp
        signature: tools.signature
      outputParameters:
      - type: object
        mapping: $.
    - name: edit-auto-invest-plan
      description: Edit auto-invest plan
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: auto-invest-auto-invest.editplan
      with:
        planId: tools.planId
        subscriptionAmount: tools.subscriptionAmount
        subscriptionCycle: tools.subscriptionCycle
        sourceAsset: tools.sourceAsset
        flexibleAllowedToUse: tools.flexibleAllowedToUse
        details: tools.details
        recvWindow: tools.recvWindow
        timestamp: tools.timestamp
        signature: tools.signature
      outputParameters:
      - type: object
        mapping: $.
    - name: list-auto-invest-plans
      description: List auto-invest plans
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: auto-invest-auto-invest.listplans
      with:
        planType: tools.planType
        recvWindow: tools.recvWindow
        timestamp: tools.timestamp
        signature: tools.signature
      outputParameters:
      - type: object
        mapping: $.
    - name: get-source-asset-list
      description: Get source asset list
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: auto-invest-auto-invest.getsourceassetlist
      with:
        usageType: tools.usageType
        targetAsset: tools.targetAsset
        indexId: tools.indexId
        flexibleAllowedToUse: tools.flexibleAllowedToUse
        recvWindow: tools.recvWindow
        timestamp: tools.timestamp
        signature: tools.signature
      outputParameters:
      - type: object
        mapping: $.
    - name: get-target-asset-list
      description: Get target asset list
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: auto-invest-auto-invest.gettargetassetlist
      with:
        targetAsset: tools.targetAsset
        size: tools.size
        current: tools.current
        recvWindow: tools.recvWindow
        timestamp: tools.timestamp
        signature: tools.signature
      outputParameters:
      - type: object
        mapping: $.