---
title: "Query FX rates"
method: POST
path: "/forex/query"
tags: ["FX Rates"]
---

# Query FX rates

`POST /forex/query`

## Request

- Base URL: `https://us.api.flexprice.io/v1`
- URL: `https://us.api.flexprice.io/v1/forex/query`
- Auth: API key in header `x-api-key`

Filter FX rates via a request body (POST used for a complex query, but read-only).

## Request body

- TypesFXRateFilter
  - `end_time` string, date-time
  - `expand` string
  - `filters` TypesFilterCondition[]
    - `data_type` 'string' | 'number' | 'date' | 'array'
    - `field` string
    - `operator` 'eq' | 'contains' | 'not_contains' | 'gt' | 'lt' | 'gte' | 'in' | 'not_in' | 'before' | 'after'
    - `value` TypesValue
      - `array` string[]
      - `boolean` boolean
      - `date` string
      - `number` number
      - `string` string
  - `from_currency` string
  - `fx_rate_ids` string[]
  - `limit` integer
  - `offset` integer
  - `order` 'asc' | 'desc'
  - `scope` 'tenant' | 'customer' | 'subscription'
  - `scope_id` string
  - `sort` TypesSortCondition[]
    - `direction` 'asc' | 'desc'
    - `field` string
  - `start_time` string, date-time
  - `status` 'published' | 'deleted' | 'archived'
  - `to_currency` string

## Response `200`

OK

- ListFXRatesResponse
  - `items` FXRateResponse[]
    - `created_at` string, date-time
    - `created_by` string
    - `end_date` string, date-time
    - `environment_id` string
    - `from_currency` string
    - `id` string
    - `metadata` object
    - `rate` string
    - `scope` 'tenant' | 'customer' | 'subscription'
    - `scope_id` string
    - `source` 'fixed' | 'market'
    - `start_date` string, date-time
    - `status` 'published' | 'deleted' | 'archived'
    - `tenant_id` string
    - `to_currency` string
    - `updated_at` string, date-time
    - `updated_by` string
  - `pagination` TypesPaginationResponse
    - `limit` integer
    - `offset` integer
    - `total` integer

## Other responses

- `400`: Invalid request
- `500`: Server error

## Changes

- **2026-10-02** `dba33efc3068`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/flexprice/apis/flexprice-api/changes/forex/query/post.md)

---

[API](https://skmtc.dev/flexprice/apis/flexprice-api.md) - [All operations](https://skmtc.dev/flexprice/apis/flexprice-api/llms.txt) - [OpenAPI document](https://skmtc.dev/flexprice/apis/flexprice-api/revisions/84cb4a3af400?raw)
