Skip to main content

Get NOCY API

The Get NOCY API enables users to purchase NOCY tokens using ADA (Cardano's native currency).

Base URL

http://get.nocy.io:4000

Overview

The Get NOCY API provides endpoints for:

  • Price Information - Get current NOCY token price
  • Supply Data - Query total and available supply
  • Order Management - Create and track purchase orders
  • Statistics - View sales metrics

Endpoints

EndpointMethodDescription
/healthGETHealth check
/api/priceGETCurrent NOCY price in ADA
/api/supplyGETToken supply information
/api/payment-addressGETADA payment address
/api/statsGETSales statistics
/api/orderPOSTCreate a purchase order
/api/order/:idGETGet order by ID
/api/order/address/:addressGETGet orders by payer address

Health Check

Check if the API is operational.

curl http://get.nocy.io:4000/health

Response:

{
"status": "ok",
"timestamp": "2024-12-13T12:00:00.000Z"
}

Purchase Flow

The Get NOCY API allows users to purchase claim allocations for NOCY tokens. Tokens will be distributed later via a separate claim portal.

Claim Portal

NOCY tokens are not distributed immediately. Once your order is marked as PAID, your allocation is secured. Tokens will be claimable via the Claim Portal at a later date.

Order Statuses

StatusDescription
PENDINGOrder created, awaiting payment (expires after 15 minutes)
PAIDPayment received, allocation secured
EXPIREDOrder expired (no payment received within time limit)

Quick Example

// 1. Get current price
const priceRes = await fetch('http://get.nocy.io:4000/api/price');
const { priceInAda } = await priceRes.json();

// 2. Create an order
const orderRes = await fetch('http://get.nocy.io:4000/api/order', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
payerAddress: 'addr1qy...',
amountNocy: 10000
})
});
const order = await orderRes.json();

// 3. Get payment address
const addrRes = await fetch('http://get.nocy.io:4000/api/payment-address');
const { address } = await addrRes.json();

// 4. User sends ADA to `address`

// 5. Poll order status until PAID
const statusRes = await fetch(`http://get.nocy.io:4000/api/order/${order.id}`);
const status = await statusRes.json();
console.log('Order status:', status.status); // PAID = allocation secured!

Next Steps