Русский

Покупка

Адрес https://api-qtreasure.qchain.space/v1/finance/buy

POST запрос

Параметры:

email - электронная почта API-клиента

emailClient - электронная почта пользователя, выполняющего операцию

sum - количество токенов QSTN для покупки

currency - валюта, в которой происходит покупка

qchain - адрес кошелька qchain API-клиента

api_key

Пример:

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

Ответ:

{
  "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
    }
  }
}

Ответ с ошибкой:

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

Last updated