|
|||
API v1 documentation
Public market market_data
market_limit
market_depth
market_trades
Public pool pool_data
pool_limit
pool_history
Privat market market_trade
market_add_liquidity
market_orders
market_liquidity
market_cancel_order
market_cancel_liquidity
market_user_trades
Privat pool pool_add
pool_trade
pool_cancel
pool_trades
Privat account balances
currencies
transactions
Method:
GET /api/v1/market_data/
This method allows obtaining market data on spot markets. Parameters:
pair (market ticker) optional Example of a PHP request:
$base_url = 'https://mubadil.com';
The example above will return market data for the BTC/USDT and ETH/USDT markets only. Response: { "result":"success", "list":{ "btc_usdt":{ "price":83145, "low":83145, "hight":, "ask":83177, "bid":83011, "trend":0, "offer":0.0087685441, "liquidity":719.4701878193, "asset_1_volume":0, "asset_2_volume":0, "traders":0, "trades":0, "providers":2, "timestamp":1742414844 }, ... } } Description:
list - list of markets
price - last price low - minimum price in 24 hours hight - maximum price in 24 hours ask - best ask price bid - best bid price trend - price change in 24 hours offer - total offer liquidity - total liquidity asset_1_volume - primary volume in 24 hours asset_2_volume - secondary volume in 24 hours traders - active traders in 24 hours trades - trades executed in 24 hours providers - liquidity providers timestamp - data update timestamp Method:
GET /api/v1/market_limit/
This method allows you to obtain trading limits on spot markets. Parameters:
pair (market ticker) optional Example of a PHP request:
$base_url = 'https://mubadil.com';
The example above will return trading limits only for the BTC/USDT and ETH/USDT markets. Response: { "result":"success", "list":{ "btc_usdt":{ "step_price":1, "decimal_price":0, "min_price_buy":1, "max_price_buy":124717, "min_price_sell":41572, "max_price_sell":10000000, "min_amount":0.00000001, "step_amount":0.00000001, "decimal_amount":8, "min_volume":0.1, "step_volume":0.00000001, "decimal_volume":8, "timestamp":1742414844 }, ... } } Description:
list - list of markets
step_price - price step decimal_price - price precision min_price_buy - minimum buy price max_price_buy - maximum buy price min_price_sell - minimum sell price max_price_sell - maximum sell price min_amount - minimum amount step_amount - amount step decimal_amount - amount precision min_volume - minimum volume step_volume - volume step decimal_volume - volume precision timestamp - data update timestamp Method:
GET /api/v1/market_depth/
This method allows you to obtain the depth of orders in spot markets. Parameters:
pair (market ticker) optional
limit (number of orders) optional Example of a PHP request:
$base_url = 'https://mubadil.com';
The example above will return the top 25 price-grouped buy/sell orders only for the BTC/USDT and ETH/USDT markets. Response: { "result":"success", "list":{ "btc_usdt":{ "asks": [ [83177,0.0000086], [83343,0.00000859], [83509,0.00000855], ... ], "bids": [ [83011,0.00000864], [82845,0.00000865], [82679,0.00000869], ... ] }, ... } } Description:
list - list of markets
asks - sell orders [price,quantity] bids - buy orders [price,quantity] Method:
GET /api/v1/market_trades/
This method allows you to obtain a history of recent trading transactions on spot markets. Parameters:
pair (market ticker) optional
from (start timestamp) optional
to (end timestamp) optional
limit (number of trades) optional Example of a PHP request:
$base_url = 'https://mubadil.com';
The example above will return the history of the last 15 trades only for the BTC/USDT and ETH/USDT markets. Response: { "result":"success", "list":[{ "pair":"pak_usdt", "side":"buy", "amount":1, "price":0.1, "timestamp":1697390831 }, ... ] } Description:
result - result of the request execution
list - list of trades pair - market ticker side - trade direction amount - primary trade volume price - trade price timestamp - timestamp Method:
GET /api/v1/pool_data/
This method allows you to obtain market data on liquidity pools. Parameters:
pair (market ticker) optional Example of a PHP request:
$base_url = 'https://mubadil.com';
The example above will return market data only for the BTC/USDT and ETH/USDT markets. Response: { "result":"success", "list":{ "btc_usdt":{ "price":, "low":, "hight":, "trend":, "offer":, "liquidity":, "asset_1_volume":, "asset_2_volume":, "traders":, "trades":, "providers":, "timestamp": }, ... }, } Description:
list - list of markets
price - initial price low - minimum price in 24 hours height - maximum price in 24 hours trend - price change in 24 hours offer - total offer liquidity - total liquidity asset_1_volume - primary volume in 24 hours asset_2_volume - secondary volume in 24 hours traders - active traders in 24 hours providers - liquidity providers timestamp - data update timestamp Method:
GET /api/v1/pool_limit/
This method allows you to obtain trading limits on liquidity pools. Parameters:
pair (market ticker) optional Example of a PHP request:
$base_url = 'https://mubadil.com';
The example above will return trading limits only for the BTC/USDT and ETH/USDT markets. Response: { "result":"success", "list":{ "btc_usdt":{ "max_price_buy":, "min_price_sell":, "min_amount":, "step_amount":, "decimal_amount":, "min_volume":, "step_volume":, "decimal_volume":, "timestamp": }, ... } } Description:
list - list of markets
max_price_buy - maximum buy price min_price_sell - minimum sell price min_amount - minimum amount step_amount - amount step decimal_amount - amount precision min_volume - minimum volume step_volume - volume step decimal_volume - volume precision timestamp - data update timestamp Method:
GET /api/v1/pool_history/
This method allows you to obtain the history of trading transactions on liquidity pools. Parameters:
pair (market ticker) optional
from (start timestamp) optional
to (end timestamp) optional
limit (number of trades) optional Example of a PHP request:
$base_url = 'https://mubadil.com';
The example above will return the history of the last 15 trades only for the BTC/USDT and ETH/USDT markets. Response: { "result":"success", "list":{ "s11_usdt":[ { "trade_id":1, "type":"buy", "amount":1, "price":0.1, "timestamp":1697390831 }, ... ] ... } } Description:
result - result of the request execution
list - list of markets trade_id - trade identifier type - trade type amount - primary trade volume price - trade price timestamp - trade execution timestamp Method:
POST /api/v1/market_trade/
This method allows trading operations to be carried out on spot markets. Parameters:
pair (market ticker) required
side (order direction) required
amount (coin quantity limit) required
price (price limit) required
tonce (timestamp in milliseconds) required Example of a PHP request:
Calling this method requires a digital signature via $base_url = 'https://mubadil.com'; $method = '/api/v1/market_trade/'; $api_key = 'YOU_API_SECRET'; $secret_key = 'YOU_API_SECRET'; $param['pair'] = 'btc_usdt'; $param['side'] = 'buy'; $param['amount'] = 0.01; $param['price'] = 25000; $param['tonce'] = round(microtime(true) * 1000); $params = http_build_query($param); $sign = hash_hmac('sha256', $params, $secret_key); $headers = [ 'API-Key: ' . $api_key, 'API-Sign: ' . $sign ]; $ch = curl_init($base_url.$method); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($ch); curl_close($ch); The example above will execute a limit buy order or create an order to buy 0.01 BTC at the price of 25000 BTC/USDT. Response: { "result":"success", "trade": { "trade_id":1, "pair":"btc_usdt", "side":"buy", "price":100000, "amount":0.01, "volume":1000, "amount_fee":1, "timestamp":1586000000 } "trades":[{ "price":100000, "amount":0.01, "volume":1000, "amount_fee":1 }, ... ] "order": { "order_id":1, "pair":"btc_usdt", "side":"buy", "price":100000, "amount":0.01, "volume":1000, "timestamp":1586000000 } } Description:
trade - data for the executed trade
trade_id - trade identifier pair - market ticker side - trade type price - trade price amount - primary trade volume volume - secondary trade volume amount_fee - primary fee (for side:buy) volume_fee - secondary fee (for side:sell) timestamp - trade execution timestamp trades - data for executed trades price - trade price amount - primary trade volume volume - secondary trade volume amount_fee - primary fee (for side:buy) volume_fee - secondary fee (for side:sell) order - data for the open order order_id - order identifier pair - market ticker side - order type price - order price amount - primary order volume volume - secondary order volume timestamp - order opening timestamp Method:
POST /api/v1/market_add_liquidity/
This method allows adding liquidity to liquidity pools. Parameters:
pair (market ticker) required
amount (primary liquidity) required
tonce (timestamp in milliseconds) required Example of a PHP request:
Calling this method requires a digital signature via $base_url = 'https://mubadil.com'; $method = '/api/v1/market_add_liquidity/'; $api_key = 'YOU_API_SECRET'; $secret_key = 'YOU_API_SECRET'; $param['pair'] = 'btc_usdt'; $param['amount'] = 0.01; $param['tonce'] = round(microtime(true) * 1000); $params = http_build_query($param); $sign = hash_hmac('sha256', $params, $secret_key); $headers = [ 'API-Key: ' . $api_key, 'API-Sign: ' . $sign ]; $ch = curl_init($base_url.$method); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($ch); curl_close($ch); The example above will add liquidity of 0.01 BTC to the BTC/USDT pool. Response: { "result":"success", "data": { "share_id":2, "pair":"btc_usd", "asset_1_amount":0.01, "asset_2_amount":0.1, "price":10, "timestamp":1586000000 } } Description:
data - data on the added liquidity share
share_id - liquidity share identifier pair - market ticker asset_1_amount - added primary liquidity asset_2_amount - added secondary liquidity price - liquidity addition price timestamp - liquidity share addition timestamp Method:
POST /api/v1/market_orders/
This method allows you to receive open orders on spot markets. Parameters:
pair (market ticker) optional
tonce (timestamp in milliseconds) required Example of a PHP request:
Calling this method requires a digital signature via $base_url = 'https://mubadil.com'; $method = '/api/v1/market_orders/'; $api_key = 'YOU_API_SECRET'; $secret_key = 'YOU_API_SECRET'; $param['pair'] = 'btc_usdt,eth_usdt'; $param['tonce'] = round(microtime(true) * 1000); $params = http_build_query($param); $sign = hash_hmac('sha256', $params, $secret_key); $headers = [ 'API-Key: ' . $api_key, 'API-Sign: ' . $sign ]; $ch = curl_init($base_url.$method); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($ch); curl_close($ch); The example above will return open orders only for the BTC/USDT and ETH/USDT markets. Response: { "result":"success", "list":{ "btc_usdt":[ { "order_id":1, "type":"buy", "amount":0.01, "price":27000, "timestamp":1696779593, "amount_executed":0, "trades_count":0, "timestamp_update":1696779593 }, ... ], ... } } Description:
result - result of the request execution
list - list of markets order_id - order identifier type - order type amount - primary order volume price - order price timestamp - order opening timestamp amount_executed - used order volume trades_count - number of trades timestamp_update - order update timestamp Method:
POST /api/v1/market_liquidity/
This method allows you to get active liquidity on liquidity pools. Parameters:
pair (market ticker) optional
tonce (timestamp in milliseconds) required Example of a PHP request:
Calling this method requires a digital signature via $base_url = 'https://mubadil.com'; $method = '/api/v1/market_liquidity/'; $api_key = 'YOU_API_SECRET'; $secret_key = 'YOU_API_SECRET'; $param['pair'] = 'btc_usdt,eth_usdt'; $param['tonce'] = round(microtime(true) * 1000); $params = http_build_query($param); $sign = hash_hmac('sha256', $params, $secret_key); $headers = [ 'API-Key: ' . $api_key, 'API-Sign: ' . $sign ]; $ch = curl_init($base_url.$method); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($ch); curl_close($ch); The example above will return open liquidity shares only for the BTC/USDT and ETH/USDT markets. Response: { "result":"success", "list":{ "btc_usdt":[ { "share_id":1, "asset_1_amount":0.01, "asset_2_amount":1, "share":1, "timestamp":1696779593 }, ... ], ... } } Description:
result - result of the request execution
list - list of markets share_id - liquidity identifier asset_1_amount - primary liquidity asset_2_amount - secondary liquidity share - liquidity share in percentage timestamp - liquidity addition timestamp Method:
POST /api/v1/market_cancel_order/
This method allows you to cancel orders on spot markets. Parameters:
order_id (order identifier) required
tonce (timestamp in milliseconds) required Example of a PHP request:
Calling this method requires a digital signature via $base_url = 'https://mubadil.com'; $method = '/api/v1/market_cancel_order/'; $api_key = 'YOU_API_SECRET'; $secret_key = 'YOU_API_SECRET'; $param['order_id'] = 123; $param['tonce'] = round(microtime(true) * 1000); $params = http_build_query($param); $sign = hash_hmac('sha256', $params, $secret_key); $headers = [ 'API-Key: ' . $api_key, 'API-Sign: ' . $sign ]; $ch = curl_init($base_url.$method); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($ch); curl_close($ch); The example above will cancel the order with the order identifier 123. Response: { "result":"success" } Description:
result - result of the request execution
Method:
POST /api/v1/market_cancel_liquidity/
This method allows you to cancel liquidity shares on liquidity pools. Parameters:
share_id (liquidity share identifier) required
tonce (timestamp in milliseconds) required Example of a PHP request:
Calling this method requires a digital signature via $base_url = 'https://mubadil.com'; $method = '/api/v1/market_cancel_liquidity/'; $api_key = 'YOU_API_SECRET'; $secret_key = 'YOU_API_SECRET'; $param['share_id'] = 12345; $param['tonce'] = round(microtime(true) * 1000); $params = http_build_query($param); $sign = hash_hmac('sha256', $params, $secret_key); $headers = [ 'API-Key: ' . $api_key, 'API-Sign: ' . $sign ]; $ch = curl_init($base_url.$method); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($ch); curl_close($ch); The example above will cancel the liquidity share with the liquidity share identifier 12345. Response: { "result":"success" } Description:
result - result of the request execution
Method:
POST /api/v1/market_user_trades/
This method allows you to obtain your own history of trading transactions on spot markets. Parameters:
pair (market ticker) optional
from (start timestamp) optional
to (end timestamp) optional
limit (number of trades) optional
tonce (timestamp in milliseconds) required Example of a PHP request:
Calling this method requires a digital signature via $base_url = 'https://mubadil.com'; $method = '/api/v1/market_user_trades/'; $api_key = 'YOU_API_SECRET'; $secret_key = 'YOU_API_SECRET'; $param['pair'] = 'btc_usdt,eth_usdt'; $param['from'] = 1697300000; $param['to'] = 1697320000; $param['limit'] = 15; $param['tonce'] = round(microtime(true) * 1000); $params = http_build_query($param); $sign = hash_hmac('sha256', $params, $secret_key); $headers = [ 'API-Key: ' . $api_key, 'API-Sign: ' . $sign ]; $ch = curl_init($base_url.$method); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($ch); curl_close($ch); The example above will return your own history of the last 15 trades only for the BTC/USDT and ETH/USDT markets. Response: { "result":"success", "list":[{ "trade_id":1, "pair":"pak_usdt", "side":"buy", "amount":1, "price":0.1, "timestamp":1697390831 }, ... ] } Description:
result - result of the request execution
list - list of trades trade_id - trade identifier pair - market ticker side - trade direction amount - primary trade volume price - trade price timestamp - timestamp Method:
POST /api/v1/balances/
This method allows you to obtain balances. Parameters:
ticker (coin ticker) optional
tonce (timestamp in milliseconds) required Example of a PHP request:
To call this method, a digital signature is required via $base_url = 'https://mubadil.com'; $method = '/api/v1/balances/'; $api_key = 'YOU_API_SECRET'; $secret_key = 'YOU_API_SECRET'; $param['ticker'] = 'btc,eth'; $param['tonce'] = round(microtime(true) * 1000); $params = http_build_query($param); $sign = hash_hmac('sha256', $params, $secret_key); $headers = [ 'API-Key: ' . $api_key, 'API-Sign: ' . $sign ]; $ch = curl_init($base_url.$method); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($ch); curl_close($ch); The example above will return balances only for BTC and ETH. Response: { "result":"success", "list":{ "btc":{ "spot":0.01, "in_orders":0.01, "in_pools":0.01 }, ... } } Description:
result - request execution result
list - list of coins spot - spot balance in_orders - funds in orders in_pools - funds in pools Method:
POST /api/v1/currencies/
This method allows you to get data about coins. Parameters:
ticker (coin ticker) optional
tonce (timestamp in milliseconds) required Example of a PHP request:
Calling this method requires a digital signature via $base_url = 'https://mubadil.com'; $method = '/api/v1/currencies/'; $api_key = 'YOU_API_SECRET'; $secret_key = 'YOU_API_SECRET'; $param['ticker'] = 'btc,eth'; $param['tonce'] = round(microtime(true) * 1000); $params = http_build_query($param); $sign = hash_hmac('sha256', $params, $secret_key); $headers = [ 'API-Key: ' . $api_key, 'API-Sign: ' . $sign ]; $ch = curl_init($base_url.$method); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($ch); curl_close($ch); The example above will return data only for BTC and ETH coins. Response: { "result":"success", "list":{ "btc":{ "name":"Bitcoin", "site":"https://bitcoin.org", "deposit_can":1, "withdraw_can":1, "chains":{ "btc":{ "deposit_can":1, "deposit_min":1, "deposit_fee_fixed":1, "deposit_fee_percent":, "deposit_confirmations":1, "deposit_address_spot":, "deposit_address_advertising":, "withdraw_can":1, "withdraw_min":1, "withdraw_fee_fixed":1, "withdraw_fee_percent":, "explorer":"...", "reserve":1 }, ... } }, ... } } Description:
result - request execution result
list - list of coins deposit_can - deposit status withdraw_can - withdrawal status chains - list of networks deposit_can - deposit status deposit_min - minimum deposit deposit_fee_fixed - fixed deposit fee deposit_fee_percent - percentage deposit fee deposit_confirmations - number of deposit confirmations deposit_address_spot - spot deposit address deposit_address_advertising - advertising deposit address withdraw_can - withdrawal status withdraw_min - minimum withdrawal withdraw_fee_fixed - fixed withdrawal fee withdraw_fee_percent - percentage withdrawal fee explorer - block explorer reserve - exchange reserve available for withdrawal Method:
POST /api/v1/transactions/
This method allows you to get your own history of recent transactions. Parameters:
ticker (coin ticker) optional
type (transaction direction) optional
direction (transaction type) optional
from (start timestamp) optional
to (end timestamp) optional
limit (number of transactions) optional
tonce (timestamp in milliseconds) required Example of a PHP request:
Calling this method requires a digital signature via $base_url = 'https://mubadil.com'; $method = '/api/v1/transactions/'; $api_key = 'YOU_API_SECRET'; $secret_key = 'YOU_API_SECRET'; $param['ticker'] = 'btc'; $param['tonce'] = round(microtime(true) * 1000); $params = http_build_query($param); $sign = hash_hmac('sha256', $params, $secret_key); $headers = [ 'API-Key: ' . $api_key, 'API-Sign: ' . $sign ]; $ch = curl_init($base_url.$method); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($ch); curl_close($ch); The example above will return your own history of recent transactions only for the BTC and ETH coins. Response: { "result":"success", "list":[ { "ticker":"usdt", "type":"on_chain", "direction":"deposit", "chain":"btc", "address":"...", "amount":1, "transaction_id":"...", "status":"completed", "timestamp":1234567890 }, { "ticker":"usdt", "type":"off_chain", "direction":"withdrawal", "user_id":123, "amount":1, "transaction_id":"...", "status":"processing", "timestamp":1234567890 }, ... ] } Description:
result - result of the request execution
list - list of transactions type - transaction type direction - transaction direction chain - network address - address user_id - user identifier amount - transaction amount transaction_id - transaction identifier timestamp - transaction timestamp |
|
||
Connection. . .
|