Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions BTCChinaAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
Expand Down