61 lines
2.9 KiB
PHP
61 lines
2.9 KiB
PHP
<?php
|
|
require_once __DIR__ . '/includes/lang.php';
|
|
require_once __DIR__ . '/includes/header.php';
|
|
?>
|
|
<main class="container py-5">
|
|
<h1 class="mb-4 fw-bold"><?php echo __('api_doc'); ?></h1>
|
|
<div class="card bg-dark border-secondary p-4">
|
|
<div class="row">
|
|
<div class="col-md-3 border-end border-secondary">
|
|
<nav class="nav flex-column sticky-top" style="top: 100px;">
|
|
<a class="nav-link text-white fw-bold mb-2" href="#intro">Introduction</a>
|
|
<a class="nav-link text-muted mb-2" href="#auth">Authentication</a>
|
|
<a class="nav-link text-muted mb-2" href="#market">Market Data</a>
|
|
<a class="nav-link text-muted mb-2" href="#trade">Trade Endpoints</a>
|
|
<a class="nav-link text-muted mb-2" href="#errors">Errors</a>
|
|
</nav>
|
|
</div>
|
|
<div class="col-md-9 ps-md-4">
|
|
<section id="intro" class="mb-5">
|
|
<h2 class="fw-bold">Introduction</h2>
|
|
<p class="text-muted">Welcome to the Byro API. Our API allows you to access market data, manage your account, and execute trades programmatically. We use a RESTful architecture with JSON responses.</p>
|
|
</section>
|
|
|
|
<section id="auth" class="mb-5">
|
|
<h2 class="fw-bold">Authentication</h2>
|
|
<p class="text-muted">All private endpoints require API Key authentication. You can generate API keys in your account profile settings.</p>
|
|
<div class="bg-black p-3 rounded mb-3">
|
|
<code class="text-success">Authorization: Bearer YOUR_API_KEY</code>
|
|
</div>
|
|
</section>
|
|
|
|
<section id="market" class="mb-5">
|
|
<h2 class="fw-bold">Market Data</h2>
|
|
<h5 class="mt-4">Get Ticker</h5>
|
|
<div class="bg-black p-3 rounded mb-2">
|
|
<code>GET /api/v1/market/ticker?symbol=BTCUSDT</code>
|
|
</div>
|
|
<p class="small text-muted">Returns the latest price and 24h volume for the specified symbol.</p>
|
|
</section>
|
|
|
|
<section id="trade" class="mb-5">
|
|
<h2 class="fw-bold">Trade</h2>
|
|
<h5 class="mt-4">Place Order</h5>
|
|
<div class="bg-black p-3 rounded mb-2">
|
|
<code class="text-info">POST /api/v1/trade/order</code>
|
|
</div>
|
|
<p class="small text-muted">Payload example:</p>
|
|
<pre class="bg-black p-3 rounded text-warning"><code>{
|
|
"symbol": "BTCUSDT",
|
|
"side": "buy",
|
|
"type": "limit",
|
|
"price": "65000",
|
|
"amount": "0.1"
|
|
}</code></pre>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<?php require_once __DIR__ . '/includes/footer.php'; ?>
|