Nano Unit Conversion API

Conversion between Nano and raw unit denominations

OpenAPI Specification

nano-unit-conversion-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Nano RPC Accounts Unit Conversion API
  description: 'The Nano RPC API is a JSON-RPC HTTP interface for interacting with the Nano network. Nano is a feeless, instant digital currency using a block-lattice architecture where each account maintains its own blockchain. The RPC API supports account queries, block operations, wallet management, node diagnostics, and unit conversions. All requests are POST with a JSON body containing an "action" field identifying the RPC command.

    '
  version: 1.0.0
  contact:
    name: Nano Foundation
    url: https://nano.org/en/developers
    email: integrations@nano.org
  license:
    name: BSD-2-Clause
    url: https://opensource.org/licenses/BSD-2-Clause
  termsOfService: https://nano.org/terms-of-use
servers:
- url: http://localhost:7076
  description: Local Nano node (default RPC port)
tags:
- name: Unit Conversion
  description: Conversion between Nano and raw unit denominations
paths:
  /nano_to_raw:
    post:
      operationId: nano_to_raw
      summary: Convert Nano to raw units
      description: Converts an amount from Nano denomination to raw units (10^30 raw = 1 Nano).
      tags:
      - Unit Conversion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - action
              - amount
              properties:
                action:
                  type: string
                  enum:
                  - nano_to_raw
                amount:
                  type: string
            example:
              action: nano_to_raw
              amount: '1'
      responses:
        '200':
          description: Equivalent amount in raw units
          content:
            application/json:
              schema:
                type: object
                properties:
                  amount:
                    type: string
                    example: '1000000000000000000000000000000'
  /raw_to_nano:
    post:
      operationId: raw_to_nano
      summary: Convert raw units to Nano
      description: Converts an amount from raw units to Nano denomination.
      tags:
      - Unit Conversion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - action
              - amount
              properties:
                action:
                  type: string
                  enum:
                  - raw_to_nano
                amount:
                  type: string
                  description: Amount in raw units
            example:
              action: raw_to_nano
              amount: '1000000000000000000000000000000'
      responses:
        '200':
          description: Equivalent amount in Nano
          content:
            application/json:
              schema:
                type: object
                properties:
                  amount:
                    type: string
                    example: '1'
externalDocs:
  description: Nano RPC Protocol Documentation
  url: https://docs.nano.org/commands/rpc-protocol/