Paymium/api-documentation

Cannot place limit order with python API

Opened this issue · 2 comments

On python, i'm trying to execute a limit order with the "user/orders" endpoint with the payload:

{
  "type": "LimitOrder",
  "currency": "EUR",
  "direction": "buy",
  "price": price_btc,
   "currency_amount": amount_eur,
 }

The error keeps occuring:

/post error for https://paymium.com/api/v1/user/orders: 422 - {"errors":["Amount can't be blank","Amount is not a number"]}

That does not align with the documentation which says: "Either one of amount or currency_amount must be specified. on https://paymium.github.io/api-documentation/#tag/Order/paths/~1user~1orders/post

Thank you for reporting this problem and I agree, the documentation is not precise on this point.
To clarify, in the case of a limit order, the parameters to be used are only the amount and the price.

currency_amount or amount can be used, but only in the case of a market order.