openapi: 3.0.2
info:
  title: Bitvavo REST API
  version: 2.10.0
  description: |
    Trading, market data, transfers, and account management using request-response messaging over HTTP.
tags:
  - name: Market data
    description: 'Get the latest information about markets, trades, and candles on Bitvavo.'
  - name: Trading
    description: |
      Manage your orders and trades on Bitvavo.
  - name: Transfer
    description: |
      Deposit and withdraw funds on Bitvavo.
  - name: Account
    description: |
      Get information about your Bitvavo account.
  - name: Synchronization
    description: |
      Synchronize markets and assets data with your app.
paths:
  '/{market}/book':
    get:
      tags:
        - Market data
      summary: Get order book
      description: "Returns the list of up to 1000 bids and asks per request for the specified\_`market`, sorted by\_`price`.\n\n:::info\nThis is a *public* endpoint. However, [authenticating](/docs/rest-api/introduction/) your request gives you a [higher rate limit](/docs/rate-limits/#how-its-calculated).\n:::\n**Rate limit weight points**: 1\n"
      parameters:
        - name: market
          description: |
            The market for which to return the order book.
          in: path
          required: true
          example: BTC-EUR
          schema:
            type: string
        - name: depth
          description: |
            The number of `bids` and `asks` to return.
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            default: 1000
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')()
            bitvavo.book('BTC-EUR', {}, (error, response) => {
              if (error === null) {
                for (let entry of response.bids) {
                  console.log('Bids: ', entry)
                }
                for (let entry of response.asks) {
                  console.log('Asks: ', entry)
                }
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo()
            response = bitvavo.book('BTC-EUR', {})
            for item in response['bids']:
              print('Bids', item)
            for item in response['asks']:
              print('Asks', item)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{}
            response, err := bitvavo.Book("BTC-EUR", map[string]string{}) if err != nil { fmt.Println(err) } else { fmt.Printf("%+v\n", response) }
      responses:
        '200':
          description: The request was successful.
          headers:
            bitvavo-ratelimit-remaining:
              description: 'The number of remaining [weight points](/docs/rate-limits) before it resets at `bitvavo-ratelimit-resetat`.'
              schema:
                type: integer
            bitvavo-ratelimit-resetat:
              description: The time when `bitvavo-ratelimit-remaining` resets to `bitvavo-ratelimit-limit`.
              schema:
                type: integer
                format: unix-timestamp in milliseconds
            bitvavo-ratelimit-limit:
              description: 'The number of available [weight points](/docs/rate-limits) in one minute.'
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                properties:
                  market:
                    description: The market for which the order book is returned.
                    type: string
                    example: BTC-EUR
                  nonce:
                    description: |
                      Unique identifier of the market data in the order book at a specific time. `nonce` is incremented by 1 every time the order book changes.
                      For example, when an order is placed, updated, or deleted.
                    type: integer
                    example: 438524
                  bids:
                    type: array
                    description: |
                      The list of buy orders for the specified `market` and `depth`. Every bid contains:

                      - `price`: the offer for 1 unit of base currency in the amount of quote currency. For 
                      example, **34243** Euros.

                      - `size`: the amount of base currency in the offer. For example, **0.1** Bitcoin.
                    items:
                      type: array
                      items:
                        type: string
                    example:
                      - - '4999.9'
                        - '0.015'
                      - - '4999.8'
                        - '0.015'
                      - - '4999.7'
                        - '0.015'
                      - - '4999.6'
                        - '0.015'
                  asks:
                    type: array
                    description: |
                      The list of sell orders for the specified `market` and `depth`. Every bid contains:

                        - `price`: the offer for 1 unit of base currency in the amount of quote currency. For 
                      example, **34243** Euros.                   

                        - `size`: the amount of base currency in the offer. For example, **0.1** Bitcoin.
                    items:
                      type: array
                      items:
                        type: string
                    example:
                      - - '5001.1'
                        - '0.015'
                      - - '5001.2'
                        - '0.015'
                      - - '5001.3'
                        - '0.015'
                      - - '5001.4'
                        - '0.015'
                  timestamp:
                    description: |
                      A Unix timestamp when the snapshot was taken.
                    type: integer
                    format: unix-timestamp in nanoseconds
                    example: 1542967486256
      4XX:
        description: 'For error codes, see [Handle errors](/docs/errors).'
  '/report/{market}/book':
    get:
      tags:
        - Market data
      summary: Get order book report
      description: |
        Returns the list of up to 1000 bids and asks for the specified `market`, sorted by `price`. Includes the data compliant with the European Markets in Crypto-Assets (MiCA) regulation.

        :::info
        This is a *public* endpoint. However, [authenticating](/docs/rest-api/introduction/) your request gives you a [higher rate limit](/docs/rate-limits/#how-its-calculated).
        :::
        **Rate limit weight points**: 1
      parameters:
        - name: market
          description: |
            The market for which to return the order book.
          in: path
          required: true
          example: BTC-EUR
          schema:
            type: string
        - name: depth
          description: |
            The number of `bids` and `asks` to return.
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            default: 1000
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')()
            bitvavo.book('BTC-EUR', {}, (error, response) => {
              if (error === null) {
                for (let entry of response.bids) {
                  console.log('Bids: ', entry)
                }
                for (let entry of response.asks) {
                  console.log('Asks: ', entry)
                }
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo()
            response = bitvavo.book('BTC-EUR', {})
            for item in response['bids']:
              print('Bids', item)
            for item in response['asks']:
              print('Asks', item)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{}
            response, err := bitvavo.Book("BTC-EUR", map[string]string{}) if err != nil { fmt.Println(err) } else { fmt.Printf("%+v\n", response) }
      responses:
        '200':
          description: The request was successful.
          headers:
            bitvavo-ratelimit-remaining:
              description: 'The number of remaining [weight points](/docs/rate-limits) before it resets at `bitvavo-ratelimit-resetat`.'
              schema:
                type: integer
            bitvavo-ratelimit-resetat:
              description: The time when `bitvavo-ratelimit-remaining` resets to `bitvavo-ratelimit-limit`.
              schema:
                type: integer
                format: unix-timestamp in milliseconds
            bitvavo-ratelimit-limit:
              description: 'The number of available [weight points](/docs/rate-limits) in one minute.'
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                properties:
                  submissionTimestamp:
                    type: string
                    format: date-time
                    example: '2025-05-02T14:23:11.123456Z'
                    description: |
                      The timestamp when the order book is submitted to the database.
                  assetCode:
                    description: |
                      The DTI code or a symbol of the asset.
                    type: string
                    example: 4K6P57CMJ
                  assetName:
                    description: |
                      The full name of the asset.
                    type: string
                    example: Bitcoin
                  bids:
                    type: array
                    description: |
                      The list of buy orders for the specified `market` and `depth`. Each bid includes:
                    items:
                      type: object
                      properties:
                        side:
                          type: string
                          enum:
                            - BUYI
                          description: Indicates if the order is to buy or sell.
                        price:
                          type: string
                          format: decimal
                          example: '28500.1234567890123'
                          description: The amount of quote currency for 1 unit of the base currency.
                        quantity:
                          type: string
                          format: decimal
                          example: '0.00123456789012345'
                          description: The quantity of the asset.
                        numOrders:
                          type: integer
                          example: 38
                          description: The number of individual orders at this price level.
                    example:
                      - side: BUYI
                        price: '28500.12'
                        quantity: '0.5'
                        numOrders: 12
                      - side: BUYI
                        price: '28499.90'
                        quantity: '0.75'
                        numOrders: 8
                  asks:
                    type: array
                    description: |
                      The list of sell orders for the specified `market` and `depth`. Each ask includes:
                    items:
                      type: object
                      properties:
                        side:
                          type: string
                          enum:
                            - SELL
                          description: Indicates if the order is to buy or sell.
                        price:
                          type: string
                          format: decimal
                          example: '28500.1234567890123'
                          description: The amount of quote currency for 1 unit of the base currency.
                        quantity:
                          type: string
                          format: decimal
                          example: '0.00123456789012345'
                          description: The quantity of the asset.
                        numOrders:
                          type: integer
                          example: 38
                          description: The number of individual orders at this price level.
                    example:
                      - side: SELL
                        price: '28510.00'
                        quantity: '0.4'
                        numOrders: 9
                      - side: SELL
                        price: '28520.00'
                        quantity: '1.1'
                        numOrders: 14
                  priceCurrency:
                    description: |
                      The DTI code or a symbol of the currency in which the price is expressed.
                    type: string
                    example: 4K6P57CMJ
                  priceNotation:
                    description: |
                      The price expressed as a monetary value.
                    type: string
                    example: MONE
                    enum:
                      - MONE
                  quantityCurrency:
                    description: |
                      The currency in which the quantity of the crypto asset is expressed.
                    type: string
                    example: EUR
                  quantityNotation:
                    description: |
                      The quantity of the crypto asset.
                    type: string
                    example: CRYP
                    enum:
                      - CRYP
                  venue:
                    description: |
                      The Market Identifier Code of the Bitvavo trading platform.
                    type: string
                    example: VAVO
                  tradingSystem:
                    description: |
                      The trading system identifier of the Bitvavo trading platform.
                    type: string
                    example: VAVO
                  publicationTimestamp:
                    type: string
                    format: date-time
                    example: '2025-05-02T14:23:11.123456Z'
                    description: |
                      The timestamp when the book snapshot is added to the database.
      4XX:
        description: 'For error codes, see [Handle errors](/docs/errors).'
  '/{market}/trades':
    get:
      tags:
        - Market data
      summary: Get trades
      description: |
        Returns the list of trades made by all Bitvavo users for the specified `market` and time period up to 24 hours. 

        The returned trades are sorted by their `timestamp` in a descending order, from the latest to the earliest.

        :::info
        This is a *public* endpoint. However, [authenticating](/docs/rest-api/introduction/) your request gives you a [higher rate limit](/docs/rate-limits/#how-its-calculated).
        :::

        :::tip
        To get the list of your past trades, make a [Get trades history](/docs/rest-api/get-trades) request.
        :::

        **Rate limit weight points**: 5
      parameters:
        - name: market
          required: true
          in: path
          example: BTC-EUR
          description: |
            The market for which to return the trades.
          schema:
            type: string
        - name: limit
          required: false
          in: query
          description: |
            The maximum number of trades to return.
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 500
        - name: start
          required: false
          in: query
          description: |
            The Unix timestamp starting from which to return trades.
            <br/>
            > Can only return trades for a period of up to 24 hours.
          schema:
            type: integer
            format: unix-timestamp in milliseconds
            minimum: 0
        - name: end
          required: false
          in: query
          description: |
            The Unix timestamp until which to return trades.
            <br/>
            > Cannot be more than 24 hours after the `start` parameter. Can only return trades for a period of up to 24 hours.
          schema:
            type: integer
            format: unix-timestamp in milliseconds
            maximum: 8640000000000000
        - name: tradeIdFrom
          required: false
          in: query
          description: |
            The unique identifier of the trade starting from which to return the trades.
          schema:
            type: string
        - name: tradeIdTo
          required: false
          in: query
          description: |
            The unique identifier of the trade up to which to return the trades.
          schema:
            type: string
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')()
            // All optional parameters are used to limit the results.
            bitvavo.publicTrades('BTC-EUR', {}, (error, response) => {
              if (error === null) {
                console.log('Trade: ', response)
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo()
            response = bitvavo.publicTrades('BTC-EUR', {})
            for trade in response:
              print(trade)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{}
            response, err := bitvavo.PublicTrades("BTC-EUR", map[string]string{}) if err != nil { fmt.Println(err) } else { for _, trade := range response { fmt.Printf("%+v\n", trade) } }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      description: The unique identifier of the trade.
                      type: string
                      example: 57b1159b-6bf5-4cde-9e2c-6bd6a5678baf
                    timestamp:
                      description: The Unix timestamp when the trade was made.
                      type: integer
                      format: unix-timestamp in milliseconds
                      example: 1542967486256
                    amount:
                      description: |
                        The amount of base currency exchanged in the trade. For example, **0.1** Bitcoin.   
                      type: string
                      example: '0.1'
                    price:
                      description: |
                        The price of 1 unit of base currency in the amount of quote currency at the time of the trade.
                        For example, **34243** Euro.  
                      type: string
                      example: '34,243'
                    side:
                      description: |
                        Indicates if the taker, who fills the order, is selling or buying.
                      type: string
                      enum:
                        - sell
                        - buy
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  '/report/{market}/trades':
    get:
      tags:
        - Market data
      summary: Get trades report
      description: |
        Returns the list of trades from for the specified `market` and time period made by all Bitvavo users. The returned trades are sorted by their `timestamp` in a descending order, from the latest to the earliest. Includes the data compliant with the European Markets in Crypto-Assets (MiCA) regulation.

        :::info
        This is a *public* endpoint. However, [authenticating](/docs/rest-api/introduction/) your request gives you a [higher rate limit](/docs/rate-limits/#how-its-calculated).
        :::
        **Rate limit weight points**: 5
      parameters:
        - name: market
          required: true
          in: path
          example: BTC-EUR
          description: |
            The market for which to return the trades.
          schema:
            type: string
        - name: limit
          required: false
          in: query
          description: |
            The maximum number of trades to return.
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 500
        - name: start
          required: false
          in: query
          description: |
            The Unix timestamp starting from which to return trades.
            <br/>
            > Can only return trades for a period of up to 24 hours.
          schema:
            type: integer
            format: unix-timestamp in milliseconds
            minimum: 0
        - name: end
          required: false
          in: query
          description: |
            The Unix timestamp until which to return trades.
            <br/>
            > Cannot be more than 24 hours after the `start` parameter. Can only return trades for a period of up to 24 hours.
          schema:
            type: integer
            format: unix-timestamp in milliseconds
            maximum: 8640000000000000
        - name: tradeIdFrom
          required: false
          in: query
          description: |
            The unique identifier of the trade starting from which to return the trades.
          schema:
            type: string
        - name: tradeIdTo
          required: false
          in: query
          description: |
            The unique identifier of the trade up to which to return the trades.
          schema:
            type: string
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')()
            // All optional parameters are used to limit the results.
            bitvavo.publicTrades('BTC-EUR', {}, (error, response) => {
              if (error === null) {
                console.log('Trade: ', response)
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo()
            response = bitvavo.publicTrades('BTC-EUR', {})
            for trade in response:
              print(trade)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{}
            response, err := bitvavo.PublicTrades("BTC-EUR", map[string]string{}) if err != nil { fmt.Println(err) } else { for _, trade := range response { fmt.Printf("%+v\n", trade) } }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    tradeId:
                      description: The unique identifier of the trade.
                      type: string
                      example: 57b1159b-6bf5-4cde-9e2c-6bd6a5678baf
                    transactTimestamp:
                      description: |
                        The timestamp when the trade is added to the database.
                      type: string
                      format: date-time
                      example: '2024-05-02T14:43:11.123456Z'
                    assetCode:
                      description: |
                        The DTI code or a symbol of the asset.
                      type: string
                      example: 4K6P57CMJ
                    assetName:
                      description: |
                        The full name of the asset.
                      type: string
                      example: Bitcoin
                    price:
                      description: |
                        The price of 1 unit of base currency in the amount of quote currency at the time of the trade.
                        For example, **34243** Euro.
                      type: string
                      example: '34243'
                    missingPrice:
                      description: |
                        Indicates if the price is pending (**PNDG**) or not applicable (**NOAP**). 
                        > If not applicable, the returned value might be empty.
                      type: string
                      example: PNDG
                    priceNotation:
                      description: |
                        Indicates whether the price is expressed as a monetary value, percentage, yield, or basis points.
                      type: string
                      example: MONE
                      enum:
                        - MONE
                    priceCurrency:
                      description: |
                        The currency in which the price is expressed.
                      type: string
                      example: EUR
                    quantity:
                      description: |
                        The quantity of the asset.
                      type: string
                      format: decimal
                      example: '0.0324'
                    quantityCurrency:
                      description: |
                        The currency in which the quantity of the crypto asset is expressed.
                      type: string
                      example: EUR
                    quantityNotation:
                      description: |
                        Indicates whether the quantity of the crypto asset is expressed as a number of units, nominal value, monetary value, or value in crypto assets.
                      type: string
                      example: CRYP
                      enum:
                        - CRYP
                    venue:
                      description: |
                        The Market Identifier Code of the Bitvavo trading platform.
                      type: string
                      example: VAVO
                    publicationTimestamp:
                      description: |
                        The timestamp when the trade is added to the database.
                      type: string
                      format: date-time
                      example: '2025-05-02T14:23:11.123456Z'
                    publicationVenue:
                      description: |
                        The Market Identifier Code of the trading platform that publishes the transaction.
                      type: string
                      example: VAVO
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /ticker/price:
    get:
      tags:
        - Market data
      summary: Get ticker prices
      description: |
        Returns prices of the latest trades on Bitvavo for all markets or a single `market`. 

        :::info
        This is a *public* endpoint. However, [authenticating](/docs/rest-api/introduction/) your request gives you a [higher rate limit](/docs/rate-limits/#how-its-calculated).
        :::

        :::note
        A _tick_ in a market is any change in the price of a digital asset.
        :::

        **Rate limit weight points**: 1
      parameters:
        - name: market
          in: query
          example: BTC-EUR
          description: |
            The market for which to return the latest information.

            > For the list of all markets on Bitvavo, make a [Get markets](/docs/rest-api/get-markets) request.
          required: false
          schema:
            type: string
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')()
            bitvavo.tickerPrice({}, (error, response) => {
              if (error === null) {
                console.log('Current price for', response.market, ':', response.price)
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo()
            response = bitvavo.tickerPrice({})
            for market in response:
              print(market)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{}
            response, err := bitvavo.TickerPrice(map[string]string{}) if err != nil { fmt.Println(err) } else { for _, price := range response { fmt.Printf("%+v\n", price) } }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    market:
                      description: The market for which you requested the latest trade price.
                      type: string
                      example: BTC-EUR
                    price:
                      description: 'The latest trade price for 1 unit of base currency in the amount of quote currency for the specified `market`. For example, **34243** Euro.'
                      type: string
                      example: '34,243'
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /ticker/book:
    get:
      tags:
        - Market data
      summary: Get ticker book
      description: |
        Returns the highest buy and the lowest sell prices currently available for all markets, or a single `market`, in the Bitvavo order book.

        :::info
        This is a *public* endpoint. However, [authenticating](/docs/rest-api/introduction/) your request gives you a [higher rate limit](/docs/rate-limits/#how-its-calculated).
        :::
        **Rate limit weight points**: 1
      parameters:
        - name: market
          in: query
          example: BTC-EUR
          description: |
            The market for which to return the latest information.

            > For the list of all markets on Bitvavo, make a [Get markets](/docs/rest-api/get-markets) request.
          required: false
          schema:
            type: string
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')()
            bitvavo.tickerBook({}, (error, response) => {
              if (error === null) {
                console.log(response.market, 'book, bid:', response.bid, ' ask:', response.ask)
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo()
            response = bitvavo.tickerBook({})
            for market in response:
              print(market)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{}
            response, err := bitvavo.TickerBook(map[string]string{}) if err != nil { fmt.Println(err) } else { for _, book := range response { fmt.Printf("%+v\n", book) } }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    market:
                      description: The market for which you requested the current best bid and ask information.
                      type: string
                      example: BTC-EUR
                    bid:
                      description: |
                        The highest buy order in the quote currency for the `market` currently available on Bitvavo.
                      type: string
                      example: '4999.9'
                    bidSize:
                      description: The amount of base currency for the `bid` in the order.
                      type: string
                      example: '0.15'
                    ask:
                      description: |
                        The lowest sell order in the quote currency for the `market` currently available on Bitvavo.
                      type: string
                      example: '5003.3'
                    askSize:
                      description: The amount of base currency for the `ask` in the order.
                      type: string
                      example: '0.2'
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  '/{market}/candles':
    get:
      tags:
        - Market data
      summary: Get candlestick data
      description: |
        Returns the [OHLCV](https://www.investopedia.com/terms/o/ohlcchart.asp) market data used to create [candlestick charts](https://learn.bitvavo.com/article/what-are-candlestick-patterns/1199).

        Candlestick data is always returned in chronological order from the latest to the earliest. Data is returned when trades are made in the `interval` represented by that candlestick. If no trades occur you see a gap in data flow - zero trades are represented by zero candlesticks.

        :::info
        This is a *public* endpoint. However, [authenticating](/docs/rest-api/introduction/) your request gives you a [higher rate limit](/docs/rate-limits/#how-its-calculated).
        :::  
        **Rate limit weight points**: 1
      parameters:
        - name: market
          in: path
          required: true
          example: BTC-EUR
          description: |
            The market for which to return the candlestick data.

            > For the list of all markets on Bitvavo, make a [Get markets](/docs/rest-api/get-markets) request.
          schema:
            type: string
        - name: interval
          in: query
          required: true
          description: |
            The time interval between each candlestick. Determines the allowed values for `start` and `end` parameters.
          schema:
            type: string
            enum:
              - 1m
              - 5m
              - 15m
              - 30m
              - 1h
              - 2h
              - 4h
              - 6h
              - 8h
              - 12h
              - 1d
              - 1W
              - 1M
        - name: limit
          in: query
          description: |
            The maximum number of candlestick data to return.
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 1440
            default: 1440
        - name: start
          required: false
          in: query
          description: |
            The Unix timestamp starting from which to return the candlestick data.
            <br/>
            > The timestamp must align exactly with the start of the specified `interval`. For example, for a 1-hour candlestick that starts at 13:00:00.000 Amsterdam time, use `1704067200000`.
          schema:
            type: integer
            format: unix-timestamp in milliseconds
            minimum: 0
          example: 1704067200000
        - name: end
          required: false
          in: query
          description: |
            The Unix timestamp until which to return the candlestick data.
            <br/>
            > The timestamp must align exactly with the end of the specified `interval`. For example, for a 1-hour candlestick that ends at 14:00:00.000 Amsterdam time, use `1766062800000`.
          schema:
            type: integer
            format: unix-timestamp in milliseconds
            maximum: 8640000000000000
          example: 1704153600000
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')()
            bitvavo.candles('BTC-EUR', '1h', {}, (error, response) => {
              if (error === null) {
                for (let entry of response.candles) {
                  console.log('Timestamp: ', entry[0], ' Open: ', entry[1], ' High: ', entry[2], ' Low: ', entry[3], ' Close: ', entry[4], ' Volume: ', entry[5])
                }
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo
            from datetime import datetime, timezone

            bitvavo = Bitvavo()

            # Query the last 1440 one hour candles of the BTC-EUR market
            candles = bitvavo.candles('BTC-EUR', '1h')
            for (ts, o, h, l, c, v) in candles:
              print('Timestamp', ts, 'open', o, 'high', h, 'low', l, 'close', c, 'volume', v)

            # Limit the result to 10 values
            candles = bitvavo.candles('BTC-EUR', '1h', limit=10)
            for (ts, o, h, l, c, v) in candles:
              print('Timestamp', ts, 'open', o, 'high', h, 'low', l, 'close', c, 'volume', v)

            # Specify a date range
            start = datetime(year=2024, month=1, day=1, hour=0, minute=0, tzinfo=timezone.utc)
            end   = datetime(year=2024, month=1, day=1, hour=1, minute=0, tzinfo=timezone.utc)
            candles = bitvavo.candles('BTC-EUR', '15m', start=start, end=end)
            for (ts, o, h, l, c, v) in candles:
              print('Timestamp', ts, 'open', o, 'high', h, 'low', l, 'close', c, 'volume', v)

            # Before 1.3.2
            candles = bitvavo.candles('BTC-EUR', '1h', {})
            for candle in candles:
              print('Timestamp', candle[0], ' open', candle[1], ' high', candle[2], ' low', candle[3], ' close', candle[4], ' volume', candle[5])
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{}
            response, err := bitvavo.Candles("BTC-EUR", "1h", map[string]string{}) if err != nil { fmt.Println(err) } else { for _, candle := range response.Candles { fmt.Printf("%+v\n", candle) } }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    timestamp:
                      description: The start time for this candlestick data.
                      type: integer
                      format: unix-timestamp in milliseconds
                      example: '1538784000000'
                    open:
                      description: The starting price for the `market` at `timestamp`.
                      type: string
                      example: '4999'
                    high:
                      description: The highest price for the `market` during the `interval`.
                      type: string
                      example: '5012'
                    low:
                      description: The lowest price for the `market` during the `interval`.
                      type: string
                      example: '4999'
                    close:
                      description: The closing price for the `market` after the `interval`.
                      type: string
                      example: '5012'
                    volume:
                      description: The amount traded in the `market` during the `interval`.
                      type: string
                      example: '0.45'
                minItems: 6
                maxItems: 6
                example:
                  - '1538784000000'
                  - '4999'
                  - '5012'
                  - '4999'
                  - '5012'
                  - '0.45'
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /ticker/24h:
    get:
      tags:
        - Market data
      summary: Get ticker data 24h
      description: |
        Returns the [OHLCV](https://www.investopedia.com/terms/o/ohlcchart.asp) data about trades and orders for all markets, or a single `market`, on Bitvavo during the latest 24 hours.

        :::info
        This is a *public* endpoint. However, [authenticating](/docs/rest-api/introduction/) your request gives you a [higher rate limit](/docs/rate-limits/#how-its-calculated).
        :::
        **Rate limit weight points**: **25** (without `market`) or **1** (with `market`).
      parameters:
        - name: market
          in: query
          example: BTC-EUR
          description: |
            The market for which to return the latest information.

            > For the list of all markets on Bitvavo, make a [Get markets](/docs/rest-api/get-markets) request.
          required: false
          schema:
            type: string
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')()
            bitvavo.ticker24h({}, (error, response) => {
              if (error === null) {
                for (let object of response) {
                  console.log(object)
                }
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo()
            response = bitvavo.ticker24h({})
            for market in response:
              print(market)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{}
            response, err := bitvavo.Ticker24h(map[string]string{}) if err != nil { fmt.Println(err) } else { for _, ticker := range response { fmt.Printf("%+v\n", ticker) } }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    market:
                      description: The market for which you requested the ticker data.
                      type: string
                      example: BTC-EUR
                    startTimestamp:
                      description: |
                        The time starting from which to return the data.
                      type: integer
                      format: unix-timestamp in milliseconds
                      example: 1700490607372
                    timestamp:
                      description: |
                        The time when the data was requested.
                      type: integer
                      format: unix-timestamp in milliseconds
                      example: 1700576057382
                    open:
                      description: The opening price for the `market` in the base currency.
                      type: string
                      example: '5001.1'
                    openTimestamp:
                      description: |
                        The time when the `market` opened after the `startTimestamp`.
                      type: integer
                      format: unix-timestamp in milliseconds
                      example: 1700490620146
                    high:
                      description: |
                        The highest trade price for 1 unit of base currency in the quote currency.
                      type: string
                      example: '5003.2'
                    low:
                      description: |
                        The lowest trade price for 1 unit of base currency in the quote currency.
                      type: string
                      example: '5001.1'
                    last:
                      description: |
                        The latest trade price for 1 unit of base currency in the quote currency.
                      type: string
                      example: '5003.2'
                    closeTimestamp:
                      description: |
                        The time when the `market` closed after the `startTimestamp`.
                      type: integer
                      format: unix-timestamp in milliseconds
                      example: 1700490620146
                    bid:
                      description: |
                        The highest buy order in the quote currency.
                      type: string
                      example: '4999.9'
                    bidSize:
                      description: |
                        The amount of base currency for the `bid`.
                      type: string
                      example: '0.15'
                    ask:
                      description: |
                        The lowest sell order in the quote currency.
                      type: string
                      example: '5003.3'
                    askSize:
                      description: |
                        The amount of base currency for the `ask`.
                      type: string
                      example: '0.2'
                    volume:
                      description: |
                        The total amount of base currency traded.
                      type: string
                      example: '0.15'
                    volumeQuote:
                      description: |
                        The total amount of quote currency traded.
                      type: string
                      example: '750.2865'
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /order:
    post:
      tags:
        - Trading
      summary: Create order
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Creates an order to buy or sell digital assets on Bitvavo.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        ::: 

        :::warning
        You can have a maximum of [100 open orders](/docs/rest-api/get-orders) at any one time in each `market`. 
        ::::

        **Rate limit weight points**: **1**
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - market
                - side
                - orderType
                - operatorId
              properties:
                market:
                  type: string
                  example: BTC-EUR
                  description: |
                    The market in which to create the order.
                side:
                  type: string
                  enum:
                    - buy
                    - sell
                  description: |
                    Indicates whether the order is to buy or sell the asset.
                orderType:
                  type: string
                  enum:
                    - market
                    - limit
                    - stopLoss
                    - stopLossLimit
                    - takeProfit
                    - takeProfitLimit
                  description: |
                    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.

                    <br/>

                    > For limit orders, you need to set `amount` and `price`. For market orders, you need to set either `amount` or `amountQuote`.
                operatorId:
                  description: |
                    Your identifier for the trader or the bot within your account that made the request.
                  type: integer
                  format: int64
                  example: 543462
                clientOrderId:
                  type: string
                  format: UUID
                  description: |
                    Your identifier of the order. Must be unique across open orders.
                amount:
                  type: string
                  example: '1.567'
                  description: |
                    The quantity of the base currency to buy or sell. To get the number of allowed decimals, make a [Get markets](/docs/rest-api/get-markets/) request and check the `quantityDecimals` field.
                amountQuote:
                  type: string
                  example: '5000'
                  description: |
                    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](/docs/rest-api/get-markets/) request and check the `notionalDecimals` field.
                price:
                  type: string
                  example: '6000'
                  description: |
                    The price in quote currency for which you want to buy or sell 1 unit of the base currency.

                    <br/>

                    > Must be a multiple of the `tickSize` value for the market. To get the `tickSize`, make a [Get markets](/docs/rest-api/get-markets/) request.
                triggerAmount:
                  type: string
                  example: '4000'
                  description: |
                    The trigger price in quote currency for which you want to buy or sell 1 unit of the base currency.
                triggerType:
                  type: string
                  enum:
                    - price
                  description: |
                    The type of trigger that fills the order when the condition is met.
                triggerReference:
                  type: string
                  enum:
                    - lastTrade
                    - bestBid
                    - bestAsk
                    - midPrice
                  description: |
                    The price which triggers the order to be filled for `stopLoss`, `stopLossLimit`, `takeProfit`, or `takeProfitLimit` types of orders.
                timeInForce:
                  type: string
                  enum:
                    - GTC
                    - IOC
                    - FOK
                  default: GTC
                  description: |
                    How long an order stays active for.
                postOnly:
                  type: boolean
                  default: false
                  description: |
                    If true, cancels limit orders that match immediately. This ensures you pay the maker fee and not the taker fee.
                selfTradePrevention:
                  type: string
                  enum:
                    - cancelBoth
                    - cancelNewest
                    - cancelOldest
                    - decrementAndCancel
                  default: decrementAndCancel
                  description: |
                    **[Self-trading is not allowed on Bitvavo](https://bitvavo.com/en/trading-rules)**.

                    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.
                disableMarketProtection:
                  type: boolean
                  default: false
                  deprecated: true
                  description: |
                    Must be **false** because market protection can no longer be disabled.
                responseRequired:
                  type: boolean
                  default: true
                  description: |
                    Indicates whether the response returns all parameters (**true**) or only the HTTP status code (**false**).
                codGroupId:
                  type: integer
                  example: 1
                  minimum: 1
                  maximum: 1000
                  description: |
                    Your identifier for a group of orders.
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')().options({
              APIKEY: '<APIKEY>',
              APISECRET: '<APISECRET>'
            })

            bitvavo.placeOrder('BTC-EUR', 'sell', 'limit', {
              amount: '0.1',
              price: '5000',
              operatorId: 543462
            }, (error, response) => {
              if (error === null) {
                console.log(response)
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo({
                'APIKEY': '<APIKEY>',
                'APISECRET': '<APISECRET>'
            })
            response = bitvavo.placeOrder('BTC-EUR', 'sell', 'limit', { 'amount': '0.1', 'price': '5000', 'operatorId': 543462 })
            print(response)
        - lang: Go
          source: |-
            import . "bitvavo"
            bitvavo := Bitvavo{ApiKey:"<APIKEY>", ApiSecret:"<APISECRET>"}

            response, err := bitvavo.PlaceOrder("BTC-EUR", "sell", "limit", map[string]string{
                "price": "5000",
                "operatorId": "543462",
            })
            if err != nil {
                fmt.Println(err)
            } else {
                fmt.Printf("%+v\n", response)
            }
      responses:
        '200':
          description: The request was successful.
          headers:
            bitvavo-ratelimit-remaining:
              description: 'The number of remaining [weight points](/docs/rate-limits) before it resets at `bitvavo-ratelimit-resetat`.'
              schema:
                type: integer
            bitvavo-ratelimit-resetat:
              description: The time when `bitvavo-ratelimit-remaining` resets to `bitvavo-ratelimit-limit`.
              schema:
                type: integer
                format: unix-timestamp in milliseconds
            bitvavo-ratelimit-limit:
              description: 'The number of available [weight points](/docs/rate-limits) in one minute.'
              schema:
                type: integer
          content:
            application/json:
              schema:
                oneOf:
                  - title: "responseRequired=true"
                    type: object
                    properties:
                      orderId:
                        type: string
                        format: UUID
                        description: |
                          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
                      clientOrderId:
                        description: |
                          Your identifier of the order. Only returned if specified in the request.
                        type: string
                        format: UUID
                        example: 2be7d0df-d8dc-7b93-a550-8876f3b393e9
                      market:
                        type: string
                        example: BTC-EUR
                        description: |
                          The market where you created an order.
                      created:
                        description: |
                          The Unix timestamp when the order was created.
                        type: integer
                        format: unix-timestamp in milliseconds
                        example: 1706100650751
                      updated:
                        description: |
                          The Unix timestamp when the order was last updated.
                        type: integer
                        format: unix-timestamp in milliseconds
                        example: 1706100650751
                      status:
                        description: |
                          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.  
                        type: string
                        enum:
                          - new
                          - awaitingTrigger
                          - canceled
                          - expired
                          - filled
                          - partiallyFilled
                      side:
                        description: |
                          Indicates whether the order is to buy or sell the asset.
                        type: string
                        enum:
                          - buy
                          - sell
                      orderType:
                        description: |
                          The type of order you created.
                        type: string
                        enum:
                          - limit
                          - market
                      amount:
                        description: |
                          The quantity of the base currency to buy or sell.
                          If you set `amountQuote` in your order, `amount` is not returned.
                        type: string
                        example: '10'
                      amountRemaining:
                        description: |
                          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.
                        type: string
                        example: '10'
                      price:
                        description: |
                          The price you set for a `limit`, `stopLossLimit`, `takeProfit`, or a `takeProfitLimit` order.
                          For other types of orders, the `price` is not returned.
                        type: string
                        example: '7000'
                      amountQuote:
                        description: |
                          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.
                        type: string
                        example: '5000'
                      amountQuoteRemaining:
                        description: |
                          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.
                        type: string
                        example: '5000'
                      onHold:
                        description: |
                          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.
                        type: string
                        example: '70000'
                      onHoldCurrency:
                        description: |
                          The currency that is `onHold` while the order is processed. This depends on the `side` you set for the `orderId`.
                        type: string
                        example: EUR
                      triggerPrice:
                        description: |
                          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.
                        type: string
                        example: '4000'
                      triggerAmount:
                        description: |
                          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`.
                        type: string
                        example: '4000'
                      triggerType:
                        description: |
                          The type of trigger you set to fill the order when the condition is met. This value and `triggerAmount` are used to calculate `triggerPrice`.
                        type: string
                        enum:
                          - price
                      triggerReference:
                        description: |
                          The price you set to trigger the order to be filled for the `stopLoss`, `stopLossLimit`, `takeProfit`, or  `takeProfitLimit` types of orders.
                        type: string
                        enum:
                          - lastTrade
                          - bestBid
                          - bestAsk
                          - midPrice
                      filledAmount:
                        description: The total amount bought or sold in base currency.
                        type: string
                        example: '0'
                      filledAmountQuote:
                        description: The total amount bought or sold in quote currency.
                        type: string
                        example: '0'
                      feePaid:
                        description: |
                          The amount you pay Bitvavo to process the order. This value is negative for rebates. For more information, see
                          GET [/account/fees](/docs/rest-api/get-market-fees).
                        type: string
                        example: '0'
                      feeCurrency:
                        description: The currency of the `feePaid`.
                        type: string
                        example: EUR
                      fills:
                        description: |
                          The fill generated by the update order request.
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              description: The identifier of this fill.
                              type: string
                              example: 371c6bd3-d06d-4573-9f15-18697cd210e5
                            timestamp:
                              description: |
                                A Unix timestamp when Bitvavo processed the fill.
                              type: integer
                              format: unix-timestamp in milliseconds
                              example: 1542967486256
                            amount:
                              description: The amount of base currency exchanged in the fill.
                              type: string
                              example: '0.005'
                            price:
                              description: The price of the fill in quote currency.
                              type: string
                              example: '5000.1'
                            taker:
                              description: Returns `true` when you are the taker for the fill.
                              type: boolean
                              example: true
                            fee:
                              description: |
                                The amount you pay Bitvavo in `feeCurrency` to process the fill. For more information about your fees, see 
                                GET [/account/fees](/docs/rest-api/get-market-fees). This value is negative for rebates.
                                 
                                If `settled` is `false`, this parameter is not included in the return parameters.
                              type: string
                              example: '0.03'
                            feeCurrency:
                              description: |
                                The currency that the `fee` is paid in.

                                If `settled` is `false`, this object is not returned.
                              type: string
                              example: EUR
                            settled:
                              description: |
                                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`.
                              type: boolean
                      selfTradePrevention:
                        description: |
                          Indicates how to prevent self-trading for conflicting orders of any type.
                        type: string
                        enum:
                          - decrementAndCancel
                          - cancelOldest
                          - cancelNewest
                          - cancelBoth
                      visible:
                        description: |
                          Returns `true` when the `orderId` is visible in the [order book](/docs/rest-api/get-order-book) for a `market`.
                        type: boolean
                      timeInForce:
                        description: |
                          The value you set for how long an order stays active.
                        type: string
                        enum:
                          - GTC
                          - IOC
                          - FOK
                      postOnly:
                        description: |
                          If true, cancels limit orders that match immediately. This ensures you pay the maker fee and not the taker fee.
                        type: boolean
                      disableMarketProtection:
                        description: |
                          Must be **false** because market protection can no longer be disabled.
                        type: boolean
                        deprecated: true
                      operatorId:
                        description: |
                          Your identifier for the trader or the bot within your account that made the request.
                        type: integer
                        format: int64
                        example: 543462
                      restatementReason:
                        description: |
                          Specifies the reason why the status of the order was changed. For example when an order is canceled by the [Price protection checks](/docs/order-lifecycle/#price-protection).
                        type: string
                        enum:
                          - decrementOnSelfTradePrevention
                          - cancelOnSelfTradePrevention
                          - cancelOnPlacementPriceProtection
                          - cancelOnExecutionPriceProtection
                          - cancelOnSpreadProtection
                          - cancelOnReferencePriceProtection
                          - cancelPostOnlyOnAuctionMatching
                          - cancelOnMaintenance
                          - cancelOnDisconnect
                          - cancelOnDelisting
                          - cancelOnLockPlaced
                          - cancelOnAdminRequest
                          - cancelPostOnly
                      createdNs:
                        description: |
                          The Unix timestamp in nanoseconds when the order was created.
                        type: integer
                        format: unix-timestamp in nanoseconds
                        example: 1752139200000000000
                      updatedNs:
                        description: |
                          The Unix timestamp in nanoseconds when the order was last updated.
                        type: integer
                        format: unix-timestamp in nanoseconds
                        example: 1752139200000000000
                      codGroupId:
                        type: integer
                        example: 1
                        description: |
                          Your identifier for a group of orders.
                  - title: "responseRequired=false"
                    type: object
                    properties:
                      market:
                        type: string
                        example: BTC-EUR
                        description: |
                          The market where you created an order.
                      orderId:
                        type: string
                        format: UUID
                        description: |
                          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
                      clientOrderId:
                        description: |
                          Your identifier of the order. Only returned if specified in the request.
                        type: string
                        format: UUID
                        example: 2be7d0df-d8dc-7b93-a550-8876f3b393e9
                      created:
                        description: |
                          The Unix timestamp when the order was created.
                        type: integer
                        format: unix-timestamp in milliseconds
                        example: 1706100650751
                      updated:
                        description: |
                          The Unix timestamp when the order was last updated.
                        type: integer
                        format: unix-timestamp in milliseconds
                        example: 1706100650751
                      createdNs:
                        description: |
                          The Unix timestamp in nanoseconds when the order was created.
                        type: integer
                        format: unix-timestamp in nanoseconds
                        example: 1752139200000000000
                      updatedNs:
                        description: |
                          The Unix timestamp in nanoseconds when the order was last updated.
                        type: integer
                        format: unix-timestamp in nanoseconds
                        example: 1752139200000000000
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
    put:
      tags:
        - Trading
      summary: Update order
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Updates an existing *limit* or *trigger* order.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::

        :::info
        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. 
        :::

        :::tip
        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.<br/>
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - market
                - operatorId
              properties:
                market:
                  description: The market in which to update an order.
                  type: string
                  example: BTC-EUR
                orderId:
                  description: |
                    Bitvavo identifier of the order to update.
                  type: string
                  format: UUID
                  example: 95d92d6c-ecf0-4960-a608-9953ef71652e
                operatorId:
                  description: |
                    Your identifier for the trader or the bot within your account that made the request.
                  type: integer
                  format: int64
                  example: 543462
                clientOrderId:
                  description: |
                    Your identifier of the order to update. Must be unique among open orders.

                    <br/>

                    > If both `clientOrderId` and `orderId` are set, we use the `clientOrderId` to identify the order.
                  type: string
                  format: UUID
                  example: 2be7d0df-d8dc-7b93-a550-8876f3b393e9
                amount:
                  description: |
                    The amount of base currency to update. Specifying the `amount` automatically adjusts the `amountRemaining`. 

                    <br/>

                    To get the number of allowed decimals, make a [Get markets](/docs/rest-api/get-markets/) request and check the `quantityDecimals` field.
                  type: string
                  example: '1.567'
                amountQuote:
                  description: |
                    **Only for `takeProfit` and `stopLoss` orders that are not triggered yet**. The amount of quote currency to buy or sell at the best available price. 

                    <br/>

                    > To get the number of allowed decimals, make a [Get markets](/docs/rest-api/get-markets/) request and check the `notionalDecimals` field.
                  type: string
                  example: '5000'
                amountRemaining:
                  description: |
                    The remaining amount of base currency to update. Specifying the `amountRemaining` automatically adjusts the `amount`.

                    <br/>

                    > We discourage updating the `amountRemaining` because you can end up buying or selling more than you intended.
                  type: string
                  example: '1.560'
                price:
                  description: |
                    The amount of quote currency for 1 unit of the base currency.

                    <br/>

                    > Must be a multiple of the `tickSize` value for the market. To get the `tickSize`, make a [Get markets](/docs/rest-api/get-markets/) request.
                  type: string
                  example: '6000'
                triggerAmount:
                  description: |
                    **Only for stop orders**. The price at which you want to buy or sell 1 unit of the base currency in the quote currency.

                    <br/>

                    > You can only update orders that have not been triggered yet.
                  type: string
                  example: '4000'
                timeInForce:
                  description: |
                    How long an `orderType` stays active for. Possible values:

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

                    <br/>

                    > You can only update orders that have not been triggered yet.
                  type: string
                  enum:
                    - GTC
                    - IOC
                    - FOK
                selfTradePrevention:
                  description: |
                    **[Self-trading is not allowed on Bitvavo](https://bitvavo.com/en/trading-rules)**.

                    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.
                  type: string
                  enum:
                    - decrementAndCancel
                    - cancelOldest
                    - cancelNewest
                    - cancelBoth
                postOnly:
                  description: |
                    If true, cancels limit orders that match immediately. This ensures you pay the maker fee and not the taker fee.
                  type: boolean
                responseRequired:
                  description: |
                    Indicates whether the response returns all parameters (**true**) or only the HTTP status code (**false**).
                  type: boolean
                  default: true
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')().options({
              APIKEY: '<APIKEY>',
              APISECRET: '<APISECRET>'
            })

            bitvavo.updateOrder('BTC-EUR', 'b0d39267-f628-43ed-8ab7-1df502d80a7a', { 'amount': '0.2', 'operatorId': 543462 }, (error, response) => {
              if (error === null) {
                console.log(response)
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo({
                'APIKEY': '<APIKEY>',
                'APISECRET': '<APISECRET>'
            })
            response = bitvavo.updateOrder('BTC-EUR', 'a4a5d310-687c-486e-a3eb-1df832405ccd', { 'amount': '1.1', 'operatorId': 543462 })
            print(response)
        - lang: Go
          source: |
            import . "bitvavo"
            bitvavo := Bitvavo{ApiKey:"<APIKEY>", ApiSecret:"<APISECRET>"}

            response, err := bitvavo.UpdateOrder("BTC-EUR", "58496625-6764-4765-bec9-cfc6cb80238e", map[string]string{
                "price": "5000",
                "operatorId": "543462",
            })
            if err != nil {
              fmt.Println(err)
            } else {
              fmt.Printf("%+v\n", response)
            }
      responses:
        '200':
          description: The request was successful.
          headers:
            bitvavo-ratelimit-remaining:
              description: 'The number of remaining [weight points](/docs/rate-limits) before it resets at `bitvavo-ratelimit-resetat`.'
              schema:
                type: integer
            bitvavo-ratelimit-resetat:
              description: The time when `bitvavo-ratelimit-remaining` resets to `bitvavo-ratelimit-limit`.
              schema:
                type: integer
                format: unix-timestamp in milliseconds
            bitvavo-ratelimit-limit:
              description: 'The number of available [weight points](/docs/rate-limits) in one minute.'
              schema:
                type: integer
          content:
            application/json:
              schema:
                oneOf:
                  - title: "responseRequired=true"
                    type: object
                    properties:
                      orderId:
                        type: string
                        format: UUID
                        description: |
                          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
                      clientOrderId:
                        description: |
                          Your identifier of the order. Only returned if specified in the request.
                        type: string
                        format: UUID
                        example: 2be7d0df-d8dc-7b93-a550-8876f3b393e9
                      market:
                        type: string
                        example: BTC-EUR
                        description: |
                          The market where you created an order.
                      created:
                        description: |
                          The Unix timestamp when the order was created.
                        type: integer
                        format: unix-timestamp in milliseconds
                        example: 1706100650751
                      updated:
                        description: |
                          The Unix timestamp when the order was last updated.
                        type: integer
                        format: unix-timestamp in milliseconds
                        example: 1706100650751
                      status:
                        description: |
                          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.  
                        type: string
                        enum:
                          - new
                          - awaitingTrigger
                          - canceled
                          - expired
                          - filled
                          - partiallyFilled
                      side:
                        description: |
                          Indicates whether the order is to buy or sell the asset.
                        type: string
                        enum:
                          - buy
                          - sell
                      orderType:
                        description: |
                          The type of order you created.
                        type: string
                        enum:
                          - limit
                          - market
                      amount:
                        description: |
                          The quantity of the base currency to buy or sell.
                          If you set `amountQuote` in your order, `amount` is not returned.
                        type: string
                        example: '10'
                      amountRemaining:
                        description: |
                          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.
                        type: string
                        example: '10'
                      price:
                        description: |
                          The price you set for a `limit`, `stopLossLimit`, `takeProfit`, or a `takeProfitLimit` order.
                          For other types of orders, the `price` is not returned.
                        type: string
                        example: '7000'
                      amountQuote:
                        description: |
                          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.
                        type: string
                        example: '5000'
                      amountQuoteRemaining:
                        description: |
                          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.
                        type: string
                        example: '5000'
                      onHold:
                        description: |
                          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.
                        type: string
                        example: '70000'
                      onHoldCurrency:
                        description: |
                          The currency that is `onHold` while the order is processed. This depends on the `side` you set for the `orderId`.
                        type: string
                        example: EUR
                      triggerPrice:
                        description: |
                          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.
                        type: string
                        example: '4000'
                      triggerAmount:
                        description: |
                          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`.
                        type: string
                        example: '4000'
                      triggerType:
                        description: |
                          The type of trigger you set to fill the order when the condition is met. This value and `triggerAmount` are used to calculate `triggerPrice`.
                        type: string
                        enum:
                          - price
                      triggerReference:
                        description: |
                          The price you set to trigger the order to be filled for the `stopLoss`, `stopLossLimit`, `takeProfit`, or  `takeProfitLimit` types of orders.
                        type: string
                        enum:
                          - lastTrade
                          - bestBid
                          - bestAsk
                          - midPrice
                      filledAmount:
                        description: The total amount bought or sold in base currency.
                        type: string
                        example: '0'
                      filledAmountQuote:
                        description: The total amount bought or sold in quote currency.
                        type: string
                        example: '0'
                      feePaid:
                        description: |
                          The amount you pay Bitvavo to process the order. This value is negative for rebates. For more information, see
                          GET [/account/fees](/docs/rest-api/get-market-fees).
                        type: string
                        example: '0'
                      feeCurrency:
                        description: The currency of the `feePaid`.
                        type: string
                        example: EUR
                      fills:
                        description: |
                          The fill generated by the update order request.
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              description: The identifier of this fill.
                              type: string
                              example: 371c6bd3-d06d-4573-9f15-18697cd210e5
                            timestamp:
                              description: |
                                A Unix timestamp when Bitvavo processed the fill.
                              type: integer
                              format: unix-timestamp in milliseconds
                              example: 1542967486256
                            amount:
                              description: The amount of base currency exchanged in the fill.
                              type: string
                              example: '0.005'
                            price:
                              description: The price of the fill in quote currency.
                              type: string
                              example: '5000.1'
                            taker:
                              description: Returns `true` when you are the taker for the fill.
                              type: boolean
                              example: true
                            fee:
                              description: |
                                The amount you pay Bitvavo in `feeCurrency` to process the fill. For more information about your fees, see 
                                GET [/account/fees](/docs/rest-api/get-market-fees). This value is negative for rebates.
                                 
                                If `settled` is `false`, this parameter is not included in the return parameters.
                              type: string
                              example: '0.03'
                            feeCurrency:
                              description: |
                                The currency that the `fee` is paid in.

                                If `settled` is `false`, this object is not returned.
                              type: string
                              example: EUR
                            settled:
                              description: |
                                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`.
                              type: boolean
                      selfTradePrevention:
                        description: |
                          Indicates how to prevent self-trading for conflicting orders of any type.
                        type: string
                        enum:
                          - decrementAndCancel
                          - cancelOldest
                          - cancelNewest
                          - cancelBoth
                      visible:
                        description: |
                          Returns `true` when the `orderId` is visible in the [order book](/docs/rest-api/get-order-book) for a `market`.
                        type: boolean
                      timeInForce:
                        description: |
                          The value you set for how long an order stays active.
                        type: string
                        enum:
                          - GTC
                          - IOC
                          - FOK
                      postOnly:
                        description: |
                          If true, cancels limit orders that match immediately. This ensures you pay the maker fee and not the taker fee.
                        type: boolean
                      disableMarketProtection:
                        description: |
                          Must be **false** because market protection can no longer be disabled.
                        type: boolean
                        deprecated: true
                      operatorId:
                        description: |
                          Your identifier for the trader or the bot within your account that made the request.
                        type: integer
                        format: int64
                        example: 543462
                      restatementReason:
                        description: |
                          Specifies the reason why the status of the order was changed. For example when an order is canceled by the [Price protection checks](/docs/order-lifecycle/#price-protection).
                        type: string
                        enum:
                          - decrementOnSelfTradePrevention
                          - cancelOnSelfTradePrevention
                          - cancelOnPlacementPriceProtection
                          - cancelOnExecutionPriceProtection
                          - cancelOnSpreadProtection
                          - cancelOnReferencePriceProtection
                          - cancelPostOnlyOnAuctionMatching
                          - cancelOnMaintenance
                          - cancelOnDisconnect
                          - cancelOnDelisting
                          - cancelOnLockPlaced
                          - cancelOnAdminRequest
                          - cancelPostOnly
                      createdNs:
                        description: |
                          The Unix timestamp in nanoseconds when the order was created.
                        type: integer
                        format: unix-timestamp in nanoseconds
                        example: 1752139200000000000
                      updatedNs:
                        description: |
                          The Unix timestamp in nanoseconds when the order was last updated.
                        type: integer
                        format: unix-timestamp in nanoseconds
                        example: 1752139200000000000
                      codGroupId:
                        type: integer
                        example: 1
                        description: |
                          Your identifier for a group of orders.
                  - title: "responseRequired=false"
                    type: object
                    properties:
                      market:
                        type: string
                        example: BTC-EUR
                        description: |
                          The market where you created an order.
                      orderId:
                        type: string
                        format: UUID
                        description: |
                          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
                      clientOrderId:
                        description: |
                          Your identifier of the order. Only returned if specified in the request.
                        type: string
                        format: UUID
                        example: 2be7d0df-d8dc-7b93-a550-8876f3b393e9
                      created:
                        description: |
                          The Unix timestamp when the order was created.
                        type: integer
                        format: unix-timestamp in milliseconds
                        example: 1706100650751
                      updated:
                        description: |
                          The Unix timestamp when the order was last updated.
                        type: integer
                        format: unix-timestamp in milliseconds
                        example: 1706100650751
                      createdNs:
                        description: |
                          The Unix timestamp in nanoseconds when the order was created.
                        type: integer
                        format: unix-timestamp in nanoseconds
                        example: 1752139200000000000
                      updatedNs:
                        description: |
                          The Unix timestamp in nanoseconds when the order was last updated.
                        type: integer
                        format: unix-timestamp in nanoseconds
                        example: 1752139200000000000
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
    get:
      tags:
        - Trading
      summary: Get order
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Returns information about an existing order.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::

        :::info
        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.
        :::

        **Rate limit weight points**: **1**
      parameters:
        - name: market
          in: query
          required: true
          schema:
            type: string
          example: BTC-EUR
          description: |
            The market in which order was made.
        - name: orderId
          in: query
          required: true
          schema:
            type: string
            format: UUID
          example: 1be6d0df-d5dc-4b53-a250-3376f3b393e6
          description: |
            Bitvavo identifier of the order.
        - name: clientOrderId
          in: query
          required: false
          schema:
            type: string
            format: UUID
          example: 2be7d0df-d8dc-7b93-a550-8876f3b393e9
          description: |
            Your identifier of the order.

            <br/>

            > If both `clientOrderId` and `orderId` are set, we use the `clientOrderId` to identify the order.
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')().options({
              APIKEY: '<APIKEY>',
              APISECRET: '<APISECRET>'
            })
            bitvavo.getOrder('BTC-EUR', 'a8d260d8-9228-4bcb-979a-01aeaab4e961', (error, response) => {
              if (error === null) {
                console.log(response)
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo({
                'APIKEY': '<APIKEY>',
                'APISECRET': '<APISECRET>'
            })
            response = bitvavo.getOrder('XRP-BTC', 'a4a5d310-687c-486e-a3eb-1df832405ccd')
            print(response)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{ApiKey:"<APIKEY>", ApiSecret:"<APISECRET>"}
            response, err := bitvavo.GetOrder("BTC-EUR", "0d4ab620-a4a5-43d5-a62c-fe3daf46b913") if err != nil { fmt.Println(err) } else { fmt.Printf("%+v\n", response) }
      responses:
        '200':
          description: The request was successful.
          headers:
            bitvavo-ratelimit-remaining:
              description: 'The number of remaining [weight points](/docs/rate-limits) before it resets at `bitvavo-ratelimit-resetat`.'
              schema:
                type: integer
            bitvavo-ratelimit-resetat:
              description: The time when `bitvavo-ratelimit-remaining` resets to `bitvavo-ratelimit-limit`.
              schema:
                type: integer
                format: unix-timestamp in milliseconds
            bitvavo-ratelimit-limit:
              description: 'The number of available [weight points](/docs/rate-limits) in one minute.'
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                properties:
                  orderId:
                    type: string
                    format: UUID
                    description: |
                      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
                  clientOrderId:
                    description: |
                      Your identifier of the order. Only returned if specified in the request.
                    type: string
                    format: UUID
                    example: 2be7d0df-d8dc-7b93-a550-8876f3b393e9
                  market:
                    type: string
                    example: BTC-EUR
                    description: |
                      The market where you created an order.
                  created:
                    description: |
                      The Unix timestamp when the order was created.
                    type: integer
                    format: unix-timestamp in milliseconds
                    example: 1706100650751
                  updated:
                    description: |
                      The Unix timestamp when the order was last updated.
                    type: integer
                    format: unix-timestamp in milliseconds
                    example: 1706100650751
                  status:
                    description: |
                      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.  
                    type: string
                    enum:
                      - new
                      - awaitingTrigger
                      - canceled
                      - expired
                      - filled
                      - partiallyFilled
                  side:
                    description: |
                      Indicates whether the order is to buy or sell the asset.
                    type: string
                    enum:
                      - buy
                      - sell
                  orderType:
                    description: |
                      The type of order you created.
                    type: string
                    enum:
                      - limit
                      - market
                  amount:
                    description: |
                      The quantity of the base currency to buy or sell.
                      If you set `amountQuote` in your order, `amount` is not returned.
                    type: string
                    example: '10'
                  amountRemaining:
                    description: |
                      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.
                    type: string
                    example: '10'
                  price:
                    description: |
                      The price you set for a `limit`, `stopLossLimit`, `takeProfit`, or a `takeProfitLimit` order.
                      For other types of orders, the `price` is not returned.
                    type: string
                    example: '7000'
                  amountQuote:
                    description: |
                      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.
                    type: string
                    example: '5000'
                  amountQuoteRemaining:
                    description: |
                      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.
                    type: string
                    example: '5000'
                  onHold:
                    description: |
                      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.
                    type: string
                    example: '70000'
                  onHoldCurrency:
                    description: |
                      The currency that is `onHold` while the order is processed. This depends on the `side` you set for the `orderId`.
                    type: string
                    example: EUR
                  triggerPrice:
                    description: |
                      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.
                    type: string
                    example: '4000'
                  triggerAmount:
                    description: |
                      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`.
                    type: string
                    example: '4000'
                  triggerType:
                    description: |
                      The type of trigger you set to fill the order when the condition is met. This value and `triggerAmount` are used to calculate `triggerPrice`.
                    type: string
                    enum:
                      - price
                  triggerReference:
                    description: |
                      The price you set to trigger the order to be filled for the `stopLoss`, `stopLossLimit`, `takeProfit`, or  `takeProfitLimit` types of orders.
                    type: string
                    enum:
                      - lastTrade
                      - bestBid
                      - bestAsk
                      - midPrice
                  filledAmount:
                    description: The total amount bought or sold in base currency.
                    type: string
                    example: '0'
                  filledAmountQuote:
                    description: The total amount bought or sold in quote currency.
                    type: string
                    example: '0'
                  feePaid:
                    description: |
                      The amount you pay Bitvavo to process the order. This value is negative for rebates. For more information, see
                      GET [/account/fees](/docs/rest-api/get-market-fees).
                    type: string
                    example: '0'
                  feeCurrency:
                    description: The currency of the `feePaid`.
                    type: string
                    example: EUR
                  fills:
                    description: |
                      A JSON object containing all fills for `orderId`.
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          description: The identifier of this fill.
                          type: string
                          example: 371c6bd3-d06d-4573-9f15-18697cd210e5
                        timestamp:
                          description: |
                            A Unix timestamp when Bitvavo processed the fill.
                          type: integer
                          format: unix-timestamp in milliseconds
                          example: 1542967486256
                        amount:
                          description: The amount of base currency exchanged in the fill.
                          type: string
                          example: '0.005'
                        price:
                          description: The price of the fill in quote currency.
                          type: string
                          example: '5000.1'
                        taker:
                          description: Returns `true` when you are the taker for the fill.
                          type: boolean
                          example: true
                        fee:
                          description: |
                            The amount you pay Bitvavo in `feeCurrency` to process the fill. For more information about your fees, see 
                            GET [/account/fees](/docs/rest-api/get-market-fees). This value is negative for rebates.

                            If `settled` is `false`, this parameter is not included in the return parameters.
                          type: string
                          example: '0.03'
                        feeCurrency:
                          description: |
                            The currency that the `fee` is paid in.

                            If `settled` is `false`, this object is not returned.
                          type: string
                          example: EUR
                        settled:
                          description: |
                            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`.
                          type: boolean
                  selfTradePrevention:
                    description: |
                      Indicates how to prevent self-trading for conflicting orders of any type.
                    type: string
                    enum:
                      - decrementAndCancel
                      - cancelOldest
                      - cancelNewest
                      - cancelBoth
                  visible:
                    description: |
                      Returns `true` when the `orderId` is visible in the [order book](/docs/rest-api/get-order-book) for a `market`.
                    type: boolean
                  timeInForce:
                    description: |
                      The value you set for how long an order stays active.
                    type: string
                    enum:
                      - GTC
                      - IOC
                      - FOK
                  postOnly:
                    description: |
                      If true, cancels limit orders that match immediately. This ensures you pay the maker fee and not the taker fee.
                    type: boolean
                  disableMarketProtection:
                    description: |
                      Must be **false** because market protection can no longer be disabled.
                    type: boolean
                    deprecated: true
                  createdNs:
                    description: |
                      The Unix timestamp in nanoseconds when the order was created.
                    type: integer
                    format: unix-timestamp in nanoseconds
                    example: 1752139200000000000
                  updatedNs:
                    description: |
                      The Unix timestamp in nanoseconds when the order was last updated.
                    type: integer
                    format: unix-timestamp in nanoseconds
                    example: 1752139200000000000
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
    delete:
      tags:
        - Trading
      summary: Cancel order
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Cancels an open order.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::

        :::info
        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.
        :::

        **Rate limit weight points**: **1**
      parameters:
        - name: market
          in: query
          required: true
          schema:
            type: string
          example: BTC-EUR
          description: |
            The market in which order was made.
        - name: orderId
          in: query
          required: true
          schema:
            type: string
            format: UUID
          example: 1be6d0df-d5dc-4b53-a250-3376f3b393e6
          description: |
            Bitvavo identifier of the order.
        - name: operatorId
          in: query
          required: true
          description: |
            Your identifier for the trader or the bot within your account that made the request.
          schema:
            type: integer
            format: int64
            example: 543462
        - name: clientOrderId
          in: query
          required: false
          schema:
            type: string
            format: UUID
          example: 2be7d0df-d8dc-7b93-a550-8876f3b393e9
          description: |
            Your identifier of the order.

            <br/>

            > If both `clientOrderId` and `orderId` are set, we use the `clientOrderId` to identify the order.
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')().options({
              APIKEY: '<APIKEY>',
              APISECRET: '<APISECRET>'
            })

            bitvavo.cancelOrder(
                'BTC-EUR',
                'c8719781-7251-4fd7-9673-cce170e4f33a',
                { operatorId: 543462 },
                (error, response) => {
                  if (error === null) {
                    console.log('We canceled order ', response)
                  } else {
                    console.log(error)
                  }
                }
            )
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo({
                'APIKEY': '<APIKEY>',
                'APISECRET': '<APISECRET>'
            })
            response = bitvavo.cancelOrder('BTC-EUR', 'a4a5d310-687c-486e-a3eb-1df832405ccd', { 'operatorId': 543462 })
            print('Deleted', response['orderId'])
        - lang: Go
          source: |
            import . "bitvavo"
            bitvavo := Bitvavo{ApiKey:"<APIKEY>", ApiSecret:"<APISECRET>"}

            response, err := bitvavo.CancelOrder("BTC-EUR", "0b01bf57-2b86-4482-ac70-20b3d257793b", map[string]string{
                "operatorId": "543462",
            })
            if err != nil {
              fmt.Println(err)
            } else {
              fmt.Printf("%+v\n", response)
            }
      responses:
        '200':
          description: The request was successful.
          headers:
            bitvavo-ratelimit-remaining:
              description: 'The number of remaining [weight points](/docs/rate-limits) before it resets at `bitvavo-ratelimit-resetat`.'
              schema:
                type: integer
            bitvavo-ratelimit-resetat:
              description: The time when `bitvavo-ratelimit-remaining` resets to `bitvavo-ratelimit-limit`.
              schema:
                type: integer
                format: unix-timestamp in milliseconds
            bitvavo-ratelimit-limit:
              description: 'The number of available [weight points](/docs/rate-limits) in one minute.'
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                properties:
                  orderId:
                    description: Bitvavo identifier of the order.
                    type: string
                    format: UUID
                    example: 2e7ce7fc-44e2-4d80-a4a7-d079c4750b61
                  clientOrderId:
                    description: |
                      Your identifier of the cancelled order. Only returned if specified in the request.
                    type: string
                    format: UUID
                    example: 2be7d0df-d8dc-7b93-a550-8876f3b393e9
                  operatorId:
                    description: |
                      Your identifier for the trader or the bot within your account that made the request.
                    type: integer
                    format: int64
                    example: 543462
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /ordersOpen:
    get:
      tags:
        - Trading
      summary: Get open orders
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Returns all current open orders.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::

        **Rate limit weight points**: **100** (without `market`) or **5** (with `market`).
      parameters:
        - name: market
          in: query
          description: |
            The market in which to return the open orders. 
            If not specified, all open orders are returned.
          required: false
          schema:
            type: string
        - name: base
          in: query
          description: |
            The base asset for which to return the open orders. 
            If neither `market` nor `base` are specified, all open orders are returned.
          required: false
          schema:
            type: string
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')().options({
              APIKEY: '<APIKEY>',
              APISECRET: '<APISECRET>'
            })

            bitvavo.ordersOpen({}, (error, response) => {
              if (error === null) {
                console.log(response)
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo({
                'APIKEY': '<APIKEY>',
                'APISECRET': '<APISECRET>'
            })
            response = bitvavo.ordersOpen({})
            for item in response:
              print(item)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{ApiKey:"<APIKEY>", ApiSecret:"<APISECRET>"}
            response, err := bitvavo.OrdersOpen(map[string]string{}) if err != nil { fmt.Println(err) } else { for _, order := range response { fmt.Printf("%+v\n", order) } }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  orderId:
                    type: string
                    format: UUID
                    description: |
                      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
                  clientOrderId:
                    description: |
                      Your identifier of the order. Only returned if specified in the request.
                    type: string
                    format: UUID
                    example: 2be7d0df-d8dc-7b93-a550-8876f3b393e9
                  market:
                    type: string
                    example: BTC-EUR
                    description: |
                      The market where you created an order.
                  created:
                    description: |
                      The Unix timestamp when the order was created.
                    type: integer
                    format: unix-timestamp in milliseconds
                    example: 1706100650751
                  updated:
                    description: |
                      The Unix timestamp when the order was last updated.
                    type: integer
                    format: unix-timestamp in milliseconds
                    example: 1706100650751
                  status:
                    description: |
                      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.  
                    type: string
                    enum:
                      - new
                      - awaitingTrigger
                      - canceled
                      - expired
                      - filled
                      - partiallyFilled
                  side:
                    description: |
                      Indicates whether the order is to buy or sell the asset.
                    type: string
                    enum:
                      - buy
                      - sell
                  orderType:
                    description: |
                      The type of order you created.
                    type: string
                    enum:
                      - limit
                      - market
                  amount:
                    description: |
                      The quantity of the base currency to buy or sell.
                      If you set `amountQuote` in your order, `amount` is not returned.
                    type: string
                    example: '10'
                  amountRemaining:
                    description: |
                      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.
                    type: string
                    example: '10'
                  price:
                    description: |
                      The price you set for a `limit`, `stopLossLimit`, `takeProfit`, or a `takeProfitLimit` order.
                      For other types of orders, the `price` is not returned.
                    type: string
                    example: '7000'
                  amountQuote:
                    description: |
                      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.
                    type: string
                    example: '5000'
                  amountQuoteRemaining:
                    description: |
                      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.
                    type: string
                    example: '5000'
                  onHold:
                    description: |
                      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.
                    type: string
                    example: '70000'
                  onHoldCurrency:
                    description: |
                      The currency that is `onHold` while the order is processed. This depends on the `side` you set for the `orderId`.
                    type: string
                    example: EUR
                  triggerPrice:
                    description: |
                      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.
                    type: string
                    example: '4000'
                  triggerAmount:
                    description: |
                      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`.
                    type: string
                    example: '4000'
                  triggerType:
                    description: |
                      The type of trigger you set to fill the order when the condition is met. This value and `triggerAmount` are used to calculate `triggerPrice`.
                    type: string
                    enum:
                      - price
                  triggerReference:
                    description: |
                      The price you set to trigger the order to be filled for the `stopLoss`, `stopLossLimit`, `takeProfit`, or  `takeProfitLimit` types of orders.
                    type: string
                    enum:
                      - lastTrade
                      - bestBid
                      - bestAsk
                      - midPrice
                  filledAmount:
                    description: The total amount bought or sold in base currency.
                    type: string
                    example: '0'
                  filledAmountQuote:
                    description: The total amount bought or sold in quote currency.
                    type: string
                    example: '0'
                  feePaid:
                    description: |
                      The amount you pay Bitvavo to process the order. This value is negative for rebates. For more information, see
                      GET [/account/fees](/docs/rest-api/get-market-fees).
                    type: string
                    example: '0'
                  feeCurrency:
                    description: The currency of the `feePaid`.
                    type: string
                    example: EUR
                  fills:
                    description: |
                      A JSON object containing all fills for `orderId`.
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          description: The identifier of this fill.
                          type: string
                          example: 371c6bd3-d06d-4573-9f15-18697cd210e5
                        timestamp:
                          description: |
                            A Unix timestamp when Bitvavo processed the fill.
                          type: integer
                          format: unix-timestamp in milliseconds
                          example: 1542967486256
                        amount:
                          description: The amount of base currency exchanged in the fill.
                          type: string
                          example: '0.005'
                        price:
                          description: The price of the fill in quote currency.
                          type: string
                          example: '5000.1'
                        taker:
                          description: Returns `true` when you are the taker for the fill.
                          type: boolean
                          example: true
                        fee:
                          description: |
                            The amount you pay Bitvavo in `feeCurrency` to process the fill. For more information about your fees, see 
                            GET [/account/fees](/docs/rest-api/get-market-fees). This value is negative for rebates.

                            If `settled` is `false`, this parameter is not included in the return parameters.
                          type: string
                          example: '0.03'
                        feeCurrency:
                          description: |
                            The currency that the `fee` is paid in.

                            If `settled` is `false`, this object is not returned.
                          type: string
                          example: EUR
                        settled:
                          description: |
                            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`.
                          type: boolean
                  selfTradePrevention:
                    description: |
                      Indicates how to prevent self-trading for conflicting orders of any type.
                    type: string
                    enum:
                      - decrementAndCancel
                      - cancelOldest
                      - cancelNewest
                      - cancelBoth
                  visible:
                    description: |
                      Returns `true` when the `orderId` is visible in the [order book](/docs/rest-api/get-order-book) for a `market`.
                    type: boolean
                  timeInForce:
                    description: |
                      The value you set for how long an order stays active.
                    type: string
                    enum:
                      - GTC
                      - IOC
                      - FOK
                  postOnly:
                    description: |
                      If true, cancels limit orders that match immediately. This ensures you pay the maker fee and not the taker fee.
                    type: boolean
                  disableMarketProtection:
                    description: |
                      Must be **false** because market protection can no longer be disabled.
                    type: boolean
                    deprecated: true
                  operatorId:
                    description: |
                      Your identifier for the trader or the bot within your account that made the request.
                    type: integer
                    format: int64
                    example: 543462
                  createdNs:
                    description: |
                      The Unix timestamp in nanoseconds when the order was created.
                    type: integer
                    format: unix-timestamp in nanoseconds
                    example: 1752139200000000000
                  updatedNs:
                    description: |
                      The Unix timestamp in nanoseconds when the order was last updated.
                    type: integer
                    format: unix-timestamp in nanoseconds
                    example: 1752139200000000000
                  codGroupId:
                    type: integer
                    example: 1
                    description: |
                      Your identifier for a [group of orders](/docs/websocket-api/cancel-orders-after/).
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /trades:
    get:
      tags:
        - Trading
      summary: Get trade history
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Returns the specified number of past trades for your account and a time period of up to 24 hours. Does not return trades with a Price Guarantee. 

        The returned trades are sorted by their `timestamp` in a descending order, from the latest to the earliest.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::

        :::tip
        To get a specific list of trades, use the `start`, `end`, `tradeIdFrom`, and `tradeIdTo` parameters.
        ::::

        :::tip
        To get all past transactions for your account, use the [Get transaction history](/docs/rest-api/get-transaction-history/) request.
        ::::

        **Rate limit weight points**: **5**
      parameters:
        - name: market
          in: query
          description: |
            The market for which to return the past trades.
          example: BTC-EUR
          required: true
          schema:
            type: string
        - name: limit
          required: false
          in: query
          description: |
            The maximum number of trades to return, from latest to earliest.
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 500
        - name: start
          required: false
          in: query
          description: |
            The Unix timestamp starting from which to return trades.
            <br/>
            > Can only return trades for a period of up to 24 hours.
          schema:
            type: integer
            format: unix-timestamp in milliseconds
            minimum: 0
        - name: end
          required: false
          in: query
          description: |
            The Unix timestamp up to which to return trades.
            <br/>
            > Cannot be more than 24 hours after the `start` parameter. Can only return trades for a period of up to 24 hours.
          schema:
            type: integer
            format: unix-timestamp in milliseconds
            maximum: 8640000000000000
        - name: tradeIdFrom
          in: query
          description: |
            The unique identifier of the trade starting from which to return the trades.
          required: false
          schema:
            type: string
        - name: tradeIdTo
          in: query
          description: |
            The unique identifier of the trade up to which to return the trades.
          required: false
          schema:
            type: string
        - name: tradeId
          in: query
          description: |
            **Deprecated**: `tradeId` is interpreted as `tradeIdTo`. If used, returns all trades up to this `tradeId`.
          required: false
          deprecated: true
          schema:
            type: string
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')().options({
              APIKEY: '<APIKEY>',
              APISECRET: '<APISECRET>'
            })

            bitvavo.trades('BTC-EUR', {}, (error, response) => {
              if (error === null) {
                console.log(response)
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo({
                'APIKEY': '<APIKEY>',
                'APISECRET': '<APISECRET>'
            })
            response = bitvavo.trades('BTC-EUR', {})
            for item in response:
              print(item)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{ApiKey:"<APIKEY>", ApiSecret:"<APISECRET>"}
            response, err := bitvavo.Trades("BTC-EUR", map[string]string{}) if err != nil { fmt.Println(err) } else { for _, trade := range response { fmt.Printf("%+v\n", trade) } }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      description: |
                        The unique identifier of the fill.
                      type: string
                      example: 108c3633-0276-4480-a902-17a01829deae
                    orderId:
                      description: Bitvavo identifier of the order that was filled.
                      type: string
                      format: UUID
                      example: 1d671998-3d44-4df4-965f-0d48bd129a1b
                    clientOrderId:
                      description: |
                        Your identifier of the order that was filled.
                      type: string
                      format: UUID
                      example: 2be7d0df-d8dc-7b93-a550-8876f3b393e9
                    timestamp:
                      description: The Unix timestamp when the trade was made.
                      type: integer
                      format: unix-timestamp in milliseconds
                      example: 1542967486256
                    market:
                      description: The market for which to return past trades.
                      type: string
                      example: BTC-EUR
                    side:
                      description: |
                        Indicates if the taker, who filled the order, is selling or buying.
                      type: string
                      enum:
                        - buy
                        - sell
                    amount:
                      description: |
                        The amount of base currency exchanged in the trade.
                      type: string
                      example: '0.005'
                    price:
                      description: |
                        The price of 1 unit of base currency in the amount of quote currency at the time of the trade.
                      type: string
                      example: '5000.1'
                    taker:
                      description: Indicates whether you are the taker for the fill.
                      type: boolean
                      example: true
                    fee:
                      description: |
                        The fee that was paid. Value is negative for rebates. Only available if `settled` is true.
                      type: string
                      example: '0.03'
                    feeCurrency:
                      description: |
                        Currency in which the fee was paid. Only available is `settled` is true.
                      type: string
                      example: EUR
                    settled:
                      description: |
                        Indicates whether the fee was deducted and the exchanged
                        currency is available for further trading.
                      type: boolean
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /orders:
    get:
      tags:
        - Trading
      summary: Get orders
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Returns information about multiple orders.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::

        **Rate limit weight points**: **5**
      parameters:
        - name: market
          description: The market in which to get the order.
          in: query
          example: BTC-EUR
          required: true
          schema:
            type: string
        - name: limit
          in: query
          description: |
            The maximum number of orders to return, from latest to earliest.
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 500
        - name: start
          required: false
          in: query
          description: |
            The Unix timestamp starting from which to return orders.
          schema:
            type: integer
            format: unix-timestamp in milliseconds
            minimum: 0
        - name: end
          required: false
          in: query
          description: |
            The Unix timestamp up to which to return orders.
          schema:
            type: integer
            format: unix-timestamp in milliseconds
            maximum: 8640000000000000
        - name: orderIdFrom
          in: query
          description: |
            The unique identifier of the order starting from which to return the orders.
          required: false
          schema:
            type: string
            format: UUID
        - name: orderIdTo
          in: query
          description: |
            The unique identifier of the order up to which to return the orders.
          required: false
          schema:
            type: string
            format: UUID
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')().options({
              APIKEY: '<APIKEY>',
              APISECRET: '<APISECRET>'
            })
            bitvavo.getOrders('BTC-EUR', {}, (error, response) => {
              if (error === null) {
                console.log(response)
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo({
                'APIKEY': '<APIKEY>',
                'APISECRET': '<APISECRET>'
            })
            response = bitvavo.getOrders('BTC-EUR', {})
            for item in response:
              print(item)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{ApiKey:"<APIKEY>", ApiSecret:"<APISECRET>"}
            response, err := bitvavo.GetOrders("BTC-EUR", map[string]string{}) if err != nil { fmt.Println(err) } else { for _, order := range response { fmt.Printf("%+v\n", order) } }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    orderId:
                      type: string
                      format: UUID
                      description: |
                        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
                    clientOrderId:
                      description: |
                        Your identifier of the order. Only returned if specified in the request.
                      type: string
                      format: UUID
                      example: 2be7d0df-d8dc-7b93-a550-8876f3b393e9
                    market:
                      type: string
                      example: BTC-EUR
                      description: |
                        The market where you created an order.
                    created:
                      description: |
                        The Unix timestamp when the order was created.
                      type: integer
                      format: unix-timestamp in milliseconds
                      example: 1706100650751
                    updated:
                      description: |
                        The Unix timestamp when the order was last updated.
                      type: integer
                      format: unix-timestamp in milliseconds
                      example: 1706100650751
                    status:
                      description: |
                        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.  
                      type: string
                      enum:
                        - new
                        - awaitingTrigger
                        - canceled
                        - expired
                        - filled
                        - partiallyFilled
                    side:
                      description: |
                        Indicates whether the order is to buy or sell the asset.
                      type: string
                      enum:
                        - buy
                        - sell
                    orderType:
                      description: |
                        The type of order you created.
                      type: string
                      enum:
                        - limit
                        - market
                    amount:
                      description: |
                        The quantity of the base currency to buy or sell.
                        If you set `amountQuote` in your order, `amount` is not returned.
                      type: string
                      example: '10'
                    amountRemaining:
                      description: |
                        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.
                      type: string
                      example: '10'
                    price:
                      description: |
                        The price you set for a `limit`, `stopLossLimit`, `takeProfit`, or a `takeProfitLimit` order.
                        For other types of orders, the `price` is not returned.
                      type: string
                      example: '7000'
                    amountQuote:
                      description: |
                        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.
                      type: string
                      example: '5000'
                    amountQuoteRemaining:
                      description: |
                        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.
                      type: string
                      example: '5000'
                    onHold:
                      description: |
                        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.
                      type: string
                      example: '70000'
                    onHoldCurrency:
                      description: |
                        The currency that is `onHold` while the order is processed. This depends on the `side` you set for the `orderId`.
                      type: string
                      example: EUR
                    triggerPrice:
                      description: |
                        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.
                      type: string
                      example: '4000'
                    triggerAmount:
                      description: |
                        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`.
                      type: string
                      example: '4000'
                    triggerType:
                      description: |
                        The type of trigger you set to fill the order when the condition is met. This value and `triggerAmount` are used to calculate `triggerPrice`.
                      type: string
                      enum:
                        - price
                    triggerReference:
                      description: |
                        The price you set to trigger the order to be filled for the `stopLoss`, `stopLossLimit`, `takeProfit`, or  `takeProfitLimit` types of orders.
                      type: string
                      enum:
                        - lastTrade
                        - bestBid
                        - bestAsk
                        - midPrice
                    filledAmount:
                      description: The total amount bought or sold in base currency.
                      type: string
                      example: '0'
                    filledAmountQuote:
                      description: The total amount bought or sold in quote currency.
                      type: string
                      example: '0'
                    feePaid:
                      description: |
                        The amount you pay Bitvavo to process the order. This value is negative for rebates. For more information, see
                        GET [/account/fees](/docs/rest-api/get-market-fees).
                      type: string
                      example: '0'
                    feeCurrency:
                      description: The currency of the `feePaid`.
                      type: string
                      example: EUR
                    fills:
                      description: |
                        A JSON object containing all fills for `orderId`.
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            description: The identifier of this fill.
                            type: string
                            example: 371c6bd3-d06d-4573-9f15-18697cd210e5
                          timestamp:
                            description: |
                              A Unix timestamp when Bitvavo processed the fill.
                            type: integer
                            format: unix-timestamp in milliseconds
                            example: 1542967486256
                          amount:
                            description: The amount of base currency exchanged in the fill.
                            type: string
                            example: '0.005'
                          price:
                            description: The price of the fill in quote currency.
                            type: string
                            example: '5000.1'
                          taker:
                            description: Returns `true` when you are the taker for the fill.
                            type: boolean
                            example: true
                          fee:
                            description: |
                              The amount you pay Bitvavo in `feeCurrency` to process the fill. For more information about your fees, see 
                              GET [/account/fees](/docs/rest-api/get-market-fees). This value is negative for rebates.

                              If `settled` is `false`, this parameter is not included in the return parameters.
                            type: string
                            example: '0.03'
                          feeCurrency:
                            description: |
                              The currency that the `fee` is paid in.

                              If `settled` is `false`, this object is not returned.
                            type: string
                            example: EUR
                          settled:
                            description: |
                              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`.
                            type: boolean
                    selfTradePrevention:
                      description: |
                        Indicates how to prevent self-trading for conflicting orders of any type.
                      type: string
                      enum:
                        - decrementAndCancel
                        - cancelOldest
                        - cancelNewest
                        - cancelBoth
                    visible:
                      description: |
                        Returns `true` when the `orderId` is visible in the [order book](/docs/rest-api/get-order-book) for a `market`.
                      type: boolean
                    timeInForce:
                      description: |
                        The value you set for how long an order stays active.
                      type: string
                      enum:
                        - GTC
                        - IOC
                        - FOK
                    postOnly:
                      description: |
                        If true, cancels limit orders that match immediately. This ensures you pay the maker fee and not the taker fee.
                      type: boolean
                    disableMarketProtection:
                      description: |
                        Must be **false** because market protection can no longer be disabled.
                      type: boolean
                      deprecated: true
                    createdNs:
                      description: |
                        The Unix timestamp in nanoseconds when the order was created.
                      type: integer
                      format: unix-timestamp in nanoseconds
                      example: 1752139200000000000
                    updatedNs:
                      description: |
                        The Unix timestamp in nanoseconds when the order was last updated.
                      type: integer
                      format: unix-timestamp in nanoseconds
                      example: 1752139200000000000
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
    delete:
      tags:
        - Trading
      summary: Cancel orders
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Cancels multiple orders for the specified market or the account.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::

        **Rate limit weight points**: **100** (without `market`) or **25** (with `market`).
      parameters:
        - name: market
          in: query
          required: false
          example: BTC-EUR
          description: |
            The market in which to cancel the orders. 
            <br/>
            If not specified, all open orders are canceled.
          schema:
            type: string
        - name: operatorId
          in: query
          required: true
          description: |
            Your identifier for the trader or the bot within your account that made the request.
          schema:
            type: integer
            format: int64
            example: 543462
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')().options({
              APIKEY: '<APIKEY>',
              APISECRET: '<APISECRET>'
            })

            bitvavo.cancelOrders({ operatorId: 543462 }, (error, response) => {
              if (error === null) {
                console.log(response)
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo({
                'APIKEY': '<APIKEY>',
                'APISECRET': '<APISECRET>'
            })
            response = bitvavo.cancelOrders({'BTC-EUR', 'operatorId': '543462'})
            for item in response:
              print(item)
        - lang: Go
          source: |
            import . "bitvavo"
            bitvavo := Bitvavo{ApiKey:"<APIKEY>", ApiSecret:"<APISECRET>"}

            response, err := bitvavo.CancelOrders(map[string]string{"market": "BTC-EUR"})
            if err != nil {
              fmt.Println(err)
            } else {
              for _, order := range response {
                fmt.Printf("%+v\n", order)
              }
            }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: array
                description: An array with the list of canceled orders.
                items:
                  type: object
                  properties:
                    orderId:
                      type: string
                      format: UUID
                      description: Bitvavo identifier of the canceled order.
                      example: 1be6d0df-d5dc-4b53-a250-3376f3b393e6
                    operatorId:
                      description: |
                        Your identifier for the trader or the bot within your account that made the request.
                      type: integer
                      format: int64
                      example: 543462
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /atomic/orders:
    delete:
      tags:
        - Trading
      summary: Atomic cancel orders
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Cancels all open orders to buy or sell in the specified `market` as a single atomic request. The request is processed in strict arrival order and executed without interleaving with other operations.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::

        **Rate limit weight points**: **100**
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - market
                - side
                - operatorId
              properties:
                market:
                  type: string
                  description: |
                    The market in which to cancel all orders on the selected `side`.
                  example: BTC-EUR
                side:
                  type: string
                  description: |
                    Cancels all **buy** orders or all **sell** orders in specified `market`.
                  enum:
                    - buy
                    - sell
                operatorId:
                  type: integer
                  format: int64
                  description: Your identifier for the trader or the bot within your account that made the request.
                  example: 543462
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: array
                description: An array with the list of canceled orders.
                items:
                  type: object
                  properties:
                    orderId:
                      type: string
                      format: UUID
                      description: Bitvavo identifier of the canceled order.
                      example: 1be6d0df-d5dc-4b53-a250-3376f3b393e6
                    operatorId:
                      description: |
                        Your identifier for the trader or the bot within your account that made the request.
                      type: integer
                      format: int64
                      example: 543462  
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /cancelOrdersAfter:
    post:
      tags:
        - Trading
      summary: Cancel orders after
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: "Creates an identifier used to group open orders and sets the countdown timer after which those orders are automatically canceled.\n\nTo learn how to use this endpoint, see [Cancel on disconnect](/docs/cancel-on-disconnect/).\n\n:::info\nThis is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).\n::: \n\n:::info\n\U0001F4A1You can create only one group. If you need to create multiple groups, reach out to your Bitvavo contact to enable this.\n:::\n\n**Rate limit weight points**: **5**\n"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - codGroupId
                - expiryAfterSeconds
              properties:
                codGroupId:
                  type: integer
                  example: 1
                  minimum: 1
                  maximum: 1000
                  description: |
                    Your identifier for a [group of orders](/docs/rest-api/cancel-orders-after/).
                expiryAfterSeconds:
                  type: integer
                  example: 30
                  minimum: 10
                  maximum: 300
                  description: |
                    Your countdown timer in seconds after which open orders are canceled.
      responses:
        '200':
          description: The request was successful.
          headers:
            bitvavo-ratelimit-remaining:
              description: 'The number of remaining [weight points](/docs/rate-limits) before it resets at `bitvavo-ratelimit-resetat`.'
              schema:
                type: integer
            bitvavo-ratelimit-resetat:
              description: The time when `bitvavo-ratelimit-remaining` resets to `bitvavo-ratelimit-limit`.
              schema:
                type: integer
                format: unix-timestamp in milliseconds
            bitvavo-ratelimit-limit:
              description: 'The number of available [weight points](/docs/rate-limits) in one minute.'
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                properties:
                  codGroupId:
                    type: integer
                    example: 1
                    description: |
                      Your identifier for a [group of orders](/docs/rest-api/cancel-orders-after/).
                  timeOfExpirySeconds:
                    type: integer
                    format: unix-timestamp in seconds
                    example: 17202139111
                    description: |
                      Your countdown timer in seconds after which open orders are canceled.
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /deposit:
    get:
      tags:
        - Transfer
      summary: Get deposit data
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Returns wallet or bank account information required to deposit digital or fiat assets.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::

        **Rate limit weight points**: **1**
      parameters:
        - in: query
          description: The asset you want to deposit.
          name: symbol
          required: true
          schema:
            type: string
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')().options({
              APIKEY: '<APIKEY>',
              APISECRET: '<APISECRET>'
            })

            bitvavo.depositAssets('BTC', (error, response) => {
              if (error === null) {
                console.log(response)
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo({
                'APIKEY': '<APIKEY>',
                'APISECRET': '<APISECRET>'
            })
            response = bitvavo.depositAssets('BTC')
            print(response)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{ApiKey:"<APIKEY>", ApiSecret:"<APISECRET>"}
            response, err := bitvavo.DepositAssets("BTC") if err != nil { fmt.Println(err) } else { fmt.Printf("%+v\n", response) }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                oneOf:
                  - title: "Digital asset"
                    type: object
                    properties:
                      address:
                        description: |
                          The address where to deposit assets.
                        type: string
                        example: CryptoCurrencyAddress
                      paymentid:
                        description: |
                          If available, you need to specify `paymentid` with your deposit. It is sometimes called *note*, *memo*, or *tag*.
                        type: string
                        example: '10002653'
                  - title: "Fiat"
                    type: object
                    properties:
                      iban:
                        description: International bank account number where to deposit assets.
                        type: string
                        example: NL32BUNQ2291234129
                      bic:
                        description: Bank identification code sometimes necessary for international transfers.
                        type: string
                        example: BUNQNL2A
                      description:
                        description: Description which must be used for the deposit.
                        type: string
                        example: 254D20CC94
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /depositHistory:
    get:
      tags:
        - Transfer
      summary: Get deposit history
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Returns all past deposits for your account.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::

        **Rate limit weight points**: **5**
      parameters:
        - in: query
          name: symbol
          description: |
            The asset for which to return the deposit history. If not specified, all deposits are returned.
          required: false
          schema:
            type: string
        - in: query
          description: |
            The maximum number of deposits to return, from latest to earliest.
          name: limit
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 500
        - in: query
          name: start
          description: |
            The Unix timestamp starting from which to return deposits.
          required: false
          schema:
            type: integer
            format: unix-timestamp in milliseconds
            minimum: 0
        - in: query
          name: end
          description: |
            The Unix timestamp up to which to return deposits.
          required: false
          schema:
            type: integer
            format: unix-timestamp in milliseconds
            maximum: 8640000000000000
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')().options({
              APIKEY: '<APIKEY>',
              APISECRET: '<APISECRET>'
            })

            bitvavo.depositHistory({}, (error, response) => {
              if (error === null) {
                console.log(response)
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo({
                'APIKEY': '<APIKEY>',
                'APISECRET': '<APISECRET>'
            })
            response = bitvavo.depositHistory({})
            for item in response:
              print(item)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{ApiKey:"<APIKEY>", ApiSecret:"<APISECRET>"}
            response, err := bitvavo.DepositHistory(map[string]string{}) if err != nil { fmt.Println(err) } else { for _, deposit := range response { fmt.Printf("%+v\n", deposit) } }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                oneOf:
                  - title: "Digital asset"
                    type: object
                    properties:
                      timestamp:
                        description: The Unix timestamp when the deposit was made.
                        type: integer
                        format: unix-timestamp in milliseconds
                        example: 1706609321000
                      symbol:
                        type: string
                        example: BTC
                        description: |
                          The asset you deposited on Bitvavo.
                      amount:
                        description: The quantity of the asset you deposited on Bitvavo.
                        type: string
                        example: '0.99994'
                      address:
                        description: |
                          The address where you deposited assets.
                        type: string
                        example: 14qViLJfdGaP4EeHnDyJbEGQysnCpwk3gd
                      paymentId:
                        description: |
                          The unique identifier of the deposit. Returned if specified in the request.
                        type: string
                        example: '10002653'
                      txId:
                        description: |
                          The unique identifier of the transaction on the blockchain.
                        type: string
                        example: |
                          927b3ea50c5bb52c6854152d305dfa1e27fc01d10464cf10825d96d69d235eb3
                      fee:
                        description: 'The [transaction fee](https://bitvavo.com/en/fees) for a deposit on Bitvavo.'
                        type: string
                        example: '0.000063'
                  - title: "Fiat"
                    type: object
                    properties:
                      timestamp:
                        description: The Unix timestamp when the deposit was made.
                        type: integer
                        format: unix-timestamp in milliseconds
                        example: 1706609321000
                      symbol:
                        type: string
                        example: EUR
                        description: |
                          The currency you deposited on Bitvavo.
                      amount:
                        description: The quantity of the asset you deposited on Bitvavo.
                        type: string
                        example: '500'
                      fee:
                        description: 'The [transaction fee](https://bitvavo.com/en/fees) for a deposit on Bitvavo.'
                        type: string
                        example: '0'
                      status:
                        description: |
                          The state of the deposit. Can be **completed** or **canceled**.
                        type: string
                        example: completed
                      address:
                        description: 'The bank account from which the deposit was made. For example, NL89BANK0123456789.'
                        type: string
                        example: NL89BANK0123456789
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /withdrawal:
    post:
      tags:
        - Transfer
      summary: Withdraw assets
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Request to withdraw assets to a wallet or bank account.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::

        :::warning
        2FA and address confirmation by email are disabled for withdrawals using the API.
        :::

        **Rate limit weight points**: **1**
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - symbol
                - amount
                - address
              properties:
                symbol:
                  type: string
                  example: BTC
                  description: The asset you want to withdraw.
                amount:
                  description: The quantity of the asset to withdraw.
                  type: string
                  example: '1.5'
                address:
                  description: |
                    The address where to withdraw assets.
                    <br/>
                    > You can only withdraw to addresses which you have added and confirmed in your address book. Funds cannot be recovered after being withdrawn to the wrong address.
                  type: string
                  example: BitcoinAddress
                paymentId:
                  description: |
                    The unique identifier of the transaction of a digital asset. It is sometimes called *note*, *memo*, or *tag*.
                    Should be specified when withdrawing straight to another exchange or merchants that require a `paymentId`.
                  type: string
                  example: '10002653'
                internal:
                  description: |
                    **Deprecated** Do not use or set to **false** to avoid errors.
                  type: boolean
                  default: false
                  deprecated: true
                addWithdrawalFee:
                  description: |
                    Indicates if a fee is added in addition to the requested amount. If **false**, the fee is part of the requested amount and
                    subtracted from the withdrawal.
                  type: boolean
                  default: false
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')().options({
              APIKEY: '<APIKEY>',
              APISECRET: '<APISECRET>'
            })

            bitvavo.withdrawAssets('BTC', '2', 'BitcoinAddress', {}, (error, response) => {
              if (error === null) {
                console.log(response)
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo({
                'APIKEY': '<APIKEY>',
                'APISECRET': '<APISECRET>'
            })
            response = bitvavo.withdrawAssets('BTC', '1', 'BitcoinAddress', {})
            print(response)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{ApiKey:"<APIKEY>", ApiSecret:"<APISECRET>"}
            response, err := bitvavo.WithdrawAssets("BTC", "1", "BitcoinAddress", map[string]string{}) if err != nil { fmt.Println(err) } else { fmt.Printf("%+v\n", response) }
      responses:
        '200':
          description: The request was successful.
          headers:
            bitvavo-ratelimit-remaining:
              description: 'The number of remaining [weight points](/docs/rate-limits) before it resets at `bitvavo-ratelimit-resetat`.'
              schema:
                type: integer
            bitvavo-ratelimit-resetat:
              description: The time when `bitvavo-ratelimit-remaining` resets to `bitvavo-ratelimit-limit`.
              schema:
                type: integer
                format: unix-timestamp in milliseconds
            bitvavo-ratelimit-limit:
              description: 'The number of available [weight points](/docs/rate-limits) in one minute.'
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    description: Indicates if the withdrawal request was successful.
                    type: boolean
                    example: true
                  symbol:
                    type: string
                    example: BTC
                    description: The asset that was withdrawn.
                  amount:
                    description: The total amount deducted from your balance.
                    type: string
                    example: '1.5'
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /crypto/withdrawal:
    post:
      tags:
        - Transfer
      summary: Withdraw crypto assets
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Request to withdraw crypto assets to a wallet over the specified network.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::

        **Rate limit weight points**: **25**
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - asset
                - network
                - address
                - amount
                - deductFeeFromAmount
                - idempotencyKey
              properties:
                asset:
                  type: string
                  minLength: 1
                  maxLength: 10
                  example: BTC
                  description: |
                    The asset you want to withdraw.
                network:
                  type: string
                  minLength: 1
                  maxLength: 10
                  example: BTC
                  description: |
                    The network you want to withdraw the asset to.
                address:
                  type: string
                  minLength: 1
                  maxLength: 500
                  example: BitcoinAddress
                  description: |
                    The address where to withdraw the asset to.
                    <br/>
                    > Make sure to check the address. Funds cannot be recovered after being withdrawn to the wrong address.
                amount:
                  type: string
                  example: '0.05'
                  description: |
                    The amount to withdraw as a decimal string.
                deductFeeFromAmount:
                  type: boolean
                  default: false
                  description: |
                    If **false** (default), the recipient receives the full `amount` and the fee is charged separately. If **true**, the fee is deducted from `amount` before it is sent.
                idempotencyKey:
                  type: string
                  minLength: 5
                  maxLength: 50
                  example: unique-key-123
                  description: |
                    Retries with the same key return the existing withdrawal when the request matches; otherwise the request is rejected.
                memo:
                  type: string
                  minLength: 1
                  maxLength: 500
                  description: |
                    Memo or tag for networks that require it. Must match the one from the address book. Also known as *note* or *paymentId*.
            example:
              asset: BTC
              network: BTC
              address: bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
              amount: '0.05'
              deductFeeFromAmount: false
              idempotencyKey: unique-key-123
      responses:
        '201':
          description: The withdrawal was created.
          headers:
            bitvavo-ratelimit-remaining:
              description: 'The number of remaining [weight points](/docs/rate-limits) before it resets at `bitvavo-ratelimit-resetat`.'
              schema:
                type: integer
            bitvavo-ratelimit-resetat:
              description: The time when `bitvavo-ratelimit-remaining` resets to `bitvavo-ratelimit-limit`.
              schema:
                type: integer
                format: unix-timestamp in milliseconds
            bitvavo-ratelimit-limit:
              description: 'The number of available [weight points](/docs/rate-limits) in one minute.'
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The unique identifier of the withdrawal.
                    example: wd-abc123
                  asset:
                    type: string
                    minLength: 1
                    maxLength: 10
                    example: BTC
                    description: |
                      The asset that was withdrawn.
                  network:
                    type: string
                    minLength: 1
                    maxLength: 10
                    example: BTC
                    description: |
                      The network the asset was withdrawn to.
                  address:
                    type: string
                    minLength: 1
                    maxLength: 500
                    example: bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
                    description: The address where the asset was withdrawn to.
                  amount:
                    type: string
                    example: '0.05'
                    description: |
                      The amount that was withdrawn as a decimal string.
                  fee:
                    type: string
                    example: '0.0001'
                    description: The withdrawal fee as a decimal string.
                  createdAt:
                    type: string
                    format: date-time
                    example: '2026-05-19T12:00:00.000Z'
                    description: The creation time of the withdrawal.
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /withdrawalHistory:
    get:
      tags:
        - Transfer
      summary: Get withdrawal history
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Returns all past withdrawals for your account.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::

        **Rate limit weight points**: **5**
      parameters:
        - in: query
          name: symbol
          description: |
            The asset for which you want to retrieve past withdrawals. If not specified, all withdrawals are returned.
          required: false
          schema:
            type: string
        - in: query
          description: |
            The maximum number of withdrawals to return, from latest to earliest.
          name: limit
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 500
        - in: query
          name: start
          description: |
            The Unix timestamp starting from which to return withdrawals.
          required: false
          schema:
            type: integer
            format: unix-timestamp in milliseconds
            minimum: 0
        - in: query
          name: end
          description: |
            The Unix timestamp up to which to return withdrawals.
          required: false
          schema:
            type: integer
            format: unix-timestamp in milliseconds
            maximum: 8640000000000000
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')().options({
              APIKEY: '<APIKEY>',
              APISECRET: '<APISECRET>'
            })

            bitvavo.withdrawalHistory({}, (error, response) => {
              if (error === null) {
                console.log(response)
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo({
                'APIKEY': '<APIKEY>',
                'APISECRET': '<APISECRET>'
            })
            response = bitvavo.withdrawalHistory({})
            for item in response:
              print(item)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{ApiKey:"<APIKEY>", ApiSecret:"<APISECRET>"}
            response, err := bitvavo.WithdrawalHistory(map[string]string{}) if err != nil { fmt.Println(err) } else { for _, withdrawal := range response { fmt.Printf("%+v\n", withdrawal) } }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  timestamp:
                    description: The Unix timestamp when the withdrawal was made.
                    type: integer
                    format: unix-timestamp in milliseconds
                    example: 1542967486256
                  symbol:
                    type: string
                    example: BTC
                    description: The asset that was withdrawn.
                  amount:
                    description: The quantity of the asset that was withdrawn.
                    type: string
                    example: '0.99994'
                  address:
                    description: The address where the withdrawal was made.
                    type: string
                    example: BitcoinAddress
                  paymentId:
                    description: |
                      The unique identifier of the withdrawal. It is sometimes called *note*, *memo*, or *tag*. Not returned if not specified in the request.
                    type: string
                    example: '10002653'
                  txId:
                    description: |
                      The unique identifier of the transaction on the blockchain.
                    type: string
                    example: |
                      927b3ea50c5bb52c6854152d305dfa1e27fc01d10464cf10825d96d69d235eb3
                  fee:
                    description: 'The [transaction fee](https://bitvavo.com/en/fees) for a withdrawal on Bitvavo.'
                    type: string
                    example: '0.00006'
                  status:
                    description: The status of the withdrawal.
                    type: string
                    enum:
                      - awaiting_processing
                      - awaiting_email_confirmation
                      - awaiting_bitvavo_inspection
                      - approved
                      - sending
                      - in_mempool
                      - processed
                      - completed
                      - canceled
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /account:
    get:
      tags:
        - Account
      summary: Get account fees
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Returns your current trading fees from the default [Category A](https://bitvavo.com/en/fees) based on the trading volume of your account.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::

        **Rate limit weight points**: **1**
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')().options({
              APIKEY: '<APIKEY>',
              APISECRET: '<APISECRET>'
            })

            bitvavo.account((error, response) => {
              if (error == null) {
                console.log(response)
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo({
                'APIKEY': '<APIKEY>',
                'APISECRET': '<APISECRET>'
            })
            response = bitvavo.account()
            print(response)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{ApiKey:"<APIKEY>", ApiSecret:"<APISECRET>"}
            response, err := bitvavo.Account() if err != nil { fmt.Println(err) } else { fmt.Printf("%+v\n", response) }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  fees:
                    type: object
                    description: The trading fees and volume for your account.
                    properties:
                      taker:
                        description: The fee for trades that take liquidity from the order book.
                        type: string
                        example: '0.0025'
                      maker:
                        description: The fee for trades that add liquidity to the order book.
                        type: string
                        example: '0.0015'
                      volume:
                        description: Your trading volume in the last 30 days measured in EUR.
                        type: string
                        example: '10000.00'
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /balance:
    get:
      tags:
        - Account
      summary: Get account balance
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Returns the current balance for your account.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::

        **Rate limit weight points**: **5**
      parameters:
        - name: symbol
          in: query
          required: false
          description: |
            The asset for which you want to return the balance. If not specified, returns the balance for all assets above zero.
          schema:
            type: string
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')().options({
              APIKEY: '<APIKEY>',
              APISECRET: '<APISECRET>'
            })

            bitvavo.balance({}, (error, response) => {
              if (error === null) {
                console.log(response)
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo({
                'APIKEY': '<APIKEY>',
                'APISECRET': '<APISECRET>'
            })
            response = bitvavo.balance({})
            for item in response:
              print(item)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{ApiKey:"<APIKEY>", ApiSecret:"<APISECRET>"}
            response, err := bitvavo.Balance(map[string]string{}) if err != nil { fmt.Println(err) } else { for _, balance := range response { fmt.Printf("%+v\n", balance) } }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    symbol:
                      description: The asset for which the balance was returned.
                      type: string
                      example: BTC
                    available:
                      description: The balance that is available for use.
                      type: string
                      example: '1.57593193'
                    inOrder:
                      description: The balance that is currently reserved for open orders.
                      type: string
                      example: '0.74832374'
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /stakingBalance:
    get:
      tags:
        - Account
      summary: Get staking balance
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Returns the amount of crypto assets in your account that are currently in [fixed staking positions](https://support.bitvavo.com/hc/en-us/articles/4405243949841-Staking-at-Bitvavo) and are not available for trading.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::

        :::tip
        This request only returns assets locked in fixed staking. To get your balance available for trading, use the [Get account balance](/docs/rest-api/get-account-balance/) request.
        :::

        **Rate limit weight points**: **5**
      parameters:
        - name: symbol
          in: query
          required: false
          description: |
            The asset for which you want to return the staking balance. If not specified, returns the staking balance for all assets above zero.
          schema:
            type: string
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    symbol:
                      description: The asset for which the balance was returned.
                      type: string
                      example: BTC
                    amount:
                      description: The amount that is currently locked in fixed staking.
                      type: string
                      example: '0.99994'
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /account/fees:
    get:
      tags:
        - Account
      summary: Get market fees
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Returns your current trading fees from the [Category](https://bitvavo.com/en/fees) of the specified market based on the trading volume of your account. 

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::

        **Rate limit weight points**: **1**
      parameters:
        - in: query
          name: market
          example: BTC-EUR
          description: |
            The market for which to get fee information. If not specified, returns the fees for your 
            current tier in [Category A](https://bitvavo.com/en/fees).
          schema:
            type: string
        - in: query
          name: quote
          description: |
            The quote currency for which to get fee information. If not specified, returns the fees for your 
            current tier in [Category A](https://bitvavo.com/en/fees).
          schema:
            type: string
            enum:
              - EUR
              - USDC
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  tier:
                    description: |
                      The [price tier](https://bitvavo.com/en/fees) used to calculate your trading fees.
                      > The first tier in the Bitvavo fee structure is **0**.
                    type: string
                    example: '0'
                  volume:
                    description: Your trading volume over the last 30 days in EUR.
                    type: string
                    example: '10000.00'
                  taker:
                    description: The fee for trades that take liquidity from the order book.
                    type: string
                    example: '0.0025'
                  maker:
                    description: |
                      The fee for trades that add liquidity to the order book.
                    type: string
                    example: '0.0015'
        4XX:
          description: 'To learn more, see [Handle errors](/docs/errors).'
  /account/history:
    get:
      tags:
        - Account
      summary: Get transaction history
      security:
        - Bitvavo-Access-Key: []
          Bitvavo-Access-Timestamp: []
          Bitvavo-Access-Signature: []
          Bitvavo-Access-Window: []
      description: |
        Returns a list of past transactions for your account or the specified date range. If the range is not specified, returns all past transactions.

        :::info
        This is a *private* endpoint. To send requests, you need to [authenticate](/docs/rest-api/introduction/).
        :::
          
          **Rate limit weight points**: **1**
      parameters:
        - name: fromDate
          in: query
          description: The Unix timestamp starting from which to return transactions.
          schema:
            type: integer
            format: unix-timestamp in milliseconds
            minimum: 0
        - name: toDate
          in: query
          description: The Unix timestamp up to which to return transactions.
          schema:
            type: integer
            format: unix-timestamp in milliseconds
            maximum: 8640000000000000
        - name: page
          in: query
          description: The page number for the transaction history.
          schema:
            type: integer
            minimum: 1
        - name: maxItems
          in: query
          description: The maximum number of items per page in the transaction history.
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - name: type
          in: query
          description: The type of transaction to return.
          schema:
            type: string
            enum:
              - sell
              - buy
              - staking
              - fixed_staking
              - deposit
              - withdrawal
              - affiliate
              - distribution
              - internal_transfer
              - withdrawal_cancelled
              - rebate
              - loan
              - external_transferred_funds
              - manually_assigned
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        transactionId:
                          description: The unique identifier of the transaction.
                          type: string
                          example: 5f5e7b3b-4f5b-4b2d-8b2f-4f2b5b3f5e5f
                        executedAt:
                          description: The Unix timestamp when the transaction was executed.
                          type: string
                          format: date-time
                          example: '2021-01-01T00:00:00.000Z'
                        type:
                          description: The type of transaction.
                          type: string
                          enum:
                            - sell
                            - buy
                            - staking
                            - fixed_staking
                            - deposit
                            - withdrawal
                            - affiliate
                            - distribution
                            - internal_transfer
                            - withdrawal_cancelled
                            - rebate
                            - loan
                            - external_transferred_funds
                            - manually_assigned
                            - manually_assigned_bitvavo
                        priceCurrency:
                          description: The currency in which the transaction was made.
                          type: string
                          example: EUR
                        priceAmount:
                          description: The amount of the transaction.
                          type: string
                          example: '1000.00'
                        sentCurrency:
                          description: The currency that was sent in the transaction.
                          type: string
                          example: EUR
                        sentAmount:
                          description: The amount that was sent in the transaction.
                          type: string
                          example: '0.1'
                        receivedCurrency:
                          description: The currency that was received in the transaction.
                          type: string
                          example: BTC
                        receivedAmount:
                          description: The amount that was received in the transaction.
                          type: string
                          example: '0.0001'
                        feesCurrency:
                          description: The currency in which the fees were paid.
                          type: string
                          example: EUR
                        feesAmount:
                          description: The amount of fees paid in the transaction.
                          type: string
                          example: '0.01'
                        address:
                          description: The address where the transaction was made.
                          type: string
                          nullable: true
                  currentPage:
                    description: The current page number.
                    type: integer
                    example: 1
                  totalPages:
                    description: The total number of returned pages.
                    type: integer
                    example: 1
                  maxItems:
                    description: The maximum number of transactions per page.
                    type: integer
                    example: 100
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /time:
    get:
      tags:
        - Synchronization
      summary: Get server time
      description: |
        Returns the current Unix timestamp of Bitvavo servers.

        :::info
        This is a *public* endpoint. However, [authenticating](/docs/rest-api/introduction/) your request gives you a [higher rate limit](/docs/rate-limits/#how-its-calculated).
        :::
        **Rate limit weight points**: **1**
      x-codeSamples:
        - lang: Python
          source: |-
            from python_bitvavo_api.bitvavo import Bitvavo
            bitvavo = Bitvavo() response = bitvavo.time() print('Current time:', response['time'])
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')()
            bitvavo.time((error, response) => {
              if (error === null) {
                console.log('Current time: ', response.time)
              } else {
                console.log(error)
              }
            })
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{}
            response, err := bitvavo.Time() if err != nil { fmt.Println(err) } else { fmt.Println(response.Time) }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  time:
                    description: The current Unix timestamp of Bitvavo servers.
                    type: integer
                    format: unix-timestamp in milliseconds
                    example: 1539180275424
                  timeNs:
                    description: The current Unix timestamp of Bitvavo servers in nanoseconds.
                    type: integer
                    format: unix-timestamp in nanoseconds
                    example: 1752139200000000000
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /markets:
    get:
      tags:
        - Synchronization
      summary: Get markets
      description: |
        Returns the information about one or all markets on Bitvavo.

        :::info
        This is a *public* endpoint. However, [authenticating](/docs/rest-api/introduction/) your request gives you a [higher rate limit](/docs/rate-limits/#how-its-calculated).
        :::
        **Rate limit weight points**: **1**
      parameters:
        - in: query
          name: market
          example: BTC-EUR
          description: The market for which to return information.
          required: false
          schema:
            type: string
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')()
            // If all markets should be returned, pass an empty options object.
            bitvavo.markets({}, (error, response) => {
              if (error === null) {
                for (let object of response) {
                  console.log('Market response: ', object)
                }
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo()
            response = bitvavo.markets({})
            for market in response:
              print(market)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{}
            response, err := bitvavo.Markets(map[string]string{}) if err != nil { fmt.Println(err) } else { for _, market := range response { fmt.Printf("%+v\n", market) } }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    market:
                      description: The market for which you requested information.
                      type: string
                      example: BTC-EUR
                    status:
                      description: |
                        The [status of the market](/docs/order-lifecycle/#market-status) for which you requested information. 
                        To learn how markets in different statuses work, see [Trading Rules](https://bitvavo.com/en/trading-rules).
                      type: string
                      enum:
                        - trading
                        - halted
                        - auction
                        - auctionMatching
                        - cancelOnly
                      example: trading
                    base:
                      description: |
                        The base currency of the specified market.
                      type: string
                      example: BTC
                    quote:
                      description: |
                        The quote currency of the specified market.
                      type: string
                      example: EUR
                    pricePrecision:
                      description: |
                        The number of digits allowed in the price when the order was created.
                      type: integer
                      example: '5'
                      deprecated: true
                    minOrderInBaseAsset:
                      description: |
                        The minimum amount of base currency for an order in the specified market.
                      type: string
                      example: '0.0001'
                    minOrderInQuoteAsset:
                      description: |
                        The minimum amount of quote currency for an order in the specified market.
                      type: string
                      example: '5'
                    maxOrderInBaseAsset:
                      description: |
                        The maximum amount of base currency for an order in the specified market.
                      type: string
                      example: '1000000000'
                    maxOrderInQuoteAsset:
                      description: |
                        The maximum amount of quote currency for an order in the specified market.
                      type: string
                      example: '1000000000'
                    orderTypes:
                      description: |
                        The types of orders that can be placed in the specified market.
                      type: array
                      items:
                        type: string
                        enum:
                          - market
                          - limit
                          - stopLoss
                          - stopLossLimit
                          - takeProfit
                          - takeProfitLimit
                      example:
                        - market
                        - limit
                        - stopLoss
                        - stopLossLimit
                        - takeProfit
                        - takeProfitLimit
                    quantityDecimals:
                      description: |
                        The maximum number of decimals in the `amount` of an order.
                      type: integer
                      example: '4'
                    notionalDecimals:
                      description: |
                        The maximum number of decimal places allowed for `amountQuote` (quote currency amount).
                      type: integer
                      example: '2'
                    tickSize:
                      description: |
                        The minimum price increment of the market.
                      type: string
                      example: '0.01'
                    maxOpenOrders:
                      description: |
                        The maximum number of open orders allowed in a market per account.
                      type: integer
                      example: 100
                    feeCategory:
                      description: |
                        The [fee category](https://bitvavo.com/en/fees) of the market.
                      type: string
                      example: A
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
  /assets:
    get:
      tags:
        - Synchronization
      summary: Get asset data
      description: |
        Returns the information about the specified assets. 

        :::info
        This is a *public* endpoint. However, [authenticating](/docs/rest-api/introduction/) your request gives you a [higher rate limit](/docs/rate-limits/#how-its-calculated).
        :::
        **Rate limit weight points**: **1**
      parameters:
        - in: query
          example: BTC
          description: 'The asset for which to return the information. If not specified, all supported assets are returned.'
          name: symbol
          required: false
          schema:
            type: string
      x-codeSamples:
        - lang: JavaScript
          source: |
            // The Javascript SDK works with callbacks and with promises. For info, check our GitHub.
            const bitvavo = require('bitvavo')()
            bitvavo.assets({}, (error, response) => {
              if (error === null) {
                for (let object of response) {
                  console.log('Asset: ', object)
                }
              } else {
                console.log(error)
              }
            })
        - lang: Python
          source: |
            from python_bitvavo_api.bitvavo import Bitvavo

            bitvavo = Bitvavo()
            response = bitvavo.assets({})
            for asset in response:
              print(asset)
        - lang: Go
          source: |-
            import . "bitvavo" bitvavo := Bitvavo{}
            response, err := bitvavo.Assets(map[string]string{}) if err != nil { fmt.Println(err) } else { for _, asset := range response { fmt.Printf("%+v\n", asset) } }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    symbol:
                      description: The asset for which the information is returned.
                      type: string
                      example: BTC
                    name:
                      description: The full name of the asset.
                      type: string
                      example: Bitcoin
                    decimals:
                      description: The number of decimal digits for this asset.
                      type: integer
                      example: 8
                    depositFee:
                      description: The fee for depositing the asset.
                      type: string
                      example: '0'
                    depositConfirmations:
                      description: |
                        The minimum number of network confirmations to credit the asset to your account.
                      type: integer
                      example: 10
                    depositStatus:
                      description: The status of the asset being deposited.
                      type: string
                      enum:
                        - OK
                        - MAINTENANCE
                        - DELISTED
                    withdrawalFee:
                      description: The fee for withdrawing the asset.
                      type: string
                      example: '0.2'
                    withdrawalMinAmount:
                      description: The minimum amount that can be withdrawn.
                      type: string
                      example: '0.2'
                    withdrawalStatus:
                      description: The status of the asset being withdrawn.
                      type: string
                      enum:
                        - OK
                        - MAINTENANCE
                        - DELISTED
                    networks:
                      type: array
                      description: The list of supported networks.
                      items:
                        type: array
                        items:
                          type: string
                      example:
                        - Mainnet
                    message:
                      description: |
                        The reason if the `withdrawalStatus` or `depositStatus` is not `OK`.
                      type: string
                      example: ''
        4XX:
          description: 'For error codes, see [Handle errors](/docs/errors).'
servers:
  - url: 'https://api.bitvavo.com/v2'
components:
  securitySchemes:
    Bitvavo-Access-Key:
      description: |
        Your 64-character API key with the required [permissions](/docs/rest-api/introduction/).
      name: Bitvavo-Access-Key
      type: apiKey
      in: header
    Bitvavo-Access-Timestamp:
      description: |
        A Unix timestamp in milliseconds of the time when you make the request.
      name: Bitvavo-Access-Timestamp
      type: apiKey
      in: header
    Bitvavo-Access-Signature:
      description: |
        An HMAC-SHA256 hex-encoded string of the time, HTTP method, path, and parameters used to make the request. To learn more, see [Authentication](/docs/rest-api/introduction/).
      name: Bitvavo-Access-Signature
      type: apiKey
      in: header
    Bitvavo-Access-Window:
      description: |
        The execution timeout in milliseconds after Bitvavo-Access-Timestamp. The default value
        is 10000, the maximum value is 60000.
      name: Bitvavo-Access-Window
      type: apiKey
      in: header
