FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
php-binance-api/examples/web_socket_chart.php at master · ccxt/php-binance-api · GitHub
ccxt
/
php-binance-api
Public
Notifications
You must be signed in to change notification settings
Fork
484
Star
647
Code
Issues
76
Pull requests
11
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
php-binance-api
/
examples
/
web_socket_chart.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
16 lines (13 loc) · 462 Bytes
Breadcrumbs
php-binance-api
/
examples
/
web_socket_chart.php
Copy path
File metadata and controls
executable file
·
16 lines (13 loc) · 462 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
require
'
php-binance-api.php
'
;
require
'
vendor/autoload.php
'
;
// @see home_directory_config.php
// use config from ~/.confg/jaggedsoft/php-binance-api.json
$
api
=
new
Binance
\
API
();
// Get complete realtime chart data via WebSockets
$
api
->
chart
([
"
BNBBTC
"
],
"
15m
"
,
function
(
$
api
,
$
symbol
,
$
chart
) {
echo
"{
$
symbol
}
chart update
\n"
;
print_r
(
$
chart
);
$
endpoint
=
strtolower
(
$
symbol
) .
'
@kline_
'
.
"
15m
"
;
$
api
->
terminate
(
$
endpoint
);
});
Back
|
FazBrowse Home
|
New Git URL