WAVES Exchange rate

I am having someone develop a gateway for me so a website can accept my custom token (nootropicoin built on WAVES) as payment. My developer is asking how to code the exchange rate (nootropicoin to WAVES to USD) so it shows the correct amount in shopping cart.

Similar to this, only using Python.

I am not sure I am asking the correct question.
When a customer buys a product from a website, adds to shopping cart, and chooses to checkout. They can choose credit card or bitcoin. I want them to be able to choose nootropicoin as well. But I need real-time conversion of the amount of USD converted to Nootropicoin.

You can see example buy placing fake order on nootropics.com - which accepts bitcoin.

1 Like

How would that work Rob? Would you create a nootropicoin/usd or nootropic/waves pair on dex with your own orders to start with?

If you use WordPress combined with Woocommerce you can use our plugin for this

We use it ourselves on our shops:

Waves has a complete price api and it brings up this info in real time.
If you need something you can follow the example I incldued on top. It converts waves to usd.
If you need another asset try to use the asset id.
You can make an combination available on the dex.

Hi. Ideally, I would like a direct pair for nootropicoin/usd so when customer buy the product they will know how much usd they are spending instead of seeing 0.00000142 waves. This is just example.

What I really need is to have that calculated in REAL-TIME on the businesses shopping cart.

When a customer buys a product, let’s say $100USD, and they add to cart… They enter their credit card information and the shopping cart will charge them $100USD.
I would like to have an option for the customer to “pay with nootropicoin” and the shopping cart will automatically do the conversion and show how much nootropicoin is being charged.

Visit nootropics.com - which accepts bitcoin - and place an order as if you were buying all the way to the shopping cart. You will see that you can “pay with bitcoin” and it calculates the amount of bitcoin so when you scan the QR code with your wallet, it automatically fills in the correct amount as well as the correct wallet address to send to.

Thanks for sharing. But what if their business website is not built with wordpress?
The plugin/cart is not going to be on my website.

If I made a site to sell something, used wordpress, and added a shopping cart, I could easily use this. But what if my site was built in WIX, or php, or ruby, or java?

Clipto… Also, I checked out the wavesnode.net link you provided.

How do I get my token listed here as you state on your page?

Here are screen grabs from my test order at nootropics.com.

During checkout, I chose to pay with bitcoin. It shows me the amount in USD and also provides the amount in bitcoin and a QR code. When I scan the code it autofills the correct amount in my wallet. This means that the QR code is generated on the fly, dynamically, to give the customer the correct amount.


This is only possible when the USD-nootropics pair is active. If not you will always need to go from nootropics to waves to usd.
However I don’t see why this can’t be calculated real time? Since the marketdata api provides the last traded price you can pretty accurate calculate the price in usd.

yes thats right… it depends on having an active usd/nootropics pair . I’m wondering if the last trade was weeks ago (or longer) its potentially not really real-time tho?

The ticker shows the last 24h closing price. This means if last trades was weeks ago the price results in a 0.
This meaning that if the price is zero he will need to catch this in his program.

Thank you, Surely I can find someone who can program the nootropicoin>waves>usd logistics. I wish I knew how to code…

How does one get the pair nootropicoin/usd active?

You just go to the dex, on one side your nootropicoin, on other side usd and then do a buy and sell on both sides to yourself and initial price is set. From there free market will do it’s job, ask and demand, but however you can still keep trading on the pair as MM.

Thank you. Got it. I always wondered how to trade it against the USD.

Got it. All set. Thank you!!

You’re welcome.
Feel free to ask anything anytime!

If you do at least one trade of your token to the waves pair it gets listed there automatically.
It’s a quick way to check if the plugin could see an active trading price.

Yes sir. I did a buy and sell order to myself for each token I have and they are now listed. Now I just need to get millions of people to trade. :wink: