EFGAIHUB REST API
Build mobile apps, trading bots, dashboards or integrations on top of the EFGAIHUB platform. Every endpoint returns JSON.
๐ Base URL
All endpoints below are relative to:
https://efgaihub.com/api/v1
๐ Authentication
Most endpoints require a Bearer token. Generate keys from your API Access page after signing in.
Send your public key via either:
Authorization: Bearer efg_pk_xxxxxxxxxxxxxxxx # or as a header X-API-Key: efg_pk_xxxxxxxxxxxxxxxx # or as a query param (less safe) ?api_key=efg_pk_xxxxxxxxxxxxxxxx
โ ๏ธ Never share your secret_key publicly. The secret is shown only once on creation; we cannot recover it.
๐ฃ๏ธ Endpoint Reference
Auth column legend: PUBLIC ยท USER ยท ADMIN
๐ฆ Examples
Health check (no auth):
curl https://efgaihub.com/api/v1/health
Get your account info:
curl -H "Authorization: Bearer efg_pk_xxxxxxxxxx" \
https://efgaihub.com/api/v1/me
Recent transactions:
curl -H "Authorization: Bearer efg_pk_xxxxxxxxxx" \
https://efgaihub.com/api/v1/transactions?limit=10
Submit a withdrawal:
curl -X POST -H "Authorization: Bearer efg_pk_xxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{"amount": 250}' \ https://efgaihub.com/api/v1/withdraw
๐ Response Schema
Every response is JSON. Successful responses carry ok: true; errors carry ok: false plus a human error and short code.
Success:
{
"ok": true,
"data": {
"wallet_balance": 5748.56,
"currency": "โฆ"
}
}
Error:
{
"ok": false,
"error": "Insufficient balance.",
"code": "insufficient_funds"
}
โฑ๏ธ Rate Limits
Authenticated requests: 60 per minute per API key.
Public endpoints: 120 per minute per IP.
Over-limit responses return HTTP 429 with a Retry-After header. All requests are logged for security auditing.