💻AI API Usage Guide
Dynamic Slippage prediction (First API release)
https://api.xtreamly.io/predict_slippage
Authentication
The API requires a x-api-token token for authentication, which will be provided separately to testers. It should be included in the request header as follows:x-api-key: <YOUR_TOKEN>Note that each API key is good for 100 calls per day.
Query Parameters
The API expects following query parameters:
parameter | type |
amountIn | float |
tokenInAddress | string |
decimalIn | int |
tokenOutAddress | string |
decimalOut | int |
fee | int |
isBuy | boolean |
Response
The response of the API is in this format
Example
Here is an example call using curl:
Same call using python:
Last updated