The base url is - https://siteapi.safeinex.com/
The request URL needs to be determined by BASE and specific endpoint combination.
Each interface has its own endpoint, described by field HTTP REQUEST in the docs.
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
Use the Accept: application/json HTTP Header.
| key | value |
|---|---|
| secretkey | 6c842df7ce530227399b4a3a53f2615ddaaea0ca0d15d26c41d39402b536085b Required: Yes |
| Parameter | Description |
|---|---|
| api_key | pu_3dcb8f52ef347ad57060dae3d678a65f
Required: Yes |
Response Example
{
"success": true,
"data": {
"token": "7|GQLUoLlK2JnRDxt2xTCNimiLUcYrcEvdJGfu9opz",
"details": {
"fullname": "Tezza",
"email": "tezza@mailinator.com"
}
},
"message": "user login successfully"
}
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": "USDT",
"coin": "USDT",
"decimal": 8,
"network": "ERC20"
},
{
"coin_name": "Litecoin",
"coin": "LTC",
"decimal": 8,
"network": "LTC"
},
{
"coin_name": "TRY",
"coin": "TRY",
"decimal": 2,
"network": "TRY"
},
{
"coin_name": "SOL",
"coin": "SOL",
"decimal": 8,
"network": "SOL"
},
{
"coin_name": "BNB",
"coin": "BNB",
"decimal": 8,
"network": "BNB"
},
{
"coin_name": "MATIC",
"coin": "MATIC",
"decimal": 8,
"network": "MATIC"
},
{
"coin_name": "Ripple",
"coin": "XRP",
"decimal": 8,
"network": "XRP"
},
{
"coin_name": "Bitcoincash",
"coin": "BCH",
"decimal": 8,
"network": "BCH"
},
{
"coin_name": "UNISWAP",
"coin": "UNI",
"decimal": 8,
"network": "ERC20"
},
{
"coin_name": "Waltext",
"coin": "waltex",
"decimal": 8,
"network": "ERC20"
}
],
"message": "Coins list fetched successfully"
}
GET trade/pairs
| Parameter | Description |
|---|---|
| No params | -- |
Response Example
{
"success": true,
"data": [
{
"pair": "BTC_USDT",
"mini_buy_price": "0.01",
"maxi_buy_price": "1000000.00",
"mini_buy_amount": "0.00001",
"maxi_buy_amount": "9000.00000",
"mini_buy_total": "5.0000000",
"mini_sell_price": "0.01",
"maxi_sell_price": "1000000.00",
"mini_sell_amount": "0.00001",
"maxi_sell_amount": "9000.00000",
"mini_sell_total": "5.0000000",
"pair_type": "Binance"
},
{
"pair": "ETH_USDT",
"mini_buy_price": "0.01",
"maxi_buy_price": "1000000.00",
"mini_buy_amount": "0.0001",
"maxi_buy_amount": "9000.0000",
"mini_buy_total": "5.000000",
"mini_sell_price": "0.01",
"maxi_sell_price": "1000000.00",
"mini_sell_amount": "0.0001",
"maxi_sell_amount": "9000.0000",
"mini_sell_total": "5.000000",
"pair_type": "Binance"
},
{
"pair": "ETH_TRY",
"mini_buy_price": "0.01",
"maxi_buy_price": "9999.99",
"mini_buy_amount": "0.00000001",
"maxi_buy_amount": "99999.00000000",
"mini_buy_total": "0.0000000100",
"mini_sell_price": "0.01",
"maxi_sell_price": "9999.99",
"mini_sell_amount": "0.00000001",
"maxi_sell_amount": "999999.00000000",
"mini_sell_total": "0.0000000100",
"pair_type": "Normal"
},
{
"pair": "TRX_USDT",
"mini_buy_price": "0.01",
"maxi_buy_price": "9999.99",
"mini_buy_amount": "0.00000001",
"maxi_buy_amount": "99999.00000000",
"mini_buy_total": "0.0000000100",
"mini_sell_price": "0.01",
"maxi_sell_price": "9999.99",
"mini_sell_amount": "0.00000001",
"maxi_sell_amount": "99999.00000000",
"mini_sell_total": "0.0000000100",
"pair_type": "Normal"
},
{
"pair": "LTC_USDT",
"mini_buy_price": "0.01",
"maxi_buy_price": "9999.99",
"mini_buy_amount": "0.00000001",
"maxi_buy_amount": "99999.00000000",
"mini_buy_total": "0.0000000100",
"mini_sell_price": "0.01",
"maxi_sell_price": "9999.99",
"mini_sell_amount": "0.00000001",
"maxi_sell_amount": "99999.00000000",
"mini_sell_total": "0.0000000100",
"pair_type": "Normal"
},
{
"pair": "BNB_USDT",
"mini_buy_price": "0.01",
"maxi_buy_price": "9999.99",
"mini_buy_amount": "0.00000001",
"maxi_buy_amount": "99999.00000000",
"mini_buy_total": "0.0000000100",
"mini_sell_price": "0.01",
"maxi_sell_price": "9999.99",
"mini_sell_amount": "0.00000001",
"maxi_sell_amount": "99999.00000000",
"mini_sell_total": "0.0000000100",
"pair_type": "Normal"
},
{
"pair": "BTC_TRY",
"mini_buy_price": "1",
"maxi_buy_price": "19998638",
"mini_buy_amount": "0.00001",
"maxi_buy_amount": "4611.00000",
"mini_buy_total": "10.00000",
"mini_sell_price": "1",
"maxi_sell_price": "19998638",
"mini_sell_amount": "0.00001",
"maxi_sell_amount": "4611.00000",
"mini_sell_total": "10.00000",
"pair_type": "Binance"
}
],
"message": "Trade pair details."
}
API endpoints require authentication [ Bearer token authentication received on login]
POST account/assets
| Parameter | Description |
|---|---|
| No params | --- |
Response Example
{
"success": true,
"data": [
{
"coin": "BTC",
"wallet": {
"avbl_balance": "9.00000000",
"balance_in_trade": "0.00000000"
}
},
{
"coin": "ETH",
"wallet": {
"avbl_balance": "9.00000000",
"balance_in_trade": "0.00000000"
}
},
{
"coin": "TRX",
"wallet": {
"avbl_balance": "10.98000000",
"balance_in_trade": "0.00000000"
}
},
{
"coin": "USDT",
"wallet": {
"avbl_balance": "14.80000000",
"balance_in_trade": "0.00000000"
}
},
{
"coin": "LTC",
"wallet": {
"avbl_balance": "10.00000000",
"balance_in_trade": "0.00000000"
}
},
{
"coin": "TRY",
"wallet": {
"avbl_balance": "18.50000000",
"balance_in_trade": "0.00000000"
}
},
{
"coin": "SOL",
"wallet": {
"avbl_balance": "0.00000000",
"balance_in_trade": "0.00000000"
}
},
{
"coin": "BNB",
"wallet": {
"avbl_balance": "4.99937615",
"balance_in_trade": "0.00000000"
}
},
{
"coin": "MATIC",
"wallet": {
"avbl_balance": "0.00000000",
"balance_in_trade": "0.00000000"
}
},
{
"coin": "XRP",
"wallet": {
"avbl_balance": "0.00000000",
"balance_in_trade": "0.00000000"
}
},
{
"coin": "BCH",
"wallet": {
"avbl_balance": "0.00000000",
"balance_in_trade": "0.00000000"
}
},
{
"coin": "UNI",
"wallet": {
"avbl_balance": "0.00000000",
"balance_in_trade": "0.00000000"
}
},
{
"coin": "DIGI",
"wallet": {
"avbl_balance": "0.00000000",
"balance_in_trade": "0.00000000"
}
}
],
"message": "Assets list fetched successfully"
}
API endpoints require authentication [ Bearer token authentication received on login]
POST account/coin/deposit
| Parameter | Description |
|---|---|
| coin | ETH Required: Yes Type: string Accept: UPPERCASE |
| network | ETH Required: Yes Type: string Accept: UPPERCASE |
Response Example
{
"success": true,
"data": {
"coin": "ETH",
"address": "0x7a6bb617c9e43592e302aa196e88fcd3ae112fbc",
"address_url": "https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=0x7a6bb617c9e43592e302aa196e88fcd3ae112fbc"
},
"message": "Success"
}
API endpoints require authentication [ Bearer token authentication received on login]
POST account/coin/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 |
Response Example
{
"success": true,
"data": "[]",
"message": "Withdraw request sent successfully"
}
POST trade/buy/orderbook
| Parameter | Description |
|---|---|
| pair | TRX_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": "10.00000000",
"remaining_qty": "1.00000000"
}
]
},
"message": "Buy Order Book"
}
POST trade/sell/orderbook
| Parameter | Description |
|---|---|
| pair | TRX_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": "10.00000000",
"remaining_qty": "1.00000000"
}
]
},
"message": "Sell Order Book"
}
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": "29-03-2024 13:16:58",
"pair": "TRX/USDT",
"order_type": "Limit",
"price": "5.00000000",
"qty": "1.00000000",
"remaining_qty": "0.00000000",
"fee": "0.00000000",
"total": "5.00000000",
"status": "Completed",
"order_id": "abb5263badead798f72e"
},
{
"type": "sell",
"date": "28-03-2024 18:30:43",
"pair": "TRX/USDT",
"order_type": "Limit",
"price": "5.00000000",
"qty": "1.00000000",
"remaining_qty": "0.00000000",
"fee": "0.00000000",
"total": "5.00000000",
"status": "Completed",
"order_id": "e423dbac7cdd148da731"
},
{
"type": "buy",
"date": "28-03-2024 17:58:08",
"pair": "TRX/USDT",
"order_type": "Limit",
"price": "5.00000000",
"qty": "1.00000000",
"remaining_qty": "0.00000000",
"fee": "0.00000000",
"total": "5.00000000",
"status": "Completed",
"order_id": "98c3b53d9837af682d95"
}
],
"message": "Trade history"
}
API endpoints require authentication [ Bearer token authentication received on login]
POST trade/buy/limit
| Parameter | Description |
|---|---|
| coin_one | ETH Required: Yes Type: string Accept: UPPERCASE |
| coin_two | TRY 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."
}
API endpoints require authentication [ Bearer token authentication received on login]
POST trade/sell/limit
| Parameter | Description |
|---|---|
| coin_one | ETH Required: Yes Type: string Accept: UPPERCASE |
| coin_two | TRY 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."
}
API endpoints require authentication [ Bearer token authentication received on login]
POST trade/buy/market
| Parameter | Description |
|---|---|
| coin_one | ETH Required: Yes Type: string Accept: UPPERCASE |
| coin_two | TRY 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."
}
API endpoints require authentication [ Bearer token authentication received on login]
POST trade/sell/market
| Parameter | Description |
|---|---|
| coin_one | ETH Required: Yes Type: string Accept: UPPERCASE |
| coin_two | TRY 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."
}
API endpoints require authentication [ Bearer token authentication received on login]
POST trade/buy/stop
| Parameter | Description |
|---|---|
| coin_one | ETH Required: Yes Type: string Accept: UPPERCASE |
| coin_two | TRY 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."
}
API endpoints require authentication [ Bearer token authentication received on login]
POST trade/sell/stop
| Parameter | Description |
|---|---|
| coin_one | ETH Required: Yes Type: string Accept: UPPERCASE |
| coin_two | TRY 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 | 1 Required: Yes Type: int |
Response Example
{
"success": true,
"data": {
"order_id": "8081345728a545f00337"
},
"message": "Post Trade Successful."
}
API endpoints require authentication [ Bearer token authentication received on login]
POST trade/sell/stoploss
| Parameter | Description |
|---|---|
| coin_one | ETH Required: Yes Type: string Accept: UPPERCASE |
| coin_two | TRY Required: Yes Type: string Accept: UPPERCASE |
| stoploss_sellstopprice | 13 Required: Yes Type: int |
| stoploss_sellamount | 1 Required: Yes Type: int |
Response Example
{
"success": true,
"data": {
"order_id": "cf3fc8a95090b080022e"
},
"message": "Post Trade Successful"
}
API endpoints require authentication [ Bearer token authentication received on login]
POST trade/openorder
| Parameter | Description |
|---|---|
| coin_one | MANA Required: Yes Type: String Accept: UPPERCASE |
| coin_two | USDT Required: Yes Type: string Accept: UPPERCASE |
Response Example
{
"success": true,
"data": [
{
"type": "Buy",
"date": "27-Sep-2023 11:12:40",
"pair": "MANA/USDT",
"order_type": "Limit",
"price": "10.00000000",
"stop_price": "0.00000000",
"qty": "1.00000000",
"remaining_qty": "1.00000000",
"fee": "0.00000000",
"total": "10.00000000",
"status": "Pending",
"order_id": "cc5557e6e7cec120ccc3"
}
],
"message": "Open Orders"
}
API endpoints require authentication [ Bearer token authentication received on login]
POST trade/cancel
| Parameter | Description |
|---|---|
| order_id | 6dc99e678812f78a1afa Required: Yes Type: Alpha Numeric |
| type | sell Required: Yes Type: string Accepted string: buy, sell |
Response Example
{
"success": true,
"data": [],
"message": "Pending order cancelled successfully!"
}
API endpoints require authentication [ Bearer token authentication received on login]
POST account/deposit/history
| Parameter | Description |
|---|---|
| symbol | ETH Required: Yes Type: string Accept: UPPERCASE |
| limit | 10 Required: Yes Type: int |
| offset | 0 Required: Yes Type: int |
Response Example
{
"success": true,
"data": [
{
"txid": "d724e3129ac176daa5817797390f31ec4ee91c7d6b87278d48568eabdca5",
"currency": "ETH",
"txtype": "deposit",
"from_addr": "admindeposit",
"to_addr": "0x6d554c278bcbda19e99e870aaa0d085c44f4efd7",
"amount": 100,
"totalamount": 0,
"status": "Approved",
"created_at": "24-08-2023 12:08:29"
}
],
"message": "Deposit history"
}
API endpoints require authentication [ Bearer token authentication received on login]
POST account/withdraw/history
| Parameter | Description |
|---|---|
| symbol | ETH Required: Yes Type: string Accept: UPPERCASE |
| limit | 10 Required: Yes Type: int |
| offset | 0 Required: Yes Type: int |
Response Example
{
"success": true,
"data": [
{
"created_at": "20-Sep-2023 13:49:51",
"txid": "59ef1abfe4fe79c5dd314be55d5ab97fd59959c554fe304582d4454a204a",
"currency": "TRY",
"type": "withdraw",
"amount": 50,
"totalamount": 50,
"account_name": "ajith",
"account_no": "123456",
"bank_name": "asfdasf",
"bank_address": "asdfsaf",
"status": "Waiting for admin confirmation"
},
{
"created_at": "20-Sep-2023 13:27:34",
"txid": "bdab0e8edb8c509178d826f38a1408ad96acac9c7ca87b2f620e4f354c3f",
"currency": "TRY",
"type": "withdraw",
"amount": 50,
"totalamount": 50,
"account_name": "ajith",
"account_no": "123456",
"bank_name": "asfdasf",
"bank_address": "asdfsaf",
"status": "Waiting for admin confirmation"
},
{
"created_at": "22-Aug-2023 10:16:11",
"txid": "3a076adf2e23409588b9b27bfc71355ea6b1803e6f47121c1e0f3e055c1f",
"currency": "TRY",
"type": "withdraw",
"amount": 1,
"totalamount": 1,
"account_name": "ajith",
"account_no": "12313",
"bank_name": "njsdn",
"bank_address": "skjds",
"status": "Waiting for admin confirmation"
}
],
"message": "Withdraw History"
}
Are you sure you want to logout?