willmoss / bitstamp-php-api

PHP API for Bitstamp
19 stars 16 forks source link

issue in buy BTC in USD #13

Open sonaliIflair opened 6 years ago

sonaliIflair commented 6 years ago

Hello,

I've used bitstamp API. I want to make a test of buyBTC and my function is like this :

` function buyBTC($amount, $price = NULL) { if (is_null($price)) { if (!isset($this->ticker)) { $this->ticker(); }

$price = $this->ticker['ask']; } return $this->bitstamp_query('buy', array('amount' => $amount, 'price' => $price)); } ` My concern is I've 87.56 EUR in my account but when I try to call buy BTC('0.00035985','5'). it says you need 5.02 USD to open that order. You have only 0.00 USD available. Check your account balance for details.

Can you please help? Also, what do I need to pass as parameter in buy BTC ? I want to make minimum order of 5 EUR