From d958c58832b21a68b6b29203eff5f5866fd505a7 Mon Sep 17 00:00:00 2001 From: IsCod Date: Thu, 3 Aug 2017 17:37:18 +0800 Subject: [PATCH] bug for getOrder ltccny --- BTCChinaAPI.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BTCChinaAPI.php b/BTCChinaAPI.php index e8c4049..8f52308 100644 --- a/BTCChinaAPI.php +++ b/BTCChinaAPI.php @@ -22,7 +22,7 @@ function __destruct() { curl_close($this->ch); } - + //test if a variable is a non-negative number. private static function is_nnn($var) { @@ -227,14 +227,14 @@ public function requestWithdrawal($currency, $amount) return $this->DoMethod($method, array($currency, $amount)); } - public function getOrder($orderID, $market) + public function getOrder($orderID, $market = 'BTCCNY') { $method = 'getOrder'; if(!$this->is_market($market, FALSE)) throw new ContentException('market available: \'BTCCNY\'and \'LTCBTC\'.', 'getOrder'); if(!$this->is_nnn($orderID)) throw new ContentException('orderID is a non-negative numeric value.', 'getOrder'); - return $this->DoMethod($method, array($orderID)); + return $this->DoMethod($method, array($orderID, $market)); } public function getOrders($openonly = TRUE, $market = 'BTCCNY', $limit = 1000, $offset = 0)