mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-11 09:18:08 +00:00
commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
- [Built In Rate Limiting Poller](./examples/php/)
|
||||
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
include './ccxt.php';
|
||||
|
||||
date_default_timezone_set('UTC');
|
||||
|
||||
$exchange = '\\ccxt\\poloniex';
|
||||
$exchange = new $exchange();
|
||||
|
||||
$symbol = 'DOGE/BTC';
|
||||
|
||||
while (true) {
|
||||
$order_book = $exchange->fetch_order_book($symbol);
|
||||
echo "----------------------------------------------------------------\n";
|
||||
echo date('c') . "\n";
|
||||
echo count($order_book['bids']) . " bids and " . count($order_book['asks']) . " asks\n";
|
||||
echo sprintf("bid: %.8f ask: %.8f", $order_book['bids'][0][0], $order_book['asks'][0][0]) . "\n";
|
||||
}
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user