Skip to main content

Create order

REQUEST wss://ws.bitvavo.com/v2 privateCreateOrder

Creates an order to buy or sell digital assets on Bitvavo.

info

Authentication required. To send messages, you need to authenticate connection.

warning

You can have a maximum of 100 open orders at any one time in each market.

Rate limit weight points: 1

Request

Body
    actionstring

    Set value to privateCreateOrder.

    Example: privateCreateOrder
    requestIdinteger

    Your identifier for the request.

    Example: 1
    marketstringrequired

    The market in which to create the order.

    Example: BTC-EUR
    sidestringrequired

    Indicates whether the order is to buy or sell the asset.

    Possible values: [buy, sell]

    orderTypestringrequired

    The type of order to create. Possible values:

    • market: an order to buy or sell digital assets at the current market price.
    • limit: an order to buy or sell digital assets at the specified price or 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 specified price or 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 specified price or better when the market price is better or equal to your stop price. Better means higher for sell orders and lower for buy orders.

    For limit orders, you need to set amount and price. For market orders, you need to set either amount or amountQuote.

    Possible values: [market, limit, stopLoss, stopLossLimit, takeProfit, takeProfitLimit]

    operatorIdinteger<int64>required

    Your identifier for the trader or the bot within your account that made the request.

    Example: 543462
    clientOrderIdstring<UUID>

    Your identifier of the order. Must be unique across open orders.

    Example: 2be7d0df-d8dc-7b93-a550-8876f3b393e9
    amountstring

    The 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.

    Example: 1.567
    amountQuotestring

    The 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.

    Example: 5000
    pricestring

    The price in quote currency for which you want to buy or sell 1 unit of the base currency.


    Must be a multiple of the tickSize value for the market. To get the tickSize, make a Get markets request.

    Example: 6000
    triggerAmountstring

    The trigger price in quote currency for which you want to buy or sell 1 unit of the base currency.

    Example: 4000
    triggerTypestring

    The type of trigger that fills the order when the condition is met.

    Possible values: [price]

    triggerReferencestring

    The price which triggers the order to be filled for stopLoss, stopLossLimit, takeProfit, or takeProfitLimit types of orders.

    Possible values: [lastTrade, bestBid, bestAsk, midPrice]

    timeInForcestring

    How long an order stays active for.

    Possible values: [GTC, IOC, FOK]

    Default value: GTC
    postOnlyboolean

    If true, cancels limit orders that match immediately. This ensures you pay the maker fee and not the taker fee.

    Default value: false
    selfTradePreventionstring

    Prevents self-trading for conflicting orders.

    Possible values: [cancelBoth, cancelNewest, cancelOldest, decrementAndCancel]

    Default value: decrementAndCancel
    disableMarketProtectionbooleandeprecated

    Must be false because market protection can no longer be disabled.

    Default value: false
    responseRequiredboolean

    Indicates whether the response returns all parameters (true) or only the HTTP status code (false).

    Default value: true
    codGroupIdinteger

    Your identifier for a group of orders.

    Possible values: >= 1 and <= 1000

    Example: 1

Response

Schema
    actionstring

    The action performed.

    requestIdinteger

    Your identifier for the request.

    Example: 1
    response object
    orderIdstring<UUID>

    Bitvavo identifier of the order. An orderId is unique per market. Different markets can use the same orderId values.

    Example: 1be6d0df-d5dc-4b53-a250-3376f3b393e6
    clientOrderIdstring<UUID>

    Your identifier of the order. Only returned if specified in the request.

    Example: 2be7d0df-d8dc-7b93-a550-8876f3b393e9
    marketstring

    The market where you created an order.

    Example: BTC-EUR
    createdinteger

    The Unix timestamp in milliseconds when the order was created.

    Example: 1706100650751
    updatedinteger

    The Unix timestamp in milliseconds when the order was last updated.

    Example: 1706100650751
    statusstring

    The status of an order. Possible values:

    • new: the orderId has been added to the order book and has not been filled.
    • awaitingTrigger: the conditions to fill an order haven't been met.
    • canceled: the orderId has 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.

    Possible values: [new, awaitingTrigger, canceled, expired, filled, partiallyFilled]

    sidestring

    Indicates whether the order is to buy or sell the asset.

    Possible values: [buy, sell]

    orderTypestring

    The type of order you created.

    Possible values: [limit, market]

    amountstring

    The quantity of the base currency to buy or sell. If you set amountQuote in your order, amount is not returned.

    Example: 10
    amountRemainingstring

    The 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.

    Example: 10
    pricestring

    The price you set for a limit, stopLossLimit, takeProfit, or a takeProfitLimit order. For other types of orders, the price is not returned.

    Example: 7000
    amountQuotestring

    The 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.

    Example: 5000
    amountQuoteRemainingstring

    The 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.

    Example: 5000
    onHoldstring

    The amount of onHoldCurrency locked while an order is not yet settled after an order is filled. All funds are released when order is filled.

    Example: 9109.61
    onHoldCurrencystring

    The currency that is onHold while the order is processed. This depends on the side you set for the orderId.

    Example: BTC
    triggerPricestring

    The 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.

    Example: 4000
    triggerAmountstring

    The 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.

    Example: 4000
    triggerTypestring

    The 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]

    triggerReferencestring

    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]

    filledAmountstring

    The total amount bought or sold in base currency.

    Example: 0
    filledAmountQuotestring

    The total amount bought or sold in quote currency.

    Example: 0
    feePaidstring

    The amount you pay Bitvavo to process the order. This value is negative for rebates. For more information, see GET /account/fees.

    Example: 0
    feeCurrencystring

    The currency of the feePaid.

    Example: EUR
    fills object[]

    A JSON object containing all fills for orderId.

  • Array [
  • idstring

    The identifier of this fill.

    Example: 371c6bd3-d06d-4573-9f15-18697cd210e5
    timestampinteger

    The Unix timestamp in milliseconds when Bitvavo processed the fill.

    Example: 1542967486256
    amountstring

    The amount of base currency exchanged in the fill.

    Example: 0.005
    pricestring

    The price of the fill in quote currency.

    Example: 5000.1
    takerboolean

    Returns true when you are the taker for the fill.

    Example: true
    feestring

    The 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.

    Example: 0.03
    feeCurrencystring

    The currency that the fee is paid in.

    If settled is false, this object is not returned.

    Example: EUR
    settledboolean

    On Bitvavo, trade settlement happens after an order is filled. When the fill is complete and the fee is not yet paid, settled is false.

  • ]
  • selfTradePreventionstring

    Self-trading is not allowed on Bitvavo.

    Indicates how to prevent self-trading for conflicting orders of any type.

    Possible values:

    • 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.

    Possible values: [decrementAndCancel, cancelOldest, cancelNewest, cancelBoth]

    visibleboolean

    Returns true when the orderId is visible in the order book for a market.

    timeInForcestring

    The value you set for how long an order stays active.

    Possible values: [GTC, IOC, FOK]

    postOnlyboolean

    If true, cancels limit orders that match immediately. This ensures you pay the maker fee and not the taker fee.

    disableMarketProtectionbooleandeprecated

    Must be false because market protection can no longer be disabled.

    operatorIdinteger<int64>

    Your identifier for the trader or the bot within your account.

    Example: 543462
    restatementReasonstring

    Specifies 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]

    createdNsinteger

    The Unix timestamp in nanoseconds when the order was created.

    Example: 1752139200000000000
    updatedNsinteger

    The Unix timestamp in nanoseconds when the order was last updated.

    Example: 1752139200000000000
    codGroupIdinteger

    Your identifier for a group of orders.

    Example: 1