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

Get Wallet By Token

Request

Bodyapplication/x-www-form-urlencoded
tokenstring

symbol of token

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

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

  const resp = await fetch(
    `https://roqqu-api.redocly.app/_mock/apis/wallets/get-wallet`,
    {
      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: "108"
ETagstring
Example: "W/\"6c-M+zusHI6GIsAs74xzJOUfnoVMLM\""
Datestring
Example: "Thu, 10 Aug 2023 04:07:00 GMT"
Connectionstring
Example: "keep-alive"
Keep-Alivestring
Example: "timeout=5"
Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "wallet retrieved successfully", "data": { "token": "btc", "send": [], "receive": [] } }

Get Addresses

Request

Bodyapplication/x-www-form-urlencoded
networkstring

symbol of network

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

async function run() {
  const formData = {network: 'erc20'};

  const resp = await fetch(
    `https://roqqu-api.redocly.app/_mock/apis/wallets/get-addresses`,
    {
      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: "477"
ETagstring
Example: "W/\"1dd-vibDio7eGwrOrvpVKU+PFwwXLMU\""
Datestring
Example: "Tue, 24 Sep 2024 15:54:03 GMT"
Connectionstring
Example: "keep-alive"
Keep-Alivestring
Example: "timeout=5"
Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "wallet retrieved successfully", "data": [ {}, {} ] }

Generate Wallet

Request

Bodyapplication/json
object
import fetch from 'node-fetch';

async function run() {
  const resp = await fetch(
    `https://roqqu-api.redocly.app/_mock/apis/wallets/generate-wallet`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        Authorization: 'Bearer <YOUR_TOKEN_HERE>'
      },
      body: JSON.stringify({
        network: 'bitcoin',
        customer: '{"email" : "jean@email.com","first_name" : "Jean","last_name" : "Billy"}'
      })
    }
  );

  const data = await resp.json();
  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: "106"
ETagstring
Example: "W/\"6a-Wvo82341DRur94rytyh8xbewoAA\""
Datestring
Example: "Thu, 10 Aug 2023 04:08:42 GMT"
Connectionstring
Example: "keep-alive"
Keep-Alivestring
Example: "timeout=5"
Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "wallet generated successfully", "data": "3KVmcuvX6vPVKYiyKz6DjVmhZvnkKbA1zu" }

Send Coin

Request

Bodyapplication/x-www-form-urlencoded
amountinteger

Amount of token to be sent

Example: "2"
networkstring

Network of token to be sent

Example: "trc20"
tostring

Address to send token to

Example: "TUyR2sEjzDZNmbnac2ZkJ54h64m6TmVN71"
tokenstring

Symbol of token to be sent

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

async function run() {
  const formData = {
    amount: '2',
    network: 'trc20',
    to: 'TUyR2sEjzDZNmbnac2ZkJ54h64m6TmVN71',
    token: 'usdt'
  };

  const resp = await fetch(
    `https://roqqu-api.redocly.app/_mock/apis/wallets/send`,
    {
      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-3sRWjpVuyF2mZzN1GlLkCDIwmkQ\""
Datestring
Example: "Thu, 10 Aug 2023 11:17:04 GMT"
Connectionstring
Example: "keep-alive"
Keep-Alivestring
Example: "timeout=5"
Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "send operation successful", "data": null }

Delete Wallet

Request

import fetch from 'node-fetch';

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

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

run();

Responses

Bad Request

Headers
X-Powered-Bystring
Example: "Express"
Access-Control-Allow-Originstring
Example: "*"
Content-Typestring
Example: "application/json; charset=utf-8"
Content-Lengthinteger
Example: "61"
ETagstring
Example: "W/\"3d-wdVBGPFyRnlYXHn3roj/biuAtN4\""
Datestring
Example: "Wed, 30 Aug 2023 09:42:40 GMT"
Connectionstring
Example: "keep-alive"
Keep-Alivestring
Example: "timeout=5"
Bodyapplication/json
object
Response
application/json
{ "status": "fail", "message": "address already deleted by user" }

What Network

Request

This endpoint tells you the network an address is associated with, if its a Bitcoin address, ERC20 or 7 other network addresses.

Bodyapplication/x-www-form-urlencoded
addressstring

Address to be queried

import fetch from 'node-fetch';

async function run() {
  const formData = {address: 'string'};

  const resp = await fetch(
    `https://roqqu-api.redocly.app/_mock/apis/wallets/what-network`,
    {
      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: "81"
ETagstring
Example: "W/\"51-q3nI+4xcjdXkJ8oNIv6957nbufA\""
Datestring
Example: "Tue, 24 Sep 2024 15:53:06 GMT"
Connectionstring
Example: "keep-alive"
Keep-Alivestring
Example: "timeout=5"
Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "network for address retrieved", "data": [ "bitcoin" ] }

Get Networks

Request

Body

Responses

OK

Headers
X-Powered-Bystring
Example: "Express"
Access-Control-Allow-Originstring
Example: "*"
Content-Typestring
Example: "application/json; charset=utf-8"
Content-Lengthinteger
Example: "2778"
ETagstring
Example: "W/\"ada-wnFyCvpB/DB6AUOLj0wAbdAPjuM\""
Datestring
Example: "Tue, 09 Apr 2024 06:31:18 GMT"
Connectionstring
Example: "keep-alive"
Keep-Alivestring
Example: "timeout=5"
Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "networks retrieved", "data": [ {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {} ] }

Get Network

Request

Bodyapplication/x-www-form-urlencoded
networkstring

Network to retrieve config for

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

async function run() {
  const formData = {network: 'bitcoin'};

  const resp = await fetch(
    `https://roqqu-api.redocly.app/_mock/apis/wallets/get-network`,
    {
      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: "280"
ETagstring
Example: "W/\"118-62gInTTaVZWrwzNIfoMcbAZx8XI\""
Datestring
Example: "Tue, 09 Apr 2024 06:32:25 GMT"
Connectionstring
Example: "keep-alive"
Keep-Alivestring
Example: "timeout=5"
Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "network retrieved successfully", "data": { "id": 1, "network": "bitcoin", "status": 1, "send": 1, "receive": 1, "generate": 1, "tx_explorer": "1", "addr_explorer": "1", "created_at": "2023-07-12T18:05:01.000Z", "updated_at": "2023-07-12T18:25:39.000Z", "deleted_at": null } }

Generate Wallet For Self

Request

Bodyapplication/json
object
import fetch from 'node-fetch';

async function run() {
  const resp = await fetch(
    `https://roqqu-api.redocly.app/_mock/apis/wallets/generate-merchant-wallet`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        Authorization: 'Bearer <YOUR_TOKEN_HERE>'
      },
      body: JSON.stringify({network: 'bitcoin'})
    }
  );

  const data = await resp.json();
  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: "118"
ETagstring
Example: "W/\"76-ZJLWpMO6kTOEO2wQgL7q9GL3LeM\""
Datestring
Example: "Tue, 24 Sep 2024 15:55:35 GMT"
Connectionstring
Example: "keep-alive"
Keep-Alivestring
Example: "timeout=5"
Bodyapplication/json
object
Response
application/json
{ "status": "success", "message": "wallet generated successfully", "data": { "address": "36jVM83y7K3iN8hkbLgzRrCKSQkuPwnrks" } }

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

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