Create Order Unauthorized

I tried “List Account” and it works fine.

But when I try to make a call to “Create Order” I get this response:

status: 401,
  statusText: 'Unauthorized',
  headers: AxiosHeaders {
	date: 'Mon, 21 Nov 2022 13:51:26 GMT',
	'content-type': 'text/plain; charset=utf-8',
	'content-length': '13',
	connection: 'keep-alive',
	'trace-id': '8879571135508286073',
	'x-content-type-options': 'nosniff',
	'cf-cache-status': 'DYNAMIC',
	'set-cookie': [
	  '__cf_bm=u4_NvlbvKXlpELomKsfIG_CLU1uT2SmCnzNWZWpfKZE-1669038686-0-AXqc1ElBRitPOjdlvig7MFtxWwCQhFIVa5+Irk+B4IQa6rDaXXtxiw1czGpmPXNTAxDxkgfkizXf/YdtzJjamF8=; path=/; expires=Mon, 21-Nov-22 14:21:26 GMT; domain=.coinbase.com; HttpOnly; Secure; SameSite=None'
	],
	'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
	server: 'cloudflare',
	'cf-ray': '76d9e66b1cff0e12-MXP',
	[Symbol(defaults)]: null
  },
  config: {
	transitional: {
	  silentJSONParsing: true,
	  forcedJSONParsing: true,
	  clarifyTimeoutError: false
	},
	adapter: [Function: httpAdapter],
	transformRequest: [ [Function: transformRequest] ],
	transformResponse: [ [Function: transformResponse] ],
	timeout: 0,
	xsrfCookieName: 'XSRF-TOKEN',
	xsrfHeaderName: 'X-XSRF-TOKEN',
	maxContentLength: -1,
	maxBodyLength: -1,
	env: { FormData: [Function], Blob: [class Blob] },
	validateStatus: [Function: validateStatus],
	headers: AxiosHeaders {
	  Accept: 'application/json',
	  'CB-ACCESS-KEY': '******CENSURED*********',
	  'CB-ACCESS-SIGN': '******CENSURED*********',
	  'CB-ACCESS-TIMESTAMP': '1669038685',
	  'content-type': 'application/json',
	  'User-Agent': 'axios/1.1.3',
	  'Accept-Encoding': 'gzip, deflate, br',
	  [Symbol(defaults)]: [Object]
	},
	method: 'post',
	url: 'https://api.coinbase.com/api/v3/brokerage/orders',
	body: '{"side":"BUY","order_configuration":{"market_market_ioc":{"quote_size":"11.00"}},"client_order_id":"4f6f5eae-71d4-5bf1-a31f-0cb470cca7e5","product_id":"ETH-EUR"}',
	data: undefined
  },

Could you tell me why.
Thank you

Can you post the code you used to send the order?

I’m guessing you copied from the example code that Coinbase provided, but used Axios to send the request? I see “data: undefined” in your error. The example uses request, which uses the body object to send data. Axios uses the data object. Try defining your order params as data:{order details} instead.