Skip to main content
POST
Buy position through router
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
marketAddress
string
required

Address of the market

Pattern: ^0x[a-fA-F0-9]{40}$
amount
integer<uint64>
required

USD amount to buy

Required range: x >= 1
isBased
boolean
required

Whether to buy Based (true) or Cringe (false) position

minAmountReceived
integer<uint64>
required

Minimum size of position to receive

Required range: x >= 0
deadline
integer<uint256>
required

Unix timestamp after which transaction will revert

Response

Position bought successfully through router

transactionHash
string

Transaction hash

Pattern: ^0x[a-fA-F0-9]{64}$
blockNumber
integer<uint256>

Block number where transaction was mined

gasUsed
integer<uint256>

Amount of gas used

success
boolean

Whether transaction was successful