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 ... 阅读更多
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 ... 阅读更多



BTC/USD USD
LTC/USD USD
最新价格: 每日变化: 一天范围: 24小时营业:
2173.441 USD 171.388 USD 2059.259 USD 2230.647 USD 884324.043 USD

eCoin Application Program Interface (API) v.2

eCoin API专用于获取各类信息,并能在第三方资源上使用。
API v.1 you can find here.

主要信息

系统支持3种格式的查询结果:

为获取非JSON格式信息,您必须将参数?type=[format]添加至查询。, 示例, ?type=XML.

API结果通常包含4个参数:
  1. resultCode – 查询代码。可能值是 1 - 成功, 0 - 出现一个错误;
  2. result – 查询结果。根据查询,可以包含文本或是嵌套字段;
  3. errorCode – 错误代码。数值0表示没有错误;
  4. errorMessage – 如果出现错误,请详细描述错误.

正在接收数字货币汇率

查询:
https://www.ecoin.eu/api/v2/rate/get/{ btc_usd | btc_eur | ltc_usd | ltc_eur }
示例查询:
JSON格式示例响应:
{"response":{"resultCode":1,"result":"510.00","errorCode":0,"errorMessage":null}}

The list of active orders

查询:
https://www.ecoin.eu/api/v2/orders/active/{buy | sell | all}/{ btc_usd | btc_eur | ltc_usd | ltc_eur }
示例查询:
JSON格式示例响应:
{"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}}
附加参数 限制对该请求有效. 可能值为10,30。 例子,

The sum of active orders

查询:
https://www.ecoin.eu/api/v2/orders/activeSum/{buy | sell }/{ btc_usd | btc_eur | ltc_usd | ltc_eur }
示例查询:
JSON格式示例响应:
{"response":{"resultCode":1,"result":{"sum":"152.00","currency":"USD"},"errorCode":0,"errorMessage":null}}

授权eCoin API

关键信息

该API中的请求表格变更;响应格式与公用API响应格式一致。

应API请求,始终进行POST参数传递,如:

获取当前余额

URL:
https://www.ecoin.eu/api/v2/account/getBalance
POST参数:
  • uid
  • key
  • currency - 可能值为 btc, ltc, usd, eur
  • hash - 栏位顺序 {uid}:{key}:{currency}:{secret key}
JSON格式示例响应:
{"response":{"resultCode":1,"result":{"sum":"7.03660","in_orders":"0.00000","currency":"btc"},"errorCode":0,"errorMessage":null}}

登记一个新订单

URL:
https://www.ecoin.eu/api/v2/orders/new
POST参数:
  • uid
  • key
  • type - “买入”或“卖出”操作类型
  • pair - 可能值为 btc_usd, btc_eur, ltc_usd, ltc_eur
  • amount - 钱币数量,例子 1.23456
  • price - 以美元为单位Coin单价,范例 432.10
  • hash - 栏位顺序 {uid}:{key}:{type}:{pair}:{amount}:{price}:{secret key}
JSON格式示例响应:
{"response":{"resultCode":1,"result":{"id":"ace11343032323","processed":"0.00000"},"errorCode":0,"errorMessage":null}}
请务必保存您的id,以便了解订单信息或进行取消操作。

获取订单信息

URL:
https://www.ecoin.eu/api/v2/orders/get
POST参数:
  • uid
  • key
  • id - 登记新订单时您接收的ID
  • hash - 栏位顺序 {uid}:{key}:{id}:{secret key}
JSON格式示例响应:
{"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}}

您的有效订单清单

URL:
https://www.ecoin.eu/api/v2/orders/listActive
POST参数:
  • uid
  • key
  • hash - 栏位顺序 {uid}:{key}:{secret key}
JSON格式示例响应:
{"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}}

取消订单

URL:
https://www.ecoin.eu/api/v2/orders/cancel
POST参数:
  • uid
  • key
  • id - 登记新订单时您接收的ID
  • hash - 栏位顺序 {uid}:{key}:{id}:{secret key}
JSON格式示例响应:
{"response":{"resultCode":1,"result":[],"errorCode":0,"errorMessage":null}}

Deal History

URL:
https://www.ecoin.eu/api/v2/orders/history
POST参数:
  • uid
  • key
  • pair - 可能值为 btc_usd, btc_eur, ltc_usd, ltc_eur
  • limit - Limit of records, should be a number between 1 and 500
  • hash - 栏位顺序 {uid}:{key}:{pair}:{limit}:{secret key}
JSON格式示例响应:
{"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}}

有效优惠券清单:

URL:
https://www.ecoin.eu/api/v2/vouchers/active
POST参数:
  • uid
  • key
  • currency - 可能值为 usd, eur
  • hash - 栏位顺序 {uid}:{key}:{currency}:{secret key}
JSON格式示例响应:
{"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}}

已使用优惠券清单:

URL:
https://www.ecoin.eu/api/v2/vouchers/used
POST参数:
  • uid
  • key
  • currency - 可能值为 usd, eur
  • hash - 栏位顺序 {uid}:{key}:{currency}:{secret key}
JSON格式示例响应:
{"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}}

兑换优惠券

URL:
https://www.ecoin.eu/api/v2/vouchers/redeem
POST参数:
  • uid
  • key
  • currency - 可能值为 usd, eur
  • code
  • protection_code 可选项
  • hash - 栏位顺序 {uid}:{key}:{currency}:{code}:{secret key} 或 {uid}:{key}:{currency}:{code}:{protection_code}:{secret key}
JSON格式示例响应:
{"response":{"resultCode":1,"result":{"sum":"10.00","currency":"EUR"},"errorCode":0,"errorMessage":null}}

生成一张优惠券

URL:
https://www.ecoin.eu/api/v2/vouchers/create
POST参数:
  • uid
  • key
  • amount
  • currency - 可能值为 usd, eur
  • quantity
  • protection_code 可选项
  • hash - 栏位顺序 {uid}:{key}:{amount}:{currency}:{quantity}:{secret key} 或 {uid}:{key}:{amount}:{currency}:{quantity}:{protection_code}:{secret key}
JSON格式示例响应:
{"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