@@ -182,6 +182,35 @@ public function returnOrderTrades($orderNumber) {
182
182
]);
183
183
}
184
184
185
+ /**
186
+ * Returns the status of a given order, specified by the "orderNumber" POST
187
+ * parameter. If the specified orderNumber is not open, or it is not yours,
188
+ * you will receive an error.
189
+ *
190
+ * Note that returnOrderStatus, in concert with returnOrderTrades, can be
191
+ * used to determine various status information about an order:
192
+ *
193
+ * - If returnOrderStatus returns status: "Open", the order is fully open.
194
+ * - If returnOrderStatus returns status: "Partially filled", the order is
195
+ * partially filled, and returnOrderTrades may be used to find the list
196
+ * of those fills.
197
+ * - If returnOrderStatus returns an error and returnOrderTrades returns an
198
+ * error, then the order was cancelled before it was filled
199
+ * - If returnOrderStatus returns an error and returnOrderTrades returns a
200
+ * list of trades, then the order had fills and is no longer open (due
201
+ * to being completely filled, or partially filled and then cancelled).
202
+ *
203
+ * @param string $orderNumber Order number.
204
+ *
205
+ * @return json
206
+ */
207
+ public function returnOrderStatus ($ orderNumber ) {
208
+ return $ this ->request ->exec ([
209
+ 'command ' => 'returnOrderStatus ' ,
210
+ 'orderNumber ' => $ orderNumber
211
+ ]);
212
+ }
213
+
185
214
/**
186
215
* Places a limit buy order in a given market. Required POST parameters are
187
216
* "currencyPair", "rate", and "amount". If successful, the method will return
0 commit comments