I am a novice coder. I am hoping someone can spot my coding mistake(s).
Error:
{“error”:“unknown”,“error_details”:“json: cannot unmarshal string into Go value of type bool”,“message”:“json: cannot unmarshal string into Go value of type bool”}
Hi @DaveM! Welcome to Coinbase Cloud Developer’s forum!
We understand that you are having trouble with placing a sell order using the Create Order endpoint. In this regard, please note that we actually found a forum thread that is somehow similar to your case wherein the forumUser is also receiving a “Go” type of error. Based on the inputs from another forumUser, it was noted that such types of error usually happen when you try to put a different type of value versus what was expected. In your case, we can see that you have actually inputted a string value to a variable that expects a boolean. We suggest that you try rebuilding your code again and have the post_only value as boolean (False) and not as a string (“False”).
We hope this helps. Please do not hesitate to reply back to this thread if the issue still persists.
Hi @DaveM! We are glad that the suggested fix actually helped you to arrive with a working code. Thank you also for updating us about the boolean value that actually has to be in lowercase. Have a great day!