Skip to main content
GET
/
ddex
/
usage
Get DDEX rate limit usage statistics
curl --request GET \
  --url https://api.royalti.io/ddex/usage \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.royalti.io/ddex/usage"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.royalti.io/ddex/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.royalti.io/ddex/usage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.royalti.io/ddex/usage"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.royalti.io/ddex/usage")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.royalti.io/ddex/usage")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "data": {
    "hourly": {
      "used": 12,
      "limit": 50,
      "remaining": 38,
      "percentage": 24,
      "resetsAt": "2025-11-08T23:00:00.000Z"
    },
    "daily": {
      "used": 143,
      "limit": 500,
      "remaining": 357,
      "percentage": 29,
      "resetsAt": "2025-11-09T00:00:00.000Z"
    },
    "concurrent": {
      "current": 1,
      "limit": 3,
      "available": 2
    },
    "plan": {
      "level": "STARTER",
      "limits": {
        "hourly": 50,
        "daily": 500,
        "concurrent": 3,
        "burst": 10,
        "maxFileSize": 52428800
      },
      "canUpgrade": true
    },
    "warnings": {
      "shouldWarn": false,
      "threshold": 80,
      "message": null
    },
    "recommendation": {
      "currentPlan": "STARTER",
      "recommendedPlan": null,
      "reason": "Your current plan suits your usage patterns well."
    },
    "timestamp": "2023-11-07T05:31:56Z"
  }
}
{
"status": "error",
"message": "Unauthorized"
}
{
"status": "error",
"message": "Internal server error"
}

Description

Includes plan-specific limits, remaining quota, reset times, and upgrade recommendations. Rate limits are plan-based:
  • STARTER: 50/hour, 500/day, 3 concurrent
  • PLUS: 100/hour, 1,500/day, 5 concurrent
  • PREMIUM: 500/hour, 10,000/day, 10 concurrent
Authorization:
  • Required role: admin or higher

Code Examples

const response = await fetch('https://api.royalti.io/ddex/usage', {
  method: 'GET',
});

const data = await response.json();
console.log(data);
import requests

response = requests.get(
  'https://api.royalti.io/ddex/usage',
)

data = response.json()
print(data)
curl -X GET https://api.royalti.io/ddex/usage \

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Response

Usage statistics retrieved successfully

status
string
Example:

"success"

data
object