Author

Topic: [PHP] VirWox BTC/USD Exchange Rate (Read 5435 times)

legendary
Activity: 2212
Merit: 1008
September 01, 2013, 02:03:55 AM
#6
^this.  you get higher discount the more trades you complete
legendary
Activity: 1554
Merit: 1021
August 29, 2013, 01:56:39 PM
#5
There are discounts on the trading fees for limit orders based on your trading activity during the last 30 days - so your results might be different from the chart if you're using limit orders instead of market orders.
newbie
Activity: 17
Merit: 0
August 27, 2013, 10:42:30 AM
#4
Thank you for this! I made a USD/BTC tracking chart based on this at http://caktux.ca/virwox comparing the resulting price with MtGox and Bitstamp. Deposit and withdrawal fees are also taken into account. I was surprised to see that even after all those fees, there are a few times when you can get a better rate than at the other exchanges.


Interesting, but is it possible to have BTC/USD  live chart??  When im trading my BTC im having a hard time understanding the SLL rate

thanks
sr. member
Activity: 448
Merit: 250
Changing avatars is currently not possible.
August 03, 2013, 05:18:53 AM
#3
Thank you for this! I made a USD/BTC tracking chart based on this at http://caktux.ca/virwox comparing the resulting price with MtGox and Bitstamp. Deposit and withdrawal fees are also taken into account. I was surprised to see that even after all those fees, there are a few times when you can get a better rate than at the other exchanges.


For a market order right now would cost $101.85 per BTC, and you could sell for $96.50.  That's without the fees which I think change with your volume and the order type, but are pretty high.  Your site says 106-108, so sell is probably around 90ish with those fees.  The Buy is not too horrible if you're doing it on credit.
newbie
Activity: 16
Merit: 0
August 03, 2013, 05:03:43 AM
#2
Thank you for this! I made a USD/BTC tracking chart based on this at http://caktux.ca/virwox comparing the resulting price with MtGox and Bitstamp. Deposit and withdrawal fees are also taken into account. I was surprised to see that even after all those fees, there are a few times when you can get a better rate than at the other exchanges.

Code:
   $usd = $virwox->result[0]->sell[0]->price - (50 / $virwox->result[0]->buy[0]->price); // Price of USD to SLL + commission fee of 50 SLL
    $usd_with_fees = $usd - ($usd * 0.029); // Price of USD to SLL + fee

    $btc = $virwox->result[1]->buy[0]->price + 50; // Price of SLL to BTC + commission fee
    $btc_with_fees = $btc + ($btc * 0.029); // Price of SLL to BTC + fee

    $rate_with_fees = $btc_with_fees / $usd_with_fees;

    $rate_virwox = $rate_with_fees + ($rate_with_fees * 0.034) + 0.5 + (0.01 * $rate_with_fees); // Price of BTC to USD + initial deposit fee + .35 EUR->USD + withdrawal fee
member
Activity: 70
Merit: 10
April 19, 2013, 11:21:12 PM
#1
So, had to make this for a project, and thought I would share.

This is a simple PHP script that calculates the BTC<->USD exchange rate on VirWox, after fees.

Code:
function getVirWoxRate() {
$curs = json_decode(file_get_contents("http://api.virwox.com/api/json.php?method=getMarketDepth&symbols%5b0%5d=USD/SLL&symbols%5b1%5d=BTC/SLL&buyDepth=1&sellDepth=1&id=1"))->{'result'};
$usd = $curs[0]->{'buy'}[0]->{'price'}; //Price of USD in SLL
$btc = $curs[1]->{'buy'}[0]->{'price'}; //Price of BTC in SLL
$tran1 = $btc-($btc*.029); //Price of BTC in SLL after Fee
$tran2i = $tran1/$usd; //Price of BTC in USD before Fee
$tran2 = $tran2i-($tran2i*.029); //Price of BTC in USD after Fee
return $tran2;
}
Jump to: