{"id":26351200,"url":"https://github.com/ccxt/php-binance-api","last_synced_at":"2025-05-14T03:02:49.324Z","repository":{"id":37508182,"uuid":"106074768","full_name":"ccxt/php-binance-api","owner":"ccxt","description":"PHP Binance API is an asynchronous PHP library for the Binance API designed to be easy to use. https://github.com/binance-exchange/php-binance-api","archived":false,"fork":false,"pushed_at":"2025-04-23T13:53:26.000Z","size":8727,"stargazers_count":629,"open_issues_count":84,"forks_count":497,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-05-08T08:46:16.888Z","etag":null,"topics":["binance","cryptocurrency","cryptocurrency-exchanges","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ccxt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-10-07T05:52:11.000Z","updated_at":"2025-05-06T18:50:54.000Z","dependencies_parsed_at":"2023-01-25T18:46:36.674Z","dependency_job_id":"a349173f-a0d9-420d-ac8a-05d68dd8ef58","html_url":"https://github.com/ccxt/php-binance-api","commit_stats":{"total_commits":459,"total_committers":59,"mean_commits":7.779661016949152,"dds":0.5686274509803921,"last_synced_commit":"d153dd9af258615d8b3c06c2a652387674e876b3"},"previous_names":["ccxt/php-binance-api"],"tags_count":80,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccxt%2Fphp-binance-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccxt%2Fphp-binance-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccxt%2Fphp-binance-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccxt%2Fphp-binance-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ccxt","download_url":"https://codeload.github.com/ccxt/php-binance-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254059474,"owners_count":22007767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binance","cryptocurrency","cryptocurrency-exchanges","php"],"created_at":"2025-03-16T10:06:47.000Z","updated_at":"2025-05-14T03:02:49.280Z","avatar_url":"https://github.com/ccxt.png","language":"PHP","readme":"[![Latest Version](https://img.shields.io/github/release/jaggedsoft/php-binance-api.svg?style=flat-square)](https://github.com/jaggedsoft/php-binance-api/releases) \n[![GitHub last commit](https://img.shields.io/github/last-commit/jaggedsoft/php-binance-api.svg?style=flat-square)](#) \n[![Packagist Downloads](https://img.shields.io/packagist/dt/jaggedsoft/php-binance-api.svg?style=flat-square)](https://packagist.org/packages/jaggedsoft/php-binance-api) \n\n\n\u003c!--\n[![Build Status](https://travis-ci.org/jaggedsoft/php-binance-api.svg?branch=master\u0026style=flat-square)](https://travis-ci.org/jaggedsoft/php-binance-api) \n[![Coverage Status](https://coveralls.io/repos/github/jaggedsoft/php-binance-api/badge.svg?branch=master\u0026style=flat-square)](https://coveralls.io/github/jaggedsoft/php-binance-api) \n[![CodeCov](https://codecov.io/gh/jaggedsoft/php-binance-api/branch/master/graph/badge.svg?style=flat-square)](https://codecov.io/github/jaggedsoft/php-binance-api/) \n[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/683459a5a71c4875956cf23078a0c39b)](https://www.codacy.com/app/dmzoneill/php-binance-api?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=jaggedsoft/php-binance-api\u0026utm_campaign=Badge_Coverage)\n[![Code consistency](https://squizlabs.github.io/PHP_CodeSniffer/analysis/jaggedsoft/php-binance-api/grade.svg?style=flat-square)](https://squizlabs.github.io/PHP_CodeSniffer/analysis/jaggedsoft/php-binance-api)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/683459a5a71c4875956cf23078a0c39b)](https://www.codacy.com/app/dmzoneill/php-binance-api?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=jaggedsoft/php-binance-api\u0026amp;utm_campaign=Badge_Grade)\n--\u003e\n# PHP Binance API\nThis project is designed to help you make your own projects that interact with [Binance](https://accounts.binance.com/register?ref=PGDFCE46). You can stream candlestick chart data, market depth, or use other advanced features such as setting stop losses and iceberg orders. This project seeks to have complete API coverage (spot and futures) including WebSockets.\n\n#### Installation\n```\ncomposer require \"jaggedsoft/php-binance-api @dev\"\n```\n\u003cdetails\u003e\n \u003csummary\u003eClick for help with installation\u003c/summary\u003e\n\n## Install Composer\nIf the above step didn't work, install composer and try again.\n#### Debian / Ubuntu\n```\nsudo apt-get install curl php-curl\ncurl -s http://getcomposer.org/installer | php\nphp composer.phar install\n```\nComposer not found? Use this command instead:\n```\nphp composer.phar require \"jaggedsoft/php-binance-api @dev\"\n```\n\n#### Windows:\n[Download installer for Windows](https://github.com/jaggedsoft/php-binance-api/#installing-on-windows)\n\n\u003c/details\u003e\n\n#### Getting started\n`composer require jaggedsoft/php-binance-api`\n```php\nrequire 'vendor/autoload.php';\n// 1. config in home directory\n$api = new Binance\\API();\n// 2. config in specified file\n$api = new Binance\\API( \"somefile.json\" );\n// 3. config by specifying api key and secret\n$api = new Binance\\API(\"\u003capi key\u003e\",\"\u003csecret\u003e\");\n// 4. config by specifying api key, api secret and testnet flag. By default the testnet is disabled\n$api = new Binance\\API(\"\u003ctestnet api key\u003e\",\"\u003ctestnet secret\u003e\", true);\n// 5. Rate Limiting Support\n$api = new Binance\\RateLimiter(new Binance\\API());\n```\nSee [additional options](https://github.com/jaggedsoft/php-binance-api/#config-file-in-home-directory) for more options and help installing on Windows\n\n#### Rate Limiting\nThis Feature is in beta, you can start using rate limiting as a wrapper to the main API class.\n```php\n$api = new Binance\\API( \"somefile.json\" );\n$api = new Binance\\RateLimiter($api);\nwhile(true) {\n   $api-\u003eopenOrders(\"BNBBTC\"); // rate limited\n}\n```\n\n=======\n#### Security - CA Bundles\nIf you don't know what a CA bundle is, no action is required.  If you do know and you don't like our auto upate feature.\nYou can disable the downloading of the CA Bundle\n```php\n$api = new Binance\\API( \"somefile.json\" );\n$api-\u003ecaOverride = true;\n```\n\n#### Get latest price of all symbols\n```php\n$ticker = $api-\u003eprices();\nprint_r($ticker);\n```\n\n\u003cdetails\u003e\n \u003csummary\u003eView Response\u003c/summary\u003e\n\n```\nArray\n(\n    [ETHBTC] =\u003e 0.05050800\n    [LTCBTC] =\u003e 0.00967400\n    [BNBBTC] =\u003e 0.00021479\n    [NEOBTC] =\u003e 0.00479300\n    [123456] =\u003e 0.00030000\n    [QTUMETH] =\u003e 0.03482000\n    [EOSETH] =\u003e 0.00176100\n    [SNTETH] =\u003e 0.00008766\n    [BNTETH] =\u003e 0.00662400\n    [BCCBTC] =\u003e 0.05629200\n    [GASBTC] =\u003e 0.00338500\n    [BNBETH] =\u003e 0.00418603\n    [BTMETH] =\u003e 0.00018900\n    [HCCBTC] =\u003e 0.00000180\n    [BTCUSDT] =\u003e 6028.95000000\n    [ETHUSDT] =\u003e 304.98000000\n    [HSRBTC] =\u003e 0.00289000\n    [OAXETH] =\u003e 0.00136700\n    [DNTETH] =\u003e 0.00020573\n    [MCOETH] =\u003e 0.02685800\n    [ICNETH] =\u003e 0.00395000\n    [ELCBTC] =\u003e 0.00000053\n    [MCOBTC] =\u003e 0.00133000\n    [WTCBTC] =\u003e 0.00117000\n    [WTCETH] =\u003e 0.02300000\n    [LLTBTC] =\u003e 0.00001669\n    [LRCBTC] =\u003e 0.00001100\n    [LRCETH] =\u003e 0.00016311\n    [QTUMBTC] =\u003e 0.00178400\n    [YOYOBTC] =\u003e 0.00000481\n    [OMGBTC] =\u003e 0.00125600\n    [OMGETH] =\u003e 0.02497000\n    [ZRXBTC] =\u003e 0.00003376\n    [ZRXETH] =\u003e 0.00067001\n    [STRATBTC] =\u003e 0.00052100\n    [STRATETH] =\u003e 0.00950200\n    [SNGLSBTC] =\u003e 0.00002216\n    [SNGLSETH] =\u003e 0.00043508\n    [BQXBTC] =\u003e 0.00010944\n    [BQXETH] =\u003e 0.00241250\n    [KNCBTC] =\u003e 0.00017060\n    [KNCETH] =\u003e 0.00340090\n    [FUNBTC] =\u003e 0.00000313\n    [FUNETH] =\u003e 0.00006184\n    [SNMBTC] =\u003e 0.00001761\n    [SNMETH] =\u003e 0.00035599\n    [NEOETH] =\u003e 0.09500000\n    [IOTABTC] =\u003e 0.00006783\n    [IOTAETH] =\u003e 0.00136000\n    [LINKBTC] =\u003e 0.00004476\n    [LINKETH] =\u003e 0.00087796\n    [XVGBTC] =\u003e 0.00000081\n    [XVGETH] =\u003e 0.00001611\n    [CTRBTC] =\u003e 0.00009408\n    [CTRETH] =\u003e 0.00187010\n    [SALTBTC] =\u003e 0.00044400\n    [SALTETH] =\u003e 0.00890000\n    [MDABTC] =\u003e 0.00021973\n    [MDAETH] =\u003e 0.00435550\n    [MTLBTC] =\u003e 0.00116900\n    [MTLETH] =\u003e 0.02470000\n    [SUBBTC] =\u003e 0.00002163\n    [SUBETH] =\u003e 0.00042901\n    [EOSBTC] =\u003e 0.00008822\n    [SNTBTC] =\u003e 0.00000438\n    [ETC] =\u003e 0.00000000\n    [ETCETH] =\u003e 0.03600000\n    [ETCBTC] =\u003e 0.00180800\n    [MTHBTC] =\u003e 0.00001425\n    [MTHETH] =\u003e 0.00028092\n    [ENGBTC] =\u003e 0.00007040\n    [ENGETH] =\u003e 0.00138220\n    [DNTBTC] =\u003e 0.00001052\n    [ZECBTC] =\u003e 0.00000000\n    [ZECETH] =\u003e 0.00000000\n    [BNTBTC] =\u003e 0.00033501\n    [ASTBTC] =\u003e 0.00004528\n    [ASTETH] =\u003e 0.00083990\n    [DASHBTC] =\u003e 0.04651300\n    [DASHETH] =\u003e 0.90520000\n)\nPrice of BNB: 0.00021479 BTC.\n```\n\u003c/details\u003e\n\n#### Get latest price of a symbol\n```php\n$price = $api-\u003eprice(\"BNBBTC\");\necho \"Price of BNB: {$price} BTC.\".PHP_EOL;\n```\n\n#### Get miniTicker for all symbols\n```php\n$api-\u003eminiTicker(function($api, $ticker) {\n\tprint_r($ticker);\n});\n```\n\n\u003cdetails\u003e\n \u003csummary\u003eView Response\u003c/summary\u003e\n\n```\n    [7] =\u003e Array\n        (\n            [symbol] =\u003e LTCUSDT\n            [close] =\u003e 182.85000000\n            [open] =\u003e 192.62000000\n            [high] =\u003e 195.25000000\n            [low] =\u003e 173.08000000\n            [volume] =\u003e 238603.66451000\n            [quoteVolume] =\u003e 43782422.11276660\n            [eventTime] =\u003e 1520497914289\n        )\n\n    [8] =\u003e Array\n        (\n            [symbol] =\u003e ICXBTC\n            [close] =\u003e 0.00029790\n            [open] =\u003e 0.00030550\n            [high] =\u003e 0.00031600\n            [low] =\u003e 0.00026850\n            [volume] =\u003e 8468620.53000000\n            [quoteVolume] =\u003e 2493.60935828\n            [eventTime] =\u003e 1520497915200\n        )\n\n```\n\u003c/details\u003e\n\n#### Get balances for all of your positions, including estimated BTC value\n```php\n$ticker = $api-\u003eprices(); // Make sure you have an updated ticker object for this to work\n$balances = $api-\u003ebalances($ticker);\nprint_r($balances);\necho \"BTC owned: \".$balances['BTC']['available'].PHP_EOL;\necho \"ETH owned: \".$balances['ETH']['available'].PHP_EOL;\necho \"Estimated Value: \".$api-\u003ebtc_value.\" BTC\".PHP_EOL;\n```\n\n\u003cdetails\u003e\n \u003csummary\u003eView Response\u003c/summary\u003e\n\n```\n    [WTC] =\u003e Array\n        (\n            [available] =\u003e 909.61000000\n            [onOrder] =\u003e 0.00000000\n            [btcValue] =\u003e 0.94015470\n        )\n\n    [BNB] =\u003e Array\n        (\n            [available] =\u003e 1045.94316876\n            [onOrder] =\u003e 0.00000000\n            [btcValue] =\u003e 0.21637426\n        )\n... (more)\n```\n\u003c/details\u003e\n\n\n#### Get all bid/ask prices\n```php\n$bookPrices = $api-\u003ebookPrices();\nprint_r($bookPrices);\necho \"Bid price of BNB: {$bookPrices['BNBBTC']['bid']}\".PHP_EOL;\n```\n\n\u003cdetails\u003e\n \u003csummary\u003eView Response\u003c/summary\u003e\n\n```\nPrice of BNB: 0.00021491\n\nArray\n(\n    [ETHBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.05053000\n            [bids] =\u003e 7.21000000\n            [ask] =\u003e 0.05076000\n            [asks] =\u003e 13.73600000\n        )\n    [LTCBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00966500\n            [bids] =\u003e 62.57000000\n            [ask] =\u003e 0.00967100\n            [asks] =\u003e 5.48000000\n        )\n    [BNBBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00021010\n            [bids] =\u003e 6.00000000\n            [ask] =\u003e 0.00021479\n            [asks] =\u003e 76.00000000\n        )\n    [NEOBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00476600\n            [bids] =\u003e 5.16000000\n            [ask] =\u003e 0.00479900\n            [asks] =\u003e 276.00000000\n        )\n    [QTUMETH] =\u003e Array\n        (\n            [bid] =\u003e 0.03515000\n            [bids] =\u003e 11.87000000\n            [ask] =\u003e 0.03599900\n            [asks] =\u003e 0.60000000\n        )\n    [EOSETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00176000\n            [bids] =\u003e 52.63000000\n            [ask] =\u003e 0.00177900\n            [asks] =\u003e 654.44000000\n        )\n    [SNTETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00008522\n            [bids] =\u003e 2347.00000000\n            [ask] =\u003e 0.00008764\n            [asks] =\u003e 2151.00000000\n        )\n    [BNTETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00662400\n            [bids] =\u003e 1940.32000000\n            [ask] =\u003e 0.00683900\n            [asks] =\u003e 64.89000000\n        )\n    [BCCBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.05614300\n            [bids] =\u003e 2.15000000\n            [ask] =\u003e 0.05710000\n            [asks] =\u003e 0.75900000\n        )\n    [GASBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00337800\n            [bids] =\u003e 597.29000000\n            [ask] =\u003e 0.00338500\n            [asks] =\u003e 14.63000000\n        )\n    [BNBETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00411497\n            [bids] =\u003e 375.00000000\n            [ask] =\u003e 0.00418603\n            [asks] =\u003e 4.00000000\n        )\n    [BTMETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00000000\n            [bids] =\u003e 0.00000000\n            [ask] =\u003e 0.00000000\n            [asks] =\u003e 0.00000000\n        )\n    [HCCBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00000000\n            [bids] =\u003e 0.00000000\n            [ask] =\u003e 0.00000000\n            [asks] =\u003e 0.00000000\n        )\n    [BTCUSDT] =\u003e Array\n        (\n            [bid] =\u003e 5970.00000000\n            [bids] =\u003e 0.00500000\n            [ask] =\u003e 5989.96000000\n            [asks] =\u003e 0.26295200\n        )\n    [ETHUSDT] =\u003e Array\n        (\n            [bid] =\u003e 303.86000000\n            [bids] =\u003e 4.27000000\n            [ask] =\u003e 304.99000000\n            [asks] =\u003e 0.11361000\n        )\n    [HSRBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00000000\n            [bids] =\u003e 0.00000000\n            [ask] =\u003e 0.00000000\n            [asks] =\u003e 0.00000000\n        )\n    [OAXETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00137100\n            [bids] =\u003e 145.88000000\n            [ask] =\u003e 0.00139500\n            [asks] =\u003e 960.81000000\n        )\n    [DNTETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00020421\n            [bids] =\u003e 19401.00000000\n            [ask] =\u003e 0.00020573\n            [asks] =\u003e 1.00000000\n        )\n    [MCOETH] =\u003e Array\n        (\n            [bid] =\u003e 0.02630000\n            [bids] =\u003e 20.36000000\n            [ask] =\u003e 0.02684100\n            [asks] =\u003e 75.35000000\n        )\n    [ICNETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00391600\n            [bids] =\u003e 51.07000000\n            [ask] =\u003e 0.00396800\n            [asks] =\u003e 146.69000000\n        )\n    [ELCBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00000000\n            [bids] =\u003e 0.00000000\n            [ask] =\u003e 0.00000000\n            [asks] =\u003e 0.00000000\n        )\n    [MCOBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00132800\n            [bids] =\u003e 24.64000000\n            [ask] =\u003e 0.00133200\n            [asks] =\u003e 8.26000000\n        )\n    [WTCBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00116640\n            [bids] =\u003e 104.00000000\n            [ask] =\u003e 0.00118000\n            [asks] =\u003e 1572.00000000\n        )\n    [WTCETH] =\u003e Array\n        (\n            [bid] =\u003e 0.02311400\n            [bids] =\u003e 0.99000000\n            [ask] =\u003e 0.02330000\n            [asks] =\u003e 27.68000000\n        )\n    [LLTBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00000000\n            [bids] =\u003e 0.00000000\n            [ask] =\u003e 0.00000000\n            [asks] =\u003e 0.00000000\n        )\n    [LRCBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00000000\n            [bids] =\u003e 0.00000000\n            [ask] =\u003e 0.00000000\n            [asks] =\u003e 0.00000000\n        )\n    [LRCETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00000000\n            [bids] =\u003e 0.00000000\n            [ask] =\u003e 0.00000000\n            [asks] =\u003e 0.00000000\n        )\n    [QTUMBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00178700\n            [bids] =\u003e 328.30000000\n            [ask] =\u003e 0.00180500\n            [asks] =\u003e 50.00000000\n        )\n    [YOYOBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00000000\n            [bids] =\u003e 0.00000000\n            [ask] =\u003e 0.00000000\n            [asks] =\u003e 0.00000000\n        )\n    [OMGBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00126100\n            [bids] =\u003e 61.00000000\n            [ask] =\u003e 0.00126400\n            [asks] =\u003e 8.50000000\n        )\n    [OMGETH] =\u003e Array\n        (\n            [bid] =\u003e 0.02467200\n            [bids] =\u003e 60.99000000\n            [ask] =\u003e 0.02527500\n            [asks] =\u003e 7.98000000\n        )\n    [ZRXBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00003370\n            [bids] =\u003e 69.00000000\n            [ask] =\u003e 0.00003377\n            [asks] =\u003e 7437.00000000\n        )\n    [ZRXETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00065565\n            [bids] =\u003e 68.00000000\n            [ask] =\u003e 0.00069171\n            [asks] =\u003e 123.00000000\n        )\n    [STRATBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00051200\n            [bids] =\u003e 387.00000000\n            [ask] =\u003e 0.00052100\n            [asks] =\u003e 17.90000000\n        )\n    [STRATETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00988800\n            [bids] =\u003e 299.97000000\n            [ask] =\u003e 0.01084600\n            [asks] =\u003e 133.91000000\n        )\n    [SNGLSBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00002211\n            [bids] =\u003e 1028.00000000\n            [ask] =\u003e 0.00002217\n            [asks] =\u003e 536.00000000\n        )\n    [SNGLSETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00043801\n            [bids] =\u003e 892.00000000\n            [ask] =\u003e 0.00043902\n            [asks] =\u003e 1585.00000000\n        )\n    [BQXBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00011061\n            [bids] =\u003e 1814.00000000\n            [ask] =\u003e 0.00011496\n            [asks] =\u003e 1707.00000000\n        )\n    [BQXETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00220610\n            [bids] =\u003e 109.00000000\n            [ask] =\u003e 0.00241190\n            [asks] =\u003e 2606.00000000\n        )\n    [KNCBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00017061\n            [bids] =\u003e 1109.00000000\n            [ask] =\u003e 0.00017297\n            [asks] =\u003e 63.00000000\n        )\n    [KNCETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00340090\n            [bids] =\u003e 3.00000000\n            [ask] =\u003e 0.00342860\n            [asks] =\u003e 515.00000000\n        )\n    [FUNBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00000314\n            [bids] =\u003e 17100.00000000\n            [ask] =\u003e 0.00000317\n            [asks] =\u003e 15600.00000000\n        )\n    [FUNETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00006186\n            [bids] =\u003e 4473.00000000\n            [ask] =\u003e 0.00006467\n            [asks] =\u003e 42036.00000000\n        )\n    [SNMBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00001760\n            [bids] =\u003e 3695.00000000\n            [ask] =\u003e 0.00001781\n            [asks] =\u003e 623.00000000\n        )\n    [SNMETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00034783\n            [bids] =\u003e 507.00000000\n            [ask] =\u003e 0.00035350\n            [asks] =\u003e 1501.00000000\n        )\n    [NEOETH] =\u003e Array\n        (\n            [bid] =\u003e 0.09414500\n            [bids] =\u003e 12.38000000\n            [ask] =\u003e 0.09599700\n            [asks] =\u003e 23.38000000\n        )\n    [IOTABTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00006791\n            [bids] =\u003e 2000.00000000\n            [ask] =\u003e 0.00006857\n            [asks] =\u003e 1861.00000000\n        )\n    [IOTAETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00135101\n            [bids] =\u003e 1461.00000000\n            [ask] =\u003e 0.00138938\n            [asks] =\u003e 21.00000000\n        )\n    [LINKBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00004400\n            [bids] =\u003e 683.00000000\n            [ask] =\u003e 0.00004491\n            [asks] =\u003e 7292.00000000\n        )\n    [LINKETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00086045\n            [bids] =\u003e 682.00000000\n            [ask] =\u003e 0.00087683\n            [asks] =\u003e 4286.00000000\n        )\n    [XVGBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00000080\n            [bids] =\u003e 96600.00000000\n            [ask] =\u003e 0.00000081\n            [asks] =\u003e 179622.00000000\n        )\n    [XVGETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00001556\n            [bids] =\u003e 96537.00000000\n            [ask] =\u003e 0.00001675\n            [asks] =\u003e 4.00000000\n        )\n    [CTRBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00009346\n            [bids] =\u003e 2133.00000000\n            [ask] =\u003e 0.00009470\n            [asks] =\u003e 1992.00000000\n        )\n    [CTRETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00187050\n            [bids] =\u003e 501.00000000\n            [ask] =\u003e 0.00189230\n            [asks] =\u003e 105.00000000\n        )\n    [SALTBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00044400\n            [bids] =\u003e 181.09000000\n            [ask] =\u003e 0.00044700\n            [asks] =\u003e 1144.81000000\n        )\n    [SALTETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00866500\n            [bids] =\u003e 216.71000000\n            [ask] =\u003e 0.00893900\n            [asks] =\u003e 237.00000000\n        )\n    [MDABTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00021328\n            [bids] =\u003e 555.00000000\n            [ask] =\u003e 0.00021973\n            [asks] =\u003e 236.00000000\n        )\n    [MDAETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00425610\n            [bids] =\u003e 450.00000000\n            [ask] =\u003e 0.00441450\n            [asks] =\u003e 511.00000000\n        )\n    [MTLBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00114500\n            [bids] =\u003e 194.48000000\n            [ask] =\u003e 0.00117000\n            [asks] =\u003e 1.40000000\n        )\n    [MTLETH] =\u003e Array\n        (\n            [bid] =\u003e 0.02156000\n            [bids] =\u003e 183.00000000\n            [ask] =\u003e 0.02436700\n            [asks] =\u003e 200.97000000\n        )\n    [SUBBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00002116\n            [bids] =\u003e 520.00000000\n            [ask] =\u003e 0.00002177\n            [asks] =\u003e 957.00000000\n        )\n    [SUBETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00042121\n            [bids] =\u003e 202.00000000\n            [ask] =\u003e 0.00044390\n            [asks] =\u003e 69.00000000\n        )\n    [EOSBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00008837\n            [bids] =\u003e 52.00000000\n            [ask] =\u003e 0.00008901\n            [asks] =\u003e 565.00000000\n        )\n    [SNTBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00000431\n            [bids] =\u003e 11731.00000000\n            [ask] =\u003e 0.00000439\n            [asks] =\u003e 9000.00000000\n        )\n    [ETC] =\u003e Array\n        (\n            [bid] =\u003e 0.00000000\n            [bids] =\u003e 0.00000000\n            [ask] =\u003e 0.00000000\n            [asks] =\u003e 0.00000000\n        )\n    [ETCETH] =\u003e Array\n        (\n            [bid] =\u003e 0.03600000\n            [bids] =\u003e 460.15000000\n            [ask] =\u003e 0.03699600\n            [asks] =\u003e 30.00000000\n        )\n    [ETCBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00181200\n            [bids] =\u003e 6.90000000\n            [ask] =\u003e 0.00183700\n            [asks] =\u003e 2.72000000\n        )\n    [MTHBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00001400\n            [bids] =\u003e 400.00000000\n            [ask] =\u003e 0.00001467\n            [asks] =\u003e 615.00000000\n        )\n    [MTHETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00027316\n            [bids] =\u003e 399.00000000\n            [ask] =\u003e 0.00029096\n            [asks] =\u003e 24939.00000000\n        )\n    [ENGBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00006927\n            [bids] =\u003e 2896.00000000\n            [ask] =\u003e 0.00007040\n            [asks] =\u003e 75.00000000\n        )\n    [ENGETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00138220\n            [bids] =\u003e 1111.00000000\n            [ask] =\u003e 0.00142990\n            [asks] =\u003e 2010.00000000\n        )\n    [DNTBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00001053\n            [bids] =\u003e 11295.00000000\n            [ask] =\u003e 0.00001065\n            [asks] =\u003e 8272.00000000\n        )\n    [ZECBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00000000\n            [bids] =\u003e 0.00000000\n            [ask] =\u003e 0.00000000\n            [asks] =\u003e 0.00000000\n        )\n    [ZECETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00000000\n            [bids] =\u003e 0.00000000\n            [ask] =\u003e 0.00000000\n            [asks] =\u003e 0.00000000\n        )\n    [BNTBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00033500\n            [bids] =\u003e 15.00000000\n            [ask] =\u003e 0.00033996\n            [asks] =\u003e 679.00000000\n        )\n    [ASTBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.00004133\n            [bids] =\u003e 9513.00000000\n            [ask] =\u003e 0.00004528\n            [asks] =\u003e 4170.00000000\n        )\n    [ASTETH] =\u003e Array\n        (\n            [bid] =\u003e 0.00083830\n            [bids] =\u003e 4296.00000000\n            [ask] =\u003e 0.00084900\n            [asks] =\u003e 999.00000000\n        )\n    [DASHBTC] =\u003e Array\n        (\n            [bid] =\u003e 0.04651200\n            [bids] =\u003e 0.25000000\n            [ask] =\u003e 0.04659000\n            [asks] =\u003e 1.00000000\n        )\n    [DASHETH] =\u003e Array\n        (\n            [bid] =\u003e 0.90420000\n            [bids] =\u003e 63.96400000\n            [ask] =\u003e 0.94375000\n            [asks] =\u003e 0.36900000\n        )\n)\n```\n\u003c/details\u003e\n\n#### Place a LIMIT order\n```php\n$quantity = 1;\n$price = 0.0005;\n$order = $api-\u003ebuy(\"BNBBTC\", $quantity, $price);\n```\n\n```php\n$quantity = 1;\n$price = 0.0006;\n$order = $api-\u003esell(\"BNBBTC\", $quantity, $price);\n```\n\n#### Place a MARKET order\n```php\n$quantity = 1;\n$order = $api-\u003emarketBuy(\"BNBBTC\", $quantity);\n```\n\n```php\n$quantity = 0.01;\n$order = $api-\u003emarketSell(\"ETHBTC\", $quantity);\n```\n\n\u003cdetails\u003e\n \u003csummary\u003eView Response\u003c/summary\u003e\n\n```\n(\n    [symbol] =\u003e BNBBTC\n    [orderId] =\u003e 7652393\n    [clientOrderId] =\u003e aAE7BNUhITQj3eg04iG1sY\n    [transactTime] =\u003e 1508564815865\n    [price] =\u003e 0.00000000\n    [origQty] =\u003e 1.00000000\n    [executedQty] =\u003e 1.00000000\n    [status] =\u003e FILLED\n    [timeInForce] =\u003e GTC\n    [type] =\u003e MARKET\n    [side] =\u003e BUY\n)\n```\n\u003c/details\u003e\n\n\n#### Place a STOP LOSS order\n```php\n// When the stop is reached, a stop order becomes a market order\n$type = \"STOP_LOSS\"; // Set the type STOP_LOSS (market) or STOP_LOSS_LIMIT, and TAKE_PROFIT (market) or TAKE_PROFIT_LIMIT\n$quantity = 1;\n$price = 0.5; // Try to sell it for 0.5 btc\n$stopPrice = 0.4; // Sell immediately if price goes below 0.4 btc\n$order = $api-\u003esell(\"BNBBTC\", $quantity, $price, $type, [\"stopPrice\"=\u003e$stopPrice]);\nprint_r($order);\n```\n\n#### Place an ICEBERG order\n```php\n// Iceberg orders are intended to conceal the true order quantity.\n$type = \"LIMIT\"; // LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT\n$quantity = 1;\n$price = 0.5;\n$icebergQty = 10;\n$order = $api-\u003esell(\"BNBBTC\", $quantity, $price, $type, [\"icebergQty\"=\u003e$icebergQty]);\nprint_r($order);\n```\n\n#### Getting 24hr ticker price change statistics for a symbol\n```php\n$prevDay = $api-\u003eprevDay(\"BNBBTC\");\nprint_r($prevDay);\necho \"BNB price change since yesterday: \".$prevDay['priceChangePercent'].\"%\".PHP_EOL;\n```\n\n#### Complete Account Trade History\n```php\n$history = $api-\u003ehistory(\"BNBBTC\");\nprint_r($history);\n```\n\n\u003cdetails\u003e\n \u003csummary\u003eView Response\u003c/summary\u003e\n\n```\nArray (\n    [0] =\u003e Array (\n            [id] =\u003e 831585\n            [orderId] =\u003e 3635308\n            [price] =\u003e 0.00028800\n            [qty] =\u003e 4.00000000\n            [commission] =\u003e 0.00200000\n            [commissionAsset] =\u003e BNB\n            [time] =\u003e 1504805561369\n            [isBuyer] =\u003e 1\n            [isMaker] =\u003e\n            [isBestMatch] =\u003e 1\n        )\n\n    [1] =\u003e Array (\n            [id] =\u003e 1277334\n            [orderId] =\u003e 6126625\n            [price] =\u003e 0.00041054\n            [qty] =\u003e 16.00000000\n            [commission] =\u003e 0.00800000\n            [commissionAsset] =\u003e BNB\n            [time] =\u003e 1507059468604\n            [isBuyer] =\u003e 1\n            [isMaker] =\u003e\n            [isBestMatch] =\u003e 1\n        )\n\n    [2] =\u003e Array (\n            [id] =\u003e 1345995\n            [orderId] =\u003e 6407202\n            [price] =\u003e 0.00035623\n            [qty] =\u003e 30.00000000\n            [commission] =\u003e 0.01500000\n            [commissionAsset] =\u003e BNB\n            [time] =\u003e 1507434311489\n            [isBuyer] =\u003e 1\n            [isMaker] =\u003e 1\n            [isBestMatch] =\u003e 1\n        )\n)\n... (more)\n```\n\u003c/details\u003e\n\n#### Get Market Depth\n```php\n$depth = $api-\u003edepth(\"ETHBTC\");\nprint_r($depth);\n```\n\n#### Get Open Orders\n```php\n$openorders = $api-\u003eopenOrders(\"BNBBTC\");\nprint_r($openorders);\n```\n\n#### Get Order Status\n```php\n$orderid = \"7610385\";\n$orderstatus = $api-\u003eorderStatus(\"ETHBTC\", $orderid);\nprint_r($orderstatus);\n```\n\n#### Cancel an Order\n```php\n$response = $api-\u003ecancel(\"ETHBTC\", $orderid);\nprint_r($response);\n```\n\n#### Market History / Aggregate Trades\n```php\n$trades = $api-\u003eaggTrades(\"BNBBTC\");\nprint_r($trades);\n```\n\n#### Get all account orders; active, canceled, or filled.\n```php\n$orders = $api-\u003eorders(\"BNBBTC\");\nprint_r($orders);\n```\n\n#### Get Kline/candlestick data for a symbol\n```php\n//Periods: 1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M\n$ticks = $api-\u003ecandlesticks(\"BNBBTC\", \"5m\");\nprint_r($ticks);\n```\n\u003cdetails\u003e\n \u003csummary\u003eView Response\u003c/summary\u003e\n\n```\n   [1508560200000] =\u003e Array\n        (\n            [open] =\u003e 0.00019691\n            [high] =\u003e 0.00019695\n            [low] =\u003e 0.00019502\n            [close] =\u003e 0.00019503\n            [volume] =\u003e 0.13712290\n        )\n\n    [1508560500000] =\u003e Array\n        (\n            [open] =\u003e 0.00019502\n            [high] =\u003e 0.00019693\n            [low] =\u003e 0.00019501\n            [close] =\u003e 0.00019692\n            [volume] =\u003e 1.03216357\n        )\n\n    [1508560800000] =\u003e Array\n        (\n            [open] =\u003e 0.00019692\n            [high] =\u003e 0.00019692\n            [low] =\u003e 0.00019689\n            [close] =\u003e 0.00019692\n            [volume] =\u003e 0.22270990\n        )\n... (more)\n```\n\u003c/details\u003e\n\n## WebSocket API\n\n#### miniTicker return the latest candlestick information for every symbol\n```php\n$api-\u003eminiTicker(function($api, $ticker) {\n\tprint_r($ticker);\n});\n```\n\n\u003cdetails\u003e\n \u003csummary\u003eView Response\u003c/summary\u003e\n\n```\n    [18] =\u003e Array\n        (\n            [symbol] =\u003e ONTBNB\n            [close] =\u003e 0.37649000\n            [open] =\u003e 0.30241000\n            [high] =\u003e 0.38112000\n            [low] =\u003e 0.29300000\n            [volume] =\u003e 975240.72000000\n            [quoteVolume] =\u003e 326908.77744250\n            [eventTime] =\u003e 1523395389582\n        )\n\n    [19] =\u003e Array\n        (\n            [symbol] =\u003e WANBTC\n            [close] =\u003e 0.00063657\n            [open] =\u003e 0.00054151\n            [high] =\u003e 0.00063900\n            [low] =\u003e 0.00053900\n            [volume] =\u003e 4443618.00000000\n            [quoteVolume] =\u003e 2637.76413131\n            [eventTime] =\u003e 1523395389551\n        )\n```\n\u003c/details\u003e\n\n#### Realtime Complete Chart Updates via WebSockets\n```php\n$api-\u003echart([\"BNBBTC\"], \"15m\", function($api, $symbol, $chart) {\n\techo \"{$symbol} chart update\\n\";\n\tprint_r($chart);\n});\n```\n\u003cdetails\u003e\n \u003csummary\u003eView Response\u003c/summary\u003e\n\n```\n   [1508560200000] =\u003e Array\n        (\n            [open] =\u003e 0.00019691\n            [high] =\u003e 0.00019695\n            [low] =\u003e 0.00019502\n            [close] =\u003e 0.00019503\n            [volume] =\u003e 0.13712290\n        )\n\n    [1508560500000] =\u003e Array\n        (\n            [open] =\u003e 0.00019502\n            [high] =\u003e 0.00019693\n            [low] =\u003e 0.00019501\n            [close] =\u003e 0.00019692\n            [volume] =\u003e 1.03216357\n        )\n\n    [1508560800000] =\u003e Array\n        (\n            [open] =\u003e 0.00019692\n            [high] =\u003e 0.00019692\n            [low] =\u003e 0.00019689\n            [close] =\u003e 0.00019692\n            [volume] =\u003e 0.22270990\n        )\n... (more)\n```\n\u003c/details\u003e\n\n#### Get latest candlestick data only\n```php\n$api-\u003ekline([\"BTCUSDT\", \"EOSBTC\"], \"5m\", function($api, $symbol, $chart) {\n  //echo \"{$symbol} ({$interval}) candlestick update\\n\";\n\t$interval = $chart-\u003ei;\n\t$tick = $chart-\u003et;\n\t$open = $chart-\u003eo;\n\t$high = $chart-\u003eh;\n\t$low = $chart-\u003el;\n\t$close = $chart-\u003ec;\n\t$volume = $chart-\u003eq; // +trades buyVolume assetVolume makerVolume\n\techo \"{$symbol} price: {$close}\\t volume: {$volume}\\n\";\n});\n```\n\n#### Trade Updates via WebSocket\n```php\n$api-\u003etrades([\"BNBBTC\"], function($api, $symbol, $trades) {\n\techo \"{$symbol} trades update\".PHP_EOL;\n\tprint_r($trades);\n});\n```\n\n#### Get ticker updates for all symbols via WebSocket\n```php\n$api-\u003eticker(false, function($api, $symbol, $ticker) {\n\tprint_r($ticker);\n});\n```\n\n#### Get ticker updates for a specific symbol via WebSocket\n```php\n$api-\u003eticker(\"BNBBTC\", function($api, $symbol, $ticker) {\n\tprint_r($ticker);\n});\n```\n\n#### Realtime updated depth cache via WebSockets\n```php\n$api-\u003edepthCache([\"BNBBTC\"], function($api, $symbol, $depth) {\n\techo \"{$symbol} depth cache update\".PHP_EOL;\n\t//print_r($depth); // Print all depth data\n\t$limit = 11; // Show only the closest asks/bids\n\t$sorted = $api-\u003esortDepth($symbol, $limit);\n\t$bid = $api-\u003efirst($sorted['bids']);\n\t$ask = $api-\u003efirst($sorted['asks']);\n\techo $api-\u003edisplayDepth($sorted);\n\techo \"ask: {$ask}\".PHP_EOL;\n\techo \"bid: {$bid}\".PHP_EOL;\n});\n```\n\u003cdetails\u003e\n \u003csummary\u003eView Response\u003c/summary\u003e\n\n```\nasks:\n0.00020649      1,194      0.24654906\n0.00020600        375      0.07725000\n0.00020586          4      0.00823440\n0.00020576          1      0.00205760\n0.00020564        226      0.04647464\n0.00020555         38      0.00781090\n0.00020552         98      0.02014096\n0.00020537        121      0.02484977\n0.00020520         46      0.09439200\n0.00020519         29      0.05950510\n0.00020518        311      0.06381098\nbids:\n0.00022258      5,142      1.14450636\n0.00020316          7      0.00142212\n0.00020315         82      0.01665830\n0.00020314         16      0.00325024\n0.00020313        512      0.10400256\n0.00020238          5      0.01011900\n0.00020154      1,207      0.24325878\n0.00020151          1      0.02015100\n0.00020150          3      0.60450000\n0.00020140        217      0.04370380\n0.00020135          1      0.02013500\nask: 0.00020518\nbid: 0.00022258\n\n```\n\u003c/details\u003e\n\n#### User Data: Account Balance Updates, Trade Updates, New Orders, Filled Orders, Cancelled Orders via WebSocket\n```php\n$balance_update = function($api, $balances) {\n\tprint_r($balances);\n\techo \"Balance update\".PHP_EOL;\n};\n\n$order_update = function($api, $report) {\n\techo \"Order update\".PHP_EOL;\n\tprint_r($report);\n\t$price = $report['price'];\n\t$quantity = $report['quantity'];\n\t$symbol = $report['symbol'];\n\t$side = $report['side'];\n\t$orderType = $report['orderType'];\n\t$orderId = $report['orderId'];\n\t$orderStatus = $report['orderStatus'];\n\t$executionType = $report['orderStatus'];\n\tif ( $executionType == \"NEW\" ) {\n\t\tif ( $executionType == \"REJECTED\" ) {\n\t\t\techo \"Order Failed! Reason: {$report['rejectReason']}\".PHP_EOL;\n\t\t}\n\t\techo \"{$symbol} {$side} {$orderType} ORDER #{$orderId} ({$orderStatus})\".PHP_EOL;\n\t\techo \"..price: {$price}, quantity: {$quantity}\".PHP_EOL;\n\t\treturn;\n\t}\n\t//NEW, CANCELED, REPLACED, REJECTED, TRADE, EXPIRED\n\techo \"{$symbol} {$side} {$executionType} {$orderType} ORDER #{$orderId}\".PHP_EOL;\n};\n$api-\u003euserData($balance_update, $order_update);\n```\n\n\u003cdetails\u003e\n \u003csummary\u003eView Response\u003c/summary\u003e\n\n```\nOrder update\n    [symbol] =\u003e BNBETH\n    [side] =\u003e BUY\n    [orderType] =\u003e LIMIT\n    [quantity] =\u003e 2.00000000\n    [price] =\u003e 0.00623005\n    [executionType] =\u003e NEW\n    [orderStatus] =\u003e NEW\n    [rejectReason] =\u003e NONE\n    [orderId] =\u003e 4102532\n    [clientOrderId] =\u003e ULtH25RPmICFH0jvsQiq8y\n    [orderTime] =\u003e 1508637831437\n    [eventTime] =\u003e 1508637831440\n\nBNBETH BUY LIMIT ORDER #4102532 (NEW)\n..price: 0.00623005, quantity: 2.00000000\n\nBalance update\n    [BTC] =\u003e Array\n        (\n            [available] =\u003e 0.18167974\n            [onOrder] =\u003e 0.00000000\n        )\n\n    [LTC] =\u003e Array\n        (\n            [available] =\u003e 0.00000000\n            [onOrder] =\u003e 0.00000000\n        )\n\n    [ETH] =\u003e Array\n        (\n            [available] =\u003e 26.68739238\n            [onOrder] =\u003e 2.55103500\n        )\n...(more)\n```\n\u003c/details\u003e\n\n\n#### Withdraw\n```php\n$asset = \"BTC\";\n$address = \"1C5gqLRs96Xq4V2ZZAR1347yUCpHie7sa\";\n$amount = 0.2;\n$response = $api-\u003ewithdraw($asset, $address, $amount);\nprint_r($response);\n```\n\n#### Withdraw with addressTag\n```php\n//Required for coins like XMR, XRP, etc.\n$address = \"44tLjmXrQNrWJ5NBsEj2R77ZBEgDa3fEe9GLpSf2FRmhexPvfYDUAB7EXX1Hdb3aMQ9FLqdJ56yaAhiXoRsceGJCRS3Jxkn\";\n$addressTag = \"0e5e38a01058dbf64e53a4333a5acf98e0d5feb8e523d32e3186c664a9c762c1\n\";\n$amount = 0.1;\n$response = $api-\u003ewithdraw($asset, $address, $amount, $addressTag);\nprint_r($response);\n```\n\n#### Get All Withdraw History\n```php\n$withdrawHistory = $api-\u003ewithdrawHistory();\nprint_r($withdrawHistory);\n```\n\n#### Get Withdraw History for a specific asset\n```php\n$withdrawHistory = $api-\u003ewithdrawHistory(\"BTC\");\nprint_r($withdrawHistory);\n```\n\n#### Get Deposit Address\n```php\n$depositAddress = $api-\u003edepositAddress(\"VEN\");\nprint_r($depositAddress);\n```\n\n#### Get All Deposit History\n```php\n$depositHistory = $api-\u003edepositHistory();\nprint_r($depositHistory);\n```\n\n### Troubleshooting\nIf you get the following errors, please synchronize your system time.\n```\nsignedRequest error: {\"code\":-1021,\"msg\":\"Timestamp for this request was 1000ms ahead of the server's time.\"}\nsignedRequest error: {\"code\":-1021,\"msg\":\"Timestamp for this request is outside of the recvWindow.\"}\nbalanceData error: Please make sure your system time is synchronized, or pass the useServerTime option.\n```\n\n#### useServerTime \n```php\n//Call this before running any functions\n$api-\u003euseServerTime();\n```\n\n#### Installing on Windows\nDownload and install composer:\n1. https://getcomposer.org/download/\n2. Create a folder on your drive like C:\\Binance\n3. Run command prompt and type `cd C:\\Binance`\n4. ```composer require jaggedsoft/php-binance-api```\n5. Once complete copy the vendor folder into your project.\n\n#### Config file in home directory\nIf you dont wish to store your API key and secret in your scripts, load it from your home directory\n```bash\nmkdir -vp ~/.config/jaggedsoft/\ncat \u003e  ~/.config/jaggedsoft/php-binance-api.json \u003c\u003c EOF\n{\n    \"api-key\": \"\u003capi key\u003e\",\n    \"api-secret\": \"\u003csecret\u003e\"\n}\nEOF\n```\n\n#### Config file in home directory to operate on testnet\nTestnet have its own credentials, see the [testnet documentation page](https://testnet.binance.vision/) for more details.\n```bash\nmkdir -vp ~/.config/jaggedsoft/\ncat \u003e  ~/.config/jaggedsoft/php-binance-api.json \u003c\u003c EOF\n{\n    \"api-key\": \"\u003ctestnet api key\u003e\",\n    \"api-secret\": \"\u003ctestnet secret\u003e\",\n    \"use-testnet\": true\n}\nEOF\n```\n\n#### Config file in home directory with curl options\n```bash\nmkdir -vp ~/.config/jaggedsoft/\ncat \u003e  ~/.config/jaggedsoft/php-binance-api.json \u003c\u003c EOF\n{\n    \"api-key\": \"\u003capi key\u003e\",\n    \"api-secret\": \"\u003csecret\u003e\",\n    \"curlOpts\": {\n\t    \"CURLOPT_SSL_VERIFYPEER\": 0,\n\t    \"INVALID_CONSTANT_NAME\": 42\n    }\n\n}\nEOF\n```\n\n\nOptionally add proxy configuration\n```bash\nmkdir -vp ~/.config/jaggedsoft/\ncat \u003e  ~/.config/jaggedsoft/php-binance-api.json \u003c\u003c EOF\n{\n    \"api-key\": \"\u003capi key\u003e\",\n    \"api-secret\": \"\u003csecret\u003e\",\n    \"proto\": \"https\",\n    \"address\": \"proxy.domain.com\",\n    \"port\": \"1080\"\n}\nEOF\n```\n\ncustom location\n```php\n$api = new Binance\\API( \"myfile.json\" );\n```\n\n\n#### Basic stats: Get api call counter\n```php\n$api-\u003egetRequestCount();\n```\n\n#### Basic stats: Get total data transferred\n```php\n$api-\u003egetTransfered();\n```\n\n#### Security - Disable downloading of CA Bundles\nYou can disable the downloading of the CA Bundle:\n```php\n$api = new Binance\\API( \"somefile.json\" );\n$api-\u003ecaOverride = true;\n```\n\n### Documentation\n\u003e There are also numerous other formats available here:\nhttps://github.com/jaggedsoft/php-binance-api/tree/gh-pages\n\n\n[![Vitality](https://github.com/user-attachments/assets/0981aae2-3e12-4b57-8d2f-c5ae2b3b8b1c)](https://vitalitycrypto.com/)\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=ccxt/php-binance-api\u0026type=Date)](https://www.star-history.com/#ccxt/php-binance-api\u0026Date)\n\n## Contribution\n- Give us a star :star:\n- Fork and Clone! Awesome\n- Select existing [issues](https://github.com/jaggedsoft/php-binance-api/issues) or create a [new issue](https://github.com/jaggedsoft/php-binance-api/issues/new) and give us a PR with your bugfix or improvement after. We love it ❤️\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccxt%2Fphp-binance-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fccxt%2Fphp-binance-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccxt%2Fphp-binance-api/lists"}