xuhcc / beancount-ethereum-importer

Ethereum transaction importer for Beancount
GNU General Public License v3.0
12 stars 5 forks source link

Can i download TX from several API ? #2

Open grostim opened 2 years ago

grostim commented 2 years ago

Hi !

I would like to get the TX from several blockchains: Ethereum, Gnosis, Avalanche, etc...

Is it possible to have all API within one config file, something like:

{
    "name": "mainnet",
    "account_map": {
        "0x0000": "Actifs:Crypto:Ethereum"
    },
    "fee_account": "Depenses:Crypto:Frais",
    "income_account": "Income:Fixme",
    "expenses_account": "Expenses:Fixme",
    "block_explorer_api_url": "http://api.etherscan.io/api",
    "block_explorer_api_key": "0000",
    "block_explorer_api_request_delay": 0
},
{
    "name": "avalanche",
    "account_map": {
        "0x000": "Actifs:Crypto:Avalanche"
    },
    "fee_account": "Depenses:Crypto:Frais",
    "income_account": "Income:Fixme",
    "expenses_account": "Expenses:Fixme",
    "block_explorer_api_url": "http://api.snowtrace.io/api",
    "block_explorer_api_key": "0000",
    "block_explorer_api_request_delay": 0
}
xuhcc commented 2 years ago

Yes, it's possible to rewrite downloader to support this. However, currently I'm simply using multiple configs:

python -m beancount_ethereum.downloader --config=$CONFIG1
python -m beancount_ethereum.downloader --config=$CONFIG2
...
grostim commented 2 years ago

Ok, this is what i thought.