Update order
REQUEST wss://ws.bitvavo.com/v2 privateUpdateOrder
Updates an existing limit or trigger order.
Authentication required. To send messages, you need to authenticate connection.
You must set either orderId or clientOrderId. If you set both, we use the clientOrderId to identify the order. clientOrderId is only returned if you set it when you created the order.
Updating an order is faster than canceling and creating new orders. During the update, your order is briefly removed from the order book.
Rate limit weight points: 1
Request
- Schema
- Example (body)
Body
FOK: Fill-Or-Kill. Fills the entire order from existing orders, or cancels the entire order.GTC: Good-Til-Canceled. Stays in the order book until the entire order is filled or you manually cancel it.IOC: Immediate-Or-Cancel. Fills existing orders and cancels the unfilled balance.decrementAndCancel: (default) decreases the amount in the conflicting order by the difference between the buy and sell orders in the same market. Cancels the lower order. For example, if a sell order is for 500 BTC and a buy order is for 300 BTC, it cancels the buy order and adjusts the sell order to 200 BTC.cancelOldest: cancels the older conflicting order in the same market.cancelNewest: cancels the later conflicting order in the same market.cancelBoth: cancels both conflicting orders in the same market.
Set value to privateUpdateOrder.
privateUpdateOrderYour identifier for the request.
1The market in which to update an order.
BTC-EURYour identifier for the trader or the bot within your account that made the request.
543462Bitvavo identifier of the order to update.
95d92d6c-ecf0-4960-a608-9953ef71652eYour identifier of the order to update. Must be unique among open orders.
If both
clientOrderIdandorderIdare set, we use theclientOrderIdto identify the order.
2be7d0df-d8dc-7b93-a550-8876f3b393e9The amount of base currency to update. Specifying the amount automatically adjusts the amountRemaining.
To get the number of allowed decimals, make a Get markets request and check the quantityDecimals field.
1.567Only for takeProfit and stopLoss orders that are not triggered yet. The amount of quote currency to buy or sell at the best available price.
To get the number of allowed decimals, make a Get markets request and check the
notionalDecimalsfield.
5000The remaining amount of base currency to update. Specifying the amountRemaining automatically adjusts the amount.
We discourage updating the
amountRemainingbecause you can end up buying or selling more than you intended.
1.560The amount of quote currency for 1 unit of the base currency.
Must be a multiple of the
tickSizevalue for the market. To get thetickSize, make a Get markets request.
6000Only for stop orders. The trigger price in quote currency for which you want to buy or sell 1 unit of the base currency.
You can only update orders that have not been triggered yet.
4000How long an orderType stays active for. Possible values:
You can only update orders that have not been triggered yet.
Possible values: [GTC, IOC, FOK]
Self-trading is not allowed on Bitvavo.
Indicates how to prevent self-trading for conflicting orders of any type.
Possible values:
Possible values: [decrementAndCancel, cancelOldest, cancelNewest, cancelBoth]
If true, cancels limit orders that match immediately. This ensures you pay the maker fee and not the taker fee.
Indicates whether the response returns all parameters (true) or only the HTTP status code (false).
true{
"action": "privateUpdateOrder",
"requestId": 1,
"market": "BTC-EUR",
"operatorId": 543462,
"orderId": "95d92d6c-ecf0-4960-a608-9953ef71652e",
"clientOrderId": "2be7d0df-d8dc-7b93-a550-8876f3b393e9",
"amount": "1.567",
"amountQuote": "5000",
"amountRemaining": "1.560",
"price": "6000",
"triggerAmount": "4000",
"timeInForce": "GTC",
"selfTradePrevention": "decrementAndCancel",
"postOnly": false,
"responseRequired": true
}
Response
- responseRequired=true
- responseRequired=false
- Schema
- Example (body)
Schema
new: theorderIdhas been added to the order book and has not been filled.awaitingTrigger: the conditions to fill an order haven't been met.canceled: theorderIdhas been removed from the order book.expired: the market order expires because there is no match, enough liquidity in the order book, or enough balance in your account.filled: all trades necessary to complete the order have been filled.partiallyFilled: the order is still active. Bitvavo needs to receive more matching orders to completely fill the order.- Array [
- ]
decrementAndCancel: (default) decreases the amount in the conflicting order by the difference between the buy and sell orders in the same market. Cancels the lower order. For example, if a sell order is for 500 BTC and a buy order is for 300 BTC, it cancels the buy order and adjusts the sell order to 200 BTC.cancelOldest: cancels the older conflicting order in the same market.cancelNewest: cancels the later conflicting order in the same market.cancelBoth: cancels both conflicting orders in the same market.
The action performed.
Your identifier for the request.
1response object
Bitvavo identifier of the order. An orderId is unique per market. Different markets can use the same orderId values.
1be6d0df-d5dc-4b53-a250-3376f3b393e6Your identifier of the order. Only returned if specified in the request.
2be7d0df-d8dc-7b93-a550-8876f3b393e9The market where you created an order.
BTC-EURThe Unix timestamp in milliseconds when the order was created.
1706100650751The Unix timestamp in milliseconds when the order was last updated.
1706100650751The status of an order. Possible values:
Possible values: [new, awaitingTrigger, canceled, expired, filled, partiallyFilled]
Indicates whether the order is to buy or sell the asset.
Possible values: [buy, sell]
The type of order you created.
Possible values: [limit, market]
The quantity of the base currency to buy or sell.
If you set amountQuote in your order, amount is not returned.
10The quantity of the base currency remaining after the sum of fills is subtracted from the amount.
If you set amountQuote in your order, amountRemaining is not returned.
10The price you set for a limit, stopLossLimit, takeProfit, or a takeProfitLimit order.
For other types of orders, the price is not returned.
7000The quantity of the quote currency to buy or sell for the market, stopLoss, or takeProfit types of order.
If you set amount in your order, amountQuote is not returned.
5000The quantity of the quote currency remaining after the sum of all fills is
subtracted from amountQuote.
If you set amount in the order, amountQuoteRemaining is not returned.
5000The amount of onHoldCurrency locked while an order is not yet settled after an order is filled.
All funds are released when order is filled.
9109.61The currency that is onHold while the order is processed. This depends on the side you set for the orderId.
BTCThe price calculated using triggerAmount and
triggerType for the stopLoss, stopLossLimit, takeProfit, or takeProfitLimit
types of orders.
For example, when you set triggerAmount to 4000 and triggerType to price, your order is placed in a market
when the triggerReference price in quote currency reaches 4000.
4000The trigger price in quote currency for which you want to buy or sell 1 unit of the base currency.
This value and triggerType are used to calculate triggerPrice.
4000The type of trigger you set to fill the order when the condition is met. This value and triggerAmount are used to calculate triggerPrice.
Possible values: [price]
The price you set to trigger the order to be filled for the stopLoss, stopLossLimit, takeProfit, or takeProfitLimit types of orders.
Possible values: [lastTrade, bestBid, bestAsk, midPrice]
The total amount bought or sold in base currency.
0The total amount bought or sold in quote currency.
0The amount you pay Bitvavo to process the order. This value is negative for rebates. For more information, see GET /account/fees.
0The currency of the feePaid.
EURfills object[]
A JSON object containing all fills for orderId.
The identifier of this fill.
371c6bd3-d06d-4573-9f15-18697cd210e5The Unix timestamp in milliseconds when Bitvavo processed the fill.
1542967486256The amount of base currency exchanged in the fill.
0.005The price of the fill in quote currency.
5000.1Returns true when you are the taker for the fill.
trueThe amount you pay Bitvavo in feeCurrency to process the fill. For more information about your fees, see
GET /account/fees. This value is negative for rebates.
If settled is false, this parameter is not included in the return parameters.
0.03The currency that the fee is paid in.
If settled is false, this object is not returned.
EUROn Bitvavo, trade settlement happens after an order is filled. When the fill is complete and the fee is not yet
paid, settled is false.
Self-trading is not allowed on Bitvavo.
Indicates how to prevent self-trading for conflicting orders of any type.
Possible values:
Possible values: [decrementAndCancel, cancelOldest, cancelNewest, cancelBoth]
Returns true when the orderId is visible in the order book for a market.
The value you set for how long an order stays active.
Possible values: [GTC, IOC, FOK]
If true, cancels limit orders that match immediately. This ensures you pay the maker fee and not the taker fee.
Must be false because market protection can no longer be disabled.
Your identifier for the trader or the bot within your account.
543462Specifies the reason why the status of the order was changed. For example, when an order is canceled by the Price protection checks.
Possible values: [decrementOnSelfTradePrevention, cancelOnSelfTradePrevention, cancelOnPlacementPriceProtection, cancelOnExecutionPriceProtection, cancelOnSpreadProtection, cancelOnReferencePriceProtection, cancelPostOnlyOnAuctionMatching, cancelOnMaintenance, cancelOnDisconnect, cancelOnDelisting, cancelOnLockPlaced, cancelOnAdminRequest, cancelPostOnly]
The Unix timestamp in nanoseconds when the order was created.
1752139200000000000The Unix timestamp in nanoseconds when the order was last updated.
1752139200000000000{
"action": "string",
"requestId": 1,
"response": {
"orderId": "1be6d0df-d5dc-4b53-a250-3376f3b393e6",
"clientOrderId": "2be7d0df-d8dc-7b93-a550-8876f3b393e9",
"market": "BTC-EUR",
"created": 1706100650751,
"updated": 1706100650751,
"status": "new",
"side": "buy",
"orderType": "limit",
"amount": "10",
"amountRemaining": "10",
"price": "7000",
"amountQuote": "5000",
"amountQuoteRemaining": "5000",
"onHold": "9109.61",
"onHoldCurrency": "BTC",
"triggerPrice": "4000",
"triggerAmount": "4000",
"triggerType": "price",
"triggerReference": "lastTrade",
"filledAmount": "0",
"filledAmountQuote": "0",
"feePaid": "0",
"feeCurrency": "EUR",
"fills": [
{
"id": "371c6bd3-d06d-4573-9f15-18697cd210e5",
"timestamp": 1542967486256,
"amount": "0.005",
"price": "5000.1",
"taker": true,
"fee": "0.03",
"feeCurrency": "EUR",
"settled": false
}
],
"selfTradePrevention": "decrementAndCancel",
"visible": false,
"timeInForce": "GTC",
"postOnly": false,
"disableMarketProtection": false,
"operatorId": 543462,
"restatementReason": "decrementOnSelfTradePrevention",
"createdNs": 1752139200000000000,
"updatedNs": 1752139200000000000,
"codGroupId": 1
}
}
- Schema
- Example (body)
Schema
The action performed.
Your identifier for the request.
1response object
The market where you created an order.
BTC-EURThe identifier of the order.
1be6d0df-d5dc-4b53-a250-3376f3b393e6Your identifier of the order. Only returned if specified in the request.
2be7d0df-d8dc-7b93-a550-8876f3b393e9The Unix timestamp in milliseconds when the order was created.
1706100650751The Unix timestamp in milliseconds when the order was last updated.
1706100650751The Unix timestamp in nanoseconds when the order was created.
1752139200000000000The Unix timestamp in nanoseconds when the order was last updated.
1752139200000000000{
"action": "string",
"requestId": 1,
"response": {
"market": "BTC-EUR",
"orderId": "1be6d0df-d5dc-4b53-a250-3376f3b393e6",
"clientOrderId": "2be7d0df-d8dc-7b93-a550-8876f3b393e9",
"created": 1706100650751,
"updated": 1706100650751,
"createdNs": 1752139200000000000,
"updatedNs": 1752139200000000000
}
}