API reference
Read a coinflip table
GET
/v2/coinflips/{id}Read a coinflip-table order with an owner session or destination proof.
Authentication: Required: the order’s owner session in X-Session-ID, or the destination proof ?verify=<destination-address> (read-only).
#Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string (pattern ^[A-Za-z0-9:_-]{1,128}$) |
Yes | Public order identifier. Not a credential: every read still requires the owner session or the destination proof. |
#Response
200 returns an object with:
orderId· string · requiredproduct·"coinflip"· requiredstatus·"awaiting_deposit"·"awaiting_xmr1"·"awaiting_trx1"·"awaiting_zec1"·"processing"·"completed"·"failed"·"expired"·"refunded"·"needs_review"· requiredasset·"xmr"·"btc"·"sol"·"eth"·"zec"· required — Coinflip-table pool asset key, never a display symbol.direction·"deposit"·"withdraw"— deposit mints the wrapped asset from a native-coin deposit; withdraw returns the native coin against the wrapped asset.chainId· integer or null · required — Non-negative integer chain identifier.toAddress· string or null · requireddepositAddress· string · requiredcreatedAt· string or null · requiredupdatedAt· string or null · requiredfromChainId· integer or null — Non-negative integer chain identifier.depositChainId· integer or null — Non-negative integer chain identifier.fromToken· stringdepositToken· stringfromTokenSymbol· stringdepositTokenSymbol· stringfromTokenDecimals· integer (0–36)depositTokenDecimals· integer (0–36)fromAmount· stringdepositAmount· stringtoChainId· integer or null — Non-negative integer chain identifier.toToken· stringtoTokenSymbol· stringtoTokenDecimals· integer (0–36)expectedOutput· stringdepositTxHash· string or nullreceivingTxHash· string or nullsessionId· string or nullrefundAddress· string or nullrefundRequestedAt· string or nullexpiresAt· stringamountUsd· numberbonusStage·"none"·"coinflip"coinflipRequested· booleanfundingProvider·"privy"or nullintegratorFeeUsd· number or nullcustomerState· one of the variants below · required — Authoritative customer display/action state. Clients must not infer lifecycle from status or resource presence.- kind = "awaiting_deposit"
- kind = "processing"
- kind = "action_required"
- kind = "paused"
- kind = "completed"
- kind = "refunded"
- kind = "expired"
- kind = "failed"
confirmations· numberrequiredConfirmations· numberdepositObserved· booleanerrorMessage· string or null · requiredactualOutput· string — What the customer received, in atomic units ofdeliveredTokenwhen present, otherwise oftoToken. Only on completed orders.deliveredToken· object — Present only when the order completed in a different asset thantoToken;actualOutputis then denominated in this token.chainId· integer · required — Non-negative integer chain identifier.token· string · requiredsymbol· string · requireddecimals· integer (0–36) · required
coinflipLost· boolean · requiredhasReview· boolean · requiredrefundRecovery· object or nullkind·"wrong_chain"·"source"·"table_deposit"· requiredphase·"address_required"·"requested"·"in_progress"· requiredchainId· integer · required — Non-negative integer chain identifier.asset· object · required- Nested fields: see
openapi.json.
- Nested fields: see
amountAtomic· string · requiredrequestedAt· string or null · requiredsuggestedAddress· string — An address the order already has on file for this chain (for table_deposit, the table's payout address), offered as the prefill while phase is address_required. An offer only: nothing is sent to it until it is submitted.destination· object — Where the refund goes once that is decided (phase requested or in_progress). source is customer when someone submitted the address, sender when the refund returns to the wallet the deposit came from without anyone having to submit one.- Nested fields: see
openapi.json.
- Nested fields: see
rewards· objectstatus·"pending"·"earned"·"not_eligible"· requiredwagyuEarned· number · requiredwagyuBonusEarned· number · requiredwagyuCompensation· numberwagyuTotalEarned· number · requiredpolicyKey· string or null · required
maxPayoutUsd· numberdestination· stringdepositAddressForms· array of objectkind·"shielded"·"transparent"· requiredaddress· string · required
coinflip· object or nulleligible· boolean · requiredaccepted· boolean or null · requiredseedHash· string · requiredclientSeed· string · requiredassetSymbol· stringassetKey·"xmr"·"trx"·"zec"or"xmr"·"btc"·"sol"·"eth"·"zec"— Asset a coinflip was staked in: a table pool asset or a bridge asset.result· numberwon· booleanserverSeed· stringresolvedAt· stringside·"cow"·"milk"or nullcurrentRound· numbercurrentMultiplier· numberfinalMultiplier· number or nullfinalWon· boolean or nullrounds· array of object- Nested fields: see
openapi.json.
- Nested fields: see
policy· object- Nested fields: see
openapi.json.
- Nested fields: see
decisionDeadline· stringmode·"session"balanceAtomic· string (pattern^0*[0-9]+$) — Non-negative base-10 integer in the asset’s atomic unit.creditedInAtomic· string (pattern^0*[0-9]+$) — Non-negative base-10 integer in the asset’s atomic unit.wageredAtomic· string (pattern^0*[0-9]+$) — Non-negative base-10 integer in the asset’s atomic unit.minBetAtomic· string (pattern^0*[0-9]+$) — Non-negative base-10 integer in the asset’s atomic unit.maxBetAtomic· string (pattern^0*[0-9]+$) — Non-negative base-10 integer in the asset’s atomic unit.wagyuPoints· numberrefusal·"not_a_positive_amount"·"above_balance"·"below_minimum"·"below_payout_minimum"·"above_exposure_cap"·"limits_unavailable"pendingTopUp· object- Nested fields: see
openapi.json.
- Nested fields: see
Errors use the standard error envelope: branch on code, never on the message.
#Example
curl
curl 'https://api-beta.wagyu.xyz/v2/coinflips/<orderId>' \
-H 'x-session-id: <sessionId>'JavaScript
const res = await fetch('https://api-beta.wagyu.xyz/v2/coinflips/<orderId>', {
headers: {"x-session-id":"<sessionId>"},
});
const data = await res.json();Python
import requests
res = requests.get('https://api-beta.wagyu.xyz/v2/coinflips/<orderId>', headers={"x-session-id":"<sessionId>"}, timeout=30)
data = res.json()No response is captured for this route: it needs a real order. The response fields above come from the live contract.