File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ public function getOpenOrderStatistics($symbol = null)
164164 */
165165 public function getDetailByClientOid ($ clientOid )
166166 {
167- $ response = $ this ->call (Request::METHOD_GET , '/api/v1/orders/ ' . $ clientOid , ['clientOid ' => $ clientOid ]);
167+ $ response = $ this ->call (Request::METHOD_GET , '/api/v1/orders/byClientOid ' , ['clientOid ' => $ clientOid ]);
168168 return $ response ->getApiData ();
169169 }
170170
Original file line number Diff line number Diff line change @@ -237,7 +237,19 @@ private function getOrderId($api)
237237 */
238238 public function testGetDetailByClientOid (Order $ api )
239239 {
240- $ clientOid = 'eresc138b21023a909e5ad59 ' ;
240+ $ clientOid = uniqid ();
241+ $ order = [
242+ 'clientOid ' => $ clientOid ,
243+ 'type ' => 'limit ' ,
244+ 'side ' => 'buy ' ,
245+ 'symbol ' => 'XBTUSDTM ' ,
246+ 'leverage ' => 1 ,
247+ 'remark ' => 'create test order ' ,
248+ 'price ' => '1 ' ,
249+ 'size ' => '1 ' ,
250+ ];
251+
252+ $ api ->create ($ order );
241253 $ order = $ api ->getDetailByClientOid ($ clientOid );
242254 $ this ->assertArrayHasKey ('symbol ' , $ order );
243255 $ this ->assertArrayHasKey ('hidden ' , $ order );
@@ -257,6 +269,7 @@ public function testGetDetailByClientOid(Order $api)
257269 $ this ->assertArrayHasKey ('status ' , $ order );
258270 $ this ->assertArrayHasKey ('updatedAt ' , $ order );
259271 $ this ->assertArrayHasKey ('orderTime ' , $ order );
272+ $ api ->cancel ($ order ['id ' ]);
260273 }
261274
262275 /**
You can’t perform that action at this time.
0 commit comments