Closed Tobias35 closed 2 years ago
Thank you! Adding
@PatrickAlphaC do you have an eta on this yet ?
Hi @Tobias35 , thanks for raising again. The engineering team works on things based on priority, and unfortunately we don't have timelines for these community raised issues and feature requests. If you need something working now, you can implement some custom logic in an external adapter to handle string case conversion
Will be addressed in https://github.com/smartcontractkit/chainlink/pull/5751
Description While working on a new TOML job to replace our external adapter we reconised a problem calling APIs with the built in http. In the toml it is not possible to manipulate case sensitivity. Which makes it impossible for the smartcontract to make an uniform call to the job. Since Exchanges and API suppliers deal with this matter in different ways it is crucial to manipulate the data inside a toml job.
Motivation APIs are case sensitive ie. HUOBI takes pairs in lowercase while BINANCE for example uses uppercase pairs. BTC/USD != btc/usd
Justification TOML ie:
quote_toLower [type="lowercase" input="$(decode_cbor.from)"] # input BTC -> btc base_toLower [type="lowercase" input="$(decode_cbor.to)"] # input USD -> usd
huobi [type="http" method=GET url="https://api.huobi.pro/market/trade?symbol=$(quote_toLower)$(base_toLower)t"] huobi_p [type="jsonparse" path="tick,data,0,price"] huobi_m [type=multiply input="$(huobi_p)" times=10000000000]
obviously a task to convert to uppercase would also be necessary
Additional Information chainlink node operator at gains.trade contact on discord & tg: @bitcollectr