Ltcbtc trading bot with interface to btce bitstamp
19 commentsLiquicity escapism 320 market
Mastering Bitcoin does a fantastic job of outlining the technical underpinnings of Bitcoin, but I wanted to solidify my understanding with some hands-on experience. The first step in communicating with a Bitcoin Core full node is getting our hands on one. Once started, our full node daemon will begin connecting to peer nodes, downloading, and verifying blocks from the blockchain.
It may take several days to download and verify the entire blockchain, but we can keep continue on with our project in the meantime. You can fetch a list of all of the available RPC commands on the node by calling bitcoin - cli help , or by browsing through the Bitcoin Wiki. For example, we can run getinfo manually with curl:. Similarly, we can execute these commands from any programming environment with an HTTP client, like Elixir!
It turns out this is incredibly easy with httpoison:. In this case, our method is " getinfo" , which requires no params. Now our call to HelloBitcoin. This metadata includes a potential error string, and the id of the request. Sign up for Pete's mailing list and have fresh content delivered to you, hot off the presses every week!
We could implement another Bitcoin RPC command, like getblockhash , in a nearly identical fashion:. Calling our new getblockhash with an index of 0 gives us the hash of the Bitcoin genesis block , as we would expect. Our getblockhash function is nearly identical to our getinfo function. We can easily implement any of the Bitcoin RPC commands using this helper function. In hindsight, this was a long article explaining a relatively simple idea. Bitcoin , Blockchain , Elixir , Mastering Bitcoin.
Bitcoin's Base58Check in Pure Elixir — Elixir ships out of the box with nearly all of the tools required to generate Bitcoin private keys and transform them into public addresses. In this article we implement the missing piece of the puzzle: Exploring the Bitcoin Blockchain with Elixir and Phoenix — Let's use the Phoenix framework and our Bitcoin node interface to build a basic Bitcoin blockchain explorer!
Inject Detect is Live! This post may contain affiliate links created with Affiliate Crawler. Written by Pete Corey on Sep 4, Bitcoin , Blockchain , Elixir , Mastering Bitcoin Bitcoin's Base58Check in Pure Elixir — Elixir ships out of the box with nearly all of the tools required to generate Bitcoin private keys and transform them into public addresses.