Qchain
English
English
  • KNOWLEDGE BASE
    • Introduction to Qchain
    • Getting Started
    • How to run QChain node?
    • Instructions
      • How to install QNode on Linux
      • How to send tokens to staking
      • How to import an account
      • How to change the storage size
      • How to install Qnode on Andriod and register an account.
      • How to create a repository
      • How to transfer tokens between accounts
      • How to create your own token
      • How to send a file to the storage
    • Video instructions
      • How to import an account into Qchain node
      • Qchain. Import and Export of private key
      • Qchain installation Mac OS
      • Installation Qchain Node on Android
      • How to install a Qnode on Windows and register an account
    • Our tokens
    • Our products
    • Developing
      • Node API
      • Node account API
        • Export and import operations
        • Registering a new user
        • Registering a new user (2)
        • User login
        • Getting an address
        • Getting a balance
        • Getting a private key
        • Import a private key
        • Transfer
        • Request for transfer status
        • Request for list of transfers
        • Staking-Stake
        • Staking-Unstake
      • QTreasure API
        • Registration
        • List of payment gateways
        • Status payment
        • Payments
        • Purchase
        • Transaction fields
        • Transaction types
        • Transaction statuses
        • Callback response
Powered by GitBook
On this page
  1. KNOWLEDGE BASE
  2. Developing
  3. QTreasure API

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."
}
PreviousPaymentsNextTransaction fields

Last updated 1 year ago