BVNK Fee API

Network fee estimation

OpenAPI Specification

bvnk-fee-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: Layer1 API making management of crypto assets simple and easy
  title: Digital Asset Fee API
  version: 1.0.0
servers:
- description: Staging
  url: https://api.staging.layer1.com
tags:
- description: Network fee estimation
  name: Fee
paths:
  /digital/v1/fee-estimate:
    post:
      description: Estimate fee to send blockchain transaction
      operationId: estimateTransactionFee
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EstimateTransactionFeeRequest'
        required: true
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Request invalid
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Service Unavailable
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Standard error response
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetValue'
          description: OK
      security:
      - oauth2:
        - fee-estimate:edit
      - httpSignature: []
      summary: Estimate transaction fee
      tags:
      - Fee
      x-content-type: application/json
      x-accepts:
      - application/json
components:
  schemas:
    Detail:
      example:
        documentLink: documentLink
        errors:
          key:
          - errors
          - errors
      properties:
        documentLink:
          type: string
        errors:
          additionalProperties:
            items:
              type: string
    Participant:
      example:
        amount: ''
        address: 103929005307927756724354605802047639613112342136
        tag: 123456789
        asset: ETH
      properties:
        address:
          description: blockchain address
          example: 103929005307927756724354605802047639613112342136
          type: string
        amount: {}
        asset:
          description: Optional currency if different than in parent object
          example: ETH
          type: string
        tag:
          description: destination tag that serves as optional payment identifier. Only applicable to select networks like Ripple, Solana etc.
          example: 123456789
          type: string
    AssetValue:
      example:
        amount: ''
        asset: BTC
      properties:
        amount: {}
        asset:
          description: currency
          example: BTC
          type: string
    EstimateTransactionFeeRequest:
      example:
        sources:
        - amount: ''
          address: 103929005307927756724354605802047639613112342136
          tag: 123456789
          asset: ETH
        - amount: ''
          address: 103929005307927756724354605802047639613112342136
          tag: 123456789
          asset: ETH
        destinations:
        - amount: ''
          address: 103929005307927756724354605802047639613112342136
          tag: 123456789
          asset: ETH
        - amount: ''
          address: 103929005307927756724354605802047639613112342136
          tag: 123456789
          asset: ETH
        asset: USDT
        network: ETHEREUM
      properties:
        asset:
          description: currency
          example: USDT
          type: string
        network:
          description: crypto network
          example: ETHEREUM
          type: string
        sources:
          description: (Optional) list of addresses and amounts that fund the transaction
          items:
            $ref: '#/components/schemas/Participant'
          type: array
        destinations:
          description: (Optional) list of recipient addresses and amounts that benefit from the transaction
          items:
            $ref: '#/components/schemas/Participant'
          type: array
    ApiError:
      example:
        code: code
        details:
          documentLink: documentLink
          errors:
            key:
            - errors
            - errors
        message: message
        status: status
      properties:
        code:
          type: string
        status:
          type: string
        message:
          type: string
        details:
          $ref: '#/components/schemas/Detail'
  securitySchemes:
    openId:
      openIdConnectUrl: https://auth.sandbox.layer1.com/auth/realms/bvnk/.well-known/openid-configuration
      type: openIdConnect
    httpSignature:
      scheme: signature
      type: http
    oauth2:
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: https://auth.sandbox.layer1.com/auth/realms/bvnk/protocol/openid-connect/token
      type: oauth2