Router Functions
Buy
Buy a position in a market through the router with safety checks and deadline protection
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
Address of the market
Pattern:
^0x[a-fA-F0-9]{40}$USD amount to buy
Required range:
x >= 1Whether to buy Based (true) or Cringe (false) position
Minimum size of position to receive
Required range:
x >= 0Unix timestamp after which transaction will revert
Buy position through router