Comparison Operations

These operations are designed for numeric, date, and string comparisons. They're essential for filtering data by ranges and relative values.

Greater Than (gt)

Finds records where the field value is greater than the specified value.

Syntax

field__gt=value

Examples

# Accounts with balance greater than 1000
GET /api/v0/accounts?balance__gt=1000

# Positions opened after a specific time
GET /api/v0/trade/positions?openTime__gt=2024-01-01

# Groups with more than 5 accounts
GET /api/v0/groups?accountsCount__gt=5

Greater Than or Equal (ge)

Finds records where the field value is greater than or equal to the specified value.

Syntax

Examples

Less Than (lt)

Finds records where the field value is less than the specified value.

Syntax

Examples

Less Than or Equal (le)

Finds records where the field value is less than or equal to the specified value.

Syntax

Examples

Range Filtering

Combine ge and le operations to create range filters:

Field Type Support

These operations work with:

  • Numeric Types: Integer, Long, Float, Double, BigDecimal

  • Date/Time Types: Date, LocalDate, LocalDateTime, Timestamp

  • String Types: Alphabetical comparison

Date Format

When using comparison operations with dates, use this format:

  • Dates: yyyy-MM-dd (e.g., 2024-01-01)

  • DateTime: ISO format (e.g., 2024-01-01T10:30:00)

Next Steps

  • Explore Calculated Fields for special group operations

  • Learn about Field Types for detailed type support information