{"id":16593311,"url":"https://github.com/sigrlami/api-monobank","last_synced_at":"2025-03-21T13:31:39.343Z","repository":{"id":62435543,"uuid":"193660248","full_name":"sigrlami/api-monobank","owner":"sigrlami","description":"Haskell client for Monobank Api","archived":false,"fork":false,"pushed_at":"2020-01-10T18:41:31.000Z","size":165,"stargazers_count":24,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-15T04:27:12.580Z","etag":null,"topics":["api","monobank"],"latest_commit_sha":null,"homepage":"https://api.monobank.ua/docs/","language":"Haskell","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/sigrlami.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-25T07:47:11.000Z","updated_at":"2024-10-16T20:02:02.000Z","dependencies_parsed_at":"2022-11-01T21:34:59.608Z","dependency_job_id":null,"html_url":"https://github.com/sigrlami/api-monobank","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigrlami%2Fapi-monobank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigrlami%2Fapi-monobank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigrlami%2Fapi-monobank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigrlami%2Fapi-monobank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sigrlami","download_url":"https://codeload.github.com/sigrlami/api-monobank/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244141580,"owners_count":20404835,"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","monobank"],"created_at":"2024-10-11T23:26:14.911Z","updated_at":"2025-03-21T13:31:39.076Z","avatar_url":"https://github.com/sigrlami.png","language":"Haskell","readme":"# Monobank Api Client\n![Hackage](https://img.shields.io/hackage/v/api-monobank.svg)\n![Azure DevOps builds](https://img.shields.io/azure-devops/build/sigrlami/api-monobank/1.svg)\n\nHaskell client for Monobank API [services](https://api.monobank.ua/docs/).\n\n![Monobank Api](assets/logo.png \"Monobank logo\")\n\n1. [Introduction](#introduction)\n2. [Public API](#public)\n3. [Private API](#private)\n4. [Using library](#use)\n5. [Example](#example)\n6. [Say Thanks](#contributions)\n\n## Introduction\n\nAPI for extracting information and personal account status. To grant access, you must pass the authorization in your personal office at https://api.monobank.ua/ and get a token for personal use.\n\nIf you have questions about the operation of the API, we invite to the community in the [Telegram channel](https://t.me/joinchat/FiAEWhDf-QzTqM4wzEtffw).\n\nIf you have a service or application and you want to centrally join the API for customer service, you need to connect to a [corporate](https://api.monobank.ua/docs/corporate.html) API that has more features.\n\nThis will allow monobank clients to log in to your service (for example, in a financial manager) to provide information about the status of an account or statements.\n\nIn the event of the exploitation of this API as corporate, the bank reserves the right to impose sanctions on the company.\n\n## Public\n\nGeneral information provided without authorization.\n\n| # |Path           | Type | Params |  Description         | Response | Notes|\n|---|---------------|------|--------|----------------------|----------|------|\n| 1 | /bank/currency| GET  |       | Get a basic list of monobank currency rates. Information is cached and updated no more than once every 5 minutes. | JSON | Response will be a json array with objects of 2 types\n\n\n```json\n   {\n    \"currencyCodeA\": 978,\n    \"currencyCodeB\": 840,\n    \"date\": 1561426807,\n    \"rateBuy\": 1.1249,\n    \"rateSell\": 1.1368\n  },\n  {\n    \"currencyCodeA\": 826,\n    \"currencyCodeB\": 980,\n    \"date\": 1561461569,\n    \"rateCross\": 33.2857\n  },\n```\nnote the absence of `rateBuy`, `rateSell` in a second example.Inside client system automatically convert `int` base date into normalized `UTCTime` format.\n\n\n## Private\nInformation provided with authorization.\n\n| # |Path                  | Type | Params                        |  Description         | Response | Notes|\n|---|----------------------|------|-------------------------------| ---------------------|----------|------|\n| 1 | /personal/client-info| GET  |                               | Obtaining information about the client and the list of his accounts. Limit on the use of the function no more than 1 time in 60 seconds.| JSON |\n|   |                      |      | `X-Token` string; `in header` | Token for personal access to the API | |\n| 2 | /personal/statement  | GET  |  /{account}/{from}/{to}       | Receive an extract for the time from {to} to {to} time in seconds Unix time format. The maximum time for which it is possible to extract an extract is 31 days (2678400 seconds) Limit on the use of the function no more than 1 time in 60 seconds. | JSON |\n|   |                      |      | `X-Token` string; in `header` | Token for personal access to the API | |\n|   |                      |      | `account` string; in `path`   | Account ID from the Statement list list or 0 is a default account.\n|   |                      |      | `from` string; in `path`      | Start of the excerpt time\n|   |                      |      | `to` string; in `path`        | End time of the excerpt (if not, the current time will be used)\n\n## Use\n\n- `src` - contains actual API that can be used in 3rd part apps\n- `app` - executable for CLI app that can be used to view current value or run continuosly\n\nJust build repository with `stack build`\n\n```\n$ stack exec -- mnb-app\n```\n\nor simply `mnb-app` if you used `stack install` command\n\n```\n$ mnb-app\n```\nthat will bring following output if runned without keys, currency info\n\n```\nMonobank | Not tokenized API access available for currencies only\nMonobank | Getting last currency prices\n\nUSD/UAH\n - Buy:  25.961 ₴\n - Sell: 26.2357₴\n\nEUR/UAH\n - Buy:  29.161 ₴\n - Sell: 29.9294₴\n\nRUB/UAH\n - Buy:  0.378 ₴\n - Sell: 0.418₴\n\nTRY/UAH\n - Cross: 4.5473₴\n\n...\n\n```\n\nGetting personal information with function `getPersonalInfo'` supply token\n\n```\ngetPersonalInfo' (Just \"bm90IHNvIGZhc3QgSm9obm55\")\n```\n\nLead to response:\n```\nRight (User {uName = \"Paul Atreides\", uAccounts = [Account {acId = \"jTw-r2md_cykrO9vdNgNyQ\", acBalance = 4446033, acCreditLimit = 10000000, acCurrencyCode = 980, acCashbackType = \"UAH\"},Account {acId = \"8uZb22LO716bxAYRJ6FxG-ZA\", acBalance = 17520, acCreditLimit = 0, acCurrencyCode = 840, acCashbackType = \"None\"},Account {acId = \"6s-YdQTmX7MhndGGXPHEjg\", acBalance = 5000, acCreditLimit = 0, acCurrencyCode = 978, acCashbackType = \"None\"}]})\n```\n\nGetting transations avalable with `getPersonalStatement''` function like this\n\n```haskell\ngetPersonalStatement'' (Just \"bm90IHNvIGZhc3QgSm9obm55\") \"0\" \"2019-06-05 10:00:00\" \"2019-06-25 10:00:00\"\n```\nwhere you can have date in normal, human-readable form. They are converted to Posix based Unix epoch string automatically. If you want to calculate Unix epoch on your own, use raw access function `getPersonalStatement'`:\n\n```haskell\n`getPersonalStatement' (Just \"bm90IHNvIGZhc3QgSm9obm55\") \"0\" \"1559728800\" \"\"\n```\n\n## Example\n\nAccumulated statement by month for the year. Implemented inside [Monolytics](https://github.com/sigrlami/monolytics) app with data collected by this API client.\n\n![Balance Chart](assets/balance-chart.png \"Balance Chart\")\n\n## Contributions\n\nSay thanks, send tip:\n\n- `monobank`: https://send.monobank.com.ua/3BNNDq3CV\n- `btc`:      39oVXpsgsyW8ZgzsnX3sV7HLdtXWfT96qN\n- `fct`:      FA38cwer93mmPw1HxjScLmK1yF9iJTu5P87T2vdkbuLovm2YXyss\n- `eth`:      0x9cDBA6bb44772259B3A3fb89cf233A147a720f34\n- `xlm`:      GD2FROTYXYSNOQQREYXHCXVOYWV556EM6PAHMVUHJNJEUYTUXUSNUZQ3\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigrlami%2Fapi-monobank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsigrlami%2Fapi-monobank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigrlami%2Fapi-monobank/lists"}