作者 karlet

feat:api获取修复

@@ -96,7 +96,7 @@ class Api @@ -96,7 +96,7 @@ class Api
96 //查询未成交订单 96 //查询未成交订单
97 public function getOrderPending($param) 97 public function getOrderPending($param)
98 { 98 {
99 - $path = '/api/v5/trade/order-pending'; 99 + $path = '/api/v5/trade/orders-pending';
100 $method = 'GET'; 100 $method = 'GET';
101 return $this->request($path, $method, $param, $this->apiInfo); 101 return $this->request($path, $method, $param, $this->apiInfo);
102 } 102 }
@@ -184,6 +184,10 @@ class Api @@ -184,6 +184,10 @@ class Api
184 } else { 184 } else {
185 $result = Curl::httpGet($url, $param, $header); 185 $result = Curl::httpGet($url, $param, $header);
186 } 186 }
187 - return json_decode($result, true); 187 + $data = json_decode($result, true);
  188 + if (json_last_error() !== JSON_ERROR_NONE) {
  189 + var_dump("json解析报错", $url, $param, $header, $this->apiInfo, $result);
  190 + }
  191 + return $data;
188 } 192 }
189 } 193 }