public static CoinbaseProPlaceOrder adaptCoinbaseProStopOrder ( StopOrder stopOrder ) { // stop orders can also execute as 'stop limit' orders, that is converting to // a limit order, but a traditional 'stop' order converts to a market order if ( stopOrder . getLimitPrice ( ) == null ) { return new CoinbaseProPlaceMarketOrder . Builder ( ) . productId ( adaptProductID ( stopOrder . getCurrencyPair ( ) ) ) . type ( CoinbaseProPlaceOrder . Type . market ) . side ( adaptSide ( stopOrder . getType ( ) ) ) . size ( stopOrder . getOriginalAmount ( ) ) . stop ( adaptStop ( stopOrder . getType ( ) ) ) . stopPrice ( stopOrder . getStopPrice ( ) ) . build ( ) ; } return new CoinbaseProPlaceLimitOrder . Builder ( ) . productId ( adaptProductID ( stopOrder . getCurrencyPair ( ) ) ) . type ( CoinbaseProPlaceOrder . Type . limit ) . side ( adaptSide ( stopOrder . getType ( ) ) ) . size ( stopOrder . getOriginalAmount ( ) ) . stop ( adaptStop ( stopOrder . getType ( ) ) ) . stopPrice ( stopOrder . getStopPrice ( ) ) . price ( stopOrder . getLimitPrice ( ) ) . build ( ) ; }
Creates a stop order . Stop limit order converts to a limit order when the stop amount is triggered . The limit order can have a different price than the stop price .