Skip to main content
GET
Calculate tokens to USD conversion
This is a smart contract view function. The curl example shown is for illustration. To call this function, use web3 libraries (ethers.js, viem, web3.py) or JSON-RPC directly.

Path Parameters

marketAddress
string
required

Address of the market contract

Pattern: ^0x[a-fA-F0-9]{40}$

Query Parameters

tokensIn
integer<int64>
required

Tokens in (positive when selling Based, negative when selling Cringe)

Response

200 - application/json

Conversion calculated successfully

tokensOut
integer<int64>

Tokens out from AMM

usdOut
integer<uint256>

USD received by user