-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatus.html
More file actions
799 lines (782 loc) · 38.9 KB
/
Copy pathstatus.html
File metadata and controls
799 lines (782 loc) · 38.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Binance API By Smart Dev</title>
<!-- Bootstrap 5 CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome for Social Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css">
<!-- Custom CSS -->
<style>
body {
background-color: #f8f9fa;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.navbar {
background-color: #ffffff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.navbar-brand img {
height: 30px;
margin-right: 10px;
}
.hero {
background: linear-gradient(135deg, #ffffff, #e9ecef);
padding: 4rem 0;
text-align: center;
}
.hero .developer-credit {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1rem;
}
.hero .developer-credit img {
height: 40px;
margin-left: 10px;
}
.card {
border: none;
border-radius: 12px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
transition: transform 0.2s;
}
.card:hover {
transform: translateY(-5px);
}
.status-indicator {
width: 12px;
height: 12px;
border-radius: 50%;
display: inline-block;
margin-right: 8px;
}
.status-healthy {
background-color: #28a745;
}
.status-error {
background-color: #dc3545;
}
.api-test-form {
background-color: #ffffff;
padding: 2rem;
border-radius: 12px;
}
.result-box {
background-color: #f1f3f5;
padding: 1rem;
border-radius: 8px;
max-height: 400px;
overflow-y: auto;
font-family: 'Courier New', Courier, monospace;
font-size: 0.9rem;
}
.docs-section {
background-color: #ffffff;
padding: 2rem;
border-radius: 12px;
}
.docs-section h3 {
color: #F0B90B; /* Binance yellow */
}
.docs-section pre {
background-color: #f1f3f5;
padding: 1rem;
border-radius: 8px;
font-size: 0.9rem;
}
.docs-section .accordion-button {
background-color: #F0B90B;
color: #ffffff;
font-weight: 600;
}
.docs-section .accordion-button:not(.collapsed) {
background-color: #d4a017;
color: #ffffff;
}
.docs-section .accordion-item {
border: none;
border-radius: 8px;
margin-bottom: 1rem;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
footer {
background-color: #ffffff;
padding: 3rem 0;
margin-top: 3rem;
border-top: 1px solid #e9ecef;
}
.btn-primary {
background-color: #F0B90B;
border: none;
transition: background-color 0.3s;
}
.btn-primary:hover {
background-color: #d4a017;
}
.footer-social a {
color: #333;
font-size: 1.5rem;
margin: 0 10px;
transition: color 0.3s;
}
.footer-social a:hover {
color: #F0B90B;
}
.footer-text {
font-size: 1.1rem;
font-weight: 500;
color: #555;
margin-top: 1rem;
}
.footer-text strong {
color: #F0B90B;
}
/* Advertisement Section */
.ad-section {
background-color: #ffffff;
padding: 2.5rem 0;
text-align: center;
border-radius: 12px;
margin: 2rem 0;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
border-left: 4px solid #00C4B4;
transition: transform 0.3s ease;
}
.ad-section:hover {
transform: translateY(-3px);
}
.ad-section h2 {
font-weight: 700;
color: #1a1a1a;
margin-bottom: 0.75rem;
font-size: 1.8rem;
}
.ad-section p {
font-size: 1.1rem;
color: #4a4a4a;
margin-bottom: 1.25rem;
max-width: 600px;
margin-left: auto;
margin-right: auto;
}
.ad-section .btn {
background-color: #00C4B4;
color: #ffffff;
font-weight: 600;
padding: 0.6rem 1.2rem;
border-radius: 6px;
transition: background-color 0.3s, transform 0.2s;
display: inline-flex;
align-items: center;
}
.ad-section .btn:hover {
background-color: #00a89a;
transform: scale(1.03);
}
.ad-section .telegram-icon {
font-size: 1.2rem;
margin-left: 0.5rem;
animation: pulse 1.5s infinite;
}
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.15); }
100% { transform: scale(1); }
}
</style>
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container">
<a class="navbar-brand fw-bold" href="#">
<img src="https://kurigram.live/assets/pyro.gif" alt="Pyro Animation">
Binance API By Smart Dev
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<li class="nav-item"><a class="nav-link" href="#status">Status</a></li>
<li class="nav-item"><a class="nav-link" href="#test">Test API</a></li>
<li class="nav-item"><a class="nav-link" href="#docs">Docs</a></li>
</ul>
</div>
</div>
</nav>
<!-- Hero Section -->
<section class="hero">
<div class="container">
<div class="developer-credit">
<span>API Dev: <a href="https://t.me/ISmartCoder" target="_blank">@ISmartCoder</a></span>
<img src="https://kurigram.live/assets/pyro.gif" alt="Pyro Animation">
</div>
<h1 class="display-4 fw-bold">Binance API By Smart Dev</h1>
<p class="lead text-muted">Your gateway to seamless P2P trading with Binance, powered by @ISmartCoder.</p>
</div>
</section>
<!-- Status Section -->
<section id="status" class="py-5">
<div class="container">
<h2 class="mb-4">API Status</h2>
<div class="card p-4">
<div id="status-content">
<p><span class="status-indicator" id="status-indicator"></span>Status: <span id="status-text">Checking...</span></p>
<p>Timestamp: <span id="status-timestamp">N/A</span></p>
<p>Version: <span id="status-version">N/A</span></p>
<p>Cache Size: <span id="status-cache">N/A</span></p>
<p>Uptime: <span id="status-uptime">N/A</span></p>
</div>
</div>
</div>
</section>
<!-- API Test Section -->
<section id="test" class="py-5 bg-light">
<div class="container">
<h2 class="mb-4">Test the API</h2>
<div class="card api-test-form">
<form id="api-test-form">
<div class="row g-3">
<div class="col-md-4">
<label for="asset" class="form-label">Asset</label>
<select id="asset" class="form-select" required>
<option value="USDT" selected>USDT</option>
<option value="BTC">BTC</option>
<option value="ETH">ETH</option>
<option value="BNB">BNB</option>
<option value="BUSD">BUSD</option>
<option value="ADA">ADA</option>
<option value="DOT">DOT</option>
<option value="MATIC">MATIC</option>
<option value="SHIB">SHIB</option>
<option value="DOGE">DOGE</option>
</select>
</div>
<div class="col-md-4">
<label for="pay_type" class="form-label">Fiat Currency</label>
<select id="pay_type" class="form-select" required>
<option value="BHD">BHD</option>
<option value="AED">AED</option>
<option value="SAR">SAR</option>
<option value="EGP">EGP</option>
<option value="JOD">JOD</option>
<option value="KWD">KWD</option>
<option value="LBP">LBP</option>
<option value="MAD">MAD</option>
<option value="OMR">OMR</option>
<option value="QAR">QAR</option>
<option value="TND">TND</option>
<option value="BDT" selected>BDT</option>
<option value="INR">INR</option>
<option value="PKR">PKR</option>
<option value="USD">USD</option>
<option value="EUR">EUR</option>
<option value="GBP">GBP</option>
<option value="TRY">TRY</option>
<option value="RUB">RUB</option>
<option value="NGN">NGN</option>
<option value="KES">KES</option>
<option value="ZAR">ZAR</option>
<option value="PHP">PHP</option>
<option value="THB">THB</option>
<option value="MYR">MYR</option>
<option value="SGD">SGD</option>
<option value="HKD">HKD</option>
<option value="JPY">JPY</option>
<option value="KRW">KRW</option>
<option value="CNY">CNY</option>
<option value="VND">VND</option>
<option value="IDR">IDR</option>
<option value="BRL">BRL</option>
<option value="ARS">ARS</option>
<option value="CLP">CLP</option>
<option value="COP">COP</option>
<option value="MXN">MXN</option>
<option value="PEN">PEN</option>
<option value="GHS">GHS</option>
<option value="UGX">UGX</option>
<option value="TZS">TZS</option>
<option value="LRD">LRD</option>
<option value="SLL">SLL</option>
<option value="GMD">GMD</option>
<option value="MRO">MRO</option>
<option value="CVE">CVE</option>
</select>
</div>
<div class="col-md-4">
<label for="pay_method" class="form-label">Payment Method</label>
<select id="pay_method" class="form-select" required>
<option value="ALL" selected>ALL</option>
</select>
</div>
<div class="col-md-4">
<label for="trade_type" class="form-label">Trade Type</label>
<select id="trade_type" class="form-select" required>
<option value="SELL" selected>SELL</option>
<option value="BUY">BUY</option>
</select>
</div>
<div class="col-md-4">
<label for="limit" class="form-label">Limit (1-500)</label>
<input type="number" id="limit" class="form-control" min="1" max="500" value="100" required>
</div>
<div class="col-12">
<button type="submit" class="btn btn-primary">Test API</button>
</div>
</div>
</form>
<div class="mt-4">
<h5>Response</h5>
<pre id="api-response" class="result-box">No response yet. Submit the form to test the API.</pre>
</div>
</div>
</div>
</section>
<!-- Advertisement Section -->
<section class="ad-section">
<div class="container">
<h2>Need Custom Telegram Bots & APIS ? 🧐</h2>
<p>Supercharge your trading with custom-built bots and APIs in Python, PHP, Node.js, and beyond. Partner with us to create innovative, high-performance solutions tailored to your needs.</p>
<a href="https://t.me/ISmartCoder" target="_blank" class="btn">
Connect with @ISmartCoder
<i class="fab fa-telegram telegram-icon"></i>
</a>
</div>
</section>
<!-- Documentation Section -->
<section id="docs" class="py-5">
<div class="container">
<h2 class="mb-4">API Documentation</h2>
<div class="card docs-section">
<div class="accordion" id="docsAccordion">
<!-- Health Endpoint -->
<div class="accordion-item">
<h2 class="accordion-header" id="healthHeading">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#healthCollapse">
GET /health
</button>
</h2>
<div id="healthCollapse" class="accordion-collapse collapse" data-bs-parent="#docsAccordion">
<div class="accordion-body">
<p><strong>Description:</strong> Checks the health status of the API, providing information about its operational state, version, cache usage, and uptime.</p>
<p><strong>Use Case:</strong> Use this endpoint to verify if the API is running correctly before making other requests. Ideal for monitoring and debugging.</p>
<p><strong>Parameters:</strong> None</p>
<p><strong>Example Request:</strong></p>
<pre>GET /health</pre>
<p><strong>Example Response:</strong></p>
<pre>
{
"status": "healthy",
"timestamp": "2025-07-18T08:26:00.123456+06:00",
"version": "2.0.0",
"cache_size": 5,
"uptime": 1234567.89
}
</pre>
<p><strong>Response Fields:</strong></p>
<ul>
<li><code>status</code>: Indicates if the API is "healthy" or not.</li>
<li><code>timestamp</code>: ISO 8601 timestamp of the response.</li>
<li><code>version</code>: API version (e.g., 2.0.0).</li>
<li><code>cache_size</code>: Number of cached responses.</li>
<li><code>uptime</code>: Time (in seconds) since the API started.</li>
</ul>
<p><strong>Notes:</strong></p>
<ul>
<li>Call this endpoint periodically to ensure the API is responsive.</li>
<li>A non-200 status code or "status" not equal to "healthy" indicates an issue.</li>
</ul>
</div>
</div>
</div>
<!-- P2P Data Endpoint -->
<div class="accordion-item">
<h2 class="accordion-header" id="p2pHeading">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#p2pCollapse">
GET /api/v1/p2p
</button>
</h2>
<div id="p2pCollapse" class="accordion-collapse collapse" data-bs-parent="#docsAccordion">
<div class="accordion-body">
<p><strong>Description:</strong> Fetches P2P trading data from Binance, including seller details, prices, and payment methods for specified assets and fiat currencies.</p>
<p><strong>Use Case:</strong> Retrieve real-time P2P offers for trading cryptocurrencies (e.g., USDT) with fiat (e.g., BDT) using specific payment methods (e.g., bKash).</p>
<p><strong>Parameters:</strong></p>
<table class="table table-bordered">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>asset</code></td>
<td>String</td>
<td>Cryptocurrency (e.g., USDT, BTC, ETH). Supported: USDT, BTC, ETH, BNB, BUSD, ADA, DOT, MATIC, SHIB, DOGE.</td>
<td>USDT</td>
</tr>
<tr>
<td><code>pay_type</code></td>
<td>String</td>
<td>Fiat currency (e.g., BDT, USD). Supported: BHD, AED, SAR, EGP, JOD, KWD, LBP, MAD, OMR, QAR, TND, BDT, INR, PKR, USD, EUR, GBP, TRY, RUB, NGN, KES, ZAR, PHP, THB, MYR, SGD, HKD, JPY, KRW, CNY, VND, IDR, BRL, ARS, CLP, COP, MXN, PEN, GHS, UGX, TZS, LRD, SLL, GMD, MRO, CVE.</td>
<td>BDT</td>
</tr>
<tr>
<td><code>pay_method</code></td>
<td>String</td>
<td>Payment method (e.g., BKASH, ALL). Depends on <code>pay_type</code> (e.g., BDT: BKASH, NAGAD, ROCKET, UPAY, BANK).</td>
<td>ALL</td>
</tr>
<tr>
<td><code>trade_type</code></td>
<td>String</td>
<td>Trade direction: BUY or SELL.</td>
<td>SELL</td>
</tr>
<tr>
<td><code>limit</code></td>
<td>Integer</td>
<td>Number of results to return (1-500).</td>
<td>100</td>
</tr>
<tr>
<td><code>sort_by</code></td>
<td>String</td>
<td>Sort results by: price, completion_rate, available_amount, monthly_orders.</td>
<td>price</td>
</tr>
<tr>
<td><code>order</code></td>
<td>String</td>
<td>Sort order: asc or desc.</td>
<td>asc</td>
</tr>
<tr>
<td><code>min_completion_rate</code></td>
<td>Float</td>
<td>Minimum seller completion rate (0-100).</td>
<td>None</td>
</tr>
<tr>
<td><code>min_orders</code></td>
<td>Integer</td>
<td>Minimum seller monthly orders.</td>
<td>None</td>
</tr>
<tr>
<td><code>online_only</code></td>
<td>Boolean</td>
<td>Show only online merchants (true/false).</td>
<td>false</td>
</tr>
</tbody>
</table>
<p><strong>Example Request:</strong></p>
<pre>GET /api/v1/p2p?asset=USDT&pay_type=BDT&pay_method=BKASH&trade_type=SELL&limit=100</pre>
<p><strong>Example Response:</strong></p>
<pre>
{
"success": true,
"data": [
{
"id": "12345",
"seller_name": "Seller1",
"price": 120.5,
"fiat_unit": "BDT",
"available_amount": 1000.0,
"min_order_amount": 500.0,
"max_order_amount": 5000.0,
"completion_rate": 95.5,
"monthly_orders": 50,
"payment_methods": ["bKash"],
"user_type": "merchant",
"online_status": "online"
}
],
"count": 1,
"total_found": 1,
"total_sellers": 1,
"time_taken": 0.123,
"trade_type": "SELL",
"api_dev": "@ISmartCoder",
"updates_channel": "t.me/TheSmartDev",
"statistics": {
"avg_price": 120.5,
"min_price": 119.0,
"max_price": 122.0,
"total_available": 1000.0
},
"parameters": {
"asset": "USDT",
"pay_type": "BDT",
"pay_method": "BKASH",
"trade_type": "SELL",
"limit": 100,
"sort_by": "price",
"order": "asc",
"filters_applied": {}
},
"timestamp": "2025-07-18T08:26:00.123456+06:00",
"cache_status": "served"
}
</pre>
<p><strong>Response Fields:</strong></p>
<ul>
<li><code>success</code>: Boolean indicating request success.</li>
<li><code>data</code>: Array of seller objects with details (id, seller_name, price, etc.).</li>
<li><code>count</code>: Number of sellers returned.</li>
<li><code>total_found</code>: Total sellers matching criteria.</li>
<li><code>total_sellers</code>: Same as total_found.</li>
<li><code>time_taken</code>: Time (seconds) to process the request.</li>
<li><code>trade_type</code>: Requested trade type (BUY/SELL).</li>
<li><code>api_dev</code>: Developer handle (@ISmartCoder).</li>
<li><code>updates_channel</code>: Telegram channel for updates.</li>
<li><code>statistics</code>: Aggregated stats (avg_price, min_price, max_price, total_available).</li>
<li><code>parameters</code>: Echo of request parameters.</li>
<li><code>timestamp</code>: ISO 8601 timestamp.</li>
<li><code>cache_status</code>: Indicates if response was cached.</li>
</ul>
<p><strong>Notes:</strong></p>
<ul>
<li>Use <code>limit</code> to control response size (max 500).</li>
<li>Responses are cached for 30 seconds to improve performance.</li>
<li>Invalid parameters return a 400 error with details.</li>
<li>Try the test form above to experiment with parameters.</li>
</ul>
</div>
</div>
</div>
<!-- Payment Methods Endpoint -->
<div class="accordion-item">
<h2 class="accordion-header" id="methodsHeading">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#methodsCollapse">
GET /api/v1/p2p/methods
</button>
</h2>
<div id="methodsCollapse" class="accordion-collapse collapse" data-bs-parent="#docsAccordion">
<div class="accordion-body">
<p><strong>Description:</strong> Retrieves the list of supported payment methods for each fiat currency.</p>
<p><strong>Use Case:</strong> Use this to populate payment method options in your application based on the selected fiat currency.</p>
<p><strong>Parameters:</strong> None</p>
<p><strong>Example Request:</strong></p>
<pre>GET /api/v1/p2p/methods</pre>
<p><strong>Example Response:</strong></p>
<pre>
{
"success": true,
"data": {
"BHD": ["BANK", "BBK", "DENIZBANK", "AIC", "CASHU", "MONEYGRAM"],
"BDT": ["BKASH", "NAGAD", "ROCKET", "UPAY", "BANK"],
"USD": ["WISE", "PAYPAL", "BANK", "ZELLE"],
...
},
"timestamp": "2025-07-18T08:26:00.123456+06:00"
}
</pre>
<p><strong>Response Fields:</strong></p>
<ul>
<li><code>success</code>: Boolean indicating request success.</li>
<li><code>data</code>: Object mapping fiat currencies to their payment methods.</li>
<li><code>timestamp</code>: ISO 8601 timestamp.</li>
</ul>
<p><strong>Notes:</strong></p>
<ul>
<li>Each fiat currency has a unique set of payment methods.</li>
<li>Use this endpoint to validate <code>pay_method</code> in P2P requests.</li>
</ul>
</div>
</div>
</div>
<!-- Currencies Endpoint -->
<div class="accordion-item">
<h2 class="accordion-header" id="currenciesHeading">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#currenciesCollapse">
GET /api/v1/p2p/currencies
</button>
</h2>
<div id="currenciesCollapse" class="accordion-collapse collapse" data-bs-parent="#docsAccordion">
<div class="accordion-body">
<p><strong>Description:</strong> Retrieves the list of supported cryptocurrencies, fiat currencies, and trade types.</p>
<p><strong>Use Case:</strong> Use this to populate dropdowns or validate inputs for <code>asset</code>, <code>pay_type</code>, and <code>trade_type</code> in your application.</p>
<p><strong>Parameters:</strong> None</p>
<p><strong>Example Request:</strong></p>
<pre>GET /api/v1/p2p/currencies</pre>
<p><strong>Example Response:</strong></p>
<pre>
{
"success": true,
"data": {
"crypto_assets": ["USDT", "BTC", "ETH", "BNB", "BUSD", "ADA", "DOT", "MATIC", "SHIB", "DOGE"],
"fiat_currencies": ["BHD", "AED", "SAR", "EGP", "JOD", "KWD", "LBP", "MAD", "OMR", "QAR", "TND", "BDT", "INR", "PKR", "USD", "EUR", "GBP", "TRY", "RUB", "NGN", "KES", "ZAR", "PHP", "THB", "MYR", "SGD", "HKD", "JPY", "KRW", "CNY", "VND", "IDR", "BRL", "ARS", "CLP", "COP", "MXN", "PEN", "GHS", "UGX", "TZS", "LRD", "SLL", "GMD", "MRO", "CVE"],
"trade_types": ["BUY", "SELL"]
},
"total_currencies": 45,
"total_assets": 10,
"timestamp": "2025-07-18T08:26:00.123456+06:00"
}
</pre>
<p><strong>Response Fields:</strong></p>
<ul>
<li><code>success</code>: Boolean indicating request success.</li>
<li><code>data</code>: Object containing arrays of supported assets, currencies, and trade types.</li>
<li><code>total_currencies</code>: Count of fiat currencies.</li>
<li><code>total_assets</code>: Count of crypto assets.</li>
<li><code>timestamp</code>: ISO 8601 timestamp.</li>
</ul>
<p><strong>Notes:</strong></p>
<ul>
<li>Use this endpoint to initialize your app’s configuration.</li>
<li>Combine with <code>/api/v1/p2p/methods</code> for full input validation.</li>
</ul>
</div>
</div>
</div>
</div>
<p class="mt-4">
Developed with ❤️ By @ISmartCoder
</p>
</div>
</div>
</section>
<!-- Footer -->
<footer class="text-center">
<div class="container">
<div class="footer-social mb-3">
<a href="https://github.com/TheSmartDevs" target="_blank" title="GitHub"><i class="fab fa-github"></i></a>
<a href="https://facebook.com/abirxdhackz" target="_blank" title="Facebook"><i class="fab fa-facebook"></i></a>
<a href="https://instagram.com/abirxdhackz" target="_blank" title="Instagram"><i class="fab fa-instagram"></i></a>
<a href="https://twitter.com/abirxdhackz" target="_blank" title="Twitter"><i class="fab fa-twitter"></i></a>
<a href="https://youtube.com/@abirxdhackz" target="_blank" title="YouTube"><i class="fab fa-youtube"></i></a>
<a href="https://t.me/ISmartCoder" target="_blank" title="Telegram"><i class="fab fa-telegram"></i></a>
</div>
<p class="footer-text">
Crafted with <strong>passion</strong> by <a href="https://t.me/ISmartCoder" target="_blank">@ISmartCoder</a> | Join our <strong>community</strong>: <a href="https://t.me/TheSmartDev" target="_blank">t.me/TheSmartDev</a>
</p>
<p class="text-muted mt-2">© 2025 Binance API By Smart Dev. All rights reserved.</p>
</div>
</footer>
<!-- Bootstrap 5 JS and Popper.js -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<!-- Custom JS -->
<script>
// Payment methods mapping (from API)
const PAYMENT_METHODS = {
"BHD": ["BANK", "BBK", "DENIZBANK", "AIC", "CASHU", "MONEYGRAM"],
"AED": ["BANK", "CIB", "CASHU", "MONEYGRAM"],
"SAR": ["BANK", "CASHU", "MONEYGRAM"],
"EGP": ["BANK", "CASHU", "MONEYGRAM"],
"JOD": ["BANK", "CASHU", "MONEYGRAM"],
"KWD": ["BANK", "CASHU", "MONEYGRAM"],
"LBP": ["BANK", "CASHU", "MONEYGRAM"],
"MAD": ["BANK", "CASHU", "MONEYGRAM"],
"OMR": ["BANK", "CASHU", "MONEYGRAM"],
"QAR": ["BANK", "CASHU", "MONEYGRAM"],
"TND": ["BANK", "CASHU", "MONEYGRAM"],
"BDT": ["BKASH", "NAGAD", "ROCKET", "UPAY", "BANK"],
"INR": ["UPI", "IMPS", "PAYTM", "PHONEPE", "GPAY", "BANK"],
"PKR": ["EASYPAISA", "JAZZCASH", "BANK"],
"USD": ["WISE", "PAYPAL", "BANK", "ZELLE"],
"EUR": ["SEPA", "WISE", "BANK"],
"GBP": ["FASTERPAYMENTS", "WISE", "BANK"],
"TRY": ["BANK", "PAPARA", "ZIRAAT"],
"RUB": ["BANK", "TINKOFF", "SBERBANK"],
"NGN": ["BANK", "OPAY", "PALMPAY"],
"KES": ["MPESA", "BANK"],
"ZAR": ["BANK", "CAPITEC", "FNB"],
"PHP": ["GCASH", "PAYMAYA", "BANK"],
"THB": ["BANK", "PROMPTPAY"],
"MYR": ["BANK", "TOUCHNGO"],
"SGD": ["BANK", "PAYNOW"],
"HKD": ["BANK", "FPS"],
"JPY": ["BANK"],
"KRW": ["BANK"],
"CNY": ["BANK", "ALIPAY", "WECHAT"],
"VND": ["BANK", "MOMO", "ZALOPAY"],
"IDR": ["BANK", "GOPAY", "OVO", "DANA"],
"BRL": ["BANK", "PIX"],
"ARS": ["BANK", "MERCADOPAGO"],
"CLP": ["BANK"],
"COP": ["BANK", "NEQUI", "DAVIPLATA"],
"MXN": ["BANK", "SPEI"],
"PEN": ["BANK", "YAPE", "PLIN"],
"GHS": ["BANK", "MTN", "VODAFONE"],
"UGX": ["BANK", "AIRTEL", "MTN"],
"TZS": ["BANK", "MPESA", "TIGO"],
"LRD": ["BANK", "MOOV"],
"SLL": ["BANK", "ORANGE"],
"GMD": ["BANK", "QMONEY"],
"MRO": ["BANK"],
"CVE": ["BANK"]
};
// Update payment methods based on selected fiat currency
function updatePaymentMethods() {
const payType = document.getElementById('pay_type').value;
const payMethodSelect = document.getElementById('pay_method');
payMethodSelect.innerHTML = '<option value="ALL" selected>ALL</option>';
if (PAYMENT_METHODS[payType]) {
PAYMENT_METHODS[payType].forEach(method => {
const option = document.createElement('option');
option.value = method;
option.textContent = method;
payMethodSelect.appendChild(option);
});
}
}
// Check API health status
async function checkApiStatus() {
try {
const response = await fetch('/health');
const data = await response.json();
const statusIndicator = document.getElementById('status-indicator');
const statusText = document.getElementById('status-text');
const statusTimestamp = document.getElementById('status-timestamp');
const statusVersion = document.getElementById('status-version');
const statusCache = document.getElementById('status-cache');
const statusUptime = document.getElementById('status-uptime');
if (data.status === 'healthy') {
statusIndicator.classList.add('status-healthy');
statusText.textContent = 'Healthy';
} else {
statusIndicator.classList.add('status-error');
statusText.textContent = 'Error';
}
statusTimestamp.textContent = data.timestamp;
statusVersion.textContent = data.version;
statusCache.textContent = data.cache_size;
statusUptime.textContent = `${Math.floor(data.uptime / 3600)} hours`;
} catch (error) {
document.getElementById('status-indicator').classList.add('status-error');
document.getElementById('status-text').textContent = 'Failed to connect';
}
}
// Handle API test form submission
document.getElementById('api-test-form').addEventListener('submit', async (e) => {
e.preventDefault();
const asset = document.getElementById('asset').value;
const payType = document.getElementById('pay_type').value;
const payMethod = document.getElementById('pay_method').value;
const tradeType = document.getElementById('trade_type').value;
const limit = document.getElementById('limit').value;
const url = `/api/v1/p2p?asset=${asset}&pay_type=${payType}&pay_method=${payMethod}&trade_type=${tradeType}&limit=${limit}`;
const responseBox = document.getElementById('api-response');
try {
const response = await fetch(url);
const data = await response.json();
responseBox.textContent = JSON.stringify(data, null, 2);
} catch (error) {
responseBox.textContent = `Error: ${error.message}`;
}
});
// Initialize
document.getElementById('pay_type').addEventListener('change', updatePaymentMethods);
updatePaymentMethods();
checkApiStatus();
</script>
</body>
</html>