XChain Platform Action - ORDER
This action creates a order to sell an item on the Decentralized Exchange (DEX).
PARAMS
| Name | Type | Description |
|---|---|---|
VERSION |
String | Format Version |
GIVE_COIN |
String | COIN name (BTC, LTC, DOGE, etc) |
GIVE_TICK |
String | Ticker name or Ticker ID |
GIVE_AMOUNT |
String | Quantity of GIVE_TICK to escrow in the orde |
GET_COIN |
String | COIN name (BTC, LTC, DOGE, etc) |
GET_TICK |
String | Ticker name or Ticker ID |
GET_AMOUNT |
String | Quantity of GET_TICK requested in return |
GET_ADDRESS |
String | Address to receive GET_TICK on GET_COIN network |
EXPIRATION |
String | Timestamp of when order should expire, in Unix time |
ALLOW_LIST |
String | ACTION_INDEX of a LIST of addresses allowed to match order |
BLOCK_LIST |
String | ACTION_INDEX of a LIST of addresses NOT allowed to match order |
GIVE_OWNERSHIP |
String | When 1, escrow ownership of GIVE_TICK instead of a balance amount (default 0) |
GET_OWNERSHIP |
String | When 1, require the matcher to currently own GET_TICK and transfer that ownership (default 0) |
MEMO |
String | An optional memo to include |
ORDER_ACTION_INDEX |
String | ACTION_INDEX of existing ORDER |
Formats
Version 0 - Create Order
VERSION|GIVE_COIN|GIVE_TICK|GIVE_AMOUNT|GIVE_OWNERSHIP|GET_COIN|GET_TICK|GET_AMOUNT|GET_OWNERSHIP|GET_ADDRESS|EXPIRATION|ALLOW_LIST|BLOCK_LIST|MEMO
Version 1 - Cancel Order
VERSION|ORDER_ACTION_INDEX|MEMO
Version 2 - Edit Order
VERSION|ORDER_ACTION_INDEX|EXPIRATION|ALLOW_LIST|BLOCK_LIST|MEMO
Examples
ORDER|0|BTC|RAREPEPE|1|BTC|PEPECASH|10000000.00000000||||Selling my RAREPEPE cuz mom in hospital
This example creates an order to sell 1 RAREPEPE for 10,000,000.00000000 PEPECASH and includes a memo
ORDER|0|BTC|PEPECOIN|1000|BTC||0.05000000||||Selling PEPECOIN for BTC
This example creates a native coin pair order: sell 1000 PEPECOIN tokens for 0.05 BTC.
GET_TICK is empty (native coin). Matched orders create a COINPay obligation instead of instant settlement.
ORDER|0|BTC||0.05000000|BTC|PEPECOIN|1000||||Buying PEPECOIN with BTC
This example offers 0.05 BTC to buy 1000 PEPECOIN tokens.
GIVE_TICK is empty (offering native coin). No token escrow occurs for the native coin side.
ORDER|1|1234|Closing order, no buyers, much disappoint
This example cancels the existing ORDER with `ACTION_INDEX` 1234 and includes a memo
ORDER|2|1234|4321|||Updating order to only sell to club member addresses
This example updates an existing `ORDER` with `ACTION_INDEX` 1234 and adds an `ACTION_INDEX` to `ALLOW_LIST` 4321 and includes a memo
ORDER|0|BTC|JDOG||1|BTC||0.50000000||||||Selling JDOG ownership for 0.5 BTC
This example sells ownership of the JDOG tick for 0.5 BTC. `GIVE_OWNERSHIP=1` with empty `GIVE_AMOUNT` escrows the ownership record. Native coin on the GET side creates a COINPay obligation on match; ownership is delivered when COINPay settles.
ORDER|0|BTC|JDOG||1|BTC|PEPECASH|10000000.00000000||||||Selling JDOG ownership for 10M PEPECASH
This example sells ownership of JDOG for 10,000,000 PEPECASH balance — settled atomically on match.
ORDER|0|BTC|PEPECASH|100000||BTC|JDOG||1|||||Bidding 100K PEPECASH for JDOG ownership
This example offers 100,000 PEPECASH for ownership of the JDOG tick. The matcher must currently own JDOG; on match, JDOG ownership transfers to this order's SOURCE.
ORDER|0|BTC|JDOG||1|BTC|PEPECOIN||1|||||Swapping JDOG ownership for PEPECOIN ownership
This example trades ownership of JDOG for ownership of PEPECOIN. Both sides escrow ownership; on match, ownerships swap atomically.
Rules
Native Coin Pairs
- An empty/null
GIVE_TICKorGET_TICKindicates native coin (BTC/LTC/DOGE) on that side - Both
GIVE_TICKandGET_TICKcannot be empty simultaneously (coin-for-coin is a regular blockchain transaction) - When
GIVE_TICKis empty (offering native coin): no balance check, no escrow — the obligation to pay is created at match time and fulfilled viaCOINPAY - When
GET_TICKis empty (requesting native coin): theGIVE_TICKtokens are escrowed normally - Native coin amounts are validated using
COIN_DECIMALS(8 decimal places for BTC/LTC/DOGE) - Expiration fees are charged regardless of whether the order involves native coin
- When matched, native coin pairs create a
pending_coinpayORDER_MATCH instead of instant settlement - Cancelling an order with pending COINPay obligations sets status to
cancellinginstead ofcancelled; obligations must resolve before the order is finalized - Order expiration with pending COINPay obligations sets status to
expiring; same deferred finalization
Token Ownership Sales
GIVE_OWNERSHIP=1requires SOURCE to be the current owner ofGIVE_TICK;GIVE_AMOUNTmust be empty; the ownership record moves into a protocol-held escrow stateGET_OWNERSHIP=1requires the matcher’s SOURCE to be the current owner ofGET_TICK;GET_AMOUNTmust be empty- Ownership orders are single-fill only — ownership is indivisible; the entire order matches against one counterparty or none (no partial fills on the balance side either)
- While ownership is escrowed, the following actions targeting the escrowed
TICKare rejected:ISSUEVersions 1–5 (description/mint/lock/callback/list edits)CALLBACK,SLEEPLINKusing thisTICK’sISSUEasCOIN2_ACTION_INDEXFILEwithGATE_TICKER= thisTICK- New child
ISSUEusing thisTICKas a parent (period-separated name) - Additional
ORDER/SWAP/DISPENSERownership offers for thisTICKfrom the original owner
- Holder-side actions are unaffected:
SEND,MINT(if mint window open),DIVIDENDpayouts,DEPOSIT/WITHDRAW,DESTROYof held balance - Child
TICKs (e.g.JDOG.SUB1) have independent ownership records and are not transferred when a parent’s ownership is sold — sell each child separately if needed - On match: ownership transfers atomically to the counterparty’s SOURCE
- On cancel (Version 1) or
EXPIRATION: ownership returns to the original SOURCE - When matched against a native-coin counterparty: ownership remains in escrow as a
pending_coinpayobligation and is delivered to the buyer onceCOINPAYsettles; if the obligation expires or is cancelled, ownership returns to the original SOURCE
Sweep Closure
- When
SWEEPis broadcast from this order’s SOURCE withORDERS=1, the order is cancelled and the escrowedGIVE_TICKbalance (orGIVE_OWNERSHIPownership record) is credited to the SWEEPDESTINATIONrather than returned to SOURCE (seeSWEEP)
Notes
- Use
^(caret) as prefix when passingTICK_IDforTICKfield (^1234 =TICK_ID1234) - Cross-chain orders (
GET_COIN≠ the posting chain) escrow the GIVE side locally and are matched + settled by the validator federation — not the local DEX. The match is delivered to each chain and settled from escrow with no per-trade on-chain transaction. See Cross-Chain DEX.
Copyright © 2025–2026 Dankest, LLC
Based on XChain Platform by Dankest, LLC – https://dankest.llc
Licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-or-later) with a commercial license available for proprietary use.
You may use, modify, and distribute this material under the terms of the License. See LICENSE and NOTICE for full terms. See the licensing overview.