以下是我的临时API设置:
wallet:accounts:read wallet:addresses:read wallet:buys:read wallet:checkouts:read wallet:contacts:read wallet:deposits:read wallet:notifications:read wallet:orders:read wallet:payment-methods:read wallet:sells:read wallet:transactions:read wallet:transactions:request wallet:transactions:send wallet:transactions:transfer wallet:user:read wallet:withdrawals:read正在读取帐户数据:
HTTP REQUEST
GET https://api.coinbase.com/v2/accounts
SCOPES
wallet:accounts:read..。效果很好。
但是对交易数据的请求(我只需要图片中所示的购买)...
HTTP REQUEST
GET https://api.coinbase.com/v2/accounts/:account_id/transactions
SCOPES
wallet:transactions:read..。给我一个空的结果:
{"pagination":{"ending_before":null,"starting_after":null,"limit":25,"order":"desc","previous_uri":null,"next_uri":null},"data":[]}有谁知道我会错过什么吗?
发布于 2018-05-09 18:58:56
我不知道为什么你不能获得交易。让我告诉你,我的BTC账户上有交易。检索并出售BTC。当我打电话的时候
https://api.coinbase.com/v2/accounts/account_id/transactions如果CB-VERSION为2018-05-09 (这是新发布的),它将返回。确定;确定;
1-您的选定帐户中有交易。当您从coinbase.com检查时,请确保您看到的是事务。
2-确保您的帐户id将通过URL转到API
3-确保选定的帐户id与发送帐户id匹配。
3-确保你的请求头是正确的。
4-确保您的Auth令牌未过期。
我非常确定您的代码中遗漏了一些东西。如果上面这些都不能解决你的问题,那就来找我。我可以帮你。
发布于 2018-05-11 06:25:05
谢谢你的回答--我知道了。
我的错误是认为我需要为一个且唯一的帐户id请求我的事务,类似于用户id。但是在更准确地读取帐户JSON之后,我发现每个钱包都有一个帐户id。我读出了欧元钱包,当然我没有任何一笔交易。
不管怎样,谢谢你。塞巴斯蒂安。
https://stackoverflow.com/questions/50199332
复制相似问题