waditu / tushare

TuShare is a utility for crawling historical data of China stocks
BSD 3-Clause "New" or "Revised" License
12.88k stars 4.29k forks source link

how to using this interface with C/C++ #1339

Open 19504643 opened 4 years ago

19504643 commented 4 years ago

I'm not familiar with python but c, how can I using this interface with c/c++ to get all these data, can u give the final GET or POST urls with parameters

huanghyw commented 4 years ago

I'm not familiar with python but c, how can I using this interface with c/c++ to get all these data, can u give the final GET or POST urls with parameters

you can try this
https://tushare.pro/document/1?doc_id=130

19504643 commented 4 years ago

@huanghyw tks, I tested it with curl, and just could not parse the json results with unicode, it does not show the chinese correctly image

icedream2linxi commented 4 years ago

You can try redirecting to jq. For example below.

curl -H "charset=UTF-8" -X POST -d '{"api_name": "stock_basic", "token": "be16e3141d93fce250c7273bdcb06f77d8f65cc31294551692e261fa", "params": {"list_stauts": "L"}, "fields": "ts_code,name,area,industry,list_date"}'
 http://api.waditu.com | jq