@@ -230,7 +230,10 @@ public function ticker24h($options) {
230230 return $ this ->sendPublic ($ this ->base . "/ticker/24h " , $ options , "GET " , "" );
231231 }
232232
233- // optional body parameters: limit:(amount, price, postOnly), market:(amount, amountQuote, disableMarketProtection), both: timeInForce, selfTradePrevention, responseRequired
233+ // optional body parameters: limit:(amount, price, postOnly), market:(amount, amountQuote, disableMarketProtection)
234+ // stopLoss/takeProfit:(amount, amountQuote, disableMarketProtection, triggerType, triggerReference, triggerAmount)
235+ // stopLossLimit/takeProfitLimit:(amount, price, postOnly, triggerType, triggerReference, triggerAmount)
236+ // all orderTypes: timeInForce, selfTradePrevention, responseRequired
234237 public function placeOrder ($ market , $ side , $ orderType , $ body ) {
235238 $ body ["market " ] = $ market ;
236239 $ body ["side " ] = $ side ;
@@ -244,7 +247,8 @@ public function getOrder($market, $orderId) {
244247 }
245248
246249 // Optional body parameters: limit:(amount, amountRemaining, price, timeInForce, selfTradePrevention, postOnly)
247- // (set at least 1) (responseRequired can be set as well, but does not update anything)
250+ // untriggered stopLoss/takeProfit:(amount, amountQuote, disableMarketProtection, triggerType, triggerReference, triggerAmount)
251+ // stopLossLimit/takeProfitLimit: (amount, price, postOnly, triggerType, triggerReference, triggerAmount)
248252 public function updateOrder ($ market , $ orderId , $ body ) {
249253 $ body ["market " ] = $ market ;
250254 $ body ["orderId " ] = $ orderId ;
@@ -278,6 +282,10 @@ public function trades($market, $options) {
278282 return $ this ->sendPrivate ("/trades " , $ options , [], "GET " , $ this ->apiSecret , $ this ->base , $ this ->apiKey );
279283 }
280284
285+ public function account () {
286+ return $ this ->sendPrivate ("/account " , [], [], "GET " , $ this ->apiSecret , $ this ->base , $ this ->apiKey );
287+ }
288+
281289 // options: symbol
282290 public function balance ($ options ) {
283291 return $ this ->sendPrivate ("/balance " , $ options , [], "GET " , $ this ->apiSecret , $ this ->base , $ this ->apiKey );
@@ -518,6 +526,9 @@ public function handleMessage($msg) {
518526 case "privateGetTrades " :
519527 call_user_func ($ this ->tradesCallback , $ jsonResponse ["response " ]);
520528 break ;
529+ case "privateGetAccount " :
530+ call_user_func ($ this ->accountCallback , $ jsonResponse ["response " ]);
531+ break ;
521532 case "privateGetBalance " :
522533 call_user_func ($ this ->balanceCallback , $ jsonResponse ["response " ]);
523534 break ;
@@ -684,7 +695,10 @@ public function tickerBook($options, callable $callback) {
684695 $ this ->sendPublic ($ options );
685696 }
686697
687- // optional body parameters: limit:(amount, price, postOnly), market:(amount, amountQuote, disableMarketProtection), both: timeInForce, selfTradePrevention, responseRequired
698+ // optional body parameters: limit:(amount, price, postOnly), market:(amount, amountQuote, disableMarketProtection)
699+ // stopLoss/takeProfit:(amount, amountQuote, disableMarketProtection, triggerType, triggerReference, triggerAmount)
700+ // stopLossLimit/takeProfitLimit:(amount, price, postOnly, triggerType, triggerReference, triggerAmount)
701+ // all orderTypes: timeInForce, selfTradePrevention, responseRequired
688702 public function placeOrder ($ market , $ side , $ orderType , $ body , callable $ callback ) {
689703 $ this ->placeOrderCallback = $ callback ;
690704 $ body ["action " ] = "privateCreateOrder " ;
@@ -700,7 +714,8 @@ public function getOrder($market, $orderId, callable $callback) {
700714 }
701715
702716 // Optional body parameters: limit:(amount, amountRemaining, price, timeInForce, selfTradePrevention, postOnly)
703- // (set at least 1) (responseRequired can be set as well, but does not update anything)
717+ // untriggered stopLoss/takeProfit:(amount, amountQuote, disableMarketProtection, triggerType, triggerReference, triggerAmount)
718+ // stopLossLimit/takeProfitLimit: (amount, price, postOnly, triggerType, triggerReference, triggerAmount)
704719 public function updateOrder ($ market , $ orderId , $ body , callable $ callback ) {
705720 $ body ["market " ] = $ market ;
706721 $ body ["orderId " ] = $ orderId ;
@@ -744,6 +759,11 @@ public function trades($market, $options, callable $callback) {
744759 $ this ->sendPrivate ($ options );
745760 }
746761
762+ public function account (callable $ callback ) {
763+ $ this ->accountCallback = $ callback ;
764+ $ this ->sendPrivate (["action " => "privateGetAccount " ]);
765+ }
766+
747767 // options: symbol
748768 public function balance ($ options , callable $ callback ) {
749769 $ options ["action " ] = "privateGetBalance " ;
0 commit comments