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
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ Aside from standard _getMessage()_, two more functions are added:
##Examples
###Get user information
```php
$res = btcAPI->getAccountInfo();
$res = $btcAPI->getAccountInfo();
```

_Result_:
JSON Objects of [profile](http://btcchina.org/api-trade-documentation-en#profile), [balance](http://btcchina.org/api-trade-documentation-en#balance) and [frozen](http://btcchina.org/api-trade-documentation-en#frozen).

###Place order
```php
$ res = btcAPI->placeOrder($price = NULL, $amount, $market = 'BTCCNY');
$res = $btcAPI->placeOrder($price = NULL, $amount, $market = 'BTCCNY');
```

Market type determines the precision of price and amount. See [FAQ](http://btcchina.org/api-trade-documentation-en#faq) No.6 for details.
Expand All @@ -71,7 +71,7 @@ orderID on success. [Invalid amount or invalid price](http://btcchina.org/api-tr

###Cancel order
```php
$res = btcAPI->cancelOrder($orderID, $market = 'BTCCNY');
$res = $btcAPI->cancelOrder($orderID, $market = 'BTCCNY');
```

_Parameters:_
Expand All @@ -84,7 +84,7 @@ TRUE if successful, otherwise FALSE.

###Get Market Depth
```php
$res = btcAPI->getMarketDepth($limit = 10, $market = 'BTCCNY');
$res = $btcAPI->getMarketDepth($limit = 10, $market = 'BTCCNY');
```

Get the complete market depth.
Expand All @@ -98,7 +98,7 @@ _Result:_

###Get Deposits
```php
$res = btcAPI->getDeposits($currency, $pendingonly = true);
$res = $btcAPI->getDeposits($currency, $pendingonly = true);
```

Get all user deposits.
Expand All @@ -113,7 +113,7 @@ Array of [deposit](http://btcchina.org/api-trade-documentation-en#deposit) JSON

###Get Withdrawals
```php
$res = btcAPI->getWithdrawals($currency, $pendingonly = true);
$res = $btcAPI->getWithdrawals($currency, $pendingonly = true);
```

Get all user withdrawals.
Expand All @@ -128,7 +128,7 @@ Array of [withdrawal](http://btcchina.org/api-trade-documentation-en#withdrawal)

###Get single withdrawal status
```php
$res = btcAPI->getWithdrawal($withdrawalID, $currency = 'BTC');
$res = $btcAPI->getWithdrawal($withdrawalID, $currency = 'BTC');
```

_Parameters:_
Expand All @@ -141,7 +141,7 @@ _Result:_

###Request a withdrawal
```php
$res = btcAPI->requestWithdrawal($currency, $amount);
$res = $btcAPI->requestWithdrawal($currency, $amount);
```

Make a withdrawal request. BTC withdrawals will pick last used withdrawal address from user profile.
Expand All @@ -157,7 +157,7 @@ Notice that the return format of withdrawalID is different from that of orderID.

###Get order status
```php
$res = btcAPI->getOrder($orderID, $market = 'BTCCNY');
$res = $btcAPI->getOrder($orderID, $market = 'BTCCNY');
```

_Parameters:_
Expand All @@ -170,7 +170,7 @@ _Result:_

###Get all order status
```php
$res = btcAPI->getOrders($openonly = true, $market = 'BTCCNY', $limit = 1000, $offset = 0);
$res = $btcAPI->getOrders($openonly = true, $market = 'BTCCNY', $limit = 1000, $offset = 0);
```

_Parameters:_
Expand All @@ -185,7 +185,7 @@ Array of [order](http://btcchina.org/api-trade-documentation-en#order) JSON obje

###Get transaction log
```php
$res = btcAPI->getTransactions($transaction = 'all', $limit = 10, $offset = 0);
$res = $btcAPI->getTransactions($transaction = 'all', $limit = 10, $offset = 0);
```

Notice that prices returned by this method may differ from placeOrder as it is the price get procceeded.
Expand Down