Roqqu API Service (1.0.0)

Welcome to the Roqqu API documentation for building scalable blockchain applications by leveraging on the Roqqu core infrastructure. With the APIs, you'll be able to reduce your development and infrastructure costs, as well as significantly reduce your go-to-market time.

How it Works:

Roqqu allows a merchant to interact with blockchains and helps merchants create wallet systems that generates, sends and receives blockchain payments. Every time a transaction is processed to a wallet address owned by a merchant, Roqqu notifies the merchant via webhook calls with the details of the transaction, such as the recipient address, ref ID, transaction hash, and the value of the transaction.

Below is a list of supported protocols on the Roqqu API console.

Blockchain ProtocolNetwork
BitcoinMainnet
Ethereum (ERC20)Mainnet
BNB Smart Chain (BEP20)Mainnet
Tron (TRC20)Mainnet
Solana (SOL)Mainnet
XRPMainnet
Litecoin (LTC)Mainnet
Download OpenAPI description
Languages
Servers
Mock server

https://roqqu-api.redocly.app/_mock/apis/

https://service.roqqu.com/v1/

Auth

API keys are required as an authentication method with Roqqu APIs. By using your secret API key you authenticate access to the specific API. Without authentication, access to the API is denied. Secret Keys should be kept confidential and only stored on your own servers. Your account’s secret API key can perform any API request to Roqqu without restriction. You can find your API keys under the API Keys and Webhooks section on the settings page of the RAS console. Choose between the Test mode for testing and Live Mode for production. Copy the generated key and store it securely. Once your testing is successful and your integration is working as expected, replace the Test API Key with the Live API Key. Update your API requests to point to the live endpoints. Ensure all data and configurations are correct before going live with real transactions.

Balances

The Balances endpoint provides real-time information on the cryptocurrency holdings of users. This feature allows users to check their current balances across different cryptocurrencies, ensuring they can monitor their assets effectively and make informed decisions.

Operations

Wallets

The Balances endpoint provides real-time information on the cryptocurrency holdings of users. This feature allows users to check their current balances across different cryptocurrencies, ensuring they can monitor their assets effectively and make informed decisions.

Operations

History

The History endpoint offers a comprehensive overview of all past transactions. Users can retrieve their transaction history, including details like amounts, timestamps, and transaction statuses, providing transparency and a complete audit trail for all crypto activities.

Operations

Customers

The Customers endpoint is designed for businesses to manage their customer information seamlessly. It also allows for blacklisting and whitelisting of customer accounts.

Operations

Ip Whitelist

This adds an extra layer of security by allowing users to restrict API access to specific IP addresses. This feature helps prevent unauthorized access, ensuring that only trusted sources can interact with the API.

Operations

Webhooks

The Webhooks endpoint provides real-time notifications for various events, such as transaction confirmations and status updates. Users can configure webhook URLs to receive immediate alerts, enabling automated responses and enhancing operational efficiency.

Operations

Analytics

The Analytics endpoint delivers insightful data on user activity, wallet and transaction metrics. Businesses can leverage this information to track performance, identify trends, and make data-driven decisions, ultimately enhancing their service offerings.

Operations

Trade

The Trade endpoints facilitates buying, selling, and swapping cryptocurrencies with ease. This feature supports various trading pairs, providing users with a streamlined interface to execute trades efficiently while ensuring security and transparency.

Operations

Buy

Request

Bodyapplication/x-www-form-urlencoded
amountnumber

Amount of token you want to buy

Example: "0.00002"
tokenstring

Token to buy, e.g btc, eth

Example: "btc"
import fetch from 'node-fetch';

async function run() {
  const formData = {
    amount: '0.00002',
    token: 'btc'
  };

  const resp = await fetch(
    `https://roqqu-api.redocly.app/_mock/apis/trade/buy`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
        Authorization: 'Bearer <YOUR_TOKEN_HERE>'
      },
      body: new URLSearchParams(formData).toString()
    }
  );

  const data = await resp.text();
  console.log(data);
}

run();

Responses

OK

Headers
X-Powered-Bystring
Example: "Express"
Access-Control-Allow-Originstring
Example: "*"
Content-Typestring
Example: "application/json; charset=utf-8"
Content-Lengthinteger
Example: "69"
ETagstring
Example: "W/\"45-TwwQ35x2892ezXMOfXetkmEC1+k\""
Datestring
Example: "Tue, 24 Sep 2024 15:57:28 GMT"
Connectionstring
Example: "keep-alive"
Keep-Alivestring
Example: "timeout=5"
Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "buy operation successful", "data": null }

Sell

Request

Bodyapplication/x-www-form-urlencoded
amountstring

Amount of token you want to sell

tokenstring

Token to sell, e.g btc, eth

import fetch from 'node-fetch';

async function run() {
  const formData = {
    amount: 'string',
    token: 'string'
  };

  const resp = await fetch(
    `https://roqqu-api.redocly.app/_mock/apis/trade/sell`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
        Authorization: 'Bearer <YOUR_TOKEN_HERE>'
      },
      body: new URLSearchParams(formData).toString()
    }
  );

  const data = await resp.text();
  console.log(data);
}

run();

Responses

OK

Headers
X-Powered-Bystring
Example: "Express"
Access-Control-Allow-Originstring
Example: "*"
Content-Typestring
Example: "application/json; charset=utf-8"
Content-Lengthinteger
Example: "69"
ETagstring
Example: "W/\"45-TwwQ35x2892ezXMOfXetkmEC1+k\""
Datestring
Example: "Tue, 24 Sep 2024 15:58:33 GMT"
Connectionstring
Example: "keep-alive"
Keep-Alivestring
Example: "timeout=5"
Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "buy operation successful", "data": null }

Swap

Request

Bodyapplication/x-www-form-urlencoded
amountinteger

Amount of token you want to convert

Example: "200"
fromstring

Token to convert, e.g btc, eth

Example: "usdt"
tostring

Token to receive after conversion

Example: "btc"
import fetch from 'node-fetch';

async function run() {
  const formData = {
    amount: '200',
    from: 'usdt',
    to: 'btc'
  };

  const resp = await fetch(
    `https://roqqu-api.redocly.app/_mock/apis/trade/swap`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
        Authorization: 'Bearer <YOUR_TOKEN_HERE>'
      },
      body: new URLSearchParams(formData).toString()
    }
  );

  const data = await resp.text();
  console.log(data);
}

run();

Responses

OK

Headers
X-Powered-Bystring
Example: "Express"
Access-Control-Allow-Originstring
Example: "*"
Content-Typestring
Example: "application/json; charset=utf-8"
Content-Lengthinteger
Example: "70"
ETagstring
Example: "W/\"46-pf8fr15qGW5vxVSiIaY3WC3heRo\""
Datestring
Example: "Tue, 24 Sep 2024 16:00:01 GMT"
Connectionstring
Example: "keep-alive"
Keep-Alivestring
Example: "timeout=5"
Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "swap operation successful", "data": null }

Tokens

Request

import fetch from 'node-fetch';

async function run() {
  const resp = await fetch(
    `https://roqqu-api.redocly.app/_mock/apis/tokens`,
    {
      method: 'GET',
      headers: {
        Authorization: 'Bearer <YOUR_TOKEN_HERE>'
      }
    }
  );

  const data = await resp.text();
  console.log(data);
}

run();

Responses

OK

Headers
X-Powered-Bystring
Example: "Express"
Access-Control-Allow-Originstring
Example: "*"
Content-Typestring
Example: "application/json; charset=utf-8"
Content-Lengthinteger
Example: "15575"
ETagstring
Example: "W/\"3cd7-5KmfuEIbgDdHPX5TMvSRClILmto\""
Datestring
Example: "Mon, 19 Feb 2024 16:28:08 GMT"
Connectionstring
Example: "keep-alive"
Keep-Alivestring
Example: "timeout=5"
Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "tokens retrieved", "data": { "tokens": [], "tokenConfigs": [] } }

Transaction

The endpoints listed under Transaction allows users to initiate and manage cryptocurrency transactions. This includes sending, receiving, and tracking the status of transactions, ensuring users have a smooth experience when moving their assets. This also covers the requery and refund endpoints for failed transactions.

Operations