Field Types

Understanding which operations work with different data types is crucial for building effective search queries. This section explains the supported field types and their compatible operations.

Numeric Types

Supported Types

  • Integer

  • Long

  • Float

  • Double

  • BigDecimal

Compatible Operations

  • eq, ne, gt, ge, lt, le, in

Examples

# Balance filtering
GET /api/v0/accounts?balance__gt=1000
GET /api/v0/accounts?balance__ge=500&balance__le=5000

# Multiple leverage values
GET /api/v0/accounts?leverage__in=1,10,50,100

# Exact margin value
GET /api/v0/accounts?margin__eq=250.50

String Types

Supported Types

  • String

Compatible Operations

  • eq, ne, gt, ge, lt, le, like, in

Examples

Special Notes

  • like operation is case-insensitive

  • gt, ge, lt, le perform alphabetical comparison

  • String comparisons are useful for alphabetical sorting/filtering

Date/Time Types

Supported Types

  • Date

  • LocalDate

  • LocalDateTime

  • Timestamp

Compatible Operations

  • eq, ne, gt, ge, lt, le, in

Date Formats

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

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

Examples

Boolean Types

Supported Types

  • Boolean

Compatible Operations

  • eq, ne, in

Values

  • true

  • false

Examples

Enum Types

Supported Types

Custom enums such as:

  • TradeDirection (BUY, SELL)

  • AccountFundTypes (Balance, Credit)

  • PendingHistoryReasons

Compatible Operations

  • eq, ne, in

Examples

Calculated Fields (Groups Only)

Supported Types

  • Long (count values)

Available Fields

  • accountsCount

  • symbolsCount

  • positionsCount

Compatible Operations

  • eq, ne, gt, ge, lt, le

Examples

Nested Field Access

You can search within related entities using dot notation:

Examples

Operation Compatibility Matrix

Type
eq
ne
gt
ge
lt
le
like
in

Numeric

String

Date/Time

Boolean

Enum

Calculated

Next Steps

  • Explore API Endpoints to see which fields are available for each endpoint

  • Check out Usage Examples for practical implementations