GET /api/transaction/rates

Get current swap rates of IDRX to other tokens.

Parameters

  1. idrxAmount (String):

    The IDRX amount to sell.

  2. usdtAmount (String):

    The USDT amount to sell.

  3. chainId (String): Blockchain ID.

You must provide either one of idrxAmount or usdtAmount as parameter. chainId will default to 137 (Polygon) if left unspecified.

Example Request

curl '<https://idrx.co/api/transaction/rates?usdtAmount=15>' --header 'idrx-api-key: <API_KEY>' --header 'idrx-api-sig: <signature>' --header 'idrx-api-ts': <timestamp>'

Response

If the request is successful, the response will be as shown below:

{
    "statusCode": 200,
    "message": "success",
    "data": {
        "price":"15323",
        "buyAmount":"229854",
        "chainId":137
    }
}

buyAmount represents the IDRX amount you would get from the specified USDT amount in the parameter.

Last updated