# Parameters in system command not sent

**URL:** https://forum.kx.com/t/parameters-in-system-command-not-sent/9059
**Category:** Community Support
**Tags:** kdb-and-q
**Created:** [September 11, 2014, 2:23pm UTC](https://forum.kx.com/t/parameters-in-system-command-not-sent/9059 "2014-09-11T14:23:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Francisco1](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@Francisco1](https://forum.kx.com/u/Francisco1)
#### Post date: [September 11, 2014, 2:23pm UTC](https://forum.kx.com/t/parameters-in-system-command-not-sent/9059/1 "2014-09-11T14:23:00Z")

</div>

Hello I need to send to an REST API this command:&nbsp;

C:\\>curl -s -k -H “Authorization: Bearer MyToken” "[https://api-fxpractice.oanda.com/v1/candles?instrument=EUR\_USD&granularity=D&count=5&candleFormat=bidask](https://api-fxpractice.oanda.com/v1/candles?instrument=EUR%5C_USD&granularity=D&count=5&candleFormat=bidask)

It works without problems. getting a json structure. but when using q:

q)c:system “curl -s -k -H "Authorization: Bearer MyToken" [https://api-fxpractice.oanda.com/v1/candles?instrument=EUR\_JPY&granularity=D&count=5&candleFormat=bidask](https://api-fxpractice.oanda.com/v1/candles?instrument=EUR%5C_JPY&granularity=D&count=5&candleFormat=bidask)”

The first parameter instrument is sent correctly, but the parameters granularity, count and candleFormat are not sent:

“granularity” is not recognized as an internal or external command.

“count” is not recognized as an internal or external command.

“candleFormat” is not recognized as an internal or external command.

'os

changing & by %26 sends the whole string but it’s not accepted by the REST API

Any hint please?

Cheers

Francisco

---

<div class="post-metadata">

### Author: ![charlie1](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@charlie1](https://forum.kx.com/u/charlie1)
#### Post date: [September 11, 2014, 2:28pm UTC](https://forum.kx.com/t/parameters-in-system-command-not-sent/9059/2 "2014-09-11T14:28:00Z")

</div>

don’t you want to wrap that url in escaped quotes too?

q)c:system “curl -s -k -H "Authorization: Bearer MyToken" "https://api-fxpractice.oanda.com/v1/candles?instrument=EUR\_JPY&granularity=D&count=5&candleFormat=bidask"”

---

<div class="post-metadata">

### Author: ![Francisco1](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@Francisco1](https://forum.kx.com/u/Francisco1)
#### Post date: [September 11, 2014, 2:38pm UTC](https://forum.kx.com/t/parameters-in-system-command-not-sent/9059/3 "2014-09-11T14:38:00Z")

</div>

YES… Thanks a lot!
