coinbase/coinbase-advanced-py

Issue when sending limit orders

Closed this issue · 5 comments

order = client.limit_order_ioc(client_order_id="clientOrderId",product_id='LTC-USD',limit_price='82.9',base_size='1',side='BUY')

This was/is well over limit price (about one dollar) but can't see any execution in Coinbase account.

Market orders work just fine for me.

{
"success": true,
"failure_reason": "UNKNOWN_FAILURE_REASON",
"order_id": "vvvv-4ef9-9587-fc71dee4f912",
"success_response": {
"order_id": "vvvd2a-4ef9-9587-fc71dee4f912",
"product_id": "LTC-USD",
"side": "BUY",
"client_order_id": "clientOrderId"
},
"order_configuration": {
"sor_limit_ioc": {
"base_size": "1",
"limit_price": "82.9"
}
}
}

Also how can I sell (market or limit) 1 LTC for instance? Could not find that in documentation :(

order = client.market_order_sell(client_order_id="clientOrderId",product_id='LTC-USD',base_size='0.01')

print(dumps(order, indent=2))
{
"success": true,
"failure_reason": "UNKNOWN_FAILURE_REASON",
"order_id": "vd2a-4ef9-9587-fc71dev",
"success_response": {
"order_id": "vvvd2a-4ef9-9587-fc7v12",
"product_id": "LTC-USD",
"side": "SELL",
"client_order_id": "clientOrderId"
},
"order_configuration": {
"market_market_ioc": {
"base_size": "0.01"
}
}
}

Thank you for reporting! If this is an SDK specific issue, we will look into it and get back to you soon. If this is an API related request, report it in our Advanced API Discord instead (use this invite link if it's your first time accessing the Discord).

Figured it out!

  1. client_order_id needs to be a unique string or nothing happens
  2. engine spits out "success": true,
    "failure_reason": "UNKNOWN_FAILURE_REASON",

if it accepts order and/or executes order. Really confusing!