股票代码API


  • administrators

    1.个股详情

    /**
    * @api {GET} /api/v1/system/adapter/hq
    * @apiGroup Swan Customer
    * @apiVersion __API_VERSION__
    * @apiParam (RequestBody) {string} code 股票代码
    * @apiParam (RequestBody) {string} market 市场代码 SH 沪市 SZ 深市
    * @apiSuccessExample {json} Success Status:
    * HTTP/1.1 200 OK
    * {
    * "now": "12.38", //现价
    * "up": "0.25", //涨跌
    * "upPercent": "0.0206", //涨幅
    * "high": "12.51", //最高
    * "open": "12.17", //今开
    * "yesterday": "12.13", //昨收
    * "low": "12.10", //最低
    * "hsl": "0.002", //换手
    * "name": "浦发银行", //名称
    * "code": "600000", //股票代码
    * "market": "SH", //市场代码 市场代码(沪市:SH,深市:SZ,沪港通:HK 深港通:SK)
    * "stockType": "9", //股票类型
    * "limitUp": "13.34", //涨停价
    * "limitDown": "10.92", //跌停价
    * "flux": "0.0338", //振幅
    * "sjl": "0.7458", //市净率
    * "pgr": "5.6367", //市盈率
    * "zsz": "363378769920", //总市值
    * "zgb": "2935208", //总股本
    * "ltsz": "347924627456", //流通市值
    * "ltag": "28103766016", //流通A股
    * "timestamp": 1576565852797, //日期
    * "volume": "569750", //成交量
    * "amount": "702188864" //成交额
    * }
     
    * @apiErrorExample Error Status:
    * HTTP/1.1 403 拒绝访问
    * HTTP/1.1 500 服务端异常
    */
    

    2.获取股票代码

    /**
    * @api {GET} /api/v1/system/adapter/hq/all
    * @apiGroup Swan Customer
    * @apiVersion __API_VERSION__
    * @apiSuccessExample {json} Success Status:
    * HTTP/1.1 200 OK
    * [
    *   {
    *     "name":"浦发银行",
    *     "code":"600000",
    *     "market":"SH"
    *   },
    *   {
    *     "name":"白云机场",
    *     "code":"600004",
    *     "market":"SH"
    *   }
    * ]
     
    * @apiErrorExample Error Status:
    * HTTP/1.1 403 拒绝访问
    * HTTP/1.1 500 服务端异常
    */
    

    3.五档买卖盘

    /**
    * @api {GET} /api/v1/system/adapter/hq/trade
    * @apiGroup Swan Customer
    * @apiVersion __API_VERSION__
    * @apiParam (RequestBody) {string} code 股票代码
    * @apiParam (RequestBody) {string} market 市场代码 SH 沪市 SZ 深市
    * @apiSuccessExample {json} Success Status:
    * HTTP/1.1 200 OK
    * {
    * "Code": "600000", //股票代码
    * "Name": "浦发银行", //股票名称
    * "StockType": "9.00", //股票类型
    * "Market": "SH", //市场代码 市场代码(沪市:SH,深市:SZ,沪港通:HK 深港通:SK)
    * "S1": "12.41", //卖1
    * "S2": "12.42",
    * "S3": "12.43",
    * "S4": "12.44",
    * "S5": "12.45",
    * "SA1": "1186",  //卖量1
    * "SA2": "2305",
    * "SA3": "2620",
    * "SA4": "3371",
    * "SA5": "2066",
    * "B1": "12.40",  //买1
    * "B2": "12.39",
    * "B3": "12.38",
    * "B4": "12.37",
    * "B5": "12.36",
    * "BA1": "402", //买量1
    * "BA2": "56",
    * "BA3": "1183",
    * "BA4": "977",
    * "BA5": "1734"
    * }
     
    * @apiErrorExample Error Status:
    * HTTP/1.1 403 拒绝访问
    * HTTP/1.1 500 服务端异常
    */
    

    4.股票搜索

    /**
    * @api {GET} /api/v1/system/adapter/hq/_search
    * @apiGroup Swan Customer
    * @apiVersion __API_VERSION__
    * @apiParam (RequestBody) {string} keyword 股票代码关键字
    * @apiSuccessExample {json} Success Status:
    * HTTP/1.1 200 OK
    * [
    * {
    * "name": "中国平安",
    * "code": "601318",
    * "market": "SH"
    * },
    * {
    * "name": "平安银行",
    * "code": "000001",
    * "market": "SZ"
    * }
    * ]
     
    * @apiErrorExample Error Status:
    * HTTP/1.1 403 拒绝访问
    * HTTP/1.1 500 服务端异常
    */
    

    5.公司信息

    /**
    * @api {GET} /api/v1/swan/docking/hq/trade
    * @apiGroup Swan Docking
    * @apiVersion __API_VERSION__
    * @apiParam (RequestBody) {string} code 股票代码
    * @apiParam (RequestBody) {string} market 市场代码 SH 沪市 SZ 深市
    * @apiSuccessExample {json} Success Status:
    * HTTP/1.1 200 OK
    * {
    * "ts_code": "000001",
    * "market": "",
    * "exchange": "",
    * "chairman": "",
    * "manager": "",
    * "secretary": "",
    * "reg_capital": 0,
    * "setup_date": "1991-04-03",
    * "province": "",
    * "city": "",
    * "introduction": "",
    * "website": "",
    * "email": "",
    * "office": "广东省深圳市罗湖区深南东路5047号",
    * "employees": 0,
    * "main_business": "办理人民币存、贷、结算、汇兑业务;人民币票据承兑和贴现;各项信托业务;\
    * 经人民银行批准发行或买卖人民币有价证券;外汇存款、汇款;境内境外借款;\
    * 在境内境外* 发行或代理发行外币有价证券外汇存款、汇款、境内境外汇借款等。",
    * "business_scope": "",
    * "issuingPrice": "40.000",
    * "name": "平安银行股份有限公司"
    * }
    * @apiErrorExample Error Status:
    * HTTP/1.1 403 拒绝访问
    * HTTP/1.1 500 服务端异常
    */