I'm getting null "order_configuration" as part of the create_order response

Creating an order via the create_order endpoint works fine. I can verify in the app that the expected order has been successfully created.

However, I noticed that the response is always returning null value for the order_configuration field (see image below). Is this expected or is a bug?

Hi @fox89! We’ve received your inquiry about getting a null value for the order_configuration field when calling for the Create Order endpoint of Advanced Trade. To ensure that this is addressed accurately for you, we would like you to provide us first with the following information:

  • Can you share with us the code snippet including the body parameters you used when creating an order? Please ensure to remove any sensitive information related to your account.
  • Can you share with us the full response data including the response status code you are receiving when creating an order?
  • If possible, can you also share with us the order details you were seeing using the app, so that we could match it with the response data you are getting?

Once you send us the requested information, we’ll work quickly to address your concern. Thank you and have a great day!

Below is the requested info:

  1. Code used when creating an order:
        request_path = "/api/v3/brokerage/orders"
        method = "POST"

        payload = {
            'client_order_id': client_order_id,
            'product_id': product_id,
            'side': side,
            'order_configuration':{
                "limit_limit_gtc": {
                    "limit_price": ".19",
                    "base_size": "5"
                }
             }
        }

        headers = self._build_request_headers(method, request_path, json.dumps(payload))
        response = requests.post(self._base_url+request_path, json=payload, headers=headers)
  1. Full Request/Response:
REQUEST:
< POST /api/v3/brokerage/orders HTTP/1.1\r\n< Host: coinbase.com\r\n< User-Agent: python-requests/2.28.1\r\n< Accept-Encoding: gzip, deflate\r\n< accept: application/json\r\n< Connection: keep-alive\r\n< CB-ACCESS-KEY: REDACTED\r\n< CB-ACCESS-TIMESTAMP: 1673126663\r\n< CB-ACCESS-SIGN: REDACTED\r\n< Content-Length: 161\r\n< Content-Type: application/json\r\n< \r\n< {"client_order_id": "nkjsdfnw23", "product_id": "ALGO-USD", "side": "SELL", "order_configuration": {"limit_limit_gtc": {"limit_price": ".19", "base_size": "5"}}}\r\n\r\n> 

RESPONSE:
HTTP/1.1 200 OK\r\n> Date: Sat, 07 Jan 2023 21:24:23 GMT\r\n> Content-Type: application/json; charset=utf-8\r\n> Transfer-Encoding: chunked\r\n> Connection: keep-alive\r\n> Access-Control-Allow-Headers: Content-Type, Accept, Second-Factor-Proof-Token, Client-Id, Access-Token, X-Cb-Project-Name, X-Cb-Is-Logged-In, X-Cb-Platform, X-Cb-Session-Uuid, X-Cb-Pagekey, X-Cb-Ujs, Fingerprint-Tokens, X-Cb-Device-Id, X-Cb-Version-Name\r\n> Access-Control-Allow-Methods: GET,POST,DELETE,PUT\r\n> Access-Control-Allow-Private-Network: true\r\n> Access-Control-Expose-Headers: \r\n> Access-Control-Max-Age: 7200\r\n> Cache-Control: no-store\r\n> Strict-Transport-Security: max-age=31536000; includeSubDomains; preload\r\n> Trace-Id: 3929073878429114106\r\n> Trace-Id: 3929073878429114106\r\n> Vary: Origin\r\n> X-Content-Type-Options: nosniff\r\n> X-Dns-Prefetch-Control: off\r\n> X-Download-Options: noopen\r\n> X-Frame-Options: SAMEORIGIN\r\n> X-Xss-Protection: 1; mode=block\r\n> CF-Cache-Status: DYNAMIC\r\n> Set-Cookie: __cf_bm=REDACTED; path=/; expires=Sat, 07-Jan-23 21:54:23 GMT; domain=.coinbase.com; HttpOnly; Secure; SameSite=None\r\n> Server: cloudflare\r\n> CF-RAY: 785fc290995fcf49-SJC\r\n> Content-Encoding: gzip\r\n> \r\n{"success":true,"failure_reason":"UNKNOWN_FAILURE_REASON","order_id":"5b107502-71c9-4e3e-97d8-4f807319444f","success_response":{"order_id":"5b107502-71c9-4e3e-97d8-4f807319444f","product_id":"ALGO-USD","side":"SELL","client_order_id":"nkjsdfnw23"},"order_configuration":null}
  1. Order details can be found above (see 2.)

I far as I understand, this is the expected behavior. The message you receive from successfully placing an order is not the full order response, but more of a receipt/ack message that it was placed. Querying using the returned order id will give you the full details and order configuration object back. This is fairly common across exchanges, though some give you the option to get back an ack or a full response, like Binance US.

I can reason with that, and it was precisely my question whether or not this is expected. If this is the expected behavior, I will find it confusing that the example response in the doc contains order_configuration, not null. I’d expected doc, the example’s response and reality aligned.

Hi @fox89! Thank you so much for providing us additional information and we appreciate your patience as we look into this.

We would like to inform you and @brendano257 that order_configuration’s value of the Create Order endpoint response must not be null but rather a specific value, as seen on the example response in this documentation. Hence, we also would like to inform you that the null value you’ve received before is indeed a bug. With this, please note that our team has already fixed this issue and thus, moving forward, you shouldn’t experience receiving a null value in the order_configuration parameter of the Create Order endpoint.

Please feel free to reply back to this thread if you have other queries or concerns. Have a great day!

CONFIRMED it appears fixed on my end. Thank you!

1 Like