股票数据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 实际发行数量
相关推荐
锋行天下1 小时前
langgraph 后端发自定义数据,前端接收方法概括
人工智能·python
金銀銅鐵2 小时前
带您看懂字节码指令(一):一帧里有什么
java·后端·ai编程
benchmark_cc3 小时前
用 QuantDash 读取单只股票五档盘口:抽样、缺失值检查与复现记录
python·数据分析·pandas·量化交易·股票数据·quantdash
曲径海盗3 小时前
【Python 学习第 55 天】列表基础
python·学习笔记·编程入门
专注仿真3 小时前
知识问答模型用到的算法集详解及代码实例
python·算法·代码·大模型训练·控制算法
jyOverQ4 小时前
我写了一个 CSDN Markdown 图片助手:告别本地图片逐张上传
python·工具·csdn
nice_lcj5204 小时前
【从零理解 Spring AI · 14】RAG 的四个环节:加载、切分、向量化、检索
java·spring boot·embedding·向量数据库·rag·spring ai·ai应用开发
学长毕设6 小时前
基于springboot科创竞赛信息平台-附源码
java·spring boot·后端
聪明的笨猪猪6 小时前
Java 工程案例:AI 生成 @Async 异步线程池踩坑
java·经验分享·面试·ai编程
学长毕设7 小时前
基于SpringBoot公务员考试交流平台-附源码
java·spring boot·后端