CurtainMarketsDocs
curtain/docs/apiLaunch app

API reference

Program instructions

InstructionWhoArgumentsEffect
initializedeployerdefaultscreates Config and the vault
set_pausedauthoritypausedblocks or unblocks new bets and new markets
set_defaultsauthoritydefaultsdefaults for future markets, within the ceilings
propose_authority, accept_authorityauthority, then the new keynew_authoritytwo-step handover
create_marketanyonefeed_id, strike, expiryone market per (feed, strike, expiry)
open_pursebettorenc_keycreates the bettor's purse
depositbettorcomputation_offset, amountpublic transfer in, then a sealed credit
place_betbettorcomputation_offset, bet, bet_key, bet_noncesealed bet and ticket
tallyanyonecomputation_offsetseals a due batch and asks for its sums
settle_marketanyonethe Pyth update accountapplies the print rule
refund_marketanyonenonerefunds a market after the 7-day grace with no print
claimanyonecomputation_offsetpays one position into its purse
withdrawbettorcomputation_offset, amountpublic transfer out if the purse holds it
release_purseanyonenonefrees a purse whose computation went unanswered for an hour
sweep_feesanyonenonemoves accrued fees to the fixed treasury

Each computation has a matching *_callback that only the Arcium program can deliver.

Events

EventFields
MarketCreatedmarket, feed_id, strike, expo, close_time, expiry
Depositedowner, amount
Creditedowner
BetQueuedmarket, owner, batch
BetSettledmarket, owner, batch, accepted
BatchSealedmarket, batch, tickets
OddsPublishedmarket, batch, tickets, yes_pool, no_pool
MarketSettledmarket, outcome, price, conf, publish_time, fee, dropped_tickets
Claimedmarket, owner
WithdrawSettledowner, amount, paid
ComputationAbortedaccount
Releasedaccount
FeesSweptamount

Constants

NameValueMeaning
BATCH_SLOTS8seats per batch
MIN_BATCH_FLOOR3lowest minimum batch the program accepts
MAX_FEE_BPS500fee ceiling, 5%
MIN_EPOCH_SECS, MAX_EPOCH_SECS30, 86,400epoch range
MAX_PRINT_DELAY_SECS60latest a settling print may land after the deadline
MAX_SETTLE_CONF_BPS100widest confidence band a settling print may carry
SETTLE_WINDOW_SECS15How long after the deadline a print may be published and still settle the market
RESOLVE_GRACE_SECS604,8007 days before a market without a print can be refunded
STUCK_AFTER_SECS3,600wait before an unanswered computation can be released

Site endpoints

PathReturns
/api/healthstatus, network, program id, stage
/api/landinglive Pyth SOL, BTC and ETH prices read from their Solana accounts
/.well-known/curtain.jsonprogram id and deployment status
Next: Errors