Build a trade from a forecast
build_orderTurns your forecast of Bitcoin's settlement price into a trade on this week's market and returns unsigned transactions (approve, then buy) to sign and send in order. Give EITHER quantiles (easiest) OR probs. It buys more where you're more confident than the crowd. Budget is in tUSDC including the fee, 1 to 10000.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| probs | No | Alternative: one probability per price range from get_market, in index order. Normalized for you. | |
| budget | Yes | tUSDC to spend, fee included. maxCost adds your slippage allowance on top | |
| wallet | No | Your wallet, to check balance and skip the approval if it's already granted | |
| quantiles | No | Your forecast as BTC prices in USD at the 5th, 10th, 25th, 50th, 75th, 90th and 95th percentiles, e.g. [76000, 77500, 79500, 81000, 82500, 84500, 86000] | |
| slippageBps | No | Price-move allowance in basis points, default 100 |