bibox: json issue with PHP
See original GitHub issue- OS: archlinux
- Programming Language version: PHP
- CCXT version: 1.10.717
- Exchange: bibox
- Method: any
There’s an issue with Bibox and Exchange->json
due to second parameter JSON_FORCE_OBJECT
passed to json_encode
.
Bibox expects JSON request to look like:
{"cmds":"[{\"cmd\":\"api\\\/marketAll\",\"body\":[]}]"}
However, with given parameter in PHP it looks like:
{"cmds":"{\"0\":{\"cmd\":\"api\\\/marketAll\",\"body\":{}}}"}
And that causes all requests fail with response:
{
"error": {
"code": "3000",
"msg": "请求参数错误"
}
}
I believe we can’t simply remove the JSON_FORCE_OBECT
(don’t know why was it introduced), especially as there aren’t tests for PHP.
What solution would you suggest? (I’ll be more than happy to submit a PR)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:15 (14 by maintainers)
Top Results From Across the Web
Bibox raising JSON decode errors. - - Bountysource
A JavaScript / Python / PHP library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs.
Read more >Having Inconsistent Results When Loading Json File to a Table
The issue is that one JSON file will work fine and populate the table while the other JSON file won't. I am using...
Read more >Mime Inventory, by Exakat
ccxt : PHP static analysis report by Exakat (https://www.exakat.io/) ... /php/bitget.php; /php/qtrade.php; /php/bibox.php; /php/flowbtc.php; /php/idex2.php ...
Read more >json_decode - Manual - PHP
Takes a JSON encoded string and converts it into a PHP value. ... If you have the same problem, try to install separated...
Read more >Senior WordPress Developer Job in Bangalore at Evobi Automation ...
At Evobi Automation Private Limited (Bibox Labs), an integrated approach encompassing both knowledge ... CSS Git HTML jQuery JSON PHP REST API WordPress...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I assume this is the same issue I’m having now
Error : bibox {"error":{"code":"3000","msg":"\u8bf7\u6c42\u53c2\u6570\u9519\u8bef"}}
If it is the array/object variant issue then it would make sense for each exchange to have a settings to define the format of their json packages
Well, that isn’t the beginning, it’s the beginning of ccxt.php, and before that everything was in one file + it was moved from folder to folder in recent months, so, it’s quite hard to find the reason now )
But, if you’re ok to wait a little, I’ll come up with a reason for that. In other words, I would not add it “just in case”, I would only add it as a bugfix – that’s what I’m sure about.