{"id":23191281,"url":"https://github.com/chehsunliu/fugle-kt","last_synced_at":"2025-04-05T06:43:32.102Z","repository":{"id":39890134,"uuid":"483977892","full_name":"chehsunliu/fugle-kt","owner":"chehsunliu","description":"A Kotlin client for Fugle Realtime API","archived":false,"fork":false,"pushed_at":"2022-05-23T08:19:06.000Z","size":125,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-10T14:32:06.082Z","etag":null,"topics":["fugle","fugle-api","stock","twse"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chehsunliu.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":"2022-04-21T08:57:02.000Z","updated_at":"2022-10-25T13:50:08.000Z","dependencies_parsed_at":"2022-09-26T22:11:08.989Z","dependency_job_id":null,"html_url":"https://github.com/chehsunliu/fugle-kt","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/chehsunliu%2Ffugle-kt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chehsunliu%2Ffugle-kt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chehsunliu%2Ffugle-kt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chehsunliu%2Ffugle-kt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chehsunliu","download_url":"https://codeload.github.com/chehsunliu/fugle-kt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299789,"owners_count":20916186,"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":["fugle","fugle-api","stock","twse"],"created_at":"2024-12-18T12:16:46.765Z","updated_at":"2025-04-05T06:43:32.084Z","avatar_url":"https://github.com/chehsunliu.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fugle-kt\n\n[![Build](https://github.com/chehsunliu/fugle-kt/actions/workflows/build.yml/badge.svg)](https://github.com/chehsunliu/fugle-kt/actions/workflows/build.yml)\n[![Publish](https://github.com/chehsunliu/fugle-kt/actions/workflows/publish.yml/badge.svg)](https://github.com/chehsunliu/fugle-kt/actions/workflows/publish.yml)\n[![Maven](https://img.shields.io/maven-central/v/io.github.chehsunliu.fuglekt/fugle-kt-core)](https://search.maven.org/artifact/io.github.chehsunliu.fuglekt/fugle-kt-core)\n\nfugle-kt is a client for Fugle Realtime API.\n\n## Installation\n\nFetch the dependency via Gradle:\n\n```kotlin\nimplementation(\"io.github.chehsunliu.fuglekt:fugle-kt-core:VERSION\")\n\nimplementation(platform(\"org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.1\"))\nimplementation(\"org.jetbrains.kotlinx:kotlinx-coroutines-core\")\n```\n\n## Usage\n\nGet the metadata of TSMC:\n\n```kotlin\nimport io.github.chehsunliu.fuglekt.core.FugleAsyncClient\nimport kotlinx.coroutines.runBlocking\n\nfun main() = runBlocking {\n  FugleAsyncClient.create(token = \"xxx\").use { client -\u003e\n    val response = client.getMeta(symbolId = \"2330\")\n    println(response)\n  }\n}\n\n// GetMetaResponse(apiVersion=0.3.0, data=Data(info=StockInfo(date=2022-04-29, type=EQUITY, exchange=TWSE, market=TSE, symbolId=2330, countryCode=TW, timeZone=Asia/Taipei, lastUpdatedAt=2022-04-29T13:30+08:00), meta=Meta(market=TSE, nameZhTw=台積電, industryZhTw=半導體業, priceReference=531.0, priceHighLimit=584.0, priceLowLimit=478.0, canDayBuySell=true, canDaySellBuy=true, canShortMargin=true, canShortLend=true, tradingUnit=1000, currency=TWD, isTerminated=false, isSuspended=false, typeZhTw=一般股票, abnormal=正常, isUnusuallyRecommended=false, isNewlyCompiled=null)))\n```\n\nHere is the `FugleAsyncClient` interface:\n\n```kotlin\ninterface FugleAsyncClient : Closeable {\n  suspend fun getMeta(symbolId: String, oddLot: Boolean? = null): GetMetaResponse\n  suspend fun getQuote(symbolId: String, oddLot: Boolean? = null): GetQuoteResponse\n  suspend fun getChart(symbolId: String, oddLot: Boolean? = null): GetChartResponse\n  suspend fun getDealts(symbolId: String, limit: Int? = null, offset: Int? = null, oddLot: Boolean? = null): GetDealtsResponse\n  suspend fun getVolumes(symbolId: String, oddLot: Boolean? = null): GetVolumesResponse\n  suspend fun getCandles(symbolId: String, startDate: LocalDate, endDate: LocalDate): GetCandlesResponse\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchehsunliu%2Ffugle-kt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchehsunliu%2Ffugle-kt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchehsunliu%2Ffugle-kt/lists"}