mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-09 16:28:06 +00:00
38 lines
971 B
Markdown
38 lines
971 B
Markdown
- [Watch Tickers](./examples/php/)
|
|
|
|
|
|
```php
|
|
<?php
|
|
namespace ccxt;
|
|
include_once (__DIR__.'/../../ccxt.php');
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
|
|
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
error_reporting(E_ALL);
|
|
date_default_timezone_set('UTC');
|
|
|
|
use ccxt\Precise;
|
|
use React\Async;
|
|
use React\Promise;
|
|
|
|
|
|
// AUTO-TRANSPILE //
|
|
function example() {
|
|
return Async\async(function () {
|
|
$binance = new \ccxt\pro\binance(array());
|
|
$symbols = ['BTC/USDT', 'ETH/USDT', 'DOGE/USDT'];
|
|
while (true) {
|
|
$tickers = Async\await($binance->watch_tickers($symbols));
|
|
var_dump($tickers['BTC/USDT'], $tickers['ETH/USDT'], $tickers['DOGE/USDT']);
|
|
}
|
|
}) ();
|
|
}
|
|
|
|
|
|
Async\await(example());
|
|
|
|
``` |