1

thanks for stopping by my question.

I'm implementing a bot that uses the /quote endpoint of 0x API to check some trading prices. The 0x application is dockerized, together with postgreSQL and redis, as per the documentation, and running fine. The bot performs 5 /quote requests every ~2 seconds, on the BSC network.

The problem I'm having is that this is hosted on a cloud server that notified me of excessive bandwith usage. So I used iftop to check just that, and as it turns out, the incoming traffic between my local 0x API and Amazon servers is about 150 MB every 2 minutes.

Before migrating to another service that gives me more bandwith, I'd like to know, is this normal? What is the need to exchange so much data? I think maybe I've misconfigured something.

Thanks in advance!

2 Answers 2

1

Well, turns out the lesson is not to use /quote until you're going to actually make a transaction. /price transmits only a few KB in the same span of time that /quote transmits hundreds of MB. I wanted to use quote directly to avoid a second request and lose as little time as possible, but I'm going to bite the bullet, check /price first, and only invoke /quote if the bot has to trade.

0

Scratch my previous response. Apparently it was just a happy accident. Today it's consuming a CRAZY amount of bandwith, around 2 MB/s, and using the /price endpoint. Running the application locally in my PC yields the same result. What on earth is going on with this app?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.