Base URL

The base url is https://api.cryptexchange.io.

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": "[email protected]",
            "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": "Kucoin"
        },
        {
            "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."
}
                                                

Ticker Info

 

HTTP Request

GET /trade/tickerinfo

Parameter Description
pair ETH_BTC
Required: Yes
Type: string
Accept: UPPERCASE

Response Example

                                                
{
    "success": true,
    "data": {
        "Last_price": "12.0000",
        "24h_low": "0.0000",
        "24h_high": "0.0000",
        "24h_volume": "0.0000",
        "24h_change": "0.00",
        "quote_volume": "0.0000",
        "best_ask": "12.0000",
        "best_bid": "15.0000",
        "completed_trade_type": "Sell"
    },
    "message": "Ticker Info."
}
                                                

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

 

HTTP Request

GET /trade/history

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

Response Example

                                                
{
    "success": true,
    "data": {
        "trade_history": [
            {
                "date": "19-09-2023 07:48:53",
                "price": "12.00000000",
                "qty": "1.00000000",
                "order_type": "Sell"
            },
            {
                "date": "15-09-2023 13:28:45",
                "price": "12.00000000",
                "qty": "1.00000000",
                "order_type": "Sell"
            },
            {
                "date": "15-09-2023 13:28:38",
                "price": "15.00000000",
                "qty": "1.00000000",
                "order_type": "Buy"
            }
        ]
    },
    "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"
}
                                                

Deposit

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

HTTP Request

POST /account/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": "0x6d554c278bcbda19e99e870aaa0d085c44f4efd7",
        "address_url": "https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=0x6d554c278bcbda19e99e870aaa0d085c44f4efd7&choe=UTF-8"
    },
    "message": "Success"
}
                                                

Withdraw

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

HTTP Request

POST /account/withdraw

Parameter Description
coin 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
memo checkhello
Required: No
Type: string

Response Example

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

Deposit History

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

HTTP Request

POST /account/deposit/history

Parameter Description
coin 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
coin 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
timeinforce default is GTC
Required: No
Accepted string: GTC, IOC

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
timeinforce default is GTC
Required: No
Accepted string: GTC, IOC

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_total 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."
}
                                                

Buy Trade History

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

HTTP Request

POST /trade/buy/history

Parameter Description
pair ETH_USDT
Required: No
Type: string
Accept: UPPERCASE
order_type limit
Required: No
Type: string
Accept: limit,market
from_date 2023-09-25
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

Response Example

                                                
{
    "success": true,
    "data": [
        {
            "order_id": c6ed283950157b1d7518,
            "pair": "ETH/USDT",
            "order_type": "Market",
            "price": market,
            "qty": 1,
            "fee": 0,
            "total": 13,
            "remaining_qty": 0,
            "status": "Confirmed",
            "created_at": "25-09-2023 06:43:31"
        },
        {
            "order_id": 0157b1d7518c6ed28395,
            "pair": "ETH/USDT",
            "order_type": "Limit",
            "price": 10,
            "qty": 1,
            "fee": 0,
            "total": 10,
            "remaining_qty": 0,
            "status": "Confirmed",
            "created_at": "25-09-2023 06:43:08"
        },
        {
            "order_id": ed283950157b1d7518c6,
            "pair": "ETH/USDT",
            "order_type": "Market",
            "price": null,
            "qty": 1,
            "fee": 0,
            "total": 13,
            "remaining_aty": 0,
            "status": "Confirmed",
            "created_at": "25-09-2023 06:39:41"
        },
        {
            "order_id": 1d7518c6ed283950157b,
            "pair": "ETH/USDT",
            "order_type": "Limit",
            "price": 10,
            "qty": 1,
            "fee": 0,
            "total": 10,
            "remaining_qty": 0,
            "status": "Confirmed",
            "created_at": "25-09-2023 06:30:38"
        }
    ],
    "message": "Buy Trade history details"
}
                                                

Sell Trade History

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

HTTP Request

POST /trade/sell/history

Parameter Description
pair ETH_USDT
Required: No
Type: string
Accept: UPPERCASE
order_type limit
Required: No
Type: string
Accept: limit,market
from_date 2023-09-05
Required: No
Type: Date (YYYY-mm-dd)
to_date 2023-09-20
Required: No
Type: Date (YYYY-mm-dd)
limit 3
Required: No
Type: int
offset 0
Required: No
Type: int

Response Example

                                                
{
    "success": true,
    "data": [
        {
            "order_id": 83950157b1d7518c6ed2,
            "pair": "ETH/USDT",
            "order_type": "Market",
            "price": market,
            "qty": 1,
            "fee": 0,
            "total": 10,
            "remaining_qty": 0,
            "status": "Confirmed",
            "created_at": "20-09-2023 12:29:47"
        },
        {
            "order_id": 7518c6ed283950157b1d,
            "pair": "ETH/USDT",
            "order_type": "Limit",
            "price": 13,
            "qty": 1,
            "fee": 0,
            "total": 13,
            "remaining_qty": 0,
            "status": "Confirmed",
            "created_at": "20-09-2023 11:34:55"
        },
        {
            "order_id": 950157b1d7518c6ed283,
            "pair": "ETH/USDT",
            "order_type": "Limit",
            "price": 13,
            "qty": 1,
            "fee": 0,
            "total": 13,
            "remaining_qty": 0,
            "status": "Confirmed",
            "created_at": "20-09-2023 11:34:47"
        }
    ],
    "message": "Sell Trade history details"
}
                                                

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
order_type limit
Required: No
Type: string
Accept: limit,market
type buy
Required: No
Type: string
Accept: buy,sell
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

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
Accepted string: buy, sell

Response Example

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