# Obtendo uma cotação

## Obtendo cotação

<mark style="color:green;">`POST`</mark> `/api/partners/quote-dolar`

Todas as requisições são autenticadas via HMAC SHA256

Request Headers

| Key            | Value              | Description                 |
| -------------- | ------------------ | --------------------------- |
| `Content-Type` | `application/json` |                             |
| `x-client-id`  | `string`           | `clientId`  recebido.       |
| `x-timestamp`  | `string`           | UNIX timestamp em segundos. |
| `x-signature`  | `string`           | HMAC signature.             |

**Body**

**Caso envie um valor para cotar uma quantia com `usdtAmount` é obrigatório o envio também do `quoteType`  que pode ser `"DEPOSIT"` ou `"WITHDRAW"` , caso não seja enviado, o `body` precisa conter um objeto vazio `{}` , se for enviado um `body`  indefinido retornará erro.**

| key          | value    | Description                 |
| ------------ | -------- | --------------------------- |
| `usdtAmount` | `number` | Valor do produto ou serviço |
| `quoteType`  | `string` | Tipo da cotação             |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "status": true,
    "message": "Data fetched successfully",
    "data": {
        "dolarPrice": 5.7,
        "dolarQuote": {
            "quoteDeposit": 59.59,
            "quoteWithdraw": null
        }
    }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "status": false,
    "message": {
        "usdtAmount": [
            "Number must be greater than 0"
        ],
        "quoteType": [
            "quoteType is required when usdtAmount is provided"
        ]
    }
}
```

{% endtab %}

{% tab title="401" %}

```json
{
    "status": false,
    "mesasge": "Unauthorized"
}
```

{% endtab %}

{% tab title="500" %}

```json
{
    "status": false,
    "message": "Internal server error"
}
```

{% endtab %}
{% endtabs %}


---

# 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.criptonopix.app.br/docs/cripto-no-pix-partner-api/partners/obtendo-uma-cotacao.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.
