Back to top

Sebak Client API

SEBAK, the next BOScoin network with ISAAC consensus protocol.

Paging

Pages represent a subset of a larger collection of objects. The SEBAK HTTP API utilizes cursoring to paginate large result sets. Cursoring separates results into pages

Cursor

A cursor is a point to a specific location in resources.

Embedded Resources

A page containts an embedded set of records, regardless of the contained resource.

Links

Example Relation
Self /transactions
Prev /transactions?cursor={cursor}&reverse=true&limit=10 The previous page of results
Next /transactions?cursor={cursor}&reverse=false&limit=10 The next page of results

Accounts

Account API

Account Details

In the BOScoin network, users interact by using accounts

Retrieve an account
GET/api/v1/accounts/{address}

Retrieve an account by the address

Example URI

GET https://mainnet.blockchainos.org/api/v1/accounts/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI
URI Parameters
HideShow
address
string (required) Example: GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI

a public address

Response  200
HideShow
Headers
Content-Type: application/hal+json; charset=utf-8
Body
{
  "_links": {
    "operations": {
      "href": "/api/v1/accounts/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI/operations{?cursor,limit,order}",
      "templated": true
    },
    "self": {
      "href": "/api/v1/accounts/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI"
    },
    "transactions": {
      "href": "/api/v1/accounts/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI/transactions{?cursor,limit,order}",
      "templated": true
    }
  },
  "address": "GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI",
  "balance": "500000000000",
  "linked": "\"\"",
  "sequence_id": 0
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "_links": {
      "type": "object",
      "properties": {
        "operations": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            },
            "templated": {
              "type": "boolean"
            }
          }
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        },
        "transactions": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            },
            "templated": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "address": {
      "type": "string",
      "description": "The account’s public key encoded into a base32 string representation."
    },
    "balance": {
      "type": "string",
      "description": "GON. 1 BOS = 10,000,000 GON"
    },
    "linked": {
      "type": "string",
      "description": "linked with freezing account."
    },
    "sequence_id": {
      "type": "number",
      "description": "The Current sequence number. It needed to submitting a transaction from this account"
    }
  },
  "required": [
    "address"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
  "status": 400,
  "title": "does not exists",
  "type": "https://boscoin.io/sebak/error/128"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
  "status": 500,
  "title": "problem error message",
  "type": "https://boscoin.io/sebak/error/{error_code}"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  }
}

Transactions for Account

List All Transactions for Account
GET/api/v1/accounts/{address}/transactions?limit={limit}&reverse={reverse}&cursor={cursor}

Retrieve all valid transactions that affected by the account

Streaming mode supported with header "Accept": "text/event-stream"

Example URI

GET https://mainnet.blockchainos.org/api/v1/accounts/GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ/transactions?limit=100&reverse=false&cursor=``
URI Parameters
HideShow
address
string (required) Example: GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ

a public address

limit
integer (optional) Example: 100
reverse
string (optional) Example: false
cursor
string (optional) Example: ``
Response  200
HideShow
Headers
Content-Type: application/hal+json; charset=utf-8
Body
{
  "_embedded": {
    "records": [
      {
        "_links": {
          "account": {
            "href": "/api/v1/accounts/GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ"
          },
          "operations": {
            "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs/operations{?cursor,limit,order}",
            "templated": "true"
          },
          "self": {
            "href": "/api/v1/transactions"
          }
        }
      },
      "block: `241`",
      "created: `2018-11-02T14:09:33.019606000+09:00`",
      "fee: 10000",
      "hash: `7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs`",
      "operation_count: 1",
      "sequence_id: 0",
      "source: `GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ`"
    ]
  },
  "_links": {
    "next": {
      "href": "/api/v1/account/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI/transactions?limit=100&reverse=false"
    },
    "prev": {
      "href": "/api/v1/account/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI/transactions?limit=100&reverse=true"
    },
    "self": {
      "href": "/api/v1/account/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI/transactions"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "_embedded": {
      "type": "object",
      "properties": {
        "records": {
          "type": "array"
        }
      }
    },
    "_links": {
      "type": "object",
      "properties": {
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
  "status": 500,
  "title": "problem error message",
  "type": "https://boscoin.io/sebak/error/{error_code}"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  }
}

Operations for Account

Retrieve all operations that were included in valid transactions that affected by the account

Streaming mode supported with header "Accept": "text/event-stream"

List All Operations for Account
GET/api/v1/accounts/{address}/operations?limit={limit}&reverse={reverse}&cursor={cursor}

Example URI

GET https://mainnet.blockchainos.org/api/v1/accounts/GDVSXU343JMRBXGW3F5WLRMH6L6HFZ6IYMVMFSDUDJPNTXUGNOXC2R5Y/operations?limit=100&reverse=false&cursor=``
URI Parameters
HideShow
address
string (required) Example: GDVSXU343JMRBXGW3F5WLRMH6L6HFZ6IYMVMFSDUDJPNTXUGNOXC2R5Y

a public address

limit
integer (optional) Example: 100
reverse
string (optional) Example: false
cursor
string (optional) Example: ``
Response  200
HideShow
Headers
Content-Type: application/hal+json; charset=utf-8
Body
{
  "_embedded": {
    "records": [
      {
        "_links": {
          "self": {
            "href": "/api/v1/operations/F6SEv2QhgwZwxUARbRacxyZaufzcTxdYDXJBpvf7pNAj-7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs"
          },
          "transaction": {
            "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs"
          }
        }
      },
      "block_height: 241",
      {
        "target": "GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI",
        "amount": "1000000000000"
      },
      "confirmed: `2018-11-27T07:49:05.971799020Z`",
      "hash: F6SEv2QhgwZwxUARbRacxyZaufzcTxdYDXJBpvf7pNAj",
      "proposed_time: `2018-11-27T07:49:05.942922134Z`",
      "source: GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ",
      "tx_hash: 7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs",
      "type: create"
    ],
    "_links": {
      "next": {
        "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs/operations?limit=100&reverse=false"
      },
      "prev": {
        "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs/operations?limit=100&reverse=true"
      },
      "self": {
        "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs/operations"
      }
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "_embedded": {
      "type": "object",
      "properties": {
        "records": {
          "type": "array"
        },
        "_links": {
          "type": "object",
          "properties": {
            "next": {
              "type": "object",
              "properties": {
                "href": {
                  "type": "string"
                }
              }
            },
            "prev": {
              "type": "object",
              "properties": {
                "href": {
                  "type": "string"
                }
              }
            },
            "self": {
              "type": "object",
              "properties": {
                "href": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
  "status": 500,
  "title": "problem error message",
  "type": "https://boscoin.io/sebak/error/{error_code}"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  }
}

Trasactions

Transactions API

Transactions

Payment transaction
POST/api/v1/transactions

  • You can refer this link to make transaction through sebakpy-util.

  • Data Body consist of 3 parts, ; T, H, B

    • T : ‘transaction’

    • H : H means Header. it consists of version, hash, signature & created.

      • Version means to transaction version. At the moment 1.

      • Hash means transaction hash.

      • signature is signed data from client.

        • How can you make signature?

        Please check this link first.

        You need 3 variables to make signature; RLPdata which is hashing, network id and source’s secret seed.

        You can see that Which kinds of variables necessary.

        You can use [JavaScript SDK] to make signature or [Python SDK]. Please check above SDKs.

      • created means to transcation created time.

    • B : B means Body. It is RLP data. so you have to encode B data to RLP format. It contains; source , fee, sequence id, and operations.

      • source; means that public address which will BOScoin withdraw .

      • fee : data type is String.

      • sequence id

        • How can you get sequence id?

        When you finished account creation, you can access http(or https)😕/{IP that you set up sebak node}/api/v1/accounts/{Public address that account you created}.

        Then you can see sequence_id in response.

      • operations: It is json array consist of H & B. H include type, which means operation type. B include target & amount.

      • H : type ( type should be set ‘payment’ )

      • B : target ( Public address you want to send.) , amount ( amount data type is String .)

Example URI

POST https://mainnet.blockchainos.org/api/v1/transactions
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "T": "transaction",
  "H": {
    "version": "1",
    "created": "2018-01-01T00:00:00.000000000Z",
    "signature": "4ty1Pv7Phc3CEeGLCP8mjZfEC259VR1MBgyVHzQXTcWjuSiwxVQ2AQKxy2HjGTCDrmdE29z8ZNZ6GxuDyEay2p9M"
  },
  "B": {
    "source": "GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ",
    "fee": "10000",
    "sequence_id": "0",
    "operations": [
      {
        "H": {
          "type": "payment"
        },
        "B": {
          "target": "GDTEPFWEITKFHSUO44NQABY2XHRBBH2UBVGJ2ZJPDREIOL2F6RAEBJE4",
          "amount": "1000000000000"
        }
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "T": {
      "type": "string"
    },
    "H": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string",
          "description": "Transaction version"
        },
        "created": {
          "type": "string",
          "description": "Created time of the transaction."
        },
        "signature": {
          "type": "string",
          "description": "Signature signed by source account"
        }
      }
    },
    "B": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "Source account"
        },
        "fee": {
          "type": "string",
          "description": "The fee paid by the source account for this transaction. Minimum is 10000 GON"
        },
        "sequence_id": {
          "type": "string",
          "description": "The last sequence number of the source account"
        },
        "operations": {
          "type": "array"
        }
      }
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "_links": {
    "history": {
      "href": "/api/v1/transactions/7mRUj4cnUPaTrpByojPsT3xoRRdwG6Q9z2eLyCMapQm6/history"
    },
    "self": {
      "href": "/api/v1/transactions"
    }
  },
  "hash": "7mRUj4cnUPaTrpByojPsT3xoRRdwG6Q9z2eLyCMapQm6",
  "message": {
    "source": "GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ",
    "fee": "10000",
    "sequence_id": "0",
    "operations": [
      {
        "H": {
          "type": "create"
        },
        "B": {
          "target": "GDTEPFWEITKFHSUO44NQABY2XHRBBH2UBVGJ2ZJPDREIOL2F6RAEBJE4",
          "amount": "1000000000000"
        }
      }
    ]
  },
  "status": "submitted"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "_links": {
      "type": "object",
      "properties": {
        "history": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        }
      }
    },
    "hash": {
      "type": "string",
      "description": "Hash of transaction."
    },
    "message": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "Source account"
        },
        "fee": {
          "type": "string",
          "description": "The fee paid by the source account for this transaction. Minimum is 10000 GON"
        },
        "sequence_id": {
          "type": "string",
          "description": "The last sequence number of the source account"
        },
        "operations": {
          "type": "array"
        }
      }
    },
    "status": {
      "type": "string",
      "description": "three categories of status; submitted, confirmed, rejected"
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
  "status": 500,
  "title": "problem error message",
  "type": "https://boscoin.io/sebak/error/{error_code}"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  }
}

Transactions

Retrieve transactions
GET/api/v1/transactions?limit={limit}&reverse={reverse}&cursor={cursor}

Retrieve all valid transactions

Streaming mode supported with header "Accept": "text/event-stream"

Example URI

GET https://mainnet.blockchainos.org/api/v1/transactions?limit=100&reverse=false&cursor=``
URI Parameters
HideShow
limit
integer (optional) Example: 100
reverse
string (optional) Example: false
cursor
string (optional) Example: ``
Response  200
HideShow
Headers
Content-Type: application/hal+json; charset=utf-8
Body
{
  "_embedded": {
    "records": [
      {
        "_links": {
          "account": {
            "href": "/api/v1/accounts/GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ"
          },
          "operations": {
            "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs/operations{?cursor,limit,order}",
            "templated": "true"
          },
          "self": {
            "href": "/api/v1/transactions"
          }
        }
      },
      "block: `241`",
      "created: `2018-11-02T14:09:33.019606000+09:00`",
      "fee: 10000",
      "hash: `7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs`",
      "operation_count: 1",
      "sequence_id: 0",
      "source: `GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ`"
    ]
  },
  "_links": {
    "next": {
      "href": "/api/v1/account/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI/transactions?limit=100&reverse=false"
    },
    "prev": {
      "href": "/api/v1/account/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI/transactions?limit=100&reverse=true"
    },
    "self": {
      "href": "/api/v1/account/GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI/transactions"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "_embedded": {
      "type": "object",
      "properties": {
        "records": {
          "type": "array"
        }
      }
    },
    "_links": {
      "type": "object",
      "properties": {
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
  "status": 500,
  "title": "problem error message",
  "type": "https://boscoin.io/sebak/error/{error_code}"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  }
}

Transaction

Get Transaction
GET/api/v1/transactions/{hash}

Retrieve a transaction by transaction hash

Streaming mode supported with header "Accept": "text/event-stream"

Example URI

GET https://mainnet.blockchainos.org/api/v1/transactions/ghf6msRhE4jRf5DPib9UHD1msadvmZs9o53V9FQTb11
URI Parameters
HideShow
hash
string (required) Example: ghf6msRhE4jRf5DPib9UHD1msadvmZs9o53V9FQTb11

tx’s hash

Response  200
HideShow
Headers
Content-Type: application/hal+json; charset=utf-8
Body
{
  "_links": {
    "account": {
      "href": "/api/v1/accounts/GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ"
    },
    "operations": {
      "href": "/api/v1/transactions/ghf6msRhE4jRf5DPib9UHD1msadvmZs9o53V9FQTb11/operations{?cursor,limit,order}",
      "templated": "true"
    },
    "self": {
      "href": "/api/v1/transactions/"
    }
  },
  "block": "241",
  "created": "2018-09-12T09:08:35.157472400Z",
  "fee": "10000",
  "hash": "ghf6msRhE4jRf5DPib9UHD1msadvmZs9o53V9FQTb11",
  "operation_count": 1,
  "sequence_id": 0,
  "source": "GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "_links": {
      "type": "object",
      "properties": {
        "account": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        },
        "operations": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            },
            "templated": {
              "type": "string"
            }
          }
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        }
      }
    },
    "block": {
      "type": "string"
    },
    "created": {
      "type": "string",
      "description": "Created time of the transaction. It is set by wallet"
    },
    "fee": {
      "type": "string",
      "description": "The fee paid by the source account"
    },
    "hash": {
      "type": "string",
      "description": "Hash of transaction. //TODO: link for the details"
    },
    "operation_count": {
      "type": "number",
      "description": "The number of operations in this transaction."
    },
    "sequence_id": {
      "type": "number",
      "description": "the Sequence number of the source account."
    },
    "source": {
      "type": "string"
    }
  },
  "required": [
    "hash"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
  "status": 500,
  "title": "problem error message",
  "type": "https://boscoin.io/sebak/error/{error_code}"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  }
}

Operations for Trasaction

Get operations of transaction
GET/api/v1/transactions/{hash}/operations?limit={limit}&reverse={reverse}&cursor={cursor}

Example URI

GET https://mainnet.blockchainos.org/api/v1/transactions/ghf6msRhE4jRf5DPib9UHD1msadvmZs9o53V9FQTb11/operations?limit=100&reverse=false&cursor=``
URI Parameters
HideShow
hash
string (required) Example: ghf6msRhE4jRf5DPib9UHD1msadvmZs9o53V9FQTb11

Transaction hash

limit
integer (optional) Example: 100
reverse
string (optional) Example: false
cursor
string (optional) Example: ``
Response  200
HideShow
Headers
Content-Type: application/hal+json; charset=utf-8
Body
{
  "_embedded": {
    "records": [
      {
        "_links": {
          "self": {
            "href": "/api/v1/operations/F6SEv2QhgwZwxUARbRacxyZaufzcTxdYDXJBpvf7pNAj-7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs"
          },
          "transaction": {
            "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs"
          }
        }
      },
      "block_height: 241",
      {
        "target": "GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI",
        "amount": "1000000000000"
      },
      "confirmed: `2018-11-27T07:49:05.971799020Z`",
      "hash: F6SEv2QhgwZwxUARbRacxyZaufzcTxdYDXJBpvf7pNAj",
      "proposed_time: `2018-11-27T07:49:05.942922134Z`",
      "source: GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ",
      "tx_hash: 7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs",
      "type: create"
    ],
    "_links": {
      "next": {
        "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs/operations?limit=100&reverse=false"
      },
      "prev": {
        "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs/operations?limit=100&reverse=true"
      },
      "self": {
        "href": "/api/v1/transactions/7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs/operations"
      }
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "_embedded": {
      "type": "object",
      "properties": {
        "records": {
          "type": "array"
        },
        "_links": {
          "type": "object",
          "properties": {
            "next": {
              "type": "object",
              "properties": {
                "href": {
                  "type": "string"
                }
              }
            },
            "prev": {
              "type": "object",
              "properties": {
                "href": {
                  "type": "string"
                }
              }
            },
            "self": {
              "type": "object",
              "properties": {
                "href": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
  "status": 500,
  "title": "problem error message",
  "type": "https://boscoin.io/sebak/error/{error_code}"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  }
}

Blocks

Blocks API

Blocks

Retrieve blocks
GET/api/v1/blocks?cursor={cursor}&limit={limit}&reverse={reverse}

Retrieve all valid blocks

Streaming mode supported with header "Accept": "text/event-stream"

Example URI

GET https://mainnet.blockchainos.org/api/v1/blocks?cursor=1207&limit=100&reverse=false
URI Parameters
HideShow
cursor
string (optional) Example: 1207

a block height as cursor

reverse
string (optional) Example: false
limit
integer (optional) Example: 100
Response  200
HideShow
Headers
Content-Type: application/hal+json; charset=utf-8
Body
{
  "_embedded": {
    "records": [
      {
        "_links": {
          "self": {
            "href": "/api/v1/blocks/AcFpZMr6EhxBuCw3xADUzepa395wmh3c5fo2cyxYCi1q"
          }
        }
      },
      "confirmed: 2018",
      "hash: `AcFpZMr6EhxBuCw3xADUzepa395wmh3c5fo2cyxYCi1q`",
      "height: 1",
      "prev_block_hash: `J8TQCCtsiLcRZpYtVN3ozCFByd24fjXe2BgodLkeXN7S`",
      "proposed_time: `2018-04-17T5:07:31.000000000Z`",
      "proposer: `GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ`",
      "proposer_transaction: `EQNSFnhzzz3bDpaZQekWPPNtr3kmRs5fUafBYAkHGXRP`",
      "round: 0",
      [
        "transactions",
        "BivUS2tYjm1ZYXZNvKqRDa1eyBRTcE3DeuEDJVtuwNcm"
      ],
      "transactions_root: `BR2gsNw5WGjZ6HFPNr8fFAQPu42dqk1P7VVV7p5Efnru`",
      "version: 0"
    ]
  },
  "_links": {
    "next": {
      "href": "/api/v1/blocks?cursor=1&limit=100&reverse=false"
    },
    "prev": {
      "href": "/api/v1/blocks?cursor=1&limit=100&reverse=true"
    },
    "self": {
      "href": "/api/v1/blocks"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "_embedded": {
      "type": "object",
      "properties": {
        "records": {
          "type": "array"
        }
      }
    },
    "_links": {
      "type": "object",
      "properties": {
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
  "status": 500,
  "title": "problem error message",
  "type": "https://boscoin.io/sebak/error/{error_code}"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  }
}

Block Details

Retrieve a block
GET/api/v1/blocks/{hashOrHeight}

Retrieve a block by the hash or height

Example URI

GET https://mainnet.blockchainos.org/api/v1/blocks/CLNes5kkg7ozgnHBhpBXHMHFtPKo7z4RF8NZpNGRUB4i
URI Parameters
HideShow
hashOrHeight
string (required) Example: CLNes5kkg7ozgnHBhpBXHMHFtPKo7z4RF8NZpNGRUB4i

a block hash or height

Response  200
HideShow
Headers
Content-Type: application/hal+json; charset=utf-8
Body
{
  "_links": {
    "self": {
      "href": "/api/v1/blocks/AcFpZMr6EhxBuCw3xADUzepa395wmh3c5fo2cyxYCi1q"
    }
  },
  "confirmed": "2018",
  "hash": "AcFpZMr6EhxBuCw3xADUzepa395wmh3c5fo2cyxYCi1q",
  "height": "3",
  "prev_block_hash": "J8TQCCtsiLcRZpYtVN3ozCFByd24fjXe2BgodLkeXN7S",
  "proposed_time": "2018-04-17T5:07:31.000000000Z",
  "proposer": "GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ",
  "proposer_transaction": "EQNSFnhzzz3bDpaZQekWPPNtr3kmRs5fUafBYAkHGXRP",
  "round": "0",
  "transactions": [
    "BivUS2tYjm1ZYXZNvKqRDa1eyBRTcE3DeuEDJVtuwNcm"
  ],
  "transactions_root": "BR2gsNw5WGjZ6HFPNr8fFAQPu42dqk1P7VVV7p5Efnru",
  "version": "0"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "_links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        }
      }
    },
    "confirmed": {
      "type": "string",
      "description": "11-18T18:44:47.900933000+09:00"
    },
    "hash": {
      "type": "string"
    },
    "height": {
      "type": "string"
    },
    "prev_block_hash": {
      "type": "string"
    },
    "proposed_time": {
      "type": "string"
    },
    "proposer": {
      "type": "string"
    },
    "proposer_transaction": {
      "type": "string"
    },
    "round": {
      "type": "string"
    },
    "transactions": {
      "type": "array"
    },
    "transactions_root": {
      "type": "string"
    },
    "version": {
      "type": "string"
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
  "status": 400,
  "title": "does not exists",
  "type": "https://boscoin.io/sebak/error/128"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/problem+json; charset=utf-8
Body
{
  "status": 500,
  "title": "problem error message",
  "type": "https://boscoin.io/sebak/error/{error_code}"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  }
}

Generated by aglio on 07 Jan 2019