🚀 Quorevia API Documentation

Validator Node API - Complete reference for integrating with the Quorevia network

🌐 Base URL: https://node1.quorevia.com/validator/api.php
Version 1.0 | Last Updated: December 2024

🔑 Public Key Format

All endpoints requiring a user_pubkey parameter follow this standard format:

QUO-[16 hexadecimal characters]

Example: QUO-CADE397344AF1E8C

✅ Valid formats:
  • QUO-CADE397344AF1E8C
  • QUO-1234567890ABCDEF
❌ Invalid formats:
  • CADE397344AF1E8C (missing QUO- prefix)
  • QUO-INVALIDFORMAT (non-hexadecimal characters)

🔐 Authentication

Some endpoints require API key authentication via the X-API-Key header.

🔑 API Key Usage:
curl -X POST https://node1.quorevia.com/validator/api.php \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key_here" \
  -d '{"action": "example"}'

Note: API keys are obtained during register_node (new registration) or register_node with existing pubkey (import).

⏱️ Rate Limits

Endpoint TypeRate Limit
Free Endpoints30-60 requests per minute
Paid Endpoints20-30 requests per minute
Admin Endpoints10 requests per minute

❌ Error Handling

HTTP CodeDescription
200Success (check response status field)
400Invalid request parameters
401Invalid or missing API key
403Unauthorized access
404Resource not found
409Conflict (invalid state)
429Rate limit exceeded

POSTsync_node

🆓 FREE Endpoint - No payment required

📝 Description

Retrieves the current wallet balance of a registered validator node.

📋 Request Parameters

ParameterTypeRequiredDescription
actionstringYesMust be sync_node
user_pubkeystringYesPublic key (QUO- format)

💻 Code Examples

curl -X POST https://node1.quorevia.com/validator/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "action": "sync_node",
    "user_pubkey": "QUO-CADE397344AF1E8C"
  }'
import requests

url = "https://node1.quorevia.com/validator/api.php"
payload = {
    "action": "sync_node",
    "user_pubkey": "QUO-CADE397344AF1E8C"
}

response = requests.post(url, json=payload)
data = response.json()

if data["status"] == "success":
    print(f"Balance: {data['balance']}")
else:
    print(f"Error: {data['message']}")
<?php
$url = "https://node1.quorevia.com/validator/api.php";
$payload = [
    "action" => "sync_node",
    "user_pubkey" => "QUO-CADE397344AF1E8C"
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
$data = json_decode($response, true);

if ($data["status"] == "success") {
    echo "Balance: " . $data["balance"];
} else {
    echo "Error: " . $data["message"];
}
?>
const url = "https://node1.quorevia.com/validator/api.php";
const payload = {
    action: "sync_node",
    user_pubkey: "QUO-CADE397344AF1E8C"
};

const response = await fetch(url, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(payload)
});

const data = await response.json();

if (data.status === "success") {
    console.log(`Balance: ${data.balance}`);
} else {
    console.log(`Error: ${data.message}`);
}

📤 Success Response

{
    "status": "success",
    "balance": "1250.50"
}

POSTget_my_inventory

🆓 FREE Endpoint - No payment required

📝 Description

Retrieves all licenses owned by a specific user.

📋 Request Parameters

ParameterTypeRequiredDescription
actionstringYesMust be get_my_inventory
user_pubkeystringYesPublic key (QUO- format)

💻 Code Examples

curl -X POST https://node1.quorevia.com/validator/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "action": "get_my_inventory",
    "user_pubkey": "QUO-CADE397344AF1E8C"
  }'
import requests

url = "https://node1.quorevia.com/validator/api.php"
payload = {
    "action": "get_my_inventory",
    "user_pubkey": "QUO-CADE397344AF1E8C"
}

response = requests.post(url, json=payload)
data = response.json()

if data["status"] == "success":
    print(f"Total licenses: {data['count']}")
    for license in data['inventory']:
        print(f"  License: {license['license_id']}, Art: {license['art_id']}")
<?php
$url = "https://node1.quorevia.com/validator/api.php";
$payload = [
    "action" => "get_my_inventory",
    "user_pubkey" => "QUO-CADE397344AF1E8C"
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
$data = json_decode($response, true);

echo "Total licenses: " . $data['count'] . "\n";
foreach ($data['inventory'] as $license) {
    echo "License: {$license['license_id']}, Art: {$license['art_id']}\n";
}
?>
const url = "https://node1.quorevia.com/validator/api.php";
const payload = {
    action: "get_my_inventory",
    user_pubkey: "QUO-CADE397344AF1E8C"
};

const response = await fetch(url, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(payload)
});

const data = await response.json();

console.log(`Total licenses: ${data.count}`);
data.inventory.forEach(license => {
    console.log(`License: ${license.license_id}, Art: ${license.art_id}`);
});

📤 Success Response

{
    "status": "success",
    "inventory": [
        {
            "license_id": "LIC-12345",
            "art_id": "ART-67890",
            "current_owner_pubkey": "QUO-CADE397344AF1E8C",
            "is_stamped": 1,
            "status": "active"
        }
    ],
    "count": 1,
    "debug_id_received": "QUO-CADE397344AF1E8C"
}

POSTregister_node

🆓 FREE Endpoint - No payment required

📝 Description

Creates a new validator node wallet or imports an existing one.

Two modes: New Registration (generate wallet) or Import Wallet (register existing pubkey)

📋 Request Parameters

ParameterTypeRequiredDescription
actionstringYesMust be register_node
user_pubkeystringConditionalRequired for import mode
usernamestringYesMin 3 characters

💻 Code Examples - New Registration

curl -X POST https://node1.quorevia.com/validator/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "action": "register_node",
    "username": "validator_alice"
  }'
import requests

url = "https://node1.quorevia.com/validator/api.php"
payload = {
    "action": "register_node",
    "username": "validator_alice"
}

response = requests.post(url, json=payload)
data = response.json()

if data["status"] == "success":
    print(f"Public Key: {data['validator_pubkey']}")
    print(f"API Key: {data['api_key']}")
    print(f"Seed Phrase: {data['seed_phrase']}")
<?php
$url = "https://node1.quorevia.com/validator/api.php";
$payload = [
    "action" => "register_node",
    "username" => "validator_alice"
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
$data = json_decode($response, true);

echo "Public Key: " . $data['validator_pubkey'] . "\n";
echo "API Key: " . $data['api_key'] . "\n";
?>
const url = "https://node1.quorevia.com/validator/api.php";
const payload = {
    action: "register_node",
    username: "validator_alice"
};

const response = await fetch(url, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(payload)
});

const data = await response.json();

console.log(`Public Key: ${data.validator_pubkey}`);
console.log(`API Key: ${data.api_key}`);

📤 Success Response (New Registration)

{
    "status": "success",
    "validator_pubkey": "QUO-7F3E9A2B4C8D1E5F",
    "username": "validator_alice",
    "initial_balance": 1000,
    "api_key": "a7b3c9d2e1f4a5b6...",
    "seed_phrase": "abandon ability able above absorb abstract...",
    "warning": "SAVE YOUR SEED PHRASE!"
}

POSTlock_for_p2p

📝 Description

Locks specified licenses in PENDING_TRANSFER state before transferring ownership.

📋 Request Parameters

ParameterTypeRequiredDescription
actionstringYesMust be lock_for_p2p
user_pubkeystringYesSeller's public key
license_idsarrayYesArray of license IDs

💻 Code Examples

curl -X POST https://node1.quorevia.com/validator/api.php \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key_here" \
  -d '{
    "action": "lock_for_p2p",
    "user_pubkey": "QUO-CADE397344AF1E8C",
    "license_ids": ["LIC-12345", "LIC-12346"]
  }'
import requests

url = "https://node1.quorevia.com/validator/api.php"
headers = {"X-API-Key": "your_api_key_here"}
payload = {
    "action": "lock_for_p2p",
    "user_pubkey": "QUO-CADE397344AF1E8C",
    "license_ids": ["LIC-12345", "LIC-12346"]
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())
<?php
$url = "https://node1.quorevia.com/validator/api.php";
$apiKey = "your_api_key_here";
$payload = [
    "action" => "lock_for_p2p",
    "user_pubkey" => "QUO-CADE397344AF1E8C",
    "license_ids" => ["LIC-12345", "LIC-12346"]
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'X-API-Key: ' . $apiKey
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

echo curl_exec($ch);
?>
const url = "https://node1.quorevia.com/validator/api.php";
const payload = {
    action: "lock_for_p2p",
    user_pubkey: "QUO-CADE397344AF1E8C",
    license_ids: ["LIC-12345", "LIC-12346"]
};

const response = await fetch(url, {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        "X-API-Key": "your_api_key_here"
    },
    body: JSON.stringify(payload)
});

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

📤 Success Response

{
    "status": "success",
    "message": "Units locked on server."
}

POSTcomplete_p2p_transfer

📝 Description

Completes P2P transfer by changing ownership of locked licenses from seller to buyer.

📋 Request Parameters

ParameterTypeRequiredDescription
actionstringYesMust be complete_p2p_transfer
license_idsarrayYesArray of license IDs
seller_pubkeystringYesCurrent owner's public key
buyer_pubkeystringYesNew owner's public key

💻 Code Examples

curl -X POST https://node1.quorevia.com/validator/api.php \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key_here" \
  -d '{
    "action": "complete_p2p_transfer",
    "license_ids": ["LIC-12345", "LIC-12346"],
    "seller_pubkey": "QUO-CADE397344AF1E8C",
    "buyer_pubkey": "QUO-7F3E9A2B4C8D1E5F"
  }'
import requests

url = "https://node1.quorevia.com/validator/api.php"
headers = {"X-API-Key": "your_api_key_here"}
payload = {
    "action": "complete_p2p_transfer",
    "license_ids": ["LIC-12345", "LIC-12346"],
    "seller_pubkey": "QUO-CADE397344AF1E8C",
    "buyer_pubkey": "QUO-7F3E9A2B4C8D1E5F"
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())
<?php
$url = "https://node1.quorevia.com/validator/api.php";
$apiKey = "your_api_key_here";
$payload = [
    "action" => "complete_p2p_transfer",
    "license_ids" => ["LIC-12345", "LIC-12346"],
    "seller_pubkey" => "QUO-CADE397344AF1E8C",
    "buyer_pubkey" => "QUO-7F3E9A2B4C8D1E5F"
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'X-API-Key: ' . $apiKey
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

echo curl_exec($ch);
?>
const url = "https://node1.quorevia.com/validator/api.php";
const payload = {
    action: "complete_p2p_transfer",
    license_ids: ["LIC-12345", "LIC-12346"],
    seller_pubkey: "QUO-CADE397344AF1E8C",
    buyer_pubkey: "QUO-7F3E9A2B4C8D1E5F"
};

const response = await fetch(url, {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        "X-API-Key": "your_api_key_here"
    },
    body: JSON.stringify(payload)
});

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

📤 Success Response

{
    "status": "success",
    "message": "Ownership transferred on server."
}

POSTlist_for_sale

📝 Description

Lists owned and stamped licenses for sale. Auto-matches with open buy requests when possible.

📋 Request Parameters

ParameterTypeRequiredDescription
actionstringYesMust be list_for_sale
user_pubkeystringYesSeller's public key
license_idsarrayYesArray of license IDs to list

💻 Code Examples

curl -X POST https://node1.quorevia.com/validator/api.php \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key_here" \
  -d '{
    "action": "list_for_sale",
    "user_pubkey": "QUO-CADE397344AF1E8C",
    "license_ids": ["LIC-12345", "LIC-12346"]
  }'
import requests

url = "https://node1.quorevia.com/validator/api.php"
headers = {"X-API-Key": "your_api_key_here"}
payload = {
    "action": "list_for_sale",
    "user_pubkey": "QUO-CADE397344AF1E8C",
    "license_ids": ["LIC-12345", "LIC-12346"]
}

response = requests.post(url, json=payload, headers=headers)
data = response.json()

print(f"Listed: {data['affected']} licenses")
print(f"Auto-matched: {data['matched']}")
<?php
$url = "https://node1.quorevia.com/validator/api.php";
$apiKey = "your_api_key_here";
$payload = [
    "action" => "list_for_sale",
    "user_pubkey" => "QUO-CADE397344AF1E8C",
    "license_ids" => ["LIC-12345", "LIC-12346"]
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'X-API-Key: ' . $apiKey
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$data = json_decode(curl_exec($ch), true);
echo "Listed: " . $data['affected'] . " licenses\n";
?>
const url = "https://node1.quorevia.com/validator/api.php";
const payload = {
    action: "list_for_sale",
    user_pubkey: "QUO-CADE397344AF1E8C",
    license_ids: ["LIC-12345", "LIC-12346"]
};

const response = await fetch(url, {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        "X-API-Key": "your_api_key_here"
    },
    body: JSON.stringify(payload)
});

const data = await response.json();
console.log(`Listed: ${data.affected} licenses`);
console.log(`Auto-matched: ${data.matched}`);

📤 Success Response

{
    "status": "success",
    "message": "5 units listed globally. Auto-matched 3 units!",
    "affected": 5,
    "matched": 3,
    "tx_hash": "a7b3c9d2e1f4a5b6..."
}

POSTpost_buy_order

📝 Description

Posts a buy order (bid) on the marketplace. Reserves credits from buyer's wallet.

📋 Request Parameters

ParameterTypeRequiredDescription
actionstringYesMust be post_buy_order
user_pubkeystringYesBuyer's public key
qtyintegerYesNumber of licenses to purchase (min 1)

💻 Code Examples

curl -X POST https://node1.quorevia.com/validator/api.php \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key_here" \
  -d '{
    "action": "post_buy_order",
    "user_pubkey": "QUO-7F3E9A2B4C8D1E5F",
    "qty": 5
  }'
import requests

url = "https://node1.quorevia.com/validator/api.php"
headers = {"X-API-Key": "your_api_key_here"}
payload = {
    "action": "post_buy_order",
    "user_pubkey": "QUO-7F3E9A2B4C8D1E5F",
    "qty": 5
}

response = requests.post(url, json=payload, headers=headers)
data = response.json()

if data["status"] == "success":
    print(f"Buy order posted! TX: {data['tx_hash']}")
<?php
$url = "https://node1.quorevia.com/validator/api.php";
$apiKey = "your_api_key_here";
$payload = [
    "action" => "post_buy_order",
    "user_pubkey" => "QUO-7F3E9A2B4C8D1E5F",
    "qty" => 5
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'X-API-Key: ' . $apiKey
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

echo curl_exec($ch);
?>
const url = "https://node1.quorevia.com/validator/api.php";
const payload = {
    action: "post_buy_order",
    user_pubkey: "QUO-7F3E9A2B4C8D1E5F",
    qty: 5
};

const response = await fetch(url, {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        "X-API-Key": "your_api_key_here"
    },
    body: JSON.stringify(payload)
});

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

📤 Success Response

{
    "status": "success",
    "message": "Buy Order (Bid) posted successfully.",
    "tx_hash": "a7b3c9d2e1f4a5b6..."
}

POSTget_order_book

🆓 FREE Endpoint - No payment required

📝 Description

Retrieves current marketplace order book showing all active sell orders (asks) from other sellers.

📋 Request Parameters

ParameterTypeRequiredDescription
actionstringYesMust be get_order_book
user_pubkeystringYesViewer's public key

💻 Code Examples

curl -X POST https://node1.quorevia.com/validator/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "action": "get_order_book",
    "user_pubkey": "QUO-CADE397344AF1E8C"
  }'
import requests

url = "https://node1.quorevia.com/validator/api.php"
payload = {
    "action": "get_order_book",
    "user_pubkey": "QUO-CADE397344AF1E8C"
}

response = requests.post(url, json=payload)
data = response.json()

for ask in data['asks']:
    print(f"Seller: {ask['seller']}, Quantity: {ask['qty']}")
<?php
$url = "https://node1.quorevia.com/validator/api.php";
$payload = [
    "action" => "get_order_book",
    "user_pubkey" => "QUO-CADE397344AF1E8C"
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$data = json_decode(curl_exec($ch), true);
foreach ($data['asks'] as $ask) {
    echo "Seller: {$ask['seller']}, Qty: {$ask['qty']}\n";
}
?>
const url = "https://node1.quorevia.com/validator/api.php";
const payload = {
    action: "get_order_book",
    user_pubkey: "QUO-CADE397344AF1E8C"
};

const response = await fetch(url, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(payload)
});

const data = await response.json();
data.asks.forEach(ask => {
    console.log(`Seller: ${ask.seller}, Quantity: ${ask.qty}`);
});

📤 Success Response

{
    "status": "success",
    "asks": [
        {"seller": "QUO-CADE397344AF1E8C", "qty": 15},
        {"seller": "QUO-7F3E9A2B4C8D1E5F", "qty": 8}
    ]
}