ECOIN NEWS   
The Bitcoin Advantages over the Traditional Investment
The traditional investors have always loomed and approached the digital currencies like the Bitcoin with an additional precaution due to their highly volatile market worth and value. On the other ... read more
Coffee And Blockchain: Stellar And Bext360
A technology firm is utilizing the Stellar’s Blockchain network to probably provide a fair coffee sales technology from its grower all the way to its consumer. Bext360 which is a Denver-based ... read more



BTC/USD USD
LTC/USD USD
Viimane hind: Muutus päeva eest: Vahemik päeva eest: Käive 24 tunni eest:
2172.046 USD 171.388 USD 2059.259 USD 2230.647 USD 883673.779 USD

eCoin Application Program Interface (API) v.2

eCoin API is designed to obtain a variety of information and use it at third-party resources.
API v.1 you can find here.

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/v2/rate/get/{ btc_usd | btc_eur | ltc_usd | ltc_eur }
Sample query:
Sample response in JSON format:
{"response":{"resultCode":1,"result":"510.00","errorCode":0,"errorMessage":null}}

The list of active orders

Query:
https://www.ecoin.eu/api/v2/orders/active/{buy | sell | all}/{ btc_usd | btc_eur | ltc_usd | ltc_eur }
Sample query:
Sample response in JSON format:
{"response":{"resultCode":1,"result":[{"price":"510.00","price_currency":"USD","amount":"0.20000","sum":"102.00","added":"2014-10-01 05:34"},{"price":"500.00","price_currency":"USD","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 sum of active orders

Query:
https://www.ecoin.eu/api/v2/orders/activeSum/{buy | sell }/{ btc_usd | btc_eur | ltc_usd | ltc_eur }
Sample query:
Sample response in JSON format:
{"response":{"resultCode":1,"result":{"sum":"152.00","currency":"USD"},"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/v2/account/getBalance
POST parameters:
  • uid
  • key
  • currency - possible values are btc, ltc, usd, eur
  • hash - order of the fields {uid}:{key}:{currency}:{secret key}
Sample response in JSON format:
{"response":{"resultCode":1,"result":{"sum":"7.03660","in_orders":"0.00000","currency":"btc"},"errorCode":0,"errorMessage":null}}

Register a new order

URL:
https://www.ecoin.eu/api/v2/orders/new
POST parameters:
  • uid
  • key
  • type - "buy" or "sell" type of operation
  • pair - possible values are btc_usd, btc_eur, ltc_usd, ltc_eur
  • amount - number of coins, for example 1.23456
  • price - price of one coin in USD, for example 432.10
  • hash - order of the fields {uid}:{key}:{type}:{pair}:{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/v2/orders/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","price_currency":"USD","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/v2/orders/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","price_currency":"USD","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","price_currency":"USD","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/v2/orders/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}}

Deal History

URL:
https://www.ecoin.eu/api/v2/orders/history
POST parameters:
  • uid
  • key
  • pair - possible values are btc_usd, btc_eur, ltc_usd, ltc_eur
  • limit - Limit of records, should be a number between 1 and 500
  • hash - order of the fields {uid}:{key}:{pair}:{limit}:{secret key}
Sample response in JSON format:
{"response":{"resultCode":1,"result":[{"type":"sell","amount":"0.10","price":"312.34","sum":"31.23","datetime":"2014-10-01 01:02"}],"errorCode":0,"errorMessage":null}}

List of active vouchers

URL:
https://www.ecoin.eu/api/v2/vouchers/active
POST parameters:
  • uid
  • key
  • currency - possible values are usd, eur
  • hash - order of the fields {uid}:{key}:{currency}:{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/v2/vouchers/used
POST parameters:
  • uid
  • key
  • currency - possible values are usd, eur
  • hash - order of the fields {uid}:{key}:{currency}:{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/v2/vouchers/redeem
POST parameters:
  • uid
  • key
  • currency - possible values are usd, eur
  • code
  • protection_code optional field
  • hash - order of the fields {uid}:{key}:{currency}:{code}:{secret key} or {uid}:{key}:{currency}:{code}:{protection_code}:{secret key}
Sample response in JSON format:
{"response":{"resultCode":1,"result":{"sum":"10.00","currency":"EUR"},"errorCode":0,"errorMessage":null}}

Generate a voucher

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