Reputation: 193
I want to extract data that are in table #buyOrdersTable from here
To do this I am using PHP Simple HTML DOM Parser library and following code:
$html = file_get_html('https://bittrex.com/Market/Index?MarketName=BTC-XRP');
echo 'BTC/XRP<br>';
foreach($html->find('div.buy-table-container tr.dyn-tr-add td') as $td)
{
echo $td->plaintext . '<br>';
}
?>
I want to extract every row from BID section - SUM, TOTAL, SIZE (XRP), BID (BTC). But code doesn't find any row.
Upvotes: 1
Views: 346
Reputation: 12355
You can't do that. It's impossible, as explained by msg in the comments.
To do it properly, sign up for an API key, and call the API!
https://support.bittrex.com/hc/en-us/articles/115003723911-Developer-s-Guide-API
You'll probably want to use Guzzle, or cURL to make your requests. You can find lots of tutorials showing how to connect to any API using either.
This may or may not help you. A while back I started writing a library that hooked up to the BTC-e exchange (now Wex.nz). You can make adapters for any exchange, so you could tweak this code if you like.
https://github.com/delboy1978uk/BTCExchange/blob/master/src/Exchange/BtcE.php
Which extends this class https://github.com/delboy1978uk/BTCExchange/blob/master/src/Exchange/ExchangeAbstract.php
Credit to msg
for bothering to check Packagist. There are many ready-to-rock Bittrex API packages waiting to be installed! https://packagist.org/?query=bitrex-api
Upvotes: 2