Account & Balance
Retrieve account information and balance.
Get Account Informationโ
Retrieve complete account details and balance.
Endpoint: GET /api/account
Response:
{
"status": "success",
"message": "Account information retrieved",
"data": {
"user_id": 123,
"name": "John Doe",
"email": "john@example.com",
"balance": 5000.00,
"available_balance": 4500.00
}
}
Get Balanceโ
Retrieve current balance only.
Endpoint: GET /api/balance
Response:
{
"status": "success",
"message": "Balance retrieved",
"data": {
"balance": 5000.00,
"available_balance": 4500.00
}
}
Code Examplesโ
- cURL
- JavaScript
- Python
- PHP
- Node.js
# Get full account info
curl -X GET "https://gateway.wasmou.net/api/account" \
-H "X-Api-Key: your_api_key_here"
# Get balance only
curl -X GET "https://gateway.wasmou.net/api/balance" \
-H "X-Api-Key: your_api_key_here"
// Get account information
async function getAccount() {
const response = await fetch('https://gateway.wasmou.net/api/account', {
method: 'GET',
headers: {
'X-Api-Key': 'your_api_key_here'
}
});
const data = await response.json();
console.log(data);
}
// Get balance
async function getBalance() {
const response = await fetch('https://gateway.wasmou.net/api/balance', {
method: 'GET',
headers: {
'X-Api-Key': 'your_api_key_here'
}
});
const data = await response.json();
console.log(data);
}
// Call the functions
getAccount();
getBalance();
import requests
# API Configuration
API_KEY = "your_api_key_here"
BASE_URL = "https://gateway.wasmou.net"
# Get account information
def get_account():
url = f"{BASE_URL}/api/account"
headers = {
"X-Api-Key": API_KEY
}
response = requests.get(url, headers=headers)
data = response.json()
print(data)
return data
# Get balance
def get_balance():
url = f"{BASE_URL}/api/balance"
headers = {
"X-Api-Key": API_KEY
}
response = requests.get(url, headers=headers)
data = response.json()
print(data)
return data
# Call the functions
if __name__ == "__main__":
get_account()
get_balance()
<?php
// API Configuration
$apiKey = "your_api_key_here";
$baseUrl = "https://gateway.wasmou.net";
// Get account information
function getAccount($apiKey, $baseUrl) {
$url = $baseUrl . "/api/account";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-Api-Key: " . $apiKey
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
return $data;
}
// Get balance
function getBalance($apiKey, $baseUrl) {
$url = $baseUrl . "/api/balance";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-Api-Key: " . $apiKey
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
return $data;
}
// Call the functions
getAccount($apiKey, $baseUrl);
getBalance($apiKey, $baseUrl);
?>
const https = require('https');
// API Configuration
const API_KEY = 'your_api_key_here';
const BASE_URL = 'gateway.wasmou.net';
// Get account information
function getAccount() {
const options = {
hostname: BASE_URL,
path: '/api/account',
method: 'GET',
headers: {
'X-Api-Key': API_KEY
}
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(JSON.parse(data));
});
});
req.on('error', (error) => {
console.error(error);
});
req.end();
}
// Get balance
function getBalance() {
const options = {
hostname: BASE_URL,
path: '/api/balance',
method: 'GET',
headers: {
'X-Api-Key': API_KEY
}
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(JSON.parse(data));
});
});
req.on('error', (error) => {
console.error(error);
});
req.end();
}
// Call the functions
getAccount();
getBalance();
Balance Notesโ
balance: Total account balanceavailable_balance: Balance available for orders (excluding pending orders)- All amounts are in DZD
- Balance is automatically refunded if an order fails
Try It Liveโ
Test this endpoint directly in your browser using our Live Testing tool.