I am using the etherscan-api here: (https://sebs.github.io/etherscan-api/#txlist) to get the list of transactions for a user (given public key), and I am getting the list of cleared transactions only, even though on etherscan.io I can see all pending transactions as well, so the information is "there". Digging into the source https://github.com/sebs/etherscan-api/blob/master/lib/account.js#L122, I find no indication of where I can look to find pending transactions. Code below:
const etherscan = require('etherscan-api').init(ETHERSCAN_TOKEN, 'ropsten', '3000');
etherscan.account
.txlist(public_key, 1, 'latest', 1, 100, 'asc')
.then(res => {
console.log("tx_list: ", res.result)
})
// get num of transactions
etherscan.proxy
.eth_getTransactionCount(public_key, 'latest')
.then(res => {
let count = res.result
console.log("eth_getTransactionCount: ", parseInt(count))
})