Skip to content

Commit 2ba2753

Browse files
authored
Merge pull request #14 from hhxsv5/master
Fix parameter of order list
2 parents 522f162 + 4d3455a commit 2ba2753

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/PrivateApi/Order.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,16 @@ public function cancelAll($symbol = null)
5757

5858
/**
5959
* List orders
60-
* @param string|null $status
61-
* @param string|null $symbol
60+
* @param array $params
6261
* @param array $pagination
6362
* @return array
6463
* @throws \KuCoin\SDK\Exceptions\BusinessException
6564
* @throws \KuCoin\SDK\Exceptions\HttpException
6665
* @throws \KuCoin\SDK\Exceptions\InvalidApiUriException
6766
*/
68-
public function getList($status = null, $symbol = null, array $pagination = [])
67+
public function getList(array $params = [], array $pagination = [])
6968
{
70-
$response = $this->call(Request::METHOD_GET, '/api/v1/orders', compact('status', 'symbol') + $pagination);
69+
$response = $this->call(Request::METHOD_GET, '/api/v1/orders', $params + $pagination);
7170
return $response->getApiData();
7271
}
7372

tests/OrderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function testCreateMarket(Order $api)
8787
*/
8888
public function testGetList(Order $api)
8989
{
90-
$data = $api->getList(null, 'BTC-USDT', ['currentPage' => 1, 'pageSize' => 10]);
90+
$data = $api->getList(['symbol' => 'BTC-USDT'], ['currentPage' => 1, 'pageSize' => 10]);
9191
$this->assertPagination($data);
9292
foreach ($data['items'] as $item) {
9393
$this->assertArrayHasKey('symbol', $item);

0 commit comments

Comments
 (0)