A user can create an exchange offer. Also, any user can select a suitable offer and exchange its mosaics for others using ProximaX Exchange Market. The market always has the ProximaX permanent offer for buying and selling any official mosaic.
There is a possibility to exchange any mosaic to XPX and vice versa. For example, you can exchange XPX to SO or SM, but there is no possibility to exchange SO to SM or vice versa. It is possible in two-step exchange: SO to XPX and after XPX to SM.
The exchange mechanism involves two types of actors with the following intentions:
- The Seller offers to sell M SO for N XPX. The formed price will be equal to M/N.
- The Buyer is interested in buying M SO at a price of no more than XPX per SO.
Any user (in this case, the Seller) may have mosaics, so it can offer the price and sell mosaics. After creating the sellOffer, the specified number of mosaics is deducted from the Seller’s account. As long as this offer exists, any Buyer can agree with the offer and buy mosaics. When the sellOffer time expires, unsold mosaics are returned to the Seller’s account.
The process of buying is similar to the sellOffer process. The only difference is the transaction type buyOffer instead of sellOffer
If any user creates sellOffer, the other interested users cannot buy less than 1 mosaic (SellOffer Example). In another case, when the user creates buyOffer and another interested user transfers more than the cost of 1 mosaics, it gets 1 mosaic anyway (BuyOffer Example).
Note Any user can create an exchange offer with a max duration of 10 days. But ProximaX can create offers with unlimited duration.
Announces a new exchange offer transaction.
Entity type: 0x415D
|AddOffer||array(OfferWithDuration, count)||A new offer that will be announced|
Announces an exchange transaction.
Entity type: 0x425D
|confirmations||array(MatchedOffer, count)||Exchange offer confirmations|
Announces a new remove exchange offer transaction.
Entity type: 0x435D
|removeOffers||array(OfferMosaic, count)||Offers that will be removed|
|Duration||uint64||The duration of the offer.|
|Owner||32 bytes||The owner of the matched offer|
|MosaicId||UnresolvedMosaicId||Mosaic id of the offer.|
|Mosaic||UnresolvedMosaic||Mosaic for exchange.|
|Cost||uint64||Sum of XPX suggested to be paid for mosaic.|