100% open source

Toshi is a full open source Bitcoin node implementation, built by Coinbase.

PostgreSQL

Toshi is backed by PostgreSQL due to its impeccable reputation, proven track record, and powerful feature set.

powerful API

Toshi provides powerful APIs to aid in blockchain exploration, analysis, as well as wallet functionality at scale.

DESIGNED FOR DEVELOPERS

GET LATEST BLOCK

In this example we retrieve information about the lastest main branch block processed by Toshi.
This same information is of course available for all blocks.

Response
{
  "hash": "000000000000014bb22ba5dbb6f2d4a0ab571ae040f02e5e1bbc9b9e6b88fff8",
  "branch": "main",
  "previous_block_hash": "000000000000038aa0d5f287a62a541b4e6c42f09f74b67f2f279ef13db40b60",
  "next_blocks": [
    {
      "hash": "0000000000000bef34ff0b2bb868658ea09ab2c365f5e9d576583f4c610ae5bc",
      "branch": "main",
      "height": 159422
    }
  ],
  "height": 159421,
  "confirmations": 7,
  "merkle_root": "18376c68042d46242e815bc4c6a21394f8d36c20efaa639b713d0ce1bdba4b6f",
  "time": "2011-12-27T17:54:24Z",
  "nonce": 258521299,
  "bits": 437155514,
  "difficulty": 1159929.4972244,
  "reward": 5000000000,
  "fees": 100000,
  "total_out": 43182367769,
  "size": 11905,
  "transactions_count": 12,
  "version": 1,
  "transaction_hashes": [
    "b8dc1197e13a516965649373d8c6686058fd9cd08d9a61f082c49bd703afa34f",
    "12f9072f2b5b232d915c7b57ec9616bbea2867627585372f4aee09d06c13678a",
    "1f85d1a30a91b04b61ef36fd4d5ce5f7b407342f7245e6264732270ca41f9a60",
    "108ebf6699b8427482f49eb5d98f3773df302b8c1d432ea213d69d493400442f",
    "19be0a64c2095f8789ee598109f9c6152ee7213e824ecfb81f01dd93ed597d55",
    "80857f4b61ffa29886de3b166728581e0d9a388959951a969da511b47e48b3a8",
    "45c582b996585843379856ecf232d49f563b4ef5cfd4b53ae438017744a6bb59",
    "c74db9130060bc9a1e33c76a873ce0e07124bfd56d77100fe9cc9dee5b75326e",
    "9387e03b1123806eb922d0022555f6e226296fdd85e14f69e5c9f188a90804b6",
    "8d0d73e0392584d838a8ffc1d289756ba1bbe93421ed5ffd111428bcb54ab35e",
    "6bc9461e8b9725201916d227c2b12f3257467ff5e8e190d8c73c405f9cd5d56f",
    "4a83dd4004e732a0219d32e140875cc591e29e0a3f167ba587ef99310754f9d1"
  ]
}

GET TRANSACTION DETAILS

Retrieve information about a particular transaction on the network.

Response
{
  "hash": "21c77bcc54405f011c64a77cb1f014ebcdfd05fc39654b43905a0e189be19ebf",
  "version": 1,
  "lock_time": 0,
  "size": 259,
  "inputs": [
    {
      "previous_transaction_hash": "b0fb35f1e8168ab55a096f8c6415ec0fc529332aa88a1d8b9532e18f304e8f1f",
      "output_index": 0,
      "amount": 4860600000,
      "script": "30460221008083b2e74c33f854442bd1f68db93c0c038bd45d6af72826ebed6e696b61418f0...",
      "addresses": [
        "17qHAnmp4UGxeR7Vpomc6tDBicauXRsfNX"
      ]
    }
  ],
  "outputs": [
    {
      "amount": 2360600000,
      "spent": false,
      "script": "OP_DUP OP_HASH160 5504ca6c54059e797a3b3a45e3c8e550421bc9fc OP_EQUALVERIFY OP_CHECKSIG",
      "script_hex": "76a9145504ca6c54059e797a3b3a45e3c8e550421bc9fc88ac",
      "script_type": "hash160",
      "addresses": [
        "18kYBAszeq1AmMqVh47r2fTQjihVcz9chN"
      ]
    },
    {
      "amount": 2500000000,
      "spent": true,
      "script": "OP_DUP OP_HASH160 2b9d62d43713e31a0ca6b9460faedb17b5419747 OP_EQUALVERIFY OP_CHECKSIG",
      "script_hex": "76a9142b9d62d43713e31a0ca6b9460faedb17b541974788ac",
      "script_type": "hash160",
      "addresses": [
        "14ycbd9W6vwtfKPgtbGFxE6YNeZR2B6cVE"
      ]
    }
  ],
  "amount": 4860600000,
  "fees": 0,
  "confirmations": 1402,
  "block_height": 164353,
  "block_hash": "00000000000002b0a927301832bca7eefc07b4391bfa037dd09a3fc4f1b85081",
  "block_time": "2012-01-29T09:19:58Z",
  "block_branch": "main"
}

GET ADDRESS INFORMATION

Retrieve information about a particular address on the network.
The below example shows how you would query for address information including transaction history.

Response
{
  "hash": "1sT8zQeXUXkS1qUULkC764ry9PZRrd72k",
  "balance": 0,
  "received": 18276000000,
  "sent": 18276000000,
  "unconfirmed_received": 0,
  "unconfirmed_sent": 0,
  "unconfirmed_balance": 0,
  "transactions": [
    {
      "hash": "8151bb206249046f6d4a75be171ba9f3d5df408978cebe4bfa2a9340eb34cca4",
      "version": 1,
      "lock_time": 0,
      "size": 258,
      "inputs": [
        {
          "previous_transaction_hash": "87368350c82de637f9491ebaab8ab299e4bd70c0173ff04c27936f902ff647e6",
          "output_index": 1,
          "amount": 18276000000,
          "script": "3045022074841df1a1ada0bcb2ce69a0a5b31914526cc7ce616baea97146498760de0ad6022100afabc07b28b8c300db751f79449b2981fac952c1c3180d334166d8ce3718c00501 046f22072f5655c4b4567037793ca640e6f8ea6359c21cc9acdb10eec9faf4004ac87809c490640c8c72ee74a728f5f691a83ac7f55b0a32735f5b3e6b150ffa19",
          "addresses": [
            "1sT8zQeXUXkS1qUULkC764ry9PZRrd72k"
          ]
        }
      ],
      "outputs": [
        {
          "amount": 1945000000,
          "spent": true,
          "script": "OP_DUP OP_HASH160 564bc633dfedc6b761889ba02e7ae78851eea6cc OP_EQUALVERIFY OP_CHECKSIG",
          "script_hex": "76a914564bc633dfedc6b761889ba02e7ae78851eea6cc88ac",
          "script_type": "hash160",
          "addresses": [
            "18sHtPDv8KpafL4P93mBAAvgZmFeqAvp1y"
          ]
        },
        {
          "amount": 16331000000,
          "spent": true,
          "script": "OP_DUP OP_HASH160 655199b3fc6f878e3914db2603d609f40cc89e55 OP_EQUALVERIFY OP_CHECKSIG",
          "script_hex": "76a914655199b3fc6f878e3914db2603d609f40cc89e5588ac",
          "script_type": "hash160",
          "addresses": [
            "1AEj155JDgmp5wjFuskAPfcCAao2hyFjQL"
          ]
        }
      ],
      "amount": 18276000000,
      "fees": 0,
      "confirmations": 154705,
      "block_height": 166161,
      "block_hash": "00000000000006a26fe790fe5d6b77654038334295c076ed5d29473410db082b",
      "block_time": "2012-02-10T07:51:47Z",
      "block_branch": "main"
    }
  ]
}

Toshi is currently in beta. Although we're passing TheBlueMatt's de facto standard Bitcoin test-scripts we still don't recommend using Toshi in production until its tires have been sufficiently kicked.