How to view coinbase transaction activity

2019-06-24 02:15发布

The node.js tests : https://github.com/coinbase/coinbase-node/tree/master/test & documentation : https://github.com/coinbase/coinbase-node do not appear to describe tests or functionality that return all activity on account. I'm attempting to access all buys and sells of currencies for an account. Is this functionality available ? Can view via an api call buys and sells for an account for each currency coinbase supports ?

Update : im attempting to access cummulative sum of all purchases for all currencies within coinbase portfolio. Is my method above the canocical way to achieve this ?

1条回答
闹够了就滚
2楼-- · 2019-06-24 02:44

As documented under List transactions:

Lists account’s transactions. See transaction resource for more information.

HTTP REQUEST

GET https://api.coinbase.com/v2/accounts/:account_id/transactions

SCOPES

  • wallet:transactions:read

Example request

var Client = require('coinbase').Client;

var client = new Client({'apiKey': 'API KEY',
                         'apiSecret': 'API SECRET'});

client.getAccount('2bbf394c-193b-5b2a-9155-3b4732659ede', function(err, account) {
  account.getTransactions(function(err, txs) {
    console.log(txs);
  });
});
查看更多
登录 后发表回答