Hi,
I was hoping someone better qualified would answer, but looks like you got me. Google "wire current rating" to find lots of advice on sizing cables. A 24V 40W load draws about 2A, so according to the table at [
www.powerstream.com] you should be good with 18 AWG or better, and that's being very conservative.