Skip to main content
This walks the whole path, from an empty script to a resting limit order on-chain. Six steps, four of them HTTP calls to Aura. The important structural point up front: Aura never holds your keys and never submits your transaction. The API builds an unsigned transaction, you sign it locally, and you submit it to an Alephium node yourself. That means a compromised Aura API cannot move your funds, and it also means you cannot place an order without a local signer.
Run this against testnet first. Same API, same flow, test tokens. Base URL https://api.testnet.aura.markets, node https://node.testnet.alephium.org.

Before you start

You need three things:

A wallet key

An Alephium private key you can sign with in your process. A browser extension works for interactive apps, but a bot needs a local key.

USDT for collateral

Buy orders lock collateral. Aura settles in USDT at 18 decimals.

A little ALPH

Around 0.21 ALPH per order covers gas plus the refundable storage deposits Alephium charges for the order entries.

Step 1: Request a challenge

Authentication is a wallet signature. Ask for a challenge string first.
The challenge is human-readable and includes a nonce and an expiry, so what you sign is legible rather than an opaque hash:

Step 2: Sign the challenge

Sign it with Alephium’s message hasher. The 'alephium' prefix matters, and signing the raw bytes instead will be rejected.
Sign the challenge string exactly as returned, including newlines. Trimming whitespace or normalizing line endings changes the hash and the signature will fail to verify.
If you are working in a language without an Alephium SDK, the signing scheme is specified byte by byte in Authentication.

Step 3: Create a session

Exchange the signature for a session. Bots should pass issueToken: true to get a bearer token in the response body instead of relying on cookies.
keyType must match your address. Use default for a standard Alephium wallet (addresses starting 1), or gl-secp256k1 for an Aura embedded wallet (addresses starting 3). The same value has to be passed again in step 4.
Tokens last 30 days. Bearer sessions are exempt from CSRF, which is the main reason to prefer them for automation. Cookie sessions require an x-csrf-token header on every mutating request.

Step 4: Build the unsigned transaction

Now the actual order. Pick a market from your first API call, then:
That is a bid for 1 yes share at 50%. The response hands back everything you need to sign and everything you should check first:
Check collateralRequired before you sign. It is 0.5125 USDT here, not 0.5, because it includes the 2.5% trading fee: price × quantity ÷ 1000 × 1.025. Signing without reading this is how bots overspend.

Order constraints

Sell orders lock shares rather than USDT, so collateralRequired comes back zero for them.

Step 5: Sign the transaction

Aura built it. You sign it.

Step 6: Submit to Alephium

Submit to a node, not to Aura. Aura has no submit endpoint, by design.
Comparing the returned txId against the one Aura predicted is a cheap integrity check. If they differ, the transaction you signed is not the transaction Aura built, and you should stop rather than retry.

Confirm it landed

Chain confirmation and indexer visibility are separate. Once the transaction is in a block, poll until Aura’s indexer has picked it up:
Once indexed is true, the order shows up in the book and in GET /v1/markets/{market}/orders. For anything real-time, subscribe to the realtime stream rather than polling this.

The whole thing

When it goes wrong

The bearer token expired or the header is malformed. It must be Authorization: Bearer <token>. Bearer sessions do not slide, so re-run steps 1 through 3 on a 401 rather than retrying the build.
signerAddress in step 4 has to be the wallet that signed the challenge in step 2. You cannot build a transaction for a different address than the one you authenticated as.
INVALID_FILL, and almost always a quantity that is not a multiple of 10000000. See Error codes.
INVALID_PRICE. Ticks must be 1 to 999 inclusive.
Each order writes storage entries on Alephium, which requires a refundable deposit on top of gas. Keep at least 0.21 ALPH free per order in flight. You get the deposit back when the order is filled or cancelled.

Next

Integrator guide

Cancels, elevated rate limits, and running this at volume.

Build-tx flow

Every other transaction Aura can build: stakes, votes, claims, proposals.

Realtime stream

Watch your order fill instead of polling for it.

Error codes

Decode an on-chain revert.
Last modified on July 29, 2026