I want to create a game where users can win Bitcoins playing my games I created or perhaps other online games. What APIs do similar applications use to achieve this? how do they host the Bitcoins? do they use their own hosted wallet, bitpay? Bitcoin escrow?
2 Answers
If you can afford storing the ~20GiB of blockchain on your disk, then bitcoind is a good bet. Otherwise, check out electrum, it has a very similar API, though there are some quirks. For the most lightweight solution, check out blockchain.info API, this should be the same API as bitcoind's.
The bitcoin software has it's own API.
Simply put, they run the bitcoind software and use RPC-JSON as the API.
EDIT : changed according to comment. Other implementations of Bitcoin also have their own APIs
-
1This is an arcane, arcane point, but protocols don't have APIs. Implementations of protocols have APIs. Hence, bitcoind, an implementation of the Bitcoin protocol, exposes an API. Other implementations of the bitcoin protocol publish their own APIs.– ChrisWFeb 24, 2014 at 21:40