@@ -546,10 +546,11 @@ let api = function Bitvavo() {
546546 // stopLoss/takeProfit:(amount, amountQuote, disableMarketProtection, triggerType, triggerReference, triggerAmount)
547547 // stopLossLimit/takeProfitLimit:(amount, price, postOnly, triggerType, triggerReference, triggerAmount)
548548 // all orderTypes: timeInForce, selfTradePrevention, responseRequired
549- placeOrder : function ( market = '' , side = '' , orderType = '' , body = { } , callback = false ) {
549+ placeOrder : function ( market = '' , side = '' , orderType = '' , operatorId = 0 , body = { } , callback = false ) {
550550 body . market = market
551551 body . side = side
552552 body . orderType = orderType
553+ body . operatorId = operatorId
553554 return request ( callback , 'POST' , '/order' , { } , body )
554555 } ,
555556
@@ -566,14 +567,15 @@ let api = function Bitvavo() {
566567 // Optional body parameters: limit:(amount, amountRemaining, price, timeInForce, selfTradePrevention, postOnly)
567568 // untriggered stopLoss/takeProfit:(amount, amountQuote, disableMarketProtection, triggerType, triggerReference, triggerAmount)
568569 // stopLossLimit/takeProfitLimit: (amount, price, postOnly, triggerType, triggerReference, triggerAmount)
569- updateOrder : function ( market = '' , orderId = '' , body = { } , callback = false ) {
570+ updateOrder : function ( market = '' , orderId = '' , operatorId = 0 , body = { } , callback = false ) {
570571 body . market = market
571572 body . orderId = orderId
573+ body . operatorId = operatorId
572574 return request ( callback , 'PUT' , '/order' , { } , body )
573575 } ,
574576
575- cancelOrder : function ( symbol = '' , orderId = '' , callback = false ) {
576- const query = { 'market' : symbol , 'orderId' : orderId }
577+ cancelOrder : function ( symbol = '' , orderId = '' , operatorId = 0 , callback = false ) {
578+ const query = { 'market' : symbol , 'orderId' : orderId , 'operatorId' : operatorId }
577579 return request ( callback , 'DELETE' , '/order' , query , { } )
578580 } ,
579581
@@ -585,7 +587,8 @@ let api = function Bitvavo() {
585587 } ,
586588
587589 // options: market
588- cancelOrders : function ( options = { } , callback = false ) {
590+ cancelOrders : function ( options = { } , operatorId = 0 , callback = false ) {
591+ options . operatorId = operatorId
589592 let query = options
590593 if ( typeof options === 'function' ) {
591594 callback = options
@@ -766,12 +769,13 @@ let api = function Bitvavo() {
766769 // stopLoss/takeProfit:(amount, amountQuote, disableMarketProtection, triggerType, triggerReference, triggerAmount)
767770 // stopLossLimit/takeProfitLimit:(amount, price, postOnly, triggerType, triggerReference, triggerAmount)
768771 // all orderTypes: timeInForce, selfTradePrevention, responseRequired
769- placeOrder : async function ( market = '' , side = '' , orderType = '' , body = { } ) {
772+ placeOrder : async function ( market = '' , side = '' , orderType = '' , operatorId = 0 , body = { } ) {
770773 await this . checkSocket ( )
771774 body . action = 'privateCreateOrder'
772775 body . market = market
773776 body . side = side
774777 body . orderType = orderType
778+ body . operatorId = operatorId
775779 doSendPrivate . call ( this , JSON . stringify ( body ) )
776780 } ,
777781
@@ -794,19 +798,21 @@ let api = function Bitvavo() {
794798 // Optional body parameters: limit:(amount, amountRemaining, price, timeInForce, selfTradePrevention, postOnly)
795799 // untriggered stopLoss/takeProfit:(amount, amountQuote, disableMarketProtection, triggerType, triggerReference, triggerAmount)
796800 // stopLossLimit/takeProfitLimit: (amount, price, postOnly, triggerType, triggerReference, triggerAmount)
797- updateOrder : async function ( market = '' , orderId = '' , body = { } ) {
801+ updateOrder : async function ( market = '' , orderId = '' , operatorId = 0 , body = { } ) {
798802 await this . checkSocket ( )
799803 body . action = 'privateUpdateOrder'
800804 body . market = market
801805 body . orderId = orderId
806+ body . operatorId = operatorId
802807 doSendPrivate . call ( this , JSON . stringify ( body ) )
803808 } ,
804809
805- cancelOrder : async function ( market = '' , orderId = '' ) {
810+ cancelOrder : async function ( market = '' , orderId = '' , operatorId = 0 ) {
806811 await this . checkSocket ( )
807812 let options = { 'action' : 'privateCancelOrder' }
808813 options . market = market
809814 options . orderId = orderId
815+ options . operatorId = operatorId
810816 doSendPrivate . call ( this , JSON . stringify ( options ) )
811817 } ,
812818
@@ -819,9 +825,10 @@ let api = function Bitvavo() {
819825 } ,
820826
821827 // options: market
822- cancelOrders : async function ( options = { } ) {
828+ cancelOrders : async function ( options = { } , operatorId = 0 ) {
823829 await this . checkSocket ( )
824830 options . action = 'privateCancelOrders'
831+ options . operatorId = operatorId
825832 doSendPrivate . call ( this , JSON . stringify ( options ) )
826833 } ,
827834
0 commit comments