{"id":28794403,"url":"https://github.com/breezewhite/bfx-rs","last_synced_at":"2026-01-20T17:02:29.905Z","repository":{"id":298229622,"uuid":"999247522","full_name":"BreezeWhite/bfx-rs","owner":"BreezeWhite","description":"Bitfinex API library \u0026 CLI tool written in Rust","archived":false,"fork":false,"pushed_at":"2025-07-18T06:36:22.000Z","size":120,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-30T04:41:20.430Z","etag":null,"topics":["bitfinex","bitfinex-api","bitfinex-cli","bitfinex-rest-api","cli","rust-cli","rust-crate","rust-library"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/BreezeWhite.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":"2025-06-10T01:09:18.000Z","updated_at":"2025-07-18T06:36:16.000Z","dependencies_parsed_at":"2025-06-10T03:52:32.644Z","dependency_job_id":"49d58daf-e201-4dc4-aaef-ff25825e616c","html_url":"https://github.com/BreezeWhite/bfx-rs","commit_stats":null,"previous_names":["breezewhite/bfx-rs"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/BreezeWhite/bfx-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BreezeWhite%2Fbfx-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BreezeWhite%2Fbfx-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BreezeWhite%2Fbfx-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BreezeWhite%2Fbfx-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BreezeWhite","download_url":"https://codeload.github.com/BreezeWhite/bfx-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BreezeWhite%2Fbfx-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: 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":["bitfinex","bitfinex-api","bitfinex-cli","bitfinex-rest-api","cli","rust-cli","rust-crate","rust-library"],"created_at":"2025-06-18T02:37:54.466Z","updated_at":"2026-01-20T17:02:29.899Z","avatar_url":"https://github.com/BreezeWhite.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bitfinex API Library \u0026 CLI Tool (Rust)\n\n[![Crates.io](https://img.shields.io/crates/v/bfx.svg)](https://crates.io/crates/bfx)\n[![Crates.io Downloads](https://img.shields.io/crates/d/bfx.svg)](https://crates.io/crates/bfx)\n[![Docs.rs](https://docs.rs/bfx/badge.svg)](https://docs.rs/bfx)\n\nA fully asynchronous Rust library and CLI for accessing the [Bitfinex V2 API](https://docs.bitfinex.com/reference).\n\n- Async-first: Non-blocking, efficient API calls.\n- CLI included: Query Bitfinex from your terminal.\n- Lightweight: Minimal dependencies.\n- Auto-retry: Handles \"Nonce: small\" errors automatically.\n\n## Quick Start\n\n### Use in Rust Project\nAdd to Your Rust Project:\n```bash\ncargo add bfx\n```\n\n### Example usage\n```rust\nuse bfx::client::Client;\n\nasync fn async_main() {\n    let client = Client::new(\"\".to_string(), \"\".to_string());\n    let ticker = client.request_trading_ticker(\"tBTCUSD\").await.unwrap();\n\n    // Required `serde_json` crate.\n    // Run `cargo add serde_json`\n    println!(\"{}\", serde_json::to_string_pretty(\u0026ticker));\n    // Example output:\n    // {\n    //     \"bid\": 109440.0,\n    //     \"bid_size\": 73.57899877,\n    //     \"ask\": 109450.0,\n    //     \"ask_size\": 17.71589491,\n    //     \"daily_change\": 3680.0,\n    //     \"daily_change_relative\": 0.03479247,\n    //     \"last_price\": 109450.0,\n    //     \"volume\": 392.35200592,\n    //     \"high\": 110680.0,\n    //     \"low\": 105480.0\n    // }\n}\n\nfn main() {\n    // Required `tokio` crate.\n    // Run `cargo add tokio --no-default-features`\n    tokio::runtime::Builder::new_current_thread()\n        .enable_all()\n        .build()\n        .unwrap()\n        .block_on(async_main());\n}\n```\n\n### CLI Installation\n\n**With script (Mac/Linux):**\n```bash\ncurl -sSL https://raw.githubusercontent.com/BreezeWhite/bfx-rs/main/install.sh | bash\n```\n\n**With script (Windows):**\n```ps1\nSet-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass\niwr -useb https://raw.githubusercontent.com/BreezeWhite/bfx-rs/main/install_win.ps1 | iex\n```\n\n**Wth Cargo:**\n\n```bash\ncargo install bfx --features cli\n```\n\n## CLI Usage\n\n```bash\nA convenient CLI tool for Bitfinex\n\nVersion: 0.1.0\nAuthor: BreezeWhite, \u003cmiyashita2010@tuta.io\u003e\n\nUsage: bfx \u003cCOMMAND\u003e\n\nCommands:\n  trading  Trading/exchange related utilities\n  funding  Funding-related utilities\n  public   Public endpoints that does not related to trading nor funding\n  auth     User-related utilities\n  help     Print this message or the help of the given subcommand(s)\n\nOptions:\n  -h, --help     Print help\n  -V, --version  Print version\n```\n\n## More Examples\n\n### Initialize .env file\n\nInitialize the `.bfx_cli.env` file to store API key and API secret for later use.\n\n```rust\nuse bfx::client::Client;\nuse bfx::utils::resolve_env_path_or_create;\n\nfn main() {\n    // This will first try to find the `.bfx_cli.env` file from current directory.\n    // If not found then try finding under $HOME directory of currcent user.\n    // If all fails, this will ask the user to input the API key and secret,\n    // Then store them as `.bfx_cli.env` file under the $HOME directory.\n    let env_path = resolve_env_path_or_create();\n\n    // Then you can use the path to the .env file to load API key and secret\n    // as environment variables with `dotenv` crate.\n    dotenv::from_path(env_path).expect(\"Failed to load .env file\");\n\n    // After loading the .env file, you can now access the API key and\n    // secret using std::env::var.\n    let api_key = std::env::var(\"API_KEY\").unwrap();\n    let api_secret = std::env::var(\"API_SECRET\").unwrap();\n\n    // Use the key and secret to initialize the client.\n    let client = Client::new(api_key, api_secret);\n}\n```\n\nFor CLI, `bfx` will automatically detect if there is a need to ask the\nuser to input API key and secret when calling to authenticated endpoints.\nWhen call to public endpoints, there is no need to have a .env file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreezewhite%2Fbfx-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbreezewhite%2Fbfx-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreezewhite%2Fbfx-rs/lists"}