Try above api with a rest client with following sample requests.
1)Multiple Stocks.
XML request: JSON response : 2) Single Stock
XML request: JSON response (As an array): This is with following message formatter and builder
<messageformatter class="org.apache.synapse.commons.json.JsonStreamFormatter" contenttype="application/json" />
<messageformatter class="org.apache.synapse.commons.json.JsonStreamFormatter" contenttype="application/json" />