openapi: 3.2.0 info: title: Defi Market Ohlcv API version: '2' servers: - url: https://api.amberdata.com/market/defi security: - sec0: [] tags: - name: Ohlcv paths: /ohlcv/{pool}/latest/: get: summary: Latest description: 'Retrieves the latest open-high-low-close for the specified pair. Includes data for exchanges depending on where the pair is traded. Asset information is included in the payload. Base & Quote information is using the first and second asset in a pool/pair, which is the represented price.' operationId: defi-ohlcv-latest parameters: - name: pool in: path description: The pool to retrieve the most current data. Can be the pool/pair symbols or address. schema: type: string default: DAI_USDC required: true - name: exchange in: query description: 'The exchange(s) for which to retrieve OHLCV. Example: exchange=uniswapv3' schema: type: string default: uniswapv2 - name: timeFormat in: query description: '**[Optional]** Time format of the timestamps in the return payload.
**[Defaults]** `milliseconds | ms* | iso | iso8601 | hr | human_readable`' schema: type: string responses: '200': description: '200' content: application/json: schema: type: object properties: status: type: integer example: 200 default: 0 title: type: string example: OK description: type: string example: Successful request payload: type: object properties: '0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5': type: object properties: exchangeName: type: string example: uniswapv2 exchangeId: type: string example: '0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f' pair: type: string example: DAI_USDC pairAddress: type: string example: '0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5' baseAddress: type: string example: '0x6b175474e89094c44da98b954eedeac495271d0f' baseCurrencyAddress: type: string example: '' baseName: type: string example: Dai Stablecoin baseSymbol: type: string example: DAI baseDecimals: type: string example: '18' quoteAddress: type: string example: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' quoteCurrencyAddress: type: string example: '' quoteName: type: string example: USD Coin quoteSymbol: type: string example: USDC quoteDecimals: type: string example: '6' blockchainNetworkId: type: string example: '1' blockchainId: type: string example: 1c9c969065fcd1cf timestamp: type: integer example: 1654289760000 index: type: integer example: 6 poolAddresses: type: array items: type: string example: '' pairName: type: string example: null poolNames: type: string example: null poolSymbols: type: string example: null poolDecimals: type: string example: null poolUnderlyingAddresses: type: string example: null poolUnderlyingNames: type: string example: null poolUnderlyingSymbols: type: string example: null poolUnderlyingDecimals: type: string example: null pairNormalized: type: string example: dai_usdc fee: type: number example: 0.003 milliseconds: type: integer example: 1654289760000 open: type: string example: '1.00264698775035179406' high: type: string example: '1.00264698775035179406' low: type: string example: '1.00264698775035179406' close: type: string example: '1.00264698775035179406' volume: type: string example: '56.960215' trades: type: integer example: 1 deprecated: false tags: - Ohlcv /ohlcv/{pool}/historical/: get: summary: Historical description: 'Retrieves the historical (time series) open-high-low-close for the specified pair. Includes data for exchanges depending on where the pair is traded. Base & Quote information is using the first and second asset in a pool/pair, which is the represented price.' operationId: defi-ohlcv-historical parameters: - name: pool in: path description: The pool to retrieve the most current data. Can be the pool/pair symbols or address. schema: type: string default: DAI_WETH required: true - name: exchange in: query description: 'The exchange(s) for which to retrieve OHLCV. Example: exchange=uniswapv2, uniswapv3' schema: type: string - name: startDate in: query description: FIlter by pairs after this date. schema: type: string format: date-time - name: endDate in: query description: FIlter by pairs before this date. schema: type: string format: date-time - name: timeInterval in: query description: '**[Optional]** Time interval.
**[Defaults]** `minutes | hours | days*`' schema: type: string - name: timeFormat in: query description: '**[Optional]** Time format of the timestamps in the return payload.
**[Defaults]** `milliseconds | ms* | iso | iso8601 | hr | human_readable`' schema: type: string responses: '200': description: '200' content: application/json: schema: type: object properties: status: type: integer example: 200 description: HTTP status code title: type: string example: OK description: Status title description: type: string example: Successful request description: Status description payload: type: object properties: metadata: type: object properties: columns: type: array items: type: string example: - timestamp - open - high - low - close - volume - quoteVolume - trades - exchangeId - pairAddress - baseAddress - quoteAddress description: Column names for the data arrays startDate: type: integer format: int64 example: 1727904832187 description: Start date in milliseconds since epoch endDate: type: integer format: int64 example: 1759527232187 description: End date in milliseconds since epoch data: type: object additionalProperties: type: array items: type: array items: oneOf: - type: integer - type: string minItems: 12 maxItems: 12 description: Array containing [timestamp, open, high, low, close, volume, quoteVolume, trades, exchangeId, pairAddress, baseAddress, quoteAddress] description: Trading data indexed by pair address example: '0x10d05e057cb1ee7eac0559aa7f09bf06f44fd718': - - 1727913600000 - '0.0004105818335350145800011301445552145' - '0.0004105818335350145800011301445552145' - '0.0004105818335350145800011301445552145' - '0.0004105818335350145800011301445552145' - '6.3820423846392694' - '0.0026203506639833680000000000000000002340430932402863' - '1' - '0x10d05e057cb1ee7eac0559aa7f09bf06f44fd718' - '0x05f4e094c8f77d001a05dc7ffef208ccbea47079' - '0x6b175474e89094c44da98b954eedeac495271d0f' - '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' deprecated: false tags: - Ohlcv components: securitySchemes: sec0: type: apiKey in: header x-default: API_KEY name: x-api-key x-readme: headers: [] explorer-enabled: true proxy-enabled: true x-readme-fauxas: true