forked from ccxt/ccxt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjubi.php
46 lines (42 loc) · 1.46 KB
/
jubi.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace ccxt;
class jubi extends btcbox {
public function describe () {
return array_replace_recursive (parent::describe (), array (
'id' => 'jubi',
'name' => 'jubi.com',
'countries' => 'CN',
'rateLimit' => 1500,
'version' => 'v1',
'hasCORS' => false,
'hasFetchTickers' => true,
'urls' => array (
'logo' => 'https://user-images.githubusercontent.com/1294454/27766581-9d397d9a-5edd-11e7-8fb9-5d8236c0e692.jpg',
'api' => 'https://www.jubi.com/api',
'www' => 'https://www.jubi.com',
'doc' => 'https://www.jubi.com/help/api.html',
),
));
}
public function fetch_markets () {
$markets = $this->publicGetAllticker ();
$keys = is_array ($markets) ? array_keys ($markets) : array ();
$result = array ();
for ($p = 0; $p < count ($keys); $p++) {
$id = $keys[$p];
$base = strtoupper ($id);
$quote = 'CNY'; // todo
$symbol = $base . '/' . $quote;
$base = $this->common_currency_code($base);
$quote = $this->common_currency_code($quote);
$result[] = array (
'id' => $id,
'symbol' => $symbol,
'base' => $base,
'quote' => $quote,
'info' => $id,
);
}
return $result;
}
}