Get order status details

I’m trying to get this and keep having issues. Does it need the security key and all to get the order details? Could someone post an example in python?

Any help is appreciated

This is what I have. I keep getting Unauthorized. Should there be something for payload rather than “” ?

request_path = “/api/v3/brokerage/orders”
method = “GET”

conn = http.client.HTTPSConnection(“api.coinbase.com”)

payload = “”

message= str(timestamp) + method + request_path + payload
signature = hmac.new(secret_key.encode(“utf-8”), message.encode(“utf-8”), hashlib.sha256).hexdigest()

headers={
“Content-Type”: “application/json”,
“CB-ACCESS-KEY”: api_key,
“CB-ACCESS-TIMESTAMP”: timestamp,
“CB-ACCESS-SIGN”: signature}

conn.request(“GET”, “/api/v3/brokerage/orders/historical/3199ba75-a13c-42ce-a6e6”, payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode(“utf-8”))

That was a fake ID i used for the order…just as an example. Just can’t get this to work. I mean I got buys and sells to work just can’t get the order status to work.

Hmm, wrong path? request_path = “/api/v3/brokerage/orders vs. /api/v3/brokerage/orders/historical/3199ba75-a13c-42ce-a6e6

1 Like

Thanks. I thought later in the code where it had the full path was where that needed to go. I guess it needed the extra info for the authentication as well. Thanks.