Set Rate

This endpoint allows the authorized PSMD rate actor to set the fiat conversion rate used for PSMD pay-in and pay-out creation. The submitted rate must be provided in the following format:

1 USDT = x fiatCurrency

For example, if 1 USDT = 58 PHP, the value of usdtToFiatRate should be 58.

When a pay-in or pay-out is created, Tylt uses this rate to calculate the equivalent fiat-to-USDT conversion rate internally.

Endpoint

POSThttps://api.tylt.money/v2/prime-fiat/php/rate

Request Headers

Name
Type
Example
Description

X-TLP-APIKEY

string

93ee3c5e133697251b5362bcf9cc8532476785t8768075616f58d88

Your Tylt API Key, used to identify your account in API requests.

X-TLP-SIGNATURE

string

d0afef3853dfc8489c8b9affa5825171fdd7y7685675e4966a05f66ed2b3eaf9462b3c9c0

HMAC SHA-256 signature generated using the API Secret Key to secure the request.

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.

Request Body

Field
Type
Required
Description

currencySymbol

string

Yes

Fiat currency symbol for which the rate is being set. Example: PHP.

usdtToFiatRate

number

Yes

Actor-set rate in 1 USDT = x fiatCurrency format. Example: 58.

Code Snippet

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

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

const body = {
  currencySymbol: "PHP",
  usdtToFiatRate: 58
};

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

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

Response

Last updated