> ## Documentation Index
> Fetch the complete documentation index at: https://docs.amberdata.io/llms.txt
> Use this file to discover all available pages before exploring further.

# VWAP - TWAP

> The VWAP (Volume Weighted Average Price) for BTC/USDT and other pairs on a crypto exchanges like Binance, is calculated every minute using trade data. VWAP is computed by taking the sum of the product of each trade’s price and size (i.e., trade price × trade volume) within the 1-minute interval, and dividing that by the total traded volume in that same interval. This provides a time-specific average price that accounts for trade size, offering a more accurate reflection of market activity than a simple average. The TWAP users the time-weighted average of the “close” price for each 1-minute candle. We use the close price because it’s the last traded price for that minute, which provides as consistent price that matches the minute’s end as closely as possible.



## OpenAPI

````yaml get /trade/vwap
openapi: 3.1.0
info:
  title: spot-analytics
  version: '2'
servers:
  - url: https://api.amberdata.com/markets/spot/analytics
security:
  - sec0: []
paths:
  /trade/vwap:
    get:
      summary: VWAP - TWAP
      description: >-
        The VWAP (Volume Weighted Average Price) for BTC/USDT and other pairs on
        a crypto exchanges like Binance, is calculated every minute using trade
        data. VWAP is computed by taking the sum of the product of each trade’s
        price and size (i.e., trade price × trade volume) within the 1-minute
        interval, and dividing that by the total traded volume in that same
        interval. This provides a time-specific average price that accounts for
        trade size, offering a more accurate reflection of market activity than
        a simple average. The TWAP users the time-weighted average of the
        “close” price for each 1-minute candle. We use the close price because
        it’s the last traded price for that minute, which provides as consistent
        price that matches the minute’s end as closely as possible.
      operationId: spot-analytics-vwap-twap
      parameters:
        - name: pair
          in: query
          description: |-
            **[Required]** The currency pair for the spot instrument.
            **[Examples]** ` btc_usd | btc_usdc | eth_usd `
          required: true
          schema:
            type: string
            default: btc_usd
        - name: exchange
          in: query
          description: >-
            **[Required]** The exchange for which to retrieve listed spot
            instruments.

            **[Examples]** ` gdax | okex | binance | binanceus`
          required: true
          schema:
            type: string
            default: gdax
        - name: startDate
          in: query
          required: false
          description: >-
            **[Optional]** Payload only includes data after this date
            (inclusive).

            **[Formats]** `seconds | milliseconds | iso8601` 

            **[Examples]** `1578531600 | 1578531600000 | 2025-02-27`
          schema:
            type: string
            default: '2025-06-01'
        - name: endDate
          in: query
          required: false
          description: |-
            **[Optional]** Payload only includes data up to this date.
            **[Formats]** `seconds | milliseconds | iso8601` 
            **[Examples]** `1578531600 | 1578531600000 | 2025-02-28`
          schema:
            type: string
            default: '2025-06-02'
        - name: timeInterval
          in: query
          required: false
          description: >-
            **[Optional]** Time interval of data frequency for the selected date
            range. 

            **[Examples]** ` minute | hour | day`
          schema:
            type: string
            default: day
        - name: timeFormat
          in: query
          required: false
          description: >-
            **[Optional]** Time format of the timestamps in the return payload. 

            **[Defaults]** `milliseconds | ms* | iso | iso8601 | hr |
            human_readable`
          schema:
            type: string
            default: hr
        - name: orderSizeCategoryUsd
          in: query
          required: true
          description: >-
            **[Required]** Users can specify to return all aggregated trades, or
            trades of a specific size threshold. (0-1k, 1k-10k, 10k-100k, 100k+,
            ALL) by passing in the lower value of the range ` 0 | 1k | 10k |
            100k | All `
          schema:
            type: string
            default: All
      responses:
        '200':
          description: ''
          content:
            application/json:
              examples:
                New Example:
                  summary: New Example
                  value:
                    status: 200
                    title: OK
                    description: Successful request
                    payload:
                      data:
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 23:00:00 000
                          totalVolumeUSD: 17077624.10253145
                          twap: 105726.12016666665
                          vwap: 105724.81842395054
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 22:00:00 000
                          totalVolumeUSD: 29901190.234523397
                          twap: 106000.51333333335
                          vwap: 106044.21872588272
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 21:00:00 000
                          totalVolumeUSD: 11549771.859701945
                          twap: 106338.51900000003
                          vwap: 106347.79507951892
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 20:00:00 000
                          totalVolumeUSD: 9735085.984966466
                          twap: 106333.61000000002
                          vwap: 106322.86687463883
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 19:00:00 000
                          totalVolumeUSD: 6827882.382201663
                          twap: 106358.19366666669
                          vwap: 106355.23768030593
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 18:00:00 000
                          totalVolumeUSD: 9869478.716884736
                          twap: 106311.98866666664
                          vwap: 106300.60451925016
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 17:00:00 000
                          totalVolumeUSD: 13292180.074134275
                          twap: 106302.93316666667
                          vwap: 106311.10648933919
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 16:00:00 000
                          totalVolumeUSD: 18507205.192912556
                          twap: 106202.98033333335
                          vwap: 106199.19117720834
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 15:00:00 000
                          totalVolumeUSD: 13773886.83343635
                          twap: 106027.39916666666
                          vwap: 106063.01158809518
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 14:00:00 000
                          totalVolumeUSD: 8186574.408960278
                          twap: 105791.74616666674
                          vwap: 105765.1241644865
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 13:00:00 000
                          totalVolumeUSD: 9083039.802297479
                          twap: 105797.45016666663
                          vwap: 105896.6942760686
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 12:00:00 000
                          totalVolumeUSD: 5633478.100658474
                          twap: 105699.21833333331
                          vwap: 105690.20520154337
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 11:00:00 000
                          totalVolumeUSD: 5376178.2150859935
                          twap: 105624.55266666666
                          vwap: 105653.57221582466
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 10:00:00 000
                          totalVolumeUSD: 4597719.486216294
                          twap: 105252.75383333329
                          vwap: 105229.85623988796
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 09:00:00 000
                          totalVolumeUSD: 7621615.302100955
                          twap: 105310.27333333336
                          vwap: 105300.53282667995
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 08:00:00 000
                          totalVolumeUSD: 2806791.298968891
                          twap: 105506.08466666666
                          vwap: 105498.35833966617
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 07:00:00 000
                          totalVolumeUSD: 3736490.295869334
                          twap: 105520.44233333334
                          vwap: 105527.339573059
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 06:00:00 000
                          totalVolumeUSD: 3972474.0227431855
                          twap: 105580.118
                          vwap: 105562.43588218733
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 05:00:00 000
                          totalVolumeUSD: 5204434.701969851
                          twap: 105599.48866666667
                          vwap: 105601.56391191226
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 04:00:00 000
                          totalVolumeUSD: 4616634.252113115
                          twap: 105597.29466666664
                          vwap: 105588.77625246809
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 03:00:00 000
                          totalVolumeUSD: 3315188.01312173
                          twap: 105504.52783333334
                          vwap: 105508.71296682941
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 02:00:00 000
                          totalVolumeUSD: 4278195.527676096
                          twap: 105584.38616666665
                          vwap: 105596.48203364453
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 01:00:00 000
                          totalVolumeUSD: 5272046.963051804
                          twap: 105640.23016666668
                          vwap: 105617.56397541084
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-08 00:00:00 000
                          totalVolumeUSD: 7474428.606706913
                          twap: 105572.94466666666
                          vwap: 105572.19499775872
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-07 23:00:00 000
                          totalVolumeUSD: 11810499.390065463
                          twap: 105726.95783333332
                          vwap: 105726.27792341512
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-07 22:00:00 000
                          totalVolumeUSD: 11505596.556401853
                          twap: 105875.62700000002
                          vwap: 105884.83995103992
                        - exchange: gdax
                          pair: btc_usd
                          timestamp: 2025-06-07 21:00:00 000
                          totalVolumeUSD: 7034260.681824598
                          twap: 105883.99866666668
                          vwap: 105883.8105750041
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 200
                  title:
                    type: string
                    example: OK
                  description:
                    type: string
                    example: Successful request
                  payload:
                    type: object
                    properties:
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            exchange:
                              type: string
                              example: gdax
                              description: >-
                                Exchange hosting the pair for VWAP/TWAP
                                calculations
                            pair:
                              type: string
                              example: btc_usd
                              description: Underlying pair for VWAP/TWAP calculations
                            timestamp:
                              type: string
                              example: 2025-06-08 23:00:00 000
                              description: Timestamp reflecting the VWAP/TWAP calculations
                            totalVolumeUSD:
                              type: number
                              example: 17077624.10253145
                              description: Raw total volume in quote terms (often USD)
                            twap:
                              type: number
                              example: 105726.12016666665
                              description: >-
                                Time-weighted average price. Underlying time
                                increments are in minutes
                            vwap:
                              type: number
                              example: 105724.81842395054
                              description: Trade-weighted average price
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````