Hi I have a question about buy method. Recently I received successful message from Poloniex I run once buy order method with option immediateOrCancel. I get two trades instead of the expected one.

{'orderNumber': '269159954730', 'amountUnfilled': '0.00000000', 'resultingTrades': [{'total': '0.00323034', 'tradeID': '16775174', 'amount': '0.10364748', 'rate': '0.03116670', 'date': '2018-04-22 10:59:11', 'type': 'buy'}, {'total': '0.05271018', 'tradeID': '16775175', 'amount': '1.68942915', 'rate': '0.03120000', 'date': '2018-04-22 10:59:11', 'type': 'buy'}]}

Could someone help me with that or say why it's happend?


What was your purchase amount set at? 0.03120000??

It would appear that you tried to buy at 0.03120000

however as there was a sell order already placed at 0.03116670 you filled that order first, then completed your buy with the rest of the amount at the 0.03120000

  • 1
    1,77 but it bought 1,79 amount of currency. So your answer helped me a lot, thanks. In the order book didn't be offer to complete exactly that amount. I bought aproximetely amount.
    – mrberner
    Apr 24 '18 at 8:57
  • Another question is that which price should be chosen as opening price? if my offer would have 3 resultingTrades, I can each amount add together and have control over it. But I have three diffrent rates.
    – mrberner
    Apr 24 '18 at 10:24
  • Your opening price is set by you when u make the buy order at that amount. If someone posts a lower offer you will fill these orders first, but this will not be seen as an opening price. I believe you only have control over the amount u specify to buy at (ie your opening price)
    – Fuzzybear
    Apr 24 '18 at 10:42
  • hmm, I set opening price through passing it to function from this wrapper here There is buy(amount, rate, orderType) Of course I can control amount, and opening price from resultingTrades, but there will be different rates depend on how much trade will fill my entire amount. Rate from response on successful trade is necessary to achieve provided strategy. But you said that I only have control over amount, true because not always my rate and amount will be available in order book.
    – mrberner
    Apr 24 '18 at 11:26

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .