{"id":1919,"url":"https://github.com/rinov/SwiftFlyer","last_synced_at":"2025-08-02T05:33:06.149Z","repository":{"id":62456513,"uuid":"115857986","full_name":"rinov/SwiftFlyer","owner":"rinov","description":"An API wrapper for bitFlyer.","archived":false,"fork":false,"pushed_at":"2019-05-03T01:40:16.000Z","size":757,"stargazers_count":40,"open_issues_count":2,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-30T22:17:10.983Z","etag":null,"topics":["api-wrapper","bitcoin-api","bitflyer","btc","fx","system-trading"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/rinov.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-12-31T11:00:16.000Z","updated_at":"2024-05-10T07:13:01.000Z","dependencies_parsed_at":"2022-11-02T00:17:42.998Z","dependency_job_id":null,"html_url":"https://github.com/rinov/SwiftFlyer","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/rinov/SwiftFlyer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinov%2FSwiftFlyer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinov%2FSwiftFlyer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinov%2FSwiftFlyer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinov%2FSwiftFlyer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rinov","download_url":"https://codeload.github.com/rinov/SwiftFlyer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinov%2FSwiftFlyer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268339405,"owners_count":24234544,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api-wrapper","bitcoin-api","bitflyer","btc","fx","system-trading"],"created_at":"2024-01-05T20:15:58.997Z","updated_at":"2025-08-02T05:33:05.718Z","avatar_url":"https://github.com/rinov.png","language":"Swift","funding_links":[],"categories":["SDK"],"sub_categories":["Unofficial","Other free courses"],"readme":"# SwiftFlyer\n\nAn API wrapper for bitFlyer that supports all providing API.\n\n[![Swift](https://img.shields.io/badge/Swift-4-blue.svg)](https://img.shields.io/badge/Swift-4-blue.svg)\n[![Platform](https://img.shields.io/badge/Platform-iOS%7CMacOS-orange.svg)](https://img.shields.io/badge/Platform-iOS%7CMacOS-orange.svg)\n[![Cocoapods](https://img.shields.io/badge/Cocoapods-compatible-brightgreen.svg)](https://img.shields.io/badge/Cocoapods-compatible-brightgreen.svg)\n[![Carthage](https://img.shields.io/badge/Carthage-compatible-brightgreen.svg)]((https://img.shields.io/badge/Carthage-compatible-brightgreen.svg))\n[![License](https://img.shields.io/badge/LICENSE-MIT-yellowgreen.svg)](https://img.shields.io/badge/LICENSE-MIT-yellowgreen.svg)\n\n## API Document\n\nhttps://lightning.bitflyer.jp/docs\n\n## Usage\n\n### Public API\n\nFetch a market list.\n\n```swift\nimport SwiftFlyer\n\nlet request = GetMarketListRequest()\n\nApiSession.shared.send(request) { result in\n    switch result {\n    case .success(let markets):\n      print(markets)\n    case .failed(let e):\n      // Error handling\n      break\n    }\n}\n```\n\nResponse:\n```\n[\n  SwiftFlyer.Market(productCode: SwiftFlyer.ProductCode.btc_jpy, alias: nil),\n  SwiftFlyer.Market(productCode: SwiftFlyer.ProductCode.fx_btc_jpy, alias: nil),\n  SwiftFlyer.Market(productCode: SwiftFlyer.ProductCode.eth_btc, alias: nil),\n  SwiftFlyer.Market(productCode: SwiftFlyer.ProductCode.bch_btc, alias: nil)\n]\n```\n\n### Private API\n\nGenerate API keys: https://lightning.bitflyer.jp/developer\n\nCheck your balance.\n\n```swift\nimport SwiftFlyer\n...\n\n// For access private API.\nBitFlyer.apiKey = // Your API Key\nBitFlyer.apiSecretKey = // Your API Secret Key\n\nlet request = GetBalanceRequest()\n\nApiSession.shared.send(request) { result in\n    switch result {\n    case .success(let markets):\n      print(markets)\n    case .failed(let e):\n      // Error handling\n      break\n    }\n}\n```\n\nResponse:\n```\n[\n  SwiftFlyer.Balance(amount: 0.0, available: 0.0, currencyCode: SwiftFlyer.CurrencyCode.jpy),\n  SwiftFlyer.Balance(amount: 0.0, available: 0.0, currencyCode: SwiftFlyer.CurrencyCode.btc),\n  SwiftFlyer.Balance(amount: 0.0, available: 0.0, currencyCode: SwiftFlyer.CurrencyCode.bch),\n  SwiftFlyer.Balance(amount: 0.0, available: 0., currencyCode: SwiftFlyer.CurrencyCode.eth),\n  SwiftFlyer.Balance(amount: 0.0, available: 0.0, currencyCode: SwiftFlyer.CurrencyCode.etc),\n  SwiftFlyer.Balance(amount: 0.0, available: 0.0, currencyCode: SwiftFlyer.CurrencyCode.ltc),\n  SwiftFlyer.Balance(amount: 0.0, available: 0.0, currencyCode: SwiftFlyer.CurrencyCode.mona)\n]\n```\n\n### RealTime API (JSON RPC over WebSocket)\n\nUse RealTImeAPI in your project.\n\n```swift\nfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -\u003e Bool {\n\n    // If you want retrive realtime information, set channels and call `subscribe` of RealTimeAPI.\n    typealias Channel = RealTimeAPI.SubscribeChannel\n\n    // Set channels for subscribing realtime api from bitFlyer RealTimeAPI by using JSON RPC over WebSocket.\n    let subscribeChannels: [String] = [\n    Channel.SnapShot.boardSnap_fx_btc_jpy.targetChannel,\n    Channel.Board.board_fx_btc_jpy.targetChannel,\n    Channel.Ticker.ticker_fx_btc_jpy.targetChannel,\n    Channel.Execution.execution_fx_btc_jpy.targetChannel\n    ]\n\n    // Start observing realtime API.\n    RealTimeAPI.shared.subscribe(with: subscribeChannels)\n\n    ...\n}\n```\n\nAfter subscribe realtime API, you should implement `RealTimeAPIDelegate` into your class.\n\n```swift\n\nclass ViewController: UIViewController {    \n\n    private let realtime: RealTimeAPI = .shared\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n        // Set realtime API delegate for get your setted object.\n        realtime.delegate = self\n    }\n}\n\nextension UIViewController: RealTimeAPIDelegate {\n    public func didReceiveSnapShot(_ snapshot: Board) {\n        print(snapshot)\n    }\n    \n    public func didReceiveBoardDiff(_ board: Board) {\n        print(board)\n    }\n    \n    public func didReceiveTicker(_ ticker: Ticker) {\n        print(ticker)\n    }\n    \n    public func didReceiveExecution(_ executions: [Execution]) {\n        print(executions)\n    }\n}\n```\n\n## Requirements\nXCode 9+\n\nSwift 4+\n\n\n## Installation\n\n```\n$ pod repo update\n```\n\nAnd add this to your Podfile:\n\n```ruby\npod 'SwiftFlyer'\n```\n\nand\n\n`$ pod install`\n\n### Carthage\nAdd this to your Cartfile:\n\n`github \"rinov/SwiftFlyer\"`\n\nand\n\n`$ carthage update`\n\n## TODO\n- [ ] Add timeout to each requests and common settings.\n- [ ] Provide HMAC 256 algorithm instead of CryptoSwift.\n- [ ] Detect exceeding of API call.\n\n## Disclaimer\nUSE THE SOFTWARE AT YOUR OWN RISK.\n\nTHE AUTHORS NO RESPONSIBILITY FOR YOUR TRADING RESULTS.\n\n## Author\n\nRyo Ishikawa, rinov@rinov.jp\n\n## License\n\nSwiftFlyer is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frinov%2FSwiftFlyer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frinov%2FSwiftFlyer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frinov%2FSwiftFlyer/lists"}