FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
php-binance-api/examples/web_socket_trades.php at refs/heads/master · ccxt/php-binance-api · GitHub
ccxt
/
php-binance-api
Public
Notifications
You must be signed in to change notification settings
Fork
483
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_trades.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
17 lines (13 loc) · 438 Bytes
Breadcrumbs
php-binance-api
/
examples
/
web_socket_trades.php
Copy path
File metadata and controls
executable file
·
17 lines (13 loc) · 438 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
17
<?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
();
// Trade Updates via WebSocket
$
api
->
trades
([
"
BNBBTC
"
],
function
(
$
api
,
$
symbol
,
$
trades
) {
echo
"{
$
symbol
}
trades update
"
.
PHP_EOL
;
print_r
(
$
trades
);
$
endpoint
=
strtolower
(
$
symbol
) .
'
@trades
'
;
$
api
->
terminate
(
$
endpoint
);
});
Back
|
FazBrowse Home
|
New Git URL