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
| Endpoint | Method | Description |
|---|---|---|
/health | GET | Health check |
/api/price | GET | Current NOCY price in ADA |
/api/supply | GET | Token supply information |
/api/payment-address | GET | ADA payment address |
/api/stats | GET | Sales statistics |
/api/order | POST | Create a purchase order |
/api/order/:id | GET | Get order by ID |
/api/order/address/:address | GET | Get 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
| Status | Description |
|---|---|
PENDING | Order created, awaiting payment (expires after 15 minutes) |
PAID | Payment received, allocation secured |
EXPIRED | Order 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
- Get Price - Price endpoint details
- Get Supply - Supply information
- Orders - Order management