In my transaction below I have 2 problems. The first problem is that I do not know what is causing the “reject_reason” to be “REJECT_REASON_UNSPECIFIED” and the “trigger_status” is set as “INVALID_ORDER_TYPE”. Is the record rejected or not? The second problem is that the “status” is set to “FILLED”. Why would an invalid order be filled? This record is very hard to understand what is happening so my program does not know what to do. Any insight would be greatly appreciated.
Also, I can not CANCEL the order via the API. Not sure whats going on…
{
[“info”]=>
array(34) {
[“order_id”]=>
string(36) “78fda388-bdc1-48c1-ada7-c9579eef235a”
[“product_id”]=>
string(7) “ADA-USD”
[“user_id”]=>
string(36) “590d8960-786c-5041-92d5-898a416bad4c”
[“order_configuration”]=>
array(1) {
[“limit_limit_gtc”]=>
array(3) {
[“base_size”]=>
string(1) “7”
[“limit_price”]=>
string(6) “0.3812”
[“post_only”]=>
bool(false)
}
}
[“side”]=>
string(3) “BUY”
[“client_order_id”]=>
string(36) “5b6a1596-d897-4922-8ac2-1fc8f7e898cd”
[“status”]=>
string(6) “FILLED”
[“time_in_force”]=>
string(20) “GOOD_UNTIL_CANCELLED”
[“created_time”]=>
string(27) “2023-11-20T19:49:55.058635Z”
[“completion_percentage”]=>
string(6) “100.00”
[“filled_size”]=>
string(1) “7”
[“average_filled_price”]=>
string(6) “0.3812”
[“fee”]=>
string(0) “”
[“number_of_fills”]=>
string(1) “1”
[“filled_value”]=>
string(6) “2.6684”
[“pending_cancel”]=>
bool(false)
[“size_in_quote”]=>
bool(false)
[“total_fees”]=>
string(9) “0.0106736”
[“size_inclusive_of_fees”]=>
bool(false)
[“total_value_after_fees”]=>
string(9) “2.6790736”
[“trigger_status”]=>
string(18) “INVALID_ORDER_TYPE”
[“order_type”]=>
string(5) “LIMIT”
[“reject_reason”]=>
string(25) “REJECT_REASON_UNSPECIFIED”
[“settled”]=>
bool(true)
[“product_type”]=>
string(4) “SPOT”
[“reject_message”]=>
string(0) “”
[“cancel_message”]=>
string(0) “”
[“order_placement_source”]=>
string(15) “RETAIL_ADVANCED”
[“outstanding_hold_amount”]=>
string(1) “0”
[“is_liquidation”]=>
bool(false)
[“last_fill_time”]=>
string(27) “2023-11-20T21:18:42.548254Z”
[“edit_history”]=>
array(0) {
}
[“leverage”]=>
string(0) “”
[“margin_type”]=>
string(19) “UNKNOWN_MARGIN_TYPE”
}
[“id”]=>
string(36) “78fda388-bdc1-48c1-ada7-c9579eef235a”
[“clientOrderId”]=>
string(36) “5b6a1596-d897-4922-8ac2-1fc8f7e898cd”
[“timestamp”]=>
int(1700509795058)
[“datetime”]=>
string(27) “2023-11-20T19:49:55.058635Z”
[“lastTradeTimestamp”]=>
NULL
[“symbol”]=>
string(7) “ADA/USD”
[“type”]=>
string(5) “limit”
[“timeInForce”]=>
string(3) “GTC”
[“postOnly”]=>
bool(false)
[“side”]=>
string(3) “buy”
[“price”]=>
float(0.3812)
[“stopPrice”]=>
NULL
[“triggerPrice”]=>
NULL
[“amount”]=>
float(7)
[“filled”]=>
float(7)
[“remaining”]=>
float(0)
[“cost”]=>
float(2.6684)
[“average”]=>
float(0.3812)
[“status”]=>
string(6) “closed”
[“fee”]=>
array(2) {
[“cost”]=>
string(9) “0.0106736”
[“currency”]=>
NULL
}
[“trades”]=>
array(0) {
}
[“fees”]=>
array(1) {
[0]=>
array(2) {
[“cost”]=>
float(0.0106736)
[“currency”]=>
NULL
}
}
[“lastUpdateTimestamp”]=>
NULL
[“reduceOnly”]=>
NULL
[“takeProfitPrice”]=>
NULL
[“stopLossPrice”]=>
NULL
}