Skip to content

Commit 6fdb6fc

Browse files
author
Jesse Thouin
committed
Alpaca removed OrderTimeInForce.DAY as a valid time in force for crypto orders.
1 parent eb7f551 commit 6fdb6fc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/main/java/net/jacobpeterson/alpaca/rest/endpoint/orders/OrdersEndpoint.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,15 @@ public Order requestMarketOrder(String symbol, Integer quantity, OrderSide side,
242242
* most likely method of filling an order. Market orders fill nearly instantaneously. This method calls {@link
243243
* #requestOrder(String, Double, Double, OrderSide, OrderType, OrderTimeInForce, Double, Double, Double, Double,
244244
* Boolean, String, OrderClass, Double, Double, Double)} with {@link OrderType#MARKET} and {@link
245-
* OrderTimeInForce#DAY} with a fractional quantity so check the Javadoc for that method for parameter details.
245+
* OrderTimeInForce#GOOD_UNTIL_CANCELLED} with a fractional quantity so check the Javadoc for that method for parameter details.
246246
*
247247
* @return the requested {@link Order}
248248
*
249249
* @throws AlpacaClientException thrown for {@link AlpacaClientException}s
250250
*/
251251
public Order requestFractionalMarketOrder(String symbol, Double quantity, OrderSide side)
252252
throws AlpacaClientException {
253-
return requestOrder(symbol, quantity, null, side, OrderType.MARKET, OrderTimeInForce.DAY, null, null, null,
253+
return requestOrder(symbol, quantity, null, side, OrderType.MARKET, OrderTimeInForce.GOOD_UNTIL_CANCELLED, null, null, null,
254254
null, null, null, null, null, null, null);
255255
}
256256

@@ -259,7 +259,7 @@ public Order requestFractionalMarketOrder(String symbol, Double quantity, OrderS
259259
* most likely method of filling an order. Market orders fill nearly instantaneously. This method calls {@link
260260
* #requestOrder(String, Double, Double, OrderSide, OrderType, OrderTimeInForce, Double, Double, Double, Double,
261261
* Boolean, String, OrderClass, Double, Double, Double)} with {@link OrderType#MARKET} and {@link
262-
* OrderTimeInForce#DAY} with a notional dollar amount so check the Javadoc for that method for the parameter
262+
* OrderTimeInForce#GOOD_UNTIL_CANCELLED} with a notional dollar amount so check the Javadoc for that method for the parameter
263263
* details.
264264
*
265265
* @return the requested {@link Order}
@@ -268,7 +268,7 @@ public Order requestFractionalMarketOrder(String symbol, Double quantity, OrderS
268268
*/
269269
public Order requestNotionalMarketOrder(String symbol, Double notional, OrderSide side)
270270
throws AlpacaClientException {
271-
return requestOrder(symbol, null, notional, side, OrderType.MARKET, OrderTimeInForce.DAY, null, null, null,
271+
return requestOrder(symbol, null, notional, side, OrderType.MARKET, OrderTimeInForce.GOOD_UNTIL_CANCELLED, null, null, null,
272272
null, null, null, null, null, null, null);
273273
}
274274

0 commit comments

Comments
 (0)