# Orders Statistics API

## Overview

The Orders/Statistics/Plaques API allows you to retrieve information about plaques sold within a specific time range. This API is accessible via a GET request and requires the `from` and `to` parameters to specify the date range.

## Request

<mark style="color:blue;">`GET`</mark> `https://api.stagemeta.dev/orders/statistics/plaques`

#### Query Parameters

| Name | Type   | Description                                                            |
| ---- | ------ | ---------------------------------------------------------------------- |
| from | String | The start date of the time range to retrieve plaques from (YYYY-MM-DD) |
| to   | String | The end date of the time range to retrieve plaques from (YYYY-MM-DD)   |

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

```json
{
  "items": [{
    "id": 0,
    "ethPrice": "1.243223",
    "usdPrice": 1002,
    "metaEnergyPercent": 25,
    "tokenId": "32",
    "plaqueName": "aaa-000"
}],
  "count": 0
}
```

{% endtab %}

{% tab title="400: Bad Request 	 'from' and 'to' must be a valid ISO 8601 date string" %}

{% endtab %}

{% tab title="500: Internal Server Error " %}

{% endtab %}
{% endtabs %}

## Example Requests

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

```bash
curl -X 'GET' \
  'https://api.stagemeta.dev/orders/statistics/plaques?from=2022-01-01&to=2023-04-13' \
  -H 'accept: application/json'
```

{% endtab %}

{% tab title="Node" %}

```javascript
fetch('https://api.stagemeta.dev/orders/statistics/plaques?from=2022-01-01&to=2023-04-13', {
  headers: {
    'accept': 'application/json'
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error))
```

{% endtab %}
{% endtabs %}
