Skip to content

Commit

Permalink
Merge pull request #4 from KarmCraft/develop
Browse files Browse the repository at this point in the history
Several updates for 2025
  • Loading branch information
KarmCraft authored Jan 1, 2025
2 parents e15e073 + bf10412 commit 784ac49
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 68 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.0.0]

### Several updates to make the Portofolio work in 2025

- Simplified Fees API Query.
- Adopting ETH proposed Fees as default.
- Changed ETH Fee provider to etherscan, you will have to crete new API Key.
- Increased CoinMarketCap query count to 3500 because there .are way more tokens now. **Careful if you're on the free API plan, more API points are consumed from your mothly allocation**.
- Added a second, configurable FIAT value. Just Add another column before "EXPLORER" and fill with the Formula `=@FIAT_2_RATE`
- New Explorers such as TFUEL, ALIAS, VTC, RVN, LTC, BNB, SOL

## [1.0.0]

- Initial release to public
Binary file modified Portfolio.xlsx
Binary file not shown.
Binary file modified Queries.xlsx
Binary file not shown.
6 changes: 5 additions & 1 deletion config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
},
"ApiKeyEthGas": {
"Value": "",
"Comment": "Sign up for free on https://docs.defipulse.com/authentication. To get you API key go to the dashboard under 'Active API Key' and genereate the key. Copy and paste it's value here."
"Comment": "Sign up for free on https://etherscan.io/apis. To get you API key go to your profile, chose API Keys and genereate the key. Copy and paste the token value here."
},
"AdditionalFiat": {
"Value": "EUR",
"Comment": "Enter your desired additional Fiat currency. The values will automatically be exchanged from USD $"
},
"AdditionalFiat2": {
"Value": "EUR",
"Comment": "Enter your desired additional Fiat currency. The values will automatically be exchanged from USD $"
}
}
1 change: 1 addition & 0 deletions config/explorers-erc20.json
Original file line number Diff line number Diff line change
Expand Up @@ -996,4 +996,5 @@
{"symbol": "FXP", "baseurl" : "https://etherscan.io/token/0x14ddda446688b73161aa1382f4e4343353af6fc8?a={ADDRESS}"},
{"symbol": "MOC", "baseurl" : "https://etherscan.io/token/0x865ec58b06bf6305b886793aa20a2da31d034e68?a={ADDRESS}"},
{"symbol": "LEXT", "baseurl" : "https://etherscan.io/token/0xd6c523854f08759df65fd335c80a5609e2a28d5f?a={ADDRESS}"},
{"symbol": "OHM", "baseurl" : "https://etherscan.io/token/0x383518188c0c6d7730d91b2c03a03c837814a899?a={ADDRESS}"},
]
8 changes: 7 additions & 1 deletion config/explorers.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,22 @@
{"symbol": "EOS", "baseurl" : "https://bloks.io/account/{ADDRESS}"},
{"symbol": "ETH", "baseurl" : "https://etherscan.io/address/{ADDRESS}"},
{"symbol": "GAS", "baseurl" : "https://neoscan.io/address/{ADDRESS}"},
{"symbol": "LTC", "baseurl" : "https://chainz.cryptoid.info/ltc/address.dws?{ADDRESS}.htm"},
{"symbol": "LTC", "baseurl" : "https://litecoinspace.org/address/{ADDRESS}"},
{"symbol": "MIOTA", "baseurl" : "https://thetangle.org/address/{ADDRESS}"},
{"symbol": "NEO", "baseurl" : "https://neoscan.io/address/{ADDRESS}"},
{"symbol": "PIVX", "baseurl" : "https://chainz.cryptoid.info/pivx/address.dws?{ADDRESS}"},
{"symbol": "QTUM", "baseurl" : "https://explorer.qtum.org/address/{ADDRESS}"},
{"symbol": "SLR", "baseurl" : "https://chainz.cryptoid.info/slr/address.dws?{ADDRESS}.htm"},
{"symbol": "THETA", "baseurl" : "https://explorer.thetatoken.org/account/{ADDRESS}"},
{"symbol": "TFUEL", "baseurl" : "https://explorer.thetatoken.org/account/{ADDRESS}"},
{"symbol": "TRX", "baseurl" : "https://tronscan.org/#/address/{ADDRESS}"},
{"symbol": "TRX", "baseurl" : "https://tronscan.org/#/transaction/{ADDRESS}"},
{"symbol": "XEM", "baseurl" : "https://explorer.nemtool.com/#/s_account?account={ADDRESS}"},
{"symbol": "XLM", "baseurl" : "https://stellar.expert/explorer/public/account/{ADDRESS}?order=desc"},
{"symbol": "XRP", "baseurl" : "https://bithomp.com/explorer/{ADDRESS}"},
{"symbol": "ALIAS", "baseurl" : "https://chainz.cryptoid.info/alias/address.dws?{ADDRESS}"},
{"symbol": "VTC", "baseurl" : "https://www.coinexplorer.net/VTC/address/{ADDRESS}"},
{"symbol": "RVN", "baseurl" : "https://explorer.ravenland.org/address/{ADDRESS}"},
{"symbol": "SOL", "baseurl" : "https://solscan.io/account/{ADDRESS}"},
{"symbol": "BNB", "baseurl" : "https://bscscan.com/address/{ADDRESS}"},
]
81 changes: 16 additions & 65 deletions queries/fees.m
Original file line number Diff line number Diff line change
@@ -1,75 +1,26 @@
let
BTCApiurl = "https://bitcoinfees.earn.com/api/v1/fees/recommended",
BTCSource = Json.Document(Web.Contents(BTCApiurl)),
BTCConvertedToTable = Record.ToTable(BTCSource),
BTCReplacedFast =
Table.ReplaceValue(
BTCConvertedToTable,
"fastestFee",
"BTC Fast",
Replacer.ReplaceText,
{"Name"}
),
BTCReplacedAverage =
Table.ReplaceValue(
BTCReplacedFast,
"halfHourFee",
"BTC Average",
Replacer.ReplaceText,
{"Name"}
),
BTCFees =
Table.ReplaceValue(
BTCReplacedAverage,
"hourFee",
"BTC Slow",
Replacer.ReplaceText,
{"Name"}
),
BTCApiUrl = "https://bitcoiner.live/api/fees/estimates/latest",
BTCSource = Json.Document(Web.Contents(BTCApiUrl)),
BTCFeesRaw = BTCSource[estimates][30][sat_per_vbyte],
#"Converted to Table" = #table(1, {{BTCFeesRaw}}),
#"Added Custom" = Table.AddColumn(#"Converted to Table", "Name", each "BTC Fees s/vB"),
#"Reordered Columns" = Table.ReorderColumns(#"Added Custom",{"Name", "Column1"}),
BTCFees = Table.RenameColumns(#"Reordered Columns",{{"Column1", "Value"}}),

ETHApiUrl =
Text.Combine(
{
"https://data-api.defipulse.com/api/v1/egs/api/ethgasAPI.json?api-key=",
GetCellValue("CONFIG_API_ETHGAS")
"https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=",
GetCellValue("CONFIG_API_ETHGAS")
}
),
ETHSource = Json.Document(Web.Contents(ETHApiUrl)),
ConvertedToTable = Record.ToTable(ETHSource),
ReplacedFast =
Table.ReplaceValue(
ConvertedToTable,
"fast",
"ETH Fast",
Replacer.ReplaceValue,
{"Name"}
),
ReplacedSlow =
Table.ReplaceValue(
ReplacedFast,
"safeLow",
"ETH Slow",
Replacer.ReplaceValue,
{"Name"}
),
ReplacedAverage =
Table.ReplaceValue(
ReplacedSlow,
"average",
"ETH Average",
Replacer.ReplaceValue,
{"Name"}
),
ETHFees =
Table.SelectRows(
ReplacedAverage,
each
[Name]
= "ETH Fast"
or [Name]
= "ETH Average"
or [Name]
= "ETH Slow"
),
ETHFeesRaw = ETHSource[result],
#"Converted to Table1" = Record.ToTable(ETHFeesRaw),
#"Filtered Rows" = Table.SelectRows(#"Converted to Table1", each [Name] = "ProposeGasPrice"),
#"Replaced Value" = Table.ReplaceValue(#"Filtered Rows","ProposeGasPrice","ETH Proposed (gwei)",Replacer.ReplaceText,{"Name"}),
#"Changed Type" = Table.TransformColumnTypes(#"Replaced Value",{{"Value", type number}}),
ETHFees = Table.TransformColumns(#"Changed Type",{{"Value", each Number.Round(_, 2), type number}}),
Fees =
Table.Combine(
{
Expand Down
2 changes: 1 addition & 1 deletion queries/rates-cmc.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest?CMC_PRO_API_KEY=",
ApiKey,
"&limit=1000"
"&limit=3500"
}
),
Source =
Expand Down

0 comments on commit 784ac49

Please sign in to comment.