diff --git a/src/Api/Support/PendingOrder.php b/src/Api/Support/PendingOrder.php index d73b0ca..a9b7d98 100644 --- a/src/Api/Support/PendingOrder.php +++ b/src/Api/Support/PendingOrder.php @@ -33,6 +33,7 @@ public function market(float $size) : self { $this->attributes['type'] = self::TYPE_MARKET; $this->attributes['size'] = $size; + $this->attributes['price'] = null; return $this; } diff --git a/tests/Api/OrdersTest.php b/tests/Api/OrdersTest.php index 60ee0d4..adf4f37 100644 --- a/tests/Api/OrdersTest.php +++ b/tests/Api/OrdersTest.php @@ -118,7 +118,7 @@ public function testCreateOrder() $this->assertEquals('BTC-PERP', $order->market); $this->assertEquals(99.9, $order->size); $this->assertEquals( - ['market' => 'BTC-PERP', 'size' => 99.9, 'type' => 'market', 'side' => 'sell', 'ioc' => true], + ['market' => 'BTC-PERP', 'size' => 99.9, 'type' => 'market', 'side' => 'sell', 'ioc' => true, 'price' => null], $order->toArray() ); @@ -138,7 +138,7 @@ public function testCreateOrder() $this->assertEquals('BTC-PERP', $order->market); $this->assertEquals(10, $order->size); $this->assertEquals( - ['market' => 'BTC-PERP', 'size' => 10, 'type' => 'market', 'side' => 'buy', 'reduceOnly' => true, 'clientId' => 'foo'], + ['market' => 'BTC-PERP', 'size' => 10, 'type' => 'market', 'side' => 'buy', 'reduceOnly' => true, 'clientId' => 'foo', 'price' => null], $order->toArray() ); }