> For the complete documentation index, see [llms.txt](https://docs.criptonopix.app.br/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.criptonopix.app.br/docs/cripto-no-pix-partner-api/partners/obtendo-uma-cotacao.md).

# 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 %}
