【问题标题】:API Error response when creating a request transaction: Missing parameter: `type`创建请求事务时的 API 错误响应:缺少参数:`type`
【发布时间】:2019-12-25 05:02:26
【问题描述】:

使用 Coinbase PHP 库创建交易时,我从 API 收到以下错误;缺少参数:type

我添加了调试语句来仔细检查库是否正确发送了类型,它就是。

type: "request",
amount: "10",
description: "random string",
to: "test@email.com",
currency: "BTC"

最近有没有其他人遇到过这个问题?我认为这是目前 coinbase API 的问题。

跑下兔子洞,确保它正确地将类型正确发送到 API

$transaction = Transaction::request([
                'toEmail' => 'test@email.com',
                'amount' => new Money(1, 'BTC'),
                'description' => 'Test transaction'
            ]);
            $client->createAccountTransaction($client->getPrimaryAccount(), $transaction);

结果:

{
    "success": false,
    "error": "Missing parameter: `type`"
}

预期:

JSON 数据,包括有关请求的信息

【问题讨论】:

  • 你有解决这个问题的办法吗?
  • 这似乎仍在发生 - 看起来像是他们支持的错误(这并没有什么不寻常的)
  • 有人找到解决方案了吗?

标签: coinbase-api coinbase-php


【解决方案1】:

这是一个 API 错误...不是 php/python...错误

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-01-04
    • 1970-01-01
    相关资源
    最近更新 更多