查询链上交易 - fetchTransactions
使用ccxt统一API的fetchTransactions
方法查询链上交易。示例代码如下。
JavaScript:
// fetchTransactions (code = undefined, since = undefined, limit = undefined, params = {})
if (exchange.has['fetchTransactions']) {
const transactions = await exchange.fetchTransactions (code, since, limit, params)
} else {
throw new Error (exchange.id + ' does not have the fetchTransactions method')
}
Python:
# fetch_transactions(code = None, since = None, limit = None, params = {})
if exchange.has['fetchTransactions']:
transactions = exchange.fetch_transactions(code, since, limit, params)
else:
raise Exception (exchange.id + ' does not have the fetch_transactions method')
PHP:
// fetch_transactions ($code = null, $since = null, $limit = null, $params = {})
if ($exchange->has['fetchTransactions']) {
$transactions = $exchange->fetch_transactions ($code, $since, $limit, $params);
} else {
throw new Exception ($exchange->id . ' does not have the fetch_transactions method');
}