{"id":37904295,"url":"https://github.com/after-the-sunrise/bitflyer4j","last_synced_at":"2026-01-16T17:08:14.415Z","repository":{"id":57716590,"uuid":"98033020","full_name":"after-the-sunrise/bitflyer4j","owner":"after-the-sunrise","description":"Java wrapper library for bitFlyer Lightning API.","archived":false,"fork":false,"pushed_at":"2019-05-06T03:44:27.000Z","size":398,"stargazers_count":22,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-07-28T00:20:36.005Z","etag":null,"topics":["altcoin","api","bitcoin","bitflyer","cryptocurrency","java","lightning"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/after-the-sunrise.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":"2017-07-22T13:28:27.000Z","updated_at":"2023-07-09T04:18:59.000Z","dependencies_parsed_at":"2022-09-26T22:30:28.924Z","dependency_job_id":null,"html_url":"https://github.com/after-the-sunrise/bitflyer4j","commit_stats":null,"previous_names":[],"tags_count":26,"template":null,"template_full_name":null,"purl":"pkg:github/after-the-sunrise/bitflyer4j","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/after-the-sunrise%2Fbitflyer4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/after-the-sunrise%2Fbitflyer4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/after-the-sunrise%2Fbitflyer4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/after-the-sunrise%2Fbitflyer4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/after-the-sunrise","download_url":"https://codeload.github.com/after-the-sunrise/bitflyer4j/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/after-the-sunrise%2Fbitflyer4j/sbom","scorecard":{"id":170034,"data":{"date":"2025-08-11","repo":{"name":"github.com/after-the-sunrise/bitflyer4j","commit":"1f251d1303ccd5cdae49955375f4c09c1b8c8c31"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU Lesser General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T16:11:14.280Z","repository_id":57716590,"created_at":"2025-08-16T16:11:14.280Z","updated_at":"2025-08-16T16:11:14.280Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"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":["altcoin","api","bitcoin","bitflyer","cryptocurrency","java","lightning"],"created_at":"2026-01-16T17:08:14.319Z","updated_at":"2026-01-16T17:08:14.410Z","avatar_url":"https://github.com/after-the-sunrise.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bitflyer4j \n[![Build Status][travis-icon]][travis-page] [![Coverage Status][coverall-icon]][coverall-page] [![Maven Central][maven-icon]][maven-page] [![Javadocs][javadoc-icon]][javadoc-page]\n\n* :us: [English](./README.md)\n* :jp: [日本語](./README_jp.md)\n\n\n## Overview\n\n**bitflyer4j** (bitFlyer for Java) is a Java wrapper library for the [bitFlyer Lightning][bf-ltng] API.\n\n[bitFlyer][bf-site] is a crytocurrency exchange based in Japan, offering JSON+REST API just like many of the other bitcoin and altcoin exchanges. \nThis library aims to capsulize the raw message formats and protocols, and provide a strictly-typed API library in addition to the handy features.\n\n* Strictly-typed method calls, parameters and return types.\n* Asynchronous method calls with `java.util.concurrent.CompletableFuture` for background message queueing/throttling and method chaining.\n* Out-of-the-box listener callbacks for realtime data subscriptions.\n* Private API tokens actually kept private.\n* Battle-tested by the author.\n\n\n## Getting Started\n\n### Download\n\nUse [Maven](https://maven.apache.org/) or [Gradle](https://gradle.org/) to automatically fetch \nthe library jars and its dependencies from [The Central Repository][maven-page].\n\n#### Maven (`pom.xml`)\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.after_sunrise.cryptocurrency\u003c/groupId\u003e\n    \u003cartifactId\u003ebitflyer4j\u003c/artifactId\u003e\n    \u003cversion\u003e${VERSION}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Sample Codes\n\nCopy and paste the following code snippets into the `main` and execute.\n\n#### Query Tick\n\nQuery for the latest tick data (price/size for best-bid/ask/last, accumulated volume, etc).\n\n```java\npublic class QueryTickSample {\n\n    public static void main(String[] args) throws Exception {\n\n        Bitflyer4j api = new Bitflyer4jFactory().createInstance();\n\n        Tick.Request request = Tick.Request.builder().product(\"ETH_BTC\").build();\n\n        System.out.println(api.getMarketService().getTick(request).get());\n\n        api.close();\n\n    }\n\n}\n```\n\n#### Send New Order\n\nSend a new order. Note that this is for the \"Child Order\" in bitFlyer's terminology. \n\n```java\npublic class SendOrderSample {\n\n    public static void main(String[] args) throws Exception {\n\n        Bitflyer4j api = new Bitflyer4jFactory().createInstance();\n\n        OrderCreate.Request request = OrderCreate.Request.builder()\n                .product(\"FX_BTC_JPY\").type(ConditionType.LIMIT).side(SideType.BUY)\n                .price(new BigDecimal(\"12345.6789\")).size(BigDecimal.ONE).build();\n\n        System.out.println(api.getOrderService().sendOrder(request).get());\n\n        api.close();\n\n    }\n\n}\n```\n\n#### Cancel Existing Order\n\nCancel an existing order. Specify either one of the order id or the acceptance id.\n\n```java\npublic class CancelOrderSample {\n\n    public static void main(String[] args) throws Exception {\n\n        Bitflyer4j api = new Bitflyer4jFactory().createInstance();\n\n        OrderCancel.Request request = OrderCancel.Request.builder()\n                .product(\"BTCJPY_MAT1WK\").orderId(\"JOR20150707-055555-022222\").build();\n\n        System.out.println(api.getOrderService().cancelOrder(request).get());\n\n        api.close();\n\n    }\n\n}\n```\n\n#### Subscribe to Realtime Feed\n\nInitiate a subscription for the steaming market data. \n(Automatic reconnect with subscription recovery upon unsolicited disconnect.)\n\n```java\npublic class RealtimeSample {\n\n    public static void main(String[] args) throws Exception {\n\n        Bitflyer4j api = new Bitflyer4jFactory().createInstance();\n\n        api.getRealtimeService().addListener(new RealtimeListenerAdapter() {\n            @Override\n            public void onTicks(String product, List\u003cTick\u003e values) {\n                System.out.println(\"(\" + product + \")\" + values);\n            }\n        });\n\n        System.out.println(api.getRealtimeService().subscribeTick(Arrays.asList(\"BTC_JPY\")).get());\n\n        TimeUnit.SECONDS.sleep(30L);\n\n        api.close();\n\n    }\n\n}\n```\n\nFor the full list of supported features and sample codes, please refer to \n[Bitflyer4jTest](./src/test/java/com/after_sunrise/cryptocurrency/bitflyer4j/Bitflyer4jTest.java).\n\n\n## Features \u0026 Configurations\n\nBelow are some of the features and configurations available, which may be useful \nfor specific use cases and executing environments.\n\n### Private API Authentication\n\nIn order to use the [Private API](https://lightning.bitflyer.jp/docs?lang=en#http-private-api), \nspecify the following properties in the environment variables and/or the configuration files:\n  * `bitflyer4j.auth_key`\n  * `bitflyer4j.auth_secret`\n\nWhen the API library is initialized, it will try to search these properties in the following priority:\n  1. Java runtime properties. (`java -Dbitflyer4j.auth_key=... -Dbitflyer4j.auth_secret=...`)\n  2. `${HOME}/.bitflyer4j` properties file.\n  3. `bitflyer4j-site.properties` file in the classpath.\n\nThe library will scan from the top of the list, skipping the ones which are not available/accessible, \nand will use the first one found per variable.\n\nNote that Confidential parameters shall only be stored privately, \npreferably by using the local `${HOME}/.bitflyer4j` properties \nfile.  *DO NOT COMMIT, LOG, NOR DISSEMINATE THE CREDENTIALS.* \n \n```properties:${HOME}/.bitflyer4j\n# Authentication\nbitflyer4j.auth_key=MY_KEY_HERE\nbitflyer4j.auth_secret=MY_SECRET_HERE\n```\nA template of the `.bitflyer4j` file can be downloaded from \n[here](./src/test/resources/.bitflyer4j).\n\n\n### Network Proxy\n\nIn case if this library is to be used behind a network proxy, specify the following environment variables.\nThe variables are fetched by the library in the same manner, as described previously in the authentication section.\n\n```properties:${HOME}/.bitflyer4j\n# HTTP Proxy\nbitflyer4j.http_proxy_type=HTTP\nbitflyer4j.http_proxy_host=127.0.0.1\nbitflyer4j.http_proxy_port=8080\n```\n\n\n### HTTP Access Throttling\n\nbitFlyer limits the number of HTTP requests allowed per interval.\n\nIn this library, each HTTP calls are queued first, and a background thread takes them out of the queue, \nwith a throttling mechanism to avoid DOS-attacking the service and comply with the limit.  Therefore, \neach HTTP calls are designed to return a `java.util.concurrent.CompletableFuture` instance, \nwhich is completed only after the HTTP request has been actually executed by the background thread.\n\nTo make these asynchronous HTTP calls synchronous, simply call the `CompletableFuture#get()` method.\n\n\n### Other Configurations\n\nAlthough there should be no need to overwrite the default configurations, the following parameters are externalized \nand can be overwritten by the environment variables.  For the complete list of configurable parameters and details, \nrefer to the [KeyType](./src/main/java/com/after_sunrise/cryptocurrency/bitflyer4j/core/KeyType.java) javadoc.\n\n\n|Property Key                          |Default Value                             |Description                                                                           |\n|--------------------------------------|------------------------------------------|--------------------------------------------------------------------------------------|\n|bitflyer4j.site                       |local                                     |Optional free-text label to identify the environment which the client app is running. |\n|bitflyer4j.auth_key                   |                                          |Authentication key for the private API.                                               |\n|bitflyer4j.auth_secret                |                                          |Authentication secret for the private API.                                            |\n|bitflyer4j.http_url                   |https://api.bitflyer.jp                   |Endpoint URL of the service.                                                          |\n|bitflyer4j.http_proxy_type            |                                          |Proxy type (DIRECT/HTTP/SOCKS) used for HTTP calls. Leave empty to disable proxy.     |\n|bitflyer4j.http_proxy_host            |                                          |Address of the proxy server. Proxy type must be specified for the proxy enablement.   |\n|bitflyer4j.http_proxy_port            |                                          |Port of the proxy server. Proxy type must be specified for the proxy enablement.      |\n|bitflyer4j.http_timeout               |180000                                    |HTTP socket/read timeout interval in millis. Leave empty for no timeout.              |\n|bitflyer4j.http_threads               |8                                         |HTTP threads to utilize for HTTP access.                                              |\n|bitflyer4j.http_limit_interval        |300000                                    |HTTP access throttling interval in millis.                                            |\n|bitflyer4j.http_limit_criteria_address|500                                       |Number of allowed HTTP access for a single source IP, within the throttling interval. |\n|bitflyer4j.http_limit_criteria_private|500                                       |Number of allowed HTTP access for private API calls, within the throttling interval.  |\n|bitflyer4j.realtime_type              |                                          |Implementaion type to utilize for realtime subcription.                               |\n|bitflyer4j.socket_endpoint            |https://io.lightstream.bitflyer.com       |Endpoint URL of the Socket.IO.                                                        |\n\n\n## Endpoint Paths\n\nCurrently implemented API endpoint paths are as follows:\n\n- HTTP Public API\n  - [x] Market List : `/v1/markets`\n  - [x] Market List USA : `/v1/markets/usa`\n  - [x] Market List EUR : `/v1/markets/eu`\n  - [x] Order Book : `/v1/board`\n  - [x] Ticker : `/v1/ticker`\n  - [x] Execution History : `/v1/executions`\n  - [x] Chat : `/v1/getchats`\n  - [x] Chat USA : `/v1/getchats/usa`\n  - [x] Chat EUR : `/v1/getchats/eu`\n  - [x] Exchange Status : `/v1/gethealth`\n  - [x] Board State : `/v1/getboardstate`\n- HTTP Private API\n  - Account Detail\n    - [x] Permissions : `/v1/me/getpermissions`\n    - [x] Balance : `/v1/me/getbalance`\n    - [x] Collateral : `/v1/me/getcollateral`\n    - [x] Margin : `/v1/me/getcollateralaccounts`\n    - [x] Address : `/v1/me/getaddresses`\n    - [x] Coin In : `/v1/me/getcoinins`\n    - [x] Coin Out : `/v1/me/getcoinouts`\n    - [x] Bank : `/v1/me/getbankaccounts`\n    - [x] Deposit : `/v1/me/getdeposits`\n    - [x] Withdrawal : `/v1/me/getwithdrawals`\n  - Account Action\n    - [x] Withdraw : `/v1/me/withdraw`\n  - Order Action\n    - [x] New Child Order `/v1/me/sendchildorder`\n    - [x] Cancel Child Order `/v1/me/cancelchildorder`\n    - [x] New Parent Order `/v1/me/sendparentorder`\n    - [x] Cancel Parent Order `/v1/me/cancelparentorder`\n    - [x] Cancel All Orders `/v1/me/cancelallchildorders`\n  - Order Detail\n    - [x] Child Order List `/v1/me/getchildorders`\n    - [x] Parent Order List `/v1/me/getparentorders`\n    - [x] Parent Order Detail `/v1/me/getparentorder`\n    - [x] Executions `/v1/me/getexecutions`\n    - [x] Open Interest Summary `/v1/me/getpositions`\n    - [x] Margin Change History `/v1/me/getcollateralhistory`\n    - [x] Trading Commission `/v1/me/gettradingcommission`\n- Realtime API\n  - Socket.IO\n    - [x] Order Book Update `lightning_board_*`\n    - [x] Order Book Snapshot `lightning_board_snapshot_*`\n    - [x] Ticker `lightning_ticker_*`\n    - [x] Execution `lightning_executions_*`\n\n\n[bf-site]:https://bitflyer.jp?bf=yolu1tm3\u0026lang=en\n[bf-ltng]:https://lightning.bitflyer.jp/?bf=yolu1tm3\u0026lang=en\n[travis-page]:https://travis-ci.org/after-the-sunrise/bitflyer4j\n[travis-icon]:https://travis-ci.org/after-the-sunrise/bitflyer4j.svg?branch=master\n[coverall-page]:https://coveralls.io/github/after-the-sunrise/bitflyer4j?branch=master\n[coverall-icon]:https://coveralls.io/repos/github/after-the-sunrise/bitflyer4j/badge.svg?branch=master\n[maven-page]:https://maven-badges.herokuapp.com/maven-central/com.after_sunrise.cryptocurrency/bitflyer4j\n[maven-icon]:https://maven-badges.herokuapp.com/maven-central/com.after_sunrise.cryptocurrency/bitflyer4j/badge.svg\n[javadoc-page]:https://www.javadoc.io/doc/com.after_sunrise.cryptocurrency/bitflyer4j\n[javadoc-icon]:https://www.javadoc.io/badge/com.after_sunrise.cryptocurrency/bitflyer4j.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafter-the-sunrise%2Fbitflyer4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafter-the-sunrise%2Fbitflyer4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafter-the-sunrise%2Fbitflyer4j/lists"}