⛓️Piteas SDK/API
Piteas has an offchain model for its dex aggregator. Unlike traditional aggregator models, it doesn't create routes through API calls; the entire process is managed offchain by pathfinder, which then provides the call data response to the UI.
At this stage, Piteas API is not publicly accessible*. (Modified) It is open for access to Piteas' main app, widget app, and some partner protocols. We don't have our own RPC service; quote/request data is fetched entirely through native Pulsechain RPC using our algorithms. Therefore, the number of quote requests needs to be limited. So, if you're looking to run an arbitrage bot, Piteas API is not suitable for you at this stage. However, if you have a project or product and require API access, please provide us with the following information for consideration:
Brief information about your product.
Estimated number of API requests covering daily, hourly, and minute intervals.
If it involves integration for a portal, the number of users.
You can send this request form via Telegram/Twitter to initiate the integration/negotiation process.
Piteas Public API - SDK Beta Release
Piteas SDK beta release has been published. Please note that this version may contain errors and is in the development stage. Ensure you consider request limits.
To execute the swap process, sending the calldata on methodParameters from the response data to the PiteasRouter is sufficient. Adjust the necessary value data and gas estimate settings according to your conditions. Please also take a look at the router contract because the arguments in the response are defined for the conditions in the contract.
The SDK version is in the beta stage, so please avoid sending more than 10 requests per minute. Exceeding this limit may result in your blockage and cause access issues for one hour. Limits will be adjusted after the beta version.
📄ContractsRequest Example and API parameters
Example URL for 1,000,000 PLS to DAI 🔽 https://sdk.piteas.io/quote?tokenInAddress=PLS&tokenOutAddress=0xefD766cCb38EaF1dfd701853BFCe31359239F305&amount=1000000000000000000000000&allowedSlippage=0.50
Swap Quote Parameters
GET
https://sdk.piteas.io/quote
Get swap quote on Piteas SDK on Pulsechain
Query Parameters
Name | Type | Description |
---|---|---|
tokenInAddress* | string | Example: 0x2A06a971fE6ffa002fd242d437E3db2b5cC5B433 Use PLS for native token |
tokenOutAddress* | string | Example: 0x2A06a971fE6ffa002fd242d437E3db2b5cC5B433 Use PLS for native token |
amount* | integer | Amount with decimals |
allowedSlippage* | float | Default: 0.5 |
account | string | Receiver address. Not required and default account is msg.sender. |
A standard code use with ether.js to send a transaction to PiteasRouter:
Last updated