Terracoin budget information network (TBIN)

The cryptocurrency Terracoin introduced a budget system, that allows owners of full Terracoin nodes (masternodes) to vote on budget proposals. If a proposal got enough votes, it will be funded directly by the Terracoin blockchain. Proposals can be submitted by everybody and aim to improve the technical side, law and public awareness of Terracoin. Terracoin Services allows proposal owners present and describe their proposals. Masternode owners can comment and discuss on a proposal, to form a common opinion. Multiple proposal descriptions and discussion on different websites leads to loss of information and should be avoided.

To counter this problem, we are offering an API allowing everybody to conveniently pull the proposal data, description as well as the comments, to enhance the own website with a vivid Terracoin budget information section.

Benefits:

  • Terracoin proposal information and discussion is interesting an newsworthy content increasing retention of users on your website
  • Users can follow the budget proposals as well as the discussion directly on your website
  • Data is provided free of charge
  • Please link the "comment amount" and (if user comments have been integrated) a "comment reply link" to the respective Terracoin Services comment section, to allow users to post comments

How does it work?

  1. Call the "budget" API to get the list currently active proposals and store this information locally (e.g. mysql, redis, memcached)
  2. Display the list of proposals on your website
  3. The "budget" API also provides you with the proposal hash. Use the proposal hash to call the "proposal" API, giving your detailed proposal information including the description and comments
  4. Store the proposal information in a local database. Link the single entries of your proposal list with a separate page displaying detailed proposal information (description and comments)
  5. Check out the Terracoin Services budget page, to get an impression of how things could look like!

Overview

  1. Budget API: list of all active proposals
  2. Proposal API: detailed proposal information including description and comments
  3. Partner: become a partner of the Terracoin budget information network (TBIN)

Budget API

List of currently active budget proposals.

https://services.terracoin.io/api/v1/budget
Group Values
budget
  • total_amount: total amount of available budget for next payment cycle in TRC [integer]
  • alloted_amount: total amount of TRC allocated to proposals which are within the budget [integer]
  • payment_date: next budget payment date [datetime, UTC]
  • payment_date_human: human readable payment date, eg. "5 days" [string]
  • superblock: blockheight of next superblock [integer]
proposals [array]
  • hash: proposal hash [string]
  • name: proposal name [string]
  • url: proposal URL set by the proposal owner during proposal submission [string]
  • ts_url: URL pointing to the Terracoin Services proposal page [string]
  • ts_url_comments: URL pointing to the comment section on the Terracoin Services proposal page [string]
  • title: proposal title entered by the proposal owner on Terracoin Servvices [string]
  • date_added: date, when the proposal was first seen on the network and has been added to the Terracoin Services database [datetime, UTC]
  • date_added_human: time since proposal has been added to the Terracoin Services database in words, eg. "6 days ago" [string]
  • date_end: date, when proposal payouts are expected to end [datetime, UTC]
  • voting_deadline_human: time until voting will be closed for this proposal, e.g "in 15 days" or "passed" [string]
  • will_be_funded: is true when proposal has enough yes votes to become funded [boolean]
  • remaining_yes_votes_until_funding: amount of yes votes required for funding of this proposal [integer]
  • in_next_budget: indicates, if proposal will be included within next budget and will be paid [boolean]
  • monthly_amount: amount of TRC that will be paid per month [integer]
  • total_payment_count: amount of payment cycles this proposal was intended to run [integer]
  • remaining_payment_count: remaining payment cycles [integer]
  • yes: yes votes on this proposal [integer]
  • no: no votes on this proposal [integer]
  • order: the order value should be used to sort proposals in case the JSON order is not preserved correctly. The order is defined by a reddit like algo covering the time and the upvotes and downvotes on Terracoin Services [integer]
  • comment_amount: amount of proposal comments posted on Terracoin Services [integer]
  • owner_username: username of the proposal owner on Terracoin Services [string]
status API status [ok, warning, error]
error_type API error type [empty, evaluation_mode, invalid_partner]

Proposal API

This API provides you with detailed proposal information incudling proposal description and comments

https://services.terracoin.io/api/v1/proposal?hash=<proposal_hash>
Group Values
proposal [array]
  • hash: proposal hash [string]
  • name: proposal name [string]
  • url: proposal URL set by the proposal owner during proposal submission [string]
  • ts_url: URL pointing to the Terracoin Services proposal page [string]
  • ts_url_comments: URL pointing to the comment section on the Terracoin Services proposal page [string]
  • title: proposal title entered by the proposal owner on Terracoin Services [string]
  • date_added: date, when the proposal was first seen on the network and has been added to the Terracoin Services database [datetime, UTC]
  • date_added_human: time since proposal has been added to the Terracoin Services database in words, eg. "6 days ago" [string]
  • date_end: date, when proposal payouts are expected to end [datetime, UTC]
  • voting_deadline_human: time until voting will be closed for this proposal, e.g "in 15 days" or "passed" [string]
  • will_be_funded: is true when proposal has enough yes votes to become funded [boolean]
  • remaining_yes_votes_until_funding: amount of yes votes required for funding of this proposal [integer]
  • in_next_budget: indicates, if proposal will be included within next budget and will be paid [boolean]
  • monthly_amount: amount of TRC that will be paid per month [integer]
  • total_payment_count: amount of payment cycles this proposal was intended to run [integer]
  • remaining_payment_count: remaining payment cycles [integer]
  • yes: yes votes on this proposal [integer]
  • no: no votes on this proposal [integer]
  • comment_amount: amount of proposal comments posted on Terracoin Services [integer]
  • description_base64_bb: proposal description entered by the proposal owner on Terracoin Services. This description contains bbcode and is base64 encoded to avoid JSON format problems [base64]
  • description_base64_html: proposal description entered by the proposal owner on Terracoin Services. Contained bbcode has already been parsed to HTML. This content is used as it is on the Terracoin Services website and should be safe. [base64]
  • owner_username: username of the proposal owner on Terracoin Services [string]
comments [array]
  • id: unique comment identifier [string]
  • username: Terracoin Services username of the comment poster [string]
  • date: comment date [datetime, UTC]
  • date_human: time since comment has been posted in words e.g. "3 days ago" [string]
  • order: sort comments using this order value [integer]
  • level: use the level value to add a css padding (e.g. $level*13px) to the comments in order to create the impression of a tree [integer]
  • recently_posted: use this value to highlight comments that have been posted recently [boolean]
  • posted_by_owner: highlight comments posted by the owner of the proposal [boolean]
  • reply_url: add a reply link to each comment and use this URL [string]
  • content: comment content [string]
status API status [ok, warning, error]
error_type API error type [empty, evaluation_mode, invalid_partner, proposal_not_existing]

Register as a TBIN partner

You are free to develop your app with the APIs provided above.

Before putting your app live, we highly recommend to request your personal partner key, which will be appended to the API (e.g. https://services.terracoin.io/api/v1/budget?partner=XXX).

Simply send a short email to partner at terracoin.io providing us with the name and the URL of your project. It's free of charge and we are happy to welcome and list you as a TBIN partner.