Binance · Capability

Binance Gift Card API — Gift Card

Binance Gift Card API — Gift Card. 4 operations. Lead operation: Buy a gift card with another token. Self-contained Naftiko capability covering one Binance business surface.

Run with Naftiko BinanceGift Card

What You Can Do

POST
Buygiftcard — Buy a gift card with another token
/v1/sapi/v1/giftcard/buycode
POST
Creategiftcard — Create a gift card
/v1/sapi/v1/giftcard/createcode
POST
Redeemgiftcard — Redeem a gift card
/v1/sapi/v1/giftcard/redeemcode
GET
Verifygiftcard — Verify gift card
/v1/sapi/v1/giftcard/verify

MCP Tools

buy-gift-card-another-token

Buy a gift card with another token

create-gift-card

Create a gift card

redeem-gift-card

Redeem a gift card

verify-gift-card

Verify gift card

read-only idempotent

Capability Spec

gift-card-gift-card.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Binance Gift Card API — Gift Card
  description: 'Binance Gift Card API — Gift Card. 4 operations. Lead operation: Buy a gift card with another token. Self-contained
    Naftiko capability covering one Binance business surface.'
  tags:
  - Binance
  - Gift Card
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    BINANCE_API_KEY: BINANCE_API_KEY
capability:
  consumes:
  - type: http
    namespace: gift-card-gift-card
    baseUri: https://api.binance.com
    description: Binance Gift Card API — Gift Card business capability. Self-contained, no shared references.
    resources:
    - name: sapi-v1-giftcard-buyCode
      path: /sapi/v1/giftcard/buyCode
      operations:
      - name: buygiftcard
        method: POST
        description: Buy a gift card with another token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: baseToken
          in: query
          type: string
          description: Token to pay with.
          required: true
        - name: faceToken
          in: query
          type: string
          description: Token the gift card is denominated in.
          required: true
        - name: baseTokenAmount
          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-giftcard-createCode
      path: /sapi/v1/giftcard/createCode
      operations:
      - name: creategiftcard
        method: POST
        description: Create a gift card
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: token
          in: query
          type: string
          description: Token type for the gift card, e.g. BNB, USDT.
          required: true
        - name: amount
          in: query
          type: string
          description: Gift card amount.
          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-giftcard-redeemCode
      path: /sapi/v1/giftcard/redeemCode
      operations:
      - name: redeemgiftcard
        method: POST
        description: Redeem a gift card
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: code
          in: query
          type: string
          description: Gift card redemption code.
          required: true
        - name: externalUid
          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-giftcard-verify
      path: /sapi/v1/giftcard/verify
      operations:
      - name: verifygiftcard
        method: GET
        description: Verify gift card
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: referenceNo
          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
    authentication:
      type: apikey
      key: X-MBX-APIKEY
      value: '{{env.BINANCE_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: gift-card-gift-card-rest
    port: 8080
    description: REST adapter for Binance Gift Card API — Gift Card. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/sapi/v1/giftcard/buycode
      name: sapi-v1-giftcard-buycode
      description: REST surface for sapi-v1-giftcard-buyCode.
      operations:
      - method: POST
        name: buygiftcard
        description: Buy a gift card with another token
        call: gift-card-gift-card.buygiftcard
        with:
          baseToken: rest.baseToken
          faceToken: rest.faceToken
          baseTokenAmount: rest.baseTokenAmount
          recvWindow: rest.recvWindow
          timestamp: rest.timestamp
          signature: rest.signature
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/sapi/v1/giftcard/createcode
      name: sapi-v1-giftcard-createcode
      description: REST surface for sapi-v1-giftcard-createCode.
      operations:
      - method: POST
        name: creategiftcard
        description: Create a gift card
        call: gift-card-gift-card.creategiftcard
        with:
          token: rest.token
          amount: rest.amount
          recvWindow: rest.recvWindow
          timestamp: rest.timestamp
          signature: rest.signature
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/sapi/v1/giftcard/redeemcode
      name: sapi-v1-giftcard-redeemcode
      description: REST surface for sapi-v1-giftcard-redeemCode.
      operations:
      - method: POST
        name: redeemgiftcard
        description: Redeem a gift card
        call: gift-card-gift-card.redeemgiftcard
        with:
          code: rest.code
          externalUid: rest.externalUid
          recvWindow: rest.recvWindow
          timestamp: rest.timestamp
          signature: rest.signature
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/sapi/v1/giftcard/verify
      name: sapi-v1-giftcard-verify
      description: REST surface for sapi-v1-giftcard-verify.
      operations:
      - method: GET
        name: verifygiftcard
        description: Verify gift card
        call: gift-card-gift-card.verifygiftcard
        with:
          referenceNo: rest.referenceNo
          recvWindow: rest.recvWindow
          timestamp: rest.timestamp
          signature: rest.signature
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: gift-card-gift-card-mcp
    port: 9090
    transport: http
    description: MCP adapter for Binance Gift Card API — Gift Card. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: buy-gift-card-another-token
      description: Buy a gift card with another token
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gift-card-gift-card.buygiftcard
      with:
        baseToken: tools.baseToken
        faceToken: tools.faceToken
        baseTokenAmount: tools.baseTokenAmount
        recvWindow: tools.recvWindow
        timestamp: tools.timestamp
        signature: tools.signature
      outputParameters:
      - type: object
        mapping: $.
    - name: create-gift-card
      description: Create a gift card
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gift-card-gift-card.creategiftcard
      with:
        token: tools.token
        amount: tools.amount
        recvWindow: tools.recvWindow
        timestamp: tools.timestamp
        signature: tools.signature
      outputParameters:
      - type: object
        mapping: $.
    - name: redeem-gift-card
      description: Redeem a gift card
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gift-card-gift-card.redeemgiftcard
      with:
        code: tools.code
        externalUid: tools.externalUid
        recvWindow: tools.recvWindow
        timestamp: tools.timestamp
        signature: tools.signature
      outputParameters:
      - type: object
        mapping: $.
    - name: verify-gift-card
      description: Verify gift card
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gift-card-gift-card.verifygiftcard
      with:
        referenceNo: tools.referenceNo
        recvWindow: tools.recvWindow
        timestamp: tools.timestamp
        signature: tools.signature
      outputParameters:
      - type: object
        mapping: $.