Coin Exchange

From Nxt Wiki
Jump to: navigation, search
This page contains changes which are not marked for translation.


OUTDATED All the content related to the Ardor platform has been migrated to https://ardordocs.jelurida.com Please refer to https://ardordocs.jelurida.com/Coin_exchange for getting access to the last version of this article


1 Description

Use coin exchange to trade child chain tokens on the blockchain using buy and sell orders and a builtin matching engine.

1.1 Calculate the Exchange Rate

For example to calculate the AEUR to IGNIS exchange rate

To get the best ask price get the "askNQTPerCoin" attribute from the first result of getCoinExchangeOrders with chain 2 and exchange 3 and convert it to 4 decimals

To get the best bid price get the "bidNQTPerCoin" attribute from the first result of getCoinExchangeOrders with chain 3 and exchange 2 and convert it to 4 decimals

To get the last trade price get the "exchangeRate" rate attribute from the first result of getCoinExchangeTrades with chain 3 and exchange 2

2 More

To be continued