1

I'd like to use the 0x api to swap tokens given on certains conditions included in a PHP file.

However, it seems 0x api/ecosystem revolves around JS since it has lots of utilities and needs npm to run.

Is there a workaround or do I need to port my PHP file to JS ?

1 Answer 1

1

The 0x swap API is completely HTTP based, so all you need is a way to send HTTP requests.

I believe PHP has built-in support for cURL, or you could use the built-in HTTP Client of a framework like Symfony or Laravel to perform your requests.

You're right that a lot of 0x, and indeed a lot of Web3 technologies, are built with JS. I might be easier for you in the long run to make the switch now.

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.