⛓️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.

📄pageContracts

Request 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

NameTypeDescription

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.

{
  "srcToken": {
    "address": "0xA1077a294dDE1B09bB078844df40758a5D0f9a27",
    "symbol": "WPLS",
    "decimals": 18,
    "chainId": 369
  },
  "destToken": {
    "address": "0xefD766cCb38EaF1dfd701853BFCe31359239F305",
    "symbol": "DAI",
    "decimals": 18,
    "chainId": 369
  },
  "srcAmount": "0xd3c21bcecceda1000000",
  "destAmount": "0x2e33260eb8b008f09",
  "gasUseEstimate": 4025000,
  "gasUseEstimateUSD": 0.033025699048724835,
  "methodParameters": {
    "calldata": "...",
    "value": "0xd3c21bcecceda1000000"
  },
  "route": {
    "paths": [
      [...],
      [...],
      [...]
    ],
    "swaps": [
      {...},
      {...},
      {...}
    ]
  }
}

Last updated