{"id":48710424,"url":"https://github.com/zhouaini528/zb-php","last_synced_at":"2026-04-11T14:14:12.784Z","repository":{"id":62517584,"uuid":"262998217","full_name":"zhouaini528/zb-php","owner":"zhouaini528","description":"ZB API Like the official document interface, Support for arbitrary extension.","archived":false,"fork":false,"pushed_at":"2021-03-19T01:45:32.000Z","size":32,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-09T23:49:06.947Z","etag":null,"topics":["binance","bitmex","coinbase","exchanges","huobi","okex","zb"],"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/zhouaini528.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}},"created_at":"2020-05-11T09:31:56.000Z","updated_at":"2022-06-18T12:40:19.000Z","dependencies_parsed_at":"2022-11-02T13:45:53.557Z","dependency_job_id":null,"html_url":"https://github.com/zhouaini528/zb-php","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/zhouaini528/zb-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhouaini528%2Fzb-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhouaini528%2Fzb-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhouaini528%2Fzb-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhouaini528%2Fzb-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhouaini528","download_url":"https://codeload.github.com/zhouaini528/zb-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhouaini528%2Fzb-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31683360,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","bitmex","coinbase","exchanges","huobi","okex","zb"],"created_at":"2026-04-11T14:14:11.957Z","updated_at":"2026-04-11T14:14:12.780Z","avatar_url":"https://github.com/zhouaini528.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"### It is recommended that you read the official document first\n\nZB docs [https://www.zb.live/api](https://www.zb.live/api)\n\nAll interface methods are initialized the same as those provided by Zb. See details [src/api](https://github.com/zhouaini528/zb-php/tree/master/src/Api)\n\nMost of the interface is now complete, and the user can continue to extend it based on my design, working with me to improve it.\n\n[中文文档](https://github.com/zhouaini528/zb-php/blob/master/README_CN.md)\n\n### Other exchanges API\n\n[Exchanges](https://github.com/zhouaini528/exchanges-php) It includes all of the following exchanges and is highly recommended.\n\n[Bitmex](https://github.com/zhouaini528/bitmex-php) Support [Websocket](https://github.com/zhouaini528/bitmex-php/blob/master/README.md#Websocket)\n\n[Okex](https://github.com/zhouaini528/okex-php) Support [Websocket](https://github.com/zhouaini528/okex-php/blob/master/README.md#Websocket)\n\n[Huobi](https://github.com/zhouaini528/huobi-php) Support [Websocket](https://github.com/zhouaini528/huobi-php/blob/master/README.md#Websocket)\n\n[Binance](https://github.com/zhouaini528/binance-php) Support [Websocket](https://github.com/zhouaini528/binance-php/blob/master/README.md#Websocket)\n\n[Kucoin](https://github.com/zhouaini528/kucoin-php)\n\n[Mxc](https://github.com/zhouaini528/Mxc-php)\n\n[Coinbase](https://github.com/zhouaini528/coinbase-php)\n\n[ZB](https://github.com/zhouaini528/zb-php)\n\n[Bitfinex](https://github.com/zhouaini528/bitfinex-php)\n\n[Bittrex](https://github.com/zhouaini528/bittrex-php)\n\n[Kraken](https://github.com/zhouaini528/kraken-php)\n\n[Gate](https://github.com/zhouaini528/gate-php)   \n\n[Bigone](https://github.com/zhouaini528/bigone-php)   \n\n[Crex24](https://github.com/zhouaini528/crex24-php)   \n\n[Bybit](https://github.com/zhouaini528/bybit-php)  \n\n[Coinbene](https://github.com/zhouaini528/coinbene-php)   \n\n[Bitget](https://github.com/zhouaini528/bitget-php)   \n\n[Poloniex](https://github.com/zhouaini528/poloniex-php)\n\n#### Installation\n```\ncomposer require linwj/zb\n```\n\nSupport for more request Settings\n```php\n$zb=new Zb();\n\n//You can set special needs\n$zb-\u003esetOptions([\n    //Set the request timeout to 60 seconds by default\n    'timeout'=\u003e10,\n    \n    //If you are developing locally and need an agent, you can set this\n    //'proxy'=\u003etrue,\n    //More flexible Settings\n    /* 'proxy'=\u003e[\n     'http'  =\u003e 'http://127.0.0.1:12333',\n     'https' =\u003e 'http://127.0.0.1:12333',\n     'no'    =\u003e  ['.cn']\n     ], */\n    //Close the certificate\n    //'verify'=\u003efalse,\n]);\n```\n\n### Zb Spot API\n\nMarket related API [More](https://github.com/zhouaini528/zb-php/blob/master/tests/market.php)\n```php\n$zb=new Zb($key,$secret);\n\ntry {\n    $result=$zb-\u003emarket()-\u003egetAllTicker();\n    print_r($result);\n}catch (\\Exception $e){\n    print_r($e-\u003egetMessage());\n}\n\ntry {\n    $result=$zb-\u003emarket()-\u003egetTicker([\n        'market'=\u003e'btc_usdt'\n    ]);\n    print_r($result);\n}catch (\\Exception $e){\n    print_r($e-\u003egetMessage());\n}\n\ntry {\n    $result=$zb-\u003emarket()-\u003egetDepth([\n        'market'=\u003e'btc_usdt',\n        'size'=\u003e'5'\n    ]);\n    print_r($result);\n}catch (\\Exception $e){\n    print_r($e-\u003egetMessage());\n}\n\ntry {\n    $result=$zb-\u003emarket()-\u003egetTrades([\n        'market'=\u003e'btc_usdt',\n        'since'=\u003e'xxxxxxxxx'\n    ]);\n    print_r($result);\n}catch (\\Exception $e){\n    print_r($e-\u003egetMessage());\n}\n\ntry {\n    $result=$zb-\u003emarket()-\u003egetKline([\n        'market'=\u003e'btc_usdt',\n        //'type'=\u003e'1day',\n        'size'=\u003e10\n    ]);\n    print_r($result);\n}catch (\\Exception $e){\n    print_r($e-\u003egetMessage());\n}\n\n```\n\nOrder related API [More](https://github.com/zhouaini528/zb-php/blob/master/tests/trade.php)\n```php\n$zb=new Zb($key,$secret);\n\ntry {\n    $result=$zb-\u003etrade()-\u003eorder([\n        //'customerOrderId'=\u003e'',\n        'tradeType'=\u003e'0',//1=buy,0=sell\n        'currency'=\u003e'btc_usdt',\n        'price'=\u003e'11000',\n        'amount'=\u003e'0.01',\n    ]);\n    print_r($result);\n}catch (\\Exception $e){\n    print_r($e-\u003egetMessage());\n}\n\ntry {\n    $order=$zb-\u003etrade()-\u003egetOrder([\n        //'customerOrderId'=\u003e'',\n        'id'=\u003e$result['id'],\n        'currency'=\u003e'btc_usdt',\n    ]);\n    print_r($order);\n}catch (\\Exception $e){\n    print_r($e-\u003egetMessage());\n}\n\ntry {\n    $result=$zb-\u003etrade()-\u003ecancelOrder([\n        //'customerOrderId'=\u003e'',\n        'id'=\u003e$result['id'],\n        'currency'=\u003e'btc_usdt',\n    ]);\n    print_r($result);\n}catch (\\Exception $e){\n    print_r($e-\u003egetMessage());\n}\n```\n\nAccounts related API [More](https://github.com/zhouaini528/zb-php/blob/master/tests/account.php)\n```php\n$zb=new Zb($key,$secret);\n\ntry {\n    $result=$zb-\u003eaccount()-\u003egetSubUserList();\n    print_r($result);\n}catch (\\Exception $e){\n    print_r($e-\u003egetMessage());\n}\n\n```\n\n[More Test](https://github.com/zhouaini528/zb-php/tree/master/tests)\n\n[More Api](https://github.com/zhouaini528/zb-php/tree/master/src/Api)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhouaini528%2Fzb-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhouaini528%2Fzb-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhouaini528%2Fzb-php/lists"}