Block and transaction

Block information

Good to know: All the methods shown below are synced to an example Swagger file URL and are kept up to date automatically with changes to the API.

Get last block info

get
/block/
Responses
200

successful operation

*/*
Responsestring

Last block number

get
/block/
GET /block/ HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
200

successful operation

text

Get Block info and Transaction ID in block

get
/block/{block}
Path parameters
blockstringRequired

Block number or Block HASH

Responses
200

successful operation

*/*
get
/block/{block}
GET /block/{block} HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
{
  "sn": 1,
  "id": "text",
  "timestamp": 1,
  "transaction": [
    {
      "id": "text",
      "timestamp": 1
    }
  ]
}

Get Transaction info

get
/transaction/{transaction_id}
Path parameters
transaction_idstringRequired

Transaction ID

Responses
200

successful operation

*/*
get
/transaction/{transaction_id}
GET /transaction/{transaction_id} HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
{
  "address": "text",
  "db_id": "text",
  "db_sn": "text",
  "id": "text",
  "parameters": [
    "text"
  ],
  "timestamp": 1,
  "token": 1,
  "type": "Chaincode Install or Update",
  "validationCode": "text",
  "values": {
    "addinfo": "text",
    "balance": [
      {
        "token": "text",
        "balance": "text",
        "unlockdate": 1
      }
    ],
    "password": "text",
    "pending": [
      {}
    ],
    "regdate": 1
  }
}

Last updated