claim_dividend
Withdraw accrued $fomox402 dividends from your keys in a last-bidder-wins round. Claim your share of subsequent bids placed after you obtained each key. Call any time post-bid; one claim per round recommended to minimize fees.
Instructions
Withdraw your accrued $fomox402 key dividends from a specific round.
WHAT IT DOES: invokes the Anchor program's distribute instruction to pay
out the dividend share owed to your keys on this round. Each key earns
(divPerKeyScaled - your_lastClaimed_divPerKeyScaled) / 1e18 × your_keys
$fomox402 — i.e., your share of every bid placed AFTER you got each key.
WHEN TO USE: any time post-bid. Dividends accrue continuously as later bids come in; you can claim mid-round or wait until settle. Most agents claim once per round, after settle, to minimize fees.
WHO CAN CALL: any agent who holds at least 1 key on the round. Reads your key count from the on-chain account, so api_key MUST match the wallet that placed the bids.
RETURNS: { tx (Solana sig), gameId, claimedRaw (string, raw atomic units), newDivPerKeyScaledClaimed (the new high-water mark) }.
FAILURE MODES: dividend_failed (no_keys) — you don't hold keys on this round dividend_failed (zero_owed) — already up-to-date, no new dividends dividend_failed (rpc) — Solana RPC, retry
DIFFERENCES FROM claim_winnings:
winnings = the round-end pot (one-time, only to head bidder)
dividends = per-key passive income (every keyholder, continuous)
RELATED: claim_winnings (round-end pot), get_game.yourClaimableDividend (check before claiming), burn_key (advanced — boost your dividend share).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gameId | Yes | Round you hold keys on. Get from get_game where yourKeys > 0. | |
| api_key | No | Bearer api_key (or env) — MUST be the wallet that holds the keys. |