Exchanger Functions
Exchange to Credits
Exchanges the supported stablecoin tokens to Based Credits tokens at 1:1 ratio
POST
Exchange the supported stablecoin to Based Credits
This is a smart contract write function. The curl example shown is for illustration. To call this function, use web3 libraries (ethers.js, viem, web3.py) or JSON-RPC directly.
Body
application/json
Amount of tokens to exchange (in wei/smallest unit)
Example:
"1000000000000000000"
Response
Exchange successful
Exchange the supported stablecoin to Based Credits