DecentralChainDecentralChain
  • Technologysubmenu
    Why DecentralChainWhat sets this chain apartHow the chain worksPublic blocks, public validatorsBlockchain featuresWhat is on, what is being voted onFinalityThe rollback bound, and what is unverifiedRIDEContracts that cannot run foreverFor machinesUnsigned transactions and RIDE in processSolana bridgePhantom and Solflare, mainnet onlyNetwork statusHeight, sync and peers, read live
  • Ecosystemsubmenu
    DCC public saleOpens 26 SeptemberDecentralCoinSupply, allocation and tokenomicsDecentral.ExchangeexternalDecentralPropDecentralScansoonCubensis ConnectDecentralAmericasoon
  • Developerssubmenu
    QuickstartRead, compile and composeREST APIEvery endpoint, no key, no accountSDK packages19 on npm, 5 in the workspaceSigningAuthorising without custodyMCP & AgentsThe chain, and the tools we have builtDecentralChain NodeRun a validator, and what LPoS pays
  • Communitysubmenu
    ChannelsTelegram, X and the reposDCC AirdropAllocated, not yet arrangedGovernanceWho can actually decide anythingBrand kitThe mark, and how to use it
  • Documentation
XGitHub
Start buildingarrow
DecentralChainDecentralChain

An open Layer-1 with Leased Proof of Stake.

Native token: DecentralCoin (DCC)

Fixed supply 100,000,000 DCC
Minted at genesis, never inflated

  • X
  • GitHub
  • Telegram

Build

  • Quickstart
  • REST API
  • SDK packages
  • Signing
  • MCP & Agents
  • Documentation

Ecosystem

  • DCC public sale
  • DecentralCoin
  • Decentral.Exchange
  • DecentralProp
  • DecentralSwap
  • Cubensis Connect

Network

  • Blockchain features
  • Finality
  • RIDE
  • Solana bridge
  • Run a node
  • Network status

Project

  • Community
  • DCC Airdrop
  • Governance
  • Brand kit
  • GitHub
mainnetHeight—Node—read from your browser
© 2026 DecentralChainOperated by DecentralExchange · Cédula Jurídica 3-102-956858
Jacó, Garabito, Costa Rica
TermsPrivacySecurityLicensingdecentralchain.io
Documentation/DecentralChain

Order

DecentralChain

  • Account
  • Token (Asset)
  • Transaction
  • Block
  • Node
  • Order
  • Oracle
  • Mainnet, Testnet, Stagenet
  • Protocol
  • Binary Format

Order is the instruction from the account to matcher to buy or sell a token on the exchange.

Asset Pair

Each order contains amount asset / price asset pair, also called asset pair.

Example

"assetPair": {
    "amountAsset": "3QvxP6YFBKpWJSMAfYtL8Niv8KmmKsnpb9uQwQpg8QN2",
    "priceAsset": "null"
}

Asset Pair Fields

Asset Pair Fields
Field nameDescription
amountAssetID of the pair's first asset, that the order's sender wants to buy or sell.
priceAssetID of the pair's second asset, in which the price of the order is expressed. null value means that asset is DecentralCoins.

Order's Amount and Price

In the user interface, the amount and price are usually presented as values with a fractional part (for example, 0.74585728 DecentralCoins), i.e. in the denormalized form. The denormalized form is convenient for humans, but not for calculations. To solve the problem of calculation accuracy, the normalization is performed.

In the user interface, the amount and price are usually presented as values with a fractional part (for example, 0.74585728 DecentralCoins), i.e. in the denormalized form. The denormalized form is convenient for humans, but not for calculations. To solve the problem of calculation accuracy, the normalization is performed, i.e. amount and price are represented as an integer. So, 0.74585728 DecentralCoins is 0.74585728 × 10^{8} or 74585728 Decentralites. In this case, the exponent is 8, because DecentralCoins has 8 decimals after the decimal point. Other assets may have different amount of decimals. For example, TDX has 2 decimals.

Amount

Consider buying 2.13 TDX at the price of 0.35016774 DecentralCoins for one TDX. Here the asset pair is TDX / DecentralCoins. The amount in the order is the number of units sold or bought in conventional "pennies". This value in the current case is 213, since 2.13 TDX = 2.13 × 10^{2} = 213` "pennies" of TDX. So, to bring the amount to the normalized form, it is multiplied by 10^{amountAssetDecimals}.

Price

Price is the value of 1 unit of the amount asset, expressed in the price asset. In the TDX / DecentralCoins example above, this is the price in DecentralCoins for 1 TDX. To normalize price, it is multiplied by:

  • In orders of versions 1, 2, 3: 10^{(8 + priceAssetDecimals - amountAssetDecimals)}.
  • In orders of version 4: at 10^{8}.

The exponent of 8 is selected because there cannot be an asset with the exceeding quantity of decimals on the DecentralChain blockchain. The matcher algorithm has a limitation in relation to price: the last N digits of the normalized price must be zeros (N is price_decimals minus amount_decimals). If this is not so, then the matcher rejects the order on placement.

Price Asset Quantity Calculation

The quantity of price asset in normalized form which:

  • Will be given by sender if order is BUY.
  • Will be acquired by sender if order is SELL.

Is calculated by the following formula: amount × price × 10^{(priceAssetDecimals - amountAssetDecimals - 8)}.

  • In orders of versions 1, 2, 3: amount × price × 10^{-8}
  • In orders of version 4: amount × price × 10^{(priceAssetDecimals - amountAssetDecimals - 8)}.

If the result of the calculation is a value with a fractional part, then the fractional part is discarded. Designations in the above formula:

  • Amount — amount in normalized form.
  • Price — price in normalized form.
  • PriceAssetDecimals — the number of decimal places of the price asset.
  • AmountAssetDecimals — the number of decimal places of the amount asset.

Order Cancellation

The order sender may cancel the order before it is executed. Unexecuted orders are automatically canceled at the date and time specified by the order sender.

Order Expiration Date

Order expiration date is the date and time of automatic cancellation of an unexecuted order. The date is specified in milliseconds which have passed since the beginning of the unix epoch. The expiration time can't be earlier than matcher time + 1 minute and later than matcher time + 30 days.

Order Timestamp

Order timestamp is the time when the matcher added the order to the order book. The time is specified in milliseconds that have passed since the beginning of the unix epoch.

Order Binary Format

See the order binary format page.

PreviousNodeNextOraclearrow

Elsewhere on this site

Blockchain featuresarrowWhich protocol features are switched on, read from a mainnet node while you look at it.FinalityarrowHow far the tip can be reorganised, and what a confirmation policy can sit on.