Coinmetro is a regulated Crypto Exchange, for newbies(like me!) and pro traders/investors
To findout more about Coinmetro and to sign up, please feel free to use my referal link: Coinmetro: The Easiest Way to Buy Crypto with Confidence
This sensor config connects to your Coinmetro account and fetches the balances for each of your Cryptocurrencies/fiat/bonds you have with them along with the equivalent value in GBP/USD/BTC/EUR
Example Dashboard with dummy data:
Pre-Reqs:
In order to get your balances, you need a valid token and device id. To make this process easier I have created a python3 script which can be executed via terminal to complete the required actions: https://github.com/Eyeanman/coinmetro-api-tools
Alternatively, you can use the Coinmetro API documentation here:COINMETRO API (PUBLIC)
Once you have your Token and DeviceId, store these in your secrets.yaml. MAKE SURE THIS FILE IS NOT ACCESSIBLE TO ANYONE ELSE!
coinmetro_token: Bearer YOUR_TOKEN
coinmetro_deviceid: YOUR_DEVICE_ID
configuration.yaml
Use this as a template for the information you want to retrieve,
- platform: rest
scan_interval: 60
name: coinmetro
resource: https://api.coinmetro.com/users/balances
headers:
Authorization: !secret coinmetro_token
X-Device-ID: !secret coinmetro_deviceid
json_attributes:
- BTC
- DNA
- ETH
- EUR
- GBP
- PRQ
- PRQB
- USD
- XCM
- GENE2YR
- TGBL2YR
- CMBD2YR
- IGN€
- TOTAL
- REF
value_template: "OK"
- platform: template
sensors:
coinmetro_xcm_balance:
value_template: '{{ states.sensor.coinmetro.attributes["XCM"]["XCM"] }}'
unit_of_measurement: "XCM"
coinmetro_xcm_gbp:
value_template: '{{ states.sensor.coinmetro.attributes["XCM"]["GBP"] | round (2) }}'
unit_of_measurement: "£"
coinmetro_xcm_eur:
value_template: '{{ states.sensor.coinmetro.attributes["XCM"]["EUR"] | round (2) }}'
unit_of_measurement: "€"
coinmetro_xcm_btc:
value_template: '{{ states.sensor.coinmetro.attributes["XCM"]["BTC"] }}'
unit_of_measurement: "BTC"
coinmetro_btc_balance:
value_template: '{{ states.sensor.coinmetro.attributes["BTC"]["BTC"] }}'
unit_of_measurement: "BTC"
coinmetro_btc_gbp:
value_template: '{{ states.sensor.coinmetro.attributes["BTC"]["GBP"] | round (2) }}'
unit_of_measurement: "£"
coinmetro_btc_eur:
value_template: '{{ states.sensor.coinmetro.attributes["BTC"]["EUR"] | round (2) }}'
unit_of_measurement: "€"
coinmetro_dna_balance:
value_template: '{{ states.sensor.coinmetro.attributes["DNA"]["DNA"] }}'
unit_of_measurement: "DNA"
coinmetro_dna_gbp:
value_template: '{{ states.sensor.coinmetro.attributes["DNA"]["GBP"] | round (2) }}'
unit_of_measurement: "£"
coinmetro_dna_eur:
value_template: '{{ states.sensor.coinmetro.attributes["DNA"]["EUR"] | round (2) }}'
unit_of_measurement: "€"
coinmetro_dna_btc:
value_template: '{{ states.sensor.coinmetro.attributes["DNA"]["BTC"] }}'
unit_of_measurement: "BTC"
coinmetro_eth_balance:
value_template: '{{ states.sensor.coinmetro.attributes["ETH"]["ETH"] }}'
unit_of_measurement: "ETH"
coinmetro_eth_gbp:
value_template: '{{ states.sensor.coinmetro.attributes["ETH"]["GBP"] | round (2) }}'
unit_of_measurement: "£"
coinmetro_eth_eur:
value_template: '{{ states.sensor.coinmetro.attributes["ETH"]["EUR"] | round (2) }}'
unit_of_measurement: "€"
coinmetro_eth_btc:
value_template: '{{ states.sensor.coinmetro.attributes["ETH"]["BTC"] }}'
unit_of_measurement: "BTC"
coinmetro_prq_balance:
value_template: '{{ states.sensor.coinmetro.attributes["PRQ"]["PRQ"] }}'
unit_of_measurement: "PRQ"
coinmetro_prq_gbp:
value_template: '{{ states.sensor.coinmetro.attributes["PRQ"]["GBP"] | round (2) }}'
unit_of_measurement: "£"
coinmetro_prq_eur:
value_template: '{{ states.sensor.coinmetro.attributes["PRQ"]["EUR"] | round (2) }}'
unit_of_measurement: "€"
coinmetro_prq_btc:
value_template: '{{ states.sensor.coinmetro.attributes["PRQ"]["BTC"] }}'
unit_of_measurement: "BTC"
coinmetro_prqb_balance:
value_template: '{{ states.sensor.coinmetro.attributes["PRQB"]["PRQB"] }}'
unit_of_measurement: "PRQB"
coinmetro_prqb_gbp:
value_template: '{{ states.sensor.coinmetro.attributes["PRQB"]["GBP"] | round (2) }}'
unit_of_measurement: "£"
coinmetro_prqb_eur:
value_template: '{{ states.sensor.coinmetro.attributes["PRQB"]["EUR"] | round (2) }}'
unit_of_measurement: "€"
coinmetro_prqb_btc:
value_template: '{{ states.sensor.coinmetro.attributes["PRQB"]["BTC"] }}'
unit_of_measurement: "BTC"
coinmetro_bonds_encrypgen_balance:
value_template: '{{ states.sensor.coinmetro.attributes["GENE2YR"]["GENE2YR"] }}'
coinmetro_bonds_encrypgen_gbp:
value_template: '{{ states.sensor.coinmetro.attributes["GENE2YR"]["GBP"] | round (2) }}'
unit_of_measurement: "£"
coinmetro_bonds_encrypgen_eur:
value_template: '{{ states.sensor.coinmetro.attributes["GENE2YR"]["EUR"] | round (2) }}'
unit_of_measurement: "€"
coinmetro_bonds_encrypgen_btc:
value_template: '{{ states.sensor.coinmetro.attributes["GENE2YR"]["BTC"] }}'
unit_of_measurement: "BTC"
coinmetro_bonds_coinmetro_balance:
value_template: '{{ states.sensor.coinmetro.attributes["CMBD2YR"]["CMBD2YR"] }}'
coinmetro_bonds_coinmetro_gbp:
value_template: '{{ states.sensor.coinmetro.attributes["CMBD2YR"]["GBP"] | round (2) }}'
unit_of_measurement: "£"
coinmetro_bonds_coinmetro_eur:
value_template: '{{ states.sensor.coinmetro.attributes["CMBD2YR"]["EUR"] | round (2) }}'
unit_of_measurement: "€"
coinmetro_bonds_coinmetro_btc:
value_template: '{{ states.sensor.coinmetro.attributes["CMBD2YR"]["BTC"] }}'
unit_of_measurement: "BTC"
coinmetro_account_value_gbp:
value_template: '{{ states.sensor.coinmetro.attributes["TOTAL"]["GBP"] | round (2) }}'
unit_of_measurement: "£"
coinmetro_account_value_eur:
value_template: '{{ states.sensor.coinmetro.attributes["TOTAL"]["EUR"] | round (2) }}'
unit_of_measurement: "€"
coinmetro_account_value_btc:
value_template: '{{ states.sensor.coinmetro.attributes["TOTAL"]["BTC"] }}'
unit_of_measurement: "BTC"
coinmetro_eur_balance:
value_template: '{{ states.sensor.coinmetro.attributes["EUR"]["EUR"] }}'
unit_of_measurement: "€"
coinmetro_gbp_balance:
value_template: '{{ states.sensor.coinmetro.attributes["GBP"]["GBP"] }}'
unit_of_measurement: "£"
coinmetro_usd_balance:
value_template: '{{ states.sensor.coinmetro.attributes["USD"]["USD"] }}'
unit_of_measurement: "$"
coinmetro_ign_balance:
value_template: '{{ states.sensor.coinmetro.attributes["IGN€"]["IGN€"] | round (2) }}'
unit_of_measurement: "IGN€"