| Current Path : /var/www/html/akept/backend/modules/cryptoaverage/exchange/ |
| Current File : /var/www/html/akept/backend/modules/cryptoaverage/exchange/api.php |
<?php
require_once 'Helpers.php';
require_once 'Binance.php';
$body = Helpers::parseBody();
if (! isset($body->action)) {
Helpers::error([
'success' => false,
'message' => 'empty param action'
]);
}
try {
$binance = new Binance();
//get data
$data = $body->data;
Helpers::success($binance->{$body->action}($data));
} catch (\Throwable $t) {
Helpers::error([
'success' => false,
'message' => $t->getMessage()
]);
}