Purchase

Address https://api-qtreasure.qchain.space/v1/finance/buy

POST request

Parameters:

email - api client's email

emailClient - email of the user who performs the operation

sum - number of QSTN tokens to be purchased

currency - the currency in which the purchase takes place

qchain - the address of the api client's qchain wallet

api_key

Example:

{
  "email": "test@test.test",
  "emailClient": "client@test.test",
  "sum": 10,
  "currency": "USDT-TRC20",
  "qchain": "qchain_address",
  "api_key": "rTnbp54rIxfv2r5KdXRzHrJ6NIABMmvV"
}

Response:

{
  "success": true,
  "transaction": {
    "id": 338,
    "sum": 10,
    "sum_currency": 11,
    "type": 1,
    "status": 0,
    "gate": {
      "title": "Tether Tron TRC-20",
      "alias": "tether-tron-trc-20",
      "min_sum": 10,
      "max_sum": 100000,
      "rate": 1,
      "gateCurrency": {
        "code": "USDT-TRC20",
        "title": "Tether Tron TRC-20",
        "type": "crypto"
      },
      "data": {
        "send_paysys_identificator": "USDT-TRC20",
        "dec_digits": 4,
        "networks": [
          "TRC20"
        ],
        "icon": "https://api-qtreasure.qchain.space/storage/source/usdttrc20.png",
        "percent_fee": 0,
        "min_fee": 1
      }
    },
    "created_at": 1691143620,
    "icon": "https:/api-qtreasure.qchain.space/storage/source/usdttrc20.png",
    "transaction_address": "TRTKfN5qxrnHrKan89i3opwgo3nqUnjAK6",
    "data": {
      "qchain": "SjtYs6tfKcooABPoTkuat7ugLdppBFUq",
      "course": 1,
      "emailClient": "client@test.test",
      "percent_fee": 0,
      "min_fee": 1,
      "fee": 1
    }
  }
}

Response with an error:

{
  "success": false,
  "error": "Unauthorized",
  "message": "Your request was made with invalid credentials."
}

Last updated