Author

Topic: opensource exchange for altcoin. 1 alt vs btc, without database. (Read 1622 times)

newbie
Activity: 11
Merit: 0
http://bitcoin.stackexchange.com/questions/13849/how-do-we-talk-to-bitcoind-in-a-php-plugin How do we talk to bitcoind in a PHP plugin?

It is simple to find the same rpc for python or ruby.

Look to my idea:

You come to site for trading 1 alt-coin( say ltc ), with btc.

Code:
$bitcoind = new jsonRPCClient("http://$YOUR_RPC_USER:$YOUR_RPC_PASS@$YOUR_RPC_HOST:$YOUR_RPC_PORT/");
$litecoind = new jsonRPCClient("http://$YOUR_RPC_USER:$YOUR_RPC_PASS@$YOUR_RPC_HOST:$YOUR_RPC_PORT_LTC/");
There is only 2 buttons, sell/buy. One page with one form.

Addresses are generated for each currency:

It is simple,
Code:
$newaddr_btc = $bitcoind->getnewaddress();
$newaddr_ltc = $litecoind->getnewaddress();

Thereafter, coins simple migrate from account to account inside each daemon litecoin/bitcoin. Looks like there is no needs in keeping side database. Looks like it is 200 strings of index.php + 2 daemons of bitcoin and litecoin.

Each trades saves into rrdbase, beautiful highchart draw beautiful graph of trades history.



But making an order needs in saving information, before deal not complete. Is there way without setupping mysql or another database? How can it be forced?
Jump to: