You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Bitfinex API V2 报apikey: invalid code10100,是否为认证BUG?

Bitfinex API V2 报 apikey: invalid(code 10100) 错误排查求助

我已经多方排查,但至今仍未找到Bitfinex API V2报apikey: invalid(code 10100)错误的有效解决方案,特来确认这是否属于Bitfinex API认证系统的BUG。我用PHP编写代码,测试过多种场景(比如将secret和payload编码为UTF-8等),也尝试过StackOverflow上的相关方案,但均无效。附上我的代码,若您发现问题可指出,我会测试验证:

private function nonce(){
    return time()*1000; //Also time()*1000*1000 is tested
}

private function signature($api_path,$body,$nonce){
    $str =  "/api/$api_path" . $nonce . json_encode($body);
    return hash_hmac('sha384',$str,$this->secret); //Also UTF-8 encoding $str & secret are tested
}

public function getTradeFee(string $currency) : array{
    $api_path = "v2/auth/r/summary";
    $request_path = $this->auth_base_url . $api_path;
    $body = []; //params are not needed for this path
    $nonce = $this->nonce();
    $headers = [
        "Content-Type: application/json" ,
        "bfx-nonce: $nonce" ,
        "bfx-apikey: " . $this->key , //Key is double checked and is correct (With full permissions)
        "bfx-signature: " . $this->signature($api_path,$body,$nonce)
    ];
    $curl = curl_init($request_path);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $body);
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    $info = curl_exec($curl);
    curl_close($curl);
    $info = json_decode($info);
    return $info;
}

内容的提问来源于stack exchange,提问作者Nima

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.30 00:12:16