Base URL

The base url is https://mapi.bbexsy.com.

The request URL needs to be determined by BASE and specific endpoint combination.


Endpoint of the Interface

Each interface has its own endpoint, described by field HTTP REQUEST in the docs.


Authentication

HTTP Request

POST /login

Passphrase - testapi (Your Passphrase)

Secret Key - pk_d5b167bee654fb72142ae5d801261330 (Your Api Secret Key)


Info: To get 'secretkey' value of the prehash string {passphrase+secretkey} with sha256 HMAC use below format.

hash_hmac('sha256', passphrase, secretkey)

Headers
Key Value
Accept application/json
secretkey 6c842df7ce530227399b4a3a53f2615ddaaea0ca0d15d26c41d39402b536085b

Parameter Description
api_key pu_3dcb8f52ef347ad57060dae3d678a65f

Response Example

                                                
{
    "success": true,
    "data": {
        "token": "14|Ze4tfdjCwqlvy7U3mFL4l8q9PYfkO4YvvJVjBZpd",
        "details": {
            "name": "Fontaine",
            "email": "cdupuis@roy.fr",
            "full_name": "Virginie Le Fontaine",
            "address": "59394 chemin Collin, Pires-les-Bains, Rey, France".
        }
    },
    "message": "User login successfully"
}
                                                

Coins List

HTTP Request

GET /coins

Parameter Description
No params ---

Response Example

                                                
{
    "success": true,
    "data": [
        {
            "coin_name": "BITCOIN",
            "coin": "BTC",
            "decimal": 8,
            "network": "BTC"
        },
        {
            "coin_name": "ETHEREUM",
            "coin": "ETH",
            "decimal": 8,
            "network": "ETH"
        },
        {
            "coin_name": "TRON",
            "coin": "TRX",
            "decimal": 8,
            "network": "TRX"
        },
        {
            "coin_name": "DOGECOIN",
            "coin": "DOGE",
            "decimal": 8,
            "network": "DOGE"
        },
        {
            "coin_name": "TETHER",
            "coin": "USDT",
            "decimal": 8,
            "network": "ERC20"
        }
    ],
    "message": "Coins list fetched successfully"
}
                                                

Trade Pairs

 

HTTP Request

GET /trade/pairs

Parameter Description
No params ---

Response Example

                                                
{
    "success": true,
    "data": [
        {
            "pair": "SHIBA_USDT",
            "mini_buy_price": "0.001000",
            "maxi_buy_price": "99999999.000000",
            "mini_buy_amount": "0.10",
            "maxi_buy_amount": "17000000000.00",
            "mini_buy_total": "0.01000000",
            "mini_sell_price": "0.000000",
            "maxi_sell_price": "99999999.000000",
            "mini_sell_amount": "0.10",
            "maxi_sell_amount": "17000000000.00",
            "mini_sell_total": "0.01000000",
            "pair_type": "Normal"
        },
        {
            "pair": "ETH_BTC",
            "mini_buy_price": "0.0001",
            "maxi_buy_price": "99999999.0000",
            "mini_buy_amount": "0.0001",
            "maxi_buy_amount": "10000000000.0000",
            "mini_buy_total": "0.00001000",
            "mini_sell_price": "0.0001",
            "maxi_sell_price": "99999999.0000",
            "mini_sell_amount": "0.0001",
            "maxi_sell_amount": "10000000000.0000",
            "mini_sell_total": "0.00001000",
            "pair_type": "Normal"
        }
    ],
    "message": "Trade pair details."
}
                                                

Buy Order Book

 

HTTP Request

GET /trade/buy/orderbook

Parameter Description
pair ETH_USDT
Required: Yes
Type: string
Accept: UPPERCASE
limit 10
Required: Yes
Type: int
offset 0
Required: Yes
Type: int

Response Example

                                                
{
    "success": true,
    "data": {
        "buy_order_book": [
            {
                "price": "1673.28000000",
                "remaining_qty": "70.08120000"
            }
        ]
    },
    "message": "Buy Order Book"
}
                                                

Sell Order Book

 

HTTP Request

GET /trade/sell/orderbook

Parameter Description
pair ETH_USDT
Required: Yes
Type: string
Accept: UPPERCASE
limit 10
Required: Yes
Type: int
offset 0
Required: Yes
Type: int

Response Example

                                                
{
    "success": true,
    "data": {
        "sell_order_book": [
            {
                "price": "1673.29000000",
                "remaining_qty": "5.94760000"
            }
        ]
    },
    "message": "Sell Order Book"
}
                                                

Trade History

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST /trade/history

Parameter Description
pair ETH_USDT
Required: No
Type: string
Accept: UPPERCASE
from_date 2023-09-23
Required: No
Type: Date (YYYY-mm-dd)
to_date 2023-09-30
Required: No
Type: Date (YYYY-mm-dd)
limit 10
Required: No
Type: int
offset 0
Required: No
Type: int
type buy
Required: No
Type: string
Accept: lowercase (buy,sell)
order_type limit
Required: No
Type: string
Accept: lowercase (limit,market,stoplimit)

Response Example

                                                
                                                {
                                                    {
    "success": true,
    "data": [
        {
            "type": "buy",
            "date": "12-02-2024 07:59:40",
            "pair": "ETH/USDT",
            "order_type": "Limit",
            "price": "80.00000000",
            "qty": "1.00000000",
            "remaining_qty": "0.00000000",
            "fee": "0.01000000",
            "total": "80.00000000",
            "status": "Completed",
            "order_id": "b2cde226dd5b0970e528"
        },        
        {
            "type": "sell",
            "date": "09-02-2024 05:23:42",
            "pair": "ETH/USDT",
            "order_type": "Limit",
            "price": "76.00000000",
            "qty": "1.00000000",
            "remaining_qty": "0.00000000",
            "fee": "0.76000000",
            "total": "76.00000000",
            "status": "Completed",
            "order_id": "a7ccfa1f195a08937801"
        }
    ],
    "message": "Trade history"
}
                                                }
                                                

Assets List

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST /account/assets

Parameter Description
No params ---

Response Example

                                                
{
    "success": true,
    "data": [
        {
            "coin": "BTC",
            "wallet": {
                "avbl_balance": 2.61000000,
                "balance_in_trade": 0.00000000
            }
        },
        {
            "coin": "ETH",
            "wallet": {
                "avbl_balance": 78.97000000,
                "balance_in_trade": 22.00000000
            }
        },
        {
            "coin": "TRX",
            "wallet": {
                "avbl_balance": 0.00000000,
                "balance_in_trade": 0.00000000
            }
        },
        {
            "coin": "DOGE",
            "wallet": {
                "avbl_balance": 0.00000000,
                "balance_in_trade": 0.00000000
            }
        },
        {
            "coin": "USDT",
            "wallet": {
                "avbl_balance": 100.00000000,
                "balance_in_trade": 0.00000000
            }
        }
    ],
    "message": "Assets list fetched successfully"
}
                                                

List Bank

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST /account/bank

Parameter Description
No params ---

Response Example

                                                
                                            {
    "success": true,
    "data": [
        {
            "id": 2,
            "currency": "ZAR",
            "account_name": "test",
            "account_type": "savings",
            "account_number": "00023786532",
            "bank_name": "canara",
            "bank_branch": "main",
            "bank_address": "newyork"
        }
    ],
    "message": ""
}
                                                

Add Bank

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST account/add/bank

Parameter Description
currency ZAR
Required: Yes
Type: string
Accept: UPPERCASE
account_name test
Required: Yes
Type: string
account_type savings
Required: Yes
Type: string
account_number 0008766192
Required: Yes
Type: int
bank_name IDBI
Required: Yes
Type: string
bank_branch dency
Required: Yes
Type: string
bank_address delhi
Required: Yes
Type: string
bank_code SBI1234
Required: Yes
Type: string
bank_branch_code CIN1108
Required: Yes
Type: string

Response Example

                                                
                                            {
    "success": true,
    "data": {
        "id": 5,
        "currency": "ZAR",
        "account_name": "test",
        "account_type": "savings",
        "account_number": "0008766192",
        "bank_name": "IDBI",
        "bank_branch": "dency",
        "bank_address": "delhi",
        "bank_code": "SBI1234",
        "branch_code": "CIN1108"
    },
    "message": "Bank details added successfully"
}
                                                

Update Bank

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST account/update/bank

Parameter Description
id 5
Required: Yes
Type: int
currency ZAR
Required: Yes
Type: string
Accept: UPPERCASE
account_name test
Required: Yes
Type: string
account_type savings
Required: Yes
Type: string
account_number 3456783
Required: Yes
Type: int
bank_name IDBI
Required: Yes
Type: string
bank_branch dino
Required: Yes
Type: string
bank_address delhi
Required: Yes
Type: string
bank_code SBI14
Required: Yes
Type: string
bank_branch_code CI108
Required: Yes
Type: string

Response Example

                                                
                                            {
    "success": true,
    "data": {
        "id": 5,
        "currency": "ZAR",
        "account_name": "test",
        "account_type": "savings",
        "account_number": "0008766192",
        "bank_name": "IDBI",
        "bank_branch": "dency",
        "bank_address": "delhi",
        "bank_code": "SBI1234",
        "branch_code": "CIN1108"
    },
    "message": "Bank details added successfully"
}
                                                

Delete Bank

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST account/delete/bank

Parameter Description
id 5
Required: Yes
Type: int

Response Example

                                                
                                            {
    "success": true,
    "data": [],
    "message": "Bank detail deleted successfully"
}
                                                

Coin Deposit

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST account/coin/deposit

Parameter Description
coin USDT
Required: Yes
Type: string
Accept: UPPERCASE
network ERC20
Required: Yes
Type: string
Accept: UPPERCASE

Response Example

                                                
                                    {
    "success": true,
    "data": {
        "coin": "USDT",
        "address": "0x844b7c2b1232293f03bb39a78d14e6961d00ca17",
        "address_url": "https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=0x844b7c2b1232293f03bb39a78d14e6961d00ca17"
    },
    "message": "Success"
}
                                                

Fiat Deposit

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST account/fiat/deposit

Parameter Description
symbol ZAR
Required: Yes
Type: string
Accept: UPPERCASE
This field represents fiat currency
amount 100
Required: Yes
Type: int
proof Attached your proof image file
Required: Yes
Type: File (jpeg,jpg,png)

Response Example

                                                
{
    "success": true,
    "data": [],
    "message": "Deposit request successful. Wait for admin approval"
}
                                                

Coin Withdraw

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST account/coin/withdraw

Parameter Description
symbol ETH
Required: Yes
Type: string
Accept: UPPERCASE
network ETH
Required: Yes
Type: string
Accept: UPPERCASE
amount 1
Required: Yes
Type: int
to_address 0x8c08a27cd4e4e0f1587370089743c5a53bd36666
Required: Yes
Type: string

Response Example

                                                
{
    "success": true,
    "data": "[]",
    "message": "Withdraw request sent successfully"
}
                                                

Fiat Withdraw

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST account/fiat/withdraw

Parameter Description
symbol ZAR
Required: Yes
Type: string
Accept: UPPERCASE
amount 50
Required: Yes
Type: int
bank_id 1
Required: Yes
Type: int

Response Example

                                                
                                            {
    "success": true,
    "data": [],
    "message": "Bank detail deleted successfully"
}
                                                

Deposit History

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST /account/deposit/history

Parameter Description
symbol USDT
Required: Yes
Type: string
Accept: UPPERCASE
limit 10
Required: Yes
Type: int
offset 0
Required: Yes
Type: int
from_date 2023-09-23
Required: No
Type: Date (YYYY-mm-dd)
to_date 2023-09-30
Required: No
Type: Date (YYYY-mm-dd)

Response Example

                                                
{
    "success": true,
    "data": [
        {
            "txid": "c554fe304582d4454a20",
            "currency": "USDT",
            "txtype": "deposit",
            "from_addr": "0x3d5acbd6cdbfcd6d17e228a2e3d5de8b87e9671a",
            "to_addr": "0xa0adb1fea8c1ddf98f38b61b713d6c7bb70cbef1",
            "amount": 10,
            "totalamount": 10,
            "status": "Approved",
            "created_at": "24-08-2023 12:08:29"
        }
    ],
    "message": "Deposit history"
}
                                                

Withdraw History

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST /account/withdraw/history

Parameter Description
symbol USDT
Required: Yes
Type: string
Accept: UPPERCASE
limit 10
Required: Yes
Type: int
offset 0
Required: Yes
Type: int
from_date 2023-09-20
Required: No
Type: Date (YYYY-mm-dd)
to_date 2023-09-28
Required: No
Type: Date (YYYY-mm-dd)

Response Example

                                                
{
    "success": true,
    "data": [
        {
            "created_at": "20-09-2023 13:49:51",
            "txid": "59ef1abfe4fe79c5d5",
            "from_addr": "0x3d5acbd6cdbfcd6d17e228a2e3d5de8b87e9671a",
            "to_addr": "0xa0adb1fea8c1ddf98f38b61b713d6c7bb70cbef1",
            "currency": "USDT",
            "amount": "2.50000000",
            "adminfee": "0.04000000",
            "status": "Approved by admin"
        },
        {
            "created_at": "25-09-2023 13:27:34",
            "txid": "bdab0e8edb8c509178d",
            "from_addr": "0x3d5acbd6cdbfcd6d17e228a2e3d5de8b87e9671a",
            "to_addr": "0xa0adb1fea8c1ddf98f38b61b713d6c7bb70cbef1",
            "currency": "USDT",
            "amount": "0.08000000",
            "adminfee": "0.04000000",
            "status": "Rejected by admin"
        },
        {
            "created_at": "28-09-2023 10:44:13",
            "txid": "0c4cf3c07918659de782",
            "from_addr": "0x3d5acbd6cdbfcd6d17e228a2e3d5de8b87e9671a",
            "to_addr": "0xa0adb1fea8c1ddf98f38b61b713d6c7bb70cbef1",
            "currency": "USDT",
            "amount": "1.96000000",
            "adminfee": "0.04000000",
            "status": "Waiting for admin confirmation"
        }
    ],
    "message": "Withdraw History"
}
                                                

Buy Limit Trade

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST /trade/buy/limit

Parameter Description
coin_one ETH
Required: Yes
Type: string
Accept: UPPERCASE
coin_two USDT
Required: Yes
Type: string
Accept: UPPERCASE
buy_price 12
Required: Yes
Type: int
buy_volume 1
Required: Yes
Type: int

Response Example

                                                
{
    "success": true,
    "data": {
        "order_id": "ceb51c348e1ad118e7b7"
    },
    "message": "Post Trade Successful."
}
                                                

Sell Limit Trade

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST /trade/sell/limit

Parameter Description
coin_one ETH
Required: Yes
Type: string
Accept: UPPERCASE
coin_two USDT
Required: Yes
Type: string
Accept: UPPERCASE
sell_price 10
Required: Yes
Type: int
sell_volume 1
Required: Yes
Type: int

Response Example

                                                
{
    "success": true,
    "data": {
        "order_id": "6fb0b255ddc39b404829"
    },
    "message": "Post Trade Successful."
}
                                                

Buy Market Trade

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST /trade/buy/market

Parameter Description
coin_one ETH
Required: Yes
Type: string
Accept: UPPERCASE
coin_two USDT
Required: Yes
Type: string
Accept: UPPERCASE
buy_market_volume 10
Required: Yes
Type: int

Response Example

                                                
{
    "success": true,
    "data": {
        "order_id": "f2f3ffca5e9b274d92f3"
    },
    "message": "Post Trade Successful."
}
                                                

Sell Market Trade

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST /trade/sell/market

Parameter Description
coin_one ETH
Required: Yes
Type: string
Accept: UPPERCASE
coin_two USDT
Required: Yes
Type: string
Accept: UPPERCASE
sell_market_volume 10
Required: Yes
Type: int

Response Example

                                                
{
    "success": true,
    "data": {
        "order_id": "e1ce9885a8cf5ddc356e"
    },
    "message": "Post Trade Successful."
}
                                                

Stop Buy Limit

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST trade/buy/stop

Parameter Description
coin_one ETH
Required: Yes
Type: string
Accept: UPPERCASE
coin_two ZAR
Required: Yes
Type: string
Accept: UPPERCASE
stoplimit_buystopprice 1
Required: Yes
Type: int
stoplimit_buylimitprice 10
Required: Yes
Type: int
stoplimit_buyamount 1
Required: Yes
Type: int
stoplimit_buytotal 10
Required: Yes
Type: int

Response Example

                                                
                                            {
    "success": true,
    "data": {
        "order_id": "42d461bcb483f57875dd"
    },
    "message": "Post Trade Successful."
}
                                                

Stop Sell Limit

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST trade/sell/stop

Parameter Description
coin_one ETH
Required: Yes
Type: string
Accept: UPPERCASE
coin_two ZAR
Required: Yes
Type: string
Accept: UPPERCASE
stoplimit_sellstopprice 11
Required: Yes
Type: int
stoplimit_selllimitprice 10
Required: Yes
Type: int
stoplimit_sellamount 1
Required: Yes
Type: int
stoplimit_selltotal 10
Required: Yes
Type: int

Response Example

                                                
                                            {
    "success": true,
    "data": {
        "order_id": "42d461bcb483f57875dd"
    },
    "message": "Post Trade Successful."
}
                                                

Open Order History

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST /trade/openorder

Parameter Description
pair ETH_USDT
Required: No
Type: string
Accept: UPPERCASE
from_date 2023-09-23
Required: No
Type: Date (YYYY-mm-dd)
to_date 2023-09-30
Required: No
Type: Date (YYYY-mm-dd)
limit 10
Required: No
Type: int
offset 0
Required: No
Type: int
order_type limit
Required: No
Type: string
Accept: lowercase (limit,market,stoplimit)
type buy
Required: No
Type: string
Accept: lowercase (buy,sell)

Response Example

                                                
                                                {
    "success": true,
    "data": [
        {
            "type": "Buy",
            "date": "27-09-2023 10:18:16",
            "pair": "ETH/USDT",
            "order_type": "Limit",
            "price": "1627.5",
            "qty": "0.5690463",
            "remaining_qty": "0.5690463",
            "fee": "0.00000000",
            "total": "926.122853250",
            "status": "Pending",
            "order_id": "950157b1d7518c6ed283"
        },
        {
            "type": "Sell",
            "date": "28-09-2023 13:49:33",
            "pair": "ETH/USDT",
            "order_type": "Limit",
            "price": "1626.95",
            "qty": "0.6145658",
            "remaining_qty": "0.6145658",
            "fee": "0.00000000",
            "total": "999.86782831",
            "status": "Pending",
            "order_id": "91c361850be7e8c0f4f9"
        }
    ],
    "message": "Open Orders"
}
                                                

Trade Cancel

API endpoints require authentication [ Bearer token authentication received on login]

HTTP Request

POST /trade/cancel

Parameter Description
order_id 6dc99e678812f78a1afa
Required: Yes
Type: int
type sell
Required: Yes
Type: string
Accept: lowercase (buy,sell)

Response Example

                                                
{
    "success": true,
    "data": [],
    "message": "Pending order cancelled successfully!"
}