接口翻譯會(huì)持續(xù)更新
bitfinex的地址:https://bitfinex.readme.io/v1/reference#rest-public-ticker
接口通用加密方式
JSONObject jo = new JSONObject();
//必傳的2個(gè)加密參數(shù)
jo.put("request", urlPath);# /v1/order/new
jo.put("nonce", Long.toString(getNonce()));# 時(shí)間戳
String payload = jo.toString();
//Base64加密
String payload_base64 = android.util.Base64.encodeToString(payload.getBytes(), android.util.Base64.NO_WRAP);
//sha384加密
String payload_sha384hmac = hmacDigest(payload_base64, Bit_Sercet_Key, ALGORITHM_HMACSHA384);
ArrayMap<String, String> map = new ArrayMap<>();
map.put("Content-Type", "application/json");
map.put("Accept", "application/json");
map.put("X-BFX-APIKEY", Bit_Api_Key);
map.put("X-BFX-PAYLOAD", payload_base64);
map.put("X-BFX-SIGNATURE", payload_sha384hmac);
將map傳入Header中即可
上面是無需傳參時(shí)的加密方式,如果需要POST參數(shù)時(shí),需要將這些參數(shù)和
request都弹、nonce
一樣加入JSONObject中進(jìn)行加密倦淀。無需再次進(jìn)行POST參數(shù)了
賬戶相關(guān)接口信息
賬戶信息(Account Info)
接口地址 (POST)
https://api.bitfinex.com/v1/account_infos
接口說明
返回有關(guān)您帳戶的信息(交易費(fèi)用)
接口參數(shù)
無
返回參數(shù)樣例
[{
"maker_fees":"0.1",
"taker_fees":"0.2",
"fees":[{
"pairs":"BTC",
"maker_fees":"0.1",
"taker_fees":"0.2"
},{
"pairs":"LTC",
"maker_fees":"0.1",
"taker_fees":"0.2"
},
{
"pairs":"ETH",
"maker_fees":"0.1",
"taker_fees":"0.2"
}]
}]
賬戶金額(Account Fees)
接口地址(POST)
https://api.bitfinex.com/v1/account_fees
接口說明
查看適用于您的提款的費(fèi)用
接口參數(shù)
無
返回參數(shù)樣例
{
"withdraw":{
"BTC": "0.0005",
"LTC": 0,
"ETH": 0,
...
}
}
摘要(Summary)
接口地址(POST)
https://api.bitfinex.com/v1/summary
接口說明
返回您的交易量和保證金資金回報(bào)的30天摘要回溺。
接口參數(shù)
無
返回參數(shù)樣例
{
"trade_vol_30d":[// 在過去30天內(nèi)任何貨幣的交易量
{"curr":"BTC","vol":11.88696022},
{"curr":"LTC","vol":0.0},
{"curr":"ETH","vol":0.1},
{"curr":"Total (USD)","vol":5027.63}
],
"funding_profit_30d":[// 為過去30天的任何貨幣提供利潤
{"curr":"USD","amount":0.0},
{"curr":"BTC","amount":0.0},
{"curr":"LTC","amount":0.0},
{"curr":"ETH","amount":0.0}
],
"maker_fee":0.001,// 你當(dāng)前的費(fèi)用給制造者(限制訂單不可銷售户辞,百分比)
"taker_fee":0.002// 你目前的接受訂單費(fèi)用(可上市訂單疟羹,百分比)
}
存款(Deposit)
接口地址
https://api.bitfinex.com/v1/deposit/new
接口說明
退還你的存款地址碳柱,以獲得新的存款地址。
接口參數(shù)
var payload = {
"request": "/v1/deposit/new",
"nonce": Date.now().toString(),
"method": "bitcoin",
"wallet_name": "exchange",
"renew": 1
}
返回參數(shù)樣例
{
"result":"success",
"method":"bitcoin",
"currency":"BTC",
"address":"1A2wyHKJ4KWEoahDHVxwQy3kdd6g1qiSYV"
}
錢包余額(Wallet Balances)
接口地址(POST)
https://api.bitfinex.com/v1/balances
接口說明
查看你的余額
接口參數(shù)
無
返回參數(shù)樣例
[{
"type":"deposit",// 余額類型:(trading革答、deposit战坤、exchange)
"currency":"btc",// 錢包里的貨幣
"amount":"0.0",// 這個(gè)錢包里的這個(gè)貨幣有多少余額
"available":"0.0"http:// 這個(gè)錢包中有多少X可用于交易
},{
"type":"exchange",
"currency":"btc",
"amount":"1",
"available":"1"
}]
請求次數(shù)限制:20次/min
錢包余額相互轉(zhuǎn)讓(Transfer Between Wallets)
接口地址
https://api.bitfinex.com/v1/transfer
接口說明
允許你在錢包間轉(zhuǎn)移可用余額
接口參數(shù)
var payload = {
"request": "/v1/transfer",
"amount": "1.0",// 轉(zhuǎn)賬金額
"currency": "BTC",// 轉(zhuǎn)移資金的貨幣曙强。
"walletfrom": "trading",// 從中轉(zhuǎn)移的電子錢包⊥久#可以是“ trading”碟嘴,“ deposit”或“ exchange”
"walletto": "exchange",// 轉(zhuǎn)移到的錢包〈仁。可以是“trading”臀防,“deposit”或“exchange”
"nonce": Date.now().toString()
}
返回參數(shù)示例
[{
"status":"success",
"message":"1.0 USD transfered from Exchange to Deposit"
}]
取款(Withdrawal)
接口地址
https://api.bitfinex.com/v1/withdraw
接口說明
允許你請求從你的錢包中取款。
接口參數(shù)
var payload = {
"request": "/v1/withdraw",
"withdraw_type": "bitcoin",// 提款類型 ['bitcoin', 'litecoin', 'ethereum', 'ethereumc', 'mastercoin', 'zcash', 'monero', 'wire', 'dash', 'ripple', 'eos', 'neo', 'aventus', 'qtum', 'eidoo']
"walletselected": "exchange",// 錢包退出边败,可以“trading”, “exchange”, or “deposit”.
"amount": "1.0",// 退出的金額
"address": "1DKwqRhDmVyHJDL4FUYpDmQMYA3Rsxtvur"http:// 退出的目的地址袱衷。
"nonce": Date.now().toString()
}
對于所有提款,您必須提供
Withdrawal Type
笑窜,Wallet
和Amount
致燥。 對于CRYPTOCURRENCY取款,您還將提供應(yīng)該發(fā)送資金的Address
排截。如果是monero交易嫌蚤,您還可以包含Payment ID
。
對于WIRE撤銷断傲,您需要填寫收款銀行信息脱吱。 在某些情況下,您的銀行需要使用中介銀行认罩,如果是這種情況箱蝠,請?zhí)峁┻@些字段。
通過API提交紋波提取時(shí)垦垂,您應(yīng)該在payment_id
字段中包含tag