Does every HTTP outcall cost around 20 cents?

I’ve been using HTTP outcalls, ran out of cycles, and I checked and saw

Call was rejected:
Reject code: 4
Reject text: http_request request sent with 0 cycles, but 210121000000 cycles are required.

Does that mean that every time we make an HTTP outcall request we must pay ~20 cents?

It seems incredibly expensive for a single call.

1 Like

For example, if you want to use that for a price feed, calling 5 sources once per minute to update the price would cost ~ 0.2 x 5 x 60 x 24 x 365 = ~500k USD per year.

A more realistic, reliable price oracle would probably require ~20 sources every 5 or so seconds:

0.2 x 20 x 12 x 60 x 24 x 365 = ~25M dollars per year.

It’s expensive actually, but it also depends on max_response_bytes, if you don’t specify some value, it will take by default maximum 2000 (I guess).

Check Pricing of Http outcall!

2 Likes

Can you dramatically reduce the price per call by dramatically reducing max_response_bytes?

check this for pricing.

1 Like

Thank you.

By reducing the paylaod, the cost went down by a factor of ~300.

That makes it usable. Still expensive for a high quality feed running 24/7 but it can be worked with.

For future readers: no, it doesn’t cost 20 cents per call. It only costs that if you use the maximum 2MB payload.

13 Likes