added

Introduction of sortDirection Parameter for Market Data Endpoints

2024-08-12

We are excited to announce the addition of a new optional sortDirection parameter to our Market Data endpoints. This enhancement gives users greater control over how their data is sorted and retrieved, particularly for those who need quick access to the most recent data.

Details of the Change:

  • New Parameter Name: sortDirection
  • Values: asc, ascending, desc, descending (case insensitive)
  • Default: asc (ascending order)
  • Usage Conditions: This parameter can only be utilized if the startDate and endDate parameters are within the most recent 24-hour window, or if startDate and endDate are not used at all. By default, if no startDate and endDate are provided, the API returns data from the most recent 24 hours.

Impact:

  • Improved Data Access: Users can now easily retrieve the most recent data without needing to paginate through older records.
  • Compatibility: This change applies to all versioned market data endpoints.

Example Use:

Here’s a sample API request using the new sortDirection parameter:

GET https://api.amberdata.com/markets/spot/tickers/eth_usdt?exchange=binance&sortDirection=desc

This request will return the ETH/USDT ticker data from Binance sorted from the most recent to the oldest within the default 24-hour window.

Support

We are dedicated to continually improving our service and providing you with the tools you need for effective market analysis. If you have any questions or require assistance, please reach out to our support team at [email protected].