Docs
Sending back USDt

Sending back USDt

In this endpoint user will be allowed to return USDt or Matic from the wallet to a previously whitelisted address from the user.

Instructions are simple, just add the chain, token, amount, the address from and address to. If they are not previously mapped to the user, endpoint will fail with status 400.

Body Parameters

chain
required
'polygon'

Indicates the blockchain network in use.

token
required
'usdt' | 'matic'

Represents the token involved.

amount
required
float

Specifies the amount being withdraw, expressed as a float.

from_address
required
string

Represents the sending wallet's address.

to_address
required
string

Represents the receiving wallet's address.

const url = "baseURL/v1/wallet/withdraw"
 
const body = {
  "chain": "polygon",
  "token": "usdt",
  "amount": 0.10,
  "from_address": "0x1c0aCxxxxxx488fEdce1ab4",
  "to_address": "0x6Fe712cxxxxxx0E72988e68"
}
 
const response = await fetch(url, {
      method: "POST",
      headers: {
      Authorization: `Bearer ${access_token}`,
      "Content-Type": "application/json",
    },
      body: JSON.stringify(body),
})

Response samples

{
  "status": "ok",
  "msg": "transaction succesful",
  "data": {
    "status": "mined",
    "transactionHash": "0x0c5fabf2a7c76c809b345b6xxxxxd2d414b405033619067c9b425",
    "to": "00x6Fe712cxxxxxx0E72988e68",
    "usdt amount": 0.1
  }
}