IDRX Documentation
  • Introduction
    • IDRX Whitepaper
    • Supported Chain and Contract Address
  • IDRX Account
    • Create Account
    • Sign In
    • Forgot Password
    • Account Verification (KYC)
    • Business Account
  • Services
    • Mint IDRX
    • Redeem IDRX
    • Bridge IDRX
    • Get Other Tokens
    • Redeem Other Stablecoin
    • Fees
  • API
    • Getting Started
    • Generating a Signature
    • Onboarding API
      • POST /api/auth/onboarding
      • GET /api/auth/members
      • POST /api/auth/add-bank-account
      • GET /api/auth/get-bank-accounts
      • DELETE /api/auth/delete-bank-account/:bankId
    • Transaction API
      • POST /api/transaction/mint-request
      • POST /api/transaction/redeem-request
      • POST /api/transaction/bridge-request
      • GET /api/transaction/method
      • GET /api/transaction/user-transaction-history
      • GET /api/transaction/rates
      • GET /api/transaction/get-additional-fees
  • Smart Contract
    • Staking
      • Staking Type
      • Staking IDRX
      • Claim Staking Reward
      • Unbond Staked IDRX
      • Claim Unbonded IDRX
      • Claim Principal and Staking Rewards
      • Application Binary Interface
  • Integration
    • Overview
    • Onboarding a new user
    • Managing bank accounts
    • Processing mint requests
      • Getting other tokens
    • Processing redeem requests
      • Redeeming from other tokens
Powered by GitBook
On this page
  1. Integration
  2. Processing mint requests

Getting other tokens

A brief explanation on minting IDRX to get other tokens.

PreviousProcessing mint requestsNextProcessing redeem requests

Last updated 23 days ago

You can mint IDRX to get other tokens, such as USDT and USDC. Before doing this, you might want to check the current rate. You can use to get the current rates. Here's an example code to get current rates.

import { createSignature } from "./createSignature";
const axios = require('axios');

const apiKey = "{YOUR API KEY}";
const secret = "{YOUR SECRET}";

async function getRates() {
  const path = "https://idrx.co/api/transaction/rates?idrxAmount=15000";

  const bufferReq = Buffer.from('', 'base64').toString('utf8');
  const timestamp = Math.round((new Date()).getTime()).toString();
  const sig = createSignature('GET', path, bufferReq, timestamp, secret);

  const res = await axios.get(path, {
    headers: {
      'Content-Type': 'application/json',
      'idrx-api-key': apiKey,
      'idrx-api-sig': sig,
    },
  });

  console.log('res.data: ');
  console.log(JSON.stringify(res.data, null, 4));
}

getRates();

After a successful request, you will get a response as follows:

{
    "statusCode": 200,
    "message": "success",
    "data": {
        "price":"0.000062",
        "buyAmount":"0.932311",
        "chainId":137
    }
}

Get Other Stablecoin

You can mint IDRX and get other stablecoin such as USDT and USDC by following . The only thing that you need to change is the requestType parameter set to usdt. Check to see the list of other tokens.

this api
this guide
this page