Ecoin Exchanger API

Trade API

To use this API, you need to create an API key. An API key can be created in your Profile in the API Credentials section. After creating an API key you’ll receive a key and a secret.API key information is used for authentication.

All server responses are received in the JSON format. Each request needs same credentials secret and key.

In the case of successful request, the response will be of the following type:

					{
					"message":'ABC error message',
					"messageType":'danger',
					"data":{}
				  }
				

Response in the case of error:

					{
					"message":'ABC message',
					"messageType":'success',
					"data":{}
				  }
				

In the case of error you may also receive a response not in the JSON format. It usually happens server limits are or in the case of unknown errors.

Method Market Pairs

This method provides all the information about active pairs, such as: the maximum price, the minimum price, average price, trade volume, trade volume in currency, the last trade, Buy and Sell price. All information is provided over the past 24 hours.

URL: https://ecoinexchanger.com/api/publicData

Sample response:

					{
						"btc_otx": {
							"lowRate": "0.00000000",
							"highRate": "0.00000000",
							"volume": "0.00",
							"volume_otx": "0.00000000",
							"price": "0.00000000",
							"buyPrice": "0.00000000",
							"sellPrice": "0.00000000",
							"updated": 0,
							"marketPairId": "0"
						}
					}
				

Method Create Order

The basic method that can be used for creating orders and trading on the exchange. To use this method you need an API Credentials privilege to trade.

URL: https://ecoinexchanger.com/api/SubmitOrder

Parameters:

Key Description Value Method
apiKey Get this from your account credentials settings hash GET
apiSecret Get this from your account credentials settings hash GET
data[marketPairId] Get this from market pairs API numerical POST
data[price] the rate/price at which you need to buy/sell numerical/decimal POST
data[quantity] the amount/quantity you need to buy / sell numerical/decimal POST

Sample response:

					{
						"message": "Order Submitted",
						"messageType": "success",
						"data": {
							"coinBalance": "0.0000000", // Coin balance
							"marketBalance": "0.0000000" // Market Balance
						}
					}
				

Method Cancel Order

This method can be used for deleting orders and trading on the exchange. To use this method you need an API Credentials privilege to do.

URL: https://ecoinexchanger.com/api/cancelTrade

Parameters:

Key Description Value Method
apiKey Get this from your account credentials settings hash GET
apiSecret Get this from your account credentials settings hash GET
orderId Get this from orders list API numerical GET

Method Get All Balances

This method can be used to view all coins balances included reserved balance for withdraw and trading. To use this method you need an API Credentials privilege to do.

URL: https://ecoinexchanger.com/api/myBalances

Parameters:

Key Description Value Method
apiKey Get this from your account credentials settings hash GET
apiSecret Get this from your account credentials settings hash GET

Sample response:

					{
						"data": [
							{
								"balance": "0.00000000",
								"balanceReserved": "0.00000000",
								"withdrawReserved": "0.00000000",
								"walletAddress": "xyz address"
							}
						],
						"message": "Balances available",
						"messageType": "success"
					}
				

Method Get All Orders

This method can be used to view all open and close/completed orders. To use this method you need an API Credentials privilege to do.

URL: https://ecoinexchanger.com/api/myOrders

Parameters:

Key Description Value Method
apiKey Get this from your account credentials settings hash GET
apiSecret Get this from your account credentials settings hash GET
marketPairId this parameters use to filter orders list integer GET
orderType this parameters use to filter orders list buy or sell GET
status this parameters required to view only compeleted/cancelled orders history GET

Sample response:

					{
						"data": [
							{
								"coinTicker": "IOST",
								"marketTicker": "BTC",
								"orderType": "sell or buy",
								"price": "0.00000000",
								"quantity": "0.00000000",
								"total": "0.00000000",
								"date": "0000-00-00 00:00:00",
								"close": ""
							}
						]
					}