AXIS Docs

Using AXIS

Trading with the AXIS

A step-by-step guide to the AXIS trading interface on Stellar Testnet: set up a wallet, place orders, swap tokens and manage your orders.

The Demo AXIS app currently runs on the Stellar Testnet, where tokens have no real value, so it is safe to experiment.

Before you start#

You need:

  • A Stellar wallet. The app supports Freighter, Albedo and xBull wallets. Make sure your wallet uses the Stellar Testnet.
  • A funded Testnet account. If your account is new, the app shows "Account not yet funded on Testnet" with a "Fund via Friendbot" button. Click it to receive free test XLM.
  • Trustlines For the assets you want to receive, see below.

Add trustlines#

To hold USDC, EURC or CETES tokens, your account needs a trustline for each. XLM needs none. Add them in your wallet before you trade, using the codes and issuers below, or let the AXIS app create them: when the asset you would receive has no trustline, the trade and swap forms show a "trustline" link that creates it with one transaction signed in your wallet. Each trustline locks 0.5 XLM of reserve, which you get back when you remove it.

Asset Issuer
USDC GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5
EURC GB3Q6QDZYTHWT7E5PVS3W7FUT5GVAFC5KSZFFLPU25GO7VTC3NM2ZTVO
CETES GC3CW7EDYRTWQ635VDIGY6S4ZUF5L6TQ7AA4MWS7LEQDBLUSZXV7UPS4

Without a trustline, or with a trustline that has no room left under its limit, an order that would pay you in that asset fails with "You cannot receive the bought asset". The trade and swap forms warn you before you submit, and offer to create a missing trustline or raise the limit of a full one. A swap into that asset fails with a token error. With trustlines in place, you can get test USDC, EURC or CETES from a Testnet facet (https://faucet.circle.com/) or by swapping test XLM.

Connect your wallet#

  1. Open dex-demo.axis.markets. On your first visit a welcome dialog lists the supported assets. Click "Let's roll!".
  2. Click "Connect wallet" in the top bar.
  3. Choose Freighter, Albedo or xBull, and approve the connection in your wallet.

The button now shows your shortened address. Click it to disconnect.

Pick a market#

Click the market name next to the AXIS logo to open the market list, then search for a market and click it. Markets show as BASE/QUOTE, for example XLM/USDC: prices are in USDC per XLM and amounts in XLM.

Read the trading screen#

Interface section What it shows
Market strip Last price, 24h change, 24h high, 24h low, 24h volume in the base asset, and 24h trades.
Chart Price candles. Timeframes are 5m, 15m (the default), 30m, 1h, 4h, 1d, 1w and 2w.
Orderbook tab Price levels for each side, with sell orders (asks) on top, buy orders (bids) below and the spread in between. The GROUP control merges prices into coarser levels (plus button) or splits them into finer ones (minus button).
Depth tab A cumulative depth chart of both sides.
Trades tab Recent trades on the market.

The orderbook and depth chart count only the backed part of each order.

Place a limit order#

  1. In the trade panel, choose the buy or sell tab, for example "Buy XLM" or "Sell XLM" on the XLM/USDC market.
  2. Select "Limit".
  3. Enter the price in the quote asset, or click a row in the orderbook to copy its price.
  4. Enter the amount in the base asset. You can also click 25%, 50%, 75% or 100% to use part of your available balance, or type a Total in the quote asset.
  5. Check the Order Value and click the "Buy XLM" or "Sell XLM" button.
  6. Review the transaction in your wallet and sign it.

A notification shows the result, for example "Bought 16.7 XLM (68% executed), new order created". The part that filled right away is already in your wallet. Any unfilled remainder stays on the book as an open order with no expiration.

The Network Fee line in the form shows the most the transaction can cost, worked out by simulating your order once you stop typing. It includes the storage rent of a new order. Your wallet also shows a maximum before you sign, which can be higher than the form's figure. The network charges the same either way. The app cannot edit orders: to change one, cancel it and place a new one.

Place a market order#

  1. Choose "Buy XLM" or "Sell XLM" and select "Market". The price field shows the current mid price and cannot be edited.
  2. Enter the amount in the base asset.
  3. Click the buy or sell button and sign in your wallet.

The app asks the AXIS API for the orders that cover your amount and uses the worst price among them as your limit. If the book cannot cover the whole amount, the app stops with "Not enough liquidity for a market order" before you sign. Nothing stays on the orderbook. If the book changes before your transaction lands, you may get less than the full amount, and the rest stays in your wallet. See Market orders.

Swap tokens#

  1. Click "Swap" in the top bar.
  2. Choose the asset you pay and the asset you receive. The ⇅ button flips them.
  3. Enter an amount in one of the two fields:
    • In "You pay" for an exact input. You pay this amount and receive at least the amount quoted when you click "Swap". "Max" enters your whole available balance.
    • In "You receive" for an exact output. You receive exactly this amount and pay at most the estimate.
  4. Check the Rate and the Route, for example XLM → USDC → EURC.
  5. Click "Swap" and sign in your wallet.

There is no slippage setting. When you click "Swap", the app gets a fresh quote and accepts nothing worse: at least its output for an exact input, at most its cost for an exact output. If the book moves against you before your transaction lands, the swap fails with "Order cannot be executed in full" and nothing moves. See Swaps across several markets.

One signature per action#

Each order or swap needs one wallet signature. If your allowance on the token you sell is too small or about to expire, the app adds the approval to the same transaction. See How the AXIS app grants it.

Open orders#

The OPEN ORDERS tab at the bottom lists your orders with SIDE, PAIR, TYPE, PRICE, AMOUNT, FILLED and CREATED. The "This market only" box, checked by default, limits the list to the current market.

Two tags can appear next to the pair:

  • pending means the order was just created and the indexer has not confirmed it yet.
  • N% backed means your balance or allowance in the token you sell no longer covers the whole order. Hover over it to see your balance, your allowance and the allowance's expiry ledger. Fills larger than the backed part are skipped.

To restore full backing, add tokens to your wallet. If the allowance is short or expired, cancel the order and place it again, which grants a fresh allowance for all your open orders selling that token. See Order backing.

The app also notifies you when one of your orders is partially filled, filled or expires.

Cancel orders#

  • One order: click ✕ at the end of its row and sign.
  • All orders: click "Cancel All". It cancels every open order on the current market, or on all markets when "This market only" is unchecked. The app sends one transaction per 90 orders, so you may need to sign more than once.

Canceling does not change your allowance. See Revoking an allowance if you want to remove it.

Order history#

The ORDER HISTORY tab lists orders that are no longer open, with their status: FILLED, CANCELED or EXPIRED.

Common error messages#

Errors appear in the form and in a notification, such as "Buy failed: Insufficient balance".

Message text What it means What to do
Insufficient balance You do not hold enough of the token you sell. Lower the amount or add funds.
Insufficient token allowance The allowance does not cover the order. Try again. The app then adds an approval.
You cannot receive the bought asset An order would pay you in an asset you have no usable trustline for, or your trustline for it is full. Add the trustline, or raise its limit.
A token transfer between you and a maker was refused A token payment inside the trade failed. There can be a problem with your balance or allowance. Check your balance, then try again with a fresh quote.
The issuer of this asset has not authorized AXIS to hold it yet The asset requires issuer authorization, and its issuer has not authorized the AXIS contract, which passes the asset on to you. Nothing to do on your side. Try another asset or wait for the issuer.
Order cannot be executed in full A swap could not deliver its quoted result, usually because the book moved. Try again to get a fresh quote.
Order size is below the minimum trade size The order is worth less than the minimum (0.001 USD on Testnet) or too small to store. Increase the amount.
Market is not open The market has not been opened, or the oracle quotes neither asset. Try another market. Anyone can open a market.
No recent oracle price for this market The cached oracle price is older than 72 hours. Wait for a keeper to refresh it. Market orders and swaps still work.
Trading is temporarily frozen The safety admin has paused trading. Wait. You can still cancel orders.
Transaction rejected in wallet You declined the signature request. Submit again and sign.
No liquidity for a market order The orderbook is empty. Place a limit order instead.
Not enough liquidity for a market order The book cannot fill your whole amount, or no quote is available, for example while trading is frozen. Lower the amount or place a limit order.
Not enough liquidity on the DEX. The available orders cannot fill the whole swap. Try a smaller amount or another pair.

Developers can find every contract error code in Errors.