<# call "https://api.coindesk.com/v1/bpi/currentprice.json" to response; print bucket response; #>
response: Array ( [time] => Array ( [updated] => Nov 21, 2024 06:47:46 UTC [updatedISO] => 2024-11-21T06:47:46+00:00 [updateduk] => Nov 21, 2024 at 06:47 GMT ) [disclaimer] => This data was produced from the CoinDesk Bitcoin Price Index (USD). Non-USD currency data converted using hourly conversion rate from openexchangerates.org [chartName] => Bitcoin [bpi] => Array ( [USD] => Array ( [code] => USD [symbol] => $ [rate] => 96,988.136 [description] => United States Dollar [rate_float] => 96988.1355 ) [GBP] => Array ( [code] => GBP [symbol] => £ [rate] => 76,667.569 [description] => British Pound Sterling [rate_float] => 76667.5693 ) [EUR] => Array ( [code] => EUR [symbol] => € [rate] => 91,958.428 [description] => Euro [rate_float] => 91958.4278 ) ) )
<#[response.bpi.USD.rate_float as dollars]#> ⇒ | $ 96,988.14 |
The Hashtag Markup Language provides methods to Call external APIs, and process any response.
The response text is saved to the named Hashtag Variable. If the response is JSON encoded, it will be decoded into Hashtag Buckets.
Optional parameters can be sent with the call. The values in the named Hashtag Bucket will be sent with the request as HTTP POST variables.