Skip to main content
Every /v4/* endpoint supports two ways to filter, sort, and paginate results: simple flattened query parameters for common cases, and a JSON-based query parameter for more complex filtering, sorting, and aggregation. Every endpoint has a corresponding /meta endpoint that returns the available fields, allowed operators, and valid values.

Basic Example: Flattened Query Parameters

For common cases, pass filtering, sorting, and pagination directly as URL parameters:
These flattened parameters are supported on every /v4/* endpoint:
  • search - Free-text search across common fields (e.g., name, ticker)
  • <field> - Filter directly by any field name (e.g., ticker=USDC)
  • page - Page number (starts at 1)
  • per_page - Number of results per page
  • sort - Field to sort by
  • sort_direction - asc or desc

Advanced Example: JSON Query Object

For more complex filtering — composite and/or conditions, aggregation, or anything the flattened parameters can’t express — pass a JSON-based query language as a URL parameter named query. The query object can include:
  • filter - Filter conditions
  • sort - Sort configuration
  • pagination - Pagination settings
  • aggregate - Aggregation configuration (for aggregate endpoints)

URL Encoding

The query object must be JSON-stringified and URL-encoded:
In the API, platforms are referenced as protocol in field names (e.g., protocol_slug, protocol_id) for historical reasons. The terms are interchangeable — “platform” and “protocol” refer to the same entity.

Filtering

Filters allow you to narrow down results based on field values.

Basic Filter

Composite Filter (AND)

Composite Filter (OR)

Supported Operators

Comparison Operators:
  • equals - Exact match
  • notEquals - Not equal to
  • gt - Greater than (numbers)
  • gte - Greater than or equal (numbers)
  • lt - Less than (numbers)
  • lte - Less than or equal (numbers)
String Operators:
  • like - Case-sensitive pattern match (use % as wildcard)
  • ilike - Case-insensitive pattern match (use % as wildcard)
  • notLike - Case-sensitive negative match
  • startsWith - Starts with value
  • endsWith - Ends with value
Array Operators:
  • in - Value is in array (for array fields)
  • not-in - Value is not in array
  • includes - Array includes value (for array fields)
  • not-includes - Array does not include value
Date Operators:
  • before - Before date
  • onOrBefore - On or before date
  • after - After date
  • onOrAfter - On or after date
Null Operators:
  • is_null - Field value is null
  • is_not_null - Field value is not null
Logical Operators:
  • and - All filters must match
  • or - Any filter must match

Filter Examples

Filter by platform:
Filter by minimum market cap:
Search by name (case-insensitive):

Sorting

Sort results by any field in ascending or descending order. Sort Structure:
Directions:
  • asc - Ascending order
  • desc - Descending order
  • "" - No sorting (use default)
Example:

Pagination

Control the number of results returned and navigate through pages. Pagination Structure:
Parameters:
  • page - Page number (starts at 1)
  • perPage - Number of results per page (max varies by endpoint, typically 100)
Example:

Aggregation

For aggregate and timeseries endpoints, you can specify aggregation parameters. Aggregate Structure:
Parameters:
  • groupBy - Field to group by (e.g., network_id, asset_class_id, date)
  • aggregateFunction - Function to apply: sum, avg, min, max
  • interval - Time interval (for timeseries): day, week, month, year
  • mode - Aggregation mode:
    • stock - Point-in-time snapshot (latest value per period)
    • flow - Aggregate over period (sum/avg/etc. of all values)
Example:

Code Examples

JavaScript/TypeScript

Python