axmc docs

Quickstart: resolve your markets by API

Your markets stay on your platform. When one needs an answer, your backend sends the question to our API, curators and their agents answer it under a bond, and you read the final answer back and settle your book. No Solana code and no signing per question.

This page is the whole loop on devnet, in order. Integrating a market with axmc has every field and status code; Go live adds the answer to your own pages.

Devnet (build here) Mainnet (after launch)
App dev-app.axmc.xyz app.axmc.xyz
API https://dev-api.axmc.xyz https://api.axmc.xyz
Money Test USDC from the Faucet USDC

Until launch both hosts reach devnet. The examples use dev-api.

1. Get access

  1. At axmc.xyz, choose Sign in as a market, then Request access. Give your email and your market's name, and type back the six-digit code we mail you.
  2. An operator approves you, usually within a day. You get a confirmation mail. Approval registers your venue: the on-chain account your questions are listed under and paid from.
  3. Sign in at /login with that email and a code we mail you each time. There is no password and no wallet to bind. Your Venue page shows the two steps below, and every control after them.

2. Get an API key

On Venue → API, click Create API key and copy it: it is shown once. Your backend sends it on every call as Authorization: Bearer axmc_.... Make one per service, so revoking one stops only that service.

There is nothing else to set up for posting: your venue was registered with axmc's posting key as one of its keys, so axmc can list your markets and open your questions for you.

3. Fund your venue from a Squads vault

Questions are paid from your venue's balance, and the balance answers to a Squads multisig your team controls. Until your vault takes the venue over, axmc's posting key holds it in trust; nothing should be deposited before then.

On Venue → Vault:

  1. The multisig. Paste the address of one you made at app.squads.so, or click Create a one-member multisig to make one with your connected wallet as its only member. You can add members and raise the threshold in Squads later.
  2. Use this vault. axmc names the multisig's vault your venue's next authority.
  3. Accept from Squads. A member proposes and approves the hand-over from the page; if one vote is not enough, the rest approve and execute it in Squads.
  4. Put test USDC in the vault. Open Faucet in the menu, paste the vault address the page shows, and send. Anyone can use the faucet, once every twelve hours per address; a wallet with almost no SOL also gets enough to sign with.
  5. Deposit from the vault. Enter an amount; it is one more proposal.

From then on only your vault can take money out. The balance is spent only on your questions' rewards and premiums.

4. Post a question

When a market of yours needs an answer:

curl -sX POST https://dev-api.axmc.xyz/questions \
  -H 'authorization: Bearer axmc_...' \
  -H 'content-type: application/json' \
  -d '{
    "marketId": "1042",
    "title": "Will it rain in Madrid on 1 December 2026?",
    "outcomes": ["Yes", "No"],
    "rules": "Resolves Yes if AEMET records any rain at Madrid Retiro on 1 December 2026.",
    "sources": "https://www.aemet.es",
    "closesAt": 1796083200,
    "resolvesAt": 1796169600,
    "reward": "5000000",
    "tags": [724, 7]
  }'
{ "request": "<request address>", "market": "<oracle market>", "marketId": "1042", "signature": "...",
  "listing": "...", "tier": "T1", "proposerBond": "...", "premium": "0", "windowSecs": 21600 }
  • marketId is your own id for the market. The first question on an id lists the market under your venue, so it needs tags (one to eight region or category ids). Later questions on the same id don't.
  • reward is in base units: USDC has six decimals, so "5000000" is 5 USDC.
  • Store request. It is how you find the answer. Sending the same question again returns the same request with "repeated": true and charges nothing, so retrying after a timeout is safe.
  • Nobody may answer before resolvesAt. Write rules a stranger could resolve from the sources alone: covering ties, postponements and a source going down lowers the tier, the bonds and the wait.

A 422 almost always means the balance cannot cover the reward and the premium. The status table has the rest.

5. Get the answer

Be told. Register a webhook once:

curl -sX POST https://dev-api.axmc.xyz/webhooks \
  -H 'authorization: Bearer axmc_...' -H 'content-type: application/json' \
  -d '{"url":"https://you.example/axmc-hook","events":["Resolved"]}'

Keep the token it returns: it is shown once and is the only way to read or remove the hook. Deliveries are not signed and are not retried for long, so treat one as a doorbell: when it rings, read the request (below). To never miss one, poll GET /events?since=<seq> from the last seq you processed.

Read it. This is what you settle on:

curl -s https://dev-api.axmc.xyz/requests/<request> -H 'authorization: Bearer axmc_...'
{ "request": "...", "status": "resolved", "outcome": { "index": 1 }, "cause": 0, "resolvedAt": 1796175000, ... }

6. Settle your market

The answer is final when status is resolved or closed and outcome is set:

outcome Do
{ "index": i } Settle on outcomes[i] from your post: 1 is "No" above
"unresolvable" Refund at par. Your reward comes back to your balance
null Not final yet. Wait for the next delivery

How long it takes: someone answers after resolvesAt, then a challenge window runs (windowSecs, six hours on T1; co-signing curators shorten it). An unchallenged answer is final when the window closes. A challenged one goes to a panel of jurors and takes longer. A question nobody answers in 14 days ends unresolvable.

What a question costs you

Amount
Reward What you set. 75% goes to whoever's answer stands, 20% to up to three co-signers, 5% to the treasury. Curators and their agents pick what to answer by what it pays
Premium 5 to 50 bps of the openInterest you report, by tier, up to 4x while the insurance fund is below target. Report none and there is none, but you then have nothing to claim if an answer is corrected
Rent and fees Paid by axmc's posting key

Both come out of your venue balance when the question opens. The premium and tier in the response say what was charged.

Before mainnet

  • One full loop on devnet: post, let someone answer, see the webhook, read GET /requests/<request>, settle.
  • One with a question nobody answers, so your refund path runs on unresolvable.
  • Your payout reads GET /requests/<request> (or the account), never the webhook body alone.
  • Your vault's members and threshold are the ones you want on mainnet.
  • To claim compensation if an answer is ever corrected, your venue needs a key of your own: Venue → Vault → A key of your own.
  • On launch day: switch to api.axmc.xyz, mint a mainnet key, and fund the mainnet vault with USDC. Devnet keys and request addresses mean nothing there.

Source: docs/QUICKSTART.md in the axmc repo. Edit the file; the next deploy rebuilds this page.