38350-vm/api-docs.php
2026-02-11 11:52:19 +00:00

60 lines
4.1 KiB
PHP

<?php include 'header.php'; ?>
<main style="background: #0b0e11; color: white; min-height: 100vh; padding: 100px 5%;">
<div style="max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 280px 1fr; gap: 60px;">
<aside style="position: sticky; top: 100px; height: fit-content;">
<h4 style="margin-bottom: 25px; color: var(--primary-color);">API Documentation</h4>
<nav style="display: flex; flex-direction: column; gap: 15px; font-size: 0.95rem;">
<a href="#intro" style="color: white; text-decoration: none;">Introduction</a>
<a href="#auth" style="color: #848e9c; text-decoration: none;">Authentication</a>
<a href="#market" style="color: #848e9c; text-decoration: none;">Market Data</a>
<a href="#trading" style="color: #848e9c; text-decoration: none;">Trading Endpoints</a>
<a href="#account" style="color: #848e9c; text-decoration: none;">Account & Balance</a>
<a href="#errors" style="color: #848e9c; text-decoration: none;">Error Codes</a>
</nav>
</aside>
<section style="background: #161a1e; padding: 60px; border-radius: 32px; border: 1px solid #2b3139;">
<h1 id="intro" style="font-size: 2.5rem; margin-bottom: 30px;">NovaEx API v1</h1>
<p style="color: var(--text-muted); line-height: 1.8; margin-bottom: 40px;">Welcome to the NovaEx API. Our RESTful API allows you to access market data, manage your account, and execute trades programmatically. All responses are returned in JSON format.</p>
<div id="auth" style="margin-top: 60px;">
<h2 style="font-size: 1.8rem; margin-bottom: 20px;">Authentication</h2>
<p style="color: var(--text-muted); line-height: 1.8;">To access private endpoints, you must use your API Key and Secret. These are passed in the request headers:</p>
<div style="background: #0b0e11; padding: 20px; border-radius: 12px; font-family: 'Roboto Mono', monospace; font-size: 0.9rem; color: #00f2fe; margin: 20px 0; border: 1px solid #2b3139;">
X-NOVA-APIKEY: &lt;your_api_key&gt;<br>
X-NOVA-SIGNATURE: &lt;hmac_sha256_signature&gt;
</div>
</div>
<div id="market" style="margin-top: 60px;">
<h2 style="font-size: 1.8rem; margin-bottom: 20px;">Get Ticker</h2>
<p style="color: var(--text-muted); margin-bottom: 20px;">Returns 24h ticker price change statistics.</p>
<div style="background: #0b0e11; padding: 20px; border-radius: 12px; font-family: 'Roboto Mono', monospace; font-size: 0.9rem; margin: 20px 0; border: 1px solid #2b3139;">
<span style="color: #00c087;">GET</span> /api/v1/ticker/24hr?symbol=BTCUSDT
</div>
<h4 style="margin: 30px 0 15px;">Response Example</h4>
<div style="background: #0b0e11; padding: 20px; border-radius: 12px; font-family: 'Roboto Mono', monospace; font-size: 0.85rem; color: #848e9c; border: 1px solid #2b3139;">
{<br>
&nbsp;&nbsp;"symbol": "BTCUSDT",<br>
&nbsp;&nbsp;"priceChange": "105.15",<br>
&nbsp;&nbsp;"priceChangePercent": "0.162",<br>
&nbsp;&nbsp;"lastPrice": "65120.50",<br>
&nbsp;&nbsp;"volume": "12540.25"<br>
}
</div>
</div>
<div id="trading" style="margin-top: 60px;">
<h2 style="font-size: 1.8rem; margin-bottom: 20px;">New Order</h2>
<p style="color: var(--text-muted); margin-bottom: 20px;">Executes a new limit or market order.</p>
<div style="background: #0b0e11; padding: 20px; border-radius: 12px; font-family: 'Roboto Mono', monospace; font-size: 0.9rem; margin: 20px 0; border: 1px solid #2b3139;">
<span style="color: #f0b90b;">POST</span> /api/v1/order
</div>
</div>
</section>
</div>
</main>
<?php include 'footer.php'; ?>