dprmc/ice-remote-plus-client

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

v1.0.14 2023-12-12 21:22 UTC

This package is auto-updated.

Last update: 2024-04-13 00:20:18 UTC


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