印度股票实时行情API数据接口

1Rapids API :提供实时行情与历史行情,覆盖印度所有股票,指数,支持websocket和REST API接口

2Google数据其实是从新浪获取的,所以可以优先考虑从新浪获取,如果喜欢google的API,再考虑

3Alpha Vantage:一个提供股票市场数据的API,支持多个国家的股票市场。

4Yahoo Finance API:一个提供股票市场数据的API,支持多个国家的股票市场。 5Quandl:一个提供金融和经济数据的平台,包括股票市场数据。

也可以从交易所爬取行情

  • 获取股票市场状态(打开/关闭)格式:JSONhttp://localhost:3000/get_market_status
  • 获取NSE(变化,年份高低,索引顺序)格式的所有索引:JSONhttp://localhost:3000/nse/get_indices
  • 以NSE格式获取所有索引的引号:HTMLhttp://localhost:3000/nse/get_quotes
  • 从NSE格式获取符号(companyName)的引号数据:JSONhttp://localhost:3000/nse/get_quote_info?companyName=TCS
  • 从NSE-JSON格式获取符号(companyNames)的报价数据:JSONhttp://localhost:3000/nse/get_multiple_quote_info?companyNames=TCS,WIPRO,AND_MORE
  • 获取NSE格式的前10名获得者:JSONhttp://localhost:3000/nse/get_gainers
  • 获取NSE格式的前10名失败者:JSONhttp://localhost:3000/nse/get_losers
  • 获取单个索引的前进/下降,以及其格式是否更改的值:JSONhttp://localhost:3000/nse/get_incline_decline
  • 以单一NSE索引格式获取所有公司的信息:JSONhttp://localhost:3000/nse/get_index_stocks?symbol=nifty
  • 获取提供的NSE索引中的公司列表,并使用匹配的关键字数据格式:JSONhttp://localhost:3000/nse/search_stocks?keyword=AXIS
  • 以NSE格式获取公司的日内数据:XMLhttp://localhost:3000/nse/get_intra_day_data?companyName=TCS&time=1 http://localhost:3000/nse/get_intra_day_data?companyName=TCS&time=month
  • 以NSE格式获取52周所有高库存:JSONhttp://localhost:3000/nse/get_52_week_high
  • 以NSE格式获取52周所有低库存:JSONhttp://localhost:3000/nse/get_52_week_low
  • 获取具有最高值的NSE股票格式:JSONhttp://localhost:3000/nse/get_top_value_stocks
  • 获取销量最高的NSE股票格式:JSONhttp://localhost:3000/nse/get_top_volume_stocks
  • 获取公司股票的期货数据(符号)和时间格式:JSONhttp://localhost:3000/nse/get_stock_futures_data?companyName=TCS&time=15 http://localhost:3000/nse/get_stock_futures_data?companyName=VEDL&time=month
  • 根据时间以NSE格式获取公司名称(符号)的图表数据:CSV格式(分隔符-|)http://localhost:3000/nse/get_chart_data_new?companyName=VEDL&time=5 http://localhost:3000/nse/get_chart_data_new?companyName=VEDL&time=year
  • 符号(缓动列表)
  • 19
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
4.4.1 接口说明 请求头 请求头说明 沙箱环境url https://api.sandbox.speedlyglobal.com/api/settle/settlement 生产环境url https://api.speedlyglobal.com/api/settle/settlement 请求方式 POST 4.4.2 传参说明 参数名称 类型 是否必填 描述 merchant_no String 是 商户号 data object 是 订单数据体 data: 参数名称 类型 是否 必填 是否 签名 描述 country String 是 是 国家代码。详见:国家和货币代码 currency String 是 是 货币代码。详见:国家和货币代码 order_id String 是 是 商户订单编号 amount Double 是 是 固定2位小数点的浮点数金额,如:10.00 notification_url String 是 是 回调通知地址。支付成功后,向商户发送成功的回调通知 timestamp Long 是 是 毫秒级UTC时间戳(13位) signature String 是 否 MD5签名,32位大写字母 payee object 否 否 收款方信息体 payee: 参数名称 类型 是否必填 描述 name String 是 收款方名字 lastname String 否 收款方姓氏 account String 是 收款方账号 account_type String 是 账户类型,详见:支持账户类型 document String 否 收款方个人公民身份ID,详见:身份ID格式 phone String 否 收款方电话号码,详见:电话号码格式 马来西亚必填 印度必填 email String 否 邮箱 马来西亚必填 印度必填 bank_name String 否 银行名称 bank_code String 否 银行编码 马来西亚必填 bank_branch String 否 银行支行 印度 account_type=BANK时,传印度银行的IFSC号码 国家名称 payee详细描述 巴西 account_type=CPF时,document必填,account=document,[document]传巴西的CPF号 account_type=PHONE时,phone必填,account=phone account_type=EMAIL时,email必填,account=email account_type=CHAVE时,[account]传巴西的PIX密钥 例如: { "name":"Miscro Duma", "account":"+552125552787", "account_type":"PHONE", "phone":"+552125552787" } 根据以上信息 生成一个基于php的接口案例
06-10
以下是基于 PHP 的接口案例,其中用到了 cURL 库进行请求: ```php <?php // 商户号 $merchant_no = "your_merchant_no"; // 订单数据体 $data = array( "country" => "my", "currency" => "MYR", "order_id" => "your_order_id", "amount" => 10.00, "notification_url" => "your_notification_url", "timestamp" => round(microtime(true) * 1000), ); // 收款方信息体 $payee = array( "name" => "收款方名字", "account" => "收款方账号", "account_type" => "PHONE", "phone" => "收款方电话号码", ); // 生成签名 $sign_str = $merchant_no . json_encode($data) . json_encode($payee) . "your_secret_key"; $signature = strtoupper(md5($sign_str)); // 请求参数 $params = array( "merchant_no" => $merchant_no, "data" => $data, "signature" => $signature, "payee" => $payee, ); // 请求地址 $url = "https://api.sandbox.speedlyglobal.com/api/settle/settlement"; // 发送请求 $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); $response = curl_exec($ch); curl_close($ch); // 处理响应 $result = json_decode($response, true); if ($result["code"] == "0000") { echo "订单创建成功"; } else { echo "订单创建失败:" . $result["msg"]; } ?> ``` 需要注意的是,上述代码中的 `$merchant_no` 是商户号,`$data` 是订单数据体,`$payee` 是收款方信息体,`$signature` 是签名,`$url` 是请求地址,`$params` 是请求参数。其中,`$sign_str` 的计算方法为将 `$merchant_no`、`$data`、`$payee` 和你的密钥拼接后,进行 MD5 加密并转化为大写字母。在实际使用时,需要将 `$url` 修改为生产环境的请求地址,并使用实际的商户号和密钥进行签名。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值