Integración con la API pública de Wallbit para consultar balances, transacciones, ejecutar trades, obtener datos de assets y wallets...
REST API to integrate Wallbit functionality: query balances, view transaction history, execute trades and more.
Base URL: https://api.wallbit.io
Authentication: X-API-Key header required on all requests.
curl -H "X-API-Key: YOUR_API_KEY" https://api.wallbit.io/api/public/v1/balance/checking
| Category | Endpoint | Method | Description |
|---|---|---|---|
| Balance | /api/public/v1/balance/checking |
GET | Checking account balance |
| Balance | /api/public/v1/balance/stocks |
GET | Investment portfolio |
| Transactions | /api/public/v1/transactions |
GET | Transaction history |
| Trades | /api/public/v1/trades |
POST | Execute buy/sell |
| Account | /api/public/v1/account-details |
GET | Bank account details |
| Wallets | /api/public/v1/wallets |
GET | Crypto wallet addresses |
| Assets | /api/public/v1/assets |
GET | List available assets |
| Assets | /api/public/v1/assets/{symbol} |
GET | Specific asset info |
| Operations | /api/public/v1/operations/internal |
POST | Investment deposit/withdrawal |
use Illuminate\Support\Facades\Http;
/**
* Creates an HTTP client configured for the Wallbit API.
*
* @return \Illuminate\Http\Client\PendingRequest
*/
function createWallbitClient()
{
return Http::withHeaders([
'X-API-Key' => config('services.wallbit.api_key'),
'Accept' => 'application/json',
])->baseUrl('https://api.wallbit.io');
}
const wallbitClient = {
baseUrl: "https://api.wallbit.io",
apiKey: process.env.WALLBIT_API_KEY,
async request(endpoint, options = {}) {
const response = await fetch(`${this.baseUrl}${endpoint}`, {
...options,
headers: {
"X-API-Key": this.apiKey,
Accept: "application/json",
"Content-Type": "application/json",
...options.headers,
},
});
return response.json();
},
};
import requests
class WallbitClient:
def __init__(self, api_key: str):
self.base_url = "https://api.wallbit.io"
self.headers = {
"X-API-Key": api_key,
"Accept": "application/json"
}
def request(self, method: str, endpoint: str, **kwargs):
url = f"{self.base_url}{endpoint}"
response = requests.request(method, url, headers=self.headers, **kwargs)
response.raise_for_status()
return response.json()
| Code | Description | Action |
|---|---|---|
| 401 | Invalid or missing API Key | Check X-API-Key header |
| 403 | Insufficient permissions | Check API Key permissions |
| 412 | Incomplete KYC or blocked account | Complete verification in the app |
| 422 | Validation error | Review sent parameters |
| 429 | Rate limit exceeded | Wait retry_after seconds |
/**
* Executes a Wallbit API request with error handling.
*
* @param string $method
* @param string $endpoint
* @param array $data
* @return array
* @throws \Exception
*/
function wallbitRequest(string $method, string $endpoint, array $data = []): array
{
$client = createWallbitClient();
$response = match($method) {
'GET' => $client->get($endpoint, $data),
'POST' => $client->post($endpoint, $data),
default => throw new \Exception("Unsupported method: {$method}")
};
if ($response->status() === 429) {
$retryAfter = $response->json('retry_after', 60);
throw new \Exception("Rate limit exceeded. Retry in {$retryAfter} seconds.");
}
if ($response->status() === 401) {
throw new \Exception("Invalid or missing API Key.");
}
if ($response->status() === 403) {
$permissions = $response->json('your_permissions', []);
throw new \Exception("Insufficient permissions. You have: " . implode(', ', $permissions));
}
if ($response->status() === 422) {
$errors = $response->json('errors', []);
throw new \Exception("Validation error: " . json_encode($errors));
}
if (!$response->successful()) {
throw new \Exception($response->json('message', 'Unknown error'));
}
return $response->json('data');
}
Response headers:
X-RateLimit-Limit: Requests allowed per minuteX-RateLimit-Remaining: Remaining requestsX-RateLimit-Reset: Unix timestamp of resetRetry-After: Seconds until retry is allowed (only on 429)When generating code for this API:
USD, EUR, ARS, MXN, USDC, USDT, BOB, COP, PEN, DOPUSD, EUR (countries: US, EU)USDT, USDC (networks: ethereum, arbitrum, solana, polygon, tron)MOST_POPULAR, ETF, DIVIDENDS, TECHNOLOGY, HEALTH, CONSUMER_GOODS, ENERGY_AND_WATER, FINANCE, REAL_ESTATE, TREASURY_BILLS, VIDEOGAMES, ARGENTINA_ADR
MARKET: Market order (executes immediately)LIMIT: Limit order (requires limit_price and time_in_force)STOP: Stop order (requires stop_price)STOP_LIMIT: Stop-limit order (requires stop_price and limit_price)