Hello I use the following function to print the availableToBack and availableToLay prices. But I just can print 3 of each (like in the website). How can I extend this? Some applications have much more intervals and available money to trade. Thank you
function printRunnerInfo ($selectionId, $marketBook) {
foreach ($marketBook->runners as $runner)
if ($runner->selectionId == $selectionId) break;
echo "<br>Available to Back: \n";
foreach ($runner->ex->availableToBack as $availableToBack)
echo $availableToBack->size . "@" . $availableToBack->price . " | ";
echo "<br>Available to Lay: \n";
foreach ($runner->ex->availableToLay as $availableToLay)
echo $availableToLay->size . "@" . $availableToLay->price . " | ";
}
function printRunnerInfo ($selectionId, $marketBook) {
foreach ($marketBook->runners as $runner)
if ($runner->selectionId == $selectionId) break;
echo "<br>Available to Back: \n";
foreach ($runner->ex->availableToBack as $availableToBack)
echo $availableToBack->size . "@" . $availableToBack->price . " | ";
echo "<br>Available to Lay: \n";
foreach ($runner->ex->availableToLay as $availableToLay)
echo $availableToLay->size . "@" . $availableToLay->price . " | ";
}


Comment