{"id":24569731,"url":"https://github.com/mpol1t/geminex","last_synced_at":"2025-07-02T06:36:03.102Z","repository":{"id":261462887,"uuid":"815713173","full_name":"mpol1t/geminex","owner":"mpol1t","description":"Geminex is an Elixir client for Gemini's API, providing streamlined access to trading, account management, and market data. It simplifies integration with Gemini’s REST API, handling authentication, requests, and responses for both public and private endpoints.","archived":false,"fork":false,"pushed_at":"2025-05-28T08:43:35.000Z","size":249,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-28T09:37:10.013Z","etag":null,"topics":["cryptocurrency","elixir","exchange-api","gemini","trading-api"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/geminex","language":"Elixir","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/mpol1t.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":"2024-06-15T23:21:41.000Z","updated_at":"2025-05-28T08:43:34.000Z","dependencies_parsed_at":"2025-02-06T22:25:54.052Z","dependency_job_id":"fe65a21d-cc59-47c6-9bda-be398bb942b5","html_url":"https://github.com/mpol1t/geminex","commit_stats":null,"previous_names":["mpol1t/geminex"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/mpol1t/geminex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpol1t%2Fgeminex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpol1t%2Fgeminex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpol1t%2Fgeminex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpol1t%2Fgeminex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpol1t","download_url":"https://codeload.github.com/mpol1t/geminex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpol1t%2Fgeminex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263088092,"owners_count":23411992,"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":["cryptocurrency","elixir","exchange-api","gemini","trading-api"],"created_at":"2025-01-23T15:55:58.051Z","updated_at":"2025-07-02T06:36:03.072Z","avatar_url":"https://github.com/mpol1t.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![codecov](https://codecov.io/gh/mpol1t/geminex/graph/badge.svg?token=LBmtXjUrNa)](https://codecov.io/gh/mpol1t/geminex)\n[![Hex.pm](https://img.shields.io/hexpm/v/geminex.svg)](https://hex.pm/packages/geminex)\n[![License](https://img.shields.io/github/license/mpol1t/geminex.svg)](https://github.com/mpol1t/geminex/blob/main/LICENSE)\n[![Documentation](https://img.shields.io/badge/docs-hexdocs-blue.svg)](https://hexdocs.pm/geminex)\n[![Build Status](https://github.com/mpol1t/geminex/actions/workflows/elixir.yml/badge.svg)](https://github.com/mpol1t/geminex/actions)\n[![Elixir Version](https://img.shields.io/badge/elixir-~%3E%201.16-purple.svg)](https://elixir-lang.org/)\n\n# Geminex\n\nGeminex is an Elixir client for the [Gemini API](https://docs.gemini.com/), offering easy access to trading, account management, and market data. With both public and private endpoints, it supports order placement, balance checks, market data retrieval, and more, all while abstracting the complexities of API interaction.\n\n## Table of Contents\n- [Features](#features)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Usage](#usage)\n    - [Public API](#public-api)\n    - [Private API](#private-api)\n- [Error Handling](#error-handling)\n- [Adapter Configuration](#adapter-configuration)\n- [Running Tests](#running-tests)\n- [Running Dialyzer](#running-dialyzer)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n\n- Access to **public API** endpoints for market data and trading symbols\n- **Private API** for order placement, trades, account management, staking, and more\n- Built-in **middleware** for authentication and environment switching\n- Simplified **error handling** for cleaner code integration\n\n## Installation\n\nAdd `geminex` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:geminex, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\nThen, run:\n\n```bash\nmix deps.get\n```\n\n## Configuration\n\nConfigure `Geminex` in your application’s configuration file. Set the environment and provide your Gemini API credentials. You can choose between sandbox and production environments.\n\n**config/config.exs**:\n\n```elixir\nimport Config\n\nconfig :geminex,\n       environment: :sandbox,             # Options: :sandbox or :production\n       api_key:     System.get_env(\"GEMINI_API_KEY\"),\n       api_secret:  System.get_env(\"GEMINI_API_SECRET\")\n```\n\nReplace `\u003capi_key\u003e` and `\u003capi_secret\u003e` with your Gemini API credentials.\n## Usage\n\nGeminex offers both **public** and **private** APIs for interacting with Gemini's exchange.\n\n### Public API\n\nThe public API allows access to trading symbols, order books, and market data. These endpoints do not require authentication.\n\n```elixir\n# Retrieve all available trading symbols\n{:ok, symbols} = Geminex.API.Public.symbols()\n\n# Fetch ticker data for a specific symbol\n{:ok, ticker_data} = Geminex.API.Public.ticker(\"btcusd\")\n```\n\n### Private API\n\nThe private API enables management of orders, trades, account settings, staking, and more. These endpoints require valid API credentials and are restricted by Gemini’s account access policies.\n\n```elixir\n# Place a new order\n{:ok, order_response} = Geminex.API.Private.new_order(\"btcusd\", \"0.1\", \"50000\", \"buy\", \"exchange limit\", client_order_id: \"order_12345\")\n\n# Retrieve account balance\n{:ok, balances} = Geminex.API.Private.available_balances()\n```\n\n### Error Handling\n\nAll functions return `{:ok, result}` on success and `{:error, reason}` on failure. You can use pattern matching to handle these responses effectively:\n\n```elixir\ncase Geminex.API.Public.symbols() do\n  {:ok, symbols} -\u003e\n    IO.inspect(symbols)\n\n  {:error, reason} -\u003e\n    IO.puts(\"Failed to retrieve symbols: #{inspect(reason)}\")\nend\n```\n\n### Adapter Configuration\n\nBy default, `Geminex` uses the `Mint` adapter with Tesla. However, users are free to choose and configure any adapter supported by Tesla.\n\n#### Default Configuration\n\nThe default configuration uses the `Mint` adapter:\n\n```elixir\nimport Config\n\nconfig :tesla, adapter: Tesla.Adapter.Mint\n```\n\n#### Customizing the Adapter\n\nTo customize the `Mint` adapter settings or use a different adapter, override the Tesla configuration in your `config.exs` file:\n\n```elixir\n# Customizing Mint\nconfig :tesla,\n  adapter: {Tesla.Adapter.Mint, timeout: 10_000, recv_timeout: 15_000}\n\n# Using Hackney\nconfig :tesla,\n  adapter: {Tesla.Adapter.Hackney, pool_timeout: 5_000, recv_timeout: 10_000}\n```\n\n#### Notes\n\n- Custom settings apply globally and may affect other libraries using Tesla.\n- Refer to the [Tesla documentation](https://hexdocs.pm/tesla/readme.html#adapters) for a list of supported adapters and configuration options.\n\n### Running Tests\n\nTo run tests:\n\n```bash\nmix test\n```\n\n### Running Dialyzer\n\nFor static analysis with Dialyzer, make sure PLTs are built:\n\n```bash\nmix dialyzer --plt\nmix dialyzer\n```\n\n## Contributing\n\nFeel free to open issues or submit PRs to enhance the functionality. Contributions are welcome!\n\n## License\n\nThis project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpol1t%2Fgeminex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpol1t%2Fgeminex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpol1t%2Fgeminex/lists"}