Coineal-Api

API Host

Method:POST

URL:https://exchange-open-api.coineal.com

Details:

All the APIs are accessed through this domain

Api Signature

Method:GET

URL:/

Details:

# # 1) Signing: 

The request parameters are sorted in ascending alphabetical order, then concatenated into a string in the form of a keyvalue, and finally sign=MD5(string+secretKey).
**Note: If the value of the request parameter is NULL, the signature string is not counted when splicing the string.
**Note that the following parameters are just examples of signatures. When signing, please modify the corresponding interface request parameters.

For example, to get an order information interface:
apikey: 1aff616430188fed2e2c03d33e1e38e1
secretkey: 787bea3c3a882ac79e62cbd81b31d67c
The parameters would be:
{
  "order_id": 192554,
  "symbol": "eosusdt",
  "api_key": "1aff616430188fed2e2c03d33e1e38e1",
  "time": "1555250036528"
}
After splicing:
string = api_key1aff616430188fed2e2c03d33e1e38e1order_id192554symboleosusdttime1555250036528787bea3c3a882ac79e62cbd81b31d67c

Signing by MD5
sign=MD5(string+secretKey)

Signing Result:
368eb0949db4b764134d4aa68a5d7140

Get 24H Market Information

Method:GET

URL:/open/api/get_ticker

Query Params Type Require Description e.g.
symbol string Yes Trading Pair btcusdt

Details:

Get 24H Market Information

Simple:

                                {
    "code": "0",
    "msg": "suc",
    "data": {
        "high": 6796.63,
        "vol": 2364.85442742,
        "last": 6722.37,
        "low": 6399.28,
        "buy": "6721.56",
        "sell": "6747.47",
        "time": 1529406706715
    }
}
                            
Parameter Description Type
code Status code, with 0 for successful, please refer to the status code table for more information number
data.low 24H Lowest Price float
data.buy Current Bid 1 Price float
data.high 24H Highest Price float
data.vol 24H Trading Volume float
data.last Quotes float
data.sell Current Ask 1 Price float
data.time Time Stamp of the System Refresh datetime

Get Market Chart Information

Method:GET

URL:/open/api/get_records

Query Params Type Require Description e.g.
symbol string Yes Trading Pair btcusdt
period string Yes 1 for a min, 1440 for a day 1

Details:

Get the Market Chart Information,   300 Line Data Only

Simple:

                                {
    'code': '0', 
    'msg': 'suc',
    'data': [
                [
                    1529387760,  //Time Stamp
                    7585.41,  //Opening Price
                    7585.41,  //Highest Price
                    7585.41,  //Lowest Price
                    7585.41,  //Closing Price
                    0.0       //Transaction Volume
                ]
            ]
    
}
                            
Parameter Description Type
code Status code, with 0 for successful, please refer to the status code table for more information string
msg Error Message string
data K-Line List array

Get Market Depth

Method:GET

URL:/open/api/market_dept

Query Params Type Require Description e.g.
symbol string Yes Trading Pair btcusdt
type string Yes Depth Type,step0, step1, step2(Precision level 0-2);step0 for highest precision,usually each they are 1, 10 times and 100 times of the Minimum unit of Precision step0, step1, step2

Details:

Get Market Depth of a Trading Pair

Simple:

                                {
    "code": "0",
    "msg": "suc", 
    "data": {
        "tick": {
            "time": 1529408112000,  //Refresh time of depth
            "asks": //Ask orders
            [
                [
                    "6753.31", //Price of Ask 1
                    0.00306    //Order Size of Ask 1
                ],
                [
                    "6754.78", //Price of Ask 2
                    0.61112   //Order Size of Ask 2
                ]
                ...
            ],
            "bids": //Ask orders
            [
                [
                    "6732.02",  //Price of Bid 1
                    0.18444     //Order Size of Bid 1
                ],
                [
                    "6730.08", //Price of Bid 2
                    0.14662    //Order Size of Bid 2
                ]
                ...
            ]
            
        }


                            
Parameter Description Type
code Status code, with 0 for successful, please refer to the status code table for more information string
msg Error Message string
data Return Data string
data.tick Depth Data string
data.tick.time Depth Refresh Time string
data.tick.asks Ask Orders string
data.tick.bids Bid Orders string

Get the Trading Pair Quotes

Method:GET

URL:/open/api/market

Query Params Type Require Description e.g.
api_key string Yes The Applied ApiKey created in API Management Page
time string Yes Unix Timestamp
sign string Yes Request parameter signature string, please check the signature rules.

Details:

Get the Trading Pair Quotes

Simple:

                                {
    "code": "0",
    "msg": "suc",
    "data": {
        "btcusdt": 15000,
        "ethusdt": 800
    }
}
                            
Parameter Description Type
code Status code, with 0 for successful, please refer to the status code table for more information string
msg Error Message string
data Return Data of the lowest transaction price of each trading pair string
data.ethusdt ethusdt quotes number
data.btcusdt btcusdt quotes number

Get Market Trading Record

Method:GET

URL:/open/api/get_trades

Query Params Type Require Description e.g.
symbol string Yes Trading Pair btcusdt

Details:

Get the Trading Records of the Trading Pair

Simple:

                                {
    "code": "0",
    "msg": "suc",
    "data": [
        {
            "amount": 0.99583,
            "trade_time": 1529408112000,
            "price": 6763.9,
            "id": 280101,
            "type": "sell"
        }
    ]
}
                            
Parameter Description Type
code Status code, with 0 for successful, please refer to the status code table for more information string
data.amount Transaction Volume number
data.trade_time Transaction Time Stamp number
data.price Transaction Price number
data.id Transaction id number
data.type Transaction type, buy and sell string
string

Trading Pairs and Precision

Method:GET

URL:/open/api/common/symbols

Details:

Request the precision of all the trading pairs.

Simple:

                                {
    "code": "0",
    "msg": "suc",
    "data": [
        {
            "symbol": "btcusdt",
            "count_coin": "usdt",
            "amount_precision": 5,
            "base_coin": "btc",
            "price_precision": 2
        }
    ]
}
                            
Parameter Description Type
code Status code, with 0 for successful, please refer to the status code table for more information number
msg Message string
data Data Objective array
data.symbol Trading Pairs string
data.count_coin The Pricing Coin string
data.amount_precision Trading Volume Precision number
data.base_coin Coin string
data.price_precision Price precision number

Create Orders

Method:POST

URL:/open/api/create_order

Header Params Type Require Description e.g.
Content-Type string Yes This parameter is for POST Request application/x-www-form-urlencoded
Body Params Type Require Description e.g.
time string Yes Unix Timestamp
side string Yes Order Direction: Buy or Sell
type string Yes Order type: 1: Limit Orders, 2. Market Price Orders
price string Yes Order price (this parameter is not required when type=2). Note: Please set the order price according to the price precision.
volume string Yes type=1:Order Size; type=2: Means total value for a buy order, and total amount for a sell order
symbol string Yes Trading Pair btcusdt
api_key string Yes The Applied ApiKey created in API Management Page
sign string Yes Request parameter signature string, please check the signature rules.

Details:

application/x-www-form-urlencoded

Simple:

                                {
    "code": "0",
    "msg": "suc",
    "data": {
        "order_id": 34343
    }
}
                            
Parameter Description Type
code Status code, with 0 for successful, please refer to the status code table for more information string
msg Error Message string
data Return Data string
data.order_id Order ID number

Cancel Limit Orders

Method:POST

URL:/open/api/cancel_order

Header Params Type Require Description e.g.
Content-Type string Yes This parameter is for POST Request application/x-www-form-urlencoded
Body Params Type Require Description e.g.
order_id string Yes Order Number
symbol string Yes Trading Pair btcusdt
api_key string Yes The Applied ApiKey created in API Management Page
time string Yes Unix Timestamp
sign string Yes Request parameter signature string, please check the signature rules.

Details:

Cancel the Order

Simple:

                                {
    "code": "0",
    "msg": "suc",
    "data": {}
}
                            
Parameter Description Type
code Status code, with 0 for successful, please refer to the status code table for more information string
msg Error Message string
data string

Get Current Orders

Method:GET

URL:/open/api/new_order

Query Params Type Require Description e.g.
symbol string Yes Trading Pair btcusdt
api_key string Yes The Applied ApiKey created in API Management Page
time string Yes Unix Timestamp
page string No Page 1
pageSize string No Size of Page 20
sign string Yes Request parameter signature string, please check the signature rules.

Details:

Order Status Code Table:


0、Historical Order Unsuccessful

1、New order Unsuccessful

2、Order Completely Filled

3、Order Partly Filled

4、Order Cancelled

5、Order Cancelling

6、Abnormal Orders

Simple:

                                {
    "code": "0",
    "msg": "suc",
    "data": {
        "count": 10,
        "resultList": [
            {
                "side": "BUY",
                "total_price": "0.10000000",
                "created_at": 1510993841000,
                "avg_price": "0.10000000",
                "countCoin": "btc",
                "source": 1,
                "type": 1,
                "side_msg": "买入",
                "volume": "1.000",
                "price": "0.10000000",
                "source_msg": "WEB",
                "status_msg": "部分成交",
                "deal_volume": "0.50000000",
                "id": 424,
                "remain_volume": "0.00000000",
                "baseCoin": "eth",
                "tradeList": [
                    {
                        "volume": "0.500",
                        "price": "0.10000000",
                        "fee": "0.16431104",
                        "ctime": 1510996571195,
                        "deal_price": "0.10000000",
                        "id": 306,
                        "type": "买入"
                    }
                ],
                "status": 3
            },
            {
                "side": "SELL",
                "total_price": "0.10000000",
                "created_at": 1510993841000,
                "avg_price": "0.10000000",
                "countCoin": "btc",
                "source": 1,
                "type": 1,
                "side_msg": "买入",
                "volume": "1.000",
                "price": "0.10000000",
                "source_msg": "WEB",
                "status_msg": "未成交",
                "deal_volume": "0.00000000",
                "id": 425,
                "remain_volume": "0.00000000",
                "baseCoin": "eth",
                "tradeList": [],
                "status": 1
            }
        ]
    }
}
                            
Parameter Description Type
data.resultList.side Order Type, Buy or Sell string
data.resultList Order List array
data.resultList.total_price Total Order Value string
data.resultList.created_at Order Created Time number
data.resultList.avg_price Average Transaction Price string
data.resultList.countCoin Pricing Coin string
data.resultList.type Order type, 1 for limit order and 2 for market order number
data.resultList.volume Order size string
data.resultList.price Order Price string
data.resultList.source_msg Source of the Order string
data.resultList.deal_volume Transaction Volume string
data.resultList.id Order ID number
data.resultList.remain_volume Remaining Volume of the Order string
data.resultList.baseCoin Coin string
data.resultList.tradeList Transaction History array
data.resultList.tradeList.volume Transaction Volume string
data.resultList.tradeList.price Transaction Price string
data.resultList.tradeList.fee Trading Fee string
data.resultList.tradeList.ctime Transaction Time number
data.resultList.tradeList.deal_price Deal Price string
data.resultList.tradeList.id Trasaction ID number
data.resultList.status Order Status number

Order Details

Method:GET

URL:/open/api/order_info

Query Params Type Require Description e.g.
symbol string Yes Trading Pair btcusdt
order_id string Yes Order Number
api_key string Yes The Applied ApiKey created in API Management Page
time string Yes Unix Timestamp
sign string Yes Request parameter signature string, please check the signature rules.

Details:

Order Status Code Table:


0、Historical Order Unsuccessful

1、New order Unsuccessful

2、Order Completely Filled

3、Order Partly Filled

4、Order Cancelled

5、Order Cancelling

6、Abnormal Orders

Simple:

                                {
    "code": "0",
    "msg": "suc",
    "data": {
        "order_info": {
            "side": "BUY",
            "total_price": "0.10000000",
            "created_at": 1510993841000,
            "avg_price": "0.10000000",
            "countCoin": "btc",
            "source": 1,
            "type": 1,
            "side_msg": "买入",
            "volume": "1.000",
            "price": "0.10000000",
            "source_msg": "WEB",
            "status_msg": "完全成交",
            "deal_volume": "1.00000000",
            "id": 424,
            "remain_volume": "0.00000000",
            "baseCoin": "eth",
            "tradeList": [
                {
                    "volume": "1.000",
                    "price": "0.10000000",
                    "fee": "0.16431104",
                    "ctime": 1510996571195,
                    "deal_price": "0.10000000",
                    "id": 306,
                    "type": "买入"
                }
            ],
            "status": 2
        }
    }
}
                            
Parameter Description Type
data.order_info.side Order Direction, Buy or Sell string
data.order_info.total_price Status code, with 0 for successful, please refer to the status code table for more information string
data.order_info.created_at Order Created Time number
data.order_info.avg_price Average Transaction Price string
data.order_info.countCoin Pricing Coin string
data.order_info.source Source number
data.order_info.type Order Type, 1 for limit order and 2 for market order number
data.order_info.volume Order Size string
data.order_info.price Order Price string
data.order_info.source_msg Source of the Order string
data.order_info.status_msg Order Status string
data.order_info.deal_volume Transaction Volume string
data.order_info.id Order ID number
data.order_info.remain_volume Remaining Volume of the Order string
data.order_info.baseCoin Coin string
data.order_info.tradeList Transaction History array
data.order_info.tradeList.volume Trading Volume string
data.order_info.tradeList.price Transaction Price string
data.order_info.tradeList.fee Transaction Fee string
data.order_info.tradeList.ctime Transaction Time number
data.order_info.tradeList.deal_price Transaction Volume string
data.order_info.tradeList.type Order Type string
code Status code, with 0 for successful, please refer to the status code table for more information string
msg Error Message string

Account Transaction Records

Method:GET

URL:/open/api/all_trade

Query Params Type Require Description e.g.
symbol string Yes Trading Pair btcusdt
api_key string Yes The Applied ApiKey created in API Management Page
time string Yes Unix Timestamp
page string No Page, start with 1 1
pageSize string No Size of page 20
sign string Yes Request parameter signature string, please check the signature rules.

Simple:

                                {
    "code": "0",
    "msg": "suc",
    "data": {
        "count": 22,
        "resultList": [
            {
                "volume": "1.000",
                "side": "BUY",
                "price": "0.10000000",
                "fee": "0.16431104",
                "ctime": 1510996571195,
                "deal_price": "0.10000000",
                "id": 306,
                "type": "买入"
            }
        ]
    }
}
                            
Parameter Description Type
code Status Code,0表示成功,其他请查看Status Code列表 string
data.resultList.volume 成交量 string
data.resultList.side 买卖方向 string
data.resultList.price 成交价格 string
data.resultList.fee 手续费 string
data.resultList.ctime 创建时间 number
data.resultList.deal_price 成交额 string

Account Balances

Method:GET

URL:/open/api/user/account

Query Params Type Require Description e.g.
api_key string Yes The Applied ApiKey created in API Management Page
time string Yes Unix Timestamp
sign string Yes Request parameter signature string, please check the signature rules.

Simple:

                                {
    "code": "0",
    "msg": "suc",
    "data": {
        "total_asset": 432323.23,
        "coin_list": [
            {
                "coin": "btc",
                "normal": 32323.233,
                "locked": 32323.233,
                "btcValuatin": 112.33
            }
        ]
    }
}
                            
Parameter Description Type
data.total_asset Total Balance number
data.coin_list Balance of each Coin/Token array
data.coin_list.coin Coin/Token string
data.coin_list.normal Coin/Token Available number
data.coin_list.locked Locked Coin/Token number
data.coin_list.btcValuatin Coin/Token BTC Value number
code Status Code, 0 for successful, please refer to status code table for more information string
msg Error message string

Appendix

Api Host

Name Value
host https://exchange-open-api.coineal.com/open/api

Status Code

Status Code Description
0 Successful
5 Order failed
6 Exceed the minimum volume requirement
7 Exceed the maximum volume requirement
8 Order cancellation failed
9 The transaction is frozen
13 Sorry, the program has a system error, please contact the webmaster
19 Insufficient balance available
22 Order does not exist
23 Missing transaction quantity parameter
24 Missing transaction price parameter
100001 System error
100002 System upgrade
100004 Parameter request is invalid
100005 Parameter signature error
100007 Unathorized IP
110002 Unknown currency code
110003 Withdrawal password error
110004 Withdrawal is frozen
110005 Insufficient balance available
110020 Username does not exist
110023 This phone number is already registered
110024 This email is already registered
110025 Account locked by background administrator
110032 This user is not athorized to do this
110033 Deposit failed
110034 Withdrawal failed
Top