@@ -56,8 +56,6 @@ public function getDetail($accountId)
5656 }
5757
5858 /**
59- * @deprecated Use getLedgersV1 instead
60- *
6159 * Get account ledgers
6260 * @param string $accountId
6361 * @param array $params
@@ -66,6 +64,7 @@ public function getDetail($accountId)
6664 * @throws \KuCoin\SDK\Exceptions\BusinessException
6765 * @throws \KuCoin\SDK\Exceptions\HttpException
6866 * @throws \KuCoin\SDK\Exceptions\InvalidApiUriException
67+ * @deprecated Call getLedgersV2() instead
6968 */
7069 public function getLedgers ($ accountId , array $ params = [], array $ pagination = [])
7170 {
@@ -173,13 +172,13 @@ public function getSubAccountList()
173172 }
174173
175174 /**
176- * @deprecated Use subTransferV2 instead.
177175 * Transfer between master account and sub-account
178176 * @param array $params
179177 * @return array
180178 * @throws \KuCoin\SDK\Exceptions\BusinessException
181179 * @throws \KuCoin\SDK\Exceptions\HttpException
182180 * @throws \KuCoin\SDK\Exceptions\InvalidApiUriException
181+ * @deprecated Call subTransferV2() instead.
183182 */
184183 public function subTransfer (array $ params )
185184 {
@@ -216,4 +215,145 @@ public function getLedgersV2(array $params = [], array $pagination = [])
216215 $ response = $ this ->call (Request::METHOD_GET , '/api/v1/accounts/ledgers ' , $ params + $ pagination );
217216 return $ response ->getApiData ();
218217 }
219- }
218+
219+ /**
220+ * Get sub user.
221+ * @param array $pagination
222+ * @return array
223+ * @throws \KuCoin\SDK\Exceptions\BusinessException
224+ * @throws \KuCoin\SDK\Exceptions\HttpException
225+ * @throws \KuCoin\SDK\Exceptions\InvalidApiUriException
226+ */
227+ public function getSubUserV2 (array $ pagination = [])
228+ {
229+ $ response = $ this ->call (Request::METHOD_GET , '/api/v2/sub/user ' , $ pagination );
230+ return $ response ->getApiData ();
231+ }
232+
233+ /**
234+ * Get account description.
235+ * @param array $pagination
236+ * @return array
237+ * @throws \KuCoin\SDK\Exceptions\BusinessException
238+ * @throws \KuCoin\SDK\Exceptions\HttpException
239+ * @throws \KuCoin\SDK\Exceptions\InvalidApiUriException
240+ */
241+ public function getUserinfoV2 ()
242+ {
243+ $ response = $ this ->call (Request::METHOD_GET , '/api/v2/user-info ' );
244+ return $ response ->getApiData ();
245+ }
246+
247+ /**
248+ * Create sub user.
249+ * @param array $params
250+ * @return array
251+ * @throws \KuCoin\SDK\Exceptions\BusinessException
252+ * @throws \KuCoin\SDK\Exceptions\HttpException
253+ * @throws \KuCoin\SDK\Exceptions\InvalidApiUriException
254+ */
255+ public function createSubUserV2 (array $ params = [])
256+ {
257+ $ response = $ this ->call (Request::METHOD_POST , '/api/v2/sub/user/created ' , $ params );
258+ return $ response ->getApiData ();
259+ }
260+
261+ /**
262+ * Create sub user api key.
263+ * @param array $params
264+ * @return array
265+ * @throws \KuCoin\SDK\Exceptions\BusinessException
266+ * @throws \KuCoin\SDK\Exceptions\HttpException
267+ * @throws \KuCoin\SDK\Exceptions\InvalidApiUriException
268+ */
269+ public function createSubUserApiKey (array $ params = [])
270+ {
271+ $ response = $ this ->call (Request::METHOD_POST , '/api/v1/sub/api-key ' , $ params );
272+ return $ response ->getApiData ();
273+ }
274+
275+ /**
276+ * Get sub user api key.
277+ * @param array $params
278+ * @return array
279+ * @throws \KuCoin\SDK\Exceptions\BusinessException
280+ * @throws \KuCoin\SDK\Exceptions\HttpException
281+ * @throws \KuCoin\SDK\Exceptions\InvalidApiUriException
282+ */
283+ public function getSubUserApiKey (array $ params = [])
284+ {
285+ $ response = $ this ->call (Request::METHOD_GET , '/api/v1/sub/api-key ' , $ params );
286+ return $ response ->getApiData ();
287+ }
288+
289+ /**
290+ * Update sub user api key.
291+ * @param array $params
292+ * @return array
293+ * @throws \KuCoin\SDK\Exceptions\BusinessException
294+ * @throws \KuCoin\SDK\Exceptions\HttpException
295+ * @throws \KuCoin\SDK\Exceptions\InvalidApiUriException
296+ */
297+ public function updateSubUserApiKey (array $ params = [])
298+ {
299+ $ response = $ this ->call (Request::METHOD_POST , '/api/v1/sub/api-key/update ' , $ params );
300+ return $ response ->getApiData ();
301+ }
302+
303+ /**
304+ * Delete sub user api key.
305+ * @param array $params
306+ * @return array
307+ * @throws \KuCoin\SDK\Exceptions\BusinessException
308+ * @throws \KuCoin\SDK\Exceptions\HttpException
309+ * @throws \KuCoin\SDK\Exceptions\InvalidApiUriException
310+ */
311+ public function deleteSubUserApiKey (array $ params = [])
312+ {
313+ $ response = $ this ->call (Request::METHOD_DELETE , '/api/v1/sub/api-key ' , $ params );
314+ return $ response ->getApiData ();
315+ }
316+
317+ /**
318+ * Get the aggregated balance of all sub-accounts of the current user for V2 version.
319+ * @param array $params
320+ * @return array
321+ * @throws \KuCoin\SDK\Exceptions\BusinessException
322+ * @throws \KuCoin\SDK\Exceptions\HttpException
323+ * @throws \KuCoin\SDK\Exceptions\InvalidApiUriException
324+ */
325+ public function getSubAccountListV2 (array $ params = [])
326+ {
327+ $ response = $ this ->call (Request::METHOD_GET , '/api/v2/sub-accounts ' , $ params );
328+ return $ response ->getApiData ();
329+ }
330+
331+ /**
332+ * Get transferable funds under the specified account and currency.
333+ * @param array $params
334+ * @return array
335+ * @throws \KuCoin\SDK\Exceptions\BusinessException
336+ * @throws \KuCoin\SDK\Exceptions\HttpException
337+ * @throws \KuCoin\SDK\Exceptions\InvalidApiUriException
338+ */
339+ public function getAccountTransferable (array $ params = [])
340+ {
341+ $ response = $ this ->call (Request::METHOD_GET , '/api/v1/accounts/transferable ' , $ params );
342+ return $ response ->getApiData ();
343+ }
344+
345+ /**
346+ * Get account ledgers for high-frequency.
347+ * @param array $params
348+ * @return array
349+ * @throws \KuCoin\SDK\Exceptions\BusinessException
350+ * @throws \KuCoin\SDK\Exceptions\HttpException
351+ * @throws \KuCoin\SDK\Exceptions\InvalidApiUriException
352+ */
353+ public function getHfLedgersV2 (array $ params = [])
354+ {
355+ $ response = $ this ->call (Request::METHOD_GET , '/api/v1/hf/accounts/ledgers ' , $ params );
356+ return $ response ->getApiData ();
357+ }
358+
359+ }
0 commit comments