matveyco / cex.io-api-php

CEX.IO API integration. PHP sources.
MIT License
21 stars 27 forks source link

What is amount and what is price? #17

Open Lars- opened 7 years ago

Lars- commented 7 years ago

In this code:

// Place order of $ptype("buy"), for $amount(1), at $price(1), for $couple("GHS/BTC").
place_order($ptype, $amount, $price, $couple);

What is $amount and what is $price? Is $amount x GHS or x BTC and is $price x GHS or x BTC?

beefviper commented 7 years ago

I think in the case of GHS/BTC, $amount would be the amount of GHS you want to buy, and $price would be the price in BTC you're willing to pay for it.

Lars- commented 7 years ago

Well, I tried with an amount of "1" when using the BTC/EUR couple. So if I understand you correctly, it means that I want to buy 1 BTC with Euros, right? The error I get: There was an error while placing your order: Invalid amount. So why is 1 an invalid amount?