Author

Topic: Simple BTC-E question (Read 1112 times)

newbie
Activity: 20
Merit: 0
May 19, 2013, 09:59:55 AM
#6
@OP

Don't bump your post 10 minutes after you make it.

I'm sorry - will not happened again.
legendary
Activity: 966
Merit: 1004
Keep it real
May 19, 2013, 09:54:59 AM
#5
@OP

Don't bump your post 10 minutes after you make it.
newbie
Activity: 20
Merit: 0
May 19, 2013, 09:52:20 AM
#4
I believe BTC-E takes their cut out of the BTC you receive, so:

You would sell your 100 USD and receive 1 BTC minus 0.2% (0.998 BTC).

We want that 0.998BTC to be worth 100 USD, after the fee--which means 100USD is 99.8% of the sale price.

100 / .998 will give us the total sales price: 100.2004008...

So you would need to sell your .998BTC for roughly 100.2004USD, but we measure price in the 1 BTC = x USD format, so:

0.998 BTC is 99.8% of the ideal price of 1 BTC, which means 100.2004 is 99.8% of the price of 1 BTC.

100.2004 / .998 = 100.4012

So you would need to sell when the price is 100.4012 USD per bitcoin.

To test this:

.998 BTC * 100.4012USD = 100.2003976USD, minus .2% (100.2003976 * .998 = 99.999996... USD)
Of course it doesn't add up to exactly 100USD, because I truncated a few decimal places  Grin

You were very close in your original thinking ((100 * 1.002) * 1.002), but to be precise you have to look at it the way I outlined it above.

Alright class, if anyone has a question please raise your hand  Cheesy

T-thanks

http://img.pandawhale.com/42255-Im-not-a-smart-man-Forrest-Gum-W2X0.jpeg
sr. member
Activity: 308
Merit: 250
Jack of oh so many trades.
May 19, 2013, 09:18:02 AM
#3
I believe BTC-E takes their cut out of the BTC you receive, so:

You would sell your 100 USD and receive 1 BTC minus 0.2% (0.998 BTC).

We want that 0.998BTC to be worth 100 USD, after the fee--which means 100USD is 99.8% of the sale price.

100 / .998 will give us the total sales price: 100.2004008...

So you would need to sell your .998BTC for roughly 100.2004USD, but we measure price in the 1 BTC = x USD format, so:

0.998 BTC is 99.8% of the ideal price of 1 BTC, which means 100.2004 is 99.8% of the price of 1 BTC.

100.2004 / .998 = 100.4012

So you would need to sell when the price is 100.4012 USD per bitcoin.

To test this:

.998 BTC * 100.4012USD = 100.2003976USD, minus .2% (100.2003976 * .998 = 99.999996... USD)
Of course it doesn't add up to exactly 100USD, because I truncated a few decimal places  Grin

You were very close in your original thinking ((100 * 1.002) * 1.002), but to be precise you have to look at it the way I outlined it above.

Alright class, if anyone has a question please raise your hand  Cheesy




newbie
Activity: 33
Merit: 0
May 19, 2013, 09:10:23 AM
#2
You need to sell your Bitcoins again for the buying price plus ~0,4004008% to not lose any money. So bougth @113,4 Dollar per Bitcoin, sell it for 113,855 Dollar (+0,454..)(113,4 * 1,004004008).
newbie
Activity: 20
Merit: 0
May 19, 2013, 07:55:50 AM
#1
Hi.

I have a simple mathematical problem to solve about BTC-E.

Let's say, you buy 1 BTC with a value of 100 USD. After that, you would like to know, what should be the minimum value, that you need to resell it, without any losses.

Transactions fees are 0.2%.

What should be the minimal value to resell my 1 BTC, so I can cover all my fees?

  • 0.2% of 100 USD = 100.2 USD + another 0.2% to sell my BTC back = 100.4 USD ot 0.4% in fees
  • 0.2% of 100 USD = 100.2 USD, but you need to apply the sell fee on 100.2 USD. That should be 100.2004 with all my fees
  • You don't know shit (I agree) - it should be that way

To give something back to you, for reading my post - here is an simple PHP snippet, that will read your "give-me-ltc" pool stats and btc-e's LTC values.
It should be easly modified to your needs.

Code:
$pool_api ="http://give-me-ltc.com/api?api_key=XXXXXXXXXXXXXXXXXXXXXXXXXX"//EDIT ME
$btc_e_api ="https://btc-e.com/api/2/ltc_usd/ticker"//EDIT ME

$give_me_ltc file_get_contents($pool_api);
$btc_e file_get_contents($btc_e_api);
$api_btc_e json_decode($btc_e,true);
$api_give_me_ltc json_decode($give_me_ltc,true);


$high $api_btc_e["ticker"]["high"];
$low $api_btc_e["ticker"]["low"];
$buy $api_btc_e["ticker"]["buy"];
$sell $api_btc_e["ticker"]["sell"];


$rewords $api_give_me_ltc["confirmed_rewards"];
$hashrate $api_give_me_ltc["total_hashrate"];
$username $api_give_me_ltc["username"];
$worker1 $api_give_me_ltc["workers"][$username.".1"]["hashrate"]; //EDIT ".1"
$worker2 $api_give_me_ltc["workers"][$username.".2"]["hashrate"]; //EDIT ".2"
$worker3 $api_give_me_ltc["workers"][$username.".3"]["hashrate"]; //EDIT ".3"
$worker4 $api_give_me_ltc["workers"][$username.".4"]["hashrate"]; //EDIT ".4"

$rewords_cash $rewords*$sell;

echo 
"High: ".$high.
"Low: ".$low.
"Buy: ".$buy.
"Sell: ".$sell.
"Rewords: ".$rewords." LTC (".$rewords_cash." USD)".
"KH/s: ".$hashrate." KH/s".
"Worker 1: ".$worker1." KH/s"
"Worker 2: ".$worker2." KH/s".
"Worker 3: ".$worker3." KH/s";
?>
Jump to: