> For the complete documentation index, see [llms.txt](https://docs.neox.vn/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.neox.vn/docs/global/global-collections/integration/fx/get-fx-rates.md).

# Get FX Rates

#### Endpoint: GET /v2/gc/fx/rates

#### Description: Retrieve reference (informational) FX rates for one or more currency pairs without locking a rate or generating a commitment token.

## Request

#### Request Params Field Descriptions

| Field Name     | Type   | Required | Description                                                                   |
| -------------- | ------ | -------- | ----------------------------------------------------------------------------- |
| sourceCurrency | string | No       | ISO 4217 currency code of the source currency to filter results (e.g. `USD`). |
| targetCurrency | string | No       | ISO 4217 currency code of the target currency to filter results (e.g. `CNH`). |

### Response

#### Response Field Descriptions

| Field Name    | Type   | Description                                |
| ------------- | ------ | ------------------------------------------ |
| code          | number | Response code.                             |
| state         | number | State of the response.                     |
| data          | object | Container for the list of FX rate entries. |
| message       | string | Response message.                          |
| neoResponseId | string | Unique NeoX response identifier.           |

#### `data` object fields:

| Field Name | Type  | Description                                  |
| ---------- | ----- | -------------------------------------------- |
| docs       | array | Array of FX rate objects for currency pairs. |

#### `docs` object item fields:

| Field Name     | Type        | Description                                                                  |
| -------------- | ----------- | ---------------------------------------------------------------------------- |
| sourceCurrency | string      | ISO 4217 currency code of the source (selling) currency.                     |
| targetCurrency | string      | ISO 4217 currency code of the target (buying) currency.                      |
| offer          | number      | Ask (offer) rate — the rate at which the platform sells the target currency. |
| bid            | number      | Bid rate — the rate at which the platform buys the target currency.          |
| fxRateDt       | date string | Timestamp when this FX rate was last updated (ISO 8601).                     |

#### Response sample

```json
{
  "code": 1,
  "state": 2,
  "data": {
    "docs": [
      {
        "sourceCurrency": "USD",
        "targetCurrency": "CNH",
        "offer": 7.2950,
        "bid": 7.2680,
        "fxRateDt": "2024-08-15T08:00:00Z"
      },
      {
        "sourceCurrency": "USD",
        "targetCurrency": "HKD",
        "offer": 7.8120,
        "bid": 7.8050,
        "fxRateDt": "2024-08-15T08:00:00Z"
      }
    ]
  },
  "message": "Successful",
  "neoResponseId": "de7750c5-772e-4136-ac78-62c57a106cce"
}
```

## Example cURL

```bash
curl -X GET "https://{base_url_openapi}/v2/gc/fx/rates?sourceCurrency=USD&targetCurrency=CNH" \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -H "Accept-Language: en"
```

### Notes

* Requires Bearer token in the Authorization header.
* The Accept-Language header can be used to specify the response language (Support: "vi", "en").
* The returned rates are informational only and do not lock a rate for trading. Use the FX Inquiry API (`POST /v2/gc/fx/inquiry`) to obtain a locked rate and a commitment token.
* Omit both `sourceCurrency` and `targetCurrency` to retrieve the full list of available FX rate pairs.
* `offer` and `bid` rates may change frequently; do not cache them for transactional decisions.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.neox.vn/docs/global/global-collections/integration/fx/get-fx-rates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
