User Data Balance Update. change
Hi all. php-binance-api.php, string 2380 : if ($type === "outboundAccountInfo") {
but in https://binance-docs.github.io/apidocs/spot/en/#change-log : 2020-09-09 USER DATA STREAM outboundAccountInfo has been deprecated. outboundAccountInfo will be removed in the future. (Exact date unknown) Please use outboundAccountPosition instead. outboundAccountInfo will now only show the balance of non-zero assets and assets that have been reduced to 0.
I suggest changing it to: if ($type === "outboundAccountPosition") {
and string 1438 protected function balanceHandler(array $json)
foreach($balances->B as $coin){ $data['coin'] = $coin->a; $data['free'] = $coin->f; $data['locked'] = $coin->l; }
H Pinakalada,
If you would like to contribute, pull requests are welcome :)
thanks for the report
@Pinakalada , I fully support you in changing $type === "outboundAccountInfo" to $type === "outboundAccountPosition" as since Jan 1, 2021 the 'Info' has been removed.
But I'm trying to understand your proposal for the foreach($balances->B) ... What is passed to this function is already the array under B : $balances = $this->balanceHandler($json->B); So you will only have an array with items a, f and l in the balanceHandler function. Could you elaborate a bit further on what you are trying to do? https://binance-docs.github.io/apidocs/spot/en/#payload-account-update
This is an example of my code, I process json in controller, bypassing the balanceHandler function.
I only indicated the direction of thought and links to the documentation.
@dmzoneill I think we can close this one. Thanks.