API Data Filtering Operators
When building institutional-grade financial applications, backtesting systematic trading models, or conducting quantitative research, retrieving the exact slice of data you need is critical.
When building institutional-grade financial applications, backtesting systematic trading models, or conducting quantitative research, retrieving the exact slice of data you need is critical.
High-fidelity historical market data—such as the full US Equities Trade and Quote (TAQ) originating from the Securities Information Processor (SIP)—can produce massive payloads. This guide demonstrates how to utilize the API's advanced query parameters to filter, sort, and paginate your datasets efficiently, ensuring you only process the data that matters to your workflow.
Core Filtering Parameters Reference#
The Algoseek Datasets API provides a standardized set of query parameters across its endpoints to help you shape your data response.
| Parameter | Type | Description | Default |
|---|---|---|---|
columns | string | Comma-separated list of specific fields to include in the response. | All columns |
sort | string | Sorting criteria. Use + for ascending and - for descending. Supports multiple fields. | Ascending (implicit) |
offset | integer | Number of records to skip. Used for pagination. | 0 |
limit | integer | Maximum number of records to return per request (Max: 10,000). | 1000 |
response_format | string | The payload format: json or csv_gzip. | json |
1. Field Projection: Using the columns Parameter#
When analyzing the US Equities Trade Only or TAQ feeds, returning every available column can consume unnecessary bandwidth and memory. The columns parameter acts as a vertical filter, allowing you to project only the fields required for your specific model.
Use Case: You are extracting execution data to calculate the Volume Weighted Average Price (VWAP) for a ticker and only need the timestamps, event types, and prices.
Example Request#
cURL
curl -X --get \
https://api.devalgoseek.com/api/v1/data/us-equity/eq-trades/2023-03-01/AAPL \
--data 'columns=TradeDate,EventDateTime,EventType,Price' \
-H "X-API-KEY: YOUR_API_KEY"
2. Multi-Dimensional Sorting: Using the sort Parameter#
Market microstructure analysis often requires viewing data in a specific chronological or reverse-chronological order. The sort parameter allows you to apply multi-dimensional sorting logic directly at the API level.
To specify the direction, prepend the column name with a + (ascending) or - (descending). You can chain multiple sorting conditions by comma-separating them.
Use Case: You want to review the most recent National Best Bid and Offer (NBBO) quote updates at the end of a trading session. You sort primarily by TradeDate (ascending) and secondarily by EventDateTime (descending).
Example Request#
cURL
curl -X --get \
https://api.devalgoseek.com/api/v1/data/us-equity/eq-taq/2023-03-01/AAPL \
--data 'sort=-TradeDate,+EventDateTime,+TradeDate,-EventDateTime' \
--data 'limit=5' \
-H "X-API-KEY: YOUR_API_KEY"
3. Handling Large Datasets: Pagination with limit and offset#
Institutional datasets, particularly 1-minute bars and tick-level TAQ data, frequently exceed the default return limits. To traverse these large datasets safely without hitting timeout errors, you must paginate using the limit and offset parameters.
limit: Caps the number of rows returned.offset: Skips the specified number of rows before beginning the return.
Use Case: You are pulling the US Equities Industry Standard Trade Only Minute Bar dataset for a highly liquid stock and need to fetch records in batches of 5,000.
Example Request (Fetching the second batch of 5,000 records)#
cURL
curl -X --get \
https://api.devalgoseek.com/api/v1/data/us-equity/eq-taq/2023-03-01/AAPL \
--data 'offset=5000' \
--data 'limit=5000' \
-H "X-API-KEY: YOUR_API_KEY"
4. Normalizing Historical Data: The adjusted Parameter#
When backtesting long-term quantitative strategies, corporate actions such as stock splits and dividends can artificially distort price and volume fields. By default, the API returns "as-is" data based on the information published on the exchange.
To filter out these artificial price drops/spikes, toggle the adjusted parameter to true. This applies backward-adjusted data logic seamlessly so your algorithms process normalized trends.
Use Case: Fetching Daily OHLC data for historical moving average crossover models, ensuring that previous splits are mathematically smoothed.
Example Request#
cURL
curl -X --get \
https://api.devalgoseek.com/api/v1/data/us-equity/eq-daily-ohlc \
--data 'Ticker=AAPL' \
--data 'adjusted=true' \
-H "X-API-KEY: YOUR_API_KEY"
Developer Best Practices for Production Data Access#
- Format Selection for Heavy Payloads: If you are requesting the maximum
limit(10,000 rows) of deep tick data, JSON parsing can become computationally expensive. Passresponse_format=csv_gzipto compress the payload, significantly reducing network transit time and memory overhead. - Combine Filters: For the most efficient queries, always combine
columns,limit, andsort. Never request the full column width if your model only requires price and volume. - Cache Immutable Data: If you are pulling unadjusted data (
adjusted=false) for a historical date, that data is immutable. Cache it locally to respect your API quota limits and improve your application's Time to Value (TTV).