API Reference
Complete documentation of all MemenChain API endpoints.
Base URL
bash
https://blockchain.memenchain.memenovaapp.com/apiAuthentication
All endpoints require Firebase JWT authentication:
bash
Authorization: Bearer YOUR_JWT_TOKENEndpoints
POST
/api/transactions/submitSubmit a new transaction
Parameters:
- from
- to
- amount
- token
- type
GET
/api/transactions/{hash}Get transaction details
Parameters:
- hash
GET
/api/balance/{userId}Get user balance
Parameters:
- userId
GET
/api/blocksGet blocks list
Parameters:
- limit
- offset
GET
/api/blocks/{number}Get block details
Parameters:
- number
GET
/api/statsGet network statistics
Submit Transaction
bash
POST /api/transactions/submit
{
"from": "user123",
"to": "user456",
"amount": 100,
"token": "MGEM",
"type": "transfer",
"metadata": {}
}
Response:
{
"tx_hash": "0x...",
"status": "pending",
"timestamp": 1234567890
}Get Balance
bash
GET /api/balance/user123
Response:
{
"mgem": 1250,
"usdg": 45.50,
"total_usd": 57.00
}Get Network Stats
bash
GET /api/stats
Response:
{
"total_transactions": 45678,
"total_users": 12345,
"mgem_price": 0.015,
"trading_volume_24h": 50000,
"active_users_24h": 5000,
"latest_block_number": 1234
}Error Codes
| Code | Message | Description |
|---|---|---|
| 400 | Bad Request | Invalid parameters |
| 401 | Unauthorized | Missing or invalid JWT token |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error |