{"id":16956086,"url":"https://github.com/codenix-sv/bitfinex-api","last_synced_at":"2025-04-14T06:23:32.594Z","repository":{"id":56955571,"uuid":"239274546","full_name":"codenix-sv/bitfinex-api","owner":"codenix-sv","description":"PHP client for the Bitfinex API","archived":false,"fork":false,"pushed_at":"2020-07-29T05:38:18.000Z","size":18,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T20:11:38.028Z","etag":null,"topics":["api","api-client","bitfinex","bitfinex-api","bitfinex-rest-api","exchange"],"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/codenix-sv.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-02-09T09:02:12.000Z","updated_at":"2020-07-29T05:37:27.000Z","dependencies_parsed_at":"2022-08-21T04:40:30.073Z","dependency_job_id":null,"html_url":"https://github.com/codenix-sv/bitfinex-api","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenix-sv%2Fbitfinex-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenix-sv%2Fbitfinex-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenix-sv%2Fbitfinex-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenix-sv%2Fbitfinex-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codenix-sv","download_url":"https://codeload.github.com/codenix-sv/bitfinex-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248492885,"owners_count":21113163,"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":["api","api-client","bitfinex","bitfinex-api","bitfinex-rest-api","exchange"],"created_at":"2024-10-13T22:14:13.653Z","updated_at":"2025-04-14T06:23:32.553Z","avatar_url":"https://github.com/codenix-sv.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bitfinex-api\n[![Build Status](https://travis-ci.com/codenix-sv/bitfinex-api.svg?branch=master)](https://travis-ci.com/codenix-sv/bitfinex-api)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/codenix-sv/bitfinex-api/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/codenix-sv/bitfinex-api/?branch=master)\n[![License: MIT](https://img.shields.io/github/license/codenix-sv/bitfinex-api)](https://github.com/codenix-sv/bitfinex-api/blob/master/LICENSE)\n[![Packagist](https://img.shields.io/packagist/dt/codenix-sv/bitfinex-api)](https://packagist.org/packages/codenix-sv/bitfinex-api)\n\nA simple PHP wrapper for [Bitfinex API](https://docs.bitfinex.com/docs/rest-general). [Bitfinex](https://www.bitfinex.com) The world's largest and most advanced cryptocurrency trading platform\n\nPay attention to the [WebSocket client in PHP for the Bitfinex API](https://github.com/codenix-sv/bitfinex-api-ws)\n\n## Requirements\n\n* PHP \u003e= 7.2\n* ext-json\n* [Bitfinex](https://www.bitfinex.com), API key and API secret\n\n## Installation\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n```bash\n$ composer require codenix-sv/bitfinex-api\n```\nor add\n\n```json\n\"codenix-sv/bitfinex-api\" : \"^1.0\"\n```\n\nto the require section of your application's `composer.json` file.\n\n## Basic usage\n\n### Example\n```php\nuse Codenixsv\\BitfinexApi\\BitfinexClient;\n\n$client = new BitfinexClient();\n$data = $client-\u003epublic()-\u003egetPlatformStatus();\n```\n## Available methods\n\n### Public API\n\n#### getPlatformStatus\nGet the current status of the platform, “Operative” or “Maintenance” (1=operative, 0=maintenance). Maintenance periods generally last for a \nfew minutes to a couple of hours and may be necessary from time to time during infrastructure upgrades.\n\n```php\n$data = $client-\u003epublic()-\u003egetPlatformStatus();\n```\n\n#### getTickers\nThe tickers endpoint provides a high level overview of the state of the market. It shows the current best bid and ask,\nthe last traded price, as well as information on the daily volume and price movement over the last day. The endpoint can retrieve multiple tickers with a single query.\n```php\n$data = $client-\u003epublic()-\u003egetTickers('tBTCUSD,tLTCUSD,fUSD');\n```\n\n#### getTicker\nThe ticker endpoint provides a high level overview of the state of the market for a specified pair. It shows the current\nbest bid and ask, the last traded price, as well as information on the daily volume and price movement over the last day.\n```php\n$data = $client-\u003epublic()-\u003egetTicker('tBTCUSD');\n```\n\n#### getTrades\nThe trades endpoint allows the retrieval of past public trades and includes details such as price, size, and time. \nOptional parameters can be used to limit the number of results; you can specify a start and end timestamp, a limit, and a sorting method.\n```php\n$data = $client-\u003epublic()-\u003egetTrades('tBTCUSD', ['limit' =\u003e 100]);\n```\n\n#### getBook\nThe Public Books endpoint allows you to keep track of the state of Bitfinex order books on a price aggregated basis with\ncustomizable precision. Raw books can be retrieved by using precision `R0`. \n```php\n$data = $client-\u003epublic()-\u003egetBook('tBTCUSD', 'P0');\n```\n\n#### getStats\nThe Stats endpoint provides various statistics on a specified trading pair or funding currency. Use the available keys \nto specify which statistic you wish to retrieve.\n\nUse `side` param only for non-funding queries.\n```php\n$data = $client-\u003epublic()-\u003egetStats('pos.size', '1m', 'tBTCUSD', 'hist', 'long');\n$data = $client-\u003epublic()-\u003egetStats('funding.size', '1m', 'fUSD', 'hist');\n```\n\n#### getCandles\nThe Candles endpoint provides OCHL (Open, Close, High, Low) and volume data for the specified funding currency or trading pair.\nFunding period required only for funding candles.\n```php\n$data = $client-\u003epublic()-\u003egetCandles('1m', 'tBTCUSD', 'hist');\n$data = $client-\u003epublic()-\u003egetCandles('1m', 'fUSD', 'hist', 'p30');\n```\n\n#### getConfigs\nFetch currency and symbol site configuration data.\nA variety of types of config data can be fetched by constructing a path with an Action, Object, and conditionally a Detail value.\n```php\n$data = $client-\u003epublic()-\u003egetConfigs('list', 'pair', 'exchange');\n```\n\n#### getStatus\nEndpoint used to receive different types of platform information - currently supports derivatives pair status only.\n```php\n$data = $client-\u003epublic()-\u003egetStatus('deriv', ['keys' =\u003e 'tBTCF0:USTF0']);\n$data = $client-\u003epublic()-\u003egetStatus('deriv/tBTCF0:USTF0/hist', ['start' =\u003e 157057800000, 'end' =\u003e 1573566992000]);\n```\n\n#### getLiquidationFeed\nEndpoint to retrieve liquidations. By default it will retrieve the most recent liquidations, but time-specific data can be retrieved using timestamps.\n```php\n$data = $client-\u003epublic()-\u003egetLiquidationFeed();\n```\n\n#### getLeaderboards\nThe leaderboards endpoint allows you to retrieve leaderboard standings for unrealized profit (period delta), unrealized profit (inception), volume, and realized profit.\n```php\n$data = $client-\u003epublic()-\u003egetLeaderboards('vol', '3h', 'tBTCUSD', 'hist');\n```\n\n## Further Information\nPlease, check the [Bitfinex site](https://docs.bitfinex.com/docs/rest-general) documentation for further\ninformation about API.\n\n## License\n\n`codenix-sv/bitfinex-api` is released under the MIT License. See the bundled [LICENSE](./LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenix-sv%2Fbitfinex-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodenix-sv%2Fbitfinex-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenix-sv%2Fbitfinex-api/lists"}