Skip to content

Commit 55f8160

Browse files
authored
Merge pull request #64 from hhxsv5/master
Add sdk UA
2 parents f10c63f + 1a7ea6d commit 55f8160

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/Api.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313

1414
abstract class Api
1515
{
16+
/**
17+
* @var string SDK Version
18+
*/
19+
const VERSION = '1.1.9';
20+
1621
/**
1722
* @var string
1823
*/
@@ -192,6 +197,7 @@ public function call($method, $uri, array $params = [], array $headers = [], $ti
192197
);
193198
$headers = array_merge($headers, $authHeaders);
194199
}
200+
$headers['User-Agent'] = 'KuCoin-PHP-SDK/' . static::VERSION;
195201
$request->setHeaders($headers);
196202

197203
$requestId = uniqid();

tests/AccountTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,13 @@ public function testGetSubAccountDetail(Account $api)
287287
public function testSubTransfer(Account $api)
288288
{
289289
$transfer = [
290-
'clientOid' => uniqid(),
291-
'amount' => 1,
292-
'direction' => 'OUT',
293-
'currency' => 'KCS',
294-
'subUserId' => '5cc5b31c38300c336230d071',
290+
'clientOid' => uniqid(),
291+
'amount' => 1,
292+
'direction' => 'OUT',
293+
'currency' => 'KCS',
294+
'accountType' => 'main',
295+
'subAccountType' => 'trade',
296+
'subUserId' => '5cc5b31c38300c336230d071',
295297
];
296298
$result = $api->subTransfer($transfer);
297299
$this->assertInternalType('array', $result);

0 commit comments

Comments
 (0)