股票数据API(14)股票近年增发数据

复制代码
 随着AI与量化交易的普及,股票数据API正朝着更智能、更整合、更实时的方向演进。例如"行情+舆情+预测"一体化接口不仅提供实时数据,还能短期股价趋势预测。

股票数据API连接金融市场与智能决策的技术桥梁。我将分享200多个实测可用的专业股票数据接口,并通过Python、JavaScript(Node.js)、Java、C#、Ruby等五种主流语言,即可快速获取实时行情、历时K线、财务指标的核心信息。

先把数据接口的地址给大家,大家可以直接点击地址或复制到地址栏打开,马上就可以验证接口的有效性

沪深A股近年增发数据API接口:http://api.momaapi.com/hscp/jnzf/股票代码(如000001)/您的Token

接口URL中,000001是股票代码,TEST-API-TOKEN-MOMA-836089C22111是请求证书,这个是官方提供的测试证书只能测试000001的数据,随后大家自己可以去领取一个免费的请求证书就可以获取其他股票的数据了。

1、python

python 复制代码
import requests  
  
url = "http://api.momaapi.com/hscp/jnzf/000001/TEST-API-TOKEN-MOMA-836089C22111"  
response = requests.get(url)  
data = response.json()  
print(data)

2、JavaScript (Node.js)

javascript 复制代码
const axios = require('axios');  
  
const url = "http://api.momaapi.com/hscp/jnzf/000001/TEST-API-TOKEN-MOMA-836089C22111";  
axios.get(url)  
  .then(response => {  
    console.log(response.data);  
  })  
  .catch(error => {  
    console.log(error);  
  });

3、Java

java 复制代码
import java.net.URI;  
import java.net.http.HttpClient;  
import java.net.http.HttpRequest;  
import java.net.http.HttpResponse;  
import java.io.IOException;  
  
public class Main {  
    public static void main(String[] args) {  
        HttpClient client = HttpClient.newHttpClient();  
        HttpRequest request = HttpRequest.newBuilder()  
            .uri(URI.create("http://api.momaapi.com/hscp/jnzf/000001/TEST-API-TOKEN-MOMA-836089C22111"))  
            .build();  
  
        try {  
            HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());  
            System.out.println(response.body());  
        } catch (IOException | InterruptedException e) {  
            e.printStackTrace();  
        }  
    }  
}

4、C#

csharp 复制代码
using System;  
using System.Net.Http;  
using System.Threading.Tasks;  
  
class Program  
{  
    static async Task Main()  
    {  
        using (HttpClient client = new HttpClient())  
        {  
            string url = "http://api.momaapi.com/hscp/jnzf/000001/TEST-API-TOKEN-MOMA-836089C22111";  
            HttpResponseMessage response = await client.GetAsync(url);  
            string responseBody = await response.Content.ReadAsStringAsync();  
            Console.WriteLine(responseBody);  
        }  
    }  
}

5、Ruby

ruby 复制代码
require 'net/http'  
require 'json'  
  
url = URI("http://api.momaapi.com/hscp/jnzf/000001/TEST-API-TOKEN-MOMA-836089C22111")  
  
http = Net::HTTP.new(url.host, url.port)  
request = Net::HTTP::Get.new(url)  
response = http.request(request)  
data = JSON.parse(response.read_body)  
puts data

返回数据示例:

json 复制代码
[{"sdate":"2015-05-20","type":"定向配售、网下询价配售","price":"16.70元","tprice":"1,000,000.00万元","fprice":"6,000.00万元","amount":"59880.2395万股"},{"sdate":"2014-01-08","type":"定向配售","price":"11.17元","tprice":"1,478,221.03万元","fprice":"4,850.00万元","amount":"132338.4991万股"},{"sdate":"2011-07-29","type":"定向配售","price":"17.75元","tprice":"269,005.23万元","fprice":"0.00元","amount":"163833.6654万股"},{"sdate":"2010-09-16","type":"定向配售","price":"18.26元","tprice":"693,113.08万元","fprice":"2,386.23万元","amount":"37958万股"}]

返回的数据字段说明:

字段名称 数据类型 字段说明
sdate string 公告日期yyyy-MM-dd
type string 发行方式
price string 发行价格
tprice string 实际公司募集资金总额
fprice string 发行费用总额
amount string 实际发行数量
相关推荐
copyer_xyf11 分钟前
Agent 流程编排
后端·python·agent
copyer_xyf37 分钟前
Agent RAG
后端·python·agent
copyer_xyf39 分钟前
【RAG】向量数据库:milvus
后端·python·agent
copyer_xyf1 小时前
Agent 记忆管理
后端·python·agent
星云穿梭16 小时前
用Python写一个带图形界面的学生管理系统——完整教程
python
金銀銅鐵16 小时前
用 Pygame 实现 15 puzzle
python·数学·游戏
唐青枫1 天前
Java JDBC 实战指南:从 Connection 到事务和连接池
java
黄忠1 天前
大模型之LangGraph技术体系
python·llm
一个做软件开发的牛马1 天前
MyBatis-Plus 从零实战:完整搭建可运行 Demo,BaseMapper 零 SQL、Wrapper 条件构造、分页插件与代码生成器详解
java·后端
用户3721574261351 天前
Java 处理 PDF 图片:提取 PDF 中的图片,并压缩 PDF 图片体积
java