Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - platform: rest
- name: currency_eur_dkk
- value_template: "{{ value_json.response[0].average_midpoint | float(7.43904) }}"
- json_attributes_path: "$.response[0]"
- resource_template: >
- {% set base = "EUR" %}
- {% set quote = "DKK" %}
- https://cc-api.oanda.com/cc-api/v1/currencies?base={{base}}"e={{quote}}&data_type=general_currency_pair&start_date={{ now().date() }}&end_date={{ now().date() }}
- json_attributes:
- - base_currency
- - quote_currency
- - start_time
- - open_time
- - close_time
- - average_bid
- - average_ask
- - average_midpoint
- - high_bid
- - high_ask
- - high_midpoint
- - low_bid
- - low_ask
- - low_midpoint
- headers:
- Content-Type: application/json
- scan_interval: 43200
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement