Merchant API:5分钟发出首个请求
从创建密钥到可用回调只需四步。所有示例均为面向生产API的curl命令;完整方法参考见文档。
1. 创建API密钥
在EIDEX后台打开API密钥版块,创建密钥对:API Key(UUID)与Secret Key(64位hex)。密钥经管理员审核后生效,通常一个工作日内完成。
2. 查询余额
第一个请求——GET /balances:确认鉴权正常并能看到商户账户。
curl -s https://eidex.io/api/merchant/v1/balances \
-H "X-API-Key: <your-api-key>" \
-H "X-API-Secret: <your-api-secret>"3. 获取行情
GET /tickers返回交易对实时价格——足以在您的平台展示报价。
curl -s https://eidex.io/api/merchant/v1/tickers \
-H "X-API-Key: <your-api-key>" \
-H "X-API-Secret: <your-api-secret>"4. 配置回调
订阅充值与提现事件——比轮询API更可靠、更及时。
curl -s -X POST https://eidex.io/api/merchant/v1/webhooks \
-H "X-API-Key: <your-api-key>" \
-H "X-API-Secret: <your-api-secret>" \
-H "Content-Type: application/json" \
-d '{"url":"https://your-exchanger.example/webhook","events":["deposit.confirmed","withdraw.completed"]}'