Crypto Excel » Docs_functions Fetch Convert Trh
Convert any coins to fiat currency at specific intervals using a chosen exchange’s latest prices (with throttling)
=ST_convert_trh ( from_coin, to_coin, [exchange], [trh_sec])
Parameter | Required | Description | Example |
from_coin | Y | Coin you want to convert. Can be a range ( multiple coins) | “ATOM”,”BTC” |
to_coin | Y | fiat currency | “USD” |
Exchange* | N Default Binance | Exchange you want to use for the conversion | “Bitmex” |
trh_sec | N Default 300. min 120 | Seconds interval between consecutive calls | 120 |
*you can choose any exchange amongst the supported one which has the from_coin and to_coin listed
Required: Y
Description: Coin you want to convert. Can be a range ( multiple coins)
Example: “ATOM”, “BTC”
Required: Y
Description: fiat currency
Example: “USD”
Required: N. def “Binance”
Description: Exchange you want to use for the conversion
Example: “bitmex”
You can choose any exchange amongst the supported one which has the from_coin and to_coin listed
Required: N. def 500. Min 120
Description: seconds interval between consecutive calls
Example: 120
Value | Description |
Time | time of the conversion |
Rate | Conversion rate |
time of the conversion
conversion rate
This function send 1 request to the exchange even if you want to convert multiple coins at once
Tip. Use st_watch_requests() to monitor your requests.
The Convert trh function returns the Time and the conversion rate for one or multiple coins to the desired fiat. You can specify the Exchange that will be used for the conversion. Prices are refreshed automatically at defined intervals. (trh_sec). Both from and to coins must be listed on the specified exchange This function does not require Authentication