dprmc/ice-remote-plus-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dprmc/ice-remote-plus-client

最新稳定版本:v1.0.17

Composer 安装命令:

composer require dprmc/ice-remote-plus-client

包简介

A PHP client to connect to theice.com's Remote Plus service.

README 文档

README

Packagist

Update to Price Availability

Here's the link for our RemotePlus Events website where you see the expected times for each event in RemotePlus. http://rplus.intdata.com/help/rpevents.html

Diffrent types of securities are available at different times.

Important Notice Regarding RMBS PRC Availability

RMBS securities are expected to post by 16:00 EST.

-- Jon Anderson - Client Support - ICE Data Services - 2019-01-29

Documentation from The ICE

https://rplus.intdata.com/documentation/RemotePlus_UserGuide.pdf

You will have to ask your rep at theice.com for a document titled, "RemotePlusSM Guide to Data" for details about each of the available item codes you can request.

Summary

This PHP library acts as a client for The ICE's RemotePlus API.

Examples

Below is the basic syntax for using the RemotePlusClient.

$user   = $_ENV[ 'ICE_USER' ];
$pass   = $_ENV[ 'ICE_PASS' ];
$cusips = [ '17307GNX2',
            '07325KAG3',
            '22541QFF4',
            '933095AF8',
            '86358EUD6',
            '07384YTS5' ];
$date   = '2019-01-23';
$items  = [ 'IEBID', 'IEMID', 'IEASK' ];

$remotePlusResponse = RemotePlusClient::instantiate( $user, $pass )
                                      ->addCusips( $cusips )
                                      ->addDate( $date )
                                      ->addItems( $items )
                                      ->run();
                                      
// Get all of the MID prices
$midPrices = $remotePlusResponse->getAllValuesForItem( 'IEMID' );
print_r($midPrices);
/*
Array
(
    [17307GNX2] => 91.31362
    [07325KAG3] => 90.33492
    [22541QFF4] => !NA
    [933095AF8] => 29.60287
    [86358EUD6] => 66.0742
    [07384YTS5] => 71.06705
)
*/

// Get the SecurityResponse object for a given CUSIP.
// (this one does not have a valid price for that date, so this will throw a ItemValueNotAvailable exception.
$securityResponse = $remotePlusResponse->getByIdentifier( '22541QFF4' );
$price            = $securityResponse->getItem( 'IEMID' );

Other Available Functions

The RemotePlusClient run() method will return my RemotePlusResponse object. Below is an example of how you would interact with that object.

// Returns an associative array of all the SecurityResponse objects, using the security identifier as the key. 
$allSecurityResponses = $remotePlusResponse->getResponses();
foreach($allSecurityResponses as $cusip => $securityResponse):
    $midPrice = $securityResponse->getItem('IEMID');
    echo $midPrice; // 90.413
endforeach;

Get an array of MID prices.

$midPrices = $remotePlusResponse->getAllValuesForItem('IEMID');
print_r($midPrices);
/*
Array
(
    [17307GNX2] => 91.31362
    [07325KAG3] => 90.33492
    [22541QFF4] => !NA
    [933095AF8] => 29.60287
    [86358EUD6] => 66.0742
    [07384YTS5] => 71.06705
)
*/

Get the SecurityResponse object for a security

$securityResponse = $remotePlusResponse->getByIdentifier('17307GNX2');
$midPrice = $securityResponse->getItem('IEMID'); 
echo $midPrice; // 90.413

统计信息

  • 总下载量: 3.47k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-01-23