Coinigy / api

Coinigy API Examples
162 stars 65 forks source link

AddOrder Response - <pre> tag #9

Closed jevdiego closed 6 years ago

jevdiego commented 7 years ago

Noticed in the last few days that I'm receiving an unexpected response when placing a sell order on Liqui.

Here is my request code

var request = require('request');

    request({
          method: 'POST',
          url: 'https://api.coinigy.com/api/v1/addOrder',
          headers: {
            'Content-Type': 'application/json',
            'X-API-KEY': API_KEY,
            'X-API-SECRET': API_SECRET
          },
          body: "{  \"auth_id\":"+  auth_id +",  \"exch_id\":" + exch_id + ",  \"mkt_id\":" + mkt_id + ",  \"order_type_id\":" + order_type_id + ",  \"price_type_id\":" + price_type_id + ",  \"limit_price\":" + rate + ",  \"order_quantity\":" + quantity + "}"
        }, function (error, response, body) {
            winston.debug("[placeOrderSell] Response Received: ", body);
}

This is what I'm receiving in the 'body':

<pre>Array
(
    [pair] => gno_eth
    [type] => sell
    [amount] => 0.13
    [rate] => 1.26271351
)
</pre><pre>Array
(
    [success] => 1
    [return] => Array
        (
            [received] => 0.13
            [remains] => 0
            [order_id] => 0
            [funds] => Array
                (
                    [gno] => 0.06676548478
                    [eth] => 2.9836044990406
                )

        )

)
</pre>{"data":{"internal_order_id":"XXXXXXXX"},"notifications":[]}

I've just removed the actual order ID.

Why is there data within a <pre> tag? According to the documentation, I should just be receiving a JSON reponse. Or have I missed something?

williamkehl commented 7 years ago

Apologies, looks like this was inadvertently left in while debugging! Should be updated.

jevdiego commented 7 years ago

Ok thanks

jevdiego commented 6 years ago

Sorry, forgot to close