0

What is a unit of estimatedPriceImpact, as the field isn't added to the documentation? I'm asking because we want to display the percentage For example, I receive from API 0,0072, so what should I display for percentage? 0,72% or 0,0072%?

1 Answer 1

0

The method that calculates the estimatedPriceImpact is founded here: https://github.com/0xProject/0x-api/blob/63fd378c3fd198fd1760cd684763956defccfb55/src/services/swap_service.ts#L99, which then is named estimatedPriceImpact here: https://github.com/0xProject/0x-api/blob/63fd378c3fd198fd1760cd684763956defccfb55/src/services/swap_service.ts#L482 As you can see according to the documentation presented on the method the returned result is on percent so 0,0072 should be 0,0072%

0

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.