Coin Echange

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


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