# GET /api/transaction/rates

## Parameters

1. **`idrxAmount` (String):**

   The IDRX amount to sell.
2. **`usdtAmount` (String):**

   The USDT/USDC amount to sell.
3. **chainId (String):**\
   Blockchain ID.

You must provide either one of `idrxAmount` or `usdtAmount` as parameter. `chainId` will default to 137 (Polygon) if left unspecified.

## Example Request

```
curl '<https://idrx.co/api/transaction/rates?usdtAmount=15>' --header 'idrx-api-key: <API_KEY>' --header 'idrx-api-sig: <signature>' --header 'idrx-api-ts': <timestamp>'
```

## Response

If the request is successful, the response will be as shown below:

```json
{
    "statusCode": 200,
    "message": "success",
    "data": {
        "price": "17171",
        "buyAmount": "34342",
        "chainId": 56,
        "quote": {
          "expectedResult": {
            "min": 1.988408,
            "max": 2
          }
        }
    }
}
```

`buyAmount` represents the IDRX amount you would get from the specified USDT/USDC amount in the parameter.


---

# Agent Instructions: 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.idrx.co/api/transaction-api/get-api-transaction-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.
