ECOIN NEWS   
Pakistan’s Government On Cash War: Perfect Timing For Bitcoin!
Pakistan’s Senate has come to the senses of the scrapping of the highest value banknote while at the exact and the very same time Pakistan’s Bitcoin trading volume has marked up by almost 400%. ... read more
Mexico: Cancun-Based Group Promotes The Bitcoin!
Recently, you cannot go that far together with Bitcoin right in Mexico! But on the other hand, a Cancun-based group in which is the Bitcunner is working to be able enough to change that view and by ... read more



BTC/USD USD
LTC/USD USD
Last Price: Daily Change: Day's Range: 24 Hour turnover:
933.944 USD 29.967 USD 909.533 USD 939.500 USD 986922.047 USD

eCoin Application Program Interface (API) v.1

eCoin API is designed to obtain a variety of information and use it at third-party resources.

Main information

The system supports 3 formats of the query result:

To obtain information in formats other than JSON, you must add the parameter ?type=[format] to the query, for example, ?type=XML.

API result always contains four parameters:
  1. resultCode – query code. Possible values ​​are: 1 - success, 0 - an error has occurred;
  2. result – query result. Can comprise text or nested fields, depending on the query;
  3. errorCode – error code. A value of 0 means that there are no errors;
  4. errorMessage – error description if an error occurred.

Receiving the rate of the digital currency

Query:
https://www.ecoin.eu/api/rate/get/{ btc_usd | ltc_usd }
Sample query:
Sample response in JSON format:
{"response":{"resultCode":1,"result":"510.00","errorCode":0,"errorMessage":null}}

The list of active orders to buy

Query:
https://www.ecoin.eu/api/deals/active/buy/{ btc | ltc }
Sample query:
Sample response in JSON format:
{"response":{"resultCode":1,"result":[{"price":"510.00","amount":"0.20000","sum":"102.00","added":"2014-10-01 05:34"},{"price":"500.00","amount":"0.10000","sum":"50.00","added":"2014-10-01 16:00"}],"errorCode":0,"errorMessage":null}}
Additional parameter limit is available for this request. Possible values are 10, 30. For example,

The list of active orders to sell

Query:
https://www.ecoin.eu/api/deals/active/sell/{ btc | ltc }
Sample query:
Sample response in JSON format:
{"response":{"resultCode":1,"result":[{"price":"610.00","amount":"1.00000","sum":"610.00","added":"2014-10-01 06:34"},{"price":"600.00","amount":"0.10000","sum":"60.00","added":"2014-10-01 17:00"}],"errorCode":0,"errorMessage":null}}
Additional parameter limit is available for this request. Possible values are 10, 30. For example,

The sum of active orders to buy

Query:
https://www.ecoin.eu/api/deals/activeSum/buy/{ btc | ltc }
Sample query:
Sample response in JSON format:
{"response":{"resultCode":1,"result":{"sum":"152.00","currency":"USD"},"errorCode":0,"errorMessage":null}}

The sum of active orders to sell

Query:
https://www.ecoin.eu/api/deals/activeSum/sell/{ btc | ltc }
Sample query:
Sample response in JSON format:
{"response":{"resultCode":1,"result":{"sum":"1.10000","currency":"BTC"},"errorCode":0,"errorMessage":null}}

eCoin API with authorization

Key information

The request form changes in this API; the response format is the same as that of the public API.

POST parameters should always be transferred at request in this API, such as:

Get the current balance

URL:
https://www.ecoin.eu/api/account/getBalance
POST parameters:
  • uid
  • key
  • currency - possible values are "btc", "ltc", "usd"
  • hash - order of the fields {uid}:{key}:{currency}:{secret key}
Sample response in JSON format:
{"response":{"resultCode":1,"result":{"sum":"7.03660","currency":"btc"},"errorCode":0,"errorMessage":null}}

Register a new order

URL:
https://www.ecoin.eu/api/deals/new
POST parameters:
  • uid
  • key
  • type - "buy" or "sell" type of operation
  • currency - possible values are "btc", "ltc", "usd"
  • amount - number of coins, for example 1.23
  • price - price of one coin in USD, for example 432.10
  • hash - order of the fields {uid}:{key}:{type}:{currency}:{amount}:{price}:{secret key}
Sample response in JSON format:
{"response":{"resultCode":1,"result":{"id":"ace11343032323","processed":"0.00000"},"errorCode":0,"errorMessage":null}}
Make sure you saved id, knowing which you can get information about the order or cancel it.

Get information about a certain order

URL:
https://www.ecoin.eu/api/deals/get
POST parameters:
  • uid
  • key
  • id - ID that you received when registering a new order
  • hash - order of the fields {uid}:{key}:{id}:{secret key}
Sample response in JSON format:
{"response":{"resultCode":1,"result":{"id":"ace11343032323","type":"sell","price":"432.10","amount":"1.23000","currency":"btc","sum":"531.48","amount_processed":"0.00000","added":"2014-10-01 01:02","status":"active"},"errorCode":0,"errorMessage":null}}

List of your active orders

URL:
https://www.ecoin.eu/api/deals/listActive
POST parameters:
  • uid
  • key
  • hash - order of the fields {uid}:{key}:{secret key}
Sample response in JSON format:
{"response":{"resultCode":1,"result":[{"id":"ace11343032323","type":"sell","price":"432.10","amount":"1.23000","currency":"btc","sum":"531.48","amount_processed":"0.00000","added":"2014-10-01 01:02"},{"id":"8ca91343031363","type":"sell","price":"210.00","amount":"0.10000","currency":"btc","sum":"21.00","amount_processed":"0.00000","added":"2014-10-03 06:36"},{"id":"8ca61343031353","type":"buy","price":"200.00","amount":"0.20000","currency":"btc","sum":"40.00","amount_processed":"0.02300","added":"2014-10-03 06:34"}],"errorCode":0,"errorMessage":null}}

Cancel the order

URL:
https://www.ecoin.eu/api/deals/cancel
POST parameters:
  • uid
  • key
  • id - ID that you received when registering a new order
  • hash - order of the fields {uid}:{key}:{id}:{secret key}
Sample response in JSON format:
{"response":{"resultCode":1,"result":[],"errorCode":0,"errorMessage":null}}

List of active vouchers

URL:
https://www.ecoin.eu/api/vouchers/active
POST parameters:
  • uid
  • key
  • hash - order of the fields {uid}:{key}:{secret key}
Sample response in JSON format:
{"response":{"resultCode":1,"result":[{"voucher":"ECO\/1\/GHUYP2WLR280K4WOW","date":"2014-12-17 14:09:28","sum":"1.00","protection_code":false}],"errorCode":0,"errorMessage":null}}

List of used vouchers

URL:
https://www.ecoin.eu/api/vouchers/used
POST parameters:
  • uid
  • key
  • hash - order of the fields {uid}:{key}:{secret key}
Sample response in JSON format:
{"response":{"resultCode":1,"result":[{"voucher":"ECO\/1\/H29J7CQWDM0OK88OK","date":"2014-12-16 12:20:28","sum":"1.00","protection_code":true,"used":"2014-12-17 13:45:24"},],"errorCode":0,"errorMessage":null}}

Redeem voucher

URL:
https://www.ecoin.eu/api/vouchers/redeem
POST parameters:
  • uid
  • key
  • code
  • protection_code optional field
  • hash - order of the fields {uid}:{key}:{code}:{secret key} or {uid}:{key}:{code}:{protection_code}:{secret key}
Sample response in JSON format:
{"response":{"resultCode":1,"result":"redeemed","errorCode":0,"errorMessage":null}}

Generate a voucher

URL:
https://www.ecoin.eu/api/vouchers/create
POST parameters:
  • uid
  • key
  • amount
  • quantity
  • protection_code optional field
  • hash - order of the fields {uid}:{key}:{amount}:{quantity}:{secret key} or {uid}:{key}:{amount}:{quantity}:{protection_code}:{secret key}
Sample response in JSON format:
{"response":{"resultCode":1,"result":[{"voucher":"ECO\/1.50\/AN8Z0R4P5UOKSSSSW","date":"2014-12-17 14:51:58","sum":"1.50"}],"errorCode":0,"errorMessage":null}}
partner list