mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-10 16:58:08 +00:00
commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
- [Bitfinex2 Fetch Ohlcv](./examples/php/)
|
||||
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
include './ccxt.php';
|
||||
|
||||
date_default_timezone_set('UTC');
|
||||
|
||||
$exchange = '\\ccxt\\bitfinex2';
|
||||
$exchange = new $exchange(array(
|
||||
'rateLimit' => 12000,
|
||||
));
|
||||
|
||||
// bitfinex2 breaks occasionally
|
||||
|
||||
for ($i = 0; $i < 1000; $i++) {
|
||||
$ohlcv = $exchange->fetch_ohlcv('BTC/USD', '1m');
|
||||
print_r ($exchange->iso8601($ohlcv[0][0]) . "\t" . count($ohlcv) . "\n");
|
||||
}
|
||||
|
||||
?>
|
||||
```
|
||||
Reference in New Issue
Block a user