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,26 @@
|
||||
- [Bitfinex2 Fetch Trades Since](./examples/php/)
|
||||
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
include './ccxt.php';
|
||||
|
||||
date_default_timezone_set('UTC');
|
||||
|
||||
$id = 'bitfinex2';
|
||||
|
||||
// instantiate the exchange by id
|
||||
$exchange = '\\ccxt\\' . $id;
|
||||
$exchange = new $exchange ();
|
||||
|
||||
// load all markets from the exchange
|
||||
$trades = $exchange->fetch_trades ('ETH/BTC', 1518983548636 - 2 * 24 * 60 * 60 * 1000);
|
||||
|
||||
foreach ($trades as $trade) {
|
||||
echo $trade['datetime'] . "\n";
|
||||
}
|
||||
echo count ($trades) . " trades\n";
|
||||
|
||||
?>
|
||||
```
|
||||
Reference in New Issue
Block a user