Skip to main content
Trading happens on Ault Core. An address that only exists on Ault EVM cannot place orders. Before the first order an account needs a trading account opened on Core, and collateral on the Core side. Opening a trading account is a one-time MsgOpenAccount transaction per account, and it charges a fee in a token the module accepts.
The Ault DEX API itself needs no account and no key. This page is about the on-chain trading account, which is what order transactions require.

Addresses

One secp256k1 key produces both address forms for the same account: They are two encodings of the same 20-byte identifier, so an existing Ault EVM address already has an Ault Core form and no new key is needed. Wallet setup for end users is covered in Connect a Wallet.

Converting Between Forms

Conversion is a re-encoding of the same 20 bytes. It involves no key, no signature, and no network call, so it can be done offline. The two forms below are the same account:
TypeScript, using @cosmjs/encoding:
Python, using the bech32 package:
The Ault SDK ships conversion and validation helpers, so an application already using it does not need either snippet.
The bech32 form must be lowercase, and its 6-character checksum means a mistyped address fails to decode rather than resolving to a different account. The hex form carries no such checksum: it is case-insensitive, and the mixed-case EIP-55 style is a display convention only. Validate hex input before use.
This API accepts either form on every endpoint that takes an address, so conversion is usually only needed for a tool that accepts one form and not the other.

Check Whether the Account Is Open

Account feature flags:
If a previously working account starts having orders rejected, check both of these along with the market’s active flag from Markets & Currencies. On chain the same state is the market’s halted field, and this API reports active as its inverse.

The Open Fee

The accepted tokens and amounts are module parameters, so read them rather than hardcoding a value:
allowed_fees lists every token the fee may be paid in, with the amount required for each. At the time of writing there is one entry: 1 USDC.e. Amounts are in 18-decimal units, so 1000000000000000000 is 1.
Read allowed_fees rather than assuming a token. Nothing excludes AULT by design, it simply is not in the list today, so an account holding only AULT cannot open. If the list holds several entries, any one of them satisfies the fee.
The denom identifies the token, so resolve it to a symbol through Markets & Currencies or the token registry rather than reading the address by eye. The fee goes to the community pool. It is not burned.

Opening From Ault EVM

MsgOpenAccount can be sent as a Cosmos transaction, or through the accountx precompile from Ault EVM: openAccount takes the address to open and the denomination to pay with, and the caller pays. The AccountOpened event reports account and payer separately, so one address can open another’s account. Pass feeDenom exactly as it appears in allowed_fees, which for an ERC20-paired token is the erc20:0x... form rather than a bare address.

Fund the Account

Bridged assets arrive on Ault EVM and must be moved to Core before they can be used. See Transfer Assets. Verify balances with Balances.

Fee-Free Gas

Account, agent, and order messages on Ault Core carry a fee-free gas allowance, so normal trading does not consume AULT. A transaction that exceeds its allowance, such as a batch large enough to run past it, pays gas in AULT as usual. Ault EVM transactions are not covered by this. Moving assets across the two layers pays EVM gas in AULT, so keep a small balance for that. See Transfer Assets. The per-message allowances are governance parameters. See Chain Queries for the endpoint that reports them.

Next

Trading API Key

Delegate order signing to a separate key.

Transfer Assets

Move assets to the side that settles trades.