Network

Get List of Available Networks

post

This endpoint returns a list of NetworkIdentifiers that the Ada-Index server supports.

Authorizations
Body

A MetadataRequest is utilized in any request where the only argument is optional metadata.

metadataobjectOptional
Responses
200
Expected response to a valid request
application/json
post
POST /network/list HTTP/1.1
Host: ada-index.nownodes.io
api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "metadata": {}
}
{
  "network_identifiers": [
    {
      "blockchain": "cardano",
      "network": "mainnet",
      "sub_network_identifier": {
        "network": "shard 1",
        "metadata": {
          "producer": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5"
        }
      }
    }
  ]
}

Get Network Status

post

This endpoint returns the current status of the network requested. Any NetworkIdentifier returned by /network/list should be accessible here.

Authorizations
Body

A NetworkRequest is utilized to retrieve some data specific exclusively to a NetworkIdentifier.

metadataobjectOptional
Responses
200
Expected response to a valid request
application/json
post
POST /network/status HTTP/1.1
Host: ada-index.nownodes.io
api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 197

{
  "network_identifier": {
    "blockchain": "cardano",
    "network": "mainnet",
    "sub_network_identifier": {
      "network": "shard 1",
      "metadata": {
        "producer": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5"
      }
    }
  },
  "metadata": {}
}
{
  "current_block_identifier": {
    "index": 1123941,
    "hash": "0x1f2cc6c5027d2f201a5453ad1119574d2aed23a392654742ac3c78783c071f85"
  },
  "current_block_timestamp": 1582833600000,
  "genesis_block_identifier": {
    "index": 1123941,
    "hash": "0x1f2cc6c5027d2f201a5453ad1119574d2aed23a392654742ac3c78783c071f85"
  },
  "oldest_block_identifier": {
    "index": 1123941,
    "hash": "0x1f2cc6c5027d2f201a5453ad1119574d2aed23a392654742ac3c78783c071f85"
  },
  "sync_status": {
    "current_index": 100,
    "target_index": 150,
    "stage": "header sync",
    "synced": true
  },
  "peers": [
    {
      "peer_id": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5",
      "metadata": {}
    }
  ]
}

Get Network Options

post

This endpoint returns the version information and allowed network-specific types for a NetworkIdentifier. Any NetworkIdentifier returned by /network/list should be accessible here. Because options are retrievable in the context of a NetworkIdentifier, it is possible to define unique options for each network.

Authorizations
Body

A NetworkRequest is utilized to retrieve some data specific exclusively to a NetworkIdentifier.

metadataobjectOptional
Responses
200
Expected response to a valid request
application/json
post
POST /network/options HTTP/1.1
Host: ada-index.nownodes.io
api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 197

{
  "network_identifier": {
    "blockchain": "cardano",
    "network": "mainnet",
    "sub_network_identifier": {
      "network": "shard 1",
      "metadata": {
        "producer": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5"
      }
    }
  },
  "metadata": {}
}
{
  "version": {
    "Ada-Index_version": "1.2.5",
    "node_version": "1.0.2",
    "middleware_version": "0.2.7",
    "metadata": {}
  },
  "allow": {
    "operation_statuses": [
      {
        "status": "SUCCESS",
        "successful": true
      }
    ],
    "operation_types": [
      "TRANSFER"
    ],
    "errors": [
      {
        "code": 12,
        "message": "Invalid account format",
        "description": "This error is returned when the requested AccountIdentifier is improperly formatted.",
        "retriable": true,
        "details": {
          "address": "0x1dcc4de8dec75d7aab85b567b6",
          "error": "not base64"
        }
      }
    ],
    "historical_balance_lookup": true,
    "timestamp_start_index": 1,
    "call_methods": [
      "eth_call"
    ],
    "balance_exemptions": [
      {
        "sub_account_address": "staking",
        "currency": {
          "symbol": "BTC",
          "decimals": 8,
          "metadata": null
        },
        "exemption_type": "greater_or_equal"
      }
    ],
    "mempool_coins": true
  }
}