【问题标题】:Sending bitcoin outside using coinbase php library returns 422::Invalid amount使用 coinbase php 库向外部发送比特币返回 422::Invalid amount
【发布时间】:2019-05-09 02:25:39
【问题描述】:

我试图使用 coinbase php 库将 0.0001 个比特币发送到外部 BTC 地址。我有基于 CodeIgniter 的网站并生成比特币地址,检索余额工作正常。但不知何故,我似乎无法让提币工作。下面是我的代码。

$configuration = \Coinbase\Wallet\Configuration::apiKey($apiKey, $apiSecret);
$client = Coinbase\Wallet\Client::create($configuration);
$accountId = $this->getCoinbaseAccountid($coinid);
$account = $client->getAccount($accountId);
$coinsymbol = $this->CI->common_library->getCoinSymbol($coinid);//returns BTC
$withdrawAmount = new Coinbase\Wallet\Value\Money($amountTosend, $coinsymbol);
$transaction = Coinbase\Wallet\Resource\Transaction::send([
  'toBitcoinAddress' => $sendtoAddress,
  'amount' => $withdrawAmount,
  'description' => $comment,
  'fee' => '0.00005' // only required for transactions under BTC0.0001
]);
try {
  $response = $client->createAccountTransaction($account, $transaction);
} catch (Coinbase\Wallet\Exception\HttpException $ex) {
  $error = $ex->getResponse()->getStatusCode() . '::' . $ex->getError();
  $errorcase = 1;
  $this->log_ipn_results(FALSE, $error);
}

在我的日志文件中,出现以下错误。即使在searching 之后我仍然找不到这个错误。

422::无效金额

【问题讨论】:

    标签: php codeigniter coinbase-api coinbase-php


    【解决方案1】:

    最低提现金额大于0.0001 BTC。

    【讨论】:

    • 最低提款金额是多少?你能分享一个相同的链接吗?
    • 如果你在网上搜索,结果是Coinbase动态改变了最低提现金额。
    • 现在在我的帐户上显示 0.0001 作为最低提款,所以我不对,错误是指逗号而不是点,还是其他什么?
    • 其实我现在只是在测试。这就是我试图发送 0.0001 BTC 的原因。在 coinbase 上,你在哪里找到这些限制?
    • 我尝试在网站上将导入设置为 0.0001,它说“最低要求是 0.0001”
    猜你喜欢
    • 2014-11-26
    • 2023-03-08
    • 2021-08-03
    • 2017-05-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多