{"id":13734119,"url":"https://github.com/Codaone/bitshares-php","last_synced_at":"2025-05-08T10:30:56.497Z","repository":{"id":56954676,"uuid":"204154823","full_name":"Codaone/bitshares-php","owner":"Codaone","description":"BitShares php library","archived":false,"fork":false,"pushed_at":"2021-01-21T05:12:03.000Z","size":20,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-20T04:08:32.346Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Codaone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-24T12:33:35.000Z","updated_at":"2021-01-21T05:12:06.000Z","dependencies_parsed_at":"2022-08-21T08:50:10.723Z","dependency_job_id":null,"html_url":"https://github.com/Codaone/bitshares-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codaone%2Fbitshares-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codaone%2Fbitshares-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codaone%2Fbitshares-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codaone%2Fbitshares-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Codaone","download_url":"https://codeload.github.com/Codaone/bitshares-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253045612,"owners_count":21845736,"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":[],"created_at":"2024-08-03T03:00:52.770Z","updated_at":"2025-05-08T10:30:56.219Z","avatar_url":"https://github.com/Codaone.png","language":"PHP","funding_links":[],"categories":["Libraries"],"sub_categories":["PHP Libraries"],"readme":"BitShares PHP Library\r\n========\r\n\r\nOverview\r\n---\r\nThis package allows you to read from BitShares network from selected BitShares node. \r\nPackage does not contain signing operations so any operation which needs signing does not work.\r\n\r\n\r\nInstallation\r\n---\r\n```\r\ncomposer require codaone/bitshares-php\r\n```\r\n\r\nRequirements\r\n---\r\n* PHP \u003e= 7.0\r\n\r\nExamples\r\n===\r\nBitShares class\r\n---\r\nAll methods are passed as rpc meh\r\n\r\n```php\r\n$bitShares = new BitShares('wss://node.com');\r\n$block = $bitShares-\u003egetBlock('40385973');\r\n$bitShares-\u003egetChainId();\r\n```\r\n\r\nGetting data from named api\r\n```php\r\n$bitShares = new BitShares('wss://node.com');\r\n$block = $bitShares-\u003ecall('history', 'method_name', ['param1', 'param2']);\r\n```\r\n\r\n\r\nAccount\r\n---\r\n```php\r\n$account = new Account('account-name');\r\n$openorders = $account-\u003egetOpenOrders();\r\nforeach($openorders as $order) {\r\n...\r\n}\r\n```\r\n\r\nMarket\r\n---\r\n```php\r\n$market = new Market('BTS/USD'); // delimiter can also be : _ -\r\n$market-\u003egetVolume24h('BTS')-\u003egetAmount();\r\n$market-\u003egetTicker();\r\n$market-\u003egetOrderBook(25)-\u003egetAsks();\r\n```\r\n\r\nAsset\r\n---\r\n```php\r\n$asset = new Asset('BTS');\r\n$asset-\u003egetId(); // 1.3.0\r\n$asset-\u003egetPrecision(); // 5\r\n```\r\n\r\nGeneral\r\n---\r\nEvery class under Component namespace extends Object class which is iterable and has arrayAccess.\r\nThis means that for example these are possible:\r\n\r\n```php\r\n$market = new Market('BTS/USD');\r\n$market-\u003egetBase()-\u003egetSymbol(); // BTS\r\n$market['base']['symbol]; // BTS\r\n```\r\n\r\n```php\r\n$account = new Account('account-name');\r\n$account-\u003egetData('owner/weight_threshold');\r\n$account['owner']['weight_threshold'];\r\n$account-\u003egetBalances(); // returns balances array\r\n$account-\u003egetData('balances/0/asset_type');\r\n$account['balances'][0]['asset_type'];\r\nforeach($account as $key =\u003e $value) {\r\n...\r\n}\r\n```\r\n\r\nContributing\r\n---\r\nFeel free to open pull requests or add an issue\r\n\r\nLicense\r\n---\r\nA copy of the license is available in the repository's [LICENSE](LICENSE.txt) file.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCodaone%2Fbitshares-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCodaone%2Fbitshares-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCodaone%2Fbitshares-php/lists"}