GuidesBuild schemas by venue
Rain
Step zero — from nothing to your first trade
Section titled “Step zero — from nothing to your first trade”- Create the account. Start at the venue’s site and connect an Arbitrum EOA. Predictefy has no verified information on whether Rain registration is required or what identity check applies; confirm that prerequisite with the venue.
- Set up signing. A fresh user must first create an EVM wallet and secure the seed phrase offline. Rain needs no caller API credential: the wallet signs and broadcasts locally, and Predictefy never sees its private key.
- Fund it. Hold USDT on Arbitrum and a little ETH for gas. Start with at least 1 USDT for a limit
buy; a sell must also meet 1 USDT of notional. Approve only the per-market Diamond
with a finite allowance. If your funds are on another chain, use
GET /v1/bridge/quoteas the assisted LI.FI route. - Allow time. Budget about 1–2 hours for a first wallet, bridge, and approval; an already-funded Arbitrum wallet is faster. Predictefy has no verified Rain-specific geo gate, so confirm venue eligibility before funding.
What you need first
Section titled “What you need first”- Production status: Enabled for build, submit, and cancel. Hosted
submit verifies the signed transaction and records
signed; broadcasting remains client-owned. - Wallet and chain: Only an Arbitrum EOA (
42161) is supported. It signs and broadcasts the raw transaction. Contract-wallet and smart-account signatures are not supported. - Venue account: The venue uses no account credential. Predictefy has no verified information on whether Rain registration is required; confirm that prerequisite with the venue.
- Credentials: No caller venue credential enters the service. The EOA private key and selected RPC remain in the caller’s process.
- Funding: Arbitrum USDT in the EOA, with a finite approval to the per-market Diamond. The LI.FI helper can fund the wallet.
Rain’s standard hosted order path is a LIMIT build. Omit action or set it to
"limit"; choose orderSide: "BUY" or "SELL". The opt-in action: "market" path requires
explicit slippage and deadline protection. action: "approve" remains available for the pool’s
USDT allowance.
Every build resolves the pool Diamond from the catalog. Caller-supplied pool fields cannot
replace it. At one pinned Arbitrum block, the server verifies that the pool’s FACTORY() is the
official RainDeployer, its UUPS implementation, createdPools(pool), Arbitrum USDT with a 1e6
scale, and every required
facetAddress(selector) route on that pool. A mismatch returns
RAIN_POOL_SAFETY_CHECK_FAILED and no calldata. Pools created by the verified official deployer
build normally. Pools from the newer deployer whose implementation is not yet source-verified are
refused with RAIN_POOL_SAFETY_CHECK_FAILED and return no unsigned transaction.
For LIMIT builds:
| Field | BUY | SELL |
|---|---|---|
| Quantity | amount: base-token atoms (Arbitrum USDT, 6dp) | shares: share atoms (6dp) |
| ABI | placeBuyOrder(option, side, price, amount, postOnly) | placeSellOrder(option, side, price, shares, postOnly) |
| Minimum | amount >= 1_000_000 (1 USDT) | shares * price / 1e18 >= 1_000_000 |
| Phase | Order-book phase only | Order-book phase only |
price is an integer string scaled by 1e18: 0.01e18 through 0.99e18, in exact 0.01e18
one-cent ticks. BUY’s fourth ABI argument is base-token amount; SELL’s same-position, same-type
argument is shares. Swapping those units is rejected before calldata is built.
Approve the pool allowance
Section titled “Approve the pool allowance”action: "approve" builds the USDT allowance for the pool that the catalog selects. Send amount
as a positive integer string in USDT atoms: "1000000" is 1 USDT. amountAtoms is accepted as an
alias for amount. The server chooses the catalog pool as the spender, so you cannot name a
different one.
{ "dryRun": true, "marketId": "<catalog Rain market ID>", "owner": "<Arbitrum EOA address>", "action": "approve", "amount": "1000000"}The example is a request body for POST /v1/exec/rain/orders/build, not a signed transaction. It
passes the same pool safety checks as every other build.
For protected market builds, provide slippageBps from 1 through 9999 and
deadlineSecondsFromNow from 1 through 3600. Zero slippage is rejected because a zero minimum
disables protection. The server reads the live block timestamp, uses getEntryShares for BUY or
getSellProceeds for SELL, derives a nonzero minSharesOut/minAmountOut, and encodes an
absolute Unix-seconds deadline. The duration itself is never encoded as the deadline.
enterOption can execute in a live AMM phase or an order-book phase. Verified sellOption requires
the order-book phase and is rejected during an AMM pool’s live window. The AMM-only
getCurrentPrice, getImpactedPrice, and target-price-first getAmountRequired views are not used
for order-book quotes.
Rain permits fewer than 50 active BUY orders and fewer than 50 active SELL orders per option/user. The venue counts them per order direction, not by YES/NO. A partial remainder below $0.10 does not rest: BUY dust is refunded and SELL dust remains available. These limits and the 1 USDT minimum surface as typed errors before signing.
Cancel one stored limit build through the standard cancel route and provide its emitted positive
uint256 orderId. The server inherits option, side, price, owner, and BUY/SELL direction from the
stored build and encodes cancelBuyOrders or cancelSellOrders as one scalar option plus three
parallel one-element arrays. Cancel has no phase gate.
Predictefy returns only unsigned {to,data,value}. The client signs and broadcasts on Arbitrum.
Submit recovers the owner, pins chain 42161, byte-compares all three fields, and records signed;
it never relays or claims a broadcast. Check GET /v1/exec/venues for the current availability
state.