Closed ghost closed 3 years ago
I've found the bug that was making this happen, the problem seems to be that the $level variable was orphan and not used within the function.
I've fixed it and made a pull request to your repository.
Thanks for reporting, I will close after merge of #24
Done :tada: #24 Commit b2f3a05
Thanks to @sm4rtk1dz
Nice!! thank you for this awesome wrapper, are changes already available on Composer?
@sm4rtk1dz yes it is :smiley: last release v0.9.4
Hey @sm4rtk1dz and @MockingMagician, I am also having an issue with private properties. I'm simply trying to get historical data using getHistoricRates
but all the properties (startTime
, lowestPrice
, highestPrice
, etc.) are private. How can I use/save these values from the object? Kinda odd that they'd be private properties as is since it's simply historical data?
EDIT: After playing around with it a bit more, I see that I can get back a usable object by calling getCandles
method on the results.
EDIT 2: Well I spoke too soon. Even though getCandles
returns a seemingly normal object, each of the properties in it are also private and thus not accessible.
EDIT 3: My apologies for endless chain of edits, but I think I've figured it out. Essentially need to access each individual property using the getter methods such as $historic->getCandles()[0]->getLowestPrice()
@zenichanin yes it is the way you will have to do it.
$historic->getCandles() is an iterable so you can access all candles if you iterate over it.
By the way, do not hesitate to launch a new issue if you have any question. Talking into a closed one might not be seen.
Hey! Thanks for this awesome API Wrapper, so far it has been very helpful in the development process.
Now the problem: I'm trying to understand how to read the order book from the API. I've found in the docs the following
but then it doesn't return an array nor an iterable object with the ask's order book. instead it returns:
Which seems not to be iterable (unless I'm not understanding how to iterate it), nor useful for calculations. I've also read the docs stating something about the "levels" but I don't find documentation stating what does a level mean and how can it be used.
My use case is quite simple, I just need to use the order book to know what's the price I have to pay to buy x amount of the product.
Thank you very much for your time in reviewing this issue!