mehdi shokati
mehdi shokati

Reputation: 39

curl get json data

I am trying to get data from a server by curl in json format and the command is below:

curl -X GET https://api.coinex.com/v1/market/kline?market=BCHBTC&type=1min -H "Accept: application/json" 

I got the error:

{"code": 2, "data": {}, "message": "invalid params"}

The command works well in the following website:

https://reqbin.com/req/c-vdhoummp/curl-get-json-example

Upvotes: 0

Views: 192

Answers (1)

LostJon
LostJon

Reputation: 2387

you need to surround your URL with single quotes

curl -X GET 'https://api.coinex.com/v1/market/kline?market=BCHBTC&type=1min' -H "Accept: application/json" 

Upvotes: 1

Related Questions