{"id":13637119,"url":"https://github.com/d-e-s-o/apca","last_synced_at":"2025-04-05T01:04:30.018Z","repository":{"id":40460704,"uuid":"257476648","full_name":"d-e-s-o/apca","owner":"d-e-s-o","description":"A crate for interacting with the Alpaca API at alpaca.markets.","archived":false,"fork":false,"pushed_at":"2024-04-14T16:29:09.000Z","size":1960,"stargazers_count":122,"open_issues_count":10,"forks_count":35,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-05-01T13:58:33.863Z","etag":null,"topics":["alpaca","alpaca-api","alpaca-markets","alpaca-trading-api","rust","rust-crate","rust-library"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d-e-s-o.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2020-04-21T04:09:01.000Z","updated_at":"2024-04-30T07:50:19.000Z","dependencies_parsed_at":"2023-12-06T18:25:46.260Z","dependency_job_id":"09ab46c0-f6a3-4488-9d67-c59907d038b6","html_url":"https://github.com/d-e-s-o/apca","commit_stats":{"total_commits":482,"total_committers":12,"mean_commits":"40.166666666666664","dds":0.05809128630705396,"last_synced_commit":"181ae10ddf48cfe71f92d6700304464daf873942"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-e-s-o%2Fapca","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-e-s-o%2Fapca/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-e-s-o%2Fapca/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-e-s-o%2Fapca/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d-e-s-o","download_url":"https://codeload.github.com/d-e-s-o/apca/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271516,"owners_count":20911587,"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":["alpaca","alpaca-api","alpaca-markets","alpaca-trading-api","rust","rust-crate","rust-library"],"created_at":"2024-08-02T00:01:10.872Z","updated_at":"2025-04-05T01:04:30.003Z","avatar_url":"https://github.com/d-e-s-o.png","language":"Rust","readme":"[![pipeline](https://github.com/d-e-s-o/apca/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/d-e-s-o/apca/actions/workflows/test.yml)\n[![coverage](https://codecov.io/gh/d-e-s-o/apca/branch/main/graph/badge.svg)](https://codecov.io/gh/d-e-s-o/apca)\n[![crates.io](https://img.shields.io/crates/v/apca.svg)](https://crates.io/crates/apca)\n[![Docs](https://docs.rs/apca/badge.svg)](https://docs.rs/apca)\n[![rustc](https://img.shields.io/badge/rustc-1.63+-blue.svg)](https://blog.rust-lang.org/2022/08/11/Rust-1.63.0.html)\n\napca\n====\n\n- [Documentation][docs-rs]\n- [Changelog](CHANGELOG.md)\n\n**apca** is a library for interacting with the Alpaca API at\n[alpaca.markets][]. The crate is entirely written in Rust and exposes a\nfully async API based on the native `async`/`await` language feature.\n\nThe crate provides access to the majority of functionality provided by\nAlpaca, including, but not limited to:\n- inquiring of account information\n- changing of the account configuration\n- retrieving of past account activity\n- accessing the market clock\n- submitting, changing, listing, and canceling orders\n- listing and closing open positions\n- listing and retrieving general asset information\n- streaming of order updates over WebSocket\n- historic market data retrieval through Alpaca's Data API\n- real time market data streaming via Alpaca's websocket API\n\nFor convenient command-line based access to the API, please use\n[`apcacli`][apcacli].\n\n\nUsage\n-----\n\nThe following example illustrates how to create a `Client` object and\nthen submit a limit order for `AAPL` with a limit price of USD 100:\n```rust\nlet api_info = ApiInfo::from_env().unwrap();\nlet client = Client::new(api_info);\n\nlet request = order::CreateReqInit {\n  type_: Type::Limit,\n  limit_price: Some(Num::from(100)),\n  ..Default::default()\n}\n.init(\"AAPL\", Side::Buy, order::Amount::quantity(1));\n\nlet order = client\n  .issue::\u003corder::Create\u003e(\u0026request)\n  .await\n  .unwrap();\n```\n\nThe returned `order` object can subsequently be inspected to find out\ndetails about the order (such as its ID). The full example is available\n[here][example-order].\n\nPlease refer to the full [documentation][docs-rs] for more details.\n\n\n[example-order]: examples/order.rs\n[docs-rs]: https://docs.rs/crate/apca\n[alpaca.markets]: https://alpaca.markets\n[apcacli]: https://crates.io/crates/apcacli\n[polyio]: https://crates.io/crates/polyio\n","funding_links":[],"categories":["Libraries"],"sub_categories":["Finance"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-e-s-o%2Fapca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-e-s-o%2Fapca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-e-s-o%2Fapca/lists"}