Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 1012 Bytes

README.md

File metadata and controls

21 lines (16 loc) · 1012 Bytes

pricefeed

calling coinbase api

https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproductcandles/

url = https://api.exchange.coinbase.com/products/:product_id/candles

curl -L -X GET 'https://api.exchange.coinbase.com/products/ICP-USD/candles?granularity=60&start=1620743971&end=1620744031'
-H 'Content-Type: application/json' -v -w '%{size_header}'

Http outcalls pricing

header_len = header_1.name + header_1.value + ... + header_n.name + header_n.value request_size = url.len + transform.name.len + transform.context.len + body.len + header_len http_outcall_cost = 400M + 100k * (request_size + max_response_size) scaling_factor = subnet_size / 13 total_cost = scaling_factor * http_outcall_cost