Closed mrabino1 closed 4 years ago
same as well
ticker() function isn't working
The POST method not allowed
error seems in fact ok as eurusd() and ticker() methods are not listed as Privately accessible functions on the Bitstamp API page. The ticker() method is publicly accessible and the eurusd() method doesn't even seem to exist (perhaps it was before, I don't know). See: https://www.bitstamp.net/api/
Rather than forking this repo I suggest the developer simply removes methods no longer supported by Bitstamp and implement a call to the public ticker rather than via the API.
The methods that are implemented and supported by the API do seem to work.
I was facing the same error,
The change i've made is i simply call eurusd before balance.
$bs = new Bitstamp($KEY, $SECRET, $CLIENT_ID); print_r($bs->ticker()); print_r($bs->eurusd()); print_r($bs->balance());
Like this
and it worked for me
When I run the API now, it is unable to get the ticker() function nor the eurusd() function.. as a result the buyBTC() function when trying to use the ask pricing (which is based on the ticker() value is failing.
getting:
Array ( [error] => POST method not allowed for this request. )
UPDATE: looks like the issue was on the bitstamp side as to which calls required authentication and which did not.. the ticker() function now works.. while eurusd() is still broken.. but I do think the issue is on the bitstamp side..
UPDATE 2: Broken again the way it was when originally reported.