Create order
REQUEST wss://ws.bitvavo.com/v2 privateCreateOrder
Creates an order to buy or sell digital assets on Bitvavo.
Authentication required. To send messages, you need to authenticate connection.
You can have a maximum of 100 open orders at any one time in each market.
Rate limit weight points: 1
Request
- Schema
- Example (body)
Body
market: an order to buy or sell digital assets at the current marketprice.limit: an order to buy or sell digital assets at the specifiedpriceor better.stopLoss: a market order to buy or sell digital assets when the market price is worse or equal to your stop price. Worse means lower for sell orders and higher for buy orders.stopLossLimit: a limit order to buy or sell digital assets at the specifiedpriceor better when the market price is worse or equal to your stop price. Worse means lower for sell orders and higher for buy orders.takeProfit: a market order to buy or sell digital assets when the market price is better or equal to your stop price. Better means higher for sell orders and lower for buy orders.takeProfitLimit: a limit order to buy or sell digital assets at the specifiedpriceor better when the market price is better or equal to your stop price. Better means higher for sell orders and lower for buy orders.
Set value to privateCreateOrder.
privateCreateOrderYour identifier for the request.
1The market in which to create the order.
BTC-EURIndicates whether the order is to buy or sell the asset.
Possible values: [buy, sell]
The type of order to create. Possible values:
For limit orders, you need to set
amountandprice. For market orders, you need to set eitheramountoramountQuote.
Possible values: [market, limit, stopLoss, stopLossLimit, takeProfit, takeProfitLimit]
Your identifier for the trader or the bot within your account that made the request.
543462Your identifier of the order. Must be unique across open orders.
2be7d0df-d8dc-7b93-a550-8876f3b393e9The quantity of the base currency to buy or sell. To get the number of allowed decimals, make a Get markets request and check the quantityDecimals field.
1.567The quantity of the quote currency to buy or sell for the market, stopLoss, or takeProfit order types. To get the number of allowed decimals, make a Get markets request and check the quantityDecimals field.
5000The price in quote currency for which you want to buy or sell 1 unit of the base currency.
Must be a multiple of the
tickSizevalue for the market. To get thetickSize, make a Get markets request.
6000The trigger price in quote currency for which you want to buy or sell 1 unit of the base currency.
4000The type of trigger that fills the order when the condition is met.
Possible values: [price]
The price which triggers the order to be filled for stopLoss, stopLossLimit, takeProfit, or takeProfitLimit types of orders.
Possible values: [lastTrade, bestBid, bestAsk, midPrice]
How long an order stays active for.
Possible values: [GTC, IOC, FOK]
GTCIf true, cancels limit orders that match immediately. This ensures you pay the maker fee and not the taker fee.
falsePrevents self-trading for conflicting orders.
Possible values: [cancelBoth, cancelNewest, cancelOldest, decrementAndCancel]
decrementAndCancelMust be false because market protection can no longer be disabled.
falseIndicates whether the response returns all parameters (true) or only the HTTP status code (false).
true{
"action": "privateCreateOrder",
"requestId": 1,
"market": "BTC-EUR",
"side": "buy",
"orderType": "market",
"operatorId": 543462,
"clientOrderId": "2be7d0df-d8dc-7b93-a550-8876f3b393e9",
"amount": "1.567",
"amountQuote": "5000",
"price": "6000",
"triggerAmount": "4000",
"triggerType": "price",
"triggerReference": "lastTrade",
"timeInForce": "GTC",
"postOnly": false,
"selfTradePrevention": "decrementAndCancel",
"disableMarketProtection": false,
"responseRequired": true,
"codGroupId": 1
}
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
}
}