> For the complete documentation index, see [llms.txt](https://docs.tylt.money/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tylt.money/introduction/tylt-crossramp-fiat-crypto-solutions/philippines-php/administration/get-rate-history.md).

# Get Rate History

This endpoint returns the rate history for the authorized PSMD rate actor. Each history record represents a rate insert or update made for the applicable fiat currency.

**Endpoint**

<mark style="color:green;">**`POST`**</mark>`https://api.tylt.money/v2/prime-fiat/php/rate/history`

**Request Headers**

{% tabs %}
{% tab title="First Tab" %}

<table data-full-width="true"><thead><tr><th width="133">Name</th><th width="79">Type</th><th width="167">Example</th><th>Description</th></tr></thead><tbody><tr><td>X-TLP-APIKEY</td><td>string</td><td>93ee3c5e133697251b5362bcf9cc8532476785t8768075616f58d88</td><td>Your Tylt API Key, used to identify your account in API requests.</td></tr><tr><td>X-TLP-SIGNATURE</td><td>string</td><td>d0afef3853dfc8489c8b9affa5825171fdd7y7685675e4966a05f66ed2b3eaf9462b3c9c0</td><td>HMAC SHA-256 signature generated using the API Secret Key to secure the request.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
When using the API, ensure to include your API Key and generate the signature for the request payload using your API Secret. The tables provided above contain example values for illustration purposes only. Please refer to the code snippets for detailed instructions on how to sign the request and generate the signature properly.
{% endhint %}

**Query Parameters**

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

| Parameter        | Type     | Default | Description                                                  |
| ---------------- | -------- | ------: | ------------------------------------------------------------ |
| `currencySymbol` | `string` |       — | Filter rate history by fiat currency symbol. Example: `PHP`. |
| `limit`          | `number` |    `50` | Number of history records to return. Maximum value: `200`.   |
| `offset`         | `number` |     `0` | Pagination offset.                                           |
| {% endtab %}     |          |         |                                                              |
| {% endtabs %}    |          |         |                                                              |

**Code Snippet**

{% tabs %}
{% tab title="JavaScript (Axios)" %}

```javascript
const axios = require("axios");
const crypto = require("crypto");

const apiKey = "your-api-key";
const apiSecret = "your-api-secret";

const query = {
  currencySymbol: "PHP",
  limit: "50",
  offset: "0"
};

const signature = crypto
  .createHmac("sha256", apiSecret)
  .update(JSON.stringify(query))
  .digest("hex");

axios.get(
  "https://api.tylt.money/v2/prime-fiat/php/rate/history",
  {
    params: query,
    headers: {
      "X-TLP-APIKEY": apiKey,
      "X-TLP-SIGNATURE": signature
    }
  }
)
  .then((response) => console.log(response.data))
  .catch((error) => console.error(error.response?.data || error));
```

{% endtab %}
{% endtabs %}

**Response**

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

```json
{
  "msg": "Rate history fetched successfully.",
  "data": [
    {
      "id": 10,
      "rateId": 1,
      "fiatCurrencySymbol": "PHP",
      "cryptoCurrencySymbol": "USDT",
      "usdtToFiatRate": 58,
      "fiatToUsdtRate": 0.017241379310344827,
      "action": "update",
      "createdAt": "2026-05-14T10:15:30Z"
    }
  ]
}
```

{% endtab %}

{% tab title="Response Fields" %}

| Field                  | Type     | Description                                                                                                         |
| ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------- |
| `id`                   | `number` | Unique ID of the history record.                                                                                    |
| `rateId`               | `number` | ID of the active rate record associated with the history entry.                                                     |
| `fiatCurrencySymbol`   | `string` | Fiat currency symbol for which the rate was set.                                                                    |
| `cryptoCurrencySymbol` | `string` | Crypto currency symbol used for conversion. Currently `USDT`.                                                       |
| `usdtToFiatRate`       | `number` | Rate in `1 USDT = x fiatCurrency` format.                                                                           |
| `fiatToUsdtRate`       | `number` | Derived rate in `1 fiatCurrency = x USDT` format.                                                                   |
| `action`               | `string` | Indicates whether the history entry was created by an insert or update action. Possible values: `insert`, `update`. |
| `createdAt`            | `string` | Timestamp when the history record was created.                                                                      |
| {% endtab %}           |          |                                                                                                                     |
| {% endtabs %}          |          |                                                                                                                     |


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.tylt.money/introduction/tylt-crossramp-fiat-crypto-solutions/philippines-php/administration/get-rate-history.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
